#include<cstdio>
#include<cstdlib>
#include<iostream>

#define DFL_LEN 32
#define MAX_THREADS_PER_BLOCK 1024 //supported by hardware, run ./deviceQuery to determine

//cuda error checking 
#define check_error(ans) {cudaCheckError((ans),__FILE__,__LINE__);}

inline void cudaCheckError(cudaError_t e,const char *file,int line,bool abort = true){
    if(e != cudaSuccess){
        fprintf(stderr,"GPUassert: %s\nFile: %s\nLine: %d\n",cudaGetErrorString(e),file,line);
        if(abort) exit(e);
    }
}
//end of error checking

typedef long int g_type;

//struct declarations and global variables begin here


struct vertex{
    g_type number;
    g_type start;
    int n;
};

struct map{
    g_type node;
    g_type index;
};

struct entry{
    g_type edge;
    double val;
};

g_type *edges;
g_type edges_length;
g_type edges_size;
g_type edges_itr;


struct vertex *vertex_list;
g_type vertex_length;
g_type vertex_size;
g_type vertex_itr; 

struct entry *transitions;
struct map *node_map;
double *ranks;
double *result;

//end of struct and global definitions

//start of interface
int init_edges(){
    if(edges != NULL)
        return 0;
    edges = (g_type *)malloc(DFL_LEN * sizeof(g_type));
    if(edges == NULL){
        fprintf(stderr,"Malloc failed in %s at line %d\n",__FILE__,__LINE__);
        return 0;
    }
    edges_size = DFL_LEN;
    edges_length = 0;
    edges_itr = 0;
    return 1;
}

void delete_edges(){
    edges_length = 0;
    edges_size = DFL_LEN;
    edges_itr = 0;
    if(edges != NULL)
        free(edges);
}

int add_edge(int edge){
    if(edges == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return 0;
    } 
    if(edges_length == edges_size){
        edges_size *= 2;
        edges = (g_type *)realloc(edges,edges_size * sizeof(g_type));
        if(edges == NULL){
            fprintf(stderr,"Malloc failed in %s at line %d\n",__FILE__,__LINE__);
            return 0;
        }
    }
    edges[edges_length] = edge;
    edges_length++;
    return 1; 
}

int get_edge(g_type *e){
    
    if(edges == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return 0; 
    }
    if(e == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return 0;
    }
    g_type val = edges[edges_itr];
    edges_itr++;
    if(edges_itr >= edges_size){
        edges_itr = edges_itr % edges_size;
    }
    *e = val;
    return 1;
}

void reset_edge(){
    edges_itr = 0;
}

void move_edge(g_type index){
    edges_itr = index;
}

int init_vertices(){
    if(vertex_list != NULL)
        return 0;
    vertex_list = (struct vertex *)malloc(DFL_LEN * sizeof(struct vertex));
    if(vertex_list == NULL){
        fprintf(stderr,"Malloc failed in %s at line %d\n",__FILE__,__LINE__);
        return 0;
    }
    vertex_length = 0;
    vertex_size = DFL_LEN;
    vertex_itr = 0;
    return 1;
}

void delete_vertices(){
    vertex_itr = 0;
    vertex_length = 0;
    vertex_size = 0;
    if(vertex_list != NULL)
        free(vertex_list);
}

int add_vertex(struct vertex v){
    if(vertex_list == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return 0;
    }
    if(vertex_length == vertex_size){
        vertex_size *= 2;
        vertex_list = (struct vertex *)realloc(vertex_list,vertex_size * sizeof(struct vertex));
        if(vertex_list == NULL){
            fprintf(stderr,"Malloc failed in %s at line %d\n",__FILE__,__LINE__);
            return 0;
        }
    }
    vertex_list[vertex_length].number = v.number;
    vertex_list[vertex_length].n = v.n;
    vertex_list[vertex_length].start = v.start;
    g_type temp = vertex_length;
    vertex_length++;
    return temp;
}

int get_vertex(struct vertex *v){
    if(vertex_list == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return 0;
    }
    v->number = vertex_list[vertex_itr].number;
    v->start = vertex_list[vertex_itr].start;
    v->n = vertex_list[vertex_itr].n;
    vertex_itr++;
    if(vertex_itr >= vertex_size){
        vertex_itr = vertex_itr % vertex_size;
    }
    return 1;
}

void reset_vertex(){
    vertex_itr = 0;
}

void move_vertex(g_type index){
    vertex_itr = index; 
}

void build_graph(FILE *fp){
    if(vertex_list == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return ;
    }
    if(edges == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return ;
    }
    if(fp == NULL){
        fprintf(stderr,"File pointer error in %s at line %d\n",__FILE__,__LINE__);
        return ;
    }
    g_type from,to;
    int seen = 0;
    g_type cur = -1;
    while(fscanf(fp,"%ld %ld",&from,&to) != -1){
        if(from == vertex_list[cur].number && vertex_length != 0){
            seen = 1;
        }
        else{
            seen = 0;
        }
        if(!seen){
            struct vertex temp;
            temp.number = from;
            temp.start = edges_length;
            temp.n = 0;
            cur = add_vertex(temp);
        }
        add_edge(to);
        vertex_list[cur].n++;
    }
}

void create_map(){
   if(vertex_list == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return ;
    }
    if(edges == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return ;
    }
    if(node_map == NULL){
        node_map = (struct map *)malloc(vertex_length * sizeof(struct map));
        if(node_map == NULL){
            fprintf(stderr,"Malloc failed in %s at line %d\n",__FILE__,__LINE__);
            return ;
        }
    }
    for(int i=0;i<vertex_length;i++){
        node_map[i].node = vertex_list[i].number;
        node_map[i].index = i;
    }
}

g_type search_map(g_type node){
   if(vertex_list == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return -1;
    }
    if(edges == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return -1;
    } 
    if(node_map == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return -1;
    }
    for(int i=0;i<vertex_length;i++){
        if(node_map[i].node == node)
            return node_map[i].index;
    }
    return -1;
}

__device__ g_type search_dmap(struct map *d_map,g_type *d_vlength,g_type node){
    if(d_map == NULL){
        return -1;
    }
    g_type len = *d_vlength;
    for(g_type i=0;i<len;i++){
        if(d_map[i].node == node)
            return d_map[i].index;
    }
    return -1;
}

void delete_map(){
    if(node_map != NULL)
        free(node_map);
}

void init_ranks(){
    if(vertex_list == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return ;
    }
    if(edges == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return ;
    }
    if(ranks == NULL){
        ranks = (double *)malloc(vertex_length * sizeof(double));
        if(ranks == NULL){
            fprintf(stderr,"Malloc failed in %s at line %d\n",__FILE__,__LINE__);
            return ;
        }
    }
    for(int i=0;i<vertex_length;i++){
        ranks[i] = 0.25;
    }
}

void delete_ranks(){
    if(ranks != NULL)
        free(ranks);
}

void init_transitions(){
    if(vertex_list == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return ;
    }
    if(edges == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return ;
    }
    if(transitions == NULL){
        transitions = (struct entry *)malloc(edges_length * sizeof(struct entry));
        if(transitions == NULL){
            fprintf(stderr,"Malloc failed in %s at line %d\n",__FILE__,__LINE__);
            return ;
        }
    }
    for(g_type i=0;i<vertex_length;i++){
        g_type start = vertex_list[i].start;
        g_type j = start;
        int n = vertex_list[i].n;
        while(j < start + n){
            transitions[j].edge = edges[j];
            transitions[j].val = 1.0 / vertex_list[i].n;
            j++;
        }
    }
}

void delete_transitions(){
    if(transitions != NULL)
        free(transitions);
}

void init_result(){
    if(vertex_list == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return ;
    }
    if(edges == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return ;
    }
    if(result == NULL){
        result = (double *)malloc(vertex_length * sizeof(double));
        if(result == NULL){
            fprintf(stderr,"Malloc failed in %s at line %d\n",__FILE__,__LINE__);
            return ;
        }
    }
    for(int i=0;i<vertex_length;i++){
        result[i] = 0.0;
    }
}

void delete_result(){
    if(result != NULL)
        free(result);
}

int pagerank(){
    for(int i=0;i<vertex_length;i++){
        for(int j = vertex_list[i].start; j < vertex_list[i].start + vertex_list[i].n; j++){
            double temp = transitions[j].val * ranks[i];
            g_type index = search_map(transitions[j].edge);
            result[index] += temp;
        }
    }
    return 1;
}

void update_ranks(){
    for(int i=0;i<vertex_length;i++){
        ranks[i] = result[i];
        result[i] = 0.0;
    }
}

//end of interface

//CUDA kernels
__global__ void multiply_kernel(struct vertex *d_vertices,struct entry *d_transitions,struct map *d_map,double *d_ranks,double *d_tempranks,g_type *d_vlength){
   int threadId = blockDim.x * blockIdx.x + threadIdx.x;
   double b = d_ranks[threadId];
   g_type len = *d_vlength;
   if(threadId < len){
       for(g_type i = d_vertices[threadId].start;i < d_vertices[threadId].start + d_vertices[threadId].n;i++){
           double a = d_transitions[i].val;
           int index = search_dmap(d_map,d_vlength,d_transitions[i].edge);
           double res = a * b;
           double temp = d_tempranks[index];
            __syncthreads();
            temp += res;
            d_tempranks[index] = temp;
            __syncthreads(); 
       }
   }
}

//deprecated
__global__ void add_kernel(struct vertex *d_vertices,struct entry *d_transitions,double *d_res,struct map *d_map,double *d_tempranks,g_type *d_vlength){
    int threadId = blockDim.x * blockIdx.x + threadIdx.x;
    g_type len = *d_vlength;
    if(threadId < len){
        for(g_type i = d_vertices[threadId].start;i < d_vertices[threadId].start + d_vertices[threadId].n;i++){
            int index = search_dmap(d_map,d_vlength,d_transitions[i].edge);
            double val = d_res[i];
            double temp = d_tempranks[index];
            __syncthreads();
            temp += val;
            d_tempranks[index] = temp;
            __syncthreads();
        }
    }
}

__global__ void update_kernel(double *d_tempranks,double *d_ranks,g_type *d_vlength){
    int threadId = blockDim.x * blockIdx.x + threadIdx.x;
    g_type len = *d_vlength;
    if(threadId < len){
        d_ranks[threadId] = d_tempranks[threadId];
    }
}

//end of CUDA kernels

//main program begins here
int main(int argc,char **argv){
    if(argc != 4){
        fprintf(stderr,"Correct usage: %s <pathToGraph> <numIterations> <serial = 0/parallel = 1>\n",argv[0]);
        exit(1);
    }
    FILE *fp = fopen(argv[1],"r");
    const int iterations = atoi(argv[2]);
    const int mode = atoi(argv[3]);
    init_vertices();
    init_edges();
    build_graph(fp);
    create_map();
    init_ranks();
    init_transitions();
    if(mode == 1){
        //initializing device memory
        g_type *d_elength;
        check_error(cudaMalloc((void **)&d_elength,sizeof(g_type)));
        check_error(cudaMemcpy(d_elength,&edges_length,sizeof(g_type),cudaMemcpyHostToDevice));

        g_type *d_vlength;
        check_error(cudaMalloc((void **)&d_vlength,sizeof(g_type)));
        check_error(cudaMemcpy(d_vlength,&vertex_length,sizeof(g_type),cudaMemcpyHostToDevice));

        struct vertex *d_vertices;
        check_error(cudaMalloc((void **)&d_vertices,vertex_length * sizeof(struct vertex)));
        check_error(cudaMemcpy(d_vertices,vertex_list,vertex_length * sizeof(struct vertex),cudaMemcpyHostToDevice));

        struct entry *d_transitions;
        check_error(cudaMalloc((void **)&d_transitions,edges_length * sizeof(struct entry)));
        check_error(cudaMemcpy(d_transitions,transitions,edges_length * sizeof(struct entry),cudaMemcpyHostToDevice));

        struct map *d_map;
        check_error(cudaMalloc((void **)&d_map,vertex_length * sizeof(struct map)));
        check_error(cudaMemcpy(d_map,node_map,vertex_length * sizeof(struct map),cudaMemcpyHostToDevice));

        double *d_ranks;
        check_error(cudaMalloc((void **)&d_ranks,vertex_length * sizeof(double)));
        check_error(cudaMemcpy(d_ranks,ranks,vertex_length * sizeof(double),cudaMemcpyHostToDevice));

        double *d_res;
        check_error(cudaMalloc((void **)&d_res,edges_length * sizeof(double)));

        double *d_tempranks;
        check_error(cudaMalloc((void **)&d_tempranks,vertex_length * sizeof(double)));

        //pagerank iterations begin here: Power method

        int blocks = 1;
        int threads = vertex_length;
        if(vertex_length > MAX_THREADS_PER_BLOCK){
            blocks = (int)ceil(vertex_length / (double)MAX_THREADS_PER_BLOCK);
            threads = MAX_THREADS_PER_BLOCK;
        }
        
        int counter = 0;
        clock_t begin = clock();
        while(counter < iterations){


            check_error(cudaMemset(d_res,0.0,edges_length * sizeof(double)));
            check_error(cudaMemset(d_tempranks,0.0,vertex_length * sizeof(double)));
            
            multiply_kernel<<<blocks,threads>>>(d_vertices,d_transitions,d_map,d_ranks,d_tempranks,d_vlength);
            cudaDeviceSynchronize();
            //add_kernel<<<blocks,threads>>>(d_vertices,d_transitions,d_res,d_map,d_tempranks,d_vlength); 
            //cudaDeviceSynchronize();
            update_kernel<<<blocks,threads>>>(d_tempranks,d_ranks,d_vlength);
            cudaDeviceSynchronize();
            counter++;
        }
        clock_t end = clock();
        //end of pagerank iterations

        double time_spent = (double)(end - begin) / CLOCKS_PER_SEC;
        double *res;
        res = (double *)malloc(vertex_length * sizeof(double));
        check_error(cudaMemcpy(res,d_ranks,vertex_length * sizeof(double),cudaMemcpyDeviceToHost));
        for(int i = 0;i<vertex_length;i++){
            printf("%lf\n",res[i]);
        }
        free(res);
        printf("%lf s\n",time_spent);

        check_error(cudaFree(d_elength));
        check_error(cudaFree(d_vlength));
        check_error(cudaFree(d_vertices));
        check_error(cudaFree(d_transitions));
        check_error(cudaFree(d_map));
        check_error(cudaFree(d_ranks));
        check_error(cudaFree(d_res));
        check_error(cudaFree(d_tempranks));
    }
    else{
        clock_t begin = clock();
        init_result();
        int counter = 0;
        while(counter < iterations){
            if(!pagerank()){
                fprintf(stderr,"Pagerank failed in iteration: %d\n",counter);
                break;
            }
            update_ranks();
            counter++;
        }
        clock_t end = clock();
        double time_spent = (double)(end - begin) / CLOCKS_PER_SEC;
        for(int i = 0;i<vertex_length;i++){
            printf("%lf\n",ranks[i]);
        }
        printf("%lf s\n",time_spent);
    }
    //end of device memory initialization
    

    delete_edges();
    delete_vertices();
    delete_ranks();
    delete_transitions();
    delete_map();
    delete_result();
    return 0;
}



	.file	"tmpxft_002035b7_00000000-6_pagerank.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3664:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE3664:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.section	.rodata._Z14cudaCheckError9cudaErrorPKcib.str1.1,"aMS",@progbits,1
.LC0:
	.string	"GPUassert: %s\nFile: %s\nLine: %d\n"
	.section	.text._Z14cudaCheckError9cudaErrorPKcib,"axG",@progbits,_Z14cudaCheckError9cudaErrorPKcib,comdat
	.weak	_Z14cudaCheckError9cudaErrorPKcib
	.type	_Z14cudaCheckError9cudaErrorPKcib, @function
_Z14cudaCheckError9cudaErrorPKcib:
.LFB3635:
	.cfi_startproc
	endbr64
	testl	%edi, %edi
	je	.L8
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%ecx, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	%edi, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movl	%edx, 12(%rsp)
	movq	%rsi, (%rsp)
	call	cudaGetErrorString@PLT
	movl	12(%rsp), %r9d
	movq	(%rsp), %r8
	leaq	.LC0(%rip), %rdx
	movq	stderr(%rip), %rdi
	movq	%rax, %rcx
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	testb	%bpl, %bpl
	je	.L2
	movl	%ebx, %edi
	call	exit@PLT
.L2:
	addq	$24, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE3635:
	.size	_Z14cudaCheckError9cudaErrorPKcib, .-_Z14cudaCheckError9cudaErrorPKcib
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"/home/ubuntu/Datasets/stackv2/train-structured/shreyas42/CudaPageRank/master/pagerank.cu"
.LC2:
	.string	"Malloc failed in %s at line %d\n"
	.text
	.globl	_Z10init_edgesv
	.type	_Z10init_edgesv, @function
_Z10init_edgesv:
.LFB3636:
	.cfi_startproc
	endbr64
	cmpq	$0, edges(%rip)
	jne	.L17
	pushq	%rsi
	.cfi_def_cfa_offset 16
	movl	$256, %edi
	call	malloc@PLT
	movq	%rax, edges(%rip)
	testq	%rax, %rax
	jne	.L14
	movq	stderr(%rip), %rdi
	movl	$64, %r8d
	leaq	.LC1(%rip), %rcx
	leaq	.LC2(%rip), %rdx
	movl	$2, %esi
	call	__fprintf_chk@PLT
	xorl	%eax, %eax
	jmp	.L12
.L14:
	xorl	%ecx, %ecx
	movl	$1, %eax
	movq	$32, edges_size(%rip)
	movq	%rcx, edges_length(%rip)
	movq	%rcx, edges_itr(%rip)
.L12:
	popq	%rdx
	.cfi_def_cfa_offset 8
	ret
.L17:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE3636:
	.size	_Z10init_edgesv, .-_Z10init_edgesv
	.globl	_Z12delete_edgesv
	.type	_Z12delete_edgesv, @function
_Z12delete_edgesv:
.LFB3637:
	.cfi_startproc
	endbr64
	movq	edges(%rip), %rdi
	xorl	%eax, %eax
	xorl	%edx, %edx
	movq	$32, edges_size(%rip)
	movq	%rax, edges_length(%rip)
	movq	%rdx, edges_itr(%rip)
	testq	%rdi, %rdi
	je	.L20
	jmp	free@PLT
.L20:
	ret
	.cfi_endproc
.LFE3637:
	.size	_Z12delete_edgesv, .-_Z12delete_edgesv
	.section	.rodata.str1.1
.LC3:
	.string	"Null pointer error in %s at line %d\n"
	.text
	.globl	_Z8add_edgei
	.type	_Z8add_edgei, @function
_Z8add_edgei:
.LFB3638:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movslq	%edi, %rbx
	movq	edges(%rip), %rdi
	testq	%rdi, %rdi
	jne	.L23
	movq	stderr(%rip), %rdi
	movl	$83, %r8d
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rcx
	leaq	.LC3(%rip), %rdx
	movl	$2, %esi
	jmp	.L28
.L23:
	movq	edges_size(%rip), %rsi
	cmpq	%rsi, edges_length(%rip)
	jne	.L25
	addq	%rsi, %rsi
	movq	%rsi, edges_size(%rip)
	salq	$3, %rsi
	call	realloc@PLT
	movq	%rax, edges(%rip)
	testq	%rax, %rax
	jne	.L25
	movq	stderr(%rip), %rdi
	movl	$90, %r8d
	leaq	.LC1(%rip), %rcx
	leaq	.LC2(%rip), %rdx
	movl	$2, %esi
.L28:
	call	__fprintf_chk@PLT
	xorl	%eax, %eax
	jmp	.L22
.L25:
	movq	edges_length(%rip), %rdx
	movq	edges(%rip), %rax
	movq	%rbx, (%rax,%rdx,8)
	movl	$1, %eax
	incq	edges_length(%rip)
.L22:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3638:
	.size	_Z8add_edgei, .-_Z8add_edgei
	.globl	_Z8get_edgePl
	.type	_Z8get_edgePl, @function
_Z8get_edgePl:
.LFB3639:
	.cfi_startproc
	endbr64
	pushq	%rcx
	.cfi_def_cfa_offset 16
	movq	edges(%rip), %rdx
	movl	$102, %r8d
	testq	%rdx, %rdx
	je	.L36
	testq	%rdi, %rdi
	jne	.L32
	movl	$106, %r8d
.L36:
	movq	stderr(%rip), %rdi
	leaq	.LC1(%rip), %rcx
	leaq	.LC3(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	xorl	%eax, %eax
	jmp	.L29
.L32:
	movq	edges_itr(%rip), %rax
	movq	edges_size(%rip), %rcx
	movq	(%rdx,%rax,8), %rsi
	incq	%rax
	movq	%rax, edges_itr(%rip)
	cmpq	%rcx, %rax
	jl	.L34
	cqto
	idivq	%rcx
	movq	%rdx, edges_itr(%rip)
.L34:
	movq	%rsi, (%rdi)
	movl	$1, %eax
.L29:
	popq	%rdx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3639:
	.size	_Z8get_edgePl, .-_Z8get_edgePl
	.globl	_Z10reset_edgev
	.type	_Z10reset_edgev, @function
_Z10reset_edgev:
.LFB3640:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	movq	%rax, edges_itr(%rip)
	ret
	.cfi_endproc
.LFE3640:
	.size	_Z10reset_edgev, .-_Z10reset_edgev
	.globl	_Z9move_edgel
	.type	_Z9move_edgel, @function
_Z9move_edgel:
.LFB3641:
	.cfi_startproc
	endbr64
	movq	%rdi, edges_itr(%rip)
	ret
	.cfi_endproc
.LFE3641:
	.size	_Z9move_edgel, .-_Z9move_edgel
	.globl	_Z13init_verticesv
	.type	_Z13init_verticesv, @function
_Z13init_verticesv:
.LFB3642:
	.cfi_startproc
	endbr64
	cmpq	$0, vertex_list(%rip)
	jne	.L44
	pushq	%rdi
	.cfi_def_cfa_offset 16
	movl	$768, %edi
	call	malloc@PLT
	movq	%rax, vertex_list(%rip)
	testq	%rax, %rax
	jne	.L41
	movq	stderr(%rip), %rdi
	movl	$131, %r8d
	leaq	.LC1(%rip), %rcx
	leaq	.LC2(%rip), %rdx
	movl	$2, %esi
	call	__fprintf_chk@PLT
	xorl	%eax, %eax
	jmp	.L39
.L41:
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	movl	$1, %eax
	movq	$32, vertex_size(%rip)
	movq	%rcx, vertex_length(%rip)
	movq	%rsi, vertex_itr(%rip)
.L39:
	popq	%rdx
	.cfi_def_cfa_offset 8
	ret
.L44:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE3642:
	.size	_Z13init_verticesv, .-_Z13init_verticesv
	.globl	_Z15delete_verticesv
	.type	_Z15delete_verticesv, @function
_Z15delete_verticesv:
.LFB3643:
	.cfi_startproc
	endbr64
	movq	vertex_list(%rip), %rdi
	xorl	%eax, %eax
	movq	%rax, vertex_itr(%rip)
	movq	%rax, vertex_length(%rip)
	movq	%rax, vertex_size(%rip)
	testq	%rdi, %rdi
	je	.L47
	jmp	free@PLT
.L47:
	ret
	.cfi_endproc
.LFE3643:
	.size	_Z15delete_verticesv, .-_Z15delete_verticesv
	.globl	_Z10add_vertex6vertex
	.type	_Z10add_vertex6vertex, @function
_Z10add_vertex6vertex:
.LFB3644:
	.cfi_startproc
	endbr64
	pushq	%rcx
	.cfi_def_cfa_offset 16
	movq	vertex_list(%rip), %rdi
	testq	%rdi, %rdi
	jne	.L50
	movq	stderr(%rip), %rdi
	movl	$150, %r8d
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rcx
	leaq	.LC3(%rip), %rdx
	movl	$2, %esi
	jmp	.L55
.L50:
	movq	vertex_size(%rip), %rsi
	cmpq	%rsi, vertex_length(%rip)
	jne	.L52
	addq	%rsi, %rsi
	movq	%rsi, vertex_size(%rip)
	imulq	$24, %rsi, %rsi
	call	realloc@PLT
	movq	%rax, vertex_list(%rip)
	testq	%rax, %rax
	jne	.L52
	movq	stderr(%rip), %rdi
	movl	$157, %r8d
	leaq	.LC1(%rip), %rcx
	leaq	.LC2(%rip), %rdx
	movl	$2, %esi
.L55:
	call	__fprintf_chk@PLT
	xorl	%eax, %eax
	jmp	.L49
.L52:
	movq	vertex_length(%rip), %rax
	movq	16(%rsp), %rcx
	imulq	$24, %rax, %rdx
	addq	vertex_list(%rip), %rdx
	movq	%rcx, (%rdx)
	movl	32(%rsp), %ecx
	movl	%ecx, 16(%rdx)
	movq	24(%rsp), %rcx
	movq	%rcx, 8(%rdx)
	leaq	1(%rax), %rdx
	movq	%rdx, vertex_length(%rip)
.L49:
	popq	%rdx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3644:
	.size	_Z10add_vertex6vertex, .-_Z10add_vertex6vertex
	.globl	_Z10get_vertexP6vertex
	.type	_Z10get_vertexP6vertex, @function
_Z10get_vertexP6vertex:
.LFB3645:
	.cfi_startproc
	endbr64
	movq	vertex_list(%rip), %rdx
	testq	%rdx, %rdx
	jne	.L57
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	stderr(%rip), %rdi
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rdx
	movl	$171, %r8d
	leaq	.LC1(%rip), %rcx
	movl	$2, %esi
	call	__fprintf_chk@PLT
	xorl	%eax, %eax
	popq	%rdx
	.cfi_def_cfa_offset 8
	ret
.L57:
	movq	vertex_itr(%rip), %rax
	imulq	$24, %rax, %rcx
	incq	%rax
	addq	%rcx, %rdx
	movq	(%rdx), %rcx
	movq	%rcx, (%rdi)
	movq	8(%rdx), %rcx
	movl	16(%rdx), %edx
	movq	%rax, vertex_itr(%rip)
	movq	%rcx, 8(%rdi)
	movq	vertex_size(%rip), %rcx
	movl	%edx, 16(%rdi)
	cmpq	%rcx, %rax
	jge	.L59
.L60:
	movl	$1, %eax
	ret
.L59:
	cqto
	idivq	%rcx
	movq	%rdx, vertex_itr(%rip)
	jmp	.L60
	.cfi_endproc
.LFE3645:
	.size	_Z10get_vertexP6vertex, .-_Z10get_vertexP6vertex
	.globl	_Z12reset_vertexv
	.type	_Z12reset_vertexv, @function
_Z12reset_vertexv:
.LFB3646:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	movq	%rax, vertex_itr(%rip)
	ret
	.cfi_endproc
.LFE3646:
	.size	_Z12reset_vertexv, .-_Z12reset_vertexv
	.globl	_Z11move_vertexl
	.type	_Z11move_vertexl, @function
_Z11move_vertexl:
.LFB3647:
	.cfi_startproc
	endbr64
	movq	%rdi, vertex_itr(%rip)
	ret
	.cfi_endproc
.LFE3647:
	.size	_Z11move_vertexl, .-_Z11move_vertexl
	.section	.rodata.str1.1
.LC4:
	.string	"File pointer error in %s at line %d\n"
.LC5:
	.string	"%ld %ld"
	.text
	.globl	_Z11build_graphP8_IO_FILE
	.type	_Z11build_graphP8_IO_FILE, @function
_Z11build_graphP8_IO_FILE:
.LFB3648:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$48, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	cmpq	$0, vertex_list(%rip)
	jne	.L68
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	movl	$194, %r8d
	je	.L83
	jmp	.L82
.L68:
	cmpq	$0, edges(%rip)
	jne	.L70
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	movl	$198, %r8d
	jne	.L82
.L83:
	leaq	.LC1(%rip), %rcx
	leaq	.LC3(%rip), %rdx
	jmp	.L81
.L70:
	movq	%rdi, %rbp
	orq	$-1, %rbx
	leaq	.LC5(%rip), %r12
	testq	%rdi, %rdi
	jne	.L72
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	movl	$202, %r8d
	leaq	.LC1(%rip), %rcx
	leaq	.LC4(%rip), %rdx
	jne	.L82
.L81:
	movq	stderr(%rip), %rdi
	addq	$48, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	movl	$2, %esi
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	jmp	__fprintf_chk@PLT
.L76:
	.cfi_restore_state
	imulq	$24, %rbx, %rax
	addq	vertex_list(%rip), %rax
	movq	(%rsp), %rdx
	cmpq	%rdx, (%rax)
	jne	.L74
	cmpq	$0, vertex_length(%rip)
	je	.L74
.L75:
	movl	8(%rsp), %edi
	call	_Z8add_edgei
	imulq	$24, %rbx, %rax
	addq	vertex_list(%rip), %rax
	incl	16(%rax)
.L72:
	xorl	%eax, %eax
	leaq	8(%rsp), %rcx
	movq	%rsp, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc23_fscanf@PLT
	incl	%eax
	jne	.L76
	jmp	.L84
.L74:
	movq	edges_length(%rip), %rax
	movq	%rdx, 16(%rsp)
	subq	$32, %rsp
	.cfi_def_cfa_offset 112
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	movl	%eax, 64(%rsp)
	movups	48(%rsp), %xmm0
	movq	64(%rsp), %rax
	movups	%xmm0, (%rsp)
	movq	%rax, 16(%rsp)
	call	_Z10add_vertex6vertex
	addq	$32, %rsp
	.cfi_def_cfa_offset 80
	movslq	%eax, %rbx
	jmp	.L75
.L84:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	je	.L77
.L82:
	call	__stack_chk_fail@PLT
.L77:
	addq	$48, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3648:
	.size	_Z11build_graphP8_IO_FILE, .-_Z11build_graphP8_IO_FILE
	.globl	_Z10create_mapv
	.type	_Z10create_mapv, @function
_Z10create_mapv:
.LFB3649:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$229, %r8d
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	pushq	%r10
	.cfi_def_cfa_offset 32
	movq	vertex_list(%rip), %rbp
	testq	%rbp, %rbp
	je	.L94
	cmpq	$0, edges(%rip)
	jne	.L87
	movl	$233, %r8d
.L94:
	movq	stderr(%rip), %rdi
	leaq	.LC1(%rip), %rcx
	leaq	.LC3(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	jmp	.L93
.L87:
	cmpq	$0, node_map(%rip)
	movq	vertex_length(%rip), %rbx
	je	.L88
.L90:
	movq	node_map(%rip), %rdx
	xorl	%eax, %eax
	jmp	.L89
.L88:
	movq	%rbx, %rdi
	salq	$4, %rdi
	call	malloc@PLT
	movq	%rax, node_map(%rip)
	testq	%rax, %rax
	jne	.L90
	movq	stderr(%rip), %rdi
	movl	$239, %r8d
	leaq	.LC1(%rip), %rcx
	leaq	.LC2(%rip), %rdx
	movl	$2, %esi
.L93:
	popq	%r9
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	__fprintf_chk@PLT
.L89:
	.cfi_restore_state
	cmpq	%rbx, %rax
	jge	.L95
	imulq	$24, %rax, %rcx
	addq	$16, %rdx
	movq	0(%rbp,%rcx), %rcx
	movq	%rax, -8(%rdx)
	incq	%rax
	movq	%rcx, -16(%rdx)
	jmp	.L89
.L95:
	popq	%rax
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3649:
	.size	_Z10create_mapv, .-_Z10create_mapv
	.globl	_Z10search_mapl
	.type	_Z10search_mapl, @function
_Z10search_mapl:
.LFB3650:
	.cfi_startproc
	endbr64
	pushq	%rcx
	.cfi_def_cfa_offset 16
	cmpq	$0, vertex_list(%rip)
	movl	$251, %r8d
	je	.L106
	cmpq	$0, edges(%rip)
	jne	.L99
	movl	$255, %r8d
.L106:
	movq	stderr(%rip), %rdi
	leaq	.LC1(%rip), %rcx
	leaq	.LC3(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
.L98:
	orq	$-1, %rax
	jmp	.L96
.L99:
	movq	node_map(%rip), %rax
	testq	%rax, %rax
	je	.L101
	movq	vertex_length(%rip), %rsi
	xorl	%edx, %edx
	jmp	.L102
.L101:
	movl	$259, %r8d
	jmp	.L106
.L102:
	cmpq	%rdx, %rsi
	jle	.L98
	movq	%rax, %rcx
	incq	%rdx
	addq	$16, %rax
	cmpq	%rdi, (%rcx)
	jne	.L102
	movq	8(%rcx), %rax
.L96:
	popq	%rdx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3650:
	.size	_Z10search_mapl, .-_Z10search_mapl
	.globl	_Z11search_dmapP3mapPll
	.type	_Z11search_dmapP3mapPll, @function
_Z11search_dmapP3mapPll:
.LFB3651:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	popq	%rax
	.cfi_def_cfa_offset 8
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movl	$1, 12(%rsp)
	movl	12(%rsp), %edi
	call	exit@PLT
	.cfi_endproc
.LFE3651:
	.size	_Z11search_dmapP3mapPll, .-_Z11search_dmapP3mapPll
	.globl	_Z10delete_mapv
	.type	_Z10delete_mapv, @function
_Z10delete_mapv:
.LFB3652:
	.cfi_startproc
	endbr64
	movq	node_map(%rip), %rdi
	testq	%rdi, %rdi
	je	.L109
	jmp	free@PLT
.L109:
	ret
	.cfi_endproc
.LFE3652:
	.size	_Z10delete_mapv, .-_Z10delete_mapv
	.globl	_Z10init_ranksv
	.type	_Z10init_ranksv, @function
_Z10init_ranksv:
.LFB3653:
	.cfi_startproc
	endbr64
	cmpq	$0, vertex_list(%rip)
	movl	$288, %r8d
	je	.L121
	cmpq	$0, edges(%rip)
	jne	.L113
	movl	$292, %r8d
.L121:
	movq	stderr(%rip), %rdi
	leaq	.LC1(%rip), %rcx
	leaq	.LC3(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	jmp	.L120
.L113:
	cmpq	$0, ranks(%rip)
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	vertex_length(%rip), %rbx
	je	.L114
.L116:
	movq	ranks(%rip), %rdx
	movsd	.LC6(%rip), %xmm0
	xorl	%eax, %eax
	jmp	.L115
.L114:
	leaq	0(,%rbx,8), %rdi
	call	malloc@PLT
	movq	%rax, ranks(%rip)
	testq	%rax, %rax
	jne	.L116
	movq	stderr(%rip), %rdi
	movl	$298, %r8d
	popq	%rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 8
	leaq	.LC1(%rip), %rcx
	leaq	.LC2(%rip), %rdx
	movl	$2, %esi
.L120:
	jmp	__fprintf_chk@PLT
.L115:
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	cmpq	%rax, %rbx
	jle	.L122
	movsd	%xmm0, (%rdx,%rax,8)
	incq	%rax
	jmp	.L115
.L122:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3653:
	.size	_Z10init_ranksv, .-_Z10init_ranksv
	.globl	_Z12delete_ranksv
	.type	_Z12delete_ranksv, @function
_Z12delete_ranksv:
.LFB3654:
	.cfi_startproc
	endbr64
	movq	ranks(%rip), %rdi
	testq	%rdi, %rdi
	je	.L123
	jmp	free@PLT
.L123:
	ret
	.cfi_endproc
.LFE3654:
	.size	_Z12delete_ranksv, .-_Z12delete_ranksv
	.globl	_Z16init_transitionsv
	.type	_Z16init_transitionsv, @function
_Z16init_transitionsv:
.LFB3655:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$314, %r8d
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	pushq	%r10
	.cfi_def_cfa_offset 32
	movq	vertex_list(%rip), %rbx
	testq	%rbx, %rbx
	je	.L136
	movq	edges(%rip), %rbp
	testq	%rbp, %rbp
	jne	.L127
	movl	$318, %r8d
.L136:
	movq	stderr(%rip), %rdi
	leaq	.LC1(%rip), %rcx
	leaq	.LC3(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	jmp	.L135
.L127:
	cmpq	$0, transitions(%rip)
	je	.L128
.L130:
	movq	vertex_length(%rip), %r10
	movq	transitions(%rip), %rdi
	leaq	8(%rbx), %rax
	xorl	%ecx, %ecx
	movsd	.LC7(%rip), %xmm0
	jmp	.L129
.L128:
	movq	edges_length(%rip), %rdi
	salq	$4, %rdi
	call	malloc@PLT
	movq	%rax, transitions(%rip)
	testq	%rax, %rax
	jne	.L130
	movq	stderr(%rip), %rdi
	movl	$324, %r8d
	leaq	.LC1(%rip), %rcx
	leaq	.LC2(%rip), %rdx
	movl	$2, %esi
.L135:
	popq	%r9
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	__fprintf_chk@PLT
.L138:
	.cfi_restore_state
	incq	%rcx
	addq	$24, %rax
.L129:
	cmpq	%rcx, %r10
	jle	.L137
	movslq	8(%rax), %rsi
	movq	(%rax), %rdx
	movq	%rsi, %r8
	addq	%rdx, %rsi
.L131:
	cmpq	%rdx, %rsi
	jle	.L138
	cvtsi2sdl	%r8d, %xmm2
	movaps	%xmm0, %xmm1
	movq	0(%rbp,%rdx,8), %r11
	movq	%rdx, %r9
	salq	$4, %r9
	incq	%rdx
	movq	%r11, (%rdi,%r9)
	divsd	%xmm2, %xmm1
	movsd	%xmm1, 8(%rdi,%r9)
	jmp	.L131
.L137:
	popq	%rax
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3655:
	.size	_Z16init_transitionsv, .-_Z16init_transitionsv
	.globl	_Z18delete_transitionsv
	.type	_Z18delete_transitionsv, @function
_Z18delete_transitionsv:
.LFB3656:
	.cfi_startproc
	endbr64
	movq	transitions(%rip), %rdi
	testq	%rdi, %rdi
	je	.L139
	jmp	free@PLT
.L139:
	ret
	.cfi_endproc
.LFE3656:
	.size	_Z18delete_transitionsv, .-_Z18delete_transitionsv
	.globl	_Z11init_resultv
	.type	_Z11init_resultv, @function
_Z11init_resultv:
.LFB3657:
	.cfi_startproc
	endbr64
	cmpq	$0, vertex_list(%rip)
	movl	$347, %r8d
	je	.L151
	cmpq	$0, edges(%rip)
	jne	.L143
	movl	$351, %r8d
.L151:
	movq	stderr(%rip), %rdi
	leaq	.LC1(%rip), %rcx
	leaq	.LC3(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	jmp	.L150
.L143:
	cmpq	$0, result(%rip)
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	vertex_length(%rip), %rbx
	je	.L144
.L146:
	movq	result(%rip), %rdx
	xorl	%eax, %eax
	jmp	.L145
.L144:
	leaq	0(,%rbx,8), %rdi
	call	malloc@PLT
	movq	%rax, result(%rip)
	testq	%rax, %rax
	jne	.L146
	movq	stderr(%rip), %rdi
	movl	$357, %r8d
	popq	%rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 8
	leaq	.LC1(%rip), %rcx
	leaq	.LC2(%rip), %rdx
	movl	$2, %esi
.L150:
	jmp	__fprintf_chk@PLT
.L145:
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	cmpq	%rax, %rbx
	jle	.L152
	movq	$0x000000000, (%rdx,%rax,8)
	incq	%rax
	jmp	.L145
.L152:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3657:
	.size	_Z11init_resultv, .-_Z11init_resultv
	.globl	_Z13delete_resultv
	.type	_Z13delete_resultv, @function
_Z13delete_resultv:
.LFB3658:
	.cfi_startproc
	endbr64
	movq	result(%rip), %rdi
	testq	%rdi, %rdi
	je	.L153
	jmp	free@PLT
.L153:
	ret
	.cfi_endproc
.LFE3658:
	.size	_Z13delete_resultv, .-_Z13delete_resultv
	.globl	_Z8pagerankv
	.type	_Z8pagerankv, @function
_Z8pagerankv:
.LFB3659:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
.L156:
	cmpq	%rbx, vertex_length(%rip)
	jle	.L161
	imulq	$24, %rbx, %r12
	movq	vertex_list(%rip), %rax
	leaq	0(,%rbx,8), %r13
	movslq	8(%rax,%r12), %rbp
.L157:
	movq	vertex_list(%rip), %rdx
	addq	%r12, %rdx
	movslq	16(%rdx), %rax
	addq	8(%rdx), %rax
	cmpq	%rbp, %rax
	jle	.L162
	movq	ranks(%rip), %rdx
	movq	%rbp, %rax
	incq	%rbp
	salq	$4, %rax
	addq	transitions(%rip), %rax
	movsd	(%rdx,%r13), %xmm0
	mulsd	8(%rax), %xmm0
	movq	(%rax), %rdi
	movsd	%xmm0, 8(%rsp)
	call	_Z10search_mapl
	movq	result(%rip), %rdx
	movsd	8(%rsp), %xmm0
	leaq	(%rdx,%rax,8), %rax
	addsd	(%rax), %xmm0
	movsd	%xmm0, (%rax)
	jmp	.L157
.L162:
	incq	%rbx
	jmp	.L156
.L161:
	addq	$24, %rsp
	.cfi_def_cfa_offset 40
	movl	$1, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3659:
	.size	_Z8pagerankv, .-_Z8pagerankv
	.globl	_Z12update_ranksv
	.type	_Z12update_ranksv, @function
_Z12update_ranksv:
.LFB3660:
	.cfi_startproc
	endbr64
	movq	vertex_length(%rip), %rcx
	movq	result(%rip), %rdx
	xorl	%eax, %eax
	movq	ranks(%rip), %rsi
.L164:
	cmpq	%rax, %rcx
	jle	.L166
	movsd	(%rdx,%rax,8), %xmm0
	movsd	%xmm0, (%rsi,%rax,8)
	movq	$0x000000000, (%rdx,%rax,8)
	incq	%rax
	jmp	.L164
.L166:
	ret
	.cfi_endproc
.LFE3660:
	.size	_Z12update_ranksv, .-_Z12update_ranksv
	.globl	_Z60__device_stub__Z15multiply_kernelP6vertexP5entryP3mapPdS5_PlP6vertexP5entryP3mapPdS5_Pl
	.type	_Z60__device_stub__Z15multiply_kernelP6vertexP5entryP3mapPdS5_PlP6vertexP5entryP3mapPdS5_Pl, @function
_Z60__device_stub__Z15multiply_kernelP6vertexP5entryP3mapPdS5_PlP6vertexP5entryP3mapPdS5_Pl:
.LFB3686:
	.cfi_startproc
	endbr64
	subq	$184, %rsp
	.cfi_def_cfa_offset 192
	movq	%rdi, 40(%rsp)
	leaq	72(%rsp), %rdi
	movq	%rsi, 32(%rsp)
	leaq	84(%rsp), %rsi
	movq	%rdx, 24(%rsp)
	leaq	56(%rsp), %rdx
	movq	%rcx, 16(%rsp)
	leaq	64(%rsp), %rcx
	movq	%r8, 8(%rsp)
	movq	%r9, (%rsp)
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	movl	$1, 80(%rsp)
	movq	%rax, 120(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 152(%rsp)
	movq	%rsp, %rax
	movq	%rax, 160(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 72(%rsp)
	movq	%rax, 84(%rsp)
	movl	$1, 92(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L167
	pushq	64(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z15multiply_kernelP6vertexP5entryP3mapPdS5_Pl(%rip), %rdi
	pushq	64(%rsp)
	.cfi_def_cfa_offset 208
	movq	100(%rsp), %rcx
	movl	108(%rsp), %r8d
	movq	88(%rsp), %rsi
	movl	96(%rsp), %edx
	leaq	136(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 200
	popq	%rdx
	.cfi_def_cfa_offset 192
.L167:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L169
	call	__stack_chk_fail@PLT
.L169:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3686:
	.size	_Z60__device_stub__Z15multiply_kernelP6vertexP5entryP3mapPdS5_PlP6vertexP5entryP3mapPdS5_Pl, .-_Z60__device_stub__Z15multiply_kernelP6vertexP5entryP3mapPdS5_PlP6vertexP5entryP3mapPdS5_Pl
	.globl	_Z15multiply_kernelP6vertexP5entryP3mapPdS5_Pl
	.type	_Z15multiply_kernelP6vertexP5entryP3mapPdS5_Pl, @function
_Z15multiply_kernelP6vertexP5entryP3mapPdS5_Pl:
.LFB3687:
	.cfi_startproc
	endbr64
	jmp	_Z60__device_stub__Z15multiply_kernelP6vertexP5entryP3mapPdS5_PlP6vertexP5entryP3mapPdS5_Pl
	.cfi_endproc
.LFE3687:
	.size	_Z15multiply_kernelP6vertexP5entryP3mapPdS5_Pl, .-_Z15multiply_kernelP6vertexP5entryP3mapPdS5_Pl
	.globl	_Z55__device_stub__Z10add_kernelP6vertexP5entryPdP3mapS3_PlP6vertexP5entryPdP3mapS3_Pl
	.type	_Z55__device_stub__Z10add_kernelP6vertexP5entryPdP3mapS3_PlP6vertexP5entryPdP3mapS3_Pl, @function
_Z55__device_stub__Z10add_kernelP6vertexP5entryPdP3mapS3_PlP6vertexP5entryPdP3mapS3_Pl:
.LFB3688:
	.cfi_startproc
	endbr64
	subq	$184, %rsp
	.cfi_def_cfa_offset 192
	movq	%rdi, 40(%rsp)
	leaq	72(%rsp), %rdi
	movq	%rsi, 32(%rsp)
	leaq	84(%rsp), %rsi
	movq	%rdx, 24(%rsp)
	leaq	56(%rsp), %rdx
	movq	%rcx, 16(%rsp)
	leaq	64(%rsp), %rcx
	movq	%r8, 8(%rsp)
	movq	%r9, (%rsp)
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	movl	$1, 80(%rsp)
	movq	%rax, 120(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 152(%rsp)
	movq	%rsp, %rax
	movq	%rax, 160(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 72(%rsp)
	movq	%rax, 84(%rsp)
	movl	$1, 92(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L172
	pushq	64(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z10add_kernelP6vertexP5entryPdP3mapS3_Pl(%rip), %rdi
	pushq	64(%rsp)
	.cfi_def_cfa_offset 208
	movq	100(%rsp), %rcx
	movl	108(%rsp), %r8d
	movq	88(%rsp), %rsi
	movl	96(%rsp), %edx
	leaq	136(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 200
	popq	%rdx
	.cfi_def_cfa_offset 192
.L172:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L174
	call	__stack_chk_fail@PLT
.L174:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3688:
	.size	_Z55__device_stub__Z10add_kernelP6vertexP5entryPdP3mapS3_PlP6vertexP5entryPdP3mapS3_Pl, .-_Z55__device_stub__Z10add_kernelP6vertexP5entryPdP3mapS3_PlP6vertexP5entryPdP3mapS3_Pl
	.globl	_Z10add_kernelP6vertexP5entryPdP3mapS3_Pl
	.type	_Z10add_kernelP6vertexP5entryPdP3mapS3_Pl, @function
_Z10add_kernelP6vertexP5entryPdP3mapS3_Pl:
.LFB3689:
	.cfi_startproc
	endbr64
	jmp	_Z55__device_stub__Z10add_kernelP6vertexP5entryPdP3mapS3_PlP6vertexP5entryPdP3mapS3_Pl
	.cfi_endproc
.LFE3689:
	.size	_Z10add_kernelP6vertexP5entryPdP3mapS3_Pl, .-_Z10add_kernelP6vertexP5entryPdP3mapS3_Pl
	.globl	_Z37__device_stub__Z13update_kernelPdS_PlPdS_Pl
	.type	_Z37__device_stub__Z13update_kernelPdS_PlPdS_Pl, @function
_Z37__device_stub__Z13update_kernelPdS_PlPdS_Pl:
.LFB3690:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	32(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L177
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z13update_kernelPdS_Pl(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L177:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L179
	call	__stack_chk_fail@PLT
.L179:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3690:
	.size	_Z37__device_stub__Z13update_kernelPdS_PlPdS_Pl, .-_Z37__device_stub__Z13update_kernelPdS_PlPdS_Pl
	.globl	_Z13update_kernelPdS_Pl
	.type	_Z13update_kernelPdS_Pl, @function
_Z13update_kernelPdS_Pl:
.LFB3691:
	.cfi_startproc
	endbr64
	jmp	_Z37__device_stub__Z13update_kernelPdS_PlPdS_Pl
	.cfi_endproc
.LFE3691:
	.size	_Z13update_kernelPdS_Pl, .-_Z13update_kernelPdS_Pl
	.section	.rodata.str1.1
.LC9:
	.string	"Correct usage: %s <pathToGraph> <numIterations> <serial = 0/parallel = 1>\n"
.LC10:
	.string	"r"
.LC13:
	.string	"%lf\n"
.LC14:
	.string	"%lf s\n"
.LC15:
	.string	"Pagerank failed in iteration: %d\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB3661:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rsi, %rbx
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	cmpl	$4, %edi
	je	.L183
	movq	(%rsi), %rcx
	movq	stderr(%rip), %rdi
	leaq	.LC9(%rip), %rdx
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movl	$1, %edi
	call	exit@PLT
.L183:
	movq	8(%rsi), %rdi
	leaq	.LC10(%rip), %rsi
	call	fopen@PLT
	movq	16(%rbx), %rdi
	movq	%rax, %r13
	call	atoi@PLT
	movq	24(%rbx), %rdi
	movl	%eax, %r12d
	call	atoi@PLT
	movl	%eax, %ebp
	call	_Z13init_verticesv
	call	_Z10init_edgesv
	movq	%r13, %rdi
	call	_Z11build_graphP8_IO_FILE
	call	_Z10create_mapv
	call	_Z10init_ranksv
	call	_Z16init_transitionsv
	cmpl	$1, %ebp
	jne	.L184
	movq	%rsp, %rdi
	movl	$8, %esi
	call	cudaMalloc@PLT
	movl	$1, %ecx
	movl	$455, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	movq	(%rsp), %rdi
	movl	$1, %ecx
	movl	$8, %edx
	leaq	edges_length(%rip), %rsi
	call	cudaMemcpy@PLT
	movl	$1, %ecx
	movl	$456, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	leaq	8(%rsp), %rdi
	movl	$8, %esi
	call	cudaMalloc@PLT
	movl	$1, %ecx
	movl	$459, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	movq	8(%rsp), %rdi
	movl	$1, %ecx
	movl	$8, %edx
	leaq	vertex_length(%rip), %rsi
	call	cudaMemcpy@PLT
	movl	$1, %ecx
	movl	$460, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	imulq	$24, vertex_length(%rip), %rsi
	leaq	16(%rsp), %rdi
	call	cudaMalloc@PLT
	movl	$1, %ecx
	movl	$463, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	movq	16(%rsp), %rdi
	movl	$1, %ecx
	imulq	$24, vertex_length(%rip), %rdx
	movq	vertex_list(%rip), %rsi
	call	cudaMemcpy@PLT
	movl	$1, %ecx
	movl	$464, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	movq	edges_length(%rip), %rsi
	leaq	24(%rsp), %rdi
	salq	$4, %rsi
	call	cudaMalloc@PLT
	movl	$1, %ecx
	movl	$467, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	movq	24(%rsp), %rdi
	movl	$1, %ecx
	movq	edges_length(%rip), %rdx
	movq	transitions(%rip), %rsi
	salq	$4, %rdx
	call	cudaMemcpy@PLT
	movl	$1, %ecx
	movl	$468, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	movq	vertex_length(%rip), %rsi
	leaq	32(%rsp), %rdi
	salq	$4, %rsi
	call	cudaMalloc@PLT
	movl	$1, %ecx
	movl	$471, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	movq	32(%rsp), %rdi
	movl	$1, %ecx
	movq	vertex_length(%rip), %rdx
	movq	node_map(%rip), %rsi
	salq	$4, %rdx
	call	cudaMemcpy@PLT
	movl	$1, %ecx
	movl	$472, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	movq	vertex_length(%rip), %rax
	leaq	40(%rsp), %rdi
	leaq	0(,%rax,8), %rsi
	call	cudaMalloc@PLT
	movl	$1, %ecx
	movl	$475, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	movq	40(%rsp), %rdi
	movl	$1, %ecx
	movq	vertex_length(%rip), %rax
	movq	ranks(%rip), %rsi
	leaq	0(,%rax,8), %rdx
	call	cudaMemcpy@PLT
	movl	$1, %ecx
	movl	$476, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	movq	edges_length(%rip), %rax
	leaq	48(%rsp), %rdi
	leaq	0(,%rax,8), %rsi
	call	cudaMalloc@PLT
	movl	$1, %ecx
	movl	$479, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	movq	vertex_length(%rip), %rax
	leaq	56(%rsp), %rdi
	leaq	0(,%rax,8), %rsi
	call	cudaMalloc@PLT
	movl	$1, %ecx
	movl	$482, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	movq	vertex_length(%rip), %rbx
	cmpq	$1024, %rbx
	jle	.L186
	cvtsi2sdq	%rbx, %xmm0
	mulsd	.LC11(%rip), %xmm0
	movl	$1024, %ebx
	call	ceil@PLT
	cvttsd2sil	%xmm0, %ebp
.L186:
	call	clock@PLT
	xorl	%r15d, %r15d
	movabsq	$4294967297, %r13
	movq	%rax, %r14
.L187:
	cmpl	%r12d, %r15d
	jge	.L202
	movq	edges_length(%rip), %rax
	movq	48(%rsp), %rdi
	xorl	%esi, %esi
	leaq	0(,%rax,8), %rdx
	call	cudaMemset@PLT
	movl	$1, %ecx
	movl	$498, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	movq	vertex_length(%rip), %rax
	movq	56(%rsp), %rdi
	xorl	%esi, %esi
	leaq	0(,%rax,8), %rdx
	call	cudaMemset@PLT
	movl	$1, %ecx
	movl	$499, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	movq	%r13, 80(%rsp)
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r13, 68(%rsp)
	movl	84(%rsp), %ecx
	movl	%ebx, 76(%rsp)
	movl	72(%rsp), %esi
	movl	%ebp, 64(%rsp)
	movq	76(%rsp), %rdx
	movq	64(%rsp), %rdi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L188
	movq	8(%rsp), %r9
	movq	56(%rsp), %r8
	movq	40(%rsp), %rcx
	movq	32(%rsp), %rdx
	movq	24(%rsp), %rsi
	movq	16(%rsp), %rdi
	call	_Z60__device_stub__Z15multiply_kernelP6vertexP5entryP3mapPdS5_PlP6vertexP5entryP3mapPdS5_Pl
.L188:
	call	cudaDeviceSynchronize@PLT
	movq	%r13, 80(%rsp)
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r13, 68(%rsp)
	movl	84(%rsp), %ecx
	movl	%ebx, 76(%rsp)
	movl	72(%rsp), %esi
	movl	%ebp, 64(%rsp)
	movq	76(%rsp), %rdx
	movq	64(%rsp), %rdi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L189
	movq	8(%rsp), %rdx
	movq	40(%rsp), %rsi
	movq	56(%rsp), %rdi
	call	_Z37__device_stub__Z13update_kernelPdS_PlPdS_Pl
.L189:
	call	cudaDeviceSynchronize@PLT
	incl	%r15d
	jmp	.L187
.L202:
	call	clock@PLT
	leaq	.LC13(%rip), %r13
	subq	%r14, %rax
	cvtsi2sdq	%rax, %xmm0
	movq	vertex_length(%rip), %rax
	divsd	.LC12(%rip), %xmm0
	movq	%xmm0, %r12
	leaq	0(,%rax,8), %rbp
	movq	%rbp, %rdi
	call	malloc@PLT
	movq	40(%rsp), %rsi
	movq	%rbp, %rdx
	movl	$2, %ecx
	movq	%rax, %rdi
	movq	%rax, %rbx
	xorl	%ebp, %ebp
	call	cudaMemcpy@PLT
	movl	$1, %ecx
	movl	$515, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
.L191:
	cmpq	%rbp, vertex_length(%rip)
	jle	.L203
	movsd	(%rbx,%rbp,8), %xmm0
	movq	%r13, %rsi
	movl	$2, %edi
	movb	$1, %al
	incq	%rbp
	call	__printf_chk@PLT
	jmp	.L191
.L203:
	movq	%rbx, %rdi
	call	free@PLT
	movq	%r12, %xmm0
	leaq	.LC14(%rip), %rsi
	movb	$1, %al
	movl	$2, %edi
	call	__printf_chk@PLT
	movq	(%rsp), %rdi
	call	cudaFree@PLT
	movl	$1, %ecx
	movl	$522, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	movq	8(%rsp), %rdi
	call	cudaFree@PLT
	movl	$1, %ecx
	movl	$523, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	movq	16(%rsp), %rdi
	call	cudaFree@PLT
	movl	$1, %ecx
	movl	$524, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	movq	24(%rsp), %rdi
	call	cudaFree@PLT
	movl	$1, %ecx
	movl	$525, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	movq	32(%rsp), %rdi
	call	cudaFree@PLT
	movl	$1, %ecx
	movl	$526, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	movq	40(%rsp), %rdi
	call	cudaFree@PLT
	movl	$1, %ecx
	movl	$527, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	movq	48(%rsp), %rdi
	call	cudaFree@PLT
	movl	$1, %ecx
	movl	$528, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	movq	56(%rsp), %rdi
	call	cudaFree@PLT
	movl	$1, %ecx
	movl	$529, %edx
	leaq	.LC1(%rip), %rsi
	movl	%eax, %edi
	call	_Z14cudaCheckError9cudaErrorPKcib
	jmp	.L193
.L184:
	call	clock@PLT
	xorl	%ebx, %ebx
	movq	%rax, %rbp
	call	_Z11init_resultv
.L194:
	cmpl	%r12d, %ebx
	jge	.L196
	call	_Z8pagerankv
	testl	%eax, %eax
	jne	.L195
	movq	stderr(%rip), %rdi
	movl	%ebx, %ecx
	movl	$2, %esi
	leaq	.LC15(%rip), %rdx
	call	__fprintf_chk@PLT
	jmp	.L196
.L195:
	call	_Z12update_ranksv
	incl	%ebx
	jmp	.L194
.L196:
	call	clock@PLT
	xorl	%ebx, %ebx
	leaq	.LC13(%rip), %r12
	subq	%rbp, %rax
	cvtsi2sdq	%rax, %xmm0
	divsd	.LC12(%rip), %xmm0
	movq	%xmm0, %rbp
.L198:
	cmpq	%rbx, vertex_length(%rip)
	jle	.L204
	movq	ranks(%rip), %rax
	movq	%r12, %rsi
	movl	$2, %edi
	movsd	(%rax,%rbx,8), %xmm0
	movb	$1, %al
	incq	%rbx
	call	__printf_chk@PLT
	jmp	.L198
.L204:
	movq	%rbp, %xmm0
	leaq	.LC14(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	call	__printf_chk@PLT
.L193:
	call	_Z12delete_edgesv
	call	_Z15delete_verticesv
	call	_Z12delete_ranksv
	call	_Z18delete_transitionsv
	call	_Z10delete_mapv
	call	_Z13delete_resultv
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	je	.L200
	call	__stack_chk_fail@PLT
.L200:
	addq	$104, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3661:
	.size	main, .-main
	.section	.rodata.str1.1
.LC16:
	.string	"_Z13update_kernelPdS_Pl"
.LC17:
	.string	"_Z10add_kernelP6vertexP5entryPdP3mapS3_Pl"
.LC18:
	.string	"_Z15multiply_kernelP6vertexP5entryP3mapPdS5_Pl"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB3693:
	.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	.LC16(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z13update_kernelPdS_Pl(%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	.LC17(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z10add_kernelP6vertexP5entryPdP3mapS3_Pl(%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	.LC18(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z15multiply_kernelP6vertexP5entryP3mapPdS5_Pl(%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
.LFE3693:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.globl	result
	.bss
	.align 8
	.type	result, @object
	.size	result, 8
result:
	.zero	8
	.globl	ranks
	.align 8
	.type	ranks, @object
	.size	ranks, 8
ranks:
	.zero	8
	.globl	node_map
	.align 8
	.type	node_map, @object
	.size	node_map, 8
node_map:
	.zero	8
	.globl	transitions
	.align 8
	.type	transitions, @object
	.size	transitions, 8
transitions:
	.zero	8
	.globl	vertex_itr
	.align 8
	.type	vertex_itr, @object
	.size	vertex_itr, 8
vertex_itr:
	.zero	8
	.globl	vertex_size
	.align 8
	.type	vertex_size, @object
	.size	vertex_size, 8
vertex_size:
	.zero	8
	.globl	vertex_length
	.align 8
	.type	vertex_length, @object
	.size	vertex_length, 8
vertex_length:
	.zero	8
	.globl	vertex_list
	.align 8
	.type	vertex_list, @object
	.size	vertex_list, 8
vertex_list:
	.zero	8
	.globl	edges_itr
	.align 8
	.type	edges_itr, @object
	.size	edges_itr, 8
edges_itr:
	.zero	8
	.globl	edges_size
	.align 8
	.type	edges_size, @object
	.size	edges_size, 8
edges_size:
	.zero	8
	.globl	edges_length
	.align 8
	.type	edges_length, @object
	.size	edges_length, 8
edges_length:
	.zero	8
	.globl	edges
	.align 8
	.type	edges, @object
	.size	edges, 8
edges:
	.zero	8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC6:
	.long	0
	.long	1070596096
	.align 8
.LC7:
	.long	0
	.long	1072693248
	.align 8
.LC11:
	.long	0
	.long	1062207488
	.align 8
.LC12:
	.long	0
	.long	1093567616
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


#include <hip/hip_runtime.h>
#include<cstdio>
#include<cstdlib>
#include<iostream>

#define DFL_LEN 32
#define MAX_THREADS_PER_BLOCK 1024 //supported by hardware, run ./deviceQuery to determine

//cuda error checking 
#define check_error(ans) {cudaCheckError((ans),__FILE__,__LINE__);}

inline void cudaCheckError(hipError_t e,const char *file,int line,bool abort = true){
    if(e != hipSuccess){
        fprintf(stderr,"GPUassert: %s\nFile: %s\nLine: %d\n",hipGetErrorString(e),file,line);
        if(abort) exit(e);
    }
}
//end of error checking

typedef long int g_type;

//struct declarations and global variables begin here


struct vertex{
    g_type number;
    g_type start;
    int n;
};

struct map{
    g_type node;
    g_type index;
};

struct entry{
    g_type edge;
    double val;
};

g_type *edges;
g_type edges_length;
g_type edges_size;
g_type edges_itr;


struct vertex *vertex_list;
g_type vertex_length;
g_type vertex_size;
g_type vertex_itr; 

struct entry *transitions;
struct map *node_map;
double *ranks;
double *result;

//end of struct and global definitions

//start of interface
int init_edges(){
    if(edges != NULL)
        return 0;
    edges = (g_type *)malloc(DFL_LEN * sizeof(g_type));
    if(edges == NULL){
        fprintf(stderr,"Malloc failed in %s at line %d\n",__FILE__,__LINE__);
        return 0;
    }
    edges_size = DFL_LEN;
    edges_length = 0;
    edges_itr = 0;
    return 1;
}

void delete_edges(){
    edges_length = 0;
    edges_size = DFL_LEN;
    edges_itr = 0;
    if(edges != NULL)
        free(edges);
}

int add_edge(int edge){
    if(edges == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return 0;
    } 
    if(edges_length == edges_size){
        edges_size *= 2;
        edges = (g_type *)realloc(edges,edges_size * sizeof(g_type));
        if(edges == NULL){
            fprintf(stderr,"Malloc failed in %s at line %d\n",__FILE__,__LINE__);
            return 0;
        }
    }
    edges[edges_length] = edge;
    edges_length++;
    return 1; 
}

int get_edge(g_type *e){
    
    if(edges == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return 0; 
    }
    if(e == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return 0;
    }
    g_type val = edges[edges_itr];
    edges_itr++;
    if(edges_itr >= edges_size){
        edges_itr = edges_itr % edges_size;
    }
    *e = val;
    return 1;
}

void reset_edge(){
    edges_itr = 0;
}

void move_edge(g_type index){
    edges_itr = index;
}

int init_vertices(){
    if(vertex_list != NULL)
        return 0;
    vertex_list = (struct vertex *)malloc(DFL_LEN * sizeof(struct vertex));
    if(vertex_list == NULL){
        fprintf(stderr,"Malloc failed in %s at line %d\n",__FILE__,__LINE__);
        return 0;
    }
    vertex_length = 0;
    vertex_size = DFL_LEN;
    vertex_itr = 0;
    return 1;
}

void delete_vertices(){
    vertex_itr = 0;
    vertex_length = 0;
    vertex_size = 0;
    if(vertex_list != NULL)
        free(vertex_list);
}

int add_vertex(struct vertex v){
    if(vertex_list == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return 0;
    }
    if(vertex_length == vertex_size){
        vertex_size *= 2;
        vertex_list = (struct vertex *)realloc(vertex_list,vertex_size * sizeof(struct vertex));
        if(vertex_list == NULL){
            fprintf(stderr,"Malloc failed in %s at line %d\n",__FILE__,__LINE__);
            return 0;
        }
    }
    vertex_list[vertex_length].number = v.number;
    vertex_list[vertex_length].n = v.n;
    vertex_list[vertex_length].start = v.start;
    g_type temp = vertex_length;
    vertex_length++;
    return temp;
}

int get_vertex(struct vertex *v){
    if(vertex_list == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return 0;
    }
    v->number = vertex_list[vertex_itr].number;
    v->start = vertex_list[vertex_itr].start;
    v->n = vertex_list[vertex_itr].n;
    vertex_itr++;
    if(vertex_itr >= vertex_size){
        vertex_itr = vertex_itr % vertex_size;
    }
    return 1;
}

void reset_vertex(){
    vertex_itr = 0;
}

void move_vertex(g_type index){
    vertex_itr = index; 
}

void build_graph(FILE *fp){
    if(vertex_list == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return ;
    }
    if(edges == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return ;
    }
    if(fp == NULL){
        fprintf(stderr,"File pointer error in %s at line %d\n",__FILE__,__LINE__);
        return ;
    }
    g_type from,to;
    int seen = 0;
    g_type cur = -1;
    while(fscanf(fp,"%ld %ld",&from,&to) != -1){
        if(from == vertex_list[cur].number && vertex_length != 0){
            seen = 1;
        }
        else{
            seen = 0;
        }
        if(!seen){
            struct vertex temp;
            temp.number = from;
            temp.start = edges_length;
            temp.n = 0;
            cur = add_vertex(temp);
        }
        add_edge(to);
        vertex_list[cur].n++;
    }
}

void create_map(){
   if(vertex_list == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return ;
    }
    if(edges == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return ;
    }
    if(node_map == NULL){
        node_map = (struct map *)malloc(vertex_length * sizeof(struct map));
        if(node_map == NULL){
            fprintf(stderr,"Malloc failed in %s at line %d\n",__FILE__,__LINE__);
            return ;
        }
    }
    for(int i=0;i<vertex_length;i++){
        node_map[i].node = vertex_list[i].number;
        node_map[i].index = i;
    }
}

g_type search_map(g_type node){
   if(vertex_list == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return -1;
    }
    if(edges == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return -1;
    } 
    if(node_map == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return -1;
    }
    for(int i=0;i<vertex_length;i++){
        if(node_map[i].node == node)
            return node_map[i].index;
    }
    return -1;
}

__device__ g_type search_dmap(struct map *d_map,g_type *d_vlength,g_type node){
    if(d_map == NULL){
        return -1;
    }
    g_type len = *d_vlength;
    for(g_type i=0;i<len;i++){
        if(d_map[i].node == node)
            return d_map[i].index;
    }
    return -1;
}

void delete_map(){
    if(node_map != NULL)
        free(node_map);
}

void init_ranks(){
    if(vertex_list == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return ;
    }
    if(edges == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return ;
    }
    if(ranks == NULL){
        ranks = (double *)malloc(vertex_length * sizeof(double));
        if(ranks == NULL){
            fprintf(stderr,"Malloc failed in %s at line %d\n",__FILE__,__LINE__);
            return ;
        }
    }
    for(int i=0;i<vertex_length;i++){
        ranks[i] = 0.25;
    }
}

void delete_ranks(){
    if(ranks != NULL)
        free(ranks);
}

void init_transitions(){
    if(vertex_list == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return ;
    }
    if(edges == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return ;
    }
    if(transitions == NULL){
        transitions = (struct entry *)malloc(edges_length * sizeof(struct entry));
        if(transitions == NULL){
            fprintf(stderr,"Malloc failed in %s at line %d\n",__FILE__,__LINE__);
            return ;
        }
    }
    for(g_type i=0;i<vertex_length;i++){
        g_type start = vertex_list[i].start;
        g_type j = start;
        int n = vertex_list[i].n;
        while(j < start + n){
            transitions[j].edge = edges[j];
            transitions[j].val = 1.0 / vertex_list[i].n;
            j++;
        }
    }
}

void delete_transitions(){
    if(transitions != NULL)
        free(transitions);
}

void init_result(){
    if(vertex_list == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return ;
    }
    if(edges == NULL){
        fprintf(stderr,"Null pointer error in %s at line %d\n",__FILE__,__LINE__);
        return ;
    }
    if(result == NULL){
        result = (double *)malloc(vertex_length * sizeof(double));
        if(result == NULL){
            fprintf(stderr,"Malloc failed in %s at line %d\n",__FILE__,__LINE__);
            return ;
        }
    }
    for(int i=0;i<vertex_length;i++){
        result[i] = 0.0;
    }
}

void delete_result(){
    if(result != NULL)
        free(result);
}

int pagerank(){
    for(int i=0;i<vertex_length;i++){
        for(int j = vertex_list[i].start; j < vertex_list[i].start + vertex_list[i].n; j++){
            double temp = transitions[j].val * ranks[i];
            g_type index = search_map(transitions[j].edge);
            result[index] += temp;
        }
    }
    return 1;
}

void update_ranks(){
    for(int i=0;i<vertex_length;i++){
        ranks[i] = result[i];
        result[i] = 0.0;
    }
}

//end of interface

//CUDA kernels
__global__ void multiply_kernel(struct vertex *d_vertices,struct entry *d_transitions,struct map *d_map,double *d_ranks,double *d_tempranks,g_type *d_vlength){
   int threadId = blockDim.x * blockIdx.x + threadIdx.x;
   double b = d_ranks[threadId];
   g_type len = *d_vlength;
   if(threadId < len){
       for(g_type i = d_vertices[threadId].start;i < d_vertices[threadId].start + d_vertices[threadId].n;i++){
           double a = d_transitions[i].val;
           int index = search_dmap(d_map,d_vlength,d_transitions[i].edge);
           double res = a * b;
           double temp = d_tempranks[index];
            __syncthreads();
            temp += res;
            d_tempranks[index] = temp;
            __syncthreads(); 
       }
   }
}

//deprecated
__global__ void add_kernel(struct vertex *d_vertices,struct entry *d_transitions,double *d_res,struct map *d_map,double *d_tempranks,g_type *d_vlength){
    int threadId = blockDim.x * blockIdx.x + threadIdx.x;
    g_type len = *d_vlength;
    if(threadId < len){
        for(g_type i = d_vertices[threadId].start;i < d_vertices[threadId].start + d_vertices[threadId].n;i++){
            int index = search_dmap(d_map,d_vlength,d_transitions[i].edge);
            double val = d_res[i];
            double temp = d_tempranks[index];
            __syncthreads();
            temp += val;
            d_tempranks[index] = temp;
            __syncthreads();
        }
    }
}

__global__ void update_kernel(double *d_tempranks,double *d_ranks,g_type *d_vlength){
    int threadId = blockDim.x * blockIdx.x + threadIdx.x;
    g_type len = *d_vlength;
    if(threadId < len){
        d_ranks[threadId] = d_tempranks[threadId];
    }
}

//end of CUDA kernels

//main program begins here
int main(int argc,char **argv){
    if(argc != 4){
        fprintf(stderr,"Correct usage: %s <pathToGraph> <numIterations> <serial = 0/parallel = 1>\n",argv[0]);
        exit(1);
    }
    FILE *fp = fopen(argv[1],"r");
    const int iterations = atoi(argv[2]);
    const int mode = atoi(argv[3]);
    init_vertices();
    init_edges();
    build_graph(fp);
    create_map();
    init_ranks();
    init_transitions();
    if(mode == 1){
        //initializing device memory
        g_type *d_elength;
        check_error(hipMalloc((void **)&d_elength,sizeof(g_type)));
        check_error(hipMemcpy(d_elength,&edges_length,sizeof(g_type),hipMemcpyHostToDevice));

        g_type *d_vlength;
        check_error(hipMalloc((void **)&d_vlength,sizeof(g_type)));
        check_error(hipMemcpy(d_vlength,&vertex_length,sizeof(g_type),hipMemcpyHostToDevice));

        struct vertex *d_vertices;
        check_error(hipMalloc((void **)&d_vertices,vertex_length * sizeof(struct vertex)));
        check_error(hipMemcpy(d_vertices,vertex_list,vertex_length * sizeof(struct vertex),hipMemcpyHostToDevice));

        struct entry *d_transitions;
        check_error(hipMalloc((void **)&d_transitions,edges_length * sizeof(struct entry)));
        check_error(hipMemcpy(d_transitions,transitions,edges_length * sizeof(struct entry),hipMemcpyHostToDevice));

        struct map *d_map;
        check_error(hipMalloc((void **)&d_map,vertex_length * sizeof(struct map)));
        check_error(hipMemcpy(d_map,node_map,vertex_length * sizeof(struct map),hipMemcpyHostToDevice));

        double *d_ranks;
        check_error(hipMalloc((void **)&d_ranks,vertex_length * sizeof(double)));
        check_error(hipMemcpy(d_ranks,ranks,vertex_length * sizeof(double),hipMemcpyHostToDevice));

        double *d_res;
        check_error(hipMalloc((void **)&d_res,edges_length * sizeof(double)));

        double *d_tempranks;
        check_error(hipMalloc((void **)&d_tempranks,vertex_length * sizeof(double)));

        //pagerank iterations begin here: Power method

        int blocks = 1;
        int threads = vertex_length;
        if(vertex_length > MAX_THREADS_PER_BLOCK){
            blocks = (int)ceil(vertex_length / (double)MAX_THREADS_PER_BLOCK);
            threads = MAX_THREADS_PER_BLOCK;
        }
        
        int counter = 0;
        clock_t begin = clock();
        while(counter < iterations){


            check_error(hipMemset(d_res,0.0,edges_length * sizeof(double)));
            check_error(hipMemset(d_tempranks,0.0,vertex_length * sizeof(double)));
            
            multiply_kernel<<<blocks,threads>>>(d_vertices,d_transitions,d_map,d_ranks,d_tempranks,d_vlength);
            hipDeviceSynchronize();
            //add_kernel<<<blocks,threads>>>(d_vertices,d_transitions,d_res,d_map,d_tempranks,d_vlength); 
            //cudaDeviceSynchronize();
            update_kernel<<<blocks,threads>>>(d_tempranks,d_ranks,d_vlength);
            hipDeviceSynchronize();
            counter++;
        }
        clock_t end = clock();
        //end of pagerank iterations

        double time_spent = (double)(end - begin) / CLOCKS_PER_SEC;
        double *res;
        res = (double *)malloc(vertex_length * sizeof(double));
        check_error(hipMemcpy(res,d_ranks,vertex_length * sizeof(double),hipMemcpyDeviceToHost));
        for(int i = 0;i<vertex_length;i++){
            printf("%lf\n",res[i]);
        }
        free(res);
        printf("%lf s\n",time_spent);

        check_error(hipFree(d_elength));
        check_error(hipFree(d_vlength));
        check_error(hipFree(d_vertices));
        check_error(hipFree(d_transitions));
        check_error(hipFree(d_map));
        check_error(hipFree(d_ranks));
        check_error(hipFree(d_res));
        check_error(hipFree(d_tempranks));
    }
    else{
        clock_t begin = clock();
        init_result();
        int counter = 0;
        while(counter < iterations){
            if(!pagerank()){
                fprintf(stderr,"Pagerank failed in iteration: %d\n",counter);
                break;
            }
            update_ranks();
            counter++;
        }
        clock_t end = clock();
        double time_spent = (double)(end - begin) / CLOCKS_PER_SEC;
        for(int i = 0;i<vertex_length;i++){
            printf("%lf\n",ranks[i]);
        }
        printf("%lf s\n",time_spent);
    }
    //end of device memory initialization
    

    delete_edges();
    delete_vertices();
    delete_ranks();
    delete_transitions();
    delete_map();
    delete_result();
    return 0;
}



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

                                        # End of file scope inline assembly
	.globl	_Z10init_edgesv                 # -- Begin function _Z10init_edgesv
	.type	_Z10init_edgesv,@function
_Z10init_edgesv:                        # @_Z10init_edgesv
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	xorl	%ebx, %ebx
	cmpq	$0, edges(%rip)
	jne	.LBB0_4
# %bb.1:
	movl	$256, %edi                      # imm = 0x100
	callq	malloc
	movq	%rax, edges(%rip)
	testq	%rax, %rax
	je	.LBB0_2
# %bb.3:
	movq	$32, edges_size(%rip)
	xorl	%eax, %eax
	movq	%rax, edges_length(%rip)
	movq	%rax, edges_itr(%rip)
	movl	$1, %ebx
.LBB0_4:
	movl	%ebx, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.LBB0_2:
	.cfi_def_cfa_offset 16
	movq	stderr(%rip), %rdi
	xorl	%ebx, %ebx
	movl	$.L.str, %esi
	movl	$.L.str.1, %edx
	movl	$66, %ecx
	xorl	%eax, %eax
	callq	fprintf
	jmp	.LBB0_4
.Lfunc_end0:
	.size	_Z10init_edgesv, .Lfunc_end0-_Z10init_edgesv
	.cfi_endproc
                                        # -- End function
	.globl	_Z12delete_edgesv               # -- Begin function _Z12delete_edgesv
	.type	_Z12delete_edgesv,@function
_Z12delete_edgesv:                      # @_Z12delete_edgesv
	.cfi_startproc
# %bb.0:
	xorl	%eax, %eax
	movq	%rax, edges_length(%rip)
	movq	$32, edges_size(%rip)
	movq	%rax, edges_itr(%rip)
	movq	edges(%rip), %rdi
	testq	%rdi, %rdi
	jne	free                            # TAILCALL
# %bb.1:
	retq
.Lfunc_end1:
	.size	_Z12delete_edgesv, .Lfunc_end1-_Z12delete_edgesv
	.cfi_endproc
                                        # -- End function
	.globl	_Z8add_edgei                    # -- Begin function _Z8add_edgei
	.type	_Z8add_edgei,@function
_Z8add_edgei:                           # @_Z8add_edgei
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	edges(%rip), %rax
	testq	%rax, %rax
	je	.LBB2_1
# %bb.3:
	movl	%edi, %ebx
	movq	edges_length(%rip), %rsi
	cmpq	edges_size(%rip), %rsi
	jne	.LBB2_6
# %bb.4:
	leaq	(%rsi,%rsi), %rcx
	movq	%rcx, edges_size(%rip)
	shlq	$4, %rsi
	movq	%rax, %rdi
	callq	realloc
	movq	%rax, edges(%rip)
	testq	%rax, %rax
	je	.LBB2_8
# %bb.5:                                # %._crit_edge
	movq	edges_length(%rip), %rsi
.LBB2_6:
	movslq	%ebx, %rcx
	movq	%rcx, (%rax,%rsi,8)
	incq	edges_length(%rip)
	movl	$1, %ebx
.LBB2_7:
	movl	%ebx, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.LBB2_1:
	.cfi_def_cfa_offset 16
	movq	stderr(%rip), %rdi
	xorl	%ebx, %ebx
	movl	$.L.str.2, %esi
	movl	$.L.str.1, %edx
	movl	$85, %ecx
	jmp	.LBB2_2
.LBB2_8:
	movq	stderr(%rip), %rdi
	xorl	%ebx, %ebx
	movl	$.L.str, %esi
	movl	$.L.str.1, %edx
	movl	$92, %ecx
.LBB2_2:
	xorl	%eax, %eax
	callq	fprintf
	jmp	.LBB2_7
.Lfunc_end2:
	.size	_Z8add_edgei, .Lfunc_end2-_Z8add_edgei
	.cfi_endproc
                                        # -- End function
	.globl	_Z8get_edgePl                   # -- Begin function _Z8get_edgePl
	.type	_Z8get_edgePl,@function
_Z8get_edgePl:                          # @_Z8get_edgePl
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	edges(%rip), %rcx
	testq	%rcx, %rcx
	je	.LBB3_1
# %bb.3:
	testq	%rdi, %rdi
	je	.LBB3_4
# %bb.5:
	movq	edges_itr(%rip), %rax
	movq	(%rcx,%rax,8), %rcx
	incq	%rax
	movq	%rax, edges_itr(%rip)
	movq	edges_size(%rip), %rsi
	cmpq	%rsi, %rax
	jl	.LBB3_7
# %bb.6:
	cqto
	idivq	%rsi
	movq	%rdx, edges_itr(%rip)
.LBB3_7:
	movq	%rcx, (%rdi)
	movl	$1, %ebx
.LBB3_8:
	movl	%ebx, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.LBB3_1:
	.cfi_def_cfa_offset 16
	movq	stderr(%rip), %rdi
	xorl	%ebx, %ebx
	movl	$.L.str.2, %esi
	movl	$.L.str.1, %edx
	movl	$104, %ecx
	jmp	.LBB3_2
.LBB3_4:
	movq	stderr(%rip), %rdi
	xorl	%ebx, %ebx
	movl	$.L.str.2, %esi
	movl	$.L.str.1, %edx
	movl	$108, %ecx
.LBB3_2:
	xorl	%eax, %eax
	callq	fprintf
	jmp	.LBB3_8
.Lfunc_end3:
	.size	_Z8get_edgePl, .Lfunc_end3-_Z8get_edgePl
	.cfi_endproc
                                        # -- End function
	.globl	_Z10reset_edgev                 # -- Begin function _Z10reset_edgev
	.type	_Z10reset_edgev,@function
_Z10reset_edgev:                        # @_Z10reset_edgev
	.cfi_startproc
# %bb.0:
	movq	$0, edges_itr(%rip)
	retq
.Lfunc_end4:
	.size	_Z10reset_edgev, .Lfunc_end4-_Z10reset_edgev
	.cfi_endproc
                                        # -- End function
	.globl	_Z9move_edgel                   # -- Begin function _Z9move_edgel
	.type	_Z9move_edgel,@function
_Z9move_edgel:                          # @_Z9move_edgel
	.cfi_startproc
# %bb.0:
	movq	%rdi, edges_itr(%rip)
	retq
.Lfunc_end5:
	.size	_Z9move_edgel, .Lfunc_end5-_Z9move_edgel
	.cfi_endproc
                                        # -- End function
	.globl	_Z13init_verticesv              # -- Begin function _Z13init_verticesv
	.type	_Z13init_verticesv,@function
_Z13init_verticesv:                     # @_Z13init_verticesv
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	xorl	%ebx, %ebx
	cmpq	$0, vertex_list(%rip)
	jne	.LBB6_4
# %bb.1:
	movl	$768, %edi                      # imm = 0x300
	callq	malloc
	movq	%rax, vertex_list(%rip)
	testq	%rax, %rax
	je	.LBB6_2
# %bb.3:
	xorl	%eax, %eax
	movq	%rax, vertex_length(%rip)
	movq	$32, vertex_size(%rip)
	movq	%rax, vertex_itr(%rip)
	movl	$1, %ebx
.LBB6_4:
	movl	%ebx, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.LBB6_2:
	.cfi_def_cfa_offset 16
	movq	stderr(%rip), %rdi
	xorl	%ebx, %ebx
	movl	$.L.str, %esi
	movl	$.L.str.1, %edx
	movl	$133, %ecx
	xorl	%eax, %eax
	callq	fprintf
	jmp	.LBB6_4
.Lfunc_end6:
	.size	_Z13init_verticesv, .Lfunc_end6-_Z13init_verticesv
	.cfi_endproc
                                        # -- End function
	.globl	_Z15delete_verticesv            # -- Begin function _Z15delete_verticesv
	.type	_Z15delete_verticesv,@function
_Z15delete_verticesv:                   # @_Z15delete_verticesv
	.cfi_startproc
# %bb.0:
	xorl	%eax, %eax
	movq	%rax, vertex_itr(%rip)
	movq	%rax, vertex_length(%rip)
	movq	%rax, vertex_size(%rip)
	movq	vertex_list(%rip), %rdi
	testq	%rdi, %rdi
	jne	free                            # TAILCALL
# %bb.1:
	retq
.Lfunc_end7:
	.size	_Z15delete_verticesv, .Lfunc_end7-_Z15delete_verticesv
	.cfi_endproc
                                        # -- End function
	.globl	_Z10add_vertex6vertex           # -- Begin function _Z10add_vertex6vertex
	.type	_Z10add_vertex6vertex,@function
_Z10add_vertex6vertex:                  # @_Z10add_vertex6vertex
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	vertex_list(%rip), %rax
	testq	%rax, %rax
	je	.LBB8_1
# %bb.3:
	movq	vertex_length(%rip), %rcx
	cmpq	vertex_size(%rip), %rcx
	jne	.LBB8_6
# %bb.4:
	leaq	(%rcx,%rcx), %rdx
	movq	%rdx, vertex_size(%rip)
	shlq	$4, %rcx
	leaq	(%rcx,%rcx,2), %rsi
	movq	%rax, %rdi
	callq	realloc
	movq	%rax, vertex_list(%rip)
	testq	%rax, %rax
	je	.LBB8_8
# %bb.5:                                # %._crit_edge
	movq	vertex_length(%rip), %rcx
.LBB8_6:
	leaq	16(%rsp), %rdx
	movq	(%rdx), %rsi
	leaq	(%rcx,%rcx,2), %rcx
	movq	%rsi, (%rax,%rcx,8)
	movl	16(%rdx), %ecx
	movq	vertex_length(%rip), %rsi
	leaq	(%rsi,%rsi,2), %rsi
	movl	%ecx, 16(%rax,%rsi,8)
	movq	8(%rdx), %rcx
	movq	%rcx, 8(%rax,%rsi,8)
	movq	vertex_length(%rip), %rbx
	leaq	1(%rbx), %rax
	movq	%rax, vertex_length(%rip)
.LBB8_7:
	movl	%ebx, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.LBB8_1:
	.cfi_def_cfa_offset 16
	movq	stderr(%rip), %rdi
	xorl	%ebx, %ebx
	movl	$.L.str.2, %esi
	movl	$.L.str.1, %edx
	movl	$152, %ecx
	jmp	.LBB8_2
.LBB8_8:
	movq	stderr(%rip), %rdi
	xorl	%ebx, %ebx
	movl	$.L.str, %esi
	movl	$.L.str.1, %edx
	movl	$159, %ecx
.LBB8_2:
	xorl	%eax, %eax
	callq	fprintf
	jmp	.LBB8_7
.Lfunc_end8:
	.size	_Z10add_vertex6vertex, .Lfunc_end8-_Z10add_vertex6vertex
	.cfi_endproc
                                        # -- End function
	.globl	_Z10get_vertexP6vertex          # -- Begin function _Z10get_vertexP6vertex
	.type	_Z10get_vertexP6vertex,@function
_Z10get_vertexP6vertex:                 # @_Z10get_vertexP6vertex
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	vertex_list(%rip), %rcx
	testq	%rcx, %rcx
	je	.LBB9_1
# %bb.2:
	movq	vertex_itr(%rip), %rax
	leaq	(%rax,%rax,2), %rax
	movq	(%rcx,%rax,8), %rax
	movq	%rax, (%rdi)
	movq	vertex_itr(%rip), %rax
	leaq	(%rax,%rax,2), %rdx
	movq	8(%rcx,%rdx,8), %rsi
	movq	%rsi, 8(%rdi)
	movl	16(%rcx,%rdx,8), %ecx
	movl	%ecx, 16(%rdi)
	incq	%rax
	movq	%rax, vertex_itr(%rip)
	movq	vertex_size(%rip), %rcx
	movl	$1, %ebx
	cmpq	%rcx, %rax
	jl	.LBB9_4
# %bb.3:
	cqto
	idivq	%rcx
	movq	%rdx, vertex_itr(%rip)
.LBB9_4:
	movl	%ebx, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.LBB9_1:
	.cfi_def_cfa_offset 16
	movq	stderr(%rip), %rdi
	xorl	%ebx, %ebx
	movl	$.L.str.2, %esi
	movl	$.L.str.1, %edx
	movl	$173, %ecx
	xorl	%eax, %eax
	callq	fprintf
	jmp	.LBB9_4
.Lfunc_end9:
	.size	_Z10get_vertexP6vertex, .Lfunc_end9-_Z10get_vertexP6vertex
	.cfi_endproc
                                        # -- End function
	.globl	_Z12reset_vertexv               # -- Begin function _Z12reset_vertexv
	.type	_Z12reset_vertexv,@function
_Z12reset_vertexv:                      # @_Z12reset_vertexv
	.cfi_startproc
# %bb.0:
	movq	$0, vertex_itr(%rip)
	retq
.Lfunc_end10:
	.size	_Z12reset_vertexv, .Lfunc_end10-_Z12reset_vertexv
	.cfi_endproc
                                        # -- End function
	.globl	_Z11move_vertexl                # -- Begin function _Z11move_vertexl
	.type	_Z11move_vertexl,@function
_Z11move_vertexl:                       # @_Z11move_vertexl
	.cfi_startproc
# %bb.0:
	movq	%rdi, vertex_itr(%rip)
	retq
.Lfunc_end11:
	.size	_Z11move_vertexl, .Lfunc_end11-_Z11move_vertexl
	.cfi_endproc
                                        # -- End function
	.globl	_Z11build_graphP8_IO_FILE       # -- Begin function _Z11build_graphP8_IO_FILE
	.type	_Z11build_graphP8_IO_FILE,@function
_Z11build_graphP8_IO_FILE:              # @_Z11build_graphP8_IO_FILE
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	subq	$72, %rsp
	.cfi_def_cfa_offset 112
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	cmpq	$0, vertex_list(%rip)
	je	.LBB12_1
# %bb.3:
	cmpq	$0, edges(%rip)
	je	.LBB12_4
# %bb.5:
	movq	%rdi, %rbx
	testq	%rdi, %rdi
	je	.LBB12_6
# %bb.7:
	leaq	40(%rsp), %rdx
	leaq	32(%rsp), %rcx
	movl	$.L.str.4, %esi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	cmpl	$-1, %eax
	je	.LBB12_13
# %bb.8:                                # %.lr.ph
	movq	$-1, %r12
	leaq	40(%rsp), %r14
	leaq	32(%rsp), %r15
.LBB12_9:                               # =>This Inner Loop Header: Depth=1
	movq	40(%rsp), %rax
	movq	vertex_list(%rip), %rcx
	leaq	(%r12,%r12,2), %rdx
	cmpq	(%rcx,%rdx,8), %rax
	jne	.LBB12_11
# %bb.10:                               #   in Loop: Header=BB12_9 Depth=1
	cmpq	$0, vertex_length(%rip)
	jne	.LBB12_12
.LBB12_11:                              #   in Loop: Header=BB12_9 Depth=1
	movq	edges_length(%rip), %rcx
	movq	%rax, 48(%rsp)
	movq	%rcx, 56(%rsp)
	movl	$0, 64(%rsp)
	movq	64(%rsp), %rax
	movq	%rax, 16(%rsp)
	movups	48(%rsp), %xmm0
	movups	%xmm0, (%rsp)
	callq	_Z10add_vertex6vertex
	movslq	%eax, %r12
.LBB12_12:                              #   in Loop: Header=BB12_9 Depth=1
	movl	32(%rsp), %edi
	callq	_Z8add_edgei
	movq	vertex_list(%rip), %rax
	leaq	(%r12,%r12,2), %rcx
	incl	16(%rax,%rcx,8)
	movl	$.L.str.4, %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	cmpl	$-1, %eax
	jne	.LBB12_9
.LBB12_13:                              # %._crit_edge
	addq	$72, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.LBB12_1:
	.cfi_def_cfa_offset 112
	movq	stderr(%rip), %rdi
	movl	$.L.str.2, %esi
	movl	$.L.str.1, %edx
	movl	$196, %ecx
	jmp	.LBB12_2
.LBB12_4:
	movq	stderr(%rip), %rdi
	movl	$.L.str.2, %esi
	movl	$.L.str.1, %edx
	movl	$200, %ecx
	jmp	.LBB12_2
.LBB12_6:
	movq	stderr(%rip), %rdi
	movl	$.L.str.3, %esi
	movl	$.L.str.1, %edx
	movl	$204, %ecx
.LBB12_2:
	xorl	%eax, %eax
	addq	$72, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	fprintf                         # TAILCALL
.Lfunc_end12:
	.size	_Z11build_graphP8_IO_FILE, .Lfunc_end12-_Z11build_graphP8_IO_FILE
	.cfi_endproc
                                        # -- End function
	.globl	_Z10create_mapv                 # -- Begin function _Z10create_mapv
	.type	_Z10create_mapv,@function
_Z10create_mapv:                        # @_Z10create_mapv
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movq	vertex_list(%rip), %rbx
	testq	%rbx, %rbx
	je	.LBB13_1
# %bb.3:
	cmpq	$0, edges(%rip)
	je	.LBB13_4
# %bb.5:
	movq	node_map(%rip), %rax
	movq	vertex_length(%rip), %r14
	testq	%rax, %rax
	jne	.LBB13_8
# %bb.6:
	movq	%r14, %rdi
	shlq	$4, %rdi
	callq	malloc
	movq	%rax, node_map(%rip)
	testq	%rax, %rax
	je	.LBB13_7
.LBB13_8:
	testq	%r14, %r14
	jle	.LBB13_11
# %bb.9:                                # %.lr.ph.preheader
	addq	$8, %rax
	xorl	%ecx, %ecx
.LBB13_10:                              # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdx
	movq	%rdx, -8(%rax)
	movq	%rcx, (%rax)
	incq	%rcx
	addq	$16, %rax
	addq	$24, %rbx
	cmpq	%rcx, vertex_length(%rip)
	jg	.LBB13_10
.LBB13_11:                              # %.loopexit
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.LBB13_1:
	.cfi_def_cfa_offset 32
	movq	stderr(%rip), %rdi
	movl	$.L.str.2, %esi
	movl	$.L.str.1, %edx
	movl	$231, %ecx
	jmp	.LBB13_2
.LBB13_4:
	movq	stderr(%rip), %rdi
	movl	$.L.str.2, %esi
	movl	$.L.str.1, %edx
	movl	$235, %ecx
	jmp	.LBB13_2
.LBB13_7:
	movq	stderr(%rip), %rdi
	movl	$.L.str, %esi
	movl	$.L.str.1, %edx
	movl	$241, %ecx
.LBB13_2:
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	jmp	fprintf                         # TAILCALL
.Lfunc_end13:
	.size	_Z10create_mapv, .Lfunc_end13-_Z10create_mapv
	.cfi_endproc
                                        # -- End function
	.globl	_Z10search_mapl                 # -- Begin function _Z10search_mapl
	.type	_Z10search_mapl,@function
_Z10search_mapl:                        # @_Z10search_mapl
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	cmpq	$0, vertex_list(%rip)
	je	.LBB14_1
# %bb.3:
	cmpq	$0, edges(%rip)
	je	.LBB14_4
# %bb.5:
	movq	node_map(%rip), %rcx
	testq	%rcx, %rcx
	je	.LBB14_8
# %bb.6:                                # %.preheader
	movq	vertex_length(%rip), %rdx
	movq	$-1, %rax
	testq	%rdx, %rdx
	jle	.LBB14_12
# %bb.7:                                # %.lr.ph.preheader
	addq	$8, %rcx
.LBB14_10:                              # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	cmpq	%rdi, -8(%rcx)
	je	.LBB14_11
# %bb.9:                                #   in Loop: Header=BB14_10 Depth=1
	addq	$16, %rcx
	decq	%rdx
	jne	.LBB14_10
	jmp	.LBB14_12
.LBB14_11:
	movq	(%rcx), %rax
	jmp	.LBB14_12
.LBB14_1:
	movq	stderr(%rip), %rdi
	movl	$.L.str.2, %esi
	movl	$.L.str.1, %edx
	movl	$253, %ecx
	jmp	.LBB14_2
.LBB14_4:
	movq	stderr(%rip), %rdi
	movl	$.L.str.2, %esi
	movl	$.L.str.1, %edx
	movl	$257, %ecx                      # imm = 0x101
	jmp	.LBB14_2
.LBB14_8:
	movq	stderr(%rip), %rdi
	movl	$.L.str.2, %esi
	movl	$.L.str.1, %edx
	movl	$261, %ecx                      # imm = 0x105
.LBB14_2:                               # %.loopexit
	xorl	%eax, %eax
	callq	fprintf
	movq	$-1, %rax
.LBB14_12:                              # %.loopexit
	popq	%rcx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end14:
	.size	_Z10search_mapl, .Lfunc_end14-_Z10search_mapl
	.cfi_endproc
                                        # -- End function
	.globl	_Z10delete_mapv                 # -- Begin function _Z10delete_mapv
	.type	_Z10delete_mapv,@function
_Z10delete_mapv:                        # @_Z10delete_mapv
	.cfi_startproc
# %bb.0:
	movq	node_map(%rip), %rdi
	testq	%rdi, %rdi
	jne	free                            # TAILCALL
# %bb.1:
	retq
.Lfunc_end15:
	.size	_Z10delete_mapv, .Lfunc_end15-_Z10delete_mapv
	.cfi_endproc
                                        # -- End function
	.globl	_Z10init_ranksv                 # -- Begin function _Z10init_ranksv
	.type	_Z10init_ranksv,@function
_Z10init_ranksv:                        # @_Z10init_ranksv
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	cmpq	$0, vertex_list(%rip)
	je	.LBB16_1
# %bb.3:
	cmpq	$0, edges(%rip)
	je	.LBB16_4
# %bb.5:
	movq	ranks(%rip), %rax
	movq	vertex_length(%rip), %rbx
	testq	%rax, %rax
	jne	.LBB16_8
# %bb.6:
	leaq	(,%rbx,8), %rdi
	callq	malloc
	movq	%rax, ranks(%rip)
	testq	%rax, %rax
	je	.LBB16_7
.LBB16_8:
	testq	%rbx, %rbx
	jle	.LBB16_11
# %bb.9:                                # %.lr.ph.preheader
	xorl	%ecx, %ecx
	movabsq	$4598175219545276416, %rdx      # imm = 0x3FD0000000000000
.LBB16_10:                              # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movq	%rdx, (%rax,%rcx,8)
	incq	%rcx
	cmpq	%rcx, %rbx
	jne	.LBB16_10
.LBB16_11:                              # %.loopexit
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.LBB16_1:
	.cfi_def_cfa_offset 16
	movq	stderr(%rip), %rdi
	movl	$.L.str.2, %esi
	movl	$.L.str.1, %edx
	movl	$290, %ecx                      # imm = 0x122
	jmp	.LBB16_2
.LBB16_4:
	movq	stderr(%rip), %rdi
	movl	$.L.str.2, %esi
	movl	$.L.str.1, %edx
	movl	$294, %ecx                      # imm = 0x126
	jmp	.LBB16_2
.LBB16_7:
	movq	stderr(%rip), %rdi
	movl	$.L.str, %esi
	movl	$.L.str.1, %edx
	movl	$300, %ecx                      # imm = 0x12C
.LBB16_2:
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	fprintf                         # TAILCALL
.Lfunc_end16:
	.size	_Z10init_ranksv, .Lfunc_end16-_Z10init_ranksv
	.cfi_endproc
                                        # -- End function
	.globl	_Z12delete_ranksv               # -- Begin function _Z12delete_ranksv
	.type	_Z12delete_ranksv,@function
_Z12delete_ranksv:                      # @_Z12delete_ranksv
	.cfi_startproc
# %bb.0:
	movq	ranks(%rip), %rdi
	testq	%rdi, %rdi
	jne	free                            # TAILCALL
# %bb.1:
	retq
.Lfunc_end17:
	.size	_Z12delete_ranksv, .Lfunc_end17-_Z12delete_ranksv
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z16init_transitionsv
.LCPI18_0:
	.quad	0x3ff0000000000000              # double 1
	.text
	.globl	_Z16init_transitionsv
	.type	_Z16init_transitionsv,@function
_Z16init_transitionsv:                  # @_Z16init_transitionsv
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movq	vertex_list(%rip), %rbx
	testq	%rbx, %rbx
	je	.LBB18_1
# %bb.3:
	movq	edges(%rip), %r14
	testq	%r14, %r14
	je	.LBB18_4
# %bb.5:
	movq	transitions(%rip), %rax
	testq	%rax, %rax
	jne	.LBB18_8
# %bb.6:
	movq	edges_length(%rip), %rdi
	shlq	$4, %rdi
	callq	malloc
	movq	%rax, transitions(%rip)
	testq	%rax, %rax
	je	.LBB18_7
.LBB18_8:
	movq	vertex_length(%rip), %rsi
	testq	%rsi, %rsi
	jle	.LBB18_15
# %bb.9:                                # %.lr.ph17.preheader
	addq	$8, %rax
	xorl	%ecx, %ecx
	movsd	.LCPI18_0(%rip), %xmm0          # xmm0 = mem[0],zero
.LBB18_10:                              # %.lr.ph17
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB18_12 Depth 2
	leaq	(%rcx,%rcx,2), %rdi
	movslq	16(%rbx,%rdi,8), %rdx
	testq	%rdx, %rdx
	jle	.LBB18_14
# %bb.11:                               # %.lr.ph
                                        #   in Loop: Header=BB18_10 Depth=1
	movq	8(%rbx,%rdi,8), %rsi
	movl	%edx, %edi
	addq	%rsi, %rdx
	xorps	%xmm2, %xmm2
	cvtsi2sd	%edi, %xmm2
	movapd	%xmm0, %xmm1
	divsd	%xmm2, %xmm1
	movq	%rsi, %rdi
	shlq	$4, %rdi
	addq	%rax, %rdi
.LBB18_12:                              #   Parent Loop BB18_10 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movq	(%r14,%rsi,8), %r8
	movq	%r8, -8(%rdi)
	movsd	%xmm1, (%rdi)
	incq	%rsi
	addq	$16, %rdi
	cmpq	%rdx, %rsi
	jl	.LBB18_12
# %bb.13:                               # %._crit_edge.loopexit
                                        #   in Loop: Header=BB18_10 Depth=1
	movq	vertex_length(%rip), %rsi
.LBB18_14:                              # %._crit_edge
                                        #   in Loop: Header=BB18_10 Depth=1
	incq	%rcx
	cmpq	%rsi, %rcx
	jl	.LBB18_10
.LBB18_15:                              # %.loopexit
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.LBB18_1:
	.cfi_def_cfa_offset 32
	movq	stderr(%rip), %rdi
	movl	$.L.str.2, %esi
	movl	$.L.str.1, %edx
	movl	$316, %ecx                      # imm = 0x13C
	jmp	.LBB18_2
.LBB18_4:
	movq	stderr(%rip), %rdi
	movl	$.L.str.2, %esi
	movl	$.L.str.1, %edx
	movl	$320, %ecx                      # imm = 0x140
	jmp	.LBB18_2
.LBB18_7:
	movq	stderr(%rip), %rdi
	movl	$.L.str, %esi
	movl	$.L.str.1, %edx
	movl	$326, %ecx                      # imm = 0x146
.LBB18_2:
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	jmp	fprintf                         # TAILCALL
.Lfunc_end18:
	.size	_Z16init_transitionsv, .Lfunc_end18-_Z16init_transitionsv
	.cfi_endproc
                                        # -- End function
	.globl	_Z18delete_transitionsv         # -- Begin function _Z18delete_transitionsv
	.type	_Z18delete_transitionsv,@function
_Z18delete_transitionsv:                # @_Z18delete_transitionsv
	.cfi_startproc
# %bb.0:
	movq	transitions(%rip), %rdi
	testq	%rdi, %rdi
	jne	free                            # TAILCALL
# %bb.1:
	retq
.Lfunc_end19:
	.size	_Z18delete_transitionsv, .Lfunc_end19-_Z18delete_transitionsv
	.cfi_endproc
                                        # -- End function
	.globl	_Z11init_resultv                # -- Begin function _Z11init_resultv
	.type	_Z11init_resultv,@function
_Z11init_resultv:                       # @_Z11init_resultv
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	cmpq	$0, vertex_list(%rip)
	je	.LBB20_1
# %bb.3:
	cmpq	$0, edges(%rip)
	je	.LBB20_4
# %bb.5:
	movq	result(%rip), %rdi
	movq	vertex_length(%rip), %rbx
	testq	%rdi, %rdi
	jne	.LBB20_8
# %bb.6:
	leaq	(,%rbx,8), %rdi
	callq	malloc
	movq	%rax, %rdi
	movq	%rax, result(%rip)
	testq	%rax, %rax
	je	.LBB20_7
.LBB20_8:
	testq	%rbx, %rbx
	jle	.LBB20_9
# %bb.10:                               # %.lr.ph
	shlq	$3, %rbx
	xorl	%esi, %esi
	movq	%rbx, %rdx
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	memset@PLT                      # TAILCALL
.LBB20_9:                               # %.loopexit
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.LBB20_1:
	.cfi_def_cfa_offset 16
	movq	stderr(%rip), %rdi
	movl	$.L.str.2, %esi
	movl	$.L.str.1, %edx
	movl	$349, %ecx                      # imm = 0x15D
	jmp	.LBB20_2
.LBB20_4:
	movq	stderr(%rip), %rdi
	movl	$.L.str.2, %esi
	movl	$.L.str.1, %edx
	movl	$353, %ecx                      # imm = 0x161
	jmp	.LBB20_2
.LBB20_7:
	movq	stderr(%rip), %rdi
	movl	$.L.str, %esi
	movl	$.L.str.1, %edx
	movl	$359, %ecx                      # imm = 0x167
.LBB20_2:
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	fprintf                         # TAILCALL
.Lfunc_end20:
	.size	_Z11init_resultv, .Lfunc_end20-_Z11init_resultv
	.cfi_endproc
                                        # -- End function
	.globl	_Z13delete_resultv              # -- Begin function _Z13delete_resultv
	.type	_Z13delete_resultv,@function
_Z13delete_resultv:                     # @_Z13delete_resultv
	.cfi_startproc
# %bb.0:
	movq	result(%rip), %rdi
	testq	%rdi, %rdi
	jne	free                            # TAILCALL
# %bb.1:
	retq
.Lfunc_end21:
	.size	_Z13delete_resultv, .Lfunc_end21-_Z13delete_resultv
	.cfi_endproc
                                        # -- End function
	.globl	_Z8pagerankv                    # -- Begin function _Z8pagerankv
	.type	_Z8pagerankv,@function
_Z8pagerankv:                           # @_Z8pagerankv
	.cfi_startproc
# %bb.0:
	movq	vertex_length(%rip), %rcx
	testq	%rcx, %rcx
	jle	.LBB22_8
# %bb.1:                                # %.lr.ph17.preheader
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	vertex_list(%rip), %rax
	xorl	%ebx, %ebx
.LBB22_2:                               # %.lr.ph17
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB22_4 Depth 2
	leaq	(%rbx,%rbx,2), %r14
	movq	8(%rax,%r14,8), %rdx
	movslq	%edx, %r15
	movslq	16(%rax,%r14,8), %rsi
	addq	%rdx, %rsi
	cmpq	%r15, %rsi
	jle	.LBB22_6
# %bb.3:                                # %.lr.ph.preheader
                                        #   in Loop: Header=BB22_2 Depth=1
	movq	%r15, %r12
	shlq	$4, %r12
	orq	$8, %r12
.LBB22_4:                               # %.lr.ph
                                        #   Parent Loop BB22_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movq	transitions(%rip), %rax
	movsd	(%rax,%r12), %xmm0              # xmm0 = mem[0],zero
	movq	ranks(%rip), %rcx
	mulsd	(%rcx,%rbx,8), %xmm0
	movsd	%xmm0, (%rsp)                   # 8-byte Spill
	movq	-8(%rax,%r12), %rdi
	callq	_Z10search_mapl
	movq	result(%rip), %rcx
	movsd	(%rsp), %xmm0                   # 8-byte Reload
                                        # xmm0 = mem[0],zero
	addsd	(%rcx,%rax,8), %xmm0
	movsd	%xmm0, (%rcx,%rax,8)
	incq	%r15
	movq	vertex_list(%rip), %rax
	movslq	16(%rax,%r14,8), %rcx
	addq	8(%rax,%r14,8), %rcx
	addq	$16, %r12
	cmpq	%r15, %rcx
	jg	.LBB22_4
# %bb.5:                                # %._crit_edge.loopexit
                                        #   in Loop: Header=BB22_2 Depth=1
	movq	vertex_length(%rip), %rcx
.LBB22_6:                               # %._crit_edge
                                        #   in Loop: Header=BB22_2 Depth=1
	incq	%rbx
	cmpq	%rbx, %rcx
	jg	.LBB22_2
# %bb.7:
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
	.cfi_restore %r12
	.cfi_restore %r14
	.cfi_restore %r15
.LBB22_8:                               # %._crit_edge18
	movl	$1, %eax
	retq
.Lfunc_end22:
	.size	_Z8pagerankv, .Lfunc_end22-_Z8pagerankv
	.cfi_endproc
                                        # -- End function
	.globl	_Z12update_ranksv               # -- Begin function _Z12update_ranksv
	.type	_Z12update_ranksv,@function
_Z12update_ranksv:                      # @_Z12update_ranksv
	.cfi_startproc
# %bb.0:
	movq	vertex_length(%rip), %rax
	testq	%rax, %rax
	jle	.LBB23_3
# %bb.1:                                # %.lr.ph
	movq	result(%rip), %rcx
	movq	ranks(%rip), %rdx
	xorl	%esi, %esi
.LBB23_2:                               # =>This Inner Loop Header: Depth=1
	movsd	(%rcx,%rsi,8), %xmm0            # xmm0 = mem[0],zero
	movsd	%xmm0, (%rdx,%rsi,8)
	movq	$0, (%rcx,%rsi,8)
	incq	%rsi
	cmpq	%rsi, %rax
	jne	.LBB23_2
.LBB23_3:                               # %._crit_edge
	retq
.Lfunc_end23:
	.size	_Z12update_ranksv, .Lfunc_end23-_Z12update_ranksv
	.cfi_endproc
                                        # -- End function
	.globl	_Z30__device_stub__multiply_kernelP6vertexP5entryP3mapPdS5_Pl # -- Begin function _Z30__device_stub__multiply_kernelP6vertexP5entryP3mapPdS5_Pl
	.type	_Z30__device_stub__multiply_kernelP6vertexP5entryP3mapPdS5_Pl,@function
_Z30__device_stub__multiply_kernelP6vertexP5entryP3mapPdS5_Pl: # @_Z30__device_stub__multiply_kernelP6vertexP5entryP3mapPdS5_Pl
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$144, %rsp
	.cfi_def_cfa_offset 192
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	56(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	48(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	32(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	24(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	16(%rsp), %r8
	movq	%r9, (%r8)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	movq	%r8, 40(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%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	$_Z15multiply_kernelP6vertexP5entryP3mapPdS5_Pl, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$160, %rsp
	.cfi_adjust_cfa_offset -160
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end24:
	.size	_Z30__device_stub__multiply_kernelP6vertexP5entryP3mapPdS5_Pl, .Lfunc_end24-_Z30__device_stub__multiply_kernelP6vertexP5entryP3mapPdS5_Pl
	.cfi_endproc
                                        # -- End function
	.globl	_Z25__device_stub__add_kernelP6vertexP5entryPdP3mapS3_Pl # -- Begin function _Z25__device_stub__add_kernelP6vertexP5entryPdP3mapS3_Pl
	.type	_Z25__device_stub__add_kernelP6vertexP5entryPdP3mapS3_Pl,@function
_Z25__device_stub__add_kernelP6vertexP5entryPdP3mapS3_Pl: # @_Z25__device_stub__add_kernelP6vertexP5entryPdP3mapS3_Pl
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$144, %rsp
	.cfi_def_cfa_offset 192
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	56(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	48(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	32(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	24(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	16(%rsp), %r8
	movq	%r9, (%r8)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	movq	%r8, 40(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%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	$_Z10add_kernelP6vertexP5entryPdP3mapS3_Pl, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$160, %rsp
	.cfi_adjust_cfa_offset -160
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end25:
	.size	_Z25__device_stub__add_kernelP6vertexP5entryPdP3mapS3_Pl, .Lfunc_end25-_Z25__device_stub__add_kernelP6vertexP5entryPdP3mapS3_Pl
	.cfi_endproc
                                        # -- End function
	.globl	_Z28__device_stub__update_kernelPdS_Pl # -- Begin function _Z28__device_stub__update_kernelPdS_Pl
	.type	_Z28__device_stub__update_kernelPdS_Pl,@function
_Z28__device_stub__update_kernelPdS_Pl: # @_Z28__device_stub__update_kernelPdS_Pl
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	24(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z13update_kernelPdS_Pl, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end26:
	.size	_Z28__device_stub__update_kernelPdS_Pl, .Lfunc_end26-_Z28__device_stub__update_kernelPdS_Pl
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function main
.LCPI27_0:
	.quad	0x412e848000000000              # double 1.0E+6
.LCPI27_1:
	.quad	0x3f50000000000000              # double 9.765625E-4
	.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	%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 %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, %r14
	cmpl	$4, %edi
	jne	.LBB27_88
# %bb.1:
	movq	8(%r14), %rdi
	movl	$.L.str.6, %esi
	callq	fopen
	movq	%rax, %r15
	movq	16(%r14), %rdi
	callq	atoi
	movl	%eax, %ebx
	movq	24(%r14), %rdi
	callq	atoi
	movl	%eax, %ebp
	callq	_Z13init_verticesv
	callq	_Z10init_edgesv
	movq	%r15, %rdi
	callq	_Z11build_graphP8_IO_FILE
	callq	_Z10create_mapv
	callq	_Z10init_ranksv
	callq	_Z16init_transitionsv
	cmpl	$1, %ebp
	jne	.LBB27_65
# %bb.2:
	leaq	72(%rsp), %rdi
	movl	$8, %esi
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB27_3
# %bb.5:                                # %_Z14cudaCheckError10hipError_tPKcib.exit
	movq	72(%rsp), %rdi
	movl	$edges_length, %esi
	movl	$8, %edx
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB27_6
# %bb.7:                                # %_Z14cudaCheckError10hipError_tPKcib.exit49
	leaq	24(%rsp), %rdi
	movl	$8, %esi
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB27_8
# %bb.9:                                # %_Z14cudaCheckError10hipError_tPKcib.exit51
	movq	24(%rsp), %rdi
	movl	$vertex_length, %esi
	movl	$8, %edx
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB27_10
# %bb.11:                               # %_Z14cudaCheckError10hipError_tPKcib.exit53
	movq	vertex_length(%rip), %rax
	shlq	$3, %rax
	leaq	(%rax,%rax,2), %rsi
	leaq	56(%rsp), %rdi
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB27_12
# %bb.13:                               # %_Z14cudaCheckError10hipError_tPKcib.exit55
	movq	56(%rsp), %rdi
	movq	vertex_list(%rip), %rsi
	movq	vertex_length(%rip), %rax
	shlq	$3, %rax
	leaq	(%rax,%rax,2), %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB27_14
# %bb.15:                               # %_Z14cudaCheckError10hipError_tPKcib.exit57
	movq	edges_length(%rip), %rsi
	shlq	$4, %rsi
	leaq	48(%rsp), %rdi
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB27_16
# %bb.17:                               # %_Z14cudaCheckError10hipError_tPKcib.exit59
	movq	48(%rsp), %rdi
	movq	transitions(%rip), %rsi
	movq	edges_length(%rip), %rdx
	shlq	$4, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB27_18
# %bb.19:                               # %_Z14cudaCheckError10hipError_tPKcib.exit61
	movq	vertex_length(%rip), %rsi
	shlq	$4, %rsi
	leaq	40(%rsp), %rdi
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB27_20
# %bb.21:                               # %_Z14cudaCheckError10hipError_tPKcib.exit63
	movq	40(%rsp), %rdi
	movq	node_map(%rip), %rsi
	movq	vertex_length(%rip), %rdx
	shlq	$4, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB27_22
# %bb.23:                               # %_Z14cudaCheckError10hipError_tPKcib.exit65
	movq	vertex_length(%rip), %rsi
	shlq	$3, %rsi
	leaq	8(%rsp), %rdi
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB27_24
# %bb.25:                               # %_Z14cudaCheckError10hipError_tPKcib.exit67
	movq	8(%rsp), %rdi
	movq	ranks(%rip), %rsi
	movq	vertex_length(%rip), %rdx
	shlq	$3, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB27_26
# %bb.27:                               # %_Z14cudaCheckError10hipError_tPKcib.exit69
	movq	edges_length(%rip), %rsi
	shlq	$3, %rsi
	leaq	64(%rsp), %rdi
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB27_28
# %bb.29:                               # %_Z14cudaCheckError10hipError_tPKcib.exit71
	movq	vertex_length(%rip), %rsi
	shlq	$3, %rsi
	leaq	16(%rsp), %rdi
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB27_30
# %bb.31:                               # %_Z14cudaCheckError10hipError_tPKcib.exit73
	movq	vertex_length(%rip), %r12
	movl	$1, %ebp
	cmpq	$1025, %r12                     # imm = 0x401
	jl	.LBB27_33
# %bb.32:
	cvtsi2sd	%r12, %xmm0
	mulsd	.LCPI27_1(%rip), %xmm0
	callq	ceil@PLT
	cvttsd2si	%xmm0, %ebp
	movl	$1024, %r12d                    # imm = 0x400
.LBB27_33:
	callq	clock
	movq	%rax, %r14
	testl	%ebx, %ebx
	jle	.LBB27_44
# %bb.34:                               # %.lr.ph120
	movl	%ebp, %r15d
	btsq	$32, %r15
	movl	%r12d, %r12d
	btsq	$32, %r12
.LBB27_35:                              # =>This Inner Loop Header: Depth=1
	movq	64(%rsp), %rdi
	movq	edges_length(%rip), %rdx
	shlq	$3, %rdx
	xorl	%esi, %esi
	callq	hipMemset
	testl	%eax, %eax
	jne	.LBB27_36
# %bb.37:                               # %_Z14cudaCheckError10hipError_tPKcib.exit75
                                        #   in Loop: Header=BB27_35 Depth=1
	movq	16(%rsp), %rdi
	movq	vertex_length(%rip), %rdx
	shlq	$3, %rdx
	xorl	%esi, %esi
	callq	hipMemset
	testl	%eax, %eax
	jne	.LBB27_38
# %bb.39:                               # %_Z14cudaCheckError10hipError_tPKcib.exit77
                                        #   in Loop: Header=BB27_35 Depth=1
	movq	%r15, %rdi
	movl	$1, %esi
	movq	%r12, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB27_41
# %bb.40:                               #   in Loop: Header=BB27_35 Depth=1
	movq	56(%rsp), %rdi
	movq	48(%rsp), %rsi
	movq	40(%rsp), %rdx
	movq	8(%rsp), %rcx
	movq	16(%rsp), %r8
	movq	24(%rsp), %r9
	callq	_Z30__device_stub__multiply_kernelP6vertexP5entryP3mapPdS5_Pl
.LBB27_41:                              #   in Loop: Header=BB27_35 Depth=1
	callq	hipDeviceSynchronize
	movq	%r15, %rdi
	movl	$1, %esi
	movq	%r12, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB27_43
# %bb.42:                               #   in Loop: Header=BB27_35 Depth=1
	movq	16(%rsp), %rdi
	movq	8(%rsp), %rsi
	movq	24(%rsp), %rdx
	callq	_Z28__device_stub__update_kernelPdS_Pl
.LBB27_43:                              #   in Loop: Header=BB27_35 Depth=1
	callq	hipDeviceSynchronize
	decl	%ebx
	jne	.LBB27_35
.LBB27_44:                              # %._crit_edge121
	callq	clock
	movq	%rax, %r15
	movq	vertex_length(%rip), %r12
	shlq	$3, %r12
	movq	%r12, %rdi
	callq	malloc
	movq	%rax, %rbx
	movq	8(%rsp), %rsi
	movq	%rax, %rdi
	movq	%r12, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB27_89
# %bb.45:                               # %_Z14cudaCheckError10hipError_tPKcib.exit79.preheader
	subq	%r14, %r15
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r15, %xmm0
	divsd	.LCPI27_0(%rip), %xmm0
	movsd	%xmm0, 32(%rsp)                 # 8-byte Spill
	cmpq	$0, vertex_length(%rip)
	jle	.LBB27_48
# %bb.46:                               # %_Z14cudaCheckError10hipError_tPKcib.exit79.preheader152
	xorl	%r14d, %r14d
.LBB27_47:                              # %_Z14cudaCheckError10hipError_tPKcib.exit79
                                        # =>This Inner Loop Header: Depth=1
	movsd	(%rbx,%r14,8), %xmm0            # xmm0 = mem[0],zero
	movl	$.L.str.7, %edi
	movb	$1, %al
	callq	printf
	incq	%r14
	cmpq	%r14, vertex_length(%rip)
	jg	.LBB27_47
.LBB27_48:                              # %_Z14cudaCheckError10hipError_tPKcib.exit79._crit_edge
	movq	%rbx, %rdi
	callq	free
	movl	$.L.str.8, %edi
	movsd	32(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	movb	$1, %al
	callq	printf
	movq	72(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB27_49
# %bb.51:                               # %_Z14cudaCheckError10hipError_tPKcib.exit81
	movq	24(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB27_52
# %bb.53:                               # %_Z14cudaCheckError10hipError_tPKcib.exit83
	movq	56(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB27_54
# %bb.55:                               # %_Z14cudaCheckError10hipError_tPKcib.exit85
	movq	48(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB27_56
# %bb.57:                               # %_Z14cudaCheckError10hipError_tPKcib.exit87
	movq	40(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB27_58
# %bb.59:                               # %_Z14cudaCheckError10hipError_tPKcib.exit89
	movq	8(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB27_60
# %bb.61:                               # %_Z14cudaCheckError10hipError_tPKcib.exit91
	movq	64(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB27_62
# %bb.63:                               # %_Z14cudaCheckError10hipError_tPKcib.exit93
	movq	16(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	je	.LBB27_75
# %bb.64:
	movl	%eax, %ebx
	movq	stderr(%rip), %r14
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%r14, %rdi
	movq	%rax, %rdx
	movl	$531, %r8d                      # imm = 0x213
	jmp	.LBB27_50
.LBB27_65:
	callq	clock
	movq	%rax, %r14
	callq	_Z11init_resultv
	testl	%ebx, %ebx
	jle	.LBB27_71
# %bb.66:                               # %.lr.ph.preheader
	xorl	%r15d, %r15d
.LBB27_67:                              # %.lr.ph
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB27_69 Depth 2
	callq	_Z8pagerankv
	movq	vertex_length(%rip), %rax
	testq	%rax, %rax
	jle	.LBB27_70
# %bb.68:                               # %.lr.ph.i
                                        #   in Loop: Header=BB27_67 Depth=1
	movq	result(%rip), %rcx
	movq	ranks(%rip), %rdx
	xorl	%esi, %esi
.LBB27_69:                              #   Parent Loop BB27_67 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%rcx,%rsi,8), %xmm0            # xmm0 = mem[0],zero
	movsd	%xmm0, (%rdx,%rsi,8)
	movq	$0, (%rcx,%rsi,8)
	incq	%rsi
	cmpq	%rsi, %rax
	jne	.LBB27_69
.LBB27_70:                              # %_Z12update_ranksv.exit
                                        #   in Loop: Header=BB27_67 Depth=1
	incl	%r15d
	cmpl	%ebx, %r15d
	jne	.LBB27_67
.LBB27_71:                              # %._crit_edge
	callq	clock
	subq	%r14, %rax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	divsd	.LCPI27_0(%rip), %xmm0
	movsd	%xmm0, 32(%rsp)                 # 8-byte Spill
	cmpq	$0, vertex_length(%rip)
	jle	.LBB27_74
# %bb.72:                               # %.lr.ph116.preheader
	xorl	%ebx, %ebx
.LBB27_73:                              # %.lr.ph116
                                        # =>This Inner Loop Header: Depth=1
	movq	ranks(%rip), %rax
	movsd	(%rax,%rbx,8), %xmm0            # xmm0 = mem[0],zero
	movl	$.L.str.7, %edi
	movb	$1, %al
	callq	printf
	incq	%rbx
	cmpq	%rbx, vertex_length(%rip)
	jg	.LBB27_73
.LBB27_74:                              # %._crit_edge117
	movl	$.L.str.8, %edi
	movsd	32(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	movb	$1, %al
	callq	printf
.LBB27_75:
	xorl	%eax, %eax
	movq	%rax, edges_length(%rip)
	movq	$32, edges_size(%rip)
	movq	%rax, edges_itr(%rip)
	movq	edges(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB27_77
# %bb.76:
	callq	free
.LBB27_77:                              # %_Z12delete_edgesv.exit
	xorl	%eax, %eax
	movq	%rax, vertex_itr(%rip)
	movq	%rax, vertex_length(%rip)
	movq	%rax, vertex_size(%rip)
	movq	vertex_list(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB27_79
# %bb.78:
	callq	free
.LBB27_79:                              # %_Z15delete_verticesv.exit
	movq	ranks(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB27_81
# %bb.80:
	callq	free
.LBB27_81:                              # %_Z12delete_ranksv.exit
	movq	transitions(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB27_83
# %bb.82:
	callq	free
.LBB27_83:                              # %_Z18delete_transitionsv.exit
	movq	node_map(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB27_85
# %bb.84:
	callq	free
.LBB27_85:                              # %_Z10delete_mapv.exit
	movq	result(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB27_87
# %bb.86:
	callq	free
.LBB27_87:                              # %_Z13delete_resultv.exit
	xorl	%eax, %eax
	addq	$80, %rsp
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.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
.LBB27_38:
	.cfi_def_cfa_offset 128
	movl	%eax, %ebp
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$501, %r8d                      # imm = 0x1F5
	jmp	.LBB27_4
.LBB27_36:
	movl	%eax, %ebp
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$500, %r8d                      # imm = 0x1F4
.LBB27_4:
	xorl	%eax, %eax
	callq	fprintf
	movl	%ebp, %edi
	callq	exit
.LBB27_88:
	movq	stderr(%rip), %rdi
	movq	(%r14), %rdx
	movl	$.L.str.5, %esi
	xorl	%eax, %eax
	callq	fprintf
	movl	$1, %edi
	callq	exit
.LBB27_3:
	movl	%eax, %ebp
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$457, %r8d                      # imm = 0x1C9
	jmp	.LBB27_4
.LBB27_6:
	movl	%eax, %ebp
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$458, %r8d                      # imm = 0x1CA
	jmp	.LBB27_4
.LBB27_8:
	movl	%eax, %ebp
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$461, %r8d                      # imm = 0x1CD
	jmp	.LBB27_4
.LBB27_10:
	movl	%eax, %ebp
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$462, %r8d                      # imm = 0x1CE
	jmp	.LBB27_4
.LBB27_12:
	movl	%eax, %ebp
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$465, %r8d                      # imm = 0x1D1
	jmp	.LBB27_4
.LBB27_14:
	movl	%eax, %ebp
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$466, %r8d                      # imm = 0x1D2
	jmp	.LBB27_4
.LBB27_16:
	movl	%eax, %ebp
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$469, %r8d                      # imm = 0x1D5
	jmp	.LBB27_4
.LBB27_18:
	movl	%eax, %ebp
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$470, %r8d                      # imm = 0x1D6
	jmp	.LBB27_4
.LBB27_20:
	movl	%eax, %ebp
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$473, %r8d                      # imm = 0x1D9
	jmp	.LBB27_4
.LBB27_22:
	movl	%eax, %ebp
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$474, %r8d                      # imm = 0x1DA
	jmp	.LBB27_4
.LBB27_24:
	movl	%eax, %ebp
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$477, %r8d                      # imm = 0x1DD
	jmp	.LBB27_4
.LBB27_26:
	movl	%eax, %ebp
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$478, %r8d                      # imm = 0x1DE
	jmp	.LBB27_4
.LBB27_28:
	movl	%eax, %ebp
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$481, %r8d                      # imm = 0x1E1
	jmp	.LBB27_4
.LBB27_30:
	movl	%eax, %ebp
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$484, %r8d                      # imm = 0x1E4
	jmp	.LBB27_4
.LBB27_89:
	movl	%eax, %ebp
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$517, %r8d                      # imm = 0x205
	jmp	.LBB27_4
.LBB27_49:
	movl	%eax, %ebx
	movq	stderr(%rip), %r14
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%r14, %rdi
	movq	%rax, %rdx
	movl	$524, %r8d                      # imm = 0x20C
	jmp	.LBB27_50
.LBB27_52:
	movl	%eax, %ebx
	movq	stderr(%rip), %r14
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%r14, %rdi
	movq	%rax, %rdx
	movl	$525, %r8d                      # imm = 0x20D
	jmp	.LBB27_50
.LBB27_54:
	movl	%eax, %ebx
	movq	stderr(%rip), %r14
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%r14, %rdi
	movq	%rax, %rdx
	movl	$526, %r8d                      # imm = 0x20E
	jmp	.LBB27_50
.LBB27_56:
	movl	%eax, %ebx
	movq	stderr(%rip), %r14
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%r14, %rdi
	movq	%rax, %rdx
	movl	$527, %r8d                      # imm = 0x20F
	jmp	.LBB27_50
.LBB27_58:
	movl	%eax, %ebx
	movq	stderr(%rip), %r14
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%r14, %rdi
	movq	%rax, %rdx
	movl	$528, %r8d                      # imm = 0x210
	jmp	.LBB27_50
.LBB27_60:
	movl	%eax, %ebx
	movq	stderr(%rip), %r14
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%r14, %rdi
	movq	%rax, %rdx
	movl	$529, %r8d                      # imm = 0x211
	jmp	.LBB27_50
.LBB27_62:
	movl	%eax, %ebx
	movq	stderr(%rip), %r14
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.10, %esi
	movl	$.L.str.1, %ecx
	movq	%r14, %rdi
	movq	%rax, %rdx
	movl	$530, %r8d                      # imm = 0x212
.LBB27_50:
	xorl	%eax, %eax
	callq	fprintf
	movl	%ebx, %edi
	callq	exit
.Lfunc_end27:
	.size	main, .Lfunc_end27-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	.LBB28_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB28_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z15multiply_kernelP6vertexP5entryP3mapPdS5_Pl, %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	$_Z10add_kernelP6vertexP5entryPdP3mapS3_Pl, %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	$_Z13update_kernelPdS_Pl, %esi
	movl	$.L__unnamed_3, %edx
	movl	$.L__unnamed_3, %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_end28:
	.size	__hip_module_ctor, .Lfunc_end28-__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	.LBB29_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
.LBB29_2:
	retq
.Lfunc_end29:
	.size	__hip_module_dtor, .Lfunc_end29-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	edges,@object                   # @edges
	.bss
	.globl	edges
	.p2align	3, 0x0
edges:
	.quad	0
	.size	edges, 8

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

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

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

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

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

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

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

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

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

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

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

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"Malloc failed in %s at line %d\n"
	.size	.L.str, 32

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"/home/ubuntu/Datasets/stackv2/train-structured-repos-hip-sm89/shreyas42/CudaPageRank/master/pagerank.hip"
	.size	.L.str.1, 105

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"Null pointer error in %s at line %d\n"
	.size	.L.str.2, 37

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"File pointer error in %s at line %d\n"
	.size	.L.str.3, 37

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"%ld %ld"
	.size	.L.str.4, 8

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

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

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

	.type	.L.str.5,@object                # @.str.5
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.5:
	.asciz	"Correct usage: %s <pathToGraph> <numIterations> <serial = 0/parallel = 1>\n"
	.size	.L.str.5, 75

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

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"%lf\n"
	.size	.L.str.7, 5

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

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"GPUassert: %s\nFile: %s\nLine: %d\n"
	.size	.L.str.10, 33

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z15multiply_kernelP6vertexP5entryP3mapPdS5_Pl"
	.size	.L__unnamed_1, 47

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z10add_kernelP6vertexP5entryPdP3mapS3_Pl"
	.size	.L__unnamed_2, 42

	.type	.L__unnamed_3,@object           # @2
.L__unnamed_3:
	.asciz	"_Z13update_kernelPdS_Pl"
	.size	.L__unnamed_3, 24

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

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

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym _Z30__device_stub__multiply_kernelP6vertexP5entryP3mapPdS5_Pl
	.addrsig_sym _Z25__device_stub__add_kernelP6vertexP5entryPdP3mapS3_Pl
	.addrsig_sym _Z28__device_stub__update_kernelPdS_Pl
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym edges_length
	.addrsig_sym vertex_length
	.addrsig_sym _Z15multiply_kernelP6vertexP5entryP3mapPdS5_Pl
	.addrsig_sym _Z10add_kernelP6vertexP5entryPdP3mapS3_Pl
	.addrsig_sym _Z13update_kernelPdS_Pl
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z15multiply_kernelP6vertexP5entryP3mapPdS5_Pl ; -- Begin function _Z15multiply_kernelP6vertexP5entryP3mapPdS5_Pl
	.globl	_Z15multiply_kernelP6vertexP5entryP3mapPdS5_Pl
	.p2align	8
	.type	_Z15multiply_kernelP6vertexP5entryP3mapPdS5_Pl,@function
_Z15multiply_kernelP6vertexP5entryP3mapPdS5_Pl: ; @_Z15multiply_kernelP6vertexP5entryP3mapPdS5_Pl
; %bb.0:
	s_clause 0x1
	s_load_b128 s[8:11], s[0:1], 0x20
	s_load_b32 s4, s[0:1], 0x3c
	s_waitcnt lgkmcnt(0)
	s_load_b64 s[2:3], s[10:11], 0x0
	s_and_b32 s4, s4, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[2:3], null, s15, s4, v[0:1]
	v_ashrrev_i32_e32 v3, 31, v2
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_gt_i64_e32 vcc_lo, s[2:3], v[2:3]
	s_and_saveexec_b32 s2, vcc_lo
	s_cbranch_execz .LBB0_14
; %bb.1:
	s_load_b256 s[0:7], s[0:1], 0x0
	s_mov_b32 s18, 0
	s_waitcnt lgkmcnt(0)
	v_mad_i64_i32 v[0:1], null, v2, 24, s[0:1]
	global_load_b32 v4, v[0:1], off offset:16
	s_waitcnt vmcnt(0)
	v_cmp_lt_i32_e32 vcc_lo, 0, v4
	s_and_b32 exec_lo, exec_lo, vcc_lo
	s_cbranch_execz .LBB0_14
; %bb.2:                                ; %.lr.ph
	v_lshlrev_b64 v[2:3], 3, v[2:3]
	s_cmp_lg_u64 s[4:5], 0
	s_cselect_b32 s19, -1, 0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v2, vcc_lo, s6, v2
	v_add_co_ci_u32_e32 v3, vcc_lo, s7, v3, vcc_lo
	v_add_co_u32 v8, vcc_lo, v0, 16
	v_add_co_ci_u32_e32 v9, vcc_lo, 0, v1, vcc_lo
	global_load_b64 v[4:5], v[2:3], off
	global_load_b64 v[6:7], v[0:1], off offset:8
	v_add_co_u32 v10, vcc_lo, v0, 8
	v_add_co_ci_u32_e32 v11, vcc_lo, 0, v1, vcc_lo
.LBB0_3:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	s_waitcnt vmcnt(0)
	v_lshlrev_b64 v[0:1], 4, v[6:7]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, s2, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s3, v1, vcc_lo
	s_and_not1_b32 vcc_lo, exec_lo, s19
	global_load_b128 v[0:3], v[0:1], off
	s_cbranch_vccnz .LBB0_12
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	s_load_b64 s[0:1], s[10:11], 0x0
	s_waitcnt lgkmcnt(0)
	v_cmp_lt_i64_e64 s6, s[0:1], 1
	s_delay_alu instid0(VALU_DEP_1)
	s_and_b32 vcc_lo, exec_lo, s6
	s_cbranch_vccnz .LBB0_12
; %bb.5:                                ; %.lr.ph.i.preheader
                                        ;   in Loop: Header=BB0_3 Depth=1
	s_mov_b64 s[12:13], 0
	s_mov_b32 s20, 0
	s_mov_b64 s[6:7], s[4:5]
                                        ; implicit-def: $sgpr21
                                        ; implicit-def: $sgpr23
                                        ; implicit-def: $sgpr22
.LBB0_6:                                ; %.lr.ph.i
                                        ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	s_load_b64 s[14:15], s[6:7], 0x0
	s_or_b32 s22, s22, exec_lo
	s_or_b32 s23, s23, exec_lo
                                        ; implicit-def: $sgpr16_sgpr17
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_cmp_ne_u64_e32 vcc_lo, s[14:15], v[0:1]
                                        ; implicit-def: $sgpr14_sgpr15
	s_and_saveexec_b32 s24, vcc_lo
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	s_add_u32 s14, s12, 1
	s_addc_u32 s15, s13, 0
	s_add_u32 s6, s6, 16
	s_addc_u32 s7, s7, 0
	s_cmp_eq_u64 s[0:1], s[14:15]
	s_mov_b64 s[16:17], -1
	s_cselect_b32 s25, -1, 0
	s_and_not1_b32 s23, s23, exec_lo
	s_and_b32 s25, s25, exec_lo
	s_and_not1_b32 s22, s22, exec_lo
	s_or_b32 s23, s23, s25
; %bb.8:                                ; %Flow59
                                        ;   in Loop: Header=BB0_6 Depth=2
	s_or_b32 exec_lo, exec_lo, s24
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_b32 s24, exec_lo, s23
	v_dual_mov_b32 v12, s16 :: v_dual_mov_b32 v13, s17
	s_or_b32 s20, s24, s20
	v_dual_mov_b32 v14, s13 :: v_dual_mov_b32 v13, s12
	s_and_not1_b32 s12, s21, exec_lo
	s_and_b32 s13, s22, exec_lo
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 s21, s12, s13
	s_mov_b64 s[12:13], s[14:15]
	s_and_not1_b32 exec_lo, exec_lo, s20
	s_cbranch_execnz .LBB0_6
; %bb.9:                                ; %loop.exit.guard
                                        ;   in Loop: Header=BB0_3 Depth=1
	s_or_b32 exec_lo, exec_lo, s20
	s_and_saveexec_b32 s0, s21
	s_delay_alu instid0(SALU_CYCLE_1)
	s_xor_b32 s0, exec_lo, s0
	s_cbranch_execz .LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	v_lshlrev_b64 v[0:1], 4, v[13:14]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, s4, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s5, v1, vcc_lo
	global_load_b64 v[12:13], v[0:1], off offset:8
.LBB0_11:                               ; %Flow
                                        ;   in Loop: Header=BB0_3 Depth=1
	s_or_b32 exec_lo, exec_lo, s0
	s_branch .LBB0_13
.LBB0_12:                               ;   in Loop: Header=BB0_3 Depth=1
	v_mov_b32_e32 v12, -1
	v_mov_b32_e32 v13, -1
.LBB0_13:                               ; %_Z11search_dmapP3mapPll.exit
                                        ;   in Loop: Header=BB0_3 Depth=1
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v13, 31, v12
	v_lshlrev_b64 v[0:1], 3, v[12:13]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, s8, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s9, v1, vcc_lo
	v_add_co_u32 v6, vcc_lo, v6, 1
	v_add_co_ci_u32_e32 v7, vcc_lo, 0, v7, vcc_lo
	global_load_b64 v[12:13], v[0:1], off
	s_waitcnt vmcnt(0)
	s_barrier
	buffer_gl0_inv
	v_fma_f64 v[2:3], v[4:5], v[2:3], v[12:13]
	global_store_b64 v[0:1], v[2:3], off
	s_waitcnt_vscnt null, 0x0
	s_barrier
	buffer_gl0_inv
	s_clause 0x1
	global_load_b32 v2, v[8:9], off
	global_load_b64 v[0:1], v[10:11], off
	s_waitcnt vmcnt(1)
	v_ashrrev_i32_e32 v3, 31, v2
	s_waitcnt vmcnt(0)
	v_add_co_u32 v0, vcc_lo, v0, v2
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_co_ci_u32_e32 v1, vcc_lo, v1, v3, vcc_lo
	v_cmp_ge_i64_e32 vcc_lo, v[6:7], v[0:1]
	s_or_b32 s18, vcc_lo, s18
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s18
	s_cbranch_execnz .LBB0_3
.LBB0_14:                               ; %.loopexit
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z15multiply_kernelP6vertexP5entryP3mapPdS5_Pl
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 304
		.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 15
		.amdhsa_next_free_sgpr 26
		.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	_Z15multiply_kernelP6vertexP5entryP3mapPdS5_Pl, .Lfunc_end0-_Z15multiply_kernelP6vertexP5entryP3mapPdS5_Pl
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 660
; NumSgprs: 28
; NumVgprs: 15
; ScratchSize: 0
; MemoryBound: 1
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 3
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 28
; NumVGPRsForWavesPerEU: 15
; 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	_Z10add_kernelP6vertexP5entryPdP3mapS3_Pl ; -- Begin function _Z10add_kernelP6vertexP5entryPdP3mapS3_Pl
	.globl	_Z10add_kernelP6vertexP5entryPdP3mapS3_Pl
	.p2align	8
	.type	_Z10add_kernelP6vertexP5entryPdP3mapS3_Pl,@function
_Z10add_kernelP6vertexP5entryPdP3mapS3_Pl: ; @_Z10add_kernelP6vertexP5entryPdP3mapS3_Pl
; %bb.0:
	s_clause 0x1
	s_load_b128 s[8:11], s[0:1], 0x20
	s_load_b32 s4, s[0:1], 0x3c
	s_waitcnt lgkmcnt(0)
	s_load_b64 s[2:3], s[10:11], 0x0
	s_and_b32 s4, s4, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s4, v[0:1]
	v_ashrrev_i32_e32 v2, 31, v1
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_gt_i64_e32 vcc_lo, s[2:3], v[1:2]
	s_and_saveexec_b32 s2, vcc_lo
	s_cbranch_execz .LBB1_14
; %bb.1:
	s_load_b256 s[0:7], s[0:1], 0x0
	s_mov_b32 s20, 0
	s_waitcnt lgkmcnt(0)
	v_mad_i64_i32 v[4:5], null, v1, 24, s[0:1]
	global_load_b32 v0, v[4:5], off offset:16
	s_waitcnt vmcnt(0)
	v_cmp_lt_i32_e32 vcc_lo, 0, v0
	s_and_b32 exec_lo, exec_lo, vcc_lo
	s_cbranch_execz .LBB1_14
; %bb.2:                                ; %.lr.ph
	global_load_b64 v[0:1], v[4:5], off offset:8
	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, 8
	v_add_co_ci_u32_e32 v5, vcc_lo, 0, v5, vcc_lo
	s_cmp_lg_u64 s[6:7], 0
	s_cselect_b32 s21, -1, 0
.LBB1_3:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB1_6 Depth 2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 vcc_lo, exec_lo, s21
	s_cbranch_vccnz .LBB1_12
; %bb.4:                                ;   in Loop: Header=BB1_3 Depth=1
	s_load_b64 s[0:1], s[10:11], 0x0
	s_waitcnt lgkmcnt(0)
	v_cmp_lt_i64_e64 s12, s[0:1], 1
	s_delay_alu instid0(VALU_DEP_1)
	s_and_b32 vcc_lo, exec_lo, s12
	s_cbranch_vccnz .LBB1_12
; %bb.5:                                ; %.lr.ph.i.preheader
                                        ;   in Loop: Header=BB1_3 Depth=1
	s_waitcnt vmcnt(0)
	v_lshlrev_b64 v[6:7], 4, v[0:1]
	s_mov_b64 s[14:15], 0
	s_mov_b32 s22, 0
	s_mov_b64 s[12:13], s[6:7]
                                        ; implicit-def: $sgpr23
                                        ; implicit-def: $sgpr25
                                        ; implicit-def: $sgpr24
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v6, vcc_lo, s2, v6
	v_add_co_ci_u32_e32 v7, vcc_lo, s3, v7, vcc_lo
	global_load_b64 v[6:7], v[6:7], off
.LBB1_6:                                ; %.lr.ph.i
                                        ;   Parent Loop BB1_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	s_load_b64 s[16:17], s[12:13], 0x0
	s_or_b32 s24, s24, exec_lo
	s_or_b32 s25, s25, exec_lo
                                        ; implicit-def: $sgpr18_sgpr19
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_cmp_ne_u64_e32 vcc_lo, s[16:17], v[6:7]
                                        ; implicit-def: $sgpr16_sgpr17
	s_and_saveexec_b32 s26, vcc_lo
; %bb.7:                                ;   in Loop: Header=BB1_6 Depth=2
	s_add_u32 s16, s14, 1
	s_addc_u32 s17, s15, 0
	s_add_u32 s12, s12, 16
	s_addc_u32 s13, s13, 0
	s_cmp_eq_u64 s[0:1], s[16:17]
	s_mov_b64 s[18:19], -1
	s_cselect_b32 s27, -1, 0
	s_and_not1_b32 s25, s25, exec_lo
	s_and_b32 s27, s27, exec_lo
	s_and_not1_b32 s24, s24, exec_lo
	s_or_b32 s25, s25, s27
; %bb.8:                                ; %Flow55
                                        ;   in Loop: Header=BB1_6 Depth=2
	s_or_b32 exec_lo, exec_lo, s26
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_b32 s26, exec_lo, s25
	v_dual_mov_b32 v8, s18 :: v_dual_mov_b32 v9, s19
	s_or_b32 s22, s26, s22
	v_dual_mov_b32 v9, s14 :: v_dual_mov_b32 v10, s15
	s_and_not1_b32 s14, s23, exec_lo
	s_and_b32 s15, s24, exec_lo
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 s23, s14, s15
	s_mov_b64 s[14:15], s[16:17]
	s_and_not1_b32 exec_lo, exec_lo, s22
	s_cbranch_execnz .LBB1_6
; %bb.9:                                ; %loop.exit.guard
                                        ;   in Loop: Header=BB1_3 Depth=1
	s_or_b32 exec_lo, exec_lo, s22
	s_and_saveexec_b32 s0, s23
	s_delay_alu instid0(SALU_CYCLE_1)
	s_xor_b32 s0, exec_lo, s0
	s_cbranch_execz .LBB1_11
; %bb.10:                               ;   in Loop: Header=BB1_3 Depth=1
	v_lshlrev_b64 v[6:7], 4, v[9:10]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v6, vcc_lo, s6, v6
	v_add_co_ci_u32_e32 v7, vcc_lo, s7, v7, vcc_lo
	global_load_b64 v[8:9], v[6:7], off offset:8
.LBB1_11:                               ; %Flow
                                        ;   in Loop: Header=BB1_3 Depth=1
	s_or_b32 exec_lo, exec_lo, s0
	s_branch .LBB1_13
.LBB1_12:                               ;   in Loop: Header=BB1_3 Depth=1
	v_mov_b32_e32 v8, -1
	v_mov_b32_e32 v9, -1
.LBB1_13:                               ; %_Z11search_dmapP3mapPll.exit
                                        ;   in Loop: Header=BB1_3 Depth=1
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_ashrrev_i32_e32 v9, 31, v8
	v_lshlrev_b64 v[6:7], 3, v[0:1]
	v_lshlrev_b64 v[8:9], 3, v[8:9]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v6, vcc_lo, s4, v6
	v_add_co_ci_u32_e32 v7, vcc_lo, s5, v7, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v8, vcc_lo, s8, v8
	v_add_co_ci_u32_e32 v9, vcc_lo, s9, v9, vcc_lo
	v_add_co_u32 v0, vcc_lo, v0, 1
	global_load_b64 v[6:7], v[6:7], off
	global_load_b64 v[10:11], v[8:9], off
	s_waitcnt vmcnt(0)
	s_barrier
	buffer_gl0_inv
	v_add_co_ci_u32_e32 v1, vcc_lo, 0, v1, vcc_lo
	v_add_f64 v[6:7], v[6:7], v[10:11]
	global_store_b64 v[8:9], v[6:7], off
	s_waitcnt_vscnt null, 0x0
	s_barrier
	buffer_gl0_inv
	s_clause 0x1
	global_load_b32 v8, v[2:3], off
	global_load_b64 v[6:7], v[4:5], off
	s_waitcnt vmcnt(1)
	v_ashrrev_i32_e32 v9, 31, v8
	s_waitcnt vmcnt(0)
	v_add_co_u32 v6, vcc_lo, v6, v8
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_co_ci_u32_e32 v7, vcc_lo, v7, v9, vcc_lo
	v_cmp_ge_i64_e32 vcc_lo, v[0:1], v[6:7]
	s_or_b32 s20, vcc_lo, s20
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s20
	s_cbranch_execnz .LBB1_3
.LBB1_14:                               ; %.loopexit
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z10add_kernelP6vertexP5entryPdP3mapS3_Pl
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 304
		.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 12
		.amdhsa_next_free_sgpr 28
		.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	_Z10add_kernelP6vertexP5entryPdP3mapS3_Pl, .Lfunc_end1-_Z10add_kernelP6vertexP5entryPdP3mapS3_Pl
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 664
; NumSgprs: 30
; NumVgprs: 12
; ScratchSize: 0
; MemoryBound: 1
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 3
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 30
; NumVGPRsForWavesPerEU: 12
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z13update_kernelPdS_Pl ; -- Begin function _Z13update_kernelPdS_Pl
	.globl	_Z13update_kernelPdS_Pl
	.p2align	8
	.type	_Z13update_kernelPdS_Pl,@function
_Z13update_kernelPdS_Pl:                ; @_Z13update_kernelPdS_Pl
; %bb.0:
	s_clause 0x1
	s_load_b64 s[2:3], s[0:1], 0x10
	s_load_b32 s4, s[0:1], 0x24
	s_waitcnt lgkmcnt(0)
	s_load_b64 s[2:3], s[2:3], 0x0
	s_and_b32 s4, s4, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s4, v[0:1]
	v_ashrrev_i32_e32 v2, 31, v1
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_gt_i64_e32 vcc_lo, s[2:3], v[1:2]
	s_and_saveexec_b32 s2, vcc_lo
	s_cbranch_execz .LBB2_2
; %bb.1:
	s_load_b128 s[0:3], s[0:1], 0x0
	v_lshlrev_b64 v[0:1], 3, v[1:2]
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v2, vcc_lo, s0, v0
	v_add_co_ci_u32_e32 v3, vcc_lo, s1, v1, vcc_lo
	v_add_co_u32 v0, vcc_lo, s2, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s3, v1, vcc_lo
	global_load_b64 v[2:3], v[2:3], off
	s_waitcnt vmcnt(0)
	global_store_b64 v[0:1], v[2:3], off
.LBB2_2:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z13update_kernelPdS_Pl
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 280
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 4
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end2:
	.size	_Z13update_kernelPdS_Pl, .Lfunc_end2-_Z13update_kernelPdS_Pl
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 156
; NumSgprs: 18
; NumVgprs: 4
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 4
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

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

	.end_amdgpu_metadata
