#include <stdio.h>
#include <stdlib.h>
#include <cuda_runtime.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include "assert.h"
using namespace std;


std::vector<int> readFile(string filename)
{
    ifstream infile (filename);
    vector<int> vnum;
    string line;
    int index = 0;

    while(getline(infile, line))
    {
        stringstream ss (line);
        string sint;
        while(getline(ss, sint, ','))
        {
            vnum.push_back(stoi(sint));
            index += 1;
        }
    }

    return vnum;
}


void writeFile(const char* filename, int* data, int limit)
{
    ofstream myfile(filename);
    if (myfile.is_open())
    {
        for (int i = 0; i < limit; i++)
        {
            myfile << data[i];
         if(i!= limit-1)
            myfile << ", ";
        }
        myfile.close();
    }
    else
    {
        printf("Unable to open/write to file %s", filename);
    }

}

__global__ void q2a_global_counter(int* gpu_out, int* gpu_in, int n)
{
    int idx = threadIdx.x + blockIdx.x * blockDim.x;
    int numbersPerBlockThread = (n / (blockDim.x * gridDim.x)) + 1;
    int start = idx * numbersPerBlockThread;
    int stop = min(n, (start + numbersPerBlockThread));

    for(int i=start; i<stop; i++)
    {
        int hundreds_value = gpu_in[i] / 100;
        atomicAdd(&(gpu_out[hundreds_value]), 1);
    }
    __syncthreads();
}

__global__ void q2b_shared_mem_counter(int* gpu_out, int* gpu_in, int n)
{
    extern __shared__ int shared_out[];
    int idx = threadIdx.x + blockIdx.x * blockDim.x;
    int incrementalAdd = 0;
    if(threadIdx.x == 0)
    {
        shared_out[10] = {0};
    }

    while(idx + incrementalAdd < n)
    {
        int hundreds_val = gpu_in[idx + incrementalAdd] / 100;
        atomicAdd(&shared_out[hundreds_val], 1);
        incrementalAdd += (blockIdx.x+1) * blockDim.x;
    }
    __syncthreads();

    if(idx == 0)
    {
        for(int i=0; i < 10; i++)
        {
            atomicAdd(&(gpu_out[i]), shared_out[i]);
            __syncthreads();
        }
    }
}


__global__ void q2c_prll_prfx_sum(int* gpu_out, int* gpu_in, int n)
{
    // gpu_in = [510,1095,1051,1035,1063,1012,1067,1053,1053,1061]
    // gpu_out =[510, 1605, 2656, 3691, 4754, 5766, 6833, 7886, 8939, 10000]
    extern __shared__ int shared_mem[];

    int tidx = threadIdx.x;
    int idx = tidx + blockIdx.x * blockDim.x;;
    int offset = 1;
    int n2 = (int)pow(2.0, ceil(log((double)n)/log(2.0))); // next power of 2

    if(tidx == 0)
    {
        for(int i=0;i<n2;i++)
        {
            if(i<n)
                shared_mem[i] = gpu_in[i];
            else
                shared_mem[i] = 0; // extend non-power-of-2 entries to 0.
        }
    }
    __syncthreads();

    // UPWARD FIRST PASS SUM

    for(int depth_idx = n2 >> 1; depth_idx > 0; depth_idx >>= 1)
    {
        __syncthreads();

        if(tidx < depth_idx)
        {
            int ai = offset*(2*tidx+1)-1;
            int bi = offset*(2*tidx+2)-1;
            shared_mem[bi] += shared_mem[ai];
        }
        offset <<= 1;
    }

    __syncthreads();

    // UPWARD FIRST PASS ENDS AND 2nd DOWNWARD PASS BEGINS

    if(tidx == 0)
    {
        shared_mem[n2-1] = 0;
    }

    for(int depth_idx=1; depth_idx<n2; depth_idx<<=1)
    {
        offset >>= 1;
        __syncthreads();
        if(tidx < depth_idx)
        {
            int ai = offset*(2*tidx+1)-1;
            int bi = offset*(2*tidx+2)-1;
            if(ai < 0 || bi < 0)
                continue;

            int temp = shared_mem[ai];
            shared_mem[ai] = shared_mem[bi];
            shared_mem[bi] += temp;
        }
    }
    __syncthreads();

    if(idx < n)
    {
        gpu_out[idx] = shared_mem[idx+1];
    }
}


int main(int argc, char **argv)
{
    int deviceCount;
    cudaGetDeviceCount(&deviceCount);
    if (deviceCount == 0) {
        fprintf(stderr, "error: no devices supporting CUDA.\n");
        exit(EXIT_FAILURE);
    }
    int dev = 0;
    cudaSetDevice(dev);

    cudaDeviceProp devProps;
    if (cudaGetDeviceProperties(&devProps, dev) == 0)
    {
        printf("Using device %d: %s\nglobal mem: %dB; compute v%d.%d; clock: %d kHz\n",
               dev, devProps.name, (int)devProps.totalGlobalMem,
               (int)devProps.major, (int)devProps.minor,
               (int)devProps.clockRate);
        printf("sharedMemPerBlock: %zu    sharedMemPerMultiprocessor: %zu\n", devProps.sharedMemPerBlock, devProps.sharedMemPerMultiprocessor);
        printf("regsPerMultiprocessor:  %d\n", devProps.regsPerMultiprocessor);
    }

    vector<int> vnum = readFile("inp.txt");
    // vector<int> vnum = readFile("inp1mil.txt");
    const int IN_SIZE = vnum.size();
    const int IN_BYTES = IN_SIZE * sizeof(int);
    const int OUT_SIZE = 10; //this is specific to the output range.
    const int OUT_BYTES = OUT_SIZE * sizeof(int);

    int* numbers;
    numbers = (int *)malloc(IN_BYTES);
    for(int i=0; i < vnum.size(); i++)
        numbers[i] = vnum[i];

    // int MAX_THREADS_PER_BLOCK  = 512;
    int threads = 32;
    int blocks = 8;

    printf("Input size: %d   blocks: %d   threads: %d\n\n", IN_SIZE, blocks, threads);

    int *gpu_in;
    int *gpu_out_2a;
    int *gpu_out_2b;
    int *gpu_out_2c;


    int cpu_out_2a[OUT_SIZE] = {0};
    int cpu_out_2b[OUT_SIZE] = {0};
    int cpu_out_2c[OUT_SIZE] = {0};

    cudaError_t ret;

    float elapsedTime_2a;
    float elapsedTime_2b;
    float elapsedTime_2c;
    cudaEvent_t start, stop;
    cudaEventCreate(&start);
    cudaEventCreate(&stop);
    

    ret = cudaMalloc((void **) &gpu_in, IN_BYTES);
    printf("gpu_in Malloc %s\n", ret == cudaSuccess ? "Success!": cudaGetErrorString(ret));
    ret = cudaMalloc((void **) &gpu_out_2a, OUT_BYTES);
    printf("gpu_out_2a Malloc %s\n", ret == cudaSuccess ? "Success!": cudaGetErrorString(ret));
    ret = cudaMalloc((void **) &gpu_out_2b, OUT_BYTES);
    printf("gpu_out_2b Malloc %s\n", ret == cudaSuccess ? "Success!": cudaGetErrorString(ret));
    ret = cudaMalloc((void **) &gpu_out_2c, OUT_BYTES);
    printf("gpu_out_2c Malloc %s\n", ret == cudaSuccess ? "Success!": cudaGetErrorString(ret));

    ret = cudaMemcpy((void *)gpu_in, (void *)numbers, IN_BYTES , cudaMemcpyHostToDevice);
    printf("gpu_in Memcpy %s\n", ret == cudaSuccess ? "Success!": cudaGetErrorString(ret));


    // see https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#execution-configuration 
    // for <<<Dg, Db, Ns, S>>> parameter explanation.


    cudaEventRecord(start, 0);
    q2a_global_counter<<<blocks, threads>>>(gpu_out_2a, gpu_in, IN_SIZE);
    cudaEventRecord(stop, 0);
    cudaEventSynchronize(stop);
    cudaEventElapsedTime(&elapsedTime_2a, start, stop);


    cudaEventRecord(start, 0);
    q2b_shared_mem_counter<<<blocks, threads, OUT_SIZE*sizeof(int)>>>(gpu_out_2b, gpu_in, IN_SIZE);
    // ret = cudaPeekAtLastError();
    // printf("cudaPeekAtLastError %s\n", ret == cudaSuccess ? "Success!": cudaGetErrorString(ret));
    cudaEventRecord(stop, 0);
    cudaEventSynchronize(stop);
    cudaEventElapsedTime(&elapsedTime_2b, start, stop);


    cudaEventRecord(start, 0);
    int n2 = (int)pow(2.0, ceil(log((double)OUT_SIZE)/log(2.0))); // next power of 2
    q2c_prll_prfx_sum<<<blocks, threads, (n2)*sizeof(int)>>>(gpu_out_2c, gpu_out_2a, OUT_SIZE);
    cudaEventRecord(stop, 0);
    cudaEventSynchronize(stop);
    cudaEventElapsedTime(&elapsedTime_2c, start, stop);


    ret = cudaMemcpy(cpu_out_2a, gpu_out_2a, OUT_BYTES, cudaMemcpyDeviceToHost);
    printf("cpu_out_2a Memcpy %s\n", ret == cudaSuccess ? "Success!": cudaGetErrorString(ret));
    ret = cudaMemcpy(cpu_out_2b, gpu_out_2b, OUT_BYTES, cudaMemcpyDeviceToHost);
    printf("cpu_out_2b Memcpy %s\n", ret == cudaSuccess ? "Success!": cudaGetErrorString(ret));
    ret = cudaMemcpy(cpu_out_2c, gpu_out_2c, OUT_BYTES, cudaMemcpyDeviceToHost);
    printf("cpu_out_2c Memcpy %s\n", ret == cudaSuccess ? "Success!": cudaGetErrorString(ret));
    

    // correct output:
    // 2a & b): 510, 1095, 1051, 1035, 1063, 1012, 1067, 1053, 1053, 1061
    // 2c) 510, 1605, 2656, 3691, 4754, 5766, 6833, 7886, 8939, 10000


    printf("\n\n2a:   %f\n", elapsedTime_2a);
    for(int i=0;i<OUT_SIZE;i++)
    {
        printf("%d=%d  ", i, cpu_out_2a[i]);
    }
    writeFile("q2a.txt", cpu_out_2a, OUT_SIZE);

    printf("\n\n2b:   %f\n", elapsedTime_2b);
    for(int i=0;i<OUT_SIZE;i++)
    {
        printf("%d=%d  ", i, cpu_out_2b[i]);
    }
    writeFile("q2b.txt", cpu_out_2b, OUT_SIZE);

    printf("\n\n2c:   %f\n", elapsedTime_2c);
    for(int i=0;i<OUT_SIZE;i++)
    {
        printf("%d=%d  ", i, cpu_out_2c[i]);
    }
    writeFile("q2c.txt", cpu_out_2c, OUT_SIZE);

    printf("\n\n");

    cudaFree(gpu_in);
    cudaFree(gpu_out_2a);
    cudaFree(gpu_out_2b);
    cudaFree(gpu_out_2c);
    return 0;
}


	.file	"tmpxft_002a7ea9_00000000-6_q2.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4208:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4208:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z41__device_stub__Z18q2a_global_counterPiS_iPiS_i
	.type	_Z41__device_stub__Z18q2a_global_counterPiS_iPiS_i, @function
_Z41__device_stub__Z18q2a_global_counterPiS_iPiS_i:
.LFB4230:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movl	%edx, 12(%rsp)
	leaq	32(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L2
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z18q2a_global_counterPiS_i(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L2:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4230:
	.size	_Z41__device_stub__Z18q2a_global_counterPiS_iPiS_i, .-_Z41__device_stub__Z18q2a_global_counterPiS_iPiS_i
	.globl	_Z18q2a_global_counterPiS_i
	.type	_Z18q2a_global_counterPiS_i, @function
_Z18q2a_global_counterPiS_i:
.LFB4231:
	.cfi_startproc
	endbr64
	jmp	_Z41__device_stub__Z18q2a_global_counterPiS_iPiS_i
	.cfi_endproc
.LFE4231:
	.size	_Z18q2a_global_counterPiS_i, .-_Z18q2a_global_counterPiS_i
	.globl	_Z45__device_stub__Z22q2b_shared_mem_counterPiS_iPiS_i
	.type	_Z45__device_stub__Z22q2b_shared_mem_counterPiS_iPiS_i, @function
_Z45__device_stub__Z22q2b_shared_mem_counterPiS_iPiS_i:
.LFB4232:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movl	%edx, 12(%rsp)
	leaq	32(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L8
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z22q2b_shared_mem_counterPiS_i(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L8:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4232:
	.size	_Z45__device_stub__Z22q2b_shared_mem_counterPiS_iPiS_i, .-_Z45__device_stub__Z22q2b_shared_mem_counterPiS_iPiS_i
	.globl	_Z22q2b_shared_mem_counterPiS_i
	.type	_Z22q2b_shared_mem_counterPiS_i, @function
_Z22q2b_shared_mem_counterPiS_i:
.LFB4233:
	.cfi_startproc
	endbr64
	jmp	_Z45__device_stub__Z22q2b_shared_mem_counterPiS_iPiS_i
	.cfi_endproc
.LFE4233:
	.size	_Z22q2b_shared_mem_counterPiS_i, .-_Z22q2b_shared_mem_counterPiS_i
	.globl	_Z40__device_stub__Z17q2c_prll_prfx_sumPiS_iPiS_i
	.type	_Z40__device_stub__Z17q2c_prll_prfx_sumPiS_iPiS_i, @function
_Z40__device_stub__Z17q2c_prll_prfx_sumPiS_iPiS_i:
.LFB4234:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movl	%edx, 12(%rsp)
	leaq	32(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L13
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z17q2c_prll_prfx_sumPiS_i(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L13:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4234:
	.size	_Z40__device_stub__Z17q2c_prll_prfx_sumPiS_iPiS_i, .-_Z40__device_stub__Z17q2c_prll_prfx_sumPiS_iPiS_i
	.globl	_Z17q2c_prll_prfx_sumPiS_i
	.type	_Z17q2c_prll_prfx_sumPiS_i, @function
_Z17q2c_prll_prfx_sumPiS_i:
.LFB4235:
	.cfi_startproc
	endbr64
	jmp	_Z40__device_stub__Z17q2c_prll_prfx_sumPiS_iPiS_i
	.cfi_endproc
.LFE4235:
	.size	_Z17q2c_prll_prfx_sumPiS_i, .-_Z17q2c_prll_prfx_sumPiS_i
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"_Z17q2c_prll_prfx_sumPiS_i"
.LC1:
	.string	"_Z22q2b_shared_mem_counterPiS_i"
.LC2:
	.string	"_Z18q2a_global_counterPiS_i"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4237:
	.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	.LC0(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z17q2c_prll_prfx_sumPiS_i(%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	.LC1(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z22q2b_shared_mem_counterPiS_i(%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	.LC2(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z18q2a_global_counterPiS_i(%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
.LFE4237:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.text._ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev,"axG",@progbits,_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD5Ev,comdat
	.align 2
	.weak	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.type	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev, @function
_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev:
.LFB4316:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	call	__errno_location@PLT
	cmpl	$0, (%rax)
	jne	.L20
	movl	(%rbx), %edx
	movl	%edx, (%rax)
.L20:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4316:
	.size	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev, .-_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.weak	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	.set	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev,_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.section	.text._ZNSt6vectorIiSaIiEED2Ev,"axG",@progbits,_ZNSt6vectorIiSaIiEED5Ev,comdat
	.align 2
	.weak	_ZNSt6vectorIiSaIiEED2Ev
	.type	_ZNSt6vectorIiSaIiEED2Ev, @function
_ZNSt6vectorIiSaIiEED2Ev:
.LFB4570:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	.L23
	movq	16(%rdi), %rsi
	movq	%rax, %rdi
	subq	%rax, %rsi
	jmp	_ZdlPvm@PLT
.L23:
	ret
	.cfi_endproc
.LFE4570:
	.size	_ZNSt6vectorIiSaIiEED2Ev, .-_ZNSt6vectorIiSaIiEED2Ev
	.weak	_ZNSt6vectorIiSaIiEED1Ev
	.set	_ZNSt6vectorIiSaIiEED1Ev,_ZNSt6vectorIiSaIiEED2Ev
	.section	.rodata.str1.1
.LC3:
	.string	", "
.LC4:
	.string	"Unable to open/write to file %s"
	.text
	.globl	_Z9writeFilePKcPii
	.type	_Z9writeFilePKcPii, @function
_Z9writeFilePKcPii:
.LFB4204:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4204
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC3(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rsi, %r14
	movq	%rdi, %rsi
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%edx, %r13d
	movl	$16, %edx
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$536, %rsp
	.cfi_def_cfa_offset 592
	movq	%fs:40, %rax
	movq	%rax, 520(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rbx
	movq	%rbx, %rdi
.LEHB0:
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE0:
	leaq	120(%rsp), %rdi
	call	_ZNKSt12__basic_fileIcE7is_openEv@PLT
	testb	%al, %al
	je	.L42
.L26:
	movl	%ebp, %r12d
	cmpl	%ebp, %r13d
	jle	.L43
	movl	(%r14,%rbp,4), %esi
	movq	%rbx, %rdi
.LEHB1:
	call	_ZNSolsEi@PLT
	leal	-1(%r13), %eax
	cmpl	%r12d, %eax
	jne	.L28
.L29:
	incq	%rbp
	jmp	.L26
.L28:
	movl	$2, %edx
	movq	%r15, %rsi
	movq	%rbx, %rdi
	call	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l@PLT
	jmp	.L29
.L43:
	movq	%rbx, %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv@PLT
.L31:
	movq	%rbx, %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	520(%rsp), %rax
	subq	%fs:40, %rax
	je	.L34
	jmp	.L39
.L42:
	movq	%r12, %rdx
	leaq	.LC4(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.LEHE1:
	jmp	.L31
.L36:
	endbr64
	movq	%rax, %rbp
.L32:
	movq	%rbx, %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	520(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L39
	movq	%rbp, %rdi
.LEHB2:
	call	_Unwind_Resume@PLT
.LEHE2:
.L39:
	call	__stack_chk_fail@PLT
.L34:
	addq	$536, %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
.LFE4204:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA4204:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4204-.LLSDACSB4204
.LLSDACSB4204:
	.uleb128 .LEHB0-.LFB4204
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB4204
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L36-.LFB4204
	.uleb128 0
	.uleb128 .LEHB2-.LFB4204
	.uleb128 .LEHE2-.LEHB2
	.uleb128 0
	.uleb128 0
.LLSDACSE4204:
	.text
	.size	_Z9writeFilePKcPii, .-_Z9writeFilePKcPii
	.section	.rodata._ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_.str1.1,"aMS",@progbits,1
.LC5:
	.string	"vector::_M_realloc_insert"
	.section	.text._ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,"axG",@progbits,_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,comdat
	.align 2
	.weak	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.type	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_, @function
_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_:
.LFB4921:
	.cfi_startproc
	endbr64
	movabsq	$2305843009213693951, %rcx
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	8(%rdi), %rax
	movq	(%rdi), %r14
	movq	%rax, %rbx
	movq	%rax, (%rsp)
	subq	%r14, %rbx
	sarq	$2, %rbx
	cmpq	%rcx, %rbx
	jne	.L45
	leaq	.LC5(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L45:
	cmpq	%r14, (%rsp)
	movl	$1, %eax
	movq	%rsi, %r15
	movq	%rdi, %r13
	cmovne	%rbx, %rax
	movq	%rsi, %rbp
	addq	%rax, %rbx
	setc	%al
	subq	%r14, %r15
	movzbl	%al, %eax
	testq	%rax, %rax
	jne	.L55
	xorl	%r12d, %r12d
	testq	%rbx, %rbx
	je	.L50
	movabsq	$2305843009213693951, %rax
	cmpq	%rax, %rbx
	cmova	%rax, %rbx
	jmp	.L49
.L55:
	movq	%rcx, %rbx
.L49:
	leaq	0(,%rbx,4), %rdi
	movq	%rdx, 8(%rsp)
	call	_Znwm@PLT
	movq	8(%rsp), %rdx
	movq	%rax, %r12
.L50:
	movl	(%rdx), %eax
	movl	%eax, (%r12,%r15)
	testq	%r15, %r15
	jle	.L51
	movq	%r15, %rdx
	movq	%r14, %rsi
	movq	%r12, %rdi
	call	memmove@PLT
.L51:
	movq	(%rsp), %rax
	leaq	4(%r12,%r15), %rdx
	subq	%rbp, %rax
	testq	%rax, %rax
	jle	.L52
	movq	%rdx, %rdi
	movq	%rbp, %rsi
	movq	%rax, %rcx
	rep movsb
.L52:
	leaq	(%rdx,%rax), %rbp
	testq	%r14, %r14
	je	.L53
	movq	16(%r13), %rsi
	movq	%r14, %rdi
	subq	%r14, %rsi
	call	_ZdlPvm@PLT
.L53:
	leaq	(%r12,%rbx,4), %rax
	movq	%r12, 0(%r13)
	movq	%rbp, 8(%r13)
	movq	%rax, 16(%r13)
	addq	$24, %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
.LFE4921:
	.size	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_, .-_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.section	.rodata.str1.1
.LC6:
	.string	"stoi"
	.text
	.globl	_Z8readFileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.type	_Z8readFileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, @function
_Z8readFileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
.LFB4186:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4186
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$8, %edx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1048, %rsp
	.cfi_def_cfa_offset 1104
	movq	%fs:40, %rax
	movq	%rax, 1032(%rsp)
	xorl	%eax, %eax
	leaq	512(%rsp), %rax
	leaq	56(%rsp), %r12
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
.LEHB3:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode@PLT
.LEHE3:
	xorl	%ecx, %ecx
	leaq	72(%rsp), %rax
	xorl	%esi, %esi
	movq	%rcx, 0(%rbp)
	movq	%rcx, 8(%rbp)
	movq	%rcx, 16(%rbp)
	movq	%rax, 56(%rsp)
	movq	%rsi, 64(%rsp)
	movb	$0, 72(%rsp)
.L63:
	movq	8(%rsp), %rdi
	movq	%r12, %rsi
.LEHB4:
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	(%rax), %rdx
	movq	-24(%rdx), %rdx
	testb	$5, 32(%rax,%rdx)
	jne	.L87
	leaq	120(%rsp), %r13
	movl	$24, %edx
	movq	%r12, %rsi
	movq	%r13, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode@PLT
.LEHE4:
	leaq	104(%rsp), %rax
	xorl	%edx, %edx
	movb	$0, 104(%rsp)
	leaq	88(%rsp), %r14
	movq	%rax, 88(%rsp)
	movq	%rdx, 96(%rsp)
.L64:
	movl	$44, %edx
	movq	%r14, %rsi
	movq	%r13, %rdi
.LEHB5:
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_@PLT
.LEHE5:
	movq	(%rax), %rdx
	movq	-24(%rdx), %rdx
	testb	$5, 32(%rax,%rdx)
	jne	.L88
	call	__errno_location@PLT
	movq	88(%rsp), %r15
	movl	$10, %edx
	movq	%rax, %rbx
	movl	(%rax), %eax
	movq	%r15, %rdi
	movl	%eax, 44(%rsp)
	xorl	%eax, %eax
	movl	%eax, (%rbx)
	leaq	48(%rsp), %rax
	movq	%rax, %rsi
	movq	%rax, 16(%rsp)
	call	__isoc23_strtol@PLT
	cmpq	48(%rsp), %r15
	leaq	44(%rsp), %r15
	jne	.L65
	movq	1032(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L84
	leaq	.LC6(%rip), %rdi
.LEHB6:
	call	_ZSt24__throw_invalid_argumentPKc@PLT
.L65:
	cmpl	$34, (%rbx)
	jne	.L67
.L69:
	movq	1032(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L84
	leaq	.LC6(%rip), %rdi
	call	_ZSt20__throw_out_of_rangePKc@PLT
.LEHE6:
.L67:
	movl	$2147483648, %edx
	movl	$4294967295, %ecx
	movq	%rax, 24(%rsp)
	addq	%rax, %rdx
	cmpq	%rdx, %rcx
	jb	.L69
	movq	%r15, %rdi
	call	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	movq	24(%rsp), %rax
	movq	8(%rbp), %rsi
	movl	%eax, 48(%rsp)
	cmpq	16(%rbp), %rsi
	je	.L89
	movl	%eax, (%rsi)
	addq	$4, %rsi
	movq	%rsi, 8(%rbp)
	jmp	.L64
.L82:
	endbr64
	movq	%rax, %rbx
.L72:
	movq	%r15, %rdi
	call	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	jmp	.L73
.L89:
	movq	16(%rsp), %rdx
	movq	%rbp, %rdi
.LEHB7:
	call	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
.LEHE7:
	jmp	.L64
.L88:
	movq	%r14, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%r13, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	jmp	.L63
.L87:
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	8(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	1032(%rsp), %rax
	subq	%fs:40, %rax
	je	.L79
	jmp	.L84
.L80:
	endbr64
	movq	%rax, %rbx
.L73:
	movq	%r14, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%r13, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	jmp	.L77
.L81:
	endbr64
	movq	%rax, %rbx
.L77:
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%rbp, %rdi
	call	_ZNSt6vectorIiSaIiEED1Ev
	movq	8(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	1032(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L84
	movq	%rbx, %rdi
.LEHB8:
	call	_Unwind_Resume@PLT
.LEHE8:
.L84:
	call	__stack_chk_fail@PLT
.L79:
	addq	$1048, %rsp
	.cfi_def_cfa_offset 56
	movq	%rbp, %rax
	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
.LFE4186:
	.section	.gcc_except_table
.LLSDA4186:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4186-.LLSDACSB4186
.LLSDACSB4186:
	.uleb128 .LEHB3-.LFB4186
	.uleb128 .LEHE3-.LEHB3
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB4-.LFB4186
	.uleb128 .LEHE4-.LEHB4
	.uleb128 .L81-.LFB4186
	.uleb128 0
	.uleb128 .LEHB5-.LFB4186
	.uleb128 .LEHE5-.LEHB5
	.uleb128 .L80-.LFB4186
	.uleb128 0
	.uleb128 .LEHB6-.LFB4186
	.uleb128 .LEHE6-.LEHB6
	.uleb128 .L82-.LFB4186
	.uleb128 0
	.uleb128 .LEHB7-.LFB4186
	.uleb128 .LEHE7-.LEHB7
	.uleb128 .L80-.LFB4186
	.uleb128 0
	.uleb128 .LEHB8-.LFB4186
	.uleb128 .LEHE8-.LEHB8
	.uleb128 0
	.uleb128 0
.LLSDACSE4186:
	.text
	.size	_Z8readFileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, .-_Z8readFileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.section	.rodata.str1.1
.LC7:
	.string	"Success!"
.LC8:
	.string	"error: no devices supporting CUDA.\n"
.LC9:
	.string	"Using device %d: %s\nglobal mem: %dB; compute v%d.%d; clock: %d kHz\n"
.LC10:
	.string	"sharedMemPerBlock: %zu    sharedMemPerMultiprocessor: %zu\n"
.LC11:
	.string	"regsPerMultiprocessor:  %d\n"
.LC12:
	.string	"inp.txt"
.LC13:
	.string	"Input size: %d   blocks: %d   threads: %d\n\n"
.LC14:
	.string	"gpu_in Malloc %s\n"
.LC15:
	.string	"gpu_out_2a Malloc %s\n"
.LC16:
	.string	"gpu_out_2b Malloc %s\n"
.LC17:
	.string	"gpu_out_2c Malloc %s\n"
.LC18:
	.string	"gpu_in Memcpy %s\n"
.LC19:
	.string	"cpu_out_2a Memcpy %s\n"
.LC20:
	.string	"cpu_out_2b Memcpy %s\n"
.LC21:
	.string	"cpu_out_2c Memcpy %s\n"
.LC22:
	.string	"\n\n2a:   %f\n"
.LC23:
	.string	"%d=%d  "
.LC24:
	.string	"q2a.txt"
.LC25:
	.string	"\n\n2b:   %f\n"
.LC26:
	.string	"q2b.txt"
.LC27:
	.string	"\n\n2c:   %f\n"
.LC28:
	.string	"q2c.txt"
.LC29:
	.string	"\n\n"
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB4205:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4205
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1304, %rsp
	.cfi_def_cfa_offset 1360
	movq	%fs:40, %rax
	movq	%rax, 1288(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rdi
.LEHB9:
	call	cudaGetDeviceCount@PLT
	cmpl	$0, 28(%rsp)
	jne	.L91
	movq	stderr(%rip), %rdi
	leaq	.LC8(%rip), %rdx
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	movl	$1, %edi
	call	exit@PLT
.L91:
	xorl	%edi, %edi
	leaq	256(%rsp), %rbx
	call	cudaSetDevice@PLT
	xorl	%esi, %esi
	movq	%rbx, %rdi
	call	cudaGetDeviceProperties_v2@PLT
	testl	%eax, %eax
	jne	.L92
	movl	604(%rsp), %eax
	movq	%rbx, %rcx
	xorl	%edx, %edx
	leaq	.LC9(%rip), %rsi
	movl	$2, %edi
	pushq	%rax
	.cfi_def_cfa_offset 1368
	movl	628(%rsp), %eax
	pushq	%rax
	.cfi_def_cfa_offset 1376
	movl	632(%rsp), %r9d
	xorl	%eax, %eax
	movl	560(%rsp), %r8d
	call	__printf_chk@PLT
	popq	%rax
	.cfi_def_cfa_offset 1368
	popq	%rdx
	.cfi_def_cfa_offset 1360
	movl	$2, %edi
	movq	552(%rsp), %rdx
	movq	896(%rsp), %rcx
	leaq	.LC10(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	904(%rsp), %edx
	leaq	.LC11(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
.LEHE9:
.L92:
	leaq	7+.LC12(%rip), %rdx
	leaq	216(%rsp), %rax
	leaq	-7(%rdx), %rsi
	movq	%rax, 8(%rsp)
	leaq	112(%rsp), %r12
	leaq	232(%rsp), %rdi
	movq	%rdi, 216(%rsp)
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13_S_copy_charsEPcPKcS7_@PLT
	movq	216(%rsp), %rax
	movq	8(%rsp), %rsi
	movq	%r12, %rdi
	movq	$7, 224(%rsp)
	movb	$0, 7(%rax)
.LEHB10:
	call	_Z8readFileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LEHE10:
	movq	8(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	112(%rsp), %rbp
	movq	120(%rsp), %rbx
	subq	%rbp, %rbx
	sarq	$2, %rbx
	leal	0(,%rbx,4), %r13d
	movl	%ebx, %r15d
	movslq	%r13d, %r13
	movq	%r13, %rdi
	call	malloc@PLT
	movq	%rax, %r14
	xorl	%eax, %eax
.L93:
	cmpq	%rbx, %rax
	je	.L140
	movl	0(%rbp,%rax,4), %ecx
	movl	%ecx, (%r14,%rax,4)
	incq	%rax
	jmp	.L93
.L140:
	movl	$32, %r8d
	movl	$8, %ecx
	movl	%r15d, %edx
	xorl	%eax, %eax
	leaq	.LC13(%rip), %rsi
	movl	$2, %edi
.LEHB11:
	call	__printf_chk@PLT
	xorl	%eax, %eax
	leaq	136(%rsp), %rdi
	movl	$10, %ecx
	rep stosl
	leaq	176(%rsp), %rdi
	movl	$10, %ecx
	rep stosl
	movq	8(%rsp), %rdi
	movl	$10, %ecx
	rep stosl
	leaq	72(%rsp), %rdi
	call	cudaEventCreate@PLT
	leaq	80(%rsp), %rdi
	call	cudaEventCreate@PLT
	leaq	40(%rsp), %rdi
	movq	%r13, %rsi
	call	cudaMalloc@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L120
	call	cudaGetErrorString@PLT
	movq	%rax, %rdx
	jmp	.L95
.L120:
	leaq	.LC7(%rip), %rdx
.L95:
	leaq	.LC14(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	48(%rsp), %rdi
	movl	$40, %esi
	call	cudaMalloc@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L121
	call	cudaGetErrorString@PLT
	movq	%rax, %rdx
	jmp	.L96
.L121:
	leaq	.LC7(%rip), %rdx
.L96:
	leaq	.LC15(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	56(%rsp), %rdi
	movl	$40, %esi
	call	cudaMalloc@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L122
	call	cudaGetErrorString@PLT
	movq	%rax, %rdx
	jmp	.L97
.L122:
	leaq	.LC7(%rip), %rdx
.L97:
	leaq	.LC16(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	64(%rsp), %rdi
	movl	$40, %esi
	call	cudaMalloc@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L123
	call	cudaGetErrorString@PLT
	movq	%rax, %rdx
	jmp	.L98
.L123:
	leaq	.LC7(%rip), %rdx
.L98:
	leaq	.LC17(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	40(%rsp), %rdi
	movl	$1, %ecx
	movq	%r13, %rdx
	movq	%r14, %rsi
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L124
	call	cudaGetErrorString@PLT
	movq	%rax, %rdx
	jmp	.L99
.L124:
	leaq	.LC7(%rip), %rdx
.L99:
	leaq	.LC18(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	72(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movl	$134217729, %edx
	movl	$536870913, %edi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	salq	$5, %rdx
	salq	$3, %rdi
	movl	$1, %ecx
	movl	$1, %esi
	movq	%rdx, 100(%rsp)
	movl	$1, 108(%rsp)
	movq	%rdi, 88(%rsp)
	movl	$1, 96(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	je	.L100
.L102:
	movq	80(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	jmp	.L141
.L100:
	movq	40(%rsp), %rsi
	movq	48(%rsp), %rdi
	movl	%r15d, %edx
	call	_Z41__device_stub__Z18q2a_global_counterPiS_iPiS_i
	jmp	.L102
.L141:
	movq	80(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	80(%rsp), %rdx
	movq	72(%rsp), %rsi
	leaq	32(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	movq	72(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movl	$134217729, %edx
	movl	$536870913, %edi
	xorl	%r9d, %r9d
	movl	$40, %r8d
	salq	$5, %rdx
	salq	$3, %rdi
	movl	$1, %ecx
	movl	$1, %esi
	movq	%rdx, 100(%rsp)
	movl	$1, 108(%rsp)
	movq	%rdi, 88(%rsp)
	movl	$1, 96(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	je	.L103
.L105:
	movq	80(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	jmp	.L142
.L103:
	movq	40(%rsp), %rsi
	movq	56(%rsp), %rdi
	movl	%r15d, %edx
	call	_Z45__device_stub__Z22q2b_shared_mem_counterPiS_iPiS_i
	jmp	.L105
.L142:
	movq	80(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	80(%rsp), %rdx
	movq	72(%rsp), %rsi
	leaq	36(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	movq	72(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movl	$134217729, %edx
	movl	$536870913, %edi
	xorl	%r9d, %r9d
	movl	$64, %r8d
	salq	$5, %rdx
	salq	$3, %rdi
	movl	$1, %ecx
	movl	$1, %esi
	movq	%rdx, 100(%rsp)
	movl	$1, 108(%rsp)
	movq	%rdi, 88(%rsp)
	movl	$1, 96(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	je	.L106
.L108:
	movq	80(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	jmp	.L143
.L106:
	movq	48(%rsp), %rsi
	movq	64(%rsp), %rdi
	movl	$10, %edx
	call	_Z40__device_stub__Z17q2c_prll_prfx_sumPiS_iPiS_i
	jmp	.L108
.L143:
	movq	80(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	80(%rsp), %rdx
	movq	72(%rsp), %rsi
	leaq	100(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	movq	48(%rsp), %rsi
	movl	$2, %ecx
	movl	$40, %edx
	leaq	136(%rsp), %r15
	movq	%r15, %rdi
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L125
	call	cudaGetErrorString@PLT
	movq	%rax, %rdx
	jmp	.L109
.L125:
	leaq	.LC7(%rip), %rdx
.L109:
	leaq	.LC19(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	56(%rsp), %rsi
	movl	$2, %ecx
	movl	$40, %edx
	leaq	176(%rsp), %r14
	movq	%r14, %rdi
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L126
	call	cudaGetErrorString@PLT
	movq	%rax, %rdx
	jmp	.L110
.L126:
	leaq	.LC7(%rip), %rdx
.L110:
	leaq	.LC20(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	64(%rsp), %rsi
	movl	$2, %ecx
	movl	$40, %edx
	leaq	216(%rsp), %rbp
	movq	%rbp, %rdi
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L127
	call	cudaGetErrorString@PLT
	movq	%rax, %rdx
	jmp	.L111
.L127:
	leaq	.LC7(%rip), %rdx
.L111:
	leaq	.LC21(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC22(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	32(%rsp), %xmm0
	call	__printf_chk@PLT
	xorl	%ebx, %ebx
	leaq	.LC23(%rip), %r13
.L112:
	movl	(%r15,%rbx,4), %ecx
	movl	%ebx, %edx
	movq	%r13, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	incq	%rbx
	cmpq	$10, %rbx
	jne	.L112
	movl	$10, %edx
	movq	%r15, %rsi
	leaq	.LC24(%rip), %rdi
	call	_Z9writeFilePKcPii
	leaq	.LC25(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	36(%rsp), %xmm0
	call	__printf_chk@PLT
	xorl	%ebx, %ebx
.L113:
	movl	(%r14,%rbx,4), %ecx
	movl	%ebx, %edx
	movq	%r13, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	incq	%rbx
	cmpq	$10, %rbx
	jne	.L113
	movl	$10, %edx
	movq	%r14, %rsi
	leaq	.LC26(%rip), %rdi
	call	_Z9writeFilePKcPii
	leaq	.LC27(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	100(%rsp), %xmm0
	call	__printf_chk@PLT
	xorl	%ebx, %ebx
.L114:
	movl	0(%rbp,%rbx,4), %ecx
	movl	%ebx, %edx
	movq	%r13, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	incq	%rbx
	cmpq	$10, %rbx
	jne	.L114
	movl	$10, %edx
	movq	%rbp, %rsi
	leaq	.LC28(%rip), %rdi
	call	_Z9writeFilePKcPii
	leaq	.LC29(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	40(%rsp), %rdi
	call	cudaFree@PLT
	movq	48(%rsp), %rdi
	call	cudaFree@PLT
	movq	56(%rsp), %rdi
	call	cudaFree@PLT
	movq	64(%rsp), %rdi
	call	cudaFree@PLT
.LEHE11:
	leaq	112(%rsp), %rdi
	call	_ZNSt6vectorIiSaIiEED1Ev
	movq	1288(%rsp), %rax
	subq	%fs:40, %rax
	je	.L119
	jmp	.L136
.L128:
	endbr64
	movq	%rax, %rbx
.L115:
	movq	8(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L139
.L129:
	endbr64
	movq	%rax, %rbx
.L117:
	movq	%r12, %rdi
	call	_ZNSt6vectorIiSaIiEED1Ev
.L139:
	movq	1288(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L136
	movq	%rbx, %rdi
.LEHB12:
	call	_Unwind_Resume@PLT
.LEHE12:
.L136:
	call	__stack_chk_fail@PLT
.L119:
	addq	$1304, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4205:
	.section	.gcc_except_table
.LLSDA4205:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4205-.LLSDACSB4205
.LLSDACSB4205:
	.uleb128 .LEHB9-.LFB4205
	.uleb128 .LEHE9-.LEHB9
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB10-.LFB4205
	.uleb128 .LEHE10-.LEHB10
	.uleb128 .L128-.LFB4205
	.uleb128 0
	.uleb128 .LEHB11-.LFB4205
	.uleb128 .LEHE11-.LEHB11
	.uleb128 .L129-.LFB4205
	.uleb128 0
	.uleb128 .LEHB12-.LFB4205
	.uleb128 .LEHE12-.LEHB12
	.uleb128 0
	.uleb128 0
.LLSDACSE4205:
	.section	.text.startup
	.size	main, .-main
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.hidden	DW.ref.__gxx_personality_v0
	.weak	DW.ref.__gxx_personality_v0
	.section	.data.rel.local.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
	.align 8
	.type	DW.ref.__gxx_personality_v0, @object
	.size	DW.ref.__gxx_personality_v0, 8
DW.ref.__gxx_personality_v0:
	.quad	__gxx_personality_v0
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>
#include <stdlib.h>
#include <hip/hip_runtime.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include "assert.h"
using namespace std;


std::vector<int> readFile(string filename)
{
    ifstream infile (filename);
    vector<int> vnum;
    string line;
    int index = 0;

    while(getline(infile, line))
    {
        stringstream ss (line);
        string sint;
        while(getline(ss, sint, ','))
        {
            vnum.push_back(stoi(sint));
            index += 1;
        }
    }

    return vnum;
}


void writeFile(const char* filename, int* data, int limit)
{
    ofstream myfile(filename);
    if (myfile.is_open())
    {
        for (int i = 0; i < limit; i++)
        {
            myfile << data[i];
         if(i!= limit-1)
            myfile << ", ";
        }
        myfile.close();
    }
    else
    {
        printf("Unable to open/write to file %s", filename);
    }

}

__global__ void q2a_global_counter(int* gpu_out, int* gpu_in, int n)
{
    int idx = threadIdx.x + blockIdx.x * blockDim.x;
    int numbersPerBlockThread = (n / (blockDim.x * gridDim.x)) + 1;
    int start = idx * numbersPerBlockThread;
    int stop = min(n, (start + numbersPerBlockThread));

    for(int i=start; i<stop; i++)
    {
        int hundreds_value = gpu_in[i] / 100;
        atomicAdd(&(gpu_out[hundreds_value]), 1);
    }
    __syncthreads();
}

__global__ void q2b_shared_mem_counter(int* gpu_out, int* gpu_in, int n)
{
    extern __shared__ int shared_out[];
    int idx = threadIdx.x + blockIdx.x * blockDim.x;
    int incrementalAdd = 0;
    if(threadIdx.x == 0)
    {
        shared_out[10] = {0};
    }

    while(idx + incrementalAdd < n)
    {
        int hundreds_val = gpu_in[idx + incrementalAdd] / 100;
        atomicAdd(&shared_out[hundreds_val], 1);
        incrementalAdd += (blockIdx.x+1) * blockDim.x;
    }
    __syncthreads();

    if(idx == 0)
    {
        for(int i=0; i < 10; i++)
        {
            atomicAdd(&(gpu_out[i]), shared_out[i]);
            __syncthreads();
        }
    }
}


__global__ void q2c_prll_prfx_sum(int* gpu_out, int* gpu_in, int n)
{
    // gpu_in = [510,1095,1051,1035,1063,1012,1067,1053,1053,1061]
    // gpu_out =[510, 1605, 2656, 3691, 4754, 5766, 6833, 7886, 8939, 10000]
    extern __shared__ int shared_mem[];

    int tidx = threadIdx.x;
    int idx = tidx + blockIdx.x * blockDim.x;;
    int offset = 1;
    int n2 = (int)pow(2.0, ceil(log((double)n)/log(2.0))); // next power of 2

    if(tidx == 0)
    {
        for(int i=0;i<n2;i++)
        {
            if(i<n)
                shared_mem[i] = gpu_in[i];
            else
                shared_mem[i] = 0; // extend non-power-of-2 entries to 0.
        }
    }
    __syncthreads();

    // UPWARD FIRST PASS SUM

    for(int depth_idx = n2 >> 1; depth_idx > 0; depth_idx >>= 1)
    {
        __syncthreads();

        if(tidx < depth_idx)
        {
            int ai = offset*(2*tidx+1)-1;
            int bi = offset*(2*tidx+2)-1;
            shared_mem[bi] += shared_mem[ai];
        }
        offset <<= 1;
    }

    __syncthreads();

    // UPWARD FIRST PASS ENDS AND 2nd DOWNWARD PASS BEGINS

    if(tidx == 0)
    {
        shared_mem[n2-1] = 0;
    }

    for(int depth_idx=1; depth_idx<n2; depth_idx<<=1)
    {
        offset >>= 1;
        __syncthreads();
        if(tidx < depth_idx)
        {
            int ai = offset*(2*tidx+1)-1;
            int bi = offset*(2*tidx+2)-1;
            if(ai < 0 || bi < 0)
                continue;

            int temp = shared_mem[ai];
            shared_mem[ai] = shared_mem[bi];
            shared_mem[bi] += temp;
        }
    }
    __syncthreads();

    if(idx < n)
    {
        gpu_out[idx] = shared_mem[idx+1];
    }
}


int main(int argc, char **argv)
{
    int deviceCount;
    hipGetDeviceCount(&deviceCount);
    if (deviceCount == 0) {
        fprintf(stderr, "error: no devices supporting CUDA.\n");
        exit(EXIT_FAILURE);
    }
    int dev = 0;
    hipSetDevice(dev);

    hipDeviceProp_t devProps;
    if (hipGetDeviceProperties(&devProps, dev) == 0)
    {
        printf("Using device %d: %s\nglobal mem: %dB; compute v%d.%d; clock: %d kHz\n",
               dev, devProps.name, (int)devProps.totalGlobalMem,
               (int)devProps.major, (int)devProps.minor,
               (int)devProps.clockRate);
        printf("sharedMemPerBlock: %zu    sharedMemPerMultiprocessor: %zu\n", devProps.sharedMemPerBlock, devProps.sharedMemPerMultiprocessor);
        printf("regsPerMultiprocessor:  %d\n", devProps.regsPerMultiprocessor);
    }

    vector<int> vnum = readFile("inp.txt");
    // vector<int> vnum = readFile("inp1mil.txt");
    const int IN_SIZE = vnum.size();
    const int IN_BYTES = IN_SIZE * sizeof(int);
    const int OUT_SIZE = 10; //this is specific to the output range.
    const int OUT_BYTES = OUT_SIZE * sizeof(int);

    int* numbers;
    numbers = (int *)malloc(IN_BYTES);
    for(int i=0; i < vnum.size(); i++)
        numbers[i] = vnum[i];

    // int MAX_THREADS_PER_BLOCK  = 512;
    int threads = 32;
    int blocks = 8;

    printf("Input size: %d   blocks: %d   threads: %d\n\n", IN_SIZE, blocks, threads);

    int *gpu_in;
    int *gpu_out_2a;
    int *gpu_out_2b;
    int *gpu_out_2c;


    int cpu_out_2a[OUT_SIZE] = {0};
    int cpu_out_2b[OUT_SIZE] = {0};
    int cpu_out_2c[OUT_SIZE] = {0};

    hipError_t ret;

    float elapsedTime_2a;
    float elapsedTime_2b;
    float elapsedTime_2c;
    hipEvent_t start, stop;
    hipEventCreate(&start);
    hipEventCreate(&stop);
    

    ret = hipMalloc((void **) &gpu_in, IN_BYTES);
    printf("gpu_in Malloc %s\n", ret == hipSuccess ? "Success!": hipGetErrorString(ret));
    ret = hipMalloc((void **) &gpu_out_2a, OUT_BYTES);
    printf("gpu_out_2a Malloc %s\n", ret == hipSuccess ? "Success!": hipGetErrorString(ret));
    ret = hipMalloc((void **) &gpu_out_2b, OUT_BYTES);
    printf("gpu_out_2b Malloc %s\n", ret == hipSuccess ? "Success!": hipGetErrorString(ret));
    ret = hipMalloc((void **) &gpu_out_2c, OUT_BYTES);
    printf("gpu_out_2c Malloc %s\n", ret == hipSuccess ? "Success!": hipGetErrorString(ret));

    ret = hipMemcpy((void *)gpu_in, (void *)numbers, IN_BYTES , hipMemcpyHostToDevice);
    printf("gpu_in Memcpy %s\n", ret == hipSuccess ? "Success!": hipGetErrorString(ret));


    // see https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#execution-configuration 
    // for <<<Dg, Db, Ns, S>>> parameter explanation.


    hipEventRecord(start, 0);
    q2a_global_counter<<<blocks, threads>>>(gpu_out_2a, gpu_in, IN_SIZE);
    hipEventRecord(stop, 0);
    hipEventSynchronize(stop);
    hipEventElapsedTime(&elapsedTime_2a, start, stop);


    hipEventRecord(start, 0);
    q2b_shared_mem_counter<<<blocks, threads, OUT_SIZE*sizeof(int)>>>(gpu_out_2b, gpu_in, IN_SIZE);
    // ret = cudaPeekAtLastError();
    // printf("cudaPeekAtLastError %s\n", ret == cudaSuccess ? "Success!": cudaGetErrorString(ret));
    hipEventRecord(stop, 0);
    hipEventSynchronize(stop);
    hipEventElapsedTime(&elapsedTime_2b, start, stop);


    hipEventRecord(start, 0);
    int n2 = (int)pow(2.0, ceil(log((double)OUT_SIZE)/log(2.0))); // next power of 2
    q2c_prll_prfx_sum<<<blocks, threads, (n2)*sizeof(int)>>>(gpu_out_2c, gpu_out_2a, OUT_SIZE);
    hipEventRecord(stop, 0);
    hipEventSynchronize(stop);
    hipEventElapsedTime(&elapsedTime_2c, start, stop);


    ret = hipMemcpy(cpu_out_2a, gpu_out_2a, OUT_BYTES, hipMemcpyDeviceToHost);
    printf("cpu_out_2a Memcpy %s\n", ret == hipSuccess ? "Success!": hipGetErrorString(ret));
    ret = hipMemcpy(cpu_out_2b, gpu_out_2b, OUT_BYTES, hipMemcpyDeviceToHost);
    printf("cpu_out_2b Memcpy %s\n", ret == hipSuccess ? "Success!": hipGetErrorString(ret));
    ret = hipMemcpy(cpu_out_2c, gpu_out_2c, OUT_BYTES, hipMemcpyDeviceToHost);
    printf("cpu_out_2c Memcpy %s\n", ret == hipSuccess ? "Success!": hipGetErrorString(ret));
    

    // correct output:
    // 2a & b): 510, 1095, 1051, 1035, 1063, 1012, 1067, 1053, 1053, 1061
    // 2c) 510, 1605, 2656, 3691, 4754, 5766, 6833, 7886, 8939, 10000


    printf("\n\n2a:   %f\n", elapsedTime_2a);
    for(int i=0;i<OUT_SIZE;i++)
    {
        printf("%d=%d  ", i, cpu_out_2a[i]);
    }
    writeFile("q2a.txt", cpu_out_2a, OUT_SIZE);

    printf("\n\n2b:   %f\n", elapsedTime_2b);
    for(int i=0;i<OUT_SIZE;i++)
    {
        printf("%d=%d  ", i, cpu_out_2b[i]);
    }
    writeFile("q2b.txt", cpu_out_2b, OUT_SIZE);

    printf("\n\n2c:   %f\n", elapsedTime_2c);
    for(int i=0;i<OUT_SIZE;i++)
    {
        printf("%d=%d  ", i, cpu_out_2c[i]);
    }
    writeFile("q2c.txt", cpu_out_2c, OUT_SIZE);

    printf("\n\n");

    hipFree(gpu_in);
    hipFree(gpu_out_2a);
    hipFree(gpu_out_2b);
    hipFree(gpu_out_2c);
    return 0;
}


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

                                        # End of file scope inline assembly
	.globl	_Z8readFileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE # -- Begin function _Z8readFileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.type	_Z8readFileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE,@function
_Z8readFileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: # @_Z8readFileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.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	$1000, %rsp                     # imm = 0x3E8
	.cfi_def_cfa_offset 1056
	.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	%rdi, %rbx
	leaq	480(%rsp), %r14
	movq	%r14, %rdi
	movl	$8, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode
	xorl	%eax, %eax
	movq	%rax, 16(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rbx)
	leaq	72(%rsp), %rcx
	movq	%rcx, -16(%rcx)
	movq	%rax, -8(%rcx)
	movb	$0, (%rcx)
	leaq	88(%rsp), %r13
.LBB0_1:                                # =>This Loop Header: Depth=1
                                        #     Child Loop BB0_6 Depth 2
	movq	480(%rsp), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
.Ltmp0:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp1:
# %bb.2:                                # %.noexc
                                        #   in Loop: Header=BB0_1 Depth=1
.Ltmp2:
	movsbl	%al, %edx
	movq	%r14, %rdi
	leaq	56(%rsp), %rsi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp3:
# %bb.3:                                #   in Loop: Header=BB0_1 Depth=1
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	testb	$5, 32(%rax,%rcx)
	jne	.LBB0_32
# %bb.4:                                #   in Loop: Header=BB0_1 Depth=1
.Ltmp5:
	movq	%r13, %rdi
	leaq	56(%rsp), %rsi
	movl	$24, %edx
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode
.Ltmp6:
# %bb.5:                                #   in Loop: Header=BB0_1 Depth=1
	leaq	32(%rsp), %rax
	movq	%rax, 16(%rsp)
	movq	$0, 24(%rsp)
	movb	$0, 32(%rsp)
.LBB0_6:                                #   Parent Loop BB0_1 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
.Ltmp8:
	movq	%r13, %rdi
	leaq	16(%rsp), %rsi
	movl	$44, %edx
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp9:
# %bb.7:                                #   in Loop: Header=BB0_6 Depth=2
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	testb	$5, 32(%rax,%rcx)
	jne	.LBB0_24
# %bb.8:                                #   in Loop: Header=BB0_6 Depth=2
	movq	16(%rsp), %r15
	callq	__errno_location
	movq	%rax, %r12
	movl	(%rax), %ebp
	movl	$0, (%rax)
	movq	%r15, %rdi
	leaq	48(%rsp), %rsi
	movl	$10, %edx
	callq	__isoc23_strtol
	cmpq	%r15, 48(%rsp)
	je	.LBB0_9
# %bb.13:                               #   in Loop: Header=BB0_6 Depth=2
	movslq	%eax, %rcx
	cmpq	%rax, %rcx
	jne	.LBB0_15
# %bb.14:                               #   in Loop: Header=BB0_6 Depth=2
	movl	(%r12), %ecx
	cmpl	$34, %ecx
	je	.LBB0_15
# %bb.17:                               #   in Loop: Header=BB0_6 Depth=2
	testl	%ecx, %ecx
	jne	.LBB0_19
# %bb.18:                               #   in Loop: Header=BB0_6 Depth=2
	movl	%ebp, (%r12)
.LBB0_19:                               #   in Loop: Header=BB0_6 Depth=2
	movl	%eax, 12(%rsp)
	movq	8(%rbx), %rsi
	cmpq	16(%rbx), %rsi
	je	.LBB0_21
# %bb.20:                               #   in Loop: Header=BB0_6 Depth=2
	movl	%eax, (%rsi)
	addq	$4, %rsi
	movq	%rsi, 8(%rbx)
	jmp	.LBB0_6
.LBB0_21:                               #   in Loop: Header=BB0_6 Depth=2
.Ltmp11:
	movq	%rbx, %rdi
	leaq	12(%rsp), %rdx
	callq	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
.Ltmp12:
	jmp	.LBB0_6
.LBB0_24:                               #   in Loop: Header=BB0_1 Depth=1
	movq	16(%rsp), %rdi
	leaq	32(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_26
# %bb.25:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
                                        #   in Loop: Header=BB0_1 Depth=1
	callq	_ZdlPv
.LBB0_26:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
                                        #   in Loop: Header=BB0_1 Depth=1
	movl	$_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE, %esi
	movq	%r13, %rdi
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev
	leaq	216(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
	jmp	.LBB0_1
.LBB0_32:
	movq	56(%rsp), %rdi
	leaq	72(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_34
# %bb.33:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i17
	callq	_ZdlPv
.LBB0_34:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit19
	leaq	480(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	movq	%rbx, %rax
	addq	$1000, %rsp                     # imm = 0x3E8
	.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
.LBB0_9:
	.cfi_def_cfa_offset 1056
.Ltmp16:
	movl	$.L.str.25, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp17:
# %bb.10:
.LBB0_15:                               # %.critedge.i.i
.Ltmp14:
	movl	$.L.str.25, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp15:
# %bb.16:
.LBB0_22:
.Ltmp7:
	jmp	.LBB0_36
.LBB0_35:
.Ltmp4:
.LBB0_36:
	movq	%rax, %r15
	jmp	.LBB0_37
.LBB0_23:
.Ltmp13:
	jmp	.LBB0_28
.LBB0_27:
.Ltmp10:
.LBB0_28:
	movq	%rax, %r15
	jmp	.LBB0_29
.LBB0_11:
.Ltmp18:
	movq	%rax, %r15
	cmpl	$0, (%r12)
	jne	.LBB0_29
# %bb.12:
	movl	%ebp, (%r12)
.LBB0_29:
	movq	16(%rsp), %rdi
	leaq	32(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_31
# %bb.30:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i14
	callq	_ZdlPv
.LBB0_31:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit16
	leaq	88(%rsp), %rdi
	movl	$_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE, %esi
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev
	leaq	216(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
.LBB0_37:
	movq	56(%rsp), %rdi
	leaq	72(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_39
# %bb.38:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i20
	callq	_ZdlPv
.LBB0_39:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit22
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	.LBB0_41
# %bb.40:
	callq	_ZdlPv
.LBB0_41:                               # %_ZNSt6vectorIiSaIiEED2Ev.exit
	leaq	480(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	movq	%r15, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end0:
	.size	_Z8readFileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, .Lfunc_end0-_Z8readFileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table0:
.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 .Ltmp3-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp3
	.uleb128 .Ltmp4-.Lfunc_begin0           #     jumps to .Ltmp4
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp5-.Lfunc_begin0           # >> Call Site 3 <<
	.uleb128 .Ltmp6-.Ltmp5                  #   Call between .Ltmp5 and .Ltmp6
	.uleb128 .Ltmp7-.Lfunc_begin0           #     jumps to .Ltmp7
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp8-.Lfunc_begin0           # >> Call Site 4 <<
	.uleb128 .Ltmp9-.Ltmp8                  #   Call between .Ltmp8 and .Ltmp9
	.uleb128 .Ltmp10-.Lfunc_begin0          #     jumps to .Ltmp10
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp11-.Lfunc_begin0          # >> Call Site 5 <<
	.uleb128 .Ltmp12-.Ltmp11                #   Call between .Ltmp11 and .Ltmp12
	.uleb128 .Ltmp13-.Lfunc_begin0          #     jumps to .Ltmp13
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp16-.Lfunc_begin0          # >> Call Site 6 <<
	.uleb128 .Ltmp15-.Ltmp16                #   Call between .Ltmp16 and .Ltmp15
	.uleb128 .Ltmp18-.Lfunc_begin0          #     jumps to .Ltmp18
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp15-.Lfunc_begin0          # >> Call Site 7 <<
	.uleb128 .Lfunc_end0-.Ltmp15            #   Call between .Ltmp15 and .Lfunc_end0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.text
	.globl	_Z9writeFilePKcPii              # -- Begin function _Z9writeFilePKcPii
	.type	_Z9writeFilePKcPii,@function
_Z9writeFilePKcPii:                     # @_Z9writeFilePKcPii
.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	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$512, %rsp                      # imm = 0x200
	.cfi_def_cfa_offset 560
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%rsp, %rdi
	movq	%r15, %rsi
	movl	$16, %edx
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
	leaq	112(%rsp), %rdi
	callq	_ZNKSt12__basic_fileIcE7is_openEv
	testb	%al, %al
	je	.LBB1_8
# %bb.1:                                # %.preheader
	testl	%r14d, %r14d
	jle	.LBB1_7
# %bb.2:                                # %.lr.ph
	leal	-1(%r14), %r15d
	movl	%r14d, %r12d
	xorl	%r13d, %r13d
	movq	%rsp, %r14
.LBB1_3:                                # =>This Inner Loop Header: Depth=1
	movl	(%rbx,%r13,4), %esi
.Ltmp19:
	movq	%r14, %rdi
	callq	_ZNSolsEi
.Ltmp20:
# %bb.4:                                #   in Loop: Header=BB1_3 Depth=1
	cmpq	%r13, %r15
	je	.LBB1_6
# %bb.5:                                #   in Loop: Header=BB1_3 Depth=1
.Ltmp21:
	movl	$.L.str, %esi
	movl	$2, %edx
	movq	%r14, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp22:
.LBB1_6:                                # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
                                        #   in Loop: Header=BB1_3 Depth=1
	incq	%r13
	cmpq	%r13, %r12
	jne	.LBB1_3
.LBB1_7:                                # %._crit_edge
.Ltmp24:
	movq	%rsp, %rdi
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv
.Ltmp25:
	jmp	.LBB1_9
.LBB1_8:
	movl	$.L.str.1, %edi
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	printf
.LBB1_9:
	movq	_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE(%rip), %rax
	leaq	8(%rsp), %rdi
	movq	%rax, -8(%rdi)
	movq	_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE+24(%rip), %rcx
	movq	-24(%rax), %rax
	movq	%rcx, (%rsp,%rax)
	callq	_ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev
	leaq	248(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
	addq	$512, %rsp                      # imm = 0x200
	.cfi_def_cfa_offset 48
	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
.LBB1_10:
	.cfi_def_cfa_offset 560
.Ltmp26:
	jmp	.LBB1_11
.LBB1_12:
.Ltmp23:
.LBB1_11:
	movq	%rax, %rbx
	movq	%rsp, %rdi
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end1:
	.size	_Z9writeFilePKcPii, .Lfunc_end1-_Z9writeFilePKcPii
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table1:
.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 .Lfunc_begin1-.Lfunc_begin1    # >> Call Site 1 <<
	.uleb128 .Ltmp19-.Lfunc_begin1          #   Call between .Lfunc_begin1 and .Ltmp19
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp19-.Lfunc_begin1          # >> Call Site 2 <<
	.uleb128 .Ltmp22-.Ltmp19                #   Call between .Ltmp19 and .Ltmp22
	.uleb128 .Ltmp23-.Lfunc_begin1          #     jumps to .Ltmp23
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp24-.Lfunc_begin1          # >> Call Site 3 <<
	.uleb128 .Ltmp25-.Ltmp24                #   Call between .Ltmp24 and .Ltmp25
	.uleb128 .Ltmp26-.Lfunc_begin1          #     jumps to .Ltmp26
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp25-.Lfunc_begin1          # >> Call Site 4 <<
	.uleb128 .Lfunc_end1-.Ltmp25            #   Call between .Ltmp25 and .Lfunc_end1
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end1:
	.p2align	2, 0x0
                                        # -- End function
	.text
	.globl	_Z33__device_stub__q2a_global_counterPiS_i # -- Begin function _Z33__device_stub__q2a_global_counterPiS_i
	.type	_Z33__device_stub__q2a_global_counterPiS_i,@function
_Z33__device_stub__q2a_global_counterPiS_i: # @_Z33__device_stub__q2a_global_counterPiS_i
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	12(%rsp), %rsi
	movl	%edx, (%rsi)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%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	$_Z18q2a_global_counterPiS_i, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end2:
	.size	_Z33__device_stub__q2a_global_counterPiS_i, .Lfunc_end2-_Z33__device_stub__q2a_global_counterPiS_i
	.cfi_endproc
                                        # -- End function
	.globl	_Z37__device_stub__q2b_shared_mem_counterPiS_i # -- Begin function _Z37__device_stub__q2b_shared_mem_counterPiS_i
	.type	_Z37__device_stub__q2b_shared_mem_counterPiS_i,@function
_Z37__device_stub__q2b_shared_mem_counterPiS_i: # @_Z37__device_stub__q2b_shared_mem_counterPiS_i
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	12(%rsp), %rsi
	movl	%edx, (%rsi)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%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	$_Z22q2b_shared_mem_counterPiS_i, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end3:
	.size	_Z37__device_stub__q2b_shared_mem_counterPiS_i, .Lfunc_end3-_Z37__device_stub__q2b_shared_mem_counterPiS_i
	.cfi_endproc
                                        # -- End function
	.globl	_Z32__device_stub__q2c_prll_prfx_sumPiS_i # -- Begin function _Z32__device_stub__q2c_prll_prfx_sumPiS_i
	.type	_Z32__device_stub__q2c_prll_prfx_sumPiS_i,@function
_Z32__device_stub__q2c_prll_prfx_sumPiS_i: # @_Z32__device_stub__q2c_prll_prfx_sumPiS_i
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	12(%rsp), %rsi
	movl	%edx, (%rsi)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%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	$_Z17q2c_prll_prfx_sumPiS_i, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end4:
	.size	_Z32__device_stub__q2c_prll_prfx_sumPiS_i, .Lfunc_end4-_Z32__device_stub__q2c_prll_prfx_sumPiS_i
	.cfi_endproc
                                        # -- End function
	.globl	main                            # -- Begin function main
	.type	main,@function
main:                                   # @main
.Lfunc_begin2:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception2
# %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	$1744, %rsp                     # imm = 0x6D0
	.cfi_def_cfa_offset 1792
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	68(%rsp), %rbx
	movq	%rbx, %rdi
	callq	hipGetDeviceCount
	cmpl	$0, (%rbx)
	je	.LBB5_92
# %bb.1:
	xorl	%edi, %edi
	callq	hipSetDevice
	leaq	272(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipGetDevicePropertiesR0600
	testl	%eax, %eax
	jne	.LBB5_3
# %bb.2:
	leaq	272(%rsp), %rbx
	movl	360(%rbx), %r8d
	movl	364(%rbx), %r9d
	movl	288(%rbx), %ecx
	movl	348(%rbx), %eax
	movl	%eax, (%rsp)
	movl	$.L.str.3, %edi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	printf
	movq	296(%rbx), %rsi
	movq	640(%rbx), %rdx
	movl	$.L.str.4, %edi
	xorl	%eax, %eax
	callq	printf
	movl	648(%rbx), %esi
	movl	$.L.str.5, %edi
	xorl	%eax, %eax
	callq	printf
.LBB5_3:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit
	leaq	256(%rsp), %r14
	movq	%r14, -16(%r14)
	leaq	240(%rsp), %rbx
	movl	$.L.str.6, %esi
	movl	$.L.str.6+7, %edx
	movq	%rbx, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
.Ltmp27:
	leaq	72(%rsp), %rdi
	movq	%rbx, %rsi
	callq	_Z8readFileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.Ltmp28:
# %bb.4:
	movq	240(%rsp), %rdi
	cmpq	%r14, %rdi
	je	.LBB5_6
# %bb.5:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB5_6:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	movq	72(%rsp), %r12
	movq	80(%rsp), %r13
	movq	%r13, %rbx
	subq	%r12, %rbx
	sarq	$2, %rbx
	leal	(,%rbx,4), %eax
	movslq	%eax, %r14
	movq	%r14, %rdi
	callq	malloc
	movq	%rax, %r15
	cmpq	%r12, %r13
	je	.LBB5_9
# %bb.7:                                # %.lr.ph.preheader
	cmpq	$1, %rbx
	movq	%rbx, %rax
	adcq	$0, %rax
	xorl	%ecx, %ecx
.LBB5_8:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movl	(%r12,%rcx,4), %edx
	movl	%edx, (%r15,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB5_8
.LBB5_9:                                # %._crit_edge
	xorl	%r12d, %r12d
	movl	$.L.str.7, %edi
	movl	%ebx, %esi
	movl	$8, %edx
	movl	$32, %ecx
	xorl	%eax, %eax
	callq	printf
	movq	%r12, 224(%rsp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, 208(%rsp)
	movaps	%xmm0, 192(%rsp)
	movq	%r12, 176(%rsp)
	movaps	%xmm0, 160(%rsp)
	movaps	%xmm0, 144(%rsp)
	movq	%r12, 128(%rsp)
	movaps	%xmm0, 112(%rsp)
	movaps	%xmm0, 96(%rsp)
.Ltmp30:
	leaq	16(%rsp), %rdi
	callq	hipEventCreate
.Ltmp31:
# %bb.10:
.Ltmp32:
	leaq	8(%rsp), %rdi
	callq	hipEventCreate
.Ltmp33:
# %bb.11:
.Ltmp34:
	leaq	32(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
.Ltmp35:
# %bb.12:
	testl	%eax, %eax
	je	.LBB5_13
# %bb.14:
.Ltmp36:
	movl	%eax, %edi
	callq	hipGetErrorString
.Ltmp37:
# %bb.15:
	movq	%rax, %rsi
	jmp	.LBB5_16
.LBB5_13:
	movl	$.L.str.9, %esi
.LBB5_16:
	movl	$.L.str.8, %edi
	xorl	%eax, %eax
	callq	printf
.Ltmp38:
	leaq	24(%rsp), %rdi
	movl	$40, %esi
	callq	hipMalloc
.Ltmp39:
# %bb.17:
	testl	%eax, %eax
	je	.LBB5_18
# %bb.19:
.Ltmp40:
	movl	%eax, %edi
	callq	hipGetErrorString
.Ltmp41:
# %bb.20:
	movq	%rax, %rsi
	jmp	.LBB5_21
.LBB5_18:
	movl	$.L.str.9, %esi
.LBB5_21:
	movl	$.L.str.10, %edi
	xorl	%eax, %eax
	callq	printf
.Ltmp42:
	leaq	48(%rsp), %rdi
	movl	$40, %esi
	callq	hipMalloc
.Ltmp43:
# %bb.22:
	testl	%eax, %eax
	je	.LBB5_23
# %bb.24:
.Ltmp44:
	movl	%eax, %edi
	callq	hipGetErrorString
.Ltmp45:
# %bb.25:
	movq	%rax, %rsi
	jmp	.LBB5_26
.LBB5_23:
	movl	$.L.str.9, %esi
.LBB5_26:
	movl	$.L.str.11, %edi
	xorl	%eax, %eax
	callq	printf
.Ltmp46:
	leaq	40(%rsp), %rdi
	movl	$40, %esi
	callq	hipMalloc
.Ltmp47:
# %bb.27:
	testl	%eax, %eax
	je	.LBB5_28
# %bb.29:
.Ltmp48:
	movl	%eax, %edi
	callq	hipGetErrorString
.Ltmp49:
# %bb.30:
	movq	%rax, %rsi
	jmp	.LBB5_31
.LBB5_28:
	movl	$.L.str.9, %esi
.LBB5_31:
	movl	$.L.str.12, %edi
	xorl	%eax, %eax
	callq	printf
	movq	32(%rsp), %rdi
.Ltmp50:
	movq	%r15, %rsi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp51:
# %bb.32:
	testl	%eax, %eax
	je	.LBB5_33
# %bb.34:
.Ltmp52:
	movl	%eax, %edi
	callq	hipGetErrorString
.Ltmp53:
# %bb.35:
	movq	%rax, %rsi
	jmp	.LBB5_36
.LBB5_33:
	movl	$.L.str.9, %esi
.LBB5_36:
	movl	$.L.str.13, %edi
	xorl	%eax, %eax
	callq	printf
	movq	16(%rsp), %rdi
.Ltmp54:
	xorl	%esi, %esi
	callq	hipEventRecord
.Ltmp55:
# %bb.37:
.Ltmp56:
	movabsq	$4294967304, %rdi               # imm = 0x100000008
	movabsq	$4294967328, %rdx               # imm = 0x100000020
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp57:
# %bb.38:
	testl	%eax, %eax
	jne	.LBB5_40
# %bb.39:
	movq	24(%rsp), %rdi
	movq	32(%rsp), %rsi
.Ltmp58:
	movl	%ebx, %edx
	callq	_Z33__device_stub__q2a_global_counterPiS_i
.Ltmp59:
.LBB5_40:
	movq	8(%rsp), %rdi
.Ltmp60:
	xorl	%esi, %esi
	callq	hipEventRecord
.Ltmp61:
# %bb.41:
	movq	8(%rsp), %rdi
.Ltmp62:
	callq	hipEventSynchronize
.Ltmp63:
# %bb.42:
	movq	16(%rsp), %rsi
	movq	8(%rsp), %rdx
.Ltmp64:
	leaq	64(%rsp), %rdi
	callq	hipEventElapsedTime
.Ltmp65:
# %bb.43:
	movq	16(%rsp), %rdi
.Ltmp66:
	xorl	%esi, %esi
	callq	hipEventRecord
.Ltmp67:
# %bb.44:
.Ltmp68:
	movabsq	$4294967304, %rdi               # imm = 0x100000008
	movabsq	$4294967328, %rdx               # imm = 0x100000020
	movl	$40, %r8d
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp69:
# %bb.45:
	testl	%eax, %eax
	jne	.LBB5_47
# %bb.46:
	movq	48(%rsp), %rdi
	movq	32(%rsp), %rsi
.Ltmp70:
	movl	%ebx, %edx
	callq	_Z37__device_stub__q2b_shared_mem_counterPiS_i
.Ltmp71:
.LBB5_47:
	movq	8(%rsp), %rdi
.Ltmp72:
	xorl	%esi, %esi
	callq	hipEventRecord
.Ltmp73:
# %bb.48:
	movq	8(%rsp), %rdi
.Ltmp74:
	callq	hipEventSynchronize
.Ltmp75:
# %bb.49:
	movq	16(%rsp), %rsi
	movq	8(%rsp), %rdx
.Ltmp76:
	leaq	60(%rsp), %rdi
	callq	hipEventElapsedTime
.Ltmp77:
# %bb.50:
	movq	16(%rsp), %rdi
.Ltmp78:
	xorl	%esi, %esi
	callq	hipEventRecord
.Ltmp79:
# %bb.51:
.Ltmp81:
	movabsq	$4294967304, %rdi               # imm = 0x100000008
	movabsq	$4294967328, %rdx               # imm = 0x100000020
	movl	$64, %r8d
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp82:
# %bb.52:
	testl	%eax, %eax
	jne	.LBB5_54
# %bb.53:
	movq	40(%rsp), %rdi
	movq	24(%rsp), %rsi
.Ltmp83:
	movl	$10, %edx
	callq	_Z32__device_stub__q2c_prll_prfx_sumPiS_i
.Ltmp84:
.LBB5_54:
	movq	8(%rsp), %rdi
.Ltmp85:
	xorl	%esi, %esi
	callq	hipEventRecord
.Ltmp86:
# %bb.55:
	movq	8(%rsp), %rdi
.Ltmp87:
	callq	hipEventSynchronize
.Ltmp88:
# %bb.56:
	movq	16(%rsp), %rsi
	movq	8(%rsp), %rdx
.Ltmp89:
	leaq	56(%rsp), %rdi
	callq	hipEventElapsedTime
.Ltmp90:
# %bb.57:
	movq	24(%rsp), %rsi
.Ltmp91:
	leaq	192(%rsp), %rdi
	movl	$40, %edx
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp92:
# %bb.58:
	testl	%eax, %eax
	je	.LBB5_59
# %bb.60:
.Ltmp93:
	movl	%eax, %edi
	callq	hipGetErrorString
.Ltmp94:
# %bb.61:
	movq	%rax, %rsi
	jmp	.LBB5_62
.LBB5_59:
	movl	$.L.str.9, %esi
.LBB5_62:
	movl	$.L.str.14, %edi
	xorl	%eax, %eax
	callq	printf
	movq	48(%rsp), %rsi
.Ltmp95:
	leaq	144(%rsp), %rdi
	movl	$40, %edx
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp96:
# %bb.63:
	testl	%eax, %eax
	je	.LBB5_64
# %bb.65:
.Ltmp97:
	movl	%eax, %edi
	callq	hipGetErrorString
.Ltmp98:
# %bb.66:
	movq	%rax, %rsi
	jmp	.LBB5_67
.LBB5_64:
	movl	$.L.str.9, %esi
.LBB5_67:
	movl	$.L.str.15, %edi
	xorl	%eax, %eax
	callq	printf
	movq	40(%rsp), %rsi
.Ltmp99:
	leaq	96(%rsp), %rdi
	movl	$40, %edx
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp100:
# %bb.68:
	testl	%eax, %eax
	je	.LBB5_69
# %bb.70:
.Ltmp101:
	movl	%eax, %edi
	callq	hipGetErrorString
.Ltmp102:
# %bb.71:
	movq	%rax, %rsi
	jmp	.LBB5_72
.LBB5_69:
	movl	$.L.str.9, %esi
.LBB5_72:
	movl	$.L.str.16, %edi
	xorl	%eax, %eax
	callq	printf
	cvtss2sd	64(%rsp), %xmm0
	movl	$.L.str.17, %edi
	movb	$1, %al
	callq	printf
	xorl	%ebx, %ebx
.LBB5_73:                               # =>This Inner Loop Header: Depth=1
	movl	192(%rsp,%rbx,4), %edx
	movl	$.L.str.18, %edi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	printf
	incq	%rbx
	cmpq	$10, %rbx
	jne	.LBB5_73
# %bb.74:
.Ltmp103:
	leaq	192(%rsp), %rsi
	movl	$.L.str.19, %edi
	movl	$10, %edx
	callq	_Z9writeFilePKcPii
.Ltmp104:
# %bb.75:
	xorps	%xmm0, %xmm0
	cvtss2sd	60(%rsp), %xmm0
	movl	$.L.str.20, %edi
	movb	$1, %al
	callq	printf
	xorl	%ebx, %ebx
.LBB5_76:                               # =>This Inner Loop Header: Depth=1
	movl	144(%rsp,%rbx,4), %edx
	movl	$.L.str.18, %edi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	printf
	incq	%rbx
	cmpq	$10, %rbx
	jne	.LBB5_76
# %bb.77:
.Ltmp105:
	leaq	144(%rsp), %rsi
	movl	$.L.str.21, %edi
	movl	$10, %edx
	callq	_Z9writeFilePKcPii
.Ltmp106:
# %bb.78:
	xorps	%xmm0, %xmm0
	cvtss2sd	56(%rsp), %xmm0
	movl	$.L.str.22, %edi
	movb	$1, %al
	callq	printf
	xorl	%ebx, %ebx
.LBB5_79:                               # =>This Inner Loop Header: Depth=1
	movl	96(%rsp,%rbx,4), %edx
	movl	$.L.str.18, %edi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	printf
	incq	%rbx
	cmpq	$10, %rbx
	jne	.LBB5_79
# %bb.80:
.Ltmp107:
	leaq	96(%rsp), %rsi
	movl	$.L.str.23, %edi
	movl	$10, %edx
	callq	_Z9writeFilePKcPii
.Ltmp108:
# %bb.81:
	movl	$.Lstr, %edi
	callq	puts@PLT
	movq	32(%rsp), %rdi
.Ltmp109:
	callq	hipFree
.Ltmp110:
# %bb.82:
	movq	24(%rsp), %rdi
.Ltmp111:
	callq	hipFree
.Ltmp112:
# %bb.83:
	movq	48(%rsp), %rdi
.Ltmp113:
	callq	hipFree
.Ltmp114:
# %bb.84:
	movq	40(%rsp), %rdi
.Ltmp115:
	callq	hipFree
.Ltmp116:
# %bb.85:
	movq	72(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB5_87
# %bb.86:
	callq	_ZdlPv
.LBB5_87:                               # %_ZNSt6vectorIiSaIiEED2Ev.exit
	xorl	%eax, %eax
	addq	$1744, %rsp                     # imm = 0x6D0
	.cfi_def_cfa_offset 48
	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
.LBB5_92:
	.cfi_def_cfa_offset 1792
	movq	stderr(%rip), %rcx
	movl	$.L.str.2, %edi
	movl	$35, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	movl	$1, %edi
	callq	exit
.LBB5_94:
.Ltmp29:
	movq	%rax, %rbx
	movq	240(%rsp), %rdi
	cmpq	%r14, %rdi
	jne	.LBB5_90
	jmp	.LBB5_91
.LBB5_93:
.Ltmp117:
	jmp	.LBB5_89
.LBB5_88:
.Ltmp80:
.LBB5_89:
	movq	%rax, %rbx
	movq	72(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB5_91
.LBB5_90:
	callq	_ZdlPv
.LBB5_91:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit89
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end5:
	.size	main, .Lfunc_end5-main
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table5:
.Lexception2:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end2-.Lcst_begin2
.Lcst_begin2:
	.uleb128 .Lfunc_begin2-.Lfunc_begin2    # >> Call Site 1 <<
	.uleb128 .Ltmp27-.Lfunc_begin2          #   Call between .Lfunc_begin2 and .Ltmp27
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp27-.Lfunc_begin2          # >> Call Site 2 <<
	.uleb128 .Ltmp28-.Ltmp27                #   Call between .Ltmp27 and .Ltmp28
	.uleb128 .Ltmp29-.Lfunc_begin2          #     jumps to .Ltmp29
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp30-.Lfunc_begin2          # >> Call Site 3 <<
	.uleb128 .Ltmp79-.Ltmp30                #   Call between .Ltmp30 and .Ltmp79
	.uleb128 .Ltmp80-.Lfunc_begin2          #     jumps to .Ltmp80
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp81-.Lfunc_begin2          # >> Call Site 4 <<
	.uleb128 .Ltmp116-.Ltmp81               #   Call between .Ltmp81 and .Ltmp116
	.uleb128 .Ltmp117-.Lfunc_begin2         #     jumps to .Ltmp117
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp116-.Lfunc_begin2         # >> Call Site 5 <<
	.uleb128 .Lfunc_end5-.Ltmp116           #   Call between .Ltmp116 and .Lfunc_end5
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end2:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag,"axG",@progbits,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag,comdat
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag # -- Begin function _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.p2align	1, 0x90
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag,@function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag: # @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.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
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	subq	%rsi, %r14
	movq	%r14, (%rsp)
	cmpq	$15, %r14
	jbe	.LBB6_1
# %bb.2:
	movq	%rsp, %r12
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm
	movq	%rax, (%rbx)
	movq	(%r12), %rcx
	movq	%rcx, 16(%rbx)
	jmp	.LBB6_3
.LBB6_1:                                # %._crit_edge
	movq	(%rbx), %rax
.LBB6_3:
	testq	%r14, %r14
	je	.LBB6_7
# %bb.4:
	cmpq	$1, %r14
	jne	.LBB6_6
# %bb.5:
	movb	(%r15), %cl
	movb	%cl, (%rax)
	jmp	.LBB6_7
.LBB6_6:
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	memcpy@PLT
.LBB6_7:                                # %_ZZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tagEN6_GuardD2Ev.exit
	movq	(%rsp), %rax
	movq	%rax, 8(%rbx)
	movq	(%rbx), %rcx
	movb	$0, (%rcx,%rax)
	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_end6:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag, .Lfunc_end6-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,"axG",@progbits,_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,comdat
	.weak	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_ # -- Begin function _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.p2align	1, 0x90
	.type	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,@function
_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_: # @_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.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	$24, %rsp
	.cfi_def_cfa_offset 80
	.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	%rdx, (%rsp)                    # 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	$1, %esi
	movl	$.L.str.27, %edx
	callq	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	movq	(%rbx), %r13
	movq	8(%rbx), %r15
	movq	%r12, 8(%rsp)                   # 8-byte Spill
	subq	%r13, %r12
	movq	%r12, %r14
	sarq	$2, %r14
	testq	%rax, %rax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	je	.LBB7_1
# %bb.2:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorIiE8allocateEmPKv
	movq	%rax, %rbp
	jmp	.LBB7_3
.LBB7_1:
	xorl	%ebp, %ebp
.LBB7_3:                                # %_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.exit
	movq	(%rsp), %rax                    # 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, (%rbp,%r14,4)
	testq	%r12, %r12
	jle	.LBB7_5
# %bb.4:
	movq	%rbp, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	memmove@PLT
.LBB7_5:                                # %_ZNSt6vectorIiSaIiEE11_S_relocateEPiS2_S2_RS0_.exit
	addq	%rbp, %r12
	addq	$4, %r12
	movq	8(%rsp), %rsi                   # 8-byte Reload
	subq	%rsi, %r15
	testq	%r15, %r15
	jle	.LBB7_7
# %bb.6:
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	memmove@PLT
.LBB7_7:                                # %_ZNSt6vectorIiSaIiEE11_S_relocateEPiS2_S2_RS0_.exit16
	testq	%r13, %r13
	je	.LBB7_9
# %bb.8:
	movq	%r13, %rdi
	callq	_ZdlPv
.LBB7_9:                                # %_ZNSt12_Vector_baseIiSaIiEE13_M_deallocateEPim.exit
	addq	%r15, %r12
	movq	%rbp, (%rbx)
	movq	%r12, 8(%rbx)
	movq	16(%rsp), %rax                  # 8-byte Reload
	leaq	(,%rax,4), %rax
	addq	%rbp, %rax
	movq	%rax, 16(%rbx)
	addq	$24, %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_end7:
	.size	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_, .Lfunc_end7-_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc,"axG",@progbits,_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc,comdat
	.weak	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc # -- Begin function _ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	.p2align	1, 0x90
	.type	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc,@function
_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc: # @_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	.cfi_startproc
# %bb.0:
	movabsq	$2305843009213693951, %rcx      # imm = 0x1FFFFFFFFFFFFFFF
	movq	8(%rdi), %r8
	subq	(%rdi), %r8
	sarq	$2, %r8
	movq	%rcx, %rax
	subq	%r8, %rax
	cmpq	%rsi, %rax
	jb	.LBB8_2
# %bb.1:
	cmpq	%rsi, %r8
	cmovaq	%r8, %rsi
	leaq	(%rsi,%r8), %rax
	cmpq	%rcx, %rax
	cmovaeq	%rcx, %rax
	addq	%r8, %rsi
	cmovbq	%rcx, %rax
	retq
.LBB8_2:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rdx, %rdi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end8:
	.size	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc, .Lfunc_end8-_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt15__new_allocatorIiE8allocateEmPKv,"axG",@progbits,_ZNSt15__new_allocatorIiE8allocateEmPKv,comdat
	.weak	_ZNSt15__new_allocatorIiE8allocateEmPKv # -- Begin function _ZNSt15__new_allocatorIiE8allocateEmPKv
	.p2align	1, 0x90
	.type	_ZNSt15__new_allocatorIiE8allocateEmPKv,@function
_ZNSt15__new_allocatorIiE8allocateEmPKv: # @_ZNSt15__new_allocatorIiE8allocateEmPKv
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rsi, %rax
	shrq	$61, %rax
	jne	.LBB9_1
# %bb.3:
	shlq	$2, %rsi
	movq	%rsi, %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB9_1:
	.cfi_def_cfa_offset 16
	shrq	$62, %rsi
	je	.LBB9_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB9_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end9:
	.size	_ZNSt15__new_allocatorIiE8allocateEmPKv, .Lfunc_end9-_ZNSt15__new_allocatorIiE8allocateEmPKv
	.cfi_endproc
                                        # -- 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:
	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	.LBB10_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB10_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z18q2a_global_counterPiS_i, %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	$_Z22q2b_shared_mem_counterPiS_i, %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	$_Z17q2c_prll_prfx_sumPiS_i, %esi
	movl	$.L__unnamed_3, %edx
	movl	$.L__unnamed_3, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end10:
	.size	__hip_module_ctor, .Lfunc_end10-__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	.LBB11_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
.LBB11_2:
	retq
.Lfunc_end11:
	.size	__hip_module_dtor, .Lfunc_end11-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	", "
	.size	.L.str, 3

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"Unable to open/write to file %s"
	.size	.L.str.1, 32

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

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

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

	.type	.L.str.2,@object                # @.str.2
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.2:
	.asciz	"error: no devices supporting CUDA.\n"
	.size	.L.str.2, 36

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"Using device %d: %s\nglobal mem: %dB; compute v%d.%d; clock: %d kHz\n"
	.size	.L.str.3, 68

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"sharedMemPerBlock: %zu    sharedMemPerMultiprocessor: %zu\n"
	.size	.L.str.4, 59

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"regsPerMultiprocessor:  %d\n"
	.size	.L.str.5, 28

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"inp.txt"
	.size	.L.str.6, 8

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"Input size: %d   blocks: %d   threads: %d\n\n"
	.size	.L.str.7, 44

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"gpu_in Malloc %s\n"
	.size	.L.str.8, 18

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"Success!"
	.size	.L.str.9, 9

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"gpu_out_2a Malloc %s\n"
	.size	.L.str.10, 22

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"gpu_out_2b Malloc %s\n"
	.size	.L.str.11, 22

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"gpu_out_2c Malloc %s\n"
	.size	.L.str.12, 22

	.type	.L.str.13,@object               # @.str.13
.L.str.13:
	.asciz	"gpu_in Memcpy %s\n"
	.size	.L.str.13, 18

	.type	.L.str.14,@object               # @.str.14
.L.str.14:
	.asciz	"cpu_out_2a Memcpy %s\n"
	.size	.L.str.14, 22

	.type	.L.str.15,@object               # @.str.15
.L.str.15:
	.asciz	"cpu_out_2b Memcpy %s\n"
	.size	.L.str.15, 22

	.type	.L.str.16,@object               # @.str.16
.L.str.16:
	.asciz	"cpu_out_2c Memcpy %s\n"
	.size	.L.str.16, 22

	.type	.L.str.17,@object               # @.str.17
.L.str.17:
	.asciz	"\n\n2a:   %f\n"
	.size	.L.str.17, 12

	.type	.L.str.18,@object               # @.str.18
.L.str.18:
	.asciz	"%d=%d  "
	.size	.L.str.18, 8

	.type	.L.str.19,@object               # @.str.19
.L.str.19:
	.asciz	"q2a.txt"
	.size	.L.str.19, 8

	.type	.L.str.20,@object               # @.str.20
.L.str.20:
	.asciz	"\n\n2b:   %f\n"
	.size	.L.str.20, 12

	.type	.L.str.21,@object               # @.str.21
.L.str.21:
	.asciz	"q2b.txt"
	.size	.L.str.21, 8

	.type	.L.str.22,@object               # @.str.22
.L.str.22:
	.asciz	"\n\n2c:   %f\n"
	.size	.L.str.22, 12

	.type	.L.str.23,@object               # @.str.23
.L.str.23:
	.asciz	"q2c.txt"
	.size	.L.str.23, 8

	.type	.L.str.25,@object               # @.str.25
.L.str.25:
	.asciz	"stoi"
	.size	.L.str.25, 5

	.type	.L.str.27,@object               # @.str.27
.L.str.27:
	.asciz	"vector::_M_realloc_insert"
	.size	.L.str.27, 26

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z18q2a_global_counterPiS_i"
	.size	.L__unnamed_1, 28

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z22q2b_shared_mem_counterPiS_i"
	.size	.L__unnamed_2, 32

	.type	.L__unnamed_3,@object           # @2
.L__unnamed_3:
	.asciz	"_Z17q2c_prll_prfx_sumPiS_i"
	.size	.L__unnamed_3, 27

	.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	"\n"
	.size	.Lstr, 2

	.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 __gxx_personality_v0
	.addrsig_sym _Z33__device_stub__q2a_global_counterPiS_i
	.addrsig_sym _Z37__device_stub__q2b_shared_mem_counterPiS_i
	.addrsig_sym _Z32__device_stub__q2c_prll_prfx_sumPiS_i
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Unwind_Resume
	.addrsig_sym _Z18q2a_global_counterPiS_i
	.addrsig_sym _Z22q2b_shared_mem_counterPiS_i
	.addrsig_sym _Z17q2c_prll_prfx_sumPiS_i
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z18q2a_global_counterPiS_i ; -- Begin function _Z18q2a_global_counterPiS_i
	.globl	_Z18q2a_global_counterPiS_i
	.p2align	8
	.type	_Z18q2a_global_counterPiS_i,@function
_Z18q2a_global_counterPiS_i:            ; @_Z18q2a_global_counterPiS_i
; %bb.0:
	s_clause 0x2
	s_load_b32 s2, s[0:1], 0x24
	s_load_b32 s3, s[0:1], 0x18
	s_load_b32 s4, s[0:1], 0x10
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_mul_i32 s3, s3, s2
	v_cvt_f32_u32_e32 v1, s3
	s_sub_i32 s6, 0, s3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_iflag_f32_e32 v1, v1
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v1, 0x4f7ffffe, v1
	v_cvt_u32_f32_e32 v1, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_readfirstlane_b32 s5, v1
	v_mad_u64_u32 v[1:2], null, s15, s2, v[0:1]
	s_mul_i32 s6, s6, s5
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_mul_hi_u32 s6, s5, s6
	s_add_i32 s5, s5, s6
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_mul_hi_u32 s5, s4, s5
	s_mul_i32 s6, s5, s3
	s_add_i32 s7, s5, 1
	s_sub_i32 s6, s4, s6
	s_delay_alu instid0(SALU_CYCLE_1)
	s_sub_i32 s8, s6, s3
	s_cmp_ge_u32 s6, s3
	s_cselect_b32 s2, s7, s5
	s_cselect_b32 s5, s8, s6
	s_add_i32 s6, s2, 1
	s_cmp_ge_u32 s5, s3
	s_mov_b32 s3, 0
	s_cselect_b32 s2, s6, s2
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_add_i32 s2, s2, 1
	v_mul_lo_u32 v0, v1, s2
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v1, s2, v0
	s_mov_b32 s2, exec_lo
	v_min_i32_e32 v3, s4, v1
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_lt_i32_e64 v0, v3
	s_cbranch_execz .LBB0_3
; %bb.1:                                ; %.lr.ph.preheader
	s_load_b128 s[4:7], s[0:1], 0x0
	v_ashrrev_i32_e32 v1, 31, v0
	v_mov_b32_e32 v4, 1
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[1:2], 2, v[0:1]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v1, vcc_lo, s6, v1
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v2, vcc_lo, s7, v2, vcc_lo
.LBB0_2:                                ; %.lr.ph
                                        ; =>This Inner Loop Header: Depth=1
	global_load_b32 v5, v[1:2], off
	v_add_nc_u32_e32 v0, 1, v0
	v_add_co_u32 v1, s0, v1, 4
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_add_co_ci_u32_e64 v2, s0, 0, v2, s0
	s_waitcnt vmcnt(0)
	v_mul_hi_i32 v5, 0x51eb851f, v5
	v_lshrrev_b32_e32 v6, 31, v5
	v_ashrrev_i32_e32 v5, 5, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v5, v5, v6
	v_ashrrev_i32_e32 v6, 31, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[5:6], 2, v[5:6]
	v_add_co_u32 v5, vcc_lo, s4, v5
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_3) | instid1(SALU_CYCLE_1)
	v_add_co_ci_u32_e32 v6, vcc_lo, s5, v6, vcc_lo
	v_cmp_ge_i32_e32 vcc_lo, v0, v3
	global_atomic_add_u32 v[5:6], v4, off
	s_or_b32 s3, vcc_lo, s3
	s_and_not1_b32 exec_lo, exec_lo, s3
	s_cbranch_execnz .LBB0_2
.LBB0_3:                                ; %Flow24
	s_or_b32 exec_lo, exec_lo, s2
	s_waitcnt_vscnt null, 0x0
	s_barrier
	buffer_gl0_inv
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z18q2a_global_counterPiS_i
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 280
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 7
		.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	_Z18q2a_global_counterPiS_i, .Lfunc_end0-_Z18q2a_global_counterPiS_i
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 408
; NumSgprs: 18
; NumVgprs: 7
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 7
; 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	_Z22q2b_shared_mem_counterPiS_i ; -- Begin function _Z22q2b_shared_mem_counterPiS_i
	.globl	_Z22q2b_shared_mem_counterPiS_i
	.p2align	8
	.type	_Z22q2b_shared_mem_counterPiS_i,@function
_Z22q2b_shared_mem_counterPiS_i:        ; @_Z22q2b_shared_mem_counterPiS_i
; %bb.0:
	s_load_b32 s5, s[0:1], 0x24
	s_mov_b32 s2, exec_lo
	v_cmpx_eq_u32_e32 0, v0
	s_cbranch_execz .LBB1_2
; %bb.1:
	v_mov_b32_e32 v1, 0
	ds_store_b32 v1, v1 offset:40
.LBB1_2:
	s_or_b32 exec_lo, exec_lo, s2
	s_clause 0x1
	s_load_b32 s4, s[0:1], 0x10
	s_load_b128 s[0:3], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s6, 0xffff, s5
	s_mov_b32 s5, exec_lo
	s_mul_i32 s7, s15, s6
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v2, s7, v0
	v_cmpx_gt_i32_e64 s4, v2
	s_cbranch_execz .LBB1_5
; %bb.3:                                ; %.lr.ph
	v_dual_mov_b32 v3, 1 :: v_dual_mov_b32 v0, v2
	s_add_i32 s6, s7, s6
	s_mov_b32 s7, 0
.LBB1_4:                                ; =>This Inner Loop Header: Depth=1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v1, 31, v0
	v_lshlrev_b64 v[4:5], 2, v[0:1]
	v_add_nc_u32_e32 v0, s6, v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v4, vcc_lo, s2, v4
	v_add_co_ci_u32_e32 v5, vcc_lo, s3, v5, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_4) | instid1(VALU_DEP_1)
	v_cmp_le_i32_e32 vcc_lo, s4, v0
	global_load_b32 v1, v[4:5], off
	s_or_b32 s7, vcc_lo, s7
	s_waitcnt vmcnt(0)
	v_mul_hi_i32 v1, 0x51eb851f, v1
	v_lshrrev_b32_e32 v4, 31, v1
	v_ashrrev_i32_e32 v1, 5, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v1, v1, v4
	v_lshl_add_u32 v1, v1, 2, 0
	ds_add_u32 v1, v3
	s_and_not1_b32 exec_lo, exec_lo, s7
	s_cbranch_execnz .LBB1_4
.LBB1_5:                                ; %Flow32
	s_or_b32 exec_lo, exec_lo, s5
	s_mov_b32 s2, 0
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	s_mov_b32 s3, exec_lo
	v_cmpx_eq_u32_e32 0, v2
	s_cbranch_execz .LBB1_10
; %bb.6:                                ; %.preheader.preheader
	v_mov_b32_e32 v0, 0
.LBB1_7:                                ; %.preheader
                                        ; =>This Inner Loop Header: Depth=1
	s_mov_b32 s4, exec_lo
	s_mov_b32 s3, exec_lo
	v_mbcnt_lo_u32_b32 v1, s4, 0
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_eq_u32_e32 0, v1
	s_cbranch_execz .LBB1_9
; %bb.8:                                ;   in Loop: Header=BB1_7 Depth=1
	s_add_i32 s5, s2, 0
	s_bcnt1_i32_b32 s4, s4
	v_mov_b32_e32 v1, s5
	ds_load_b32 v1, v1
	s_waitcnt lgkmcnt(0)
	v_mul_lo_u32 v1, v1, s4
	global_atomic_add_u32 v0, v1, s[0:1]
.LBB1_9:                                ;   in Loop: Header=BB1_7 Depth=1
	s_or_b32 exec_lo, exec_lo, s3
	s_add_i32 s2, s2, 4
	s_add_u32 s0, s0, 4
	s_addc_u32 s1, s1, 0
	s_cmp_lg_u32 s2, 40
	s_waitcnt_vscnt null, 0x0
	s_barrier
	buffer_gl0_inv
	s_cbranch_scc1 .LBB1_7
.LBB1_10:                               ; %.loopexit
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z22q2b_shared_mem_counterPiS_i
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 280
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 6
		.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	_Z22q2b_shared_mem_counterPiS_i, .Lfunc_end1-_Z22q2b_shared_mem_counterPiS_i
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 376
; NumSgprs: 18
; NumVgprs: 6
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 6
; 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	_Z17q2c_prll_prfx_sumPiS_i ; -- Begin function _Z17q2c_prll_prfx_sumPiS_i
	.globl	_Z17q2c_prll_prfx_sumPiS_i
	.p2align	8
	.type	_Z17q2c_prll_prfx_sumPiS_i,@function
_Z17q2c_prll_prfx_sumPiS_i:             ; @_Z17q2c_prll_prfx_sumPiS_i
; %bb.0:
	s_load_b32 s14, s[0:1], 0x10
	s_mov_b32 s5, 0x3fe55555
	s_mov_b32 s4, 0x55555555
	s_mov_b32 s2, 0x6b47b09a
	s_mov_b32 s6, 0xbf559e2b
	s_mov_b32 s3, 0x3fc38538
	s_mov_b32 s7, 0x3fc3ab76
	s_mov_b32 s11, 0x3fd24924
	s_mov_b32 s10, 0x9b27acf1
	s_mov_b32 s13, 0x3fd99999
	s_mov_b32 s12, 0x998ef7b6
	s_mov_b32 s9, 0x3c7abc9e
	s_mov_b32 s8, 0x3b39803f
	s_mov_b32 s16, 0
	s_mov_b32 s18, 0x968915a9
	s_mov_b32 s20, 0x4222de17
	s_mov_b32 s19, 0x3fba6564
	s_mov_b32 s21, 0x3fbdee67
	s_waitcnt lgkmcnt(0)
	v_cvt_f64_i32_e32 v[1:2], s14
	s_cmp_gt_i32 s14, -1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_frexp_mant_f64_e32 v[3:4], v[1:2]
	v_cmp_gt_f64_e32 vcc_lo, s[4:5], v[3:4]
	v_cndmask_b32_e64 v5, 0, 1, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ldexp_f64 v[3:4], v[3:4], v5
	v_add_f64 v[5:6], v[3:4], 1.0
	v_add_f64 v[11:12], v[3:4], -1.0
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[7:8], v[5:6]
	v_add_f64 v[13:14], v[5:6], -1.0
	v_add_f64 v[3:4], v[3:4], -v[13:14]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[9:10], -v[5:6], v[7:8], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[7:8], v[9:10], v[7:8], v[7:8]
	v_fma_f64 v[9:10], -v[5:6], v[7:8], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[7:8], v[9:10], v[7:8], v[7:8]
	v_mul_f64 v[9:10], v[11:12], v[7:8]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[15:16], v[5:6], v[9:10]
	v_fma_f64 v[5:6], v[9:10], v[5:6], -v[15:16]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[3:4], v[9:10], v[3:4], v[5:6]
	v_add_f64 v[5:6], v[15:16], v[3:4]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_f64 v[13:14], v[11:12], -v[5:6]
	v_add_f64 v[15:16], v[5:6], -v[15:16]
	v_add_f64 v[11:12], v[11:12], -v[13:14]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[3:4], v[15:16], -v[3:4]
	v_add_f64 v[5:6], v[11:12], -v[5:6]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[3:4], v[3:4], v[5:6]
	v_add_f64 v[3:4], v[13:14], v[3:4]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[3:4], v[7:8], v[3:4]
	v_add_f64 v[5:6], v[9:10], v[3:4]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[7:8], v[5:6], v[5:6]
	v_fma_f64 v[11:12], v[7:8], s[6:7], s[2:3]
	s_mov_b32 s2, 0xd7f4df2e
	s_mov_b32 s3, 0x3fc7474d
	v_mul_f64 v[13:14], v[5:6], v[7:8]
	s_mov_b32 s7, 0x3fe62e42
	s_mov_b32 s6, 0xfefa39ef
	s_delay_alu instid0(VALU_DEP_2)
	v_fma_f64 v[11:12], v[7:8], v[11:12], s[2:3]
	s_mov_b32 s2, 0x16291751
	s_mov_b32 s3, 0x3fcc71c0
	s_delay_alu instid0(VALU_DEP_1) | instid1(SALU_CYCLE_1)
	v_fma_f64 v[11:12], v[7:8], v[11:12], s[2:3]
	s_mov_b32 s2, 0x55555780
	s_mov_b32 s3, s5
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_fma_f64 v[11:12], v[7:8], v[11:12], s[10:11]
	s_mov_b32 s10, 0x924920da
	v_fma_f64 v[11:12], v[7:8], v[11:12], s[12:13]
	s_mov_b32 s12, 0x9999999c
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_3) | instid1(VALU_DEP_4)
	v_fma_f64 v[7:8], v[7:8], v[11:12], s[2:3]
	v_frexp_exp_i32_f64_e32 v11, v[1:2]
	v_ldexp_f64 v[1:2], v[5:6], 1
	v_add_f64 v[5:6], v[5:6], -v[9:10]
	v_mul_f64 v[7:8], v[13:14], v[7:8]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_subrev_co_ci_u32_e32 v11, vcc_lo, 0, v11, vcc_lo
	v_add_f64 v[3:4], v[3:4], -v[5:6]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_cvt_f64_i32_e32 v[11:12], v11
	v_add_f64 v[9:10], v[1:2], v[7:8]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_ldexp_f64 v[3:4], v[3:4], 1
	v_mul_f64 v[13:14], v[11:12], s[6:7]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[1:2], v[9:10], -v[1:2]
	v_fma_f64 v[5:6], v[11:12], s[6:7], -v[13:14]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[1:2], v[7:8], -v[1:2]
	v_fma_f64 v[5:6], v[11:12], s[8:9], v[5:6]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[1:2], v[3:4], v[1:2]
	v_add_f64 v[3:4], v[13:14], v[5:6]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[7:8], v[9:10], v[1:2]
	v_add_f64 v[13:14], v[3:4], -v[13:14]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_f64 v[11:12], v[3:4], v[7:8]
	v_add_f64 v[9:10], v[7:8], -v[9:10]
	v_add_f64 v[5:6], v[5:6], -v[13:14]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[15:16], v[11:12], -v[3:4]
	v_add_f64 v[1:2], v[1:2], -v[9:10]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_f64 v[17:18], v[11:12], -v[15:16]
	v_add_f64 v[7:8], v[7:8], -v[15:16]
	v_add_f64 v[9:10], v[5:6], v[1:2]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[3:4], v[3:4], -v[17:18]
	v_add_f64 v[3:4], v[7:8], v[3:4]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[7:8], v[9:10], -v[5:6]
	v_add_f64 v[3:4], v[9:10], v[3:4]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_f64 v[9:10], v[9:10], -v[7:8]
	v_add_f64 v[1:2], v[1:2], -v[7:8]
	v_add_f64 v[13:14], v[11:12], v[3:4]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[5:6], v[5:6], -v[9:10]
	v_add_f64 v[7:8], v[13:14], -v[11:12]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[1:2], v[1:2], v[5:6]
	v_add_f64 v[3:4], v[3:4], -v[7:8]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[1:2], v[1:2], v[3:4]
	v_add_f64 v[1:2], v[13:14], v[1:2]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_div_scale_f64 v[3:4], null, s[6:7], s[6:7], v[1:2]
	v_div_scale_f64 v[9:10], vcc_lo, v[1:2], s[6:7], v[1:2]
	v_rcp_f64_e32 v[5:6], v[3:4]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[7:8], -v[3:4], v[5:6], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[5:6], v[5:6], v[7:8], v[5:6]
	v_fma_f64 v[7:8], -v[3:4], v[5:6], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[5:6], v[5:6], v[7:8], v[5:6]
	v_mul_f64 v[7:8], v[9:10], v[5:6]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[3:4], -v[3:4], v[7:8], v[9:10]
	v_div_fmas_f64 v[3:4], v[3:4], v[5:6], v[7:8]
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_lg_u32 s14, 0
	s_cselect_b32 s2, -1, 0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fixup_f64 v[1:2], v[3:4], s[6:7], v[1:2]
	v_cndmask_b32_e32 v2, 0x7ff80000, v2, vcc_lo
	s_and_b32 vcc_lo, s2, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_cndmask_b32_e32 v1, 0, v1, vcc_lo
	v_cndmask_b32_e64 v2, 0xfff00000, v2, s2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ceil_f64_e32 v[1:2], v[1:2]
	v_cmp_eq_f64_e64 vcc_lo, |v[1:2]|, v[1:2]
	v_and_b32_e32 v3, 0x7fffffff, v2
	v_cndmask_b32_e32 v23, 0, v1, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_3) | instid1(VALU_DEP_2)
	v_cndmask_b32_e32 v3, 0, v3, vcc_lo
	v_cmp_eq_f64_e32 vcc_lo, 0, v[1:2]
	s_and_b32 s2, vcc_lo, exec_lo
	s_cselect_b32 s17, 0x3ff00000, 2.0
	v_cndmask_b32_e64 v24, v3, 0x3ff00000, vcc_lo
	v_frexp_mant_f64_e32 v[3:4], s[16:17]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cmp_gt_f64_e64 s2, s[4:5], v[3:4]
	v_cndmask_b32_e64 v5, 0, 1, s2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ldexp_f64 v[3:4], v[3:4], v5
	v_add_f64 v[5:6], v[3:4], 1.0
	v_add_f64 v[11:12], v[3:4], -1.0
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[7:8], v[5:6]
	v_add_f64 v[13:14], v[5:6], -1.0
	v_add_f64 v[3:4], v[3:4], -v[13:14]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[9:10], -v[5:6], v[7:8], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[7:8], v[9:10], v[7:8], v[7:8]
	v_fma_f64 v[9:10], -v[5:6], v[7:8], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[7:8], v[9:10], v[7:8], v[7:8]
	v_mul_f64 v[9:10], v[11:12], v[7:8]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[15:16], v[5:6], v[9:10]
	v_fma_f64 v[5:6], v[9:10], v[5:6], -v[15:16]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[3:4], v[9:10], v[3:4], v[5:6]
	v_add_f64 v[5:6], v[15:16], v[3:4]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_f64 v[13:14], v[11:12], -v[5:6]
	v_add_f64 v[15:16], v[5:6], -v[15:16]
	v_add_f64 v[11:12], v[11:12], -v[13:14]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[3:4], v[15:16], -v[3:4]
	v_add_f64 v[5:6], v[11:12], -v[5:6]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[3:4], v[3:4], v[5:6]
	v_add_f64 v[3:4], v[13:14], v[3:4]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[3:4], v[7:8], v[3:4]
	v_add_f64 v[5:6], v[9:10], v[3:4]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_f64 v[7:8], v[5:6], -v[9:10]
	v_mul_f64 v[9:10], v[5:6], v[5:6]
	v_add_f64 v[3:4], v[3:4], -v[7:8]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[7:8], v[5:6], v[5:6], -v[9:10]
	v_add_f64 v[11:12], v[3:4], v[3:4]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[7:8], v[5:6], v[11:12], v[7:8]
	v_add_f64 v[11:12], v[9:10], v[7:8]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_4) | instid1(VALU_DEP_3)
	v_fma_f64 v[13:14], v[11:12], s[20:21], s[18:19]
	s_mov_b32 s18, 0x3abe935a
	s_mov_b32 s19, 0x3fbe25e4
	v_add_f64 v[9:10], v[11:12], -v[9:10]
	v_mul_f64 v[19:20], v[5:6], v[11:12]
	v_fma_f64 v[13:14], v[11:12], v[13:14], s[18:19]
	s_mov_b32 s18, 0x47e6c9c2
	s_mov_b32 s19, 0x3fc110ef
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[7:8], v[7:8], -v[9:10]
	v_fma_f64 v[13:14], v[11:12], v[13:14], s[18:19]
	s_mov_b32 s18, 0xcfa74449
	s_mov_b32 s19, 0x3fc3b13b
	s_delay_alu instid0(VALU_DEP_1) | instid1(SALU_CYCLE_1)
	v_fma_f64 v[13:14], v[11:12], v[13:14], s[18:19]
	s_mov_b32 s18, 0x71bf3c30
	s_mov_b32 s19, 0x3fc745d1
	s_delay_alu instid0(VALU_DEP_1) | instid1(SALU_CYCLE_1)
	v_fma_f64 v[13:14], v[11:12], v[13:14], s[18:19]
	s_mov_b32 s18, 0x1c7792ce
	s_mov_b32 s19, 0x3fcc71c7
	s_delay_alu instid0(VALU_DEP_1) | instid1(SALU_CYCLE_1)
	v_fma_f64 v[13:14], v[11:12], v[13:14], s[18:19]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[13:14], v[11:12], v[13:14], s[10:11]
	v_fma_f64 v[13:14], v[11:12], v[13:14], s[12:13]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[15:16], v[11:12], v[13:14]
	v_fma_f64 v[9:10], v[11:12], v[13:14], -v[15:16]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[9:10], v[7:8], v[13:14], v[9:10]
	v_add_f64 v[13:14], v[15:16], v[9:10]
	s_delay_alu instid0(VALU_DEP_1)
	v_add_f64 v[17:18], v[13:14], s[4:5]
	v_add_f64 v[15:16], v[13:14], -v[15:16]
	s_mov_b32 s5, 0xbfe55555
	s_delay_alu instid0(VALU_DEP_2) | instid1(SALU_CYCLE_1)
	v_add_f64 v[21:22], v[17:18], s[4:5]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_3) | instid1(VALU_DEP_3)
	v_add_f64 v[9:10], v[9:10], -v[15:16]
	v_fma_f64 v[15:16], v[11:12], v[5:6], -v[19:20]
	s_mov_b32 s4, 0xd5df274d
	s_mov_b32 s5, 0x3c8543b0
	v_add_f64 v[13:14], v[13:14], -v[21:22]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[9:10], v[9:10], s[4:5]
	v_fma_f64 v[11:12], v[11:12], v[3:4], v[15:16]
	v_ldexp_f64 v[3:4], v[3:4], 1
	s_mov_b32 s4, 0x6a5dcb37
	s_mov_b32 s5, 0x3e5ade15
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[9:10], v[9:10], v[13:14]
	v_fma_f64 v[7:8], v[7:8], v[5:6], v[11:12]
	v_ldexp_f64 v[5:6], v[5:6], 1
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[11:12], v[17:18], v[9:10]
	v_add_f64 v[13:14], v[19:20], v[7:8]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[15:16], v[17:18], -v[11:12]
	v_mul_f64 v[17:18], v[13:14], v[11:12]
	v_add_f64 v[19:20], v[13:14], -v[19:20]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[9:10], v[9:10], v[15:16]
	v_fma_f64 v[15:16], v[13:14], v[11:12], -v[17:18]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[7:8], v[7:8], -v[19:20]
	v_fma_f64 v[9:10], v[13:14], v[9:10], v[15:16]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_fma_f64 v[7:8], v[7:8], v[11:12], v[9:10]
	v_frexp_exp_i32_f64_e32 v11, s[16:17]
	v_add_f64 v[9:10], v[17:18], v[7:8]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_subrev_co_ci_u32_e64 v11, s2, 0, v11, s2
	v_cvt_f64_i32_e32 v[11:12], v11
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_f64 v[13:14], v[5:6], v[9:10]
	v_add_f64 v[15:16], v[9:10], -v[17:18]
	v_mul_f64 v[17:18], v[11:12], s[6:7]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[5:6], v[13:14], -v[5:6]
	v_add_f64 v[7:8], v[7:8], -v[15:16]
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_fma_f64 v[15:16], v[11:12], s[6:7], -v[17:18]
	s_mov_b32 s7, 0xbfe62e42
	v_add_f64 v[5:6], v[9:10], -v[5:6]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[3:4], v[3:4], v[7:8]
	v_fma_f64 v[7:8], v[11:12], s[8:9], v[15:16]
	s_mov_b32 s9, 0xbc7abc9e
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[3:4], v[3:4], v[5:6]
	v_add_f64 v[5:6], v[17:18], v[7:8]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[9:10], v[13:14], v[3:4]
	v_add_f64 v[17:18], v[5:6], -v[17:18]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_f64 v[11:12], v[5:6], v[9:10]
	v_add_f64 v[13:14], v[9:10], -v[13:14]
	v_add_f64 v[7:8], v[7:8], -v[17:18]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[15:16], v[11:12], -v[5:6]
	v_add_f64 v[3:4], v[3:4], -v[13:14]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_f64 v[19:20], v[11:12], -v[15:16]
	v_add_f64 v[9:10], v[9:10], -v[15:16]
	v_add_f64 v[13:14], v[7:8], v[3:4]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[5:6], v[5:6], -v[19:20]
	v_add_f64 v[5:6], v[9:10], v[5:6]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[9:10], v[13:14], -v[7:8]
	v_add_f64 v[5:6], v[13:14], v[5:6]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_f64 v[13:14], v[13:14], -v[9:10]
	v_add_f64 v[3:4], v[3:4], -v[9:10]
	v_add_f64 v[15:16], v[11:12], v[5:6]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[7:8], v[7:8], -v[13:14]
	v_add_f64 v[9:10], v[15:16], -v[11:12]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[3:4], v[3:4], v[7:8]
	v_add_f64 v[5:6], v[5:6], -v[9:10]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[3:4], v[3:4], v[5:6]
	v_add_f64 v[5:6], v[15:16], v[3:4]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_f64 v[7:8], v[5:6], -v[15:16]
	v_mul_f64 v[9:10], v[1:2], v[5:6]
	v_add_f64 v[3:4], v[3:4], -v[7:8]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_fma_f64 v[5:6], v[1:2], v[5:6], -v[9:10]
	v_cmp_class_f64_e64 s2, v[9:10], 0x204
	v_fma_f64 v[3:4], v[1:2], v[3:4], v[5:6]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[5:6], v[9:10], v[3:4]
	v_cndmask_b32_e64 v8, v6, v10, s2
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_3) | instid1(VALU_DEP_2)
	v_cndmask_b32_e64 v7, v5, v9, s2
	s_mov_b32 s2, 0x652b82fe
	s_mov_b32 s3, 0x3ff71547
	v_add_f64 v[5:6], v[5:6], -v[9:10]
	v_mul_f64 v[11:12], v[7:8], s[2:3]
	s_mov_b32 s2, 0xfca7ab0c
	s_mov_b32 s3, 0x3e928af3
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[3:4], v[3:4], -v[5:6]
	v_rndne_f64_e32 v[11:12], v[11:12]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_fma_f64 v[13:14], v[11:12], s[6:7], v[7:8]
	v_cvt_i32_f64_e32 v17, v[11:12]
	v_fma_f64 v[13:14], v[11:12], s[8:9], v[13:14]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
	v_fma_f64 v[15:16], v[13:14], s[4:5], s[2:3]
	s_mov_b32 s2, 0x623fde64
	s_mov_b32 s3, 0x3ec71dee
	v_cmp_ngt_f64_e64 s4, 0xc090cc00, v[7:8]
	v_fma_f64 v[15:16], v[13:14], v[15:16], s[2:3]
	s_mov_b32 s2, 0x7c89e6b0
	s_mov_b32 s3, 0x3efa0199
	s_delay_alu instid0(VALU_DEP_1) | instid1(SALU_CYCLE_1)
	v_fma_f64 v[15:16], v[13:14], v[15:16], s[2:3]
	s_mov_b32 s2, 0x14761f6e
	s_mov_b32 s3, 0x3f2a01a0
	s_delay_alu instid0(VALU_DEP_1) | instid1(SALU_CYCLE_1)
	v_fma_f64 v[15:16], v[13:14], v[15:16], s[2:3]
	s_mov_b32 s2, 0x1852b7b0
	s_mov_b32 s3, 0x3f56c16c
	s_delay_alu instid0(VALU_DEP_1) | instid1(SALU_CYCLE_1)
	v_fma_f64 v[15:16], v[13:14], v[15:16], s[2:3]
	s_mov_b32 s2, 0x11122322
	s_mov_b32 s3, 0x3f811111
	s_delay_alu instid0(VALU_DEP_1) | instid1(SALU_CYCLE_1)
	v_fma_f64 v[15:16], v[13:14], v[15:16], s[2:3]
	s_mov_b32 s2, 0x555502a1
	s_mov_b32 s3, 0x3fa55555
	s_delay_alu instid0(VALU_DEP_1) | instid1(SALU_CYCLE_1)
	v_fma_f64 v[15:16], v[13:14], v[15:16], s[2:3]
	s_mov_b32 s2, 0x55555511
	s_mov_b32 s3, 0x3fc55555
	s_delay_alu instid0(VALU_DEP_1) | instid1(SALU_CYCLE_1)
	v_fma_f64 v[15:16], v[13:14], v[15:16], s[2:3]
	s_mov_b32 s2, 11
	s_mov_b32 s3, 0x3fe00000
	s_delay_alu instid0(VALU_DEP_1) | instid1(SALU_CYCLE_1)
	v_fma_f64 v[15:16], v[13:14], v[15:16], s[2:3]
	v_cmp_nlt_f64_e64 s3, 0x40900000, v[7:8]
	v_cmp_neq_f64_e64 s2, 0x7ff00000, |v[7:8]|
	v_cndmask_b32_e64 v7, v23, 0, vcc_lo
	v_cmp_class_f64_e64 vcc_lo, v[1:2], 0x204
	v_fma_f64 v[15:16], v[13:14], v[15:16], 1.0
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_cndmask_b32_e64 v4, 0, v4, s2
	v_cndmask_b32_e64 v3, 0, v3, s2
	s_and_b32 s2, s4, s3
	v_fma_f64 v[11:12], v[13:14], v[15:16], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ldexp_f64 v[9:10], v[11:12], v17
	v_cndmask_b32_e64 v5, 0x7ff00000, v10, s3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cndmask_b32_e64 v6, 0, v5, s4
	v_cndmask_b32_e64 v5, 0, v9, s2
	s_load_b128 s[4:7], s[0:1], 0x0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_fma_f64 v[3:4], v[5:6], v[3:4], v[5:6]
	v_cmp_class_f64_e64 s2, v[5:6], 0x204
	v_cndmask_b32_e64 v4, v4, v6, s2
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e64 v3, v3, v5, s2
	v_dual_cndmask_b32 v3, v3, v7 :: v_dual_and_b32 v4, 0x7fffffff, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_cndmask_b32_e32 v4, v4, v24, vcc_lo
	v_cmp_o_f64_e32 vcc_lo, v[1:2], v[1:2]
	v_cndmask_b32_e32 v2, 0x7ff80000, v4, vcc_lo
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_cndmask_b32_e32 v1, 0, v3, vcc_lo
	v_cmp_eq_u32_e32 vcc_lo, 0, v0
	v_cvt_i32_f64_e32 v1, v[1:2]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_readfirstlane_b32 s2, v1
	s_cmp_gt_i32 s2, 0
	s_cselect_b32 s3, -1, 0
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b32 s8, vcc_lo, s3
	s_and_saveexec_b32 s3, s8
	s_cbranch_execz .LBB2_5
; %bb.1:                                ; %.lr.ph.preheader
	s_mov_b32 s8, 0
.LBB2_2:                                ; %.lr.ph
                                        ; =>This Inner Loop Header: Depth=1
	s_cmp_ge_i32 s16, s14
	s_mov_b32 s9, 0
	s_cbranch_scc1 .LBB2_4
; %bb.3:                                ;   in Loop: Header=BB2_2 Depth=1
	s_waitcnt lgkmcnt(0)
	s_load_b32 s9, s[6:7], 0x0
.LBB2_4:                                ;   in Loop: Header=BB2_2 Depth=1
	s_waitcnt lgkmcnt(0)
	v_dual_mov_b32 v1, s8 :: v_dual_mov_b32 v2, s9
	s_add_i32 s16, s16, 1
	s_add_i32 s8, s8, 4
	s_add_u32 s6, s6, 4
	s_addc_u32 s7, s7, 0
	s_cmp_lg_u32 s2, s16
	ds_store_b32 v1, v2
	s_cbranch_scc1 .LBB2_2
.LBB2_5:                                ; %Flow82
	s_or_b32 exec_lo, exec_lo, s3
	s_load_b32 s1, s[0:1], 0x24
	v_lshl_or_b32 v1, v0, 1, 1
	s_waitcnt lgkmcnt(0)
	s_ashr_i32 s6, s2, 1
	s_mov_b32 s3, 1
	s_cmp_lt_i32 s6, 1
	s_barrier
	buffer_gl0_inv
	s_cbranch_scc1 .LBB2_10
.LBB2_6:                                ; =>This Inner Loop Header: Depth=1
	s_mov_b32 s7, exec_lo
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	v_cmpx_gt_i32_e64 s6, v0
	s_cbranch_execz .LBB2_8
; %bb.7:                                ;   in Loop: Header=BB2_6 Depth=1
	v_mul_lo_u32 v2, s3, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b32_e32 v2, 2, v2
	v_add3_u32 v2, v2, 0, -4
	s_delay_alu instid0(VALU_DEP_1)
	v_lshl_add_u32 v3, s3, 2, v2
	ds_load_b32 v2, v2
	ds_load_b32 v4, v3
	s_waitcnt lgkmcnt(0)
	v_add_nc_u32_e32 v2, v4, v2
	ds_store_b32 v3, v2
.LBB2_8:                                ;   in Loop: Header=BB2_6 Depth=1
	s_or_b32 exec_lo, exec_lo, s7
	s_lshl_b32 s3, s3, 1
	s_lshr_b32 s0, s6, 1
	s_cmp_lt_u32 s6, 2
	s_cbranch_scc1 .LBB2_10
; %bb.9:                                ;   in Loop: Header=BB2_6 Depth=1
	s_mov_b32 s6, s0
	s_branch .LBB2_6
.LBB2_10:                               ; %Flow80
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	s_and_saveexec_b32 s0, vcc_lo
	s_cbranch_execz .LBB2_12
; %bb.11:
	s_lshl_b32 s6, s2, 2
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_add_i32 s6, s6, 0
	s_add_i32 s6, s6, -4
	s_delay_alu instid0(SALU_CYCLE_1)
	v_dual_mov_b32 v2, 0 :: v_dual_mov_b32 v3, s6
	ds_store_b32 v3, v2
.LBB2_12:
	s_or_b32 exec_lo, exec_lo, s0
	s_cmp_lt_i32 s2, 2
	s_cbranch_scc1 .LBB2_18
; %bb.13:                               ; %.lr.ph65
	s_mov_b32 s0, 1
.LBB2_14:                               ; =>This Inner Loop Header: Depth=1
	s_ashr_i32 s3, s3, 1
	s_mov_b32 s6, exec_lo
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	v_cmpx_gt_i32_e64 s0, v0
	s_cbranch_execz .LBB2_17
; %bb.15:                               ;   in Loop: Header=BB2_14 Depth=1
	v_mul_lo_u32 v2, s3, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v3, s3, v2
	v_min_i32_e32 v4, v2, v3
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_lt_i32_e32 vcc_lo, 0, v4
	s_and_b32 exec_lo, exec_lo, vcc_lo
	s_cbranch_execz .LBB2_17
; %bb.16:                               ;   in Loop: Header=BB2_14 Depth=1
	v_lshlrev_b32_e32 v2, 2, v2
	v_lshlrev_b32_e32 v3, 2, v3
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add3_u32 v2, v2, 0, -4
	v_add3_u32 v3, v3, 0, -4
	ds_load_b32 v4, v2
	ds_load_b32 v5, v3
	s_waitcnt lgkmcnt(0)
	v_add_nc_u32_e32 v4, v5, v4
	ds_store_b32 v2, v5
	ds_store_b32 v3, v4
.LBB2_17:                               ;   in Loop: Header=BB2_14 Depth=1
	s_or_b32 exec_lo, exec_lo, s6
	s_lshl_b32 s0, s0, 1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_ge_i32 s0, s2
	s_cbranch_scc0 .LBB2_14
.LBB2_18:                               ; %._crit_edge66
	s_and_b32 s0, 0xffff, s1
	s_waitcnt lgkmcnt(0)
	v_mad_u64_u32 v[1:2], null, s15, s0, v[0:1]
	s_barrier
	buffer_gl0_inv
	s_mov_b32 s0, exec_lo
	v_cmpx_gt_i32_e64 s14, v1
	s_cbranch_execz .LBB2_20
; %bb.19:
	v_lshl_add_u32 v0, v1, 2, 0
	v_ashrrev_i32_e32 v2, 31, v1
	ds_load_b32 v3, v0 offset:4
	v_lshlrev_b64 v[0:1], 2, v[1:2]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, s4, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s5, v1, vcc_lo
	s_waitcnt lgkmcnt(0)
	global_store_b32 v[0:1], v3, off
.LBB2_20:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z17q2c_prll_prfx_sumPiS_i
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 280
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 25
		.amdhsa_next_free_sgpr 22
		.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	_Z17q2c_prll_prfx_sumPiS_i, .Lfunc_end2-_Z17q2c_prll_prfx_sumPiS_i
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 3616
; NumSgprs: 24
; NumVgprs: 25
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 3
; NumSGPRsForWavesPerEU: 24
; NumVGPRsForWavesPerEU: 25
; 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 shared_out
	.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
      - .offset:         16
        .size:           4
        .value_kind:     by_value
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         28
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         36
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         38
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         40
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         42
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         44
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         46
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         88
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 280
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z18q2a_global_counterPiS_i
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z18q2a_global_counterPiS_i.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     7
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .offset:         16
        .size:           4
        .value_kind:     by_value
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         28
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         36
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         38
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         40
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         42
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         44
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         46
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         88
        .size:           2
        .value_kind:     hidden_grid_dims
      - .offset:         144
        .size:           4
        .value_kind:     hidden_dynamic_lds_size
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 280
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z22q2b_shared_mem_counterPiS_i
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z22q2b_shared_mem_counterPiS_i.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     6
    .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:     by_value
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         28
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         36
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         38
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         40
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         42
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         44
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         46
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         88
        .size:           2
        .value_kind:     hidden_grid_dims
      - .offset:         144
        .size:           4
        .value_kind:     hidden_dynamic_lds_size
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 280
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z17q2c_prll_prfx_sumPiS_i
    .private_segment_fixed_size: 0
    .sgpr_count:     24
    .sgpr_spill_count: 0
    .symbol:         _Z17q2c_prll_prfx_sumPiS_i.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     25
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
