#include "TFcore.cuh"

#include "cuda_runtime.h"
#include "device_launch_parameters.h"

__global__ void _computeGradient(double* p, double* pshift, double* dp, int XRES) {
	int i = blockIdx.x * blockDim.x + threadIdx.x;
	dp[i] = (p[i] - pshift[i]) * (double)XRES;
}

__global__ void _computeWeightedSum(double* p, double* ddp, double alpha) {
	int i = blockIdx.x * blockDim.x + threadIdx.x;
	//p[i] += alpha * ddp[i] + beta * ((1 / (double)XRES) - p[i]);
	p[i] = p[i] + alpha * ddp[i];
}

//__global__ void normalizeProb(double* pdist) {
//	// <<< M, numChannels >>>
//	int numChannels = blockDim.x;
//	int m = blockIdx.x;
//	int n = threadIdx.x;
//
//	double psum = 0;
//	for (int k = 0; k < XRES; k++) psum += pdist[k + n * XRES + m * numChannels * XRES];
//	for (int k = 0; k < XRES; k++) pdist[k + n * XRES + m * numChannels * XRES] /= psum;
//}

__global__ void _computeProduct(double* pdist_prior, double* pdist_lik, double* pdist_post) {
	int i = blockIdx.x * blockDim.x + threadIdx.x;
	pdist_post[i] = pdist_prior[i] * pdist_lik[i];
}

TFcore::TFcore() {
}

TFcore::TFcore(string filename) {
	outputFile.open(filename, ios::out);
}

TFcore::TFcore(fs::path filename) {
	outputFile.open(filename, ios::out);
}

//TFcore::TFcore(CTFcoreMFCDlg& dlg) : dlg_(dlg) {
//	TFcore();
//}

TFcore::~TFcore() {
	free(mu_init);
	free(sig2_init);
	free(sig2_reg);
	free(sig2_update);

	free(xbin);
	free(xnew);
	free(idnew);

	free(emgMAV);
	free(emgStack);

	free(pdist_prior);
	free(pdist_post);
	free(pdist_lik);

	inputFile.close();
	outputFile.close();
}

void TFcore::initModel(int n) {
	M = 1;
	reglast = 0;
	samples = 0;

	bCollect = false;
	bCompute = false;
	bRegister = false;

	bGPU_product = false;
	bGPU_diffusion = false;

	bFuncRegistration = true;
	bFuncAdaptation = true;

	XRES = 128;
	WIN_MAV = 1024;
	M_MAX = 2048;

	// set channel
	setNumChannels(n);

	// memory allocation
	mu_init = (double*)calloc(numChannels, sizeof(double));
	sig2_init = (double*)calloc(numChannels, sizeof(double));

	sig2_reg = (double*)calloc(numChannels, sizeof(double));
	sig2_update = (double*)calloc(numChannels, sizeof(double));

	emgMAV = (double*)calloc(numChannels, sizeof(double));

	xnew = (double*)calloc(numChannels, sizeof(double));
	idnew = (int*)calloc(numChannels, sizeof(int));

	xbin = (double*)calloc(XRES, sizeof(double));
	for (int k = 0; k < XRES; k++) xbin[k] = ((k + 1) / (double)(XRES));
	emgStack = (double*)calloc(WIN_MAV * numChannels, sizeof(double));

	// lookup table for normal distribution
	tableSize = 10000;
	discretizeStep = 1000;
	normalTable = (double*)calloc(tableSize, sizeof(double));

	constructLookup();

	// distribution = max number of patterns
	pdist_prior = (double*)calloc(XRES * numChannels * M_MAX, sizeof(double));
	pdist_post = (double*)calloc(XRES * numChannels * M_MAX, sizeof(double));
	pdist_lik = (double*)calloc(XRES * numChannels * M_MAX, sizeof(double));

	dp = (double*)calloc(XRES * numChannels * M_MAX, sizeof(double));
	ddp = (double*)calloc(XRES * numChannels * M_MAX, sizeof(double));
	p_shift = (double*)calloc(XRES * numChannels * M_MAX, sizeof(double));
	dp_shift = (double*)calloc(XRES * numChannels * M_MAX, sizeof(double));

	p_lik = (double*)calloc(M_MAX, sizeof(double));
	for (int m = 0; m < M_MAX; m++) {
		p_lik[m] = NAN;
		for (int n = 0; n < numChannels; n++) {
			for (int k = 0; k < XRES; k++) {
				pdist_prior[k + n * XRES + m * XRES * numChannels] = NAN;
				pdist_post[k + n * XRES + m * XRES * numChannels] = NAN;
				pdist_lik[k + n * XRES + m * XRES * numChannels] = NAN;

				dp[k + n * XRES + m * XRES * numChannels] = 0;
				ddp[k + n * XRES + m * XRES * numChannels] = 0;
				p_shift[k + n * XRES + m * XRES * numChannels] = (1 / (double)XRES);
				dp_shift[k + n * XRES + m * XRES * numChannels] = 0;
			}
		}
	}

	// model parameter
	xmax = 5.00e-5;

	alpha = 1.00e-10;
	beta = 1.00e-50;

	p_star = -20;

	reghold = 512;

	setVal(mu_init, 3.00e-2);
	setVal(sig2_init, 1.00e-1);
	setVal(sig2_reg, 1.00e-2);
	setVal(sig2_update, 1.00e+2);

	setZero(emgMAV);

	// initialize first pattern
	for (int n = 0; n < numChannels; n++) {
		for (int k = 0; k < XRES; k++) {
			// assign uniform distribution
			pdist_prior[k + n * XRES] = (1 / (double)XRES);
			pdist_post[k + n * XRES] = (1 / (double)XRES);
			pdist_lik[k + n * XRES] = (1 / (double)XRES);

			dp[k + n * XRES] = 0;
			ddp[k + n * XRES] = 0;
			p_shift[k + n * XRES] = (1 / (double)XRES);
			dp_shift[k + n * XRES] = (1 / (double)XRES);
		}
	}


	_pdist_prior = nullptr;
	_pdist_lik = nullptr;
	_pdist_post = nullptr;

	_p_shift = nullptr;
	_dp_shift = nullptr;
	_dp = nullptr;
	_ddp = nullptr;

	if (!outputFile.is_open()) outputFile.open("output.csv", ios::out);
}

void TFcore::getSample() {
	samples++;

	// a vertical stack of row samples to compute MAV
	// the first row = the latest sample

	string data;
	string line;
	stringstream parse;

	//for (int n = 0; n < numChannels; n++) {
		//memcpy(&emgStack[1 + n * WIN_MAV], &emgStack[0 + n * WIN_MAV], (WIN_MAV - 1) * sizeof(double));
		//emgStack[n * WIN_MAV] = dataStack.front();
		//dataStack.erase(dataStack.begin());
	//}

	getline(inputFile, line, '\n');
	parse.str(line);
	for (int n = 0; n < numChannels; n++) {
		memcpy(&emgStack[1 + n * WIN_MAV], &emgStack[0 + n * WIN_MAV], (WIN_MAV - 1) * sizeof(double));
		getline(parse, data, ',');
		emgStack[n * WIN_MAV] = stod(data);
	}



	// compute MAV = a single row vector
	for (int n = 0; n < numChannels; n++) {
		emgMAV[n] = 0;
		for (int m = 0; m < WIN_MAV; m++) {
			emgMAV[n] += abs(emgStack[m + n * WIN_MAV]) / (double)(WIN_MAV);
		}
	}

	bCollect = true;
	bCompute = false;
}

void TFcore::proceedIteration() {
	if (isCollect() && (samples > 2 * WIN_MAV)) {
		bRegister = false;

		reglast += 1;

		p_max = -999;
		mpred = 0;

		for (int n = 0; n < numChannels; n++) {
			xnew[n] = (1 / xmax) * emgMAV[n];
			xnew[n] = min((double)1, xnew[n]);
			idnew[n] = floor(xnew[n] * (double)(XRES));
			if (idnew[n] > (XRES - 1)) idnew[n] = XRES - 1;
		}

		if (bFuncAdaptation) {
			if (bGPU_diffusion) {
				cudaMalloc(&_pdist_prior, M * XRES * numChannels * sizeof(double));
				cudaMalloc(&_p_shift, M * XRES * numChannels * sizeof(double));
				cudaMalloc(&_dp_shift, M * XRES * numChannels * sizeof(double));
				cudaMalloc(&_dp, M * XRES * numChannels * sizeof(double));
				cudaMalloc(&_ddp, M * XRES * numChannels * sizeof(double));

				// memcpy pdist_prior => pshift(dist_prior)
				for (int m = 0; m < M; m++) {
					for (int n = 0; n < numChannels; n++) {
						memcpy(&p_shift[1 + n * XRES + m * (XRES * numChannels)],
							&pdist_prior[0 + n * XRES + m * (XRES * numChannels)],
							(XRES - 1) * sizeof(double));
						p_shift[0 + n * XRES + m * (XRES * numChannels)] = p_shift[1 + n * XRES + m * (XRES * numChannels)];
					}
				}

				cudaMemcpy(_pdist_prior, pdist_prior, M * XRES * numChannels * sizeof(double), cudaMemcpyHostToDevice);
				cudaMemcpy(_p_shift, p_shift, M * XRES * numChannels * sizeof(double), cudaMemcpyHostToDevice);

				_computeGradient << < 1, M* XRES* numChannels >> > (_pdist_prior, _p_shift, _dp, XRES);

				cudaMemcpy(dp, _dp, M * XRES * numChannels * sizeof(double), cudaMemcpyDeviceToHost);

				// memcpy dp(dist_prior) => dpshift(dist_prior)
				for (int m = 0; m < M; m++) {
					for (int n = 0; n < numChannels; n++) {
						memcpy(&dp_shift[1 + n * XRES + m * (XRES * numChannels)],
							&dp[0 + n * XRES + m * (XRES * numChannels)],
							(XRES - 1) * sizeof(double));
						dp_shift[0 + n * XRES + m * (XRES * numChannels)] = dp_shift[1 + n * XRES + m * (XRES * numChannels)];
					}
				}

				//cudaMemcpy(_dp, dp, M * XRES * numChannels * sizeof(double), cudaMemcpyHostToDevice);
				cudaMemcpy(_dp_shift, dp_shift, M * XRES * numChannels * sizeof(double), cudaMemcpyHostToDevice);

				_computeGradient << < 1, M* XRES* numChannels >> > (_dp, _dp_shift, _ddp, XRES);

				cudaMemcpy(ddp, _ddp, M * XRES * numChannels * sizeof(double), cudaMemcpyDeviceToHost);

				_computeWeightedSum << < 1, M* XRES* numChannels >> > (_pdist_prior, _ddp, alpha);

				cudaMemcpy(pdist_prior, _pdist_prior, M * XRES * numChannels * sizeof(double), cudaMemcpyDeviceToHost);

				cudaFree(_pdist_prior);
				cudaFree(_p_shift);
				cudaFree(_dp_shift);
				cudaFree(_dp);
				cudaFree(_ddp);
			}
			else {
				computeDiffusion();
			}
			normalizePrior();

			computeLikelihood(xnew, sig2_update);
			//normalizeLikelihood();

			if (bGPU_product) {
				cudaMalloc(&_pdist_prior, M * XRES * numChannels * sizeof(double));
				cudaMalloc(&_pdist_lik, M * XRES * numChannels * sizeof(double));
				cudaMalloc(&_pdist_post, M * XRES * numChannels * sizeof(double));

				cudaMemcpy(_pdist_prior, pdist_prior, M * XRES * numChannels * sizeof(double), cudaMemcpyHostToDevice);
				cudaMemcpy(_pdist_lik, pdist_lik, M * XRES * numChannels * sizeof(double), cudaMemcpyHostToDevice);

				_computeProduct << < M * XRES * numChannels, 1 >> > (_pdist_prior, _pdist_lik, _pdist_post);
				cudaMemcpy(pdist_post, _pdist_post, M * XRES * numChannels * sizeof(double), cudaMemcpyDeviceToHost);

				cudaFree(_pdist_prior);
				cudaFree(_pdist_lik);
				cudaFree(_pdist_post);
			}
			else {
				computeProduct();
			}
			normalizePost();

			// get maximum likelihood probability
			for (int m = 0; m < M; m++) {
				p_lik[m] = 0;
				for (int n = 0; n < numChannels; n++) {
					p_lik[m] += log10(pdist_post[idnew[n] + n * XRES + m * numChannels * XRES]);
				}
				//if (p_lik[m] < 1e-200) p_lik[m] = 1e-200;

				// MLE prediction
				if (p_lik[m] > p_max) {
					p_max = p_lik[m];
					mpred = m;
				}
			}
		}

		// registration
		if (bFuncRegistration) {
			if ((p_max < p_star) && (reglast > reghold) && (samples > 2 * WIN_MAV)) {
				registerPattern(xnew, sig2_reg);
				p_lik[M] = 0;
				for (int n = 0; n < numChannels; n++) {
					p_lik[M] += log10(pdist_post[idnew[n] + n * XRES + M * numChannels * XRES]);
				}
				p_max = p_lik[M];

				mpred = M;
				M += 1;
				reglast = 0;

				bRegister = true;
			}
			memcpy(&pdist_prior[mpred * XRES * numChannels], &pdist_post[mpred * XRES * numChannels], XRES * numChannels * sizeof(double));
		}

		bCollect = false;
		bCompute = true;
	}
	else {
		return;
	}
}

void TFcore::writeResult() {
	outputFile << p_max << ',' << mpred << ',';
	for (int n = 0; n < numChannels; n++) outputFile << xnew[n] << ',';

	outputFile << endl;
}

void TFcore::exportModel(fs::path filename) {
	fstream file;
	file.open(filename, ios::out | ios::binary);

	file.write(reinterpret_cast<char*>(&numChannels), sizeof(int));
	file.write(reinterpret_cast<char*>(&M_MAX), sizeof(int));
	file.write(reinterpret_cast<char*>(&xmax), sizeof(double));
	file.write(reinterpret_cast<char*>(&XRES), sizeof(int));
	file.write(reinterpret_cast<char*>(&WIN_MAV), sizeof(int));

	file.write(reinterpret_cast<char*>(&alpha), sizeof(double));
	file.write(reinterpret_cast<char*>(&beta), sizeof(double));
	file.write(reinterpret_cast<char*>(&p_star), sizeof(double));

	file.write(reinterpret_cast<char*>(&M), sizeof(int));
	file.write(reinterpret_cast<char*>(&reghold), sizeof(int));

	file.write(reinterpret_cast<char*>(&tableSize), sizeof(int));
	file.write(reinterpret_cast<char*>(&discretizeStep), sizeof(int));

	for (int k = 0; k < tableSize; k++) {
		file.write(reinterpret_cast<char*>(&normalTable[k]), sizeof(double));
	}

	for (int n = 0; n < numChannels; n++) {
		file.write(reinterpret_cast<char*>(&sig2_reg[n]), sizeof(double));
		file.write(reinterpret_cast<char*>(&sig2_update[n]), sizeof(double));
	}

	for (int m = 0; m < M; m++) {
		for (int n = 0; n < numChannels; n++) {
			for (int k = 0; k < XRES; k++) {
				file.write(reinterpret_cast<char*>(&pdist_prior[k + n * XRES + m * XRES * numChannels]), sizeof(double));
				file.write(reinterpret_cast<char*>(&pdist_post[k + n * XRES + m * XRES * numChannels]), sizeof(double));
			}
		}
	}

	file.close();
}

void TFcore::importModel(fs::path filename) {
	fstream file;
	file.open(filename, ios::in | ios::binary);

	file.read(reinterpret_cast<char*>(&numChannels), sizeof(int));
	file.read(reinterpret_cast<char*>(&M_MAX), sizeof(int));
	file.read(reinterpret_cast<char*>(&xmax), sizeof(double));
	file.read(reinterpret_cast<char*>(&XRES), sizeof(int));
	file.read(reinterpret_cast<char*>(&WIN_MAV), sizeof(int));
	cout << "numChannels: " << numChannels << endl;
	cout << "M_MAX: " << M_MAX << endl;
	cout << "xmax: " << xmax << endl;
	cout << "XRES: " << XRES << endl;
	cout << "WIN_MAV: " << WIN_MAV << endl;

	file.read(reinterpret_cast<char*>(&alpha), sizeof(double));
	file.read(reinterpret_cast<char*>(&beta), sizeof(double));
	file.read(reinterpret_cast<char*>(&p_star), sizeof(double));
	cout << "alpha: " << alpha << endl;
	cout << "beta: " << beta << endl;
	cout << "p_star: " << p_star << endl;

	file.read(reinterpret_cast<char*>(&M), sizeof(int));
	file.read(reinterpret_cast<char*>(&reghold), sizeof(int));
	cout << "M: " << M << endl;
	cout << "reghold: " << reghold << endl;

	file.read(reinterpret_cast<char*>(&tableSize), sizeof(int));
	file.read(reinterpret_cast<char*>(&discretizeStep), sizeof(int));
	cout << "tableSize: " << tableSize << endl;
	cout << "discretizeStep: " << discretizeStep << endl;
	
	for (int k = 0; k < tableSize; k++) {
		file.read(reinterpret_cast<char*>(&normalTable[k]), sizeof(double));
	}
	cout << "normalTable" << endl;

	for (int n = 0; n < numChannels; n++) {
		file.read(reinterpret_cast<char*>(&sig2_reg[n]), sizeof(double));
		file.read(reinterpret_cast<char*>(&sig2_update[n]), sizeof(double));
	}
	cout << "sig2" << endl;

	for (int m = 0; m < M; m++) {
		for (int n = 0; n < numChannels; n++) {
			for (int k = 0; k < XRES; k++) {
				file.read(reinterpret_cast<char*>(&pdist_prior[k + n * XRES + m * XRES * numChannels]), sizeof(double));
				file.read(reinterpret_cast<char*>(&pdist_post[k + n * XRES + m * XRES * numChannels]), sizeof(double));
			}
		}
	}
	cout << "pdist" << endl;

	file.close();
}

void TFcore::computeDiffusion() {
	//  pdist_prior => pshift(dist_prior)
	for (int m = 0; m < M; m++) {
		for (int n = 0; n < numChannels; n++) {
			memcpy(&p_shift[1 + n * XRES + m * (XRES * numChannels)],
				&pdist_prior[0 + n * XRES + m * (XRES * numChannels)],
				(XRES - 1) * sizeof(double));
			p_shift[0 + n * XRES + m * (XRES * numChannels)] = p_shift[1 + n * XRES + m * (XRES * numChannels)];
		}
	}

	// compute (p, pshift) => dp
	for (int m = 0; m < M; m++) {
		for (int n = 0; n < numChannels; n++) {
			for (int k = 0; k < XRES; k++) {
				dp[k + n * XRES + m * XRES * numChannels]
					= (double)XRES * (pdist_prior[k + n * XRES + m * XRES * numChannels] - p_shift[k + n * XRES + m * XRES * numChannels]);
			}
		}
	}

	// memcpy dp(dist_prior) => dpshift(dist_prior)
	for (int m = 0; m < M; m++) {
		for (int n = 0; n < numChannels; n++) {
			memcpy(&dp_shift[1 + n * XRES + m * (XRES * numChannels)],
				&dp[0 + n * XRES + m * (XRES * numChannels)],
				(XRES - 1) * sizeof(double));
			dp_shift[0 + n * XRES + m * (XRES * numChannels)] = dp_shift[1 + n * XRES + m * (XRES * numChannels)];
		}
	}

	// compute (dp, dpshift) => ddp
	for (int m = 0; m < M; m++) {
		for (int n = 0; n < numChannels; n++) {
			for (int k = 0; k < XRES; k++) {
				ddp[k + n * XRES + m * XRES * numChannels]
					= (double)XRES * (dp[k + n * XRES + m * XRES * numChannels] - dp_shift[k + n * XRES + m * XRES * numChannels]);
			}
		}
	}

	// weighted summation
	for (int m = 0; m < M; m++) {
		for (int n = 0; n < numChannels; n++) {
			for (int k = 0; k < XRES; k++) {
				pdist_prior[k + n * XRES + m * XRES * numChannels]
					= pdist_prior[k + n * XRES + m * XRES * numChannels] + alpha * ddp[k + n * XRES + m * XRES * numChannels];
			}
		}
	}

}

void TFcore::computeProduct() {
	for (int m = 0; m < M; m++) {
		for (int n = 0; n < numChannels; n++) {
			for (int k = 0; k < XRES; k++) {
				pdist_post[k + n * XRES + m * XRES * numChannels]
					= pdist_prior[k + n * XRES + m * XRES * numChannels]
					* pdist_lik[k + n * XRES + m * XRES * numChannels];
			}
		}
	}
}

void TFcore::loadData(string filename) {
	string extension = filename.substr(filename.find_last_of(".") + 1);
	//if (!strcmp(extension.c_str(), "mat")) {
	//	MATFile* pmat = matOpen(filename.c_str(), "r");

	//	if (pmat == NULL) {
	//		return;
	//	}

	//	mxArray* mxdata = matGetVariable(pmat, "emg");

	//	int m, n;
	//	m = mxGetM(mxdata);
	//	n = mxGetN(mxdata);


	//	double* data = mxGetPr(mxdata);

	//	for (int i = 0; i < m * n; i++) {
	//		dataStack.push_back(data[i]);
	//	}

	//	initModel(n);
	//	setNumSamples(m);

	//	mxDestroyArray(mxdata);
	//	matClose(pmat);
	//}
	if (!strcmp(extension.c_str(), "csv")) {
		// comma separated file (samples x channels)
		inputFile.open(filename.c_str(), ios::in);

		int m = 0;
		int n = 0;

		string data;
		string line;
		stringstream parse;

		getline(inputFile, line, '\n'); m++;
		parse.str(line);
		while (getline(parse, data, ',')) n++;

		while (getline(inputFile, line, '\n')) m++;
		inputFile.clear();
		inputFile.seekg(0, ios::beg);

		initModel(n);
		setNumSamples(m);
	}
}

void TFcore::loadData(fs::path filename) {
	if (filename.extension() == ".csv") {
		// comma separated file (samples x channels)
		inputFile.open(filename, ios::in);

		int m = 0;
		int n = 0;

		string data;
		string line;
		stringstream parse;

		getline(inputFile, line, '\n'); m++;
		parse.str(line);
		while (getline(parse, data, ',')) n++;

		while (getline(inputFile, line, '\n')) m++;
		inputFile.clear();
		inputFile.seekg(0, ios::beg);

		initModel(n);
		setNumSamples(m);
	}
}

void TFcore::loadData(vector<double> data, int ch) {
	initModel(ch);
	setNumSamples(data.size() / ch);
	for (int k = 0; k < data.size(); k++) dataStack.push_back(data[k]);
}

void TFcore::computeLikelihood(double* mu, double* sig2) {
	double* Z = (double*)calloc(XRES * numChannels, sizeof(double));
	int id = 0;
	for (int k = 0; k < XRES; k++) {
		for (int n = 0; n < numChannels; n++) {
			Z[k + n * XRES] = abs(((k + 1) / (double)XRES) - mu[n]);
			Z[k + n * XRES] *= discretizeStep / sqrt(sig2[n]);

			id = floor(abs(Z[k + n * XRES]));
			if (id < tableSize) {
				pdist_lik[k + n * XRES] = normalTable[id];
			}
			else {
				pdist_lik[k + n * XRES] = EPSILON;
			}
		}
	}

	// memcpy  normalize ع
	double psum;
	for (int n = 0; n < numChannels; n++) {
		psum = 0;
		for (int k = 0; k < XRES; k++) psum += pdist_lik[k + n * XRES];
		for (int k = 0; k < XRES; k++) pdist_lik[k + n * XRES] /= psum;
	}

	if (M > 1) {
		for (int m = 1; m < M; m++) memcpy(&pdist_lik[m * XRES * numChannels], &pdist_lik[0], XRES * numChannels * sizeof(double));
	}
	free(Z);
}

void TFcore::registerPattern(double* mu, double* sig2) {
	double* Z = (double*)calloc(XRES * numChannels, sizeof(double));
	int id = 0;
	for (int n = 0; n < numChannels; n++) {
		for (int k = 0; k < XRES; k++) {
			Z[k + n * XRES] = abs(((k + 1) / (double)XRES) - mu[n]);
			Z[k + n * XRES] *= discretizeStep / sqrt(sig2[n]);

			id = floor(abs(Z[k + n * XRES]));
			if (id < tableSize) {
				pdist_post[k + n * XRES + M * XRES * numChannels] = normalTable[id];
			}
			else {
				pdist_post[k + n * XRES + M * XRES * numChannels] = EPSILON;
			}
		}
	}

	double psum;
	for (int n = 0; n < numChannels; n++) {
		psum = 0;
		for (int k = 0; k < XRES; k++) psum += pdist_post[k + n * XRES + M * XRES * numChannels];
		for (int k = 0; k < XRES; k++) pdist_post[k + n * XRES + M * XRES * numChannels] /= psum;
	}

	free(Z);
}

void TFcore::normalizeLikelihood() {
	double psum;
	for (int m = 0; m < M; m++) {
		for (int n = 0; n < numChannels; n++) {
			psum = 0;
			for (int k = 0; k < XRES; k++) psum += pdist_lik[k + n * XRES + m * XRES * numChannels];
			for (int k = 0; k < XRES; k++) pdist_lik[k + n * XRES + m * XRES * numChannels] /= psum;
		}
	}
}

void TFcore::normalizePrior() {
	double psum;
	for (int m = 0; m < M; m++) {
		for (int n = 0; n < numChannels; n++) {
			psum = 0;
			for (int k = 0; k < XRES; k++) psum += pdist_prior[k + n * XRES + m * XRES * numChannels];
			for (int k = 0; k < XRES; k++) pdist_prior[k + n * XRES + m * XRES * numChannels] /= psum;
		}
	}
}

void TFcore::normalizePost() {
	double psum;
	for (int m = 0; m < M; m++) {
		for (int n = 0; n < numChannels; n++) {
			psum = 0;
			for (int k = 0; k < XRES; k++) psum += pdist_post[k + n * XRES + m * XRES * numChannels];
			for (int k = 0; k < XRES; k++) pdist_post[k + n * XRES + m * XRES * numChannels] /= psum;
		}
	}
}

void TFcore::constructLookup() {
	for (int i = 0; i < tableSize; i++) {
		normalTable[i] = (1 / sqrt(2 * M_PI)) * exp(-0.5 * ((double)i / discretizeStep) * ((double)i / discretizeStep));
	}
}

void TFcore::setVal(double* vector, double val) {
	for (int k = 0; k < numChannels; k++) {
		vector[k] = val;
	}
}

void TFcore::setZero(double* vector) {
	setVal(vector, (double)0);
}

void TFcore::setOnes(double* vector) {
	setVal(vector, (double)1);
}

	.file	"tmpxft_002203f0_00000000-6_TFcore.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB5343:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE5343:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.align 2
	.type	_ZNSolsEPFRSoS_E.isra.0, @function
_ZNSolsEPFRSoS_E.isra.0:
.LFB6666:
	.cfi_startproc
	jmp	*%rsi
	.cfi_endproc
.LFE6666:
	.size	_ZNSolsEPFRSoS_E.isra.0, .-_ZNSolsEPFRSoS_E.isra.0
	.type	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0, @function
_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0:
.LFB6667:
	.cfi_startproc
	jmp	cudaMalloc@PLT
	.cfi_endproc
.LFE6667:
	.size	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0, .-_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	.align 2
	.globl	_ZN6TFcore11writeResultEv
	.type	_ZN6TFcore11writeResultEv, @function
_ZN6TFcore11writeResultEv:
.LFB5324:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	864(%rdi), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movsd	176(%rdi), %xmm0
	movq	%rdi, %rbx
	movq	%r12, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movl	$44, %esi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c@PLT
	movl	160(%rbx), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movl	$44, %esi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c@PLT
.L5:
	cmpl	%ebp, (%rbx)
	jle	.L9
	movq	192(%rbx), %rax
	movq	%r12, %rdi
	movsd	(%rax,%rbp,8), %xmm0
	incq	%rbp
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movl	$44, %esi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c@PLT
	jmp	.L5
.L9:
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	popq	%rbx
	.cfi_def_cfa_offset 24
	movq	%r12, %rdi
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	jmp	_ZNSolsEPFRSoS_E.isra.0
	.cfi_endproc
.LFE5324:
	.size	_ZN6TFcore11writeResultEv, .-_ZN6TFcore11writeResultEv
	.align 2
	.globl	_ZN6TFcore16computeDiffusionEv
	.type	_ZN6TFcore16computeDiffusionEv, @function
_ZN6TFcore16computeDiffusionEv:
.LFB5327:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rax
	xorl	%r8d, %r8d
.L11:
	movl	164(%rax), %r9d
	cmpl	%r8d, %r9d
	jle	.L38
	xorl	%r9d, %r9d
.L13:
	movl	(%rax), %edx
	cmpl	%r9d, %edx
	jle	.L39
	movl	24(%rax), %ecx
	movq	144(%rax), %r10
	imull	%ecx, %edx
	movl	%ecx, %esi
	decl	%ecx
	imull	%r9d, %esi
	movslq	%ecx, %rcx
	salq	$3, %rcx
	imull	%r8d, %edx
	leal	1(%rsi,%rdx), %edi
	addl	%edx, %esi
	movq	104(%rax), %rdx
	movslq	%edi, %rdi
	movslq	%esi, %rsi
	leaq	(%r10,%rdi,8), %r10
	leaq	(%rdx,%rsi,8), %rsi
	movq	%r10, %rdi
	rep movsb
	movl	24(%rax), %edx
	movq	144(%rax), %rdi
	movl	%edx, %ecx
	imull	(%rax), %edx
	imull	%r9d, %ecx
	incl	%r9d
	imull	%r8d, %edx
	leal	1(%rcx,%rdx), %esi
	addl	%edx, %ecx
	movslq	%esi, %rsi
	movslq	%ecx, %rcx
	movsd	(%rdi,%rsi,8), %xmm0
	movsd	%xmm0, (%rdi,%rcx,8)
	jmp	.L13
.L39:
	incl	%r8d
	jmp	.L11
.L38:
	xorl	%esi, %esi
.L14:
	cmpl	%esi, %r9d
	jle	.L34
	movl	(%rax), %r10d
	xorl	%ecx, %ecx
.L19:
	cmpl	%ecx, %r10d
	jle	.L16
	movl	24(%rax), %edi
	movl	%r10d, %edx
	movl	%ecx, %r8d
	imull	%edi, %edx
	imull	%edi, %r8d
	imull	%esi, %edx
	movslq	%r8d, %r8
	movslq	%edx, %rdx
	addq	%r8, %rdx
	xorl	%r8d, %r8d
	salq	$3, %rdx
.L17:
	cmpl	%r8d, %edi
	jle	.L40
	movq	104(%rax), %rbx
	cvtsi2sdl	%edi, %xmm1
	movq	128(%rax), %r11
	incl	%r8d
	movsd	(%rbx,%rdx), %xmm0
	movq	144(%rax), %rbx
	subsd	(%rbx,%rdx), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, (%r11,%rdx)
	addq	$8, %rdx
	jmp	.L17
.L40:
	incl	%ecx
	jmp	.L19
.L16:
	incl	%esi
	jmp	.L14
.L34:
	xorl	%r8d, %r8d
.L18:
	movl	164(%rax), %ecx
	cmpl	%r8d, %ecx
	jle	.L41
	xorl	%r9d, %r9d
.L21:
	movl	(%rax), %edx
	cmpl	%r9d, %edx
	jle	.L42
	movl	24(%rax), %ecx
	movq	152(%rax), %r10
	imull	%ecx, %edx
	movl	%ecx, %esi
	decl	%ecx
	imull	%r9d, %esi
	movslq	%ecx, %rcx
	salq	$3, %rcx
	imull	%r8d, %edx
	leal	1(%rsi,%rdx), %edi
	addl	%edx, %esi
	movq	128(%rax), %rdx
	movslq	%edi, %rdi
	movslq	%esi, %rsi
	leaq	(%r10,%rdi,8), %r10
	leaq	(%rdx,%rsi,8), %rsi
	movq	%r10, %rdi
	rep movsb
	movl	24(%rax), %edx
	movq	152(%rax), %rdi
	movl	%edx, %ecx
	imull	(%rax), %edx
	imull	%r9d, %ecx
	incl	%r9d
	imull	%r8d, %edx
	leal	1(%rcx,%rdx), %esi
	addl	%edx, %ecx
	movslq	%esi, %rsi
	movslq	%ecx, %rcx
	movsd	(%rdi,%rsi,8), %xmm0
	movsd	%xmm0, (%rdi,%rcx,8)
	jmp	.L21
.L42:
	incl	%r8d
	jmp	.L18
.L41:
	xorl	%edi, %edi
.L22:
	cmpl	%edi, %ecx
	jle	.L36
	movl	(%rax), %r10d
	xorl	%esi, %esi
.L27:
	cmpl	%esi, %r10d
	jle	.L24
	movl	24(%rax), %r8d
	movl	%r10d, %edx
	movl	%esi, %r9d
	imull	%r8d, %edx
	imull	%r8d, %r9d
	imull	%edi, %edx
	movslq	%r9d, %r9
	movslq	%edx, %rdx
	addq	%r9, %rdx
	xorl	%r9d, %r9d
	salq	$3, %rdx
.L25:
	cmpl	%r9d, %r8d
	jle	.L43
	movq	128(%rax), %rbx
	cvtsi2sdl	%r8d, %xmm1
	movq	136(%rax), %r11
	incl	%r9d
	movsd	(%rbx,%rdx), %xmm0
	movq	152(%rax), %rbx
	subsd	(%rbx,%rdx), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, (%r11,%rdx)
	addq	$8, %rdx
	jmp	.L25
.L43:
	incl	%esi
	jmp	.L27
.L24:
	incl	%edi
	jmp	.L22
.L36:
	xorl	%edi, %edi
.L26:
	cmpl	%edi, %ecx
	jle	.L10
	movl	(%rax), %r10d
	xorl	%esi, %esi
.L32:
	cmpl	%esi, %r10d
	jle	.L29
	movl	24(%rax), %r9d
	movl	%r10d, %edx
	movl	%esi, %r8d
	imull	%r9d, %edx
	imull	%r9d, %r8d
	imull	%edi, %edx
	movslq	%r8d, %r8
	movslq	%edx, %rdx
	addq	%r8, %rdx
	xorl	%r8d, %r8d
	salq	$3, %rdx
.L30:
	cmpl	%r8d, %r9d
	jle	.L44
	movq	104(%rax), %r11
	movq	136(%rax), %rbx
	incl	%r8d
	movsd	(%rbx,%rdx), %xmm0
	mulsd	32(%rax), %xmm0
	addq	%rdx, %r11
	addq	$8, %rdx
	addsd	(%r11), %xmm0
	movsd	%xmm0, (%r11)
	jmp	.L30
.L44:
	incl	%esi
	jmp	.L32
.L29:
	incl	%edi
	jmp	.L26
.L10:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5327:
	.size	_ZN6TFcore16computeDiffusionEv, .-_ZN6TFcore16computeDiffusionEv
	.align 2
	.globl	_ZN6TFcore14computeProductEv
	.type	_ZN6TFcore14computeProductEv, @function
_ZN6TFcore14computeProductEv:
.LFB5328:
	.cfi_startproc
	endbr64
	movl	164(%rdi), %r10d
	movq	%rdi, %rdx
	xorl	%esi, %esi
.L53:
	cmpl	%esi, %r10d
	jle	.L61
	movl	(%rdx), %r9d
	xorl	%ecx, %ecx
	cmpl	%ecx, %r9d
	jg	.L59
	incl	%esi
	jmp	.L53
.L61:
	ret
.L59:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
.L54:
	movl	24(%rdx), %r8d
	movl	%r9d, %eax
	movl	%ecx, %edi
	imull	%r8d, %eax
	imull	%r8d, %edi
	imull	%esi, %eax
	movslq	%edi, %rdi
	cltq
	addq	%rdi, %rax
	xorl	%edi, %edi
	salq	$3, %rax
.L49:
	cmpl	%edi, %r8d
	jle	.L62
	movq	104(%rdx), %rbx
	movq	112(%rdx), %r11
	incl	%edi
	movsd	(%rbx,%rax), %xmm0
	movq	120(%rdx), %rbx
	mulsd	(%rbx,%rax), %xmm0
	movsd	%xmm0, (%r11,%rax)
	addq	$8, %rax
	jmp	.L49
.L62:
	incl	%ecx
.L51:
	cmpl	%ecx, %r9d
	jg	.L54
	incl	%esi
	cmpl	%esi, %r10d
	jle	.L45
	movl	(%rdx), %r9d
	xorl	%ecx, %ecx
	jmp	.L51
.L45:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5328:
	.size	_ZN6TFcore14computeProductEv, .-_ZN6TFcore14computeProductEv
	.align 2
	.globl	_ZN6TFcore17computeLikelihoodEPdS0_
	.type	_ZN6TFcore17computeLikelihoodEPdS0_, @function
_ZN6TFcore17computeLikelihoodEPdS0_:
.LFB5332:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdx, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdi, %rbx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movslq	24(%rdi), %r13
	movl	(%rdi), %r12d
	movq	%rsi, 32(%rsp)
	movl	$8, %esi
	movl	%r13d, %edi
	movq	%r13, %rbp
	imull	%r12d, %edi
	movslq	%edi, %rdi
	call	calloc@PLT
	xorl	%esi, %esi
	movq	%rax, 8(%rsp)
	leaq	0(,%r13,8), %rax
	movq	%rax, 24(%rsp)
.L64:
	movl	%esi, %edi
	cmpl	%esi, %ebp
	jle	.L68
	leaq	0(,%rsi,8), %r14
	xorl	%r13d, %r13d
.L69:
	leal	1(%rdi), %r8d
	cmpl	%r13d, %r12d
	jle	.L82
	cvtsi2sdl	%r8d, %xmm0
	movq	32(%rsp), %rax
	movl	%edi, 60(%rsp)
	cvtsi2sdl	%ebp, %xmm1
	movq	%rsi, 48(%rsp)
	divsd	%xmm1, %xmm0
	cvtsi2sdl	252(%rbx), %xmm1
	movsd	%xmm1, 40(%rsp)
	subsd	(%rax,%r13,8), %xmm0
	andps	.LC1(%rip), %xmm0
	movsd	%xmm0, 16(%rsp)
	movsd	(%r15,%r13,8), %xmm0
	call	sqrt@PLT
	movsd	40(%rsp), %xmm1
	movq	8(%rsp), %rax
	divsd	%xmm0, %xmm1
	movsd	16(%rsp), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, (%rax,%r14)
	andps	.LC1(%rip), %xmm0
	call	trunc@PLT
	movq	120(%rbx), %r9
	movq	48(%rsp), %rsi
	cvttsd2sil	%xmm0, %r8d
	cmpl	%r8d, 248(%rbx)
	movl	60(%rsp), %edi
	jle	.L65
	movq	256(%rbx), %r10
	movslq	%r8d, %r8
	movsd	(%r10,%r8,8), %xmm0
	movsd	%xmm0, (%r9,%r14)
	jmp	.L66
.L65:
	movq	.LC2(%rip), %rax
	movq	%rax, (%r9,%r14)
.L66:
	movq	24(%rsp), %rax
	incq	%r13
	addq	%rax, %r14
	jmp	.L69
.L82:
	incq	%rsi
	jmp	.L64
.L68:
	xorl	%edi, %edi
	xorl	%r8d, %r8d
.L70:
	cmpl	%r8d, %r12d
	jle	.L74
	movslq	%edi, %rax
	xorl	%ecx, %ecx
	xorps	%xmm0, %xmm0
	salq	$3, %rax
	movq	%rax, %rsi
.L75:
	cmpl	%ecx, %ebp
	jle	.L83
	movq	120(%rbx), %r9
	incl	%ecx
	addsd	(%r9,%rsi), %xmm0
	addq	$8, %rsi
	jmp	.L75
.L83:
	xorl	%ecx, %ecx
.L72:
	cmpl	%ecx, %ebp
	jle	.L84
	movq	120(%rbx), %rsi
	incl	%ecx
	addq	%rax, %rsi
	addq	$8, %rax
	movsd	(%rsi), %xmm1
	divsd	%xmm0, %xmm1
	movsd	%xmm1, (%rsi)
	jmp	.L72
.L84:
	incl	%r8d
	addl	%ebp, %edi
	jmp	.L70
.L74:
	cmpl	$1, 164(%rbx)
	movl	$1, %edx
	jg	.L76
.L78:
	movq	8(%rsp), %rdi
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	free@PLT
.L76:
	.cfi_restore_state
	cmpl	%edx, 164(%rbx)
	jle	.L78
	movl	24(%rbx), %ecx
	movl	(%rbx), %edi
	movq	120(%rbx), %rsi
	movl	%ecx, %eax
	imull	%edi, %ecx
	imull	%edx, %eax
	incl	%edx
	movslq	%ecx, %rcx
	imull	%edi, %eax
	salq	$3, %rcx
	cltq
	leaq	(%rsi,%rax,8), %rax
	movq	%rax, %rdi
	rep movsb
	jmp	.L76
	.cfi_endproc
.LFE5332:
	.size	_ZN6TFcore17computeLikelihoodEPdS0_, .-_ZN6TFcore17computeLikelihoodEPdS0_
	.align 2
	.globl	_ZN6TFcore15registerPatternEPdS0_
	.type	_ZN6TFcore15registerPatternEPdS0_, @function
_ZN6TFcore15registerPatternEPdS0_:
.LFB5333:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rdx, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdi, %rbx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movl	24(%rdi), %ebp
	movl	(%rdi), %r15d
	movq	%rsi, 8(%rsp)
	movl	$8, %esi
	movl	%ebp, %edi
	imull	%r15d, %edi
	movslq	%edi, %rdi
	call	calloc@PLT
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	movq	%rax, %rdi
.L86:
	cmpl	%ecx, %r15d
	jle	.L96
	movslq	%esi, %rax
	xorl	%r12d, %r12d
	leaq	(%rdi,%rax,8), %r14
.L91:
	cmpl	%r12d, %ebp
	jle	.L99
	leal	1(%r12), %eax
	leal	(%rsi,%r12), %r8d
	movq	%rdi, 40(%rsp)
	cvtsi2sdl	%eax, %xmm0
	movq	8(%rsp), %rax
	movl	%esi, 36(%rsp)
	cvtsi2sdl	%ebp, %xmm1
	movl	%r8d, 32(%rsp)
	movq	%rcx, 16(%rsp)
	divsd	%xmm1, %xmm0
	cvtsi2sdl	252(%rbx), %xmm1
	movsd	%xmm1, 24(%rsp)
	subsd	(%rax,%rcx,8), %xmm0
	andps	.LC1(%rip), %xmm0
	movsd	%xmm0, (%rsp)
	movsd	0(%r13,%rcx,8), %xmm0
	call	sqrt@PLT
	movsd	24(%rsp), %xmm1
	divsd	%xmm0, %xmm1
	movsd	(%rsp), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, (%r14,%r12,8)
	andps	.LC1(%rip), %xmm0
	call	trunc@PLT
	movq	112(%rbx), %r9
	movq	16(%rsp), %rcx
	cvttsd2sil	%xmm0, %eax
	cmpl	%eax, 248(%rbx)
	movl	32(%rsp), %r8d
	movl	36(%rsp), %esi
	movq	40(%rsp), %rdi
	jle	.L87
	movq	256(%rbx), %r10
	cltq
	movsd	(%r10,%rax,8), %xmm0
	movl	164(%rbx), %eax
	imull	%ebp, %eax
	imull	%r15d, %eax
	addl	%r8d, %eax
	cltq
	movsd	%xmm0, (%r9,%rax,8)
	jmp	.L88
.L87:
	movl	164(%rbx), %eax
	movq	.LC2(%rip), %rdx
	imull	%ebp, %eax
	imull	%r15d, %eax
	addl	%r8d, %eax
	cltq
	movq	%rdx, (%r9,%rax,8)
.L88:
	incq	%r12
	jmp	.L91
.L99:
	incq	%rcx
	addl	%ebp, %esi
	jmp	.L86
.L96:
	xorl	%edx, %edx
	xorl	%esi, %esi
.L90:
	cmpl	%esi, %r15d
	jle	.L100
	xorl	%ecx, %ecx
	xorps	%xmm0, %xmm0
.L95:
	cmpl	%ecx, %ebp
	jle	.L101
	movl	164(%rbx), %eax
	leal	(%rcx,%rdx), %r8d
	incl	%ecx
	imull	%ebp, %eax
	imull	%r15d, %eax
	addl	%r8d, %eax
	movq	112(%rbx), %r8
	cltq
	addsd	(%r8,%rax,8), %xmm0
	jmp	.L95
.L101:
	xorl	%ecx, %ecx
.L93:
	cmpl	%ecx, %ebp
	jle	.L102
	movl	164(%rbx), %eax
	leal	(%rcx,%rdx), %r8d
	incl	%ecx
	imull	%ebp, %eax
	imull	%r15d, %eax
	addl	%r8d, %eax
	movq	112(%rbx), %r8
	cltq
	leaq	(%r8,%rax,8), %rax
	movsd	(%rax), %xmm1
	divsd	%xmm0, %xmm1
	movsd	%xmm1, (%rax)
	jmp	.L93
.L102:
	incl	%esi
	addl	%ebp, %edx
	jmp	.L90
.L100:
	addq	$56, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	free@PLT
	.cfi_endproc
.LFE5333:
	.size	_ZN6TFcore15registerPatternEPdS0_, .-_ZN6TFcore15registerPatternEPdS0_
	.align 2
	.globl	_ZN6TFcore19normalizeLikelihoodEv
	.type	_ZN6TFcore19normalizeLikelihoodEv, @function
_ZN6TFcore19normalizeLikelihoodEv:
.LFB5334:
	.cfi_startproc
	endbr64
	movl	164(%rdi), %r11d
	movq	%rdi, %rdx
	xorl	%esi, %esi
.L113:
	cmpl	%esi, %r11d
	jle	.L121
	movl	(%rdx), %r10d
	xorl	%ecx, %ecx
	cmpl	%ecx, %r10d
	jg	.L119
	incl	%esi
	jmp	.L113
.L121:
	ret
.L119:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
.L114:
	movl	24(%rdx), %edi
	movl	%r10d, %eax
	movl	%ecx, %r8d
	xorps	%xmm0, %xmm0
	imull	%edi, %eax
	imull	%edi, %r8d
	imull	%esi, %eax
	movslq	%r8d, %r8
	cltq
	addq	%r8, %rax
	xorl	%r8d, %r8d
	salq	$3, %rax
	movq	%rax, %r9
.L109:
	cmpl	%r8d, %edi
	jle	.L122
	movq	120(%rdx), %rbx
	incl	%r8d
	addsd	(%rbx,%r9), %xmm0
	addq	$8, %r9
	jmp	.L109
.L122:
	xorl	%r8d, %r8d
.L106:
	cmpl	%r8d, %edi
	jle	.L123
	movq	120(%rdx), %r9
	incl	%r8d
	addq	%rax, %r9
	addq	$8, %rax
	movsd	(%r9), %xmm1
	divsd	%xmm0, %xmm1
	movsd	%xmm1, (%r9)
	jmp	.L106
.L123:
	incl	%ecx
.L111:
	cmpl	%ecx, %r10d
	jg	.L114
	incl	%esi
	cmpl	%esi, %r11d
	jle	.L103
	movl	(%rdx), %r10d
	xorl	%ecx, %ecx
	jmp	.L111
.L103:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5334:
	.size	_ZN6TFcore19normalizeLikelihoodEv, .-_ZN6TFcore19normalizeLikelihoodEv
	.align 2
	.globl	_ZN6TFcore14normalizePriorEv
	.type	_ZN6TFcore14normalizePriorEv, @function
_ZN6TFcore14normalizePriorEv:
.LFB5335:
	.cfi_startproc
	endbr64
	movl	164(%rdi), %r11d
	movq	%rdi, %rdx
	xorl	%esi, %esi
.L134:
	cmpl	%esi, %r11d
	jle	.L142
	movl	(%rdx), %r10d
	xorl	%ecx, %ecx
	cmpl	%ecx, %r10d
	jg	.L140
	incl	%esi
	jmp	.L134
.L142:
	ret
.L140:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
.L135:
	movl	24(%rdx), %edi
	movl	%r10d, %eax
	movl	%ecx, %r8d
	xorps	%xmm0, %xmm0
	imull	%edi, %eax
	imull	%edi, %r8d
	imull	%esi, %eax
	movslq	%r8d, %r8
	cltq
	addq	%r8, %rax
	xorl	%r8d, %r8d
	salq	$3, %rax
	movq	%rax, %r9
.L130:
	cmpl	%r8d, %edi
	jle	.L143
	movq	104(%rdx), %rbx
	incl	%r8d
	addsd	(%rbx,%r9), %xmm0
	addq	$8, %r9
	jmp	.L130
.L143:
	xorl	%r8d, %r8d
.L127:
	cmpl	%r8d, %edi
	jle	.L144
	movq	104(%rdx), %r9
	incl	%r8d
	addq	%rax, %r9
	addq	$8, %rax
	movsd	(%r9), %xmm1
	divsd	%xmm0, %xmm1
	movsd	%xmm1, (%r9)
	jmp	.L127
.L144:
	incl	%ecx
.L132:
	cmpl	%ecx, %r10d
	jg	.L135
	incl	%esi
	cmpl	%esi, %r11d
	jle	.L124
	movl	(%rdx), %r10d
	xorl	%ecx, %ecx
	jmp	.L132
.L124:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5335:
	.size	_ZN6TFcore14normalizePriorEv, .-_ZN6TFcore14normalizePriorEv
	.align 2
	.globl	_ZN6TFcore13normalizePostEv
	.type	_ZN6TFcore13normalizePostEv, @function
_ZN6TFcore13normalizePostEv:
.LFB5336:
	.cfi_startproc
	endbr64
	movl	164(%rdi), %r11d
	movq	%rdi, %rdx
	xorl	%esi, %esi
.L155:
	cmpl	%esi, %r11d
	jle	.L163
	movl	(%rdx), %r10d
	xorl	%ecx, %ecx
	cmpl	%ecx, %r10d
	jg	.L161
	incl	%esi
	jmp	.L155
.L163:
	ret
.L161:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
.L156:
	movl	24(%rdx), %edi
	movl	%r10d, %eax
	movl	%ecx, %r8d
	xorps	%xmm0, %xmm0
	imull	%edi, %eax
	imull	%edi, %r8d
	imull	%esi, %eax
	movslq	%r8d, %r8
	cltq
	addq	%r8, %rax
	xorl	%r8d, %r8d
	salq	$3, %rax
	movq	%rax, %r9
.L151:
	cmpl	%r8d, %edi
	jle	.L164
	movq	112(%rdx), %rbx
	incl	%r8d
	addsd	(%rbx,%r9), %xmm0
	addq	$8, %r9
	jmp	.L151
.L164:
	xorl	%r8d, %r8d
.L148:
	cmpl	%r8d, %edi
	jle	.L165
	movq	112(%rdx), %r9
	incl	%r8d
	addq	%rax, %r9
	addq	$8, %rax
	movsd	(%r9), %xmm1
	divsd	%xmm0, %xmm1
	movsd	%xmm1, (%r9)
	jmp	.L148
.L165:
	incl	%ecx
.L153:
	cmpl	%ecx, %r10d
	jg	.L156
	incl	%esi
	cmpl	%esi, %r11d
	jle	.L145
	movl	(%rdx), %r10d
	xorl	%ecx, %ecx
	jmp	.L153
.L145:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5336:
	.size	_ZN6TFcore13normalizePostEv, .-_ZN6TFcore13normalizePostEv
	.align 2
	.globl	_ZN6TFcore15constructLookupEv
	.type	_ZN6TFcore15constructLookupEv, @function
_ZN6TFcore15constructLookupEv:
.LFB5337:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	xorl	%ebx, %ebx
	pushq	%rdx
	.cfi_def_cfa_offset 32
.L167:
	cmpl	%ebx, 248(%rbp)
	jle	.L170
	cvtsi2sdl	252(%rbp), %xmm0
	cvtsi2sdl	%ebx, %xmm1
	divsd	%xmm0, %xmm1
	movsd	.LC3(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	mulsd	%xmm1, %xmm0
	call	exp@PLT
	mulsd	.LC4(%rip), %xmm0
	movq	256(%rbp), %rax
	movsd	%xmm0, (%rax,%rbx,8)
	incq	%rbx
	jmp	.L167
.L170:
	popq	%rax
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5337:
	.size	_ZN6TFcore15constructLookupEv, .-_ZN6TFcore15constructLookupEv
	.align 2
	.globl	_ZN6TFcore6setValEPdd
	.type	_ZN6TFcore6setValEPdd, @function
_ZN6TFcore6setValEPdd:
.LFB5338:
	.cfi_startproc
	endbr64
	movl	(%rdi), %edx
	xorl	%eax, %eax
.L172:
	cmpl	%eax, %edx
	jle	.L174
	movsd	%xmm0, (%rsi,%rax,8)
	incq	%rax
	jmp	.L172
.L174:
	ret
	.cfi_endproc
.LFE5338:
	.size	_ZN6TFcore6setValEPdd, .-_ZN6TFcore6setValEPdd
	.align 2
	.globl	_ZN6TFcore7setZeroEPd
	.type	_ZN6TFcore7setZeroEPd, @function
_ZN6TFcore7setZeroEPd:
.LFB5339:
	.cfi_startproc
	endbr64
	xorps	%xmm0, %xmm0
	jmp	_ZN6TFcore6setValEPdd
	.cfi_endproc
.LFE5339:
	.size	_ZN6TFcore7setZeroEPd, .-_ZN6TFcore7setZeroEPd
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC14:
	.string	"output.csv"
	.text
	.align 2
	.globl	_ZN6TFcore9initModelEi
	.type	_ZN6TFcore9initModelEi, @function
_ZN6TFcore9initModelEi:
.LFB5321:
	.cfi_startproc
	endbr64
	movabsq	$4398046511232, %rax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%edx, %edx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movslq	%esi, %r12
	movl	$8, %esi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdi, %rbx
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%rax, 24(%rdi)
	movl	$1, %eax
	salq	$43, %rax
	movl	%edx, 96(%rdi)
	movq	$1, 164(%rdi)
	movw	$256, 100(%rdi)
	movb	$1, 102(%rdi)
	movq	%rax, 8(%rdi)
	movl	%r12d, (%rdi)
	movq	%r12, %rdi
	call	calloc@PLT
	movl	$8, %esi
	movq	%r12, %rdi
	movq	%rax, 64(%rbx)
	movq	%rax, 32(%rsp)
	call	calloc@PLT
	movl	$8, %esi
	movq	%r12, %rdi
	movq	%rax, 72(%rbx)
	movq	%rax, 40(%rsp)
	call	calloc@PLT
	movl	$8, %esi
	movq	%r12, %rdi
	movq	%rax, 80(%rbx)
	movq	%rax, 48(%rsp)
	call	calloc@PLT
	movl	$8, %esi
	movq	%r12, %rdi
	movq	%rax, 88(%rbx)
	movq	%rax, 56(%rsp)
	call	calloc@PLT
	movl	$8, %esi
	movq	%r12, %rdi
	movq	%rax, 208(%rbx)
	movq	%rax, 64(%rsp)
	call	calloc@PLT
	movl	$4, %esi
	movq	%r12, %rdi
	movq	%rax, 192(%rbx)
	call	calloc@PLT
	movl	$8, %esi
	movl	$128, %edi
	movq	%rax, 200(%rbx)
	call	calloc@PLT
	movsd	.LC5(%rip), %xmm1
	movl	$1, %edx
	movq	%rax, 184(%rbx)
.L177:
	cvtsi2sdl	%edx, %xmm0
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -8(%rax,%rdx,8)
	incq	%rdx
	cmpq	$129, %rdx
	jne	.L177
	movl	%ebp, %edi
	movl	$8, %esi
	movl	%ebp, %r12d
	sall	$10, %edi
	sall	$18, %r12d
	movslq	%edi, %rdi
	movslq	%r12d, %r12
	call	calloc@PLT
	movl	$8, %esi
	movl	$10000, %edi
	movq	%rax, 216(%rbx)
	movabsq	$4294967306000, %rax
	movq	%rax, 248(%rbx)
	call	calloc@PLT
	movq	%rbx, %rdi
	movq	%rax, 256(%rbx)
	call	_ZN6TFcore15constructLookupEv
	movq	%r12, %rdi
	movl	$8, %esi
	call	calloc@PLT
	movq	%r12, %rdi
	movl	$8, %esi
	movq	%rax, 104(%rbx)
	movq	%rax, %r13
	call	calloc@PLT
	movq	%r12, %rdi
	movl	$8, %esi
	movq	%rax, 112(%rbx)
	movq	%rax, %r14
	call	calloc@PLT
	movq	%r12, %rdi
	movl	$8, %esi
	movq	%rax, 120(%rbx)
	movq	%rax, %r15
	call	calloc@PLT
	movq	%r12, %rdi
	movl	$8, %esi
	movq	%rax, 128(%rbx)
	movq	%rax, 8(%rsp)
	call	calloc@PLT
	movq	%r12, %rdi
	movl	$8, %esi
	movq	%rax, 136(%rbx)
	movq	%rax, 16(%rsp)
	call	calloc@PLT
	movq	%r12, %rdi
	movl	$8, %esi
	movq	%rax, 144(%rbx)
	movq	%rax, 24(%rsp)
	call	calloc@PLT
	movl	$8, %esi
	movl	$2048, %edi
	movq	%rax, 152(%rbx)
	movq	%rax, %r12
	call	calloc@PLT
	movsd	.LC6(%rip), %xmm0
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%rax, 56(%rbx)
	movq	%rax, %r10
	movl	%ebp, %eax
	movsd	.LC5(%rip), %xmm1
	sall	$7, %eax
	movl	%eax, 76(%rsp)
	xorl	%eax, %eax
.L180:
	movslq	%r9d, %rdx
	movsd	%xmm0, (%r10,%r8,8)
	xorl	%esi, %esi
	salq	$3, %rdx
.L178:
	cmpl	%ebp, %esi
	jge	.L191
	movq	%rdx, %rcx
	xorl	%edi, %edi
.L179:
	movq	24(%rsp), %r11
	incl	%edi
	movsd	%xmm0, 0(%r13,%rcx)
	movsd	%xmm0, (%r14,%rcx)
	movsd	%xmm0, (%r15,%rcx)
	movsd	%xmm1, (%r11,%rcx)
	addq	$8, %rcx
	cmpl	$128, %edi
	jne	.L179
	leaq	(%r12,%rdx), %r11
	movl	$256, %ecx
	incl	%esi
	movq	%r11, %rdi
	rep stosl
	movq	16(%rsp), %rcx
	leaq	(%rcx,%rdx), %r11
	movl	$256, %ecx
	movq	%r11, %rdi
	rep stosl
	movq	8(%rsp), %rcx
	leaq	(%rcx,%rdx), %r11
	movl	$256, %ecx
	addq	$1024, %rdx
	movq	%r11, %rdi
	rep stosl
	jmp	.L178
.L191:
	movl	76(%rsp), %edx
	incq	%r8
	addl	%edx, %r9d
	cmpq	$2048, %r8
	jne	.L180
	movq	.LC7(%rip), %rax
	movsd	.LC10(%rip), %xmm0
	movq	%rbx, %rdi
	movl	$512, 172(%rbx)
	movq	32(%rsp), %rsi
	movq	%rax, 16(%rbx)
	movq	.LC2(%rip), %rax
	movq	%rax, 32(%rbx)
	movq	.LC8(%rip), %rax
	movq	%rax, 40(%rbx)
	movq	.LC9(%rip), %rax
	movq	%rax, 48(%rbx)
	call	_ZN6TFcore6setValEPdd
	movsd	.LC11(%rip), %xmm0
	movq	40(%rsp), %rsi
	call	_ZN6TFcore6setValEPdd
	movsd	.LC12(%rip), %xmm0
	movq	48(%rsp), %rsi
	call	_ZN6TFcore6setValEPdd
	movsd	.LC13(%rip), %xmm0
	movq	56(%rsp), %rsi
	call	_ZN6TFcore6setValEPdd
	movq	64(%rsp), %rsi
	call	_ZN6TFcore7setZeroEPd
	movsd	.LC5(%rip), %xmm0
	xorl	%edx, %edx
	xorl	%esi, %esi
.L181:
	cmpl	%ebp, %esi
	jge	.L192
	movq	%rdx, %rcx
	movl	$128, %eax
.L182:
	movq	24(%rsp), %rdi
	movsd	%xmm0, 0(%r13,%rcx)
	movsd	%xmm0, (%r14,%rcx)
	movsd	%xmm0, (%r15,%rcx)
	movsd	%xmm0, (%rdi,%rcx)
	movsd	%xmm0, (%r12,%rcx)
	addq	$8, %rcx
	decl	%eax
	jne	.L182
	movq	16(%rsp), %rcx
	incl	%esi
	leaq	(%rcx,%rdx), %r11
	movl	$256, %ecx
	movq	%r11, %rdi
	rep stosl
	movq	8(%rsp), %rcx
	leaq	(%rcx,%rdx), %r11
	movl	$256, %ecx
	addq	$1024, %rdx
	movq	%r11, %rdi
	rep stosl
	jmp	.L181
.L192:
	xorl	%eax, %eax
	leaq	976(%rbx), %rdi
	movq	%rax, 264(%rbx)
	movq	%rax, 272(%rbx)
	movq	%rax, 280(%rbx)
	movq	%rax, 288(%rbx)
	movq	%rax, 296(%rbx)
	movq	%rax, 304(%rbx)
	movq	%rax, 312(%rbx)
	call	_ZNKSt12__basic_fileIcE7is_openEv@PLT
	testb	%al, %al
	jne	.L176
	addq	$88, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	leaq	848(%rbx), %rdi
	movl	$16, %edx
	popq	%rbx
	.cfi_def_cfa_offset 48
	leaq	.LC14(%rip), %rsi
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	_ZNSt13basic_fstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode@PLT
.L176:
	.cfi_restore_state
	addq	$88, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5321:
	.size	_ZN6TFcore9initModelEi, .-_ZN6TFcore9initModelEi
	.align 2
	.globl	_ZN6TFcore7setOnesEPd
	.type	_ZN6TFcore7setOnesEPd, @function
_ZN6TFcore7setOnesEPd:
.LFB5340:
	.cfi_startproc
	endbr64
	movsd	.LC15(%rip), %xmm0
	jmp	_ZN6TFcore6setValEPdd
	.cfi_endproc
.LFE5340:
	.size	_ZN6TFcore7setOnesEPd, .-_ZN6TFcore7setOnesEPd
	.globl	_Z41__device_stub__Z16_computeGradientPdS_S_iPdS_S_i
	.type	_Z41__device_stub__Z16_computeGradientPdS_S_iPdS_S_i, @function
_Z41__device_stub__Z16_computeGradientPdS_S_iPdS_S_i:
.LFB5365:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	56(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	68(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	40(%rsp), %rdx
	movl	%ecx, 4(%rsp)
	leaq	48(%rsp), %rcx
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 64(%rsp)
	movq	%rax, 104(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 56(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L194
	pushq	48(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z16_computeGradientPdS_S_i(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L194:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L196
	call	__stack_chk_fail@PLT
.L196:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5365:
	.size	_Z41__device_stub__Z16_computeGradientPdS_S_iPdS_S_i, .-_Z41__device_stub__Z16_computeGradientPdS_S_iPdS_S_i
	.globl	_Z16_computeGradientPdS_S_i
	.type	_Z16_computeGradientPdS_S_i, @function
_Z16_computeGradientPdS_S_i:
.LFB5366:
	.cfi_startproc
	endbr64
	jmp	_Z41__device_stub__Z16_computeGradientPdS_S_iPdS_S_i
	.cfi_endproc
.LFE5366:
	.size	_Z16_computeGradientPdS_S_i, .-_Z16_computeGradientPdS_S_i
	.globl	_Z42__device_stub__Z19_computeWeightedSumPdS_dPdS_d
	.type	_Z42__device_stub__Z19_computeWeightedSumPdS_dPdS_d, @function
_Z42__device_stub__Z19_computeWeightedSumPdS_dPdS_d:
.LFB5367:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	32(%rsp), %rdx
	movq	%rsi, 16(%rsp)
	leaq	48(%rsp), %rdi
	leaq	60(%rsp), %rsi
	movsd	%xmm0, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L199
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z19_computeWeightedSumPdS_d(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L199:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L201
	call	__stack_chk_fail@PLT
.L201:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5367:
	.size	_Z42__device_stub__Z19_computeWeightedSumPdS_dPdS_d, .-_Z42__device_stub__Z19_computeWeightedSumPdS_dPdS_d
	.globl	_Z19_computeWeightedSumPdS_d
	.type	_Z19_computeWeightedSumPdS_d, @function
_Z19_computeWeightedSumPdS_d:
.LFB5368:
	.cfi_startproc
	endbr64
	jmp	_Z42__device_stub__Z19_computeWeightedSumPdS_dPdS_d
	.cfi_endproc
.LFE5368:
	.size	_Z19_computeWeightedSumPdS_d, .-_Z19_computeWeightedSumPdS_d
	.globl	_Z39__device_stub__Z15_computeProductPdS_S_PdS_S_
	.type	_Z39__device_stub__Z15_computeProductPdS_S_PdS_S_, @function
_Z39__device_stub__Z15_computeProductPdS_S_PdS_S_:
.LFB5369:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	32(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L204
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z15_computeProductPdS_S_(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L204:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L206
	call	__stack_chk_fail@PLT
.L206:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5369:
	.size	_Z39__device_stub__Z15_computeProductPdS_S_PdS_S_, .-_Z39__device_stub__Z15_computeProductPdS_S_PdS_S_
	.globl	_Z15_computeProductPdS_S_
	.type	_Z15_computeProductPdS_S_, @function
_Z15_computeProductPdS_S_:
.LFB5370:
	.cfi_startproc
	endbr64
	jmp	_Z39__device_stub__Z15_computeProductPdS_S_PdS_S_
	.cfi_endproc
.LFE5370:
	.size	_Z15_computeProductPdS_S_, .-_Z15_computeProductPdS_S_
	.align 2
	.globl	_ZN6TFcore16proceedIterationEv
	.type	_ZN6TFcore16proceedIterationEv, @function
_ZN6TFcore16proceedIterationEv:
.LFB5323:
	.cfi_startproc
	endbr64
	cmpb	$0, 96(%rdi)
	je	.L247
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rdi, %rbx
	subq	$48, %rsp
	.cfi_def_cfa_offset 96
	movl	28(%rdi), %eax
	addl	%eax, %eax
	cmpl	%eax, 8(%rdi)
	jle	.L209
	movq	.LC16(%rip), %rax
	xorl	%edx, %edx
	movb	$0, 98(%rdi)
	xorl	%ebp, %ebp
	incl	168(%rdi)
	movq	%rax, 176(%rdi)
	movl	%edx, 160(%rdi)
.L211:
	movl	(%rbx), %eax
	cmpl	%ebp, %eax
	jle	.L250
	movq	208(%rbx), %rax
	movsd	.LC15(%rip), %xmm0
	divsd	16(%rbx), %xmm0
	movsd	.LC15(%rip), %xmm1
	mulsd	(%rax,%rbp,8), %xmm0
	call	fmin@PLT
	cvtsi2sdl	24(%rbx), %xmm1
	movq	192(%rbx), %rax
	movsd	%xmm0, (%rax,%rbp,8)
	mulsd	%xmm1, %xmm0
	call	floor@PLT
	movq	200(%rbx), %rax
	cvttsd2sil	%xmm0, %ecx
	leaq	(%rax,%rbp,4), %rdx
	movl	%ecx, (%rdx)
	movl	24(%rbx), %eax
	cmpl	%eax, %ecx
	jl	.L212
	decl	%eax
	movl	%eax, (%rdx)
.L212:
	incq	%rbp
	jmp	.L211
.L250:
	cmpb	$0, 102(%rbx)
	jne	.L214
.L237:
	cmpb	$0, 101(%rbx)
	jne	.L215
	jmp	.L216
.L214:
	cmpb	$0, 100(%rbx)
	je	.L217
	movl	164(%rbx), %esi
	imull	24(%rbx), %esi
	leaq	264(%rbx), %rdi
	imull	%eax, %esi
	movslq	%esi, %rsi
	salq	$3, %rsi
	call	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	movl	164(%rbx), %esi
	imull	24(%rbx), %esi
	leaq	288(%rbx), %rdi
	imull	(%rbx), %esi
	movslq	%esi, %rsi
	salq	$3, %rsi
	call	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	movl	164(%rbx), %esi
	imull	24(%rbx), %esi
	leaq	296(%rbx), %rdi
	imull	(%rbx), %esi
	movslq	%esi, %rsi
	salq	$3, %rsi
	call	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	movl	164(%rbx), %esi
	imull	24(%rbx), %esi
	leaq	304(%rbx), %rdi
	imull	(%rbx), %esi
	movslq	%esi, %rsi
	salq	$3, %rsi
	call	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	movl	164(%rbx), %esi
	imull	24(%rbx), %esi
	leaq	312(%rbx), %rdi
	imull	(%rbx), %esi
	movslq	%esi, %rsi
	salq	$3, %rsi
	call	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	xorl	%r8d, %r8d
.L218:
	movl	164(%rbx), %edx
	cmpl	%r8d, %edx
	jle	.L251
	xorl	%edx, %edx
.L220:
	movl	(%rbx), %eax
	movl	24(%rbx), %ecx
	movq	104(%rbx), %rdi
	cmpl	%edx, %eax
	jle	.L252
	imull	%ecx, %eax
	movl	%edx, %esi
	movq	144(%rbx), %r10
	imull	%ecx, %esi
	decl	%ecx
	movslq	%ecx, %rcx
	imull	%r8d, %eax
	salq	$3, %rcx
	leal	1(%rsi,%rax), %r9d
	addl	%eax, %esi
	movslq	%r9d, %r9
	movslq	%esi, %rsi
	leaq	(%r10,%r9,8), %r9
	leaq	(%rdi,%rsi,8), %rsi
	movq	%r9, %rdi
	rep movsb
	movl	24(%rbx), %eax
	movq	144(%rbx), %rdi
	movl	%eax, %ecx
	imull	(%rbx), %eax
	imull	%edx, %ecx
	incl	%edx
	imull	%r8d, %eax
	leal	1(%rcx,%rax), %esi
	addl	%eax, %ecx
	movslq	%esi, %rsi
	movslq	%ecx, %rcx
	movsd	(%rdi,%rsi,8), %xmm0
	movsd	%xmm0, (%rdi,%rcx,8)
	jmp	.L220
.L252:
	incl	%r8d
	jmp	.L218
.L251:
	imull	24(%rbx), %edx
	movq	104(%rbx), %rsi
	movl	$1, %ecx
	imull	(%rbx), %edx
	movq	264(%rbx), %rdi
	movslq	%edx, %rdx
	salq	$3, %rdx
	call	cudaMemcpy@PLT
	movl	164(%rbx), %edx
	imull	24(%rbx), %edx
	movl	$1, %ecx
	imull	(%rbx), %edx
	movq	144(%rbx), %rsi
	movq	288(%rbx), %rdi
	movslq	%edx, %rdx
	salq	$3, %rdx
	call	cudaMemcpy@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$1, %esi
	movl	164(%rbx), %eax
	imull	24(%rbx), %eax
	movabsq	$4294967297, %rdi
	movl	$1, 32(%rsp)
	imull	(%rbx), %eax
	movq	%rdi, 40(%rsp)
	movl	44(%rsp), %ecx
	movq	%rdi, 24(%rsp)
	movl	%eax, 36(%rsp)
	movq	36(%rsp), %rdx
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L221
	movl	24(%rbx), %ecx
	movq	304(%rbx), %rdx
	movq	288(%rbx), %rsi
	movq	264(%rbx), %rdi
	call	_Z41__device_stub__Z16_computeGradientPdS_S_iPdS_S_i
.L221:
	movl	164(%rbx), %edx
	imull	24(%rbx), %edx
	movl	$2, %ecx
	imull	(%rbx), %edx
	movq	304(%rbx), %rsi
	movq	128(%rbx), %rdi
	movslq	%edx, %rdx
	salq	$3, %rdx
	call	cudaMemcpy@PLT
	xorl	%r8d, %r8d
.L222:
	movl	164(%rbx), %edx
	cmpl	%r8d, %edx
	jle	.L253
	xorl	%edx, %edx
.L224:
	movl	(%rbx), %eax
	movl	24(%rbx), %ecx
	movq	152(%rbx), %r9
	cmpl	%edx, %eax
	jle	.L254
	imull	%ecx, %eax
	movl	%edx, %esi
	imull	%ecx, %esi
	decl	%ecx
	movslq	%ecx, %rcx
	imull	%r8d, %eax
	salq	$3, %rcx
	leal	1(%rsi,%rax), %edi
	addl	%eax, %esi
	movq	128(%rbx), %rax
	movslq	%edi, %rdi
	movslq	%esi, %rsi
	leaq	(%r9,%rdi,8), %r9
	leaq	(%rax,%rsi,8), %rsi
	movq	%r9, %rdi
	rep movsb
	movl	24(%rbx), %eax
	movq	152(%rbx), %rdi
	movl	%eax, %ecx
	imull	(%rbx), %eax
	imull	%edx, %ecx
	incl	%edx
	imull	%r8d, %eax
	leal	1(%rcx,%rax), %esi
	addl	%eax, %ecx
	movslq	%esi, %rsi
	movslq	%ecx, %rcx
	movsd	(%rdi,%rsi,8), %xmm0
	movsd	%xmm0, (%rdi,%rcx,8)
	jmp	.L224
.L254:
	incl	%r8d
	jmp	.L222
.L253:
	imull	24(%rbx), %edx
	movq	152(%rbx), %rsi
	movl	$1, %ecx
	imull	(%rbx), %edx
	movq	296(%rbx), %rdi
	movslq	%edx, %rdx
	salq	$3, %rdx
	call	cudaMemcpy@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$1, %esi
	movl	164(%rbx), %eax
	imull	24(%rbx), %eax
	movabsq	$4294967297, %rdi
	movl	$1, 32(%rsp)
	imull	(%rbx), %eax
	movq	%rdi, 40(%rsp)
	movl	44(%rsp), %ecx
	movq	%rdi, 24(%rsp)
	movl	%eax, 36(%rsp)
	movq	36(%rsp), %rdx
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L225
	movl	24(%rbx), %ecx
	movq	312(%rbx), %rdx
	movq	296(%rbx), %rsi
	movq	304(%rbx), %rdi
	call	_Z41__device_stub__Z16_computeGradientPdS_S_iPdS_S_i
.L225:
	movl	164(%rbx), %edx
	imull	24(%rbx), %edx
	movl	$2, %ecx
	imull	(%rbx), %edx
	movq	312(%rbx), %rsi
	movq	136(%rbx), %rdi
	movslq	%edx, %rdx
	salq	$3, %rdx
	call	cudaMemcpy@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$1, %esi
	movl	164(%rbx), %eax
	imull	24(%rbx), %eax
	movabsq	$4294967297, %rdi
	movl	$1, 32(%rsp)
	imull	(%rbx), %eax
	movq	%rdi, 40(%rsp)
	movl	44(%rsp), %ecx
	movq	%rdi, 24(%rsp)
	movl	%eax, 36(%rsp)
	movq	36(%rsp), %rdx
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L226
	movsd	32(%rbx), %xmm0
	movq	312(%rbx), %rsi
	movq	264(%rbx), %rdi
	call	_Z42__device_stub__Z19_computeWeightedSumPdS_dPdS_d
.L226:
	movl	164(%rbx), %edx
	imull	24(%rbx), %edx
	movl	$2, %ecx
	imull	(%rbx), %edx
	movq	264(%rbx), %rsi
	movq	104(%rbx), %rdi
	movslq	%edx, %rdx
	salq	$3, %rdx
	call	cudaMemcpy@PLT
	movq	264(%rbx), %rdi
	call	cudaFree@PLT
	movq	288(%rbx), %rdi
	call	cudaFree@PLT
	movq	296(%rbx), %rdi
	call	cudaFree@PLT
	movq	304(%rbx), %rdi
	call	cudaFree@PLT
	movq	312(%rbx), %rdi
	call	cudaFree@PLT
	jmp	.L227
.L217:
	movq	%rbx, %rdi
	call	_ZN6TFcore16computeDiffusionEv
.L227:
	movq	%rbx, %rdi
	call	_ZN6TFcore14normalizePriorEv
	movq	88(%rbx), %rdx
	movq	192(%rbx), %rsi
	movq	%rbx, %rdi
	call	_ZN6TFcore17computeLikelihoodEPdS0_
	cmpb	$0, 99(%rbx)
	je	.L228
	movl	164(%rbx), %esi
	imull	24(%rbx), %esi
	leaq	264(%rbx), %rdi
	imull	(%rbx), %esi
	movslq	%esi, %rsi
	salq	$3, %rsi
	call	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	movl	164(%rbx), %esi
	imull	24(%rbx), %esi
	leaq	272(%rbx), %rdi
	imull	(%rbx), %esi
	movslq	%esi, %rsi
	salq	$3, %rsi
	call	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	movl	164(%rbx), %esi
	imull	24(%rbx), %esi
	leaq	280(%rbx), %rdi
	imull	(%rbx), %esi
	movslq	%esi, %rsi
	salq	$3, %rsi
	call	_Z10cudaMallocIdE9cudaErrorPPT_m.isra.0
	movl	164(%rbx), %edx
	imull	24(%rbx), %edx
	movl	$1, %ecx
	imull	(%rbx), %edx
	movq	104(%rbx), %rsi
	movq	264(%rbx), %rdi
	movslq	%edx, %rdx
	salq	$3, %rdx
	call	cudaMemcpy@PLT
	movl	164(%rbx), %edx
	imull	24(%rbx), %edx
	movl	$1, %ecx
	imull	(%rbx), %edx
	movq	120(%rbx), %rsi
	movq	272(%rbx), %rdi
	movslq	%edx, %rdx
	salq	$3, %rdx
	call	cudaMemcpy@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$1, %ecx
	movl	164(%rbx), %eax
	imull	24(%rbx), %eax
	movabsq	$4294967297, %rdx
	movl	$1, 44(%rsp)
	imull	(%rbx), %eax
	movq	%rdx, 28(%rsp)
	movl	32(%rsp), %esi
	movq	%rdx, 36(%rsp)
	movl	%eax, 24(%rsp)
	movq	24(%rsp), %rdi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L229
	movq	280(%rbx), %rdx
	movq	272(%rbx), %rsi
	movq	264(%rbx), %rdi
	call	_Z39__device_stub__Z15_computeProductPdS_S_PdS_S_
.L229:
	movl	164(%rbx), %edx
	imull	24(%rbx), %edx
	movl	$2, %ecx
	imull	(%rbx), %edx
	movq	280(%rbx), %rsi
	movq	112(%rbx), %rdi
	movslq	%edx, %rdx
	salq	$3, %rdx
	call	cudaMemcpy@PLT
	movq	264(%rbx), %rdi
	call	cudaFree@PLT
	movq	272(%rbx), %rdi
	call	cudaFree@PLT
	movq	280(%rbx), %rdi
	call	cudaFree@PLT
	jmp	.L230
.L228:
	movq	%rbx, %rdi
	call	_ZN6TFcore14computeProductEv
.L230:
	movq	%rbx, %rdi
	xorl	%ebp, %ebp
	call	_ZN6TFcore13normalizePostEv
.L231:
	movl	%ebp, %r13d
	cmpl	%ebp, 164(%rbx)
	jle	.L237
	movq	56(%rbx), %rax
	xorl	%r12d, %r12d
	xorps	%xmm1, %xmm1
	leaq	(%rax,%rbp,8), %r14
.L232:
	movl	(%rbx), %edx
	movsd	%xmm1, (%r14)
	cmpl	%r12d, %edx
	jle	.L255
	imull	%r13d, %edx
	movl	24(%rbx), %ecx
	movq	200(%rbx), %rsi
	movsd	%xmm1, 8(%rsp)
	movl	%ecx, %eax
	imull	%ecx, %edx
	imull	%r12d, %eax
	addl	(%rsi,%r12,4), %eax
	incq	%r12
	addl	%edx, %eax
	movq	112(%rbx), %rdx
	cltq
	movsd	(%rdx,%rax,8), %xmm0
	call	log10@PLT
	movsd	8(%rsp), %xmm1
	addsd	%xmm0, %xmm1
	jmp	.L232
.L255:
	comisd	176(%rbx), %xmm1
	jbe	.L234
	movl	%r13d, 160(%rbx)
	movsd	%xmm1, 176(%rbx)
.L234:
	incq	%rbp
	jmp	.L231
.L215:
	movsd	48(%rbx), %xmm0
	comisd	176(%rbx), %xmm0
	jbe	.L238
	movl	172(%rbx), %eax
	cmpl	%eax, 168(%rbx)
	jle	.L238
	movl	28(%rbx), %eax
	addl	%eax, %eax
	cmpl	%eax, 8(%rbx)
	jle	.L238
	movq	80(%rbx), %rdx
	movq	192(%rbx), %rsi
	movq	%rbx, %rdi
	xorl	%r12d, %r12d
	call	_ZN6TFcore15registerPatternEPdS0_
	movslq	164(%rbx), %rdx
	movq	56(%rbx), %rax
	xorps	%xmm1, %xmm1
	movq	%rdx, %rbp
	leaq	(%rax,%rdx,8), %r13
.L240:
	movl	(%rbx), %edx
	movq	112(%rbx), %rsi
	movsd	%xmm1, 0(%r13)
	movl	24(%rbx), %ecx
	cmpl	%r12d, %edx
	jle	.L256
	imull	%ebp, %edx
	movq	200(%rbx), %rdi
	movl	%ecx, %eax
	movsd	%xmm1, 8(%rsp)
	imull	%r12d, %eax
	addl	(%rdi,%r12,4), %eax
	incq	%r12
	imull	%ecx, %edx
	addl	%edx, %eax
	cltq
	movsd	(%rsi,%rax,8), %xmm0
	call	log10@PLT
	movsd	8(%rsp), %xmm1
	addsd	%xmm0, %xmm1
	jmp	.L240
.L256:
	movl	%ebp, 160(%rbx)
	xorl	%eax, %eax
	incl	%ebp
	movl	%ebp, 164(%rbx)
	movl	%eax, 168(%rbx)
	movb	$1, 98(%rbx)
	movsd	%xmm1, 176(%rbx)
.L238:
	movl	24(%rbx), %ecx
	movl	160(%rbx), %esi
	movl	(%rbx), %edx
	movq	104(%rbx), %rax
	imull	%ecx, %esi
	imull	%edx, %ecx
	imull	%edx, %esi
	movslq	%ecx, %rcx
	salq	$3, %rcx
	movslq	%esi, %rsi
	salq	$3, %rsi
	addq	%rsi, %rax
	addq	112(%rbx), %rsi
	movq	%rax, %rdi
	rep movsb
.L216:
	movw	$256, 96(%rbx)
.L209:
	addq	$48, %rsp
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L247:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	ret
	.cfi_endproc
.LFE5323:
	.size	_ZN6TFcore16proceedIterationEv, .-_ZN6TFcore16proceedIterationEv
	.section	.rodata.str1.1
.LC17:
	.string	"_Z15_computeProductPdS_S_"
.LC18:
	.string	"_Z19_computeWeightedSumPdS_d"
.LC19:
	.string	"_Z16_computeGradientPdS_S_i"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB5372:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	pushq	$0
	.cfi_def_cfa_offset 24
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC17(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z15_computeProductPdS_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	.LC18(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z19_computeWeightedSumPdS_d(%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	.LC19(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z16_computeGradientPdS_S_i(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE5372:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.text._ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev,"axG",@progbits,_ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD5Ev,comdat
	.align 2
	.weak	_ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.type	_ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev, @function
_ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev:
.LFB5504:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	call	__errno_location@PLT
	cmpl	$0, (%rax)
	jne	.L259
	movl	(%rbx), %edx
	movl	%edx, (%rax)
.L259:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5504:
	.size	_ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev, .-_ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.weak	_ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	.set	_ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev,_ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.section	.text._ZNSt6vectorINSt12experimental10filesystem2v17__cxx114path5_CmptESaIS5_EED2Ev,"axG",@progbits,_ZNSt6vectorINSt12experimental10filesystem2v17__cxx114path5_CmptESaIS5_EED5Ev,comdat
	.align 2
	.weak	_ZNSt6vectorINSt12experimental10filesystem2v17__cxx114path5_CmptESaIS5_EED2Ev
	.type	_ZNSt6vectorINSt12experimental10filesystem2v17__cxx114path5_CmptESaIS5_EED2Ev, @function
_ZNSt6vectorINSt12experimental10filesystem2v17__cxx114path5_CmptESaIS5_EED2Ev:
.LFB5743:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	8(%rdi), %r12
	movq	%rdi, %rbx
	movq	(%rdi), %rbp
.L263:
	cmpq	%rbp, %r12
	je	.L267
	movq	%rbp, %rdi
	addq	$72, %rbp
	call	_ZNSt12experimental10filesystem2v17__cxx114pathD2Ev
	jmp	.L263
.L267:
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	.L262
	movq	16(%rbx), %rsi
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	subq	%rdi, %rsi
	jmp	_ZdlPvm@PLT
.L262:
	.cfi_restore_state
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5743:
	.size	_ZNSt6vectorINSt12experimental10filesystem2v17__cxx114path5_CmptESaIS5_EED2Ev, .-_ZNSt6vectorINSt12experimental10filesystem2v17__cxx114path5_CmptESaIS5_EED2Ev
	.weak	_ZNSt6vectorINSt12experimental10filesystem2v17__cxx114path5_CmptESaIS5_EED1Ev
	.set	_ZNSt6vectorINSt12experimental10filesystem2v17__cxx114path5_CmptESaIS5_EED1Ev,_ZNSt6vectorINSt12experimental10filesystem2v17__cxx114path5_CmptESaIS5_EED2Ev
	.section	.text._ZNSt12experimental10filesystem2v17__cxx114pathD2Ev,"axG",@progbits,_ZNSt12experimental10filesystem2v17__cxx114pathD5Ev,comdat
	.align 2
	.weak	_ZNSt12experimental10filesystem2v17__cxx114pathD2Ev
	.type	_ZNSt12experimental10filesystem2v17__cxx114pathD2Ev, @function
_ZNSt12experimental10filesystem2v17__cxx114pathD2Ev:
.LFB4555:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	leaq	32(%rdi), %rdi
	call	_ZNSt6vectorINSt12experimental10filesystem2v17__cxx114path5_CmptESaIS5_EED1Ev
	movq	%rbx, %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	.cfi_endproc
.LFE4555:
	.size	_ZNSt12experimental10filesystem2v17__cxx114pathD2Ev, .-_ZNSt12experimental10filesystem2v17__cxx114pathD2Ev
	.weak	_ZNSt12experimental10filesystem2v17__cxx114pathD1Ev
	.set	_ZNSt12experimental10filesystem2v17__cxx114pathD1Ev,_ZNSt12experimental10filesystem2v17__cxx114pathD2Ev
	.section	.text._ZNSt6vectorIdSaIdEED2Ev,"axG",@progbits,_ZNSt6vectorIdSaIdEED5Ev,comdat
	.align 2
	.weak	_ZNSt6vectorIdSaIdEED2Ev
	.type	_ZNSt6vectorIdSaIdEED2Ev, @function
_ZNSt6vectorIdSaIdEED2Ev:
.LFB5837:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	.L270
	movq	16(%rdi), %rsi
	movq	%rax, %rdi
	subq	%rax, %rsi
	jmp	_ZdlPvm@PLT
.L270:
	ret
	.cfi_endproc
.LFE5837:
	.size	_ZNSt6vectorIdSaIdEED2Ev, .-_ZNSt6vectorIdSaIdEED2Ev
	.weak	_ZNSt6vectorIdSaIdEED1Ev
	.set	_ZNSt6vectorIdSaIdEED1Ev,_ZNSt6vectorIdSaIdEED2Ev
	.text
	.align 2
	.globl	_ZN6TFcoreC2Ev
	.type	_ZN6TFcoreC2Ev, @function
_ZN6TFcoreC2Ev:
.LFB5310:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA5310
	endbr64
	xorl	%eax, %eax
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	320(%rdi), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rdi, %rbx
	movq	%rax, 224(%rdi)
	movq	%rax, 232(%rdi)
	movq	%rax, 240(%rdi)
	movq	%r12, %rdi
.LEHB0:
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEEC1Ev@PLT
.LEHE0:
	leaq	848(%rbx), %rdi
.LEHB1:
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEEC1Ev@PLT
.LEHE1:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L276:
	.cfi_restore_state
	endbr64
	movq	%rax, %rbp
.L273:
	movq	%r12, %rdi
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L274
.L275:
	endbr64
	movq	%rax, %rbp
.L274:
	leaq	224(%rbx), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	movq	%rbp, %rdi
.LEHB2:
	call	_Unwind_Resume@PLT
.LEHE2:
	.cfi_endproc
.LFE5310:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA5310:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE5310-.LLSDACSB5310
.LLSDACSB5310:
	.uleb128 .LEHB0-.LFB5310
	.uleb128 .LEHE0-.LEHB0
	.uleb128 .L275-.LFB5310
	.uleb128 0
	.uleb128 .LEHB1-.LFB5310
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L276-.LFB5310
	.uleb128 0
	.uleb128 .LEHB2-.LFB5310
	.uleb128 .LEHE2-.LEHB2
	.uleb128 0
	.uleb128 0
.LLSDACSE5310:
	.text
	.size	_ZN6TFcoreC2Ev, .-_ZN6TFcoreC2Ev
	.globl	_ZN6TFcoreC1Ev
	.set	_ZN6TFcoreC1Ev,_ZN6TFcoreC2Ev
	.align 2
	.globl	_ZN6TFcoreC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.type	_ZN6TFcoreC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, @function
_ZN6TFcoreC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
.LFB5313:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA5313
	endbr64
	xorl	%ecx, %ecx
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	320(%rdi), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rsi, %rbx
	pushq	%rdx
	.cfi_def_cfa_offset 48
	movq	%rcx, 224(%rdi)
	movq	%rcx, 232(%rdi)
	movq	%rcx, 240(%rdi)
	movq	%r12, %rdi
.LEHB3:
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEEC1Ev@PLT
.LEHE3:
	leaq	848(%rbp), %r13
	movq	%r13, %rdi
.LEHB4:
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEEC1Ev@PLT
.LEHE4:
	movq	(%rbx), %rsi
	leaq	872(%rbp), %rdi
	movl	$16, %edx
.LEHB5:
	call	_ZNSt13basic_filebufIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode@PLT
	movq	848(%rbp), %rdx
	movq	-24(%rdx), %rdi
	addq	%r13, %rdi
	testq	%rax, %rax
	jne	.L280
	movl	$4, %esi
	call	_ZNSt9basic_iosIcSt11char_traitsIcEE8setstateESt12_Ios_Iostate@PLT
	jmp	.L279
.L280:
	xorl	%esi, %esi
	call	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate@PLT
.LEHE5:
	jmp	.L279
.L287:
	endbr64
	movq	%rax, %rbx
.L282:
	movq	%r13, %rdi
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L283
.L286:
	endbr64
	movq	%rax, %rbx
.L283:
	movq	%r12, %rdi
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L284
.L285:
	endbr64
	movq	%rax, %rbx
.L284:
	leaq	224(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	movq	%rbx, %rdi
.LEHB6:
	call	_Unwind_Resume@PLT
.LEHE6:
.L279:
	popq	%rax
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5313:
	.section	.gcc_except_table
.LLSDA5313:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE5313-.LLSDACSB5313
.LLSDACSB5313:
	.uleb128 .LEHB3-.LFB5313
	.uleb128 .LEHE3-.LEHB3
	.uleb128 .L285-.LFB5313
	.uleb128 0
	.uleb128 .LEHB4-.LFB5313
	.uleb128 .LEHE4-.LEHB4
	.uleb128 .L286-.LFB5313
	.uleb128 0
	.uleb128 .LEHB5-.LFB5313
	.uleb128 .LEHE5-.LEHB5
	.uleb128 .L287-.LFB5313
	.uleb128 0
	.uleb128 .LEHB6-.LFB5313
	.uleb128 .LEHE6-.LEHB6
	.uleb128 0
	.uleb128 0
.LLSDACSE5313:
	.text
	.size	_ZN6TFcoreC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, .-_ZN6TFcoreC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.globl	_ZN6TFcoreC1ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.set	_ZN6TFcoreC1ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE,_ZN6TFcoreC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.align 2
	.globl	_ZN6TFcoreC2ENSt12experimental10filesystem2v17__cxx114pathE
	.type	_ZN6TFcoreC2ENSt12experimental10filesystem2v17__cxx114pathE, @function
_ZN6TFcoreC2ENSt12experimental10filesystem2v17__cxx114pathE:
.LFB5316:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA5316
	endbr64
	xorl	%ecx, %ecx
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	320(%rdi), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rsi, %rbx
	pushq	%rdx
	.cfi_def_cfa_offset 48
	movq	%rcx, 224(%rdi)
	movq	%rcx, 232(%rdi)
	movq	%rcx, 240(%rdi)
	movq	%r12, %rdi
.LEHB7:
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEEC1Ev@PLT
.LEHE7:
	leaq	848(%rbp), %r13
	movq	%r13, %rdi
.LEHB8:
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEEC1Ev@PLT
.LEHE8:
	movq	(%rbx), %rsi
	movl	$16, %edx
	movq	%r13, %rdi
.LEHB9:
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode@PLT
.LEHE9:
	popq	%rax
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L295:
	.cfi_restore_state
	endbr64
	movq	%rax, %rbx
.L290:
	movq	%r13, %rdi
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L291
.L294:
	endbr64
	movq	%rax, %rbx
.L291:
	movq	%r12, %rdi
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L292
.L293:
	endbr64
	movq	%rax, %rbx
.L292:
	leaq	224(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	movq	%rbx, %rdi
.LEHB10:
	call	_Unwind_Resume@PLT
.LEHE10:
	.cfi_endproc
.LFE5316:
	.section	.gcc_except_table
.LLSDA5316:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE5316-.LLSDACSB5316
.LLSDACSB5316:
	.uleb128 .LEHB7-.LFB5316
	.uleb128 .LEHE7-.LEHB7
	.uleb128 .L293-.LFB5316
	.uleb128 0
	.uleb128 .LEHB8-.LFB5316
	.uleb128 .LEHE8-.LEHB8
	.uleb128 .L294-.LFB5316
	.uleb128 0
	.uleb128 .LEHB9-.LFB5316
	.uleb128 .LEHE9-.LEHB9
	.uleb128 .L295-.LFB5316
	.uleb128 0
	.uleb128 .LEHB10-.LFB5316
	.uleb128 .LEHE10-.LEHB10
	.uleb128 0
	.uleb128 0
.LLSDACSE5316:
	.text
	.size	_ZN6TFcoreC2ENSt12experimental10filesystem2v17__cxx114pathE, .-_ZN6TFcoreC2ENSt12experimental10filesystem2v17__cxx114pathE
	.globl	_ZN6TFcoreC1ENSt12experimental10filesystem2v17__cxx114pathE
	.set	_ZN6TFcoreC1ENSt12experimental10filesystem2v17__cxx114pathE,_ZN6TFcoreC2ENSt12experimental10filesystem2v17__cxx114pathE
	.align 2
	.globl	_ZN6TFcoreD2Ev
	.type	_ZN6TFcoreD2Ev, @function
_ZN6TFcoreD2Ev:
.LFB5319:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA5319
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rdi, %rbx
	movq	64(%rdi), %rdi
	leaq	320(%rbx), %rbp
	leaq	848(%rbx), %r12
	call	free@PLT
	movq	72(%rbx), %rdi
	call	free@PLT
	movq	80(%rbx), %rdi
	call	free@PLT
	movq	88(%rbx), %rdi
	call	free@PLT
	movq	184(%rbx), %rdi
	call	free@PLT
	movq	192(%rbx), %rdi
	call	free@PLT
	movq	200(%rbx), %rdi
	call	free@PLT
	movq	208(%rbx), %rdi
	call	free@PLT
	movq	216(%rbx), %rdi
	call	free@PLT
	movq	104(%rbx), %rdi
	call	free@PLT
	movq	112(%rbx), %rdi
	call	free@PLT
	movq	120(%rbx), %rdi
	call	free@PLT
	movq	%rbp, %rdi
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEE5closeEv@PLT
	movq	%r12, %rdi
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEE5closeEv@PLT
	movq	%r12, %rdi
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	%rbp, %rdi
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev@PLT
	leaq	224(%rbx), %rdi
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	jmp	_ZNSt6vectorIdSaIdEED1Ev
	.cfi_endproc
.LFE5319:
	.section	.gcc_except_table
.LLSDA5319:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE5319-.LLSDACSB5319
.LLSDACSB5319:
.LLSDACSE5319:
	.text
	.size	_ZN6TFcoreD2Ev, .-_ZN6TFcoreD2Ev
	.globl	_ZN6TFcoreD1Ev
	.set	_ZN6TFcoreD1Ev,_ZN6TFcoreD2Ev
	.align 2
	.globl	_ZN6TFcore11exportModelENSt12experimental10filesystem2v17__cxx114pathE
	.type	_ZN6TFcore11exportModelENSt12experimental10filesystem2v17__cxx114pathE, @function
_ZN6TFcore11exportModelENSt12experimental10filesystem2v17__cxx114pathE:
.LFB5325:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA5325
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdi, %rbx
	subq	$552, %rsp
	.cfi_def_cfa_offset 608
	movq	%fs:40, %rax
	movq	%rax, 536(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r12
	movq	%r12, %rdi
.LEHB11:
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEEC1Ev@PLT
.LEHE11:
	movq	0(%rbp), %rsi
	movl	$20, %edx
	movq	%r12, %rdi
.LEHB12:
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode@PLT
	leaq	24(%rsp), %rbp
	movl	$4, %edx
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	call	_ZNSo5writeEPKcl@PLT
	leaq	12(%rbx), %rsi
	movl	$4, %edx
	movq	%rbp, %rdi
	call	_ZNSo5writeEPKcl@PLT
	leaq	16(%rbx), %rsi
	movl	$8, %edx
	movq	%rbp, %rdi
	call	_ZNSo5writeEPKcl@PLT
	leaq	24(%rbx), %rsi
	movl	$4, %edx
	movq	%rbp, %rdi
	call	_ZNSo5writeEPKcl@PLT
	leaq	28(%rbx), %rsi
	movl	$4, %edx
	movq	%rbp, %rdi
	call	_ZNSo5writeEPKcl@PLT
	leaq	32(%rbx), %rsi
	movl	$8, %edx
	movq	%rbp, %rdi
	call	_ZNSo5writeEPKcl@PLT
	leaq	40(%rbx), %rsi
	movl	$8, %edx
	movq	%rbp, %rdi
	call	_ZNSo5writeEPKcl@PLT
	leaq	48(%rbx), %rsi
	movl	$8, %edx
	movq	%rbp, %rdi
	call	_ZNSo5writeEPKcl@PLT
	leaq	164(%rbx), %rsi
	movl	$4, %edx
	movq	%rbp, %rdi
	call	_ZNSo5writeEPKcl@PLT
	leaq	172(%rbx), %rsi
	movl	$4, %edx
	movq	%rbp, %rdi
	call	_ZNSo5writeEPKcl@PLT
	leaq	248(%rbx), %rsi
	movl	$4, %edx
	movq	%rbp, %rdi
	call	_ZNSo5writeEPKcl@PLT
	leaq	252(%rbx), %rsi
	movl	$4, %edx
	movq	%rbp, %rdi
	call	_ZNSo5writeEPKcl@PLT
	xorl	%r13d, %r13d
.L301:
	cmpl	%r13d, 248(%rbx)
	jle	.L319
	movq	256(%rbx), %rax
	movl	$8, %edx
	movq	%rbp, %rdi
	leaq	(%rax,%r13,8), %rsi
	call	_ZNSo5writeEPKcl@PLT
	incq	%r13
	jmp	.L301
.L319:
	xorl	%r13d, %r13d
.L303:
	cmpl	%r13d, (%rbx)
	jle	.L320
	movq	80(%rbx), %rsi
	leaq	0(,%r13,8), %r14
	movl	$8, %edx
	movq	%rbp, %rdi
	addq	%r14, %rsi
	call	_ZNSo5writeEPKcl@PLT
	movq	88(%rbx), %rsi
	movl	$8, %edx
	movq	%rbp, %rdi
	addq	%r14, %rsi
	call	_ZNSo5writeEPKcl@PLT
	incq	%r13
	jmp	.L303
.L320:
	xorl	%r13d, %r13d
.L305:
	cmpl	%r13d, 164(%rbx)
	jle	.L321
	xorl	%r14d, %r14d
.L308:
	cmpl	%r14d, (%rbx)
	jle	.L322
	xorl	%r15d, %r15d
.L307:
	movl	24(%rbx), %edx
	movl	(%rbx), %ecx
	cmpl	%r15d, %edx
	jle	.L323
	movl	%edx, %eax
	imull	%r13d, %edx
	movq	%rbp, %rdi
	imull	%r14d, %eax
	imull	%ecx, %edx
	addl	%r15d, %eax
	addl	%edx, %eax
	movq	104(%rbx), %rdx
	cltq
	leaq	(%rdx,%rax,8), %rsi
	movl	$8, %edx
	call	_ZNSo5writeEPKcl@PLT
	movl	24(%rbx), %edx
	movq	%rbp, %rdi
	movl	%edx, %eax
	imull	%r14d, %edx
	imull	%r13d, %eax
	imull	(%rbx), %eax
	addl	%r15d, %edx
	addl	%edx, %eax
	movq	112(%rbx), %rdx
	cltq
	leaq	(%rdx,%rax,8), %rsi
	movl	$8, %edx
	call	_ZNSo5writeEPKcl@PLT
	incl	%r15d
	jmp	.L307
.L323:
	incl	%r14d
	jmp	.L308
.L322:
	incl	%r13d
	jmp	.L305
.L321:
	movq	%r12, %rdi
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEE5closeEv@PLT
.LEHE12:
	movq	%r12, %rdi
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	536(%rsp), %rax
	subq	%fs:40, %rax
	je	.L311
	jmp	.L317
.L315:
	endbr64
	movq	%rax, %rbx
.L309:
	movq	%r12, %rdi
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	536(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L317
	movq	%rbx, %rdi
.LEHB13:
	call	_Unwind_Resume@PLT
.LEHE13:
.L317:
	call	__stack_chk_fail@PLT
.L311:
	addq	$552, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5325:
	.section	.gcc_except_table
.LLSDA5325:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE5325-.LLSDACSB5325
.LLSDACSB5325:
	.uleb128 .LEHB11-.LFB5325
	.uleb128 .LEHE11-.LEHB11
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB12-.LFB5325
	.uleb128 .LEHE12-.LEHB12
	.uleb128 .L315-.LFB5325
	.uleb128 0
	.uleb128 .LEHB13-.LFB5325
	.uleb128 .LEHE13-.LEHB13
	.uleb128 0
	.uleb128 0
.LLSDACSE5325:
	.text
	.size	_ZN6TFcore11exportModelENSt12experimental10filesystem2v17__cxx114pathE, .-_ZN6TFcore11exportModelENSt12experimental10filesystem2v17__cxx114pathE
	.section	.rodata.str1.1
.LC20:
	.string	"numChannels: "
.LC21:
	.string	"M_MAX: "
.LC22:
	.string	"xmax: "
.LC23:
	.string	"XRES: "
.LC24:
	.string	"WIN_MAV: "
.LC25:
	.string	"alpha: "
.LC26:
	.string	"beta: "
.LC27:
	.string	"p_star: "
.LC28:
	.string	"M: "
.LC29:
	.string	"reghold: "
.LC30:
	.string	"tableSize: "
.LC31:
	.string	"discretizeStep: "
.LC32:
	.string	"normalTable"
.LC33:
	.string	"sig2"
.LC34:
	.string	"pdist"
	.text
	.align 2
	.globl	_ZN6TFcore11importModelENSt12experimental10filesystem2v17__cxx114pathE
	.type	_ZN6TFcore11importModelENSt12experimental10filesystem2v17__cxx114pathE, @function
_ZN6TFcore11importModelENSt12experimental10filesystem2v17__cxx114pathE:
.LFB5326:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA5326
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdi, %rbx
	subq	$568, %rsp
	.cfi_def_cfa_offset 624
	movq	%fs:40, %rax
	movq	%rax, 552(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movq	%rax, %rdi
	movq	%rax, (%rsp)
.LEHB14:
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEEC1Ev@PLT
.LEHE14:
	movq	0(%rbp), %rsi
	movq	(%rsp), %rdi
	movl	$12, %edx
.LEHB15:
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode@PLT
	movq	(%rsp), %rdi
	movl	$4, %edx
	movq	%rbx, %rsi
	call	_ZNSi4readEPcl@PLT
	movq	(%rsp), %rdi
	leaq	12(%rbx), %rsi
	movl	$4, %edx
	call	_ZNSi4readEPcl@PLT
	movq	(%rsp), %rdi
	leaq	16(%rbx), %rsi
	movl	$8, %edx
	call	_ZNSi4readEPcl@PLT
	movq	(%rsp), %rdi
	leaq	24(%rbx), %rsi
	movl	$4, %edx
	call	_ZNSi4readEPcl@PLT
	movq	(%rsp), %rdi
	leaq	28(%rbx), %rsi
	movl	$4, %edx
	call	_ZNSi4readEPcl@PLT
	leaq	_ZSt4cout(%rip), %rbp
	leaq	.LC20(%rip), %rsi
	movq	%rbp, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	(%rbx), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	leaq	.LC21(%rip), %rsi
	movq	%rbp, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	12(%rbx), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	leaq	.LC22(%rip), %rsi
	movq	%rbp, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movsd	16(%rbx), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	leaq	.LC23(%rip), %rsi
	movq	%rbp, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	24(%rbx), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	leaq	.LC24(%rip), %rsi
	movq	%rbp, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	28(%rbx), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	(%rsp), %rdi
	leaq	32(%rbx), %rsi
	movl	$8, %edx
	call	_ZNSi4readEPcl@PLT
	movq	(%rsp), %rdi
	leaq	40(%rbx), %rsi
	movl	$8, %edx
	call	_ZNSi4readEPcl@PLT
	movq	(%rsp), %rdi
	leaq	48(%rbx), %rsi
	movl	$8, %edx
	call	_ZNSi4readEPcl@PLT
	leaq	.LC25(%rip), %rsi
	movq	%rbp, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movsd	32(%rbx), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	leaq	.LC26(%rip), %rsi
	movq	%rbp, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movsd	40(%rbx), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	leaq	.LC27(%rip), %rsi
	movq	%rbp, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movsd	48(%rbx), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	leaq	24(%rsp), %rax
	leaq	164(%rbx), %rsi
	movl	$4, %edx
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	call	_ZNSi4readEPcl@PLT
	movq	8(%rsp), %rdi
	leaq	172(%rbx), %rsi
	movl	$4, %edx
	call	_ZNSi4readEPcl@PLT
	leaq	.LC28(%rip), %rsi
	movq	%rbp, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	164(%rbx), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	leaq	.LC29(%rip), %rsi
	movq	%rbp, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	172(%rbx), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	8(%rsp), %rdi
	leaq	248(%rbx), %rsi
	movl	$4, %edx
	call	_ZNSi4readEPcl@PLT
	movq	8(%rsp), %rdi
	leaq	252(%rbx), %rsi
	movl	$4, %edx
	call	_ZNSi4readEPcl@PLT
	leaq	.LC30(%rip), %rsi
	movq	%rbp, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	248(%rbx), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	leaq	.LC31(%rip), %rsi
	movq	%rbp, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	252(%rbx), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	xorl	%r12d, %r12d
.L325:
	cmpl	%r12d, 248(%rbx)
	jle	.L347
	movq	256(%rbx), %rax
	movq	8(%rsp), %rdi
	movl	$8, %edx
	leaq	(%rax,%r12,8), %rsi
	call	_ZNSi4readEPcl@PLT
	incq	%r12
	jmp	.L325
.L347:
	leaq	.LC32(%rip), %rsi
	movq	%rbp, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	xorl	%r12d, %r12d
.L327:
	cmpl	%r12d, (%rbx)
	jle	.L348
	movq	80(%rbx), %rsi
	movq	8(%rsp), %rdi
	movl	$8, %edx
	leaq	0(,%r12,8), %r13
	addq	%r13, %rsi
	call	_ZNSi4readEPcl@PLT
	movq	88(%rbx), %rsi
	movq	8(%rsp), %rdi
	movl	$8, %edx
	addq	%r13, %rsi
	call	_ZNSi4readEPcl@PLT
	incq	%r12
	jmp	.L327
.L348:
	leaq	.LC33(%rip), %rsi
	movq	%rbp, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	xorl	%r12d, %r12d
	leaq	24(%rsp), %r15
.L329:
	cmpl	%r12d, 164(%rbx)
	jle	.L349
	xorl	%r13d, %r13d
.L332:
	cmpl	%r13d, (%rbx)
	jle	.L350
	xorl	%r14d, %r14d
.L331:
	movl	24(%rbx), %edx
	movl	(%rbx), %ecx
	cmpl	%r14d, %edx
	jle	.L351
	movl	%edx, %eax
	imull	%r12d, %edx
	movq	8(%rsp), %rdi
	imull	%r13d, %eax
	imull	%ecx, %edx
	addl	%r14d, %eax
	addl	%edx, %eax
	movq	104(%rbx), %rdx
	cltq
	leaq	(%rdx,%rax,8), %rsi
	movl	$8, %edx
	call	_ZNSi4readEPcl@PLT
	movl	24(%rbx), %edx
	movq	%r15, %rdi
	movl	%edx, %eax
	imull	%r13d, %edx
	imull	%r12d, %eax
	imull	(%rbx), %eax
	addl	%r14d, %edx
	addl	%edx, %eax
	movq	112(%rbx), %rdx
	cltq
	leaq	(%rdx,%rax,8), %rsi
	movl	$8, %edx
	call	_ZNSi4readEPcl@PLT
	incl	%r14d
	jmp	.L331
.L351:
	incl	%r13d
	jmp	.L332
.L350:
	incl	%r12d
	jmp	.L329
.L349:
	leaq	.LC34(%rip), %rsi
	movq	%rbp, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	8(%rsp), %rdi
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEE5closeEv@PLT
.LEHE15:
	movq	8(%rsp), %rdi
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	552(%rsp), %rax
	subq	%fs:40, %rax
	je	.L335
	jmp	.L345
.L341:
	endbr64
	movq	%rax, %rbx
.L333:
	movq	(%rsp), %rdi
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	552(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L345
	movq	%rbx, %rdi
.LEHB16:
	call	_Unwind_Resume@PLT
.LEHE16:
.L345:
	call	__stack_chk_fail@PLT
.L335:
	addq	$568, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5326:
	.section	.gcc_except_table
.LLSDA5326:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE5326-.LLSDACSB5326
.LLSDACSB5326:
	.uleb128 .LEHB14-.LFB5326
	.uleb128 .LEHE14-.LEHB14
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB15-.LFB5326
	.uleb128 .LEHE15-.LEHB15
	.uleb128 .L341-.LFB5326
	.uleb128 0
	.uleb128 .LEHB16-.LFB5326
	.uleb128 .LEHE16-.LEHB16
	.uleb128 0
	.uleb128 0
.LLSDACSE5326:
	.text
	.size	_ZN6TFcore11importModelENSt12experimental10filesystem2v17__cxx114pathE, .-_ZN6TFcore11importModelENSt12experimental10filesystem2v17__cxx114pathE
	.section	.rodata.str1.1
.LC35:
	.string	"stod"
	.text
	.align 2
	.globl	_ZN6TFcore9getSampleEv
	.type	_ZN6TFcore9getSampleEv, @function
_ZN6TFcore9getSampleEv:
.LFB5322:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA5322
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdi, %rbx
	subq	$504, %rsp
	.cfi_def_cfa_offset 560
	movq	%fs:40, %rax
	movq	%rax, 488(%rsp)
	xorl	%eax, %eax
	incl	8(%rdi)
	leaq	48(%rsp), %rax
	leaq	96(%rsp), %r12
	movq	%rax, 32(%rsp)
	leaq	80(%rsp), %rax
	movq	%r12, %rdi
	movq	%rax, 64(%rsp)
	leaq	64(%rsp), %rax
	movq	%rcx, 40(%rsp)
	movb	$0, 48(%rsp)
	movq	%rsi, 72(%rsp)
	movb	$0, 80(%rsp)
	movq	%rax, (%rsp)
.LEHB17:
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev@PLT
.LEHE17:
	movq	(%rsp), %rsi
	leaq	320(%rbx), %rdi
	movl	$10, %edx
.LEHB18:
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_@PLT
	movq	(%rsp), %rsi
	leaq	120(%rsp), %rdi
	call	_ZNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strERKNS_12basic_stringIcS2_S3_EE@PLT
	xorl	%ebp, %ebp
	leaq	32(%rsp), %r14
.L353:
	movl	(%rbx), %esi
	cmpl	%ebp, %esi
	jle	.L376
	movl	28(%rbx), %ecx
	movq	216(%rbx), %rsi
	movl	%ecx, %eax
	decl	%ecx
	imull	%ebp, %eax
	movslq	%ecx, %rcx
	salq	$3, %rcx
	leal	1(%rax), %edx
	cltq
	movslq	%edx, %rdx
	leaq	(%rsi,%rdx,8), %rdx
	leaq	(%rsi,%rax,8), %rsi
	movq	%rdx, %rdi
	movl	$44, %edx
	rep movsb
	movq	%r14, %rsi
	movq	%r12, %rdi
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_@PLT
.LEHE18:
	movl	28(%rbx), %eax
	movq	216(%rbx), %rdx
	movq	32(%rsp), %r13
	imull	%ebp, %eax
	cltq
	leaq	(%rdx,%rax,8), %r15
	call	__errno_location@PLT
	movq	%r13, %rdi
	leaq	24(%rsp), %rsi
	movl	(%rax), %edx
	movq	%rax, 8(%rsp)
	movl	%edx, 20(%rsp)
	xorl	%edx, %edx
	movl	%edx, (%rax)
	call	strtod@PLT
	cmpq	24(%rsp), %r13
	movq	8(%rsp), %rax
	leaq	20(%rsp), %r13
	jne	.L354
	movq	488(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L373
	leaq	.LC35(%rip), %rdi
.LEHB19:
	call	_ZSt24__throw_invalid_argumentPKc@PLT
.L354:
	cmpl	$34, (%rax)
	jne	.L356
	movq	488(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L373
	leaq	.LC35(%rip), %rdi
	call	_ZSt20__throw_out_of_rangePKc@PLT
.LEHE19:
.L356:
	movq	%r13, %rdi
	movsd	%xmm0, 8(%rsp)
	incl	%ebp
	call	_ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	movsd	8(%rsp), %xmm0
	movsd	%xmm0, (%r15)
	jmp	.L353
.L371:
	endbr64
	movq	%rax, %rbx
.L358:
	movq	%r13, %rdi
	call	_ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	jmp	.L359
.L376:
	movq	.LC1(%rip), %xmm1
	xorl	%edx, %edx
.L361:
	cmpl	%edx, %esi
	jle	.L377
	movq	208(%rbx), %rax
	movl	28(%rbx), %edi
	xorl	%ecx, %ecx
	leaq	(%rax,%rdx,8), %r8
	movl	%edi, %eax
	imull	%edx, %eax
	movq	$0x000000000, (%r8)
	cltq
	salq	$3, %rax
.L362:
	cmpl	%ecx, %edi
	jle	.L378
	movq	216(%rbx), %r9
	cvtsi2sdl	%edi, %xmm2
	incl	%ecx
	movsd	(%r9,%rax), %xmm0
	addq	$8, %rax
	andps	%xmm1, %xmm0
	divsd	%xmm2, %xmm0
	addsd	(%r8), %xmm0
	movsd	%xmm0, (%r8)
	jmp	.L362
.L378:
	incq	%rdx
	jmp	.L361
.L377:
	movw	$1, 96(%rbx)
	movq	%r12, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	movq	(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	32(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	488(%rsp), %rax
	subq	%fs:40, %rax
	je	.L367
	jmp	.L373
.L370:
	endbr64
	movq	%rax, %rbx
.L359:
	movq	%r12, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	jmp	.L365
.L369:
	endbr64
	movq	%rax, %rbx
.L365:
	movq	(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	32(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	488(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L373
	movq	%rbx, %rdi
.LEHB20:
	call	_Unwind_Resume@PLT
.LEHE20:
.L373:
	call	__stack_chk_fail@PLT
.L367:
	addq	$504, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5322:
	.section	.gcc_except_table
.LLSDA5322:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE5322-.LLSDACSB5322
.LLSDACSB5322:
	.uleb128 .LEHB17-.LFB5322
	.uleb128 .LEHE17-.LEHB17
	.uleb128 .L369-.LFB5322
	.uleb128 0
	.uleb128 .LEHB18-.LFB5322
	.uleb128 .LEHE18-.LEHB18
	.uleb128 .L370-.LFB5322
	.uleb128 0
	.uleb128 .LEHB19-.LFB5322
	.uleb128 .LEHE19-.LEHB19
	.uleb128 .L371-.LFB5322
	.uleb128 0
	.uleb128 .LEHB20-.LFB5322
	.uleb128 .LEHE20-.LEHB20
	.uleb128 0
	.uleb128 0
.LLSDACSE5322:
	.text
	.size	_ZN6TFcore9getSampleEv, .-_ZN6TFcore9getSampleEv
	.section	.rodata.str1.1
.LC36:
	.string	"."
.LC37:
	.string	"csv"
	.text
	.align 2
	.globl	_ZN6TFcore8loadDataENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.type	_ZN6TFcore8loadDataENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, @function
_ZN6TFcore8loadDataENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
.LFB5329:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA5329
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	orq	$-1, %rdx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rsi, %r12
	leaq	.LC36(%rip), %rsi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdi, %rbx
	movq	%r12, %rdi
	subq	$520, %rsp
	.cfi_def_cfa_offset 576
	movq	%fs:40, %rax
	movq	%rax, 504(%rsp)
	xorl	%eax, %eax
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12find_last_ofEPKcm@PLT
	leaq	16(%rsp), %rcx
	movq	%r12, %rsi
	movq	%rcx, (%rsp)
	movq	(%rsp), %rdi
	orq	$-1, %rcx
	leaq	1(%rax), %rdx
.LEHB21:
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@PLT
.LEHE21:
	movq	16(%rsp), %rdi
	leaq	.LC37(%rip), %rsi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L380
	leaq	320(%rbx), %r14
	movq	(%r12), %rsi
	movl	$8, %edx
	movl	%eax, %ebp
	movq	%r14, %rdi
.LEHB22:
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode@PLT
.LEHE22:
	leaq	64(%rsp), %rax
	leaq	112(%rsp), %r13
	xorl	%edx, %edx
	movb	$0, 64(%rsp)
	movq	%rax, 48(%rsp)
	xorl	%eax, %eax
	movq	%r13, %rdi
	leaq	80(%rsp), %r12
	movq	%rax, 56(%rsp)
	leaq	96(%rsp), %rax
	movq	%rax, 80(%rsp)
	leaq	48(%rsp), %rax
	movq	%rdx, 88(%rsp)
	movb	$0, 96(%rsp)
	movq	%rax, 8(%rsp)
.LEHB23:
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev@PLT
.LEHE23:
	movl	$10, %edx
	movq	%r12, %rsi
	movq	%r14, %rdi
.LEHB24:
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_@PLT
	leaq	136(%rsp), %rdi
	movq	%r12, %rsi
	call	_ZNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strERKNS_12basic_stringIcS2_S3_EE@PLT
.L381:
	movq	8(%rsp), %rsi
	movl	$44, %edx
	movq	%r13, %rdi
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_@PLT
	movq	(%rax), %rdx
	movq	-24(%rdx), %rdx
	testb	$5, 32(%rax,%rdx)
	jne	.L395
	incl	%ebp
	jmp	.L381
.L395:
	movl	$1, %r15d
.L383:
	movl	$10, %edx
	movq	%r12, %rsi
	movq	%r14, %rdi
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_@PLT
	movq	(%rax), %rdx
	movq	-24(%rdx), %rdx
	testb	$5, 32(%rax,%rdx)
	jne	.L396
	incl	%r15d
	jmp	.L383
.L396:
	leaq	584(%rbx), %rdi
	xorl	%esi, %esi
	call	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate@PLT
	xorl	%edx, %edx
	xorl	%esi, %esi
	movq	%r14, %rdi
	call	_ZNSi5seekgElSt12_Ios_Seekdir@PLT
	movl	%ebp, %esi
	movq	%rbx, %rdi
	call	_ZN6TFcore9initModelEi
.LEHE24:
	movl	%r15d, 4(%rbx)
	movq	%r13, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	8(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
.L380:
	movq	(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	504(%rsp), %rax
	subq	%fs:40, %rax
	je	.L389
	jmp	.L393
.L392:
	endbr64
	movq	%rax, %rbx
.L385:
	movq	%r13, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	jmp	.L386
.L391:
	endbr64
	movq	%rax, %rbx
.L386:
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	8(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L387
.L390:
	endbr64
	movq	%rax, %rbx
.L387:
	movq	(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	504(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L393
	movq	%rbx, %rdi
.LEHB25:
	call	_Unwind_Resume@PLT
.LEHE25:
.L393:
	call	__stack_chk_fail@PLT
.L389:
	addq	$520, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5329:
	.section	.gcc_except_table
.LLSDA5329:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE5329-.LLSDACSB5329
.LLSDACSB5329:
	.uleb128 .LEHB21-.LFB5329
	.uleb128 .LEHE21-.LEHB21
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB22-.LFB5329
	.uleb128 .LEHE22-.LEHB22
	.uleb128 .L390-.LFB5329
	.uleb128 0
	.uleb128 .LEHB23-.LFB5329
	.uleb128 .LEHE23-.LEHB23
	.uleb128 .L391-.LFB5329
	.uleb128 0
	.uleb128 .LEHB24-.LFB5329
	.uleb128 .LEHE24-.LEHB24
	.uleb128 .L392-.LFB5329
	.uleb128 0
	.uleb128 .LEHB25-.LFB5329
	.uleb128 .LEHE25-.LEHB25
	.uleb128 0
	.uleb128 0
.LLSDACSE5329:
	.text
	.size	_ZN6TFcore8loadDataENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, .-_ZN6TFcore8loadDataENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.section	.rodata.str1.1
.LC38:
	.string	".csv"
	.text
	.align 2
	.globl	_ZN6TFcore8loadDataENSt12experimental10filesystem2v17__cxx114pathE
	.type	_ZN6TFcore8loadDataENSt12experimental10filesystem2v17__cxx114pathE, @function
_ZN6TFcore8loadDataENSt12experimental10filesystem2v17__cxx114pathE:
.LFB5330:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA5330
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	4+.LC38(%rip), %rdx
	movq	%rsi, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	-4(%rdx), %rsi
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$520, %rsp
	.cfi_def_cfa_offset 576
	movq	%fs:40, %rax
	movq	%rax, 504(%rsp)
	xorl	%eax, %eax
	leaq	128(%rsp), %rdi
	leaq	112(%rsp), %rbp
	movq	%rdi, 112(%rsp)
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13_S_copy_charsEPcPKcS7_@PLT
	movq	112(%rsp), %rax
	xorl	%r8d, %r8d
	movq	%rbp, %rdi
	movq	$4, 120(%rsp)
	movb	$0, 4(%rax)
	movq	%r8, 144(%rsp)
	movq	%r8, 152(%rsp)
	movq	%r8, 160(%rsp)
	movb	$0, 168(%rsp)
.LEHB26:
	call	_ZNSt12experimental10filesystem2v17__cxx114path14_M_split_cmptsEv@PLT
.LEHE26:
	jmp	.L435
.L419:
	endbr64
	movq	%rax, %rbx
.L399:
	leaq	144(%rsp), %rdi
	call	_ZNSt6vectorINSt12experimental10filesystem2v17__cxx114path5_CmptESaIS5_EED1Ev
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%rbx, %rdi
	movq	504(%rsp), %rax
	subq	%fs:40, %rax
	je	.L431
	jmp	.L432
.L435:
	movq	%r15, %rdi
.LEHB27:
	call	_ZNKSt12experimental10filesystem2v17__cxx114path17_M_find_extensionEv@PLT
	testq	%rax, %rax
	movq	%rax, %rsi
	leaq	48(%rsp), %rbx
	je	.L401
	cmpq	$-1, %rdx
	je	.L401
	leaq	16(%rsp), %r13
	orq	$-1, %rcx
	movq	%r13, %rdi
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@PLT
.LEHE27:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_@PLT
	xorl	%edi, %edi
	movb	$0, 104(%rsp)
	movq	%rdi, 80(%rsp)
	movq	%rdi, 88(%rsp)
	movq	%rdi, 96(%rsp)
	movq	%rbx, %rdi
.LEHB28:
	call	_ZNSt12experimental10filesystem2v17__cxx114path14_M_split_cmptsEv@PLT
.LEHE28:
	movq	%r13, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L405
.L420:
	endbr64
	movq	%rax, %r12
.L403:
	leaq	80(%rsp), %rdi
	call	_ZNSt6vectorINSt12experimental10filesystem2v17__cxx114path5_CmptESaIS5_EED1Ev
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%r13, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L404
.L401:
	xorl	%esi, %esi
	leaq	64(%rsp), %rax
	xorl	%ecx, %ecx
	movb	$0, 64(%rsp)
	movq	%rax, 48(%rsp)
	movq	%rcx, 56(%rsp)
	movq	%rsi, 80(%rsp)
	movq	%rsi, 88(%rsp)
	movq	%rsi, 96(%rsp)
	movb	$0, 104(%rsp)
.L405:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	_ZNKSt12experimental10filesystem2v17__cxx114path7compareERKS3_@PLT
	movq	%rbx, %rdi
	movl	%eax, %r13d
	call	_ZNSt12experimental10filesystem2v17__cxx114pathD1Ev
	movq	%rbp, %rdi
	call	_ZNSt12experimental10filesystem2v17__cxx114pathD1Ev
	testl	%r13d, %r13d
	jne	.L397
	movq	(%r15), %rsi
	leaq	320(%r12), %r14
	movl	$8, %edx
	movq	%r14, %rdi
.LEHB29:
	call	_ZNSt13basic_fstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode@PLT
.LEHE29:
	leaq	32(%rsp), %rax
	xorl	%edx, %edx
	movq	%rbp, %rdi
	movq	%rax, 16(%rsp)
	xorl	%eax, %eax
	movq	%rax, 24(%rsp)
	leaq	64(%rsp), %rax
	movq	%rax, 48(%rsp)
	leaq	16(%rsp), %rax
	movb	$0, 32(%rsp)
	movq	%rdx, 56(%rsp)
	movb	$0, 64(%rsp)
	movq	%rax, 8(%rsp)
.LEHB30:
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev@PLT
.LEHE30:
	movl	$10, %edx
	movq	%rbx, %rsi
	movq	%r14, %rdi
.LEHB31:
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_@PLT
	leaq	136(%rsp), %rdi
	movq	%rbx, %rsi
	call	_ZNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strERKNS_12basic_stringIcS2_S3_EE@PLT
.L407:
	movq	8(%rsp), %rsi
	movl	$44, %edx
	movq	%rbp, %rdi
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_@PLT
	movq	(%rax), %rdx
	movq	-24(%rdx), %rdx
	testb	$5, 32(%rax,%rdx)
	jne	.L436
	incl	%r13d
	jmp	.L407
.L436:
	movl	$1, %r15d
.L409:
	movl	$10, %edx
	movq	%rbx, %rsi
	movq	%r14, %rdi
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_@PLT
	movq	(%rax), %rdx
	movq	-24(%rdx), %rdx
	testb	$5, 32(%rax,%rdx)
	jne	.L437
	incl	%r15d
	jmp	.L409
.L437:
	leaq	584(%r12), %rdi
	xorl	%esi, %esi
	call	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate@PLT
	xorl	%edx, %edx
	xorl	%esi, %esi
	movq	%r14, %rdi
	call	_ZNSi5seekgElSt12_Ios_Seekdir@PLT
	movl	%r13d, %esi
	movq	%r12, %rdi
	call	_ZN6TFcore9initModelEi
.LEHE31:
	movl	%r15d, 4(%r12)
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	8(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L397
.L416:
	endbr64
	movq	%rax, %r12
.L404:
	movq	%rbp, %rdi
	call	_ZNSt12experimental10filesystem2v17__cxx114pathD1Ev
	jmp	.L434
.L412:
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
.L413:
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	8(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
.L434:
	movq	504(%rsp), %rax
	subq	%fs:40, %rax
	movq	%r12, %rdi
	jne	.L432
.L431:
.LEHB32:
	call	_Unwind_Resume@PLT
.LEHE32:
.L418:
	endbr64
	movq	%rax, %r12
	jmp	.L412
.L417:
	endbr64
	movq	%rax, %r12
	jmp	.L413
.L397:
	movq	504(%rsp), %rax
	subq	%fs:40, %rax
	je	.L415
.L432:
	call	__stack_chk_fail@PLT
.L415:
	addq	$520, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5330:
	.section	.gcc_except_table
.LLSDA5330:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE5330-.LLSDACSB5330
.LLSDACSB5330:
	.uleb128 .LEHB26-.LFB5330
	.uleb128 .LEHE26-.LEHB26
	.uleb128 .L419-.LFB5330
	.uleb128 0
	.uleb128 .LEHB27-.LFB5330
	.uleb128 .LEHE27-.LEHB27
	.uleb128 .L416-.LFB5330
	.uleb128 0
	.uleb128 .LEHB28-.LFB5330
	.uleb128 .LEHE28-.LEHB28
	.uleb128 .L420-.LFB5330
	.uleb128 0
	.uleb128 .LEHB29-.LFB5330
	.uleb128 .LEHE29-.LEHB29
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB30-.LFB5330
	.uleb128 .LEHE30-.LEHB30
	.uleb128 .L417-.LFB5330
	.uleb128 0
	.uleb128 .LEHB31-.LFB5330
	.uleb128 .LEHE31-.LEHB31
	.uleb128 .L418-.LFB5330
	.uleb128 0
	.uleb128 .LEHB32-.LFB5330
	.uleb128 .LEHE32-.LEHB32
	.uleb128 0
	.uleb128 0
.LLSDACSE5330:
	.text
	.size	_ZN6TFcore8loadDataENSt12experimental10filesystem2v17__cxx114pathE, .-_ZN6TFcore8loadDataENSt12experimental10filesystem2v17__cxx114pathE
	.section	.rodata._ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_.str1.1,"aMS",@progbits,1
.LC39:
	.string	"vector::_M_realloc_insert"
	.section	.text._ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_,"axG",@progbits,_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_,comdat
	.align 2
	.weak	_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_
	.type	_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_, @function
_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_:
.LFB6218:
	.cfi_startproc
	endbr64
	movabsq	$1152921504606846975, %rcx
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	8(%rdi), %rax
	movq	(%rdi), %r14
	movq	%rax, %rbx
	movq	%rax, (%rsp)
	subq	%r14, %rbx
	sarq	$3, %rbx
	cmpq	%rcx, %rbx
	jne	.L439
	leaq	.LC39(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L439:
	cmpq	%r14, (%rsp)
	movl	$1, %eax
	movq	%rsi, %r15
	movq	%rdi, %r13
	cmovne	%rbx, %rax
	movq	%rsi, %rbp
	addq	%rax, %rbx
	setc	%al
	subq	%r14, %r15
	movzbl	%al, %eax
	testq	%rax, %rax
	jne	.L449
	xorl	%r12d, %r12d
	testq	%rbx, %rbx
	je	.L444
	movabsq	$1152921504606846975, %rax
	cmpq	%rax, %rbx
	cmova	%rax, %rbx
	jmp	.L443
.L449:
	movq	%rcx, %rbx
.L443:
	leaq	0(,%rbx,8), %rdi
	movq	%rdx, 8(%rsp)
	call	_Znwm@PLT
	movq	8(%rsp), %rdx
	movq	%rax, %r12
.L444:
	movsd	(%rdx), %xmm0
	movsd	%xmm0, (%r12,%r15)
	testq	%r15, %r15
	jle	.L445
	movq	%r15, %rdx
	movq	%r14, %rsi
	movq	%r12, %rdi
	call	memmove@PLT
.L445:
	movq	(%rsp), %rax
	leaq	8(%r12,%r15), %rdx
	subq	%rbp, %rax
	testq	%rax, %rax
	jle	.L446
	movq	%rdx, %rdi
	movq	%rbp, %rsi
	movq	%rax, %rcx
	rep movsb
.L446:
	leaq	(%rdx,%rax), %rbp
	testq	%r14, %r14
	je	.L447
	movq	16(%r13), %rsi
	movq	%r14, %rdi
	subq	%r14, %rsi
	call	_ZdlPvm@PLT
.L447:
	leaq	(%r12,%rbx,8), %rax
	movq	%r12, 0(%r13)
	movq	%rbp, 8(%r13)
	movq	%rax, 16(%r13)
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE6218:
	.size	_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_, .-_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_
	.text
	.align 2
	.globl	_ZN6TFcore8loadDataESt6vectorIdSaIdEEi
	.type	_ZN6TFcore8loadDataESt6vectorIdSaIdEEi, @function
_ZN6TFcore8loadDataESt6vectorIdSaIdEEi:
.LFB5331:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xorl	%r13d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%rsi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movslq	%edx, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movl	%ebp, %esi
	movq	%rdi, %rbx
	pushq	%rcx
	.cfi_def_cfa_offset 48
	call	_ZN6TFcore9initModelEi
	movq	8(%r12), %rax
	subq	(%r12), %rax
	xorl	%edx, %edx
	sarq	$3, %rax
	divq	%rbp
	leaq	224(%rbx), %rbp
	movl	%eax, 4(%rbx)
.L457:
	movq	(%r12), %rdx
	movq	8(%r12), %rax
	subq	%rdx, %rax
	sarq	$3, %rax
	cmpq	%rax, %r13
	jnb	.L462
	movq	232(%rbx), %rsi
	leaq	(%rdx,%r13,8), %rdx
	cmpq	240(%rbx), %rsi
	je	.L458
	movsd	(%rdx), %xmm0
	addq	$8, %rsi
	movsd	%xmm0, -8(%rsi)
	movq	%rsi, 232(%rbx)
	jmp	.L459
.L458:
	movq	%rbp, %rdi
	call	_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_
.L459:
	incq	%r13
	jmp	.L457
.L462:
	popq	%rax
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5331:
	.size	_ZN6TFcore8loadDataESt6vectorIdSaIdEEi, .-_ZN6TFcore8loadDataESt6vectorIdSaIdEEi
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	-640172613
	.long	1037794527
	.align 8
.LC3:
	.long	0
	.long	-1075838976
	.align 8
.LC4:
	.long	869545553
	.long	1071220805
	.align 8
.LC5:
	.long	0
	.long	1065353216
	.align 8
.LC6:
	.long	0
	.long	2146959360
	.align 8
.LC7:
	.long	-350469331
	.long	1057634018
	.align 8
.LC8:
	.long	1255454751
	.long	898494074
	.align 8
.LC9:
	.long	0
	.long	-1070333952
	.align 8
.LC10:
	.long	-343597384
	.long	1067366481
	.align 8
.LC11:
	.long	-1717986918
	.long	1069128089
	.align 8
.LC12:
	.long	1202590843
	.long	1065646817
	.align 8
.LC13:
	.long	0
	.long	1079574528
	.align 8
.LC15:
	.long	0
	.long	1072693248
	.align 8
.LC16:
	.long	0
	.long	-1064355840
	.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:

#ifndef TFcore_H_
#include <hip/hip_runtime.h>

#define TFcore_H_

#pragma once
#include <array>

#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
#include <experimental/filesystem>

#include <iostream>
#include <fstream>
#include <istream>
#include <sstream>

#define _USE_MATH_DEFINES
#include <math.h>
#include <iomanip>

#include <vector>
#include <string>

#define EPSILON 1.00e-10 // minimum value for probability distribution

using namespace std;
namespace fs = std::experimental::filesystem;

class CTFcoreMFCDlg;

class TFcore {
public:
	TFcore();
	TFcore(string filename);
	TFcore(fs::path filename);
	//TFcore(CTFcoreMFCDlg& dlg);
	~TFcore();

private:
	//CTFcoreMFCDlg& dlg_;

public:
	void loadData(string filename);
	void loadData(fs::path filename);
	void loadData(vector<double> data, int ch);

public:
	int getNumSamples() { return numSamples; }
	int getNumChannels() { return numChannels; }
	int getPredict() { return mpred; }
	int getNumPatterns() { return M; }
	//int getNumRemaining() { return ((int)dataStack.size() / numChannels); }
	int getNumRemaining() { return (numSamples - samples); }
	double getProbMax() { return p_max; }
	double getProbThresh() { return p_star; }

public:
	void resetModel() { initModel(numChannels); }
	void initModel(int n);
	void setNumSamples(int numsamples) { numSamples = numsamples; }
	void setNumChannels(int numchannels) { numChannels = numchannels; }

public:
	bool isCollect() { return bCollect; }
	bool isCompute() { return bCompute; }
	bool isRegister() { return bRegister; }

	bool isRemaining() { return !inputFile.eof(); }

	bool isGPU_Product() { return bGPU_product; }
	bool isGPU_Diffusion() { return bGPU_diffusion; }

	void enableGPU_Product() { bGPU_product = true; }
	void disableGPU_Product() { bGPU_product = false; }

	void enableGPU_Diffusion() { bGPU_diffusion = true; }
	void disableGPU_Diffusion() { bGPU_diffusion = false; }

	void enableRegistration() { bFuncRegistration = true; }
	void disableRegistration() { bFuncRegistration = false; }

	void enableAdaptation() { bFuncAdaptation = true; }
	void disableAdaptation() { bFuncAdaptation = false; }

public:
	void getSample();
	void proceedIteration();
	void writeResult();

public:
	void exportModel(fs::path filename);
	void importModel(fs::path filename);

private:
	int numChannels;
	int numSamples;

	int samples;
	int M_MAX;

	double xmax;

	int XRES;
	int WIN_MAV;

	double alpha;
	double beta;

	double p_star;
	double* p_lik;

	double* mu_init;
	double* sig2_init;

	double* sig2_reg;
	double* sig2_update;

private:
	bool bCollect;
	bool bCompute;
	bool bRegister;

private:
	bool bGPU_product;
	bool bGPU_diffusion;

	bool bFuncRegistration;
	bool bFuncAdaptation;

public:
	double* pdist_prior;
	double* pdist_post;
	double* pdist_lik;

	double* dp;
	double* ddp;
	double* p_shift;
	double* dp_shift;

private:
	int mpred;
	int M;
	int reglast;
	int reghold;
	double p_max;

	double* xbin;
	double* xnew;
	int* idnew;

	double* emgMAV;
	double* emgStack;

private:
	vector<double> dataStack;

private:
	int tableSize;
	int discretizeStep;

	void registerPattern(double* mu, double* sig2);
	void computeLikelihood(double* mu, double* sig2);
	void computeProduct();
	void computeDiffusion();

	void normalizeLikelihood();
	void normalizePrior();
	void normalizePost();

	double* normalTable;
	void constructLookup();

private:
	void setVal(double* vector, double val);
	void setZero(double* vector);
	void setOnes(double* vector);

private:
	double* _pdist_prior;
	double* _pdist_lik;
	double* _pdist_post;

	double* _p_shift;
	double* _dp_shift;
	double* _dp;
	double* _ddp;

private:
	fstream inputFile;
	fstream outputFile;
};

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

                                        # End of file scope inline assembly
	.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 __hip_cuid_

	.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_
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.amdgpu_metadata
---
amdhsa.kernels:  []
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
