#include <stdio.h>
#include <ctime>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <dirent.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <vector>
#include <iostream>
#include <fstream>
#include <climits>
using namespace std;

bool scan_dir(const char* dir, vector<string> &files)
{
    DIR *dp;                                            // 定义子目录流指针  
    struct dirent *entry;                               // 定义dirent结构指针保存后续目录  
    struct stat statbuf;                                // 定义statbuf结构保存文件属性  
    if((dp = opendir(dir)) == NULL) return false;       // 打开目录，获取子目录流指针，判断操作是否成功  
    chdir (dir);                                        // 切换到当前目录  
    while((entry = readdir(dp)) != NULL)                // 获取下一级目录信息，如果未否则循环  
    {
        lstat(entry->d_name, &statbuf);                 // 获取下一级成员属性  
        if(S_IFDIR &statbuf.st_mode)                    // 判断下一级成员是否是目录  
        {
            if (strcmp(".", entry->d_name) == 0 || strcmp("..", entry->d_name) == 0)
              continue;

            if (!scan_dir(entry->d_name, files)) return false;              // 递归调用自身，扫描下一级目录的内容  
        }
        else
        {
            files.push_back(string(getcwd(NULL, 0)) + "/" + string(entry->d_name));
        }
    }
    chdir("..");                                                  // 回到上级目录  
    closedir(dp);                                                 // 关闭子目录流  
    return true;
}

void read_data(vector<string> &files, vector<int> &data)
{
    char buff[256];
    for (int i=0; i<files.size(); i++)
    {
        ifstream fin(files[i].c_str(),ios::in);
        if (!fin.is_open())
        {
            cout<<"load "<<files[i]<<" fail."<<endl;
            continue;
        }
        else cout<<"loading "<<files[i]<<endl;
        while(fin.getline(buff,256))
            data.push_back(atoi(buff));
        fin.close();
    }
}

static void HandleError( cudaError_t err, const char *file, int line ) 
{
    if (err != cudaSuccess) 
    {
        printf( "%s in %s at line %d\n", cudaGetErrorString( err ), file, line );
        exit( EXIT_FAILURE );
    }
}
#define HANDLE_ERROR( err ) (HandleError( err, __FILE__, __LINE__ ))

// a>=b return 0   a<b return 1
__device__ int cmp_without_if(int a, int b)
{
    int c = a - b;
    return (c >> 31) & 0x1;
}

__device__ int max_without_if(int a, int b)
{
    int c = a - b;
    int k = (c >> 31) & 0x1;
    return a - k * c;
}

__device__ int min_without_if(int a, int b)
{
    return (a + b) - max_without_if(a,b);
}

__global__ void reduce_sum(int *d_arr, int len, int *d_sum)
{
    __shared__ int cache[1024];
    int tid = threadIdx.x;

    cache[tid] = 0;
    for(int i=tid; i<len; i+=blockDim.x)
        cache[tid] += d_arr[i];
    __syncthreads();

    int i = blockDim.x/2;
    while(i)
    {
        if (tid < i) cache[tid] += cache[tid+i];
        __syncthreads();
        i /= 2;
    }
    if (tid == 0) *d_sum = cache[0];
}

__global__ void reduce_min_max(int *d_min_arr, int *d_max_arr, int len, int *d_min, int *d_max)
{
    __shared__ int mincache[1024];
    __shared__ int maxcache[1024];
    int tid = threadIdx.x;
    mincache[tid] = 9999999;
    maxcache[tid] = -9999999;

    for(int i=tid; i<len; i+=blockDim.x)
    {
        mincache[tid] = min_without_if(mincache[tid], d_min_arr[i]);
        maxcache[tid] = max_without_if(maxcache[tid], d_max_arr[i]); 
    }
    __syncthreads();

    int i = blockDim.x/2;
    while(i)
    {
        if (tid < i)
        {
            mincache[tid] = min_without_if(mincache[tid], mincache[tid+i]);
            maxcache[tid] = max_without_if(maxcache[tid], maxcache[tid+i]); 
        }
        __syncthreads();
        i /= 2;
    }
    if (tid == 0)
    {
        *d_min = mincache[0];
        *d_max = maxcache[0];
    }
}

__global__ void partition_min_max(int *d_arr, int len, int *d_min_arr, int *d_max_arr)
{
    int tid = threadIdx.x + blockIdx.x * blockDim.x;
    int max = -9999999, min = 9999999;
    for (int i=tid; i<len; i+=blockDim.x*gridDim.x)
    {
        min = min_without_if(min, d_arr[i]);
        max = max_without_if(max, d_arr[i]);
    }
    d_min_arr[tid] = min;
    d_max_arr[tid] = max;
}

__global__ void partition_less_num(int pivot,int *d_arr,int len,int *d_lt_num_arr)
{
    int tid = threadIdx.x + blockIdx.x * blockDim.x;
    d_lt_num_arr[tid] = 0;
    for (int i=tid; i<len; i+=blockDim.x*gridDim.x)
    {
        d_lt_num_arr[tid] += cmp_without_if(d_arr[i], pivot);
    }
}

__host__ int nth_order_stat(int target_order_stat, int *h_arr, int *d_arr, int len);

__host__ int partition_on_pivot(int target_order_stat, int *h_arr, int *d_arr, int len)
{
    int pivot = h_arr[rand()%len];

    int threadNum = 1024;
    int blockNum = (len + threadNum - 1) / threadNum;
    blockNum = blockNum <= 1024 ? blockNum : 1024;

    int *d_lt_num_arr, *d_lt_num, lt_num;
    HANDLE_ERROR( cudaMalloc((void**)&d_lt_num_arr,sizeof(int)*blockNum*threadNum) );
    HANDLE_ERROR( cudaMalloc((void**)&d_lt_num,sizeof(int)) );

    partition_less_num<<<blockNum,threadNum>>>(pivot,d_arr,len,d_lt_num_arr);
    reduce_sum<<<1,1024>>>(d_lt_num_arr,blockNum*threadNum,d_lt_num);
    HANDLE_ERROR( cudaMemcpy(&lt_num,d_lt_num,sizeof(int),cudaMemcpyDeviceToHost) );

    HANDLE_ERROR( cudaFree(d_lt_num_arr) );
    HANDLE_ERROR( cudaFree(d_lt_num) );

    int pivot_order_stat = lt_num + 1;
    
    if (pivot_order_stat == target_order_stat) 
        return pivot;
    else if (pivot_order_stat == 1)
        return partition_on_pivot(target_order_stat, h_arr, d_arr, len);
    else if (pivot_order_stat < target_order_stat)
    {
        target_order_stat -= lt_num;
        int *h_subarr = new int[len-lt_num];
        int subarr_num = 0;
        for (int i=0; i<len; i++)
        {
            if (h_arr[i] >= pivot) h_subarr[subarr_num++] = h_arr[i];
        }
        int *d_subarr;
        HANDLE_ERROR( cudaMalloc((void**)&d_subarr,sizeof(int)*subarr_num) );
        HANDLE_ERROR( cudaMemcpy(d_subarr,h_subarr,sizeof(int)*subarr_num,cudaMemcpyHostToDevice) );
        int res = nth_order_stat(target_order_stat, h_subarr, d_subarr, subarr_num);
        delete[] h_subarr;
        HANDLE_ERROR( cudaFree(d_subarr) );
        return res;
    }
    else
    {
        int *h_subarr = new int[lt_num];
        int subarr_num = 0;
        for (int i=0; i<len; i++)
        {
            if (h_arr[i] < pivot) h_subarr[subarr_num++] = h_arr[i];
        }
        int *d_subarr;
        HANDLE_ERROR( cudaMalloc((void**)&d_subarr,sizeof(int)*subarr_num) );
        HANDLE_ERROR( cudaMemcpy(d_subarr,h_subarr,sizeof(int)*subarr_num,cudaMemcpyHostToDevice) );
        int res = nth_order_stat(target_order_stat, h_subarr, d_subarr, subarr_num);
        delete[] h_subarr;
        HANDLE_ERROR( cudaFree(d_subarr) );
        return res;
    }
}

__host__ int nth_order_stat(int target_order_stat, int *h_arr, int *d_arr, int len)
{
    int threadNum = 1024;
    int blockNum = (len + threadNum - 1) / threadNum;
    blockNum = blockNum <= 1024 ? blockNum : 1024;

    int *d_min_arr, *d_max_arr;
    int h_min, h_max, *d_min, *d_max;
    HANDLE_ERROR( cudaMalloc((void**)&d_min_arr,sizeof(int)*blockNum*threadNum) );
    HANDLE_ERROR( cudaMalloc((void**)&d_max_arr,sizeof(int)*blockNum*threadNum) );  
    HANDLE_ERROR( cudaMalloc((void**)&d_min,sizeof(int)) );  
    HANDLE_ERROR( cudaMalloc((void**)&d_max,sizeof(int)) );  

    partition_min_max<<<blockNum,threadNum>>>(d_arr,len,d_min_arr,d_max_arr);
    reduce_min_max<<<1,1024>>>(d_min_arr,d_max_arr,blockNum*threadNum,d_min,d_max);
    HANDLE_ERROR( cudaMemcpy(&h_min,d_min,sizeof(int),cudaMemcpyDeviceToHost) );
    HANDLE_ERROR( cudaMemcpy(&h_max,d_max,sizeof(int),cudaMemcpyDeviceToHost) );

    HANDLE_ERROR (cudaFree(d_min_arr));
    HANDLE_ERROR (cudaFree(d_max_arr));
    HANDLE_ERROR (cudaFree(d_min));
    HANDLE_ERROR (cudaFree(d_max));
 
    if (h_max == h_min || target_order_stat == 1)
        return h_min;
    else if (target_order_stat == len)
        return h_max;
    else
        return partition_on_pivot(target_order_stat, h_arr, d_arr, len);
}

__host__ int median(int *arr, int len)
{
    int *d_arr;
    cudaMalloc((void**)&d_arr,sizeof(int)*len);
    cudaMemcpy(d_arr,arr,sizeof(int)*len,cudaMemcpyHostToDevice);

    int res = nth_order_stat((int)((len+0.5)/2), arr, d_arr, len);
    
    cudaFree(d_arr);
    return res;
}

int main()
{
    //开始时间戳
    clock_t h_t1 = clock();

    //读入数据
    vector<string> files;
    scan_dir("./data40M", files);
    vector<int> h_vec; 
    read_data(files,h_vec);

    //读取数据时间戳
    clock_t h_t2 = clock();

    //GPU运算开始时间
    cudaEvent_t     d_start, d_stop;
    cudaEventCreate( &d_start );
    cudaEventCreate( &d_stop );
    cudaEventRecord( d_start, 0 );

    //调用算法
    int res = median(h_vec.data(), h_vec.size());

    //GPU运算结束时间
    cudaEventRecord( d_stop, 0 );
    cudaEventSynchronize( d_stop );
    float   elapsedTime;
    cudaEventElapsedTime( &elapsedTime, d_start, d_stop );
    printf( "Time on GPU:  %.3f s\n", elapsedTime/1000 );

    //结束时间戳
    clock_t h_end = clock();
    cout<<"Median: "<<res<<endl;
    cout<<"IO Time: "<<(double)(h_t2-h_t1)/CLOCKS_PER_SEC<<"s"<<endl;
    cout<<"Algorithm Time: "<<(double)(h_end-h_t2)/CLOCKS_PER_SEC<<"s"<<endl;
    cout<<"Total Time: "<<(double)(h_end-h_t1)/CLOCKS_PER_SEC<<"s"<<endl;

    cudaEventDestroy( d_start );
    cudaEventDestroy( d_stop );
    return 0;
}

	.file	"tmpxft_003211ce_00000000-6_gpu_memcpy.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4178:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4178:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"/home/ubuntu/Datasets/stackv2/train-structured/liqiang311/oj/master/media/gpu_memcpy.cu"
.LC1:
	.string	"%s in %s at line %d\n"
	.text
	.type	_ZL11HandleError9cudaErrorPKci.constprop.0, @function
_ZL11HandleError9cudaErrorPKci.constprop.0:
.LFB5067:
	.cfi_startproc
	testl	%edi, %edi
	je	.L2
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movl	%esi, 12(%rsp)
	call	cudaGetErrorString@PLT
	movl	12(%rsp), %r8d
	movl	$2, %edi
	leaq	.LC0(%rip), %rcx
	movq	%rax, %rdx
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$1, %edi
	call	exit@PLT
.L2:
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5067:
	.size	_ZL11HandleError9cudaErrorPKci.constprop.0, .-_ZL11HandleError9cudaErrorPKci.constprop.0
	.align 2
	.type	_ZNSolsEPFRSoS_E.isra.0, @function
_ZNSolsEPFRSoS_E.isra.0:
.LFB5069:
	.cfi_startproc
	jmp	*%rsi
	.cfi_endproc
.LFE5069:
	.size	_ZNSolsEPFRSoS_E.isra.0, .-_ZNSolsEPFRSoS_E.isra.0
	.globl	_Z14cmp_without_ifii
	.type	_Z14cmp_without_ifii, @function
_Z14cmp_without_ifii:
.LFB4149:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	popq	%rax
	.cfi_def_cfa_offset 8
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movl	$1, 12(%rsp)
	movl	12(%rsp), %edi
	call	exit@PLT
	.cfi_endproc
.LFE4149:
	.size	_Z14cmp_without_ifii, .-_Z14cmp_without_ifii
	.globl	_Z14max_without_ifii
	.type	_Z14max_without_ifii, @function
_Z14max_without_ifii:
.LFB5064:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	popq	%rax
	.cfi_def_cfa_offset 8
	pushq	%rax
	.cfi_def_cfa_offset 16
	call	_Z14cmp_without_ifii
	.cfi_endproc
.LFE5064:
	.size	_Z14max_without_ifii, .-_Z14max_without_ifii
	.globl	_Z14min_without_ifii
	.type	_Z14min_without_ifii, @function
_Z14min_without_ifii:
.LFB5066:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	popq	%rax
	.cfi_def_cfa_offset 8
	pushq	%rax
	.cfi_def_cfa_offset 16
	call	_Z14cmp_without_ifii
	.cfi_endproc
.LFE5066:
	.size	_Z14min_without_ifii, .-_Z14min_without_ifii
	.globl	_Z33__device_stub__Z10reduce_sumPiiS_PiiS_
	.type	_Z33__device_stub__Z10reduce_sumPiiS_PiiS_, @function
_Z33__device_stub__Z10reduce_sumPiiS_PiiS_:
.LFB4200:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movl	%esi, 20(%rsp)
	leaq	60(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	32(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L15
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z10reduce_sumPiiS_(%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
.L15:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4200:
	.size	_Z33__device_stub__Z10reduce_sumPiiS_PiiS_, .-_Z33__device_stub__Z10reduce_sumPiiS_PiiS_
	.globl	_Z10reduce_sumPiiS_
	.type	_Z10reduce_sumPiiS_, @function
_Z10reduce_sumPiiS_:
.LFB4201:
	.cfi_startproc
	endbr64
	jmp	_Z33__device_stub__Z10reduce_sumPiiS_PiiS_
	.cfi_endproc
.LFE4201:
	.size	_Z10reduce_sumPiiS_, .-_Z10reduce_sumPiiS_
	.globl	_Z41__device_stub__Z14reduce_min_maxPiS_iS_S_PiS_iS_S_
	.type	_Z41__device_stub__Z14reduce_min_maxPiS_iS_S_PiS_iS_S_, @function
_Z41__device_stub__Z14reduce_min_maxPiS_iS_S_PiS_iS_S_:
.LFB4202:
	.cfi_startproc
	endbr64
	subq	$168, %rsp
	.cfi_def_cfa_offset 176
	movq	%rdi, 40(%rsp)
	leaq	64(%rsp), %rdi
	movq	%rsi, 32(%rsp)
	leaq	76(%rsp), %rsi
	movl	%edx, 28(%rsp)
	leaq	48(%rsp), %rdx
	movq	%rcx, 16(%rsp)
	leaq	56(%rsp), %rcx
	movq	%r8, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 152(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	movl	$1, 72(%rsp)
	movq	%rax, 112(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	28(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 144(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 64(%rsp)
	movq	%rax, 76(%rsp)
	movl	$1, 84(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L20
	pushq	56(%rsp)
	.cfi_def_cfa_offset 184
	leaq	_Z14reduce_min_maxPiS_iS_S_(%rip), %rdi
	pushq	56(%rsp)
	.cfi_def_cfa_offset 192
	movq	92(%rsp), %rcx
	movl	100(%rsp), %r8d
	movq	80(%rsp), %rsi
	movl	88(%rsp), %edx
	leaq	128(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 184
	popq	%rdx
	.cfi_def_cfa_offset 176
.L20:
	movq	152(%rsp), %rax
	subq	%fs:40, %rax
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	addq	$168, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4202:
	.size	_Z41__device_stub__Z14reduce_min_maxPiS_iS_S_PiS_iS_S_, .-_Z41__device_stub__Z14reduce_min_maxPiS_iS_S_PiS_iS_S_
	.globl	_Z14reduce_min_maxPiS_iS_S_
	.type	_Z14reduce_min_maxPiS_iS_S_, @function
_Z14reduce_min_maxPiS_iS_S_:
.LFB4203:
	.cfi_startproc
	endbr64
	jmp	_Z41__device_stub__Z14reduce_min_maxPiS_iS_S_PiS_iS_S_
	.cfi_endproc
.LFE4203:
	.size	_Z14reduce_min_maxPiS_iS_S_, .-_Z14reduce_min_maxPiS_iS_S_
	.globl	_Z42__device_stub__Z17partition_min_maxPiiS_S_PiiS_S_
	.type	_Z42__device_stub__Z17partition_min_maxPiiS_S_PiiS_S_, @function
_Z42__device_stub__Z17partition_min_maxPiiS_S_PiiS_S_:
.LFB4204:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	56(%rsp), %rdi
	movl	%esi, 20(%rsp)
	leaq	68(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	40(%rsp), %rdx
	movq	%rcx, (%rsp)
	leaq	48(%rsp), %rcx
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 64(%rsp)
	movq	%rax, 104(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 120(%rsp)
	movq	%rsp, %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 56(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L25
	pushq	48(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z17partition_min_maxPiiS_S_(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L25:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4204:
	.size	_Z42__device_stub__Z17partition_min_maxPiiS_S_PiiS_S_, .-_Z42__device_stub__Z17partition_min_maxPiiS_S_PiiS_S_
	.globl	_Z17partition_min_maxPiiS_S_
	.type	_Z17partition_min_maxPiiS_S_, @function
_Z17partition_min_maxPiiS_S_:
.LFB4205:
	.cfi_startproc
	endbr64
	jmp	_Z42__device_stub__Z17partition_min_maxPiiS_S_PiiS_S_
	.cfi_endproc
.LFE4205:
	.size	_Z17partition_min_maxPiiS_S_, .-_Z17partition_min_maxPiiS_S_
	.globl	_Z42__device_stub__Z18partition_less_numiPiiS_iPiiS_
	.type	_Z42__device_stub__Z18partition_less_numiPiiS_iPiiS_, @function
_Z42__device_stub__Z18partition_less_numiPiiS_iPiiS_:
.LFB4206:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movl	%edi, 28(%rsp)
	leaq	56(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	68(%rsp), %rsi
	movl	%edx, 24(%rsp)
	leaq	40(%rsp), %rdx
	movq	%rcx, 8(%rsp)
	leaq	48(%rsp), %rcx
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	movl	$1, 64(%rsp)
	movq	%rax, 104(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 56(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L30
	pushq	48(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z18partition_less_numiPiiS_(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L30:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4206:
	.size	_Z42__device_stub__Z18partition_less_numiPiiS_iPiiS_, .-_Z42__device_stub__Z18partition_less_numiPiiS_iPiiS_
	.globl	_Z18partition_less_numiPiiS_
	.type	_Z18partition_less_numiPiiS_, @function
_Z18partition_less_numiPiiS_:
.LFB4207:
	.cfi_startproc
	endbr64
	jmp	_Z42__device_stub__Z18partition_less_numiPiiS_iPiiS_
	.cfi_endproc
.LFE4207:
	.size	_Z18partition_less_numiPiiS_, .-_Z18partition_less_numiPiiS_
	.globl	_Z18partition_on_pivotiPiS_i
	.type	_Z18partition_on_pivotiPiS_i, @function
_Z18partition_on_pivotiPiS_i:
.LFB4152:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdx, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rsi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%edi, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%ecx, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	call	rand@PLT
	movl	$1024, %ecx
	leaq	24(%rsp), %rdi
	cltd
	idivl	%r12d
	leal	1023(%r12), %eax
	movslq	%edx, %rdx
	movl	(%r14,%rdx,4), %ebx
	cltd
	idivl	%ecx
	movl	$1024, %edx
	cmpl	%edx, %eax
	cmovle	%eax, %edx
	movslq	%edx, %rsi
	movq	%rsi, %rbp
	salq	$12, %rsi
	call	cudaMalloc@PLT
	movl	$177, %esi
	movl	%eax, %edi
	call	_ZL11HandleError9cudaErrorPKci.constprop.0
	leaq	32(%rsp), %rdi
	movl	$4, %esi
	call	cudaMalloc@PLT
	movl	$178, %esi
	movl	%eax, %edi
	call	_ZL11HandleError9cudaErrorPKci.constprop.0
	movl	%ebp, 44(%rsp)
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movabsq	$4294967297, %rax
	movl	$4194305, %edx
	movl	$1, %ecx
	movl	$1, 64(%rsp)
	movq	%rax, 48(%rsp)
	movq	44(%rsp), %rdi
	salq	$10, %rdx
	movl	52(%rsp), %esi
	movq	%rdx, 56(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L36
	movq	24(%rsp), %rcx
	movl	%r12d, %edx
	movq	%r15, %rsi
	movl	%ebx, %edi
	call	_Z42__device_stub__Z18partition_less_numiPiiS_iPiiS_
.L36:
	movl	$4194305, %edx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$1, %ecx
	salq	$10, %rdx
	movl	$1, %esi
	movabsq	$4294967297, %rdi
	movl	$1, 64(%rsp)
	movq	%rdx, 56(%rsp)
	movq	%rdi, 44(%rsp)
	movl	$1, 52(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L37
	movl	%ebp, %esi
	movq	32(%rsp), %rdx
	movq	24(%rsp), %rdi
	sall	$10, %esi
	call	_Z33__device_stub__Z10reduce_sumPiiS_PiiS_
.L37:
	movq	32(%rsp), %rsi
	movl	$4, %edx
	movl	$2, %ecx
	leaq	44(%rsp), %rdi
	call	cudaMemcpy@PLT
	movl	$182, %esi
	movl	%eax, %edi
	call	_ZL11HandleError9cudaErrorPKci.constprop.0
	movq	24(%rsp), %rdi
	call	cudaFree@PLT
	movl	$184, %esi
	movl	%eax, %edi
	call	_ZL11HandleError9cudaErrorPKci.constprop.0
	movq	32(%rsp), %rdi
	call	cudaFree@PLT
	movl	$185, %esi
	movl	%eax, %edi
	call	_ZL11HandleError9cudaErrorPKci.constprop.0
	movslq	44(%rsp), %rax
	leal	1(%rax), %edx
	cmpl	%r13d, %edx
	je	.L35
	cmpl	$1, %edx
	jne	.L39
	movl	%r12d, %ecx
	movq	%r15, %rdx
	movq	%r14, %rsi
	movl	%r13d, %edi
	call	_Z18partition_on_pivotiPiS_i
	movl	%eax, %ebx
	jmp	.L35
.L39:
	cmpl	%r13d, %edx
	jge	.L40
	movl	%r12d, %edi
	subl	%eax, %r13d
	subl	%eax, %edi
	movabsq	$2305843009213693950, %rax
	movslq	%edi, %rdi
	cmpq	%rdi, %rax
	jb	.L41
	salq	$2, %rdi
	xorl	%r15d, %r15d
	call	_Znam@PLT
	movq	%rax, %rbp
	xorl	%eax, %eax
	jmp	.L42
.L41:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L52
	call	__cxa_throw_bad_array_new_length@PLT
.L45:
	movl	(%r14,%rax,4), %edx
	cmpl	%ebx, %edx
	jl	.L44
	movl	%edx, 0(%rbp,%rcx,4)
	incl	%r15d
.L44:
	incq	%rax
.L42:
	movslq	%r15d, %rcx
	leaq	0(,%rcx,4), %rdx
	cmpl	%eax, %r12d
	jg	.L45
	movq	%rdx, %rsi
	leaq	56(%rsp), %rdi
	movq	%rdx, 8(%rsp)
	call	cudaMalloc@PLT
	movl	$203, %esi
	movl	%eax, %edi
	call	_ZL11HandleError9cudaErrorPKci.constprop.0
	movq	8(%rsp), %rdx
	movq	56(%rsp), %rdi
	movq	%rbp, %rsi
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	movl	$204, %esi
	movl	%eax, %edi
	call	_ZL11HandleError9cudaErrorPKci.constprop.0
	movq	56(%rsp), %rdx
	movq	%rbp, %rsi
	movl	%r15d, %ecx
	movl	%r13d, %edi
	call	_Z14nth_order_statiPiS_i
	movq	%rbp, %rdi
	movl	%eax, %ebx
	call	_ZdaPv@PLT
	movq	56(%rsp), %rdi
	call	cudaFree@PLT
	movl	$207, %esi
	movl	%eax, %edi
	jmp	.L51
.L40:
	movabsq	$2305843009213693950, %rdx
	cmpq	%rax, %rdx
	jb	.L41
	leaq	0(,%rax,4), %rdi
	xorl	%r15d, %r15d
	call	_Znam@PLT
	movq	%rax, %rbp
	xorl	%eax, %eax
.L46:
	movslq	%r15d, %rcx
	leaq	0(,%rcx,4), %rdx
	cmpl	%eax, %r12d
	jle	.L53
	movl	(%r14,%rax,4), %edx
	cmpl	%ebx, %edx
	jge	.L47
	movl	%edx, 0(%rbp,%rcx,4)
	incl	%r15d
.L47:
	incq	%rax
	jmp	.L46
.L53:
	movq	%rdx, %rsi
	leaq	56(%rsp), %rdi
	movq	%rdx, 8(%rsp)
	call	cudaMalloc@PLT
	movl	$219, %esi
	movl	%eax, %edi
	call	_ZL11HandleError9cudaErrorPKci.constprop.0
	movq	8(%rsp), %rdx
	movq	56(%rsp), %rdi
	movq	%rbp, %rsi
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	movl	$220, %esi
	movl	%eax, %edi
	call	_ZL11HandleError9cudaErrorPKci.constprop.0
	movq	56(%rsp), %rdx
	movq	%rbp, %rsi
	movl	%r15d, %ecx
	movl	%r13d, %edi
	call	_Z14nth_order_statiPiS_i
	movq	%rbp, %rdi
	movl	%eax, %ebx
	call	_ZdaPv@PLT
	movq	56(%rsp), %rdi
	call	cudaFree@PLT
	movl	$223, %esi
	movl	%eax, %edi
.L51:
	call	_ZL11HandleError9cudaErrorPKci.constprop.0
.L35:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	je	.L49
.L52:
	call	__stack_chk_fail@PLT
.L49:
	addq	$88, %rsp
	.cfi_def_cfa_offset 56
	movl	%ebx, %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
.LFE4152:
	.size	_Z18partition_on_pivotiPiS_i, .-_Z18partition_on_pivotiPiS_i
	.globl	_Z14nth_order_statiPiS_i
	.type	_Z14nth_order_statiPiS_i, @function
_Z14nth_order_statiPiS_i:
.LFB4153:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rsi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rdx, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%edi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%ecx, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leal	1023(%rcx), %eax
	movl	$1024, %ecx
	movq	%rsp, %rdi
	cltd
	idivl	%ecx
	movl	$1024, %edx
	movl	%edx, %ebx
	cmpl	%edx, %eax
	cmovle	%eax, %ebx
	movslq	%ebx, %r15
	salq	$12, %r15
	movq	%r15, %rsi
	call	cudaMalloc@PLT
	movl	$236, %esi
	movl	%eax, %edi
	call	_ZL11HandleError9cudaErrorPKci.constprop.0
	leaq	8(%rsp), %rdi
	movq	%r15, %rsi
	call	cudaMalloc@PLT
	movl	$237, %esi
	movl	%eax, %edi
	call	_ZL11HandleError9cudaErrorPKci.constprop.0
	leaq	16(%rsp), %rdi
	movl	$4, %esi
	call	cudaMalloc@PLT
	movl	$238, %esi
	movl	%eax, %edi
	call	_ZL11HandleError9cudaErrorPKci.constprop.0
	leaq	24(%rsp), %rdi
	movl	$4, %esi
	call	cudaMalloc@PLT
	movl	$239, %esi
	movl	%eax, %edi
	call	_ZL11HandleError9cudaErrorPKci.constprop.0
	movl	%ebx, 32(%rsp)
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movabsq	$4294967297, %rax
	movl	$4194305, %edx
	movl	$1, %ecx
	movl	$1, 52(%rsp)
	movq	%rax, 36(%rsp)
	movq	32(%rsp), %rdi
	salq	$10, %rdx
	movl	40(%rsp), %esi
	movq	%rdx, 44(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L55
	movq	8(%rsp), %rcx
	movq	(%rsp), %rdx
	movl	%ebp, %esi
	movq	%r13, %rdi
	call	_Z42__device_stub__Z17partition_min_maxPiiS_S_PiiS_S_
.L55:
	movl	$4194305, %edx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$1, %ecx
	salq	$10, %rdx
	movl	$1, %esi
	movabsq	$4294967297, %rdi
	movl	$1, 52(%rsp)
	movq	%rdx, 44(%rsp)
	movq	%rdi, 32(%rsp)
	movl	$1, 40(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L56
	sall	$10, %ebx
	movq	24(%rsp), %r8
	movq	16(%rsp), %rcx
	movq	8(%rsp), %rsi
	movq	(%rsp), %rdi
	movl	%ebx, %edx
	call	_Z41__device_stub__Z14reduce_min_maxPiS_iS_S_PiS_iS_S_
.L56:
	movq	16(%rsp), %rsi
	movl	$2, %ecx
	movl	$4, %edx
	leaq	32(%rsp), %rdi
	call	cudaMemcpy@PLT
	movl	$243, %esi
	movl	%eax, %edi
	call	_ZL11HandleError9cudaErrorPKci.constprop.0
	movq	24(%rsp), %rsi
	movl	$4, %edx
	movl	$2, %ecx
	leaq	44(%rsp), %rdi
	call	cudaMemcpy@PLT
	movl	$244, %esi
	movl	%eax, %edi
	call	_ZL11HandleError9cudaErrorPKci.constprop.0
	movq	(%rsp), %rdi
	call	cudaFree@PLT
	movl	$246, %esi
	movl	%eax, %edi
	call	_ZL11HandleError9cudaErrorPKci.constprop.0
	movq	8(%rsp), %rdi
	call	cudaFree@PLT
	movl	$247, %esi
	movl	%eax, %edi
	call	_ZL11HandleError9cudaErrorPKci.constprop.0
	movq	16(%rsp), %rdi
	call	cudaFree@PLT
	movl	$248, %esi
	movl	%eax, %edi
	call	_ZL11HandleError9cudaErrorPKci.constprop.0
	movq	24(%rsp), %rdi
	call	cudaFree@PLT
	movl	$249, %esi
	movl	%eax, %edi
	call	_ZL11HandleError9cudaErrorPKci.constprop.0
	movl	44(%rsp), %edx
	movl	32(%rsp), %eax
	cmpl	$1, %r12d
	je	.L54
	cmpl	%eax, %edx
	je	.L54
	movl	%edx, %eax
	cmpl	%r12d, %ebp
	je	.L54
	movl	%ebp, %ecx
	movq	%r13, %rdx
	movq	%r14, %rsi
	movl	%r12d, %edi
	call	_Z18partition_on_pivotiPiS_i
.L54:
	movq	56(%rsp), %rdx
	subq	%fs:40, %rdx
	je	.L58
	call	__stack_chk_fail@PLT
.L58:
	addq	$72, %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
.LFE4153:
	.size	_Z14nth_order_statiPiS_i, .-_Z14nth_order_statiPiS_i
	.globl	_Z6medianPii
	.type	_Z6medianPii, @function
_Z6medianPii:
.LFB4154:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movslq	%esi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%r12, %rbx
	salq	$2, %r12
	movq	%r12, %rsi
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rdi
	call	cudaMalloc@PLT
	movq	(%rsp), %rdi
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	cvtsi2sdl	%ebx, %xmm0
	movq	(%rsp), %rdx
	movl	%ebx, %ecx
	movsd	.LC2(%rip), %xmm1
	movq	%rbp, %rsi
	addsd	%xmm1, %xmm0
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %edi
	call	_Z14nth_order_statiPiS_i
	movq	(%rsp), %rdi
	movl	%eax, %ebx
	call	cudaFree@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	je	.L62
	call	__stack_chk_fail@PLT
.L62:
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	movl	%ebx, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4154:
	.size	_Z6medianPii, .-_Z6medianPii
	.section	.rodata.str1.1
.LC3:
	.string	"_Z18partition_less_numiPiiS_"
.LC4:
	.string	"_Z17partition_min_maxPiiS_S_"
.LC5:
	.string	"_Z14reduce_min_maxPiS_iS_S_"
.LC6:
	.string	"_Z10reduce_sumPiiS_"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4209:
	.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	.LC3(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z18partition_less_numiPiiS_(%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	.LC4(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z17partition_min_maxPiiS_S_(%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	.LC5(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z14reduce_min_maxPiS_iS_S_(%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	.LC6(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z10reduce_sumPiiS_(%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
.LFE4209:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.rodata._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.str1.1,"aMS",@progbits,1
.LC7:
	.string	"basic_string: construction from null is not valid"
	.section	.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_,"axG",@progbits,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC5IS3_EEPKcRKS3_,comdat
	.align 2
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_, @function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_:
.LFB4526:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	16(%rdi), %rax
	movq	%rax, (%rdi)
	testq	%rsi, %rsi
	jne	.L67
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L72
	leaq	.LC7(%rip), %rdi
	call	_ZSt19__throw_logic_errorPKc@PLT
.L67:
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	movq	%rsi, %rbp
	call	strlen@PLT
	movq	%rax, (%rsp)
	leaq	0(%rbp,%rax), %r12
	cmpq	$15, %rax
	jbe	.L69
	movq	%rsp, %rsi
	xorl	%edx, %edx
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm@PLT
	movq	%rax, (%rbx)
	movq	(%rsp), %rax
	movq	%rax, 16(%rbx)
.L69:
	movq	(%rbx), %rdi
	movq	%r12, %rdx
	movq	%rbp, %rsi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13_S_copy_charsEPcPKcS7_@PLT
	movq	(%rsp), %rax
	movq	(%rbx), %rdx
	movq	%rax, 8(%rbx)
	movb	$0, (%rdx,%rax)
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	je	.L70
.L72:
	call	__stack_chk_fail@PLT
.L70:
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4526:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_, .-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
	.set	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.section	.text._ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev,"axG",@progbits,_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED5Ev,comdat
	.align 2
	.weak	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev
	.type	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev, @function
_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev:
.LFB4559:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	8(%rdi), %r12
	movq	%rdi, %rbx
	movq	(%rdi), %rbp
.L74:
	cmpq	%rbp, %r12
	je	.L78
	movq	%rbp, %rdi
	addq	$32, %rbp
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L74
.L78:
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	.L73
	movq	16(%rbx), %rsi
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	subq	%rdi, %rsi
	jmp	_ZdlPvm@PLT
.L73:
	.cfi_restore_state
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4559:
	.size	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev, .-_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev
	.weak	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED1Ev
	.set	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED1Ev,_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev
	.section	.text._ZNSt6vectorIiSaIiEED2Ev,"axG",@progbits,_ZNSt6vectorIiSaIiEED5Ev,comdat
	.align 2
	.weak	_ZNSt6vectorIiSaIiEED2Ev
	.type	_ZNSt6vectorIiSaIiEED2Ev, @function
_ZNSt6vectorIiSaIiEED2Ev:
.LFB4571:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	.L79
	movq	16(%rdi), %rsi
	movq	%rax, %rdi
	subq	%rax, %rsi
	jmp	_ZdlPvm@PLT
.L79:
	ret
	.cfi_endproc
.LFE4571:
	.size	_ZNSt6vectorIiSaIiEED2Ev, .-_ZNSt6vectorIiSaIiEED2Ev
	.weak	_ZNSt6vectorIiSaIiEED1Ev
	.set	_ZNSt6vectorIiSaIiEED1Ev,_ZNSt6vectorIiSaIiEED2Ev
	.section	.rodata._ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_.str1.1,"aMS",@progbits,1
.LC8:
	.string	"vector::_M_realloc_insert"
	.section	.text._ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_,"axG",@progbits,_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_,comdat
	.align 2
	.weak	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_
	.type	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_, @function
_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_:
.LFB4869:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdx, %r15
	movabsq	$288230376151711743, %rdx
	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	%rsi, 8(%rsp)
	movq	%rax, %rbx
	movq	%rax, (%rsp)
	subq	%r14, %rbx
	sarq	$5, %rbx
	cmpq	%rdx, %rbx
	jne	.L82
	leaq	.LC8(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L82:
	cmpq	%r14, (%rsp)
	movl	$1, %eax
	movq	8(%rsp), %rbp
	movq	%rdi, %r13
	cmovne	%rbx, %rax
	addq	%rax, %rbx
	setc	%al
	subq	%r14, %rbp
	movzbl	%al, %eax
	testq	%rax, %rax
	jne	.L94
	xorl	%r12d, %r12d
	testq	%rbx, %rbx
	je	.L87
	movabsq	$288230376151711743, %rax
	cmpq	%rax, %rbx
	cmova	%rax, %rbx
	jmp	.L86
.L94:
	movq	%rdx, %rbx
.L86:
	movq	%rbx, %rdi
	salq	$5, %rdi
	call	_Znwm@PLT
	movq	%rax, %r12
.L87:
	leaq	(%r12,%rbp), %rdi
	movq	%r15, %rsi
	movq	%r14, %rbp
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_@PLT
	movq	%r12, %rdi
.L88:
	leaq	32(%rdi), %r15
	cmpq	%rbp, 8(%rsp)
	je	.L90
	movq	%rbp, %rsi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_@PLT
	movq	%rbp, %rdi
	addq	$32, %rbp
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%r15, %rdi
	jmp	.L88
.L90:
	movq	(%rsp), %rax
	cmpq	%rax, %rbp
	je	.L101
	movq	%rbp, %rsi
	movq	%r15, %rdi
	addq	$32, %r15
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_@PLT
	movq	%rbp, %rdi
	addq	$32, %rbp
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L90
.L101:
	testq	%r14, %r14
	je	.L92
	movq	16(%r13), %rsi
	movq	%r14, %rdi
	subq	%r14, %rsi
	call	_ZdlPvm@PLT
.L92:
	salq	$5, %rbx
	movq	%r12, 0(%r13)
	addq	%rbx, %r12
	movq	%r15, 8(%r13)
	movq	%r12, 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
.LFE4869:
	.size	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_, .-_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_
	.section	.rodata.str1.1
.LC9:
	.string	"."
.LC10:
	.string	".."
.LC11:
	.string	"/"
	.text
	.globl	_Z8scan_dirPKcRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE
	.type	_Z8scan_dirPKcRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE, @function
_Z8scan_dirPKcRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE:
.LFB4146:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4146
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rsi, %rbx
	subq	$312, %rsp
	.cfi_def_cfa_offset 368
	movq	%fs:40, %rax
	movq	%rax, 296(%rsp)
	xorl	%eax, %eax
	movq	%rdi, (%rsp)
.LEHB0:
	call	opendir@PLT
	movq	(%rsp), %rdi
	testq	%rax, %rax
	jne	.L103
.L110:
	xorl	%eax, %eax
	jmp	.L102
.L103:
	movq	%rax, %r13
	leaq	.LC11(%rip), %r15
	call	chdir@PLT
.L105:
	movq	%r13, %rdi
	call	readdir@PLT
	testq	%rax, %rax
	je	.L132
	leaq	19(%rax), %rbp
	leaq	152(%rsp), %rsi
	movq	%rbp, %rdi
	call	lstat@PLT
	testb	$64, 177(%rsp)
	je	.L106
	movq	%rbp, %rsi
	leaq	.LC9(%rip), %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L105
	movq	%rbp, %rsi
	leaq	.LC10(%rip), %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L105
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	call	_Z8scan_dirPKcRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE
	testb	%al, %al
	jne	.L105
	jmp	.L110
.L106:
	leaq	88(%rsp), %rax
	leaq	23(%rsp), %rdx
	movq	%rbp, %rsi
	movq	%rax, %rdi
	movq	%rax, (%rsp)
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE0:
	orq	$-1, %rdx
	xorl	%esi, %esi
	xorl	%edi, %edi
	call	__getcwd_chk@PLT
	leaq	22(%rsp), %rdx
	movq	%rax, %rsi
	leaq	24(%rsp), %rax
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
.LEHB1:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE1:
	movq	8(%rsp), %rdi
	movq	%r15, %rsi
.LEHB2:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc@PLT
.LEHE2:
	leaq	56(%rsp), %rbp
	movq	%rax, %rsi
	leaq	120(%rsp), %r12
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_@PLT
	movq	%rbp, %rdi
	movq	96(%rsp), %r14
	addq	64(%rsp), %r14
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv@PLT
	cmpq	%r14, %rax
	jnb	.L111
	movq	(%rsp), %rdi
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv@PLT
	cmpq	%r14, %rax
	jb	.L111
	movq	(%rsp), %rdi
	movq	%rbp, %rdx
	xorl	%esi, %esi
.LEHB3:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6insertEmRKS4_@PLT
	jmp	.L130
.L111:
	movq	(%rsp), %rsi
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_@PLT
.LEHE3:
.L130:
	movq	%r12, %rdi
	movq	%rax, %rsi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_@PLT
	movq	8(%rbx), %rdi
	cmpq	16(%rbx), %rdi
	je	.L113
	movq	%r12, %rsi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_@PLT
	addq	$32, 8(%rbx)
	jmp	.L114
.L113:
	movq	%rdi, %rsi
	movq	%r12, %rdx
	movq	%rbx, %rdi
.LEHB4:
	call	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_
.LEHE4:
.L114:
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	8(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L105
.L132:
	leaq	.LC10(%rip), %rdi
	call	chdir@PLT
	movq	%r13, %rdi
.LEHB5:
	call	closedir@PLT
	movb	$1, %al
	jmp	.L102
.L125:
	endbr64
	movq	%rax, %rbx
.L116:
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L117
.L124:
	endbr64
	movq	%rax, %rbx
.L117:
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L118
.L123:
	endbr64
	movq	%rax, %rbx
.L118:
	movq	8(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L119
.L122:
	endbr64
	movq	%rax, %rbx
.L119:
	movq	(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	296(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L131
	movq	%rbx, %rdi
	call	_Unwind_Resume@PLT
.LEHE5:
.L102:
	movq	296(%rsp), %rdx
	subq	%fs:40, %rdx
	je	.L121
.L131:
	call	__stack_chk_fail@PLT
.L121:
	addq	$312, %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
.LFE4146:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA4146:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4146-.LLSDACSB4146
.LLSDACSB4146:
	.uleb128 .LEHB0-.LFB4146
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB4146
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L122-.LFB4146
	.uleb128 0
	.uleb128 .LEHB2-.LFB4146
	.uleb128 .LEHE2-.LEHB2
	.uleb128 .L123-.LFB4146
	.uleb128 0
	.uleb128 .LEHB3-.LFB4146
	.uleb128 .LEHE3-.LEHB3
	.uleb128 .L124-.LFB4146
	.uleb128 0
	.uleb128 .LEHB4-.LFB4146
	.uleb128 .LEHE4-.LEHB4
	.uleb128 .L125-.LFB4146
	.uleb128 0
	.uleb128 .LEHB5-.LFB4146
	.uleb128 .LEHE5-.LEHB5
	.uleb128 0
	.uleb128 0
.LLSDACSE4146:
	.text
	.size	_Z8scan_dirPKcRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE, .-_Z8scan_dirPKcRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE
	.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_:
.LFB4883:
	.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	.L134
	leaq	.LC8(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L134:
	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	.L144
	xorl	%r12d, %r12d
	testq	%rbx, %rbx
	je	.L139
	movabsq	$2305843009213693951, %rax
	cmpq	%rax, %rbx
	cmova	%rax, %rbx
	jmp	.L138
.L144:
	movq	%rcx, %rbx
.L138:
	leaq	0(,%rbx,4), %rdi
	movq	%rdx, 8(%rsp)
	call	_Znwm@PLT
	movq	8(%rsp), %rdx
	movq	%rax, %r12
.L139:
	movl	(%rdx), %eax
	movl	%eax, (%r12,%r15)
	testq	%r15, %r15
	jle	.L140
	movq	%r15, %rdx
	movq	%r14, %rsi
	movq	%r12, %rdi
	call	memmove@PLT
.L140:
	movq	(%rsp), %rax
	leaq	4(%r12,%r15), %rdx
	subq	%rbp, %rax
	testq	%rax, %rax
	jle	.L141
	movq	%rdx, %rdi
	movq	%rbp, %rsi
	movq	%rax, %rcx
	rep movsb
.L141:
	leaq	(%rdx,%rax), %rbp
	testq	%r14, %r14
	je	.L142
	movq	16(%r13), %rsi
	movq	%r14, %rdi
	subq	%r14, %rsi
	call	_ZdlPvm@PLT
.L142:
	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
.LFE4883:
	.size	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_, .-_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.section	.rodata.str1.1
.LC12:
	.string	"load "
.LC13:
	.string	" fail."
.LC14:
	.string	"loading "
	.text
	.globl	_Z9read_dataRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERS_IiSaIiEE
	.type	_Z9read_dataRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERS_IiSaIiEE, @function
_Z9read_dataRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERS_IiSaIiEE:
.LFB4147:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4147
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	_ZSt4cout(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rsi, %r12
	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	$808, %rsp
	.cfi_def_cfa_offset 864
	movq	%fs:40, %rax
	movq	%rax, 792(%rsp)
	xorl	%eax, %eax
.L152:
	movq	0(%rbp), %rdx
	movq	8(%rbp), %rax
	subq	%rdx, %rax
	sarq	$5, %rax
	cmpq	%rax, %r14
	jnb	.L167
	movq	%r14, %rbx
	leaq	16(%rsp), %r13
	salq	$5, %rbx
	movq	%r13, %rdi
	movq	(%rdx,%rbx), %rsi
	movl	$8, %edx
.LEHB6:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE6:
	leaq	136(%rsp), %rdi
	call	_ZNKSt12__basic_fileIcE7is_openEv@PLT
	testb	%al, %al
	jne	.L153
	leaq	.LC12(%rip), %rsi
	movq	%r15, %rdi
.LEHB7:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	addq	0(%rbp), %rbx
	movq	%rax, %rdi
	movq	%rbx, %rsi
	call	_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	%rax, %rdi
	leaq	.LC13(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
.L158:
	movq	%r13, %rdi
	incq	%r14
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L152
.L153:
	leaq	.LC14(%rip), %rsi
	movq	%r15, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	addq	0(%rbp), %rbx
	movq	%rax, %rdi
	movq	%rbx, %rsi
	call	_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	leaq	536(%rsp), %rbx
.L154:
	movl	$256, %edx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	call	_ZNSi7getlineEPcl@PLT
	movq	(%rax), %rdx
	movq	-24(%rdx), %rdx
	testb	$5, 32(%rax,%rdx)
	jne	.L168
	movq	%rbx, %rdi
	call	atoi@PLT
	movq	8(%r12), %rsi
	movl	%eax, 12(%rsp)
	cmpq	16(%r12), %rsi
	je	.L155
	movl	%eax, (%rsi)
	addq	$4, %rsi
	movq	%rsi, 8(%r12)
	jmp	.L154
.L155:
	leaq	12(%rsp), %rdx
	movq	%r12, %rdi
	call	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	jmp	.L154
.L168:
	movq	%r13, %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv@PLT
.LEHE7:
	jmp	.L158
.L163:
	endbr64
	movq	%rax, %rbx
.L160:
	movq	%r13, %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	792(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L166
	movq	%rbx, %rdi
.LEHB8:
	call	_Unwind_Resume@PLT
.LEHE8:
.L167:
	movq	792(%rsp), %rax
	subq	%fs:40, %rax
	je	.L162
.L166:
	call	__stack_chk_fail@PLT
.L162:
	addq	$808, %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
.LFE4147:
	.section	.gcc_except_table
.LLSDA4147:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4147-.LLSDACSB4147
.LLSDACSB4147:
	.uleb128 .LEHB6-.LFB4147
	.uleb128 .LEHE6-.LEHB6
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB7-.LFB4147
	.uleb128 .LEHE7-.LEHB7
	.uleb128 .L163-.LFB4147
	.uleb128 0
	.uleb128 .LEHB8-.LFB4147
	.uleb128 .LEHE8-.LEHB8
	.uleb128 0
	.uleb128 0
.LLSDACSE4147:
	.text
	.size	_Z9read_dataRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERS_IiSaIiEE, .-_Z9read_dataRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERS_IiSaIiEE
	.section	.rodata.str1.1
.LC15:
	.string	"./data40M"
.LC17:
	.string	"Time on GPU:  %.3f s\n"
.LC18:
	.string	"Median: "
.LC19:
	.string	"IO Time: "
.LC21:
	.string	"s"
.LC22:
	.string	"Algorithm Time: "
.LC23:
	.string	"Total Time: "
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB4155:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4155
	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	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	call	clock@PLT
	xorl	%edx, %edx
	leaq	.LC15(%rip), %rdi
	movq	%rax, %rbp
	leaq	40(%rsp), %rax
	movq	%rdx, 40(%rsp)
	movq	%rax, %rsi
	movq	%rdx, 48(%rsp)
	movq	%rdx, 56(%rsp)
	movq	%rax, 8(%rsp)
.LEHB9:
	call	_Z8scan_dirPKcRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE
.LEHE9:
	leaq	64(%rsp), %r14
	movq	8(%rsp), %rdi
	xorl	%eax, %eax
	movq	%r14, %rsi
	movq	%rax, 64(%rsp)
	movq	%rax, 72(%rsp)
	movq	%rax, 80(%rsp)
.LEHB10:
	call	_Z9read_dataRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERS_IiSaIiEE
	call	clock@PLT
	leaq	24(%rsp), %rdi
	movq	%rax, %r13
	call	cudaEventCreate@PLT
	leaq	32(%rsp), %rdi
	call	cudaEventCreate@PLT
	movq	24(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	64(%rsp), %rdi
	movq	72(%rsp), %rsi
	subq	%rdi, %rsi
	sarq	$2, %rsi
	call	_Z6medianPii
	movq	32(%rsp), %rdi
	xorl	%esi, %esi
	movl	%eax, %r15d
	call	cudaEventRecord@PLT
	movq	32(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	32(%rsp), %rdx
	movq	24(%rsp), %rsi
	leaq	20(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	leaq	.LC17(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	movss	20(%rsp), %xmm0
	divss	.LC16(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	call	__printf_chk@PLT
	call	clock@PLT
	leaq	_ZSt4cout(%rip), %r12
	leaq	.LC18(%rip), %rsi
	movq	%r12, %rdi
	movq	%rax, %rbx
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movl	%r15d, %esi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	leaq	.LC19(%rip), %rsi
	movq	%r12, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movq	%r13, %rax
	subq	%rbp, %rax
	cvtsi2sdq	%rax, %xmm0
	divsd	.LC20(%rip), %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	leaq	.LC21(%rip), %r15
	movq	%rax, %rdi
	movq	%r15, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	leaq	.LC22(%rip), %rsi
	movq	%r12, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movq	%rbx, %rax
	subq	%r13, %rax
	cvtsi2sdq	%rax, %xmm0
	divsd	.LC20(%rip), %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	movq	%r15, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	leaq	.LC23(%rip), %rsi
	movq	%r12, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	subq	%rbp, %rbx
	movq	%rax, %rdi
	cvtsi2sdq	%rbx, %xmm0
	divsd	.LC20(%rip), %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	movq	%r15, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	24(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movq	32(%rsp), %rdi
	call	cudaEventDestroy@PLT
.LEHE10:
	movq	%r14, %rdi
	call	_ZNSt6vectorIiSaIiEED1Ev
	movq	8(%rsp), %rdi
	call	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED1Ev
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	je	.L173
	jmp	.L176
.L175:
	endbr64
	movq	%rax, %rbx
.L170:
	movq	%r14, %rdi
	call	_ZNSt6vectorIiSaIiEED1Ev
	jmp	.L171
.L174:
	endbr64
	movq	%rax, %rbx
.L171:
	movq	8(%rsp), %rdi
	call	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED1Ev
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L176
	movq	%rbx, %rdi
.LEHB11:
	call	_Unwind_Resume@PLT
.LEHE11:
.L176:
	call	__stack_chk_fail@PLT
.L173:
	addq	$104, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4155:
	.section	.gcc_except_table
.LLSDA4155:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4155-.LLSDACSB4155
.LLSDACSB4155:
	.uleb128 .LEHB9-.LFB4155
	.uleb128 .LEHE9-.LEHB9
	.uleb128 .L174-.LFB4155
	.uleb128 0
	.uleb128 .LEHB10-.LFB4155
	.uleb128 .LEHE10-.LEHB10
	.uleb128 .L175-.LFB4155
	.uleb128 0
	.uleb128 .LEHB11-.LFB4155
	.uleb128 .LEHE11-.LEHB11
	.uleb128 0
	.uleb128 0
.LLSDACSE4155:
	.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
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1071644672
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC16:
	.long	1148846080
	.section	.rodata.cst8
	.align 8
.LC20:
	.long	0
	.long	1093567616
	.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 <hip/hip_runtime.h>
#include <stdio.h>
#include <ctime>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <dirent.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <vector>
#include <iostream>
#include <fstream>
#include <climits>
using namespace std;

bool scan_dir(const char* dir, vector<string> &files)
{
    DIR *dp;                                            // 定义子目录流指针  
    struct dirent *entry;                               // 定义dirent结构指针保存后续目录  
    struct stat statbuf;                                // 定义statbuf结构保存文件属性  
    if((dp = opendir(dir)) == NULL) return false;       // 打开目录，获取子目录流指针，判断操作是否成功  
    chdir (dir);                                        // 切换到当前目录  
    while((entry = readdir(dp)) != NULL)                // 获取下一级目录信息，如果未否则循环  
    {
        lstat(entry->d_name, &statbuf);                 // 获取下一级成员属性  
        if(S_IFDIR &statbuf.st_mode)                    // 判断下一级成员是否是目录  
        {
            if (strcmp(".", entry->d_name) == 0 || strcmp("..", entry->d_name) == 0)
              continue;

            if (!scan_dir(entry->d_name, files)) return false;              // 递归调用自身，扫描下一级目录的内容  
        }
        else
        {
            files.push_back(string(getcwd(NULL, 0)) + "/" + string(entry->d_name));
        }
    }
    chdir("..");                                                  // 回到上级目录  
    closedir(dp);                                                 // 关闭子目录流  
    return true;
}

void read_data(vector<string> &files, vector<int> &data)
{
    char buff[256];
    for (int i=0; i<files.size(); i++)
    {
        ifstream fin(files[i].c_str(),ios::in);
        if (!fin.is_open())
        {
            cout<<"load "<<files[i]<<" fail."<<endl;
            continue;
        }
        else cout<<"loading "<<files[i]<<endl;
        while(fin.getline(buff,256))
            data.push_back(atoi(buff));
        fin.close();
    }
}

static void HandleError( hipError_t err, const char *file, int line ) 
{
    if (err != hipSuccess) 
    {
        printf( "%s in %s at line %d\n", hipGetErrorString( err ), file, line );
        exit( EXIT_FAILURE );
    }
}
#define HANDLE_ERROR( err ) (HandleError( err, __FILE__, __LINE__ ))

// a>=b return 0   a<b return 1
__device__ int cmp_without_if(int a, int b)
{
    int c = a - b;
    return (c >> 31) & 0x1;
}

__device__ int max_without_if(int a, int b)
{
    int c = a - b;
    int k = (c >> 31) & 0x1;
    return a - k * c;
}

__device__ int min_without_if(int a, int b)
{
    return (a + b) - max_without_if(a,b);
}

__global__ void reduce_sum(int *d_arr, int len, int *d_sum)
{
    __shared__ int cache[1024];
    int tid = threadIdx.x;

    cache[tid] = 0;
    for(int i=tid; i<len; i+=blockDim.x)
        cache[tid] += d_arr[i];
    __syncthreads();

    int i = blockDim.x/2;
    while(i)
    {
        if (tid < i) cache[tid] += cache[tid+i];
        __syncthreads();
        i /= 2;
    }
    if (tid == 0) *d_sum = cache[0];
}

__global__ void reduce_min_max(int *d_min_arr, int *d_max_arr, int len, int *d_min, int *d_max)
{
    __shared__ int mincache[1024];
    __shared__ int maxcache[1024];
    int tid = threadIdx.x;
    mincache[tid] = 9999999;
    maxcache[tid] = -9999999;

    for(int i=tid; i<len; i+=blockDim.x)
    {
        mincache[tid] = min_without_if(mincache[tid], d_min_arr[i]);
        maxcache[tid] = max_without_if(maxcache[tid], d_max_arr[i]); 
    }
    __syncthreads();

    int i = blockDim.x/2;
    while(i)
    {
        if (tid < i)
        {
            mincache[tid] = min_without_if(mincache[tid], mincache[tid+i]);
            maxcache[tid] = max_without_if(maxcache[tid], maxcache[tid+i]); 
        }
        __syncthreads();
        i /= 2;
    }
    if (tid == 0)
    {
        *d_min = mincache[0];
        *d_max = maxcache[0];
    }
}

__global__ void partition_min_max(int *d_arr, int len, int *d_min_arr, int *d_max_arr)
{
    int tid = threadIdx.x + blockIdx.x * blockDim.x;
    int max = -9999999, min = 9999999;
    for (int i=tid; i<len; i+=blockDim.x*gridDim.x)
    {
        min = min_without_if(min, d_arr[i]);
        max = max_without_if(max, d_arr[i]);
    }
    d_min_arr[tid] = min;
    d_max_arr[tid] = max;
}

__global__ void partition_less_num(int pivot,int *d_arr,int len,int *d_lt_num_arr)
{
    int tid = threadIdx.x + blockIdx.x * blockDim.x;
    d_lt_num_arr[tid] = 0;
    for (int i=tid; i<len; i+=blockDim.x*gridDim.x)
    {
        d_lt_num_arr[tid] += cmp_without_if(d_arr[i], pivot);
    }
}

__host__ int nth_order_stat(int target_order_stat, int *h_arr, int *d_arr, int len);

__host__ int partition_on_pivot(int target_order_stat, int *h_arr, int *d_arr, int len)
{
    int pivot = h_arr[rand()%len];

    int threadNum = 1024;
    int blockNum = (len + threadNum - 1) / threadNum;
    blockNum = blockNum <= 1024 ? blockNum : 1024;

    int *d_lt_num_arr, *d_lt_num, lt_num;
    HANDLE_ERROR( hipMalloc((void**)&d_lt_num_arr,sizeof(int)*blockNum*threadNum) );
    HANDLE_ERROR( hipMalloc((void**)&d_lt_num,sizeof(int)) );

    partition_less_num<<<blockNum,threadNum>>>(pivot,d_arr,len,d_lt_num_arr);
    reduce_sum<<<1,1024>>>(d_lt_num_arr,blockNum*threadNum,d_lt_num);
    HANDLE_ERROR( hipMemcpy(&lt_num,d_lt_num,sizeof(int),hipMemcpyDeviceToHost) );

    HANDLE_ERROR( hipFree(d_lt_num_arr) );
    HANDLE_ERROR( hipFree(d_lt_num) );

    int pivot_order_stat = lt_num + 1;
    
    if (pivot_order_stat == target_order_stat) 
        return pivot;
    else if (pivot_order_stat == 1)
        return partition_on_pivot(target_order_stat, h_arr, d_arr, len);
    else if (pivot_order_stat < target_order_stat)
    {
        target_order_stat -= lt_num;
        int *h_subarr = new int[len-lt_num];
        int subarr_num = 0;
        for (int i=0; i<len; i++)
        {
            if (h_arr[i] >= pivot) h_subarr[subarr_num++] = h_arr[i];
        }
        int *d_subarr;
        HANDLE_ERROR( hipMalloc((void**)&d_subarr,sizeof(int)*subarr_num) );
        HANDLE_ERROR( hipMemcpy(d_subarr,h_subarr,sizeof(int)*subarr_num,hipMemcpyHostToDevice) );
        int res = nth_order_stat(target_order_stat, h_subarr, d_subarr, subarr_num);
        delete[] h_subarr;
        HANDLE_ERROR( hipFree(d_subarr) );
        return res;
    }
    else
    {
        int *h_subarr = new int[lt_num];
        int subarr_num = 0;
        for (int i=0; i<len; i++)
        {
            if (h_arr[i] < pivot) h_subarr[subarr_num++] = h_arr[i];
        }
        int *d_subarr;
        HANDLE_ERROR( hipMalloc((void**)&d_subarr,sizeof(int)*subarr_num) );
        HANDLE_ERROR( hipMemcpy(d_subarr,h_subarr,sizeof(int)*subarr_num,hipMemcpyHostToDevice) );
        int res = nth_order_stat(target_order_stat, h_subarr, d_subarr, subarr_num);
        delete[] h_subarr;
        HANDLE_ERROR( hipFree(d_subarr) );
        return res;
    }
}

__host__ int nth_order_stat(int target_order_stat, int *h_arr, int *d_arr, int len)
{
    int threadNum = 1024;
    int blockNum = (len + threadNum - 1) / threadNum;
    blockNum = blockNum <= 1024 ? blockNum : 1024;

    int *d_min_arr, *d_max_arr;
    int h_min, h_max, *d_min, *d_max;
    HANDLE_ERROR( hipMalloc((void**)&d_min_arr,sizeof(int)*blockNum*threadNum) );
    HANDLE_ERROR( hipMalloc((void**)&d_max_arr,sizeof(int)*blockNum*threadNum) );  
    HANDLE_ERROR( hipMalloc((void**)&d_min,sizeof(int)) );  
    HANDLE_ERROR( hipMalloc((void**)&d_max,sizeof(int)) );  

    partition_min_max<<<blockNum,threadNum>>>(d_arr,len,d_min_arr,d_max_arr);
    reduce_min_max<<<1,1024>>>(d_min_arr,d_max_arr,blockNum*threadNum,d_min,d_max);
    HANDLE_ERROR( hipMemcpy(&h_min,d_min,sizeof(int),hipMemcpyDeviceToHost) );
    HANDLE_ERROR( hipMemcpy(&h_max,d_max,sizeof(int),hipMemcpyDeviceToHost) );

    HANDLE_ERROR (hipFree(d_min_arr));
    HANDLE_ERROR (hipFree(d_max_arr));
    HANDLE_ERROR (hipFree(d_min));
    HANDLE_ERROR (hipFree(d_max));
 
    if (h_max == h_min || target_order_stat == 1)
        return h_min;
    else if (target_order_stat == len)
        return h_max;
    else
        return partition_on_pivot(target_order_stat, h_arr, d_arr, len);
}

__host__ int median(int *arr, int len)
{
    int *d_arr;
    hipMalloc((void**)&d_arr,sizeof(int)*len);
    hipMemcpy(d_arr,arr,sizeof(int)*len,hipMemcpyHostToDevice);

    int res = nth_order_stat((int)((len+0.5)/2), arr, d_arr, len);
    
    hipFree(d_arr);
    return res;
}

int main()
{
    //开始时间戳
    clock_t h_t1 = clock();

    //读入数据
    vector<string> files;
    scan_dir("./data40M", files);
    vector<int> h_vec; 
    read_data(files,h_vec);

    //读取数据时间戳
    clock_t h_t2 = clock();

    //GPU运算开始时间
    hipEvent_t     d_start, d_stop;
    hipEventCreate( &d_start );
    hipEventCreate( &d_stop );
    hipEventRecord( d_start, 0 );

    //调用算法
    int res = median(h_vec.data(), h_vec.size());

    //GPU运算结束时间
    hipEventRecord( d_stop, 0 );
    hipEventSynchronize( d_stop );
    float   elapsedTime;
    hipEventElapsedTime( &elapsedTime, d_start, d_stop );
    printf( "Time on GPU:  %.3f s\n", elapsedTime/1000 );

    //结束时间戳
    clock_t h_end = clock();
    cout<<"Median: "<<res<<endl;
    cout<<"IO Time: "<<(double)(h_t2-h_t1)/CLOCKS_PER_SEC<<"s"<<endl;
    cout<<"Algorithm Time: "<<(double)(h_end-h_t2)/CLOCKS_PER_SEC<<"s"<<endl;
    cout<<"Total Time: "<<(double)(h_end-h_t1)/CLOCKS_PER_SEC<<"s"<<endl;

    hipEventDestroy( d_start );
    hipEventDestroy( d_stop );
    return 0;
}

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

                                        # End of file scope inline assembly
	.globl	_Z8scan_dirPKcRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE # -- Begin function _Z8scan_dirPKcRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE
	.type	_Z8scan_dirPKcRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE,@function
_Z8scan_dirPKcRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE: # @_Z8scan_dirPKcRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE
.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	$296, %rsp                      # imm = 0x128
	.cfi_def_cfa_offset 352
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, 48(%rsp)                  # 8-byte Spill
	movq	%rdi, %rbx
	callq	opendir
	testq	%rax, %rax
	je	.LBB0_1
# %bb.2:
	movq	%rax, %rbp
	movq	%rbx, %rdi
	callq	chdir
	movq	%rbp, %rdi
	callq	readdir
	testq	%rax, %rax
	je	.LBB0_8
# %bb.3:                                # %.lr.ph
	movq	%rax, %r13
	leaq	32(%rsp), %r12
	leaq	72(%rsp), %r14
	leaq	152(%rsp), %rbx
.LBB0_4:                                # =>This Inner Loop Header: Depth=1
	addq	$19, %r13
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	lstat
	testb	$64, 177(%rsp)
	jne	.LBB0_5
# %bb.11:                               #   in Loop: Header=BB0_4 Depth=1
	movq	%rbp, %rbx
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	getcwd
	leaq	120(%rsp), %r15
	movq	%r15, %rdi
	movq	%rax, %rsi
	leaq	15(%rsp), %rdx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
.Ltmp0:
	movl	$.L.str.2, %esi
	movq	%r15, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc
.Ltmp1:
# %bb.12:                               # %.noexc
                                        #   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rbp
	movq	%r12, 16(%rsp)
	movq	(%rax), %rsi
	movq	%r12, %rdi
	movq	%rax, %r12
	addq	$16, %r12
	cmpq	%r12, %rsi
	je	.LBB0_13
# %bb.14:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
                                        #   in Loop: Header=BB0_4 Depth=1
	movq	%rsi, 16(%rsp)
	movq	16(%rbp), %rax
	movq	%rax, 32(%rsp)
	movq	8(%rbp), %r15
	jmp	.LBB0_15
.LBB0_5:                                #   in Loop: Header=BB0_4 Depth=1
	movl	$.L.str, %edi
	movq	%r13, %rsi
	callq	strcmp
	testl	%eax, %eax
	je	.LBB0_7
# %bb.6:                                #   in Loop: Header=BB0_4 Depth=1
	movl	$.L.str.1, %edi
	movq	%r13, %rsi
	callq	strcmp
	testl	%eax, %eax
	je	.LBB0_7
# %bb.10:                               #   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rdi
	movq	48(%rsp), %rsi                  # 8-byte Reload
	callq	_Z8scan_dirPKcRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE
	testb	%al, %al
	jne	.LBB0_7
	jmp	.LBB0_1
.LBB0_13:                               #   in Loop: Header=BB0_4 Depth=1
	movq	8(%rbp), %r15
	leaq	1(%r15), %rdx
	callq	memcpy@PLT
.LBB0_15:                               #   in Loop: Header=BB0_4 Depth=1
	movq	%r15, 24(%rsp)
	movq	%r12, (%rbp)
	movq	$0, 8(%rbp)
	movb	$0, 16(%rbp)
	leaq	104(%rsp), %r15
	movq	%r15, 88(%rsp)
	movq	%r13, %rdi
	callq	strlen
	leaq	(%rax,%r13), %rdx
.Ltmp3:
	leaq	88(%rsp), %rdi
	movq	%r13, %rsi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
.Ltmp4:
# %bb.16:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit
                                        #   in Loop: Header=BB0_4 Depth=1
	movq	16(%rsp), %rcx
	movl	$15, %edi
	leaq	32(%rsp), %r12
	cmpq	%r12, %rcx
	je	.LBB0_18
# %bb.17:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit
                                        #   in Loop: Header=BB0_4 Depth=1
	movq	32(%rsp), %rdi
.LBB0_18:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit
                                        #   in Loop: Header=BB0_4 Depth=1
	movq	24(%rsp), %r8
	movq	88(%rsp), %rsi
	movq	96(%rsp), %rdx
	leaq	(%rdx,%r8), %rax
	cmpq	%rdi, %rax
	jbe	.LBB0_25
# %bb.19:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit12.i
                                        #   in Loop: Header=BB0_4 Depth=1
	movl	$15, %edi
	cmpq	%r15, %rsi
	je	.LBB0_21
# %bb.20:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit12.i
                                        #   in Loop: Header=BB0_4 Depth=1
	movq	104(%rsp), %rdi
.LBB0_21:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit12.i
                                        #   in Loop: Header=BB0_4 Depth=1
	cmpq	%rdi, %rax
	jbe	.LBB0_22
.LBB0_25:                               #   in Loop: Header=BB0_4 Depth=1
.Ltmp8:
	leaq	16(%rsp), %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm
.Ltmp9:
	jmp	.LBB0_23
.LBB0_22:                               # %.critedge.i
                                        #   in Loop: Header=BB0_4 Depth=1
.Ltmp6:
	leaq	88(%rsp), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm
.Ltmp7:
.LBB0_23:                               # %.noexc28
                                        #   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %r13
	movq	%r14, 56(%rsp)
	movq	(%rax), %rsi
	leaq	16(%rax), %rbp
	cmpq	%rbp, %rsi
	je	.LBB0_24
# %bb.26:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i13.i
                                        #   in Loop: Header=BB0_4 Depth=1
	movq	%rsi, 56(%rsp)
	movq	(%rbp), %rax
	movq	%rax, 72(%rsp)
	jmp	.LBB0_27
.LBB0_24:                               #   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	movq	8(%r13), %rdx
	incq	%rdx
	callq	memcpy@PLT
.LBB0_27:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit14.i
                                        #   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rax
	addq	$8, %rax
	movq	8(%r13), %rcx
	movq	%rcx, 64(%rsp)
	movq	%rbp, (%r13)
	movq	$0, (%rax)
	movb	$0, (%rbp)
.Ltmp11:
	movq	48(%rsp), %rdi                  # 8-byte Reload
	leaq	56(%rsp), %rsi
	callq	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_
.Ltmp12:
# %bb.28:                               # %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit
                                        #   in Loop: Header=BB0_4 Depth=1
	movq	56(%rsp), %rdi
	cmpq	%r14, %rdi
	movq	%rbx, %rbp
	je	.LBB0_30
# %bb.29:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i31
                                        #   in Loop: Header=BB0_4 Depth=1
	callq	_ZdlPv
.LBB0_30:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
                                        #   in Loop: Header=BB0_4 Depth=1
	movq	88(%rsp), %rdi
	cmpq	%r15, %rdi
	je	.LBB0_32
# %bb.31:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i32
                                        #   in Loop: Header=BB0_4 Depth=1
	callq	_ZdlPv
.LBB0_32:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit34
                                        #   in Loop: Header=BB0_4 Depth=1
	movq	16(%rsp), %rdi
	cmpq	%r12, %rdi
	leaq	152(%rsp), %rbx
	je	.LBB0_34
# %bb.33:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i35
                                        #   in Loop: Header=BB0_4 Depth=1
	callq	_ZdlPv
.LBB0_34:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit37
                                        #   in Loop: Header=BB0_4 Depth=1
	movq	120(%rsp), %rdi
	leaq	136(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_7
# %bb.35:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i38
                                        #   in Loop: Header=BB0_4 Depth=1
	callq	_ZdlPv
.LBB0_7:                                # %.backedge
                                        #   in Loop: Header=BB0_4 Depth=1
	movq	%rbp, %rdi
	callq	readdir
	movq	%rax, %r13
	testq	%rax, %rax
	jne	.LBB0_4
.LBB0_8:                                # %._crit_edge
	movl	$.L.str.1, %edi
	callq	chdir
	movq	%rbp, %rdi
	callq	closedir
	movb	$1, %al
	jmp	.LBB0_9
.LBB0_1:
	xorl	%eax, %eax
.LBB0_9:                                # %.loopexit
                                        # kill: def $al killed $al killed $eax
	addq	$296, %rsp                      # imm = 0x128
	.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_37:
	.cfi_def_cfa_offset 352
.Ltmp5:
	movq	%rax, %r15
	jmp	.LBB0_43
.LBB0_39:
.Ltmp13:
	movq	%rax, %r15
	movq	56(%rsp), %rdi
	cmpq	%r14, %rdi
	je	.LBB0_41
# %bb.40:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i41
	callq	_ZdlPv
	jmp	.LBB0_41
.LBB0_36:
.Ltmp2:
	movq	%rax, %r15
	jmp	.LBB0_45
.LBB0_38:
.Ltmp10:
	movq	%rax, %r15
.LBB0_41:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit43
	movq	88(%rsp), %rdi
	leaq	104(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_43
# %bb.42:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i44
	callq	_ZdlPv
.LBB0_43:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit46
	movq	16(%rsp), %rdi
	leaq	32(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_45
# %bb.44:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i47
	callq	_ZdlPv
.LBB0_45:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit49
	movq	120(%rsp), %rdi
	leaq	136(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_47
# %bb.46:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i50
	callq	_ZdlPv
.LBB0_47:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit52
	movq	%r15, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end0:
	.size	_Z8scan_dirPKcRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE, .Lfunc_end0-_Z8scan_dirPKcRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE
	.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 .Ltmp1-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp1
	.uleb128 .Ltmp2-.Lfunc_begin0           #     jumps to .Ltmp2
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp1-.Lfunc_begin0           # >> Call Site 3 <<
	.uleb128 .Ltmp3-.Ltmp1                  #   Call between .Ltmp1 and .Ltmp3
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp3-.Lfunc_begin0           # >> Call Site 4 <<
	.uleb128 .Ltmp4-.Ltmp3                  #   Call between .Ltmp3 and .Ltmp4
	.uleb128 .Ltmp5-.Lfunc_begin0           #     jumps to .Ltmp5
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp8-.Lfunc_begin0           # >> Call Site 5 <<
	.uleb128 .Ltmp7-.Ltmp8                  #   Call between .Ltmp8 and .Ltmp7
	.uleb128 .Ltmp10-.Lfunc_begin0          #     jumps to .Ltmp10
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp7-.Lfunc_begin0           # >> Call Site 6 <<
	.uleb128 .Ltmp11-.Ltmp7                 #   Call between .Ltmp7 and .Ltmp11
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp11-.Lfunc_begin0          # >> Call Site 7 <<
	.uleb128 .Ltmp12-.Ltmp11                #   Call between .Ltmp11 and .Ltmp12
	.uleb128 .Ltmp13-.Lfunc_begin0          #     jumps to .Ltmp13
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp12-.Lfunc_begin0          # >> Call Site 8 <<
	.uleb128 .Lfunc_end0-.Ltmp12            #   Call between .Ltmp12 and .Lfunc_end0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_,"axG",@progbits,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_,comdat
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_ # -- Begin function _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.p2align	1, 0x90
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_,@function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_: # @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	leaq	16(%rdi), %rax
	movq	%rax, (%rdi)
	testq	%rsi, %rsi
	je	.LBB1_1
# %bb.2:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	strlen
	leaq	(%rax,%rbx), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	jmp	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag # TAILCALL
.LBB1_1:
	.cfi_def_cfa_offset 32
	movl	$.L.str.15, %edi
	callq	_ZSt19__throw_logic_errorPKc
.Lfunc_end1:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_, .Lfunc_end1-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.cfi_endproc
                                        # -- End function
	.text
	.globl	_Z9read_dataRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERS_IiSaIiEE # -- Begin function _Z9read_dataRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERS_IiSaIiEE
	.type	_Z9read_dataRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERS_IiSaIiEE,@function
_Z9read_dataRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERS_IiSaIiEE: # @_Z9read_dataRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERS_IiSaIiEE
.Lfunc_begin1:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception1
# %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	$792, %rsp                      # imm = 0x318
	.cfi_def_cfa_offset 848
	.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), %rax
	cmpq	%rax, 8(%rdi)
	je	.LBB2_24
# %bb.1:                                # %.lr.ph
	movq	%rsi, %rbx
	movq	%rdi, %r14
	xorl	%ebp, %ebp
	leaq	8(%rsp), %r12
	leaq	528(%rsp), %r13
.LBB2_2:                                # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_15 Depth 2
	movq	%rbp, %r15
	shlq	$5, %r15
	movq	(%rax,%r15), %rsi
	movq	%r12, %rdi
	movl	$8, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
	leaq	128(%rsp), %rdi
	callq	_ZNKSt12__basic_fileIcE7is_openEv
	testb	%al, %al
	je	.LBB2_3
# %bb.10:                               #   in Loop: Header=BB2_2 Depth=1
.Ltmp26:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.5, %esi
	movl	$8, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp27:
# %bb.11:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit16
                                        #   in Loop: Header=BB2_2 Depth=1
	movq	(%r14), %rax
	movq	(%rax,%r15), %rsi
	movq	8(%rax,%r15), %rdx
.Ltmp28:
	movl	$_ZSt4cout, %edi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp29:
# %bb.12:                               # %_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE.exit17
                                        #   in Loop: Header=BB2_2 Depth=1
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
.Ltmp30:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp31:
# %bb.13:                               # %.noexc24
                                        #   in Loop: Header=BB2_2 Depth=1
.Ltmp32:
	movsbl	%al, %esi
	movq	%r15, %rdi
	callq	_ZNSo3putEc
.Ltmp33:
# %bb.14:                               # %.noexc25
                                        #   in Loop: Header=BB2_2 Depth=1
.Ltmp34:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp35:
.LBB2_15:                               # %_ZNSolsEPFRSoS_E.exit18
                                        #   Parent Loop BB2_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movq	8(%rsp), %rax
	movq	-24(%rax), %rdi
	addq	%r12, %rdi
.Ltmp36:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp37:
# %bb.16:                               # %.noexc
                                        #   in Loop: Header=BB2_15 Depth=2
.Ltmp38:
	movsbl	%al, %ecx
	movl	$256, %edx                      # imm = 0x100
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_ZNSi7getlineEPclc
.Ltmp39:
# %bb.17:                               #   in Loop: Header=BB2_15 Depth=2
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	testb	$5, 32(%rax,%rcx)
	jne	.LBB2_22
# %bb.18:                               #   in Loop: Header=BB2_15 Depth=2
	movq	%r13, %rdi
	callq	atoi
	movl	%eax, 4(%rsp)
	movq	8(%rbx), %rsi
	cmpq	16(%rbx), %rsi
	je	.LBB2_20
# %bb.19:                               #   in Loop: Header=BB2_15 Depth=2
	movl	%eax, (%rsi)
	addq	$4, %rsi
	movq	%rsi, 8(%rbx)
	jmp	.LBB2_15
.LBB2_20:                               #   in Loop: Header=BB2_15 Depth=2
.Ltmp44:
	movq	%rbx, %rdi
	leaq	4(%rsp), %rdx
	callq	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
.Ltmp45:
	jmp	.LBB2_15
.LBB2_3:                                #   in Loop: Header=BB2_2 Depth=1
.Ltmp14:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.3, %esi
	movl	$5, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp15:
# %bb.4:                                # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
                                        #   in Loop: Header=BB2_2 Depth=1
	movq	(%r14), %rax
	movq	(%rax,%r15), %rsi
	movq	8(%rax,%r15), %rdx
.Ltmp16:
	movl	$_ZSt4cout, %edi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp17:
# %bb.5:                                # %_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE.exit
                                        #   in Loop: Header=BB2_2 Depth=1
.Ltmp18:
	movq	%rax, %r15
	movl	$.L.str.4, %esi
	movl	$6, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp19:
# %bb.6:                                # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit15
                                        #   in Loop: Header=BB2_2 Depth=1
	movq	(%r15), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
.Ltmp20:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp21:
# %bb.7:                                # %.noexc21
                                        #   in Loop: Header=BB2_2 Depth=1
.Ltmp22:
	movsbl	%al, %esi
	movq	%r15, %rdi
	callq	_ZNSo3putEc
.Ltmp23:
# %bb.8:                                # %.noexc22
                                        #   in Loop: Header=BB2_2 Depth=1
.Ltmp24:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp25:
	jmp	.LBB2_23
.LBB2_22:                               #   in Loop: Header=BB2_2 Depth=1
.Ltmp41:
	movq	%r12, %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv
.Ltmp42:
.LBB2_23:                               # %_ZNSolsEPFRSoS_E.exit
                                        #   in Loop: Header=BB2_2 Depth=1
	movq	%r12, %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	incq	%rbp
	movq	(%r14), %rax
	movq	8(%r14), %rcx
	subq	%rax, %rcx
	sarq	$5, %rcx
	cmpq	%rbp, %rcx
	ja	.LBB2_2
.LBB2_24:                               # %._crit_edge
	addq	$792, %rsp                      # imm = 0x318
	.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
.LBB2_21:
	.cfi_def_cfa_offset 848
.Ltmp46:
	jmp	.LBB2_26
.LBB2_9:                                # %.loopexit.split-lp
.Ltmp43:
	jmp	.LBB2_26
.LBB2_25:                               # %.loopexit
.Ltmp40:
.LBB2_26:
	movq	%rax, %rbx
	leaq	8(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end2:
	.size	_Z9read_dataRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERS_IiSaIiEE, .Lfunc_end2-_Z9read_dataRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERS_IiSaIiEE
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table2:
.Lexception1:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end1-.Lcst_begin1
.Lcst_begin1:
	.uleb128 .Lfunc_begin1-.Lfunc_begin1    # >> Call Site 1 <<
	.uleb128 .Ltmp26-.Lfunc_begin1          #   Call between .Lfunc_begin1 and .Ltmp26
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp26-.Lfunc_begin1          # >> Call Site 2 <<
	.uleb128 .Ltmp35-.Ltmp26                #   Call between .Ltmp26 and .Ltmp35
	.uleb128 .Ltmp43-.Lfunc_begin1          #     jumps to .Ltmp43
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp36-.Lfunc_begin1          # >> Call Site 3 <<
	.uleb128 .Ltmp39-.Ltmp36                #   Call between .Ltmp36 and .Ltmp39
	.uleb128 .Ltmp40-.Lfunc_begin1          #     jumps to .Ltmp40
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp44-.Lfunc_begin1          # >> Call Site 4 <<
	.uleb128 .Ltmp45-.Ltmp44                #   Call between .Ltmp44 and .Ltmp45
	.uleb128 .Ltmp46-.Lfunc_begin1          #     jumps to .Ltmp46
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp14-.Lfunc_begin1          # >> Call Site 5 <<
	.uleb128 .Ltmp42-.Ltmp14                #   Call between .Ltmp14 and .Ltmp42
	.uleb128 .Ltmp43-.Lfunc_begin1          #     jumps to .Ltmp43
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp42-.Lfunc_begin1          # >> Call Site 6 <<
	.uleb128 .Lfunc_end2-.Ltmp42            #   Call between .Ltmp42 and .Lfunc_end2
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end1:
	.p2align	2, 0x0
                                        # -- End function
	.text
	.globl	_Z25__device_stub__reduce_sumPiiS_ # -- Begin function _Z25__device_stub__reduce_sumPiiS_
	.type	_Z25__device_stub__reduce_sumPiiS_,@function
_Z25__device_stub__reduce_sumPiiS_:     # @_Z25__device_stub__reduce_sumPiiS_
	.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	12(%rsp), %rcx
	movl	%esi, (%rcx)
	leaq	32(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	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	$_Z10reduce_sumPiiS_, %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	_Z25__device_stub__reduce_sumPiiS_, .Lfunc_end3-_Z25__device_stub__reduce_sumPiiS_
	.cfi_endproc
                                        # -- End function
	.globl	_Z29__device_stub__reduce_min_maxPiS_iS_S_ # -- Begin function _Z29__device_stub__reduce_min_maxPiS_iS_S_
	.type	_Z29__device_stub__reduce_min_maxPiS_iS_S_,@function
_Z29__device_stub__reduce_min_maxPiS_iS_S_: # @_Z29__device_stub__reduce_min_maxPiS_iS_S_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$144, %rsp
	.cfi_def_cfa_offset 192
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	56(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	48(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	12(%rsp), %rsi
	movl	%edx, (%rsi)
	leaq	40(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	32(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	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	$_Z14reduce_min_maxPiS_iS_S_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$160, %rsp
	.cfi_adjust_cfa_offset -160
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end4:
	.size	_Z29__device_stub__reduce_min_maxPiS_iS_S_, .Lfunc_end4-_Z29__device_stub__reduce_min_maxPiS_iS_S_
	.cfi_endproc
                                        # -- End function
	.globl	_Z32__device_stub__partition_min_maxPiiS_S_ # -- Begin function _Z32__device_stub__partition_min_maxPiiS_S_
	.type	_Z32__device_stub__partition_min_maxPiiS_S_,@function
_Z32__device_stub__partition_min_maxPiiS_S_: # @_Z32__device_stub__partition_min_maxPiiS_S_
	.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	4(%rsp), %rdi
	movl	%esi, (%rdi)
	leaq	32(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	24(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z17partition_min_maxPiiS_S_, %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_end5:
	.size	_Z32__device_stub__partition_min_maxPiiS_S_, .Lfunc_end5-_Z32__device_stub__partition_min_maxPiiS_S_
	.cfi_endproc
                                        # -- End function
	.globl	_Z33__device_stub__partition_less_numiPiiS_ # -- Begin function _Z33__device_stub__partition_less_numiPiiS_
	.type	_Z33__device_stub__partition_less_numiPiiS_,@function
_Z33__device_stub__partition_less_numiPiiS_: # @_Z33__device_stub__partition_less_numiPiiS_
	.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	12(%rsp), %rax
	movl	%edi, (%rax)
	leaq	40(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	8(%rsp), %rsi
	movl	%edx, (%rsi)
	leaq	32(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%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	$_Z18partition_less_numiPiiS_, %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_end6:
	.size	_Z33__device_stub__partition_less_numiPiiS_, .Lfunc_end6-_Z33__device_stub__partition_less_numiPiiS_
	.cfi_endproc
                                        # -- End function
	.globl	_Z18partition_on_pivotiPiS_i    # -- Begin function _Z18partition_on_pivotiPiS_i
	.type	_Z18partition_on_pivotiPiS_i,@function
_Z18partition_on_pivotiPiS_i:           # @_Z18partition_on_pivotiPiS_i
	.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	$40, %rsp
	.cfi_def_cfa_offset 96
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%ecx, %r15d
	movq	%rdx, 16(%rsp)                  # 8-byte Spill
	movq	%rsi, %r14
	movl	%edi, %ebx
	movabsq	$4294968320, %r13               # imm = 0x100000400
	callq	rand
	cltd
	idivl	%r15d
	movslq	%edx, %rax
	leal	1023(%r15), %ecx
	leal	2046(%r15), %edx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edx
	movl	(%r14,%rax,4), %ebp
	sarl	$10, %edx
	cmpl	$1048577, %r15d                 # imm = 0x100001
	movl	$1024, %r12d                    # imm = 0x400
	cmovll	%edx, %r12d
	movslq	%r12d, %rsi
	shlq	$12, %rsi
	leaq	8(%rsp), %rdi
	callq	hipMalloc
	movl	%eax, %edi
	movl	$179, %esi
	callq	_ZL11HandleError10hipError_tPKci
	movq	%rsp, %rdi
	movl	$4, %esi
	callq	hipMalloc
	movl	%eax, %edi
	movl	$180, %esi
	callq	_ZL11HandleError10hipError_tPKci
	leaq	(%r12,%r13), %rdi
	addq	$-1024, %rdi                    # imm = 0xFC00
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB7_2
# %bb.1:
	movq	8(%rsp), %rcx
	movl	%ebp, %edi
	movq	16(%rsp), %rsi                  # 8-byte Reload
	movl	%r15d, %edx
	callq	_Z33__device_stub__partition_less_numiPiiS_
.LBB7_2:
	leaq	-1023(%r13), %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB7_4
# %bb.3:
	movq	8(%rsp), %rdi
	shll	$10, %r12d
	movq	(%rsp), %rdx
	movl	%r12d, %esi
	callq	_Z25__device_stub__reduce_sumPiiS_
.LBB7_4:
	movq	(%rsp), %rsi
	leaq	36(%rsp), %r12
	movl	$4, %edx
	movq	%r12, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movl	%eax, %edi
	movl	$184, %esi
	callq	_ZL11HandleError10hipError_tPKci
	movq	8(%rsp), %rdi
	callq	hipFree
	movl	%eax, %edi
	movl	$186, %esi
	callq	_ZL11HandleError10hipError_tPKci
	movq	(%rsp), %rdi
	callq	hipFree
	movl	%eax, %edi
	movl	$187, %esi
	callq	_ZL11HandleError10hipError_tPKci
	movslq	(%r12), %rax
	leal	1(%rax), %ecx
	cmpl	%ebx, %ecx
	je	.LBB7_19
# %bb.5:
	testl	%eax, %eax
	je	.LBB7_6
# %bb.7:
	cmpl	%ebx, %ecx
	jge	.LBB7_15
# %bb.8:
	subl	%eax, %ebx
	movl	%r15d, %ecx
	subl	%eax, %ecx
	movslq	%ecx, %rax
	leaq	(,%rax,4), %rcx
	testl	%eax, %eax
	movq	$-1, %rdi
	cmovnsq	%rcx, %rdi
	callq	_Znam
	movq	%rax, %r12
	testl	%r15d, %r15d
	jle	.LBB7_9
# %bb.11:                               # %.lr.ph95.preheader
	movl	%r15d, %eax
	xorl	%edx, %edx
	xorl	%ecx, %ecx
.LBB7_12:                               # %.lr.ph95
                                        # =>This Inner Loop Header: Depth=1
	movl	(%r14,%rdx,4), %esi
	cmpl	%ebp, %esi
	jl	.LBB7_14
# %bb.13:                               #   in Loop: Header=BB7_12 Depth=1
	movslq	%ecx, %rdi
	incl	%ecx
	movl	%esi, (%r12,%rdi,4)
.LBB7_14:                               #   in Loop: Header=BB7_12 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	jne	.LBB7_12
	jmp	.LBB7_10
.LBB7_6:
	movl	%ebx, %edi
	movq	%r14, %rsi
	movq	16(%rsp), %rdx                  # 8-byte Reload
	movl	%r15d, %ecx
	callq	_Z18partition_on_pivotiPiS_i
	movl	%eax, %ebp
	jmp	.LBB7_19
.LBB7_15:
	movq	%rax, %rcx
	shlq	$2, %rcx
	testl	%eax, %eax
	movq	$-1, %rdi
	cmovnsq	%rcx, %rdi
	callq	_Znam
	movq	%rax, %r12
	testl	%r15d, %r15d
	jle	.LBB7_16
# %bb.20:                               # %.lr.ph.preheader
	movl	%r15d, %eax
	xorl	%edx, %edx
	xorl	%ecx, %ecx
.LBB7_21:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movl	(%r14,%rdx,4), %esi
	cmpl	%ebp, %esi
	jge	.LBB7_23
# %bb.22:                               #   in Loop: Header=BB7_21 Depth=1
	movslq	%ecx, %rdi
	incl	%ecx
	movl	%esi, (%r12,%rdi,4)
.LBB7_23:                               #   in Loop: Header=BB7_21 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	jne	.LBB7_21
	jmp	.LBB7_17
.LBB7_9:
	xorl	%ecx, %ecx
.LBB7_10:                               # %._crit_edge96
	movslq	%ecx, %r15
	leaq	(,%r15,4), %r13
	leaq	24(%rsp), %r14
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	hipMalloc
	movl	%eax, %edi
	movl	$205, %esi
	callq	_ZL11HandleError10hipError_tPKci
	movq	(%r14), %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movl	%eax, %edi
	movl	$206, %esi
	callq	_ZL11HandleError10hipError_tPKci
	movq	(%r14), %rdx
	movl	%ebx, %edi
	movq	%r12, %rsi
	movl	%r15d, %ecx
	callq	_Z14nth_order_statiPiS_i
	movl	%eax, %ebp
	movq	%r12, %rdi
	callq	_ZdaPv
	movq	(%r14), %rdi
	callq	hipFree
	movl	%eax, %edi
	movl	$209, %esi
	jmp	.LBB7_18
.LBB7_16:
	xorl	%ecx, %ecx
.LBB7_17:                               # %._crit_edge
	movslq	%ecx, %r15
	leaq	(,%r15,4), %r13
	leaq	24(%rsp), %r14
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	hipMalloc
	movl	%eax, %edi
	movl	$221, %esi
	callq	_ZL11HandleError10hipError_tPKci
	movq	(%r14), %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movl	%eax, %edi
	movl	$222, %esi
	callq	_ZL11HandleError10hipError_tPKci
	movq	(%r14), %rdx
	movl	%ebx, %edi
	movq	%r12, %rsi
	movl	%r15d, %ecx
	callq	_Z14nth_order_statiPiS_i
	movl	%eax, %ebp
	movq	%r12, %rdi
	callq	_ZdaPv
	movq	(%r14), %rdi
	callq	hipFree
	movl	%eax, %edi
	movl	$225, %esi
.LBB7_18:
	callq	_ZL11HandleError10hipError_tPKci
.LBB7_19:
	movl	%ebp, %eax
	addq	$40, %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	_Z18partition_on_pivotiPiS_i, .Lfunc_end7-_Z18partition_on_pivotiPiS_i
	.cfi_endproc
                                        # -- End function
	.type	_ZL11HandleError10hipError_tPKci,@function # -- Begin function _ZL11HandleError10hipError_tPKci
_ZL11HandleError10hipError_tPKci:       # @_ZL11HandleError10hipError_tPKci
	.cfi_startproc
# %bb.0:
	testl	%edi, %edi
	jne	.LBB8_2
# %bb.1:
	retq
.LBB8_2:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movl	%esi, %ebx
	callq	hipGetErrorString
	movl	$.L.str.14, %edi
	movl	$.L.str.6, %edx
	movq	%rax, %rsi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	printf
	movl	$1, %edi
	callq	exit
.Lfunc_end8:
	.size	_ZL11HandleError10hipError_tPKci, .Lfunc_end8-_ZL11HandleError10hipError_tPKci
	.cfi_endproc
                                        # -- End function
	.globl	_Z14nth_order_statiPiS_i        # -- Begin function _Z14nth_order_statiPiS_i
	.type	_Z14nth_order_statiPiS_i,@function
_Z14nth_order_statiPiS_i:               # @_Z14nth_order_statiPiS_i
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%ecx, %ebx
	movq	%rdx, %r14
	movq	%rsi, 40(%rsp)                  # 8-byte Spill
	movl	%edi, %ebp
	leal	1023(%rbx), %eax
	leal	2046(%rbx), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	movabsq	$4294968320, %r13               # imm = 0x100000400
	sarl	$10, %ecx
	cmpl	$1048577, %ebx                  # imm = 0x100001
	movl	$1024, %r12d                    # imm = 0x400
	cmovll	%ecx, %r12d
	movslq	%r12d, %r15
	shlq	$12, %r15
	leaq	24(%rsp), %rdi
	movq	%r15, %rsi
	callq	hipMalloc
	movl	%eax, %edi
	movl	$238, %esi
	callq	_ZL11HandleError10hipError_tPKci
	leaq	16(%rsp), %rdi
	movq	%r15, %rsi
	callq	hipMalloc
	movl	%eax, %edi
	movl	$239, %esi
	callq	_ZL11HandleError10hipError_tPKci
	leaq	8(%rsp), %rdi
	movl	$4, %esi
	callq	hipMalloc
	movl	%eax, %edi
	movl	$240, %esi
	callq	_ZL11HandleError10hipError_tPKci
	movq	%rsp, %rdi
	movl	$4, %esi
	callq	hipMalloc
	movl	%eax, %edi
	movl	$241, %esi
	callq	_ZL11HandleError10hipError_tPKci
	leaq	(%r12,%r13), %rdi
	addq	$-1024, %rdi                    # imm = 0xFC00
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB9_2
# %bb.1:
	movq	24(%rsp), %rdx
	movq	16(%rsp), %rcx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_Z32__device_stub__partition_min_maxPiiS_S_
.LBB9_2:
	leaq	-1023(%r13), %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB9_4
# %bb.3:
	movq	24(%rsp), %rdi
	movq	16(%rsp), %rsi
	shll	$10, %r12d
	movq	8(%rsp), %rcx
	movq	(%rsp), %r8
	movl	%r12d, %edx
	callq	_Z29__device_stub__reduce_min_maxPiS_iS_S_
.LBB9_4:
	movq	8(%rsp), %rsi
	leaq	52(%rsp), %r12
	movl	$4, %edx
	movq	%r12, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movl	%eax, %edi
	movl	$245, %esi
	callq	_ZL11HandleError10hipError_tPKci
	movq	(%rsp), %rsi
	leaq	36(%rsp), %rdi
	movl	$4, %edx
	movl	$2, %ecx
	callq	hipMemcpy
	movl	%eax, %edi
	movl	$246, %esi
	callq	_ZL11HandleError10hipError_tPKci
	movq	24(%rsp), %rdi
	callq	hipFree
	movl	%eax, %edi
	movl	$248, %esi
	callq	_ZL11HandleError10hipError_tPKci
	movq	16(%rsp), %rdi
	callq	hipFree
	movl	%eax, %edi
	movl	$249, %esi
	callq	_ZL11HandleError10hipError_tPKci
	movq	8(%rsp), %rdi
	callq	hipFree
	movl	%eax, %edi
	movl	$250, %esi
	callq	_ZL11HandleError10hipError_tPKci
	movq	(%rsp), %rdi
	callq	hipFree
	movl	%eax, %edi
	movl	$251, %esi
	callq	_ZL11HandleError10hipError_tPKci
	movl	(%r12), %eax
	cmpl	$1, %ebp
	je	.LBB9_8
# %bb.5:
	movl	36(%rsp), %ecx
	cmpl	%eax, %ecx
	je	.LBB9_8
# %bb.6:
	movl	%ecx, %eax
	cmpl	%ebx, %ebp
	je	.LBB9_8
# %bb.7:
	movl	%ebp, %edi
	movq	40(%rsp), %rsi                  # 8-byte Reload
	movq	%r14, %rdx
	movl	%ebx, %ecx
	callq	_Z18partition_on_pivotiPiS_i
.LBB9_8:
	addq	$56, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end9:
	.size	_Z14nth_order_statiPiS_i, .Lfunc_end9-_Z14nth_order_statiPiS_i
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z6medianPii
.LCPI10_0:
	.quad	0x3fe0000000000000              # double 0.5
	.text
	.globl	_Z6medianPii
	.type	_Z6medianPii,@function
_Z6medianPii:                           # @_Z6medianPii
	.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	%rdi, %rbx
	movslq	%esi, %r14
	leaq	(,%r14,4), %r15
	movq	%rsp, %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	hipMalloc
	movq	(%r12), %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	cvtsi2sd	%r14d, %xmm0
	movsd	.LCPI10_0(%rip), %xmm1          # xmm1 = mem[0],zero
	addsd	%xmm1, %xmm0
	mulsd	%xmm1, %xmm0
	cvttsd2si	%xmm0, %edi
	movq	(%r12), %rdx
	movq	%rbx, %rsi
	movl	%r14d, %ecx
	callq	_Z14nth_order_statiPiS_i
	movl	%eax, %ebx
	movq	(%r12), %rdi
	callq	hipFree
	movl	%ebx, %eax
	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_end10:
	.size	_Z6medianPii, .Lfunc_end10-_Z6medianPii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function main
.LCPI11_0:
	.long	0x447a0000                      # float 1000
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0
.LCPI11_1:
	.quad	0x412e848000000000              # double 1.0E+6
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0
.LCPI11_2:
	.zero	16
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
.Lfunc_begin2:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception2
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$96, %rsp
	.cfi_def_cfa_offset 144
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	callq	clock
	movq	%rax, %rbx
	xorps	%xmm0, %xmm0
	leaq	64(%rsp), %rsi
	movaps	%xmm0, (%rsi)
	movq	$0, 16(%rsi)
.Ltmp47:
	movl	$.L.str.7, %edi
	callq	_Z8scan_dirPKcRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE
.Ltmp48:
# %bb.1:
	leaq	32(%rsp), %rsi
	xorps	%xmm0, %xmm0
	movaps	%xmm0, (%rsi)
	movq	$0, 16(%rsi)
.Ltmp50:
	leaq	64(%rsp), %rdi
	callq	_Z9read_dataRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERS_IiSaIiEE
.Ltmp51:
# %bb.2:
	callq	clock
	movq	%rax, %r14
.Ltmp53:
	leaq	16(%rsp), %rdi
	callq	hipEventCreate
.Ltmp54:
# %bb.3:
.Ltmp55:
	leaq	8(%rsp), %rdi
	callq	hipEventCreate
.Ltmp56:
# %bb.4:
	movq	16(%rsp), %rdi
.Ltmp57:
	xorl	%esi, %esi
	callq	hipEventRecord
.Ltmp58:
# %bb.5:
	movq	32(%rsp), %rdi
	movq	40(%rsp), %rsi
	subq	%rdi, %rsi
	shrq	$2, %rsi
.Ltmp60:
                                        # kill: def $esi killed $esi killed $rsi
	callq	_Z6medianPii
.Ltmp61:
# %bb.6:
	movl	%eax, %ebp
	movq	8(%rsp), %rdi
.Ltmp62:
	xorl	%esi, %esi
	callq	hipEventRecord
.Ltmp63:
# %bb.7:
	movq	8(%rsp), %rdi
.Ltmp64:
	callq	hipEventSynchronize
.Ltmp65:
# %bb.8:
	movq	16(%rsp), %rsi
	movq	8(%rsp), %rdx
.Ltmp67:
	leaq	28(%rsp), %rdi
	callq	hipEventElapsedTime
.Ltmp68:
# %bb.9:
	movss	28(%rsp), %xmm0                 # xmm0 = mem[0],zero,zero,zero
	divss	.LCPI11_0(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	movl	$.L.str.8, %edi
	movb	$1, %al
	callq	printf
	callq	clock
	movq	%rax, %r15
.Ltmp70:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.9, %esi
	movl	$8, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp71:
# %bb.10:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
.Ltmp72:
	movl	$_ZSt4cout, %edi
	movl	%ebp, %esi
	callq	_ZNSolsEi
.Ltmp73:
# %bb.11:
	movq	%rax, %r12
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r12, %rdi
.Ltmp74:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp75:
# %bb.12:                               # %.noexc
.Ltmp76:
	movsbl	%al, %esi
	movq	%r12, %rdi
	callq	_ZNSo3putEc
.Ltmp77:
# %bb.13:                               # %.noexc32
.Ltmp78:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp79:
# %bb.14:                               # %_ZNSolsEPFRSoS_E.exit
.Ltmp80:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.10, %esi
	movl	$9, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp81:
# %bb.15:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit19
	movq	%r14, %rax
	subq	%rbx, %rax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	divsd	.LCPI11_1(%rip), %xmm0
.Ltmp82:
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp83:
# %bb.16:                               # %_ZNSolsEd.exit
.Ltmp84:
	movq	%rax, %r12
	movl	$.L.str.11, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp85:
# %bb.17:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit20
	movq	(%r12), %rax
	movq	-24(%rax), %rdi
	addq	%r12, %rdi
.Ltmp86:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp87:
# %bb.18:                               # %.noexc34
.Ltmp88:
	movsbl	%al, %esi
	movq	%r12, %rdi
	callq	_ZNSo3putEc
.Ltmp89:
# %bb.19:                               # %.noexc35
.Ltmp90:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp91:
# %bb.20:                               # %_ZNSolsEPFRSoS_E.exit21
.Ltmp92:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.12, %esi
	movl	$16, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp93:
# %bb.21:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit22
	movq	%r15, %rax
	subq	%r14, %rax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	divsd	.LCPI11_1(%rip), %xmm0
.Ltmp94:
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp95:
# %bb.22:                               # %_ZNSolsEd.exit23
.Ltmp96:
	movq	%rax, %r14
	movl	$.L.str.11, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp97:
# %bb.23:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit24
	movq	(%r14), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
.Ltmp98:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp99:
# %bb.24:                               # %.noexc38
.Ltmp100:
	movsbl	%al, %esi
	movq	%r14, %rdi
	callq	_ZNSo3putEc
.Ltmp101:
# %bb.25:                               # %.noexc39
.Ltmp102:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp103:
# %bb.26:                               # %_ZNSolsEPFRSoS_E.exit25
.Ltmp104:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.13, %esi
	movl	$12, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp105:
# %bb.27:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit26
	subq	%rbx, %r15
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r15, %xmm0
	divsd	.LCPI11_1(%rip), %xmm0
.Ltmp106:
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp107:
# %bb.28:                               # %_ZNSolsEd.exit27
.Ltmp108:
	movq	%rax, %rbx
	movl	$.L.str.11, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp109:
# %bb.29:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit28
	movq	(%rbx), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
.Ltmp110:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp111:
# %bb.30:                               # %.noexc42
.Ltmp112:
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
.Ltmp113:
# %bb.31:                               # %.noexc43
.Ltmp114:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp115:
# %bb.32:                               # %_ZNSolsEPFRSoS_E.exit29
	movq	16(%rsp), %rdi
.Ltmp116:
	callq	hipEventDestroy
.Ltmp117:
# %bb.33:
	movq	8(%rsp), %rdi
.Ltmp118:
	callq	hipEventDestroy
.Ltmp119:
# %bb.34:
	movq	32(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB11_36
# %bb.35:
	callq	_ZdlPv
.LBB11_36:                              # %_ZNSt6vectorIiSaIiEED2Ev.exit
	leaq	64(%rsp), %rdi
	callq	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev
	xorl	%eax, %eax
	addq	$96, %rsp
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB11_41:
	.cfi_def_cfa_offset 144
.Ltmp69:
	jmp	.LBB11_43
.LBB11_38:
.Ltmp52:
	jmp	.LBB11_43
.LBB11_37:
.Ltmp49:
	movq	%rax, %rbx
	jmp	.LBB11_45
.LBB11_40:
.Ltmp66:
	jmp	.LBB11_43
.LBB11_39:
.Ltmp59:
	jmp	.LBB11_43
.LBB11_42:
.Ltmp120:
.LBB11_43:
	movq	%rax, %rbx
	movq	32(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB11_45
# %bb.44:
	callq	_ZdlPv
.LBB11_45:
	leaq	64(%rsp), %rdi
	callq	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end11:
	.size	main, .Lfunc_end11-main
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table11:
.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 .Ltmp47-.Lfunc_begin2          # >> Call Site 1 <<
	.uleb128 .Ltmp48-.Ltmp47                #   Call between .Ltmp47 and .Ltmp48
	.uleb128 .Ltmp49-.Lfunc_begin2          #     jumps to .Ltmp49
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp50-.Lfunc_begin2          # >> Call Site 2 <<
	.uleb128 .Ltmp51-.Ltmp50                #   Call between .Ltmp50 and .Ltmp51
	.uleb128 .Ltmp52-.Lfunc_begin2          #     jumps to .Ltmp52
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp53-.Lfunc_begin2          # >> Call Site 3 <<
	.uleb128 .Ltmp58-.Ltmp53                #   Call between .Ltmp53 and .Ltmp58
	.uleb128 .Ltmp59-.Lfunc_begin2          #     jumps to .Ltmp59
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp60-.Lfunc_begin2          # >> Call Site 4 <<
	.uleb128 .Ltmp65-.Ltmp60                #   Call between .Ltmp60 and .Ltmp65
	.uleb128 .Ltmp66-.Lfunc_begin2          #     jumps to .Ltmp66
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp67-.Lfunc_begin2          # >> Call Site 5 <<
	.uleb128 .Ltmp68-.Ltmp67                #   Call between .Ltmp67 and .Ltmp68
	.uleb128 .Ltmp69-.Lfunc_begin2          #     jumps to .Ltmp69
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp70-.Lfunc_begin2          # >> Call Site 6 <<
	.uleb128 .Ltmp119-.Ltmp70               #   Call between .Ltmp70 and .Ltmp119
	.uleb128 .Ltmp120-.Lfunc_begin2         #     jumps to .Ltmp120
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp119-.Lfunc_begin2         # >> Call Site 7 <<
	.uleb128 .Lfunc_end11-.Ltmp119          #   Call between .Ltmp119 and .Lfunc_end11
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end2:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev,"axG",@progbits,_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev,comdat
	.weak	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev # -- Begin function _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev
	.p2align	1, 0x90
	.type	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev,@function
_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev: # @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	(%rdi), %rbx
	movq	8(%rdi), %r15
	cmpq	%r15, %rbx
	je	.LBB12_6
# %bb.1:                                # %.lr.ph.i.i.i.preheader
	movq	%rdi, %r14
.LBB12_2:                               # %.lr.ph.i.i.i
                                        # =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdi
	addq	$16, %rbx
	cmpq	%rbx, %rdi
	je	.LBB12_4
# %bb.3:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i.i.i
                                        #   in Loop: Header=BB12_2 Depth=1
	callq	_ZdlPv
.LBB12_4:                               # %_ZSt8_DestroyINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEvPT_.exit.i.i.i
                                        #   in Loop: Header=BB12_2 Depth=1
	addq	$16, %rbx
	cmpq	%r15, %rbx
	jne	.LBB12_2
# %bb.5:                                # %_ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EvT_S7_RSaIT0_E.exitthread-pre-split
	movq	(%r14), %rbx
.LBB12_6:                               # %_ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EvT_S7_RSaIT0_E.exit
	testq	%rbx, %rbx
	je	.LBB12_7
# %bb.8:
	movq	%rbx, %rdi
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	_ZdlPv                          # TAILCALL
.LBB12_7:                               # %_ZNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev.exit
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end12:
	.size	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev, .Lfunc_end12-_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev
	.cfi_endproc
                                        # -- 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	.LBB13_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	.LBB13_3
.LBB13_1:                               # %._crit_edge
	movq	(%rbx), %rax
.LBB13_3:
	testq	%r14, %r14
	je	.LBB13_7
# %bb.4:
	cmpq	$1, %r14
	jne	.LBB13_6
# %bb.5:
	movb	(%r15), %cl
	movb	%cl, (%rax)
	jmp	.LBB13_7
.LBB13_6:
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	memcpy@PLT
.LBB13_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_end13:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag, .Lfunc_end13-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_,"axG",@progbits,_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_,comdat
	.weak	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_ # -- Begin function _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_
	.p2align	1, 0x90
	.type	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_,@function
_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_: # @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	cmpq	16(%rdi), %r15
	je	.LBB14_5
# %bb.1:
	leaq	16(%r15), %rdi
	movq	%rdi, (%r15)
	movq	(%r14), %rsi
	leaq	16(%r14), %r12
	cmpq	%r12, %rsi
	je	.LBB14_2
# %bb.3:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i
	movq	%rsi, (%r15)
	movq	(%r12), %rax
	movq	%rax, 16(%r15)
	jmp	.LBB14_4
.LBB14_5:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_
	movq	8(%rbx), %rax
	jmp	.LBB14_6
.LBB14_2:
	movq	8(%r14), %rdx
	incq	%rdx
	callq	memcpy@PLT
.LBB14_4:                               # %_ZNSt16allocator_traitsISaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE9constructIS5_JS5_EEEvRS6_PT_DpOT0_.exit
	movq	8(%r14), %rax
	movq	%rax, 8(%r15)
	movq	%r12, (%r14)
	movq	$0, 8(%r14)
	movb	$0, 16(%r14)
	movq	8(%rbx), %rax
	addq	$32, %rax
	movq	%rax, 8(%rbx)
.LBB14_6:
	addq	$-32, %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_end14:
	.size	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_, .Lfunc_end14-_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_,"axG",@progbits,_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_,comdat
	.weak	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_ # -- Begin function _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_
	.p2align	1, 0x90
	.type	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_,@function
_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_: # @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_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, %rbp
	movq	%rsi, %r12
	movq	%rdi, %r14
	movl	$1, %esi
	movl	$.L.str.19, %edx
	callq	_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_M_check_lenEmPKc
	movq	(%r14), %rcx
	movq	8(%r14), %r15
	movq	%r12, %rbx
	movq	%rcx, (%rsp)                    # 8-byte Spill
	subq	%rcx, %rbx
	sarq	$5, %rbx
	testq	%rax, %rax
	movq	%r14, 8(%rsp)                   # 8-byte Spill
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	je	.LBB15_1
# %bb.2:
	movq	%r14, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8allocateEmPKv
	movq	%rax, %r13
	jmp	.LBB15_3
.LBB15_1:
	xorl	%r13d, %r13d
.LBB15_3:                               # %_ZNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE11_M_allocateEm.exit
	shlq	$5, %rbx
	leaq	(%rbx,%r13), %rdi
	addq	$16, %rdi
	movq	%rdi, -16(%rdi)
	movq	(%rbp), %rsi
	leaq	16(%rbp), %r14
	cmpq	%r14, %rsi
	je	.LBB15_4
# %bb.5:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i
	leaq	(%rbx,%r13), %rax
	movq	%rsi, (%rax)
	movq	(%r14), %rax
	movq	%rax, (%rdi)
	jmp	.LBB15_6
.LBB15_4:
	movq	8(%rbp), %rdx
	incq	%rdx
	callq	memcpy@PLT
.LBB15_6:                               # %_ZNSt16allocator_traitsISaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE9constructIS5_JS5_EEEvRS6_PT_DpOT0_.exit
	movq	8(%rbp), %rax
	movq	%rax, 8(%r13,%rbx)
	movq	%r14, (%rbp)
	movq	$0, 8(%rbp)
	movb	$0, 16(%rbp)
	movq	%r13, %rbp
	movq	(%rsp), %rdi                    # 8-byte Reload
	cmpq	%r12, %rdi
	je	.LBB15_13
# %bb.7:                                # %.lr.ph.i.i.i.preheader
	leaq	16(%r13), %rbp
	leaq	16(%rdi), %rbx
.LBB15_8:                               # %.lr.ph.i.i.i
                                        # =>This Inner Loop Header: Depth=1
	movq	%rbp, -16(%rbp)
	movq	-16(%rbx), %rsi
	cmpq	%rsi, %rbx
	je	.LBB15_9
# %bb.10:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i.i.i.i
                                        #   in Loop: Header=BB15_8 Depth=1
	movq	%rsi, -16(%rbp)
	movq	(%rbx), %rax
	movq	%rax, (%rbp)
	movq	-8(%rbx), %r14
	jmp	.LBB15_11
.LBB15_9:                               #   in Loop: Header=BB15_8 Depth=1
	movq	-8(%rbx), %r14
	leaq	1(%r14), %rdx
	movq	%rbp, %rdi
	callq	memcpy@PLT
.LBB15_11:                              # %_ZSt19__relocate_object_aINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_EEvPT_PT0_RT1_.exit.i.i.i
                                        #   in Loop: Header=BB15_8 Depth=1
	movq	%r14, -8(%rbp)
	movq	%rbx, -16(%rbx)
	movq	$0, -8(%rbx)
	movb	$0, (%rbx)
	addq	$32, %rbp
	leaq	32(%rbx), %rax
	addq	$16, %rbx
	cmpq	%r12, %rbx
	movq	%rax, %rbx
	jne	.LBB15_8
# %bb.12:                               # %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit.loopexit
	addq	$-16, %rbp
	movq	(%rsp), %rdi                    # 8-byte Reload
.LBB15_13:                              # %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit
	cmpq	%r12, %r15
	je	.LBB15_14
# %bb.15:                               # %.lr.ph.i.i.i17.preheader
	addq	$48, %rbp
	addq	$16, %r12
	movq	8(%rsp), %r14                   # 8-byte Reload
.LBB15_16:                              # %.lr.ph.i.i.i17
                                        # =>This Inner Loop Header: Depth=1
	movq	%rbp, -16(%rbp)
	movq	-16(%r12), %rsi
	cmpq	%rsi, %r12
	je	.LBB15_17
# %bb.18:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i.i.i.i20
                                        #   in Loop: Header=BB15_16 Depth=1
	movq	%rsi, -16(%rbp)
	movq	(%r12), %rax
	movq	%rax, (%rbp)
	movq	-8(%r12), %rbx
	jmp	.LBB15_19
.LBB15_17:                              #   in Loop: Header=BB15_16 Depth=1
	movq	-8(%r12), %rbx
	leaq	1(%rbx), %rdx
	movq	%rbp, %rdi
	callq	memcpy@PLT
.LBB15_19:                              # %_ZSt19__relocate_object_aINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_EEvPT_PT0_RT1_.exit.i.i.i23
                                        #   in Loop: Header=BB15_16 Depth=1
	movq	%rbx, -8(%rbp)
	movq	%r12, -16(%r12)
	movq	$0, -8(%r12)
	movb	$0, (%r12)
	addq	$32, %rbp
	leaq	32(%r12), %rax
	addq	$16, %r12
	cmpq	%r15, %r12
	movq	%rax, %r12
	jne	.LBB15_16
# %bb.20:                               # %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit26.loopexit
	addq	$-16, %rbp
	movq	(%rsp), %rdi                    # 8-byte Reload
	jmp	.LBB15_21
.LBB15_14:
	addq	$32, %rbp
	movq	8(%rsp), %r14                   # 8-byte Reload
.LBB15_21:                              # %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit26
	testq	%rdi, %rdi
	je	.LBB15_23
# %bb.22:
	callq	_ZdlPv
.LBB15_23:                              # %_ZNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE13_M_deallocateEPS5_m.exit
	movq	%r13, (%r14)
	movq	%rbp, 8(%r14)
	movq	16(%rsp), %rax                  # 8-byte Reload
	shlq	$5, %rax
	addq	%r13, %rax
	movq	%rax, 16(%r14)
	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_end15:
	.size	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_, .Lfunc_end15-_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_M_check_lenEmPKc,"axG",@progbits,_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_M_check_lenEmPKc,comdat
	.weak	_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_M_check_lenEmPKc # -- Begin function _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_M_check_lenEmPKc
	.p2align	1, 0x90
	.type	_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_M_check_lenEmPKc,@function
_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_M_check_lenEmPKc: # @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_M_check_lenEmPKc
	.cfi_startproc
# %bb.0:
	movabsq	$288230376151711743, %rcx       # imm = 0x3FFFFFFFFFFFFFF
	movq	8(%rdi), %r8
	subq	(%rdi), %r8
	sarq	$5, %r8
	movq	%rcx, %rax
	subq	%r8, %rax
	cmpq	%rsi, %rax
	jb	.LBB16_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
.LBB16_2:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rdx, %rdi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end16:
	.size	_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_M_check_lenEmPKc, .Lfunc_end16-_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_M_check_lenEmPKc
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8allocateEmPKv,"axG",@progbits,_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8allocateEmPKv,comdat
	.weak	_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8allocateEmPKv # -- Begin function _ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8allocateEmPKv
	.p2align	1, 0x90
	.type	_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8allocateEmPKv,@function
_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8allocateEmPKv: # @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8allocateEmPKv
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rsi, %rax
	shrq	$58, %rax
	jne	.LBB17_1
# %bb.3:
	shlq	$5, %rsi
	movq	%rsi, %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB17_1:
	.cfi_def_cfa_offset 16
	shrq	$59, %rsi
	je	.LBB17_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB17_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end17:
	.size	_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8allocateEmPKv, .Lfunc_end17-_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8allocateEmPKv
	.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.19, %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	.LBB18_1
# %bb.2:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorIiE8allocateEmPKv
	movq	%rax, %rbp
	jmp	.LBB18_3
.LBB18_1:
	xorl	%ebp, %ebp
.LBB18_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	.LBB18_5
# %bb.4:
	movq	%rbp, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	memmove@PLT
.LBB18_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	.LBB18_7
# %bb.6:
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	memmove@PLT
.LBB18_7:                               # %_ZNSt6vectorIiSaIiEE11_S_relocateEPiS2_S2_RS0_.exit16
	testq	%r13, %r13
	je	.LBB18_9
# %bb.8:
	movq	%r13, %rdi
	callq	_ZdlPv
.LBB18_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_end18:
	.size	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_, .Lfunc_end18-_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	.LBB19_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
.LBB19_2:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rdx, %rdi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end19:
	.size	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc, .Lfunc_end19-_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	.LBB20_1
# %bb.3:
	shlq	$2, %rsi
	movq	%rsi, %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB20_1:
	.cfi_def_cfa_offset 16
	shrq	$62, %rsi
	je	.LBB20_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB20_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end20:
	.size	_ZNSt15__new_allocatorIiE8allocateEmPKv, .Lfunc_end20-_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	.LBB21_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB21_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z10reduce_sumPiiS_, %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	$_Z14reduce_min_maxPiS_iS_S_, %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	$_Z17partition_min_maxPiiS_S_, %esi
	movl	$.L__unnamed_3, %edx
	movl	$.L__unnamed_3, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z18partition_less_numiPiiS_, %esi
	movl	$.L__unnamed_4, %edx
	movl	$.L__unnamed_4, %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_end21:
	.size	__hip_module_ctor, .Lfunc_end21-__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	.LBB22_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
.LBB22_2:
	retq
.Lfunc_end22:
	.size	__hip_module_dtor, .Lfunc_end22-__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, 2

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

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

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

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

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"loading "
	.size	.L.str.5, 9

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

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

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

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

	.type	.L.str.6,@object                # @.str.6
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.6:
	.asciz	"/home/ubuntu/Datasets/stackv2/train-structured-repos-hip-sm89/liqiang311/oj/master/media/gpu_memcpy.hip"
	.size	.L.str.6, 104

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"./data40M"
	.size	.L.str.7, 10

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"Time on GPU:  %.3f s\n"
	.size	.L.str.8, 22

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

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"IO Time: "
	.size	.L.str.10, 10

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

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"Algorithm Time: "
	.size	.L.str.12, 17

	.type	.L.str.13,@object               # @.str.13
.L.str.13:
	.asciz	"Total Time: "
	.size	.L.str.13, 13

	.type	.L.str.14,@object               # @.str.14
.L.str.14:
	.asciz	"%s in %s at line %d\n"
	.size	.L.str.14, 21

	.type	.L.str.15,@object               # @.str.15
.L.str.15:
	.asciz	"basic_string: construction from null is not valid"
	.size	.L.str.15, 50

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

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z10reduce_sumPiiS_"
	.size	.L__unnamed_1, 20

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z14reduce_min_maxPiS_iS_S_"
	.size	.L__unnamed_2, 28

	.type	.L__unnamed_3,@object           # @2
.L__unnamed_3:
	.asciz	"_Z17partition_min_maxPiiS_S_"
	.size	.L__unnamed_3, 29

	.type	.L__unnamed_4,@object           # @3
.L__unnamed_4:
	.asciz	"_Z18partition_less_numiPiiS_"
	.size	.L__unnamed_4, 29

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

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

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym _Z25__device_stub__reduce_sumPiiS_
	.addrsig_sym _Z29__device_stub__reduce_min_maxPiS_iS_S_
	.addrsig_sym _Z32__device_stub__partition_min_maxPiiS_S_
	.addrsig_sym _Z33__device_stub__partition_less_numiPiiS_
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Unwind_Resume
	.addrsig_sym _ZSt4cout
	.addrsig_sym _Z10reduce_sumPiiS_
	.addrsig_sym _Z14reduce_min_maxPiS_iS_S_
	.addrsig_sym _Z17partition_min_maxPiiS_S_
	.addrsig_sym _Z18partition_less_numiPiiS_
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z10reduce_sumPiiS_     ; -- Begin function _Z10reduce_sumPiiS_
	.globl	_Z10reduce_sumPiiS_
	.p2align	8
	.type	_Z10reduce_sumPiiS_,@function
_Z10reduce_sumPiiS_:                    ; @_Z10reduce_sumPiiS_
; %bb.0:
	s_load_b32 s6, s[0:1], 0x8
	v_dual_mov_b32 v4, 0 :: v_dual_lshlrev_b32 v3, 2, v0
	s_add_u32 s2, s0, 24
	s_addc_u32 s3, s1, 0
	s_mov_b32 s7, exec_lo
	ds_store_b32 v3, v4
	s_waitcnt lgkmcnt(0)
	v_cmpx_gt_i32_e64 s6, v0
	s_cbranch_execz .LBB0_4
; %bb.1:                                ; %.lr.ph
	s_load_b32 s8, s[2:3], 0xc
	s_load_b64 s[4:5], s[0:1], 0x0
	v_mov_b32_e32 v1, v0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s9, s8, 0xffff
	s_mov_b32 s8, 0
.LBB0_2:                                ; =>This Inner Loop Header: Depth=1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v2, 31, v1
	v_lshlrev_b64 v[5:6], 2, v[1:2]
	v_add_nc_u32_e32 v1, s9, v1
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v5, vcc_lo, s4, v5
	v_add_co_ci_u32_e32 v6, vcc_lo, s5, v6, vcc_lo
	s_delay_alu instid0(VALU_DEP_3)
	v_cmp_le_i32_e32 vcc_lo, s6, v1
	global_load_b32 v2, v[5:6], off
	s_or_b32 s8, vcc_lo, s8
	s_waitcnt vmcnt(0)
	v_add_nc_u32_e32 v4, v4, v2
	s_and_not1_b32 exec_lo, exec_lo, s8
	s_cbranch_execnz .LBB0_2
; %bb.3:                                ; %._crit_edge
	s_or_b32 exec_lo, exec_lo, s8
	ds_store_b32 v3, v4
.LBB0_4:                                ; %Flow34
	s_or_b32 exec_lo, exec_lo, s7
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	s_load_b32 s2, s[2:3], 0xc
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_lt_u32 s2, 2
	s_cbranch_scc1 .LBB0_9
; %bb.5:                                ; %.lr.ph25.preheader
	s_lshr_b32 s2, s2, 1
.LBB0_6:                                ; %.lr.ph25
                                        ; =>This Inner Loop Header: Depth=1
	s_mov_b32 s3, exec_lo
	v_cmpx_gt_u32_e64 s2, v0
	s_cbranch_execz .LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	v_lshl_add_u32 v1, s2, 2, v3
	ds_load_b32 v1, v1
	ds_load_b32 v2, v3
	s_waitcnt lgkmcnt(0)
	v_add_nc_u32_e32 v1, v2, v1
	ds_store_b32 v3, v1
.LBB0_8:                                ;   in Loop: Header=BB0_6 Depth=1
	s_or_b32 exec_lo, exec_lo, s3
	s_lshr_b32 s3, s2, 1
	s_cmp_gt_u32 s2, 1
	s_mov_b32 s2, s3
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	s_cbranch_scc1 .LBB0_6
.LBB0_9:                                ; %._crit_edge26
	s_mov_b32 s2, exec_lo
	v_cmpx_eq_u32_e32 0, v0
	s_cbranch_execz .LBB0_11
; %bb.10:
	v_mov_b32_e32 v0, 0
	s_load_b64 s[0:1], s[0:1], 0x10
	ds_load_b32 v1, v0
	s_waitcnt lgkmcnt(0)
	global_store_b32 v0, v1, s[0:1]
.LBB0_11:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z10reduce_sumPiiS_
		.amdhsa_group_segment_fixed_size 4096
		.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 10
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z10reduce_sumPiiS_, .Lfunc_end0-_Z10reduce_sumPiiS_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 376
; NumSgprs: 12
; NumVgprs: 7
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 4096 bytes/workgroup (compile time only)
; SGPRBlocks: 1
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 12
; NumVGPRsForWavesPerEU: 7
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z14reduce_min_maxPiS_iS_S_ ; -- Begin function _Z14reduce_min_maxPiS_iS_S_
	.globl	_Z14reduce_min_maxPiS_iS_S_
	.p2align	8
	.type	_Z14reduce_min_maxPiS_iS_S_,@function
_Z14reduce_min_maxPiS_iS_S_:            ; @_Z14reduce_min_maxPiS_iS_S_
; %bb.0:
	s_load_b32 s8, s[0:1], 0x10
	v_dual_mov_b32 v6, 0x98967f :: v_dual_lshlrev_b32 v3, 2, v0
	v_mov_b32_e32 v5, 0xff676981
	s_add_u32 s2, s0, 40
	s_addc_u32 s3, s1, 0
	s_delay_alu instid0(VALU_DEP_2)
	v_or_b32_e32 v4, 0x1000, v3
	s_mov_b32 s9, exec_lo
	ds_store_2addr_stride64_b32 v3, v5, v6 offset1:16
	s_waitcnt lgkmcnt(0)
	v_cmpx_gt_i32_e64 s8, v0
	s_cbranch_execz .LBB1_4
; %bb.1:                                ; %.lr.ph
	s_load_b32 s10, s[2:3], 0xc
	s_load_b128 s[4:7], s[0:1], 0x0
	v_mov_b32_e32 v1, v0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s11, s10, 0xffff
	s_mov_b32 s10, 0
.LBB1_2:                                ; =>This Inner Loop Header: Depth=1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v2, 31, v1
	v_lshlrev_b64 v[7:8], 2, v[1:2]
	v_add_nc_u32_e32 v1, s11, v1
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v9, vcc_lo, s4, v7
	v_add_co_ci_u32_e32 v10, vcc_lo, s5, v8, vcc_lo
	v_add_co_u32 v7, vcc_lo, s6, v7
	v_add_co_ci_u32_e32 v8, vcc_lo, s7, v8, vcc_lo
	v_cmp_le_i32_e32 vcc_lo, s8, v1
	global_load_b32 v2, v[9:10], off
	global_load_b32 v7, v[7:8], off
	s_or_b32 s10, vcc_lo, s10
	s_waitcnt vmcnt(1)
	v_min_i32_e32 v6, v6, v2
	s_waitcnt vmcnt(0)
	v_max_i32_e32 v5, v5, v7
	s_and_not1_b32 exec_lo, exec_lo, s10
	s_cbranch_execnz .LBB1_2
; %bb.3:                                ; %._crit_edge
	s_or_b32 exec_lo, exec_lo, s10
	ds_store_b32 v4, v6
	ds_store_b32 v3, v5
.LBB1_4:                                ; %Flow64
	s_or_b32 exec_lo, exec_lo, s9
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	s_load_b32 s2, s[2:3], 0xc
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_lt_u32 s2, 2
	s_cbranch_scc1 .LBB1_9
; %bb.5:                                ; %.lr.ph41.preheader
	s_lshr_b32 s2, s2, 1
.LBB1_6:                                ; %.lr.ph41
                                        ; =>This Inner Loop Header: Depth=1
	s_mov_b32 s3, exec_lo
	v_cmpx_gt_u32_e64 s2, v0
	s_cbranch_execz .LBB1_8
; %bb.7:                                ;   in Loop: Header=BB1_6 Depth=1
	s_lshl_b32 s4, s2, 2
	s_delay_alu instid0(SALU_CYCLE_1)
	v_add_nc_u32_e32 v1, s4, v3
	v_add_nc_u32_e32 v2, s4, v4
	ds_load_b32 v5, v4
	ds_load_b32 v1, v1
	ds_load_b32 v2, v2
	ds_load_b32 v6, v3
	s_waitcnt lgkmcnt(1)
	v_min_i32_e32 v2, v5, v2
	s_waitcnt lgkmcnt(0)
	v_max_i32_e32 v1, v6, v1
	ds_store_b32 v4, v2
	ds_store_b32 v3, v1
.LBB1_8:                                ;   in Loop: Header=BB1_6 Depth=1
	s_or_b32 exec_lo, exec_lo, s3
	s_lshr_b32 s3, s2, 1
	s_cmp_gt_u32 s2, 1
	s_mov_b32 s2, s3
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	s_cbranch_scc1 .LBB1_6
.LBB1_9:                                ; %._crit_edge42
	s_mov_b32 s2, exec_lo
	v_cmpx_eq_u32_e32 0, v0
	s_cbranch_execz .LBB1_11
; %bb.10:
	v_mov_b32_e32 v2, 0
	s_load_b128 s[0:3], s[0:1], 0x18
	ds_load_2addr_stride64_b32 v[0:1], v2 offset1:16
	s_waitcnt lgkmcnt(0)
	s_clause 0x1
	global_store_b32 v2, v1, s[0:1]
	global_store_b32 v2, v0, s[2:3]
.LBB1_11:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z14reduce_min_maxPiS_iS_S_
		.amdhsa_group_segment_fixed_size 8192
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 296
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 11
		.amdhsa_next_free_sgpr 12
		.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	_Z14reduce_min_maxPiS_iS_S_, .Lfunc_end1-_Z14reduce_min_maxPiS_iS_S_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 484
; NumSgprs: 14
; NumVgprs: 11
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 8192 bytes/workgroup (compile time only)
; SGPRBlocks: 1
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 14
; NumVGPRsForWavesPerEU: 11
; 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	_Z17partition_min_maxPiiS_S_ ; -- Begin function _Z17partition_min_maxPiiS_S_
	.globl	_Z17partition_min_maxPiiS_S_
	.p2align	8
	.type	_Z17partition_min_maxPiiS_S_,@function
_Z17partition_min_maxPiiS_S_:           ; @_Z17partition_min_maxPiiS_S_
; %bb.0:
	s_clause 0x1
	s_load_b32 s5, s[0:1], 0x2c
	s_load_b32 s4, s[0:1], 0x8
	s_add_u32 s2, s0, 32
	s_addc_u32 s3, s1, 0
	v_mov_b32_e32 v4, 0xff676981
	s_waitcnt lgkmcnt(0)
	s_and_b32 s6, s5, 0xffff
	s_mov_b32 s5, exec_lo
	v_mad_u64_u32 v[1:2], null, s15, s6, v[0:1]
	v_mov_b32_e32 v0, 0x98967f
	s_delay_alu instid0(VALU_DEP_2)
	v_cmpx_gt_i32_e64 s4, v1
	s_cbranch_execz .LBB2_4
; %bb.1:                                ; %.lr.ph
	s_load_b32 s7, s[2:3], 0x0
	s_load_b64 s[2:3], s[0:1], 0x0
	v_mov_b32_e32 v0, 0x98967f
	v_mov_b32_e32 v4, 0xff676981
	v_mov_b32_e32 v2, v1
	s_waitcnt lgkmcnt(0)
	s_mul_i32 s7, s7, s6
	s_mov_b32 s6, 0
.LBB2_2:                                ; =>This Inner Loop Header: Depth=1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v3, 31, v2
	v_lshlrev_b64 v[5:6], 2, v[2:3]
	v_add_nc_u32_e32 v2, s7, v2
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v5, vcc_lo, s2, v5
	v_add_co_ci_u32_e32 v6, vcc_lo, s3, v6, vcc_lo
	s_delay_alu instid0(VALU_DEP_3)
	v_cmp_le_i32_e32 vcc_lo, s4, v2
	global_load_b32 v3, v[5:6], off
	s_or_b32 s6, vcc_lo, s6
	s_waitcnt vmcnt(0)
	v_min_i32_e32 v0, v0, v3
	v_max_i32_e32 v4, v4, v3
	s_and_not1_b32 exec_lo, exec_lo, s6
	s_cbranch_execnz .LBB2_2
; %bb.3:                                ; %Flow
	s_or_b32 exec_lo, exec_lo, s6
.LBB2_4:                                ; %Flow39
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	s_or_b32 exec_lo, exec_lo, s5
	s_load_b128 s[0:3], s[0:1], 0x10
	v_ashrrev_i32_e32 v2, 31, v1
	v_lshlrev_b64 v[1:2], 2, v[1:2]
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v5, vcc_lo, s0, v1
	v_add_co_ci_u32_e32 v6, vcc_lo, s1, v2, vcc_lo
	v_add_co_u32 v1, vcc_lo, s2, v1
	v_add_co_ci_u32_e32 v2, vcc_lo, s3, v2, vcc_lo
	global_store_b32 v[5:6], v0, off
	global_store_b32 v[1:2], v4, off
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z17partition_min_maxPiiS_S_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 288
		.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_end2:
	.size	_Z17partition_min_maxPiiS_S_, .Lfunc_end2-_Z17partition_min_maxPiiS_S_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 300
; 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 : 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	_Z18partition_less_numiPiiS_ ; -- Begin function _Z18partition_less_numiPiiS_
	.globl	_Z18partition_less_numiPiiS_
	.p2align	8
	.type	_Z18partition_less_numiPiiS_,@function
_Z18partition_less_numiPiiS_:           ; @_Z18partition_less_numiPiiS_
; %bb.0:
	s_clause 0x1
	s_load_b32 s4, s[0:1], 0x2c
	s_load_b64 s[8:9], s[0:1], 0x18
	s_add_u32 s2, s0, 32
	s_addc_u32 s3, s1, 0
	s_mov_b32 s5, exec_lo
	s_waitcnt lgkmcnt(0)
	s_and_b32 s6, s4, 0xffff
	s_load_b32 s4, s[0:1], 0x10
	v_mad_u64_u32 v[1:2], null, s15, s6, v[0:1]
	v_mov_b32_e32 v0, 0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v2, 31, v1
	v_lshlrev_b64 v[3:4], 2, v[1:2]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v3, vcc_lo, s8, v3
	v_add_co_ci_u32_e32 v4, vcc_lo, s9, v4, vcc_lo
	global_store_b32 v[3:4], v0, off
	s_waitcnt lgkmcnt(0)
	v_cmpx_gt_i32_e64 s4, v1
	s_cbranch_execz .LBB3_3
; %bb.1:                                ; %.lr.ph
	s_load_b32 s7, s[2:3], 0x0
	s_clause 0x1
	s_load_b32 s5, s[0:1], 0x0
	s_load_b64 s[2:3], s[0:1], 0x8
	s_waitcnt lgkmcnt(0)
	s_mul_i32 s1, s7, s6
	s_mov_b32 s6, 0
.LBB3_2:                                ; =>This Inner Loop Header: Depth=1
	v_ashrrev_i32_e32 v2, 31, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[5:6], 2, v[1:2]
	v_add_nc_u32_e32 v1, s1, v1
	v_add_co_u32 v5, vcc_lo, s2, v5
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e32 v6, vcc_lo, s3, v6, vcc_lo
	v_cmp_le_i32_e32 vcc_lo, s4, v1
	global_load_b32 v2, v[5:6], off
	s_or_b32 s6, vcc_lo, s6
	s_waitcnt vmcnt(0)
	v_cmp_gt_i32_e64 s0, s5, v2
	s_delay_alu instid0(VALU_DEP_1)
	v_add_co_ci_u32_e64 v0, s0, 0, v0, s0
	global_store_b32 v[3:4], v0, off
	s_and_not1_b32 exec_lo, exec_lo, s6
	s_cbranch_execnz .LBB3_2
.LBB3_3:                                ; %Flow20
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z18partition_less_numiPiiS_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 288
		.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_end3:
	.size	_Z18partition_less_numiPiiS_, .Lfunc_end3-_Z18partition_less_numiPiiS_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 264
; 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 : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

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

	.end_amdgpu_metadata
