// Main computational method of the project
#include <cuda.h>
#include <cuda_runtime.h>
#include <device_launch_parameters.h>
#include <math.h>
#include "mainIterator.cuh"
#include <iostream>
#include <fstream>
#include <iomanip>

// Define statements are a quick and dirty way of getting global constants to the device.
// If I had more style and skill, I'd use device constants. But I don't :P
#define PI 3.14159265359
#define verletStride 100
#define cutoff 1.2
#define k_l 1.46E5
#define k_th 251.04
#define k_phi1 6.78
#define k_phi2 -3.6
#define k_phi3 13.56
#define l_0 0.153
#define th_0 1.187
#define eps 0.39
#define sigma 0.401
#define ax .40214
#define ay .11031
#define az .04552
#define bx 0.0
#define by .47345
#define bz .04051
#define cx -.00002849
#define cy -.00003859
#define cz 1.09983
#define mCH2 14.0266
#define mCH3 15.0345
#define dt 0.001 // Energy is in units of Kj, mass is in units of g and distance is in units of nm, so natural time units are ps

// Simple integer power function for the LJ potential.

// Each thread block contains nBeads threads. There are nMols thread blocks. Therefore, each molecule is its own thread block.
// Each molecule computes its own centroid and puts it into dcentroids
// This is done via a parallel reduction algorithm that calculates a sum of n elements in O(log(n)) time.
// Currently, this only works for n-alkanes where n is a power of 2
__global__ void getCentroids(double*x, double*y, double*z, double *dcentroidsx, double *dcentroidsy, double *dcentroidsz){
	int nBeads = blockDim.x;
	int i = blockIdx.x * nBeads + threadIdx.x;
	int level = 1;

	// Declare a shared variable to be used to calculate the centroid before copying into global memory.
	extern __shared__ double c[];
	double *mycx = c;
	double *mycy = &(c[nBeads]);
	double *mycz = &(c[2 * nBeads]);

	// Each bead copies its own info into the shared memory space.
	// Global memory bad!
	mycx[threadIdx.x] = x[i];
	mycy[threadIdx.x] = y[i];
	mycz[threadIdx.x] = z[i];

	__syncthreads();

	// Do a parallel reduction to find the sum of all the positions.
	while (level < nBeads){
		if (threadIdx.x % (2*level) == 0){
			mycx[threadIdx.x] += mycx[threadIdx.x + level];
			mycy[threadIdx.x] += mycy[threadIdx.x + level];
			mycz[threadIdx.x] += mycz[threadIdx.x + level];
		}
		level *= 2;
	}
	// Thread 0 then copies its own cx cy and cz back into global memory.
	if (threadIdx.x == 0){
		dcentroidsx[blockIdx.x] = mycx[0] / nBeads;
		dcentroidsy[blockIdx.x] = mycy[0] / nBeads;
		dcentroidsz[blockIdx.x] = mycz[0] / nBeads;
	}
}

// We next, we generate the Verlet list. This massively speeds up computation time.
// Now, each thread block has only one thread (representing one molecule). Each thread block will calculate its own verlet cell.
// This and the centroid calculation happen once every *very many* iterations because the verlet list is not very likely to change
// and centroids are only used to calculate the verlet list.
__global__ void getVerletList(int*verletList, int *verletListEnd, double*xCentroids, double*yCentroids, double*zCentroids, int nMols){
	// Copy own centroid into local memory and make local copies of all the parameters.
	double ctfsq = cutoff;
	ctfsq *= ctfsq;
	int mols = nMols;
	int stride = verletStride;
	int idx = blockIdx.x;
	double c[3];
	double dx[3];
	c[0] = xCentroids[idx];
	c[1] = yCentroids[idx];
	c[2] = zCentroids[idx];

	// Iterate forward, with 
	int verletCount = -1;
	for (int i = 1; i < mols; i++){
		int j = (i + idx) % mols;
		dx[0] = xCentroids[j] - c[0];
		dx[1] = yCentroids[j] - c[1];
		dx[2] = zCentroids[j] - c[2];
		if (dx[0] * dx[0] + dx[1] * dx[1] + dx[2] * dx[2] < ctfsq){
			verletCount++;
			verletList[stride * idx + verletCount] = j;
		}
	}
	if (verletCount >0){
		verletListEnd[idx] = stride * idx + verletCount;
	}
	else {
		verletListEnd[idx] = -1;
	}
}

// This is the main MD method.
// Technically, one octane (8 threads) per block is very inefficient. I should be using threadblocks of at least 32 threads. However, this would make programming a nightmare, as I'd have to first spend time figuring out how to organize the 4 octanes into memory and constantly making sure that they don't accidentally overlap.
__global__ void MDStep(double *xGlobal, double *yGlobal, double *zGlobal, int *verletList, int * verletListEnd, double *vx, double *vy, double *vz, double *accx, double *accy, double *accz){
	// Copy constants into local memory... The caffeine in my bloodstream doesn't trust whatever's coming in through the functionc call >.>
	int i = blockIdx.x;
	int j = threadIdx.x;
	int b = blockDim.x;

	// Pushing the max shared memory limit pretty hard here =/ Max shared memory is 49152B I'm using 19584B (although I should be able to cut this by half if things behave well enough) Right now, verletStride doesn't need to be more than 30.
	extern __shared__ double sharedMem[];
	double *x = sharedMem;
	double *y = &(sharedMem[b]);
	double *z = &(sharedMem[2 * b]);
	double *r = &(sharedMem[3 * b]);
	double *theta = &(sharedMem[4 * b]);
	double *phi = &(sharedMem[5 * b]);
	double *verletX = &(sharedMem[6 * b]);
	double *verletY = &(sharedMem[(6 + verletStride) * b]);
	double *verletZ = &(sharedMem[(6 + 2 * verletStride) * b]);

	// First, copy positions into shared memory and perform first step of velocity-Verlet. Each thread copies its own position. Thread = bead.
	x[j] = xGlobal[i*b + j] + vx[i*b + j] * dt + 0.5 * accx[i*b + j] * dt * dt;
	y[j] = yGlobal[i*b + j] + vy[i*b + j] * dt + 0.5 * accy[i*b + j] * dt * dt;
	z[j] = zGlobal[i*b + j] + vz[i*b + j] * dt + 0.5 * accz[i*b + j] * dt * dt;

	xGlobal[i*b + j] = x[j];
	yGlobal[i*b + j] = y[j];
	zGlobal[i*b + j] = z[j];

	__syncthreads();

	// Next, copy positions of other molecules in the verletList into shared memory. Each thread copies data corresponding to itself.
	int vCount = 0;
	for (int idx = verletStride * i; idx <= verletListEnd[i]; idx++){
		verletX[vCount * b + j] = xGlobal[verletList[idx] * b + j];
		verletY[vCount * b + j] = yGlobal[verletList[idx] * b + j];
		verletZ[vCount * b + j] = zGlobal[verletList[idx] * b + j];
		vCount++;
	}

	__syncthreads();

	// Each molecule stores a vector to the next bead and the previous bead.
	// The third set of beads is the distance between the next bead and the bead after that (for torsion calculation).
	double dxp, dyp, dzp, dxm, dym, dzm, dxpp, dypp, dzpp;

	if (j < (b - 1)) {
		dxp = x[j + 1] - x[j];
		dyp = y[j + 1] - y[j];
		dzp = z[j + 1] - z[j];
	}
	else {
		dxp = 0;
		dyp = 0;
		dzp = 0;
	}

	if (j > 0){
		dxm = x[j - 1] - x[j];
		dym = y[j - 1] - y[j];
		dzm = z[j - 1] - z[j];
	}
	else {
		dxm = 0;
		dym = 0;
		dzm = 0;
	}

	if (j < (b - 2)) {
		dxpp = x[j + 2] - x[j + 1];
		dypp = y[j + 2] - y[j + 1];
		dzpp = z[j + 2] - z[j + 1];
	}

	// Next, calculate distances between beads. Each thread calculates the distance to the next bead.
	r[j] = sqrt(dxp * dxp + dyp * dyp + dzp * dzp);

	__syncthreads();

	// Now, calculate angles between beads. Each bead claculates the angle that has it at the origin.
	// The threads at the edges will produce nonsensical results, but we're not going to access them (in any useful manner) anyway.
	// Allowing the edge threads to calculate angles minimizes thread divergence (different theads doing different things).
	theta[j] = acos((dxp * dxm + dyp * dym + dzp * dzm) / r[j] / r[j - 1]);

	// Finally, calculate four-molecule torsion angles.
	// Same as above, this will produce some nonsensical data, but we won't be accessing it.
	phi[j] = acos((dxm * dxpp + dym * dypp + dzm * dzpp) / r[j - 1] / r[j + 1]);

	// Now, each molecule calculates a force on itself from ALL the terms. ALL OF THEM.

	double Fx = 0, Fy = 0, Fz = 0;

	// First, the spring term. Each bead receives a contribution from the bead ahead of it and from the bead behind it.
	double factor;
	if (j > 0) {
		factor = 2 * k_l * (r[j -1] - l_0) / r[j -1];
		Fx += factor * dxm;
		Fy += factor * dym;
		Fz += factor * dzm;
	}
	if (j < (b - 1)) {
		factor = 2 * k_l * (r[j] - l_0) / r[j];
		Fx += factor * dxp;
		Fy += factor * dyp;
		Fz += factor * dzp;
	}

	// Next, the theta term. A bit more complicated. Each molecule recieves a contribution from the angle behind it, the angle ahead of it, and the angle that has it as the origin.
	//if (j < (b - 2)) {
	//	factor = 2 * k_th * (th_0 - PI + theta[j + 1]) / r[j] / sin(theta[j + 1]);
	//	Fx += factor * (dxpp / r[j + 1] + cos(theta[j + 1]) * dxp / r[j]);
	//	Fy += factor * (dypp / r[j + 1] + cos(theta[j + 1]) * dyp / r[j]);
	//	Fz += factor * (dzpp / r[j + 1] + cos(theta[j + 1]) * dzp / r[j]);
	//}
	//if (j > 1) {
	//	factor = 2 * k_th * (th_0 - PI / 2.0 + theta[j - 1] / r[j - 1]) / sin(theta[j - 1]);
	//	Fx += factor * ((x[j - 2] - x[j - 1]) / r[j - 2] + cos(theta[j - 1]) * dxm / r[j - 1]);
	//	Fy += factor * ((y[j - 2] - y[j - 1]) / r[j - 2] + cos(theta[j - 1]) * dym / r[j - 1]);
	//	Fz += factor * ((z[j - 2] - z[j - 1]) / r[j - 2] + cos(theta[j - 1]) * dzm / r[j - 1]);
	//}
	//if (j > 0 && j < (b - 1)){
	//	factor = 2 * k_th * (th_0 - PI / 2.0 + theta[j]) / sin(theta[j]);
	//	Fx -= factor * (dxm / r[j - 1] - cos(theta[j]) * dxp / r[j]) / r[j]
	//		+ (dxp / r[j] - cos(theta[j]) * dxm / r[j - 1]) / r[j - 1];

	//	Fy -= factor * (dym / r[j - 1] - cos(theta[j]) * dyp / r[j]) / r[j]
	//		+ (dyp / r[j] - cos(theta[j]) * dym / r[j - 1]) / r[j - 1];

	//	Fz -= factor * (dzm / r[j - 1] - cos(theta[j]) * dzp / r[j]) / r[j]
	//		+ (dzp / r[j] - cos(theta[j]) * dzm / r[j - 1]) / r[j - 1];
	//}

	 //Next phi. Is WRONG with GIT?!
	//if (j < (b - 3)){
	//	factor = 0.5 * (k_phi1 * sin(phi[j + 1]) + 2 * k_phi2 * sin(2 * phi[j + 1]) + 3 * k_phi3 * sin(3 * phi[j + 1])) / sin(phi[j + 1]);
	//	Fx += factor * ((x[j + 3] - x[j + 2]) / r[j + 2] + cos(phi[j + 1]) * dxp / r[j]) / r[j];
	//	Fy += factor * ((y[j + 3] - y[j + 2]) / r[j + 2] + cos(phi[j + 1]) * dyp / r[j]) / r[j];
	//	Fz += factor * ((z[j + 3] - z[j + 2]) / r[j + 2] + cos(phi[j + 1]) * dzp / r[j]) / r[j];
	//}
	//if (j < (b - 2) && j > 0) {
	//	factor = 0.5 * (k_phi1 * sin(phi[j]) + 2 * k_phi2 * sin(2 * phi[j]) + 3 * k_phi3 * sin(3 * phi[j])) / sin(phi[j]);
	//	Fx -= factor * (dxpp / r[j + 1] - cos(phi[j]) * dxm / r[j - 1]) / r[j - 1];
	//	Fy -= factor * (dypp / r[j + 1] - cos(phi[j]) * dym / r[j - 1]) / r[j - 1];
	//	Fz -= factor * (dzpp / r[j + 1] - cos(phi[j]) * dzm / r[j - 1]) / r[j - 1];
	//}
	//if (j < (b - 1) && j > 1) {
	//	factor = 0.5 * (k_phi1 * sin(phi[j - 1]) + 2 * k_phi2 * sin(2 * phi[j - 1]) + 3 * k_phi3 * sin(3 * phi[j - 1])) / sin(phi[j - 1]);
	//	Fx -= factor * ((x[j - 2] - x[j - 1]) / r[j - 2] - cos(phi[j - 1]) * dxp / r[j]) / r[j];
	//	Fy -= factor * ((y[j - 2] - y[j - 1]) / r[j - 2] - cos(phi[j - 1]) * dyp / r[j]) / r[j];
	//	Fz -= factor * ((z[j - 2] - z[j - 1]) / r[j - 2] - cos(phi[j - 1]) * dzp / r[j]) / r[j];
	//}
	//if (j > 2) {
	//	factor = 0.5 * (k_phi1 * sin(phi[j - 2]) + 2 * k_phi2 * sin(2 * phi[j - 2]) + 3 * k_phi3 * sin(3 * phi[j - 2])) / sin(phi[j - 2]);
	//	Fx += factor * ((x[j - 3] - x[j - 2]) / r[j - 3] + cos(phi[j - 2]) * dxm / r[j - 1]) / r[j - 1];
	//	Fy += factor * ((y[j - 3] - y[j - 2]) / r[j - 3] + cos(phi[j - 2]) * dym / r[j - 1]) / r[j - 1];
	//	Fz += factor * ((z[j - 3] - z[j - 2]) / r[j - 3] + cos(phi[j - 2]) * dzm / r[j - 1]) / r[j - 1];
	//}
	
	// Finally, Van der Walls
	double dx, dy, dz, rsq, sdrcb;

	// Do this for everything in Verlet list
	for (int v = 0; v < vCount * b; v++){
		dx = verletX[v] - x[j];
		dy = verletY[v] - y[j];
		dz = verletZ[v] - z[j];
		rsq = dx * dx + dy * dy + dz * dz;
		sdrcb = sigma * sigma / rsq;
		sdrcb *= sdrcb * sdrcb;
		factor = 24 * eps * sdrcb * (1 - 2 * sdrcb) / rsq;
		Fx += factor * dx;
		Fy += factor * dy;
		Fz += factor * dz;
	}

	if (j == 0 || j == (b - 1)) {
		Fx /= mCH3;
		Fy /= mCH3;
		Fz /= mCH3;
	}
	else {
		Fx /= mCH2;
		Fy /= mCH2;
		Fz /= mCH2;
	}

	vx[i*b + j] += 0.5 * dt * (accx[i*b + j] + Fx);
	vy[i*b + j] += 0.5 * dt * (accy[i*b + j] + Fy);
	vz[i*b + j] += 0.5 * dt * (accz[i*b + j] + Fz);

	accx[i*b + j] = Fx;
	accy[i*b + j] = Fy;
	accz[i*b + j] = Fz;
}


int cuMainLoop(double *x, double *y, double *z, int nMols, int nBeads){
	
	cudaSetDevice(1);
	
	std::ofstream inx("initOut.dat");
	for (int i = 0; i < nBeads*nMols; i++){
		inx << std::setw(15) << x[i]
			<< std::setw(15) << y[i]
			<< std::setw(15) << z[i]
			<< std::endl;
	}

	// d in front of a variable in this functions means it's a device variable
	double *dx, *dy, *dz;
	double *dvx, *dvy, *dvz;
	double *daccx, *daccy, *daccz;

	double *dcentroidsx, *dcentroidsy, *dcentroidsz;

	cudaMalloc(&dcentroidsx, sizeof(double)*nMols);
	cudaMalloc(&dcentroidsy, sizeof(double)*nMols);
	cudaMalloc(&dcentroidsz, sizeof(double)*nMols);

	cudaMalloc(&dx, sizeof(double) * nBeads * nMols);
	cudaMalloc(&dy, sizeof(double) * nBeads * nMols);
	cudaMalloc(&dz, sizeof(double) * nBeads * nMols);

	cudaMalloc(&dvx, sizeof(double) * nBeads * nMols);
	cudaMalloc(&dvy, sizeof(double) * nBeads * nMols);
	cudaMalloc(&dvz, sizeof(double) * nBeads * nMols);

	cudaMalloc(&daccx, sizeof(double) * nBeads * nMols);
	cudaMalloc(&daccy, sizeof(double) * nBeads * nMols);
	cudaMalloc(&daccz, sizeof(double) * nBeads * nMols);

	cudaMemcpy(dx, x, nMols * nBeads * sizeof(double), cudaMemcpyHostToDevice);
	cudaMemcpy(dy, y, nMols * nBeads * sizeof(double), cudaMemcpyHostToDevice);
	cudaMemcpy(dz, z, nMols * nBeads * sizeof(double), cudaMemcpyHostToDevice);

	getCentroids<<<nMols, nBeads, 3 * nBeads * sizeof(double)>>>(dx, dy, dz, dcentroidsx, dcentroidsy, dcentroidsz);

	int* verletList;
	int* verletListEnd;


	cudaMalloc(&verletList, sizeof(int) * nMols * verletStride);
	cudaMalloc(&verletListEnd, sizeof(int) * nMols);

	
	getVerletList<<<nMols,1>>>(verletList, verletListEnd, dcentroidsx, dcentroidsy, dcentroidsz, nMols);

	// Initialize velocities and acceleratiosn
	double *evx, *evy, *evz;
	double *eaccx, *eaccy, *eaccz;

	evx = new double[nBeads * nMols];
	evy = new double[nBeads * nMols];
	evz = new double[nBeads * nMols];

	eaccx = new double[nBeads * nMols];
	eaccy = new double[nBeads * nMols];
	eaccz = new double[nBeads * nMols];

	for (int i = 0; i < nBeads*nMols; i++){
		evx[i] = 0;
		evy[i] = 0;
		evz[i] = 0;
		eaccx[i] = 0;
		eaccy[i] = 0;
		eaccz[i] = 0;
	}

	cudaMemcpy(dvx, evx, sizeof(double) * nBeads * nMols, cudaMemcpyHostToDevice);
	cudaMemcpy(dvy, evy, sizeof(double) * nBeads * nMols, cudaMemcpyHostToDevice);
	cudaMemcpy(dvz, evz, sizeof(double) * nBeads * nMols, cudaMemcpyHostToDevice);
	cudaMemcpy(daccx, eaccx, sizeof(double) * nBeads * nMols, cudaMemcpyHostToDevice);
	cudaMemcpy(daccy, eaccy, sizeof(double) * nBeads * nMols, cudaMemcpyHostToDevice);
	cudaMemcpy(daccz, eaccz, sizeof(double) * nBeads * nMols, cudaMemcpyHostToDevice);

	for (int i = 0; i < 2000; i++){
		MDStep<<<nMols, nBeads, (3 * verletStride * nBeads + 6 * nBeads) * sizeof(double)>>>(dx, dy, dz, verletList, verletListEnd, dvx, dvy, dvz, daccx, daccy, daccz);
		std::cout << i << std::endl;
		cudaDeviceSynchronize();
		//cudaMemcpy(x, dx, nMols * nBeads * sizeof(double), cudaMemcpyDeviceToHost);
		//cudaMemcpy(y, dy, nMols * nBeads * sizeof(double), cudaMemcpyDeviceToHost);
		//cudaMemcpy(z, dz, nMols * nBeads * sizeof(double), cudaMemcpyDeviceToHost);
		//cudaMemcpy(evx, dvx, sizeof(double)* nBeads * nMols, cudaMemcpyDeviceToHost);
		//cudaMemcpy(evy, dvy, sizeof(double)* nBeads * nMols, cudaMemcpyDeviceToHost);
		//cudaMemcpy(evz, dvz, sizeof(double)* nBeads * nMols, cudaMemcpyDeviceToHost);
		//cudaMemcpy(eaccx, daccx, sizeof(double)* nBeads * nMols, cudaMemcpyDeviceToHost);
		//cudaMemcpy(eaccy, daccy, sizeof(double)* nBeads * nMols, cudaMemcpyDeviceToHost);
		//cudaMemcpy(eaccz, daccz, sizeof(double)* nBeads * nMols, cudaMemcpyDeviceToHost);

		//std::ofstream out("finalOut.dat");
		//for (int i = 0; i < nBeads*nMols; i++){
		//	out << std::setw(15) << x[i]
		//		<< std::setw(15) << y[i]
		//		<< std::setw(15) << z[i]
		//		<< std::endl;
		//}

	}

	cudaMemcpy(x, dx, nMols * nBeads * sizeof(double), cudaMemcpyDeviceToHost);
	cudaMemcpy(y, dy, nMols * nBeads * sizeof(double), cudaMemcpyDeviceToHost);
	cudaMemcpy(z, dz, nMols * nBeads * sizeof(double), cudaMemcpyDeviceToHost);
	cudaMemcpy(evx, dvx, sizeof(double) * nBeads * nMols, cudaMemcpyDeviceToHost);
	cudaMemcpy(evy, dvy, sizeof(double) * nBeads * nMols, cudaMemcpyDeviceToHost);
	cudaMemcpy(evz, dvz, sizeof(double) * nBeads * nMols, cudaMemcpyDeviceToHost);
	cudaMemcpy(eaccx, daccx, sizeof(double) * nBeads * nMols, cudaMemcpyDeviceToHost);
	cudaMemcpy(eaccy, daccy, sizeof(double) * nBeads * nMols, cudaMemcpyDeviceToHost);
	cudaMemcpy(eaccz, daccz, sizeof(double) * nBeads * nMols, cudaMemcpyDeviceToHost);

	std::ofstream out("finalOut.dat");
	for (int i = 0; i < nBeads*nMols; i++){
		out << std::setw(15) << x[i]
			<< std::setw(15) << y[i]
			<< std::setw(15) << z[i]
			<< std::endl;
	}

	return EXIT_SUCCESS;
}
	.file	"tmpxft_002af095_00000000-6_mainIterator.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4008:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4008:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.type	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0, @function
_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0:
.LFB4717:
	.cfi_startproc
	jmp	cudaMalloc@PLT
	.cfi_endproc
.LFE4717:
	.size	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0, .-_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	.globl	_Z42__device_stub__Z12getCentroidsPdS_S_S_S_S_PdS_S_S_S_S_
	.type	_Z42__device_stub__Z12getCentroidsPdS_S_S_S_S_PdS_S_S_S_S_, @function
_Z42__device_stub__Z12getCentroidsPdS_S_S_S_S_PdS_S_S_S_S_:
.LFB4030:
	.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
	movq	%rcx, 16(%rsp)
	leaq	64(%rsp), %rcx
	movq	%r8, 8(%rsp)
	movq	%r9, (%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	16(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 152(%rsp)
	movq	%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	_Z12getCentroidsPdS_S_S_S_S_(%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
.LFE4030:
	.size	_Z42__device_stub__Z12getCentroidsPdS_S_S_S_S_PdS_S_S_S_S_, .-_Z42__device_stub__Z12getCentroidsPdS_S_S_S_S_PdS_S_S_S_S_
	.globl	_Z12getCentroidsPdS_S_S_S_S_
	.type	_Z12getCentroidsPdS_S_S_S_S_, @function
_Z12getCentroidsPdS_S_S_S_S_:
.LFB4031:
	.cfi_startproc
	endbr64
	jmp	_Z42__device_stub__Z12getCentroidsPdS_S_S_S_S_PdS_S_S_S_S_
	.cfi_endproc
.LFE4031:
	.size	_Z12getCentroidsPdS_S_S_S_S_, .-_Z12getCentroidsPdS_S_S_S_S_
	.globl	_Z44__device_stub__Z13getVerletListPiS_PdS0_S0_iPiS_PdS0_S0_i
	.type	_Z44__device_stub__Z13getVerletListPiS_PdS0_S0_iPiS_PdS0_S0_i, @function
_Z44__device_stub__Z13getVerletListPiS_PdS0_S0_iPiS_PdS0_S0_i:
.LFB4032:
	.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
	movq	%rcx, 16(%rsp)
	leaq	64(%rsp), %rcx
	movq	%r8, 8(%rsp)
	movl	%r9d, 4(%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	16(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 160(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 72(%rsp)
	movq	%rax, 84(%rsp)
	movl	$1, 92(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L9
	pushq	64(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z13getVerletListPiS_PdS0_S0_i(%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
.L9:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4032:
	.size	_Z44__device_stub__Z13getVerletListPiS_PdS0_S0_iPiS_PdS0_S0_i, .-_Z44__device_stub__Z13getVerletListPiS_PdS0_S0_iPiS_PdS0_S0_i
	.globl	_Z13getVerletListPiS_PdS0_S0_i
	.type	_Z13getVerletListPiS_PdS0_S0_i, @function
_Z13getVerletListPiS_PdS0_S0_i:
.LFB4033:
	.cfi_startproc
	endbr64
	jmp	_Z44__device_stub__Z13getVerletListPiS_PdS0_S0_iPiS_PdS0_S0_i
	.cfi_endproc
.LFE4033:
	.size	_Z13getVerletListPiS_PdS0_S0_i, .-_Z13getVerletListPiS_PdS0_S0_i
	.globl	_Z46__device_stub__Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_PdS_S_PiS0_S_S_S_S_S_S_
	.type	_Z46__device_stub__Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_PdS_S_PiS0_S_S_S_S_S_S_, @function
_Z46__device_stub__Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_PdS_S_PiS0_S_S_S_S_S_S_:
.LFB4034:
	.cfi_startproc
	endbr64
	subq	$264, %rsp
	.cfi_def_cfa_offset 272
	movq	272(%rsp), %rax
	movq	%rdi, 88(%rsp)
	leaq	112(%rsp), %rdi
	movq	%rsi, 80(%rsp)
	leaq	124(%rsp), %rsi
	movq	%rax, 40(%rsp)
	movq	280(%rsp), %rax
	movq	%rdx, 72(%rsp)
	leaq	96(%rsp), %rdx
	movq	%rax, 32(%rsp)
	movq	288(%rsp), %rax
	movq	%rcx, 64(%rsp)
	leaq	104(%rsp), %rcx
	movq	%rax, 24(%rsp)
	movq	296(%rsp), %rax
	movq	%r8, 56(%rsp)
	movq	%rax, 16(%rsp)
	movq	304(%rsp), %rax
	movq	%r9, 48(%rsp)
	movq	%rax, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 248(%rsp)
	xorl	%eax, %eax
	leaq	88(%rsp), %rax
	movq	%rax, 160(%rsp)
	leaq	80(%rsp), %rax
	movq	%rax, 168(%rsp)
	leaq	72(%rsp), %rax
	movq	%rax, 176(%rsp)
	leaq	64(%rsp), %rax
	movq	%rax, 184(%rsp)
	leaq	56(%rsp), %rax
	movq	%rax, 192(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 200(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 208(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 216(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 224(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 232(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 240(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 112(%rsp)
	movl	$1, 120(%rsp)
	movq	%rax, 124(%rsp)
	movl	$1, 132(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L14
	pushq	104(%rsp)
	.cfi_def_cfa_offset 280
	leaq	_Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_(%rip), %rdi
	pushq	104(%rsp)
	.cfi_def_cfa_offset 288
	movq	140(%rsp), %rcx
	movl	148(%rsp), %r8d
	movq	128(%rsp), %rsi
	movl	136(%rsp), %edx
	leaq	176(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 280
	popq	%rdx
	.cfi_def_cfa_offset 272
.L14:
	movq	248(%rsp), %rax
	subq	%fs:40, %rax
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	addq	$264, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4034:
	.size	_Z46__device_stub__Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_PdS_S_PiS0_S_S_S_S_S_S_, .-_Z46__device_stub__Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_PdS_S_PiS0_S_S_S_S_S_S_
	.globl	_Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_
	.type	_Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_, @function
_Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_:
.LFB4035:
	.cfi_startproc
	endbr64
	jmp	_Z46__device_stub__Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_PdS_S_PiS0_S_S_S_S_S_S_
	.cfi_endproc
.LFE4035:
	.size	_Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_, .-_Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"_Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_"
.LC1:
	.string	"_Z13getVerletListPiS_PdS0_S0_i"
.LC2:
	.string	"_Z12getCentroidsPdS_S_S_S_S_"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4037:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	pushq	$0
	.cfi_def_cfa_offset 24
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC1(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z13getVerletListPiS_PdS0_S0_i(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC2(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z12getCentroidsPdS_S_S_S_S_(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE4037:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.rodata.str1.1
.LC3:
	.string	"initOut.dat"
.LC5:
	.string	"finalOut.dat"
	.text
	.globl	_Z10cuMainLoopPdS_S_ii
	.type	_Z10cuMainLoopPdS_S_ii, @function
_Z10cuMainLoopPdS_S_ii:
.LFB4005:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4005
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	leaq	-1080(%rbp), %r15
	xorl	%r14d, %r14d
	pushq	%r13
	.cfi_offset 13, -40
	movq	%rdx, %r13
	pushq	%r12
	.cfi_offset 12, -48
	movq	%rsi, %r12
	pushq	%rbx
	.cfi_offset 3, -56
	movl	%ecx, %ebx
	subq	$1256, %rsp
	movq	%rdi, -1240(%rbp)
	movl	$1, %edi
	movl	%r8d, -1228(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
.LEHB0:
	call	cudaSetDevice@PLT
	movl	$16, %edx
	leaq	.LC3(%rip), %rsi
	movq	%r15, %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE0:
	movl	-1228(%rbp), %eax
	imull	%ebx, %eax
	movl	%eax, -1232(%rbp)
.L22:
	cmpl	%r14d, -1232(%rbp)
	jle	.L58
	movq	-1080(%rbp), %rax
	movq	%r15, %rdi
	movq	-24(%rax), %rax
	movq	$15, -1064(%rbp,%rax)
	movq	-1240(%rbp), %rax
	movsd	(%rax,%r14,8), %xmm0
.LEHB1:
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	movq	(%rax), %rax
	movsd	(%r12,%r14,8), %xmm0
	movq	-24(%rax), %rax
	movq	$15, 16(%rdi,%rax)
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	movq	(%rax), %rax
	movsd	0(%r13,%r14,8), %xmm0
	movq	-24(%rax), %rax
	movq	$15, 16(%rdi,%rax)
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
	incq	%r14
	jmp	.L22
.L58:
	movslq	%ebx, %r14
	leaq	-1144(%rbp), %rdi
	leaq	0(,%r14,8), %r15
	movq	%r15, %rsi
	call	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	leaq	-1136(%rbp), %rdi
	movq	%r15, %rsi
	call	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	leaq	-1128(%rbp), %rdi
	movq	%r15, %rsi
	call	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	movslq	-1228(%rbp), %r15
	leaq	-1216(%rbp), %rdi
	imulq	%r14, %r15
	leaq	0(,%r15,8), %rax
	movq	%rax, %rsi
	movq	%rax, -1224(%rbp)
	call	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	movq	-1224(%rbp), %rsi
	leaq	-1208(%rbp), %rdi
	call	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	movq	-1224(%rbp), %rsi
	leaq	-1200(%rbp), %rdi
	call	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	movq	-1224(%rbp), %rsi
	leaq	-1192(%rbp), %rdi
	call	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	movq	-1224(%rbp), %rsi
	leaq	-1184(%rbp), %rdi
	call	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	movq	-1224(%rbp), %rsi
	leaq	-1176(%rbp), %rdi
	call	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	movq	-1224(%rbp), %rsi
	leaq	-1168(%rbp), %rdi
	call	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	movq	-1224(%rbp), %rsi
	leaq	-1160(%rbp), %rdi
	call	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	movq	-1224(%rbp), %rsi
	leaq	-1152(%rbp), %rdi
	call	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	movq	-1224(%rbp), %rdx
	movq	-1240(%rbp), %rsi
	movl	$1, %ecx
	movq	-1216(%rbp), %rdi
	call	cudaMemcpy@PLT
	movq	-1224(%rbp), %rdx
	movq	-1208(%rbp), %rdi
	movl	$1, %ecx
	movq	%r12, %rsi
	call	cudaMemcpy@PLT
	movq	-1224(%rbp), %rdx
	movq	-1200(%rbp), %rdi
	movl	$1, %ecx
	movq	%r13, %rsi
	call	cudaMemcpy@PLT
	movl	-1228(%rbp), %eax
	movl	%ebx, -1104(%rbp)
	xorl	%r9d, %r9d
	movl	%eax, -1092(%rbp)
	movabsq	$4294967297, %rax
	movq	%rax, -1088(%rbp)
	movl	-1084(%rbp), %ecx
	movq	%rax, -1100(%rbp)
	imull	$3, -1228(%rbp), %eax
	movq	-1092(%rbp), %rdx
	movq	-1104(%rbp), %rdi
	movl	-1096(%rbp), %esi
	cltq
	leaq	0(,%rax,8), %r8
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	je	.L24
.L26:
	imulq	$400, %r14, %rsi
	leaq	-1120(%rbp), %rdi
	call	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	jmp	.L59
.L24:
	movq	-1128(%rbp), %r9
	movq	-1136(%rbp), %r8
	movq	-1144(%rbp), %rcx
	movq	-1200(%rbp), %rdx
	movq	-1208(%rbp), %rsi
	movq	-1216(%rbp), %rdi
	call	_Z42__device_stub__Z12getCentroidsPdS_S_S_S_S_PdS_S_S_S_S_
	jmp	.L26
.L59:
	leaq	0(,%r14,4), %rsi
	leaq	-1112(%rbp), %rdi
	call	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	movabsq	$4294967297, %rdx
	movl	%ebx, -1104(%rbp)
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%rdx, -1100(%rbp)
	movl	-1096(%rbp), %esi
	movl	$1, %ecx
	movq	-1104(%rbp), %rdi
	movq	%rdx, -1092(%rbp)
	movl	$1, -1084(%rbp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	je	.L27
.L30:
	movabsq	$1152921504606846975, %rax
	cmpq	%r15, %rax
	jnb	.L28
	jmp	.L60
.L27:
	movq	-1128(%rbp), %r8
	movq	-1136(%rbp), %rcx
	movl	%ebx, %r9d
	movq	-1144(%rbp), %rdx
	movq	-1112(%rbp), %rsi
	movq	-1120(%rbp), %rdi
	call	_Z44__device_stub__Z13getVerletListPiS_PdS0_S0_iPiS_PdS0_S0_i
	jmp	.L30
.L28:
	movq	-1224(%rbp), %rdi
	call	_Znam@PLT
	movq	-1224(%rbp), %rdi
	movq	%rax, -1248(%rbp)
	call	_Znam@PLT
	jmp	.L61
.L60:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L55
	call	__cxa_throw_bad_array_new_length@PLT
.L61:
	movq	-1224(%rbp), %rdi
	movq	%rax, -1256(%rbp)
	call	_Znam@PLT
	movq	-1224(%rbp), %rdi
	movq	%rax, -1264(%rbp)
	call	_Znam@PLT
	movq	-1224(%rbp), %rdi
	movq	%rax, -1272(%rbp)
	call	_Znam@PLT
	movq	-1224(%rbp), %rdi
	movq	%rax, -1280(%rbp)
	call	_Znam@PLT
	movq	%rax, -1288(%rbp)
	xorl	%eax, %eax
.L33:
	cmpl	%eax, -1232(%rbp)
	jle	.L62
	movq	-1248(%rbp), %rcx
	movq	-1256(%rbp), %rdx
	movq	$0x000000000, (%rcx,%rax,8)
	movq	-1264(%rbp), %rcx
	movq	$0x000000000, (%rdx,%rax,8)
	movq	-1272(%rbp), %rdx
	movq	$0x000000000, (%rcx,%rax,8)
	movq	-1280(%rbp), %rcx
	movq	$0x000000000, (%rdx,%rax,8)
	movq	-1288(%rbp), %rdx
	movq	$0x000000000, (%rcx,%rax,8)
	movq	$0x000000000, (%rdx,%rax,8)
	incq	%rax
	jmp	.L33
.L62:
	movq	-1224(%rbp), %rdx
	movq	-1248(%rbp), %rsi
	movl	$1, %ecx
	movq	-1192(%rbp), %rdi
	call	cudaMemcpy@PLT
	movq	-1224(%rbp), %rdx
	movq	-1256(%rbp), %rsi
	movl	$1, %ecx
	movq	-1184(%rbp), %rdi
	call	cudaMemcpy@PLT
	movq	-1224(%rbp), %rdx
	movq	-1264(%rbp), %rsi
	movl	$1, %ecx
	movq	-1176(%rbp), %rdi
	call	cudaMemcpy@PLT
	movq	-1224(%rbp), %rdx
	movq	-1272(%rbp), %rsi
	movl	$1, %ecx
	movq	-1168(%rbp), %rdi
	call	cudaMemcpy@PLT
	movq	-1224(%rbp), %rdx
	movq	-1280(%rbp), %rsi
	movl	$1, %ecx
	movq	-1160(%rbp), %rdi
	call	cudaMemcpy@PLT
	movq	-1224(%rbp), %rdx
	movq	-1288(%rbp), %rsi
	movl	$1, %ecx
	movq	-1152(%rbp), %rdi
	call	cudaMemcpy@PLT
	imull	$306, -1228(%rbp), %eax
	xorl	%r15d, %r15d
	movabsq	$4294967297, %r14
	cltq
	salq	$3, %rax
	movq	%rax, -1296(%rbp)
.L38:
	movl	-1228(%rbp), %eax
	movq	%r14, -1088(%rbp)
	xorl	%r9d, %r9d
	movq	%r14, -1100(%rbp)
	movl	-1084(%rbp), %ecx
	movl	%eax, -1092(%rbp)
	movq	-1296(%rbp), %r8
	movl	%ebx, -1104(%rbp)
	movq	-1092(%rbp), %rdx
	movq	-1104(%rbp), %rdi
	movl	-1096(%rbp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	je	.L35
.L37:
	movl	%r15d, %esi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZNSolsEi@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
	jmp	.L63
.L35:
	pushq	%rax
	movq	-1112(%rbp), %r8
	pushq	-1152(%rbp)
	movq	-1120(%rbp), %rcx
	pushq	-1160(%rbp)
	pushq	-1168(%rbp)
	pushq	-1176(%rbp)
	pushq	-1184(%rbp)
	movq	-1192(%rbp), %r9
	movq	-1200(%rbp), %rdx
	movq	-1208(%rbp), %rsi
	movq	-1216(%rbp), %rdi
	.cfi_escape 0x2e,0x30
	call	_Z46__device_stub__Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_PdS_S_PiS0_S_S_S_S_S_S_
	addq	$48, %rsp
	jmp	.L37
.L63:
	.cfi_escape 0x2e,0
	call	cudaDeviceSynchronize@PLT
	incl	%r15d
	cmpl	$2000, %r15d
	jne	.L38
	movq	-1224(%rbp), %rdx
	movq	-1216(%rbp), %rsi
	movl	$2, %ecx
	movq	-1240(%rbp), %rdi
	call	cudaMemcpy@PLT
	movq	-1224(%rbp), %rdx
	movq	-1208(%rbp), %rsi
	movl	$2, %ecx
	movq	%r12, %rdi
	call	cudaMemcpy@PLT
	movq	-1224(%rbp), %rdx
	movq	-1200(%rbp), %rsi
	movl	$2, %ecx
	movq	%r13, %rdi
	call	cudaMemcpy@PLT
	movq	-1224(%rbp), %rdx
	movq	-1192(%rbp), %rsi
	movl	$2, %ecx
	movq	-1248(%rbp), %rdi
	call	cudaMemcpy@PLT
	movq	-1224(%rbp), %rdx
	movq	-1184(%rbp), %rsi
	movl	$2, %ecx
	movq	-1256(%rbp), %rdi
	call	cudaMemcpy@PLT
	movq	-1224(%rbp), %rdx
	movq	-1176(%rbp), %rsi
	movl	$2, %ecx
	movq	-1264(%rbp), %rdi
	call	cudaMemcpy@PLT
	movq	-1224(%rbp), %rdx
	movq	-1168(%rbp), %rsi
	movl	$2, %ecx
	movq	-1272(%rbp), %rdi
	call	cudaMemcpy@PLT
	movq	-1224(%rbp), %rdx
	movq	-1160(%rbp), %rsi
	movl	$2, %ecx
	movq	-1280(%rbp), %rdi
	call	cudaMemcpy@PLT
	movq	-1224(%rbp), %rdx
	movq	-1152(%rbp), %rsi
	movl	$2, %ecx
	movq	-1288(%rbp), %rdi
	call	cudaMemcpy@PLT
	leaq	-568(%rbp), %rax
	movl	$16, %edx
	leaq	.LC5(%rip), %rsi
	movq	%rax, %rdi
	movq	%rax, %r14
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE1:
	xorl	%ebx, %ebx
.L39:
	cmpl	%ebx, -1232(%rbp)
	jle	.L64
	movq	-568(%rbp), %rax
	movq	%r14, %rdi
	movq	-24(%rax), %rax
	movq	$15, -552(%rbp,%rax)
	movq	-1240(%rbp), %rax
	movsd	(%rax,%rbx,8), %xmm0
.LEHB2:
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	movq	(%rax), %rax
	movsd	(%r12,%rbx,8), %xmm0
	movq	-24(%rax), %rax
	movq	$15, 16(%rdi,%rax)
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	movq	(%rax), %rax
	movsd	0(%r13,%rbx,8), %xmm0
	movq	-24(%rax), %rax
	movq	$15, 16(%rdi,%rax)
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
.LEHE2:
	incq	%rbx
	jmp	.L39
.L64:
	movq	%r14, %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev@PLT
	leaq	-1080(%rbp), %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	je	.L44
	jmp	.L55
.L48:
	endbr64
	movq	%rax, %rbx
.L41:
	movq	%r14, %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L42
.L47:
	endbr64
	movq	%rax, %rbx
.L42:
	leaq	-1080(%rbp), %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L55
	movq	%rbx, %rdi
.LEHB3:
	call	_Unwind_Resume@PLT
.LEHE3:
.L55:
	call	__stack_chk_fail@PLT
.L44:
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4005:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA4005:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4005-.LLSDACSB4005
.LLSDACSB4005:
	.uleb128 .LEHB0-.LFB4005
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB4005
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L47-.LFB4005
	.uleb128 0
	.uleb128 .LEHB2-.LFB4005
	.uleb128 .LEHE2-.LEHB2
	.uleb128 .L48-.LFB4005
	.uleb128 0
	.uleb128 .LEHB3-.LFB4005
	.uleb128 .LEHE3-.LEHB3
	.uleb128 0
	.uleb128 0
.LLSDACSE4005:
	.text
	.size	_Z10cuMainLoopPdS_S_ii, .-_Z10cuMainLoopPdS_S_ii
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.hidden	DW.ref.__gxx_personality_v0
	.weak	DW.ref.__gxx_personality_v0
	.section	.data.rel.local.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
	.align 8
	.type	DW.ref.__gxx_personality_v0, @object
	.size	DW.ref.__gxx_personality_v0, 8
DW.ref.__gxx_personality_v0:
	.quad	__gxx_personality_v0
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

// Main computational method of the project
#include <hip/hip_runtime.h>


#include <math.h>
#include "mainIterator.cuh"
#include <iostream>
#include <fstream>
#include <iomanip>

// Define statements are a quick and dirty way of getting global constants to the device.
// If I had more style and skill, I'd use device constants. But I don't :P
#define PI 3.14159265359
#define verletStride 100
#define cutoff 1.2
#define k_l 1.46E5
#define k_th 251.04
#define k_phi1 6.78
#define k_phi2 -3.6
#define k_phi3 13.56
#define l_0 0.153
#define th_0 1.187
#define eps 0.39
#define sigma 0.401
#define ax .40214
#define ay .11031
#define az .04552
#define bx 0.0
#define by .47345
#define bz .04051
#define cx -.00002849
#define cy -.00003859
#define cz 1.09983
#define mCH2 14.0266
#define mCH3 15.0345
#define dt 0.001 // Energy is in units of Kj, mass is in units of g and distance is in units of nm, so natural time units are ps

// Simple integer power function for the LJ potential.

// Each thread block contains nBeads threads. There are nMols thread blocks. Therefore, each molecule is its own thread block.
// Each molecule computes its own centroid and puts it into dcentroids
// This is done via a parallel reduction algorithm that calculates a sum of n elements in O(log(n)) time.
// Currently, this only works for n-alkanes where n is a power of 2
__global__ void getCentroids(double*x, double*y, double*z, double *dcentroidsx, double *dcentroidsy, double *dcentroidsz){
	int nBeads = blockDim.x;
	int i = blockIdx.x * nBeads + threadIdx.x;
	int level = 1;

	// Declare a shared variable to be used to calculate the centroid before copying into global memory.
	extern __shared__ double c[];
	double *mycx = c;
	double *mycy = &(c[nBeads]);
	double *mycz = &(c[2 * nBeads]);

	// Each bead copies its own info into the shared memory space.
	// Global memory bad!
	mycx[threadIdx.x] = x[i];
	mycy[threadIdx.x] = y[i];
	mycz[threadIdx.x] = z[i];

	__syncthreads();

	// Do a parallel reduction to find the sum of all the positions.
	while (level < nBeads){
		if (threadIdx.x % (2*level) == 0){
			mycx[threadIdx.x] += mycx[threadIdx.x + level];
			mycy[threadIdx.x] += mycy[threadIdx.x + level];
			mycz[threadIdx.x] += mycz[threadIdx.x + level];
		}
		level *= 2;
	}
	// Thread 0 then copies its own cx cy and cz back into global memory.
	if (threadIdx.x == 0){
		dcentroidsx[blockIdx.x] = mycx[0] / nBeads;
		dcentroidsy[blockIdx.x] = mycy[0] / nBeads;
		dcentroidsz[blockIdx.x] = mycz[0] / nBeads;
	}
}

// We next, we generate the Verlet list. This massively speeds up computation time.
// Now, each thread block has only one thread (representing one molecule). Each thread block will calculate its own verlet cell.
// This and the centroid calculation happen once every *very many* iterations because the verlet list is not very likely to change
// and centroids are only used to calculate the verlet list.
__global__ void getVerletList(int*verletList, int *verletListEnd, double*xCentroids, double*yCentroids, double*zCentroids, int nMols){
	// Copy own centroid into local memory and make local copies of all the parameters.
	double ctfsq = cutoff;
	ctfsq *= ctfsq;
	int mols = nMols;
	int stride = verletStride;
	int idx = blockIdx.x;
	double c[3];
	double dx[3];
	c[0] = xCentroids[idx];
	c[1] = yCentroids[idx];
	c[2] = zCentroids[idx];

	// Iterate forward, with 
	int verletCount = -1;
	for (int i = 1; i < mols; i++){
		int j = (i + idx) % mols;
		dx[0] = xCentroids[j] - c[0];
		dx[1] = yCentroids[j] - c[1];
		dx[2] = zCentroids[j] - c[2];
		if (dx[0] * dx[0] + dx[1] * dx[1] + dx[2] * dx[2] < ctfsq){
			verletCount++;
			verletList[stride * idx + verletCount] = j;
		}
	}
	if (verletCount >0){
		verletListEnd[idx] = stride * idx + verletCount;
	}
	else {
		verletListEnd[idx] = -1;
	}
}

// This is the main MD method.
// Technically, one octane (8 threads) per block is very inefficient. I should be using threadblocks of at least 32 threads. However, this would make programming a nightmare, as I'd have to first spend time figuring out how to organize the 4 octanes into memory and constantly making sure that they don't accidentally overlap.
__global__ void MDStep(double *xGlobal, double *yGlobal, double *zGlobal, int *verletList, int * verletListEnd, double *vx, double *vy, double *vz, double *accx, double *accy, double *accz){
	// Copy constants into local memory... The caffeine in my bloodstream doesn't trust whatever's coming in through the functionc call >.>
	int i = blockIdx.x;
	int j = threadIdx.x;
	int b = blockDim.x;

	// Pushing the max shared memory limit pretty hard here =/ Max shared memory is 49152B I'm using 19584B (although I should be able to cut this by half if things behave well enough) Right now, verletStride doesn't need to be more than 30.
	extern __shared__ double sharedMem[];
	double *x = sharedMem;
	double *y = &(sharedMem[b]);
	double *z = &(sharedMem[2 * b]);
	double *r = &(sharedMem[3 * b]);
	double *theta = &(sharedMem[4 * b]);
	double *phi = &(sharedMem[5 * b]);
	double *verletX = &(sharedMem[6 * b]);
	double *verletY = &(sharedMem[(6 + verletStride) * b]);
	double *verletZ = &(sharedMem[(6 + 2 * verletStride) * b]);

	// First, copy positions into shared memory and perform first step of velocity-Verlet. Each thread copies its own position. Thread = bead.
	x[j] = xGlobal[i*b + j] + vx[i*b + j] * dt + 0.5 * accx[i*b + j] * dt * dt;
	y[j] = yGlobal[i*b + j] + vy[i*b + j] * dt + 0.5 * accy[i*b + j] * dt * dt;
	z[j] = zGlobal[i*b + j] + vz[i*b + j] * dt + 0.5 * accz[i*b + j] * dt * dt;

	xGlobal[i*b + j] = x[j];
	yGlobal[i*b + j] = y[j];
	zGlobal[i*b + j] = z[j];

	__syncthreads();

	// Next, copy positions of other molecules in the verletList into shared memory. Each thread copies data corresponding to itself.
	int vCount = 0;
	for (int idx = verletStride * i; idx <= verletListEnd[i]; idx++){
		verletX[vCount * b + j] = xGlobal[verletList[idx] * b + j];
		verletY[vCount * b + j] = yGlobal[verletList[idx] * b + j];
		verletZ[vCount * b + j] = zGlobal[verletList[idx] * b + j];
		vCount++;
	}

	__syncthreads();

	// Each molecule stores a vector to the next bead and the previous bead.
	// The third set of beads is the distance between the next bead and the bead after that (for torsion calculation).
	double dxp, dyp, dzp, dxm, dym, dzm, dxpp, dypp, dzpp;

	if (j < (b - 1)) {
		dxp = x[j + 1] - x[j];
		dyp = y[j + 1] - y[j];
		dzp = z[j + 1] - z[j];
	}
	else {
		dxp = 0;
		dyp = 0;
		dzp = 0;
	}

	if (j > 0){
		dxm = x[j - 1] - x[j];
		dym = y[j - 1] - y[j];
		dzm = z[j - 1] - z[j];
	}
	else {
		dxm = 0;
		dym = 0;
		dzm = 0;
	}

	if (j < (b - 2)) {
		dxpp = x[j + 2] - x[j + 1];
		dypp = y[j + 2] - y[j + 1];
		dzpp = z[j + 2] - z[j + 1];
	}

	// Next, calculate distances between beads. Each thread calculates the distance to the next bead.
	r[j] = sqrt(dxp * dxp + dyp * dyp + dzp * dzp);

	__syncthreads();

	// Now, calculate angles between beads. Each bead claculates the angle that has it at the origin.
	// The threads at the edges will produce nonsensical results, but we're not going to access them (in any useful manner) anyway.
	// Allowing the edge threads to calculate angles minimizes thread divergence (different theads doing different things).
	theta[j] = acos((dxp * dxm + dyp * dym + dzp * dzm) / r[j] / r[j - 1]);

	// Finally, calculate four-molecule torsion angles.
	// Same as above, this will produce some nonsensical data, but we won't be accessing it.
	phi[j] = acos((dxm * dxpp + dym * dypp + dzm * dzpp) / r[j - 1] / r[j + 1]);

	// Now, each molecule calculates a force on itself from ALL the terms. ALL OF THEM.

	double Fx = 0, Fy = 0, Fz = 0;

	// First, the spring term. Each bead receives a contribution from the bead ahead of it and from the bead behind it.
	double factor;
	if (j > 0) {
		factor = 2 * k_l * (r[j -1] - l_0) / r[j -1];
		Fx += factor * dxm;
		Fy += factor * dym;
		Fz += factor * dzm;
	}
	if (j < (b - 1)) {
		factor = 2 * k_l * (r[j] - l_0) / r[j];
		Fx += factor * dxp;
		Fy += factor * dyp;
		Fz += factor * dzp;
	}

	// Next, the theta term. A bit more complicated. Each molecule recieves a contribution from the angle behind it, the angle ahead of it, and the angle that has it as the origin.
	//if (j < (b - 2)) {
	//	factor = 2 * k_th * (th_0 - PI + theta[j + 1]) / r[j] / sin(theta[j + 1]);
	//	Fx += factor * (dxpp / r[j + 1] + cos(theta[j + 1]) * dxp / r[j]);
	//	Fy += factor * (dypp / r[j + 1] + cos(theta[j + 1]) * dyp / r[j]);
	//	Fz += factor * (dzpp / r[j + 1] + cos(theta[j + 1]) * dzp / r[j]);
	//}
	//if (j > 1) {
	//	factor = 2 * k_th * (th_0 - PI / 2.0 + theta[j - 1] / r[j - 1]) / sin(theta[j - 1]);
	//	Fx += factor * ((x[j - 2] - x[j - 1]) / r[j - 2] + cos(theta[j - 1]) * dxm / r[j - 1]);
	//	Fy += factor * ((y[j - 2] - y[j - 1]) / r[j - 2] + cos(theta[j - 1]) * dym / r[j - 1]);
	//	Fz += factor * ((z[j - 2] - z[j - 1]) / r[j - 2] + cos(theta[j - 1]) * dzm / r[j - 1]);
	//}
	//if (j > 0 && j < (b - 1)){
	//	factor = 2 * k_th * (th_0 - PI / 2.0 + theta[j]) / sin(theta[j]);
	//	Fx -= factor * (dxm / r[j - 1] - cos(theta[j]) * dxp / r[j]) / r[j]
	//		+ (dxp / r[j] - cos(theta[j]) * dxm / r[j - 1]) / r[j - 1];

	//	Fy -= factor * (dym / r[j - 1] - cos(theta[j]) * dyp / r[j]) / r[j]
	//		+ (dyp / r[j] - cos(theta[j]) * dym / r[j - 1]) / r[j - 1];

	//	Fz -= factor * (dzm / r[j - 1] - cos(theta[j]) * dzp / r[j]) / r[j]
	//		+ (dzp / r[j] - cos(theta[j]) * dzm / r[j - 1]) / r[j - 1];
	//}

	 //Next phi. Is WRONG with GIT?!
	//if (j < (b - 3)){
	//	factor = 0.5 * (k_phi1 * sin(phi[j + 1]) + 2 * k_phi2 * sin(2 * phi[j + 1]) + 3 * k_phi3 * sin(3 * phi[j + 1])) / sin(phi[j + 1]);
	//	Fx += factor * ((x[j + 3] - x[j + 2]) / r[j + 2] + cos(phi[j + 1]) * dxp / r[j]) / r[j];
	//	Fy += factor * ((y[j + 3] - y[j + 2]) / r[j + 2] + cos(phi[j + 1]) * dyp / r[j]) / r[j];
	//	Fz += factor * ((z[j + 3] - z[j + 2]) / r[j + 2] + cos(phi[j + 1]) * dzp / r[j]) / r[j];
	//}
	//if (j < (b - 2) && j > 0) {
	//	factor = 0.5 * (k_phi1 * sin(phi[j]) + 2 * k_phi2 * sin(2 * phi[j]) + 3 * k_phi3 * sin(3 * phi[j])) / sin(phi[j]);
	//	Fx -= factor * (dxpp / r[j + 1] - cos(phi[j]) * dxm / r[j - 1]) / r[j - 1];
	//	Fy -= factor * (dypp / r[j + 1] - cos(phi[j]) * dym / r[j - 1]) / r[j - 1];
	//	Fz -= factor * (dzpp / r[j + 1] - cos(phi[j]) * dzm / r[j - 1]) / r[j - 1];
	//}
	//if (j < (b - 1) && j > 1) {
	//	factor = 0.5 * (k_phi1 * sin(phi[j - 1]) + 2 * k_phi2 * sin(2 * phi[j - 1]) + 3 * k_phi3 * sin(3 * phi[j - 1])) / sin(phi[j - 1]);
	//	Fx -= factor * ((x[j - 2] - x[j - 1]) / r[j - 2] - cos(phi[j - 1]) * dxp / r[j]) / r[j];
	//	Fy -= factor * ((y[j - 2] - y[j - 1]) / r[j - 2] - cos(phi[j - 1]) * dyp / r[j]) / r[j];
	//	Fz -= factor * ((z[j - 2] - z[j - 1]) / r[j - 2] - cos(phi[j - 1]) * dzp / r[j]) / r[j];
	//}
	//if (j > 2) {
	//	factor = 0.5 * (k_phi1 * sin(phi[j - 2]) + 2 * k_phi2 * sin(2 * phi[j - 2]) + 3 * k_phi3 * sin(3 * phi[j - 2])) / sin(phi[j - 2]);
	//	Fx += factor * ((x[j - 3] - x[j - 2]) / r[j - 3] + cos(phi[j - 2]) * dxm / r[j - 1]) / r[j - 1];
	//	Fy += factor * ((y[j - 3] - y[j - 2]) / r[j - 3] + cos(phi[j - 2]) * dym / r[j - 1]) / r[j - 1];
	//	Fz += factor * ((z[j - 3] - z[j - 2]) / r[j - 3] + cos(phi[j - 2]) * dzm / r[j - 1]) / r[j - 1];
	//}
	
	// Finally, Van der Walls
	double dx, dy, dz, rsq, sdrcb;

	// Do this for everything in Verlet list
	for (int v = 0; v < vCount * b; v++){
		dx = verletX[v] - x[j];
		dy = verletY[v] - y[j];
		dz = verletZ[v] - z[j];
		rsq = dx * dx + dy * dy + dz * dz;
		sdrcb = sigma * sigma / rsq;
		sdrcb *= sdrcb * sdrcb;
		factor = 24 * eps * sdrcb * (1 - 2 * sdrcb) / rsq;
		Fx += factor * dx;
		Fy += factor * dy;
		Fz += factor * dz;
	}

	if (j == 0 || j == (b - 1)) {
		Fx /= mCH3;
		Fy /= mCH3;
		Fz /= mCH3;
	}
	else {
		Fx /= mCH2;
		Fy /= mCH2;
		Fz /= mCH2;
	}

	vx[i*b + j] += 0.5 * dt * (accx[i*b + j] + Fx);
	vy[i*b + j] += 0.5 * dt * (accy[i*b + j] + Fy);
	vz[i*b + j] += 0.5 * dt * (accz[i*b + j] + Fz);

	accx[i*b + j] = Fx;
	accy[i*b + j] = Fy;
	accz[i*b + j] = Fz;
}


int cuMainLoop(double *x, double *y, double *z, int nMols, int nBeads){
	
	hipSetDevice(1);
	
	std::ofstream inx("initOut.dat");
	for (int i = 0; i < nBeads*nMols; i++){
		inx << std::setw(15) << x[i]
			<< std::setw(15) << y[i]
			<< std::setw(15) << z[i]
			<< std::endl;
	}

	// d in front of a variable in this functions means it's a device variable
	double *dx, *dy, *dz;
	double *dvx, *dvy, *dvz;
	double *daccx, *daccy, *daccz;

	double *dcentroidsx, *dcentroidsy, *dcentroidsz;

	hipMalloc(&dcentroidsx, sizeof(double)*nMols);
	hipMalloc(&dcentroidsy, sizeof(double)*nMols);
	hipMalloc(&dcentroidsz, sizeof(double)*nMols);

	hipMalloc(&dx, sizeof(double) * nBeads * nMols);
	hipMalloc(&dy, sizeof(double) * nBeads * nMols);
	hipMalloc(&dz, sizeof(double) * nBeads * nMols);

	hipMalloc(&dvx, sizeof(double) * nBeads * nMols);
	hipMalloc(&dvy, sizeof(double) * nBeads * nMols);
	hipMalloc(&dvz, sizeof(double) * nBeads * nMols);

	hipMalloc(&daccx, sizeof(double) * nBeads * nMols);
	hipMalloc(&daccy, sizeof(double) * nBeads * nMols);
	hipMalloc(&daccz, sizeof(double) * nBeads * nMols);

	hipMemcpy(dx, x, nMols * nBeads * sizeof(double), hipMemcpyHostToDevice);
	hipMemcpy(dy, y, nMols * nBeads * sizeof(double), hipMemcpyHostToDevice);
	hipMemcpy(dz, z, nMols * nBeads * sizeof(double), hipMemcpyHostToDevice);

	getCentroids<<<nMols, nBeads, 3 * nBeads * sizeof(double)>>>(dx, dy, dz, dcentroidsx, dcentroidsy, dcentroidsz);

	int* verletList;
	int* verletListEnd;


	hipMalloc(&verletList, sizeof(int) * nMols * verletStride);
	hipMalloc(&verletListEnd, sizeof(int) * nMols);

	
	getVerletList<<<nMols,1>>>(verletList, verletListEnd, dcentroidsx, dcentroidsy, dcentroidsz, nMols);

	// Initialize velocities and acceleratiosn
	double *evx, *evy, *evz;
	double *eaccx, *eaccy, *eaccz;

	evx = new double[nBeads * nMols];
	evy = new double[nBeads * nMols];
	evz = new double[nBeads * nMols];

	eaccx = new double[nBeads * nMols];
	eaccy = new double[nBeads * nMols];
	eaccz = new double[nBeads * nMols];

	for (int i = 0; i < nBeads*nMols; i++){
		evx[i] = 0;
		evy[i] = 0;
		evz[i] = 0;
		eaccx[i] = 0;
		eaccy[i] = 0;
		eaccz[i] = 0;
	}

	hipMemcpy(dvx, evx, sizeof(double) * nBeads * nMols, hipMemcpyHostToDevice);
	hipMemcpy(dvy, evy, sizeof(double) * nBeads * nMols, hipMemcpyHostToDevice);
	hipMemcpy(dvz, evz, sizeof(double) * nBeads * nMols, hipMemcpyHostToDevice);
	hipMemcpy(daccx, eaccx, sizeof(double) * nBeads * nMols, hipMemcpyHostToDevice);
	hipMemcpy(daccy, eaccy, sizeof(double) * nBeads * nMols, hipMemcpyHostToDevice);
	hipMemcpy(daccz, eaccz, sizeof(double) * nBeads * nMols, hipMemcpyHostToDevice);

	for (int i = 0; i < 2000; i++){
		MDStep<<<nMols, nBeads, (3 * verletStride * nBeads + 6 * nBeads) * sizeof(double)>>>(dx, dy, dz, verletList, verletListEnd, dvx, dvy, dvz, daccx, daccy, daccz);
		std::cout << i << std::endl;
		hipDeviceSynchronize();
		//cudaMemcpy(x, dx, nMols * nBeads * sizeof(double), cudaMemcpyDeviceToHost);
		//cudaMemcpy(y, dy, nMols * nBeads * sizeof(double), cudaMemcpyDeviceToHost);
		//cudaMemcpy(z, dz, nMols * nBeads * sizeof(double), cudaMemcpyDeviceToHost);
		//cudaMemcpy(evx, dvx, sizeof(double)* nBeads * nMols, cudaMemcpyDeviceToHost);
		//cudaMemcpy(evy, dvy, sizeof(double)* nBeads * nMols, cudaMemcpyDeviceToHost);
		//cudaMemcpy(evz, dvz, sizeof(double)* nBeads * nMols, cudaMemcpyDeviceToHost);
		//cudaMemcpy(eaccx, daccx, sizeof(double)* nBeads * nMols, cudaMemcpyDeviceToHost);
		//cudaMemcpy(eaccy, daccy, sizeof(double)* nBeads * nMols, cudaMemcpyDeviceToHost);
		//cudaMemcpy(eaccz, daccz, sizeof(double)* nBeads * nMols, cudaMemcpyDeviceToHost);

		//std::ofstream out("finalOut.dat");
		//for (int i = 0; i < nBeads*nMols; i++){
		//	out << std::setw(15) << x[i]
		//		<< std::setw(15) << y[i]
		//		<< std::setw(15) << z[i]
		//		<< std::endl;
		//}

	}

	hipMemcpy(x, dx, nMols * nBeads * sizeof(double), hipMemcpyDeviceToHost);
	hipMemcpy(y, dy, nMols * nBeads * sizeof(double), hipMemcpyDeviceToHost);
	hipMemcpy(z, dz, nMols * nBeads * sizeof(double), hipMemcpyDeviceToHost);
	hipMemcpy(evx, dvx, sizeof(double) * nBeads * nMols, hipMemcpyDeviceToHost);
	hipMemcpy(evy, dvy, sizeof(double) * nBeads * nMols, hipMemcpyDeviceToHost);
	hipMemcpy(evz, dvz, sizeof(double) * nBeads * nMols, hipMemcpyDeviceToHost);
	hipMemcpy(eaccx, daccx, sizeof(double) * nBeads * nMols, hipMemcpyDeviceToHost);
	hipMemcpy(eaccy, daccy, sizeof(double) * nBeads * nMols, hipMemcpyDeviceToHost);
	hipMemcpy(eaccz, daccz, sizeof(double) * nBeads * nMols, hipMemcpyDeviceToHost);

	std::ofstream out("finalOut.dat");
	for (int i = 0; i < nBeads*nMols; i++){
		out << std::setw(15) << x[i]
			<< std::setw(15) << y[i]
			<< std::setw(15) << z[i]
			<< std::endl;
	}

	return EXIT_SUCCESS;
}
	.text
	.file	"mainIterator.hip"
                                        # Start of file scope inline assembly
	.globl	_ZSt21ios_base_library_initv

                                        # End of file scope inline assembly
	.globl	_Z27__device_stub__getCentroidsPdS_S_S_S_S_ # -- Begin function _Z27__device_stub__getCentroidsPdS_S_S_S_S_
	.type	_Z27__device_stub__getCentroidsPdS_S_S_S_S_,@function
_Z27__device_stub__getCentroidsPdS_S_S_S_S_: # @_Z27__device_stub__getCentroidsPdS_S_S_S_S_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$144, %rsp
	.cfi_def_cfa_offset 192
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	56(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	48(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	32(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	24(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	16(%rsp), %r8
	movq	%r9, (%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	8(%rsp), %r12
	movq	%rsp, %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z12getCentroidsPdS_S_S_S_S_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$160, %rsp
	.cfi_adjust_cfa_offset -160
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z27__device_stub__getCentroidsPdS_S_S_S_S_, .Lfunc_end0-_Z27__device_stub__getCentroidsPdS_S_S_S_S_
	.cfi_endproc
                                        # -- End function
	.globl	_Z28__device_stub__getVerletListPiS_PdS0_S0_i # -- Begin function _Z28__device_stub__getVerletListPiS_PdS0_S0_i
	.type	_Z28__device_stub__getVerletListPiS_PdS0_S0_i,@function
_Z28__device_stub__getVerletListPiS_PdS0_S0_i: # @_Z28__device_stub__getVerletListPiS_PdS0_S0_i
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$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	32(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	24(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	4(%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	16(%rsp), %r12
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z13getVerletListPiS_PdS0_S0_i, %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_end1:
	.size	_Z28__device_stub__getVerletListPiS_PdS0_S0_i, .Lfunc_end1-_Z28__device_stub__getVerletListPiS_PdS0_S0_i
	.cfi_endproc
                                        # -- End function
	.globl	_Z21__device_stub__MDStepPdS_S_PiS0_S_S_S_S_S_S_ # -- Begin function _Z21__device_stub__MDStepPdS_S_PiS0_S_S_S_S_S_S_
	.type	_Z21__device_stub__MDStepPdS_S_PiS0_S_S_S_S_S_S_,@function
_Z21__device_stub__MDStepPdS_S_PiS0_S_S_S_S_S_S_: # @_Z21__device_stub__MDStepPdS_S_PiS0_S_S_S_S_S_S_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$192, %rsp
	.cfi_def_cfa_offset 240
	.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	32(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	24(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	16(%rsp), %r8
	movq	%r9, (%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	240(%rsp), %rax
	movq	%rax, 48(%rbx)
	leaq	248(%rsp), %rax
	movq	%rax, 56(%rbx)
	leaq	256(%rsp), %rax
	movq	%rax, 64(%rbx)
	leaq	264(%rsp), %rax
	movq	%rax, 72(%rbx)
	leaq	272(%rsp), %rax
	movq	%rax, 80(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	8(%rsp), %r12
	movq	%rsp, %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$208, %rsp
	.cfi_adjust_cfa_offset -208
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end2:
	.size	_Z21__device_stub__MDStepPdS_S_PiS0_S_S_S_S_S_S_, .Lfunc_end2-_Z21__device_stub__MDStepPdS_S_PiS0_S_S_S_S_S_S_
	.cfi_endproc
                                        # -- End function
	.globl	_Z10cuMainLoopPdS_S_ii          # -- Begin function _Z10cuMainLoopPdS_S_ii
	.type	_Z10cuMainLoopPdS_S_ii,@function
_Z10cuMainLoopPdS_S_ii:                 # @_Z10cuMainLoopPdS_S_ii
.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	$1240, %rsp                     # imm = 0x4D8
	.cfi_def_cfa_offset 1296
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%r8d, %ebx
	movl	%ecx, %r14d
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, 40(%rsp)                  # 8-byte Spill
	.cfi_escape 0x2e, 0x00
	movl	$1, %edi
	callq	hipSetDevice
	.cfi_escape 0x2e, 0x00
	leaq	216(%rsp), %rdi
	movl	$.L.str, %esi
	movl	$16, %edx
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
	movq	%rbx, %rbp
	movl	%ebx, %ecx
	movl	%r14d, 24(%rsp)                 # 4-byte Spill
	imull	%r14d, %ecx
	movl	%ecx, %eax
	movq	%rax, 104(%rsp)                 # 8-byte Spill
	movl	%ecx, 20(%rsp)                  # 4-byte Spill
	testl	%ecx, %ecx
	jle	.LBB3_9
# %bb.1:                                # %.lr.ph.preheader
	xorl	%r15d, %r15d
	leaq	216(%rsp), %rbx
.LBB3_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movq	216(%rsp), %rax
	movq	-24(%rax), %rax
	movq	$15, 232(%rsp,%rax)
	movq	40(%rsp), %rax                  # 8-byte Reload
	movsd	(%rax,%r15,8), %xmm0            # xmm0 = mem[0],zero
.Ltmp0:
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp1:
# %bb.3:                                #   in Loop: Header=BB3_2 Depth=1
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	movq	$15, 16(%rax,%rcx)
	movsd	(%r12,%r15,8), %xmm0            # xmm0 = mem[0],zero
.Ltmp2:
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp3:
# %bb.4:                                #   in Loop: Header=BB3_2 Depth=1
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	movq	$15, 16(%rax,%rcx)
	movsd	(%r13,%r15,8), %xmm0            # xmm0 = mem[0],zero
.Ltmp4:
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp5:
# %bb.5:                                # %_ZNSolsEd.exit174
                                        #   in Loop: Header=BB3_2 Depth=1
	movq	%rax, %r14
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
.Ltmp6:
	.cfi_escape 0x2e, 0x00
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp7:
# %bb.6:                                # %.noexc
                                        #   in Loop: Header=BB3_2 Depth=1
.Ltmp8:
	.cfi_escape 0x2e, 0x00
	movsbl	%al, %esi
	movq	%r14, %rdi
	callq	_ZNSo3putEc
.Ltmp9:
# %bb.7:                                # %.noexc192
                                        #   in Loop: Header=BB3_2 Depth=1
.Ltmp10:
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp11:
# %bb.8:                                # %_ZNSolsEPFRSoS_E.exit
                                        #   in Loop: Header=BB3_2 Depth=1
	incq	%r15
	cmpq	%r15, 104(%rsp)                 # 8-byte Folded Reload
	jne	.LBB3_2
.LBB3_9:                                # %._crit_edge
	movslq	24(%rsp), %r14                  # 4-byte Folded Reload
	leaq	(,%r14,8), %rbx
.Ltmp13:
	.cfi_escape 0x2e, 0x00
	leaq	208(%rsp), %rdi
	movq	%rbx, %rsi
	callq	hipMalloc
.Ltmp14:
# %bb.10:                               # %_ZL9hipMallocIdE10hipError_tPPT_m.exit
.Ltmp15:
	movq	%rbp, %r15
	.cfi_escape 0x2e, 0x00
	leaq	200(%rsp), %rdi
	movq	%rbx, %rsi
	callq	hipMalloc
.Ltmp16:
# %bb.11:                               # %_ZL9hipMallocIdE10hipError_tPPT_m.exit175
.Ltmp17:
	.cfi_escape 0x2e, 0x00
	leaq	192(%rsp), %rdi
	movq	%rbx, %rsi
	callq	hipMalloc
.Ltmp18:
# %bb.12:                               # %_ZL9hipMallocIdE10hipError_tPPT_m.exit176
	movslq	%r15d, %rsi
	imulq	%r14, %rsi
	shlq	$3, %rsi
.Ltmp19:
	.cfi_escape 0x2e, 0x00
	leaq	64(%rsp), %rdi
	movq	%rsi, 8(%rsp)                   # 8-byte Spill
	callq	hipMalloc
.Ltmp20:
# %bb.13:                               # %_ZL9hipMallocIdE10hipError_tPPT_m.exit177
.Ltmp21:
	.cfi_escape 0x2e, 0x00
	leaq	56(%rsp), %rdi
	movq	8(%rsp), %rsi                   # 8-byte Reload
	callq	hipMalloc
.Ltmp22:
# %bb.14:                               # %_ZL9hipMallocIdE10hipError_tPPT_m.exit178
.Ltmp23:
	.cfi_escape 0x2e, 0x00
	leaq	48(%rsp), %rdi
	movq	8(%rsp), %rsi                   # 8-byte Reload
	callq	hipMalloc
.Ltmp24:
# %bb.15:                               # %_ZL9hipMallocIdE10hipError_tPPT_m.exit179
.Ltmp25:
	.cfi_escape 0x2e, 0x00
	leaq	152(%rsp), %rdi
	movq	8(%rsp), %rsi                   # 8-byte Reload
	callq	hipMalloc
.Ltmp26:
# %bb.16:                               # %_ZL9hipMallocIdE10hipError_tPPT_m.exit180
.Ltmp27:
	.cfi_escape 0x2e, 0x00
	leaq	144(%rsp), %rdi
	movq	8(%rsp), %rsi                   # 8-byte Reload
	callq	hipMalloc
.Ltmp28:
# %bb.17:                               # %_ZL9hipMallocIdE10hipError_tPPT_m.exit181
.Ltmp29:
	.cfi_escape 0x2e, 0x00
	leaq	136(%rsp), %rdi
	movq	8(%rsp), %rsi                   # 8-byte Reload
	callq	hipMalloc
.Ltmp30:
# %bb.18:                               # %_ZL9hipMallocIdE10hipError_tPPT_m.exit182
.Ltmp31:
	.cfi_escape 0x2e, 0x00
	leaq	128(%rsp), %rdi
	movq	8(%rsp), %rsi                   # 8-byte Reload
	callq	hipMalloc
.Ltmp32:
# %bb.19:                               # %_ZL9hipMallocIdE10hipError_tPPT_m.exit183
.Ltmp33:
	.cfi_escape 0x2e, 0x00
	leaq	120(%rsp), %rdi
	movq	8(%rsp), %rsi                   # 8-byte Reload
	callq	hipMalloc
.Ltmp34:
# %bb.20:                               # %_ZL9hipMallocIdE10hipError_tPPT_m.exit184
.Ltmp35:
	.cfi_escape 0x2e, 0x00
	leaq	112(%rsp), %rdi
	movq	8(%rsp), %rsi                   # 8-byte Reload
	callq	hipMalloc
.Ltmp36:
# %bb.21:                               # %_ZL9hipMallocIdE10hipError_tPPT_m.exit185
	movq	64(%rsp), %rdi
	movslq	20(%rsp), %rdx                  # 4-byte Folded Reload
	shlq	$3, %rdx
.Ltmp37:
	.cfi_escape 0x2e, 0x00
	movq	40(%rsp), %rsi                  # 8-byte Reload
	movq	%rdx, 32(%rsp)                  # 8-byte Spill
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp38:
# %bb.22:
	movq	56(%rsp), %rdi
.Ltmp39:
	.cfi_escape 0x2e, 0x00
	movq	%r12, %rsi
	movq	32(%rsp), %rdx                  # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp40:
# %bb.23:
	movq	48(%rsp), %rdi
.Ltmp41:
	.cfi_escape 0x2e, 0x00
	movq	%r13, %rsi
	movq	32(%rsp), %rdx                  # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp42:
# %bb.24:
	leal	(%r15,%r15,2), %eax
	movslq	%eax, %r8
	shlq	$3, %r8
	movl	24(%rsp), %ebp                  # 4-byte Reload
	btsq	$32, %rbp
	movl	%r15d, %ebx
	btsq	$32, %rbx
.Ltmp43:
	.cfi_escape 0x2e, 0x00
	movq	%rbp, %rdi
	movl	$1, %esi
	movq	%rbx, %rdx
	movl	$1, %ecx
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp44:
# %bb.25:
	testl	%eax, %eax
	jne	.LBB3_27
# %bb.26:
	movq	64(%rsp), %rdi
	movq	56(%rsp), %rsi
	movq	48(%rsp), %rdx
	movq	208(%rsp), %rcx
	movq	200(%rsp), %r8
	movq	192(%rsp), %r9
.Ltmp45:
	.cfi_escape 0x2e, 0x00
	callq	_Z27__device_stub__getCentroidsPdS_S_S_S_S_
.Ltmp46:
.LBB3_27:
	movq	%r12, 168(%rsp)                 # 8-byte Spill
	imulq	$400, %r14, %rsi                # imm = 0x190
.Ltmp48:
	.cfi_escape 0x2e, 0x00
	leaq	184(%rsp), %rdi
	callq	hipMalloc
.Ltmp49:
# %bb.28:                               # %_ZL9hipMallocIiE10hipError_tPPT_m.exit
	shlq	$2, %r14
.Ltmp50:
	.cfi_escape 0x2e, 0x00
	leaq	176(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
.Ltmp51:
# %bb.29:                               # %_ZL9hipMallocIiE10hipError_tPPT_m.exit186
.Ltmp52:
	.cfi_escape 0x2e, 0x00
	movabsq	$4294967297, %rdx               # imm = 0x100000001
	movq	%rbp, %rdi
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp53:
# %bb.30:
	testl	%eax, %eax
	jne	.LBB3_32
# %bb.31:
	movq	184(%rsp), %rdi
	movq	176(%rsp), %rsi
	movq	208(%rsp), %rdx
	movq	200(%rsp), %rcx
	movq	192(%rsp), %r8
.Ltmp54:
	.cfi_escape 0x2e, 0x00
	movl	24(%rsp), %r9d                  # 4-byte Reload
	callq	_Z28__device_stub__getVerletListPiS_PdS0_S0_i
.Ltmp55:
.LBB3_32:
	cmpl	$0, 20(%rsp)                    # 4-byte Folded Reload
	movq	$-1, %r14
	cmovnsq	32(%rsp), %r14                  # 8-byte Folded Reload
.Ltmp57:
	.cfi_escape 0x2e, 0x00
	movq	%r14, %rdi
	callq	_Znam
	movq	%rax, 160(%rsp)                 # 8-byte Spill
.Ltmp58:
# %bb.33:
.Ltmp59:
	.cfi_escape 0x2e, 0x00
	movq	%r14, %rdi
	callq	_Znam
	movq	%rax, 24(%rsp)                  # 8-byte Spill
.Ltmp60:
# %bb.34:
.Ltmp61:
	.cfi_escape 0x2e, 0x00
	movq	%r14, %rdi
	callq	_Znam
	movq	%rax, 96(%rsp)                  # 8-byte Spill
.Ltmp62:
# %bb.35:
.Ltmp63:
	.cfi_escape 0x2e, 0x00
	movq	%r14, %rdi
	callq	_Znam
	movq	%rax, 88(%rsp)                  # 8-byte Spill
.Ltmp64:
# %bb.36:
.Ltmp65:
	.cfi_escape 0x2e, 0x00
	movq	%r14, %rdi
	callq	_Znam
	movq	%rax, 80(%rsp)                  # 8-byte Spill
.Ltmp66:
# %bb.37:
.Ltmp67:
	.cfi_escape 0x2e, 0x00
	movq	%r14, %rdi
	callq	_Znam
	movq	%rax, 72(%rsp)                  # 8-byte Spill
.Ltmp68:
# %bb.38:                               # %.preheader218
	cmpl	$0, 20(%rsp)                    # 4-byte Folded Reload
	movq	160(%rsp), %r12                 # 8-byte Reload
	jle	.LBB3_40
# %bb.39:                               # %.lr.ph222.preheader
	movq	104(%rsp), %rax                 # 8-byte Reload
	leaq	(,%rax,8), %r14
	.cfi_escape 0x2e, 0x00
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	memset@PLT
	.cfi_escape 0x2e, 0x00
	movq	24(%rsp), %rdi                  # 8-byte Reload
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	memset@PLT
	.cfi_escape 0x2e, 0x00
	movq	96(%rsp), %rdi                  # 8-byte Reload
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	memset@PLT
	.cfi_escape 0x2e, 0x00
	movq	88(%rsp), %rdi                  # 8-byte Reload
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	memset@PLT
	.cfi_escape 0x2e, 0x00
	movq	80(%rsp), %rdi                  # 8-byte Reload
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	memset@PLT
	.cfi_escape 0x2e, 0x00
	movq	72(%rsp), %rdi                  # 8-byte Reload
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	memset@PLT
.LBB3_40:                               # %._crit_edge223
	movq	152(%rsp), %rdi
.Ltmp69:
	.cfi_escape 0x2e, 0x00
	movq	%r12, %rsi
	movq	8(%rsp), %rdx                   # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp70:
# %bb.41:
	movq	144(%rsp), %rdi
.Ltmp71:
	.cfi_escape 0x2e, 0x00
	movq	24(%rsp), %rsi                  # 8-byte Reload
	movq	8(%rsp), %rdx                   # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp72:
# %bb.42:
	movq	136(%rsp), %rdi
.Ltmp73:
	.cfi_escape 0x2e, 0x00
	movq	96(%rsp), %rsi                  # 8-byte Reload
	movq	8(%rsp), %rdx                   # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp74:
# %bb.43:
	movq	128(%rsp), %rdi
.Ltmp75:
	.cfi_escape 0x2e, 0x00
	movq	88(%rsp), %rsi                  # 8-byte Reload
	movq	8(%rsp), %rdx                   # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp76:
# %bb.44:
	movq	120(%rsp), %rdi
.Ltmp77:
	.cfi_escape 0x2e, 0x00
	movq	80(%rsp), %rsi                  # 8-byte Reload
	movq	8(%rsp), %rdx                   # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp78:
# %bb.45:
	movq	112(%rsp), %rdi
.Ltmp79:
	.cfi_escape 0x2e, 0x00
	movq	72(%rsp), %rsi                  # 8-byte Reload
	movq	8(%rsp), %rdx                   # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp80:
# %bb.46:                               # %.preheader217
	movq	%r13, %r12
	imull	$306, %r15d, %eax               # imm = 0x132
	movslq	%eax, %r13
	shlq	$3, %r13
	xorl	%r14d, %r14d
.LBB3_47:                               # =>This Inner Loop Header: Depth=1
.Ltmp81:
	.cfi_escape 0x2e, 0x00
	movq	%rbp, %rdi
	movl	$1, %esi
	movq	%rbx, %rdx
	movl	$1, %ecx
	movq	%r13, %r8
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp82:
# %bb.48:                               #   in Loop: Header=BB3_47 Depth=1
	testl	%eax, %eax
	jne	.LBB3_50
# %bb.49:                               #   in Loop: Header=BB3_47 Depth=1
	movq	64(%rsp), %rdi
	movq	56(%rsp), %rsi
	movq	48(%rsp), %rdx
	movq	184(%rsp), %rcx
	movq	176(%rsp), %r8
	movq	152(%rsp), %r9
.Ltmp83:
	.cfi_escape 0x2e, 0x30
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	pushq	120(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	136(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	152(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	168(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	184(%rsp)
	.cfi_adjust_cfa_offset 8
	callq	_Z21__device_stub__MDStepPdS_S_PiS0_S_S_S_S_S_S_
	addq	$48, %rsp
	.cfi_adjust_cfa_offset -48
.Ltmp84:
.LBB3_50:                               #   in Loop: Header=BB3_47 Depth=1
.Ltmp85:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cout, %edi
	movl	%r14d, %esi
	callq	_ZNSolsEi
.Ltmp86:
# %bb.51:                               #   in Loop: Header=BB3_47 Depth=1
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
.Ltmp87:
	.cfi_escape 0x2e, 0x00
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp88:
# %bb.52:                               # %.noexc194
                                        #   in Loop: Header=BB3_47 Depth=1
.Ltmp89:
	.cfi_escape 0x2e, 0x00
	movsbl	%al, %esi
	movq	%r15, %rdi
	callq	_ZNSo3putEc
.Ltmp90:
# %bb.53:                               # %.noexc195
                                        #   in Loop: Header=BB3_47 Depth=1
.Ltmp91:
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp92:
# %bb.54:                               # %_ZNSolsEPFRSoS_E.exit187
                                        #   in Loop: Header=BB3_47 Depth=1
.Ltmp93:
	.cfi_escape 0x2e, 0x00
	callq	hipDeviceSynchronize
.Ltmp94:
# %bb.55:                               #   in Loop: Header=BB3_47 Depth=1
	incl	%r14d
	cmpl	$2000, %r14d                    # imm = 0x7D0
	jne	.LBB3_47
# %bb.56:
	movq	64(%rsp), %rsi
.Ltmp96:
	.cfi_escape 0x2e, 0x00
	movq	40(%rsp), %rdi                  # 8-byte Reload
	movq	32(%rsp), %rdx                  # 8-byte Reload
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp97:
# %bb.57:
	movq	%r12, %rbx
	movq	56(%rsp), %rsi
.Ltmp98:
	.cfi_escape 0x2e, 0x00
	movq	168(%rsp), %rdi                 # 8-byte Reload
	movq	32(%rsp), %rdx                  # 8-byte Reload
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp99:
# %bb.58:
	movq	48(%rsp), %rsi
.Ltmp100:
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rdi
	movq	32(%rsp), %rdx                  # 8-byte Reload
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp101:
# %bb.59:
	movq	152(%rsp), %rsi
.Ltmp102:
	.cfi_escape 0x2e, 0x00
	movq	160(%rsp), %rdi                 # 8-byte Reload
	movq	8(%rsp), %rdx                   # 8-byte Reload
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp103:
# %bb.60:
	movq	144(%rsp), %rsi
.Ltmp104:
	.cfi_escape 0x2e, 0x00
	movq	24(%rsp), %rdi                  # 8-byte Reload
	movq	8(%rsp), %rdx                   # 8-byte Reload
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp105:
# %bb.61:
	movq	136(%rsp), %rsi
.Ltmp106:
	.cfi_escape 0x2e, 0x00
	movq	96(%rsp), %rdi                  # 8-byte Reload
	movq	8(%rsp), %rdx                   # 8-byte Reload
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp107:
# %bb.62:
	movq	128(%rsp), %rsi
.Ltmp108:
	.cfi_escape 0x2e, 0x00
	movq	88(%rsp), %rdi                  # 8-byte Reload
	movq	8(%rsp), %rdx                   # 8-byte Reload
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp109:
# %bb.63:
	movq	120(%rsp), %rsi
.Ltmp110:
	.cfi_escape 0x2e, 0x00
	movq	80(%rsp), %rdi                  # 8-byte Reload
	movq	8(%rsp), %rdx                   # 8-byte Reload
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp111:
# %bb.64:
	movq	112(%rsp), %rsi
.Ltmp112:
	.cfi_escape 0x2e, 0x00
	movq	72(%rsp), %rdi                  # 8-byte Reload
	movq	8(%rsp), %rdx                   # 8-byte Reload
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp113:
# %bb.65:
.Ltmp115:
	.cfi_escape 0x2e, 0x00
	leaq	728(%rsp), %rbx
	movl	$.L.str.1, %esi
	movq	%rbx, %rdi
	movl	$16, %edx
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
.Ltmp116:
# %bb.66:                               # %.preheader
	cmpl	$0, 20(%rsp)                    # 4-byte Folded Reload
	jle	.LBB3_75
# %bb.67:                               # %.lr.ph228.preheader
	xorl	%r13d, %r13d
	leaq	728(%rsp), %r14
.LBB3_68:                               # %.lr.ph228
                                        # =>This Inner Loop Header: Depth=1
	movq	728(%rsp), %rax
	movq	-24(%rax), %rax
	movq	$15, 744(%rsp,%rax)
	movq	40(%rsp), %rax                  # 8-byte Reload
	movsd	(%rax,%r13,8), %xmm0            # xmm0 = mem[0],zero
.Ltmp118:
	.cfi_escape 0x2e, 0x00
	movq	%r14, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp119:
# %bb.69:                               #   in Loop: Header=BB3_68 Depth=1
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	movq	$15, 16(%rax,%rcx)
	movq	168(%rsp), %rcx                 # 8-byte Reload
	movsd	(%rcx,%r13,8), %xmm0            # xmm0 = mem[0],zero
.Ltmp120:
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp121:
# %bb.70:                               #   in Loop: Header=BB3_68 Depth=1
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	movq	$15, 16(%rax,%rcx)
	movsd	(%r12,%r13,8), %xmm0            # xmm0 = mem[0],zero
.Ltmp122:
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp123:
# %bb.71:                               # %_ZNSolsEd.exit190
                                        #   in Loop: Header=BB3_68 Depth=1
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
.Ltmp124:
	.cfi_escape 0x2e, 0x00
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp125:
# %bb.72:                               # %.noexc198
                                        #   in Loop: Header=BB3_68 Depth=1
.Ltmp126:
	.cfi_escape 0x2e, 0x00
	movsbl	%al, %esi
	movq	%r15, %rdi
	callq	_ZNSo3putEc
.Ltmp127:
# %bb.73:                               # %.noexc199
                                        #   in Loop: Header=BB3_68 Depth=1
.Ltmp128:
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp129:
# %bb.74:                               # %_ZNSolsEPFRSoS_E.exit191
                                        #   in Loop: Header=BB3_68 Depth=1
	incq	%r13
	cmpq	%r13, 104(%rsp)                 # 8-byte Folded Reload
	jne	.LBB3_68
.LBB3_75:                               # %._crit_edge229
	movq	_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE(%rip), %r14
	leaq	736(%rsp), %rdi
	movq	%r14, -8(%rdi)
	movq	_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE+24(%rip), %r15
	movq	-24(%r14), %rax
	movq	%r15, 728(%rsp,%rax)
	.cfi_escape 0x2e, 0x00
	callq	_ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev
	movl	$248, %r12d
	addq	%r12, %rbx
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rdi
	callq	_ZNSt8ios_baseD2Ev
	leaq	224(%rsp), %rdi
	movq	%r14, -8(%rdi)
	movq	-24(%r14), %rax
	movq	%r15, 216(%rsp,%rax)
	.cfi_escape 0x2e, 0x00
	callq	_ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev
	leaq	216(%rsp), %rdi
	addq	%r12, %rdi
	.cfi_escape 0x2e, 0x00
	callq	_ZNSt8ios_baseD2Ev
	xorl	%eax, %eax
	addq	$1240, %rsp                     # imm = 0x4D8
	.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
.LBB3_76:
	.cfi_def_cfa_offset 1296
.Ltmp117:
	jmp	.LBB3_83
.LBB3_77:
.Ltmp56:
	jmp	.LBB3_83
.LBB3_78:
.Ltmp47:
	jmp	.LBB3_83
.LBB3_79:
.Ltmp114:
	jmp	.LBB3_83
.LBB3_80:
.Ltmp130:
	movq	%rax, %rbx
	.cfi_escape 0x2e, 0x00
	leaq	728(%rsp), %rdi
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev
	jmp	.LBB3_84
.LBB3_81:
.Ltmp12:
	jmp	.LBB3_83
.LBB3_82:
.Ltmp95:
.LBB3_83:
	movq	%rax, %rbx
.LBB3_84:
	.cfi_escape 0x2e, 0x00
	leaq	216(%rsp), %rdi
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end3:
	.size	_Z10cuMainLoopPdS_S_ii, .Lfunc_end3-_Z10cuMainLoopPdS_S_ii
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table3:
.Lexception0:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end0-.Lcst_begin0
.Lcst_begin0:
	.uleb128 .Lfunc_begin0-.Lfunc_begin0    # >> Call Site 1 <<
	.uleb128 .Ltmp0-.Lfunc_begin0           #   Call between .Lfunc_begin0 and .Ltmp0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp0-.Lfunc_begin0           # >> Call Site 2 <<
	.uleb128 .Ltmp11-.Ltmp0                 #   Call between .Ltmp0 and .Ltmp11
	.uleb128 .Ltmp12-.Lfunc_begin0          #     jumps to .Ltmp12
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp13-.Lfunc_begin0          # >> Call Site 3 <<
	.uleb128 .Ltmp46-.Ltmp13                #   Call between .Ltmp13 and .Ltmp46
	.uleb128 .Ltmp47-.Lfunc_begin0          #     jumps to .Ltmp47
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp48-.Lfunc_begin0          # >> Call Site 4 <<
	.uleb128 .Ltmp55-.Ltmp48                #   Call between .Ltmp48 and .Ltmp55
	.uleb128 .Ltmp56-.Lfunc_begin0          #     jumps to .Ltmp56
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp57-.Lfunc_begin0          # >> Call Site 5 <<
	.uleb128 .Ltmp68-.Ltmp57                #   Call between .Ltmp57 and .Ltmp68
	.uleb128 .Ltmp114-.Lfunc_begin0         #     jumps to .Ltmp114
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp68-.Lfunc_begin0          # >> Call Site 6 <<
	.uleb128 .Ltmp69-.Ltmp68                #   Call between .Ltmp68 and .Ltmp69
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp69-.Lfunc_begin0          # >> Call Site 7 <<
	.uleb128 .Ltmp80-.Ltmp69                #   Call between .Ltmp69 and .Ltmp80
	.uleb128 .Ltmp114-.Lfunc_begin0         #     jumps to .Ltmp114
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp81-.Lfunc_begin0          # >> Call Site 8 <<
	.uleb128 .Ltmp94-.Ltmp81                #   Call between .Ltmp81 and .Ltmp94
	.uleb128 .Ltmp95-.Lfunc_begin0          #     jumps to .Ltmp95
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp96-.Lfunc_begin0          # >> Call Site 9 <<
	.uleb128 .Ltmp113-.Ltmp96               #   Call between .Ltmp96 and .Ltmp113
	.uleb128 .Ltmp114-.Lfunc_begin0         #     jumps to .Ltmp114
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp115-.Lfunc_begin0         # >> Call Site 10 <<
	.uleb128 .Ltmp116-.Ltmp115              #   Call between .Ltmp115 and .Ltmp116
	.uleb128 .Ltmp117-.Lfunc_begin0         #     jumps to .Ltmp117
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp118-.Lfunc_begin0         # >> Call Site 11 <<
	.uleb128 .Ltmp129-.Ltmp118              #   Call between .Ltmp118 and .Ltmp129
	.uleb128 .Ltmp130-.Lfunc_begin0         #     jumps to .Ltmp130
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp129-.Lfunc_begin0         # >> Call Site 12 <<
	.uleb128 .Lfunc_end3-.Ltmp129           #   Call between .Ltmp129 and .Lfunc_end3
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.text
	.p2align	4, 0x90                         # -- Begin function __hip_module_ctor
	.type	__hip_module_ctor,@function
__hip_module_ctor:                      # @__hip_module_ctor
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -16
	movq	__hip_gpubin_handle(%rip), %rbx
	testq	%rbx, %rbx
	jne	.LBB4_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB4_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z12getCentroidsPdS_S_S_S_S_, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z13getVerletListPiS_PdS0_S0_i, %esi
	movl	$.L__unnamed_2, %edx
	movl	$.L__unnamed_2, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_, %esi
	movl	$.L__unnamed_3, %edx
	movl	$.L__unnamed_3, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end4:
	.size	__hip_module_ctor, .Lfunc_end4-__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	.LBB5_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
.LBB5_2:
	retq
.Lfunc_end5:
	.size	__hip_module_dtor, .Lfunc_end5-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z12getCentroidsPdS_S_S_S_S_,@object # @_Z12getCentroidsPdS_S_S_S_S_
	.section	.rodata,"a",@progbits
	.globl	_Z12getCentroidsPdS_S_S_S_S_
	.p2align	3, 0x0
_Z12getCentroidsPdS_S_S_S_S_:
	.quad	_Z27__device_stub__getCentroidsPdS_S_S_S_S_
	.size	_Z12getCentroidsPdS_S_S_S_S_, 8

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

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

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

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"finalOut.dat"
	.size	.L.str.1, 13

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z12getCentroidsPdS_S_S_S_S_"
	.size	.L__unnamed_1, 29

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z13getVerletListPiS_PdS0_S0_i"
	.size	.L__unnamed_2, 31

	.type	.L__unnamed_3,@object           # @2
.L__unnamed_3:
	.asciz	"_Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_"
	.size	.L__unnamed_3, 33

	.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 _Z27__device_stub__getCentroidsPdS_S_S_S_S_
	.addrsig_sym _Z28__device_stub__getVerletListPiS_PdS0_S0_i
	.addrsig_sym _Z21__device_stub__MDStepPdS_S_PiS0_S_S_S_S_S_S_
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Unwind_Resume
	.addrsig_sym _Z12getCentroidsPdS_S_S_S_S_
	.addrsig_sym _Z13getVerletListPiS_PdS0_S0_i
	.addrsig_sym _Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_
	.addrsig_sym _ZSt4cout
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z12getCentroidsPdS_S_S_S_S_ ; -- Begin function _Z12getCentroidsPdS_S_S_S_S_
	.globl	_Z12getCentroidsPdS_S_S_S_S_
	.p2align	8
	.type	_Z12getCentroidsPdS_S_S_S_S_,@function
_Z12getCentroidsPdS_S_S_S_S_:           ; @_Z12getCentroidsPdS_S_S_S_S_
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x3c
	s_load_b256 s[4:11], s[0:1], 0x0
	s_mov_b32 s12, s15
	s_waitcnt lgkmcnt(0)
	s_and_b32 s3, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s12, s3, v[0:1]
	s_lshl_b32 s2, s3, 3
	v_ashrrev_i32_e32 v2, 31, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[1:2], 3, v[1:2]
	v_add_co_u32 v3, vcc_lo, s4, v1
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v4, vcc_lo, s5, v2, vcc_lo
	v_add_co_u32 v5, vcc_lo, s6, v1
	v_add_co_ci_u32_e32 v6, vcc_lo, s7, v2, vcc_lo
	v_add_co_u32 v1, vcc_lo, s8, v1
	v_add_co_ci_u32_e32 v2, vcc_lo, s9, v2, vcc_lo
	global_load_b64 v[7:8], v[3:4], off
	global_load_b64 v[4:5], v[5:6], off
	global_load_b64 v[9:10], v[1:2], off
	v_lshlrev_b32_e32 v3, 3, v0
	s_add_i32 s4, s2, 0
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	s_add_i32 s2, s4, s2
	s_cmp_lt_u32 s3, 2
	v_add_nc_u32_e32 v1, 0, v3
	v_add_nc_u32_e32 v2, s4, v3
	v_add_nc_u32_e32 v3, s2, v3
	s_waitcnt vmcnt(2)
	ds_store_b64 v1, v[7:8]
	s_waitcnt vmcnt(1)
	ds_store_b64 v2, v[4:5]
	s_waitcnt vmcnt(0)
	ds_store_b64 v3, v[9:10]
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	s_cbranch_scc1 .LBB0_5
; %bb.1:                                ; %.lr.ph.preheader
	s_mov_b32 s7, 1
.LBB0_2:                                ; %.lr.ph
                                        ; =>This Inner Loop Header: Depth=1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_lshl_b32 s5, s7, 1
	s_add_i32 s6, s5, -1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_and_b32_e32 v4, s6, v0
	s_mov_b32 s6, exec_lo
	v_cmpx_eq_u32_e32 0, v4
	s_cbranch_execz .LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	s_lshl_b32 s7, s7, 3
	s_delay_alu instid0(SALU_CYCLE_1)
	v_add_nc_u32_e32 v4, s7, v1
	ds_load_b64 v[4:5], v4
	ds_load_b64 v[6:7], v1
	s_waitcnt lgkmcnt(0)
	v_add_f64 v[4:5], v[4:5], v[6:7]
	v_add_nc_u32_e32 v6, s7, v2
	ds_store_b64 v1, v[4:5]
	ds_load_b64 v[4:5], v6
	ds_load_b64 v[6:7], v2
	s_waitcnt lgkmcnt(0)
	v_add_f64 v[4:5], v[4:5], v[6:7]
	v_add_nc_u32_e32 v6, s7, v3
	ds_store_b64 v2, v[4:5]
	ds_load_b64 v[4:5], v6
	ds_load_b64 v[6:7], v3
	s_waitcnt lgkmcnt(0)
	v_add_f64 v[4:5], v[4:5], v[6:7]
	ds_store_b64 v3, v[4:5]
.LBB0_4:                                ;   in Loop: Header=BB0_2 Depth=1
	s_or_b32 exec_lo, exec_lo, s6
	s_cmp_lt_u32 s5, s3
	s_mov_b32 s7, s5
	s_cbranch_scc1 .LBB0_2
.LBB0_5:                                ; %._crit_edge
	s_mov_b32 s5, exec_lo
	v_cmpx_eq_u32_e32 0, v0
	s_cbranch_execz .LBB0_7
; %bb.6:
	v_cvt_f64_u32_e32 v[0:1], s3
	v_mov_b32_e32 v32, 0
	v_mov_b32_e32 v4, s4
	v_mov_b32_e32 v6, s2
	s_mov_b32 s13, 0
	ds_load_b64 v[2:3], v32
	ds_load_b64 v[4:5], v4
	ds_load_b64 v[6:7], v6
	s_lshl_b64 s[4:5], s[12:13], 3
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s6, s10, s4
	s_addc_u32 s7, s11, s5
	s_waitcnt lgkmcnt(2)
	v_div_scale_f64 v[8:9], null, v[0:1], v[0:1], v[2:3]
	s_waitcnt lgkmcnt(1)
	v_div_scale_f64 v[10:11], null, v[0:1], v[0:1], v[4:5]
	s_waitcnt lgkmcnt(0)
	v_div_scale_f64 v[12:13], null, v[0:1], v[0:1], v[6:7]
	v_div_scale_f64 v[26:27], vcc_lo, v[2:3], v[0:1], v[2:3]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_rcp_f64_e32 v[14:15], v[8:9]
	v_rcp_f64_e32 v[16:17], v[10:11]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(TRANS32_DEP_3)
	v_rcp_f64_e32 v[18:19], v[12:13]
	v_fma_f64 v[20:21], -v[8:9], v[14:15], 1.0
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[22:23], -v[10:11], v[16:17], 1.0
	v_fma_f64 v[24:25], -v[12:13], v[18:19], 1.0
	v_fma_f64 v[14:15], v[14:15], v[20:21], v[14:15]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_fma_f64 v[16:17], v[16:17], v[22:23], v[16:17]
	v_fma_f64 v[18:19], v[18:19], v[24:25], v[18:19]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_fma_f64 v[20:21], -v[8:9], v[14:15], 1.0
	v_fma_f64 v[22:23], -v[10:11], v[16:17], 1.0
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_fma_f64 v[24:25], -v[12:13], v[18:19], 1.0
	v_fma_f64 v[14:15], v[14:15], v[20:21], v[14:15]
	v_div_scale_f64 v[20:21], s2, v[4:5], v[0:1], v[4:5]
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_3) | instid1(VALU_DEP_4)
	v_fma_f64 v[16:17], v[16:17], v[22:23], v[16:17]
	v_div_scale_f64 v[22:23], s3, v[6:7], v[0:1], v[6:7]
	v_fma_f64 v[18:19], v[18:19], v[24:25], v[18:19]
	v_mul_f64 v[24:25], v[26:27], v[14:15]
	v_mul_f64 v[28:29], v[20:21], v[16:17]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_mul_f64 v[30:31], v[22:23], v[18:19]
	v_fma_f64 v[8:9], -v[8:9], v[24:25], v[26:27]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_fma_f64 v[10:11], -v[10:11], v[28:29], v[20:21]
	v_fma_f64 v[12:13], -v[12:13], v[30:31], v[22:23]
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_div_fmas_f64 v[8:9], v[8:9], v[14:15], v[24:25]
	s_mov_b32 vcc_lo, s2
	v_div_fmas_f64 v[10:11], v[10:11], v[16:17], v[28:29]
	s_mov_b32 vcc_lo, s3
	s_load_b128 s[0:3], s[0:1], 0x20
	s_delay_alu instid0(VALU_DEP_3)
	v_div_fmas_f64 v[12:13], v[12:13], v[18:19], v[30:31]
	s_waitcnt lgkmcnt(0)
	s_add_u32 s0, s0, s4
	s_addc_u32 s1, s1, s5
	s_add_u32 s2, s2, s4
	s_addc_u32 s3, s3, s5
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_div_fixup_f64 v[2:3], v[8:9], v[0:1], v[2:3]
	v_div_fixup_f64 v[4:5], v[10:11], v[0:1], v[4:5]
	s_delay_alu instid0(VALU_DEP_3)
	v_div_fixup_f64 v[0:1], v[12:13], v[0:1], v[6:7]
	s_clause 0x2
	global_store_b64 v32, v[2:3], s[6:7]
	global_store_b64 v32, v[4:5], s[0:1]
	global_store_b64 v32, v[0:1], s[2:3]
.LBB0_7:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z12getCentroidsPdS_S_S_S_S_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 304
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 33
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z12getCentroidsPdS_S_S_S_S_, .Lfunc_end0-_Z12getCentroidsPdS_S_S_S_S_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 864
; NumSgprs: 18
; NumVgprs: 33
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 4
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 33
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z13getVerletListPiS_PdS0_S0_i ; -- Begin function _Z13getVerletListPiS_PdS0_S0_i
	.globl	_Z13getVerletListPiS_PdS0_S0_i
	.p2align	8
	.type	_Z13getVerletListPiS_PdS0_S0_i,@function
_Z13getVerletListPiS_PdS0_S0_i:         ; @_Z13getVerletListPiS_PdS0_S0_i
; %bb.0:
	s_clause 0x2
	s_load_b32 s27, s[0:1], 0x28
	s_load_b64 s[10:11], s[0:1], 0x20
	s_load_b256 s[0:7], s[0:1], 0x0
	s_ashr_i32 s9, s15, 31
	s_mov_b32 s8, s15
	s_mov_b32 s22, -1
	s_mul_i32 s20, s15, 0x64
	s_waitcnt lgkmcnt(0)
	s_cmp_lt_i32 s27, 2
	s_cbranch_scc1 .LBB1_5
; %bb.1:                                ; %.lr.ph
	s_lshl_b64 s[12:13], s[8:9], 3
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s14, s4, s12
	s_addc_u32 s15, s5, s13
	s_add_u32 s16, s6, s12
	s_addc_u32 s17, s7, s13
	s_add_u32 s18, s10, s12
	s_addc_u32 s19, s11, s13
	s_ashr_i32 s12, s27, 31
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_add_i32 s13, s27, s12
	s_xor_b32 s21, s13, s12
	s_load_b64 s[12:13], s[14:15], 0x0
	s_load_b64 s[14:15], s[16:17], 0x0
	s_load_b64 s[16:17], s[18:19], 0x0
	v_cvt_f32_u32_e32 v0, s21
	s_sub_i32 s23, 0, s21
	s_mov_b32 s18, 0x70a3d70a
	s_mov_b32 s19, 0x3ff70a3d
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_iflag_f32_e32 v0, v0
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v0, 0x4f7ffffe, v0
	v_cvt_u32_f32_e32 v0, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_readfirstlane_b32 s24, v0
	v_mov_b32_e32 v0, 0
	s_mul_i32 s23, s23, s24
	s_delay_alu instid0(SALU_CYCLE_1)
	s_mul_hi_u32 s25, s24, s23
	s_ashr_i32 s23, s20, 31
	s_add_i32 s24, s24, s25
	s_add_u32 s25, s0, 4
	s_addc_u32 s26, s1, 0
	s_add_i32 s27, s27, -1
	s_add_i32 s28, s8, 1
.LBB1_2:                                ; =>This Inner Loop Header: Depth=1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_ashr_i32 s0, s28, 31
	s_add_i32 s1, s28, s0
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_xor_b32 s1, s1, s0
	s_mul_hi_u32 s29, s1, s24
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_mul_i32 s29, s29, s21
	s_sub_i32 s1, s1, s29
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_2) | instid1(SALU_CYCLE_1)
	s_sub_i32 s29, s1, s21
	s_cmp_ge_u32 s1, s21
	s_cselect_b32 s1, s29, s1
	s_sub_i32 s29, s1, s21
	s_cmp_ge_u32 s1, s21
	s_cselect_b32 s1, s29, s1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_xor_b32 s1, s1, s0
	s_sub_i32 s0, s1, s0
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_ashr_i32 s1, s0, 31
	s_lshl_b64 s[30:31], s[0:1], 3
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s34, s4, s30
	s_addc_u32 s35, s5, s31
	s_add_u32 s36, s6, s30
	s_addc_u32 s37, s7, s31
	s_load_b64 s[34:35], s[34:35], 0x0
	s_load_b64 s[36:37], s[36:37], 0x0
	s_add_u32 s30, s10, s30
	s_addc_u32 s31, s11, s31
	s_load_b64 s[30:31], s[30:31], 0x0
	s_waitcnt lgkmcnt(0)
	v_add_f64 v[3:4], s[34:35], -s[12:13]
	v_add_f64 v[1:2], s[36:37], -s[14:15]
	v_add_f64 v[5:6], s[30:31], -s[16:17]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[1:2], v[1:2], v[1:2]
	v_fma_f64 v[1:2], v[3:4], v[3:4], v[1:2]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[1:2], v[5:6], v[5:6], v[1:2]
	v_cmp_ngt_f64_e32 vcc_lo, s[18:19], v[1:2]
	s_cbranch_vccnz .LBB1_4
; %bb.3:                                ;   in Loop: Header=BB1_2 Depth=1
	s_add_i32 s29, s22, 1
	s_ashr_i32 s1, s22, 31
	s_add_u32 s30, s22, s20
	s_addc_u32 s31, s1, s23
	v_mov_b32_e32 v1, s0
	s_lshl_b64 s[30:31], s[30:31], 2
	s_mov_b32 s22, s29
	s_add_u32 s0, s25, s30
	s_addc_u32 s1, s26, s31
	global_store_b32 v0, v1, s[0:1]
.LBB1_4:                                ;   in Loop: Header=BB1_2 Depth=1
	s_add_i32 s27, s27, -1
	s_add_i32 s28, s28, 1
	s_cmp_eq_u32 s27, 0
	s_cbranch_scc0 .LBB1_2
.LBB1_5:                                ; %._crit_edge
	s_cmp_gt_i32 s22, 0
	s_cbranch_scc0 .LBB1_7
; %bb.6:
	s_add_i32 s0, s22, s20
	s_branch .LBB1_8
.LBB1_7:
	s_mov_b32 s0, -1
.LBB1_8:
	s_lshl_b64 s[4:5], s[8:9], 2
	v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, s0
	s_add_u32 s0, s2, s4
	s_addc_u32 s1, s3, s5
	global_store_b32 v0, v1, s[0:1]
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z13getVerletListPiS_PdS0_S0_i
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 44
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 7
		.amdhsa_next_free_sgpr 38
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end1:
	.size	_Z13getVerletListPiS_PdS0_S0_i, .Lfunc_end1-_Z13getVerletListPiS_PdS0_S0_i
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 556
; NumSgprs: 40
; NumVgprs: 7
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 4
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 40
; NumVGPRsForWavesPerEU: 7
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_ ; -- Begin function _Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_
	.globl	_Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_
	.p2align	8
	.type	_Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_,@function
_Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_:       ; @_Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x64
	s_load_b128 s[16:19], s[0:1], 0x40
	s_mov_b32 s20, s15
	s_load_b64 s[22:23], s[0:1], 0x50
	s_ashr_i32 s21, s20, 31
	s_mov_b32 s36, 0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s33, s2, 0xffff
	s_load_b512 s[0:15], s[0:1], 0x0
	v_mad_u64_u32 v[1:2], null, s20, s33, v[0:1]
	s_lshl_b32 s34, s33, 3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v2, 31, v1
	v_lshlrev_b64 v[1:2], 3, v[1:2]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v5, vcc_lo, s16, v1
	v_add_co_ci_u32_e32 v6, vcc_lo, s17, v2, vcc_lo
	v_add_co_u32 v7, vcc_lo, s18, v1
	v_add_co_ci_u32_e32 v8, vcc_lo, s19, v2, vcc_lo
	v_add_co_u32 v9, vcc_lo, s22, v1
	v_add_co_ci_u32_e32 v10, vcc_lo, s23, v2, vcc_lo
	global_load_b64 v[3:4], v[5:6], off
	global_load_b64 v[17:18], v[7:8], off
	global_load_b64 v[19:20], v[9:10], off
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v21, vcc_lo, s0, v1
	v_add_co_ci_u32_e32 v22, vcc_lo, s1, v2, vcc_lo
	v_add_co_u32 v15, vcc_lo, s10, v1
	v_add_co_ci_u32_e32 v16, vcc_lo, s11, v2, vcc_lo
	v_add_co_u32 v23, vcc_lo, s2, v1
	v_add_co_ci_u32_e32 v24, vcc_lo, s3, v2, vcc_lo
	v_add_co_u32 v13, vcc_lo, s12, v1
	v_add_co_ci_u32_e32 v14, vcc_lo, s13, v2, vcc_lo
	v_add_co_u32 v25, vcc_lo, s4, v1
	v_add_co_ci_u32_e32 v26, vcc_lo, s5, v2, vcc_lo
	v_add_co_u32 v11, vcc_lo, s14, v1
	v_add_co_ci_u32_e32 v12, vcc_lo, s15, v2, vcc_lo
	global_load_b64 v[1:2], v[21:22], off
	global_load_b64 v[27:28], v[15:16], off
	global_load_b64 v[29:30], v[23:24], off
	global_load_b64 v[31:32], v[13:14], off
	global_load_b64 v[33:34], v[25:26], off
	global_load_b64 v[35:36], v[11:12], off
	s_mov_b32 s10, 0xd2f1a9fc
	s_mov_b32 s11, 0x3f50624d
	s_lshl_b64 s[12:13], s[20:21], 2
	s_waitcnt vmcnt(8)
	v_mul_f64 v[3:4], v[3:4], 0.5
	s_waitcnt vmcnt(7)
	v_mul_f64 v[17:18], v[17:18], 0.5
	s_waitcnt vmcnt(6)
	v_mul_f64 v[19:20], v[19:20], 0.5
	s_waitcnt vmcnt(4)
	v_fma_f64 v[1:2], v[27:28], s[10:11], v[1:2]
	s_waitcnt vmcnt(2)
	v_fma_f64 v[27:28], v[31:32], s[10:11], v[29:30]
	s_waitcnt vmcnt(0)
	v_fma_f64 v[29:30], v[35:36], s[10:11], v[33:34]
	v_mul_f64 v[3:4], v[3:4], s[10:11]
	v_mul_f64 v[17:18], v[17:18], s[10:11]
	v_mul_f64 v[19:20], v[19:20], s[10:11]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_fma_f64 v[1:2], v[3:4], s[10:11], v[1:2]
	v_fma_f64 v[3:4], v[17:18], s[10:11], v[27:28]
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_2) | instid1(SALU_CYCLE_1)
	v_fma_f64 v[17:18], v[19:20], s[10:11], v[29:30]
	v_lshlrev_b32_e32 v19, 3, v0
	s_add_i32 s11, s34, 0
	s_add_i32 s10, s11, s34
	s_add_u32 s8, s8, s12
	s_delay_alu instid0(VALU_DEP_1)
	v_add_nc_u32_e32 v41, 0, v19
	v_add_nc_u32_e32 v42, s11, v19
	v_add_nc_u32_e32 v43, s10, v19
	s_addc_u32 s9, s9, s13
	ds_store_b64 v41, v[1:2]
	ds_store_b64 v42, v[3:4]
	ds_store_b64 v43, v[17:18]
	ds_load_b64 v[1:2], v41
	ds_load_b64 v[3:4], v42
	s_waitcnt lgkmcnt(1)
	global_store_b64 v[21:22], v[1:2], off
	s_waitcnt lgkmcnt(0)
	global_store_b64 v[23:24], v[3:4], off
	global_store_b64 v[25:26], v[17:18], off
	s_waitcnt_vscnt null, 0x0
	s_barrier
	buffer_gl0_inv
	s_load_b32 s11, s[8:9], 0x0
	s_mul_i32 s8, s20, 0x64
	s_waitcnt lgkmcnt(0)
	s_cmp_gt_i32 s8, s11
	s_cbranch_scc1 .LBB2_3
; %bb.1:                                ; %.lr.ph.preheader
	s_ashr_i32 s9, s8, 31
	v_lshl_add_u32 v1, v0, 3, 0
	s_lshl_b64 s[16:17], s[8:9], 2
	s_add_i32 s8, s8, -1
	s_add_u32 s6, s6, s16
	s_mul_i32 s12, s33, 0x670
	s_mul_i32 s13, s33, 0x350
	s_mul_i32 s14, s33, 48
	s_addc_u32 s7, s7, s17
.LBB2_2:                                ; %.lr.ph
                                        ; =>This Inner Loop Header: Depth=1
	s_load_b32 s9, s[6:7], 0x0
	s_add_i32 s36, s36, 1
	v_add_nc_u32_e32 v4, s14, v1
	v_add_nc_u32_e32 v21, s13, v1
	v_add_nc_u32_e32 v22, s12, v1
	s_waitcnt lgkmcnt(0)
	v_mad_u64_u32 v[2:3], null, s9, s33, v[0:1]
	v_add_nc_u32_e32 v1, s34, v1
	s_add_i32 s9, s8, s36
	s_add_u32 s6, s6, 4
	s_addc_u32 s7, s7, 0
	s_cmp_ge_i32 s9, s11
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v3, 31, v2
	v_lshlrev_b64 v[2:3], 3, v[2:3]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v17, vcc_lo, s0, v2
	v_add_co_ci_u32_e32 v18, vcc_lo, s1, v3, vcc_lo
	v_add_co_u32 v19, vcc_lo, s2, v2
	v_add_co_ci_u32_e32 v20, vcc_lo, s3, v3, vcc_lo
	v_add_co_u32 v2, vcc_lo, s4, v2
	v_add_co_ci_u32_e32 v3, vcc_lo, s5, v3, vcc_lo
	global_load_b64 v[17:18], v[17:18], off
	global_load_b64 v[19:20], v[19:20], off
	global_load_b64 v[2:3], v[2:3], off
	s_waitcnt vmcnt(2)
	ds_store_b64 v4, v[17:18]
	s_waitcnt vmcnt(1)
	ds_store_b64 v21, v[19:20]
	s_waitcnt vmcnt(0)
	ds_store_b64 v22, v[2:3]
	s_cbranch_scc0 .LBB2_2
.LBB2_3:                                ; %Flow409
	v_mov_b32_e32 v23, 0
	v_mov_b32_e32 v24, 0
	s_add_i32 s35, s33, -1
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_mov_b32_e32 v21, v23
	v_cmp_gt_i32_e64 s1, s35, v0
	v_dual_mov_b32 v17, v23 :: v_dual_mov_b32 v18, v24
	v_dual_mov_b32 v22, v24 :: v_dual_mov_b32 v19, v23
	v_mov_b32_e32 v20, v24
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	s_and_saveexec_b32 s0, s1
	s_cbranch_execz .LBB2_5
; %bb.4:
	ds_load_2addr_b64 v[1:4], v41 offset1:1
	ds_load_2addr_b64 v[25:28], v42 offset1:1
	ds_load_2addr_b64 v[29:32], v43 offset1:1
	s_waitcnt lgkmcnt(2)
	v_add_f64 v[19:20], v[3:4], -v[1:2]
	s_waitcnt lgkmcnt(1)
	v_add_f64 v[17:18], v[27:28], -v[25:26]
	s_waitcnt lgkmcnt(0)
	v_add_f64 v[21:22], v[31:32], -v[29:30]
.LBB2_5:
	s_or_b32 exec_lo, exec_lo, s0
	v_cmp_eq_u32_e64 s0, 0, v0
	v_cmp_ne_u32_e64 s2, 0, v0
	v_dual_mov_b32 v26, v24 :: v_dual_mov_b32 v25, v23
	v_dual_mov_b32 v28, v24 :: v_dual_mov_b32 v27, v23
	s_delay_alu instid0(VALU_DEP_3)
	s_and_saveexec_b32 s3, s2
	s_cbranch_execz .LBB2_7
; %bb.6:
	v_add_nc_u32_e32 v1, -8, v41
	v_add_nc_u32_e32 v23, -8, v42
	v_add_nc_u32_e32 v24, -8, v43
	ds_load_2addr_b64 v[1:4], v1 offset1:1
	ds_load_2addr_b64 v[25:28], v23 offset1:1
	ds_load_2addr_b64 v[29:32], v24 offset1:1
	s_waitcnt lgkmcnt(2)
	v_add_f64 v[23:24], v[1:2], -v[3:4]
	s_waitcnt lgkmcnt(1)
	v_add_f64 v[25:26], v[25:26], -v[27:28]
	s_waitcnt lgkmcnt(0)
	v_add_f64 v[27:28], v[29:30], -v[31:32]
.LBB2_7:
	s_or_b32 exec_lo, exec_lo, s3
	s_add_i32 s3, s33, -2
                                        ; implicit-def: $vgpr29_vgpr30
                                        ; implicit-def: $vgpr31_vgpr32
                                        ; implicit-def: $vgpr33_vgpr34
	s_delay_alu instid0(SALU_CYCLE_1)
	v_cmp_gt_i32_e32 vcc_lo, s3, v0
	s_and_saveexec_b32 s3, vcc_lo
	s_cbranch_execz .LBB2_9
; %bb.8:
	ds_load_2addr_b64 v[1:4], v41 offset0:1 offset1:2
	ds_load_2addr_b64 v[31:34], v42 offset0:1 offset1:2
	ds_load_2addr_b64 v[35:38], v43 offset0:1 offset1:2
	s_waitcnt lgkmcnt(2)
	v_add_f64 v[29:30], v[3:4], -v[1:2]
	s_waitcnt lgkmcnt(1)
	v_add_f64 v[31:32], v[33:34], -v[31:32]
	s_waitcnt lgkmcnt(0)
	v_add_f64 v[33:34], v[37:38], -v[35:36]
.LBB2_9:
	s_or_b32 exec_lo, exec_lo, s3
	v_mul_f64 v[1:2], v[19:20], v[19:20]
	s_delay_alu instid0(VALU_DEP_4)
	v_mul_f64 v[39:40], v[17:18], v[25:26]
	s_add_i32 s3, s10, s34
	s_mov_b32 s4, 0x78a05eaf
	v_lshl_add_u32 v44, v0, 3, s3
	s_mov_b32 s6, 0x9fea6a70
	s_mov_b32 s5, 0xbf90a5a3
	s_mov_b32 s7, 0x3fa05985
	s_mov_b32 s8, 0x37024d6a
	s_mov_b32 s9, 0x3f940521
	s_mov_b32 s10, 0x98a70509
	s_mov_b32 s11, 0x3f7ab3a0
	s_mov_b32 s12, 0xa300c8d2
	s_mov_b32 s13, 0x3f88ed60
	s_mov_b32 s14, 0x4b77012b
	s_mov_b32 s15, 0x3f8c6fa8
	s_mov_b32 s16, 0x11dccb70
	s_mov_b32 s17, 0x3f91c6c1
	s_mov_b32 s18, 0xa0adacf
	s_mov_b32 s19, 0x3f96e89f
	s_mov_b32 s20, 0xc668963f
	s_mov_b32 s21, 0x3f9f1c72
	s_mov_b32 s22, 0xb41ce4bd
	s_mov_b32 s23, 0x3fa6db6d
	s_mov_b32 s24, 0x3336fd5b
	s_mov_b32 s25, 0x3fb33333
	s_mov_b32 s26, 0x55555380
	s_mov_b32 s27, 0x3fc55555
	s_mov_b32 s28, 0xeeb562d6
	s_mov_b32 s30, 0x336a0500
	s_mov_b32 s29, 0x3ffaf154
	s_mov_b32 s31, 0x3fedd9ad
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[1:2], v[17:18], v[17:18], v[1:2]
	v_fma_f64 v[1:2], v[21:22], v[21:22], v[1:2]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_cmp_gt_f64_e32 vcc_lo, 0x10000000, v[1:2]
	v_cndmask_b32_e64 v3, 0, 1, vcc_lo
	v_lshlrev_b32_e32 v3, 8, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ldexp_f64 v[1:2], v[1:2], v3
	v_rsq_f64_e32 v[3:4], v[1:2]
	s_waitcnt_depctr 0xfff
	v_mul_f64 v[35:36], v[1:2], v[3:4]
	v_mul_f64 v[3:4], v[3:4], 0.5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[37:38], -v[3:4], v[35:36], 0.5
	v_fma_f64 v[35:36], v[35:36], v[37:38], v[35:36]
	v_fma_f64 v[3:4], v[3:4], v[37:38], v[3:4]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[37:38], -v[35:36], v[35:36], v[1:2]
	v_fma_f64 v[35:36], v[37:38], v[3:4], v[35:36]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[37:38], -v[35:36], v[35:36], v[1:2]
	v_fma_f64 v[3:4], v[37:38], v[3:4], v[35:36]
	v_fma_f64 v[35:36], v[19:20], v[23:24], v[39:40]
	v_cndmask_b32_e64 v37, 0, 0xffffff80, vcc_lo
	v_cmp_class_f64_e64 vcc_lo, v[1:2], 0x260
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_ldexp_f64 v[3:4], v[3:4], v37
	v_fma_f64 v[35:36], v[21:22], v[27:28], v[35:36]
	s_delay_alu instid0(VALU_DEP_2)
	v_dual_cndmask_b32 v2, v4, v2 :: v_dual_cndmask_b32 v1, v3, v1
	v_add_nc_u32_e32 v3, -8, v44
	ds_store_b64 v44, v[1:2]
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	ds_load_2addr_b64 v[1:4], v3 offset1:1
	s_waitcnt lgkmcnt(0)
	v_div_scale_f64 v[37:38], null, v[3:4], v[3:4], v[35:36]
	v_div_scale_f64 v[47:48], vcc_lo, v[35:36], v[3:4], v[35:36]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[39:40], v[37:38]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[45:46], -v[37:38], v[39:40], 1.0
	v_fma_f64 v[39:40], v[39:40], v[45:46], v[39:40]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[45:46], -v[37:38], v[39:40], 1.0
	v_fma_f64 v[39:40], v[39:40], v[45:46], v[39:40]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[45:46], v[47:48], v[39:40]
	v_fma_f64 v[37:38], -v[37:38], v[45:46], v[47:48]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fmas_f64 v[37:38], v[37:38], v[39:40], v[45:46]
	v_div_fixup_f64 v[3:4], v[37:38], v[3:4], v[35:36]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_div_scale_f64 v[35:36], null, v[1:2], v[1:2], v[3:4]
	v_div_scale_f64 v[45:46], vcc_lo, v[3:4], v[1:2], v[3:4]
	v_rcp_f64_e32 v[37:38], v[35:36]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[39:40], -v[35:36], v[37:38], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[37:38], v[37:38], v[39:40], v[37:38]
	v_fma_f64 v[39:40], -v[35:36], v[37:38], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[37:38], v[37:38], v[39:40], v[37:38]
	v_mul_f64 v[39:40], v[45:46], v[37:38]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[35:36], -v[35:36], v[39:40], v[45:46]
	v_div_fmas_f64 v[35:36], v[35:36], v[37:38], v[39:40]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fixup_f64 v[3:4], v[35:36], v[1:2], v[3:4]
	v_fma_f64 v[35:36], |v[3:4]|, -0.5, 0.5
	v_mul_f64 v[37:38], v[3:4], v[3:4]
	v_cmp_ge_f64_e64 vcc_lo, |v[3:4]|, 0.5
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_dual_cndmask_b32 v38, v38, v36 :: v_dual_cndmask_b32 v37, v37, v35
	v_fma_f64 v[39:40], v[37:38], s[6:7], s[4:5]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[39:40], v[37:38], v[39:40], s[8:9]
	v_fma_f64 v[39:40], v[37:38], v[39:40], s[10:11]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[39:40], v[37:38], v[39:40], s[12:13]
	v_fma_f64 v[39:40], v[37:38], v[39:40], s[14:15]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[39:40], v[37:38], v[39:40], s[16:17]
	v_fma_f64 v[39:40], v[37:38], v[39:40], s[18:19]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[39:40], v[37:38], v[39:40], s[20:21]
	v_fma_f64 v[39:40], v[37:38], v[39:40], s[22:23]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[39:40], v[37:38], v[39:40], s[24:25]
	v_fma_f64 v[39:40], v[37:38], v[39:40], s[26:27]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[37:38], v[37:38], v[39:40]
	v_fma_f64 v[39:40], v[3:4], v[37:38], v[3:4]
	s_delay_alu instid0(VALU_DEP_1)
	v_fma_f64 v[39:40], s[30:31], s[28:29], -v[39:40]
	s_and_saveexec_b32 s37, vcc_lo
	s_cbranch_execz .LBB2_11
; %bb.10:
	v_rsq_f64_e32 v[39:40], v[35:36]
	v_cmp_eq_f64_e32 vcc_lo, 0, v[35:36]
	s_mov_b32 s39, 0x3ffdd9ad
	s_mov_b32 s38, s30
	s_waitcnt_depctr 0xfff
	v_mul_f64 v[45:46], v[35:36], v[39:40]
	v_mul_f64 v[39:40], v[39:40], 0.5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[47:48], -v[39:40], v[45:46], 0.5
	v_fma_f64 v[45:46], v[45:46], v[47:48], v[45:46]
	v_fma_f64 v[39:40], v[39:40], v[47:48], v[39:40]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[47:48], -v[45:46], v[45:46], v[35:36]
	v_fma_f64 v[39:40], v[47:48], v[39:40], v[45:46]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_dual_cndmask_b32 v40, v40, v36 :: v_dual_cndmask_b32 v39, v39, v35
	v_add_f64 v[45:46], v[39:40], v[39:40]
	v_mul_f64 v[47:48], v[39:40], v[39:40]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[49:50], v[45:46]
	v_add_f64 v[51:52], v[35:36], -v[47:48]
	v_fma_f64 v[55:56], v[39:40], v[39:40], -v[47:48]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_3) | instid1(VALU_DEP_2)
	v_add_f64 v[35:36], v[35:36], -v[51:52]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[53:54], -v[45:46], v[49:50], 1.0
	v_add_f64 v[35:36], v[35:36], -v[47:48]
	v_fma_f64 v[47:48], v[53:54], v[49:50], v[49:50]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[35:36], v[35:36], -v[55:56]
	v_fma_f64 v[49:50], -v[45:46], v[47:48], 1.0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[35:36], v[51:52], v[35:36]
	v_fma_f64 v[47:48], v[49:50], v[47:48], v[47:48]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[49:50], v[35:36], v[47:48]
	v_fma_f64 v[35:36], -v[45:46], v[49:50], v[35:36]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[35:36], v[35:36], v[47:48], v[49:50]
	v_cndmask_b32_e64 v36, v36, 0, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_cndmask_b32_e64 v35, v35, 0, vcc_lo
	v_cmp_gt_f64_e32 vcc_lo, 0, v[3:4]
	v_add_f64 v[45:46], v[39:40], v[35:36]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[39:40], v[45:46], -v[39:40]
	v_add_f64 v[35:36], v[35:36], -v[39:40]
	v_fma_f64 v[39:40], v[45:46], v[37:38], v[45:46]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[35:36], v[45:46], v[37:38], v[35:36]
	v_mul_f64 v[37:38], v[39:40], -2.0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[35:36], v[45:46], v[35:36]
	v_fma_f64 v[37:38], s[38:39], s[28:29], v[37:38]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[35:36], v[35:36], v[35:36]
	v_dual_cndmask_b32 v36, v36, v38 :: v_dual_cndmask_b32 v35, v35, v37
	v_cmp_neq_f64_e32 vcc_lo, -1.0, v[3:4]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cndmask_b32_e32 v35, 0x54442d18, v35, vcc_lo
	v_cndmask_b32_e32 v36, 0x400921fb, v36, vcc_lo
	v_cmp_neq_f64_e32 vcc_lo, 1.0, v[3:4]
	s_delay_alu instid0(VALU_DEP_2)
	v_dual_cndmask_b32 v40, 0, v36 :: v_dual_cndmask_b32 v39, 0, v35
.LBB2_11:                               ; %_ZL4acosd.exit
	s_or_b32 exec_lo, exec_lo, s37
	v_mul_f64 v[3:4], v[25:26], v[31:32]
	s_add_i32 s3, s3, s34
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[3:4], v[23:24], v[29:30], v[3:4]
	v_fma_f64 v[3:4], v[27:28], v[33:34], v[3:4]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_div_scale_f64 v[29:30], null, v[1:2], v[1:2], v[3:4]
	v_div_scale_f64 v[35:36], vcc_lo, v[3:4], v[1:2], v[3:4]
	v_rcp_f64_e32 v[31:32], v[29:30]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[33:34], -v[29:30], v[31:32], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[31:32], v[31:32], v[33:34], v[31:32]
	v_fma_f64 v[33:34], -v[29:30], v[31:32], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[31:32], v[31:32], v[33:34], v[31:32]
	v_mul_f64 v[33:34], v[35:36], v[31:32]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[29:30], -v[29:30], v[33:34], v[35:36]
	v_div_fmas_f64 v[29:30], v[29:30], v[31:32], v[33:34]
	s_delay_alu instid0(VALU_DEP_1)
	v_div_fixup_f64 v[3:4], v[29:30], v[1:2], v[3:4]
	v_lshl_add_u32 v29, v0, 3, s3
	ds_store_b64 v29, v[39:40]
	ds_load_b64 v[29:30], v44 offset:8
	s_waitcnt lgkmcnt(0)
	v_div_scale_f64 v[31:32], null, v[29:30], v[29:30], v[3:4]
	v_div_scale_f64 v[37:38], vcc_lo, v[3:4], v[29:30], v[3:4]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[33:34], v[31:32]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[35:36], -v[31:32], v[33:34], 1.0
	v_fma_f64 v[33:34], v[33:34], v[35:36], v[33:34]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[35:36], -v[31:32], v[33:34], 1.0
	v_fma_f64 v[33:34], v[33:34], v[35:36], v[33:34]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[35:36], v[37:38], v[33:34]
	v_fma_f64 v[31:32], -v[31:32], v[35:36], v[37:38]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fmas_f64 v[31:32], v[31:32], v[33:34], v[35:36]
	v_div_fixup_f64 v[3:4], v[31:32], v[29:30], v[3:4]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_fma_f64 v[31:32], |v[3:4]|, -0.5, 0.5
	v_mul_f64 v[29:30], v[3:4], v[3:4]
	v_cmp_ge_f64_e64 vcc_lo, |v[3:4]|, 0.5
	v_dual_cndmask_b32 v30, v30, v32 :: v_dual_cndmask_b32 v29, v29, v31
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[33:34], v[29:30], s[6:7], s[4:5]
	v_fma_f64 v[33:34], v[29:30], v[33:34], s[8:9]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[33:34], v[29:30], v[33:34], s[10:11]
	v_fma_f64 v[33:34], v[29:30], v[33:34], s[12:13]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[33:34], v[29:30], v[33:34], s[14:15]
	v_fma_f64 v[33:34], v[29:30], v[33:34], s[16:17]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[33:34], v[29:30], v[33:34], s[18:19]
	v_fma_f64 v[33:34], v[29:30], v[33:34], s[20:21]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[33:34], v[29:30], v[33:34], s[22:23]
	v_fma_f64 v[33:34], v[29:30], v[33:34], s[24:25]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[33:34], v[29:30], v[33:34], s[26:27]
	v_mul_f64 v[29:30], v[29:30], v[33:34]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[33:34], v[3:4], v[29:30], v[3:4]
	v_fma_f64 v[33:34], s[30:31], s[28:29], -v[33:34]
	s_and_saveexec_b32 s4, vcc_lo
	s_cbranch_execz .LBB2_13
; %bb.12:
	v_rsq_f64_e32 v[33:34], v[31:32]
	v_cmp_eq_f64_e32 vcc_lo, 0, v[31:32]
	s_mov_b32 s6, 0xeeb562d6
	s_mov_b32 s8, 0x336a0500
	s_mov_b32 s7, 0x3ffaf154
	s_mov_b32 s9, 0x3ffdd9ad
	s_waitcnt_depctr 0xfff
	v_mul_f64 v[35:36], v[31:32], v[33:34]
	v_mul_f64 v[33:34], v[33:34], 0.5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[37:38], -v[33:34], v[35:36], 0.5
	v_fma_f64 v[35:36], v[35:36], v[37:38], v[35:36]
	v_fma_f64 v[33:34], v[33:34], v[37:38], v[33:34]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[37:38], -v[35:36], v[35:36], v[31:32]
	v_fma_f64 v[33:34], v[37:38], v[33:34], v[35:36]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_dual_cndmask_b32 v34, v34, v32 :: v_dual_cndmask_b32 v33, v33, v31
	v_add_f64 v[35:36], v[33:34], v[33:34]
	v_mul_f64 v[37:38], v[33:34], v[33:34]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[39:40], v[35:36]
	v_add_f64 v[45:46], v[31:32], -v[37:38]
	v_fma_f64 v[49:50], v[33:34], v[33:34], -v[37:38]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_3) | instid1(VALU_DEP_2)
	v_add_f64 v[31:32], v[31:32], -v[45:46]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[47:48], -v[35:36], v[39:40], 1.0
	v_add_f64 v[31:32], v[31:32], -v[37:38]
	v_fma_f64 v[37:38], v[47:48], v[39:40], v[39:40]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[31:32], v[31:32], -v[49:50]
	v_fma_f64 v[39:40], -v[35:36], v[37:38], 1.0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[31:32], v[45:46], v[31:32]
	v_fma_f64 v[37:38], v[39:40], v[37:38], v[37:38]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[39:40], v[31:32], v[37:38]
	v_fma_f64 v[31:32], -v[35:36], v[39:40], v[31:32]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[31:32], v[31:32], v[37:38], v[39:40]
	v_cndmask_b32_e64 v32, v32, 0, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_cndmask_b32_e64 v31, v31, 0, vcc_lo
	v_cmp_gt_f64_e32 vcc_lo, 0, v[3:4]
	v_add_f64 v[35:36], v[33:34], v[31:32]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[33:34], v[35:36], -v[33:34]
	v_add_f64 v[31:32], v[31:32], -v[33:34]
	v_fma_f64 v[33:34], v[35:36], v[29:30], v[35:36]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[29:30], v[35:36], v[29:30], v[31:32]
	v_mul_f64 v[31:32], v[33:34], -2.0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[29:30], v[35:36], v[29:30]
	v_fma_f64 v[31:32], s[8:9], s[6:7], v[31:32]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[29:30], v[29:30], v[29:30]
	v_dual_cndmask_b32 v30, v30, v32 :: v_dual_cndmask_b32 v29, v29, v31
	v_cmp_neq_f64_e32 vcc_lo, -1.0, v[3:4]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cndmask_b32_e32 v29, 0x54442d18, v29, vcc_lo
	v_cndmask_b32_e32 v30, 0x400921fb, v30, vcc_lo
	v_cmp_neq_f64_e32 vcc_lo, 1.0, v[3:4]
	s_delay_alu instid0(VALU_DEP_2)
	v_dual_cndmask_b32 v34, 0, v30 :: v_dual_cndmask_b32 v33, 0, v29
.LBB2_13:                               ; %_ZL4acosd.exit327
	s_or_b32 exec_lo, exec_lo, s4
	v_mov_b32_e32 v31, 0
	v_mov_b32_e32 v32, 0
	s_add_i32 s3, s3, s34
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_mov_b32_e32 v29, v31
	v_lshl_add_u32 v35, v0, 3, s3
	v_dual_mov_b32 v3, v31 :: v_dual_mov_b32 v4, v32
	v_mov_b32_e32 v30, v32
	ds_store_b64 v35, v[33:34]
	s_and_saveexec_b32 s4, s2
	s_cbranch_execz .LBB2_15
; %bb.14:
	s_mov_b32 s6, 0x624dd2f
	s_mov_b32 s7, 0xbfc39581
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[3:4], v[1:2], s[6:7]
	v_mul_f64 v[3:4], 0x4111d280, v[3:4]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_div_scale_f64 v[29:30], null, v[1:2], v[1:2], v[3:4]
	v_div_scale_f64 v[35:36], vcc_lo, v[3:4], v[1:2], v[3:4]
	v_rcp_f64_e32 v[31:32], v[29:30]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[33:34], -v[29:30], v[31:32], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[31:32], v[31:32], v[33:34], v[31:32]
	v_fma_f64 v[33:34], -v[29:30], v[31:32], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[31:32], v[31:32], v[33:34], v[31:32]
	v_mul_f64 v[33:34], v[35:36], v[31:32]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[29:30], -v[29:30], v[33:34], v[35:36]
	v_div_fmas_f64 v[29:30], v[29:30], v[31:32], v[33:34]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fixup_f64 v[1:2], v[29:30], v[1:2], v[3:4]
	v_fma_f64 v[31:32], v[23:24], v[1:2], 0
	v_fma_f64 v[29:30], v[25:26], v[1:2], 0
	v_fma_f64 v[3:4], v[27:28], v[1:2], 0
.LBB2_15:
	s_or_b32 exec_lo, exec_lo, s4
	s_and_saveexec_b32 s2, s1
	s_cbranch_execz .LBB2_17
; %bb.16:
	ds_load_b64 v[1:2], v44
	s_mov_b32 s4, 0x624dd2f
	s_mov_b32 s5, 0xbfc39581
	s_waitcnt lgkmcnt(0)
	v_add_f64 v[23:24], v[1:2], s[4:5]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[23:24], 0x4111d280, v[23:24]
	v_div_scale_f64 v[25:26], null, v[1:2], v[1:2], v[23:24]
	v_div_scale_f64 v[35:36], vcc_lo, v[23:24], v[1:2], v[23:24]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[27:28], v[25:26]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[33:34], -v[25:26], v[27:28], 1.0
	v_fma_f64 v[27:28], v[27:28], v[33:34], v[27:28]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[33:34], -v[25:26], v[27:28], 1.0
	v_fma_f64 v[27:28], v[27:28], v[33:34], v[27:28]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[33:34], v[35:36], v[27:28]
	v_fma_f64 v[25:26], -v[25:26], v[33:34], v[35:36]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fmas_f64 v[25:26], v[25:26], v[27:28], v[33:34]
	v_div_fixup_f64 v[1:2], v[25:26], v[1:2], v[23:24]
	s_delay_alu instid0(VALU_DEP_1)
	v_fma_f64 v[31:32], v[19:20], v[1:2], v[31:32]
	v_fma_f64 v[29:30], v[17:18], v[1:2], v[29:30]
	v_fma_f64 v[3:4], v[21:22], v[1:2], v[3:4]
.LBB2_17:
	s_or_b32 exec_lo, exec_lo, s2
	s_mul_i32 s1, s36, s33
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_eq_u32 s1, 0
	s_cbranch_scc1 .LBB2_20
; %bb.18:                               ; %.lr.ph336
	ds_load_b64 v[1:2], v41
	ds_load_b64 v[17:18], v42
	ds_load_b64 v[19:20], v43
	s_add_i32 s6, s3, s34
	s_mulk_i32 s33, 0x320
	s_mov_b32 s2, 0x8e15011a
	s_add_i32 s7, s6, s33
	s_mov_b32 s4, 0xeb851eb8
	s_mov_b32 s3, 0x3fc49520
	s_mov_b32 s5, 0x4022b851
	s_add_i32 s8, s7, s33
.LBB2_19:                               ; =>This Inner Loop Header: Depth=1
	v_mov_b32_e32 v21, s7
	v_mov_b32_e32 v23, s6
	v_mov_b32_e32 v27, s8
	s_add_i32 s1, s1, -1
	s_add_i32 s6, s6, 8
	ds_load_b64 v[21:22], v21
	ds_load_b64 v[23:24], v23
	ds_load_b64 v[27:28], v27
	s_add_i32 s7, s7, 8
	s_add_i32 s8, s8, 8
	s_cmp_eq_u32 s1, 0
	s_waitcnt lgkmcnt(2)
	v_add_f64 v[21:22], v[21:22], -v[17:18]
	s_waitcnt lgkmcnt(1)
	v_add_f64 v[23:24], v[23:24], -v[1:2]
	s_waitcnt lgkmcnt(0)
	v_add_f64 v[27:28], v[27:28], -v[19:20]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[25:26], v[21:22], v[21:22]
	v_fma_f64 v[25:26], v[23:24], v[23:24], v[25:26]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[25:26], v[27:28], v[27:28], v[25:26]
	v_div_scale_f64 v[33:34], null, v[25:26], v[25:26], s[2:3]
	v_div_scale_f64 v[39:40], vcc_lo, s[2:3], v[25:26], s[2:3]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[35:36], v[33:34]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[37:38], -v[33:34], v[35:36], 1.0
	v_fma_f64 v[35:36], v[35:36], v[37:38], v[35:36]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[37:38], -v[33:34], v[35:36], 1.0
	v_fma_f64 v[35:36], v[35:36], v[37:38], v[35:36]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[37:38], v[39:40], v[35:36]
	v_fma_f64 v[33:34], -v[33:34], v[37:38], v[39:40]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fmas_f64 v[33:34], v[33:34], v[35:36], v[37:38]
	v_div_fixup_f64 v[33:34], v[33:34], v[25:26], s[2:3]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[35:36], v[33:34], v[33:34]
	v_mul_f64 v[33:34], v[33:34], v[35:36]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mul_f64 v[35:36], v[33:34], s[4:5]
	v_fma_f64 v[33:34], v[33:34], -2.0, 1.0
	v_mul_f64 v[33:34], v[35:36], v[33:34]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_div_scale_f64 v[35:36], null, v[25:26], v[25:26], v[33:34]
	v_div_scale_f64 v[41:42], vcc_lo, v[33:34], v[25:26], v[33:34]
	v_rcp_f64_e32 v[37:38], v[35:36]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[39:40], -v[35:36], v[37:38], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[37:38], v[37:38], v[39:40], v[37:38]
	v_fma_f64 v[39:40], -v[35:36], v[37:38], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[37:38], v[37:38], v[39:40], v[37:38]
	v_mul_f64 v[39:40], v[41:42], v[37:38]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[35:36], -v[35:36], v[39:40], v[41:42]
	v_div_fmas_f64 v[35:36], v[35:36], v[37:38], v[39:40]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fixup_f64 v[25:26], v[35:36], v[25:26], v[33:34]
	v_fma_f64 v[31:32], v[23:24], v[25:26], v[31:32]
	v_fma_f64 v[29:30], v[21:22], v[25:26], v[29:30]
	v_fma_f64 v[3:4], v[27:28], v[25:26], v[3:4]
	s_cbranch_scc0 .LBB2_19
.LBB2_20:                               ; %Flow407
	v_cmp_eq_u32_e32 vcc_lo, s35, v0
	v_mov_b32_e32 v0, 0x402e11a9
	v_mov_b32_e32 v2, 0xfbe76c8b
	global_load_b64 v[21:22], v[5:6], off
	global_load_b64 v[25:26], v[15:16], off
	s_or_b32 vcc_lo, s0, vcc_lo
	s_mov_b32 s0, 0xd2f1a9fc
	v_cndmask_b32_e32 v1, 0x402c0d9e, v0, vcc_lo
	v_cndmask_b32_e32 v0, 0x83e425af, v2, vcc_lo
	s_mov_b32 s1, 0x3f40624d
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_div_scale_f64 v[17:18], null, v[0:1], v[0:1], v[31:32]
	v_div_scale_f64 v[27:28], vcc_lo, v[31:32], v[0:1], v[31:32]
	v_rcp_f64_e32 v[19:20], v[17:18]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[23:24], -v[17:18], v[19:20], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[19:20], v[19:20], v[23:24], v[19:20]
	v_fma_f64 v[23:24], -v[17:18], v[19:20], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[19:20], v[19:20], v[23:24], v[19:20]
	v_mul_f64 v[23:24], v[27:28], v[19:20]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[17:18], -v[17:18], v[23:24], v[27:28]
	v_div_fmas_f64 v[17:18], v[17:18], v[19:20], v[23:24]
	v_div_scale_f64 v[27:28], vcc_lo, v[29:30], v[0:1], v[29:30]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_div_fixup_f64 v[17:18], v[17:18], v[0:1], v[31:32]
	s_waitcnt vmcnt(1)
	v_add_f64 v[19:20], v[17:18], v[21:22]
	v_div_scale_f64 v[21:22], null, v[0:1], v[0:1], v[29:30]
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[19:20], v[19:20], s[0:1], v[25:26]
	v_rcp_f64_e32 v[23:24], v[21:22]
	global_store_b64 v[15:16], v[19:20], off
	global_load_b64 v[15:16], v[7:8], off
	global_load_b64 v[25:26], v[13:14], off
	v_fma_f64 v[19:20], -v[21:22], v[23:24], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[19:20], v[23:24], v[19:20], v[23:24]
	v_fma_f64 v[23:24], -v[21:22], v[19:20], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[19:20], v[19:20], v[23:24], v[19:20]
	v_mul_f64 v[23:24], v[27:28], v[19:20]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[21:22], -v[21:22], v[23:24], v[27:28]
	v_div_fmas_f64 v[19:20], v[21:22], v[19:20], v[23:24]
	v_div_scale_f64 v[21:22], null, v[0:1], v[0:1], v[3:4]
	v_div_scale_f64 v[27:28], vcc_lo, v[3:4], v[0:1], v[3:4]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_div_fixup_f64 v[19:20], v[19:20], v[0:1], v[29:30]
	v_rcp_f64_e32 v[23:24], v[21:22]
	s_waitcnt vmcnt(1)
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_add_f64 v[15:16], v[19:20], v[15:16]
	s_waitcnt vmcnt(0)
	v_fma_f64 v[15:16], v[15:16], s[0:1], v[25:26]
	global_store_b64 v[13:14], v[15:16], off
	global_load_b64 v[13:14], v[9:10], off
	v_fma_f64 v[15:16], -v[21:22], v[23:24], 1.0
	global_load_b64 v[25:26], v[11:12], off
	v_fma_f64 v[15:16], v[23:24], v[15:16], v[23:24]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[23:24], -v[21:22], v[15:16], 1.0
	v_fma_f64 v[15:16], v[15:16], v[23:24], v[15:16]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[23:24], v[27:28], v[15:16]
	v_fma_f64 v[21:22], -v[21:22], v[23:24], v[27:28]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fmas_f64 v[15:16], v[21:22], v[15:16], v[23:24]
	v_div_fixup_f64 v[0:1], v[15:16], v[0:1], v[3:4]
	s_waitcnt vmcnt(1)
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_add_f64 v[2:3], v[0:1], v[13:14]
	s_waitcnt vmcnt(0)
	v_fma_f64 v[2:3], v[2:3], s[0:1], v[25:26]
	global_store_b64 v[11:12], v[2:3], off
	global_store_b64 v[5:6], v[17:18], off
	global_store_b64 v[7:8], v[19:20], off
	global_store_b64 v[9:10], v[0:1], off
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 344
		.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 57
		.amdhsa_next_free_sgpr 40
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end2:
	.size	_Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_, .Lfunc_end2-_Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 4832
; NumSgprs: 42
; NumVgprs: 57
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 5
; VGPRBlocks: 7
; NumSGPRsForWavesPerEU: 42
; NumVGPRsForWavesPerEU: 57
; Occupancy: 16
; WaveLimiterHint : 1
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         32
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         40
        .size:           8
        .value_kind:     global_buffer
      - .offset:         48
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         52
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         56
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         60
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         62
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         64
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         66
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         68
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         70
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         96
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         104
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         112
        .size:           2
        .value_kind:     hidden_grid_dims
      - .offset:         168
        .size:           4
        .value_kind:     hidden_dynamic_lds_size
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 304
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z12getCentroidsPdS_S_S_S_S_
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z12getCentroidsPdS_S_S_S_S_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     33
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         32
        .size:           8
        .value_kind:     global_buffer
      - .offset:         40
        .size:           4
        .value_kind:     by_value
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 44
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z13getVerletListPiS_PdS0_S0_i
    .private_segment_fixed_size: 0
    .sgpr_count:     40
    .sgpr_spill_count: 0
    .symbol:         _Z13getVerletListPiS_PdS0_S0_i.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     7
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         32
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         40
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         48
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         56
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         64
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         72
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         80
        .size:           8
        .value_kind:     global_buffer
      - .offset:         88
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         92
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         96
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         100
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         102
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         104
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         106
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         108
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         110
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         128
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         136
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         144
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         152
        .size:           2
        .value_kind:     hidden_grid_dims
      - .offset:         208
        .size:           4
        .value_kind:     hidden_dynamic_lds_size
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 344
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_
    .private_segment_fixed_size: 0
    .sgpr_count:     42
    .sgpr_spill_count: 0
    .symbol:         _Z6MDStepPdS_S_PiS0_S_S_S_S_S_S_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     57
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
