#include <iostream>
#include <fstream>
#include <bits/stdc++.h> 
using namespace std; 

//Graph class for CPU implementation
// CPU connected components implementation with DFs
//from https://www.geeksforgeeks.org/program-to-count-number-of-connected-components-in-an-undirected-graph/
class Graph { 
    // No. of vertices 
    int V; 
  
    // Pointer to an array containing adjacency lists 
    list<int>* adj; 
  
    // A function used by DFS 
    void DFSUtil(int v, bool visited[]); 
  
public: 
    // Constructor 
    Graph(int V); 
  
    void addEdge(int v, int w); 
    int NumberOfconnectedComponents(); 
}; 
  
int Graph::NumberOfconnectedComponents() 
{ 
  
    // Mark all the vertices as not visited 
    bool* visited = new bool[V]; 
  
    // To store the number of connected components 
    int count = 0; 
    for (int v = 0; v < V; v++) 
        visited[v] = false; 
  
    for (int v = 0; v < V; v++) { 
        if (visited[v] == false) { 
            DFSUtil(v, visited); 
            count += 1; 
        } 
    } 
  
    return count; 
} 
  
void Graph::DFSUtil(int v, bool visited[]) 
{ 
  
    // Mark the current node as visited 
    visited[v] = true; 
  
    // Recur for all the vertices 
    // adjacent to this vertex 
    list<int>::iterator i; 
  
    for (i = adj[v].begin(); i != adj[v].end(); ++i) 
        if (!visited[*i]) 
            DFSUtil(*i, visited); 
} 
  
Graph::Graph(int V) 
{ 
    this->V = V; 
    adj = new list<int>[V]; 
} 
  
// Add an undirected edge 
void Graph::addEdge(int v, int w) 
{ 
    adj[v].push_back(w); 
    adj[w].push_back(v); 
} 

//kernel functions
__global__ void bfs(int* vertices, int* edges, bool* frontier, bool* next_frontier, bool* visited)
{
  int tid = threadIdx.x + blockDim.x*blockIdx.x;
  if(frontier[tid]){
      frontier[tid] = false;
      visited[tid] = true;                
      for(int i=vertices[tid]; i<vertices[tid+1]; i++){
          int vtx = edges[i];
          if(!visited[vtx]){
              next_frontier[vtx] = true;
          }
      }    
  }
}

__global__ void no_memcpy_bfs(int* vertices, int* edges, bool* frontier, bool* next_frontier, bool* visited)
{
  int tid = threadIdx.x + blockDim.x*blockIdx.x;
  if(frontier[tid]){
      frontier[tid] = false;
      visited[tid] = true;                
      for(int i=vertices[tid]; i<vertices[tid+1]; i++){
          int vtx = edges[i];
          if(!visited[vtx]){
              next_frontier[vtx] = true;
          }
      }    
  }
}

__global__ void next_to_visit(bool* visited, int* tovisit){
    int tid = threadIdx.x + blockDim.x*blockIdx.x;
    if(!visited[tid]){
        tovisit[0] = tid;
    }
}

__global__ void new_frontier(int* tovisit, bool* frontier){
    int tid = threadIdx.x + blockDim.x*blockIdx.x;
    if(tid==tovisit[0]){
        frontier[tovisit[0]] = true;
    }
}

__global__ void check_frontier(bool* frontier, bool* checkfrontier){
    int tid = threadIdx.x + blockDim.x*blockIdx.x;
    if(frontier[tid]){
        checkfrontier[0] = true;
    }
}


//Final GPU solver
void Test_GPU_Solver_BFS(char* arg1, char*arg2)
{ 
    FILE *fdata = fopen(arg2, "r");
    int num_vertex, num_edge;
    char str[100];

    fgets(str,99, fdata);
    sscanf(str, "%d %d", &num_vertex, &num_edge);
    //printf("vetex: %d, edges %d\n", num_vertex, num_edge);
    cudaEvent_t start,end;
	cudaEventCreate(&start);
	cudaEventCreate(&end);
	float gpu_time=0.0f;
	cudaDeviceSynchronize();
    cudaEventRecord(start);

    //host vectors
    int* vertices = new int[num_vertex+1];
    int* edges = new int[num_edge];
    bool* frontier = new bool[num_vertex];
    bool* visited = new bool[num_vertex];
    //fill frontier and visited with false
    for(int i=0; i<num_vertex; i++){
        frontier[i]=false;
        visited[i]=false;
    }

    //parse input
    FILE *f = fopen(arg1, "r");
    int row, col;
    int prevrow = -1;
    float value;
    int vertex_count = 0;
    int edge_count = 0;
    while(fgets(str, 99, f)){
        sscanf(str, "%d %d %f", &row, &col, &value);
        if(prevrow!=row){
            vertices[vertex_count] = edge_count;
            vertex_count++;
        }
        edges[edge_count] = col;
        edge_count++;
        prevrow = row;
    }
    vertices[vertex_count] = edge_count;
    //printing vertices and edges arrays
    /*
    printf("\nvertices array: ");
    for(int i=0; i<vertex_count+1; i++){
        printf("%d ", vertices[i]);
    }

    printf("\nedges array: ");
    for(int i=0; i<edge_count; i++){
        printf("%d ", edges[i]);    
    }*/
    //copying vertices, edges, visited from host to device
    int* vertices_on_dev=0;
    int* edges_on_dev=0;
    bool* frontier_b_on_dev=0;
    bool* frontier_a_on_dev=0;
    bool* visited_on_dev=0;

    cudaMalloc((void**)&vertices_on_dev, (num_vertex+1)*sizeof(int));
    cudaMalloc((void**)&edges_on_dev, num_edge*sizeof(int));
    cudaMalloc((void**)&frontier_a_on_dev, num_vertex*sizeof(bool));
    cudaMalloc((void**)&frontier_b_on_dev, num_vertex*sizeof(bool));
    cudaMalloc((void**)&visited_on_dev, num_vertex*sizeof(bool));
    
    cudaMemcpy(vertices_on_dev, vertices,(num_vertex+1)*sizeof(int),cudaMemcpyHostToDevice);
    cudaMemcpy(edges_on_dev, edges, num_edge*sizeof(int),cudaMemcpyHostToDevice);
    cudaMemcpy(frontier_b_on_dev, frontier, num_vertex*sizeof(bool),cudaMemcpyHostToDevice);
    cudaMemcpy(visited_on_dev, frontier, num_vertex*sizeof(bool),cudaMemcpyHostToDevice);

    //calculating block dim and grid dim based on vertex count
    //large dataset factorization - 3 * 5 * 5 * 11 * 31 * 41
    dim3 blocks(num_vertex, 1, 1);
    dim3 threadsPerBlock(1,1,1); 
    //main bfs algorithm 
    int next_unvisited_idx = 0;
    bool finished = false;
    int number_of_ccs = 0;
    int print_count = 0;
    while(!finished){
        for(int i=std::min(next_unvisited_idx,num_vertex-1); i<num_vertex; i++){
            if(!visited[i]){
                frontier[i] = true;
                next_unvisited_idx = i+1;
                if(print_count>100){
                    double progress = (100.0*i)/((double)num_vertex);
                    printf("Progress: %.2f%%\n", progress);
                    print_count=0;
                }
                print_count++;
                break;
            }
            if(i==num_vertex-1){
                finished=true;
            }
        }
        if(finished) break;
        number_of_ccs++;

        //copy new frontier array to device
        cudaMemcpy(frontier_a_on_dev, frontier, num_vertex*sizeof(bool),cudaMemcpyHostToDevice);

        int count = 0;
        bool is_frontier = true;
        while(is_frontier){
            if(count%2==0){
                //call kernel
                bfs<<<blocks,threadsPerBlock>>>(vertices_on_dev, edges_on_dev, frontier_a_on_dev, frontier_b_on_dev, visited_on_dev);
                cudaMemcpy(frontier, frontier_b_on_dev, num_vertex*sizeof(bool),cudaMemcpyDeviceToHost);
            }
            else{
                //call kernel
                bfs<<<blocks,threadsPerBlock>>>(vertices_on_dev, edges_on_dev, frontier_b_on_dev, frontier_a_on_dev, visited_on_dev);
                cudaMemcpy(frontier, frontier_a_on_dev, num_vertex*sizeof(bool),cudaMemcpyDeviceToHost);
            }

            for(int i=0; i<num_vertex; i++){
                if(frontier[i])
                    break;
                if(i==num_vertex-1)
                    is_frontier = false;
            }

            count++;
        }

        cudaMemcpy(visited,visited_on_dev, num_vertex*sizeof(bool),cudaMemcpyDeviceToHost);
    }
    //printf("\nNumber of CCs: %d", number_of_ccs);
	cudaEventRecord(end);
	cudaEventSynchronize(end);
	cudaEventElapsedTime(&gpu_time,start,end);
    //printf("\nGPU runtime: %.4f ms\n",gpu_time);
    printf("%.4f, ", gpu_time);
	cudaEventDestroy(start);
    cudaEventDestroy(end);
}

//Failed optimizations GPU solver
void Test_GPU_Solver_BFS_reduce_memcpy(char* arg1, char*arg2)
{ 
    FILE *fdata = fopen(arg2, "r");
    int num_vertex, num_edge;
    char str[100];

    fgets(str,99, fdata);
    sscanf(str, "%d %d", &num_vertex, &num_edge);
    printf("vetex: %d, edges %d", num_vertex, num_edge);
    cudaEvent_t start,end;
	cudaEventCreate(&start);
	cudaEventCreate(&end);
	float gpu_time=0.0f;
	cudaDeviceSynchronize();
    cudaEventRecord(start);

    //host vectors
    int* vertices = new int[num_vertex+1];
    int* edges = new int[num_edge];
    bool* frontier = new bool[num_vertex];
    bool* visited = new bool[num_vertex];
    //fill frontier and visited with false
    for(int i=0; i<num_vertex; i++){
        frontier[i]=false;
        visited[i]=false;
    }
    //parse input
    FILE *f = fopen(arg1, "r");
    int row, col;
    int prevrow = -1;
    float value;
    int vertex_count = 0;
    int edge_count = 0;
    while(fgets(str, 99, f)){
        sscanf(str, "%d %d %f", &row, &col, &value);
        if(prevrow!=row){
            vertices[vertex_count] = edge_count;
            vertex_count++;
        }
        edges[edge_count] = col;
        edge_count++;
        prevrow = row;
    }
    vertices[vertex_count] = edge_count;
    //printing vertices and edges arrays
    /*
    printf("\nvertices array: ");
    for(int i=0; i<vertex_count+1; i++){
        printf("%d ", vertices[i]);
    }

    printf("\nedges array: ");
    for(int i=0; i<edge_count; i++){
        printf("%d ", edges[i]);    
    }*/
    dim3 blocks(num_vertex, 1, 1);
    dim3 threadsPerBlock(1,1,1); 

    //false array
    bool false_array[1];
    false_array[0] = false;

    int zero_array[1];
    zero_array[0] = 0;

    //copying vertices, edges, visited from host to device
    int* vertices_on_dev=0;
    int* edges_on_dev=0;
    bool* frontier_b_on_dev=0;
    bool* frontier_a_on_dev=0;
    bool* visited_on_dev=0;

    bool* checkfrontier=0;
    int* visitnext=0;

    cudaMalloc((void**)&vertices_on_dev, (num_vertex+1)*sizeof(int));
    cudaMalloc((void**)&edges_on_dev, num_edge*sizeof(int));
    cudaMalloc((void**)&frontier_a_on_dev, num_vertex*sizeof(bool));
    cudaMalloc((void**)&frontier_b_on_dev, num_vertex*sizeof(bool));
    cudaMalloc((void**)&visited_on_dev, num_vertex*sizeof(bool));

    cudaMalloc((void**)&checkfrontier, sizeof(bool));
    cudaMalloc((void**)&visitnext, sizeof(bool));
    
    cudaMemcpy(vertices_on_dev, vertices,(num_vertex+1)*sizeof(int),cudaMemcpyHostToDevice);
    cudaMemcpy(edges_on_dev, edges, num_edge*sizeof(int),cudaMemcpyHostToDevice);
    cudaMemcpy(frontier_b_on_dev, frontier, num_vertex*sizeof(bool),cudaMemcpyHostToDevice);
    cudaMemcpy(visited_on_dev, frontier, num_vertex*sizeof(bool),cudaMemcpyHostToDevice);

    cudaMemcpy(checkfrontier, false_array, sizeof(bool),cudaMemcpyHostToDevice);
    cudaMemcpy(visitnext, zero_array, sizeof(int),cudaMemcpyHostToDevice);
   
    //calculating block dim and grid dim based on vertex count
    //main bfs algorithm 
    int next_unvisited_idx = 0;
    bool finished = false;
    int number_of_ccs = 0;
    int print_count = 0;

    while(!finished){
        for(int i=std::min(next_unvisited_idx,num_vertex-1); i<num_vertex; i++){
            if(!visited[i]){
                frontier[i] = true;
                next_unvisited_idx = i+1;
                if(print_count>100){
                    double progress = (100.0*i)/((double)num_vertex);
                    printf("Progress: %.2f%%\n", progress);
                    print_count=0;
                }
                print_count++;
                break;
            }
            if(i==num_vertex-1){
                finished=true;
            }
        }
        if(finished) break;
        /*
        cudaMemcpy(visited,visited_on_dev, num_vertex*sizeof(bool),cudaMemcpyDeviceToHost);
        printf("\n");
        for(int i=0; i<2000; i++){
                printf("%d ", visited[i]);
        }
        printf("\n");
        next_to_visit<<<blocks,threadsPerBlock>>>(visited_on_dev,visitnext);
        cudaDeviceSynchronize();
        if(print_count>100){
            next_unvisited_idx+=.05;
            printf("approximate progress: %.2f%%\n", next_unvisited_idx);
            print_count = 0; 
        }
        print_count++;
        cudaMemcpy(current_visit_next, visitnext, sizeof(int),cudaMemcpyDeviceToHost);
        printf("current visit next: %d, previous visit next %d\n",current_visit_next[0], previous_visit_next);
        if(current_visit_next[0]==previous_visit_next){
            finished = true;
            break;
        }
        previous_visit_next = current_visit_next[0];

        new_frontier<<<blocks,threadsPerBlock>>>(visitnext, frontier_a_on_dev);
        cudaDeviceSynchronize();
        */
        number_of_ccs++;

        //copy new frontier array to device
        int count = 0;
        bool is_frontier[1];
        is_frontier[0] = true;

        while(is_frontier[0]){
            bool lastcall;
            lastcall= false;
            if(count%2==0){
                //call kernel
                bfs<<<blocks,threadsPerBlock>>>(vertices_on_dev, edges_on_dev, frontier_a_on_dev, frontier_b_on_dev, visited_on_dev);
            }
            else{
                //call kernel
                bfs<<<blocks,threadsPerBlock>>>(vertices_on_dev, edges_on_dev, frontier_b_on_dev, frontier_a_on_dev, visited_on_dev);
                lastcall=true;
            }
            if(lastcall){
                check_frontier<<<blocks,threadsPerBlock>>>(frontier_a_on_dev, checkfrontier);
            }
            else{
                check_frontier<<<blocks,threadsPerBlock>>>(frontier_b_on_dev, checkfrontier);
            } 
            cudaDeviceSynchronize();
            cudaMemcpy(is_frontier, checkfrontier, sizeof(bool),cudaMemcpyDeviceToHost);
            cudaMemcpy(checkfrontier, false_array, sizeof(bool),cudaMemcpyHostToDevice);
            count++;
        }
        cudaMemcpy(visited,visited_on_dev, num_vertex*sizeof(bool),cudaMemcpyDeviceToHost);
    }
    printf("\nNumber of CCs: %d", number_of_ccs);
	cudaEventRecord(end);
	cudaEventSynchronize(end);
	cudaEventElapsedTime(&gpu_time,start,end);
    printf("\nGPU runtime: %.4f ms\n",gpu_time);
	cudaEventDestroy(start);
    cudaEventDestroy(end);
}

//CPU solver
void Test_CPU_Solver_BFS(char* arg1, char*arg2){
    cudaEvent_t start,end;
	cudaEventCreate(&start);
	cudaEventCreate(&end);
	float gpu_time=0.0f;
	cudaDeviceSynchronize();
    cudaEventRecord(start);

    FILE *fdata = fopen(arg2, "r");
    int num_vertex, num_edge;
    char str[100];

    fgets(str,99, fdata);
    sscanf(str, "%d %d", &num_vertex, &num_edge);
    //printf("vetex: %d, edges %d\n", num_vertex, num_edge);

    Graph g(num_vertex);

    //parse input
    FILE *f = fopen(arg1, "r");
    int row, col;
    float value;
    while(fgets(str, 99, f)){
        sscanf(str, "%d %d %f", &row, &col, &value);
        g.addEdge(row, col);
    }

    int number_of_ccs = g.NumberOfconnectedComponents();
    //printf("\nNumber of CCs: %d", number_of_ccs);
    cudaEventRecord(end);
	cudaEventSynchronize(end);
	cudaEventElapsedTime(&gpu_time,start,end);
    //printf("\nCPU runtime: %.4f ms\n",gpu_time);
    printf("%.4f, ", gpu_time);
	cudaEventDestroy(start);
    cudaEventDestroy(end);
}

int main(int argc, char* argv[])
{
    printf("Testing GPU solver:\n");
    for(int i=0; i<20; i++){
        Test_GPU_Solver_BFS(argv[1], argv[2]);
    }
    printf("\nTesting CPU solver:\n");
    for(int i=0; i<20; i++){
        Test_CPU_Solver_BFS(argv[1], argv[2]);
    }
	return 0;
}
	.file	"tmpxft_002323ed_00000000-6_basic_kernel_bfs.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB10850:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE10850:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.align 2
	.globl	_ZN5Graph7DFSUtilEiPb
	.type	_ZN5Graph7DFSUtilEiPb, @function
_ZN5Graph7DFSUtilEiPb:
.LFB10826:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%rdx, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movslq	%esi, %rbx
	pushq	%rcx
	.cfi_def_cfa_offset 48
	movb	$1, (%rdx,%rbx)
	imulq	$24, %rbx, %rbx
	addq	8(%rdi), %rbx
	movq	(%rbx), %r12
.L3:
	cmpq	%rbx, %r12
	je	.L8
	movslq	16(%r12), %rax
	cmpb	$0, 0(%rbp,%rax)
	movq	%rax, %rsi
	jne	.L4
	movq	%rbp, %rdx
	movq	%r13, %rdi
	call	_ZN5Graph7DFSUtilEiPb
.L4:
	movq	(%r12), %r12
	jmp	.L3
.L8:
	popq	%rax
	.cfi_def_cfa_offset 40
	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
.LFE10826:
	.size	_ZN5Graph7DFSUtilEiPb, .-_ZN5Graph7DFSUtilEiPb
	.align 2
	.globl	_ZN5Graph27NumberOfconnectedComponentsEv
	.type	_ZN5Graph27NumberOfconnectedComponentsEv, @function
_ZN5Graph27NumberOfconnectedComponentsEv:
.LFB10825:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	movslq	(%rdi), %rdi
	call	_Znam@PLT
	movl	(%rbx), %r11d
	movq	%rax, %r9
	xorl	%eax, %eax
.L10:
	cmpl	%eax, %r11d
	jle	.L16
	movb	$0, (%r9,%rax)
	incq	%rax
	jmp	.L10
.L16:
	xorl	%r8d, %r8d
	xorl	%r10d, %r10d
.L12:
	cmpl	%r8d, %r11d
	jle	.L17
	cmpb	$0, (%r9,%r8)
	jne	.L13
	movq	%r9, %rdx
	movl	%r8d, %esi
	movq	%rbx, %rdi
	incl	%r10d
	call	_ZN5Graph7DFSUtilEiPb
.L13:
	incq	%r8
	jmp	.L12
.L17:
	movl	%r10d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE10825:
	.size	_ZN5Graph27NumberOfconnectedComponentsEv, .-_ZN5Graph27NumberOfconnectedComponentsEv
	.align 2
	.globl	_ZN5GraphC2Ei
	.type	_ZN5GraphC2Ei, @function
_ZN5GraphC2Ei:
.LFB10841:
	.cfi_startproc
	endbr64
	movabsq	$384307168202282325, %rax
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movslq	%esi, %rbx
	pushq	%r8
	.cfi_def_cfa_offset 32
	movl	%esi, (%rdi)
	orq	$-1, %rdi
	cmpq	%rbx, %rax
	jb	.L19
	imulq	$24, %rbx, %rdi
	addq	$8, %rdi
.L19:
	call	_Znam@PLT
	movq	%rbx, (%rax)
	addq	$8, %rax
	movq	%rax, %rdx
.L20:
	decq	%rbx
	js	.L25
	xorl	%ecx, %ecx
	movq	%rdx, 8(%rdx)
	movq	%rdx, (%rdx)
	addq	$24, %rdx
	movq	%rcx, -8(%rdx)
	jmp	.L20
.L25:
	movq	%rax, 8(%rbp)
	popq	%rax
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE10841:
	.size	_ZN5GraphC2Ei, .-_ZN5GraphC2Ei
	.globl	_ZN5GraphC1Ei
	.set	_ZN5GraphC1Ei,_ZN5GraphC2Ei
	.globl	_Z32__device_stub__Z3bfsPiS_PbS0_S0_PiS_PbS0_S0_
	.type	_Z32__device_stub__Z3bfsPiS_PbS0_S0_PiS_PbS0_S0_, @function
_Z32__device_stub__Z3bfsPiS_PbS0_S0_PiS_PbS0_S0_:
.LFB10872:
	.cfi_startproc
	endbr64
	subq	$168, %rsp
	.cfi_def_cfa_offset 176
	movq	%rdi, 40(%rsp)
	leaq	64(%rsp), %rdi
	movq	%rsi, 32(%rsp)
	leaq	76(%rsp), %rsi
	movq	%rdx, 24(%rsp)
	leaq	48(%rsp), %rdx
	movq	%rcx, 16(%rsp)
	leaq	56(%rsp), %rcx
	movq	%r8, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 152(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	movl	$1, 72(%rsp)
	movq	%rax, 112(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 144(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 64(%rsp)
	movq	%rax, 76(%rsp)
	movl	$1, 84(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L26
	pushq	56(%rsp)
	.cfi_def_cfa_offset 184
	leaq	_Z3bfsPiS_PbS0_S0_(%rip), %rdi
	pushq	56(%rsp)
	.cfi_def_cfa_offset 192
	movq	92(%rsp), %rcx
	movl	100(%rsp), %r8d
	movq	80(%rsp), %rsi
	movl	88(%rsp), %edx
	leaq	128(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 184
	popq	%rdx
	.cfi_def_cfa_offset 176
.L26:
	movq	152(%rsp), %rax
	subq	%fs:40, %rax
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	addq	$168, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE10872:
	.size	_Z32__device_stub__Z3bfsPiS_PbS0_S0_PiS_PbS0_S0_, .-_Z32__device_stub__Z3bfsPiS_PbS0_S0_PiS_PbS0_S0_
	.globl	_Z3bfsPiS_PbS0_S0_
	.type	_Z3bfsPiS_PbS0_S0_, @function
_Z3bfsPiS_PbS0_S0_:
.LFB10873:
	.cfi_startproc
	endbr64
	jmp	_Z32__device_stub__Z3bfsPiS_PbS0_S0_PiS_PbS0_S0_
	.cfi_endproc
.LFE10873:
	.size	_Z3bfsPiS_PbS0_S0_, .-_Z3bfsPiS_PbS0_S0_
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"r"
.LC1:
	.string	"%d %d"
.LC3:
	.string	"%d %d %f"
.LC5:
	.string	"Progress: %.2f%%\n"
.LC6:
	.string	"%.4f, "
	.text
	.globl	_Z19Test_GPU_Solver_BFSPcS_
	.type	_Z19Test_GPU_Solver_BFSPcS_, @function
_Z19Test_GPU_Solver_BFSPcS_:
.LFB10844:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdi, %r14
	movq	%rsi, %rdi
	movq	%r15, %rsi
	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
	movabsq	$2305843009213693950, %rbx
	subq	$264, %rsp
	.cfi_def_cfa_offset 320
	movq	%fs:40, %rax
	movq	%rax, 248(%rsp)
	xorl	%eax, %eax
	call	fopen@PLT
	movl	$99, %edx
	movl	$100, %esi
	movq	%rax, %rcx
	leaq	148(%rsp), %rax
	movq	%rax, %rdi
	movq	%rax, (%rsp)
	call	__fgets_chk@PLT
	movq	(%rsp), %rdi
	leaq	44(%rsp), %rcx
	xorl	%eax, %eax
	leaq	40(%rsp), %rdx
	leaq	.LC1(%rip), %rsi
	call	__isoc23_sscanf@PLT
	leaq	64(%rsp), %rdi
	call	cudaEventCreate@PLT
	leaq	72(%rsp), %rdi
	call	cudaEventCreate@PLT
	movl	$0x00000000, 48(%rsp)
	call	cudaDeviceSynchronize@PLT
	movq	64(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movl	40(%rsp), %eax
	leal	1(%rax), %edi
	movslq	%edi, %rdi
	cmpq	%rdi, %rbx
	jb	.L32
	salq	$2, %rdi
	call	_Znam@PLT
	movslq	44(%rsp), %rdi
	movq	%rax, %r13
	cmpq	%rdi, %rbx
	jnb	.L33
.L32:
	movq	248(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L61
	call	__cxa_throw_bad_array_new_length@PLT
.L33:
	salq	$2, %rdi
	call	_Znam@PLT
	movslq	40(%rsp), %rdi
	movq	%rax, 8(%rsp)
	call	_Znam@PLT
	movslq	40(%rsp), %rdi
	movq	%rax, %rbx
	call	_Znam@PLT
	movl	40(%rsp), %edx
	movq	%rax, %rbp
	xorl	%eax, %eax
.L35:
	cmpl	%eax, %edx
	jle	.L62
	movb	$0, (%rbx,%rax)
	movb	$0, 0(%rbp,%rax)
	incq	%rax
	jmp	.L35
.L62:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	call	fopen@PLT
	orl	$-1, %r15d
	movq	%rax, 16(%rsp)
.L37:
	movq	16(%rsp), %rcx
	movq	(%rsp), %rdi
	movl	$99, %edx
	movl	$100, %esi
	call	__fgets_chk@PLT
	movslq	%r14d, %rdx
	leaq	0(%r13,%rdx,4), %r10
	testq	%rax, %rax
	je	.L63
	movq	(%rsp), %rdi
	leaq	56(%rsp), %rcx
	leaq	52(%rsp), %rdx
	xorl	%eax, %eax
	leaq	60(%rsp), %r8
	leaq	.LC3(%rip), %rsi
	movq	%r10, 24(%rsp)
	call	__isoc23_sscanf@PLT
	movl	52(%rsp), %eax
	cmpl	%r15d, %eax
	je	.L38
	movq	24(%rsp), %r10
	incl	%r14d
	movl	%r12d, (%r10)
.L38:
	movl	56(%rsp), %edx
	movq	8(%rsp), %rcx
	movl	%eax, %r15d
	movl	%edx, (%rcx,%r12,4)
	incq	%r12
	jmp	.L37
.L63:
	xorl	%eax, %eax
	movl	%r12d, (%r10)
	leaq	80(%rsp), %rdi
	xorl	%r12d, %r12d
	movq	%rax, 80(%rsp)
	movq	%rax, 88(%rsp)
	movq	%rax, 96(%rsp)
	movq	%rax, 104(%rsp)
	movq	%rax, 112(%rsp)
	movl	40(%rsp), %eax
	leal	1(%rax), %esi
	movslq	%esi, %rsi
	salq	$2, %rsi
	call	cudaMalloc@PLT
	movslq	44(%rsp), %rsi
	leaq	88(%rsp), %rdi
	salq	$2, %rsi
	call	cudaMalloc@PLT
	movslq	40(%rsp), %rsi
	leaq	104(%rsp), %rdi
	call	cudaMalloc@PLT
	movslq	40(%rsp), %rsi
	leaq	96(%rsp), %rdi
	call	cudaMalloc@PLT
	movslq	40(%rsp), %rsi
	leaq	112(%rsp), %rdi
	call	cudaMalloc@PLT
	movl	40(%rsp), %eax
	movq	80(%rsp), %rdi
	movq	%r13, %rsi
	movl	$1, %ecx
	xorl	%r13d, %r13d
	leal	1(%rax), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	call	cudaMemcpy@PLT
	movslq	44(%rsp), %rdx
	movq	8(%rsp), %rsi
	movl	$1, %ecx
	movq	88(%rsp), %rdi
	salq	$2, %rdx
	call	cudaMemcpy@PLT
	movslq	40(%rsp), %rdx
	movq	96(%rsp), %rdi
	movq	%rbx, %rsi
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	movslq	40(%rsp), %rdx
	movq	112(%rsp), %rdi
	movq	%rbx, %rsi
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	movl	40(%rsp), %eax
	movl	$1, 144(%rsp)
	movl	%eax, 124(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 128(%rsp)
	movq	%rax, 136(%rsp)
.L40:
	movl	40(%rsp), %esi
	movl	%r13d, %eax
	leal	-1(%rsi), %ecx
	cmpl	%r13d, %ecx
	cmovle	%ecx, %eax
	xorl	%r14d, %r14d
	cltq
.L56:
	movl	%eax, %edi
	cmpl	%esi, %eax
	jge	.L43
	movb	0(%rbp,%rax), %dl
	testb	%dl, %dl
	jne	.L41
	movb	$1, (%rbx,%rax)
	leal	1(%rdi), %r13d
	cmpl	$100, %r12d
	jle	.L42
	cvtsi2sdl	%edi, %xmm0
	mulsd	.LC4(%rip), %xmm0
	movb	$1, %al
	xorl	%r12d, %r12d
	cvtsi2sdl	%esi, %xmm1
	movl	$2, %edi
	leaq	.LC5(%rip), %rsi
	divsd	%xmm1, %xmm0
	call	__printf_chk@PLT
.L42:
	incl	%r12d
	jmp	.L43
.L41:
	cmpl	%ecx, %edi
	cmovne	%r14d, %edx
	incq	%rax
	movl	%edx, %r14d
	jmp	.L56
.L43:
	testb	%r14b, %r14b
	jne	.L46
	movslq	40(%rsp), %rdx
	movq	104(%rsp), %rdi
	movq	%rbx, %rsi
	xorl	%r14d, %r14d
	movl	$1, %ecx
	call	cudaMemcpy@PLT
.L55:
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	testl	$1, %r14d
	movq	136(%rsp), %rdx
	movl	144(%rsp), %ecx
	movq	124(%rsp), %rdi
	movl	132(%rsp), %esi
	jne	.L47
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L48
	movq	112(%rsp), %r8
	movq	96(%rsp), %rcx
	movq	104(%rsp), %rdx
	movq	88(%rsp), %rsi
	movq	80(%rsp), %rdi
	call	_Z32__device_stub__Z3bfsPiS_PbS0_S0_PiS_PbS0_S0_
.L48:
	movslq	40(%rsp), %rdx
	movq	96(%rsp), %rsi
	movl	$2, %ecx
	jmp	.L60
.L47:
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L50
	movq	112(%rsp), %r8
	movq	104(%rsp), %rcx
	movq	96(%rsp), %rdx
	movq	88(%rsp), %rsi
	movq	80(%rsp), %rdi
	call	_Z32__device_stub__Z3bfsPiS_PbS0_S0_PiS_PbS0_S0_
.L50:
	movslq	40(%rsp), %rdx
	movq	104(%rsp), %rsi
	movl	$2, %ecx
.L60:
	movq	%rbx, %rdi
	call	cudaMemcpy@PLT
	movslq	40(%rsp), %rdx
	xorl	%eax, %eax
	movb	$1, %sil
	leal	-1(%rdx), %r8d
.L51:
	movl	%eax, %edi
	cmpl	%edx, %eax
	jge	.L52
	movb	(%rbx,%rax), %cl
	testb	%cl, %cl
	jne	.L52
	cmpl	%r8d, %edi
	cmovne	%esi, %ecx
	incq	%rax
	movl	%ecx, %esi
	jmp	.L51
.L52:
	incl	%r14d
	testb	%sil, %sil
	jne	.L55
	movq	112(%rsp), %rsi
	movl	$2, %ecx
	movq	%rbp, %rdi
	call	cudaMemcpy@PLT
	jmp	.L40
.L46:
	movq	72(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	72(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	72(%rsp), %rdx
	movq	64(%rsp), %rsi
	leaq	48(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	leaq	.LC6(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	48(%rsp), %xmm0
	call	__printf_chk@PLT
	movq	64(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movq	72(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movq	248(%rsp), %rax
	subq	%fs:40, %rax
	je	.L57
.L61:
	call	__stack_chk_fail@PLT
.L57:
	addq	$264, %rsp
	.cfi_def_cfa_offset 56
	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
.LFE10844:
	.size	_Z19Test_GPU_Solver_BFSPcS_, .-_Z19Test_GPU_Solver_BFSPcS_
	.globl	_Z43__device_stub__Z13no_memcpy_bfsPiS_PbS0_S0_PiS_PbS0_S0_
	.type	_Z43__device_stub__Z13no_memcpy_bfsPiS_PbS0_S0_PiS_PbS0_S0_, @function
_Z43__device_stub__Z13no_memcpy_bfsPiS_PbS0_S0_PiS_PbS0_S0_:
.LFB10874:
	.cfi_startproc
	endbr64
	subq	$168, %rsp
	.cfi_def_cfa_offset 176
	movq	%rdi, 40(%rsp)
	leaq	64(%rsp), %rdi
	movq	%rsi, 32(%rsp)
	leaq	76(%rsp), %rsi
	movq	%rdx, 24(%rsp)
	leaq	48(%rsp), %rdx
	movq	%rcx, 16(%rsp)
	leaq	56(%rsp), %rcx
	movq	%r8, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 152(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	movl	$1, 72(%rsp)
	movq	%rax, 112(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 144(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 64(%rsp)
	movq	%rax, 76(%rsp)
	movl	$1, 84(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L64
	pushq	56(%rsp)
	.cfi_def_cfa_offset 184
	leaq	_Z13no_memcpy_bfsPiS_PbS0_S0_(%rip), %rdi
	pushq	56(%rsp)
	.cfi_def_cfa_offset 192
	movq	92(%rsp), %rcx
	movl	100(%rsp), %r8d
	movq	80(%rsp), %rsi
	movl	88(%rsp), %edx
	leaq	128(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 184
	popq	%rdx
	.cfi_def_cfa_offset 176
.L64:
	movq	152(%rsp), %rax
	subq	%fs:40, %rax
	je	.L66
	call	__stack_chk_fail@PLT
.L66:
	addq	$168, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE10874:
	.size	_Z43__device_stub__Z13no_memcpy_bfsPiS_PbS0_S0_PiS_PbS0_S0_, .-_Z43__device_stub__Z13no_memcpy_bfsPiS_PbS0_S0_PiS_PbS0_S0_
	.globl	_Z13no_memcpy_bfsPiS_PbS0_S0_
	.type	_Z13no_memcpy_bfsPiS_PbS0_S0_, @function
_Z13no_memcpy_bfsPiS_PbS0_S0_:
.LFB10875:
	.cfi_startproc
	endbr64
	jmp	_Z43__device_stub__Z13no_memcpy_bfsPiS_PbS0_S0_PiS_PbS0_S0_
	.cfi_endproc
.LFE10875:
	.size	_Z13no_memcpy_bfsPiS_PbS0_S0_, .-_Z13no_memcpy_bfsPiS_PbS0_S0_
	.globl	_Z35__device_stub__Z13next_to_visitPbPiPbPi
	.type	_Z35__device_stub__Z13next_to_visitPbPiPbPi, @function
_Z35__device_stub__Z13next_to_visitPbPiPbPi:
.LFB10876:
	.cfi_startproc
	endbr64
	subq	$120, %rsp
	.cfi_def_cfa_offset 128
	movq	%rdi, 8(%rsp)
	leaq	32(%rsp), %rcx
	leaq	24(%rsp), %rdx
	movq	%rsi, (%rsp)
	leaq	40(%rsp), %rdi
	leaq	52(%rsp), %rsi
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rax
	movl	$1, 48(%rsp)
	movq	%rax, 88(%rsp)
	movq	%rsp, %rax
	movq	%rax, 96(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 40(%rsp)
	movq	%rax, 52(%rsp)
	movl	$1, 60(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L69
	pushq	32(%rsp)
	.cfi_def_cfa_offset 136
	leaq	_Z13next_to_visitPbPi(%rip), %rdi
	pushq	32(%rsp)
	.cfi_def_cfa_offset 144
	movq	68(%rsp), %rcx
	movl	76(%rsp), %r8d
	movq	56(%rsp), %rsi
	movl	64(%rsp), %edx
	leaq	104(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 136
	popq	%rdx
	.cfi_def_cfa_offset 128
.L69:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	je	.L71
	call	__stack_chk_fail@PLT
.L71:
	addq	$120, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE10876:
	.size	_Z35__device_stub__Z13next_to_visitPbPiPbPi, .-_Z35__device_stub__Z13next_to_visitPbPiPbPi
	.globl	_Z13next_to_visitPbPi
	.type	_Z13next_to_visitPbPi, @function
_Z13next_to_visitPbPi:
.LFB10877:
	.cfi_startproc
	endbr64
	jmp	_Z35__device_stub__Z13next_to_visitPbPiPbPi
	.cfi_endproc
.LFE10877:
	.size	_Z13next_to_visitPbPi, .-_Z13next_to_visitPbPi
	.globl	_Z34__device_stub__Z12new_frontierPiPbPiPb
	.type	_Z34__device_stub__Z12new_frontierPiPbPiPb, @function
_Z34__device_stub__Z12new_frontierPiPbPiPb:
.LFB10878:
	.cfi_startproc
	endbr64
	subq	$120, %rsp
	.cfi_def_cfa_offset 128
	movq	%rdi, 8(%rsp)
	leaq	32(%rsp), %rcx
	leaq	24(%rsp), %rdx
	movq	%rsi, (%rsp)
	leaq	40(%rsp), %rdi
	leaq	52(%rsp), %rsi
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rax
	movl	$1, 48(%rsp)
	movq	%rax, 88(%rsp)
	movq	%rsp, %rax
	movq	%rax, 96(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 40(%rsp)
	movq	%rax, 52(%rsp)
	movl	$1, 60(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L74
	pushq	32(%rsp)
	.cfi_def_cfa_offset 136
	leaq	_Z12new_frontierPiPb(%rip), %rdi
	pushq	32(%rsp)
	.cfi_def_cfa_offset 144
	movq	68(%rsp), %rcx
	movl	76(%rsp), %r8d
	movq	56(%rsp), %rsi
	movl	64(%rsp), %edx
	leaq	104(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 136
	popq	%rdx
	.cfi_def_cfa_offset 128
.L74:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	je	.L76
	call	__stack_chk_fail@PLT
.L76:
	addq	$120, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE10878:
	.size	_Z34__device_stub__Z12new_frontierPiPbPiPb, .-_Z34__device_stub__Z12new_frontierPiPbPiPb
	.globl	_Z12new_frontierPiPb
	.type	_Z12new_frontierPiPb, @function
_Z12new_frontierPiPb:
.LFB10879:
	.cfi_startproc
	endbr64
	jmp	_Z34__device_stub__Z12new_frontierPiPbPiPb
	.cfi_endproc
.LFE10879:
	.size	_Z12new_frontierPiPb, .-_Z12new_frontierPiPb
	.globl	_Z36__device_stub__Z14check_frontierPbS_PbS_
	.type	_Z36__device_stub__Z14check_frontierPbS_PbS_, @function
_Z36__device_stub__Z14check_frontierPbS_PbS_:
.LFB10880:
	.cfi_startproc
	endbr64
	subq	$120, %rsp
	.cfi_def_cfa_offset 128
	movq	%rdi, 8(%rsp)
	leaq	32(%rsp), %rcx
	leaq	24(%rsp), %rdx
	movq	%rsi, (%rsp)
	leaq	40(%rsp), %rdi
	leaq	52(%rsp), %rsi
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rax
	movl	$1, 48(%rsp)
	movq	%rax, 88(%rsp)
	movq	%rsp, %rax
	movq	%rax, 96(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 40(%rsp)
	movq	%rax, 52(%rsp)
	movl	$1, 60(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L79
	pushq	32(%rsp)
	.cfi_def_cfa_offset 136
	leaq	_Z14check_frontierPbS_(%rip), %rdi
	pushq	32(%rsp)
	.cfi_def_cfa_offset 144
	movq	68(%rsp), %rcx
	movl	76(%rsp), %r8d
	movq	56(%rsp), %rsi
	movl	64(%rsp), %edx
	leaq	104(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 136
	popq	%rdx
	.cfi_def_cfa_offset 128
.L79:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	je	.L81
	call	__stack_chk_fail@PLT
.L81:
	addq	$120, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE10880:
	.size	_Z36__device_stub__Z14check_frontierPbS_PbS_, .-_Z36__device_stub__Z14check_frontierPbS_PbS_
	.globl	_Z14check_frontierPbS_
	.type	_Z14check_frontierPbS_, @function
_Z14check_frontierPbS_:
.LFB10881:
	.cfi_startproc
	endbr64
	jmp	_Z36__device_stub__Z14check_frontierPbS_PbS_
	.cfi_endproc
.LFE10881:
	.size	_Z14check_frontierPbS_, .-_Z14check_frontierPbS_
	.section	.rodata.str1.1
.LC7:
	.string	"vetex: %d, edges %d"
.LC8:
	.string	"\nNumber of CCs: %d"
.LC9:
	.string	"\nGPU runtime: %.4f ms\n"
	.text
	.globl	_Z33Test_GPU_Solver_BFS_reduce_memcpyPcS_
	.type	_Z33Test_GPU_Solver_BFS_reduce_memcpyPcS_, @function
_Z33Test_GPU_Solver_BFS_reduce_memcpyPcS_:
.LFB10845:
	.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
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rdi, %r12
	movq	%rsi, %rdi
	movq	%r13, %rsi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movabsq	$2305843009213693950, %rbx
	subq	$280, %rsp
	.cfi_def_cfa_offset 336
	movq	%fs:40, %rax
	movq	%rax, 264(%rsp)
	xorl	%eax, %eax
	call	fopen@PLT
	movl	$99, %edx
	movl	$100, %esi
	movq	%rax, %rcx
	leaq	164(%rsp), %rax
	movq	%rax, %rdi
	movq	%rax, (%rsp)
	call	__fgets_chk@PLT
	movq	(%rsp), %rdi
	leaq	36(%rsp), %rcx
	xorl	%eax, %eax
	leaq	32(%rsp), %rdx
	leaq	.LC1(%rip), %rsi
	call	__isoc23_sscanf@PLT
	movl	36(%rsp), %ecx
	movl	32(%rsp), %edx
	xorl	%eax, %eax
	leaq	.LC7(%rip), %rsi
	movl	$2, %edi
	call	__printf_chk@PLT
	leaq	56(%rsp), %rdi
	call	cudaEventCreate@PLT
	leaq	64(%rsp), %rdi
	call	cudaEventCreate@PLT
	movl	$0x00000000, 40(%rsp)
	call	cudaDeviceSynchronize@PLT
	movq	56(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movl	32(%rsp), %eax
	leal	1(%rax), %edi
	movslq	%edi, %rdi
	cmpq	%rdi, %rbx
	jb	.L85
	salq	$2, %rdi
	call	_Znam@PLT
	movslq	36(%rsp), %rdi
	movq	%rax, %rbp
	cmpq	%rdi, %rbx
	jnb	.L86
.L85:
	movq	264(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L110
	call	__cxa_throw_bad_array_new_length@PLT
.L86:
	salq	$2, %rdi
	call	_Znam@PLT
	movslq	32(%rsp), %rdi
	movq	%rax, 8(%rsp)
	call	_Znam@PLT
	movslq	32(%rsp), %rdi
	movq	%rax, %r14
	call	_Znam@PLT
	movl	32(%rsp), %edx
	movq	%rax, %r15
	xorl	%eax, %eax
.L88:
	cmpl	%eax, %edx
	jle	.L113
	movb	$0, (%r14,%rax)
	movb	$0, (%r15,%rax)
	incq	%rax
	jmp	.L88
.L113:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	call	fopen@PLT
	orl	$-1, %r13d
	movq	%rax, 16(%rsp)
.L90:
	movq	16(%rsp), %rcx
	movq	(%rsp), %rdi
	movl	$99, %edx
	movl	$100, %esi
	call	__fgets_chk@PLT
	movslq	%r12d, %rdx
	leaq	0(%rbp,%rdx,4), %r10
	testq	%rax, %rax
	je	.L114
	movq	(%rsp), %rdi
	leaq	48(%rsp), %rcx
	leaq	44(%rsp), %rdx
	xorl	%eax, %eax
	leaq	52(%rsp), %r8
	leaq	.LC3(%rip), %rsi
	movq	%r10, 24(%rsp)
	call	__isoc23_sscanf@PLT
	movl	44(%rsp), %eax
	cmpl	%r13d, %eax
	je	.L91
	movq	24(%rsp), %r10
	incl	%r12d
	movl	%ebx, (%r10)
.L91:
	movl	48(%rsp), %edx
	movq	8(%rsp), %rcx
	movl	%eax, %r13d
	movl	%edx, (%rcx,%rbx,4)
	incq	%rbx
	jmp	.L90
.L114:
	movl	32(%rsp), %esi
	movl	%ebx, (%r10)
	xorl	%edx, %edx
	leaq	72(%rsp), %rdi
	movq	%rdx, 72(%rsp)
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	movabsq	$4294967297, %rax
	movl	%esi, 132(%rsp)
	incl	%esi
	movslq	%esi, %rsi
	movq	%rax, 136(%rsp)
	movq	%rax, 144(%rsp)
	salq	$2, %rsi
	xorl	%eax, %eax
	movq	%rdx, 80(%rsp)
	movq	%rdx, 88(%rsp)
	movq	%rdx, 96(%rsp)
	movq	%rdx, 104(%rsp)
	movq	%rdx, 112(%rsp)
	movq	%rdx, 120(%rsp)
	movl	$1, 152(%rsp)
	movb	$0, 158(%rsp)
	movl	%eax, 160(%rsp)
	call	cudaMalloc@PLT
	movslq	36(%rsp), %rsi
	leaq	80(%rsp), %rdi
	salq	$2, %rsi
	call	cudaMalloc@PLT
	movslq	32(%rsp), %rsi
	leaq	96(%rsp), %rdi
	call	cudaMalloc@PLT
	movslq	32(%rsp), %rsi
	leaq	88(%rsp), %rdi
	call	cudaMalloc@PLT
	movslq	32(%rsp), %rsi
	leaq	104(%rsp), %rdi
	call	cudaMalloc@PLT
	leaq	112(%rsp), %rdi
	movl	$1, %esi
	call	cudaMalloc@PLT
	leaq	120(%rsp), %rdi
	movl	$1, %esi
	call	cudaMalloc@PLT
	movl	32(%rsp), %eax
	movq	72(%rsp), %rdi
	movq	%rbp, %rsi
	movl	$1, %ecx
	xorl	%ebp, %ebp
	leal	1(%rax), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	call	cudaMemcpy@PLT
	movslq	36(%rsp), %rdx
	movq	8(%rsp), %rsi
	movl	$1, %ecx
	movq	80(%rsp), %rdi
	salq	$2, %rdx
	call	cudaMemcpy@PLT
	movslq	32(%rsp), %rdx
	movq	88(%rsp), %rdi
	movq	%r14, %rsi
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	movslq	32(%rsp), %rdx
	movq	104(%rsp), %rdi
	movq	%r14, %rsi
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	movq	112(%rsp), %rdi
	movl	$1, %ecx
	leaq	158(%rsp), %rax
	movl	$1, %edx
	movq	%rax, %rsi
	movq	%rax, (%rsp)
	call	cudaMemcpy@PLT
	movq	120(%rsp), %rdi
	movl	$1, %ecx
	leaq	160(%rsp), %rsi
	movl	$4, %edx
	call	cudaMemcpy@PLT
.L93:
	movl	32(%rsp), %esi
	movl	%ebp, %eax
	leal	-1(%rsi), %ecx
	cmpl	%ebp, %ecx
	cmovle	%ecx, %eax
	xorl	%r13d, %r13d
	cltq
.L108:
	movl	%eax, %edi
	cmpl	%esi, %eax
	jge	.L96
	movb	(%r15,%rax), %dl
	testb	%dl, %dl
	jne	.L94
	movb	$1, (%r14,%rax)
	leal	1(%rdi), %ebp
	cmpl	$100, %ebx
	jle	.L95
	cvtsi2sdl	%edi, %xmm0
	mulsd	.LC4(%rip), %xmm0
	movb	$1, %al
	xorl	%ebx, %ebx
	cvtsi2sdl	%esi, %xmm1
	movl	$2, %edi
	leaq	.LC5(%rip), %rsi
	divsd	%xmm1, %xmm0
	call	__printf_chk@PLT
.L95:
	incl	%ebx
	jmp	.L96
.L94:
	cmpl	%ecx, %edi
	cmovne	%r13d, %edx
	incq	%rax
	movl	%edx, %r13d
	jmp	.L108
.L96:
	testb	%r13b, %r13b
	jne	.L99
	leaq	159(%rsp), %rax
	movb	$1, 159(%rsp)
	incl	%r12d
	xorl	%r13d, %r13d
	movq	%rax, 8(%rsp)
.L100:
	cmpb	$0, 159(%rsp)
	je	.L115
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	testl	$1, %r13d
	movq	144(%rsp), %rdx
	movl	152(%rsp), %ecx
	movq	132(%rsp), %rdi
	movl	140(%rsp), %esi
	jne	.L101
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L102
	movq	104(%rsp), %r8
	movq	88(%rsp), %rcx
	movq	96(%rsp), %rdx
	movq	80(%rsp), %rsi
	movq	72(%rsp), %rdi
	call	_Z32__device_stub__Z3bfsPiS_PbS0_S0_PiS_PbS0_S0_
	jmp	.L102
.L101:
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L103
	movq	104(%rsp), %r8
	movq	96(%rsp), %rcx
	movq	88(%rsp), %rdx
	movq	80(%rsp), %rsi
	movq	72(%rsp), %rdi
	call	_Z32__device_stub__Z3bfsPiS_PbS0_S0_PiS_PbS0_S0_
.L103:
	movl	152(%rsp), %ecx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	144(%rsp), %rdx
	movq	132(%rsp), %rdi
	movl	140(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L105
	movq	112(%rsp), %rsi
	movq	96(%rsp), %rdi
	jmp	.L112
.L102:
	movl	152(%rsp), %ecx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	144(%rsp), %rdx
	movq	132(%rsp), %rdi
	movl	140(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L105
	movq	112(%rsp), %rsi
	movq	88(%rsp), %rdi
.L112:
	call	_Z36__device_stub__Z14check_frontierPbS_PbS_
.L105:
	call	cudaDeviceSynchronize@PLT
	movq	112(%rsp), %rsi
	movq	8(%rsp), %rdi
	incl	%r13d
	movl	$2, %ecx
	movl	$1, %edx
	call	cudaMemcpy@PLT
	movq	(%rsp), %rsi
	movq	112(%rsp), %rdi
	movl	$1, %ecx
	movl	$1, %edx
	call	cudaMemcpy@PLT
	jmp	.L100
.L115:
	movslq	32(%rsp), %rdx
	movq	104(%rsp), %rsi
	movl	$2, %ecx
	movq	%r15, %rdi
	call	cudaMemcpy@PLT
	jmp	.L93
.L99:
	movl	%r12d, %edx
	leaq	.LC8(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	64(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	64(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	64(%rsp), %rdx
	movq	56(%rsp), %rsi
	leaq	40(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	leaq	.LC9(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	40(%rsp), %xmm0
	call	__printf_chk@PLT
	movq	56(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movq	64(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movq	264(%rsp), %rax
	subq	%fs:40, %rax
	je	.L109
.L110:
	call	__stack_chk_fail@PLT
.L109:
	addq	$280, %rsp
	.cfi_def_cfa_offset 56
	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
.LFE10845:
	.size	_Z33Test_GPU_Solver_BFS_reduce_memcpyPcS_, .-_Z33Test_GPU_Solver_BFS_reduce_memcpyPcS_
	.section	.rodata.str1.1
.LC10:
	.string	"_Z14check_frontierPbS_"
.LC11:
	.string	"_Z12new_frontierPiPb"
.LC12:
	.string	"_Z13next_to_visitPbPi"
.LC13:
	.string	"_Z13no_memcpy_bfsPiS_PbS0_S0_"
.LC14:
	.string	"_Z3bfsPiS_PbS0_S0_"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB10883:
	.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	.LC10(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z14check_frontierPbS_(%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	.LC11(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z12new_frontierPiPb(%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	.LC12(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z13next_to_visitPbPi(%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	.LC13(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z13no_memcpy_bfsPiS_PbS0_S0_(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC14(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z3bfsPiS_PbS0_S0_(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE10883:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.text._ZNSt7__cxx114listIiSaIiEE9push_backERKi,"axG",@progbits,_ZNSt7__cxx114listIiSaIiEE9push_backERKi,comdat
	.align 2
	.weak	_ZNSt7__cxx114listIiSaIiEE9push_backERKi
	.type	_ZNSt7__cxx114listIiSaIiEE9push_backERKi, @function
_ZNSt7__cxx114listIiSaIiEE9push_backERKi:
.LFB11579:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %rbx
	movl	$24, %edi
	pushq	%rax
	.cfi_def_cfa_offset 32
	call	_Znwm@PLT
	movq	%rbx, %rsi
	movq	%rax, %rdi
	movl	0(%rbp), %eax
	movl	%eax, 16(%rdi)
	call	_ZNSt8__detail15_List_node_base7_M_hookEPS0_@PLT
	incq	16(%rbx)
	popq	%rdx
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE11579:
	.size	_ZNSt7__cxx114listIiSaIiEE9push_backERKi, .-_ZNSt7__cxx114listIiSaIiEE9push_backERKi
	.text
	.align 2
	.globl	_ZN5Graph7addEdgeEii
	.type	_ZN5Graph7addEdgeEii, @function
_ZN5Graph7addEdgeEii:
.LFB10843:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	movslq	%esi, %rdi
	imulq	$24, %rdi, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	addq	8(%rbx), %rdi
	movl	%esi, 12(%rsp)
	leaq	8(%rsp), %rsi
	movl	%edx, 8(%rsp)
	call	_ZNSt7__cxx114listIiSaIiEE9push_backERKi
	movslq	8(%rsp), %rdi
	leaq	12(%rsp), %rsi
	imulq	$24, %rdi, %rdi
	addq	8(%rbx), %rdi
	call	_ZNSt7__cxx114listIiSaIiEE9push_backERKi
	addq	$16, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE10843:
	.size	_ZN5Graph7addEdgeEii, .-_ZN5Graph7addEdgeEii
	.globl	_Z19Test_CPU_Solver_BFSPcS_
	.type	_Z19Test_CPU_Solver_BFSPcS_, @function
_Z19Test_CPU_Solver_BFSPcS_:
.LFB10846:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rsi, %rbx
	subq	$184, %rsp
	.cfi_def_cfa_offset 224
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rdi
	leaq	48(%rsp), %rbp
	call	cudaEventCreate@PLT
	leaq	40(%rsp), %rdi
	call	cudaEventCreate@PLT
	movl	$0x00000000, 8(%rsp)
	call	cudaDeviceSynchronize@PLT
	movq	32(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	%r13, %rsi
	movq	%rbx, %rdi
	leaq	68(%rsp), %rbx
	call	fopen@PLT
	movl	$99, %edx
	movl	$100, %esi
	movq	%rbx, %rdi
	movq	%rax, %rcx
	call	__fgets_chk@PLT
	leaq	16(%rsp), %rcx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	.LC1(%rip), %rsi
	call	__isoc23_sscanf@PLT
	movl	12(%rsp), %esi
	movq	%rbp, %rdi
	call	_ZN5GraphC1Ei
	movq	%r13, %rsi
	movq	%r12, %rdi
	leaq	.LC3(%rip), %r13
	call	fopen@PLT
	movq	%rax, %r12
.L123:
	movq	%r12, %rcx
	movl	$99, %edx
	movl	$100, %esi
	movq	%rbx, %rdi
	call	__fgets_chk@PLT
	testq	%rax, %rax
	je	.L127
	leaq	20(%rsp), %rdx
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	leaq	24(%rsp), %rcx
	leaq	28(%rsp), %r8
	call	__isoc23_sscanf@PLT
	movl	24(%rsp), %edx
	movl	20(%rsp), %esi
	movq	%rbp, %rdi
	call	_ZN5Graph7addEdgeEii
	jmp	.L123
.L127:
	movq	%rbp, %rdi
	call	_ZN5Graph27NumberOfconnectedComponentsEv
	movq	40(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	40(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	40(%rsp), %rdx
	movq	32(%rsp), %rsi
	leaq	8(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	leaq	.LC6(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	8(%rsp), %xmm0
	call	__printf_chk@PLT
	movq	32(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movq	40(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L125
	call	__stack_chk_fail@PLT
.L125:
	addq	$184, %rsp
	.cfi_def_cfa_offset 40
	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
.LFE10846:
	.size	_Z19Test_CPU_Solver_BFSPcS_, .-_Z19Test_CPU_Solver_BFSPcS_
	.section	.rodata.str1.1
.LC15:
	.string	"Testing GPU solver:\n"
.LC16:
	.string	"\nTesting CPU solver:\n"
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB10847:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$2, %edi
	xorl	%eax, %eax
	movl	$20, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rsi, %rbx
	leaq	.LC15(%rip), %rsi
	pushq	%rcx
	.cfi_def_cfa_offset 32
	call	__printf_chk@PLT
.L129:
	movq	16(%rbx), %rsi
	movq	8(%rbx), %rdi
	call	_Z19Test_GPU_Solver_BFSPcS_
	decl	%ebp
	jne	.L129
	leaq	.LC16(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	movl	$20, %ebp
	call	__printf_chk@PLT
.L130:
	movq	16(%rbx), %rsi
	movq	8(%rbx), %rdi
	call	_Z19Test_CPU_Solver_BFSPcS_
	decl	%ebp
	jne	.L130
	popq	%rdx
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE10847:
	.size	main, .-main
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC4:
	.long	0
	.long	1079574528
	.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 <iostream>
#include <fstream>
#include <bits/stdc++.h> 
using namespace std; 

//Graph class for CPU implementation
// CPU connected components implementation with DFs
//from https://www.geeksforgeeks.org/program-to-count-number-of-connected-components-in-an-undirected-graph/
class Graph { 
    // No. of vertices 
    int V; 
  
    // Pointer to an array containing adjacency lists 
    list<int>* adj; 
  
    // A function used by DFS 
    void DFSUtil(int v, bool visited[]); 
  
public: 
    // Constructor 
    Graph(int V); 
  
    void addEdge(int v, int w); 
    int NumberOfconnectedComponents(); 
}; 
  
int Graph::NumberOfconnectedComponents() 
{ 
  
    // Mark all the vertices as not visited 
    bool* visited = new bool[V]; 
  
    // To store the number of connected components 
    int count = 0; 
    for (int v = 0; v < V; v++) 
        visited[v] = false; 
  
    for (int v = 0; v < V; v++) { 
        if (visited[v] == false) { 
            DFSUtil(v, visited); 
            count += 1; 
        } 
    } 
  
    return count; 
} 
  
void Graph::DFSUtil(int v, bool visited[]) 
{ 
  
    // Mark the current node as visited 
    visited[v] = true; 
  
    // Recur for all the vertices 
    // adjacent to this vertex 
    list<int>::iterator i; 
  
    for (i = adj[v].begin(); i != adj[v].end(); ++i) 
        if (!visited[*i]) 
            DFSUtil(*i, visited); 
} 
  
Graph::Graph(int V) 
{ 
    this->V = V; 
    adj = new list<int>[V]; 
} 
  
// Add an undirected edge 
void Graph::addEdge(int v, int w) 
{ 
    adj[v].push_back(w); 
    adj[w].push_back(v); 
} 

//kernel functions
__global__ void bfs(int* vertices, int* edges, bool* frontier, bool* next_frontier, bool* visited)
{
  int tid = threadIdx.x + blockDim.x*blockIdx.x;
  if(frontier[tid]){
      frontier[tid] = false;
      visited[tid] = true;                
      for(int i=vertices[tid]; i<vertices[tid+1]; i++){
          int vtx = edges[i];
          if(!visited[vtx]){
              next_frontier[vtx] = true;
          }
      }    
  }
}

__global__ void no_memcpy_bfs(int* vertices, int* edges, bool* frontier, bool* next_frontier, bool* visited)
{
  int tid = threadIdx.x + blockDim.x*blockIdx.x;
  if(frontier[tid]){
      frontier[tid] = false;
      visited[tid] = true;                
      for(int i=vertices[tid]; i<vertices[tid+1]; i++){
          int vtx = edges[i];
          if(!visited[vtx]){
              next_frontier[vtx] = true;
          }
      }    
  }
}

__global__ void next_to_visit(bool* visited, int* tovisit){
    int tid = threadIdx.x + blockDim.x*blockIdx.x;
    if(!visited[tid]){
        tovisit[0] = tid;
    }
}

__global__ void new_frontier(int* tovisit, bool* frontier){
    int tid = threadIdx.x + blockDim.x*blockIdx.x;
    if(tid==tovisit[0]){
        frontier[tovisit[0]] = true;
    }
}

__global__ void check_frontier(bool* frontier, bool* checkfrontier){
    int tid = threadIdx.x + blockDim.x*blockIdx.x;
    if(frontier[tid]){
        checkfrontier[0] = true;
    }
}


//Final GPU solver
void Test_GPU_Solver_BFS(char* arg1, char*arg2)
{ 
    FILE *fdata = fopen(arg2, "r");
    int num_vertex, num_edge;
    char str[100];

    fgets(str,99, fdata);
    sscanf(str, "%d %d", &num_vertex, &num_edge);
    //printf("vetex: %d, edges %d\n", num_vertex, num_edge);
    hipEvent_t start,end;
	hipEventCreate(&start);
	hipEventCreate(&end);
	float gpu_time=0.0f;
	hipDeviceSynchronize();
    hipEventRecord(start);

    //host vectors
    int* vertices = new int[num_vertex+1];
    int* edges = new int[num_edge];
    bool* frontier = new bool[num_vertex];
    bool* visited = new bool[num_vertex];
    //fill frontier and visited with false
    for(int i=0; i<num_vertex; i++){
        frontier[i]=false;
        visited[i]=false;
    }

    //parse input
    FILE *f = fopen(arg1, "r");
    int row, col;
    int prevrow = -1;
    float value;
    int vertex_count = 0;
    int edge_count = 0;
    while(fgets(str, 99, f)){
        sscanf(str, "%d %d %f", &row, &col, &value);
        if(prevrow!=row){
            vertices[vertex_count] = edge_count;
            vertex_count++;
        }
        edges[edge_count] = col;
        edge_count++;
        prevrow = row;
    }
    vertices[vertex_count] = edge_count;
    //printing vertices and edges arrays
    /*
    printf("\nvertices array: ");
    for(int i=0; i<vertex_count+1; i++){
        printf("%d ", vertices[i]);
    }

    printf("\nedges array: ");
    for(int i=0; i<edge_count; i++){
        printf("%d ", edges[i]);    
    }*/
    //copying vertices, edges, visited from host to device
    int* vertices_on_dev=0;
    int* edges_on_dev=0;
    bool* frontier_b_on_dev=0;
    bool* frontier_a_on_dev=0;
    bool* visited_on_dev=0;

    hipMalloc((void**)&vertices_on_dev, (num_vertex+1)*sizeof(int));
    hipMalloc((void**)&edges_on_dev, num_edge*sizeof(int));
    hipMalloc((void**)&frontier_a_on_dev, num_vertex*sizeof(bool));
    hipMalloc((void**)&frontier_b_on_dev, num_vertex*sizeof(bool));
    hipMalloc((void**)&visited_on_dev, num_vertex*sizeof(bool));
    
    hipMemcpy(vertices_on_dev, vertices,(num_vertex+1)*sizeof(int),hipMemcpyHostToDevice);
    hipMemcpy(edges_on_dev, edges, num_edge*sizeof(int),hipMemcpyHostToDevice);
    hipMemcpy(frontier_b_on_dev, frontier, num_vertex*sizeof(bool),hipMemcpyHostToDevice);
    hipMemcpy(visited_on_dev, frontier, num_vertex*sizeof(bool),hipMemcpyHostToDevice);

    //calculating block dim and grid dim based on vertex count
    //large dataset factorization - 3 * 5 * 5 * 11 * 31 * 41
    dim3 blocks(num_vertex, 1, 1);
    dim3 threadsPerBlock(1,1,1); 
    //main bfs algorithm 
    int next_unvisited_idx = 0;
    bool finished = false;
    int number_of_ccs = 0;
    int print_count = 0;
    while(!finished){
        for(int i=std::min(next_unvisited_idx,num_vertex-1); i<num_vertex; i++){
            if(!visited[i]){
                frontier[i] = true;
                next_unvisited_idx = i+1;
                if(print_count>100){
                    double progress = (100.0*i)/((double)num_vertex);
                    printf("Progress: %.2f%%\n", progress);
                    print_count=0;
                }
                print_count++;
                break;
            }
            if(i==num_vertex-1){
                finished=true;
            }
        }
        if(finished) break;
        number_of_ccs++;

        //copy new frontier array to device
        hipMemcpy(frontier_a_on_dev, frontier, num_vertex*sizeof(bool),hipMemcpyHostToDevice);

        int count = 0;
        bool is_frontier = true;
        while(is_frontier){
            if(count%2==0){
                //call kernel
                bfs<<<blocks,threadsPerBlock>>>(vertices_on_dev, edges_on_dev, frontier_a_on_dev, frontier_b_on_dev, visited_on_dev);
                hipMemcpy(frontier, frontier_b_on_dev, num_vertex*sizeof(bool),hipMemcpyDeviceToHost);
            }
            else{
                //call kernel
                bfs<<<blocks,threadsPerBlock>>>(vertices_on_dev, edges_on_dev, frontier_b_on_dev, frontier_a_on_dev, visited_on_dev);
                hipMemcpy(frontier, frontier_a_on_dev, num_vertex*sizeof(bool),hipMemcpyDeviceToHost);
            }

            for(int i=0; i<num_vertex; i++){
                if(frontier[i])
                    break;
                if(i==num_vertex-1)
                    is_frontier = false;
            }

            count++;
        }

        hipMemcpy(visited,visited_on_dev, num_vertex*sizeof(bool),hipMemcpyDeviceToHost);
    }
    //printf("\nNumber of CCs: %d", number_of_ccs);
	hipEventRecord(end);
	hipEventSynchronize(end);
	hipEventElapsedTime(&gpu_time,start,end);
    //printf("\nGPU runtime: %.4f ms\n",gpu_time);
    printf("%.4f, ", gpu_time);
	hipEventDestroy(start);
    hipEventDestroy(end);
}

//Failed optimizations GPU solver
void Test_GPU_Solver_BFS_reduce_memcpy(char* arg1, char*arg2)
{ 
    FILE *fdata = fopen(arg2, "r");
    int num_vertex, num_edge;
    char str[100];

    fgets(str,99, fdata);
    sscanf(str, "%d %d", &num_vertex, &num_edge);
    printf("vetex: %d, edges %d", num_vertex, num_edge);
    hipEvent_t start,end;
	hipEventCreate(&start);
	hipEventCreate(&end);
	float gpu_time=0.0f;
	hipDeviceSynchronize();
    hipEventRecord(start);

    //host vectors
    int* vertices = new int[num_vertex+1];
    int* edges = new int[num_edge];
    bool* frontier = new bool[num_vertex];
    bool* visited = new bool[num_vertex];
    //fill frontier and visited with false
    for(int i=0; i<num_vertex; i++){
        frontier[i]=false;
        visited[i]=false;
    }
    //parse input
    FILE *f = fopen(arg1, "r");
    int row, col;
    int prevrow = -1;
    float value;
    int vertex_count = 0;
    int edge_count = 0;
    while(fgets(str, 99, f)){
        sscanf(str, "%d %d %f", &row, &col, &value);
        if(prevrow!=row){
            vertices[vertex_count] = edge_count;
            vertex_count++;
        }
        edges[edge_count] = col;
        edge_count++;
        prevrow = row;
    }
    vertices[vertex_count] = edge_count;
    //printing vertices and edges arrays
    /*
    printf("\nvertices array: ");
    for(int i=0; i<vertex_count+1; i++){
        printf("%d ", vertices[i]);
    }

    printf("\nedges array: ");
    for(int i=0; i<edge_count; i++){
        printf("%d ", edges[i]);    
    }*/
    dim3 blocks(num_vertex, 1, 1);
    dim3 threadsPerBlock(1,1,1); 

    //false array
    bool false_array[1];
    false_array[0] = false;

    int zero_array[1];
    zero_array[0] = 0;

    //copying vertices, edges, visited from host to device
    int* vertices_on_dev=0;
    int* edges_on_dev=0;
    bool* frontier_b_on_dev=0;
    bool* frontier_a_on_dev=0;
    bool* visited_on_dev=0;

    bool* checkfrontier=0;
    int* visitnext=0;

    hipMalloc((void**)&vertices_on_dev, (num_vertex+1)*sizeof(int));
    hipMalloc((void**)&edges_on_dev, num_edge*sizeof(int));
    hipMalloc((void**)&frontier_a_on_dev, num_vertex*sizeof(bool));
    hipMalloc((void**)&frontier_b_on_dev, num_vertex*sizeof(bool));
    hipMalloc((void**)&visited_on_dev, num_vertex*sizeof(bool));

    hipMalloc((void**)&checkfrontier, sizeof(bool));
    hipMalloc((void**)&visitnext, sizeof(bool));
    
    hipMemcpy(vertices_on_dev, vertices,(num_vertex+1)*sizeof(int),hipMemcpyHostToDevice);
    hipMemcpy(edges_on_dev, edges, num_edge*sizeof(int),hipMemcpyHostToDevice);
    hipMemcpy(frontier_b_on_dev, frontier, num_vertex*sizeof(bool),hipMemcpyHostToDevice);
    hipMemcpy(visited_on_dev, frontier, num_vertex*sizeof(bool),hipMemcpyHostToDevice);

    hipMemcpy(checkfrontier, false_array, sizeof(bool),hipMemcpyHostToDevice);
    hipMemcpy(visitnext, zero_array, sizeof(int),hipMemcpyHostToDevice);
   
    //calculating block dim and grid dim based on vertex count
    //main bfs algorithm 
    int next_unvisited_idx = 0;
    bool finished = false;
    int number_of_ccs = 0;
    int print_count = 0;

    while(!finished){
        for(int i=std::min(next_unvisited_idx,num_vertex-1); i<num_vertex; i++){
            if(!visited[i]){
                frontier[i] = true;
                next_unvisited_idx = i+1;
                if(print_count>100){
                    double progress = (100.0*i)/((double)num_vertex);
                    printf("Progress: %.2f%%\n", progress);
                    print_count=0;
                }
                print_count++;
                break;
            }
            if(i==num_vertex-1){
                finished=true;
            }
        }
        if(finished) break;
        /*
        cudaMemcpy(visited,visited_on_dev, num_vertex*sizeof(bool),cudaMemcpyDeviceToHost);
        printf("\n");
        for(int i=0; i<2000; i++){
                printf("%d ", visited[i]);
        }
        printf("\n");
        next_to_visit<<<blocks,threadsPerBlock>>>(visited_on_dev,visitnext);
        cudaDeviceSynchronize();
        if(print_count>100){
            next_unvisited_idx+=.05;
            printf("approximate progress: %.2f%%\n", next_unvisited_idx);
            print_count = 0; 
        }
        print_count++;
        cudaMemcpy(current_visit_next, visitnext, sizeof(int),cudaMemcpyDeviceToHost);
        printf("current visit next: %d, previous visit next %d\n",current_visit_next[0], previous_visit_next);
        if(current_visit_next[0]==previous_visit_next){
            finished = true;
            break;
        }
        previous_visit_next = current_visit_next[0];

        new_frontier<<<blocks,threadsPerBlock>>>(visitnext, frontier_a_on_dev);
        cudaDeviceSynchronize();
        */
        number_of_ccs++;

        //copy new frontier array to device
        int count = 0;
        bool is_frontier[1];
        is_frontier[0] = true;

        while(is_frontier[0]){
            bool lastcall;
            lastcall= false;
            if(count%2==0){
                //call kernel
                bfs<<<blocks,threadsPerBlock>>>(vertices_on_dev, edges_on_dev, frontier_a_on_dev, frontier_b_on_dev, visited_on_dev);
            }
            else{
                //call kernel
                bfs<<<blocks,threadsPerBlock>>>(vertices_on_dev, edges_on_dev, frontier_b_on_dev, frontier_a_on_dev, visited_on_dev);
                lastcall=true;
            }
            if(lastcall){
                check_frontier<<<blocks,threadsPerBlock>>>(frontier_a_on_dev, checkfrontier);
            }
            else{
                check_frontier<<<blocks,threadsPerBlock>>>(frontier_b_on_dev, checkfrontier);
            } 
            hipDeviceSynchronize();
            hipMemcpy(is_frontier, checkfrontier, sizeof(bool),hipMemcpyDeviceToHost);
            hipMemcpy(checkfrontier, false_array, sizeof(bool),hipMemcpyHostToDevice);
            count++;
        }
        hipMemcpy(visited,visited_on_dev, num_vertex*sizeof(bool),hipMemcpyDeviceToHost);
    }
    printf("\nNumber of CCs: %d", number_of_ccs);
	hipEventRecord(end);
	hipEventSynchronize(end);
	hipEventElapsedTime(&gpu_time,start,end);
    printf("\nGPU runtime: %.4f ms\n",gpu_time);
	hipEventDestroy(start);
    hipEventDestroy(end);
}

//CPU solver
void Test_CPU_Solver_BFS(char* arg1, char*arg2){
    hipEvent_t start,end;
	hipEventCreate(&start);
	hipEventCreate(&end);
	float gpu_time=0.0f;
	hipDeviceSynchronize();
    hipEventRecord(start);

    FILE *fdata = fopen(arg2, "r");
    int num_vertex, num_edge;
    char str[100];

    fgets(str,99, fdata);
    sscanf(str, "%d %d", &num_vertex, &num_edge);
    //printf("vetex: %d, edges %d\n", num_vertex, num_edge);

    Graph g(num_vertex);

    //parse input
    FILE *f = fopen(arg1, "r");
    int row, col;
    float value;
    while(fgets(str, 99, f)){
        sscanf(str, "%d %d %f", &row, &col, &value);
        g.addEdge(row, col);
    }

    int number_of_ccs = g.NumberOfconnectedComponents();
    //printf("\nNumber of CCs: %d", number_of_ccs);
    hipEventRecord(end);
	hipEventSynchronize(end);
	hipEventElapsedTime(&gpu_time,start,end);
    //printf("\nCPU runtime: %.4f ms\n",gpu_time);
    printf("%.4f, ", gpu_time);
	hipEventDestroy(start);
    hipEventDestroy(end);
}

int main(int argc, char* argv[])
{
    printf("Testing GPU solver:\n");
    for(int i=0; i<20; i++){
        Test_GPU_Solver_BFS(argv[1], argv[2]);
    }
    printf("\nTesting CPU solver:\n");
    for(int i=0; i<20; i++){
        Test_CPU_Solver_BFS(argv[1], argv[2]);
    }
	return 0;
}
	.text
	.file	"basic_kernel_bfs.hip"
                                        # Start of file scope inline assembly
	.globl	_ZSt21ios_base_library_initv

                                        # End of file scope inline assembly
	.globl	_ZN5Graph27NumberOfconnectedComponentsEv # -- Begin function _ZN5Graph27NumberOfconnectedComponentsEv
	.p2align	1, 0x90
	.type	_ZN5Graph27NumberOfconnectedComponentsEv,@function
_ZN5Graph27NumberOfconnectedComponentsEv: # @_ZN5Graph27NumberOfconnectedComponentsEv
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdi, %rbx
	movslq	(%rdi), %r15
	movq	%r15, %rdi
	callq	_Znam
	testq	%r15, %r15
	jle	.LBB0_1
# %bb.3:                                # %.lr.ph17.preheader
	movq	%rax, %r14
	movl	%r15d, %r15d
	xorl	%r12d, %r12d
	movq	%rax, %rdi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	memset@PLT
	xorl	%ebp, %ebp
.LBB0_4:                                # %.lr.ph17
                                        # =>This Inner Loop Header: Depth=1
	cmpb	$0, (%r14,%r12)
	jne	.LBB0_6
# %bb.5:                                #   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movq	%r14, %rdx
	callq	_ZN5Graph7DFSUtilEiPb
	incl	%ebp
.LBB0_6:                                #   in Loop: Header=BB0_4 Depth=1
	incq	%r12
	cmpq	%r12, %r15
	jne	.LBB0_4
	jmp	.LBB0_2
.LBB0_1:
	xorl	%ebp, %ebp
.LBB0_2:                                # %._crit_edge
	movl	%ebp, %eax
	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
.Lfunc_end0:
	.size	_ZN5Graph27NumberOfconnectedComponentsEv, .Lfunc_end0-_ZN5Graph27NumberOfconnectedComponentsEv
	.cfi_endproc
                                        # -- End function
	.globl	_ZN5Graph7DFSUtilEiPb           # -- Begin function _ZN5Graph7DFSUtilEiPb
	.p2align	1, 0x90
	.type	_ZN5Graph7DFSUtilEiPb,@function
_ZN5Graph7DFSUtilEiPb:                  # @_ZN5Graph7DFSUtilEiPb
	.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
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movslq	%esi, %rcx
	movb	$1, (%rdx,%rcx)
	movq	8(%rdi), %rax
	leaq	(%rcx,%rcx,2), %r15
	leaq	(%rax,%r15,8), %rcx
	movq	(%rcx), %r12
	cmpq	%rcx, %r12
	je	.LBB1_5
# %bb.1:                                # %.lr.ph.preheader
	movq	%rdx, %rbx
	movq	%rdi, %r14
.LBB1_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movslq	16(%r12), %rsi
	cmpb	$0, (%rbx,%rsi)
	jne	.LBB1_4
# %bb.3:                                #   in Loop: Header=BB1_2 Depth=1
	movq	%r14, %rdi
                                        # kill: def $esi killed $esi killed $rsi
	movq	%rbx, %rdx
	callq	_ZN5Graph7DFSUtilEiPb
	movq	8(%r14), %rax
.LBB1_4:                                #   in Loop: Header=BB1_2 Depth=1
	movq	(%r12), %r12
	leaq	(%rax,%r15,8), %rcx
	cmpq	%rcx, %r12
	jne	.LBB1_2
.LBB1_5:                                # %._crit_edge
	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
	retq
.Lfunc_end1:
	.size	_ZN5Graph7DFSUtilEiPb, .Lfunc_end1-_ZN5Graph7DFSUtilEiPb
	.cfi_endproc
                                        # -- End function
	.globl	_ZN5GraphC2Ei                   # -- Begin function _ZN5GraphC2Ei
	.p2align	1, 0x90
	.type	_ZN5GraphC2Ei,@function
_ZN5GraphC2Ei:                          # @_ZN5GraphC2Ei
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movq	%rdi, %rbx
	movslq	%esi, %r14
	movl	$24, %ecx
	movq	%r14, %rax
	mulq	%rcx
	seto	%cl
	addq	$8, %rax
	movq	$-1, %rdi
	cmovbq	%rdi, %rax
	movl	%r14d, (%rbx)
	testb	%cl, %cl
	cmoveq	%rax, %rdi
	callq	_Znam
	movq	%r14, (%rax)
	addq	$8, %rax
	testl	%r14d, %r14d
	je	.LBB2_3
# %bb.1:
	leaq	(%r14,%r14,2), %rcx
	leaq	(%rax,%rcx,8), %rcx
	movq	%rax, %rdx
.LBB2_2:                                # =>This Inner Loop Header: Depth=1
	movq	%rdx, 8(%rdx)
	movq	%rdx, (%rdx)
	movq	$0, 16(%rdx)
	addq	$24, %rdx
	cmpq	%rcx, %rdx
	jne	.LBB2_2
.LBB2_3:                                # %.loopexit
	movq	%rax, 8(%rbx)
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end2:
	.size	_ZN5GraphC2Ei, .Lfunc_end2-_ZN5GraphC2Ei
	.cfi_endproc
                                        # -- End function
	.globl	_ZN5Graph7addEdgeEii            # -- Begin function _ZN5Graph7addEdgeEii
	.p2align	1, 0x90
	.type	_ZN5Graph7addEdgeEii,@function
_ZN5Graph7addEdgeEii:                   # @_ZN5Graph7addEdgeEii
	.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
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movl	%edx, %ebx
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movslq	%esi, %r12
	leaq	(%r12,%r12,2), %rcx
	leaq	(%rax,%rcx,8), %r15
	movl	$24, %edi
	callq	_Znwm
	movl	%ebx, 16(%rax)
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_ZNSt8__detail15_List_node_base7_M_hookEPS0_
	incq	16(%r15)
	movq	8(%r14), %rax
	movslq	%ebx, %rcx
	leaq	(%rcx,%rcx,2), %rcx
	leaq	(%rax,%rcx,8), %rbx
	movl	$24, %edi
	callq	_Znwm
	movl	%r12d, 16(%rax)
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_ZNSt8__detail15_List_node_base7_M_hookEPS0_
	incq	16(%rbx)
	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
	retq
.Lfunc_end3:
	.size	_ZN5Graph7addEdgeEii, .Lfunc_end3-_ZN5Graph7addEdgeEii
	.cfi_endproc
                                        # -- End function
	.globl	_Z18__device_stub__bfsPiS_PbS0_S0_ # -- Begin function _Z18__device_stub__bfsPiS_PbS0_S0_
	.type	_Z18__device_stub__bfsPiS_PbS0_S0_,@function
_Z18__device_stub__bfsPiS_PbS0_S0_:     # @_Z18__device_stub__bfsPiS_PbS0_S0_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$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	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z3bfsPiS_PbS0_S0_, %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_end4:
	.size	_Z18__device_stub__bfsPiS_PbS0_S0_, .Lfunc_end4-_Z18__device_stub__bfsPiS_PbS0_S0_
	.cfi_endproc
                                        # -- End function
	.globl	_Z28__device_stub__no_memcpy_bfsPiS_PbS0_S0_ # -- Begin function _Z28__device_stub__no_memcpy_bfsPiS_PbS0_S0_
	.type	_Z28__device_stub__no_memcpy_bfsPiS_PbS0_S0_,@function
_Z28__device_stub__no_memcpy_bfsPiS_PbS0_S0_: # @_Z28__device_stub__no_memcpy_bfsPiS_PbS0_S0_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$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	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z13no_memcpy_bfsPiS_PbS0_S0_, %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_end5:
	.size	_Z28__device_stub__no_memcpy_bfsPiS_PbS0_S0_, .Lfunc_end5-_Z28__device_stub__no_memcpy_bfsPiS_PbS0_S0_
	.cfi_endproc
                                        # -- End function
	.globl	_Z28__device_stub__next_to_visitPbPi # -- Begin function _Z28__device_stub__next_to_visitPbPi
	.type	_Z28__device_stub__next_to_visitPbPi,@function
_Z28__device_stub__next_to_visitPbPi:   # @_Z28__device_stub__next_to_visitPbPi
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$80, %rsp
	.cfi_def_cfa_offset 128
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	24(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	16(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	64(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	leaq	48(%rsp), %r14
	leaq	32(%rsp), %r15
	leaq	8(%rsp), %r12
	movq	%rsp, %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z13next_to_visitPbPi, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$96, %rsp
	.cfi_adjust_cfa_offset -96
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end6:
	.size	_Z28__device_stub__next_to_visitPbPi, .Lfunc_end6-_Z28__device_stub__next_to_visitPbPi
	.cfi_endproc
                                        # -- End function
	.globl	_Z27__device_stub__new_frontierPiPb # -- Begin function _Z27__device_stub__new_frontierPiPb
	.type	_Z27__device_stub__new_frontierPiPb,@function
_Z27__device_stub__new_frontierPiPb:    # @_Z27__device_stub__new_frontierPiPb
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$80, %rsp
	.cfi_def_cfa_offset 128
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	24(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	16(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	64(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	leaq	48(%rsp), %r14
	leaq	32(%rsp), %r15
	leaq	8(%rsp), %r12
	movq	%rsp, %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z12new_frontierPiPb, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$96, %rsp
	.cfi_adjust_cfa_offset -96
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end7:
	.size	_Z27__device_stub__new_frontierPiPb, .Lfunc_end7-_Z27__device_stub__new_frontierPiPb
	.cfi_endproc
                                        # -- End function
	.globl	_Z29__device_stub__check_frontierPbS_ # -- Begin function _Z29__device_stub__check_frontierPbS_
	.type	_Z29__device_stub__check_frontierPbS_,@function
_Z29__device_stub__check_frontierPbS_:  # @_Z29__device_stub__check_frontierPbS_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$80, %rsp
	.cfi_def_cfa_offset 128
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	24(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	16(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	64(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	leaq	48(%rsp), %r14
	leaq	32(%rsp), %r15
	leaq	8(%rsp), %r12
	movq	%rsp, %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z14check_frontierPbS_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$96, %rsp
	.cfi_adjust_cfa_offset -96
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end8:
	.size	_Z29__device_stub__check_frontierPbS_, .Lfunc_end8-_Z29__device_stub__check_frontierPbS_
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z19Test_GPU_Solver_BFSPcS_
.LCPI9_0:
	.quad	0x4059000000000000              # double 100
	.text
	.globl	_Z19Test_GPU_Solver_BFSPcS_
	.type	_Z19Test_GPU_Solver_BFSPcS_,@function
_Z19Test_GPU_Solver_BFSPcS_:            # @_Z19Test_GPU_Solver_BFSPcS_
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$232, %rsp
	.cfi_def_cfa_offset 288
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, %rax
	movq	%rdi, %r15
	movl	$.L.str, %esi
	movq	%rax, %rdi
	callq	fopen
	leaq	128(%rsp), %r12
	movq	%r12, %rdi
	movl	$99, %esi
	movq	%rax, %rdx
	callq	fgets
	xorl	%ebp, %ebp
	leaq	4(%rsp), %r14
	leaq	44(%rsp), %rbx
	movl	$.L.str.1, %esi
	movq	%r12, %rdi
	movq	%r14, %rdx
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	__isoc23_sscanf
	leaq	112(%rsp), %r12
	movq	%r12, %rdi
	callq	hipEventCreate
	leaq	56(%rsp), %rdi
	callq	hipEventCreate
	movl	$0, 92(%rsp)
	callq	hipDeviceSynchronize
	movq	(%r12), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movslq	(%r14), %r12
	movq	$-1, %r14
	cmpq	%r14, %r12
	leaq	4(,%r12,4), %rdi
	cmovlq	%r14, %rdi
	callq	_Znam
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	movslq	(%rbx), %rax
	leaq	(,%rax,4), %rdi
	testq	%rax, %rax
	cmovsq	%r14, %rdi
	callq	_Znam
	movq	%rax, 48(%rsp)                  # 8-byte Spill
	movq	%r12, %rdi
	callq	_Znam
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_Znam
	movq	%rax, %r14
	testq	%r12, %r12
	jle	.LBB9_2
# %bb.1:                                # %.lr.ph.preheader
	movl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movq	%r12, %rdx
	callq	memset@PLT
	movq	%r14, %rdi
	xorl	%esi, %esi
	movq	%r12, %rdx
	callq	memset@PLT
.LBB9_2:                                # %._crit_edge
	movq	%r14, 96(%rsp)                  # 8-byte Spill
	movl	$.L.str, %esi
	movq	%r15, %rdi
	callq	fopen
	leaq	128(%rsp), %rdi
	movl	$99, %esi
	movq	%rax, 64(%rsp)                  # 8-byte Spill
	movq	%rax, %rdx
	callq	fgets
	testq	%rax, %rax
	je	.LBB9_3
# %bb.4:                                # %.lr.ph111.preheader
	movl	$-1, %r15d
	leaq	128(%rsp), %r12
	xorl	%ebp, %ebp
	xorl	%r14d, %r14d
.LBB9_5:                                # %.lr.ph111
                                        # =>This Inner Loop Header: Depth=1
	movl	%r15d, %r13d
	movl	$.L.str.2, %esi
	movq	%r12, %rdi
	leaq	88(%rsp), %rdx
	leaq	84(%rsp), %rcx
	leaq	124(%rsp), %r8
	xorl	%eax, %eax
	callq	__isoc23_sscanf
	movl	88(%rsp), %r15d
	cmpl	%r15d, %r13d
	je	.LBB9_7
# %bb.6:                                #   in Loop: Header=BB9_5 Depth=1
	movslq	%r14d, %r14
	movq	16(%rsp), %rax                  # 8-byte Reload
	movl	%ebp, (%rax,%r14,4)
	incl	%r14d
.LBB9_7:                                #   in Loop: Header=BB9_5 Depth=1
	movl	84(%rsp), %eax
	movq	48(%rsp), %rcx                  # 8-byte Reload
	movl	%eax, (%rcx,%rbp,4)
	incq	%rbp
	movq	%r12, %rdi
	movl	$99, %esi
	movq	64(%rsp), %rdx                  # 8-byte Reload
	callq	fgets
	testq	%rax, %rax
	jne	.LBB9_5
# %bb.8:                                # %._crit_edge112.loopexit
	movslq	%r14d, %rax
	jmp	.LBB9_9
.LBB9_3:
	xorl	%eax, %eax
.LBB9_9:                                # %._crit_edge112
	movabsq	$4294967296, %r14               # imm = 0x100000000
	movq	16(%rsp), %r15                  # 8-byte Reload
	movl	%ebp, (%r15,%rax,4)
	xorl	%r12d, %r12d
	leaq	72(%rsp), %rax
	movq	%r12, (%rax)
	movq	%rax, %rdi
	leaq	104(%rsp), %rbp
	movq	%r12, (%rbp)
	leaq	8(%rsp), %rax
	movq	%r12, (%rax)
	leaq	32(%rsp), %r13
	movq	%r12, (%r13)
	leaq	24(%rsp), %rax
	movq	%r12, (%rax)
	movslq	4(%rsp), %rax
	leaq	4(,%rax,4), %rsi
	callq	hipMalloc
	movslq	44(%rsp), %rsi
	shlq	$2, %rsi
	movq	%rbp, %rdi
	callq	hipMalloc
	movslq	4(%rsp), %rsi
	movq	%r13, %rdi
	callq	hipMalloc
	movslq	4(%rsp), %rsi
	leaq	8(%rsp), %rdi
	callq	hipMalloc
	movslq	4(%rsp), %rsi
	leaq	24(%rsp), %rdi
	callq	hipMalloc
	leaq	72(%rsp), %rax
	movq	(%rax), %rdi
	movslq	4(%rsp), %rax
	leaq	4(,%rax,4), %rdx
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%rbp), %rdi
	movslq	44(%rsp), %rdx
	shlq	$2, %rdx
	movq	48(%rsp), %rsi                  # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	8(%rsp), %rax
	movq	(%rax), %rdi
	movslq	4(%rsp), %rdx
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	24(%rsp), %rax
	movq	(%rax), %rdi
	movslq	4(%rsp), %rdx
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movl	4(%rsp), %eax
	btsq	$32, %rax
	movq	%rax, 48(%rsp)                  # 8-byte Spill
	incq	%r14
	movq	%r14, %rbp
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	movl	$0, 16(%rsp)                    # 4-byte Folded Spill
	movq	96(%rsp), %r15                  # 8-byte Reload
.LBB9_10:                               # %.lr.ph117.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB9_11 Depth 2
                                        #     Child Loop BB9_18 Depth 2
                                        #       Child Loop BB9_25 Depth 3
	movslq	4(%rsp), %rax
	leal	-1(%rax), %ecx
	movl	16(%rsp), %edi                  # 4-byte Reload
	cmpl	%ecx, %edi
	movl	%ecx, %edx
	cmovll	%edi, %edx
	movslq	%edx, %r14
	movl	$1, %edx
.LBB9_11:                               # %.lr.ph117
                                        #   Parent Loop BB9_10 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	cmpb	$0, (%r15,%r14)
	je	.LBB9_12
# %bb.15:                               #   in Loop: Header=BB9_11 Depth=2
	cmpl	%r14d, %ecx
	movzbl	%r13b, %r13d
	cmovel	%edx, %r13d
	incq	%r14
	cmpq	%rax, %r14
	jl	.LBB9_11
	jmp	.LBB9_16
.LBB9_12:                               #   in Loop: Header=BB9_10 Depth=1
	movb	$1, (%rbx,%r14)
	cmpl	$101, %esi
	jl	.LBB9_14
# %bb.13:                               #   in Loop: Header=BB9_10 Depth=1
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r14d, %xmm0
	mulsd	.LCPI9_0(%rip), %xmm0
	cvtsi2sd	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movl	$.L.str.3, %edi
	movb	$1, %al
	callq	printf
	xorl	%esi, %esi
.LBB9_14:                               #   in Loop: Header=BB9_10 Depth=1
	incq	%r14
	incl	%esi
	movl	%r14d, %eax
	movl	%r14d, 16(%rsp)                 # 4-byte Spill
.LBB9_16:                               # %.loopexit
                                        #   in Loop: Header=BB9_10 Depth=1
	testb	$1, %r13b
	jne	.LBB9_29
# %bb.17:                               #   in Loop: Header=BB9_10 Depth=1
	movl	%esi, 64(%rsp)                  # 4-byte Spill
	movq	32(%rsp), %rdi
	movslq	4(%rsp), %rdx
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movb	$1, %r14b
	xorl	%r15d, %r15d
.LBB9_18:                               #   Parent Loop BB9_10 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB9_25 Depth 3
	movq	48(%rsp), %rdi                  # 8-byte Reload
	movl	$1, %esi
	movq	%rbp, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testb	$1, %r15b
	jne	.LBB9_21
# %bb.19:                               #   in Loop: Header=BB9_18 Depth=2
	leaq	8(%rsp), %rcx
	testl	%eax, %eax
	jne	.LBB9_23
# %bb.20:                               #   in Loop: Header=BB9_18 Depth=2
	movq	72(%rsp), %rdi
	movq	104(%rsp), %rsi
	movq	32(%rsp), %rdx
	movq	8(%rsp), %rcx
	movq	24(%rsp), %r8
	callq	_Z18__device_stub__bfsPiS_PbS0_S0_
	leaq	8(%rsp), %rcx
	jmp	.LBB9_23
.LBB9_21:                               #   in Loop: Header=BB9_18 Depth=2
	leaq	32(%rsp), %rcx
	testl	%eax, %eax
	jne	.LBB9_23
# %bb.22:                               #   in Loop: Header=BB9_18 Depth=2
	movq	72(%rsp), %rdi
	movq	104(%rsp), %rsi
	movq	8(%rsp), %rdx
	movq	32(%rsp), %rcx
	movq	24(%rsp), %r8
	callq	_Z18__device_stub__bfsPiS_PbS0_S0_
	leaq	32(%rsp), %rcx
.LBB9_23:                               #   in Loop: Header=BB9_18 Depth=2
	movq	(%rcx), %rsi
	movslq	4(%rsp), %rdx
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.LBB9_27
# %bb.24:                               # %.lr.ph122
                                        #   in Loop: Header=BB9_18 Depth=2
	leal	-1(%rax), %ecx
	xorl	%edx, %edx
.LBB9_25:                               #   Parent Loop BB9_10 Depth=1
                                        #     Parent Loop BB9_18 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	cmpb	$0, (%rbx,%rdx)
	jne	.LBB9_27
# %bb.26:                               #   in Loop: Header=BB9_25 Depth=3
	cmpq	%rdx, %rcx
	movzbl	%r14b, %r14d
	cmovel	%r12d, %r14d
	incq	%rdx
	cmpq	%rdx, %rax
	jne	.LBB9_25
.LBB9_27:                               # %._crit_edge123
                                        #   in Loop: Header=BB9_18 Depth=2
	incl	%r15d
	testb	$1, %r14b
	jne	.LBB9_18
# %bb.28:                               #   in Loop: Header=BB9_10 Depth=1
	movq	24(%rsp), %rsi
	movslq	%eax, %rdx
	movq	96(%rsp), %r15                  # 8-byte Reload
	movq	%r15, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movl	64(%rsp), %esi                  # 4-byte Reload
	jmp	.LBB9_10
.LBB9_29:                               # %split
	movq	56(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	56(%rsp), %rdi
	callq	hipEventSynchronize
	movq	112(%rsp), %rsi
	movq	56(%rsp), %rdx
	leaq	92(%rsp), %rbx
	movq	%rbx, %rdi
	callq	hipEventElapsedTime
	xorps	%xmm0, %xmm0
	cvtss2sd	(%rbx), %xmm0
	movl	$.L.str.4, %edi
	movb	$1, %al
	callq	printf
	movq	112(%rsp), %rdi
	callq	hipEventDestroy
	movq	56(%rsp), %rdi
	callq	hipEventDestroy
	addq	$232, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end9:
	.size	_Z19Test_GPU_Solver_BFSPcS_, .Lfunc_end9-_Z19Test_GPU_Solver_BFSPcS_
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z33Test_GPU_Solver_BFS_reduce_memcpyPcS_
.LCPI10_0:
	.quad	0x4059000000000000              # double 100
	.text
	.globl	_Z33Test_GPU_Solver_BFS_reduce_memcpyPcS_
	.type	_Z33Test_GPU_Solver_BFS_reduce_memcpyPcS_,@function
_Z33Test_GPU_Solver_BFS_reduce_memcpyPcS_: # @_Z33Test_GPU_Solver_BFS_reduce_memcpyPcS_
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$264, %rsp                      # imm = 0x108
	.cfi_def_cfa_offset 320
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, %rax
	movq	%rdi, %r15
	movl	$.L.str, %esi
	movq	%rax, %rdi
	callq	fopen
	leaq	160(%rsp), %r12
	movq	%r12, %rdi
	movl	$99, %esi
	movq	%rax, %rdx
	callq	fgets
	xorl	%r13d, %r13d
	leaq	16(%rsp), %r14
	leaq	60(%rsp), %rbx
	movl	$.L.str.1, %esi
	movq	%r12, %rdi
	movq	%r14, %rdx
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	__isoc23_sscanf
	movl	(%r14), %esi
	movl	(%rbx), %edx
	movl	$.L.str.5, %edi
	xorl	%eax, %eax
	callq	printf
	leaq	144(%rsp), %r12
	movq	%r12, %rdi
	callq	hipEventCreate
	leaq	80(%rsp), %rdi
	callq	hipEventCreate
	movl	$0, 108(%rsp)
	callq	hipDeviceSynchronize
	movq	(%r12), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movslq	(%r14), %r12
	movq	$-1, %r14
	cmpq	%r14, %r12
	leaq	4(,%r12,4), %rdi
	cmovlq	%r14, %rdi
	callq	_Znam
	movq	%rax, 24(%rsp)                  # 8-byte Spill
	movslq	(%rbx), %rax
	leaq	(,%rax,4), %rdi
	testq	%rax, %rax
	cmovsq	%r14, %rdi
	callq	_Znam
	movq	%rax, 64(%rsp)                  # 8-byte Spill
	movq	%r12, %rdi
	callq	_Znam
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	_Znam
	movq	%rax, %rbp
	testq	%r12, %r12
	jle	.LBB10_2
# %bb.1:                                # %.lr.ph.preheader
	movl	%r12d, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	memset@PLT
	movq	%rbp, %rdi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	memset@PLT
.LBB10_2:                               # %._crit_edge
	movq	%rbp, 120(%rsp)                 # 8-byte Spill
	movl	$.L.str, %esi
	movq	%r15, %rdi
	callq	fopen
	movq	%rax, %r15
	leaq	160(%rsp), %rdi
	movl	$99, %esi
	movq	%rax, %rdx
	callq	fgets
	testq	%rax, %rax
	movq	%r14, 112(%rsp)                 # 8-byte Spill
	je	.LBB10_3
# %bb.4:                                # %.lr.ph125.preheader
	movl	$-1, %ebx
	leaq	160(%rsp), %r12
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
.LBB10_5:                               # %.lr.ph125
                                        # =>This Inner Loop Header: Depth=1
	movl	%ebx, %ebp
	movl	$.L.str.2, %esi
	movq	%r12, %rdi
	leaq	104(%rsp), %rdx
	leaq	100(%rsp), %rcx
	leaq	156(%rsp), %r8
	xorl	%eax, %eax
	callq	__isoc23_sscanf
	movl	104(%rsp), %ebx
	cmpl	%ebx, %ebp
	je	.LBB10_7
# %bb.6:                                #   in Loop: Header=BB10_5 Depth=1
	movslq	%r14d, %r14
	movq	24(%rsp), %rax                  # 8-byte Reload
	movl	%r13d, (%rax,%r14,4)
	incl	%r14d
.LBB10_7:                               #   in Loop: Header=BB10_5 Depth=1
	movl	100(%rsp), %eax
	movq	64(%rsp), %rcx                  # 8-byte Reload
	movl	%eax, (%rcx,%r13,4)
	incq	%r13
	movq	%r12, %rdi
	movl	$99, %esi
	movq	%r15, %rdx
	callq	fgets
	testq	%rax, %rax
	jne	.LBB10_5
# %bb.8:                                # %._crit_edge126.loopexit
	movslq	%r14d, %rax
	movq	112(%rsp), %r14                 # 8-byte Reload
	jmp	.LBB10_9
.LBB10_3:
	xorl	%eax, %eax
.LBB10_9:                               # %._crit_edge126
	movabsq	$4294967297, %r15               # imm = 0x100000001
	movq	24(%rsp), %rcx                  # 8-byte Reload
	movl	%r13d, (%rcx,%rax,4)
	movl	16(%rsp), %eax
	movslq	%eax, %rcx
	leaq	-1(%rax,%r15), %r12
	leaq	23(%rsp), %r13
	movb	$0, (%r13)
	leaq	96(%rsp), %rax
	movl	$0, (%rax)
	xorl	%ebp, %ebp
	leaq	88(%rsp), %rax
	movq	%rbp, (%rax)
	movq	%rax, %rdi
	leaq	136(%rsp), %rbx
	movq	%rbp, (%rbx)
	leaq	48(%rsp), %rax
	movq	%rbp, (%rax)
	leaq	72(%rsp), %rax
	movq	%rbp, (%rax)
	leaq	40(%rsp), %rax
	movq	%rbp, (%rax)
	leaq	32(%rsp), %rax
	movq	%rbp, (%rax)
	leaq	128(%rsp), %rax
	movq	%rbp, (%rax)
	leaq	4(,%rcx,4), %rsi
	callq	hipMalloc
	movslq	60(%rsp), %rsi
	shlq	$2, %rsi
	movq	%rbx, %rdi
	callq	hipMalloc
	movslq	16(%rsp), %rsi
	leaq	72(%rsp), %rdi
	callq	hipMalloc
	movslq	16(%rsp), %rsi
	leaq	48(%rsp), %rdi
	callq	hipMalloc
	movslq	16(%rsp), %rsi
	leaq	40(%rsp), %rdi
	callq	hipMalloc
	movl	$1, %esi
	leaq	32(%rsp), %rdi
	callq	hipMalloc
	movl	$1, %esi
	leaq	128(%rsp), %rdi
	callq	hipMalloc
	leaq	88(%rsp), %rax
	movq	(%rax), %rdi
	movslq	16(%rsp), %rax
	leaq	4(,%rax,4), %rdx
	movq	24(%rsp), %rsi                  # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%rbx), %rdi
	movslq	60(%rsp), %rdx
	shlq	$2, %rdx
	movq	64(%rsp), %rsi                  # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	48(%rsp), %rax
	movq	(%rax), %rdi
	movslq	16(%rsp), %rdx
	movq	%r14, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	40(%rsp), %rax
	movq	(%rax), %rdi
	movslq	16(%rsp), %rdx
	movq	%r14, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	32(%rsp), %rax
	movq	(%rax), %rdi
	movl	$1, %edx
	movq	%r13, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	128(%rsp), %rax
	movq	(%rax), %rdi
	movl	$4, %edx
	leaq	96(%rsp), %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	15(%rsp), %rbx
	movl	$0, 56(%rsp)                    # 4-byte Folded Spill
	xorl	%edi, %edi
	movl	$0, 24(%rsp)                    # 4-byte Folded Spill
.LBB10_10:                              # %.lr.ph131.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB10_11 Depth 2
                                        #     Child Loop BB10_18 Depth 2
	movslq	16(%rsp), %rax
	leal	-1(%rax), %ecx
	movl	24(%rsp), %esi                  # 4-byte Reload
	cmpl	%ecx, %esi
	movl	%ecx, %edx
	cmovll	%esi, %edx
	movslq	%edx, %r14
	movq	120(%rsp), %rdx                 # 8-byte Reload
	movl	$1, %esi
.LBB10_11:                              # %.lr.ph131
                                        #   Parent Loop BB10_10 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	cmpb	$0, (%rdx,%r14)
	je	.LBB10_12
# %bb.15:                               #   in Loop: Header=BB10_11 Depth=2
	cmpl	%r14d, %ecx
	movzbl	%bpl, %ebp
	cmovel	%esi, %ebp
	incq	%r14
	cmpq	%rax, %r14
	jl	.LBB10_11
	jmp	.LBB10_16
.LBB10_12:                              #   in Loop: Header=BB10_10 Depth=1
	movq	112(%rsp), %rcx                 # 8-byte Reload
	movb	$1, (%rcx,%r14)
	cmpl	$101, %edi
	jl	.LBB10_14
# %bb.13:                               #   in Loop: Header=BB10_10 Depth=1
	cvtsi2sd	%r14d, %xmm0
	mulsd	.LCPI10_0(%rip), %xmm0
	cvtsi2sd	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movl	$.L.str.3, %edi
	movb	$1, %al
	callq	printf
	xorl	%edi, %edi
.LBB10_14:                              #   in Loop: Header=BB10_10 Depth=1
	incq	%r14
	incl	%edi
	movl	%r14d, %eax
	movl	%r14d, 24(%rsp)                 # 4-byte Spill
.LBB10_16:                              # %.loopexit
                                        #   in Loop: Header=BB10_10 Depth=1
	testb	$1, %bpl
	jne	.LBB10_30
# %bb.17:                               #   in Loop: Header=BB10_10 Depth=1
	movl	%edi, 64(%rsp)                  # 4-byte Spill
	movb	$1, 15(%rsp)
	xorl	%r14d, %r14d
.LBB10_18:                              #   Parent Loop BB10_10 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testb	$1, %r14b
	jne	.LBB10_23
# %bb.19:                               #   in Loop: Header=BB10_18 Depth=2
	testl	%eax, %eax
	jne	.LBB10_21
# %bb.20:                               #   in Loop: Header=BB10_18 Depth=2
	movq	88(%rsp), %rdi
	movq	136(%rsp), %rsi
	movq	72(%rsp), %rdx
	movq	48(%rsp), %rcx
	movq	40(%rsp), %r8
	callq	_Z18__device_stub__bfsPiS_PbS0_S0_
.LBB10_21:                              #   in Loop: Header=BB10_18 Depth=2
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB10_28
# %bb.22:                               #   in Loop: Header=BB10_18 Depth=2
	movq	48(%rsp), %rdi
	jmp	.LBB10_27
.LBB10_23:                              #   in Loop: Header=BB10_18 Depth=2
	testl	%eax, %eax
	jne	.LBB10_25
# %bb.24:                               #   in Loop: Header=BB10_18 Depth=2
	movq	88(%rsp), %rdi
	movq	136(%rsp), %rsi
	movq	48(%rsp), %rdx
	movq	72(%rsp), %rcx
	movq	40(%rsp), %r8
	callq	_Z18__device_stub__bfsPiS_PbS0_S0_
.LBB10_25:                              #   in Loop: Header=BB10_18 Depth=2
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB10_28
# %bb.26:                               #   in Loop: Header=BB10_18 Depth=2
	movq	72(%rsp), %rdi
.LBB10_27:                              #   in Loop: Header=BB10_18 Depth=2
	movq	32(%rsp), %rsi
	callq	_Z29__device_stub__check_frontierPbS_
.LBB10_28:                              #   in Loop: Header=BB10_18 Depth=2
	callq	hipDeviceSynchronize
	movq	32(%rsp), %rsi
	movl	$1, %edx
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	32(%rsp), %rdi
	movl	$1, %edx
	movq	%r13, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	incl	%r14d
	cmpb	$0, 15(%rsp)
	jne	.LBB10_18
# %bb.29:                               #   in Loop: Header=BB10_10 Depth=1
	incl	56(%rsp)                        # 4-byte Folded Spill
	movq	40(%rsp), %rsi
	movslq	16(%rsp), %rdx
	movq	120(%rsp), %rdi                 # 8-byte Reload
	movl	$2, %ecx
	callq	hipMemcpy
	movl	64(%rsp), %edi                  # 4-byte Reload
	jmp	.LBB10_10
.LBB10_30:                              # %split
	movl	$.L.str.6, %edi
	movl	56(%rsp), %esi                  # 4-byte Reload
	xorl	%eax, %eax
	callq	printf
	movq	80(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	80(%rsp), %rdi
	callq	hipEventSynchronize
	movq	144(%rsp), %rsi
	movq	80(%rsp), %rdx
	leaq	108(%rsp), %rbx
	movq	%rbx, %rdi
	callq	hipEventElapsedTime
	xorps	%xmm0, %xmm0
	cvtss2sd	(%rbx), %xmm0
	movl	$.L.str.7, %edi
	movb	$1, %al
	callq	printf
	movq	144(%rsp), %rdi
	callq	hipEventDestroy
	movq	80(%rsp), %rdi
	callq	hipEventDestroy
	addq	$264, %rsp                      # imm = 0x108
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end10:
	.size	_Z33Test_GPU_Solver_BFS_reduce_memcpyPcS_, .Lfunc_end10-_Z33Test_GPU_Solver_BFS_reduce_memcpyPcS_
	.cfi_endproc
                                        # -- End function
	.globl	_Z19Test_CPU_Solver_BFSPcS_     # -- Begin function _Z19Test_CPU_Solver_BFSPcS_
	.type	_Z19Test_CPU_Solver_BFSPcS_,@function
_Z19Test_CPU_Solver_BFSPcS_:            # @_Z19Test_CPU_Solver_BFSPcS_
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$168, %rsp
	.cfi_def_cfa_offset 224
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	24(%rsp), %r15
	movq	%r15, %rdi
	callq	hipEventCreate
	movq	%rsp, %rdi
	callq	hipEventCreate
	movl	$0, 20(%rsp)
	callq	hipDeviceSynchronize
	movq	(%r15), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movl	$.L.str, %esi
	movq	%r14, %rdi
	callq	fopen
	leaq	64(%rsp), %r14
	movq	%r14, %rdi
	movl	$99, %esi
	movq	%rax, %rdx
	callq	fgets
	leaq	44(%rsp), %r15
	leaq	40(%rsp), %rcx
	movl	$.L.str.1, %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	__isoc23_sscanf
	movl	(%r15), %esi
	leaq	48(%rsp), %rdi
	callq	_ZN5GraphC2Ei
	movl	$.L.str, %esi
	movq	%rbx, %rdi
	callq	fopen
	movq	%rax, %rbx
	movq	%r14, %rdi
	movl	$99, %esi
	movq	%rax, %rdx
	callq	fgets
	testq	%rax, %rax
	je	.LBB11_3
# %bb.1:                                # %.lr.ph.preheader
	leaq	64(%rsp), %r14
	leaq	16(%rsp), %r15
	leaq	12(%rsp), %r12
	leaq	36(%rsp), %r13
	leaq	48(%rsp), %rbp
.LBB11_2:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movl	$.L.str.2, %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	movq	%r12, %rcx
	movq	%r13, %r8
	xorl	%eax, %eax
	callq	__isoc23_sscanf
	movl	16(%rsp), %esi
	movl	12(%rsp), %edx
	movq	%rbp, %rdi
	callq	_ZN5Graph7addEdgeEii
	movq	%r14, %rdi
	movl	$99, %esi
	movq	%rbx, %rdx
	callq	fgets
	testq	%rax, %rax
	jne	.LBB11_2
.LBB11_3:                               # %._crit_edge
	leaq	48(%rsp), %rdi
	callq	_ZN5Graph27NumberOfconnectedComponentsEv
	movq	(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	(%rsp), %rdi
	callq	hipEventSynchronize
	movq	24(%rsp), %rsi
	movq	(%rsp), %rdx
	leaq	20(%rsp), %rbx
	movq	%rbx, %rdi
	callq	hipEventElapsedTime
	cvtss2sd	(%rbx), %xmm0
	movl	$.L.str.4, %edi
	movb	$1, %al
	callq	printf
	movq	24(%rsp), %rdi
	callq	hipEventDestroy
	movq	(%rsp), %rdi
	callq	hipEventDestroy
	addq	$168, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end11:
	.size	_Z19Test_CPU_Solver_BFSPcS_, .Lfunc_end11-_Z19Test_CPU_Solver_BFSPcS_
	.cfi_endproc
                                        # -- End function
	.globl	main                            # -- Begin function main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %rbp, -16
	movq	%rsi, %rbx
	movl	$.Lstr, %edi
	callq	puts@PLT
	movl	$20, %ebp
.LBB12_1:                               # =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rdi
	movq	16(%rbx), %rsi
	callq	_Z19Test_GPU_Solver_BFSPcS_
	decl	%ebp
	jne	.LBB12_1
# %bb.2:
	movl	$.Lstr.1, %edi
	callq	puts@PLT
	movl	$20, %ebp
.LBB12_3:                               # =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rdi
	movq	16(%rbx), %rsi
	callq	_Z19Test_CPU_Solver_BFSPcS_
	decl	%ebp
	jne	.LBB12_3
# %bb.4:
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end12:
	.size	main, .Lfunc_end12-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	.LBB13_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB13_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z3bfsPiS_PbS0_S0_, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z13no_memcpy_bfsPiS_PbS0_S0_, %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	$_Z13next_to_visitPbPi, %esi
	movl	$.L__unnamed_3, %edx
	movl	$.L__unnamed_3, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z12new_frontierPiPb, %esi
	movl	$.L__unnamed_4, %edx
	movl	$.L__unnamed_4, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z14check_frontierPbS_, %esi
	movl	$.L__unnamed_5, %edx
	movl	$.L__unnamed_5, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end13:
	.size	__hip_module_ctor, .Lfunc_end13-__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	.LBB14_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
.LBB14_2:
	retq
.Lfunc_end14:
	.size	__hip_module_dtor, .Lfunc_end14-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z3bfsPiS_PbS0_S0_,@object      # @_Z3bfsPiS_PbS0_S0_
	.section	.rodata,"a",@progbits
	.globl	_Z3bfsPiS_PbS0_S0_
	.p2align	3, 0x0
_Z3bfsPiS_PbS0_S0_:
	.quad	_Z18__device_stub__bfsPiS_PbS0_S0_
	.size	_Z3bfsPiS_PbS0_S0_, 8

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

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

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

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

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

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

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"%d %d %f"
	.size	.L.str.2, 9

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"Progress: %.2f%%\n"
	.size	.L.str.3, 18

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

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"vetex: %d, edges %d"
	.size	.L.str.5, 20

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"\nNumber of CCs: %d"
	.size	.L.str.6, 19

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

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z3bfsPiS_PbS0_S0_"
	.size	.L__unnamed_1, 19

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z13no_memcpy_bfsPiS_PbS0_S0_"
	.size	.L__unnamed_2, 30

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

	.type	.L__unnamed_4,@object           # @3
.L__unnamed_4:
	.asciz	"_Z12new_frontierPiPb"
	.size	.L__unnamed_4, 21

	.type	.L__unnamed_5,@object           # @4
.L__unnamed_5:
	.asciz	"_Z14check_frontierPbS_"
	.size	.L__unnamed_5, 23

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

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

	.type	.Lstr,@object                   # @str
	.section	.rodata.str1.1,"aMS",@progbits,1
.Lstr:
	.asciz	"Testing GPU solver:"
	.size	.Lstr, 20

	.type	.Lstr.1,@object                 # @str.1
.Lstr.1:
	.asciz	"\nTesting CPU solver:"
	.size	.Lstr.1, 21

	.globl	_ZN5GraphC1Ei
	.type	_ZN5GraphC1Ei,@function
.set _ZN5GraphC1Ei, _ZN5GraphC2Ei
	.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 _Z18__device_stub__bfsPiS_PbS0_S0_
	.addrsig_sym _Z28__device_stub__no_memcpy_bfsPiS_PbS0_S0_
	.addrsig_sym _Z28__device_stub__next_to_visitPbPi
	.addrsig_sym _Z27__device_stub__new_frontierPiPb
	.addrsig_sym _Z29__device_stub__check_frontierPbS_
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z3bfsPiS_PbS0_S0_
	.addrsig_sym _Z13no_memcpy_bfsPiS_PbS0_S0_
	.addrsig_sym _Z13next_to_visitPbPi
	.addrsig_sym _Z12new_frontierPiPb
	.addrsig_sym _Z14check_frontierPbS_
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z3bfsPiS_PbS0_S0_      ; -- Begin function _Z3bfsPiS_PbS0_S0_
	.globl	_Z3bfsPiS_PbS0_S0_
	.p2align	8
	.type	_Z3bfsPiS_PbS0_S0_,@function
_Z3bfsPiS_PbS0_S0_:                     ; @_Z3bfsPiS_PbS0_S0_
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x34
	s_load_b256 s[4:11], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[4:5], null, s15, s2, v[0:1]
	s_mov_b32 s2, exec_lo
	v_ashrrev_i32_e32 v5, 31, v4
	v_add_co_u32 v2, vcc_lo, s8, v4
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v3, vcc_lo, s9, v5, vcc_lo
	global_load_u8 v0, v[2:3], off
	s_waitcnt vmcnt(0)
	v_cmpx_ne_u16_e32 0, v0
	s_cbranch_execz .LBB0_6
; %bb.1:
	v_lshlrev_b64 v[0:1], 2, v[4:5]
	s_load_b64 s[2:3], s[0:1], 0x20
	v_mov_b32_e32 v8, 0
	s_mov_b32 s1, 0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	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[0:1], v[0:1], off
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v6, vcc_lo, s2, v4
	v_add_co_ci_u32_e32 v7, vcc_lo, s3, v5, vcc_lo
	v_mov_b32_e32 v4, 1
	global_store_b8 v[2:3], v8, off
	global_store_b8 v[6:7], v4, off
	s_waitcnt vmcnt(0)
	v_cmp_lt_i32_e32 vcc_lo, v0, v1
	s_and_b32 exec_lo, exec_lo, vcc_lo
	s_cbranch_execz .LBB0_6
; %bb.2:                                ; %.lr.ph.preheader
	v_ashrrev_i32_e32 v3, 31, v0
	v_mov_b32_e32 v2, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[2:3], 2, v[2:3]
	v_add_co_u32 v2, vcc_lo, s6, v2
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v3, vcc_lo, s7, v3, vcc_lo
.LBB0_3:                                ; %.lr.ph
                                        ; =>This Inner Loop Header: Depth=1
	global_load_b32 v5, v[2:3], off
	s_mov_b32 s0, exec_lo
	s_waitcnt vmcnt(0)
	v_ashrrev_i32_e32 v6, 31, v5
	v_add_co_u32 v7, vcc_lo, s2, v5
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v8, vcc_lo, s3, v6, vcc_lo
	global_load_u8 v7, v[7:8], off
	s_waitcnt vmcnt(0)
	v_cmpx_eq_u16_e32 0, v7
	s_cbranch_execz .LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	v_add_co_u32 v5, vcc_lo, s10, v5
	v_add_co_ci_u32_e32 v6, vcc_lo, s11, v6, vcc_lo
	global_store_b8 v[5:6], v4, off
.LBB0_5:                                ;   in Loop: Header=BB0_3 Depth=1
	s_or_b32 exec_lo, exec_lo, s0
	v_add_nc_u32_e32 v0, 1, v0
	v_add_co_u32 v2, s0, v2, 4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e64 v3, s0, 0, v3, s0
	v_cmp_ge_i32_e32 vcc_lo, v0, v1
	s_or_b32 s1, vcc_lo, s1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s1
	s_cbranch_execnz .LBB0_3
.LBB0_6:                                ; %.loopexit
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z3bfsPiS_PbS0_S0_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 296
		.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 9
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z3bfsPiS_PbS0_S0_, .Lfunc_end0-_Z3bfsPiS_PbS0_S0_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 360
; NumSgprs: 18
; NumVgprs: 9
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 9
; Occupancy: 16
; WaveLimiterHint : 1
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z13no_memcpy_bfsPiS_PbS0_S0_ ; -- Begin function _Z13no_memcpy_bfsPiS_PbS0_S0_
	.globl	_Z13no_memcpy_bfsPiS_PbS0_S0_
	.p2align	8
	.type	_Z13no_memcpy_bfsPiS_PbS0_S0_,@function
_Z13no_memcpy_bfsPiS_PbS0_S0_:          ; @_Z13no_memcpy_bfsPiS_PbS0_S0_
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x34
	s_load_b256 s[4:11], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[4:5], null, s15, s2, v[0:1]
	s_mov_b32 s2, exec_lo
	v_ashrrev_i32_e32 v5, 31, v4
	v_add_co_u32 v2, vcc_lo, s8, v4
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v3, vcc_lo, s9, v5, vcc_lo
	global_load_u8 v0, v[2:3], off
	s_waitcnt vmcnt(0)
	v_cmpx_ne_u16_e32 0, v0
	s_cbranch_execz .LBB1_6
; %bb.1:
	v_lshlrev_b64 v[0:1], 2, v[4:5]
	s_load_b64 s[2:3], s[0:1], 0x20
	v_mov_b32_e32 v8, 0
	s_mov_b32 s1, 0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	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[0:1], v[0:1], off
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v6, vcc_lo, s2, v4
	v_add_co_ci_u32_e32 v7, vcc_lo, s3, v5, vcc_lo
	v_mov_b32_e32 v4, 1
	global_store_b8 v[2:3], v8, off
	global_store_b8 v[6:7], v4, off
	s_waitcnt vmcnt(0)
	v_cmp_lt_i32_e32 vcc_lo, v0, v1
	s_and_b32 exec_lo, exec_lo, vcc_lo
	s_cbranch_execz .LBB1_6
; %bb.2:                                ; %.lr.ph.preheader
	v_ashrrev_i32_e32 v3, 31, v0
	v_mov_b32_e32 v2, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[2:3], 2, v[2:3]
	v_add_co_u32 v2, vcc_lo, s6, v2
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v3, vcc_lo, s7, v3, vcc_lo
.LBB1_3:                                ; %.lr.ph
                                        ; =>This Inner Loop Header: Depth=1
	global_load_b32 v5, v[2:3], off
	s_mov_b32 s0, exec_lo
	s_waitcnt vmcnt(0)
	v_ashrrev_i32_e32 v6, 31, v5
	v_add_co_u32 v7, vcc_lo, s2, v5
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v8, vcc_lo, s3, v6, vcc_lo
	global_load_u8 v7, v[7:8], off
	s_waitcnt vmcnt(0)
	v_cmpx_eq_u16_e32 0, v7
	s_cbranch_execz .LBB1_5
; %bb.4:                                ;   in Loop: Header=BB1_3 Depth=1
	v_add_co_u32 v5, vcc_lo, s10, v5
	v_add_co_ci_u32_e32 v6, vcc_lo, s11, v6, vcc_lo
	global_store_b8 v[5:6], v4, off
.LBB1_5:                                ;   in Loop: Header=BB1_3 Depth=1
	s_or_b32 exec_lo, exec_lo, s0
	v_add_nc_u32_e32 v0, 1, v0
	v_add_co_u32 v2, s0, v2, 4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e64 v3, s0, 0, v3, s0
	v_cmp_ge_i32_e32 vcc_lo, v0, v1
	s_or_b32 s1, vcc_lo, s1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s1
	s_cbranch_execnz .LBB1_3
.LBB1_6:                                ; %.loopexit
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z13no_memcpy_bfsPiS_PbS0_S0_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 296
		.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 9
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end1:
	.size	_Z13no_memcpy_bfsPiS_PbS0_S0_, .Lfunc_end1-_Z13no_memcpy_bfsPiS_PbS0_S0_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 360
; NumSgprs: 18
; NumVgprs: 9
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 9
; Occupancy: 16
; WaveLimiterHint : 1
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z13next_to_visitPbPi   ; -- Begin function _Z13next_to_visitPbPi
	.globl	_Z13next_to_visitPbPi
	.p2align	8
	.type	_Z13next_to_visitPbPi,@function
_Z13next_to_visitPbPi:                  ; @_Z13next_to_visitPbPi
; %bb.0:
	s_clause 0x1
	s_load_b32 s4, s[0:1], 0x1c
	s_load_b128 s[0:3], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	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 v0, 31, v1
	v_add_co_u32 v2, vcc_lo, s0, v1
	s_mov_b32 s0, exec_lo
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v3, vcc_lo, s1, v0, vcc_lo
	global_load_u8 v0, v[2:3], off
	s_waitcnt vmcnt(0)
	v_cmpx_eq_u16_e32 0, v0
	s_cbranch_execz .LBB2_2
; %bb.1:
	v_mov_b32_e32 v0, 0
	global_store_b32 v0, v1, s[2:3]
.LBB2_2:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z13next_to_visitPbPi
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 272
		.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	_Z13next_to_visitPbPi, .Lfunc_end2-_Z13next_to_visitPbPi
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 112
; 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
	.protected	_Z12new_frontierPiPb    ; -- Begin function _Z12new_frontierPiPb
	.globl	_Z12new_frontierPiPb
	.p2align	8
	.type	_Z12new_frontierPiPb,@function
_Z12new_frontierPiPb:                   ; @_Z12new_frontierPiPb
; %bb.0:
	s_clause 0x1
	s_load_b128 s[4:7], s[0:1], 0x0
	s_load_b32 s0, s[0:1], 0x1c
	s_waitcnt lgkmcnt(0)
	s_load_b32 s1, s[4:5], 0x0
	s_and_b32 s0, s0, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s0, v[0:1]
	s_mov_b32 s0, exec_lo
	s_waitcnt lgkmcnt(0)
	v_cmpx_eq_u32_e64 s1, v1
	s_cbranch_execz .LBB3_2
; %bb.1:
	v_ashrrev_i32_e32 v2, 31, v1
	v_add_co_u32 v0, vcc_lo, s6, v1
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v1, vcc_lo, s7, v2, vcc_lo
	v_mov_b32_e32 v2, 1
	global_store_b8 v[0:1], v2, off
.LBB3_2:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z12new_frontierPiPb
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 272
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 3
		.amdhsa_next_free_sgpr 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_end3:
	.size	_Z12new_frontierPiPb, .Lfunc_end3-_Z12new_frontierPiPb
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 116
; NumSgprs: 18
; NumVgprs: 3
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 3
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z14check_frontierPbS_  ; -- Begin function _Z14check_frontierPbS_
	.globl	_Z14check_frontierPbS_
	.p2align	8
	.type	_Z14check_frontierPbS_,@function
_Z14check_frontierPbS_:                 ; @_Z14check_frontierPbS_
; %bb.0:
	s_clause 0x1
	s_load_b32 s4, s[0:1], 0x1c
	s_load_b128 s[0:3], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	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
	v_add_co_u32 v0, vcc_lo, s0, v1
	s_mov_b32 s0, exec_lo
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v1, vcc_lo, s1, v2, vcc_lo
	global_load_u8 v0, v[0:1], off
	s_waitcnt vmcnt(0)
	v_cmpx_ne_u16_e32 0, v0
	s_cbranch_execz .LBB4_2
; %bb.1:
	v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, 1
	global_store_b8 v0, v1, s[2:3]
.LBB4_2:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z14check_frontierPbS_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 272
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 3
		.amdhsa_next_free_sgpr 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_end4:
	.size	_Z14check_frontierPbS_, .Lfunc_end4-_Z14check_frontierPbS_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 116
; NumSgprs: 18
; NumVgprs: 3
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 3
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .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
      - .offset:         40
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         44
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         48
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         52
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         54
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         56
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         58
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         60
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         62
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         96
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         104
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 296
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z3bfsPiS_PbS0_S0_
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z3bfsPiS_PbS0_S0_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     9
    .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
      - .offset:         40
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         44
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         48
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         52
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         54
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         56
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         58
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         60
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         62
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         96
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         104
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 296
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z13no_memcpy_bfsPiS_PbS0_S0_
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z13no_memcpy_bfsPiS_PbS0_S0_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     9
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .offset:         16
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         20
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         28
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         30
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         32
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         34
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         36
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         38
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         56
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         80
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 272
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z13next_to_visitPbPi
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z13next_to_visitPbPi.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     4
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .offset:         16
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         20
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         28
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         30
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         32
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         34
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         36
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         38
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         56
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         80
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 272
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z12new_frontierPiPb
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z12new_frontierPiPb.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     3
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .offset:         16
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         20
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         28
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         30
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         32
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         34
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         36
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         38
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         56
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         80
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 272
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z14check_frontierPbS_
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z14check_frontierPbS_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     3
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
