﻿#include <iostream>
#include <string>
//格式化输入输出
#include <iomanip>
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
//通过文件进行数据的输入输出
#include <fstream>
// 使用字符串流读取文件中的数据
#include <sstream>

/*
   对于本机GTX850M来说，当Threads Per Block = 1024，registers per thread = 32, shared memory per
   blocks(bytes)=1024时可以获得最佳性能。
 */

// #define imin(a, b) (a<b?a:b)

//定义X,Y,Z各维的长度
const int dimX = 10;
const int dimY = 10;
const int dimZ = 10;
const int SIZE = dimX * dimY * dimZ;

//设置每个线程块中线程数量，此处设置三维一样
const int threadPerBlock = 10;

//设置迭代次数
const int times = 90;

//设置stencil边界处邻居的值
__device__ const double BORDER = 0.0;

//生成递增的输入数据
int count = 0;

void debug(int test, std::string str)
{

   if (test != 0) {
      std::cout << "-----------" << str  << "--------------" << std::endl;
      std::cout << test << std::endl;
   }
   else {
      std::cout << "-----------" << str  << "--------------" << std::endl;
   }
}



//设定线程格中线程块的数量, 避免启动过多线程块
int blockPerGrid(const int dim, const int threadPerBlock)
{
   //由于暂时一个线程只计算一个stencil，所以暂时不能指定线程块的限制
   int temp = dim / threadPerBlock;
   if (dim % threadPerBlock != 0) {
      temp += 1; 
   }
   return temp;
}

//错误处理
#define CHECK_ERROR(error) checkCudaError(error, __FILE__, __LINE__)
#define CHECK_STATE(msg) checkCudaState(msg, __FILE__, __LINE__)

inline void checkCudaError(cudaError_t error, const char *file, const int line)
{
   if (error != cudaSuccess) {
      std::cerr << "CUDA CALL FAILED:" << file << "( " << line << ")- " << cudaGetErrorString(error) << std::endl;
      exit(EXIT_FAILURE);
   }
}

inline void checkCudaState(const char *msg, const char *file, const int line)
{
   cudaError_t error = cudaGetLastError();
   if (error != cudaSuccess) {
      std::cerr << "---" << msg << " Error---" << std::endl;
      std::cerr << file << "( " << line << ")- " << cudaGetErrorString(error) << std::endl;
      exit(EXIT_FAILURE);
   }
}

//输出当前使用的设备属性
void print_device(const int id)
{
   cudaDeviceProp props;
   cudaGetDeviceProperties(&props, id);
   std::cout << "---Property of currently device used---" << std::endl;
   std::cout  << "Device " << id <<  ": " << props.name << std::endl;
   std::cout  << "CUDA Capability: " << props.major << "." << props.minor << std::endl;
}

//选择multiprocessor最多的CUDA设备
void setCudaDevice(int id)
{
   int numDevices = 0;
   cudaGetDeviceCount(&numDevices);
   if (numDevices > 1) {
      cudaDeviceProp props;
      cudaGetDeviceProperties(&props, id);
      int maxMultiProcessors = props.multiProcessorCount;
      for (int device=1; device<numDevices; ++device) {
         cudaGetDeviceProperties(&props, device);
         if (maxMultiProcessors < props.multiProcessorCount) {
            maxMultiProcessors = props.multiProcessorCount;
            id = device;
         }
      }
   }
   CHECK_ERROR(cudaSetDevice(id));
   print_device(id);
}

//计算元素的唯一线性偏移，以x为行，y为列，z为高
__device__ __host__ int offset(int x, int y, int z) 
{
   return (((x + dimX) % dimX) + ((y + dimY) % dimY) * dimX + ((z + dimZ) % dimZ) * dimX * dimY);
}

__global__ void kernel(double *dev_grid_in, double *dev_grid_out)
{
   //线程索引
   int x = threadIdx.x + blockIdx.x * blockDim.x;
   int y = threadIdx.y + blockIdx.y * blockDim.y;
   int z = threadIdx.z + blockIdx.z * blockDim.z;

   //使用shared memory存储输入
   __shared__ double cache_in[threadPerBlock * threadPerBlock * threadPerBlock];
   //使用同样的方法将线程块中的线程索引线性化
   int cacheIndex = offset(threadIdx.x, threadIdx.y, threadIdx.z);
   cache_in[cacheIndex] = 0.0;
   __syncthreads();
   cache_in[cacheIndex] = dev_grid_in[offset(x, y, z)];
   __syncthreads();

   //可以考虑通过存储位置来减少register使用
   //   int center = offset(x, y, z);
   //   int up     = offset(x, y, z + 1);
   //   int down   = offset(x, y, z - 1);
   //   int west   = offset(x - 1, y, z);
   //   int east   = offset(x + 1, y, z);
   //   int south  = offset(x, y - 1, z);
   //   int north  = offset(x, y + 1, z);

   //设置stencil中各元素值
   double center = cache_in[offset(threadIdx.x, threadIdx.y, threadIdx.z)];
   double up     = (threadIdx.z < (dimZ - 1)) ? cache_in[offset(threadIdx.x, threadIdx.y, threadIdx.z + 1)] : BORDER;
   double down   = (threadIdx.z > 0) ? cache_in[offset(threadIdx.x, threadIdx.y, threadIdx.z - 1)] : BORDER;
   double west   = (threadIdx.x > 0) ? cache_in[offset(threadIdx.x - 1, threadIdx.y, threadIdx.z)] : BORDER;
   double east   = (threadIdx.x < (dimX - 1)) ? cache_in[offset(threadIdx.x + 1, threadIdx.y, threadIdx.z)] : BORDER;
   double south  = (threadIdx.y > 0) ? cache_in[offset(threadIdx.x, threadIdx.y - 1, threadIdx.z)] : BORDER;
   double north  = (threadIdx.y < (dimY - 1)) ? cache_in[offset(threadIdx.x, threadIdx.y + 1, threadIdx.z)] : BORDER;

   dev_grid_out[offset(x, y, z)] = (center + up + down + west + east + south + north) * (1.0 / 7.0);
}

//初始化输入，输出
void init(double *grid, int dimX, int dimY, int dimZ)
{
   for (int z=0; z<dimZ; ++z) {
      for (int y=0; y<dimY; ++y) {
         for (int x=0; x<dimX; ++x) {
            if ((x*y*z == 0) || (x == dimX-1) || (y == dimY-1) || (z == dimZ-1)) {
               grid[offset(x, y, z)] = 7.0;
            }
            else {
               grid[offset(x, y, z)] = 0.0;
               //      grid[offset(x, y, z)] = count;
            }
            count++;
         }
      }
   }
}

//显示结果
void print(double *grid)
{
   for (int z=0; z<dimZ; ++z) {
      std::cout << z << ":\n\n";
      for (int y=0; y<dimY; ++y) {
         for (int x=0; x<dimX; ++x) {
            std::cout << std::fixed << std::setprecision(3) << grid[offset(x, y, z)] << "\t";
         }
         std::cout << std::endl;
      }
      std::cout << std::endl;
   }
}

//将数据写入到文件
void outFile(double *grid)
{
   unsigned int data_count = 0;
   std::string file_name = "out.txt";
   std::fstream ofile(file_name.c_str(), std::fstream::out);
   if (!ofile){
      std::cout << "Error to open output file: "  << file_name << std::endl;
   }
   else {
      for (int z=0; z<dimZ; ++z) {
         ofile << z << ":\n";
         for (int y=0; y<dimY; ++y) {
            for (int x=0; x<dimX; ++x) {
               ofile << std::fixed << std::setprecision(3) << grid[offset(x, y, z)] << "\t";
               data_count++;
            }
            ofile << std::endl;
         }
         ofile << std::endl;
      }
   }
   ofile.close();
   if (data_count == SIZE) {
      std::cout << "Output " << data_count << " Data Successfully" << std::endl;
   }
   else {
      std::cout << "Error, Output " << data_count << " Data" << std::endl;
   }
}

//从文件中读取数据
double * inFile(double *grid)
{
   unsigned int data_count = 0;
   std::string file_name = "in.txt";
   std::fstream ifile(file_name.c_str(), std::fstream::in);
   if (!ifile){
      std::cout << "Error to open output file: "  << file_name << std::endl;
   }
   else {
      std::string str;
      std::istringstream stream;
      for (int z=0; z<dimZ; ++z) {
         for (int y=0; y<dimY; ++y) {
            getline(ifile, str);
            //跳过空行
            while (str.empty()) {
               getline(ifile, str);
            }
            stream.str(str);
            for (int x=0; x<dimX && !stream.eof(); ++x) {
               stream >> grid[offset(x, y, z)];
               data_count++;
            }
            stream.clear();
            stream.sync();
         }
      }
   }
   ifile.close();
   if (data_count == SIZE) {
      std::cout << "Input " << data_count << " Data Successfully" << std::endl;
   }
   else {
      std::cout << "Error, Input " << data_count << " Data" << std::endl;
   }
   return grid;
}

int main(void)
{
   setCudaDevice(0);
   //此处有1000个数据，所以一共启动1000个线程，一个线程块，使一个线程对应一个数据
   dim3 blocks(threadPerBlock, threadPerBlock, threadPerBlock);
   //此处该方法会浪费大量线程，因为各维的线程块并不相等，导致有些线程块中会有很多空闲线程
   dim3 grids(blockPerGrid(dimX, blocks.x), blockPerGrid(dimY, blocks.y), blockPerGrid(dimZ, blocks.z));

   double *grid_in, *grid_out;
   grid_in = (double *)malloc(SIZE * sizeof(double));
   grid_out = (double *)malloc(SIZE * sizeof(double));

   double *dev_grid_in, *dev_grid_out;
   CHECK_ERROR(cudaMalloc((void**)&dev_grid_in, SIZE * sizeof(double)));
   CHECK_ERROR(cudaMalloc((void**)&dev_grid_out, SIZE * sizeof(double)));

   //初始化输入输出
   //   init(grid_in, dimX, dimY, dimZ);
   //   init(grid_out, dimX, dimY, dimZ);
   inFile(grid_in);

   //   debug(0, "input");
   //   print(grid_in);

   //统计用于GPU计算的时间
   cudaEvent_t start, stop;
   CHECK_ERROR(cudaEventCreate(&start));
   CHECK_ERROR(cudaEventCreate(&stop));
   CHECK_ERROR(cudaEventRecord(start, 0));
   CHECK_ERROR(cudaEventSynchronize(start));

   CHECK_ERROR(cudaMemcpy(dev_grid_in, grid_in, SIZE * sizeof(double), cudaMemcpyHostToDevice));
   CHECK_ERROR(cudaMemcpy(dev_grid_out, grid_out, SIZE * sizeof(double), cudaMemcpyHostToDevice));

   for (int i=0; i<times; ++i) {
      kernel<<<grids, blocks>>>(dev_grid_in, dev_grid_out);
      std::swap(dev_grid_in, dev_grid_out);
   }
   cudaDeviceSynchronize();

   CHECK_STATE("kernel call");

   CHECK_ERROR(cudaMemcpy(grid_in, dev_grid_in, SIZE * sizeof(double), cudaMemcpyDeviceToHost));

   //计算统计的时间
   CHECK_ERROR(cudaEventRecord(stop, 0));
   CHECK_ERROR(cudaEventSynchronize(stop));
   float elapsedTime;
   CHECK_ERROR(cudaEventElapsedTime(&elapsedTime, start, stop));

   //   debug(0, "output");
   //   print(grid_in);
   outFile(grid_in);

   std::cout << "Time elapsed: " << std::fixed << std::setprecision(6) << elapsedTime << " ms"  << std::endl;

   CHECK_ERROR(cudaEventDestroy(start));
   CHECK_ERROR(cudaEventDestroy(stop));

   free(grid_in);
   free(grid_out);
   CHECK_ERROR(cudaFree(dev_grid_in));
   CHECK_ERROR(cudaFree(dev_grid_out));
   return 0;
}



	.file	"tmpxft_0028c5f8_00000000-6_7_point_stencil_jacobi3d_Optimize.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.section	.text._ZSt5fixedRSt8ios_base,"axG",@progbits,_ZSt5fixedRSt8ios_base,comdat
	.weak	_ZSt5fixedRSt8ios_base
	.type	_ZSt5fixedRSt8ios_base, @function
_ZSt5fixedRSt8ios_base:
.LFB3285:
	.cfi_startproc
	endbr64
	movl	24(%rdi), %edx
	movq	%rdi, %rax
	andl	$-261, %edx
	orl	$4, %edx
	movl	%edx, 24(%rdi)
	ret
	.cfi_endproc
.LFE3285:
	.size	_ZSt5fixedRSt8ios_base, .-_ZSt5fixedRSt8ios_base
	.text
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4021:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4021:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.type	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE.isra.0, @function
_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE.isra.0:
.LFB4787:
	.cfi_startproc
	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	(%rdi), %rax
	movq	-24(%rax), %rax
	movq	240(%rdi,%rax), %rbx
	testq	%rbx, %rbx
	jne	.L4
	call	_ZSt16__throw_bad_castv@PLT
.L4:
	cmpb	$0, 56(%rbx)
	movq	%rdi, %rbp
	movq	%rsi, %r12
	je	.L5
	movb	67(%rbx), %al
	jmp	.L6
.L5:
	movq	%rbx, %rdi
	call	_ZNKSt5ctypeIcE13_M_widen_initEv@PLT
	movq	(%rbx), %rax
	movl	$10, %esi
	movq	%rbx, %rdi
	call	*48(%rax)
.L6:
	popq	%rbx
	.cfi_def_cfa_offset 24
	movq	%r12, %rsi
	movq	%rbp, %rdi
	movsbl	%al, %edx
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	jmp	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_@PLT
	.cfi_endproc
.LFE4787:
	.size	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE.isra.0, .-_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE.isra.0
	.align 2
	.type	_ZNSolsEPFRSoS_E.isra.0, @function
_ZNSolsEPFRSoS_E.isra.0:
.LFB4789:
	.cfi_startproc
	jmp	*%rsi
	.cfi_endproc
.LFE4789:
	.size	_ZNSolsEPFRSoS_E.isra.0, .-_ZNSolsEPFRSoS_E.isra.0
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"-----------"
.LC1:
	.string	"--------------"
	.text
	.globl	_Z5debugiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.type	_Z5debugiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, @function
_Z5debugiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
.LFB4005:
	.cfi_startproc
	endbr64
	testl	%edi, %edi
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	_ZSt4cout(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rsi, %rbx
	leaq	.LC0(%rip), %rsi
	pushq	%rdx
	.cfi_def_cfa_offset 48
	je	.L11
	movl	%edi, %ebp
	movq	%r13, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rbx, %rsi
	movq	%rax, %rdi
	call	_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	%r12, %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movl	%ebp, %esi
	movq	%r13, %rdi
	call	_ZNSolsEi@PLT
	jmp	.L13
.L11:
	movq	%r13, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rbx, %rsi
	movq	%rax, %rdi
	call	_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	%r12, %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
.L13:
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	popq	%rax
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	jmp	_ZNSolsEPFRSoS_E.isra.0
	.cfi_endproc
.LFE4005:
	.size	_Z5debugiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, .-_Z5debugiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.globl	_Z12blockPerGridii
	.type	_Z12blockPerGridii, @function
_Z12blockPerGridii:
.LFB4006:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	cltd
	idivl	%esi
	cmpl	$1, %edx
	sbbl	$-1, %eax
	ret
	.cfi_endproc
.LFE4006:
	.size	_Z12blockPerGridii, .-_Z12blockPerGridii
	.section	.rodata._Z14checkCudaError9cudaErrorPKci.str1.1,"aMS",@progbits,1
.LC2:
	.string	"CUDA CALL FAILED:"
.LC3:
	.string	"( "
.LC4:
	.string	")- "
	.section	.text._Z14checkCudaError9cudaErrorPKci,"axG",@progbits,_Z14checkCudaError9cudaErrorPKci,comdat
	.weak	_Z14checkCudaError9cudaErrorPKci
	.type	_Z14checkCudaError9cudaErrorPKci, @function
_Z14checkCudaError9cudaErrorPKci:
.LFB4007:
	.cfi_startproc
	endbr64
	testl	%edi, %edi
	je	.L18
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rsi, %r12
	leaq	.LC2(%rip), %rsi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movl	%edx, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	%edi, %ebx
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%r12, %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC3(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	%ebp, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	leaq	.LC4(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	%ebx, %edi
	movq	%rax, %rbp
	call	cudaGetErrorString@PLT
	movq	%rbp, %rdi
	movq	%rax, %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
	movl	$1, %edi
	call	exit@PLT
.L18:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	ret
	.cfi_endproc
.LFE4007:
	.size	_Z14checkCudaError9cudaErrorPKci, .-_Z14checkCudaError9cudaErrorPKci
	.section	.rodata._Z14checkCudaStatePKcS0_i.str1.1,"aMS",@progbits,1
.LC5:
	.string	"---"
.LC6:
	.string	" Error---"
	.section	.text._Z14checkCudaStatePKcS0_i,"axG",@progbits,_Z14checkCudaStatePKcS0_i,comdat
	.weak	_Z14checkCudaStatePKcS0_i
	.type	_Z14checkCudaStatePKcS0_i, @function
_Z14checkCudaStatePKcS0_i:
.LFB4008:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movq	%rdi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movq	%rsi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movl	%edx, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	cudaGetLastError@PLT
	testl	%eax, %eax
	je	.L23
	leaq	_ZSt4cerr(%rip), %r13
	leaq	.LC5(%rip), %rsi
	movl	%eax, %ebx
	movq	%r13, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%r14, %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC6(%rip), %rsi
	movq	%rax, %rdi
	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	%r12, %rsi
	movq	%r13, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC3(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	%ebp, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	leaq	.LC4(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	%ebx, %edi
	movq	%rax, %rbp
	call	cudaGetErrorString@PLT
	movq	%rbp, %rdi
	movq	%rax, %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
	movl	$1, %edi
	call	exit@PLT
.L23:
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4008:
	.size	_Z14checkCudaStatePKcS0_i, .-_Z14checkCudaStatePKcS0_i
	.section	.rodata.str1.1
.LC7:
	.string	"---Property of currently device used---"
.LC8:
	.string	"Device "
.LC9:
	.string	": "
.LC10:
	.string	"CUDA Capability: "
.LC11:
	.string	"."
	.text
	.globl	_Z12print_devicei
	.type	_Z12print_devicei, @function
_Z12print_devicei:
.LFB4009:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	%edi, %esi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	_ZSt4cout(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	%edi, %ebx
	subq	$1040, %rsp
	.cfi_def_cfa_offset 1072
	movq	%fs:40, %rax
	movq	%rax, 1032(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r12
	movq	%r12, %rdi
	call	cudaGetDeviceProperties_v2@PLT
	leaq	.LC7(%rip), %rsi
	movq	%rbp, %rdi
	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	.LC8(%rip), %rsi
	movq	%rbp, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	%ebx, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	leaq	.LC9(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%r12, %rsi
	movq	%rax, %rdi
	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	.LC10(%rip), %rsi
	movq	%rbp, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	360(%rsp), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	leaq	.LC11(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	364(%rsp), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	1032(%rsp), %rax
	subq	%fs:40, %rax
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	addq	$1040, %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
.LFE4009:
	.size	_Z12print_devicei, .-_Z12print_devicei
	.section	.rodata.str1.1
.LC12:
	.string	"/home/ubuntu/Datasets/stackv2/train-structured/blueyi/stencil_computation_sample/master/7_point_stencil_jacobi3d_Optimize.cu"
	.text
	.globl	_Z13setCudaDevicei
	.type	_Z13setCudaDevicei, @function
_Z13setCudaDevicei:
.LFB4010:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movl	%edi, %ebx
	subq	$1064, %rsp
	.cfi_def_cfa_offset 1104
	movq	%fs:40, %rax
	movq	%rax, 1048(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdi
	xorl	%eax, %eax
	movl	%eax, 12(%rsp)
	call	cudaGetDeviceCount@PLT
	cmpl	$1, 12(%rsp)
	jle	.L30
	leaq	16(%rsp), %r13
	movl	%ebx, %esi
	movl	$1, %ebp
	movq	%r13, %rdi
	call	cudaGetDeviceProperties_v2@PLT
	movl	404(%rsp), %r12d
.L31:
	cmpl	%ebp, 12(%rsp)
	jle	.L30
	movl	%ebp, %esi
	movq	%r13, %rdi
	call	cudaGetDeviceProperties_v2@PLT
	movl	404(%rsp), %eax
	cmpl	%r12d, %eax
	jg	.L35
	movl	%r12d, %eax
	jmp	.L32
.L35:
	movl	%ebp, %ebx
.L32:
	incl	%ebp
	movl	%eax, %r12d
	jmp	.L31
.L30:
	movl	%ebx, %edi
	call	cudaSetDevice@PLT
	movl	$111, %edx
	leaq	.LC12(%rip), %rsi
	movl	%eax, %edi
	call	_Z14checkCudaError9cudaErrorPKci
	movl	%ebx, %edi
	call	_Z12print_devicei
	movq	1048(%rsp), %rax
	subq	%fs:40, %rax
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	addq	$1064, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4010:
	.size	_Z13setCudaDevicei, .-_Z13setCudaDevicei
	.globl	_Z6offsetiii
	.type	_Z6offsetiii, @function
_Z6offsetiii:
.LFB4011:
	.cfi_startproc
	endbr64
	leal	10(%rsi), %eax
	movl	$10, %r8d
	movl	%edx, %r9d
	cltd
	idivl	%r8d
	leal	10(%rdi), %eax
	imull	$10, %edx, %ecx
	cltd
	idivl	%r8d
	leal	10(%r9), %eax
	addl	%edx, %ecx
	cltd
	idivl	%r8d
	imull	$100, %edx, %edx
	leal	(%rcx,%rdx), %eax
	ret
	.cfi_endproc
.LFE4011:
	.size	_Z6offsetiii, .-_Z6offsetiii
	.globl	_Z4initPdiii
	.type	_Z4initPdiii, @function
_Z4initPdiii:
.LFB4012:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leal	-1(%rsi), %eax
	movl	%ecx, %r10d
	movq	%rdi, %r11
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%esi, %r15d
	xorl	%ecx, %ecx
	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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%edx, %ebx
	subq	$16, %rsp
	.cfi_def_cfa_offset 72
	movl	count(%rip), %ebp
	movsd	.LC13(%rip), %xmm0
	movl	%eax, 8(%rsp)
	leal	-1(%rdx), %eax
	movl	%eax, 12(%rsp)
.L39:
	cmpl	%r10d, %r14d
	jge	.L45
	leal	-1(%r10), %eax
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	movl	%eax, 4(%rsp)
.L46:
	cmpl	%ebx, %esi
	jge	.L56
	xorl	%r13d, %r13d
	xorl	%edi, %edi
.L44:
	cmpl	%r15d, %edi
	jge	.L57
	testl	%r13d, %r13d
	je	.L40
	cmpl	%edi, 8(%rsp)
	je	.L40
	cmpl	%esi, 12(%rsp)
	je	.L40
	cmpl	%r14d, 4(%rsp)
	jne	.L41
.L40:
	movl	%r14d, %edx
	call	_Z6offsetiii
	cltq
	movsd	%xmm0, (%r11,%rax,8)
	jmp	.L42
.L41:
	movl	%r14d, %edx
	call	_Z6offsetiii
	cltq
	movq	$0x000000000, (%r11,%rax,8)
.L42:
	incl	%edi
	addl	%r12d, %r13d
	movb	$1, %cl
	jmp	.L44
.L57:
	xorl	%eax, %eax
	testl	%r15d, %r15d
	cmovns	%r15d, %eax
	incl	%esi
	addl	%r14d, %r12d
	addl	%eax, %ebp
	jmp	.L46
.L56:
	incl	%r14d
	jmp	.L39
.L45:
	testb	%cl, %cl
	je	.L38
	movl	%ebp, count(%rip)
.L38:
	addq	$16, %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
.LFE4012:
	.size	_Z4initPdiii, .-_Z4initPdiii
	.section	.rodata.str1.1
.LC15:
	.string	":\n\n"
.LC16:
	.string	"\t"
	.text
	.globl	_Z5printPd
	.type	_Z5printPd, @function
_Z5printPd:
.LFB4013:
	.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	%rdi, %r14
	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
	leaq	_ZSt4cout(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	pushq	%rdx
	.cfi_def_cfa_offset 64
.L62:
	movl	%ebx, %esi
	movq	%rbp, %rdi
	leaq	_ZSt5fixedRSt8ios_base(%rip), %r15
	xorl	%r13d, %r13d
	call	_ZNSolsEi@PLT
	leaq	.LC15(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
.L59:
	xorl	%r12d, %r12d
.L60:
	movq	%r15, %rsi
	movq	%rbp, %rdi
	call	_ZNSolsEPFRSt8ios_baseS0_E@PLT
	movl	%ebx, %edx
	movl	%r13d, %esi
	movl	%r12d, %edi
	movq	%rax, %r10
	movq	(%rax), %rax
	incl	%r12d
	movq	-24(%rax), %rax
	movq	$3, 8(%r10,%rax)
	call	_Z6offsetiii
	movq	%r10, %rdi
	cltq
	movsd	(%r14,%rax,8), %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	leaq	.LC16(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	cmpl	$10, %r12d
	jne	.L60
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rbp, %rdi
	incl	%r13d
	call	_ZNSolsEPFRSoS_E.isra.0
	cmpl	$10, %r13d
	jne	.L59
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rbp, %rdi
	incl	%ebx
	call	_ZNSolsEPFRSoS_E.isra.0
	cmpl	$10, %ebx
	jne	.L62
	popq	%rax
	.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
.LFE4013:
	.size	_Z5printPd, .-_Z5printPd
	.globl	_Z27__device_stub__Z6kernelPdS_PdS_
	.type	_Z27__device_stub__Z6kernelPdS_PdS_, @function
_Z27__device_stub__Z6kernelPdS_PdS_:
.LFB4043:
	.cfi_startproc
	endbr64
	subq	$120, %rsp
	.cfi_def_cfa_offset 128
	movq	%rdi, 8(%rsp)
	leaq	32(%rsp), %rcx
	leaq	24(%rsp), %rdx
	movq	%rsi, (%rsp)
	leaq	40(%rsp), %rdi
	leaq	52(%rsp), %rsi
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rax
	movl	$1, 48(%rsp)
	movq	%rax, 88(%rsp)
	movq	%rsp, %rax
	movq	%rax, 96(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 40(%rsp)
	movq	%rax, 52(%rsp)
	movl	$1, 60(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L66
	pushq	32(%rsp)
	.cfi_def_cfa_offset 136
	leaq	_Z6kernelPdS_(%rip), %rdi
	pushq	32(%rsp)
	.cfi_def_cfa_offset 144
	movq	68(%rsp), %rcx
	movl	76(%rsp), %r8d
	movq	56(%rsp), %rsi
	movl	64(%rsp), %edx
	leaq	104(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 136
	popq	%rdx
	.cfi_def_cfa_offset 128
.L66:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	je	.L68
	call	__stack_chk_fail@PLT
.L68:
	addq	$120, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4043:
	.size	_Z27__device_stub__Z6kernelPdS_PdS_, .-_Z27__device_stub__Z6kernelPdS_PdS_
	.globl	_Z6kernelPdS_
	.type	_Z6kernelPdS_, @function
_Z6kernelPdS_:
.LFB4044:
	.cfi_startproc
	endbr64
	jmp	_Z27__device_stub__Z6kernelPdS_PdS_
	.cfi_endproc
.LFE4044:
	.size	_Z6kernelPdS_, .-_Z6kernelPdS_
	.section	.rodata.str1.1
.LC17:
	.string	"_Z6kernelPdS_"
.LC18:
	.string	"BORDER"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4046:
	.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	.LC17(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z6kernelPdS_(%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	%r8d, %r8d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC18(%rip), %rdx
	movl	$8, %r9d
	leaq	_ZL6BORDER(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	call	__cudaRegisterVar@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	popq	%rax
	.cfi_def_cfa_offset 24
	popq	%rdx
	.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
.LFE4046:
	.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
.LC19:
	.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_:
.LFB4370:
	.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	.L74
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L79
	leaq	.LC19(%rip), %rdi
	call	_ZSt19__throw_logic_errorPKc@PLT
.L74:
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	movq	%rsi, %rbp
	call	strlen@PLT
	movq	%rax, (%rsp)
	leaq	0(%rbp,%rax), %r12
	cmpq	$15, %rax
	jbe	.L76
	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)
.L76:
	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	.L77
.L79:
	call	__stack_chk_fail@PLT
.L77:
	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
.LFE4370:
	.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	.rodata.str1.1
.LC20:
	.string	"out.txt"
.LC21:
	.string	"Error to open output file: "
.LC22:
	.string	":\n"
.LC23:
	.string	"Output "
.LC24:
	.string	" Data Successfully"
.LC25:
	.string	"Error, Output "
.LC26:
	.string	" Data"
	.text
	.globl	_Z7outFilePd
	.type	_Z7outFilePd, @function
_Z7outFilePd:
.LFB4014:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4014
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC20(%rip), %rsi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdi, %r14
	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	$616, %rsp
	.cfi_def_cfa_offset 672
	movq	%fs:40, %rax
	movq	%rax, 600(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	leaq	39(%rsp), %rdx
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
.LEHB0:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE0:
	leaq	72(%rsp), %rax
	movq	40(%rsp), %rsi
	movl	$16, %edx
	movq	%rax, %rdi
	movq	%rax, 16(%rsp)
.LEHB1:
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE1:
	testb	$5, 368(%rsp)
	je	.L92
	leaq	.LC21(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
.LEHB2:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	8(%rsp), %rsi
	movq	%rax, %rdi
	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
	xorl	%ebx, %ebx
	jmp	.L82
.L92:
	leaq	88(%rsp), %rax
	xorl	%ebp, %ebp
	xorl	%ebx, %ebx
	movq	%rax, 24(%rsp)
.L81:
	movq	24(%rsp), %rdi
	movl	%ebp, %esi
	call	_ZNSolsEi@PLT
	movq	%rax, %rdi
	leaq	.LC22(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	xorl	%r13d, %r13d
	leaq	_ZSt5fixedRSt8ios_base(%rip), %r15
.L83:
	xorl	%r12d, %r12d
.L84:
	movq	24(%rsp), %rdi
	movq	%r15, %rsi
	call	_ZNSolsEPFRSt8ios_baseS0_E@PLT
	movq	%rax, %r10
	movq	(%rax), %rax
	movl	%r12d, %edi
	movl	%ebp, %edx
	movl	%r13d, %esi
	movq	-24(%rax), %rax
	movq	$3, 8(%r10,%rax)
	call	_Z6offsetiii
	movq	%r10, %rdi
	cltq
	movsd	(%r14,%rax,8), %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	leaq	.LC16(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leal	1(%r12), %eax
	cmpl	$9, %r12d
	je	.L107
	movl	%eax, %r12d
	jmp	.L84
.L107:
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	24(%rsp), %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	incl	%r13d
	leal	1(%rbx,%r12), %ebx
	cmpl	$10, %r13d
	jne	.L83
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	24(%rsp), %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	incl	%ebp
	cmpl	$10, %ebp
	jne	.L81
.L82:
	movq	16(%rsp), %rdi
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEE5closeEv@PLT
	cmpl	$1000, %ebx
	leaq	_ZSt4cout(%rip), %rdi
	jne	.L86
	leaq	.LC23(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movl	$1000, %esi
	call	_ZNSo9_M_insertImEERSoT_@PLT
	movq	%rax, %rdi
	leaq	.LC24(%rip), %rsi
.L106:
	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	16(%rsp), %rdi
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	8(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	600(%rsp), %rax
	subq	%fs:40, %rax
	je	.L91
	jmp	.L101
.L86:
	leaq	.LC25(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movl	%ebx, %esi
	call	_ZNSo9_M_insertImEERSoT_@PLT
.LEHE2:
	movq	%rax, %rdi
	leaq	.LC26(%rip), %rsi
	jmp	.L106
.L97:
	endbr64
	movq	%rax, %rbx
.L88:
	movq	16(%rsp), %rdi
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L89
.L96:
	endbr64
	movq	%rax, %rbx
.L89:
	movq	8(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	600(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L101
	movq	%rbx, %rdi
.LEHB3:
	call	_Unwind_Resume@PLT
.LEHE3:
.L101:
	call	__stack_chk_fail@PLT
.L91:
	addq	$616, %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
.LFE4014:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA4014:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4014-.LLSDACSB4014
.LLSDACSB4014:
	.uleb128 .LEHB0-.LFB4014
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB4014
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L96-.LFB4014
	.uleb128 0
	.uleb128 .LEHB2-.LFB4014
	.uleb128 .LEHE2-.LEHB2
	.uleb128 .L97-.LFB4014
	.uleb128 0
	.uleb128 .LEHB3-.LFB4014
	.uleb128 .LEHE3-.LEHB3
	.uleb128 0
	.uleb128 0
.LLSDACSE4014:
	.text
	.size	_Z7outFilePd, .-_Z7outFilePd
	.section	.rodata.str1.1
.LC27:
	.string	"in.txt"
.LC28:
	.string	"Input "
.LC29:
	.string	"Error, Input "
	.text
	.globl	_Z6inFilePd
	.type	_Z6inFilePd, @function
_Z6inFilePd:
.LFB4015:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4015
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC27(%rip), %rsi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1032, %rsp
	.cfi_def_cfa_offset 1088
	movq	%fs:40, %rax
	movq	%rax, 1016(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	leaq	39(%rsp), %rdx
	movq	%rax, %rdi
	movq	%rax, 24(%rsp)
.LEHB4:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE4:
	movq	40(%rsp), %rsi
	movl	$8, %edx
	leaq	488(%rsp), %rax
	movq	%rax, %rdi
	movq	%rax, (%rsp)
.LEHB5:
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE5:
	testb	$5, 784(%rsp)
	je	.L109
	leaq	.LC21(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
.LEHB6:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	24(%rsp), %rsi
	movq	%rax, %rdi
	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
.LEHE6:
	xorl	%ebx, %ebx
	jmp	.L110
.L109:
	leaq	88(%rsp), %rax
	movb	$0, 88(%rsp)
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	movq	%rax, 80(%rsp)
	leaq	104(%rsp), %rax
	movq	%rax, 8(%rsp)
	movq	8(%rsp), %rdi
	leaq	72(%rsp), %rax
	movq	%rax, 16(%rsp)
.LEHB7:
	call	_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1Ev@PLT
.LEHE7:
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	leaq	120(%rsp), %r15
.L111:
	xorl	%r12d, %r12d
.L113:
	movq	16(%rsp), %rsi
	movq	(%rsp), %rdi
.LEHB8:
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE.isra.0
	cmpq	$0, 80(%rsp)
	je	.L113
	movq	16(%rsp), %rsi
	movq	%r15, %rdi
	call	_ZNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strERKNS_12basic_stringIcS2_S3_EE@PLT
	xorl	%r14d, %r14d
.L114:
	testb	$2, 256(%rsp)
	jne	.L115
	movl	%r12d, %esi
	movl	%r14d, %edi
	movl	%r13d, %edx
	call	_Z6offsetiii
	movq	8(%rsp), %rdi
	cltq
	leaq	0(%rbp,%rax,8), %rsi
	call	_ZNSi10_M_extractIdEERSiRT_@PLT
	incl	%r14d
	incl	%ebx
	cmpl	$10, %r14d
	jne	.L114
.L115:
	leaq	224(%rsp), %rdi
	xorl	%esi, %esi
	call	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate@PLT
	movq	8(%rsp), %rdi
	call	_ZNSi4syncEv@PLT
.LEHE8:
	incl	%r12d
	cmpl	$10, %r12d
	jne	.L113
	incl	%r13d
	cmpl	$10, %r13d
	jne	.L111
	movq	8(%rsp), %rdi
	call	_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	movq	16(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
.L110:
	movq	(%rsp), %rdi
.LEHB9:
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEE5closeEv@PLT
	cmpl	$1000, %ebx
	leaq	_ZSt4cout(%rip), %rdi
	jne	.L119
	leaq	.LC28(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movl	$1000, %esi
	call	_ZNSo9_M_insertImEERSoT_@PLT
	movq	%rax, %rdi
	leaq	.LC24(%rip), %rsi
.L148:
	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	(%rsp), %rdi
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	24(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	1016(%rsp), %rax
	subq	%fs:40, %rax
	je	.L126
	jmp	.L142
.L119:
	leaq	.LC29(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movl	%ebx, %esi
	call	_ZNSo9_M_insertImEERSoT_@PLT
.LEHE9:
	movq	%rax, %rdi
	leaq	.LC26(%rip), %rsi
	jmp	.L148
.L133:
	endbr64
	movq	%rax, %rbx
.L121:
	movq	8(%rsp), %rdi
	call	_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	jmp	.L122
.L132:
	endbr64
	movq	%rax, %rbx
.L122:
	movq	16(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L123
.L131:
	endbr64
	movq	%rax, %rbx
.L123:
	movq	(%rsp), %rdi
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L124
.L130:
	endbr64
	movq	%rax, %rbx
.L124:
	movq	24(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	1016(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L142
	movq	%rbx, %rdi
.LEHB10:
	call	_Unwind_Resume@PLT
.LEHE10:
.L142:
	call	__stack_chk_fail@PLT
.L126:
	addq	$1032, %rsp
	.cfi_def_cfa_offset 56
	movq	%rbp, %rax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4015:
	.section	.gcc_except_table
.LLSDA4015:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4015-.LLSDACSB4015
.LLSDACSB4015:
	.uleb128 .LEHB4-.LFB4015
	.uleb128 .LEHE4-.LEHB4
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB5-.LFB4015
	.uleb128 .LEHE5-.LEHB5
	.uleb128 .L130-.LFB4015
	.uleb128 0
	.uleb128 .LEHB6-.LFB4015
	.uleb128 .LEHE6-.LEHB6
	.uleb128 .L131-.LFB4015
	.uleb128 0
	.uleb128 .LEHB7-.LFB4015
	.uleb128 .LEHE7-.LEHB7
	.uleb128 .L132-.LFB4015
	.uleb128 0
	.uleb128 .LEHB8-.LFB4015
	.uleb128 .LEHE8-.LEHB8
	.uleb128 .L133-.LFB4015
	.uleb128 0
	.uleb128 .LEHB9-.LFB4015
	.uleb128 .LEHE9-.LEHB9
	.uleb128 .L131-.LFB4015
	.uleb128 0
	.uleb128 .LEHB10-.LFB4015
	.uleb128 .LEHE10-.LEHB10
	.uleb128 0
	.uleb128 0
.LLSDACSE4015:
	.text
	.size	_Z6inFilePd, .-_Z6inFilePd
	.section	.rodata.str1.1
.LC30:
	.string	"kernel call"
.LC31:
	.string	"Time elapsed: "
.LC32:
	.string	" ms"
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB4017:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xorl	%edi, %edi
	movabsq	$42949672970, %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movl	$90, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC12(%rip), %rbx
	subq	$80, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	call	_Z13setCudaDevicei
	movl	$8000, %edi
	movabsq	$4294967297, %rax
	movl	$1, 68(%rsp)
	movq	%rax, 60(%rsp)
	call	malloc@PLT
	movl	$8000, %edi
	movq	%rax, %rbp
	call	malloc@PLT
	leaq	16(%rsp), %rdi
	movl	$8000, %esi
	movq	%rax, %r12
	call	cudaMalloc@PLT
	movl	$275, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14checkCudaError9cudaErrorPKci
	leaq	24(%rsp), %rdi
	movl	$8000, %esi
	call	cudaMalloc@PLT
	movl	$276, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14checkCudaError9cudaErrorPKci
	movq	%rbp, %rdi
	call	_Z6inFilePd
	leaq	32(%rsp), %rdi
	call	cudaEventCreate@PLT
	movl	$288, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14checkCudaError9cudaErrorPKci
	leaq	40(%rsp), %rdi
	call	cudaEventCreate@PLT
	movl	$289, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14checkCudaError9cudaErrorPKci
	movq	32(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movl	$290, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14checkCudaError9cudaErrorPKci
	movq	32(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movl	$291, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14checkCudaError9cudaErrorPKci
	movq	16(%rsp), %rdi
	movl	$1, %ecx
	movq	%rbp, %rsi
	movl	$8000, %edx
	call	cudaMemcpy@PLT
	movl	$293, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14checkCudaError9cudaErrorPKci
	movq	24(%rsp), %rdi
	movl	$1, %ecx
	movq	%r12, %rsi
	movl	$8000, %edx
	call	cudaMemcpy@PLT
	movl	$294, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14checkCudaError9cudaErrorPKci
.L151:
	movq	60(%rsp), %rdi
	movl	68(%rsp), %esi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r14, %rdx
	movl	$10, %ecx
	movq	%r14, 48(%rsp)
	movl	$10, 56(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L150
	movq	24(%rsp), %rsi
	movq	16(%rsp), %rdi
	call	_Z27__device_stub__Z6kernelPdS_PdS_
.L150:
	movq	16(%rsp), %rax
	movq	24(%rsp), %rdx
	movq	%rax, 24(%rsp)
	movq	%rdx, 16(%rsp)
	decl	%r13d
	jne	.L151
	call	cudaDeviceSynchronize@PLT
	movl	$302, %edx
	movq	%rbx, %rsi
	leaq	.LC30(%rip), %rdi
	call	_Z14checkCudaStatePKcS0_i
	movq	16(%rsp), %rsi
	movl	$2, %ecx
	movq	%rbp, %rdi
	movl	$8000, %edx
	call	cudaMemcpy@PLT
	movl	$304, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14checkCudaError9cudaErrorPKci
	movq	40(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movl	$307, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14checkCudaError9cudaErrorPKci
	movq	40(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movl	$308, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14checkCudaError9cudaErrorPKci
	movq	40(%rsp), %rdx
	movq	32(%rsp), %rsi
	leaq	12(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	movl	$310, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14checkCudaError9cudaErrorPKci
	movq	%rbp, %rdi
	call	_Z7outFilePd
	leaq	.LC31(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	_ZSt5fixedRSt8ios_base(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSt8ios_baseS0_E@PLT
	cvtss2sd	12(%rsp), %xmm0
	movq	%rax, %rdi
	movq	(%rax), %rax
	movq	-24(%rax), %rax
	movq	$6, 8(%rdi,%rax)
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	leaq	.LC32(%rip), %rsi
	movq	%rax, %rdi
	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	32(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movl	$318, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14checkCudaError9cudaErrorPKci
	movq	40(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movl	$319, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14checkCudaError9cudaErrorPKci
	movq	%rbp, %rdi
	call	free@PLT
	movq	%r12, %rdi
	call	free@PLT
	movq	16(%rsp), %rdi
	call	cudaFree@PLT
	movl	$323, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14checkCudaError9cudaErrorPKci
	movq	24(%rsp), %rdi
	call	cudaFree@PLT
	movl	$324, %edx
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	_Z14checkCudaError9cudaErrorPKci
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	je	.L152
	call	__stack_chk_fail@PLT
.L152:
	addq	$80, %rsp
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4017:
	.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
	.globl	count
	.bss
	.align 4
	.type	count, @object
	.size	count, 4
count:
	.zero	4
	.section	.rodata
	.align 8
	.type	_ZL6BORDER, @object
	.size	_ZL6BORDER, 8
_ZL6BORDER:
	.zero	8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC13:
	.long	0
	.long	1075576832
	.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 <iostream>
#include <string>
//格式化输入输出
#include <iomanip>
#include "hip/hip_runtime.h"

//通过文件进行数据的输入输出
#include <fstream>
// 使用字符串流读取文件中的数据
#include <sstream>

/*
   对于本机GTX850M来说，当Threads Per Block = 1024，registers per thread = 32, shared memory per
   blocks(bytes)=1024时可以获得最佳性能。
 */

// #define imin(a, b) (a<b?a:b)

//定义X,Y,Z各维的长度
const int dimX = 10;
const int dimY = 10;
const int dimZ = 10;
const int SIZE = dimX * dimY * dimZ;

//设置每个线程块中线程数量，此处设置三维一样
const int threadPerBlock = 10;

//设置迭代次数
const int times = 90;

//设置stencil边界处邻居的值
__device__ const double BORDER = 0.0;

//生成递增的输入数据
int count = 0;

void debug(int test, std::string str)
{

   if (test != 0) {
      std::cout << "-----------" << str  << "--------------" << std::endl;
      std::cout << test << std::endl;
   }
   else {
      std::cout << "-----------" << str  << "--------------" << std::endl;
   }
}



//设定线程格中线程块的数量, 避免启动过多线程块
int blockPerGrid(const int dim, const int threadPerBlock)
{
   //由于暂时一个线程只计算一个stencil，所以暂时不能指定线程块的限制
   int temp = dim / threadPerBlock;
   if (dim % threadPerBlock != 0) {
      temp += 1; 
   }
   return temp;
}

//错误处理
#define CHECK_ERROR(error) checkCudaError(error, __FILE__, __LINE__)
#define CHECK_STATE(msg) checkCudaState(msg, __FILE__, __LINE__)

inline void checkCudaError(hipError_t error, const char *file, const int line)
{
   if (error != hipSuccess) {
      std::cerr << "CUDA CALL FAILED:" << file << "( " << line << ")- " << hipGetErrorString(error) << std::endl;
      exit(EXIT_FAILURE);
   }
}

inline void checkCudaState(const char *msg, const char *file, const int line)
{
   hipError_t error = hipGetLastError();
   if (error != hipSuccess) {
      std::cerr << "---" << msg << " Error---" << std::endl;
      std::cerr << file << "( " << line << ")- " << hipGetErrorString(error) << std::endl;
      exit(EXIT_FAILURE);
   }
}

//输出当前使用的设备属性
void print_device(const int id)
{
   hipDeviceProp_t props;
   hipGetDeviceProperties(&props, id);
   std::cout << "---Property of currently device used---" << std::endl;
   std::cout  << "Device " << id <<  ": " << props.name << std::endl;
   std::cout  << "CUDA Capability: " << props.major << "." << props.minor << std::endl;
}

//选择multiprocessor最多的CUDA设备
void setCudaDevice(int id)
{
   int numDevices = 0;
   hipGetDeviceCount(&numDevices);
   if (numDevices > 1) {
      hipDeviceProp_t props;
      hipGetDeviceProperties(&props, id);
      int maxMultiProcessors = props.multiProcessorCount;
      for (int device=1; device<numDevices; ++device) {
         hipGetDeviceProperties(&props, device);
         if (maxMultiProcessors < props.multiProcessorCount) {
            maxMultiProcessors = props.multiProcessorCount;
            id = device;
         }
      }
   }
   CHECK_ERROR(hipSetDevice(id));
   print_device(id);
}

//计算元素的唯一线性偏移，以x为行，y为列，z为高
__device__ __host__ int offset(int x, int y, int z) 
{
   return (((x + dimX) % dimX) + ((y + dimY) % dimY) * dimX + ((z + dimZ) % dimZ) * dimX * dimY);
}

__global__ void kernel(double *dev_grid_in, double *dev_grid_out)
{
   //线程索引
   int x = threadIdx.x + blockIdx.x * blockDim.x;
   int y = threadIdx.y + blockIdx.y * blockDim.y;
   int z = threadIdx.z + blockIdx.z * blockDim.z;

   //使用shared memory存储输入
   __shared__ double cache_in[threadPerBlock * threadPerBlock * threadPerBlock];
   //使用同样的方法将线程块中的线程索引线性化
   int cacheIndex = offset(threadIdx.x, threadIdx.y, threadIdx.z);
   cache_in[cacheIndex] = 0.0;
   __syncthreads();
   cache_in[cacheIndex] = dev_grid_in[offset(x, y, z)];
   __syncthreads();

   //可以考虑通过存储位置来减少register使用
   //   int center = offset(x, y, z);
   //   int up     = offset(x, y, z + 1);
   //   int down   = offset(x, y, z - 1);
   //   int west   = offset(x - 1, y, z);
   //   int east   = offset(x + 1, y, z);
   //   int south  = offset(x, y - 1, z);
   //   int north  = offset(x, y + 1, z);

   //设置stencil中各元素值
   double center = cache_in[offset(threadIdx.x, threadIdx.y, threadIdx.z)];
   double up     = (threadIdx.z < (dimZ - 1)) ? cache_in[offset(threadIdx.x, threadIdx.y, threadIdx.z + 1)] : BORDER;
   double down   = (threadIdx.z > 0) ? cache_in[offset(threadIdx.x, threadIdx.y, threadIdx.z - 1)] : BORDER;
   double west   = (threadIdx.x > 0) ? cache_in[offset(threadIdx.x - 1, threadIdx.y, threadIdx.z)] : BORDER;
   double east   = (threadIdx.x < (dimX - 1)) ? cache_in[offset(threadIdx.x + 1, threadIdx.y, threadIdx.z)] : BORDER;
   double south  = (threadIdx.y > 0) ? cache_in[offset(threadIdx.x, threadIdx.y - 1, threadIdx.z)] : BORDER;
   double north  = (threadIdx.y < (dimY - 1)) ? cache_in[offset(threadIdx.x, threadIdx.y + 1, threadIdx.z)] : BORDER;

   dev_grid_out[offset(x, y, z)] = (center + up + down + west + east + south + north) * (1.0 / 7.0);
}

//初始化输入，输出
void init(double *grid, int dimX, int dimY, int dimZ)
{
   for (int z=0; z<dimZ; ++z) {
      for (int y=0; y<dimY; ++y) {
         for (int x=0; x<dimX; ++x) {
            if ((x*y*z == 0) || (x == dimX-1) || (y == dimY-1) || (z == dimZ-1)) {
               grid[offset(x, y, z)] = 7.0;
            }
            else {
               grid[offset(x, y, z)] = 0.0;
               //      grid[offset(x, y, z)] = count;
            }
            count++;
         }
      }
   }
}

//显示结果
void print(double *grid)
{
   for (int z=0; z<dimZ; ++z) {
      std::cout << z << ":\n\n";
      for (int y=0; y<dimY; ++y) {
         for (int x=0; x<dimX; ++x) {
            std::cout << std::fixed << std::setprecision(3) << grid[offset(x, y, z)] << "\t";
         }
         std::cout << std::endl;
      }
      std::cout << std::endl;
   }
}

//将数据写入到文件
void outFile(double *grid)
{
   unsigned int data_count = 0;
   std::string file_name = "out.txt";
   std::fstream ofile(file_name.c_str(), std::fstream::out);
   if (!ofile){
      std::cout << "Error to open output file: "  << file_name << std::endl;
   }
   else {
      for (int z=0; z<dimZ; ++z) {
         ofile << z << ":\n";
         for (int y=0; y<dimY; ++y) {
            for (int x=0; x<dimX; ++x) {
               ofile << std::fixed << std::setprecision(3) << grid[offset(x, y, z)] << "\t";
               data_count++;
            }
            ofile << std::endl;
         }
         ofile << std::endl;
      }
   }
   ofile.close();
   if (data_count == SIZE) {
      std::cout << "Output " << data_count << " Data Successfully" << std::endl;
   }
   else {
      std::cout << "Error, Output " << data_count << " Data" << std::endl;
   }
}

//从文件中读取数据
double * inFile(double *grid)
{
   unsigned int data_count = 0;
   std::string file_name = "in.txt";
   std::fstream ifile(file_name.c_str(), std::fstream::in);
   if (!ifile){
      std::cout << "Error to open output file: "  << file_name << std::endl;
   }
   else {
      std::string str;
      std::istringstream stream;
      for (int z=0; z<dimZ; ++z) {
         for (int y=0; y<dimY; ++y) {
            getline(ifile, str);
            //跳过空行
            while (str.empty()) {
               getline(ifile, str);
            }
            stream.str(str);
            for (int x=0; x<dimX && !stream.eof(); ++x) {
               stream >> grid[offset(x, y, z)];
               data_count++;
            }
            stream.clear();
            stream.sync();
         }
      }
   }
   ifile.close();
   if (data_count == SIZE) {
      std::cout << "Input " << data_count << " Data Successfully" << std::endl;
   }
   else {
      std::cout << "Error, Input " << data_count << " Data" << std::endl;
   }
   return grid;
}

int main(void)
{
   setCudaDevice(0);
   //此处有1000个数据，所以一共启动1000个线程，一个线程块，使一个线程对应一个数据
   dim3 blocks(threadPerBlock, threadPerBlock, threadPerBlock);
   //此处该方法会浪费大量线程，因为各维的线程块并不相等，导致有些线程块中会有很多空闲线程
   dim3 grids(blockPerGrid(dimX, blocks.x), blockPerGrid(dimY, blocks.y), blockPerGrid(dimZ, blocks.z));

   double *grid_in, *grid_out;
   grid_in = (double *)malloc(SIZE * sizeof(double));
   grid_out = (double *)malloc(SIZE * sizeof(double));

   double *dev_grid_in, *dev_grid_out;
   CHECK_ERROR(hipMalloc((void**)&dev_grid_in, SIZE * sizeof(double)));
   CHECK_ERROR(hipMalloc((void**)&dev_grid_out, SIZE * sizeof(double)));

   //初始化输入输出
   //   init(grid_in, dimX, dimY, dimZ);
   //   init(grid_out, dimX, dimY, dimZ);
   inFile(grid_in);

   //   debug(0, "input");
   //   print(grid_in);

   //统计用于GPU计算的时间
   hipEvent_t start, stop;
   CHECK_ERROR(hipEventCreate(&start));
   CHECK_ERROR(hipEventCreate(&stop));
   CHECK_ERROR(hipEventRecord(start, 0));
   CHECK_ERROR(hipEventSynchronize(start));

   CHECK_ERROR(hipMemcpy(dev_grid_in, grid_in, SIZE * sizeof(double), hipMemcpyHostToDevice));
   CHECK_ERROR(hipMemcpy(dev_grid_out, grid_out, SIZE * sizeof(double), hipMemcpyHostToDevice));

   for (int i=0; i<times; ++i) {
      kernel<<<grids, blocks>>>(dev_grid_in, dev_grid_out);
      std::swap(dev_grid_in, dev_grid_out);
   }
   hipDeviceSynchronize();

   CHECK_STATE("kernel call");

   CHECK_ERROR(hipMemcpy(grid_in, dev_grid_in, SIZE * sizeof(double), hipMemcpyDeviceToHost));

   //计算统计的时间
   CHECK_ERROR(hipEventRecord(stop, 0));
   CHECK_ERROR(hipEventSynchronize(stop));
   float elapsedTime;
   CHECK_ERROR(hipEventElapsedTime(&elapsedTime, start, stop));

   //   debug(0, "output");
   //   print(grid_in);
   outFile(grid_in);

   std::cout << "Time elapsed: " << std::fixed << std::setprecision(6) << elapsedTime << " ms"  << std::endl;

   CHECK_ERROR(hipEventDestroy(start));
   CHECK_ERROR(hipEventDestroy(stop));

   free(grid_in);
   free(grid_out);
   CHECK_ERROR(hipFree(dev_grid_in));
   CHECK_ERROR(hipFree(dev_grid_out));
   return 0;
}



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

                                        # End of file scope inline assembly
	.globl	_Z5debugiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE # -- Begin function _Z5debugiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.type	_Z5debugiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE,@function
_Z5debugiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: # @_Z5debugiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movq	%rsi, %r14
	movl	%edi, %ebx
	movl	$_ZSt4cout, %edi
	movl	$.L.str, %esi
	movl	$11, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	(%r14), %rsi
	movq	8(%r14), %rdx
	movl	$_ZSt4cout, %edi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	%rax, %r14
	movl	$.L.str.1, %esi
	movl	$14, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	(%r14), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r14, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	testl	%ebx, %ebx
	je	.LBB0_1
# %bb.2:
	movl	$_ZSt4cout, %edi
	movl	%ebx, %esi
	callq	_ZNSolsEi
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	jmp	_ZNSo5flushEv                   # TAILCALL
.LBB0_1:
	.cfi_def_cfa_offset 32
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z5debugiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, .Lfunc_end0-_Z5debugiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.cfi_endproc
                                        # -- End function
	.globl	_Z12blockPerGridii              # -- Begin function _Z12blockPerGridii
	.type	_Z12blockPerGridii,@function
_Z12blockPerGridii:                     # @_Z12blockPerGridii
	.cfi_startproc
# %bb.0:
	movl	%edi, %eax
	cltd
	idivl	%esi
	cmpl	$1, %edx
	sbbl	$-1, %eax
	retq
.Lfunc_end1:
	.size	_Z12blockPerGridii, .Lfunc_end1-_Z12blockPerGridii
	.cfi_endproc
                                        # -- End function
	.globl	_Z12print_devicei               # -- Begin function _Z12print_devicei
	.type	_Z12print_devicei,@function
_Z12print_devicei:                      # @_Z12print_devicei
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	subq	$1472, %rsp                     # imm = 0x5C0
	.cfi_def_cfa_offset 1504
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %rbp, -16
	movl	%edi, %ebp
	movq	%rsp, %rbx
	movq	%rbx, %rdi
	movl	%ebp, %esi
	callq	hipGetDevicePropertiesR0600
	movl	$_ZSt4cout, %r14d
	movl	$_ZSt4cout, %edi
	movl	$.L.str.2, %esi
	movl	$39, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.3, %esi
	movl	$7, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movl	%ebp, %esi
	callq	_ZNSolsEi
	movq	%rax, %r14
	movl	$.L.str.4, %esi
	movl	$2, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	%rbx, %rdi
	callq	strlen
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	(%r14), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r14, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.5, %esi
	movl	$17, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	360(%rbx), %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSolsEi
	movq	%rax, %r14
	movl	$.L.str.6, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	364(%rbx), %esi
	movq	%r14, %rdi
	callq	_ZNSolsEi
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	addq	$1472, %rsp                     # imm = 0x5C0
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end2:
	.size	_Z12print_devicei, .Lfunc_end2-_Z12print_devicei
	.cfi_endproc
                                        # -- End function
	.globl	_Z13setCudaDevicei              # -- Begin function _Z13setCudaDevicei
	.type	_Z13setCudaDevicei,@function
_Z13setCudaDevicei:                     # @_Z13setCudaDevicei
	.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	%rbx
	.cfi_def_cfa_offset 40
	subq	$1480, %rsp                     # imm = 0x5C8
	.cfi_def_cfa_offset 1520
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%edi, %ebx
	leaq	4(%rsp), %r14
	movl	$0, (%r14)
	movq	%r14, %rdi
	callq	hipGetDeviceCount
	cmpl	$2, (%r14)
	jl	.LBB3_4
# %bb.1:
	leaq	8(%rsp), %rdi
	movl	%ebx, %esi
	callq	hipGetDevicePropertiesR0600
	cmpl	$2, 4(%rsp)
	jl	.LBB3_4
# %bb.2:                                # %.lr.ph.preheader
	movl	$1, %ebp
	leaq	8(%rsp), %r14
	movl	388(%r14), %r15d
.LBB3_3:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebp, %esi
	callq	hipGetDevicePropertiesR0600
	movl	396(%rsp), %eax
	cmpl	%eax, %r15d
	cmovll	%ebp, %ebx
	cmovlel	%eax, %r15d
	incl	%ebp
	cmpl	4(%rsp), %ebp
	jl	.LBB3_3
.LBB3_4:
	movl	%ebx, %edi
	callq	hipSetDevice
	testl	%eax, %eax
	jne	.LBB3_6
# %bb.5:                                # %_Z14checkCudaError10hipError_tPKci.exit
	movl	%ebx, %edi
	callq	_Z12print_devicei
	addq	$1480, %rsp                     # imm = 0x5C8
	.cfi_def_cfa_offset 40
	popq	%rbx
	.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
.LBB3_6:
	.cfi_def_cfa_offset 1520
	movl	%eax, %ebp
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.23, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.7, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.24, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	movl	$111, %esi
	callq	_ZNSolsEi
	movl	$.L.str.25, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rbx
	movl	%ebp, %edi
	callq	hipGetErrorString
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	callq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
	movl	$1, %edi
	callq	exit
.Lfunc_end3:
	.size	_Z13setCudaDevicei, .Lfunc_end3-_Z13setCudaDevicei
	.cfi_endproc
                                        # -- End function
	.globl	_Z6offsetiii                    # -- Begin function _Z6offsetiii
	.type	_Z6offsetiii,@function
_Z6offsetiii:                           # @_Z6offsetiii
	.cfi_startproc
# %bb.0:
	addl	$10, %edi
	movslq	%edi, %rax
	imulq	$1717986919, %rax, %rcx         # imm = 0x66666667
	movq	%rcx, %rdi
	shrq	$63, %rdi
	sarq	$34, %rcx
	addl	%edi, %ecx
	addl	%ecx, %ecx
	leal	(%rcx,%rcx,4), %ecx
	subl	%ecx, %eax
	addl	$10, %esi
	movslq	%esi, %rcx
	imulq	$1717986919, %rcx, %rsi         # imm = 0x66666667
	movq	%rsi, %rdi
	shrq	$63, %rdi
	sarq	$34, %rsi
	addl	%edi, %esi
	addl	%esi, %esi
	leal	(%rsi,%rsi,4), %esi
	subl	%esi, %ecx
	leal	(%rcx,%rcx,4), %ecx
	leal	(%rax,%rcx,2), %ecx
	addl	$10, %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rdx         # imm = 0x66666667
	movq	%rdx, %rsi
	shrq	$63, %rsi
	sarq	$34, %rdx
	addl	%esi, %edx
	addl	%edx, %edx
	leal	(%rdx,%rdx,4), %edx
	subl	%edx, %eax
	imull	$100, %eax, %eax
	addl	%ecx, %eax
	retq
.Lfunc_end4:
	.size	_Z6offsetiii, .Lfunc_end4-_Z6offsetiii
	.cfi_endproc
                                        # -- End function
	.globl	_Z21__device_stub__kernelPdS_   # -- Begin function _Z21__device_stub__kernelPdS_
	.type	_Z21__device_stub__kernelPdS_,@function
_Z21__device_stub__kernelPdS_:          # @_Z21__device_stub__kernelPdS_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$80, %rsp
	.cfi_def_cfa_offset 128
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	24(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	16(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	64(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	leaq	48(%rsp), %r14
	leaq	32(%rsp), %r15
	leaq	8(%rsp), %r12
	movq	%rsp, %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z6kernelPdS_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$96, %rsp
	.cfi_adjust_cfa_offset -96
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end5:
	.size	_Z21__device_stub__kernelPdS_, .Lfunc_end5-_Z21__device_stub__kernelPdS_
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z4initPdiii
.LCPI6_0:
	.quad	0x401c000000000000              # double 7
	.text
	.globl	_Z4initPdiii
	.type	_Z4initPdiii,@function
_Z4initPdiii:                           # @_Z4initPdiii
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
                                        # kill: def $ecx killed $ecx def $rcx
                                        # kill: def $edx killed $edx def $rdx
	movq	%rdx, -32(%rsp)                 # 8-byte Spill
	movq	%rcx, -8(%rsp)                  # 8-byte Spill
	testl	%ecx, %ecx
	jle	.LBB6_18
# %bb.1:                                # %.preheader35.lr.ph
	movl	count(%rip), %edx
	movq	-32(%rsp), %rax                 # 8-byte Reload
	leal	-1(%rax), %r8d
	movq	-8(%rsp), %rax                  # 8-byte Reload
	leal	-1(%rax), %r9d
	movl	$1110, %r10d                    # imm = 0x456
	movl	$10, %eax
	movl	$0, -36(%rsp)                   # 4-byte Folded Spill
	movl	$3435973837, %r14d              # imm = 0xCCCCCCCD
	movsd	.LCPI6_0(%rip), %xmm0           # xmm0 = mem[0],zero
	xorl	%ebp, %ebp
	movl	%esi, -16(%rsp)                 # 4-byte Spill
.LBB6_2:                                # %.preheader35
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB6_4 Depth 2
                                        #       Child Loop BB6_6 Depth 3
	cmpl	$0, -32(%rsp)                   # 4-byte Folded Reload
	movl	%r10d, -20(%rsp)                # 4-byte Spill
	movl	%eax, -24(%rsp)                 # 4-byte Spill
	jle	.LBB6_17
# %bb.3:                                # %.preheader.lr.ph
                                        #   in Loop: Header=BB6_2 Depth=1
	movl	%eax, %ecx
	imulq	%r14, %rcx
	shrq	$35, %rcx
	imull	$1000, %ecx, %ecx               # imm = 0x3E8
	subl	%ecx, %r10d
	movl	$10, %r12d
	xorl	%r13d, %r13d
	xorl	%r11d, %r11d
.LBB6_4:                                # %.preheader
                                        #   Parent Loop BB6_2 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB6_6 Depth 3
	testl	%esi, %esi
	jle	.LBB6_16
# %bb.5:                                # %.lr.ph
                                        #   in Loop: Header=BB6_4 Depth=2
	movl	%edx, -12(%rsp)                 # 4-byte Spill
	movl	%r12d, %ecx
	imulq	%r14, %rcx
	shrq	$35, %rcx
	imull	$100, %ecx, %ecx
	movl	%r10d, %r15d
	subl	%ecx, %r15d
	movl	$10, %ecx
	xorl	%ebx, %ebx
.LBB6_6:                                #   Parent Loop BB6_2 Depth=1
                                        #     Parent Loop BB6_4 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movaps	%xmm0, %xmm1
	cmpl	%r9d, %ebp
	je	.LBB6_8
# %bb.7:                                #   in Loop: Header=BB6_6 Depth=3
	xorps	%xmm1, %xmm1
.LBB6_8:                                #   in Loop: Header=BB6_6 Depth=3
	movaps	%xmm0, %xmm2
	cmpl	%r8d, %r11d
	je	.LBB6_10
# %bb.9:                                #   in Loop: Header=BB6_6 Depth=3
	movaps	%xmm1, %xmm2
.LBB6_10:                               #   in Loop: Header=BB6_6 Depth=3
	movaps	%xmm0, %xmm3
	cmpl	$1, %esi
	je	.LBB6_12
# %bb.11:                               #   in Loop: Header=BB6_6 Depth=3
	movaps	%xmm2, %xmm3
.LBB6_12:                               #   in Loop: Header=BB6_6 Depth=3
	movaps	%xmm0, %xmm1
	testl	%ebx, %ebx
	je	.LBB6_14
# %bb.13:                               #   in Loop: Header=BB6_6 Depth=3
	movaps	%xmm3, %xmm1
.LBB6_14:                               #   in Loop: Header=BB6_6 Depth=3
	movl	%ecx, %eax
	imulq	%r14, %rax
	shrq	$35, %rax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %eax
	movl	%r15d, %edx
	subl	%eax, %edx
	movsd	%xmm1, (%rdi,%rdx,8)
	incl	%r15d
	incl	%ecx
	addl	%r13d, %ebx
	decl	%esi
	jne	.LBB6_6
# %bb.15:                               # %._crit_edge
                                        #   in Loop: Header=BB6_4 Depth=2
	movl	-16(%rsp), %esi                 # 4-byte Reload
	movl	-12(%rsp), %edx                 # 4-byte Reload
	addl	%esi, %edx
	movl	%edx, count(%rip)
.LBB6_16:                               #   in Loop: Header=BB6_4 Depth=2
	incl	%r11d
	addl	$10, %r10d
	incl	%r12d
	addl	-36(%rsp), %r13d                # 4-byte Folded Reload
	cmpl	-32(%rsp), %r11d                # 4-byte Folded Reload
	jne	.LBB6_4
.LBB6_17:                               # %._crit_edge42
                                        #   in Loop: Header=BB6_2 Depth=1
	incl	%ebp
	movl	-20(%rsp), %r10d                # 4-byte Reload
	addl	$100, %r10d
	movl	-24(%rsp), %eax                 # 4-byte Reload
	incl	%eax
	decl	-36(%rsp)                       # 4-byte Folded Spill
	cmpl	-8(%rsp), %ebp                  # 4-byte Folded Reload
	jne	.LBB6_2
.LBB6_18:                               # %._crit_edge49
	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_end6:
	.size	_Z4initPdiii, .Lfunc_end6-_Z4initPdiii
	.cfi_endproc
                                        # -- End function
	.globl	_Z5printPd                      # -- Begin function _Z5printPd
	.type	_Z5printPd,@function
_Z5printPd:                             # @_Z5printPd
	.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	%rdi, 16(%rsp)                  # 8-byte Spill
	xorl	%esi, %esi
	movl	$1100, %ebp                     # imm = 0x44C
	movl	$10, %eax
	movl	$-261, %r15d                    # imm = 0xFEFB
.LBB7_1:                                # =>This Loop Header: Depth=1
                                        #     Child Loop BB7_2 Depth 2
                                        #       Child Loop BB7_3 Depth 3
	movl	%eax, (%rsp)                    # 4-byte Spill
	movl	%eax, %eax
	movl	$3435973837, %ecx               # imm = 0xCCCCCCCD
	imulq	%rcx, %rax
	shrq	$35, %rax
	imull	$1000, %eax, %eax               # imm = 0x3E8
	movl	%ebp, 4(%rsp)                   # 4-byte Spill
	subl	%eax, %ebp
	movl	$_ZSt4cout, %edi
	movq	%rsi, 8(%rsp)                   # 8-byte Spill
                                        # kill: def $esi killed $esi killed $rsi
	callq	_ZNSolsEi
	movl	$.L.str.8, %esi
	movl	$3, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$10, %r14d
	xorl	%r12d, %r12d
.LBB7_2:                                # %.preheader
                                        #   Parent Loop BB7_1 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB7_3 Depth 3
	movl	%r14d, %eax
	movl	$3435973837, %ecx               # imm = 0xCCCCCCCD
	imulq	%rcx, %rax
	shrq	$35, %rax
	imull	$100, %eax, %eax
	movl	%ebp, %ecx
	subl	%eax, %ecx
	movq	16(%rsp), %rax                  # 8-byte Reload
	leaq	(%rax,%rcx,8), %r13
	xorl	%ebx, %ebx
.LBB7_3:                                #   Parent Loop BB7_1 Depth=1
                                        #     Parent Loop BB7_2 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rcx
	movl	_ZSt4cout+24(%rcx), %edx
	andl	%r15d, %edx
	orl	$4, %edx
	movl	%edx, _ZSt4cout+24(%rcx)
	movq	-24(%rax), %rax
	movq	$3, _ZSt4cout+8(%rax)
	movsd	(%r13,%rbx,8), %xmm0            # xmm0 = mem[0],zero
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
	movl	$.L.str.9, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	incq	%rbx
	cmpq	$10, %rbx
	jne	.LBB7_3
# %bb.4:                                #   in Loop: Header=BB7_2 Depth=2
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	movl	$_ZSt4cout, %eax
	addq	%rax, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	incl	%r12d
	addl	$10, %ebp
	incl	%r14d
	cmpl	$10, %r12d
	jne	.LBB7_2
# %bb.5:                                #   in Loop: Header=BB7_1 Depth=1
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	movl	$_ZSt4cout, %eax
	addq	%rax, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movq	8(%rsp), %rsi                   # 8-byte Reload
	incl	%esi
	movl	4(%rsp), %ebp                   # 4-byte Reload
	addl	$100, %ebp
	movl	(%rsp), %eax                    # 4-byte Reload
	incl	%eax
	cmpl	$10, %esi
	jne	.LBB7_1
# %bb.6:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end7:
	.size	_Z5printPd, .Lfunc_end7-_Z5printPd
	.cfi_endproc
                                        # -- End function
	.globl	_Z7outFilePd                    # -- Begin function _Z7outFilePd
	.type	_Z7outFilePd,@function
_Z7outFilePd:                           # @_Z7outFilePd
.Lfunc_begin0:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception0
# %bb.0:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit
	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	$600, %rsp                      # imm = 0x258
	.cfi_def_cfa_offset 656
	.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, 32(%rsp)                  # 8-byte Spill
	leaq	56(%rsp), %rax
	movq	%rax, -16(%rax)
	leaq	40(%rsp), %r14
	movl	$.L.str.10, %esi
	movl	$.L.str.10+7, %edx
	movq	%r14, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	movq	(%r14), %rsi
.Ltmp0:
	leaq	72(%rsp), %rdi
	movl	$16, %edx
	callq	_ZNSt13basic_fstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
.Ltmp1:
# %bb.1:
	movq	72(%rsp), %rax
	movq	-24(%rax), %rax
	movl	104(%rsp,%rax), %ebp
	testb	$5, %bpl
	je	.LBB8_2
# %bb.19:
.Ltmp3:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.11, %esi
	movl	$27, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp4:
# %bb.20:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
	movq	40(%rsp), %rsi
	movq	48(%rsp), %rdx
.Ltmp5:
	movl	$_ZSt4cout, %edi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp6:
# %bb.21:                               # %_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE.exit
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
.Ltmp7:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp8:
# %bb.22:                               # %.noexc
.Ltmp9:
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
.Ltmp10:
# %bb.23:                               # %.noexc48
.Ltmp11:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp12:
# %bb.24:
	xorl	%ebx, %ebx
	jmp	.LBB8_25
.LBB8_2:                                # %.preheader66
	movl	%ebp, 8(%rsp)                   # 4-byte Spill
	xorl	%esi, %esi
	movl	$1100, %r13d                    # imm = 0x44C
	movl	$10, %ebx
	leaq	88(%rsp), %r15
	movl	$-261, %r12d                    # imm = 0xFEFB
.LBB8_3:                                # =>This Loop Header: Depth=1
                                        #     Child Loop BB8_6 Depth 2
                                        #       Child Loop BB8_7 Depth 3
.Ltmp13:
	movq	%r15, %rdi
	movq	%rsi, 24(%rsp)                  # 8-byte Spill
                                        # kill: def $esi killed $esi killed $rsi
	callq	_ZNSolsEi
.Ltmp14:
# %bb.4:                                #   in Loop: Header=BB8_3 Depth=1
.Ltmp15:
	movl	$.L.str.12, %esi
	movl	$2, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp16:
# %bb.5:                                # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit34.preheader
                                        #   in Loop: Header=BB8_3 Depth=1
	movl	%ebx, 12(%rsp)                  # 4-byte Spill
	movl	%ebx, %eax
	movl	$3435973837, %ecx               # imm = 0xCCCCCCCD
	imulq	%rcx, %rax
	shrq	$35, %rax
	imull	$1000, %eax, %eax               # imm = 0x3E8
	movl	%r13d, 16(%rsp)                 # 4-byte Spill
	subl	%eax, %r13d
	xorl	%ebx, %ebx
	movl	$10, %ebp
.LBB8_6:                                # %.preheader
                                        #   Parent Loop BB8_3 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB8_7 Depth 3
	movl	%ebx, 20(%rsp)                  # 4-byte Spill
	movl	%ebp, %eax
	movl	$3435973837, %ecx               # imm = 0xCCCCCCCD
	imulq	%rcx, %rax
	shrq	$35, %rax
	imull	$100, %eax, %eax
	movl	%r13d, %ecx
	subl	%eax, %ecx
	movq	32(%rsp), %rax                  # 8-byte Reload
	leaq	(%rax,%rcx,8), %rbx
	xorl	%r14d, %r14d
.LBB8_7:                                #   Parent Loop BB8_3 Depth=1
                                        #     Parent Loop BB8_6 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movq	88(%rsp), %rax
	movq	-24(%rax), %rcx
	movl	112(%rsp,%rcx), %edx
	andl	%r12d, %edx
	orl	$4, %edx
	movl	%edx, 112(%rsp,%rcx)
	movq	-24(%rax), %rax
	movq	$3, 96(%rsp,%rax)
	movsd	(%rbx,%r14,8), %xmm0            # xmm0 = mem[0],zero
.Ltmp17:
	movq	%r15, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp18:
# %bb.8:                                # %_ZNSolsEd.exit
                                        #   in Loop: Header=BB8_7 Depth=3
.Ltmp19:
	movl	$.L.str.9, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp20:
# %bb.9:                                # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit37
                                        #   in Loop: Header=BB8_7 Depth=3
	incq	%r14
	cmpq	$10, %r14
	jne	.LBB8_7
# %bb.10:                               #   in Loop: Header=BB8_6 Depth=2
	movq	88(%rsp), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
.Ltmp22:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp23:
	movl	20(%rsp), %ebx                  # 4-byte Reload
# %bb.11:                               # %.noexc54
                                        #   in Loop: Header=BB8_6 Depth=2
.Ltmp24:
	movsbl	%al, %esi
	movq	%r15, %rdi
	callq	_ZNSo3putEc
.Ltmp25:
# %bb.12:                               # %.noexc55
                                        #   in Loop: Header=BB8_6 Depth=2
.Ltmp26:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp27:
# %bb.13:                               # %_ZNSolsEPFRSoS_E.exit36
                                        #   in Loop: Header=BB8_6 Depth=2
	incl	%ebx
	addl	$10, %r13d
	incl	%ebp
	cmpl	$10, %ebx
	jne	.LBB8_6
# %bb.14:                               #   in Loop: Header=BB8_3 Depth=1
	movq	88(%rsp), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
.Ltmp29:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp30:
	movl	16(%rsp), %r13d                 # 4-byte Reload
	movl	12(%rsp), %ebx                  # 4-byte Reload
# %bb.15:                               # %.noexc50
                                        #   in Loop: Header=BB8_3 Depth=1
.Ltmp31:
	movsbl	%al, %esi
	movq	%r15, %rdi
	callq	_ZNSo3putEc
.Ltmp32:
# %bb.16:                               # %.noexc51
                                        #   in Loop: Header=BB8_3 Depth=1
.Ltmp33:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp34:
# %bb.17:                               # %_ZNSolsEPFRSoS_E.exit35
                                        #   in Loop: Header=BB8_3 Depth=1
	movq	24(%rsp), %rsi                  # 8-byte Reload
	incl	%esi
	addl	$100, %r13d
	incl	%ebx
	cmpl	$10, %esi
	jne	.LBB8_3
# %bb.18:
	movl	$1000, %ebx                     # imm = 0x3E8
	movl	8(%rsp), %ebp                   # 4-byte Reload
.LBB8_25:                               # %_ZNSolsEPFRSoS_E.exit
.Ltmp36:
	leaq	72(%rsp), %rdi
	callq	_ZNSt13basic_fstreamIcSt11char_traitsIcEE5closeEv
.Ltmp37:
# %bb.26:
	testb	$5, %bpl
	je	.LBB8_27
# %bb.34:
.Ltmp38:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.15, %esi
	movl	$14, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp39:
# %bb.35:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit41
.Ltmp40:
	movl	$_ZSt4cout, %edi
	movq	%rbx, %rsi
	callq	_ZNSo9_M_insertImEERSoT_
.Ltmp41:
# %bb.36:                               # %_ZNSolsEj.exit42
.Ltmp42:
	movq	%rax, %rbx
	movl	$.L.str.16, %esi
	movl	$5, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp43:
# %bb.37:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit43
	movq	(%rbx), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
.Ltmp44:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp45:
	jmp	.LBB8_38
.LBB8_27:
.Ltmp46:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.13, %esi
	movl	$7, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp47:
# %bb.28:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit38
.Ltmp48:
	movl	$_ZSt4cout, %edi
	movl	$1000, %esi                     # imm = 0x3E8
	callq	_ZNSo9_M_insertImEERSoT_
.Ltmp49:
# %bb.29:                               # %_ZNSolsEj.exit
.Ltmp50:
	movq	%rax, %rbx
	movl	$.L.str.14, %esi
	movl	$18, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp51:
# %bb.30:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit39
	movq	(%rbx), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
.Ltmp52:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp53:
.LBB8_38:                               # %.noexc62.invoke
.Ltmp54:
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
.Ltmp55:
# %bb.39:                               # %.noexc63.invoke
.Ltmp56:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp57:
# %bb.40:                               # %_ZNSolsEPFRSoS_E.exit40
	leaq	72(%rsp), %rdi
	callq	_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev
	movq	40(%rsp), %rdi
	leaq	56(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB8_42
# %bb.41:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB8_42:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	addq	$600, %rsp                      # imm = 0x258
	.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
.LBB8_31:
	.cfi_def_cfa_offset 656
.Ltmp2:
	movq	%rax, %rbx
	jmp	.LBB8_45
.LBB8_43:
.Ltmp58:
	jmp	.LBB8_44
.LBB8_32:
.Ltmp35:
	jmp	.LBB8_44
.LBB8_33:
.Ltmp28:
	jmp	.LBB8_44
.LBB8_48:
.Ltmp21:
.LBB8_44:
	movq	%rax, %rbx
	leaq	72(%rsp), %rdi
	callq	_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev
.LBB8_45:
	movq	40(%rsp), %rdi
	leaq	56(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB8_47
# %bb.46:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i45
	callq	_ZdlPv
.LBB8_47:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit47
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end8:
	.size	_Z7outFilePd, .Lfunc_end8-_Z7outFilePd
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table8:
.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 .Ltmp3-.Lfunc_begin0           # >> Call Site 3 <<
	.uleb128 .Ltmp12-.Ltmp3                 #   Call between .Ltmp3 and .Ltmp12
	.uleb128 .Ltmp58-.Lfunc_begin0          #     jumps to .Ltmp58
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp13-.Lfunc_begin0          # >> Call Site 4 <<
	.uleb128 .Ltmp16-.Ltmp13                #   Call between .Ltmp13 and .Ltmp16
	.uleb128 .Ltmp35-.Lfunc_begin0          #     jumps to .Ltmp35
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp17-.Lfunc_begin0          # >> Call Site 5 <<
	.uleb128 .Ltmp20-.Ltmp17                #   Call between .Ltmp17 and .Ltmp20
	.uleb128 .Ltmp21-.Lfunc_begin0          #     jumps to .Ltmp21
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp22-.Lfunc_begin0          # >> Call Site 6 <<
	.uleb128 .Ltmp27-.Ltmp22                #   Call between .Ltmp22 and .Ltmp27
	.uleb128 .Ltmp28-.Lfunc_begin0          #     jumps to .Ltmp28
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp29-.Lfunc_begin0          # >> Call Site 7 <<
	.uleb128 .Ltmp34-.Ltmp29                #   Call between .Ltmp29 and .Ltmp34
	.uleb128 .Ltmp35-.Lfunc_begin0          #     jumps to .Ltmp35
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp36-.Lfunc_begin0          # >> Call Site 8 <<
	.uleb128 .Ltmp57-.Ltmp36                #   Call between .Ltmp36 and .Ltmp57
	.uleb128 .Ltmp58-.Lfunc_begin0          #     jumps to .Ltmp58
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp57-.Lfunc_begin0          # >> Call Site 9 <<
	.uleb128 .Lfunc_end8-.Ltmp57            #   Call between .Ltmp57 and .Lfunc_end8
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.text
	.globl	_Z6inFilePd                     # -- Begin function _Z6inFilePd
	.type	_Z6inFilePd,@function
_Z6inFilePd:                            # @_Z6inFilePd
.Lfunc_begin1:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception1
# %bb.0:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit
	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	$1032, %rsp                     # imm = 0x408
	.cfi_def_cfa_offset 1088
	.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, 32(%rsp)                  # 8-byte Spill
	leaq	72(%rsp), %rax
	movq	%rax, -16(%rax)
	leaq	56(%rsp), %r14
	movl	$.L.str.17, %esi
	movl	$.L.str.17+6, %edx
	movq	%r14, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	movq	(%r14), %rsi
.Ltmp59:
	leaq	504(%rsp), %r14
	movq	%r14, %rdi
	movl	$8, %edx
	callq	_ZNSt13basic_fstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
.Ltmp60:
# %bb.1:
	movq	504(%rsp), %rax
	movq	-24(%rax), %rax
	testb	$5, 536(%rsp,%rax)
	je	.LBB9_14
# %bb.2:
.Ltmp62:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.11, %esi
	movl	$27, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp63:
# %bb.3:                                # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
	movq	56(%rsp), %rsi
	movq	64(%rsp), %rdx
.Ltmp64:
	movl	$_ZSt4cout, %edi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp65:
# %bb.4:                                # %_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE.exit
	movq	%rax, %r14
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
.Ltmp66:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp67:
# %bb.5:                                # %.noexc64
.Ltmp68:
	movsbl	%al, %esi
	movq	%r14, %rdi
	callq	_ZNSo3putEc
.Ltmp69:
# %bb.6:                                # %.noexc65
	xorl	%r15d, %r15d
.Ltmp70:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp71:
	jmp	.LBB9_7
.LBB9_14:
	leaq	104(%rsp), %rax
	movq	%rax, -16(%rax)
	movq	$0, -8(%rax)
	movb	$0, (%rax)
.Ltmp72:
	leaq	120(%rsp), %rdi
	callq	_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1Ev
.Ltmp73:
# %bb.15:                               # %.preheader76
	xorl	%eax, %eax
	movl	$1100, %ecx                     # imm = 0x44C
	movl	$10, %edx
	leaq	88(%rsp), %r12
	leaq	120(%rsp), %r13
	xorl	%r15d, %r15d
.LBB9_16:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB9_17 Depth 2
                                        #       Child Loop BB9_20 Depth 3
                                        #       Child Loop BB9_29 Depth 3
	movq	%rax, 40(%rsp)                  # 8-byte Spill
	movl	%edx, 20(%rsp)                  # 4-byte Spill
	movl	%edx, %eax
	movl	$3435973837, %edx               # imm = 0xCCCCCCCD
	imulq	%rdx, %rax
	shrq	$35, %rax
	imull	$1000, %eax, %eax               # imm = 0x3E8
	movl	%ecx, 24(%rsp)                  # 4-byte Spill
	subl	%eax, %ecx
	movl	%ecx, 16(%rsp)                  # 4-byte Spill
	movl	$10, 12(%rsp)                   # 4-byte Folded Spill
	xorl	%ebx, %ebx
.LBB9_17:                               #   Parent Loop BB9_16 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB9_20 Depth 3
                                        #       Child Loop BB9_29 Depth 3
	movq	504(%rsp), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
.Ltmp75:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp76:
# %bb.18:                               # %.noexc
                                        #   in Loop: Header=BB9_17 Depth=2
.Ltmp77:
	movsbl	%al, %edx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp78:
# %bb.19:                               # %_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE.exit.preheader
                                        #   in Loop: Header=BB9_17 Depth=2
	movl	12(%rsp), %eax                  # 4-byte Reload
	movl	$3435973837, %ecx               # imm = 0xCCCCCCCD
	imulq	%rcx, %rax
	shrq	$35, %rax
	imull	$100, %eax, %eax
	movl	16(%rsp), %ecx                  # 4-byte Reload
                                        # kill: def $ecx killed $ecx def $rcx
	subl	%eax, %ecx
	movq	32(%rsp), %rax                  # 8-byte Reload
	leaq	(%rax,%rcx,8), %rbp
.LBB9_20:                               # %_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE.exit
                                        #   Parent Loop BB9_16 Depth=1
                                        #     Parent Loop BB9_17 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	cmpq	$0, 96(%rsp)
	jne	.LBB9_27
# %bb.21:                               #   in Loop: Header=BB9_20 Depth=3
	movq	504(%rsp), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
.Ltmp112:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp113:
# %bb.22:                               # %.noexc35
                                        #   in Loop: Header=BB9_20 Depth=3
.Ltmp114:
	movsbl	%al, %edx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp115:
	jmp	.LBB9_20
.LBB9_27:                               #   in Loop: Header=BB9_17 Depth=2
.Ltmp79:
	leaq	136(%rsp), %rdi
	movq	%r12, %rsi
	callq	_ZNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strERKNS_12basic_stringIcS2_S3_EE
.Ltmp80:
# %bb.28:                               # %_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEE3strERKNS_12basic_stringIcS2_S3_EE.exit.preheader
                                        #   in Loop: Header=BB9_17 Depth=2
	movq	%r15, 48(%rsp)                  # 8-byte Spill
	leal	10(%r15), %eax
	movl	%eax, 28(%rsp)                  # 4-byte Spill
	xorl	%r15d, %r15d
.LBB9_29:                               #   Parent Loop BB9_16 Depth=1
                                        #     Parent Loop BB9_17 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movq	120(%rsp), %rax
	movq	-24(%rax), %rax
	testb	$2, 152(%rsp,%rax)
	jne	.LBB9_30
# %bb.36:                               #   in Loop: Header=BB9_29 Depth=3
.Ltmp81:
	movq	%r13, %rdi
	movq	%rbp, %rsi
	callq	_ZNSi10_M_extractIdEERSiRT_
.Ltmp82:
# %bb.37:                               # %_ZNSirsERd.exit
                                        #   in Loop: Header=BB9_29 Depth=3
	addq	$8, %rbp
	decq	%r15
	cmpq	$-10, %r15
	jne	.LBB9_29
# %bb.38:                               # %_ZNSirsERd.exit..critedge_crit_edge
                                        #   in Loop: Header=BB9_17 Depth=2
	movq	120(%rsp), %rax
	movq	-24(%rax), %rax
	movl	28(%rsp), %ecx                  # 4-byte Reload
	movl	%ecx, %r15d
	jmp	.LBB9_31
.LBB9_30:                               # %.critedge.loopexit
                                        #   in Loop: Header=BB9_17 Depth=2
	movq	48(%rsp), %rcx                  # 8-byte Reload
	subl	%r15d, %ecx
	movq	%rcx, %r15
.LBB9_31:                               # %.critedge
                                        #   in Loop: Header=BB9_17 Depth=2
	leaq	(%rsp,%rax), %rdi
	addq	$120, %rdi
.Ltmp84:
	xorl	%esi, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.Ltmp85:
# %bb.32:                               #   in Loop: Header=BB9_17 Depth=2
.Ltmp86:
	movq	%r13, %rdi
	callq	_ZNSi4syncEv
.Ltmp87:
# %bb.33:                               #   in Loop: Header=BB9_17 Depth=2
	incl	%ebx
	addl	$10, 16(%rsp)                   # 4-byte Folded Spill
	incl	12(%rsp)                        # 4-byte Folded Spill
	cmpl	$10, %ebx
	jne	.LBB9_17
# %bb.34:                               #   in Loop: Header=BB9_16 Depth=1
	movq	40(%rsp), %rax                  # 8-byte Reload
	incl	%eax
	movl	24(%rsp), %ecx                  # 4-byte Reload
	addl	$100, %ecx
	movl	20(%rsp), %edx                  # 4-byte Reload
	incl	%edx
	cmpl	$10, %eax
	jne	.LBB9_16
# %bb.23:
	leaq	120(%rsp), %rdi
	movl	$_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE, %esi
	callq	_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev
	leaq	240(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
	movq	88(%rsp), %rdi
	leaq	104(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB9_7
# %bb.24:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB9_7:                                # %_ZNSolsEPFRSoS_E.exit
.Ltmp89:
	leaq	504(%rsp), %rdi
	callq	_ZNSt13basic_fstreamIcSt11char_traitsIcEE5closeEv
.Ltmp90:
# %bb.8:
	cmpl	$1000, %r15d                    # imm = 0x3E8
	jne	.LBB9_43
# %bb.9:
.Ltmp99:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.18, %esi
	movl	$6, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp100:
# %bb.10:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit44
.Ltmp101:
	movl	$_ZSt4cout, %edi
	movl	$1000, %esi                     # imm = 0x3E8
	callq	_ZNSo9_M_insertImEERSoT_
.Ltmp102:
# %bb.11:                               # %_ZNSolsEj.exit
.Ltmp103:
	movq	%rax, %r14
	movl	$.L.str.14, %esi
	movl	$18, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp104:
# %bb.12:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit47
	movq	(%r14), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
.Ltmp105:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp106:
	jmp	.LBB9_47
.LBB9_43:
.Ltmp91:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.19, %esi
	movl	$13, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp92:
# %bb.44:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit51
	movl	%r15d, %esi
.Ltmp93:
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertImEERSoT_
.Ltmp94:
# %bb.45:                               # %_ZNSolsEj.exit53
.Ltmp95:
	movq	%rax, %r14
	movl	$.L.str.16, %esi
	movl	$5, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp96:
# %bb.46:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit55
	movq	(%r14), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
.Ltmp97:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp98:
.LBB9_47:                               # %.noexc71.invoke
.Ltmp107:
	movsbl	%al, %esi
	movq	%r14, %rdi
	callq	_ZNSo3putEc
.Ltmp108:
# %bb.48:                               # %.noexc72.invoke
.Ltmp109:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp110:
# %bb.49:                               # %_ZNSolsEPFRSoS_E.exit49
	leaq	504(%rsp), %rdi
	callq	_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev
	movq	56(%rsp), %rdi
	leaq	72(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB9_51
# %bb.50:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i58
	callq	_ZdlPv
.LBB9_51:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit60
	movq	32(%rsp), %rax                  # 8-byte Reload
	addq	$1032, %rsp                     # imm = 0x408
	.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
.LBB9_25:
	.cfi_def_cfa_offset 1088
.Ltmp74:
	movq	%rax, %rbx
	jmp	.LBB9_41
.LBB9_13:
.Ltmp61:
	movq	%rax, %rbx
	jmp	.LBB9_54
.LBB9_52:
.Ltmp111:
	movq	%rax, %rbx
	jmp	.LBB9_53
.LBB9_26:                               # %.loopexit.split-lp
.Ltmp88:
	jmp	.LBB9_40
.LBB9_35:
.Ltmp83:
	jmp	.LBB9_40
.LBB9_39:                               # %.loopexit
.Ltmp116:
.LBB9_40:
	movq	%rax, %rbx
	leaq	120(%rsp), %rdi
	movl	$_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE, %esi
	callq	_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev
	leaq	240(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
.LBB9_41:
	movq	88(%rsp), %rdi
	leaq	104(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB9_53
# %bb.42:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i40
	callq	_ZdlPv
.LBB9_53:
	leaq	504(%rsp), %rdi
	callq	_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev
.LBB9_54:
	movq	56(%rsp), %rdi
	leaq	72(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB9_56
# %bb.55:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i61
	callq	_ZdlPv
.LBB9_56:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit63
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end9:
	.size	_Z6inFilePd, .Lfunc_end9-_Z6inFilePd
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table9:
.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 .Ltmp59-.Lfunc_begin1          #   Call between .Lfunc_begin1 and .Ltmp59
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp59-.Lfunc_begin1          # >> Call Site 2 <<
	.uleb128 .Ltmp60-.Ltmp59                #   Call between .Ltmp59 and .Ltmp60
	.uleb128 .Ltmp61-.Lfunc_begin1          #     jumps to .Ltmp61
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp62-.Lfunc_begin1          # >> Call Site 3 <<
	.uleb128 .Ltmp71-.Ltmp62                #   Call between .Ltmp62 and .Ltmp71
	.uleb128 .Ltmp111-.Lfunc_begin1         #     jumps to .Ltmp111
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp72-.Lfunc_begin1          # >> Call Site 4 <<
	.uleb128 .Ltmp73-.Ltmp72                #   Call between .Ltmp72 and .Ltmp73
	.uleb128 .Ltmp74-.Lfunc_begin1          #     jumps to .Ltmp74
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp75-.Lfunc_begin1          # >> Call Site 5 <<
	.uleb128 .Ltmp78-.Ltmp75                #   Call between .Ltmp75 and .Ltmp78
	.uleb128 .Ltmp88-.Lfunc_begin1          #     jumps to .Ltmp88
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp112-.Lfunc_begin1         # >> Call Site 6 <<
	.uleb128 .Ltmp115-.Ltmp112              #   Call between .Ltmp112 and .Ltmp115
	.uleb128 .Ltmp116-.Lfunc_begin1         #     jumps to .Ltmp116
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp79-.Lfunc_begin1          # >> Call Site 7 <<
	.uleb128 .Ltmp80-.Ltmp79                #   Call between .Ltmp79 and .Ltmp80
	.uleb128 .Ltmp88-.Lfunc_begin1          #     jumps to .Ltmp88
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp81-.Lfunc_begin1          # >> Call Site 8 <<
	.uleb128 .Ltmp82-.Ltmp81                #   Call between .Ltmp81 and .Ltmp82
	.uleb128 .Ltmp83-.Lfunc_begin1          #     jumps to .Ltmp83
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp84-.Lfunc_begin1          # >> Call Site 9 <<
	.uleb128 .Ltmp87-.Ltmp84                #   Call between .Ltmp84 and .Ltmp87
	.uleb128 .Ltmp88-.Lfunc_begin1          #     jumps to .Ltmp88
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp89-.Lfunc_begin1          # >> Call Site 10 <<
	.uleb128 .Ltmp110-.Ltmp89               #   Call between .Ltmp89 and .Ltmp110
	.uleb128 .Ltmp111-.Lfunc_begin1         #     jumps to .Ltmp111
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp110-.Lfunc_begin1         # >> Call Site 11 <<
	.uleb128 .Lfunc_end9-.Ltmp110           #   Call between .Ltmp110 and .Lfunc_end9
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end1:
	.p2align	2, 0x0
                                        # -- End function
	.text
	.globl	main                            # -- Begin function main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$48, %rsp
	.cfi_def_cfa_offset 96
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	xorl	%edi, %edi
	callq	_Z13setCudaDevicei
	movl	$8000, %edi                     # imm = 0x1F40
	callq	malloc
	movq	%rax, %rbx
	movl	$8000, %edi                     # imm = 0x1F40
	callq	malloc
	movq	%rax, %r14
	leaq	8(%rsp), %rdi
	movl	$8000, %esi                     # imm = 0x1F40
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB10_1
# %bb.4:                                # %_Z14checkCudaError10hipError_tPKci.exit
	leaq	16(%rsp), %rdi
	movl	$8000, %esi                     # imm = 0x1F40
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB10_5
# %bb.6:                                # %_Z14checkCudaError10hipError_tPKci.exit21
	movq	%rbx, %rdi
	callq	_Z6inFilePd
	leaq	32(%rsp), %rdi
	callq	hipEventCreate
	testl	%eax, %eax
	jne	.LBB10_7
# %bb.8:                                # %_Z14checkCudaError10hipError_tPKci.exit23
	leaq	24(%rsp), %rdi
	callq	hipEventCreate
	testl	%eax, %eax
	jne	.LBB10_9
# %bb.10:                               # %_Z14checkCudaError10hipError_tPKci.exit25
	movq	32(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	testl	%eax, %eax
	jne	.LBB10_11
# %bb.12:                               # %_Z14checkCudaError10hipError_tPKci.exit27
	movq	32(%rsp), %rdi
	callq	hipEventSynchronize
	testl	%eax, %eax
	jne	.LBB10_13
# %bb.14:                               # %_Z14checkCudaError10hipError_tPKci.exit29
	movq	8(%rsp), %rdi
	movl	$8000, %edx                     # imm = 0x1F40
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB10_15
# %bb.16:                               # %_Z14checkCudaError10hipError_tPKci.exit31
	movq	16(%rsp), %rdi
	movl	$8000, %edx                     # imm = 0x1F40
	movq	%r14, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB10_39
# %bb.17:                               # %_Z14checkCudaError10hipError_tPKci.exit33.preheader.preheader
	movl	$90, %ebp
	movabsq	$4294967297, %r15               # imm = 0x100000001
	movabsq	$42949672970, %r12              # imm = 0xA0000000A
.LBB10_18:                              # %_Z14checkCudaError10hipError_tPKci.exit33.preheader
                                        # =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	$1, %esi
	movq	%r12, %rdx
	movl	$10, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB10_20
# %bb.19:                               #   in Loop: Header=BB10_18 Depth=1
	movq	8(%rsp), %rdi
	movq	16(%rsp), %rsi
	callq	_Z21__device_stub__kernelPdS_
.LBB10_20:                              # %_Z14checkCudaError10hipError_tPKci.exit33
                                        #   in Loop: Header=BB10_18 Depth=1
	movq	8(%rsp), %rax
	movq	16(%rsp), %rcx
	movq	%rcx, 8(%rsp)
	movq	%rax, 16(%rsp)
	decl	%ebp
	jne	.LBB10_18
# %bb.21:
	callq	hipDeviceSynchronize
	movl	$.L.str.20, %edi
	movl	$.L.str.7, %esi
	movl	$302, %edx                      # imm = 0x12E
	callq	_Z14checkCudaStatePKcS0_i
	movq	8(%rsp), %rsi
	movl	$8000, %edx                     # imm = 0x1F40
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB10_22
# %bb.23:                               # %_Z14checkCudaError10hipError_tPKci.exit35
	movq	24(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	testl	%eax, %eax
	jne	.LBB10_24
# %bb.25:                               # %_Z14checkCudaError10hipError_tPKci.exit37
	movq	24(%rsp), %rdi
	callq	hipEventSynchronize
	testl	%eax, %eax
	jne	.LBB10_26
# %bb.27:                               # %_Z14checkCudaError10hipError_tPKci.exit39
	movq	32(%rsp), %rsi
	movq	24(%rsp), %rdx
	leaq	44(%rsp), %rdi
	callq	hipEventElapsedTime
	testl	%eax, %eax
	jne	.LBB10_28
# %bb.29:                               # %_Z14checkCudaError10hipError_tPKci.exit41
	movq	%rbx, %rdi
	callq	_Z7outFilePd
	movl	$_ZSt4cout, %edi
	movl	$.L.str.21, %esi
	movl	$14, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rcx
	movl	$-261, %edx                     # imm = 0xFEFB
	andl	_ZSt4cout+24(%rcx), %edx
	orl	$4, %edx
	movl	%edx, _ZSt4cout+24(%rcx)
	movq	-24(%rax), %rax
	movq	$6, _ZSt4cout+8(%rax)
	cvtss2sd	44(%rsp), %xmm0
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %r15
	movl	$.L.str.22, %esi
	movl	$3, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	(%r15), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r15, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movq	32(%rsp), %rdi
	callq	hipEventDestroy
	testl	%eax, %eax
	jne	.LBB10_30
# %bb.31:                               # %_Z14checkCudaError10hipError_tPKci.exit43
	movq	24(%rsp), %rdi
	callq	hipEventDestroy
	testl	%eax, %eax
	jne	.LBB10_32
# %bb.33:                               # %_Z14checkCudaError10hipError_tPKci.exit45
	movq	%rbx, %rdi
	callq	free
	movq	%r14, %rdi
	callq	free
	movq	8(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB10_34
# %bb.36:                               # %_Z14checkCudaError10hipError_tPKci.exit47
	movq	16(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB10_37
# %bb.38:                               # %_Z14checkCudaError10hipError_tPKci.exit49
	xorl	%eax, %eax
	addq	$48, %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
.LBB10_1:
	.cfi_def_cfa_offset 96
	movl	%eax, %ebp
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.23, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.7, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.24, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	movl	$275, %esi                      # imm = 0x113
	jmp	.LBB10_2
.LBB10_5:
	movl	%eax, %ebp
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.23, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.7, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.24, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	movl	$276, %esi                      # imm = 0x114
	jmp	.LBB10_2
.LBB10_7:
	movl	%eax, %ebp
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.23, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.7, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.24, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	movl	$288, %esi                      # imm = 0x120
	jmp	.LBB10_2
.LBB10_9:
	movl	%eax, %ebp
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.23, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.7, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.24, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	movl	$289, %esi                      # imm = 0x121
	jmp	.LBB10_2
.LBB10_11:
	movl	%eax, %ebp
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.23, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.7, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.24, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	movl	$290, %esi                      # imm = 0x122
	jmp	.LBB10_2
.LBB10_13:
	movl	%eax, %ebp
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.23, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.7, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.24, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	movl	$291, %esi                      # imm = 0x123
	jmp	.LBB10_2
.LBB10_15:
	movl	%eax, %ebp
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.23, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.7, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.24, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	movl	$293, %esi                      # imm = 0x125
	jmp	.LBB10_2
.LBB10_39:
	movl	%eax, %ebp
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.23, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.7, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.24, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	movl	$294, %esi                      # imm = 0x126
	jmp	.LBB10_2
.LBB10_22:
	movl	%eax, %ebp
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.23, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.7, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.24, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	movl	$304, %esi                      # imm = 0x130
	jmp	.LBB10_2
.LBB10_24:
	movl	%eax, %ebp
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.23, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.7, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.24, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	movl	$307, %esi                      # imm = 0x133
	jmp	.LBB10_2
.LBB10_26:
	movl	%eax, %ebp
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.23, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.7, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.24, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	movl	$308, %esi                      # imm = 0x134
	jmp	.LBB10_2
.LBB10_28:
	movl	%eax, %ebp
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.23, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.7, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.24, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	movl	$310, %esi                      # imm = 0x136
	jmp	.LBB10_2
.LBB10_30:
	movl	%eax, %ebp
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.23, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.7, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.24, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	movl	$318, %esi                      # imm = 0x13E
	jmp	.LBB10_2
.LBB10_32:
	movl	%eax, %ebp
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.23, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.7, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.24, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	movl	$319, %esi                      # imm = 0x13F
.LBB10_2:
	callq	_ZNSolsEi
	movl	$.L.str.25, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rbx
	movl	%ebp, %edi
	callq	hipGetErrorString
	movq	%rbx, %rdi
.LBB10_3:
	movq	%rax, %rsi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	callq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
	movl	$1, %edi
	callq	exit
.LBB10_34:
	movl	%eax, %ebx
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.23, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.7, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.24, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	movl	$323, %esi                      # imm = 0x143
	jmp	.LBB10_35
.LBB10_37:
	movl	%eax, %ebx
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.23, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.7, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.24, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	movl	$324, %esi                      # imm = 0x144
.LBB10_35:
	callq	_ZNSolsEi
	movl	$.L.str.25, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %r14
	movl	%ebx, %edi
	callq	hipGetErrorString
	movq	%r14, %rdi
	jmp	.LBB10_3
.Lfunc_end10:
	.size	main, .Lfunc_end10-main
	.cfi_endproc
                                        # -- End function
	.section	.text._Z14checkCudaStatePKcS0_i,"axG",@progbits,_Z14checkCudaStatePKcS0_i,comdat
	.weak	_Z14checkCudaStatePKcS0_i       # -- Begin function _Z14checkCudaStatePKcS0_i
	.type	_Z14checkCudaStatePKcS0_i,@function
_Z14checkCudaStatePKcS0_i:              # @_Z14checkCudaStatePKcS0_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	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%edx, %ebp
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	hipGetLastError
	testl	%eax, %eax
	jne	.LBB11_2
# %bb.1:
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.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_2:
	.cfi_def_cfa_offset 48
	movl	%eax, %ebx
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.26, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.27, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	callq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
	movl	$_ZSt4cerr, %edi
	movq	%r14, %rsi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.24, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	movl	%ebp, %esi
	callq	_ZNSolsEi
	movl	$.L.str.25, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %r14
	movl	%ebx, %edi
	callq	hipGetErrorString
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	callq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
	movl	$1, %edi
	callq	exit
.Lfunc_end11:
	.size	_Z14checkCudaStatePKcS0_i, .Lfunc_end11-_Z14checkCudaStatePKcS0_i
	.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	.LBB12_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	.LBB12_3
.LBB12_1:                               # %._crit_edge
	movq	(%rbx), %rax
.LBB12_3:
	testq	%r14, %r14
	je	.LBB12_7
# %bb.4:
	cmpq	$1, %r14
	jne	.LBB12_6
# %bb.5:
	movb	(%r15), %cl
	movb	%cl, (%rax)
	jmp	.LBB12_7
.LBB12_6:
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	memcpy@PLT
.LBB12_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_end12:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag, .Lfunc_end12-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.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:
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	jne	.LBB13_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rdi
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB13_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z6kernelPdS_, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$40, %rsp
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end13:
	.size	__hip_module_ctor, .Lfunc_end13-__hip_module_ctor
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_dtor
	.type	__hip_module_dtor,@function
__hip_module_dtor:                      # @__hip_module_dtor
	.cfi_startproc
# %bb.0:
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB14_2
# %bb.1:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	__hipUnregisterFatBinary
	movq	$0, __hip_gpubin_handle(%rip)
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
.LBB14_2:
	retq
.Lfunc_end14:
	.size	__hip_module_dtor, .Lfunc_end14-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	count,@object                   # @count
	.bss
	.globl	count
	.p2align	2, 0x0
count:
	.long	0                               # 0x0
	.size	count, 4

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

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

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"---Property of currently device used---"
	.size	.L.str.2, 40

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

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

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"CUDA Capability: "
	.size	.L.str.5, 18

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

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"/home/ubuntu/Datasets/stackv2/train-structured-repos-hip-sm89/blueyi/stencil_computation_sample/master/7_point_stencil_jacobi3d_Optimize.hip"
	.size	.L.str.7, 141

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

	.type	.L.str.8,@object                # @.str.8
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.8:
	.asciz	":\n\n"
	.size	.L.str.8, 4

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

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"out.txt"
	.size	.L.str.10, 8

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"Error to open output file: "
	.size	.L.str.11, 28

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	":\n"
	.size	.L.str.12, 3

	.type	.L.str.13,@object               # @.str.13
.L.str.13:
	.asciz	"Output "
	.size	.L.str.13, 8

	.type	.L.str.14,@object               # @.str.14
.L.str.14:
	.asciz	" Data Successfully"
	.size	.L.str.14, 19

	.type	.L.str.15,@object               # @.str.15
.L.str.15:
	.asciz	"Error, Output "
	.size	.L.str.15, 15

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

	.type	.L.str.17,@object               # @.str.17
.L.str.17:
	.asciz	"in.txt"
	.size	.L.str.17, 7

	.type	.L.str.18,@object               # @.str.18
.L.str.18:
	.asciz	"Input "
	.size	.L.str.18, 7

	.type	.L.str.19,@object               # @.str.19
.L.str.19:
	.asciz	"Error, Input "
	.size	.L.str.19, 14

	.type	.L.str.20,@object               # @.str.20
.L.str.20:
	.asciz	"kernel call"
	.size	.L.str.20, 12

	.type	.L.str.21,@object               # @.str.21
.L.str.21:
	.asciz	"Time elapsed: "
	.size	.L.str.21, 15

	.type	.L.str.22,@object               # @.str.22
.L.str.22:
	.asciz	" ms"
	.size	.L.str.22, 4

	.type	.L.str.23,@object               # @.str.23
.L.str.23:
	.asciz	"CUDA CALL FAILED:"
	.size	.L.str.23, 18

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

	.type	.L.str.25,@object               # @.str.25
.L.str.25:
	.asciz	")- "
	.size	.L.str.25, 4

	.type	.L.str.26,@object               # @.str.26
.L.str.26:
	.asciz	"---"
	.size	.L.str.26, 4

	.type	.L.str.27,@object               # @.str.27
.L.str.27:
	.asciz	" Error---"
	.size	.L.str.27, 10

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z6kernelPdS_"
	.size	.L__unnamed_1, 14

	.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 _Z21__device_stub__kernelPdS_
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Unwind_Resume
	.addrsig_sym _ZSt4cout
	.addrsig_sym _Z6kernelPdS_
	.addrsig_sym _ZSt4cerr
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z6kernelPdS_           ; -- Begin function _Z6kernelPdS_
	.globl	_Z6kernelPdS_
	.p2align	8
	.type	_Z6kernelPdS_,@function
_Z6kernelPdS_:                          ; @_Z6kernelPdS_
; %bb.0:
	s_load_b64 s[2:3], s[0:1], 0x1c
	v_bfe_u32 v16, v0, 10, 10
	v_bfe_u32 v8, v0, 20, 10
	v_and_b32_e32 v12, 0x3ff, v0
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_nc_u16 v1, v16, 10
	v_add_nc_u16 v4, v8, 10
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_nc_u16 v0, v12, 10
	v_and_b32_e32 v10, 0xffff, v1
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_and_b32_e32 v13, 0xffff, v4
	v_and_b32_e32 v7, 0xffff, v0
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_mul_u32_u24_e32 v10, 0x199a, v10
	v_mul_u32_u24_e32 v13, 0x199a, v13
	s_delay_alu instid0(VALU_DEP_3)
	v_mul_u32_u24_e32 v7, 0x199a, v7
	s_waitcnt lgkmcnt(0)
	s_and_b32 s3, s3, 0xffff
	s_lshr_b32 s4, s2, 16
	s_mul_i32 s15, s15, s3
	s_mul_i32 s14, s14, s4
	v_add3_u32 v3, v8, s15, 10
	v_add3_u32 v2, v16, s14, 10
	s_and_b32 s2, s2, 0xffff
	v_lshrrev_b32_e32 v10, 16, v10
	s_mul_i32 s13, s13, s2
	v_mul_hi_i32 v9, 0x66666667, v3
	v_add3_u32 v5, v12, s13, 10
	v_mul_hi_i32 v6, 0x66666667, v2
	v_lshrrev_b32_e32 v7, 16, v7
	v_mul_lo_u16 v10, v10, 10
	v_lshrrev_b32_e32 v13, 16, v13
	v_mul_hi_i32 v11, 0x66666667, v5
	s_load_b128 s[0:3], s[0:1], 0x0
	v_lshrrev_b32_e32 v15, 31, v9
	v_lshrrev_b32_e32 v9, 2, v9
	v_lshrrev_b32_e32 v14, 31, v6
	v_lshrrev_b32_e32 v6, 2, v6
	v_mul_lo_u16 v7, v7, 10
	v_sub_nc_u16 v1, v1, v10
	v_lshrrev_b32_e32 v17, 31, v11
	v_ashrrev_i32_e32 v11, 2, v11
	v_add_nc_u32_e32 v6, v6, v14
	v_add_nc_u32_e32 v9, v9, v15
	v_sub_nc_u16 v7, v0, v7
	v_mul_lo_u16 v1, v1, 10
	v_add_nc_u32_e32 v11, v11, v17
	v_mul_lo_u32 v6, v6, 10
	v_mul_lo_u32 v9, v9, 10
	v_and_b32_e32 v17, 0xffff, v7
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_mul_lo_u32 v11, v11, 10
	v_sub_nc_u32_e32 v2, v2, v6
	s_delay_alu instid0(VALU_DEP_4)
	v_sub_nc_u32_e32 v3, v3, v9
	v_mul_lo_u16 v6, v13, 10
	v_and_b32_e32 v13, 0xffff, v1
	v_sub_nc_u32_e32 v5, v5, v11
	v_mul_i32_i24_e32 v2, 10, v2
	v_mul_i32_i24_e32 v3, 0x64, v3
	v_sub_nc_u16 v4, v4, v6
	v_add_nc_u32_e32 v9, v13, v17
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add3_u32 v0, v2, v5, v3
	v_mul_lo_u16 v3, 0x64, v4
	v_mov_b32_e32 v2, 0
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_ashrrev_i32_e32 v1, 31, v0
	v_dual_mov_b32 v3, v2 :: v_dual_and_b32 v18, 0xffff, v3
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[0:1], 3, v[0:1]
	v_add_lshl_u32 v6, v9, v18, 3
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v4, vcc_lo, s0, v0
	v_add_co_ci_u32_e32 v5, vcc_lo, s1, v1, vcc_lo
	ds_store_b64 v6, v[2:3]
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	global_load_b64 v[2:3], v[4:5], off
	s_mov_b32 s0, exec_lo
	s_waitcnt vmcnt(0)
	ds_store_b64 v6, v[2:3]
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	ds_load_b64 v[2:3], v6
	v_mov_b32_e32 v6, 0
	v_mov_b32_e32 v7, 0
	s_delay_alu instid0(VALU_DEP_1)
	v_dual_mov_b32 v4, v6 :: v_dual_mov_b32 v5, v7
	v_cmpx_gt_u32_e32 9, v8
	s_cbranch_execz .LBB0_2
; %bb.1:
	v_mul_u32_u24_e32 v4, 0x64, v8
	s_delay_alu instid0(VALU_DEP_1)
	v_add_lshl_u32 v4, v4, v9, 3
	ds_load_b64 v[4:5], v4 offset:800
.LBB0_2:
	s_or_b32 exec_lo, exec_lo, s0
	s_delay_alu instid0(SALU_CYCLE_1)
	s_mov_b32 s0, exec_lo
	v_cmpx_ne_u32_e32 0, v8
	s_cbranch_execz .LBB0_4
; %bb.3:
	v_add_nc_u16 v6, v8, 9
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_and_b32_e32 v7, 0xffff, v6
	v_mul_u32_u24_e32 v7, 0x199a, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshrrev_b32_e32 v7, 16, v7
	v_mul_lo_u16 v7, v7, 10
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_nc_u16 v6, v6, v7
	v_mul_lo_u16 v6, 0x64, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_and_b32_e32 v6, 0xffff, v6
	v_add_lshl_u32 v6, v9, v6, 3
	ds_load_b64 v[6:7], v6
.LBB0_4:
	s_or_b32 exec_lo, exec_lo, s0
	v_mov_b32_e32 v8, 0
	v_mov_b32_e32 v9, 0
	s_mov_b32 s0, exec_lo
	s_delay_alu instid0(VALU_DEP_1)
	v_dual_mov_b32 v11, v9 :: v_dual_mov_b32 v10, v8
	v_cmpx_ne_u32_e32 0, v12
	s_cbranch_execz .LBB0_6
; %bb.5:
	v_add_nc_u16 v10, v12, 9
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_and_b32_e32 v11, 0xffff, v10
	v_mul_u32_u24_e32 v11, 0x199a, v11
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshrrev_b32_e32 v11, 16, v11
	v_mul_lo_u16 v11, v11, 10
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_nc_u16 v10, v10, v11
	v_add_nc_u16 v10, v13, v10
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u16 v10, v10, v18
	v_and_b32_e32 v10, 0xffff, v10
	s_delay_alu instid0(VALU_DEP_1)
	v_lshlrev_b32_e32 v10, 3, v10
	ds_load_b64 v[10:11], v10
.LBB0_6:
	s_or_b32 exec_lo, exec_lo, s0
	s_delay_alu instid0(SALU_CYCLE_1)
	s_mov_b32 s0, exec_lo
	v_cmpx_gt_u32_e32 9, v12
	s_cbranch_execz .LBB0_8
; %bb.7:
	v_add_nc_u32_e32 v8, v12, v13
	s_delay_alu instid0(VALU_DEP_1)
	v_add_lshl_u32 v8, v8, v18, 3
	ds_load_b64 v[8:9], v8 offset:8
.LBB0_8:
	s_or_b32 exec_lo, exec_lo, s0
	v_mov_b32_e32 v12, 0
	v_mov_b32_e32 v13, 0
	s_mov_b32 s0, exec_lo
	s_delay_alu instid0(VALU_DEP_1)
	v_dual_mov_b32 v15, v13 :: v_dual_mov_b32 v14, v12
	v_cmpx_ne_u32_e32 0, v16
	s_cbranch_execz .LBB0_10
; %bb.9:
	v_add_nc_u16 v14, v16, 9
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_and_b32_e32 v15, 0xffff, v14
	v_mul_u32_u24_e32 v15, 0x199a, v15
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshrrev_b32_e32 v15, 16, v15
	v_mul_lo_u16 v15, v15, 10
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_nc_u16 v14, v14, v15
	v_mad_u16 v14, v14, 10, v17
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u16 v14, v14, v18
	v_and_b32_e32 v14, 0xffff, v14
	s_delay_alu instid0(VALU_DEP_1)
	v_lshlrev_b32_e32 v14, 3, v14
	ds_load_b64 v[14:15], v14
.LBB0_10:
	s_or_b32 exec_lo, exec_lo, s0
	s_delay_alu instid0(SALU_CYCLE_1)
	s_mov_b32 s0, exec_lo
	v_cmpx_gt_u32_e32 9, v16
	s_cbranch_execz .LBB0_12
; %bb.11:
	v_mad_u32_u24 v12, v16, 10, v17
	s_delay_alu instid0(VALU_DEP_1)
	v_add_lshl_u32 v12, v12, v18, 3
	ds_load_b64 v[12:13], v12 offset:80
.LBB0_12:
	s_or_b32 exec_lo, exec_lo, s0
	s_waitcnt lgkmcnt(0)
	v_add_f64 v[2:3], v[2:3], v[4:5]
	s_mov_b32 s0, 0x92492492
	s_mov_b32 s1, 0x3fc24924
	v_add_co_u32 v0, vcc_lo, s2, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s3, v1, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[2:3], v[2:3], v[6:7]
	v_add_f64 v[2:3], v[2:3], v[10:11]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[2:3], v[2:3], v[8:9]
	v_add_f64 v[2:3], v[2:3], v[14:15]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[2:3], v[2:3], v[12:13]
	v_mul_f64 v[2:3], v[2:3], s[0:1]
	global_store_b64 v[0:1], v[2:3], off
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z6kernelPdS_
		.amdhsa_group_segment_fixed_size 8000
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 272
		.amdhsa_user_sgpr_count 13
		.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 1
		.amdhsa_system_sgpr_workgroup_id_z 1
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 2
		.amdhsa_next_free_vgpr 19
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z6kernelPdS_, .Lfunc_end0-_Z6kernelPdS_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 1228
; NumSgprs: 18
; NumVgprs: 19
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 8000 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 2
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 19
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 13
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 1
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 2
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .offset:         16
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         20
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         28
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         30
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         32
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         34
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         36
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         38
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         56
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         80
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 8000
    .kernarg_segment_align: 8
    .kernarg_segment_size: 272
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z6kernelPdS_
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z6kernelPdS_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     19
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
