#include<iostream>
#include<string>
#include<malloc.h>
#include<fstream>
#include<sstream>
#include<vector>
#include<cmath>
#include<cstdio>
#include<stdlib.h>
#include<cuda.h>
#include<cuda_runtime.h>
#define MAX_CLUSTER_SIZE 6
#define BLOCK_SIZE 16
using namespace std;

typedef vector<double> record_t;
typedef vector<record_t> data_t;
long long int max_atoms=0;
long long int max_energy_states=0;
int k_clus,cls;
double cluster_lambda=0.0;
int f=0;
istream& operator >>(istream& ins, record_t &record)
{
	record.clear();
	string line;
	getline(ins,line);
	stringstream ss(line);
	string field;
	while(getline(ss,field,','))
	{
		stringstream fs(field);
		double d=0.0;
		fs>>d;
		record.push_back(d);
	}
	return ins;
}

istream& operator >> (istream& ins, data_t& data)
{
	data.clear();
	record_t record;
	while(ins>>record)
	{
		data.push_back(record);
	}
	return ins;
}

__global__ void findMeans(const float *cluster, const float *instance, int *rnk, const int num, const int clus_size, const int maxAtoms)
{
	int i = blockIdx.x * blockDim.x + threadIdx.x;
//	int i = threadIdx.x;
	if(i<num)
	{
		float min=0.0;
		for(int j=0;j<maxAtoms;j++)
		{
			float d=0.0;
			float s=0.0;
			for(int k=0;k<3;k++)
			{
				d=instance[(j*5)+k+2]-cluster[((0*clus_size)+j)*maxAtoms +k];
				s=s+(d*d);
			}
			s=sqrt(s);
			min+=s;
		}
		int cls=-1;
		for(int clus=0;clus<clus_size;clus++)
		{
			float val=0.0;
			for(int p=0;p<maxAtoms;p++)
			{
				float d=0.0;
				float s=0.0;
				for(int l=0;l<3;l++)
				{
					d=instance[((i*maxAtoms+p)*5)+l+2]-cluster[((clus*clus_size)+p)*maxAtoms +l];
					s=s+(d*d);
				}
				s=sqrt(s);
				val+=s;
			}
			if(val<=min)
			{
				cls=clus;
				min=val;
			}
		}
		rnk[i]=cls+1;
	}
}

int main(void)
{
	cudaError_t err=cudaSuccess;
	data_t data;
	ifstream infile("alanine.csv");
	infile>>data;
	if(!infile.eof())
	{
		cout<<"Error! Please check file.\n";
		return 1;
	}
	infile.close();
	cout<<"Number of rows in file : "<<data.size()<<endl;
	for(long long int i=0;i<data.size();i++)
	{
		if(i>0)
		{
			if(data[i][1]<data[i-1][1])
			{
				max_atoms=i;
				break;
			}
		}
	}
	cout<<"Number of atoms : "<<max_atoms<<endl;
	max_energy_states=data[data.size()-1][0];
//	max_energy_states=32;
	cout<<"Total number of conformations : "<<max_energy_states<<endl;
	
	//allocate host cluster
	int s = MAX_CLUSTER_SIZE*max_atoms*3;
	size_t sz = s*sizeof(float);
	float *host_cluster=(float *)malloc(sz);
	if(host_cluster==NULL)
		cout<<"Not able to allocate host cluster"<<endl;

	//Initializing host cluster
	for(int i=0;i<MAX_CLUSTER_SIZE;i++)
	{
		int clus_num=rand()%max_energy_states + 0;
		for(long long int ii=0;ii<max_atoms;ii++)
                {
                     for(int jj=0;jj<3;jj++)
                     {
                         host_cluster[((i*MAX_CLUSTER_SIZE)+ii)*max_atoms+jj]=data[clus_num*max_atoms+ii][jj+2];
                     }
                }
	}
	
	//allocate device cluster
	float *d_clus = NULL;
	cudaMalloc((void **)&d_clus, sz);
	if(err!=cudaSuccess)
	{
		cout<<"Failed to allocate cluster on device!\n";
		exit(EXIT_FAILURE);
	}

	//initializing device cluster
	cudaMemcpy(d_clus, host_cluster, sz, cudaMemcpyHostToDevice);
	if(err!=cudaSuccess)
	{
		cout<<"Failed to copy cluster to device\n";
		exit(EXIT_FAILURE);
	}

	//allocate host instance
	float *host_instances;
	long int row=data.size();
	int col=5;
	long int size=row*col;
	host_instances=new float[size];
	for(long long int i=0;i<row;i++)
	{
		for(int j=0;j<col;j++)
		{
			host_instances[i*col+j]=data[i][j];
		}
	}

	//allocate device instance
	float *device_instances;
	err=cudaMalloc((void **)&device_instances,size*sizeof(float));
	if(err!=cudaSuccess)
	{
		cout<<"error allocating device instance"<<endl;
		exit(EXIT_FAILURE);
	}
	
	err=cudaMemcpy(device_instances, host_instances, size*sizeof(float), cudaMemcpyHostToDevice);
	if(err!=cudaSuccess)

	{
                cout<<"error copying device instance"<<endl;
                exit(EXIT_FAILURE);
        }


	int *rnk_host;
	int rnk[max_energy_states];
	rnk_host=new int[max_energy_states];
	for(long long int i=0;i<max_energy_states;i++)
	{
                rnk_host[i]=0;
		rnk[i]=0;
	}
	int *rnk_device;
	err=cudaMalloc((void **)&rnk_device,max_energy_states*sizeof(int));
	if(err!=cudaSuccess)

	{
                cout<<"error allocating device rnk"<<endl;
                exit(EXIT_FAILURE);
        }

	err=cudaMemcpy(rnk_device, rnk_host, max_energy_states*sizeof(int), cudaMemcpyHostToDevice);
	if(err!=cudaSuccess)

	{
                cout<<"error allocating device instance"<<endl;
                exit(EXIT_FAILURE);
        }

//	dim3 dimBlock(BLOCK_SIZE,BLOCK_SIZE);
	int num_blocks=(max_energy_states+511)/512;
	//while(1)
	//{
		findMeans<<<48,256>>>(d_clus, device_instances, rnk_device, max_energy_states, MAX_CLUSTER_SIZE, max_atoms);
		err=cudaMemcpy(rnk_host, rnk_device, max_energy_states*sizeof(int), cudaMemcpyDeviceToHost);
		if(err!=cudaSuccess)
		{
	                cout<<"error allocating device rnk"<<endl;
        	        exit(EXIT_FAILURE);
        	}
		
	
	//while(1)
	//{
		//E - Step
		for(long long int j=0;j<max_energy_states;j++)
		{
			double min=0.0;
			for(long long int y=0;y<max_atoms;y++)
			{
				double d=0.0,s=0.0;
				for(int z=0;z<3;z++)
				{
					d=host_instances[(y*5)+z+2]-host_cluster[((0*MAX_CLUSTER_SIZE)+y)*max_atoms +z];
					s=s+(d*d);
				}
				s=sqrt(s);
				min+=s;
			}
			cls=-1;
			for(int clus=0;clus<MAX_CLUSTER_SIZE;clus++)
			{
				double val=0.0;
				for(long long int p=0;p<max_atoms;p++)
				{
					double d=0.0,s=0.0;
					for(int l=0;l<3;l++)
					{
						d=data[j*max_atoms+p][l+2]-host_cluster[((clus*MAX_CLUSTER_SIZE)+p)*max_atoms +l];
						s=s+(d*d);
					}
					s=sqrt(s);
					val+=s;
				}
				if(val<=min)
				{
					cls=clus;
					min=val;
				}
			}
			rnk[j]=cls+1;			
		}
		int flag=0;
		for(long int i=0;i<100;i++)
		{
			if(rnk[i]!=rnk_host[i])
				flag=1;
			cout<<rnk[i]<<"\t"<<rnk_host[i]<<endl;
		}
		if(flag==1)
			cout<<"Not Matching"<<endl;

/*
		//M - Step
		int sizes[MAX_CLUSTER_SIZE];
		for(int jj=0;jj<MAX_CLUSTER_SIZE;jj++)
			sizes[jj]=0;
		double means[MAX_CLUSTER_SIZE][max_atoms][3];
		for(int jj=0;jj<MAX_CLUSTER_SIZE;jj++)
		{
			for(long long int kk=0;kk<max_atoms;kk++)
			{
				for(int ll=0;ll<3;ll++)
				{
					means[jj][kk][ll]=0;
				}
			}
		}
		for(long long int jj=0;jj<max_energy_states;jj++)
		{
			for(long long int kk=0;kk<max_atoms;kk++)
			{
				for(int ll=0;ll<3;ll++)
				{
					double d=data[jj*max_atoms+kk][ll+2];
					means[rnk[jj]-1][kk][ll]+=d;
					sizes[rnk[jj]-1]++;
				}
			}
		}
		for(int jj=0;jj<MAX_CLUSTER_SIZE;jj++)
		{
			for(long long int kk=0;kk<max_atoms;kk++)
			{
				for(int ll=0;ll<3;ll++)
				{
					if(cluster[jj][kk][ll]!=means[jj][kk][ll]/sizes[jj])
					{
						f=1;
					}
					if(sizes[jj]!=0)
						cluster[jj][kk][ll]=means[jj][kk][ll]/sizes[jj];
					else
						cluster[jj][kk][ll]=0;
				}
			}
		}
		if(f==0)
			break;		
		f=0;
	}*/
	/*for(int i=0;i<max_energy_states;i++)
	{
		cout<<rnk_host[i]<<" ";
	}
	cout<<endl;*/
	return 0;
}

	.file	"tmpxft_003b8ca9_00000000-6_k_mean_gpu.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4212:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4212:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.align 2
	.type	_ZNSolsEPFRSoS_E.isra.0, @function
_ZNSolsEPFRSoS_E.isra.0:
.LFB5163:
	.cfi_startproc
	jmp	*%rsi
	.cfi_endproc
.LFE5163:
	.size	_ZNSolsEPFRSoS_E.isra.0, .-_ZNSolsEPFRSoS_E.isra.0
	.globl	_Z37__device_stub__Z9findMeansPKfS0_PiiiiPKfS0_Piiii
	.type	_Z37__device_stub__Z9findMeansPKfS0_PiiiiPKfS0_Piiii, @function
_Z37__device_stub__Z9findMeansPKfS0_PiiiiPKfS0_Piiii:
.LFB4234:
	.cfi_startproc
	endbr64
	subq	$184, %rsp
	.cfi_def_cfa_offset 192
	movq	%rdi, 40(%rsp)
	leaq	72(%rsp), %rdi
	movq	%rsi, 32(%rsp)
	leaq	84(%rsp), %rsi
	movq	%rdx, 24(%rsp)
	leaq	56(%rsp), %rdx
	movl	%ecx, 20(%rsp)
	leaq	64(%rsp), %rcx
	movl	%r8d, 16(%rsp)
	movl	%r9d, 12(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	movl	$1, 80(%rsp)
	movq	%rax, 120(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 160(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 72(%rsp)
	movq	%rax, 84(%rsp)
	movl	$1, 92(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L3
	pushq	64(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z9findMeansPKfS0_Piiii(%rip), %rdi
	pushq	64(%rsp)
	.cfi_def_cfa_offset 208
	movq	100(%rsp), %rcx
	movl	108(%rsp), %r8d
	movq	88(%rsp), %rsi
	movl	96(%rsp), %edx
	leaq	136(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 200
	popq	%rdx
	.cfi_def_cfa_offset 192
.L3:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4234:
	.size	_Z37__device_stub__Z9findMeansPKfS0_PiiiiPKfS0_Piiii, .-_Z37__device_stub__Z9findMeansPKfS0_PiiiiPKfS0_Piiii
	.globl	_Z9findMeansPKfS0_Piiii
	.type	_Z9findMeansPKfS0_Piiii, @function
_Z9findMeansPKfS0_Piiii:
.LFB4235:
	.cfi_startproc
	endbr64
	jmp	_Z37__device_stub__Z9findMeansPKfS0_PiiiiPKfS0_Piiii
	.cfi_endproc
.LFE4235:
	.size	_Z9findMeansPKfS0_Piiii, .-_Z9findMeansPKfS0_Piiii
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"_Z9findMeansPKfS0_Piiii"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4237:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	pushq	$0
	.cfi_def_cfa_offset 24
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdx
	movq	%rax, %rdi
	leaq	_Z9findMeansPKfS0_Piiii(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFunction@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE4237:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.text._ZNSt6vectorIdSaIdEED2Ev,"axG",@progbits,_ZNSt6vectorIdSaIdEED5Ev,comdat
	.align 2
	.weak	_ZNSt6vectorIdSaIdEED2Ev
	.type	_ZNSt6vectorIdSaIdEED2Ev, @function
_ZNSt6vectorIdSaIdEED2Ev:
.LFB4584:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	.L11
	movq	16(%rdi), %rsi
	movq	%rax, %rdi
	subq	%rax, %rsi
	jmp	_ZdlPvm@PLT
.L11:
	ret
	.cfi_endproc
.LFE4584:
	.size	_ZNSt6vectorIdSaIdEED2Ev, .-_ZNSt6vectorIdSaIdEED2Ev
	.weak	_ZNSt6vectorIdSaIdEED1Ev
	.set	_ZNSt6vectorIdSaIdEED1Ev,_ZNSt6vectorIdSaIdEED2Ev
	.section	.text._ZNSt6vectorIS_IdSaIdEESaIS1_EED2Ev,"axG",@progbits,_ZNSt6vectorIS_IdSaIdEESaIS1_EED5Ev,comdat
	.align 2
	.weak	_ZNSt6vectorIS_IdSaIdEESaIS1_EED2Ev
	.type	_ZNSt6vectorIS_IdSaIdEESaIS1_EED2Ev, @function
_ZNSt6vectorIS_IdSaIdEESaIS1_EED2Ev:
.LFB4598:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	8(%rdi), %r12
	movq	%rdi, %rbx
	movq	(%rdi), %rbp
.L14:
	cmpq	%rbp, %r12
	je	.L18
	movq	%rbp, %rdi
	addq	$24, %rbp
	call	_ZNSt6vectorIdSaIdEED1Ev
	jmp	.L14
.L18:
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	.L13
	movq	16(%rbx), %rsi
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	subq	%rdi, %rsi
	jmp	_ZdlPvm@PLT
.L13:
	.cfi_restore_state
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4598:
	.size	_ZNSt6vectorIS_IdSaIdEESaIS1_EED2Ev, .-_ZNSt6vectorIS_IdSaIdEESaIS1_EED2Ev
	.weak	_ZNSt6vectorIS_IdSaIdEESaIS1_EED1Ev
	.set	_ZNSt6vectorIS_IdSaIdEESaIS1_EED1Ev,_ZNSt6vectorIS_IdSaIdEESaIS1_EED2Ev
	.section	.rodata._ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_.str1.1,"aMS",@progbits,1
.LC1:
	.string	"vector::_M_realloc_insert"
	.section	.text._ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_,"axG",@progbits,_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_,comdat
	.align 2
	.weak	_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_
	.type	_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_, @function
_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_:
.LFB4785:
	.cfi_startproc
	endbr64
	movabsq	$1152921504606846975, %rcx
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	8(%rdi), %rax
	movq	(%rdi), %r14
	movq	%rax, %rbx
	movq	%rax, (%rsp)
	subq	%r14, %rbx
	sarq	$3, %rbx
	cmpq	%rcx, %rbx
	jne	.L20
	leaq	.LC1(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L20:
	cmpq	%r14, (%rsp)
	movl	$1, %eax
	movq	%rsi, %r15
	movq	%rdi, %r13
	cmovne	%rbx, %rax
	movq	%rsi, %rbp
	addq	%rax, %rbx
	setc	%al
	subq	%r14, %r15
	movzbl	%al, %eax
	testq	%rax, %rax
	jne	.L30
	xorl	%r12d, %r12d
	testq	%rbx, %rbx
	je	.L25
	movabsq	$1152921504606846975, %rax
	cmpq	%rax, %rbx
	cmova	%rax, %rbx
	jmp	.L24
.L30:
	movq	%rcx, %rbx
.L24:
	leaq	0(,%rbx,8), %rdi
	movq	%rdx, 8(%rsp)
	call	_Znwm@PLT
	movq	8(%rsp), %rdx
	movq	%rax, %r12
.L25:
	movsd	(%rdx), %xmm0
	movsd	%xmm0, (%r12,%r15)
	testq	%r15, %r15
	jle	.L26
	movq	%r15, %rdx
	movq	%r14, %rsi
	movq	%r12, %rdi
	call	memmove@PLT
.L26:
	movq	(%rsp), %rax
	leaq	8(%r12,%r15), %rdx
	subq	%rbp, %rax
	testq	%rax, %rax
	jle	.L27
	movq	%rdx, %rdi
	movq	%rbp, %rsi
	movq	%rax, %rcx
	rep movsb
.L27:
	leaq	(%rdx,%rax), %rbp
	testq	%r14, %r14
	je	.L28
	movq	16(%r13), %rsi
	movq	%r14, %rdi
	subq	%r14, %rsi
	call	_ZdlPvm@PLT
.L28:
	leaq	(%r12,%rbx,8), %rax
	movq	%r12, 0(%r13)
	movq	%rbp, 8(%r13)
	movq	%rax, 16(%r13)
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4785:
	.size	_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_, .-_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_
	.text
	.globl	_ZrsRSiRSt6vectorIdSaIdEE
	.type	_ZrsRSiRSt6vectorIdSaIdEE, @function
_ZrsRSiRSt6vectorIdSaIdEE:
.LFB4186:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4186
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	movq	%rsi, %rbx
	subq	$888, %rsp
	.cfi_def_cfa_offset 944
	movq	%fs:40, %rax
	movq	%rax, 872(%rsp)
	movq	(%rsi), %rax
	cmpq	8(%rsi), %rax
	je	.L38
	movq	%rax, 8(%rsi)
.L38:
	leaq	40(%rsp), %rax
	xorl	%edx, %edx
	movb	$0, 40(%rsp)
	movq	%rax, 24(%rsp)
	movq	0(%rbp), %rax
	movq	%rdx, 32(%rsp)
	movq	-24(%rax), %rax
	movq	240(%rbp,%rax), %r12
	leaq	24(%rsp), %rax
	movq	%rax, 8(%rsp)
	testq	%r12, %r12
	jne	.L39
	movq	872(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L55
.LEHB0:
	call	_ZSt16__throw_bad_castv@PLT
.L39:
	cmpb	$0, 56(%r12)
	je	.L41
	movb	67(%r12), %al
	jmp	.L42
.L41:
	movq	%r12, %rdi
	call	_ZNKSt5ctypeIcE13_M_widen_initEv@PLT
	movq	(%r12), %rax
	movl	$10, %esi
	movq	%r12, %rdi
	call	*48(%rax)
.L42:
	movq	8(%rsp), %rsi
	movsbl	%al, %edx
	movq	%rbp, %rdi
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_@PLT
	leaq	88(%rsp), %r12
	movq	8(%rsp), %rsi
	movl	$24, %edx
	movq	%r12, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode@PLT
.LEHE0:
	leaq	72(%rsp), %rax
	movb	$0, 72(%rsp)
	leaq	56(%rsp), %r13
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	movq	%rax, 64(%rsp)
.L43:
	movl	$44, %edx
	movq	%r13, %rsi
	movq	%r12, %rdi
.LEHB1:
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_@PLT
	movq	(%rax), %rdx
	movq	-24(%rdx), %rdx
	testb	$5, 32(%rax,%rdx)
	jne	.L58
	leaq	480(%rsp), %r14
	movl	$24, %edx
	movq	%r13, %rsi
	movq	%r14, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode@PLT
.LEHE1:
	leaq	16(%rsp), %r15
	movq	%r14, %rdi
	movq	$0x000000000, 16(%rsp)
	movq	%r15, %rsi
.LEHB2:
	call	_ZNSi10_M_extractIdEERSiRT_@PLT
	movq	8(%rbx), %rsi
	cmpq	16(%rbx), %rsi
	je	.L44
	movsd	16(%rsp), %xmm0
	addq	$8, %rsi
	movsd	%xmm0, -8(%rsi)
	movq	%rsi, 8(%rbx)
	jmp	.L45
.L44:
	movq	%r15, %rdx
	movq	%rbx, %rdi
	call	_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_
.LEHE2:
.L45:
	movq	%r14, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	jmp	.L43
.L58:
	movq	%r13, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%r12, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	movq	8(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	872(%rsp), %rax
	subq	%fs:40, %rax
	je	.L51
	jmp	.L55
.L53:
	endbr64
	movq	%rax, %rbx
.L47:
	movq	%r14, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	jmp	.L48
.L54:
	endbr64
	movq	%rax, %rbx
.L48:
	movq	%r13, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%r12, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	jmp	.L49
.L52:
	endbr64
	movq	%rax, %rbx
.L49:
	movq	8(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	872(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L55
	movq	%rbx, %rdi
.LEHB3:
	call	_Unwind_Resume@PLT
.LEHE3:
.L55:
	call	__stack_chk_fail@PLT
.L51:
	addq	$888, %rsp
	.cfi_def_cfa_offset 56
	movq	%rbp, %rax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4186:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA4186:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4186-.LLSDACSB4186
.LLSDACSB4186:
	.uleb128 .LEHB0-.LFB4186
	.uleb128 .LEHE0-.LEHB0
	.uleb128 .L52-.LFB4186
	.uleb128 0
	.uleb128 .LEHB1-.LFB4186
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L54-.LFB4186
	.uleb128 0
	.uleb128 .LEHB2-.LFB4186
	.uleb128 .LEHE2-.LEHB2
	.uleb128 .L53-.LFB4186
	.uleb128 0
	.uleb128 .LEHB3-.LFB4186
	.uleb128 .LEHE3-.LEHB3
	.uleb128 0
	.uleb128 0
.LLSDACSE4186:
	.text
	.size	_ZrsRSiRSt6vectorIdSaIdEE, .-_ZrsRSiRSt6vectorIdSaIdEE
	.section	.text._ZNSt6vectorIdSaIdEEC2ERKS1_,"axG",@progbits,_ZNSt6vectorIdSaIdEEC5ERKS1_,comdat
	.align 2
	.weak	_ZNSt6vectorIdSaIdEEC2ERKS1_
	.type	_ZNSt6vectorIdSaIdEEC2ERKS1_, @function
_ZNSt6vectorIdSaIdEEC2ERKS1_:
.LFB5040:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rsi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	8(%rsi), %rbp
	movq	%rdi, %rbx
	subq	(%rsi), %rbp
	movq	$0, (%rdi)
	movq	$0, 8(%rdi)
	movq	$0, 16(%rdi)
	je	.L64
	movabsq	$9223372036854775800, %rax
	cmpq	%rbp, %rax
	jnb	.L61
	call	_ZSt28__throw_bad_array_new_lengthv@PLT
.L61:
	movq	%rbp, %rdi
	call	_Znwm@PLT
	movq	%rax, %rcx
	jmp	.L60
.L64:
	xorl	%ecx, %ecx
.L60:
	addq	%rcx, %rbp
	movq	%rcx, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rbp, 16(%rbx)
	movq	(%r12), %rsi
	movq	8(%r12), %rbp
	subq	%rsi, %rbp
	cmpq	$8, %rbp
	jle	.L62
	movq	%rcx, %rdi
	movq	%rbp, %rdx
	call	memmove@PLT
	movq	%rax, %rcx
	jmp	.L63
.L62:
	jne	.L63
	movsd	(%rsi), %xmm0
	movsd	%xmm0, (%rcx)
.L63:
	addq	%rbp, %rcx
	movq	%rcx, 8(%rbx)
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5040:
	.size	_ZNSt6vectorIdSaIdEEC2ERKS1_, .-_ZNSt6vectorIdSaIdEEC2ERKS1_
	.weak	_ZNSt6vectorIdSaIdEEC1ERKS1_
	.set	_ZNSt6vectorIdSaIdEEC1ERKS1_,_ZNSt6vectorIdSaIdEEC2ERKS1_
	.section	.text._ZNSt6vectorIS_IdSaIdEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_,"axG",@progbits,_ZNSt6vectorIS_IdSaIdEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_,comdat
	.align 2
	.weak	_ZNSt6vectorIS_IdSaIdEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_
	.type	_ZNSt6vectorIS_IdSaIdEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_, @function
_ZNSt6vectorIS_IdSaIdEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_:
.LFB4804:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4804
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdx, %r14
	movabsq	$384307168202282325, %rdx
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	8(%rdi), %rax
	movq	(%rdi), %r13
	movq	%rsi, 8(%rsp)
	movq	%rax, %rbx
	movq	%rax, (%rsp)
	movabsq	$-6148914691236517205, %rax
	subq	%r13, %rbx
	sarq	$3, %rbx
	imulq	%rax, %rbx
	cmpq	%rdx, %rbx
	jne	.L67
	leaq	.LC1(%rip), %rdi
.LEHB4:
	call	_ZSt20__throw_length_errorPKc@PLT
.L67:
	cmpq	%r13, (%rsp)
	movl	$1, %eax
	movq	8(%rsp), %r15
	movq	%rdi, %r12
	cmovne	%rbx, %rax
	addq	%rax, %rbx
	setc	%al
	subq	%r13, %r15
	movzbl	%al, %eax
	testq	%rax, %rax
	jne	.L83
	xorl	%ebp, %ebp
	testq	%rbx, %rbx
	je	.L72
	movabsq	$384307168202282325, %rax
	cmpq	%rax, %rbx
	cmova	%rax, %rbx
	jmp	.L71
.L83:
	movq	%rdx, %rbx
.L71:
	imulq	$24, %rbx, %rdi
	call	_Znwm@PLT
.LEHE4:
	movq	%rax, %rbp
.L72:
	leaq	0(%rbp,%r15), %rax
	movq	%r14, %rsi
	movq	%rax, %rdi
	movq	%rax, %r15
.LEHB5:
	call	_ZNSt6vectorIdSaIdEEC1ERKS1_
.LEHE5:
	movq	%rbp, %r14
	movq	%r13, %r15
.L73:
	addq	$24, %r14
	cmpq	%r15, 8(%rsp)
	je	.L75
	movq	(%r15), %rcx
	xorl	%edx, %edx
	movq	%r15, %rdi
	addq	$24, %r15
	movq	%rdx, -24(%r15)
	movq	%rcx, -24(%r14)
	movq	-16(%r15), %rcx
	movq	%rdx, -16(%r15)
	movq	%rcx, -16(%r14)
	movq	-8(%r15), %rcx
	movq	%rdx, -8(%r15)
	movq	%rcx, -8(%r14)
	call	_ZNSt6vectorIdSaIdEED1Ev
	jmp	.L73
.L75:
	cmpq	%r15, (%rsp)
	je	.L95
	movq	(%r15), %rcx
	xorl	%eax, %eax
	movq	%r15, %rdi
	addq	$24, %r14
	movq	%rax, (%r15)
	addq	$24, %r15
	movq	%rcx, -24(%r14)
	movq	-16(%r15), %rcx
	movq	%rax, -16(%r15)
	movq	%rcx, -16(%r14)
	movq	-8(%r15), %rcx
	movq	%rax, -8(%r15)
	movq	%rcx, -8(%r14)
	call	_ZNSt6vectorIdSaIdEED1Ev
	jmp	.L75
.L95:
	testq	%r13, %r13
	je	.L77
	movq	16(%r12), %rsi
	movq	%r13, %rdi
	subq	%r13, %rsi
	call	_ZdlPvm@PLT
.L77:
	imulq	$24, %rbx, %rbx
	movq	%rbp, (%r12)
	movq	%r14, 8(%r12)
	addq	%rbp, %rbx
	movq	%rbx, 16(%r12)
	addq	$24, %rsp
	.cfi_remember_state
	.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
.L86:
	.cfi_restore_state
	endbr64
	movq	%rax, %rdi
.L78:
	call	__cxa_begin_catch@PLT
	testq	%rbp, %rbp
	jne	.L79
	movq	%r15, %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
.L81:
.LEHB6:
	call	__cxa_rethrow@PLT
.LEHE6:
.L87:
	endbr64
	movq	%rax, %rbx
.L80:
	call	__cxa_end_catch@PLT
	movq	%rbx, %rdi
.LEHB7:
	call	_Unwind_Resume@PLT
.LEHE7:
.L79:
	imulq	$24, %rbx, %rsi
	movq	%rbp, %rdi
	call	_ZdlPvm@PLT
	jmp	.L81
	.cfi_endproc
.LFE4804:
	.section	.gcc_except_table
	.align 4
.LLSDA4804:
	.byte	0xff
	.byte	0x9b
	.uleb128 .LLSDATT4804-.LLSDATTD4804
.LLSDATTD4804:
	.byte	0x1
	.uleb128 .LLSDACSE4804-.LLSDACSB4804
.LLSDACSB4804:
	.uleb128 .LEHB4-.LFB4804
	.uleb128 .LEHE4-.LEHB4
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB5-.LFB4804
	.uleb128 .LEHE5-.LEHB5
	.uleb128 .L86-.LFB4804
	.uleb128 0x1
	.uleb128 .LEHB6-.LFB4804
	.uleb128 .LEHE6-.LEHB6
	.uleb128 .L87-.LFB4804
	.uleb128 0
	.uleb128 .LEHB7-.LFB4804
	.uleb128 .LEHE7-.LEHB7
	.uleb128 0
	.uleb128 0
.LLSDACSE4804:
	.byte	0x1
	.byte	0
	.align 4
	.long	0

.LLSDATT4804:
	.section	.text._ZNSt6vectorIS_IdSaIdEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_,"axG",@progbits,_ZNSt6vectorIS_IdSaIdEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_,comdat
	.size	_ZNSt6vectorIS_IdSaIdEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_, .-_ZNSt6vectorIS_IdSaIdEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_
	.text
	.globl	_ZrsRSiRSt6vectorIS0_IdSaIdEESaIS2_EE
	.type	_ZrsRSiRSt6vectorIS0_IdSaIdEESaIS2_EE, @function
_ZrsRSiRSt6vectorIS0_IdSaIdEESaIS2_EE:
.LFB4188:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4188
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rsi, %rbx
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	(%rsi), %r13
	movq	8(%rsi), %r14
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	cmpq	%r14, %r13
	je	.L97
	movq	%r13, %rbp
.L98:
	movq	%rbp, %rdi
	addq	$24, %rbp
	call	_ZNSt6vectorIdSaIdEED1Ev
	cmpq	%rbp, %r14
	jne	.L98
	movq	%r13, 8(%rbx)
.L97:
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rax, (%rsp)
	movq	%rax, 8(%rsp)
	movq	%rax, 16(%rsp)
.L99:
	movq	%rbp, %rsi
	movq	%r12, %rdi
.LEHB8:
	call	_ZrsRSiRSt6vectorIdSaIdEE
	movq	(%rax), %rdx
	movq	-24(%rdx), %rdx
	testb	$5, 32(%rax,%rdx)
	jne	.L110
	movq	8(%rbx), %rdi
	cmpq	16(%rbx), %rdi
	je	.L100
	movq	%rbp, %rsi
	call	_ZNSt6vectorIdSaIdEEC1ERKS1_
	addq	$24, 8(%rbx)
	jmp	.L99
.L100:
	movq	%rdi, %rsi
	movq	%rbp, %rdx
	movq	%rbx, %rdi
	call	_ZNSt6vectorIS_IdSaIdEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_
.LEHE8:
	jmp	.L99
.L110:
	movq	%rbp, %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	je	.L105
	jmp	.L108
.L106:
	endbr64
	movq	%rax, %rbx
.L103:
	movq	%rbp, %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L108
	movq	%rbx, %rdi
.LEHB9:
	call	_Unwind_Resume@PLT
.LEHE9:
.L108:
	call	__stack_chk_fail@PLT
.L105:
	addq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%r12, %rax
	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
.LFE4188:
	.section	.gcc_except_table
.LLSDA4188:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4188-.LLSDACSB4188
.LLSDACSB4188:
	.uleb128 .LEHB8-.LFB4188
	.uleb128 .LEHE8-.LEHB8
	.uleb128 .L106-.LFB4188
	.uleb128 0
	.uleb128 .LEHB9-.LFB4188
	.uleb128 .LEHE9-.LEHB9
	.uleb128 0
	.uleb128 0
.LLSDACSE4188:
	.text
	.size	_ZrsRSiRSt6vectorIS0_IdSaIdEESaIS2_EE, .-_ZrsRSiRSt6vectorIS0_IdSaIdEESaIS2_EE
	.section	.rodata.str1.1
.LC3:
	.string	"alanine.csv"
.LC4:
	.string	"Error! Please check file.\n"
.LC5:
	.string	"Number of rows in file : "
.LC6:
	.string	"Number of atoms : "
.LC7:
	.string	"Total number of conformations : "
.LC8:
	.string	"Not able to allocate host cluster"
.LC9:
	.string	"error allocating device instance"
.LC10:
	.string	"error copying device instance"
.LC11:
	.string	"error allocating device rnk"
.LC12:
	.string	"\t"
.LC13:
	.string	"Not Matching"
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB4199:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4199
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xorl	%edi, %edi
	movl	$8, %edx
	leaq	.LC3(%rip), %rsi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	leaq	-576(%rbp), %rbx
	subq	$712, %rsp
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rdi, -600(%rbp)
	movq	%rdi, -592(%rbp)
	movq	%rdi, -584(%rbp)
	movq	%rbx, %rdi
.LEHB10:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE10:
	leaq	-600(%rbp), %rsi
	movq	%rbx, %rdi
.LEHB11:
	call	_ZrsRSiRSt6vectorIS0_IdSaIdEESaIS2_EE
	testb	$2, -288(%rbp)
	leaq	_ZSt4cout(%rip), %r12
	jne	.L112
	leaq	.LC4(%rip), %rsi
	movq	%r12, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$1, %ebx
	jmp	.L113
.L112:
	movq	%rbx, %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv@PLT
	leaq	.LC5(%rip), %rsi
	movq	%r12, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	-592(%rbp), %r13
	movq	-600(%rbp), %r14
	movq	%rax, %rdi
	movabsq	$-6148914691236517205, %rax
	movq	%r13, %rbx
	subq	%r14, %rbx
	sarq	$3, %rbx
	imulq	%rax, %rbx
	movq	%rbx, %rsi
	call	_ZNSo9_M_insertImEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	%r14, %rdx
	xorl	%eax, %eax
.L114:
	cmpq	%rbx, %rax
	je	.L117
	testq	%rax, %rax
	je	.L115
	movq	(%rdx), %rcx
	movq	-24(%rdx), %rsi
	movsd	8(%rsi), %xmm0
	comisd	8(%rcx), %xmm0
	jbe	.L115
	movq	%rax, max_atoms(%rip)
	jmp	.L117
.L115:
	incq	%rax
	addq	$24, %rdx
	jmp	.L114
.L117:
	leaq	.LC6(%rip), %rsi
	movq	%r12, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	max_atoms(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIxEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	-24(%r13), %rax
	leaq	.LC7(%rip), %rsi
	movq	%r12, %rdi
	cvttsd2siq	(%rax), %rax
	movq	%rax, max_energy_states(%rip)
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	max_energy_states(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIxEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	imull	$18, max_atoms(%rip), %r15d
	movslq	%r15d, %r15
	leaq	0(,%r15,4), %rax
	movq	%rax, %rdi
	movq	%rax, -664(%rbp)
	call	malloc@PLT
	movq	%rax, %r13
	testq	%rax, %rax
	jne	.L119
	leaq	.LC8(%rip), %rsi
	movq	%r12, %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
.L119:
	xorl	%r15d, %r15d
.L122:
	call	rand@PLT
	movq	max_atoms(%rip), %rsi
	xorl	%edi, %edi
	cltq
	cqto
	leaq	0(,%rsi,4), %r9
	idivq	max_energy_states(%rip)
	imulq	%rsi, %rdx
	imulq	$24, %rdx, %rax
	movq	%r15, %rdx
	imulq	%rsi, %rdx
	addq	%r14, %rax
	leaq	0(%r13,%rdx,4), %rdx
.L120:
	cmpq	%rdi, %rsi
	jle	.L199
	movq	(%rax), %r8
	incq	%rdi
	addq	$24, %rax
	cvtsd2ss	16(%r8), %xmm0
	movss	%xmm0, (%rdx)
	cvtsd2ss	24(%r8), %xmm0
	movss	%xmm0, 4(%rdx)
	cvtsd2ss	32(%r8), %xmm0
	movss	%xmm0, 8(%rdx)
	addq	%r9, %rdx
	jmp	.L120
.L199:
	addq	$6, %r15
	cmpq	$36, %r15
	jne	.L122
	xorl	%esi, %esi
	leaq	-648(%rbp), %rdi
	movq	%rsi, -648(%rbp)
	movq	-664(%rbp), %rsi
	call	cudaMalloc@PLT
	movq	-664(%rbp), %rdx
	movq	-648(%rbp), %rdi
	movl	$1, %ecx
	movq	%r13, %rsi
	call	cudaMemcpy@PLT
	movabsq	$2305843009213693950, %rax
	leaq	(%rbx,%rbx,4), %r15
	cmpq	%r15, %rax
	jb	.L123
	salq	$2, %r15
	movq	%r15, %rdi
	call	_Znam@PLT
	movq	%rax, -672(%rbp)
	xorl	%eax, %eax
	jmp	.L124
.L123:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L183
	call	__cxa_throw_bad_array_new_length@PLT
.L126:
	cvtsd2ss	(%rsi,%rdx,8), %xmm0
	movss	%xmm0, (%rcx,%rdx,4)
	incq	%rdx
	cmpq	$5, %rdx
	jne	.L126
	incq	%rax
.L124:
	cmpq	%rbx, %rax
	jge	.L200
	imulq	$24, %rax, %rdx
	imulq	$20, %rax, %rcx
	movq	(%r14,%rdx), %rsi
	movq	-672(%rbp), %rdx
	addq	%rdx, %rcx
	xorl	%edx, %edx
	jmp	.L126
.L200:
	leaq	-640(%rbp), %rdi
	movq	%r15, %rsi
	call	cudaMalloc@PLT
	testl	%eax, %eax
	je	.L128
	leaq	.LC9(%rip), %rsi
.L194:
	movq	%r12, %rdi
.L192:
	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
.L128:
	movq	-672(%rbp), %rsi
	movq	-640(%rbp), %rdi
	movl	$1, %ecx
	movq	%r15, %rdx
	call	cudaMemcpy@PLT
	leaq	.LC10(%rip), %rsi
	testl	%eax, %eax
	jne	.L194
	movq	max_energy_states(%rip), %rcx
	movq	%rsp, %rsi
	leaq	0(,%rcx,4), %rdi
	leaq	15(%rdi), %rdx
	movq	%rdx, %rax
	andq	$-4096, %rdx
	andq	$-16, %rax
	subq	%rdx, %rsi
.L131:
	cmpq	%rsi, %rsp
	je	.L132
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L131
.L132:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	je	.L133
	orq	$0, -8(%rsp,%rax)
.L133:
	movabsq	$2305843009213693950, %rax
	movq	%rsp, %r15
	cmpq	%rcx, %rax
	jb	.L134
	call	_Znam@PLT
	movq	%rax, %r12
	movq	max_energy_states(%rip), %rsi
	xorl	%eax, %eax
	jmp	.L135
.L134:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L183
	call	__cxa_throw_bad_array_new_length@PLT
.L135:
	cmpq	%rax, %rsi
	jle	.L201
	xorl	%ecx, %ecx
	movl	%ecx, (%r12,%rax,4)
	movl	%ecx, (%r15,%rax,4)
	incq	%rax
	jmp	.L135
.L201:
	salq	$2, %rsi
	leaq	-632(%rbp), %rdi
	call	cudaMalloc@PLT
	testl	%eax, %eax
	jne	.L198
	movq	max_energy_states(%rip), %rax
	movq	-632(%rbp), %rdi
	movl	$1, %ecx
	movq	%r12, %rsi
	leaq	0(,%rax,4), %rdx
	call	cudaMemcpy@PLT
	leaq	.LC9(%rip), %rsi
	testl	%eax, %eax
	jne	.L197
	movl	$16777217, %edx
	movl	$268435459, %edi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	salq	$8, %rdx
	salq	$4, %rdi
	movl	$1, %ecx
	movl	$1, %esi
	movq	%rdx, -612(%rbp)
	movl	$1, -604(%rbp)
	movq	%rdi, -624(%rbp)
	movl	$1, -616(%rbp)
	call	__cudaPushCallConfiguration@PLT
	movq	max_energy_states(%rip), %rcx
	movq	-632(%rbp), %rdx
	testl	%eax, %eax
	jne	.L140
	movl	max_atoms(%rip), %r9d
	movq	-640(%rbp), %rsi
	movl	$6, %r8d
	movq	-648(%rbp), %rdi
	call	_Z37__device_stub__Z9findMeansPKfS0_PiiiiPKfS0_Piiii
.L140:
	movq	max_energy_states(%rip), %rax
	movq	-632(%rbp), %rsi
	movl	$2, %ecx
	movq	%r12, %rdi
	leaq	0(,%rax,4), %rdx
	call	cudaMemcpy@PLT
	xorl	%edx, %edx
	movq	%rdx, -664(%rbp)
	testl	%eax, %eax
	je	.L141
.L198:
	leaq	.LC11(%rip), %rsi
.L197:
	leaq	_ZSt4cout(%rip), %rdi
	jmp	.L192
.L204:
	comisd	%xmm1, %xmm2
	jb	.L147
	movl	%ecx, cls(%rip)
	movaps	%xmm1, %xmm2
.L147:
	movq	-680(%rbp), %rax
	incq	%rcx
	addq	%rax, %r8
	cmpq	$6, %rcx
	jne	.L144
	movl	cls(%rip), %eax
	leal	1(%rax), %edx
	movq	-664(%rbp), %rax
	incq	-664(%rbp)
	movl	%edx, (%r15,%rax,4)
.L141:
	movq	-664(%rbp), %rax
	cmpq	%rax, max_energy_states(%rip)
	jle	.L202
	xorl	%edx, %edx
	xorps	%xmm2, %xmm2
.L151:
	movq	max_atoms(%rip), %rbx
	cmpq	%rdx, %rbx
	jle	.L203
	imulq	$20, %rdx, %rsi
	movq	-672(%rbp), %rax
	xorl	%ecx, %ecx
	xorps	%xmm1, %xmm1
	imulq	%rdx, %rbx
	addq	%rax, %rsi
	leaq	0(%r13,%rbx,4), %rdi
.L142:
	movss	8(%rsi,%rcx), %xmm0
	subss	(%rdi,%rcx), %xmm0
	addq	$4, %rcx
	cvtss2sd	%xmm0, %xmm0
	mulsd	%xmm0, %xmm0
	addsd	%xmm0, %xmm1
	cmpq	$12, %rcx
	jne	.L142
	movaps	%xmm1, %xmm0
	movq	%rdx, -688(%rbp)
	movsd	%xmm2, -680(%rbp)
	call	sqrt@PLT
	movsd	-680(%rbp), %xmm2
	movq	-688(%rbp), %rdx
	addsd	%xmm0, %xmm2
	incq	%rdx
	jmp	.L151
.L203:
	movq	-664(%rbp), %rdx
	imulq	$6, %rbx, %rax
	xorl	%r8d, %r8d
	xorl	%ecx, %ecx
	movl	$-1, cls(%rip)
	imulq	%rbx, %rdx
	movq	%rax, -680(%rbp)
	imulq	$24, %rdx, %rdx
	leaq	(%r14,%rdx), %rax
	movq	%rax, -688(%rbp)
.L144:
	movq	-688(%rbp), %r9
	movq	%r8, %rdi
	xorl	%esi, %esi
	xorps	%xmm1, %xmm1
.L150:
	cmpq	%rsi, %rbx
	jle	.L204
	movq	(%r9), %r10
	leaq	0(%r13,%rdi,4), %r11
	xorl	%edx, %edx
	xorps	%xmm3, %xmm3
.L145:
	movsd	16(%r10,%rdx,8), %xmm0
	cvtss2sd	(%r11,%rdx,4), %xmm4
	incq	%rdx
	subsd	%xmm4, %xmm0
	mulsd	%xmm0, %xmm0
	addsd	%xmm0, %xmm3
	cmpq	$3, %rdx
	jne	.L145
	movaps	%xmm3, %xmm0
	movq	%rdi, -744(%rbp)
	movq	%r9, -736(%rbp)
	movq	%r8, -728(%rbp)
	movq	%rsi, -720(%rbp)
	movq	%rcx, -696(%rbp)
	movsd	%xmm1, -712(%rbp)
	movsd	%xmm2, -704(%rbp)
	call	sqrt@PLT
	movsd	-712(%rbp), %xmm1
	movq	-720(%rbp), %rsi
	movq	-744(%rbp), %rdi
	movq	-736(%rbp), %r9
	addsd	%xmm0, %xmm1
	movq	-728(%rbp), %r8
	incq	%rsi
	movsd	-704(%rbp), %xmm2
	movq	-696(%rbp), %rcx
	addq	%rbx, %rdi
	addq	$24, %r9
	jmp	.L150
.L202:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	leaq	_ZSt4cout(%rip), %r14
.L153:
	movl	(%r15,%rbx,4), %esi
	movl	$1, %eax
	cmpl	(%r12,%rbx,4), %esi
	movq	%r14, %rdi
	cmovne	%eax, %r13d
	call	_ZNSolsEi@PLT
	movq	%rax, %rdi
	leaq	.LC12(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	(%r12,%rbx,4), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	incq	%rbx
	cmpq	$100, %rbx
	jne	.L153
	decl	%r13d
	je	.L154
.L155:
	xorl	%ebx, %ebx
	jmp	.L113
.L154:
	leaq	.LC13(%rip), %rsi
	movq	%r14, %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
.LEHE11:
	jmp	.L155
.L113:
	leaq	-576(%rbp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	leaq	-600(%rbp), %rdi
	call	_ZNSt6vectorIS_IdSaIdEESaIS1_EED1Ev
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	je	.L159
	jmp	.L183
.L166:
	endbr64
	movq	%rax, %rbx
.L156:
	leaq	-576(%rbp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L157
.L165:
	endbr64
	movq	%rax, %rbx
.L157:
	leaq	-600(%rbp), %rdi
	call	_ZNSt6vectorIS_IdSaIdEESaIS1_EED1Ev
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L183
	movq	%rbx, %rdi
.LEHB12:
	call	_Unwind_Resume@PLT
.LEHE12:
.L183:
	call	__stack_chk_fail@PLT
.L159:
	leaq	-40(%rbp), %rsp
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4199:
	.section	.gcc_except_table
.LLSDA4199:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4199-.LLSDACSB4199
.LLSDACSB4199:
	.uleb128 .LEHB10-.LFB4199
	.uleb128 .LEHE10-.LEHB10
	.uleb128 .L165-.LFB4199
	.uleb128 0
	.uleb128 .LEHB11-.LFB4199
	.uleb128 .LEHE11-.LEHB11
	.uleb128 .L166-.LFB4199
	.uleb128 0
	.uleb128 .LEHB12-.LFB4199
	.uleb128 .LEHE12-.LEHB12
	.uleb128 0
	.uleb128 0
.LLSDACSE4199:
	.section	.text.startup
	.size	main, .-main
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.globl	f
	.bss
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.globl	cluster_lambda
	.align 8
	.type	cluster_lambda, @object
	.size	cluster_lambda, 8
cluster_lambda:
	.zero	8
	.globl	cls
	.align 4
	.type	cls, @object
	.size	cls, 4
cls:
	.zero	4
	.globl	k_clus
	.align 4
	.type	k_clus, @object
	.size	k_clus, 4
k_clus:
	.zero	4
	.globl	max_energy_states
	.align 8
	.type	max_energy_states, @object
	.size	max_energy_states, 8
max_energy_states:
	.zero	8
	.globl	max_atoms
	.align 8
	.type	max_atoms, @object
	.size	max_atoms, 8
max_atoms:
	.zero	8
	.hidden	DW.ref.__gxx_personality_v0
	.weak	DW.ref.__gxx_personality_v0
	.section	.data.rel.local.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
	.align 8
	.type	DW.ref.__gxx_personality_v0, @object
	.size	DW.ref.__gxx_personality_v0, 8
DW.ref.__gxx_personality_v0:
	.quad	__gxx_personality_v0
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<iostream>
#include<string>
#include<malloc.h>
#include<fstream>
#include<sstream>
#include<vector>
#include<cmath>
#include<cstdio>
#include<stdlib.h>
#include<hip/hip_runtime.h>

#define MAX_CLUSTER_SIZE 6
#define BLOCK_SIZE 16
using namespace std;

typedef vector<double> record_t;
typedef vector<record_t> data_t;
long long int max_atoms=0;
long long int max_energy_states=0;
int k_clus,cls;
double cluster_lambda=0.0;
int f=0;
istream& operator >>(istream& ins, record_t &record)
{
	record.clear();
	string line;
	getline(ins,line);
	stringstream ss(line);
	string field;
	while(getline(ss,field,','))
	{
		stringstream fs(field);
		double d=0.0;
		fs>>d;
		record.push_back(d);
	}
	return ins;
}

istream& operator >> (istream& ins, data_t& data)
{
	data.clear();
	record_t record;
	while(ins>>record)
	{
		data.push_back(record);
	}
	return ins;
}

__global__ void findMeans(const float *cluster, const float *instance, int *rnk, const int num, const int clus_size, const int maxAtoms)
{
	int i = blockIdx.x * blockDim.x + threadIdx.x;
//	int i = threadIdx.x;
	if(i<num)
	{
		float min=0.0;
		for(int j=0;j<maxAtoms;j++)
		{
			float d=0.0;
			float s=0.0;
			for(int k=0;k<3;k++)
			{
				d=instance[(j*5)+k+2]-cluster[((0*clus_size)+j)*maxAtoms +k];
				s=s+(d*d);
			}
			s=sqrt(s);
			min+=s;
		}
		int cls=-1;
		for(int clus=0;clus<clus_size;clus++)
		{
			float val=0.0;
			for(int p=0;p<maxAtoms;p++)
			{
				float d=0.0;
				float s=0.0;
				for(int l=0;l<3;l++)
				{
					d=instance[((i*maxAtoms+p)*5)+l+2]-cluster[((clus*clus_size)+p)*maxAtoms +l];
					s=s+(d*d);
				}
				s=sqrt(s);
				val+=s;
			}
			if(val<=min)
			{
				cls=clus;
				min=val;
			}
		}
		rnk[i]=cls+1;
	}
}

int main(void)
{
	hipError_t err=hipSuccess;
	data_t data;
	ifstream infile("alanine.csv");
	infile>>data;
	if(!infile.eof())
	{
		cout<<"Error! Please check file.\n";
		return 1;
	}
	infile.close();
	cout<<"Number of rows in file : "<<data.size()<<endl;
	for(long long int i=0;i<data.size();i++)
	{
		if(i>0)
		{
			if(data[i][1]<data[i-1][1])
			{
				max_atoms=i;
				break;
			}
		}
	}
	cout<<"Number of atoms : "<<max_atoms<<endl;
	max_energy_states=data[data.size()-1][0];
//	max_energy_states=32;
	cout<<"Total number of conformations : "<<max_energy_states<<endl;
	
	//allocate host cluster
	int s = MAX_CLUSTER_SIZE*max_atoms*3;
	size_t sz = s*sizeof(float);
	float *host_cluster=(float *)malloc(sz);
	if(host_cluster==NULL)
		cout<<"Not able to allocate host cluster"<<endl;

	//Initializing host cluster
	for(int i=0;i<MAX_CLUSTER_SIZE;i++)
	{
		int clus_num=rand()%max_energy_states + 0;
		for(long long int ii=0;ii<max_atoms;ii++)
                {
                     for(int jj=0;jj<3;jj++)
                     {
                         host_cluster[((i*MAX_CLUSTER_SIZE)+ii)*max_atoms+jj]=data[clus_num*max_atoms+ii][jj+2];
                     }
                }
	}
	
	//allocate device cluster
	float *d_clus = NULL;
	hipMalloc((void **)&d_clus, sz);
	if(err!=hipSuccess)
	{
		cout<<"Failed to allocate cluster on device!\n";
		exit(EXIT_FAILURE);
	}

	//initializing device cluster
	hipMemcpy(d_clus, host_cluster, sz, hipMemcpyHostToDevice);
	if(err!=hipSuccess)
	{
		cout<<"Failed to copy cluster to device\n";
		exit(EXIT_FAILURE);
	}

	//allocate host instance
	float *host_instances;
	long int row=data.size();
	int col=5;
	long int size=row*col;
	host_instances=new float[size];
	for(long long int i=0;i<row;i++)
	{
		for(int j=0;j<col;j++)
		{
			host_instances[i*col+j]=data[i][j];
		}
	}

	//allocate device instance
	float *device_instances;
	err=hipMalloc((void **)&device_instances,size*sizeof(float));
	if(err!=hipSuccess)
	{
		cout<<"error allocating device instance"<<endl;
		exit(EXIT_FAILURE);
	}
	
	err=hipMemcpy(device_instances, host_instances, size*sizeof(float), hipMemcpyHostToDevice);
	if(err!=hipSuccess)

	{
                cout<<"error copying device instance"<<endl;
                exit(EXIT_FAILURE);
        }


	int *rnk_host;
	int rnk[max_energy_states];
	rnk_host=new int[max_energy_states];
	for(long long int i=0;i<max_energy_states;i++)
	{
                rnk_host[i]=0;
		rnk[i]=0;
	}
	int *rnk_device;
	err=hipMalloc((void **)&rnk_device,max_energy_states*sizeof(int));
	if(err!=hipSuccess)

	{
                cout<<"error allocating device rnk"<<endl;
                exit(EXIT_FAILURE);
        }

	err=hipMemcpy(rnk_device, rnk_host, max_energy_states*sizeof(int), hipMemcpyHostToDevice);
	if(err!=hipSuccess)

	{
                cout<<"error allocating device instance"<<endl;
                exit(EXIT_FAILURE);
        }

//	dim3 dimBlock(BLOCK_SIZE,BLOCK_SIZE);
	int num_blocks=(max_energy_states+511)/512;
	//while(1)
	//{
		findMeans<<<48,256>>>(d_clus, device_instances, rnk_device, max_energy_states, MAX_CLUSTER_SIZE, max_atoms);
		err=hipMemcpy(rnk_host, rnk_device, max_energy_states*sizeof(int), hipMemcpyDeviceToHost);
		if(err!=hipSuccess)
		{
	                cout<<"error allocating device rnk"<<endl;
        	        exit(EXIT_FAILURE);
        	}
		
	
	//while(1)
	//{
		//E - Step
		for(long long int j=0;j<max_energy_states;j++)
		{
			double min=0.0;
			for(long long int y=0;y<max_atoms;y++)
			{
				double d=0.0,s=0.0;
				for(int z=0;z<3;z++)
				{
					d=host_instances[(y*5)+z+2]-host_cluster[((0*MAX_CLUSTER_SIZE)+y)*max_atoms +z];
					s=s+(d*d);
				}
				s=sqrt(s);
				min+=s;
			}
			cls=-1;
			for(int clus=0;clus<MAX_CLUSTER_SIZE;clus++)
			{
				double val=0.0;
				for(long long int p=0;p<max_atoms;p++)
				{
					double d=0.0,s=0.0;
					for(int l=0;l<3;l++)
					{
						d=data[j*max_atoms+p][l+2]-host_cluster[((clus*MAX_CLUSTER_SIZE)+p)*max_atoms +l];
						s=s+(d*d);
					}
					s=sqrt(s);
					val+=s;
				}
				if(val<=min)
				{
					cls=clus;
					min=val;
				}
			}
			rnk[j]=cls+1;			
		}
		int flag=0;
		for(long int i=0;i<100;i++)
		{
			if(rnk[i]!=rnk_host[i])
				flag=1;
			cout<<rnk[i]<<"\t"<<rnk_host[i]<<endl;
		}
		if(flag==1)
			cout<<"Not Matching"<<endl;

/*
		//M - Step
		int sizes[MAX_CLUSTER_SIZE];
		for(int jj=0;jj<MAX_CLUSTER_SIZE;jj++)
			sizes[jj]=0;
		double means[MAX_CLUSTER_SIZE][max_atoms][3];
		for(int jj=0;jj<MAX_CLUSTER_SIZE;jj++)
		{
			for(long long int kk=0;kk<max_atoms;kk++)
			{
				for(int ll=0;ll<3;ll++)
				{
					means[jj][kk][ll]=0;
				}
			}
		}
		for(long long int jj=0;jj<max_energy_states;jj++)
		{
			for(long long int kk=0;kk<max_atoms;kk++)
			{
				for(int ll=0;ll<3;ll++)
				{
					double d=data[jj*max_atoms+kk][ll+2];
					means[rnk[jj]-1][kk][ll]+=d;
					sizes[rnk[jj]-1]++;
				}
			}
		}
		for(int jj=0;jj<MAX_CLUSTER_SIZE;jj++)
		{
			for(long long int kk=0;kk<max_atoms;kk++)
			{
				for(int ll=0;ll<3;ll++)
				{
					if(cluster[jj][kk][ll]!=means[jj][kk][ll]/sizes[jj])
					{
						f=1;
					}
					if(sizes[jj]!=0)
						cluster[jj][kk][ll]=means[jj][kk][ll]/sizes[jj];
					else
						cluster[jj][kk][ll]=0;
				}
			}
		}
		if(f==0)
			break;		
		f=0;
	}*/
	/*for(int i=0;i<max_energy_states;i++)
	{
		cout<<rnk_host[i]<<" ";
	}
	cout<<endl;*/
	return 0;
}

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

                                        # End of file scope inline assembly
	.globl	_ZrsRSiRSt6vectorIdSaIdEE       # -- Begin function _ZrsRSiRSt6vectorIdSaIdEE
	.type	_ZrsRSiRSt6vectorIdSaIdEE,@function
_ZrsRSiRSt6vectorIdSaIdEE:              # @_ZrsRSiRSt6vectorIdSaIdEE
.Lfunc_begin0:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception0
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$872, %rsp                      # imm = 0x368
	.cfi_def_cfa_offset 928
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rsi), %rax
	cmpq	%rax, 8(%rsi)
	je	.LBB0_2
# %bb.1:
	movq	%rax, 8(%r14)
.LBB0_2:                                # %_ZNSt6vectorIdSaIdEE5clearEv.exit
	leaq	40(%rsp), %rax
	movq	%rax, -16(%rax)
	movq	$0, -8(%rax)
	movb	$0, (%rax)
	movq	(%rbx), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
.Ltmp0:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp1:
# %bb.3:                                # %.noexc
.Ltmp2:
	movsbl	%al, %edx
	leaq	24(%rsp), %rsi
	movq	%rbx, %rdi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp3:
# %bb.4:                                # %_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE.exit
.Ltmp5:
	movq	%rbx, 16(%rsp)                  # 8-byte Spill
	leaq	88(%rsp), %rdi
	leaq	24(%rsp), %rsi
	movl	$24, %edx
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode
.Ltmp6:
# %bb.5:
	leaq	72(%rsp), %rax
	movq	%rax, -16(%rax)
	movq	$0, -8(%rax)
	movb	$0, (%rax)
	leaq	608(%rsp), %r15
	leaq	88(%rsp), %r12
	leaq	56(%rsp), %r13
	leaq	480(%rsp), %rbp
	leaq	8(%rsp), %rbx
.LBB0_6:                                # =>This Inner Loop Header: Depth=1
.Ltmp8:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	$44, %edx
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp9:
# %bb.7:                                #   in Loop: Header=BB0_6 Depth=1
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	testb	$5, 32(%rax,%rcx)
	jne	.LBB0_14
# %bb.8:                                #   in Loop: Header=BB0_6 Depth=1
.Ltmp11:
	movq	%rbp, %rdi
	movq	%r13, %rsi
	movl	$24, %edx
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode
.Ltmp12:
# %bb.9:                                #   in Loop: Header=BB0_6 Depth=1
	movq	$0, 8(%rsp)
.Ltmp14:
	movq	%rbp, %rdi
	movq	%rbx, %rsi
	callq	_ZNSi10_M_extractIdEERSiRT_
.Ltmp15:
# %bb.10:                               # %_ZNSirsERd.exit
                                        #   in Loop: Header=BB0_6 Depth=1
	movq	8(%r14), %rsi
	cmpq	16(%r14), %rsi
	je	.LBB0_12
# %bb.11:                               #   in Loop: Header=BB0_6 Depth=1
	movsd	8(%rsp), %xmm0                  # xmm0 = mem[0],zero
	movsd	%xmm0, (%rsi)
	addq	$8, %rsi
	movq	%rsi, 8(%r14)
	jmp	.LBB0_13
.LBB0_12:                               #   in Loop: Header=BB0_6 Depth=1
.Ltmp16:
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_
.Ltmp17:
.LBB0_13:                               # %_ZNSt6vectorIdSaIdEE9push_backERKd.exit
                                        #   in Loop: Header=BB0_6 Depth=1
	movl	$_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE, %esi
	movq	%rbp, %rdi
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev
	movq	%r15, %rdi
	callq	_ZNSt8ios_baseD2Ev
	jmp	.LBB0_6
.LBB0_14:
	movq	56(%rsp), %rdi
	leaq	72(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_16
# %bb.15:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB0_16:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	leaq	88(%rsp), %rdi
	movl	$_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE, %esi
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev
	leaq	216(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
	movq	24(%rsp), %rdi
	leaq	40(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_18
# %bb.17:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i17
	callq	_ZdlPv
.LBB0_18:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit19
	movq	16(%rsp), %rax                  # 8-byte Reload
	addq	$872, %rsp                      # imm = 0x368
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB0_19:
	.cfi_def_cfa_offset 928
.Ltmp7:
	jmp	.LBB0_21
.LBB0_20:
.Ltmp4:
.LBB0_21:
	movq	%rax, %rbx
	jmp	.LBB0_29
.LBB0_22:
.Ltmp13:
	jmp	.LBB0_24
.LBB0_23:
.Ltmp10:
.LBB0_24:
	movq	%rax, %rbx
	jmp	.LBB0_26
.LBB0_25:
.Ltmp18:
	movq	%rax, %rbx
	leaq	480(%rsp), %rdi
	movl	$_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE, %esi
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev
	movq	%r15, %rdi
	callq	_ZNSt8ios_baseD2Ev
.LBB0_26:
	movq	56(%rsp), %rdi
	leaq	72(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_28
# %bb.27:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i20
	callq	_ZdlPv
.LBB0_28:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit22
	leaq	88(%rsp), %rdi
	movl	$_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE, %esi
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev
	leaq	216(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
.LBB0_29:
	movq	24(%rsp), %rdi
	leaq	40(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_31
# %bb.30:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i23
	callq	_ZdlPv
.LBB0_31:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit25
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end0:
	.size	_ZrsRSiRSt6vectorIdSaIdEE, .Lfunc_end0-_ZrsRSiRSt6vectorIdSaIdEE
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table0:
.Lexception0:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end0-.Lcst_begin0
.Lcst_begin0:
	.uleb128 .Ltmp0-.Lfunc_begin0           # >> Call Site 1 <<
	.uleb128 .Ltmp3-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp3
	.uleb128 .Ltmp4-.Lfunc_begin0           #     jumps to .Ltmp4
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp5-.Lfunc_begin0           # >> Call Site 2 <<
	.uleb128 .Ltmp6-.Ltmp5                  #   Call between .Ltmp5 and .Ltmp6
	.uleb128 .Ltmp7-.Lfunc_begin0           #     jumps to .Ltmp7
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp8-.Lfunc_begin0           # >> Call Site 3 <<
	.uleb128 .Ltmp9-.Ltmp8                  #   Call between .Ltmp8 and .Ltmp9
	.uleb128 .Ltmp10-.Lfunc_begin0          #     jumps to .Ltmp10
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp11-.Lfunc_begin0          # >> Call Site 4 <<
	.uleb128 .Ltmp12-.Ltmp11                #   Call between .Ltmp11 and .Ltmp12
	.uleb128 .Ltmp13-.Lfunc_begin0          #     jumps to .Ltmp13
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp14-.Lfunc_begin0          # >> Call Site 5 <<
	.uleb128 .Ltmp17-.Ltmp14                #   Call between .Ltmp14 and .Ltmp17
	.uleb128 .Ltmp18-.Lfunc_begin0          #     jumps to .Ltmp18
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp17-.Lfunc_begin0          # >> Call Site 6 <<
	.uleb128 .Lfunc_end0-.Ltmp17            #   Call between .Ltmp17 and .Lfunc_end0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.text
	.globl	_ZrsRSiRSt6vectorIS0_IdSaIdEESaIS2_EE # -- Begin function _ZrsRSiRSt6vectorIS0_IdSaIdEESaIS2_EE
	.type	_ZrsRSiRSt6vectorIS0_IdSaIdEESaIS2_EE,@function
_ZrsRSiRSt6vectorIS0_IdSaIdEESaIS2_EE:  # @_ZrsRSiRSt6vectorIS0_IdSaIdEESaIS2_EE
.Lfunc_begin1:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception1
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_ZNSt6vectorIS_IdSaIdEESaIS1_EE5clearEv
	xorps	%xmm0, %xmm0
	movq	%rsp, %r15
	movaps	%xmm0, (%r15)
	movq	$0, 16(%r15)
.LBB1_1:                                # =>This Inner Loop Header: Depth=1
.Ltmp19:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ZrsRSiRSt6vectorIdSaIdEE
.Ltmp20:
# %bb.2:                                #   in Loop: Header=BB1_1 Depth=1
	movq	(%rbx), %rax
	movq	-24(%rax), %rax
	testb	$5, 32(%rbx,%rax)
	jne	.LBB1_7
# %bb.3:                                #   in Loop: Header=BB1_1 Depth=1
.Ltmp21:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ZNSt6vectorIS_IdSaIdEESaIS1_EE9push_backERKS1_
.Ltmp22:
	jmp	.LBB1_1
.LBB1_7:
	movq	(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB1_9
# %bb.8:
	callq	_ZdlPv
.LBB1_9:                                # %_ZNSt6vectorIdSaIdEED2Ev.exit6
	movq	%rbx, %rax
	addq	$32, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.LBB1_4:
	.cfi_def_cfa_offset 64
.Ltmp23:
	movq	%rax, %rbx
	movq	(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB1_6
# %bb.5:
	callq	_ZdlPv
.LBB1_6:                                # %_ZNSt6vectorIdSaIdEED2Ev.exit
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end1:
	.size	_ZrsRSiRSt6vectorIS0_IdSaIdEESaIS2_EE, .Lfunc_end1-_ZrsRSiRSt6vectorIS0_IdSaIdEESaIS2_EE
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table1:
.Lexception1:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end1-.Lcst_begin1
.Lcst_begin1:
	.uleb128 .Ltmp19-.Lfunc_begin1          # >> Call Site 1 <<
	.uleb128 .Ltmp22-.Ltmp19                #   Call between .Ltmp19 and .Ltmp22
	.uleb128 .Ltmp23-.Lfunc_begin1          #     jumps to .Ltmp23
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp22-.Lfunc_begin1          # >> Call Site 2 <<
	.uleb128 .Lfunc_end1-.Ltmp22            #   Call between .Ltmp22 and .Lfunc_end1
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end1:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt6vectorIS_IdSaIdEESaIS1_EE5clearEv,"axG",@progbits,_ZNSt6vectorIS_IdSaIdEESaIS1_EE5clearEv,comdat
	.weak	_ZNSt6vectorIS_IdSaIdEESaIS1_EE5clearEv # -- Begin function _ZNSt6vectorIS_IdSaIdEESaIS1_EE5clearEv
	.p2align	1, 0x90
	.type	_ZNSt6vectorIS_IdSaIdEESaIS1_EE5clearEv,@function
_ZNSt6vectorIS_IdSaIdEESaIS1_EE5clearEv: # @_ZNSt6vectorIS_IdSaIdEESaIS1_EE5clearEv
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	(%rdi), %r14
	movq	8(%rdi), %r15
	cmpq	%r14, %r15
	je	.LBB2_6
# %bb.1:                                # %.lr.ph.i.i.i.i.preheader
	movq	%rdi, %rbx
	movq	%r14, %r12
.LBB2_2:                                # %.lr.ph.i.i.i.i
                                        # =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	.LBB2_4
# %bb.3:                                #   in Loop: Header=BB2_2 Depth=1
	callq	_ZdlPv
.LBB2_4:                                # %_ZSt8_DestroyISt6vectorIdSaIdEEEvPT_.exit.i.i.i.i
                                        #   in Loop: Header=BB2_2 Depth=1
	addq	$24, %r12
	cmpq	%r15, %r12
	jne	.LBB2_2
# %bb.5:                                # %_ZSt8_DestroyIPSt6vectorIdSaIdEES2_EvT_S4_RSaIT0_E.exit.i
	movq	%r14, 8(%rbx)
.LBB2_6:                                # %_ZNSt6vectorIS_IdSaIdEESaIS1_EE15_M_erase_at_endEPS1_.exit
	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_end2:
	.size	_ZNSt6vectorIS_IdSaIdEESaIS1_EE5clearEv, .Lfunc_end2-_ZNSt6vectorIS_IdSaIdEESaIS1_EE5clearEv
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorIS_IdSaIdEESaIS1_EE9push_backERKS1_,"axG",@progbits,_ZNSt6vectorIS_IdSaIdEESaIS1_EE9push_backERKS1_,comdat
	.weak	_ZNSt6vectorIS_IdSaIdEESaIS1_EE9push_backERKS1_ # -- Begin function _ZNSt6vectorIS_IdSaIdEESaIS1_EE9push_backERKS1_
	.p2align	1, 0x90
	.type	_ZNSt6vectorIS_IdSaIdEESaIS1_EE9push_backERKS1_,@function
_ZNSt6vectorIS_IdSaIdEESaIS1_EE9push_backERKS1_: # @_ZNSt6vectorIS_IdSaIdEESaIS1_EE9push_backERKS1_
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	%rsi, %rdx
	movq	%rdi, %rbx
	movq	8(%rdi), %rsi
	cmpq	16(%rdi), %rsi
	je	.LBB3_2
# %bb.1:
	movq	%rsi, %rdi
	movq	%rdx, %rsi
	callq	_ZNSt6vectorIdSaIdEEC2ERKS1_
	addq	$24, 8(%rbx)
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.LBB3_2:
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	_ZNSt6vectorIS_IdSaIdEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_ # TAILCALL
.Lfunc_end3:
	.size	_ZNSt6vectorIS_IdSaIdEESaIS1_EE9push_backERKS1_, .Lfunc_end3-_ZNSt6vectorIS_IdSaIdEESaIS1_EE9push_backERKS1_
	.cfi_endproc
                                        # -- End function
	.text
	.globl	_Z24__device_stub__findMeansPKfS0_Piiii # -- Begin function _Z24__device_stub__findMeansPKfS0_Piiii
	.type	_Z24__device_stub__findMeansPKfS0_Piiii,@function
_Z24__device_stub__findMeansPKfS0_Piiii: # @_Z24__device_stub__findMeansPKfS0_Piiii
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$144, %rsp
	.cfi_def_cfa_offset 192
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	56(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	48(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	20(%rsp), %rdx
	movl	%ecx, (%rdx)
	leaq	16(%rsp), %rcx
	movl	%r8d, (%rcx)
	leaq	12(%rsp), %r8
	movl	%r9d, (%r8)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	movq	%r8, 40(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	32(%rsp), %r12
	leaq	24(%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	$_Z9findMeansPKfS0_Piiii, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$160, %rsp
	.cfi_adjust_cfa_offset -160
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end4:
	.size	_Z24__device_stub__findMeansPKfS0_Piiii, .Lfunc_end4-_Z24__device_stub__findMeansPKfS0_Piiii
	.cfi_endproc
                                        # -- End function
	.globl	main                            # -- Begin function main
	.type	main,@function
main:                                   # @main
.Lfunc_begin2:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception2
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$632, %rsp                      # imm = 0x278
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorpd	%xmm0, %xmm0
	movapd	%xmm0, -96(%rbp)
	movq	$0, -80(%rbp)
.Ltmp24:
	leaq	-664(%rbp), %rdi
	movl	$.L.str, %esi
	movl	$8, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
.Ltmp25:
# %bb.1:
.Ltmp27:
	leaq	-664(%rbp), %rdi
	leaq	-96(%rbp), %rsi
	callq	_ZrsRSiRSt6vectorIS0_IdSaIdEESaIS2_EE
.Ltmp28:
# %bb.2:
	movq	-664(%rbp), %rax
	movq	-24(%rax), %rax
	testb	$2, -632(%rbp,%rax)
	jne	.LBB5_5
# %bb.3:
	movl	$1, %ebx
.Ltmp140:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.1, %esi
	movl	$26, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp141:
	jmp	.LBB5_91
.LBB5_5:
.Ltmp29:
	leaq	-664(%rbp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv
.Ltmp30:
# %bb.6:
.Ltmp31:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.2, %esi
	movl	$25, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp32:
# %bb.7:                                # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit167
	movq	-88(%rbp), %rsi
	subq	-96(%rbp), %rsi
	sarq	$3, %rsi
	movabsq	$-6148914691236517205, %r12     # imm = 0xAAAAAAAAAAAAAAAB
	imulq	%r12, %rsi
.Ltmp33:
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertImEERSoT_
.Ltmp34:
# %bb.8:                                # %_ZNSolsEm.exit
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
.Ltmp35:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp36:
# %bb.9:                                # %.noexc
.Ltmp37:
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
.Ltmp38:
# %bb.10:                               # %.noexc189
.Ltmp39:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp40:
# %bb.11:                               # %_ZNSolsEPFRSoS_E.exit.preheader
	movq	-96(%rbp), %rax
	movq	-88(%rbp), %rcx
	subq	%rax, %rcx
	je	.LBB5_17
# %bb.12:                               # %.lr.ph.preheader
	sarq	$3, %rcx
	imulq	%r12, %rcx
	cmpq	$1, %rcx
	adcq	$0, %rcx
	xorl	%edx, %edx
.LBB5_13:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	testq	%rdx, %rdx
	je	.LBB5_16
# %bb.14:                               #   in Loop: Header=BB5_13 Depth=1
	movq	-24(%rax), %rsi
	movq	(%rax), %rdi
	movsd	8(%rsi), %xmm0                  # xmm0 = mem[0],zero
	ucomisd	8(%rdi), %xmm0
	ja	.LBB5_15
.LBB5_16:                               # %_ZNSolsEPFRSoS_E.exit
                                        #   in Loop: Header=BB5_13 Depth=1
	incq	%rdx
	addq	$24, %rax
	cmpq	%rdx, %rcx
	jne	.LBB5_13
	jmp	.LBB5_17
.LBB5_15:
	movq	%rdx, max_atoms(%rip)
.LBB5_17:                               # %.loopexit
.Ltmp41:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.3, %esi
	movl	$18, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp42:
# %bb.18:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit168
	movq	max_atoms(%rip), %rsi
.Ltmp43:
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIxEERSoT_
.Ltmp44:
# %bb.19:                               # %_ZNSolsEx.exit
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
.Ltmp45:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp46:
# %bb.20:                               # %.noexc191
.Ltmp47:
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
.Ltmp48:
# %bb.21:                               # %.noexc192
.Ltmp49:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp50:
# %bb.22:                               # %_ZNSolsEPFRSoS_E.exit169
	movq	-88(%rbp), %rax
	movq	-24(%rax), %rax
	cvttsd2si	(%rax), %rax
	movq	%rax, max_energy_states(%rip)
.Ltmp51:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.4, %esi
	movl	$32, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp52:
# %bb.23:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit170
	movq	max_energy_states(%rip), %rsi
.Ltmp53:
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIxEERSoT_
.Ltmp54:
# %bb.24:                               # %_ZNSolsEx.exit171
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
.Ltmp55:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp56:
# %bb.25:                               # %.noexc195
.Ltmp57:
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
.Ltmp58:
# %bb.26:                               # %.noexc196
.Ltmp59:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp60:
# %bb.27:                               # %_ZNSolsEPFRSoS_E.exit172
	movq	max_atoms(%rip), %rax
	shlq	$33, %rax
	leaq	(%rax,%rax,8), %r14
	sarq	$30, %r14
	movq	%r14, %rdi
	callq	malloc
	movq	%rax, -72(%rbp)                 # 8-byte Spill
	testq	%rax, %rax
	jne	.LBB5_28
# %bb.48:
.Ltmp61:
	movl	$_ZSt4cout, %r15d
	movl	$_ZSt4cout, %edi
	movl	$.L.str.5, %esi
	movl	$33, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp62:
# %bb.49:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit173
	movq	_ZSt4cout(%rip), %rax
	addq	-24(%rax), %r15
.Ltmp63:
	movq	%r15, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp64:
# %bb.50:                               # %.noexc199
.Ltmp65:
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
.Ltmp66:
# %bb.51:                               # %.noexc200
.Ltmp67:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp68:
.LBB5_28:                               # %_ZNSolsEPFRSoS_E.exit174.preheader
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
.LBB5_29:                               # %_ZNSolsEPFRSoS_E.exit174
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB5_31 Depth 2
                                        #       Child Loop BB5_32 Depth 3
	callq	rand
	movq	max_atoms(%rip), %rcx
	testq	%rcx, %rcx
	jle	.LBB5_34
# %bb.30:                               # %.preheader223.lr.ph
                                        #   in Loop: Header=BB5_29 Depth=1
	cltq
	cqto
	idivq	max_energy_states(%rip)
	imulq	%rcx, %rdx
	leaq	(%rdx,%rdx,2), %rax
	shlq	$3, %rax
	addq	-96(%rbp), %rax
	movq	%rcx, %rdx
	imulq	%rbx, %rdx
	addq	-72(%rbp), %rdx                 # 8-byte Folded Reload
	leaq	(,%rcx,4), %rsi
	xorl	%edi, %edi
.LBB5_31:                               # %.preheader223
                                        #   Parent Loop BB5_29 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB5_32 Depth 3
	leaq	(%rdi,%rdi,2), %r8
	movq	(%rax,%r8,8), %r8
	xorl	%r9d, %r9d
.LBB5_32:                               #   Parent Loop BB5_29 Depth=1
                                        #     Parent Loop BB5_31 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	xorps	%xmm0, %xmm0
	cvtsd2ss	16(%r8,%r9,8), %xmm0
	movss	%xmm0, (%rdx,%r9,4)
	incq	%r9
	cmpq	$3, %r9
	jne	.LBB5_32
# %bb.33:                               #   in Loop: Header=BB5_31 Depth=2
	incq	%rdi
	addq	%rsi, %rdx
	cmpq	%rcx, %rdi
	jne	.LBB5_31
.LBB5_34:                               # %._crit_edge
                                        #   in Loop: Header=BB5_29 Depth=1
	incq	%r15
	addq	$24, %rbx
	cmpq	$6, %r15
	jne	.LBB5_29
# %bb.35:
	leaq	-120(%rbp), %rdi
	movq	$0, (%rdi)
.Ltmp70:
	movq	%r14, %rsi
	callq	hipMalloc
.Ltmp71:
# %bb.36:
	movq	-120(%rbp), %rdi
.Ltmp72:
	movq	-72(%rbp), %rsi                 # 8-byte Reload
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp73:
# %bb.37:
	movq	-96(%rbp), %rbx
	movq	-88(%rbp), %r13
	subq	%rbx, %r13
	movq	%r13, %r15
	sarq	$3, %r15
	movabsq	$6148914691236517207, %rax      # imm = 0x5555555555555557
	imulq	%r15, %rax
	shrq	$62, %rax
	movabsq	$6148914691236517212, %r14      # imm = 0x555555555555555C
	imulq	%r15, %r14
	xorl	%edi, %edi
	negq	%rax
	sbbq	%rdi, %rdi
	orq	%r14, %rdi
.Ltmp75:
	callq	_Znam
	movq	%rax, -64(%rbp)                 # 8-byte Spill
.Ltmp76:
# %bb.38:                               # %.preheader222
	testq	%r13, %r13
	jle	.LBB5_43
# %bb.39:                               # %.preheader221.preheader
	imulq	%r12, %r15
	cmpq	$2, %r15
	movl	$1, %eax
	cmovgeq	%r15, %rax
	xorl	%ecx, %ecx
	movq	-64(%rbp), %rdx                 # 8-byte Reload
.LBB5_40:                               # %.preheader221
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB5_41 Depth 2
	leaq	(%rcx,%rcx,2), %rsi
	movq	(%rbx,%rsi,8), %rsi
	xorl	%edi, %edi
.LBB5_41:                               #   Parent Loop BB5_40 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	xorps	%xmm0, %xmm0
	cvtsd2ss	(%rsi,%rdi,8), %xmm0
	movss	%xmm0, (%rdx,%rdi,4)
	incq	%rdi
	cmpq	$5, %rdi
	jne	.LBB5_41
# %bb.42:                               #   in Loop: Header=BB5_40 Depth=1
	incq	%rcx
	addq	$20, %rdx
	cmpq	%rax, %rcx
	jne	.LBB5_40
.LBB5_43:                               # %._crit_edge234
.Ltmp78:
	leaq	-112(%rbp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
.Ltmp79:
# %bb.44:
	testl	%eax, %eax
	jne	.LBB5_45
# %bb.55:
	movq	-112(%rbp), %rdi
.Ltmp84:
	movq	-64(%rbp), %rsi                 # 8-byte Reload
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp85:
# %bb.56:
	testl	%eax, %eax
	jne	.LBB5_57
# %bb.59:
	movq	%rsp, %r14
	movabsq	$4611686018427387903, %rax      # imm = 0x3FFFFFFFFFFFFFFF
	movq	max_energy_states(%rip), %rcx
	movq	%rsp, %r12
	leaq	15(,%rcx,4), %rcx
	andq	$-16, %rcx
	subq	%rcx, %r12
	movq	%r12, %rsp
	movq	max_energy_states(%rip), %rbx
	leaq	(,%rbx,4), %r13
	cmpq	%rax, %rbx
	movq	$-1, %rdi
	cmovbeq	%r13, %rdi
.Ltmp91:
	callq	_Znam
	movq	%rax, -48(%rbp)                 # 8-byte Spill
.Ltmp92:
# %bb.60:                               # %.preheader220
	testq	%rbx, %rbx
	jle	.LBB5_62
# %bb.61:                               # %.lr.ph236.preheader
	movq	-48(%rbp), %rdi                 # 8-byte Reload
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	memset@PLT
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	memset@PLT
.LBB5_62:                               # %._crit_edge237
.Ltmp94:
	leaq	-104(%rbp), %rdi
	movq	%r13, %rsi
	callq	hipMalloc
.Ltmp95:
# %bb.63:
	testl	%eax, %eax
	jne	.LBB5_64
# %bb.67:
	movq	-104(%rbp), %rdi
	movq	max_energy_states(%rip), %rdx
	shlq	$2, %rdx
.Ltmp100:
	movq	-48(%rbp), %rsi                 # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp101:
# %bb.68:
	testl	%eax, %eax
	jne	.LBB5_69
# %bb.71:
.Ltmp107:
	movabsq	$4294967344, %rdi               # imm = 0x100000030
	movabsq	$4294967552, %rdx               # imm = 0x100000100
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp108:
# %bb.72:
	testl	%eax, %eax
	jne	.LBB5_74
# %bb.73:
	movq	-120(%rbp), %rdi
	movq	-112(%rbp), %rsi
	movq	-104(%rbp), %rdx
	movl	max_energy_states(%rip), %ecx
	movl	max_atoms(%rip), %r9d
.Ltmp109:
	movl	$6, %r8d
	callq	_Z24__device_stub__findMeansPKfS0_Piiii
.Ltmp110:
.LBB5_74:
	movq	-104(%rbp), %rsi
	movq	max_energy_states(%rip), %rdx
	shlq	$2, %rdx
.Ltmp111:
	movq	-48(%rbp), %rdi                 # 8-byte Reload
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp112:
# %bb.75:
	testl	%eax, %eax
	jne	.LBB5_92
# %bb.76:                               # %.preheader219
	movq	%r14, -128(%rbp)                # 8-byte Spill
	cmpq	$0, max_energy_states(%rip)
	jle	.LBB5_77
# %bb.94:                               # %.preheader218.lr.ph
	addq	$8, -64(%rbp)                   # 8-byte Folded Spill
	movq	max_atoms(%rip), %rax
	xorl	%r13d, %r13d
	xorpd	%xmm3, %xmm3
	movq	%r12, -136(%rbp)                # 8-byte Spill
.LBB5_95:                               # %.preheader218
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB5_98 Depth 2
                                        #       Child Loop BB5_99 Depth 3
                                        #     Child Loop BB5_105 Depth 2
                                        #       Child Loop BB5_107 Depth 3
                                        #         Child Loop BB5_108 Depth 4
	xorpd	%xmm0, %xmm0
	testq	%rax, %rax
	jle	.LBB5_96
# %bb.97:                               # %.preheader217.preheader
                                        #   in Loop: Header=BB5_95 Depth=1
	movsd	%xmm0, -56(%rbp)                # 8-byte Spill
	movq	-64(%rbp), %rbx                 # 8-byte Reload
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
.LBB5_98:                               # %.preheader217
                                        #   Parent Loop BB5_95 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB5_99 Depth 3
	imulq	%r14, %rax
	addq	-72(%rbp), %rax                 # 8-byte Folded Reload
	xorl	%ecx, %ecx
	xorpd	%xmm0, %xmm0
.LBB5_99:                               #   Parent Loop BB5_95 Depth=1
                                        #     Parent Loop BB5_98 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movss	(%rbx,%rcx,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	subss	(%rax,%rcx,4), %xmm1
	cvtss2sd	%xmm1, %xmm1
	mulsd	%xmm1, %xmm1
	addsd	%xmm1, %xmm0
	incq	%rcx
	cmpq	$3, %rcx
	jne	.LBB5_99
# %bb.100:                              #   in Loop: Header=BB5_98 Depth=2
	ucomisd	%xmm3, %xmm0
	jb	.LBB5_102
# %bb.101:                              #   in Loop: Header=BB5_98 Depth=2
	sqrtsd	%xmm0, %xmm0
	jmp	.LBB5_103
.LBB5_102:                              # %call.sqrt
                                        #   in Loop: Header=BB5_98 Depth=2
	callq	sqrt
	xorpd	%xmm3, %xmm3
.LBB5_103:                              # %.split
                                        #   in Loop: Header=BB5_98 Depth=2
	movsd	-56(%rbp), %xmm1                # 8-byte Reload
                                        # xmm1 = mem[0],zero
	addsd	%xmm0, %xmm1
	movsd	%xmm1, -56(%rbp)                # 8-byte Spill
	incq	%r15
	movq	max_atoms(%rip), %rax
	addq	$4, %r14
	addq	$20, %rbx
	cmpq	%rax, %r15
	jl	.LBB5_98
	jmp	.LBB5_104
.LBB5_96:                               #   in Loop: Header=BB5_95 Depth=1
	movsd	%xmm0, -56(%rbp)                # 8-byte Spill
.LBB5_104:                              # %._crit_edge246
                                        #   in Loop: Header=BB5_95 Depth=1
	movl	$-1, cls(%rip)
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
.LBB5_105:                              # %.preheader216
                                        #   Parent Loop BB5_95 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB5_107 Depth 3
                                        #         Child Loop BB5_108 Depth 4
	xorpd	%xmm4, %xmm4
	testq	%rax, %rax
	jle	.LBB5_113
# %bb.106:                              # %.preheader215.lr.ph
                                        #   in Loop: Header=BB5_105 Depth=2
	movq	%r12, %r15
	xorl	%ebx, %ebx
.LBB5_107:                              # %.preheader215
                                        #   Parent Loop BB5_95 Depth=1
                                        #     Parent Loop BB5_105 Depth=2
                                        # =>    This Loop Header: Depth=3
                                        #         Child Loop BB5_108 Depth 4
	movq	%rax, %rcx
	imulq	%r13, %rcx
	leaq	(%rcx,%rcx,2), %rcx
	shlq	$3, %rcx
	addq	-96(%rbp), %rcx
	leaq	(%rbx,%rbx,2), %rdx
	movq	(%rcx,%rdx,8), %rcx
	imulq	%r15, %rax
	addq	-72(%rbp), %rax                 # 8-byte Folded Reload
	xorl	%edx, %edx
	xorpd	%xmm0, %xmm0
.LBB5_108:                              #   Parent Loop BB5_95 Depth=1
                                        #     Parent Loop BB5_105 Depth=2
                                        #       Parent Loop BB5_107 Depth=3
                                        # =>      This Inner Loop Header: Depth=4
	movsd	16(%rcx,%rdx,8), %xmm1          # xmm1 = mem[0],zero
	xorps	%xmm2, %xmm2
	cvtss2sd	(%rax,%rdx,4), %xmm2
	subsd	%xmm2, %xmm1
	mulsd	%xmm1, %xmm1
	addsd	%xmm1, %xmm0
	incq	%rdx
	cmpq	$3, %rdx
	jne	.LBB5_108
# %bb.109:                              #   in Loop: Header=BB5_107 Depth=3
	ucomisd	%xmm3, %xmm0
	jb	.LBB5_111
# %bb.110:                              #   in Loop: Header=BB5_107 Depth=3
	sqrtsd	%xmm0, %xmm0
	jmp	.LBB5_112
.LBB5_111:                              # %call.sqrt351
                                        #   in Loop: Header=BB5_107 Depth=3
	movsd	%xmm4, -144(%rbp)               # 8-byte Spill
	callq	sqrt
	movsd	-144(%rbp), %xmm4               # 8-byte Reload
                                        # xmm4 = mem[0],zero
	xorpd	%xmm3, %xmm3
.LBB5_112:                              # %.split350
                                        #   in Loop: Header=BB5_107 Depth=3
	addsd	%xmm0, %xmm4
	incq	%rbx
	movq	max_atoms(%rip), %rax
	addq	$4, %r15
	cmpq	%rax, %rbx
	jl	.LBB5_107
.LBB5_113:                              # %._crit_edge253
                                        #   in Loop: Header=BB5_105 Depth=2
	movsd	-56(%rbp), %xmm0                # 8-byte Reload
                                        # xmm0 = mem[0],zero
	ucomisd	%xmm4, %xmm0
	jb	.LBB5_115
# %bb.114:                              #   in Loop: Header=BB5_105 Depth=2
	movl	%r14d, cls(%rip)
	movsd	%xmm4, -56(%rbp)                # 8-byte Spill
.LBB5_115:                              #   in Loop: Header=BB5_105 Depth=2
	incq	%r14
	addq	$24, %r12
	cmpq	$6, %r14
	jne	.LBB5_105
# %bb.116:                              #   in Loop: Header=BB5_95 Depth=1
	movl	cls(%rip), %ecx
	incl	%ecx
	movq	-136(%rbp), %r12                # 8-byte Reload
	movl	%ecx, (%r12,%r13,4)
	incq	%r13
	cmpq	max_energy_states(%rip), %r13
	jl	.LBB5_95
.LBB5_77:                               # %.preheader.preheader
	xorl	%r14d, %r14d
	movl	$1, %r15d
	xorl	%r13d, %r13d
.LBB5_78:                               # %.preheader
                                        # =>This Inner Loop Header: Depth=1
	movl	(%r12,%r14,4), %esi
	movq	-48(%rbp), %rax                 # 8-byte Reload
	cmpl	(%rax,%r14,4), %esi
	cmovnel	%r15d, %r13d
.Ltmp118:
	movl	$_ZSt4cout, %edi
	callq	_ZNSolsEi
.Ltmp119:
# %bb.79:                               #   in Loop: Header=BB5_78 Depth=1
.Ltmp120:
	movq	%rax, %rbx
	movl	$.L.str.11, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp121:
# %bb.80:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit185
                                        #   in Loop: Header=BB5_78 Depth=1
	movq	-48(%rbp), %rax                 # 8-byte Reload
	movl	(%rax,%r14,4), %esi
.Ltmp122:
	movq	%rbx, %rdi
	callq	_ZNSolsEi
.Ltmp123:
# %bb.81:                               #   in Loop: Header=BB5_78 Depth=1
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
.Ltmp124:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp125:
# %bb.82:                               # %.noexc203
                                        #   in Loop: Header=BB5_78 Depth=1
.Ltmp126:
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
.Ltmp127:
# %bb.83:                               # %.noexc204
                                        #   in Loop: Header=BB5_78 Depth=1
.Ltmp128:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp129:
# %bb.84:                               # %_ZNSolsEPFRSoS_E.exit186
                                        #   in Loop: Header=BB5_78 Depth=1
	incq	%r14
	cmpq	$100, %r14
	jne	.LBB5_78
# %bb.85:
	cmpl	$1, %r13d
	jne	.LBB5_90
# %bb.86:
.Ltmp131:
	movl	$_ZSt4cout, %ebx
	movl	$_ZSt4cout, %edi
	movl	$.L.str.12, %esi
	movl	$12, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp132:
# %bb.87:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit187
	movq	_ZSt4cout(%rip), %rax
	addq	-24(%rax), %rbx
.Ltmp133:
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp134:
# %bb.88:                               # %.noexc207
.Ltmp135:
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
.Ltmp136:
# %bb.89:                               # %.noexc208
.Ltmp137:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp138:
.LBB5_90:                               # %_ZNSolsEPFRSoS_E.exit188
	movq	-128(%rbp), %rsp                # 8-byte Reload
	xorl	%ebx, %ebx
.LBB5_91:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
	leaq	-664(%rbp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	leaq	-96(%rbp), %rdi
	callq	_ZNSt6vectorIS_IdSaIdEESaIS1_EED2Ev
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa %rsp, 8
	retq
.LBB5_45:
	.cfi_def_cfa %rbp, 16
.Ltmp80:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.8, %esi
	movl	$32, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp81:
# %bb.46:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit175
.Ltmp82:
	movl	$_ZSt4cout, %edi
	callq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
.Ltmp83:
	jmp	.LBB5_47
.LBB5_57:
.Ltmp86:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.9, %esi
	movl	$29, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp87:
# %bb.58:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit177
.Ltmp88:
	movl	$_ZSt4cout, %edi
	callq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
.Ltmp89:
	jmp	.LBB5_47
.LBB5_64:
.Ltmp96:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.10, %esi
	movl	$27, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp97:
# %bb.65:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit179
.Ltmp98:
	movl	$_ZSt4cout, %edi
	callq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
.Ltmp99:
	jmp	.LBB5_47
.LBB5_69:
.Ltmp102:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.8, %esi
	movl	$32, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp103:
# %bb.70:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit181
.Ltmp104:
	movl	$_ZSt4cout, %edi
	callq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
.Ltmp105:
	jmp	.LBB5_47
.LBB5_92:
.Ltmp113:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.10, %esi
	movl	$27, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp114:
# %bb.93:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit183
.Ltmp115:
	movl	$_ZSt4cout, %edi
	callq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
.Ltmp116:
.LBB5_47:                               # %_ZNSolsEPFRSoS_E.exit176
	movl	$1, %edi
	callq	exit
.LBB5_123:
.Ltmp93:
	jmp	.LBB5_120
.LBB5_53:
.Ltmp77:
	jmp	.LBB5_120
.LBB5_52:
.Ltmp69:
	jmp	.LBB5_120
.LBB5_118:
.Ltmp139:
	jmp	.LBB5_120
.LBB5_122:
.Ltmp74:
	jmp	.LBB5_120
.LBB5_4:
.Ltmp26:
	movq	%rax, %rbx
	jmp	.LBB5_121
.LBB5_124:
.Ltmp117:
	jmp	.LBB5_120
.LBB5_66:
.Ltmp106:
	jmp	.LBB5_120
.LBB5_54:
.Ltmp90:
	jmp	.LBB5_120
.LBB5_119:
.Ltmp142:
	jmp	.LBB5_120
.LBB5_117:
.Ltmp130:
.LBB5_120:
	movq	%rax, %rbx
	leaq	-664(%rbp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
.LBB5_121:
	leaq	-96(%rbp), %rdi
	callq	_ZNSt6vectorIS_IdSaIdEESaIS1_EED2Ev
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end5:
	.size	main, .Lfunc_end5-main
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table5:
.Lexception2:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end2-.Lcst_begin2
.Lcst_begin2:
	.uleb128 .Ltmp24-.Lfunc_begin2          # >> Call Site 1 <<
	.uleb128 .Ltmp25-.Ltmp24                #   Call between .Ltmp24 and .Ltmp25
	.uleb128 .Ltmp26-.Lfunc_begin2          #     jumps to .Ltmp26
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp27-.Lfunc_begin2          # >> Call Site 2 <<
	.uleb128 .Ltmp60-.Ltmp27                #   Call between .Ltmp27 and .Ltmp60
	.uleb128 .Ltmp142-.Lfunc_begin2         #     jumps to .Ltmp142
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp61-.Lfunc_begin2          # >> Call Site 3 <<
	.uleb128 .Ltmp68-.Ltmp61                #   Call between .Ltmp61 and .Ltmp68
	.uleb128 .Ltmp69-.Lfunc_begin2          #     jumps to .Ltmp69
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp70-.Lfunc_begin2          # >> Call Site 4 <<
	.uleb128 .Ltmp73-.Ltmp70                #   Call between .Ltmp70 and .Ltmp73
	.uleb128 .Ltmp74-.Lfunc_begin2          #     jumps to .Ltmp74
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp75-.Lfunc_begin2          # >> Call Site 5 <<
	.uleb128 .Ltmp76-.Ltmp75                #   Call between .Ltmp75 and .Ltmp76
	.uleb128 .Ltmp77-.Lfunc_begin2          #     jumps to .Ltmp77
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp78-.Lfunc_begin2          # >> Call Site 6 <<
	.uleb128 .Ltmp85-.Ltmp78                #   Call between .Ltmp78 and .Ltmp85
	.uleb128 .Ltmp90-.Lfunc_begin2          #     jumps to .Ltmp90
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp91-.Lfunc_begin2          # >> Call Site 7 <<
	.uleb128 .Ltmp92-.Ltmp91                #   Call between .Ltmp91 and .Ltmp92
	.uleb128 .Ltmp93-.Lfunc_begin2          #     jumps to .Ltmp93
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp92-.Lfunc_begin2          # >> Call Site 8 <<
	.uleb128 .Ltmp94-.Ltmp92                #   Call between .Ltmp92 and .Ltmp94
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp94-.Lfunc_begin2          # >> Call Site 9 <<
	.uleb128 .Ltmp101-.Ltmp94               #   Call between .Ltmp94 and .Ltmp101
	.uleb128 .Ltmp106-.Lfunc_begin2         #     jumps to .Ltmp106
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp107-.Lfunc_begin2         # >> Call Site 10 <<
	.uleb128 .Ltmp112-.Ltmp107              #   Call between .Ltmp107 and .Ltmp112
	.uleb128 .Ltmp117-.Lfunc_begin2         #     jumps to .Ltmp117
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp118-.Lfunc_begin2         # >> Call Site 11 <<
	.uleb128 .Ltmp129-.Ltmp118              #   Call between .Ltmp118 and .Ltmp129
	.uleb128 .Ltmp130-.Lfunc_begin2         #     jumps to .Ltmp130
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp131-.Lfunc_begin2         # >> Call Site 12 <<
	.uleb128 .Ltmp138-.Ltmp131              #   Call between .Ltmp131 and .Ltmp138
	.uleb128 .Ltmp139-.Lfunc_begin2         #     jumps to .Ltmp139
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp80-.Lfunc_begin2          # >> Call Site 13 <<
	.uleb128 .Ltmp89-.Ltmp80                #   Call between .Ltmp80 and .Ltmp89
	.uleb128 .Ltmp90-.Lfunc_begin2          #     jumps to .Ltmp90
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp96-.Lfunc_begin2          # >> Call Site 14 <<
	.uleb128 .Ltmp105-.Ltmp96               #   Call between .Ltmp96 and .Ltmp105
	.uleb128 .Ltmp106-.Lfunc_begin2         #     jumps to .Ltmp106
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp113-.Lfunc_begin2         # >> Call Site 15 <<
	.uleb128 .Ltmp116-.Ltmp113              #   Call between .Ltmp113 and .Ltmp116
	.uleb128 .Ltmp117-.Lfunc_begin2         #     jumps to .Ltmp117
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp116-.Lfunc_begin2         # >> Call Site 16 <<
	.uleb128 .Lfunc_end5-.Ltmp116           #   Call between .Ltmp116 and .Lfunc_end5
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end2:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt6vectorIS_IdSaIdEESaIS1_EED2Ev,"axG",@progbits,_ZNSt6vectorIS_IdSaIdEESaIS1_EED2Ev,comdat
	.weak	_ZNSt6vectorIS_IdSaIdEESaIS1_EED2Ev # -- Begin function _ZNSt6vectorIS_IdSaIdEESaIS1_EED2Ev
	.p2align	1, 0x90
	.type	_ZNSt6vectorIS_IdSaIdEESaIS1_EED2Ev,@function
_ZNSt6vectorIS_IdSaIdEESaIS1_EED2Ev:    # @_ZNSt6vectorIS_IdSaIdEESaIS1_EED2Ev
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	(%rdi), %rbx
	movq	8(%rdi), %r15
	cmpq	%r15, %rbx
	je	.LBB6_6
# %bb.1:                                # %.lr.ph.i.i.i.preheader
	movq	%rdi, %r14
.LBB6_2:                                # %.lr.ph.i.i.i
                                        # =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	.LBB6_4
# %bb.3:                                #   in Loop: Header=BB6_2 Depth=1
	callq	_ZdlPv
.LBB6_4:                                # %_ZSt8_DestroyISt6vectorIdSaIdEEEvPT_.exit.i.i.i
                                        #   in Loop: Header=BB6_2 Depth=1
	addq	$24, %rbx
	cmpq	%r15, %rbx
	jne	.LBB6_2
# %bb.5:                                # %_ZSt8_DestroyIPSt6vectorIdSaIdEES2_EvT_S4_RSaIT0_E.exitthread-pre-split
	movq	(%r14), %rbx
.LBB6_6:                                # %_ZSt8_DestroyIPSt6vectorIdSaIdEES2_EvT_S4_RSaIT0_E.exit
	testq	%rbx, %rbx
	je	.LBB6_7
# %bb.8:
	movq	%rbx, %rdi
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	_ZdlPv                          # TAILCALL
.LBB6_7:                                # %_ZNSt12_Vector_baseISt6vectorIdSaIdEESaIS2_EED2Ev.exit
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end6:
	.size	_ZNSt6vectorIS_IdSaIdEESaIS1_EED2Ev, .Lfunc_end6-_ZNSt6vectorIS_IdSaIdEESaIS1_EED2Ev
	.cfi_endproc
                                        # -- End function
	.section	.text.__clang_call_terminate,"axG",@progbits,__clang_call_terminate,comdat
	.hidden	__clang_call_terminate          # -- Begin function __clang_call_terminate
	.weak	__clang_call_terminate
	.type	__clang_call_terminate,@function
__clang_call_terminate:                 # @__clang_call_terminate
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	__cxa_begin_catch
	callq	_ZSt9terminatev
.Lfunc_end7:
	.size	__clang_call_terminate, .Lfunc_end7-__clang_call_terminate
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_,"axG",@progbits,_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_,comdat
	.weak	_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_ # -- Begin function _ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_
	.p2align	1, 0x90
	.type	_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_,@function
_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_: # @_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdx, (%rsp)                    # 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	$1, %esi
	movl	$.L.str.14, %edx
	callq	_ZNKSt6vectorIdSaIdEE12_M_check_lenEmPKc
	movq	(%rbx), %r13
	movq	8(%rbx), %r15
	movq	%r12, 8(%rsp)                   # 8-byte Spill
	subq	%r13, %r12
	movq	%r12, %r14
	sarq	$3, %r14
	testq	%rax, %rax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	je	.LBB8_1
# %bb.2:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorIdE8allocateEmPKv
	movq	%rax, %rbp
	jmp	.LBB8_3
.LBB8_1:
	xorl	%ebp, %ebp
.LBB8_3:                                # %_ZNSt12_Vector_baseIdSaIdEE11_M_allocateEm.exit
	movq	(%rsp), %rax                    # 8-byte Reload
	movsd	(%rax), %xmm0                   # xmm0 = mem[0],zero
	movsd	%xmm0, (%rbp,%r14,8)
	testq	%r12, %r12
	jle	.LBB8_5
# %bb.4:
	movq	%rbp, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	memmove@PLT
.LBB8_5:                                # %_ZNSt6vectorIdSaIdEE11_S_relocateEPdS2_S2_RS0_.exit
	addq	%rbp, %r12
	addq	$8, %r12
	movq	8(%rsp), %rsi                   # 8-byte Reload
	subq	%rsi, %r15
	testq	%r15, %r15
	jle	.LBB8_7
# %bb.6:
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	memmove@PLT
.LBB8_7:                                # %_ZNSt6vectorIdSaIdEE11_S_relocateEPdS2_S2_RS0_.exit16
	testq	%r13, %r13
	je	.LBB8_9
# %bb.8:
	movq	%r13, %rdi
	callq	_ZdlPv
.LBB8_9:                                # %_ZNSt12_Vector_baseIdSaIdEE13_M_deallocateEPdm.exit
	addq	%r15, %r12
	movq	%rbp, (%rbx)
	movq	%r12, 8(%rbx)
	movq	16(%rsp), %rax                  # 8-byte Reload
	leaq	(,%rax,8), %rax
	addq	%rbp, %rax
	movq	%rax, 16(%rbx)
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end8:
	.size	_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_, .Lfunc_end8-_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNKSt6vectorIdSaIdEE12_M_check_lenEmPKc,"axG",@progbits,_ZNKSt6vectorIdSaIdEE12_M_check_lenEmPKc,comdat
	.weak	_ZNKSt6vectorIdSaIdEE12_M_check_lenEmPKc # -- Begin function _ZNKSt6vectorIdSaIdEE12_M_check_lenEmPKc
	.p2align	1, 0x90
	.type	_ZNKSt6vectorIdSaIdEE12_M_check_lenEmPKc,@function
_ZNKSt6vectorIdSaIdEE12_M_check_lenEmPKc: # @_ZNKSt6vectorIdSaIdEE12_M_check_lenEmPKc
	.cfi_startproc
# %bb.0:
	movabsq	$1152921504606846975, %rcx      # imm = 0xFFFFFFFFFFFFFFF
	movq	8(%rdi), %r8
	subq	(%rdi), %r8
	sarq	$3, %r8
	movq	%rcx, %rax
	subq	%r8, %rax
	cmpq	%rsi, %rax
	jb	.LBB9_2
# %bb.1:
	cmpq	%rsi, %r8
	cmovaq	%r8, %rsi
	leaq	(%rsi,%r8), %rax
	cmpq	%rcx, %rax
	cmovaeq	%rcx, %rax
	addq	%r8, %rsi
	cmovbq	%rcx, %rax
	retq
.LBB9_2:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rdx, %rdi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end9:
	.size	_ZNKSt6vectorIdSaIdEE12_M_check_lenEmPKc, .Lfunc_end9-_ZNKSt6vectorIdSaIdEE12_M_check_lenEmPKc
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt15__new_allocatorIdE8allocateEmPKv,"axG",@progbits,_ZNSt15__new_allocatorIdE8allocateEmPKv,comdat
	.weak	_ZNSt15__new_allocatorIdE8allocateEmPKv # -- Begin function _ZNSt15__new_allocatorIdE8allocateEmPKv
	.p2align	1, 0x90
	.type	_ZNSt15__new_allocatorIdE8allocateEmPKv,@function
_ZNSt15__new_allocatorIdE8allocateEmPKv: # @_ZNSt15__new_allocatorIdE8allocateEmPKv
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rsi, %rax
	shrq	$60, %rax
	jne	.LBB10_1
# %bb.3:
	shlq	$3, %rsi
	movq	%rsi, %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB10_1:
	.cfi_def_cfa_offset 16
	shrq	$61, %rsi
	je	.LBB10_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB10_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end10:
	.size	_ZNSt15__new_allocatorIdE8allocateEmPKv, .Lfunc_end10-_ZNSt15__new_allocatorIdE8allocateEmPKv
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorIS_IdSaIdEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_,"axG",@progbits,_ZNSt6vectorIS_IdSaIdEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_,comdat
	.weak	_ZNSt6vectorIS_IdSaIdEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_ # -- Begin function _ZNSt6vectorIS_IdSaIdEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_
	.p2align	1, 0x90
	.type	_ZNSt6vectorIS_IdSaIdEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_,@function
_ZNSt6vectorIS_IdSaIdEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_: # @_ZNSt6vectorIS_IdSaIdEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_
.Lfunc_begin3:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception3
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdx, 16(%rsp)                  # 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movl	$1, %esi
	movl	$.L.str.14, %edx
	callq	_ZNKSt6vectorIS_IdSaIdEESaIS1_EE12_M_check_lenEmPKc
	movq	%rax, %rsi
	movq	(%rbx), %r12
	movq	8(%rbx), %rbp
	movq	%r13, %rax
	subq	%r12, %rax
	sarq	$3, %rax
	movabsq	$-6148914691236517205, %r14     # imm = 0xAAAAAAAAAAAAAAAB
	imulq	%rax, %r14
	testq	%rsi, %rsi
	movq	%rsi, 8(%rsp)                   # 8-byte Spill
	je	.LBB11_1
# %bb.2:
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorISt6vectorIdSaIdEEE8allocateEmPKv
	movq	%rax, %r15
	jmp	.LBB11_3
.LBB11_1:
	xorl	%r15d, %r15d
.LBB11_3:                               # %_ZNSt12_Vector_baseISt6vectorIdSaIdEESaIS2_EE11_M_allocateEm.exit
	leaq	(%r14,%r14,2), %rax
	leaq	(%r15,%rax,8), %r14
.Ltmp143:
	movq	%r14, %rdi
	movq	16(%rsp), %rsi                  # 8-byte Reload
	callq	_ZNSt6vectorIdSaIdEEC2ERKS1_
.Ltmp144:
# %bb.4:                                # %_ZNSt16allocator_traitsISaISt6vectorIdSaIdEEEE9constructIS2_JRKS2_EEEvRS3_PT_DpOT0_.exit
	movq	%r15, %r14
	cmpq	%r13, %r12
	je	.LBB11_7
# %bb.5:                                # %.lr.ph.i.i.i.preheader
	xorps	%xmm0, %xmm0
	movq	%r15, %r14
	movq	%r12, %rax
.LBB11_6:                               # %.lr.ph.i.i.i
                                        # =>This Inner Loop Header: Depth=1
	movq	(%rax), %rcx
	movq	%rcx, (%r14)
	movq	8(%rax), %rcx
	movq	%rcx, 8(%r14)
	movq	16(%rax), %rcx
	movq	%rcx, 16(%r14)
	movups	%xmm0, (%rax)
	movq	$0, 16(%rax)
	addq	$24, %r14
	addq	$24, %rax
	cmpq	%r13, %rax
	jne	.LBB11_6
.LBB11_7:                               # %_ZNSt6vectorIS_IdSaIdEESaIS1_EE11_S_relocateEPS1_S4_S4_RS2_.exit
	addq	$24, %r14
	cmpq	%r13, %rbp
	je	.LBB11_10
# %bb.8:                                # %.lr.ph.i.i.i27.preheader
	xorps	%xmm0, %xmm0
.LBB11_9:                               # %.lr.ph.i.i.i27
                                        # =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	%rax, (%r14)
	movq	8(%r13), %rax
	movq	%rax, 8(%r14)
	movq	16(%r13), %rax
	movq	%rax, 16(%r14)
	movups	%xmm0, (%r13)
	movq	$0, 16(%r13)
	addq	$24, %r14
	addq	$24, %r13
	cmpq	%rbp, %r13
	jne	.LBB11_9
.LBB11_10:                              # %_ZNSt6vectorIS_IdSaIdEESaIS1_EE11_S_relocateEPS1_S4_S4_RS2_.exit32
	testq	%r12, %r12
	je	.LBB11_12
# %bb.11:
	movq	%r12, %rdi
	callq	_ZdlPv
.LBB11_12:                              # %_ZNSt12_Vector_baseISt6vectorIdSaIdEESaIS2_EE13_M_deallocateEPS2_m.exit
	movq	%r15, (%rbx)
	movq	%r14, 8(%rbx)
	movq	8(%rsp), %rax                   # 8-byte Reload
	leaq	(%rax,%rax,2), %rax
	leaq	(%r15,%rax,8), %rax
	movq	%rax, 16(%rbx)
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB11_13:
	.cfi_def_cfa_offset 80
.Ltmp145:
	movq	%rax, %rdi
	callq	__cxa_begin_catch
	testq	%r15, %r15
	jne	.LBB11_15
# %bb.14:
	movq	(%r14), %r15
	testq	%r15, %r15
	je	.LBB11_16
.LBB11_15:                              # %_ZNSt12_Vector_baseISt6vectorIdSaIdEESaIS2_EE13_M_deallocateEPS2_m.exit35.sink.split
	movq	%r15, %rdi
	callq	_ZdlPv
.LBB11_16:                              # %_ZNSt12_Vector_baseISt6vectorIdSaIdEESaIS2_EE13_M_deallocateEPS2_m.exit35
.Ltmp146:
	callq	__cxa_rethrow
.Ltmp147:
# %bb.20:
.LBB11_17:
.Ltmp148:
	movq	%rax, %rbx
.Ltmp149:
	callq	__cxa_end_catch
.Ltmp150:
# %bb.18:
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.LBB11_19:
.Ltmp151:
	movq	%rax, %rdi
	callq	__clang_call_terminate
.Lfunc_end11:
	.size	_ZNSt6vectorIS_IdSaIdEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_, .Lfunc_end11-_ZNSt6vectorIS_IdSaIdEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_
	.cfi_endproc
	.section	.gcc_except_table._ZNSt6vectorIS_IdSaIdEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_,"aG",@progbits,_ZNSt6vectorIS_IdSaIdEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_,comdat
	.p2align	2, 0x0
GCC_except_table11:
.Lexception3:
	.byte	255                             # @LPStart Encoding = omit
	.byte	3                               # @TType Encoding = udata4
	.uleb128 .Lttbase0-.Lttbaseref0
.Lttbaseref0:
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end3-.Lcst_begin3
.Lcst_begin3:
	.uleb128 .Lfunc_begin3-.Lfunc_begin3    # >> Call Site 1 <<
	.uleb128 .Ltmp143-.Lfunc_begin3         #   Call between .Lfunc_begin3 and .Ltmp143
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp143-.Lfunc_begin3         # >> Call Site 2 <<
	.uleb128 .Ltmp144-.Ltmp143              #   Call between .Ltmp143 and .Ltmp144
	.uleb128 .Ltmp145-.Lfunc_begin3         #     jumps to .Ltmp145
	.byte	1                               #   On action: 1
	.uleb128 .Ltmp144-.Lfunc_begin3         # >> Call Site 3 <<
	.uleb128 .Ltmp146-.Ltmp144              #   Call between .Ltmp144 and .Ltmp146
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp146-.Lfunc_begin3         # >> Call Site 4 <<
	.uleb128 .Ltmp147-.Ltmp146              #   Call between .Ltmp146 and .Ltmp147
	.uleb128 .Ltmp148-.Lfunc_begin3         #     jumps to .Ltmp148
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp149-.Lfunc_begin3         # >> Call Site 5 <<
	.uleb128 .Ltmp150-.Ltmp149              #   Call between .Ltmp149 and .Ltmp150
	.uleb128 .Ltmp151-.Lfunc_begin3         #     jumps to .Ltmp151
	.byte	1                               #   On action: 1
	.uleb128 .Ltmp150-.Lfunc_begin3         # >> Call Site 6 <<
	.uleb128 .Lfunc_end11-.Ltmp150          #   Call between .Ltmp150 and .Lfunc_end11
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end3:
	.byte	1                               # >> Action Record 1 <<
                                        #   Catch TypeInfo 1
	.byte	0                               #   No further actions
	.p2align	2, 0x0
                                        # >> Catch TypeInfos <<
	.long	0                               # TypeInfo 1
.Lttbase0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt6vectorIdSaIdEEC2ERKS1_,"axG",@progbits,_ZNSt6vectorIdSaIdEEC2ERKS1_,comdat
	.weak	_ZNSt6vectorIdSaIdEEC2ERKS1_    # -- Begin function _ZNSt6vectorIdSaIdEEC2ERKS1_
	.p2align	1, 0x90
	.type	_ZNSt6vectorIdSaIdEEC2ERKS1_,@function
_ZNSt6vectorIdSaIdEEC2ERKS1_:           # @_ZNSt6vectorIdSaIdEEC2ERKS1_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	8(%rsi), %rax
	movq	(%rsi), %rcx
	movq	%rax, %r12
	subq	%rcx, %r12
	sarq	$3, %r12
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rdi)
	movq	$0, 16(%rdi)
	cmpq	%rcx, %rax
	je	.LBB12_1
# %bb.2:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorIdE8allocateEmPKv
	movq	%rax, %r15
	jmp	.LBB12_3
.LBB12_1:
	xorl	%r15d, %r15d
.LBB12_3:
	movq	%r15, (%rbx)
	movq	%r15, 8(%rbx)
	leaq	(%r15,%r12,8), %rax
	movq	%rax, 16(%rbx)
	movq	(%r14), %rsi
	movq	8(%r14), %r14
	subq	%rsi, %r14
	cmpq	$9, %r14
	jl	.LBB12_5
# %bb.4:
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	memmove@PLT
.LBB12_7:
	addq	%r14, %r15
	movq	%r15, 8(%rbx)
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.LBB12_5:
	.cfi_def_cfa_offset 48
	cmpq	$8, %r14
	jne	.LBB12_7
# %bb.6:
	movsd	(%rsi), %xmm0                   # xmm0 = mem[0],zero
	movsd	%xmm0, (%r15)
	jmp	.LBB12_7
.Lfunc_end12:
	.size	_ZNSt6vectorIdSaIdEEC2ERKS1_, .Lfunc_end12-_ZNSt6vectorIdSaIdEEC2ERKS1_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNKSt6vectorIS_IdSaIdEESaIS1_EE12_M_check_lenEmPKc,"axG",@progbits,_ZNKSt6vectorIS_IdSaIdEESaIS1_EE12_M_check_lenEmPKc,comdat
	.weak	_ZNKSt6vectorIS_IdSaIdEESaIS1_EE12_M_check_lenEmPKc # -- Begin function _ZNKSt6vectorIS_IdSaIdEESaIS1_EE12_M_check_lenEmPKc
	.p2align	1, 0x90
	.type	_ZNKSt6vectorIS_IdSaIdEESaIS1_EE12_M_check_lenEmPKc,@function
_ZNKSt6vectorIS_IdSaIdEESaIS1_EE12_M_check_lenEmPKc: # @_ZNKSt6vectorIS_IdSaIdEESaIS1_EE12_M_check_lenEmPKc
	.cfi_startproc
# %bb.0:
	movabsq	$384307168202282325, %rcx       # imm = 0x555555555555555
	movq	8(%rdi), %rax
	subq	(%rdi), %rax
	sarq	$3, %rax
	movabsq	$-6148914691236517205, %rdi     # imm = 0xAAAAAAAAAAAAAAAB
	imulq	%rax, %rdi
	movq	%rcx, %rax
	subq	%rdi, %rax
	cmpq	%rsi, %rax
	jb	.LBB13_2
# %bb.1:
	cmpq	%rsi, %rdi
	cmovaq	%rdi, %rsi
	leaq	(%rsi,%rdi), %rax
	cmpq	%rcx, %rax
	cmovaeq	%rcx, %rax
	addq	%rdi, %rsi
	cmovbq	%rcx, %rax
	retq
.LBB13_2:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rdx, %rdi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end13:
	.size	_ZNKSt6vectorIS_IdSaIdEESaIS1_EE12_M_check_lenEmPKc, .Lfunc_end13-_ZNKSt6vectorIS_IdSaIdEESaIS1_EE12_M_check_lenEmPKc
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt15__new_allocatorISt6vectorIdSaIdEEE8allocateEmPKv,"axG",@progbits,_ZNSt15__new_allocatorISt6vectorIdSaIdEEE8allocateEmPKv,comdat
	.weak	_ZNSt15__new_allocatorISt6vectorIdSaIdEEE8allocateEmPKv # -- Begin function _ZNSt15__new_allocatorISt6vectorIdSaIdEEE8allocateEmPKv
	.p2align	1, 0x90
	.type	_ZNSt15__new_allocatorISt6vectorIdSaIdEEE8allocateEmPKv,@function
_ZNSt15__new_allocatorISt6vectorIdSaIdEEE8allocateEmPKv: # @_ZNSt15__new_allocatorISt6vectorIdSaIdEEE8allocateEmPKv
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movabsq	$384307168202282326, %rax       # imm = 0x555555555555556
	cmpq	%rax, %rsi
	jae	.LBB14_1
# %bb.3:
	shlq	$3, %rsi
	leaq	(%rsi,%rsi,2), %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB14_1:
	.cfi_def_cfa_offset 16
	movabsq	$768614336404564651, %rax       # imm = 0xAAAAAAAAAAAAAAB
	cmpq	%rax, %rsi
	jb	.LBB14_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB14_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end14:
	.size	_ZNSt15__new_allocatorISt6vectorIdSaIdEEE8allocateEmPKv, .Lfunc_end14-_ZNSt15__new_allocatorISt6vectorIdSaIdEEE8allocateEmPKv
	.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	.LBB15_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rdi
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB15_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z9findMeansPKfS0_Piiii, %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_end15:
	.size	__hip_module_ctor, .Lfunc_end15-__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	.LBB16_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
.LBB16_2:
	retq
.Lfunc_end16:
	.size	__hip_module_dtor, .Lfunc_end16-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	max_atoms,@object               # @max_atoms
	.bss
	.globl	max_atoms
	.p2align	3, 0x0
max_atoms:
	.quad	0                               # 0x0
	.size	max_atoms, 8

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

	.type	k_clus,@object                  # @k_clus
	.globl	k_clus
	.p2align	2, 0x0
k_clus:
	.long	0                               # 0x0
	.size	k_clus, 4

	.type	cls,@object                     # @cls
	.globl	cls
	.p2align	2, 0x0
cls:
	.long	0                               # 0x0
	.size	cls, 4

	.type	cluster_lambda,@object          # @cluster_lambda
	.globl	cluster_lambda
	.p2align	3, 0x0
cluster_lambda:
	.quad	0x0000000000000000              # double 0
	.size	cluster_lambda, 8

	.type	f,@object                       # @f
	.globl	f
	.p2align	2, 0x0
f:
	.long	0                               # 0x0
	.size	f, 4

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

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

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"Error! Please check file.\n"
	.size	.L.str.1, 27

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"Number of rows in file : "
	.size	.L.str.2, 26

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"Number of atoms : "
	.size	.L.str.3, 19

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"Total number of conformations : "
	.size	.L.str.4, 33

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"Not able to allocate host cluster"
	.size	.L.str.5, 34

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"error allocating device instance"
	.size	.L.str.8, 33

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"error copying device instance"
	.size	.L.str.9, 30

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"error allocating device rnk"
	.size	.L.str.10, 28

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

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"Not Matching"
	.size	.L.str.12, 13

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

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z9findMeansPKfS0_Piiii"
	.size	.L__unnamed_1, 24

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

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

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

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z9findMeansPKfS0_Piiii ; -- Begin function _Z9findMeansPKfS0_Piiii
	.globl	_Z9findMeansPKfS0_Piiii
	.p2align	8
	.type	_Z9findMeansPKfS0_Piiii,@function
_Z9findMeansPKfS0_Piiii:                ; @_Z9findMeansPKfS0_Piiii
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x34
	s_load_b128 s[4:7], s[0:1], 0x18
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s2, v[0:1]
	s_mov_b32 s2, exec_lo
	v_cmpx_gt_i32_e64 s4, v1
	s_cbranch_execz .LBB0_18
; %bb.1:                                ; %.preheader72
	s_clause 0x1
	s_load_b128 s[8:11], s[0:1], 0x0
	s_load_b64 s[2:3], s[0:1], 0x10
	s_cmp_gt_i32 s6, 0
	s_mov_b32 s13, 0
	s_cselect_b32 s4, -1, 0
	s_cmp_lt_i32 s6, 1
	s_cbranch_scc1 .LBB0_6
; %bb.2:                                ; %.preheader71.lr.ph
	v_mov_b32_e32 v0, 0
	s_waitcnt lgkmcnt(0)
	s_add_u32 s7, s10, 8
	s_addc_u32 s14, s11, 0
	s_mov_b32 s12, s13
	s_mov_b32 s15, s13
.LBB0_3:                                ; %.preheader71
                                        ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	s_lshl_b64 s[0:1], s[12:13], 2
	v_mov_b32_e32 v2, 0
	s_add_u32 s16, s8, s0
	s_addc_u32 s17, s9, s1
	s_mov_b64 s[0:1], 0
.LBB0_4:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s18, s7, s0
	s_addc_u32 s19, s14, s1
	s_add_u32 s20, s16, s0
	s_addc_u32 s21, s17, s1
	s_load_b32 s18, s[18:19], 0x0
	s_load_b32 s19, s[20:21], 0x0
	s_add_u32 s0, s0, 4
	s_addc_u32 s1, s1, 0
	s_cmp_eq_u32 s0, 12
	s_waitcnt lgkmcnt(0)
	v_sub_f32_e64 v3, s18, s19
	s_delay_alu instid0(VALU_DEP_1)
	v_fmac_f32_e32 v2, v3, v3
	s_cbranch_scc0 .LBB0_4
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	s_delay_alu instid0(VALU_DEP_1)
	v_mul_f32_e32 v3, 0x4f800000, v2
	v_cmp_gt_f32_e32 vcc_lo, 0xf800000, v2
	s_add_i32 s15, s15, 1
	s_add_i32 s12, s12, s6
	s_add_u32 s7, s7, 20
	s_addc_u32 s14, s14, 0
	v_cndmask_b32_e32 v2, v2, v3, vcc_lo
	s_cmp_eq_u32 s15, s6
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
	v_sqrt_f32_e32 v3, v2
	s_waitcnt_depctr 0xfff
	v_add_nc_u32_e32 v4, -1, v3
	v_add_nc_u32_e32 v5, 1, v3
	v_fma_f32 v6, -v4, v3, v2
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f32 v7, -v5, v3, v2
	v_cmp_ge_f32_e64 s0, 0, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cndmask_b32_e64 v3, v3, v4, s0
	v_cmp_lt_f32_e64 s0, 0, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e64 v3, v3, v5, s0
	v_mul_f32_e32 v4, 0x37800000, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_cndmask_b32_e32 v3, v3, v4, vcc_lo
	v_cmp_class_f32_e64 vcc_lo, v2, 0x260
	v_cndmask_b32_e32 v2, v3, v2, vcc_lo
	s_delay_alu instid0(VALU_DEP_1)
	v_add_f32_e32 v0, v0, v2
	s_cbranch_scc0 .LBB0_3
	s_branch .LBB0_7
.LBB0_6:
	v_mov_b32_e32 v0, 0
.LBB0_7:                                ; %.preheader70
	s_cmp_lt_i32 s5, 1
	s_cbranch_scc1 .LBB0_16
; %bb.8:                                ; %.preheader69.lr.ph
	v_mul_lo_u32 v2, s6, v1
	v_mov_b32_e32 v4, -1
	s_waitcnt lgkmcnt(0)
	s_add_u32 s12, s10, 8
	s_mul_i32 s7, s6, s5
	s_addc_u32 s13, s11, 0
	s_mov_b32 s11, 0
	s_mov_b32 s14, 0
	s_mov_b32 s15, 0
	v_lshl_add_u32 v5, v2, 2, v2
.LBB0_9:                                ; %.preheader69
                                        ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
                                        ;       Child Loop BB0_12 Depth 3
	v_mov_b32_e32 v6, 0
	s_and_not1_b32 vcc_lo, exec_lo, s4
	s_cbranch_vccnz .LBB0_14
; %bb.10:                               ; %.preheader.lr.ph
                                        ;   in Loop: Header=BB0_9 Depth=1
	s_delay_alu instid0(VALU_DEP_2)
	v_mov_b32_e32 v2, v5
	s_mov_b32 s16, 0
	s_mov_b32 s10, s14
.LBB0_11:                               ; %.preheader
                                        ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_12 Depth 3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
	v_ashrrev_i32_e32 v3, 31, v2
	s_lshl_b64 s[0:1], s[10:11], 2
	s_add_u32 s17, s8, s0
	s_addc_u32 s18, s9, s1
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[7:8], 2, v[2:3]
	v_mov_b32_e32 v3, 0
	s_mov_b64 s[0:1], 0
	v_add_co_u32 v7, vcc_lo, s12, v7
	s_delay_alu instid0(VALU_DEP_3)
	v_add_co_ci_u32_e32 v8, vcc_lo, s13, v8, vcc_lo
.LBB0_12:                               ;   Parent Loop BB0_9 Depth=1
                                        ;     Parent Loop BB0_11 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v9, vcc_lo, v7, s0
	v_add_co_ci_u32_e32 v10, vcc_lo, s1, v8, vcc_lo
	s_add_u32 s20, s17, s0
	s_addc_u32 s21, s18, s1
	s_add_u32 s0, s0, 4
	global_load_b32 v9, v[9:10], off
	s_load_b32 s19, s[20:21], 0x0
	s_addc_u32 s1, s1, 0
	s_cmp_eq_u32 s0, 12
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_subrev_f32_e32 v9, s19, v9
	s_delay_alu instid0(VALU_DEP_1)
	v_fmac_f32_e32 v3, v9, v9
	s_cbranch_scc0 .LBB0_12
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=2
	s_delay_alu instid0(VALU_DEP_1)
	v_dual_mul_f32 v7, 0x4f800000, v3 :: v_dual_add_nc_u32 v2, 5, v2
	v_cmp_gt_f32_e32 vcc_lo, 0xf800000, v3
	s_add_i32 s16, s16, 1
	s_add_i32 s10, s10, s6
	s_cmp_eq_u32 s16, s6
	v_cndmask_b32_e32 v3, v3, v7, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
	v_sqrt_f32_e32 v7, v3
	s_waitcnt_depctr 0xfff
	v_add_nc_u32_e32 v8, -1, v7
	v_add_nc_u32_e32 v9, 1, v7
	v_fma_f32 v10, -v8, v7, v3
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f32 v11, -v9, v7, v3
	v_cmp_ge_f32_e64 s0, 0, v10
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cndmask_b32_e64 v7, v7, v8, s0
	v_cmp_lt_f32_e64 s0, 0, v11
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e64 v7, v7, v9, s0
	v_mul_f32_e32 v8, 0x37800000, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_cndmask_b32_e32 v7, v7, v8, vcc_lo
	v_cmp_class_f32_e64 vcc_lo, v3, 0x260
	v_cndmask_b32_e32 v3, v7, v3, vcc_lo
	s_delay_alu instid0(VALU_DEP_1)
	v_add_f32_e32 v6, v6, v3
	s_cbranch_scc0 .LBB0_11
.LBB0_14:                               ; %._crit_edge
                                        ;   in Loop: Header=BB0_9 Depth=1
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_4) | instid1(SALU_CYCLE_1)
	v_cmp_nle_f32_e32 vcc_lo, v6, v0
	s_add_i32 s14, s14, s7
	v_cndmask_b32_e32 v0, v6, v0, vcc_lo
	v_cndmask_b32_e32 v4, s15, v4, vcc_lo
	s_add_i32 s15, s15, 1
	s_cmp_eq_u32 s15, s5
	s_cbranch_scc0 .LBB0_9
; %bb.15:                               ; %._crit_edge87.loopexit
	s_delay_alu instid0(VALU_DEP_1)
	v_add_nc_u32_e32 v0, 1, v4
	s_branch .LBB0_17
.LBB0_16:
	v_mov_b32_e32 v0, 0
.LBB0_17:                               ; %._crit_edge87
	v_ashrrev_i32_e32 v2, 31, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[1:2], 2, v[1:2]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v1, vcc_lo, s2, v1
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v2, vcc_lo, s3, v2, vcc_lo
	global_store_b32 v[1:2], v0, off
.LBB0_18:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z9findMeansPKfS0_Piiii
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 296
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 12
		.amdhsa_next_free_sgpr 22
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z9findMeansPKfS0_Piiii, .Lfunc_end0-_Z9findMeansPKfS0_Piiii
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 872
; NumSgprs: 24
; NumVgprs: 12
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 24
; NumVGPRsForWavesPerEU: 12
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

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

	.end_amdgpu_metadata
