// pagerank.cu
#include <cuda_runtime.h>
#include <iostream>
#include <vector>

#define CHECK_CUDA(call) \
    if ((call) != cudaSuccess) { \
        std::cerr << "CUDA error at " << __FILE__ << ":" << __LINE__ << std::endl; \
        exit(1); \
    }

const float DAMPING = 0.85f;
const int MAX_ITERS = 100;
const float EPSILON = 1e-6f;

// Kernel to perform one power iteration step
__global__ void pagerank_kernel(const int* row_ptr, const int* col_idx, const float* old_pr, float* new_pr, int num_nodes, float damping, float base_score) {
    int node = blockIdx.x * blockDim.x + threadIdx.x;
    if (node >= num_nodes) return;

    float sum = 0.0f;
    int row_start = row_ptr[node];
    int row_end = row_ptr[node + 1];

    for (int i = row_start; i < row_end; ++i) {
        int incoming_node = col_idx[i];
        int degree = row_ptr[incoming_node + 1] - row_ptr[incoming_node];
        if (degree > 0) {
            sum += old_pr[incoming_node] / degree;
        }
    }
    new_pr[node] = base_score + damping * sum;
}

// Host function to compute pagerank
void pagerank(const std::vector<int>& row_ptr, const std::vector<int>& col_idx, int num_nodes) {
    int* d_row_ptr;
    int* d_col_idx;
    float* d_old_pr;
    float* d_new_pr;

    CHECK_CUDA(cudaMalloc(&d_row_ptr, (num_nodes + 1) * sizeof(int)));
    CHECK_CUDA(cudaMalloc(&d_col_idx, col_idx.size() * sizeof(int)));
    CHECK_CUDA(cudaMalloc(&d_old_pr, num_nodes * sizeof(float)));
    CHECK_CUDA(cudaMalloc(&d_new_pr, num_nodes * sizeof(float)));

    CHECK_CUDA(cudaMemcpy(d_row_ptr, row_ptr.data(), (num_nodes + 1) * sizeof(int), cudaMemcpyHostToDevice));
    CHECK_CUDA(cudaMemcpy(d_col_idx, col_idx.data(), col_idx.size() * sizeof(int), cudaMemcpyHostToDevice));

    std::vector<float> pr(num_nodes, 1.0f / num_nodes);
    CHECK_CUDA(cudaMemcpy(d_old_pr, pr.data(), num_nodes * sizeof(float), cudaMemcpyHostToDevice));

    float base_score = (1.0f - DAMPING) / num_nodes;
    int threads_per_block = 256;
    int blocks_per_grid = (num_nodes + threads_per_block - 1) / threads_per_block;

    for (int iter = 0; iter < MAX_ITERS; ++iter) {
        pagerank_kernel<<<blocks_per_grid, threads_per_block>>>(d_row_ptr, d_col_idx, d_old_pr, d_new_pr, num_nodes, DAMPING, base_score);
        CHECK_CUDA(cudaDeviceSynchronize());

        // Swap pointers
        std::swap(d_old_pr, d_new_pr);
    }

    CHECK_CUDA(cudaMemcpy(pr.data(), d_old_pr, num_nodes * sizeof(float), cudaMemcpyDeviceToHost));

    std::cout << "PageRank Scores after " << MAX_ITERS << " iterations:\n";
    for (int i = 0; i < num_nodes; ++i) {
        std::cout << "Node " << i << ": " << pr[i] << "\n";
    }

    cudaFree(d_row_ptr);
    cudaFree(d_col_idx);
    cudaFree(d_old_pr);
    cudaFree(d_new_pr);
}

int main() {
    // Example graph: 4 nodes
    // 0 -> 1, 2
    // 1 -> 2
    // 2 -> 0
    // 3 -> 2
    std::vector<int> row_ptr = {0, 2, 3, 4, 4}; // Size = num_nodes + 1
    std::vector<int> col_idx = {1, 2, 2, 0};    // List of edges

    int num_nodes = 4;
    pagerank(row_ptr, col_idx, num_nodes);

    return 0;
}

	.file	"tmpxft_00047ff1_00000000-6_39.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3734:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE3734:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.align 2
	.type	_ZNSolsEPFRSoS_E.isra.0, @function
_ZNSolsEPFRSoS_E.isra.0:
.LFB4522:
	.cfi_startproc
	jmp	*%rsi
	.cfi_endproc
.LFE4522:
	.size	_ZNSolsEPFRSoS_E.isra.0, .-_ZNSolsEPFRSoS_E.isra.0
	.globl	_Z47__device_stub__Z15pagerank_kernelPKiS0_PKfPfiffPKiS0_PKfPfiff
	.type	_Z47__device_stub__Z15pagerank_kernelPKiS0_PKfPfiffPKiS0_PKfPfiff, @function
_Z47__device_stub__Z15pagerank_kernelPKiS0_PKfPfiffPKiS0_PKfPfiff:
.LFB3756:
	.cfi_startproc
	endbr64
	subq	$184, %rsp
	.cfi_def_cfa_offset 192
	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
	movl	%r8d, 12(%rsp)
	movss	%xmm0, 8(%rsp)
	movss	%xmm1, 4(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 168(%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	12(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 160(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 64(%rsp)
	movq	%rax, 76(%rsp)
	movl	$1, 84(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L3
	pushq	56(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z15pagerank_kernelPKiS0_PKfPfiff(%rip), %rdi
	pushq	56(%rsp)
	.cfi_def_cfa_offset 208
	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 200
	popq	%rdx
	.cfi_def_cfa_offset 192
.L3:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3756:
	.size	_Z47__device_stub__Z15pagerank_kernelPKiS0_PKfPfiffPKiS0_PKfPfiff, .-_Z47__device_stub__Z15pagerank_kernelPKiS0_PKfPfiffPKiS0_PKfPfiff
	.globl	_Z15pagerank_kernelPKiS0_PKfPfiff
	.type	_Z15pagerank_kernelPKiS0_PKfPfiff, @function
_Z15pagerank_kernelPKiS0_PKfPfiff:
.LFB3757:
	.cfi_startproc
	endbr64
	jmp	_Z47__device_stub__Z15pagerank_kernelPKiS0_PKfPfiffPKiS0_PKfPfiff
	.cfi_endproc
.LFE3757:
	.size	_Z15pagerank_kernelPKiS0_PKfPfiff, .-_Z15pagerank_kernelPKiS0_PKfPfiff
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"_Z15pagerank_kernelPKiS0_PKfPfiff"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB3759:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	pushq	$0
	.cfi_def_cfa_offset 24
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdx
	movq	%rax, %rdi
	leaq	_Z15pagerank_kernelPKiS0_PKfPfiff(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFunction@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE3759:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.text._ZNSt12_Vector_baseIfSaIfEED2Ev,"axG",@progbits,_ZNSt12_Vector_baseIfSaIfEED5Ev,comdat
	.align 2
	.weak	_ZNSt12_Vector_baseIfSaIfEED2Ev
	.type	_ZNSt12_Vector_baseIfSaIfEED2Ev, @function
_ZNSt12_Vector_baseIfSaIfEED2Ev:
.LFB4225:
	.cfi_startproc
	endbr64
	movq	(%rdi), %r8
	testq	%r8, %r8
	je	.L11
	movq	16(%rdi), %rsi
	movq	%r8, %rdi
	subq	%r8, %rsi
	jmp	_ZdlPvm@PLT
.L11:
	ret
	.cfi_endproc
.LFE4225:
	.size	_ZNSt12_Vector_baseIfSaIfEED2Ev, .-_ZNSt12_Vector_baseIfSaIfEED2Ev
	.weak	_ZNSt12_Vector_baseIfSaIfEED1Ev
	.set	_ZNSt12_Vector_baseIfSaIfEED1Ev,_ZNSt12_Vector_baseIfSaIfEED2Ev
	.section	.rodata.str1.1
.LC1:
	.string	"CUDA error at "
.LC2:
	.string	"39.cu"
.LC3:
	.string	":"
.LC4:
	.string	"cannot create std::vector larger than max_size()"
.LC8:
	.string	"PageRank Scores after "
.LC9:
	.string	" iterations:\n"
.LC10:
	.string	"Node "
.LC11:
	.string	": "
.LC12:
	.string	"\n"
	.text
	.globl	_Z8pagerankRKSt6vectorIiSaIiEES3_i
	.type	_Z8pagerankRKSt6vectorIiSaIiEES3_i, @function
_Z8pagerankRKSt6vectorIiSaIiEES3_i:
.LFB3729:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA3729
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdi, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leal	1(%rdx), %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movslq	%r13d, %r13
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	salq	$2, %r13
	movl	%edx, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rsi, %rbx
	movq	%r13, %rsi
	subq	$120, %rsp
	.cfi_def_cfa_offset 176
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rdi
.LEHB0:
	call	cudaMalloc@PLT
	testl	%eax, %eax
	je	.L14
	leaq	.LC1(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC2(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC3(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$42, %esi
	movq	%rax, %rdi
	jmp	.L50
.L14:
	movq	8(%rbx), %rsi
	leaq	32(%rsp), %rdi
	subq	(%rbx), %rsi
	call	cudaMalloc@PLT
	testl	%eax, %eax
	je	.L15
	leaq	.LC1(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC2(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC3(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$43, %esi
	movq	%rax, %rdi
.L50:
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
.L51:
	movl	$1, %edi
	call	exit@PLT
.L15:
	leaq	-4(%r13), %r12
	leaq	40(%rsp), %rdi
	movslq	%ebp, %r14
	movq	%r12, %rsi
	call	cudaMalloc@PLT
	testl	%eax, %eax
	je	.L16
	leaq	.LC1(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC2(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC3(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$44, %esi
	movq	%rax, %rdi
	jmp	.L50
.L16:
	leaq	48(%rsp), %rdi
	movq	%r12, %rsi
	call	cudaMalloc@PLT
	testl	%eax, %eax
	je	.L17
	leaq	.LC1(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC2(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC3(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$45, %esi
	movq	%rax, %rdi
	jmp	.L50
.L17:
	movq	(%r15), %rsi
	movq	24(%rsp), %rdi
	movl	$1, %ecx
	movq	%r13, %rdx
	call	cudaMemcpy@PLT
	testl	%eax, %eax
	je	.L18
	leaq	.LC1(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC2(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC3(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$47, %esi
	movq	%rax, %rdi
	jmp	.L50
.L18:
	movq	(%rbx), %rsi
	movq	8(%rbx), %rdx
	movl	$1, %ecx
	movq	32(%rsp), %rdi
	subq	%rsi, %rdx
	call	cudaMemcpy@PLT
	testl	%eax, %eax
	je	.L19
	leaq	.LC1(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC2(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC3(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$48, %esi
	movq	%rax, %rdi
	jmp	.L50
.L19:
	movabsq	$2305843009213693951, %rax
	cvtsi2ssl	%ebp, %xmm2
	movss	%xmm2, 12(%rsp)
	cmpq	%rax, %r14
	jbe	.L20
	leaq	.LC4(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L20:
	xorl	%ebx, %ebx
	testq	%r14, %r14
	je	.L21
	movq	%r12, %rdi
	call	_Znwm@PLT
.LEHE0:
	movq	%rax, %rbx
.L21:
	leaq	(%rbx,%r12), %rax
	movq	%rbx, 80(%rsp)
	movq	%rax, 96(%rsp)
	testq	%r14, %r14
	je	.L38
	movq	%rbx, %rdx
	movss	.LC5(%rip), %xmm0
	divss	12(%rsp), %xmm0
.L23:
	cmpq	%rdx, %rax
	je	.L22
	movss	%xmm0, (%rdx)
	addq	$4, %rdx
	jmp	.L23
.L38:
	movq	%rbx, %rax
.L22:
	movq	40(%rsp), %rdi
	movl	$1, %ecx
	movq	%r12, %rdx
	movq	%rbx, %rsi
	movq	%rax, 88(%rsp)
.LEHB1:
	call	cudaMemcpy@PLT
	testl	%eax, %eax
	je	.L25
	leaq	.LC1(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	leaq	.LC2(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	leaq	.LC3(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movl	$51, %esi
.L53:
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	jmp	.L51
.L25:
	leal	255(%rbp), %eax
	movl	$256, %ecx
	movss	.LC6(%rip), %xmm0
	movl	$100, %r13d
	cltd
	divss	12(%rsp), %xmm0
	movabsq	$4294967552, %r14
	movss	%xmm0, 12(%rsp)
	idivl	%ecx
	movl	%eax, %r15d
.L31:
	movl	%r15d, 56(%rsp)
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r14, %rdx
	movabsq	$4294967297, %rax
	movl	$1, %ecx
	movq	%r14, 68(%rsp)
	movq	%rax, 60(%rsp)
	movq	56(%rsp), %rdi
	movl	64(%rsp), %esi
	movl	$1, 76(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	je	.L26
.L28:
	call	cudaDeviceSynchronize@PLT
	testl	%eax, %eax
	je	.L29
	jmp	.L55
.L26:
	movss	12(%rsp), %xmm1
	movss	.LC7(%rip), %xmm0
	movl	%ebp, %r8d
	movq	48(%rsp), %rcx
	movq	40(%rsp), %rdx
	movq	32(%rsp), %rsi
	movq	24(%rsp), %rdi
	call	_Z47__device_stub__Z15pagerank_kernelPKiS0_PKfPfiffPKiS0_PKfPfiff
	jmp	.L28
.L55:
	leaq	.LC1(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	leaq	.LC2(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	leaq	.LC3(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movl	$59, %esi
	jmp	.L53
.L29:
	movq	40(%rsp), %rax
	movq	48(%rsp), %rsi
	movq	%rax, 48(%rsp)
	movq	%rsi, 40(%rsp)
	decl	%r13d
	jne	.L31
	movl	$2, %ecx
	movq	%r12, %rdx
	movq	%rbx, %rdi
	call	cudaMemcpy@PLT
	testl	%eax, %eax
	je	.L32
	leaq	.LC1(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	leaq	.LC2(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	leaq	.LC3(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movl	$65, %esi
	jmp	.L53
.L32:
	leaq	_ZSt4cout(%rip), %r13
	leaq	.LC8(%rip), %rsi
	movq	%r13, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movl	$100, %esi
	call	_ZNSolsEi@PLT
	movq	%rax, %rdi
	leaq	.LC9(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	xorl	%r12d, %r12d
	leaq	.LC10(%rip), %r14
.L33:
	movl	%r12d, %r15d
	cmpl	%r12d, %ebp
	jle	.L56
	movq	%r14, %rsi
	movq	%r13, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movl	%r15d, %esi
	call	_ZNSolsEi@PLT
	movq	%rax, %rdi
	leaq	.LC11(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	cvtss2sd	(%rbx,%r12,4), %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	leaq	.LC12(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	incq	%r12
	jmp	.L33
.L56:
	movq	24(%rsp), %rdi
	call	cudaFree@PLT
	movq	32(%rsp), %rdi
	call	cudaFree@PLT
	movq	40(%rsp), %rdi
	call	cudaFree@PLT
	movq	48(%rsp), %rdi
	call	cudaFree@PLT
.LEHE1:
	leaq	80(%rsp), %rdi
	call	_ZNSt12_Vector_baseIfSaIfEED2Ev
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	je	.L36
	call	__stack_chk_fail@PLT
.L40:
	endbr64
	movq	%rax, %rbp
.L35:
	leaq	80(%rsp), %rdi
	call	_ZNSt12_Vector_baseIfSaIfEED2Ev
	movq	%rbp, %rdi
.LEHB2:
	call	_Unwind_Resume@PLT
.LEHE2:
.L36:
	addq	$120, %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
.LFE3729:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA3729:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE3729-.LLSDACSB3729
.LLSDACSB3729:
	.uleb128 .LEHB0-.LFB3729
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB3729
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L40-.LFB3729
	.uleb128 0
	.uleb128 .LEHB2-.LFB3729
	.uleb128 .LEHE2-.LEHB2
	.uleb128 0
	.uleb128 0
.LLSDACSE3729:
	.text
	.size	_Z8pagerankRKSt6vectorIiSaIiEES3_i, .-_Z8pagerankRKSt6vectorIiSaIiEES3_i
	.section	.text._ZNSt12_Vector_baseIiSaIiEED2Ev,"axG",@progbits,_ZNSt12_Vector_baseIiSaIiEED5Ev,comdat
	.align 2
	.weak	_ZNSt12_Vector_baseIiSaIiEED2Ev
	.type	_ZNSt12_Vector_baseIiSaIiEED2Ev, @function
_ZNSt12_Vector_baseIiSaIiEED2Ev:
.LFB4244:
	.cfi_startproc
	endbr64
	movq	(%rdi), %r8
	testq	%r8, %r8
	je	.L57
	movq	16(%rdi), %rsi
	movq	%r8, %rdi
	subq	%r8, %rsi
	jmp	_ZdlPvm@PLT
.L57:
	ret
	.cfi_endproc
.LFE4244:
	.size	_ZNSt12_Vector_baseIiSaIiEED2Ev, .-_ZNSt12_Vector_baseIiSaIiEED2Ev
	.weak	_ZNSt12_Vector_baseIiSaIiEED1Ev
	.set	_ZNSt12_Vector_baseIiSaIiEED1Ev,_ZNSt12_Vector_baseIiSaIiEED2Ev
	.section	.text._ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_,"axG",@progbits,_ZNSt6vectorIiSaIiEEC5ESt16initializer_listIiERKS0_,comdat
	.align 2
	.weak	_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_
	.type	_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_, @function
_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_:
.LFB4085:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4085
	endbr64
	movabsq	$9223372036854775804, %rax
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	0(,%rdx,4), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	$0, (%rdi)
	movq	$0, 8(%rdi)
	movq	$0, 16(%rdi)
	cmpq	%rax, %r12
	jbe	.L60
	leaq	.LC4(%rip), %rdi
.LEHB3:
	call	_ZSt20__throw_length_errorPKc@PLT
.L60:
	movq	%rsi, %rbx
	testq	%r12, %r12
	je	.L64
	movq	%r12, %rdi
	call	_Znwm@PLT
.LEHE3:
	jmp	.L61
.L64:
	xorl	%eax, %eax
.L61:
	leaq	(%rax,%r12), %rdx
	movq	%rax, 0(%rbp)
	movq	%rdx, 16(%rbp)
	testq	%r12, %r12
	je	.L62
	movq	%rax, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rcx
	rep movsb
.L62:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movq	%rdx, 8(%rbp)
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L65:
	.cfi_restore_state
	endbr64
	movq	%rax, %r12
.L63:
	movq	%rbp, %rdi
	call	_ZNSt12_Vector_baseIiSaIiEED2Ev
	movq	%r12, %rdi
.LEHB4:
	call	_Unwind_Resume@PLT
.LEHE4:
	.cfi_endproc
.LFE4085:
	.section	.gcc_except_table
.LLSDA4085:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4085-.LLSDACSB4085
.LLSDACSB4085:
	.uleb128 .LEHB3-.LFB4085
	.uleb128 .LEHE3-.LEHB3
	.uleb128 .L65-.LFB4085
	.uleb128 0
	.uleb128 .LEHB4-.LFB4085
	.uleb128 .LEHE4-.LEHB4
	.uleb128 0
	.uleb128 0
.LLSDACSE4085:
	.section	.text._ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_,"axG",@progbits,_ZNSt6vectorIiSaIiEEC5ESt16initializer_listIiERKS0_,comdat
	.size	_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_, .-_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_
	.weak	_ZNSt6vectorIiSaIiEEC1ESt16initializer_listIiERKS0_
	.set	_ZNSt6vectorIiSaIiEEC1ESt16initializer_listIiERKS0_,_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB3731:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA3731
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$5, %edx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	subq	$96, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	movabsq	$8589934592, %rax
	leaq	68(%rsp), %rbp
	leaq	40(%rsp), %r12
	movl	$4, 84(%rsp)
	leaq	16(%rsp), %r13
	movq	%r12, %rcx
	movq	%rbp, %rsi
	movq	%r13, %rdi
	movq	%rax, 68(%rsp)
	movabsq	$17179869187, %rax
	movq	%rax, 76(%rsp)
.LEHB5:
	call	_ZNSt6vectorIiSaIiEEC1ESt16initializer_listIiERKS0_
.LEHE5:
	leaq	15(%rsp), %rcx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	movabsq	$8589934593, %rax
	movl	$4, %edx
	movq	$2, 76(%rsp)
	movq	%rax, 68(%rsp)
.LEHB6:
	call	_ZNSt6vectorIiSaIiEEC1ESt16initializer_listIiERKS0_
.LEHE6:
	movl	$4, %edx
	movq	%r12, %rsi
	movq	%r13, %rdi
.LEHB7:
	call	_Z8pagerankRKSt6vectorIiSaIiEES3_i
.LEHE7:
	movq	%r12, %rdi
	call	_ZNSt12_Vector_baseIiSaIiEED2Ev
	movq	%r13, %rdi
	call	_ZNSt12_Vector_baseIiSaIiEED2Ev
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	je	.L74
	call	__stack_chk_fail@PLT
.L76:
	endbr64
	movq	%rax, %rbp
.L72:
	movq	%r12, %rdi
	call	_ZNSt12_Vector_baseIiSaIiEED2Ev
	jmp	.L73
.L75:
	endbr64
	movq	%rax, %rbp
.L73:
	movq	%r13, %rdi
	call	_ZNSt12_Vector_baseIiSaIiEED2Ev
	movq	%rbp, %rdi
.LEHB8:
	call	_Unwind_Resume@PLT
.LEHE8:
.L74:
	addq	$96, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3731:
	.section	.gcc_except_table
.LLSDA3731:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE3731-.LLSDACSB3731
.LLSDACSB3731:
	.uleb128 .LEHB5-.LFB3731
	.uleb128 .LEHE5-.LEHB5
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB6-.LFB3731
	.uleb128 .LEHE6-.LEHB6
	.uleb128 .L75-.LFB3731
	.uleb128 0
	.uleb128 .LEHB7-.LFB3731
	.uleb128 .LEHE7-.LEHB7
	.uleb128 .L76-.LFB3731
	.uleb128 0
	.uleb128 .LEHB8-.LFB3731
	.uleb128 .LEHE8-.LEHB8
	.uleb128 0
	.uleb128 0
.LLSDACSE3731:
	.section	.text.startup
	.size	main, .-main
	.type	_GLOBAL__sub_I__Z8pagerankRKSt6vectorIiSaIiEES3_i, @function
_GLOBAL__sub_I__Z8pagerankRKSt6vectorIiSaIiEES3_i:
.LFB4518:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	_ZStL8__ioinit(%rip), %rbp
	movq	%rbp, %rdi
	call	_ZNSt8ios_base4InitC1Ev@PLT
	movq	_ZNSt8ios_base4InitD1Ev@GOTPCREL(%rip), %rdi
	movq	%rbp, %rsi
	popq	%rbp
	.cfi_def_cfa_offset 8
	leaq	__dso_handle(%rip), %rdx
	jmp	__cxa_atexit@PLT
	.cfi_endproc
.LFE4518:
	.size	_GLOBAL__sub_I__Z8pagerankRKSt6vectorIiSaIiEES3_i, .-_GLOBAL__sub_I__Z8pagerankRKSt6vectorIiSaIiEES3_i
	.section	.init_array
	.align 8
	.quad	_GLOBAL__sub_I__Z8pagerankRKSt6vectorIiSaIiEES3_i
	.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
	.local	_ZStL8__ioinit
	.comm	_ZStL8__ioinit,1,1
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC5:
	.long	1065353216
	.align 4
.LC6:
	.long	1041865112
	.align 4
.LC7:
	.long	1062836634
	.hidden	DW.ref.__gxx_personality_v0
	.weak	DW.ref.__gxx_personality_v0
	.section	.data.rel.local.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
	.align 8
	.type	DW.ref.__gxx_personality_v0, @object
	.size	DW.ref.__gxx_personality_v0, 8
DW.ref.__gxx_personality_v0:
	.quad	__gxx_personality_v0
	.hidden	__dso_handle
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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:

// pagerank_amd.cpp
#include <hip/hip_runtime.h>
#include <iostream>
#include <vector>

#define CHECK_HIP(call) \
    if ((call) != hipSuccess) { \
        std::cerr << "HIP error at " << __FILE__ << ":" << __LINE__ << std::endl; \
        exit(1); \
    }

const float DAMPING = 0.85f;
const int MAX_ITERS = 100;
const float EPSILON = 1e-6f;

// Kernel to perform one power iteration step
__global__ void pagerank_kernel(const int* row_ptr, const int* col_idx, const float* old_pr, float* new_pr, int num_nodes, float damping, float base_score) {
    int node = blockIdx.x * blockDim.x + threadIdx.x;
    if (node >= num_nodes) return;

    float sum = 0.0f;
    int row_start = row_ptr[node];
    int row_end = row_ptr[node + 1];

    for (int i = row_start; i < row_end; ++i) {
        int incoming_node = col_idx[i];
        int degree = row_ptr[incoming_node + 1] - row_ptr[incoming_node];
        if (degree > 0) {
            sum += old_pr[incoming_node] / degree;
        }
    }
    new_pr[node] = base_score + damping * sum;
}

// Host function to compute pagerank
void pagerank(const std::vector<int>& row_ptr, const std::vector<int>& col_idx, int num_nodes) {
    int* d_row_ptr;
    int* d_col_idx;
    float* d_old_pr;
    float* d_new_pr;

    CHECK_HIP(hipMalloc(&d_row_ptr, (num_nodes + 1) * sizeof(int)));
    CHECK_HIP(hipMalloc(&d_col_idx, col_idx.size() * sizeof(int)));
    CHECK_HIP(hipMalloc(&d_old_pr, num_nodes * sizeof(float)));
    CHECK_HIP(hipMalloc(&d_new_pr, num_nodes * sizeof(float)));

    CHECK_HIP(hipMemcpy(d_row_ptr, row_ptr.data(), (num_nodes + 1) * sizeof(int), hipMemcpyHostToDevice));
    CHECK_HIP(hipMemcpy(d_col_idx, col_idx.data(), col_idx.size() * sizeof(int), hipMemcpyHostToDevice));

    std::vector<float> pr(num_nodes, 1.0f / num_nodes);
    CHECK_HIP(hipMemcpy(d_old_pr, pr.data(), num_nodes * sizeof(float), hipMemcpyHostToDevice));

    float base_score = (1.0f - DAMPING) / num_nodes;
    int threads_per_block = 256;
    int blocks_per_grid = (num_nodes + threads_per_block - 1) / threads_per_block;

    for (int iter = 0; iter < MAX_ITERS; ++iter) {
        hipLaunchKernelGGL(pagerank_kernel, dim3(blocks_per_grid), dim3(threads_per_block), 0, 0,
                           d_row_ptr, d_col_idx, d_old_pr, d_new_pr, num_nodes, DAMPING, base_score);
        CHECK_HIP(hipDeviceSynchronize());

        // Swap pointers
        std::swap(d_old_pr, d_new_pr);
    }

    CHECK_HIP(hipMemcpy(pr.data(), d_old_pr, num_nodes * sizeof(float), hipMemcpyDeviceToHost));

    std::cout << "PageRank Scores after " << MAX_ITERS << " iterations:\n";
    for (int i = 0; i < num_nodes; ++i) {
        std::cout << "Node " << i << ": " << pr[i] << "\n";
    }

    hipFree(d_row_ptr);
    hipFree(d_col_idx);
    hipFree(d_old_pr);
    hipFree(d_new_pr);
}

int main() {
    // Example graph: 4 nodes
    // 0 -> 1, 2
    // 1 -> 2
    // 2 -> 0
    // 3 -> 2
    std::vector<int> row_ptr = {0, 2, 3, 4, 4}; // Size = num_nodes + 1
    std::vector<int> col_idx = {1, 2, 2, 0};    // List of edges

    int num_nodes = 4;
    pagerank(row_ptr, col_idx, num_nodes);

    return 0;
}

	.text
	.file	"39.cpp"
                                        # Start of file scope inline assembly
	.globl	_ZSt21ios_base_library_initv

                                        # End of file scope inline assembly
	.globl	_Z30__device_stub__pagerank_kernelPKiS0_PKfPfiff # -- Begin function _Z30__device_stub__pagerank_kernelPKiS0_PKfPfiff
	.p2align	4, 0x90
	.type	_Z30__device_stub__pagerank_kernelPKiS0_PKfPfiff,@function
_Z30__device_stub__pagerank_kernelPKiS0_PKfPfiff: # @_Z30__device_stub__pagerank_kernelPKiS0_PKfPfiff
	.cfi_startproc
# %bb.0:
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 88(%rsp)
	movq	%rsi, 80(%rsp)
	movq	%rdx, 72(%rsp)
	movq	%rcx, 64(%rsp)
	movl	%r8d, 12(%rsp)
	movss	%xmm0, 8(%rsp)
	movss	%xmm1, 4(%rsp)
	leaq	88(%rsp), %rax
	movq	%rax, 96(%rsp)
	leaq	80(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	72(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	64(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	48(%rsp), %rdi
	leaq	32(%rsp), %rsi
	leaq	24(%rsp), %rdx
	leaq	16(%rsp), %rcx
	callq	__hipPopCallConfiguration
	movq	48(%rsp), %rsi
	movl	56(%rsp), %edx
	movq	32(%rsp), %rcx
	movl	40(%rsp), %r8d
	leaq	96(%rsp), %r9
	movl	$_Z15pagerank_kernelPKiS0_PKfPfiff, %edi
	pushq	16(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	32(%rsp)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$168, %rsp
	.cfi_adjust_cfa_offset -168
	retq
.Lfunc_end0:
	.size	_Z30__device_stub__pagerank_kernelPKiS0_PKfPfiff, .Lfunc_end0-_Z30__device_stub__pagerank_kernelPKiS0_PKfPfiff
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z8pagerankRKSt6vectorIiSaIiEES3_i
.LCPI1_0:
	.long	0x3f800000                      # float 1
.LCPI1_1:
	.long	0x3e199998                      # float 0.149999976
	.text
	.globl	_Z8pagerankRKSt6vectorIiSaIiEES3_i
	.p2align	4, 0x90
	.type	_Z8pagerankRKSt6vectorIiSaIiEES3_i,@function
_Z8pagerankRKSt6vectorIiSaIiEES3_i:     # @_Z8pagerankRKSt6vectorIiSaIiEES3_i
.Lfunc_begin0:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception0
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$200, %rsp
	.cfi_def_cfa_offset 256
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movslq	%edx, %r15
	leaq	4(,%r15,4), %r12
	.cfi_escape 0x2e, 0x00
	leaq	40(%rsp), %rdi
	movq	%r12, %rsi
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB1_1
# %bb.3:
	movq	8(%rbx), %rsi
	subq	(%rbx), %rsi
	.cfi_escape 0x2e, 0x00
	leaq	32(%rsp), %rdi
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB1_4
# %bb.5:
	shlq	$2, %r15
	.cfi_escape 0x2e, 0x00
	leaq	16(%rsp), %rdi
	movq	%r15, %rsi
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB1_6
# %bb.7:
	.cfi_escape 0x2e, 0x00
	leaq	24(%rsp), %rdi
	movq	%r15, %rsi
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB1_8
# %bb.9:
	movq	40(%rsp), %rdi
	movq	(%r13), %rsi
	.cfi_escape 0x2e, 0x00
	movq	%r12, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB1_10
# %bb.11:
	movq	32(%rsp), %rdi
	movq	(%rbx), %rsi
	movq	8(%rbx), %rdx
	subq	%rsi, %rdx
	.cfi_escape 0x2e, 0x00
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB1_12
# %bb.13:
	testl	%r14d, %r14d
	js	.LBB1_75
# %bb.14:                               # %_ZNSt6vectorIfSaIfEE17_S_check_init_lenEmRKS0_.exit.i
	je	.LBB1_15
# %bb.16:                               # %_ZNSt16allocator_traitsISaIfEE8allocateERS0_m.exit.i.i.i.i
	.cfi_escape 0x2e, 0x00
	movq	%r15, %rdi
	callq	_Znwm
	movq	%rax, %rbx
	jmp	.LBB1_17
.LBB1_15:
	xorl	%ebx, %ebx
.LBB1_17:                               # %_ZNSt12_Vector_baseIfSaIfEEC2EmRKS0_.exit.i
	cvtsi2ss	%r14d, %xmm1
	testl	%r14d, %r14d
	je	.LBB1_20
# %bb.18:                               # %.lr.ph.i.i.i.i.i.i.i.i.i.preheader
	movss	.LCPI1_0(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	divss	%xmm1, %xmm0
	xorl	%eax, %eax
	.p2align	4, 0x90
.LBB1_19:                               # %.lr.ph.i.i.i.i.i.i.i.i.i
                                        # =>This Inner Loop Header: Depth=1
	movss	%xmm0, (%rbx,%rax)
	addq	$4, %rax
	cmpq	%rax, %r15
	jne	.LBB1_19
.LBB1_20:                               # %_ZNSt6vectorIfSaIfEEC2EmRKfRKS0_.exit
	movss	%xmm1, 12(%rsp)                 # 4-byte Spill
	movq	16(%rsp), %rdi
.Ltmp0:
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rsi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp1:
# %bb.21:
	testl	%eax, %eax
	movss	12(%rsp), %xmm1                 # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	jne	.LBB1_22
# %bb.28:
	movss	.LCPI1_1(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	divss	%xmm1, %xmm0
	movss	%xmm0, 12(%rsp)                 # 4-byte Spill
	leal	255(%r14), %eax
	shrl	$8, %eax
	movabsq	$4294967296, %r12               # imm = 0x100000000
	orq	%rax, %r12
	movl	$100, %ebp
	movabsq	$4294967552, %r13               # imm = 0x100000100
	.p2align	4, 0x90
.LBB1_29:                               # =>This Inner Loop Header: Depth=1
.Ltmp13:
	.cfi_escape 0x2e, 0x00
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp14:
# %bb.30:                               #   in Loop: Header=BB1_29 Depth=1
	testl	%eax, %eax
	jne	.LBB1_33
# %bb.31:                               #   in Loop: Header=BB1_29 Depth=1
	movq	40(%rsp), %rax
	movq	32(%rsp), %rcx
	movq	16(%rsp), %rdx
	movq	24(%rsp), %rsi
	movq	%rax, 136(%rsp)
	movq	%rcx, 128(%rsp)
	movq	%rdx, 120(%rsp)
	movq	%rsi, 112(%rsp)
	movl	%r14d, 60(%rsp)
	movl	$1062836634, 56(%rsp)           # imm = 0x3F59999A
	movss	12(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 52(%rsp)
	leaq	136(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	128(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	120(%rsp), %rax
	movq	%rax, 160(%rsp)
	leaq	112(%rsp), %rax
	movq	%rax, 168(%rsp)
	leaq	60(%rsp), %rax
	movq	%rax, 176(%rsp)
	leaq	56(%rsp), %rax
	movq	%rax, 184(%rsp)
	leaq	52(%rsp), %rax
	movq	%rax, 192(%rsp)
.Ltmp15:
	.cfi_escape 0x2e, 0x00
	leaq	96(%rsp), %rdi
	leaq	80(%rsp), %rsi
	leaq	72(%rsp), %rdx
	leaq	64(%rsp), %rcx
	callq	__hipPopCallConfiguration
.Ltmp16:
# %bb.32:                               # %.noexc55
                                        #   in Loop: Header=BB1_29 Depth=1
	movq	96(%rsp), %rsi
	movl	104(%rsp), %edx
	movq	80(%rsp), %rcx
	movl	88(%rsp), %r8d
.Ltmp17:
	.cfi_escape 0x2e, 0x10
	movl	$_Z15pagerank_kernelPKiS0_PKfPfiff, %edi
	leaq	144(%rsp), %r9
	pushq	64(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	80(%rsp)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
.Ltmp18:
.LBB1_33:                               #   in Loop: Header=BB1_29 Depth=1
.Ltmp19:
	.cfi_escape 0x2e, 0x00
	callq	hipDeviceSynchronize
.Ltmp20:
# %bb.34:                               #   in Loop: Header=BB1_29 Depth=1
	testl	%eax, %eax
	jne	.LBB1_35
# %bb.43:                               #   in Loop: Header=BB1_29 Depth=1
	movq	16(%rsp), %rax
	movq	24(%rsp), %rcx
	movq	%rcx, 16(%rsp)
	movq	%rax, 24(%rsp)
	decl	%ebp
	jne	.LBB1_29
# %bb.44:
	movq	16(%rsp), %rsi
.Ltmp33:
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rdi
	movq	%r15, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp34:
# %bb.45:
	testl	%eax, %eax
	jne	.LBB1_46
# %bb.53:
.Ltmp45:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cout, %edi
	movl	$.L.str.3, %esi
	movl	$22, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp46:
# %bb.54:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit74
.Ltmp47:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cout, %edi
	movl	$100, %esi
	callq	_ZNSolsEi
.Ltmp48:
# %bb.55:
.Ltmp49:
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.4, %esi
	movl	$13, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp50:
# %bb.56:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit76.preheader
	testl	%r14d, %r14d
	je	.LBB1_64
# %bb.57:                               # %.lr.ph.preheader
	cmpl	$2, %r14d
	movl	$1, %r12d
	cmovgel	%r14d, %r12d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
.LBB1_58:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
.Ltmp51:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cout, %edi
	movl	$.L.str.5, %esi
	movl	$5, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp52:
# %bb.59:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit78
                                        #   in Loop: Header=BB1_58 Depth=1
.Ltmp53:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cout, %edi
	movl	%r14d, %esi
	callq	_ZNSolsEi
.Ltmp54:
# %bb.60:                               #   in Loop: Header=BB1_58 Depth=1
.Ltmp55:
	movq	%rax, %r15
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.6, %esi
	movl	$2, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp56:
# %bb.61:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit80
                                        #   in Loop: Header=BB1_58 Depth=1
	movss	(%rbx,%r14,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	cvtss2sd	%xmm0, %xmm0
.Ltmp57:
	.cfi_escape 0x2e, 0x00
	movq	%r15, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp58:
# %bb.62:                               # %_ZNSolsEf.exit
                                        #   in Loop: Header=BB1_58 Depth=1
.Ltmp59:
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.7, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp60:
# %bb.63:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit83
                                        #   in Loop: Header=BB1_58 Depth=1
	incq	%r14
	cmpq	%r14, %r12
	jne	.LBB1_58
.LBB1_64:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit76._crit_edge
	movq	40(%rsp), %rdi
.Ltmp62:
	.cfi_escape 0x2e, 0x00
	callq	hipFree
.Ltmp63:
# %bb.65:
	movq	32(%rsp), %rdi
.Ltmp64:
	.cfi_escape 0x2e, 0x00
	callq	hipFree
.Ltmp65:
# %bb.66:
	movq	16(%rsp), %rdi
.Ltmp66:
	.cfi_escape 0x2e, 0x00
	callq	hipFree
.Ltmp67:
# %bb.67:
	movq	24(%rsp), %rdi
.Ltmp68:
	.cfi_escape 0x2e, 0x00
	callq	hipFree
.Ltmp69:
# %bb.68:
	testq	%rbx, %rbx
	je	.LBB1_70
# %bb.69:
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rdi
	callq	_ZdlPv
.LBB1_70:                               # %_ZNSt6vectorIfSaIfEED2Ev.exit
	addq	$200, %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
.LBB1_35:
	.cfi_def_cfa_offset 256
.Ltmp22:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cerr, %edi
	movl	$.L.str, %esi
	movl	$13, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp23:
# %bb.36:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit58
.Ltmp24:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.1, %esi
	movl	$6, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp25:
# %bb.37:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit60
.Ltmp26:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.2, %esi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp27:
# %bb.38:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit62
.Ltmp28:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cerr, %edi
	movl	$60, %esi
	callq	_ZNSolsEi
.Ltmp29:
# %bb.39:
.Ltmp30:
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	callq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
.Ltmp31:
# %bb.40:                               # %_ZNSolsEPFRSoS_E.exit64
	.cfi_escape 0x2e, 0x00
	movl	$1, %edi
	callq	exit
.LBB1_1:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cerr, %edi
	movl	$.L.str, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.1, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.2, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	movl	$42, %esi
	jmp	.LBB1_2
.LBB1_4:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cerr, %edi
	movl	$.L.str, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.1, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.2, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	movl	$43, %esi
	jmp	.LBB1_2
.LBB1_6:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cerr, %edi
	movl	$.L.str, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.1, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.2, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	movl	$44, %esi
	jmp	.LBB1_2
.LBB1_8:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cerr, %edi
	movl	$.L.str, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.1, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.2, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	movl	$45, %esi
	jmp	.LBB1_2
.LBB1_10:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cerr, %edi
	movl	$.L.str, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.1, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.2, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	movl	$47, %esi
	jmp	.LBB1_2
.LBB1_12:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cerr, %edi
	movl	$.L.str, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.1, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.2, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	movl	$48, %esi
.LBB1_2:
	callq	_ZNSolsEi
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	callq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
	.cfi_escape 0x2e, 0x00
	movl	$1, %edi
	callq	exit
.LBB1_75:                               # %.noexc
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.8, %edi
	callq	_ZSt20__throw_length_errorPKc
.LBB1_22:
.Ltmp2:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cerr, %edi
	movl	$.L.str, %esi
	movl	$13, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp3:
# %bb.23:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
.Ltmp4:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.1, %esi
	movl	$6, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp5:
# %bb.24:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit51
.Ltmp6:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.2, %esi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp7:
# %bb.25:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit53
.Ltmp8:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cerr, %edi
	movl	$51, %esi
	callq	_ZNSolsEi
.Ltmp9:
# %bb.26:
.Ltmp10:
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	callq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
.Ltmp11:
# %bb.27:                               # %_ZNSolsEPFRSoS_E.exit
	.cfi_escape 0x2e, 0x00
	movl	$1, %edi
	callq	exit
.LBB1_46:
.Ltmp35:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cerr, %edi
	movl	$.L.str, %esi
	movl	$13, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp36:
# %bb.47:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit66
.Ltmp37:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.1, %esi
	movl	$6, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp38:
# %bb.48:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit68
.Ltmp39:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.2, %esi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp40:
# %bb.49:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit70
.Ltmp41:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cerr, %edi
	movl	$66, %esi
	callq	_ZNSolsEi
.Ltmp42:
# %bb.50:
.Ltmp43:
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	callq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
.Ltmp44:
# %bb.51:                               # %_ZNSolsEPFRSoS_E.exit72
	.cfi_escape 0x2e, 0x00
	movl	$1, %edi
	callq	exit
.LBB1_71:
.Ltmp12:
	jmp	.LBB1_72
.LBB1_52:
.Ltmp70:
	jmp	.LBB1_72
.LBB1_42:                               # %.loopexit.split-lp
.Ltmp32:
	jmp	.LBB1_72
.LBB1_41:                               # %.loopexit
.Ltmp21:
	jmp	.LBB1_72
.LBB1_76:
.Ltmp61:
.LBB1_72:
	movq	%rax, %r14
	testq	%rbx, %rbx
	je	.LBB1_74
# %bb.73:
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rdi
	callq	_ZdlPv
.LBB1_74:                               # %_ZNSt6vectorIfSaIfEED2Ev.exit85
	.cfi_escape 0x2e, 0x00
	movq	%r14, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end1:
	.size	_Z8pagerankRKSt6vectorIiSaIiEES3_i, .Lfunc_end1-_Z8pagerankRKSt6vectorIiSaIiEES3_i
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table1:
.Lexception0:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end0-.Lcst_begin0
.Lcst_begin0:
	.uleb128 .Lfunc_begin0-.Lfunc_begin0    # >> Call Site 1 <<
	.uleb128 .Ltmp0-.Lfunc_begin0           #   Call between .Lfunc_begin0 and .Ltmp0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp0-.Lfunc_begin0           # >> Call Site 2 <<
	.uleb128 .Ltmp1-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp1
	.uleb128 .Ltmp12-.Lfunc_begin0          #     jumps to .Ltmp12
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp13-.Lfunc_begin0          # >> Call Site 3 <<
	.uleb128 .Ltmp20-.Ltmp13                #   Call between .Ltmp13 and .Ltmp20
	.uleb128 .Ltmp21-.Lfunc_begin0          #     jumps to .Ltmp21
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp33-.Lfunc_begin0          # >> Call Site 4 <<
	.uleb128 .Ltmp50-.Ltmp33                #   Call between .Ltmp33 and .Ltmp50
	.uleb128 .Ltmp70-.Lfunc_begin0          #     jumps to .Ltmp70
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp51-.Lfunc_begin0          # >> Call Site 5 <<
	.uleb128 .Ltmp60-.Ltmp51                #   Call between .Ltmp51 and .Ltmp60
	.uleb128 .Ltmp61-.Lfunc_begin0          #     jumps to .Ltmp61
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp62-.Lfunc_begin0          # >> Call Site 6 <<
	.uleb128 .Ltmp69-.Ltmp62                #   Call between .Ltmp62 and .Ltmp69
	.uleb128 .Ltmp70-.Lfunc_begin0          #     jumps to .Ltmp70
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp22-.Lfunc_begin0          # >> Call Site 7 <<
	.uleb128 .Ltmp31-.Ltmp22                #   Call between .Ltmp22 and .Ltmp31
	.uleb128 .Ltmp32-.Lfunc_begin0          #     jumps to .Ltmp32
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp31-.Lfunc_begin0          # >> Call Site 8 <<
	.uleb128 .Ltmp2-.Ltmp31                 #   Call between .Ltmp31 and .Ltmp2
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp2-.Lfunc_begin0           # >> Call Site 9 <<
	.uleb128 .Ltmp11-.Ltmp2                 #   Call between .Ltmp2 and .Ltmp11
	.uleb128 .Ltmp12-.Lfunc_begin0          #     jumps to .Ltmp12
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp35-.Lfunc_begin0          # >> Call Site 10 <<
	.uleb128 .Ltmp44-.Ltmp35                #   Call between .Ltmp35 and .Ltmp44
	.uleb128 .Ltmp70-.Lfunc_begin0          #     jumps to .Ltmp70
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp44-.Lfunc_begin0          # >> Call Site 11 <<
	.uleb128 .Lfunc_end1-.Ltmp44            #   Call between .Ltmp44 and .Lfunc_end1
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0                          # -- Begin function main
.LCPI2_0:
	.long	1                               # 0x1
	.long	2                               # 0x2
	.long	2                               # 0x2
	.long	0                               # 0x0
.LCPI2_1:
	.zero	16
	.text
	.globl	main
	.p2align	4, 0x90
	.type	main,@function
main:                                   # @main
.Lfunc_begin1:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception1
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	subq	$64, %rsp
	.cfi_def_cfa_offset 96
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	xorps	%xmm0, %xmm0
	movaps	%xmm0, 32(%rsp)
	movq	$0, 48(%rsp)
.Ltmp71:
	movl	$20, %edi
	callq	_Znwm
.Ltmp72:
# %bb.1:                                # %_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_.exit
	movq	%rax, %rbx
	movq	%rax, 32(%rsp)
	addq	$20, %rax
	movq	%rax, 48(%rsp)
	movups	.Lconstinit(%rip), %xmm0
	movups	%xmm0, (%rbx)
	movl	$4, 16(%rbx)
	movq	%rax, 40(%rsp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, (%rsp)
	movq	$0, 16(%rsp)
.Ltmp74:
	movl	$16, %edi
	callq	_Znwm
.Ltmp75:
# %bb.2:                                # %_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_.exit13
	movq	%rax, %r15
	movq	%rax, (%rsp)
	addq	$16, %rax
	movq	%rax, 16(%rsp)
	movaps	.LCPI2_0(%rip), %xmm0           # xmm0 = [1,2,2,0]
	movups	%xmm0, (%r15)
	movq	%rax, 8(%rsp)
.Ltmp77:
	leaq	32(%rsp), %rdi
	movq	%rsp, %rsi
	movl	$4, %edx
	callq	_Z8pagerankRKSt6vectorIiSaIiEES3_i
.Ltmp78:
# %bb.3:                                # %_ZNSt6vectorIiSaIiEED2Ev.exit
	movq	%r15, %rdi
	callq	_ZdlPv
	movq	%rbx, %rdi
	callq	_ZdlPv
	xorl	%eax, %eax
	addq	$64, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.LBB2_4:                                # %_ZNSt6vectorIiSaIiEED2Ev.exit20
	.cfi_def_cfa_offset 96
.Ltmp79:
	movq	%rax, %r14
	jmp	.LBB2_5
.LBB2_9:
.Ltmp76:
	movq	%rax, %r14
	movq	(%rsp), %r15
	testq	%r15, %r15
	je	.LBB2_6
.LBB2_5:                                # %.body11.sink.split
	movq	%r15, %rdi
	callq	_ZdlPv
	jmp	.LBB2_6
.LBB2_8:
.Ltmp73:
	movq	%rax, %r14
	movq	32(%rsp), %rbx
	testq	%rbx, %rbx
	je	.LBB2_7
.LBB2_6:                                # %.body.sink.split
	movq	%rbx, %rdi
	callq	_ZdlPv
.LBB2_7:                                # %.body
	movq	%r14, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end2:
	.size	main, .Lfunc_end2-main
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table2:
.Lexception1:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end1-.Lcst_begin1
.Lcst_begin1:
	.uleb128 .Ltmp71-.Lfunc_begin1          # >> Call Site 1 <<
	.uleb128 .Ltmp72-.Ltmp71                #   Call between .Ltmp71 and .Ltmp72
	.uleb128 .Ltmp73-.Lfunc_begin1          #     jumps to .Ltmp73
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp74-.Lfunc_begin1          # >> Call Site 2 <<
	.uleb128 .Ltmp75-.Ltmp74                #   Call between .Ltmp74 and .Ltmp75
	.uleb128 .Ltmp76-.Lfunc_begin1          #     jumps to .Ltmp76
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp77-.Lfunc_begin1          # >> Call Site 3 <<
	.uleb128 .Ltmp78-.Ltmp77                #   Call between .Ltmp77 and .Ltmp78
	.uleb128 .Ltmp79-.Lfunc_begin1          #     jumps to .Ltmp79
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp78-.Lfunc_begin1          # >> Call Site 4 <<
	.uleb128 .Lfunc_end2-.Ltmp78            #   Call between .Ltmp78 and .Lfunc_end2
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end1:
	.p2align	2, 0x0
                                        # -- End function
	.text
	.p2align	4, 0x90                         # -- Begin function __hip_module_ctor
	.type	__hip_module_ctor,@function
__hip_module_ctor:                      # @__hip_module_ctor
	.cfi_startproc
# %bb.0:
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	cmpq	$0, __hip_gpubin_handle(%rip)
	jne	.LBB3_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB3_2:
	movq	__hip_gpubin_handle(%rip), %rdi
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z15pagerank_kernelPKiS0_PKfPfiff, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$40, %rsp
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end3:
	.size	__hip_module_ctor, .Lfunc_end3-__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	.LBB4_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
.LBB4_2:
	retq
.Lfunc_end4:
	.size	__hip_module_dtor, .Lfunc_end4-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z15pagerank_kernelPKiS0_PKfPfiff,@object # @_Z15pagerank_kernelPKiS0_PKfPfiff
	.section	.rodata,"a",@progbits
	.globl	_Z15pagerank_kernelPKiS0_PKfPfiff
	.p2align	3, 0x0
_Z15pagerank_kernelPKiS0_PKfPfiff:
	.quad	_Z30__device_stub__pagerank_kernelPKiS0_PKfPfiff
	.size	_Z15pagerank_kernelPKiS0_PKfPfiff, 8

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"HIP error at "
	.size	.L.str, 14

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"39.cpp"
	.size	.L.str.1, 7

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

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"PageRank Scores after "
	.size	.L.str.3, 23

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	" iterations:\n"
	.size	.L.str.4, 14

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"Node "
	.size	.L.str.5, 6

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

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"\n"
	.size	.L.str.7, 2

	.type	.Lconstinit,@object             # @constinit
	.section	.rodata,"a",@progbits
	.p2align	2, 0x0
.Lconstinit:
	.long	0                               # 0x0
	.long	2                               # 0x2
	.long	3                               # 0x3
	.long	4                               # 0x4
	.long	4                               # 0x4
	.size	.Lconstinit, 20

	.type	.L.str.8,@object                # @.str.8
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.8:
	.asciz	"cannot create std::vector larger than max_size()"
	.size	.L.str.8, 49

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

	.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

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

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z15pagerank_kernelPKiS0_PKfPfiff ; -- Begin function _Z15pagerank_kernelPKiS0_PKfPfiff
	.globl	_Z15pagerank_kernelPKiS0_PKfPfiff
	.p2align	8
	.type	_Z15pagerank_kernelPKiS0_PKfPfiff,@function
_Z15pagerank_kernelPKiS0_PKfPfiff:      ; @_Z15pagerank_kernelPKiS0_PKfPfiff
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x3c
	s_load_b32 s3, s[0:1], 0x20
	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[1:2], null, s15, s2, v[0:1]
	s_mov_b32 s2, exec_lo
	v_cmpx_gt_i32_e64 s3, v1
	s_cbranch_execz .LBB0_8
; %bb.1:
	s_load_b64 s[8:9], s[0:1], 0x0
	v_ashrrev_i32_e32 v2, 31, v1
	v_mov_b32_e32 v0, 0
	s_mov_b32 s3, exec_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[3:4], 2, v[1:2]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v3, vcc_lo, s8, v3
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v4, vcc_lo, s9, v4, vcc_lo
	global_load_b64 v[3:4], v[3:4], off
	s_waitcnt vmcnt(0)
	v_cmpx_lt_i32_e64 v3, v4
	s_cbranch_execz .LBB0_7
; %bb.2:                                ; %.lr.ph.preheader
	s_load_b128 s[4:7], s[0:1], 0x8
	v_ashrrev_i32_e32 v6, 31, v3
	v_dual_mov_b32 v5, v3 :: v_dual_mov_b32 v0, 0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[5:6], 2, v[5:6]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v5, vcc_lo, s4, v5
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v6, vcc_lo, s5, v6, vcc_lo
	s_mov_b32 s4, 0
	s_branch .LBB0_4
.LBB0_3:                                ;   in Loop: Header=BB0_4 Depth=1
	s_or_b32 exec_lo, exec_lo, s2
	v_add_nc_u32_e32 v3, 1, v3
	v_add_co_u32 v5, s2, v5, 4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e64 v6, s2, 0, v6, s2
	v_cmp_ge_i32_e32 vcc_lo, v3, v4
	s_or_b32 s4, vcc_lo, s4
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s4
	s_cbranch_execz .LBB0_6
.LBB0_4:                                ; %.lr.ph
                                        ; =>This Inner Loop Header: Depth=1
	global_load_b32 v7, v[5:6], off
	s_mov_b32 s2, exec_lo
	s_waitcnt vmcnt(0)
	v_ashrrev_i32_e32 v8, 31, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[7:8], 2, v[7:8]
	v_add_co_u32 v9, vcc_lo, s8, v7
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_add_co_ci_u32_e32 v10, vcc_lo, s9, v8, vcc_lo
	global_load_b64 v[9:10], v[9:10], off
	s_waitcnt vmcnt(0)
	v_sub_nc_u32_e32 v9, v10, v9
	v_cmpx_lt_i32_e32 0, v9
	s_cbranch_execz .LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	v_add_co_u32 v7, vcc_lo, s6, v7
	v_add_co_ci_u32_e32 v8, vcc_lo, s7, v8, vcc_lo
	global_load_b32 v7, v[7:8], off
	v_cvt_f32_i32_e32 v8, v9
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_scale_f32 v9, null, v8, v8, v7
	v_rcp_f32_e32 v10, v9
	s_waitcnt_depctr 0xfff
	v_fma_f32 v11, -v9, v10, 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v10, v11, v10
	v_div_scale_f32 v11, vcc_lo, v7, v8, v7
	v_mul_f32_e32 v12, v11, v10
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f32 v13, -v9, v12, v11
	v_fmac_f32_e32 v12, v13, v10
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f32 v9, -v9, v12, v11
	v_div_fmas_f32 v9, v9, v10, v12
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fixup_f32 v7, v9, v8, v7
	v_add_f32_e32 v0, v0, v7
	s_branch .LBB0_3
.LBB0_6:                                ; %Flow
	s_or_b32 exec_lo, exec_lo, s4
.LBB0_7:                                ; %Flow48
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 exec_lo, exec_lo, s3
	s_clause 0x1
	s_load_b64 s[2:3], s[0:1], 0x24
	s_load_b64 s[0:1], s[0:1], 0x18
	v_lshlrev_b64 v[1:2], 2, v[1:2]
	s_waitcnt lgkmcnt(0)
	v_fma_f32 v3, v0, s2, s3
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v0, vcc_lo, s0, v1
	v_add_co_ci_u32_e32 v1, vcc_lo, s1, v2, vcc_lo
	global_store_b32 v[0:1], v3, off
.LBB0_8:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z15pagerank_kernelPKiS0_PKfPfiff
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 304
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 14
		.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	_Z15pagerank_kernelPKiS0_PKfPfiff, .Lfunc_end0-_Z15pagerank_kernelPKiS0_PKfPfiff
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 536
; NumSgprs: 18
; NumVgprs: 14
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 14
; 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
      - .offset:         32
        .size:           4
        .value_kind:     by_value
      - .offset:         36
        .size:           4
        .value_kind:     by_value
      - .offset:         40
        .size:           4
        .value_kind:     by_value
      - .offset:         48
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         52
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         56
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         60
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         62
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         64
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         66
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         68
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         70
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         96
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         104
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         112
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 304
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z15pagerank_kernelPKiS0_PKfPfiff
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z15pagerank_kernelPKiS0_PKfPfiff.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     14
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
