/*******************************************************************
*			Sparse Auto-Encoder 
*					by
*		David Klaus and Alex Welles
*			EC527 Final Project	
*
*	Serial Implementation With Timing Code
*	
*	Compile with: 
*
*	nvcc -Xcompiler -fopenmp -lgomp -o sparseAutoencoder sparseAutoencoder.cu
*
*******************************************************************/

#include <cstdio>
#include <cstdlib>
#include <time.h>
#include <math.h>
#include <string>
#include <sstream>
#include <fstream>
#include <iostream>
#include <string>

#define GIG 1000000000
#define CPG 2.527
#define OPTIONS 1

//Parameters necessary to set up network
#define PATCHES_PATH	"c_patches.csv"
#define W1_PATH			"W1.csv"
#define W2_PATH			"W2.csv"
#define IMAGE_DIM		512		//pixels in 1 dimension (assumes square)
#define SAMPLE_SIZE		10000  //number of input patches
#define	VISIBLE_SIZE 	64      //number of input/output nodes 
#define	HIDDEN_SIZE 	25	   	//number hidden nodes
#define	HIDDEN_LAYERS 	1		//number hidden layers 
#define NUM_SAMPLE_ELEMENTS SAMPLE_SIZE * VISIBLE_SIZE

//desired average activation of hidden nodes
#define	SPARSITY_PARAM 	0.01
#define SPARSITY_COMPLEMENT 1-SPARSITY_PARAM
//weight decay paramater
#define	LAMBDA			0.0001
//weight of sparsity penalty term
#define	BETA			3.0

using namespace std;

/* VECTOR FUNCTIONS */
void initializeMatrixWeightsRand(float *arr, int rows, int cols, int seed);
void initializeMatrixWeightsZero(float *arr, int rows, int cols);
void initializeVectorWeightsZero(float *arr, int numElements);
void mmm_kij(float* src1, float* src2, float* dest, int row1, int col1, int row2,int col2);
void mmm_ijk(float* src1, float* src2, float* dest, int row1, int col1, int row2,int col2);
void dotPdt(float* src1,float* src2, float* dest, int length);
float altDotPdt(float* A, float* B, int length);//BROKEN DONT USE
void readCSV(float* array, int numElements, string filename);
void addVectors(float* src1, float* src2, float* dest, int length);
void subVectors(float* src1, float* src2, float* dest, int length);
void vectElemSigmoid(float* src,float* dest,int length);
void vectElemIntDiv(float* src, float* dest,int length,int divisor);
void vectElemFloatDiv(float* src, float* dest,int length,float divisor);
void vectElemVectDiv(float* src1,float* src2,float* dest,int length);
void initializeVector(float *array, int length, float val);
void vectElemVectMult(float* src1, float* src2, float* dest, int length);
void vectElemFloatMult(float* src, float* dest, int length,float multiplicand);
void matrixTranspose(float* src,float* dest,int rows, int cols);
float normVector(float* src,int length);
void vectElemLog(float* src,float* dest,int length);
float sumVector(float* src,int length);
/* PRINTOUT, DEBUG, AND TIMING FUNCTIONS */
void printVector(float* A, int length);
void printMatrix(float* A, int rows, int cols);
void printTiming(struct timespec* time_stamp,int numTimings);


int main(int argc, char *argv[]){

	/***********************************
	 		  TIMING STUFF
    ***********************************/

	struct timespec diff(struct timespec start, struct timespec end);
    struct timespec time1, time2;
    struct timespec time_stamp[OPTIONS];//Can be increased if necessary.

	/***********************************
	 		ALLOCATE MEMORY
    ***********************************/

	//Arrays on host memory (CPU)
	//input patches to train the autoencoder
	float *h_inputs;// 64 x 10000 [visible x sample]
	//sparsity vector
	float *h_rhoHat;//hidden x 1 [25 x 1]
	//weight matrices
	float *h_W1;//hidden X visible [25 x 64]
	float *h_W2;//visible X hidden [64 x 25]
	//weight vectors
	float *h_b1;//hidden X 1 [25 x 1]
	float *h_b2;//visible X 1 [64 x 1]
	//weight gradient matrices
	float *h_W1grad;//hidden x visible [25 x 64]
	float *h_W2grad;//visible x hidden [64 x 25]
	//weight gradient vectors
	float *h_b1grad;//hidden x 1 [25 x 1]
	float *h_b2grad;//visible x 1 [64 x 1]
	//z product vectors
	float *h_z2;//hidden x 1 [25 x 1]
	float *h_z3;//visible x 1 [64 x 1]
	//a product vectors
	float *h_a2;//hidden x 1 [25 x 1]
	float *h_a3;//visible x 1 [64 x 1]
	//partial derivatives for back prop
	float *h_d2;//hidden x 1 [25 x 1]
	float *h_d3;//visible x 1 [64 x 1]
	//temp vectors: both are 64 elements but will not always be used
	float *h_temp1;//64 x 1
	float *h_temp2;//64 x1
	//temp matrix
	float *h_Wtemp1;//64 x 25 or 25 x 64
	float *h_Wtemp2;//25 x 64 or 64 x 25
	//sparsity penalty
	float *h_sparsePen;//25x1


	//Allocate input patches on host memory (CPU)
	size_t allocSize = VISIBLE_SIZE * SAMPLE_SIZE * sizeof(float);
	h_inputs = (float *) malloc(allocSize);

	//Allocate sparsity vector on host memory (CPU)
	allocSize = HIDDEN_SIZE * sizeof(float);
	h_rhoHat = (float *) malloc(allocSize);
	
	//Alocate weight arrays on host memory (CPU)
	allocSize = VISIBLE_SIZE * HIDDEN_SIZE * sizeof(float);
	h_W1 = (float *) malloc(allocSize);
	h_W2 = (float *) malloc(allocSize);

	//Alocate gradient arrays on host memory (CPU)
	allocSize = VISIBLE_SIZE * HIDDEN_SIZE * sizeof(float);
	h_W1grad = (float *) malloc(allocSize);
	h_W2grad = (float *) malloc(allocSize);
	
	//Allocate weight vectors on host memory (CPU)
	allocSize = HIDDEN_SIZE * sizeof(float);
	h_b1 = (float *) malloc(allocSize);
	allocSize = VISIBLE_SIZE * sizeof(float);
	h_b2 = (float *) malloc(allocSize);	

	//Allocate weight vectors on host memory (CPU)
	allocSize = HIDDEN_SIZE * sizeof(float);
	h_b1grad = (float *) malloc(allocSize);
	allocSize = VISIBLE_SIZE * sizeof(float);
	h_b2grad = (float *) malloc(allocSize);	

	//Allocate z product vectors (CPU)
	allocSize = HIDDEN_SIZE * sizeof(float);
	h_z2 = (float *) malloc(allocSize);
	allocSize = VISIBLE_SIZE * sizeof(float);
	h_z3 = (float *) malloc(allocSize);

	//Allocate a product vectors (CPU)
	allocSize = HIDDEN_SIZE * sizeof(float);
	h_a2 = (float *) malloc(allocSize);
	allocSize = VISIBLE_SIZE * sizeof(float);
	h_a3 = (float *) malloc(allocSize);

	//Allocate partial vectors (CPU)
	allocSize = HIDDEN_SIZE * sizeof(float);
	h_d2 = (float *) malloc(allocSize);
	allocSize = VISIBLE_SIZE * sizeof(float);
	h_d3 = (float *) malloc(allocSize);

	//Allocate temp vectors (CPU)
	allocSize = VISIBLE_SIZE * sizeof(float);
	h_temp1 = (float *) malloc(allocSize);
	h_temp2 = (float *) malloc(allocSize);

	//Allocate temp matrix (CPU)
	allocSize = VISIBLE_SIZE * HIDDEN_SIZE * sizeof(float);
	h_Wtemp1 = (float *) malloc(allocSize);
	h_Wtemp2 = (float *) malloc(allocSize);

	//Allocate sparsity penalty vector (CPU)
	allocSize = HIDDEN_SIZE * sizeof(float);
	h_sparsePen = (float *) malloc(allocSize);

	/***********************************
	 			VARIABLES
    ***********************************/
		
	float cost = 0;

	/***********************************
	 	INITIALIZE NETWORK WEIGHTS
    ***********************************/

	//Initialize the weight matrices to random values
	initializeMatrixWeightsRand(h_W1, HIDDEN_SIZE, VISIBLE_SIZE, 2254);
	initializeMatrixWeightsRand(h_W2, VISIBLE_SIZE, HIDDEN_SIZE, 1345);

	initializeMatrixWeightsZero(h_W2grad,VISIBLE_SIZE,HIDDEN_SIZE);
	initializeMatrixWeightsZero(h_W1grad,HIDDEN_SIZE,VISIBLE_SIZE);

	initializeVectorWeightsZero(h_b1, HIDDEN_SIZE);
	initializeVectorWeightsZero(h_b2, VISIBLE_SIZE);
	initializeVectorWeightsZero(h_rhoHat, HIDDEN_SIZE);
	initializeVectorWeightsZero(h_z2, HIDDEN_SIZE);
	initializeVectorWeightsZero(h_a2, HIDDEN_SIZE);
	initializeVectorWeightsZero(h_z3, VISIBLE_SIZE);
	initializeVectorWeightsZero(h_a3, VISIBLE_SIZE);


	/***********************************
	 	   READ IN SAMPLE PATCHES
    ***********************************/

	readCSV(h_inputs, NUM_SAMPLE_ELEMENTS, PATCHES_PATH);
	//the following are for debug only
	readCSV(h_W1, HIDDEN_SIZE*VISIBLE_SIZE, W1_PATH);
	readCSV(h_W2, HIDDEN_SIZE*VISIBLE_SIZE, W2_PATH);


	/***************************************
			   BEGIN SERIAL TIMING
	****************************************/

    printf("\nTesting Baseline Sparse Autoencoder");
    clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &time1);
    int OPTION = 0;//default is zero. Placeholder in case.

	/***************************************
      CALCULATE SPARSITY CONSTRAINT RHO-HAT
    ****************************************/

    /* 
    This involves forward propagation through 10000 64 pixel values 
    (note values are stored as floats). These are stored as a 64000
    element vector. Another forward propagation is performed later.
	*/

	for(int i = 0; i < NUM_SAMPLE_ELEMENTS; i+=VISIBLE_SIZE){//for number of input patches
		//we are performing the following matrix op
		//[hsize x vsize] * [vsize x 1] = [vsize x 1]
		//[25x64] * [64x1] = [64x1]
		//using 25 dot product calls
		for(int j = 0;j < HIDDEN_SIZE;j++ ){

			dotPdt(&h_inputs[i],&h_W1[j*VISIBLE_SIZE],&h_z2[j],VISIBLE_SIZE);
			//h_z2[j] = altDotPdt(&h_inputs[i],&h_W1[j*VISIBLE_SIZE],VISIBLE_SIZE);
			// &h_inputs[i] 				--> pointer to current input patch
			// &h_W1[j*VISIBLE_SIZE] 		--> pointer to current row of the W1 weights
			// &h_z2[j]						--> pointer to current output element of z1
			// VISIBLE_SIZE					--> patch size, should be 64
		}
		//[25x1] + [25x1] = [25x1]
		//[hidden x 1] + [hidden x1] = [hidden x 1]
		addVectors(h_z2,h_b1,h_z2, HIDDEN_SIZE);
		//sigma([25x1]) = [25x1] 
		vectElemSigmoid(h_z2,h_a2,HIDDEN_SIZE);
		//calc the sparsity constraint
		addVectors(h_rhoHat,h_a2,h_rhoHat,HIDDEN_SIZE);
	}
	vectElemIntDiv(h_rhoHat,h_rhoHat,HIDDEN_SIZE,SAMPLE_SIZE);

	/*
	cout << "z2" << endl;//DEBUG
	printVector(h_z2,HIDDEN_SIZE);//DEBUG
	cout << "a2" << endl;//DEBUG
	printVector(h_a2,HIDDEN_SIZE);//DEBUG
	cout << "rhoHat" << endl;//DEBUG
	printVector(h_rhoHat,HIDDEN_SIZE);//DEBUG
	*/

	/***************************************
      	FORWARD AND BACKWARD PROPAGATION
    ****************************************/

    for(int i = 0; i < NUM_SAMPLE_ELEMENTS; i+=VISIBLE_SIZE){
    	
    	/***************************************
      		FORWARD PROPAGATION a(1) --> a(2)				//DEBUG PASSED
    	****************************************/

      	/*
      	%forward propagate
	    %from a1 = input to a2
	    xM = data(:,i);%current input
	    z2 = W1 * xM + b1;
	    a2 = 1./ ( 1 + exp(-z2));
    	*/

    	//we are performing the following matrix op
		//[hsize x vsize] * [vsize x 1] = [vsize x 1]
		//[25x64] * [64x1] = [64x1]
		//using 25 dot product calls
    	for(int j = 0;j < HIDDEN_SIZE;j++ ){

			dotPdt(&h_inputs[i],&h_W1[j*VISIBLE_SIZE],&h_z2[j],VISIBLE_SIZE);
			//h_z2[j] = altDotPdt(&h_inputs[i],&h_W1[j*VISIBLE_SIZE],VISIBLE_SIZE);
			// &h_inputs[i] 				--> pointer to current input patch
			// &h_W1[j*VISIBLE_SIZE] 		--> pointer to current row of the W1 weights
			// &h_z2[j]						--> pointer to current output element of z1
			// VISIBLE_SIZE					--> patch size, should be 64
		}
		//[25x1] + [25x1] = [25x1]
		//[hidden x 1] + [hidden x1] = [hidden x 1]
		addVectors(h_z2,h_b1,h_z2, HIDDEN_SIZE);
		//sigma([25x1]) = [25x1] 
		vectElemSigmoid(h_z2,h_a2,HIDDEN_SIZE);


		/***************************************
      		FORWARD PROPAGATION a(2) --> a(3)				//DEBUG FAILED
    	****************************************/

      	/*
      	%from a2 to a3 = output
	    z3 = W2 * a2 + b2;
	    a3 = 1./ (1 + exp(-z3));
		*/

		//we are performing the following matrix op
		//[visible x hidden] * [hidden x 1] = [visible x 1]
		//[64x25] * [25x1] = [64x1]
		//using 64 dot product calls

		for(int j = 0;j < VISIBLE_SIZE;j++ ){
			//the key difference here is that we are using h_a2 as the input
			dotPdt(h_a2,&h_W2[j*HIDDEN_SIZE],&h_z3[j],VISIBLE_SIZE);//  W2 * a2 --> h_z3
			//h_z2[j] = altDotPdt(&h_inputs[i],&h_W1[j*VISIBLE_SIZE],VISIBLE_SIZE);
			// h_a2 						--> pointer to current input vector
			// &h_W1[j*VISIBLE_SIZE] 		--> pointer to current row of the W1 weights
			// &h_z2[j]						--> pointer to current output element of z1
		}

		//[64x1] + [64x1] = [64x1]
		//[visible x 1] + [visible x1] = [visible x 1]
		addVectors(h_z3,h_b2,h_z3,VISIBLE_SIZE);
		//sigma([64x1]) = [64x1] 
		vectElemSigmoid(h_z3,h_a3,VISIBLE_SIZE);


		/***************************************
      		    	BACK PROPAGATION
    	****************************************/
      	/*
      	%back propagate
	    %a3 -> a2
	    d3 = -(xM - a3) .* (a3 .* (1 - a3));
	    %d2 = (transpose(W2) * d3) .* (a2 .* (1 - a2));
	    d2 = ((W2' * d3) + beta .* (-(sparsityParam./rhoHat)
	         + (1-sparsityParam)./(1-rhoHat))).* (a2 .* (1 - a2));

	    %compute partial derivatives
	    W2grad = W2grad + d3 * a2';
	    b2grad = b2grad + d3;
	    W1grad = W1grad + d2 * xM';
	    b1grad = b1grad + d2; 
	  
	    %for calculating cost
	    %equiv. to (HwbXi-y)^2
	    cost = cost + norm(a3 - xM)^2; 
      	*/

	    //d3 = -(xM - a3) .* (a3 .* (1 - a3));
	    initializeVector(h_temp1, VISIBLE_SIZE, 1.0);//vec(1) --> h_temp1	    
	    subVectors(h_temp1,h_a3,h_temp1,VISIBLE_SIZE);//(1 - a3) --> h_temp1
	    vectElemVectMult(h_a3,h_temp1,h_temp1,VISIBLE_SIZE);//(a3 .* (1 - a3)) --> h_temp2
	    subVectors(h_a3,&h_inputs[i],h_temp2,VISIBLE_SIZE);//-(xM - a3) = (a3 - xM) --> h_temp2
	    vectElemVectMult(h_temp1,h_temp2,h_d3,VISIBLE_SIZE);//d3 = -(xM - a3) .* (a3 .* (1 - a3)); --> h_d3
	    //initializeVector(h_temp1,VISIBLE_SIZE,-1);
	    //vectElemVectMult(h_temp1,h_d3,h_d3,VISIBLE_SIZE);
	    
	    //d2 = ((W2' * d3) + beta .* (-(sparsityParam./rhoHat) + (1-sparsityParam)./(1-rhoHat))) .* (a2 .* (1 - a2));
	    
	    //Note the h_temp1 & 2 vectors are actually VISIBLE_SIZE long
	    //but we are only using HIDDEN_SIZE values
	    initializeVector(h_temp2, HIDDEN_SIZE, 1.0);//(1)
	    subVectors(h_temp2,h_rhoHat,h_temp2,HIDDEN_SIZE);//(1-rhoHat) --> h_temp2
	    initializeVector(h_temp1, HIDDEN_SIZE, SPARSITY_COMPLEMENT);//(1-sparsityParam) --> h_temp1
	    vectElemVectDiv(h_temp1,h_temp2,h_temp2,HIDDEN_SIZE);//(1-sparsityParam)./(1-rhoHat) --> h_temp2

	  
	    initializeVector(h_temp1,HIDDEN_SIZE,-1.0*SPARSITY_PARAM);//-(sparsityParam) --> h_temp1
	    vectElemVectDiv(h_temp1,h_rhoHat,h_temp1,HIDDEN_SIZE);//-(sparsityParam./rhoHat) --> h_temp1

	    addVectors(h_temp1,h_temp2,h_temp1,HIDDEN_SIZE);//(-(sparsityParam./rhoHat) + (1-sparsityParam)./(1-rhoHat)) --> h_temp1
	    vectElemFloatMult(h_temp1,h_temp1,HIDDEN_SIZE,BETA);//beta .* (-(sparsityParam./rhoHat) + (1-sparsityParam)./(1-rhoHat))) --> h_temp1

	    matrixTranspose(h_W2,h_Wtemp1,VISIBLE_SIZE,HIDDEN_SIZE);//W2' --> h_Wtemp1

		//Parallelize with OpenMP
	    for(int j = 0;j < VISIBLE_SIZE;j++){//(W2' * d3) --> h_temp2
	    	dotPdt(h_d3,&h_Wtemp1[j*HIDDEN_SIZE],&h_temp2[j],VISIBLE_SIZE);
	    }

	    //((W2' * d3) + beta .* (-(sparsityParam./rhoHat) + (1-sparsityParam)./(1-rhoHat))) --> h_temp2
	    addVectors(h_temp2,h_temp1,h_temp2,HIDDEN_SIZE);
	    initializeVector(h_temp1, HIDDEN_SIZE, 1);//1-a2 --> h_temp1
	    subVectors(h_temp1,h_a2,h_temp1,HIDDEN_SIZE);//(1-a2) --> h_temp1
	    vectElemVectMult(h_a2,h_temp1,h_temp1,HIDDEN_SIZE);//(a2 .* (1 - a2)) --> h_temp1
	    //d2 = ((W2' * d3) + beta .* (-(sparsityParam./rhoHat) + (1-sparsityParam)./(1-rhoHat))) .* (a2 .* (1 - a2));--> h_d2
	    vectElemVectMult(h_temp1,h_temp2,h_d2,HIDDEN_SIZE);

	    /*
		%compute partial derivatives
	    W2grad = W2grad + d3 * a2';
	    b2grad = b2grad + d3;
	    W1grad = W1grad + d2 * xM';
	    b1grad = b1grad + d2; 
	    */

		/*
		int ii, jj;
		for(ii = 0; i < HIDDEN_SIZE; ii++) {
			for(jj = 0; jj < VISIBLE_SIZE; jj++) {
				h_Wtemp1[ii*HIDDEN_SIZE+jj]= h_d3[jj]*h_a2[ii];
			}
		}*/
	    mmm_kij(h_d3,h_a2,h_Wtemp1,VISIBLE_SIZE,1,1,HIDDEN_SIZE);//d3 * a2' --> h_Wtemp1
	    addVectors(h_W2grad,h_Wtemp1,h_W2grad,HIDDEN_SIZE*VISIBLE_SIZE);//W2grad + d3 * a2'; --> h_W2grad
	    addVectors(h_b2grad,h_d3,h_b2grad,VISIBLE_SIZE);//b2grad = b2grad + d3;

		/*
		for(ii = 0; ii < HIDDEN_SIZE; ii++) {
			for(jj = 0; jj < VISIBLE_SIZE; jj++) {
				h_Wtemp1[ii*HIDDEN_SIZE+jj]= h_d2[jj]*h_inputs[i+ii];
			}
		}*/
	    mmm_kij(h_d2,&h_inputs[i],h_Wtemp1,HIDDEN_SIZE,1,1,VISIBLE_SIZE);//d2 * xM' --> h_Wtemp1
	    addVectors(h_W1grad,h_Wtemp1,h_W1grad,HIDDEN_SIZE*VISIBLE_SIZE);//W1grad = W1grad + d2 * xM'; --> h_W1grad
	    addVectors(h_b1grad,h_d2,h_b1grad,HIDDEN_SIZE);//b1grad = b1grad + d2; --> h_b1grad
 
	    /*
	    %for calculating cost
	    %equiv. to (HwbXi-y)^2
	    cost = cost + norm(a3 - xM)^2; 
		*/

	    subVectors(h_a3,&h_inputs[i],h_temp1,VISIBLE_SIZE);//(a3 - xM) --> h_temp1
		float temp = 0;
		temp = normVector(h_temp1,VISIBLE_SIZE);//norm(a3 - xM)^2; --> temp
		cost += temp*temp;//cost = cost + norm(a3 - xM)^2; --> cost
    }

	/*
    %W1grad = [(1/m) \Delta W^{(1)} + \lambda W^{(1)}]
	W2grad = W2grad ./ M + lambda .* W2;
	b2grad = b2grad ./ M;
	W1grad = W1grad ./ M + lambda .* W1;
	b1grad = b1grad ./ M;
	*/

	//NOTE: M = SAMPLE_SIZE = 10000 by default

	//W2grad = W2grad ./ M + lambda .* W2;
	vectElemFloatDiv(h_W2grad,h_W2grad,VISIBLE_SIZE*HIDDEN_SIZE,SAMPLE_SIZE);//W2grad ./ M  --> h_W2grad
	vectElemFloatMult(h_W2,h_Wtemp1,VISIBLE_SIZE*HIDDEN_SIZE,LAMBDA);// lambda .* W2; --> h_Wtemp1
	addVectors(h_W2grad,h_Wtemp1,h_W2grad,VISIBLE_SIZE*HIDDEN_SIZE);//W2grad = W2grad ./ M + lambda .* W2; --> h_W2grad
	//b2grad = b2grad ./ M;
	vectElemFloatDiv(h_b2grad,h_b2grad,VISIBLE_SIZE,SAMPLE_SIZE);//b2grad = b2grad ./ M; --> h_b2grad
	//W1grad = W1grad ./ M + lambda .* W1;
	vectElemFloatDiv(h_W2grad,h_W2grad,VISIBLE_SIZE*HIDDEN_SIZE,SAMPLE_SIZE);//W1grad ./ M  --> h_W2grad
	vectElemFloatMult(h_W2,h_Wtemp1,VISIBLE_SIZE*HIDDEN_SIZE,LAMBDA);// lambda .* W1; --> h_Wtemp1
	addVectors(h_W2grad,h_Wtemp1,h_W2grad,VISIBLE_SIZE*HIDDEN_SIZE);//W1grad = W1grad ./ M + lambda .* W1; --> h_W1grad
	//b1grad = b1grad ./ M;
	vectElemFloatDiv(h_b1grad,h_b1grad,HIDDEN_SIZE,SAMPLE_SIZE);//b1grad = b1grad ./ M; --> h_b1grad

	/*
	%rho
	sparsePen = sparsityParam .* log(sparsityParam./rhoHat) + (1-sparsityParam).*log((1-sparsityParam)./(1-rhoHat));
	*/

	initializeVector(h_temp1,HIDDEN_SIZE,1.0);//1--> h_temp1
	subVectors(h_temp1,h_rhoHat,h_temp2,HIDDEN_SIZE);//(1-rhoHat) --> h_temp2
	initializeVector(h_temp1, HIDDEN_SIZE, SPARSITY_COMPLEMENT);//(1-sparsityParam) --> h_temp1
	vectElemVectDiv(h_temp1,h_temp2,h_temp2,HIDDEN_SIZE);//(1-sparsityParam)./(1-rhoHat) --> h_temp2
	vectElemLog(h_temp2,h_temp2,HIDDEN_SIZE);//log((1-sparsityParam)./(1-rhoHat)) --> h_temp2
	vectElemVectMult(h_temp1,h_temp2,h_temp2,HIDDEN_SIZE);//(1-sparsityParam).*log((1-sparsityParam)./(1-rhoHat)) --> h_temp2
	initializeVector(h_temp1,HIDDEN_SIZE,SPARSITY_PARAM);//sparsityParam --> h_temp1
	vectElemVectDiv(h_temp1,h_rhoHat,h_temp1,HIDDEN_SIZE);//(sparsityParam./rhoHat) --> h_temp1
	vectElemLog(h_temp1,h_temp1,HIDDEN_SIZE);//log(sparsityParam./rhoHat) --> h_temp1
	vectElemFloatMult(h_temp1,h_temp1,HIDDEN_SIZE,SPARSITY_PARAM);//sparsityParam .* log(sparsityParam./rhoHat)--> h_temp1
	addVectors(h_temp1,h_temp2,h_sparsePen,HIDDEN_SIZE);//sparsePen = --> h_sparsePen

	/*
	cost = (cost / (2 * M)) + (lambda / 2 ) * (sum(sum(W1.^2)) + (sum(sum(W2.^2)))) + beta * sum(sparsePen); 
	*/

	vectElemVectMult(h_W1,h_W1,h_Wtemp1,VISIBLE_SIZE*HIDDEN_SIZE);//W1.^2 --> h_Wtemp1
	float sumW1 = sumVector(h_Wtemp1,VISIBLE_SIZE*HIDDEN_SIZE);//sum(sum(W1.^2)) --> sumW1
	vectElemVectMult(h_W2,h_W2,h_Wtemp2,VISIBLE_SIZE*HIDDEN_SIZE);//W2.^2 --> h_Wtemp2
	float sumW2 = sumVector(h_Wtemp2,VISIBLE_SIZE*HIDDEN_SIZE);// (sum(sum(W2.^2))) --> sumW2
	
	cost = (cost/(2*SAMPLE_SIZE)) + (LAMBDA/2)*(sumW1 + sumW2) + BETA*sumVector(h_sparsePen,HIDDEN_SIZE);

	/***************************************
	     END AND PRINT SERIAL TIMING
	****************************************/

    clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &time2);
    time_stamp[OPTION] = diff(time1,time2);

	printTiming(time_stamp,OPTIONS);

    /***************************************
			   DEBUG OUTPUTS
	****************************************/
	
    cout << "z2" << endl;//DEBUG
	printVector(h_z2,HIDDEN_SIZE);//DEBUG
	cout << "a2" << endl;//DEBUG
	printVector(h_a2,HIDDEN_SIZE);//DEBUG
	cout << "rhoHat" << endl;//DEBUG
	printVector(h_rhoHat,HIDDEN_SIZE);//DEBUG
	cout << "z3" << endl;//DEBUG
	printVector(h_z3,VISIBLE_SIZE);//DEBUG
	cout << "a3" << endl;//DEBUG
	printVector(h_a3,VISIBLE_SIZE);//DEBUG
	cout << "Cost: " << cost << endl;//DEBUG
	cout << "sparsePen" << endl;//DEBUGs
	printVector(h_sparsePen,HIDDEN_SIZE);//DEBUG

	/*
	cout << "Wtemp1" << endl;//DEBUG
	printVector(h_Wtemp1,VISIBLE_SIZE*HIDDEN_SIZE);//DEBUG
	
	cout << "W2" << endl;//DEBUG
	printVector(h_W2, HIDDEN_SIZE);//DEBUG
	mmm_kij(h_W2,h_a2,h_z3,VISIBLE_SIZE,HIDDEN_SIZE,HIDDEN_SIZE,1);//DEBUG
	cout<< "Z3_kij" << endl;//DEBUG
	printVector(h_z3, VISIBLE_SIZE);//DEBUG

	mmm_kij(h_W2,h_a2,h_z3,VISIBLE_SIZE,HIDDEN_SIZE,HIDDEN_SIZE,1);//DEBUG
	cout << "Z3_ijk" << endl;//DEBUG
	printVector(h_z3,VISIBLE_SIZE);//DEBUG

	cout << "d2" << endl;//DEBUG
	printVector(h_d2,HIDDEN_SIZE);//DEBUG
	cout << "d3" << endl;//DEBUG
	printVector(h_d3,VISIBLE_SIZE);//DEBUG
	
	cout << "b1" << endl;//DEBUG
	printVector(h_b1,HIDDEN_SIZE);//DEBUG
	cout << "b2" << endl;//DEBUG
	printVector(h_b2,VISIBLE_SIZE);//DEBUG
	*/

	/***************************************
			   FREEING MEMORY
	****************************************/

    free(h_inputs);
    free(h_rhoHat);
    free(h_W1);
    free(h_W2);
    free(h_b1);
    free(h_b2);
    free(h_W1grad);
    free(h_W2grad);
    free(h_b1grad);
    free(h_b2grad);
    free(h_z2);
    free(h_z3);
    free(h_a2);
    free(h_a3);
    free(h_d2);
    free(h_d3);
    free(h_temp1);
    free(h_temp2);
    free(h_Wtemp1);
    free(h_Wtemp2);
    free(h_sparsePen);

    return 0;
}

/***********************************************
		TIMING FUNCTIONS AND STRUCTS
***********************************************/

struct timespec diff(struct timespec start, struct timespec end)
{
  struct timespec temp;
  if ((end.tv_nsec-start.tv_nsec)<0) {
    temp.tv_sec = end.tv_sec-start.tv_sec-1;
    temp.tv_nsec = 1000000000+end.tv_nsec-start.tv_nsec;
  } else {
    temp.tv_sec = end.tv_sec-start.tv_sec;
    temp.tv_nsec = end.tv_nsec-start.tv_nsec;
  }
  return temp;
}

void printTiming(struct timespec* time_stamp,int numTimings){
	
	for (int j = 0; j < numTimings; j++) {
        if (j != 0) printf(", ");
        printf("\nCPU time: %ld (nsec)", (long int)((double)(CPG)*(double)
            (GIG * time_stamp[j].tv_sec + time_stamp[j].tv_nsec)));
    }
    printf("\n");
}


/***********************************************
		NAIVE VECTOR OPERATIONS
***********************************************/

float sumVector(float* src,int length){
	float sum = 0;
	for(int i = 0;i < length;i++){
		sum += src[i];
	}
	return sum;
}

void vectElemLog(float* src,float* dest,int length){
	for(int i = 0;i < length;i++){
		dest[i] = log(src[i]);
	}
}

float normVector(float* src,int length){
	float x = 0;
	float sum = 0;
	for(int i = 0;i < length;i++){
		x = src[i];
		sum += x*x;
	}
	sum = sqrt(sum);
	return sum;
}

void vectElemSigmoid(float* src,float* dest,int length){
	for(int i = 0; i < length;i++){
		dest[i] = float(1/(1+exp(-src[i])));
	}
}

void vectElemVectMult(float* src1, float* src2, float* dest, int length){
	for(int i = 0; i < length;i++){
		dest[i] = src1[i] * src2[i];
	}
}

//faster if float is used instead?
void vectElemIntDiv(float* src, float* dest,int length,int divisor){
	for(int i = 0;i < length;i++){
		dest[i] = float(src[i]/divisor);
	}
}

void vectElemFloatDiv(float* src, float* dest,int length,float divisor){
	for(int i = 0;i < length;i++){
		dest[i] = float(src[i]/divisor);
	}
}

void vectElemFloatMult(float* src, float* dest, int length,float multiplicand){
	for(int i = 0;i < length;i++){
		dest[i] = src[i] * multiplicand;
	}
}

void vectElemVectDiv(float* src1,float* src2,float* dest,int length){
	for(int i = 0;i < length;i++){
		dest[i] = (src1[i]/src2[i]);
	}
}

//Just for debugging eh?
void printVector(float* A, int length){
	for(int i = 0;i < length; i++){
		cout << A[i] << endl;
	}
}

void initializeVector(float *array, int length, float val){
	for(int i = 0; i < length; i++){
		array[i] = val;
	}
}

//Just for debugging eh?
void printMatrix(float* A, int rows, int cols){
	for(int i = 0;i < rows; i++){
		for(int j = 0;j < cols;j++){
			cout << A[i*rows+j] << "\t";
		}
		cout << endl;
	}
}

void addVectors(float* src1, float* src2, float* dest, int length){
	for(int i = 0;i < length; i++){
		dest[i] = src1[i] + src2[i];
	}
}

void subVectors(float* src1, float* src2, float* dest, int length){
	for(int i = 0;i < length;i++){
		dest[i] = src1[i] - src2[i];
	}
}

void dotPdt(float* src1,float* src2, float *dest, int length){
	float accum = 0;
	for(int i = 0; i< length;i++){
		accum += src1[i] * src2[i];
	}
	*dest = accum;
	//cout << accum << endl;//DEBUG
}

//don't use me. I am broken.
float altDotPdt(float* A, float* B, int length){
	float accum = 0;
	for(int i = 0; i < length; i++){
		accum += A[i] + B[i];
	}
	return accum;
}

void matrixTranspose(float* src,float* dest,int rows,int cols){
	for(int i = 0;i < rows;i++){
		for(int j = 0;j < cols;j++){
			//cout << src[i*rows+j] << "I: " << i << "J: " << j << endl;//DEBUG
			dest[j*rows+i] = src[i*cols+j];
		}
	} 	
}

void initializeMatrixWeightsRand(float *arr, int rows, int cols, int seed) {
    int i;
    float randNum, r;
    srand(seed);

    //rows and cols depend on hidden and visible sizes
    int numElements = rows*cols;

    for (i = 0; i < numElements; i++) {
    	//Choose weights uniformly from the interval [-r, r]
        r = sqrt(6) / sqrt(rows+cols+1); 
        randNum = float(rand()%10000)/10000;
        randNum = randNum * 2 * r - r;
        arr[i] = randNum;
    }
}

void initializeMatrixWeightsZero(float *arr, int rows, int cols) {
    //rows and cols depend on hidden and visible sizes
    int numElements = rows*cols;

    for (int i = 0; i < numElements; i++) {
        arr[i] = 0.0;
    }
}

//initialize the vector weights to 0
void initializeVectorWeightsZero(float *arr, int numElements){
	int i;
	for (i = 0; i < numElements; i++){
		arr[i] = 0;
	}
}


void mmm_kij(float* src1, float* src2, float* dest, int row1, int col1, int row2, int col2){
	for(int k = 0; k < row1; k++){
		for(int i = 0; i < col1; i++){//or row2
			for(int j = 0; j < col2; j++){
				dest[k*col2+j] += src1[j*col1+i] * src2[i*col2+j]; 
				//cout << "src1: " << src1[i*col1+j] << " src2: " << src2[j*col2+k] << endl;//DEBUG
				//cout << "I: " << i << " J: " << j << " K: " << k << endl;//DEBUG
			}
		}
	}
}

//http://www.cplusplus.com/forum/general/13087/
//http://www.cplusplus.com/forum/general/17771/
//http://www.cplusplus.com/forum/beginner/24906/
void readCSV(float* array, int numElements, string filename){
	
	ifstream infile(filename.c_str());
	int index = 0;

	if(infile){
		string line;
		while(getline(infile,line)){
			istringstream sep(line);
			string result;
			while(getline(sep, result,',')){
				array[index] = atof(result.c_str());
				if(array[index] == 0){
					cout << index << endl;//DEBUG
				}
				index++;
			}
		}
	}
	//cout << "COUNT WAS " << index << endl;//DEBUG
	//cout << "Last val was " << array[index-1] << endl;//DEBUG
}


	.file	"tmpxft_002638e4_00000000-6_sparseAutoencoder.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3852:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE3852:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.align 2
	.type	_ZNSolsEPFRSoS_E.isra.0, @function
_ZNSolsEPFRSoS_E.isra.0:
.LFB4586:
	.cfi_startproc
	jmp	*%rsi
	.cfi_endproc
.LFE4586:
	.size	_ZNSolsEPFRSoS_E.isra.0, .-_ZNSolsEPFRSoS_E.isra.0
	.globl	_Z4diff8timespecS_
	.type	_Z4diff8timespecS_, @function
_Z4diff8timespecS_:
.LFB3824:
	.cfi_startproc
	endbr64
	movq	%rdx, %rax
	movq	%rcx, %rdx
	subq	%rdi, %rax
	subq	%rsi, %rdx
	jns	.L4
	leaq	1000000000(%rcx), %rdx
	decq	%rax
	subq	%rsi, %rdx
.L4:
	ret
	.cfi_endproc
.LFE3824:
	.size	_Z4diff8timespecS_, .-_Z4diff8timespecS_
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	", "
.LC2:
	.string	"\nCPU time: %ld (nsec)"
.LC3:
	.string	"\n"
	.text
	.globl	_Z11printTimingP8timespeci
	.type	_Z11printTimingP8timespeci, @function
_Z11printTimingP8timespeci:
.LFB3825:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rdi, %rbx
	pushq	%rcx
	.cfi_def_cfa_offset 48
.L7:
	cmpl	%r12d, %ebp
	jge	.L14
	testl	%ebp, %ebp
	je	.L8
	movq	%r13, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L8:
	imulq	$1000000000, (%rbx), %rax
	addq	8(%rbx), %rax
	leaq	.LC2(%rip), %rsi
	incl	%ebp
	cvtsi2sdq	%rax, %xmm0
	movl	$2, %edi
	xorl	%eax, %eax
	addq	$16, %rbx
	mulsd	.LC1(%rip), %xmm0
	cvttsd2siq	%xmm0, %rdx
	call	__printf_chk@PLT
	jmp	.L7
.L14:
	popq	%rdx
	.cfi_def_cfa_offset 40
	leaq	.LC3(%rip), %rsi
	popq	%rbx
	.cfi_def_cfa_offset 32
	movl	$2, %edi
	popq	%rbp
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE3825:
	.size	_Z11printTimingP8timespeci, .-_Z11printTimingP8timespeci
	.globl	_Z9sumVectorPfi
	.type	_Z9sumVectorPfi, @function
_Z9sumVectorPfi:
.LFB3826:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	xorps	%xmm0, %xmm0
.L16:
	cmpl	%eax, %esi
	jle	.L18
	addss	(%rdi,%rax,4), %xmm0
	incq	%rax
	jmp	.L16
.L18:
	ret
	.cfi_endproc
.LFE3826:
	.size	_Z9sumVectorPfi, .-_Z9sumVectorPfi
	.globl	_Z11vectElemLogPfS_i
	.type	_Z11vectElemLogPfS_i, @function
_Z11vectElemLogPfS_i:
.LFB3827:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movq	%rsi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movl	%edx, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	pushq	%rcx
	.cfi_def_cfa_offset 48
.L20:
	cmpl	%ebx, %ebp
	jle	.L23
	movss	(%r12,%rbx,4), %xmm0
	call	logf@PLT
	movss	%xmm0, 0(%r13,%rbx,4)
	incq	%rbx
	jmp	.L20
.L23:
	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
.LFE3827:
	.size	_Z11vectElemLogPfS_i, .-_Z11vectElemLogPfS_i
	.globl	_Z10normVectorPfi
	.type	_Z10normVectorPfi, @function
_Z10normVectorPfi:
.LFB3828:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	xorps	%xmm1, %xmm1
.L25:
	cmpl	%eax, %esi
	jle	.L27
	movss	(%rdi,%rax,4), %xmm0
	incq	%rax
	mulss	%xmm0, %xmm0
	addss	%xmm0, %xmm1
	jmp	.L25
.L27:
	movaps	%xmm1, %xmm0
	jmp	sqrtf@PLT
	.cfi_endproc
.LFE3828:
	.size	_Z10normVectorPfi, .-_Z10normVectorPfi
	.globl	_Z15vectElemSigmoidPfS_i
	.type	_Z15vectElemSigmoidPfS_i, @function
_Z15vectElemSigmoidPfS_i:
.LFB3829:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movq	%rsi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movl	%edx, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	pushq	%rcx
	.cfi_def_cfa_offset 48
.L29:
	cmpl	%ebx, %ebp
	jle	.L32
	movss	(%r12,%rbx,4), %xmm0
	xorps	.LC5(%rip), %xmm0
	call	expf@PLT
	movss	.LC6(%rip), %xmm1
	addss	%xmm1, %xmm0
	divss	%xmm0, %xmm1
	movss	%xmm1, 0(%r13,%rbx,4)
	incq	%rbx
	jmp	.L29
.L32:
	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
.LFE3829:
	.size	_Z15vectElemSigmoidPfS_i, .-_Z15vectElemSigmoidPfS_i
	.globl	_Z16vectElemVectMultPfS_S_i
	.type	_Z16vectElemVectMultPfS_S_i, @function
_Z16vectElemVectMultPfS_S_i:
.LFB3830:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
.L34:
	cmpl	%eax, %ecx
	jle	.L36
	movss	(%rdi,%rax,4), %xmm0
	mulss	(%rsi,%rax,4), %xmm0
	movss	%xmm0, (%rdx,%rax,4)
	incq	%rax
	jmp	.L34
.L36:
	ret
	.cfi_endproc
.LFE3830:
	.size	_Z16vectElemVectMultPfS_S_i, .-_Z16vectElemVectMultPfS_S_i
	.globl	_Z14vectElemIntDivPfS_ii
	.type	_Z14vectElemIntDivPfS_ii, @function
_Z14vectElemIntDivPfS_ii:
.LFB3831:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
.L38:
	cmpl	%eax, %edx
	jle	.L40
	cvtsi2ssl	%ecx, %xmm1
	movss	(%rdi,%rax,4), %xmm0
	divss	%xmm1, %xmm0
	movss	%xmm0, (%rsi,%rax,4)
	incq	%rax
	jmp	.L38
.L40:
	ret
	.cfi_endproc
.LFE3831:
	.size	_Z14vectElemIntDivPfS_ii, .-_Z14vectElemIntDivPfS_ii
	.globl	_Z16vectElemFloatDivPfS_if
	.type	_Z16vectElemFloatDivPfS_if, @function
_Z16vectElemFloatDivPfS_if:
.LFB3832:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
.L42:
	cmpl	%eax, %edx
	jle	.L44
	movss	(%rdi,%rax,4), %xmm1
	divss	%xmm0, %xmm1
	movss	%xmm1, (%rsi,%rax,4)
	incq	%rax
	jmp	.L42
.L44:
	ret
	.cfi_endproc
.LFE3832:
	.size	_Z16vectElemFloatDivPfS_if, .-_Z16vectElemFloatDivPfS_if
	.globl	_Z17vectElemFloatMultPfS_if
	.type	_Z17vectElemFloatMultPfS_if, @function
_Z17vectElemFloatMultPfS_if:
.LFB3833:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
.L46:
	cmpl	%eax, %edx
	jle	.L48
	movss	(%rdi,%rax,4), %xmm1
	mulss	%xmm0, %xmm1
	movss	%xmm1, (%rsi,%rax,4)
	incq	%rax
	jmp	.L46
.L48:
	ret
	.cfi_endproc
.LFE3833:
	.size	_Z17vectElemFloatMultPfS_if, .-_Z17vectElemFloatMultPfS_if
	.globl	_Z15vectElemVectDivPfS_S_i
	.type	_Z15vectElemVectDivPfS_S_i, @function
_Z15vectElemVectDivPfS_S_i:
.LFB3834:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
.L50:
	cmpl	%eax, %ecx
	jle	.L52
	movss	(%rdi,%rax,4), %xmm0
	divss	(%rsi,%rax,4), %xmm0
	movss	%xmm0, (%rdx,%rax,4)
	incq	%rax
	jmp	.L50
.L52:
	ret
	.cfi_endproc
.LFE3834:
	.size	_Z15vectElemVectDivPfS_S_i, .-_Z15vectElemVectDivPfS_S_i
	.globl	_Z11printVectorPfi
	.type	_Z11printVectorPfi, @function
_Z11printVectorPfi:
.LFB3835:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	_ZSt4cout(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	pushq	%rdx
	.cfi_def_cfa_offset 48
.L54:
	cmpl	%ebx, %ebp
	jle	.L57
	movq	%r13, %rdi
	cvtss2sd	(%r12,%rbx,4), %xmm0
	incq	%rbx
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	jmp	.L54
.L57:
	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
.LFE3835:
	.size	_Z11printVectorPfi, .-_Z11printVectorPfi
	.globl	_Z16initializeVectorPfif
	.type	_Z16initializeVectorPfif, @function
_Z16initializeVectorPfif:
.LFB3836:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
.L59:
	cmpl	%eax, %esi
	jle	.L61
	movss	%xmm0, (%rdi,%rax,4)
	incq	%rax
	jmp	.L59
.L61:
	ret
	.cfi_endproc
.LFE3836:
	.size	_Z16initializeVectorPfif, .-_Z16initializeVectorPfif
	.section	.rodata.str1.1
.LC7:
	.string	"\t"
	.text
	.globl	_Z11printMatrixPfii
	.type	_Z11printMatrixPfii, @function
_Z11printMatrixPfii:
.LFB3837:
	.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
	xorl	%r13d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%esi, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%edx, 12(%rsp)
.L63:
	cmpl	%ebx, %r13d
	jge	.L62
	movslq	%r12d, %rax
	xorl	%r15d, %r15d
	leaq	0(%rbp,%rax,4), %r14
.L66:
	cmpl	%r15d, 12(%rsp)
	jle	.L68
	leaq	_ZSt4cout(%rip), %rdi
	cvtss2sd	(%r14,%r15,4), %xmm0
	incq	%r15
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	leaq	.LC7(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	jmp	.L66
.L68:
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	incl	%r13d
	addl	%ebx, %r12d
	call	_ZNSolsEPFRSoS_E.isra.0
	jmp	.L63
.L62:
	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
.LFE3837:
	.size	_Z11printMatrixPfii, .-_Z11printMatrixPfii
	.globl	_Z10addVectorsPfS_S_i
	.type	_Z10addVectorsPfS_S_i, @function
_Z10addVectorsPfS_S_i:
.LFB3838:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
.L70:
	cmpl	%eax, %ecx
	jle	.L72
	movss	(%rdi,%rax,4), %xmm0
	addss	(%rsi,%rax,4), %xmm0
	movss	%xmm0, (%rdx,%rax,4)
	incq	%rax
	jmp	.L70
.L72:
	ret
	.cfi_endproc
.LFE3838:
	.size	_Z10addVectorsPfS_S_i, .-_Z10addVectorsPfS_S_i
	.globl	_Z10subVectorsPfS_S_i
	.type	_Z10subVectorsPfS_S_i, @function
_Z10subVectorsPfS_S_i:
.LFB3839:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
.L74:
	cmpl	%eax, %ecx
	jle	.L76
	movss	(%rdi,%rax,4), %xmm0
	subss	(%rsi,%rax,4), %xmm0
	movss	%xmm0, (%rdx,%rax,4)
	incq	%rax
	jmp	.L74
.L76:
	ret
	.cfi_endproc
.LFE3839:
	.size	_Z10subVectorsPfS_S_i, .-_Z10subVectorsPfS_S_i
	.globl	_Z6dotPdtPfS_S_i
	.type	_Z6dotPdtPfS_S_i, @function
_Z6dotPdtPfS_S_i:
.LFB3840:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	xorps	%xmm0, %xmm0
.L78:
	cmpl	%eax, %ecx
	jle	.L80
	movss	(%rdi,%rax,4), %xmm1
	mulss	(%rsi,%rax,4), %xmm1
	incq	%rax
	addss	%xmm1, %xmm0
	jmp	.L78
.L80:
	movss	%xmm0, (%rdx)
	ret
	.cfi_endproc
.LFE3840:
	.size	_Z6dotPdtPfS_S_i, .-_Z6dotPdtPfS_S_i
	.globl	_Z9altDotPdtPfS_i
	.type	_Z9altDotPdtPfS_i, @function
_Z9altDotPdtPfS_i:
.LFB3841:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	xorps	%xmm0, %xmm0
.L82:
	cmpl	%eax, %edx
	jle	.L84
	movss	(%rdi,%rax,4), %xmm1
	addss	(%rsi,%rax,4), %xmm1
	incq	%rax
	addss	%xmm1, %xmm0
	jmp	.L82
.L84:
	ret
	.cfi_endproc
.LFE3841:
	.size	_Z9altDotPdtPfS_i, .-_Z9altDotPdtPfS_i
	.globl	_Z15matrixTransposePfS_ii
	.type	_Z15matrixTransposePfS_ii, @function
_Z15matrixTransposePfS_ii:
.LFB3842:
	.cfi_startproc
	endbr64
	movslq	%edx, %r11
	xorl	%r10d, %r10d
	movq	%rdi, %r8
	xorl	%r9d, %r9d
	salq	$2, %r11
	cmpl	%edx, %r10d
	jl	.L94
	ret
.L94:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
.L92:
	movslq	%r9d, %rax
	movq	%rsi, %rdi
	leaq	(%r8,%rax,4), %rbx
	xorl	%eax, %eax
.L89:
	cmpl	%eax, %ecx
	jle	.L95
	movss	(%rbx,%rax,4), %xmm0
	incq	%rax
	movss	%xmm0, (%rdi)
	addq	%r11, %rdi
	jmp	.L89
.L95:
	incl	%r10d
	addq	$4, %rsi
	addl	%ecx, %r9d
	cmpl	%edx, %r10d
	jl	.L92
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3842:
	.size	_Z15matrixTransposePfS_ii, .-_Z15matrixTransposePfS_ii
	.globl	_Z27initializeMatrixWeightsRandPfiii
	.type	_Z27initializeMatrixWeightsRandPfiii, @function
_Z27initializeMatrixWeightsRandPfiii:
.LFB3843:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xorl	%r14d, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movq	%rdi, %r12
	movl	%ecx, %edi
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movl	%edx, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movl	%esi, %ebx
	movl	%ebx, %r13d
	imull	%ebp, %r13d
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	call	srand@PLT
.L97:
	cmpl	%r14d, %r13d
	jle	.L100
	leal	1(%rbx,%rbp), %eax
	cvtsi2sdl	%eax, %xmm0
	call	sqrt@PLT
	movsd	.LC8(%rip), %xmm1
	divsd	%xmm0, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movss	%xmm1, 12(%rsp)
	call	rand@PLT
	movl	$10000, %ecx
	movss	12(%rsp), %xmm1
	cltd
	idivl	%ecx
	cvtsi2ssl	%edx, %xmm0
	divss	.LC9(%rip), %xmm0
	addss	%xmm0, %xmm0
	mulss	%xmm1, %xmm0
	subss	%xmm1, %xmm0
	movss	%xmm0, (%r12,%r14,4)
	incq	%r14
	jmp	.L97
.L100:
	addq	$16, %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
	.cfi_endproc
.LFE3843:
	.size	_Z27initializeMatrixWeightsRandPfiii, .-_Z27initializeMatrixWeightsRandPfiii
	.globl	_Z27initializeMatrixWeightsZeroPfii
	.type	_Z27initializeMatrixWeightsZeroPfii, @function
_Z27initializeMatrixWeightsZeroPfii:
.LFB3845:
	.cfi_startproc
	endbr64
	imull	%edx, %esi
	xorl	%eax, %eax
.L102:
	cmpl	%eax, %esi
	jle	.L104
	movl	$0x00000000, (%rdi,%rax,4)
	incq	%rax
	jmp	.L102
.L104:
	ret
	.cfi_endproc
.LFE3845:
	.size	_Z27initializeMatrixWeightsZeroPfii, .-_Z27initializeMatrixWeightsZeroPfii
	.globl	_Z27initializeVectorWeightsZeroPfi
	.type	_Z27initializeVectorWeightsZeroPfi, @function
_Z27initializeVectorWeightsZeroPfi:
.LFB3846:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
.L106:
	cmpl	%eax, %esi
	jle	.L108
	movl	$0x00000000, (%rdi,%rax,4)
	incq	%rax
	jmp	.L106
.L108:
	ret
	.cfi_endproc
.LFE3846:
	.size	_Z27initializeVectorWeightsZeroPfi, .-_Z27initializeVectorWeightsZeroPfi
	.globl	_Z7mmm_kijPfS_S_iiii
	.type	_Z7mmm_kijPfS_S_iiii, @function
_Z7mmm_kijPfS_S_iiii:
.LFB3847:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%r9d, %r9d
	xorl	%r11d, %r11d
	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
	movl	%ecx, %r12d
	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
	movslq	%r8d, %rbx
	movl	56(%rsp), %r13d
	salq	$2, %rbx
	movq	%rdx, -8(%rsp)
.L110:
	cmpl	%r12d, %r11d
	jge	.L109
	movq	-8(%rsp), %rcx
	movslq	%r9d, %rax
	movq	%rdi, %r10
	xorl	%esi, %esi
	leaq	(%rcx,%rax,4), %rax
	xorl	%ecx, %ecx
	movq	%rax, -16(%rsp)
.L115:
	cmpl	%r8d, %ecx
	jge	.L112
	movslq	%esi, %rax
	movq	-16(%rsp), %rdx
	movq	%r10, %r14
	leaq	0(%rbp,%rax,4), %r15
	xorl	%eax, %eax
.L113:
	cmpl	%eax, %r13d
	jle	.L117
	movss	(%r14), %xmm0
	mulss	(%r15,%rax,4), %xmm0
	addq	$4, %rdx
	incq	%rax
	addss	-4(%rdx), %xmm0
	addq	%rbx, %r14
	movss	%xmm0, -4(%rdx)
	jmp	.L113
.L117:
	incl	%ecx
	addq	$4, %r10
	addl	%r13d, %esi
	jmp	.L115
.L112:
	incl	%r11d
	addl	%r13d, %r9d
	jmp	.L110
.L109:
	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
.LFE3847:
	.size	_Z7mmm_kijPfS_S_iiii, .-_Z7mmm_kijPfS_S_iiii
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB3875:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	movq	%rax, %rdi
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE3875:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.rodata._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.str1.1,"aMS",@progbits,1
.LC10:
	.string	"basic_string: construction from null is not valid"
	.section	.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_,"axG",@progbits,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC5IS3_EEPKcRKS3_,comdat
	.align 2
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_, @function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_:
.LFB4192:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	16(%rdi), %rax
	movq	%rax, (%rdi)
	testq	%rsi, %rsi
	jne	.L121
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L126
	leaq	.LC10(%rip), %rdi
	call	_ZSt19__throw_logic_errorPKc@PLT
.L121:
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	movq	%rsi, %rbp
	call	strlen@PLT
	movq	%rax, (%rsp)
	leaq	0(%rbp,%rax), %r12
	cmpq	$15, %rax
	jbe	.L123
	movq	%rsp, %rsi
	xorl	%edx, %edx
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm@PLT
	movq	%rax, (%rbx)
	movq	(%rsp), %rax
	movq	%rax, 16(%rbx)
.L123:
	movq	(%rbx), %rdi
	movq	%r12, %rdx
	movq	%rbp, %rsi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13_S_copy_charsEPcPKcS7_@PLT
	movq	(%rsp), %rax
	movq	(%rbx), %rdx
	movq	%rax, 8(%rbx)
	movb	$0, (%rdx,%rax)
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	je	.L124
.L126:
	call	__stack_chk_fail@PLT
.L124:
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4192:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_, .-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
	.set	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.text
	.globl	_Z7readCSVPfiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.type	_Z7readCSVPfiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, @function
_Z7readCSVPfiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
.LFB3848:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA3848
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdx, %rax
	movq	%rdi, %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
	subq	$1000, %rsp
	.cfi_def_cfa_offset 1056
	movq	(%rax), %rsi
	movq	%fs:40, %rdx
	movq	%rdx, 984(%rsp)
	xorl	%edx, %edx
	leaq	464(%rsp), %rcx
	movl	$8, %edx
	movq	%rcx, %rdi
	movq	%rcx, 8(%rsp)
.LEHB0:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE0:
	movl	752(%rsp), %ebx
	andl	$5, %ebx
	jne	.L128
	leaq	32(%rsp), %rax
	xorl	%edx, %edx
	movb	$0, 32(%rsp)
	leaq	16(%rsp), %rbp
	movq	%rax, 16(%rsp)
	movq	%rdx, 24(%rsp)
.L129:
	movq	8(%rsp), %rdi
	movq	%rbp, %rsi
.LEHB1:
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	(%rax), %rdx
	movq	-24(%rdx), %rdx
	testb	$5, 32(%rax,%rdx)
	jne	.L144
	leaq	80(%rsp), %r12
	movl	$8, %edx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	call	_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode@PLT
.LEHE1:
	leaq	64(%rsp), %rax
	movb	$0, 64(%rsp)
	movslq	%ebx, %r13
	leaq	48(%rsp), %r14
	movq	%rax, 48(%rsp)
	xorl	%eax, %eax
	movq	%rax, 56(%rsp)
.L130:
	movl	$44, %edx
	movq	%r14, %rsi
	movq	%r12, %rdi
	movl	%r13d, %ebx
.LEHB2:
	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	.L145
	movq	48(%rsp), %rdi
	call	atof@PLT
	xorps	%xmm1, %xmm1
	cvtsd2ss	%xmm0, %xmm0
	ucomiss	%xmm1, %xmm0
	movss	%xmm0, (%r15,%r13,4)
	jp	.L133
	je	.L131
.L133:
	incq	%r13
	jmp	.L130
.L131:
	movl	%ebx, %esi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
.LEHE2:
	jmp	.L133
.L145:
	movq	%r14, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%r12, %rdi
	call	_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	jmp	.L129
.L144:
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
.L128:
	movq	8(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	984(%rsp), %rax
	subq	%fs:40, %rax
	je	.L139
	jmp	.L142
.L140:
	endbr64
	movq	%rax, %rbx
.L136:
	movq	%r14, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%r12, %rdi
	call	_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	jmp	.L137
.L141:
	endbr64
	movq	%rax, %rbx
.L137:
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	8(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	984(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L142
	movq	%rbx, %rdi
.LEHB3:
	call	_Unwind_Resume@PLT
.LEHE3:
.L142:
	call	__stack_chk_fail@PLT
.L139:
	addq	$1000, %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
.LFE3848:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA3848:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE3848-.LLSDACSB3848
.LLSDACSB3848:
	.uleb128 .LEHB0-.LFB3848
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB3848
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L141-.LFB3848
	.uleb128 0
	.uleb128 .LEHB2-.LFB3848
	.uleb128 .LEHE2-.LEHB2
	.uleb128 .L140-.LFB3848
	.uleb128 0
	.uleb128 .LEHB3-.LFB3848
	.uleb128 .LEHE3-.LEHB3
	.uleb128 0
	.uleb128 0
.LLSDACSE3848:
	.text
	.size	_Z7readCSVPfiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, .-_Z7readCSVPfiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.section	.rodata.str1.1
.LC11:
	.string	"c_patches.csv"
.LC12:
	.string	"W1.csv"
.LC13:
	.string	"W2.csv"
.LC14:
	.string	"\nTesting Baseline Sparse Autoencoder"
.LC23:
	.string	"z2"
.LC24:
	.string	"a2"
.LC25:
	.string	"rhoHat"
.LC26:
	.string	"z3"
.LC27:
	.string	"a3"
.LC28:
	.string	"Cost: "
.LC29:
	.string	"sparsePen"
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB3823:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA3823
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$2560000, %edi
	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	$248, %rsp
	.cfi_def_cfa_offset 304
	movq	%fs:40, %rax
	movq	%rax, 232(%rsp)
	xorl	%eax, %eax
	leaq	192(%rsp), %r12
	leaq	176(%rsp), %r13
	call	malloc@PLT
	movl	$100, %edi
	movq	%rax, %rbp
	call	malloc@PLT
	movl	$6400, %edi
	movq	%rax, 32(%rsp)
	call	malloc@PLT
	movl	$6400, %edi
	movq	%rax, %rbx
	call	malloc@PLT
	movl	$6400, %edi
	movq	%rax, 48(%rsp)
	call	malloc@PLT
	movl	$6400, %edi
	movq	%rax, 104(%rsp)
	call	malloc@PLT
	movl	$100, %edi
	movq	%rax, 24(%rsp)
	call	malloc@PLT
	movl	$256, %edi
	movq	%rax, 112(%rsp)
	call	malloc@PLT
	movl	$100, %edi
	movq	%rax, 136(%rsp)
	call	malloc@PLT
	movl	$256, %edi
	movq	%rax, 80(%rsp)
	call	malloc@PLT
	movl	$100, %edi
	movq	%rax, 88(%rsp)
	call	malloc@PLT
	movl	$256, %edi
	movq	%rax, 40(%rsp)
	call	malloc@PLT
	movl	$100, %edi
	movq	%rax, 72(%rsp)
	call	malloc@PLT
	movl	$256, %edi
	movq	%rax, 56(%rsp)
	call	malloc@PLT
	movl	$100, %edi
	movq	%rax, 64(%rsp)
	call	malloc@PLT
	movl	$256, %edi
	movq	%rax, 120(%rsp)
	call	malloc@PLT
	movl	$256, %edi
	movq	%rax, 96(%rsp)
	call	malloc@PLT
	movl	$256, %edi
	movq	%rax, (%rsp)
	call	malloc@PLT
	movl	$6400, %edi
	movq	%rax, 8(%rsp)
	call	malloc@PLT
	movl	$6400, %edi
	movq	%rax, 16(%rsp)
	call	malloc@PLT
	movl	$100, %edi
	movq	%rax, 144(%rsp)
	call	malloc@PLT
	movl	$2254, %ecx
	movl	$64, %edx
	movq	%rbx, %rdi
	movl	$25, %esi
	movq	%rax, 128(%rsp)
	call	_Z27initializeMatrixWeightsRandPfiii
	movq	48(%rsp), %rdi
	movl	$1345, %ecx
	movl	$25, %edx
	movl	$64, %esi
	call	_Z27initializeMatrixWeightsRandPfiii
	movq	24(%rsp), %rdi
	movl	$25, %edx
	movl	$64, %esi
	call	_Z27initializeMatrixWeightsZeroPfii
	movq	104(%rsp), %rdi
	movl	$64, %edx
	movl	$25, %esi
	call	_Z27initializeMatrixWeightsZeroPfii
	movq	112(%rsp), %rdi
	movl	$25, %esi
	movq	%r13, %rdx
	call	_Z27initializeVectorWeightsZeroPfi
	movq	136(%rsp), %rdi
	movl	$64, %esi
	call	_Z27initializeVectorWeightsZeroPfi
	movq	32(%rsp), %rdi
	movl	$25, %esi
	call	_Z27initializeVectorWeightsZeroPfi
	movq	40(%rsp), %rdi
	call	_Z27initializeVectorWeightsZeroPfi
	movq	56(%rsp), %rdi
	call	_Z27initializeVectorWeightsZeroPfi
	movq	72(%rsp), %rdi
	movl	$64, %esi
	call	_Z27initializeVectorWeightsZeroPfi
	movq	64(%rsp), %rdi
	call	_Z27initializeVectorWeightsZeroPfi
	leaq	.LC11(%rip), %rsi
	movq	%r12, %rdi
.LEHB4:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE4:
	movq	%r12, %rdx
	movl	$640000, %esi
	movq	%rbp, %rdi
.LEHB5:
	call	_Z7readCSVPfiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LEHE5:
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%r13, %rdx
	movq	%r12, %rdi
	movq	%r12, %r13
	leaq	.LC12(%rip), %rsi
.LEHB6:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE6:
	movq	%r12, %rdx
	movl	$1600, %esi
	movq	%rbx, %rdi
.LEHB7:
	call	_Z7readCSVPfiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LEHE7:
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	176(%rsp), %rdx
	leaq	.LC13(%rip), %rsi
	movq	%r12, %rdi
.LEHB8:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE8:
	movq	48(%rsp), %rdi
	movq	%r12, %rdx
	movl	$1600, %esi
.LEHB9:
	call	_Z7readCSVPfiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LEHE9:
	movq	%r12, %rdi
	movq	%rbp, %r13
	movq	%rbp, %r12
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	.LC14(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
.LEHB10:
	call	__printf_chk@PLT
	leaq	160(%rsp), %rsi
	movl	$2, %edi
	leaq	2560000(%rbp), %r15
	call	clock_gettime@PLT
	leaq	6400(%rbx), %r14
.L147:
	movq	40(%rsp), %rdx
	movq	%rbx, %rsi
.L148:
	movl	$64, %ecx
	movq	%r13, %rdi
	call	_Z6dotPdtPfS_S_i
	addq	$256, %rsi
	addq	$4, %rdx
	cmpq	%r14, %rsi
	jne	.L148
	movq	40(%rsp), %rdx
	movq	112(%rsp), %rsi
	movl	$25, %ecx
	addq	$256, %r13
	movq	%rdx, %rdi
	call	_Z10addVectorsPfS_S_i
	movq	56(%rsp), %rsi
	movq	40(%rsp), %rdi
	movl	$25, %edx
	call	_Z15vectElemSigmoidPfS_i
	movq	32(%rsp), %rdx
	movq	56(%rsp), %rsi
	movl	$25, %ecx
	movq	%rdx, %rdi
	call	_Z10addVectorsPfS_S_i
	cmpq	%r15, %r13
	jne	.L147
	movq	32(%rsp), %rsi
	movl	$10000, %ecx
	movl	$25, %edx
	movq	%rsi, %rdi
	call	_Z14vectElemIntDivPfS_ii
	movl	$0x00000000, 156(%rsp)
.L150:
	movq	40(%rsp), %rdx
	movq	%rbx, %rsi
.L151:
	movl	$64, %ecx
	movq	%r12, %rdi
	call	_Z6dotPdtPfS_S_i
	addq	$256, %rsi
	addq	$4, %rdx
	cmpq	%r14, %rsi
	jne	.L151
	movq	40(%rsp), %rdx
	movq	112(%rsp), %rsi
	movl	$25, %ecx
	movq	%rdx, %rdi
	call	_Z10addVectorsPfS_S_i
	movq	56(%rsp), %rsi
	movq	40(%rsp), %rdi
	movl	$25, %edx
	call	_Z15vectElemSigmoidPfS_i
	movq	48(%rsp), %rsi
	movq	72(%rsp), %rdx
	leaq	6400(%rsi), %r8
.L152:
	movq	56(%rsp), %rdi
	movl	$64, %ecx
	call	_Z6dotPdtPfS_S_i
	addq	$100, %rsi
	addq	$4, %rdx
	cmpq	%rsi, %r8
	jne	.L152
	movq	72(%rsp), %rdx
	movq	136(%rsp), %rsi
	movq	%rdx, %rdi
	call	_Z10addVectorsPfS_S_i
	movq	64(%rsp), %rsi
	movq	72(%rsp), %rdi
	movl	$64, %edx
	call	_Z15vectElemSigmoidPfS_i
	movq	(%rsp), %rdi
	movl	$64, %esi
	movss	.LC6(%rip), %xmm0
	movl	$64, %ecx
	call	_Z16initializeVectorPfif
	movq	(%rsp), %rdx
	movq	64(%rsp), %rsi
	movq	%rdx, %rdi
	call	_Z10subVectorsPfS_S_i
	movq	(%rsp), %rdx
	movq	64(%rsp), %rdi
	movq	%rdx, %rsi
	call	_Z16vectElemVectMultPfS_S_i
	movq	8(%rsp), %rdx
	movq	64(%rsp), %rdi
	movq	%r12, %rsi
	call	_Z10subVectorsPfS_S_i
	movq	96(%rsp), %rdx
	movq	8(%rsp), %rsi
	movq	(%rsp), %rdi
	call	_Z16vectElemVectMultPfS_S_i
	movq	8(%rsp), %rdi
	movl	$25, %esi
	movss	.LC6(%rip), %xmm0
	movl	$25, %ecx
	call	_Z16initializeVectorPfif
	movq	8(%rsp), %rdx
	movq	32(%rsp), %rsi
	movq	%rdx, %rdi
	call	_Z10subVectorsPfS_S_i
	movq	(%rsp), %rdi
	movl	$25, %esi
	movss	.LC15(%rip), %xmm0
	call	_Z16initializeVectorPfif
	movq	8(%rsp), %rdx
	movq	(%rsp), %rdi
	movq	%rdx, %rsi
	call	_Z15vectElemVectDivPfS_S_i
	movq	(%rsp), %rdi
	movl	$25, %esi
	movss	.LC16(%rip), %xmm0
	call	_Z16initializeVectorPfif
	movq	(%rsp), %rdx
	movq	32(%rsp), %rsi
	movq	%rdx, %rdi
	call	_Z15vectElemVectDivPfS_S_i
	movq	(%rsp), %rdx
	movq	8(%rsp), %rsi
	movq	%rdx, %rdi
	call	_Z10addVectorsPfS_S_i
	movq	(%rsp), %rsi
	movl	$25, %edx
	movss	.LC17(%rip), %xmm0
	movq	%rsi, %rdi
	call	_Z17vectElemFloatMultPfS_if
	movq	16(%rsp), %rsi
	movq	48(%rsp), %rdi
	movl	$64, %edx
	call	_Z15matrixTransposePfS_ii
	movq	16(%rsp), %rsi
	movq	8(%rsp), %rdx
	leaq	6400(%rsi), %r8
.L153:
	movq	96(%rsp), %rdi
	movl	$64, %ecx
	call	_Z6dotPdtPfS_S_i
	addq	$100, %rsi
	addq	$4, %rdx
	cmpq	%r8, %rsi
	jne	.L153
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	movl	$25, %ecx
	movl	$1, %r8d
	movl	$1, %r9d
	movq	%rdx, %rdi
	call	_Z10addVectorsPfS_S_i
	movq	(%rsp), %rdi
	movl	$25, %esi
	movss	.LC6(%rip), %xmm0
	call	_Z16initializeVectorPfif
	movq	(%rsp), %rdx
	movq	56(%rsp), %rsi
	movq	%rdx, %rdi
	call	_Z10subVectorsPfS_S_i
	movq	(%rsp), %rdx
	movq	56(%rsp), %rdi
	movq	%rdx, %rsi
	call	_Z16vectElemVectMultPfS_S_i
	movq	120(%rsp), %rdx
	movq	8(%rsp), %rsi
	movq	(%rsp), %rdi
	call	_Z16vectElemVectMultPfS_S_i
	movl	$64, %ecx
	pushq	%rax
	.cfi_def_cfa_offset 312
	pushq	$25
	.cfi_def_cfa_offset 320
	movq	32(%rsp), %rdx
	movq	72(%rsp), %rsi
	movq	112(%rsp), %rdi
	call	_Z7mmm_kijPfS_S_iiii
	movq	40(%rsp), %rdx
	movq	32(%rsp), %rsi
	movl	$1600, %ecx
	movl	$1, %r9d
	movq	%rdx, %rdi
	call	_Z10addVectorsPfS_S_i
	movq	104(%rsp), %rdx
	movq	112(%rsp), %rsi
	movl	$64, %ecx
	movq	%rdx, %rdi
	call	_Z10addVectorsPfS_S_i
	movq	32(%rsp), %rdx
	movq	%r12, %rsi
	movq	136(%rsp), %rdi
	movl	$25, %ecx
	movl	$64, (%rsp)
	call	_Z7mmm_kijPfS_S_iiii
	movq	120(%rsp), %rdx
	movq	32(%rsp), %rsi
	movl	$1600, %ecx
	movq	%rdx, %rdi
	call	_Z10addVectorsPfS_S_i
	movq	96(%rsp), %rdx
	movl	$25, %ecx
	movq	136(%rsp), %rsi
	movq	%rdx, %rdi
	call	_Z10addVectorsPfS_S_i
	movq	16(%rsp), %rdx
	movq	80(%rsp), %rdi
	movq	%r12, %rsi
	movl	$64, %ecx
	addq	$256, %r12
	call	_Z10subVectorsPfS_S_i
	movq	16(%rsp), %rdi
	movl	$64, %esi
	call	_Z10normVectorPfi
	mulss	%xmm0, %xmm0
	addss	172(%rsp), %xmm0
	movss	%xmm0, 172(%rsp)
	popq	%rdx
	.cfi_def_cfa_offset 312
	popq	%rcx
	.cfi_def_cfa_offset 304
	cmpq	%r15, %r12
	jne	.L150
	movq	24(%rsp), %rsi
	movl	$1600, %edx
	movss	.LC9(%rip), %xmm0
	movl	$1600, %ecx
	leaq	_ZSt4cout(%rip), %r12
	movq	%rsi, %rdi
	call	_Z16vectElemFloatDivPfS_if
	movq	16(%rsp), %rsi
	movq	48(%rsp), %rdi
	movss	.LC18(%rip), %xmm0
	call	_Z17vectElemFloatMultPfS_if
	movq	24(%rsp), %rdx
	movq	16(%rsp), %rsi
	movq	%rdx, %rdi
	call	_Z10addVectorsPfS_S_i
	movq	88(%rsp), %rsi
	movl	$64, %edx
	movss	.LC9(%rip), %xmm0
	movq	%rsi, %rdi
	call	_Z16vectElemFloatDivPfS_if
	movq	24(%rsp), %rsi
	movl	$1600, %edx
	movss	.LC9(%rip), %xmm0
	movq	%rsi, %rdi
	call	_Z16vectElemFloatDivPfS_if
	movq	16(%rsp), %rsi
	movq	48(%rsp), %rdi
	movss	.LC18(%rip), %xmm0
	call	_Z17vectElemFloatMultPfS_if
	movq	24(%rsp), %rdx
	movq	16(%rsp), %rsi
	movq	%rdx, %rdi
	call	_Z10addVectorsPfS_S_i
	movq	80(%rsp), %rsi
	movl	$25, %edx
	movss	.LC9(%rip), %xmm0
	movl	$25, %ecx
	movq	%rsi, %rdi
	call	_Z16vectElemFloatDivPfS_if
	movq	(%rsp), %rdi
	movl	$25, %esi
	movss	.LC6(%rip), %xmm0
	call	_Z16initializeVectorPfif
	movq	8(%rsp), %rdx
	movq	32(%rsp), %rsi
	movq	(%rsp), %rdi
	call	_Z10subVectorsPfS_S_i
	movq	(%rsp), %rdi
	movl	$25, %esi
	movss	.LC15(%rip), %xmm0
	call	_Z16initializeVectorPfif
	movq	8(%rsp), %rdx
	movq	(%rsp), %rdi
	movq	%rdx, %rsi
	call	_Z15vectElemVectDivPfS_S_i
	movq	8(%rsp), %rsi
	movl	$25, %edx
	movq	%rsi, %rdi
	call	_Z11vectElemLogPfS_i
	movq	8(%rsp), %rdx
	movq	(%rsp), %rdi
	movl	$25, %ecx
	movq	%rdx, %rsi
	call	_Z16vectElemVectMultPfS_S_i
	movq	(%rsp), %rdi
	movl	$25, %esi
	movss	.LC19(%rip), %xmm0
	call	_Z16initializeVectorPfif
	movq	(%rsp), %rdx
	movq	32(%rsp), %rsi
	movq	%rdx, %rdi
	call	_Z15vectElemVectDivPfS_S_i
	movq	(%rsp), %rsi
	movl	$25, %edx
	movq	%rsi, %rdi
	call	_Z11vectElemLogPfS_i
	movq	(%rsp), %rsi
	movl	$25, %edx
	movss	.LC19(%rip), %xmm0
	movl	$25, %ecx
	movq	%rsi, %rdi
	call	_Z17vectElemFloatMultPfS_if
	movq	8(%rsp), %rsi
	movq	(%rsp), %rdi
	movq	128(%rsp), %rdx
	call	_Z10addVectorsPfS_S_i
	movq	16(%rsp), %rdx
	movq	%rbx, %rsi
	movq	%rbx, %rdi
	movl	$1600, %ecx
	call	_Z16vectElemVectMultPfS_S_i
	movq	16(%rsp), %rdi
	movl	$1600, %esi
	call	_Z9sumVectorPfi
	movq	48(%rsp), %rsi
	movq	144(%rsp), %rdx
	movaps	%xmm0, %xmm1
	movq	%rsi, %rdi
	call	_Z16vectElemVectMultPfS_S_i
	movq	144(%rsp), %rdi
	movl	$1600, %esi
	call	_Z9sumVectorPfi
	movq	128(%rsp), %rdi
	movl	$25, %esi
	addss	%xmm0, %xmm1
	movss	156(%rsp), %xmm0
	divss	.LC21(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	cvtss2sd	%xmm1, %xmm1
	mulsd	.LC20(%rip), %xmm1
	addsd	%xmm0, %xmm1
	call	_Z9sumVectorPfi
	leaq	176(%rsp), %rsi
	movl	$2, %edi
	cvtss2sd	%xmm0, %xmm0
	mulsd	.LC22(%rip), %xmm0
	addsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, 156(%rsp)
	call	clock_gettime@PLT
	movq	184(%rsp), %rcx
	movq	160(%rsp), %rdi
	movq	168(%rsp), %rsi
	movq	176(%rsp), %rdx
	call	_Z4diff8timespecS_
	leaq	192(%rsp), %rdi
	movl	$1, %esi
	movq	%rdx, 200(%rsp)
	movq	%rax, 192(%rsp)
	call	_Z11printTimingP8timespeci
	leaq	.LC23(%rip), %rsi
	movq	%r12, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	40(%rsp), %rdi
	movl	$25, %esi
	call	_Z11printVectorPfi
	leaq	.LC24(%rip), %rsi
	movq	%r12, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	56(%rsp), %rdi
	movl	$25, %esi
	call	_Z11printVectorPfi
	leaq	.LC25(%rip), %rsi
	movq	%r12, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	32(%rsp), %rdi
	movl	$25, %esi
	call	_Z11printVectorPfi
	leaq	.LC26(%rip), %rsi
	movq	%r12, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	72(%rsp), %rdi
	movl	$64, %esi
	call	_Z11printVectorPfi
	leaq	.LC27(%rip), %rsi
	movq	%r12, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	64(%rsp), %rdi
	movl	$64, %esi
	call	_Z11printVectorPfi
	leaq	.LC28(%rip), %rsi
	movq	%r12, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movss	156(%rsp), %xmm0
	movq	%rax, %rdi
	cvtss2sd	%xmm0, %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	leaq	.LC29(%rip), %rsi
	movq	%r12, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	128(%rsp), %rdi
	movl	$25, %esi
	call	_Z11printVectorPfi
	movq	%rbp, %rdi
	call	free@PLT
	movq	32(%rsp), %rdi
	call	free@PLT
	movq	%rbx, %rdi
	call	free@PLT
	movq	48(%rsp), %rdi
	call	free@PLT
	movq	112(%rsp), %rdi
	call	free@PLT
	movq	136(%rsp), %rdi
	call	free@PLT
	movq	104(%rsp), %rdi
	call	free@PLT
	movq	24(%rsp), %rdi
	call	free@PLT
	movq	80(%rsp), %rdi
	call	free@PLT
	movq	88(%rsp), %rdi
	call	free@PLT
	movq	40(%rsp), %rdi
	call	free@PLT
	movq	72(%rsp), %rdi
	call	free@PLT
	movq	56(%rsp), %rdi
	call	free@PLT
	movq	64(%rsp), %rdi
	call	free@PLT
	movq	120(%rsp), %rdi
	call	free@PLT
	movq	96(%rsp), %rdi
	call	free@PLT
	movq	(%rsp), %rdi
	call	free@PLT
	movq	8(%rsp), %rdi
	call	free@PLT
	movq	16(%rsp), %rdi
	call	free@PLT
	movq	144(%rsp), %rdi
	call	free@PLT
	movq	128(%rsp), %rdi
	call	free@PLT
	movq	232(%rsp), %rax
	subq	%fs:40, %rax
	je	.L161
	jmp	.L169
.L162:
	endbr64
	jmp	.L173
.L163:
	endbr64
	movq	%rax, %rbx
.L157:
	movq	%r13, %rdi
	jmp	.L172
.L164:
	endbr64
.L173:
	movq	%rax, %rbx
.L159:
	movq	%r12, %rdi
.L172:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	232(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L169
	movq	%rbx, %rdi
	call	_Unwind_Resume@PLT
.LEHE10:
.L169:
	call	__stack_chk_fail@PLT
.L161:
	addq	$248, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3823:
	.section	.gcc_except_table
.LLSDA3823:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE3823-.LLSDACSB3823
.LLSDACSB3823:
	.uleb128 .LEHB4-.LFB3823
	.uleb128 .LEHE4-.LEHB4
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB5-.LFB3823
	.uleb128 .LEHE5-.LEHB5
	.uleb128 .L162-.LFB3823
	.uleb128 0
	.uleb128 .LEHB6-.LFB3823
	.uleb128 .LEHE6-.LEHB6
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB7-.LFB3823
	.uleb128 .LEHE7-.LEHB7
	.uleb128 .L163-.LFB3823
	.uleb128 0
	.uleb128 .LEHB8-.LFB3823
	.uleb128 .LEHE8-.LEHB8
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB9-.LFB3823
	.uleb128 .LEHE9-.LEHB9
	.uleb128 .L164-.LFB3823
	.uleb128 0
	.uleb128 .LEHB10-.LFB3823
	.uleb128 .LEHE10-.LEHB10
	.uleb128 0
	.uleb128 0
.LLSDACSE3823:
	.section	.text.startup
	.size	main, .-main
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	-962072674
	.long	1074018123
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC5:
	.long	-2147483648
	.long	0
	.long	0
	.long	0
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC6:
	.long	1065353216
	.section	.rodata.cst8
	.align 8
.LC8:
	.long	336142638
	.long	1073977486
	.section	.rodata.cst4
	.align 4
.LC9:
	.long	1176256512
	.align 4
.LC15:
	.long	1065185444
	.align 4
.LC16:
	.long	-1138501878
	.align 4
.LC17:
	.long	1077936128
	.align 4
.LC18:
	.long	953267991
	.align 4
.LC19:
	.long	1008981770
	.section	.rodata.cst8
	.align 8
.LC20:
	.long	-350469331
	.long	1057634018
	.section	.rodata.cst4
	.align 4
.LC21:
	.long	1184645120
	.section	.rodata.cst8
	.align 8
.LC22:
	.long	0
	.long	1074266112
	.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:

/*******************************************************************
*			Sparse Auto-Encoder 
*					by
*		David Klaus and Alex Welles
*			EC527 Final Project	
*
*	Serial Implementation With Timing Code
*	
*	Compile with: 
*
*	nvcc -Xcompiler -fopenmp -lgomp -o sparseAutoencoder sparseAutoencoder.cu
*
*******************************************************************/


#include <hip/hip_runtime.h>
#include <cstdio>
#include <cstdlib>
#include <time.h>
#include <math.h>
#include <string>
#include <sstream>
#include <fstream>
#include <iostream>
#include <string>

#define GIG 1000000000
#define CPG 2.527
#define OPTIONS 1

//Parameters necessary to set up network
#define PATCHES_PATH	"c_patches.csv"
#define W1_PATH			"W1.csv"
#define W2_PATH			"W2.csv"
#define IMAGE_DIM		512		//pixels in 1 dimension (assumes square)
#define SAMPLE_SIZE		10000  //number of input patches
#define	VISIBLE_SIZE 	64      //number of input/output nodes 
#define	HIDDEN_SIZE 	25	   	//number hidden nodes
#define	HIDDEN_LAYERS 	1		//number hidden layers 
#define NUM_SAMPLE_ELEMENTS SAMPLE_SIZE * VISIBLE_SIZE

//desired average activation of hidden nodes
#define	SPARSITY_PARAM 	0.01
#define SPARSITY_COMPLEMENT 1-SPARSITY_PARAM
//weight decay paramater
#define	LAMBDA			0.0001
//weight of sparsity penalty term
#define	BETA			3.0

using namespace std;

/* VECTOR FUNCTIONS */
void initializeMatrixWeightsRand(float *arr, int rows, int cols, int seed);
void initializeMatrixWeightsZero(float *arr, int rows, int cols);
void initializeVectorWeightsZero(float *arr, int numElements);
void mmm_kij(float* src1, float* src2, float* dest, int row1, int col1, int row2,int col2);
void mmm_ijk(float* src1, float* src2, float* dest, int row1, int col1, int row2,int col2);
void dotPdt(float* src1,float* src2, float* dest, int length);
float altDotPdt(float* A, float* B, int length);//BROKEN DONT USE
void readCSV(float* array, int numElements, string filename);
void addVectors(float* src1, float* src2, float* dest, int length);
void subVectors(float* src1, float* src2, float* dest, int length);
void vectElemSigmoid(float* src,float* dest,int length);
void vectElemIntDiv(float* src, float* dest,int length,int divisor);
void vectElemFloatDiv(float* src, float* dest,int length,float divisor);
void vectElemVectDiv(float* src1,float* src2,float* dest,int length);
void initializeVector(float *array, int length, float val);
void vectElemVectMult(float* src1, float* src2, float* dest, int length);
void vectElemFloatMult(float* src, float* dest, int length,float multiplicand);
void matrixTranspose(float* src,float* dest,int rows, int cols);
float normVector(float* src,int length);
void vectElemLog(float* src,float* dest,int length);
float sumVector(float* src,int length);
/* PRINTOUT, DEBUG, AND TIMING FUNCTIONS */
void printVector(float* A, int length);
void printMatrix(float* A, int rows, int cols);
void printTiming(struct timespec* time_stamp,int numTimings);


int main(int argc, char *argv[]){

	/***********************************
	 		  TIMING STUFF
    ***********************************/

	struct timespec diff(struct timespec start, struct timespec end);
    struct timespec time1, time2;
    struct timespec time_stamp[OPTIONS];//Can be increased if necessary.

	/***********************************
	 		ALLOCATE MEMORY
    ***********************************/

	//Arrays on host memory (CPU)
	//input patches to train the autoencoder
	float *h_inputs;// 64 x 10000 [visible x sample]
	//sparsity vector
	float *h_rhoHat;//hidden x 1 [25 x 1]
	//weight matrices
	float *h_W1;//hidden X visible [25 x 64]
	float *h_W2;//visible X hidden [64 x 25]
	//weight vectors
	float *h_b1;//hidden X 1 [25 x 1]
	float *h_b2;//visible X 1 [64 x 1]
	//weight gradient matrices
	float *h_W1grad;//hidden x visible [25 x 64]
	float *h_W2grad;//visible x hidden [64 x 25]
	//weight gradient vectors
	float *h_b1grad;//hidden x 1 [25 x 1]
	float *h_b2grad;//visible x 1 [64 x 1]
	//z product vectors
	float *h_z2;//hidden x 1 [25 x 1]
	float *h_z3;//visible x 1 [64 x 1]
	//a product vectors
	float *h_a2;//hidden x 1 [25 x 1]
	float *h_a3;//visible x 1 [64 x 1]
	//partial derivatives for back prop
	float *h_d2;//hidden x 1 [25 x 1]
	float *h_d3;//visible x 1 [64 x 1]
	//temp vectors: both are 64 elements but will not always be used
	float *h_temp1;//64 x 1
	float *h_temp2;//64 x1
	//temp matrix
	float *h_Wtemp1;//64 x 25 or 25 x 64
	float *h_Wtemp2;//25 x 64 or 64 x 25
	//sparsity penalty
	float *h_sparsePen;//25x1


	//Allocate input patches on host memory (CPU)
	size_t allocSize = VISIBLE_SIZE * SAMPLE_SIZE * sizeof(float);
	h_inputs = (float *) malloc(allocSize);

	//Allocate sparsity vector on host memory (CPU)
	allocSize = HIDDEN_SIZE * sizeof(float);
	h_rhoHat = (float *) malloc(allocSize);
	
	//Alocate weight arrays on host memory (CPU)
	allocSize = VISIBLE_SIZE * HIDDEN_SIZE * sizeof(float);
	h_W1 = (float *) malloc(allocSize);
	h_W2 = (float *) malloc(allocSize);

	//Alocate gradient arrays on host memory (CPU)
	allocSize = VISIBLE_SIZE * HIDDEN_SIZE * sizeof(float);
	h_W1grad = (float *) malloc(allocSize);
	h_W2grad = (float *) malloc(allocSize);
	
	//Allocate weight vectors on host memory (CPU)
	allocSize = HIDDEN_SIZE * sizeof(float);
	h_b1 = (float *) malloc(allocSize);
	allocSize = VISIBLE_SIZE * sizeof(float);
	h_b2 = (float *) malloc(allocSize);	

	//Allocate weight vectors on host memory (CPU)
	allocSize = HIDDEN_SIZE * sizeof(float);
	h_b1grad = (float *) malloc(allocSize);
	allocSize = VISIBLE_SIZE * sizeof(float);
	h_b2grad = (float *) malloc(allocSize);	

	//Allocate z product vectors (CPU)
	allocSize = HIDDEN_SIZE * sizeof(float);
	h_z2 = (float *) malloc(allocSize);
	allocSize = VISIBLE_SIZE * sizeof(float);
	h_z3 = (float *) malloc(allocSize);

	//Allocate a product vectors (CPU)
	allocSize = HIDDEN_SIZE * sizeof(float);
	h_a2 = (float *) malloc(allocSize);
	allocSize = VISIBLE_SIZE * sizeof(float);
	h_a3 = (float *) malloc(allocSize);

	//Allocate partial vectors (CPU)
	allocSize = HIDDEN_SIZE * sizeof(float);
	h_d2 = (float *) malloc(allocSize);
	allocSize = VISIBLE_SIZE * sizeof(float);
	h_d3 = (float *) malloc(allocSize);

	//Allocate temp vectors (CPU)
	allocSize = VISIBLE_SIZE * sizeof(float);
	h_temp1 = (float *) malloc(allocSize);
	h_temp2 = (float *) malloc(allocSize);

	//Allocate temp matrix (CPU)
	allocSize = VISIBLE_SIZE * HIDDEN_SIZE * sizeof(float);
	h_Wtemp1 = (float *) malloc(allocSize);
	h_Wtemp2 = (float *) malloc(allocSize);

	//Allocate sparsity penalty vector (CPU)
	allocSize = HIDDEN_SIZE * sizeof(float);
	h_sparsePen = (float *) malloc(allocSize);

	/***********************************
	 			VARIABLES
    ***********************************/
		
	float cost = 0;

	/***********************************
	 	INITIALIZE NETWORK WEIGHTS
    ***********************************/

	//Initialize the weight matrices to random values
	initializeMatrixWeightsRand(h_W1, HIDDEN_SIZE, VISIBLE_SIZE, 2254);
	initializeMatrixWeightsRand(h_W2, VISIBLE_SIZE, HIDDEN_SIZE, 1345);

	initializeMatrixWeightsZero(h_W2grad,VISIBLE_SIZE,HIDDEN_SIZE);
	initializeMatrixWeightsZero(h_W1grad,HIDDEN_SIZE,VISIBLE_SIZE);

	initializeVectorWeightsZero(h_b1, HIDDEN_SIZE);
	initializeVectorWeightsZero(h_b2, VISIBLE_SIZE);
	initializeVectorWeightsZero(h_rhoHat, HIDDEN_SIZE);
	initializeVectorWeightsZero(h_z2, HIDDEN_SIZE);
	initializeVectorWeightsZero(h_a2, HIDDEN_SIZE);
	initializeVectorWeightsZero(h_z3, VISIBLE_SIZE);
	initializeVectorWeightsZero(h_a3, VISIBLE_SIZE);


	/***********************************
	 	   READ IN SAMPLE PATCHES
    ***********************************/

	readCSV(h_inputs, NUM_SAMPLE_ELEMENTS, PATCHES_PATH);
	//the following are for debug only
	readCSV(h_W1, HIDDEN_SIZE*VISIBLE_SIZE, W1_PATH);
	readCSV(h_W2, HIDDEN_SIZE*VISIBLE_SIZE, W2_PATH);


	/***************************************
			   BEGIN SERIAL TIMING
	****************************************/

    printf("\nTesting Baseline Sparse Autoencoder");
    clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &time1);
    int OPTION = 0;//default is zero. Placeholder in case.

	/***************************************
      CALCULATE SPARSITY CONSTRAINT RHO-HAT
    ****************************************/

    /* 
    This involves forward propagation through 10000 64 pixel values 
    (note values are stored as floats). These are stored as a 64000
    element vector. Another forward propagation is performed later.
	*/

	for(int i = 0; i < NUM_SAMPLE_ELEMENTS; i+=VISIBLE_SIZE){//for number of input patches
		//we are performing the following matrix op
		//[hsize x vsize] * [vsize x 1] = [vsize x 1]
		//[25x64] * [64x1] = [64x1]
		//using 25 dot product calls
		for(int j = 0;j < HIDDEN_SIZE;j++ ){

			dotPdt(&h_inputs[i],&h_W1[j*VISIBLE_SIZE],&h_z2[j],VISIBLE_SIZE);
			//h_z2[j] = altDotPdt(&h_inputs[i],&h_W1[j*VISIBLE_SIZE],VISIBLE_SIZE);
			// &h_inputs[i] 				--> pointer to current input patch
			// &h_W1[j*VISIBLE_SIZE] 		--> pointer to current row of the W1 weights
			// &h_z2[j]						--> pointer to current output element of z1
			// VISIBLE_SIZE					--> patch size, should be 64
		}
		//[25x1] + [25x1] = [25x1]
		//[hidden x 1] + [hidden x1] = [hidden x 1]
		addVectors(h_z2,h_b1,h_z2, HIDDEN_SIZE);
		//sigma([25x1]) = [25x1] 
		vectElemSigmoid(h_z2,h_a2,HIDDEN_SIZE);
		//calc the sparsity constraint
		addVectors(h_rhoHat,h_a2,h_rhoHat,HIDDEN_SIZE);
	}
	vectElemIntDiv(h_rhoHat,h_rhoHat,HIDDEN_SIZE,SAMPLE_SIZE);

	/*
	cout << "z2" << endl;//DEBUG
	printVector(h_z2,HIDDEN_SIZE);//DEBUG
	cout << "a2" << endl;//DEBUG
	printVector(h_a2,HIDDEN_SIZE);//DEBUG
	cout << "rhoHat" << endl;//DEBUG
	printVector(h_rhoHat,HIDDEN_SIZE);//DEBUG
	*/

	/***************************************
      	FORWARD AND BACKWARD PROPAGATION
    ****************************************/

    for(int i = 0; i < NUM_SAMPLE_ELEMENTS; i+=VISIBLE_SIZE){
    	
    	/***************************************
      		FORWARD PROPAGATION a(1) --> a(2)				//DEBUG PASSED
    	****************************************/

      	/*
      	%forward propagate
	    %from a1 = input to a2
	    xM = data(:,i);%current input
	    z2 = W1 * xM + b1;
	    a2 = 1./ ( 1 + exp(-z2));
    	*/

    	//we are performing the following matrix op
		//[hsize x vsize] * [vsize x 1] = [vsize x 1]
		//[25x64] * [64x1] = [64x1]
		//using 25 dot product calls
    	for(int j = 0;j < HIDDEN_SIZE;j++ ){

			dotPdt(&h_inputs[i],&h_W1[j*VISIBLE_SIZE],&h_z2[j],VISIBLE_SIZE);
			//h_z2[j] = altDotPdt(&h_inputs[i],&h_W1[j*VISIBLE_SIZE],VISIBLE_SIZE);
			// &h_inputs[i] 				--> pointer to current input patch
			// &h_W1[j*VISIBLE_SIZE] 		--> pointer to current row of the W1 weights
			// &h_z2[j]						--> pointer to current output element of z1
			// VISIBLE_SIZE					--> patch size, should be 64
		}
		//[25x1] + [25x1] = [25x1]
		//[hidden x 1] + [hidden x1] = [hidden x 1]
		addVectors(h_z2,h_b1,h_z2, HIDDEN_SIZE);
		//sigma([25x1]) = [25x1] 
		vectElemSigmoid(h_z2,h_a2,HIDDEN_SIZE);


		/***************************************
      		FORWARD PROPAGATION a(2) --> a(3)				//DEBUG FAILED
    	****************************************/

      	/*
      	%from a2 to a3 = output
	    z3 = W2 * a2 + b2;
	    a3 = 1./ (1 + exp(-z3));
		*/

		//we are performing the following matrix op
		//[visible x hidden] * [hidden x 1] = [visible x 1]
		//[64x25] * [25x1] = [64x1]
		//using 64 dot product calls

		for(int j = 0;j < VISIBLE_SIZE;j++ ){
			//the key difference here is that we are using h_a2 as the input
			dotPdt(h_a2,&h_W2[j*HIDDEN_SIZE],&h_z3[j],VISIBLE_SIZE);//  W2 * a2 --> h_z3
			//h_z2[j] = altDotPdt(&h_inputs[i],&h_W1[j*VISIBLE_SIZE],VISIBLE_SIZE);
			// h_a2 						--> pointer to current input vector
			// &h_W1[j*VISIBLE_SIZE] 		--> pointer to current row of the W1 weights
			// &h_z2[j]						--> pointer to current output element of z1
		}

		//[64x1] + [64x1] = [64x1]
		//[visible x 1] + [visible x1] = [visible x 1]
		addVectors(h_z3,h_b2,h_z3,VISIBLE_SIZE);
		//sigma([64x1]) = [64x1] 
		vectElemSigmoid(h_z3,h_a3,VISIBLE_SIZE);


		/***************************************
      		    	BACK PROPAGATION
    	****************************************/
      	/*
      	%back propagate
	    %a3 -> a2
	    d3 = -(xM - a3) .* (a3 .* (1 - a3));
	    %d2 = (transpose(W2) * d3) .* (a2 .* (1 - a2));
	    d2 = ((W2' * d3) + beta .* (-(sparsityParam./rhoHat)
	         + (1-sparsityParam)./(1-rhoHat))).* (a2 .* (1 - a2));

	    %compute partial derivatives
	    W2grad = W2grad + d3 * a2';
	    b2grad = b2grad + d3;
	    W1grad = W1grad + d2 * xM';
	    b1grad = b1grad + d2; 
	  
	    %for calculating cost
	    %equiv. to (HwbXi-y)^2
	    cost = cost + norm(a3 - xM)^2; 
      	*/

	    //d3 = -(xM - a3) .* (a3 .* (1 - a3));
	    initializeVector(h_temp1, VISIBLE_SIZE, 1.0);//vec(1) --> h_temp1	    
	    subVectors(h_temp1,h_a3,h_temp1,VISIBLE_SIZE);//(1 - a3) --> h_temp1
	    vectElemVectMult(h_a3,h_temp1,h_temp1,VISIBLE_SIZE);//(a3 .* (1 - a3)) --> h_temp2
	    subVectors(h_a3,&h_inputs[i],h_temp2,VISIBLE_SIZE);//-(xM - a3) = (a3 - xM) --> h_temp2
	    vectElemVectMult(h_temp1,h_temp2,h_d3,VISIBLE_SIZE);//d3 = -(xM - a3) .* (a3 .* (1 - a3)); --> h_d3
	    //initializeVector(h_temp1,VISIBLE_SIZE,-1);
	    //vectElemVectMult(h_temp1,h_d3,h_d3,VISIBLE_SIZE);
	    
	    //d2 = ((W2' * d3) + beta .* (-(sparsityParam./rhoHat) + (1-sparsityParam)./(1-rhoHat))) .* (a2 .* (1 - a2));
	    
	    //Note the h_temp1 & 2 vectors are actually VISIBLE_SIZE long
	    //but we are only using HIDDEN_SIZE values
	    initializeVector(h_temp2, HIDDEN_SIZE, 1.0);//(1)
	    subVectors(h_temp2,h_rhoHat,h_temp2,HIDDEN_SIZE);//(1-rhoHat) --> h_temp2
	    initializeVector(h_temp1, HIDDEN_SIZE, SPARSITY_COMPLEMENT);//(1-sparsityParam) --> h_temp1
	    vectElemVectDiv(h_temp1,h_temp2,h_temp2,HIDDEN_SIZE);//(1-sparsityParam)./(1-rhoHat) --> h_temp2

	  
	    initializeVector(h_temp1,HIDDEN_SIZE,-1.0*SPARSITY_PARAM);//-(sparsityParam) --> h_temp1
	    vectElemVectDiv(h_temp1,h_rhoHat,h_temp1,HIDDEN_SIZE);//-(sparsityParam./rhoHat) --> h_temp1

	    addVectors(h_temp1,h_temp2,h_temp1,HIDDEN_SIZE);//(-(sparsityParam./rhoHat) + (1-sparsityParam)./(1-rhoHat)) --> h_temp1
	    vectElemFloatMult(h_temp1,h_temp1,HIDDEN_SIZE,BETA);//beta .* (-(sparsityParam./rhoHat) + (1-sparsityParam)./(1-rhoHat))) --> h_temp1

	    matrixTranspose(h_W2,h_Wtemp1,VISIBLE_SIZE,HIDDEN_SIZE);//W2' --> h_Wtemp1

		//Parallelize with OpenMP
	    for(int j = 0;j < VISIBLE_SIZE;j++){//(W2' * d3) --> h_temp2
	    	dotPdt(h_d3,&h_Wtemp1[j*HIDDEN_SIZE],&h_temp2[j],VISIBLE_SIZE);
	    }

	    //((W2' * d3) + beta .* (-(sparsityParam./rhoHat) + (1-sparsityParam)./(1-rhoHat))) --> h_temp2
	    addVectors(h_temp2,h_temp1,h_temp2,HIDDEN_SIZE);
	    initializeVector(h_temp1, HIDDEN_SIZE, 1);//1-a2 --> h_temp1
	    subVectors(h_temp1,h_a2,h_temp1,HIDDEN_SIZE);//(1-a2) --> h_temp1
	    vectElemVectMult(h_a2,h_temp1,h_temp1,HIDDEN_SIZE);//(a2 .* (1 - a2)) --> h_temp1
	    //d2 = ((W2' * d3) + beta .* (-(sparsityParam./rhoHat) + (1-sparsityParam)./(1-rhoHat))) .* (a2 .* (1 - a2));--> h_d2
	    vectElemVectMult(h_temp1,h_temp2,h_d2,HIDDEN_SIZE);

	    /*
		%compute partial derivatives
	    W2grad = W2grad + d3 * a2';
	    b2grad = b2grad + d3;
	    W1grad = W1grad + d2 * xM';
	    b1grad = b1grad + d2; 
	    */

		/*
		int ii, jj;
		for(ii = 0; i < HIDDEN_SIZE; ii++) {
			for(jj = 0; jj < VISIBLE_SIZE; jj++) {
				h_Wtemp1[ii*HIDDEN_SIZE+jj]= h_d3[jj]*h_a2[ii];
			}
		}*/
	    mmm_kij(h_d3,h_a2,h_Wtemp1,VISIBLE_SIZE,1,1,HIDDEN_SIZE);//d3 * a2' --> h_Wtemp1
	    addVectors(h_W2grad,h_Wtemp1,h_W2grad,HIDDEN_SIZE*VISIBLE_SIZE);//W2grad + d3 * a2'; --> h_W2grad
	    addVectors(h_b2grad,h_d3,h_b2grad,VISIBLE_SIZE);//b2grad = b2grad + d3;

		/*
		for(ii = 0; ii < HIDDEN_SIZE; ii++) {
			for(jj = 0; jj < VISIBLE_SIZE; jj++) {
				h_Wtemp1[ii*HIDDEN_SIZE+jj]= h_d2[jj]*h_inputs[i+ii];
			}
		}*/
	    mmm_kij(h_d2,&h_inputs[i],h_Wtemp1,HIDDEN_SIZE,1,1,VISIBLE_SIZE);//d2 * xM' --> h_Wtemp1
	    addVectors(h_W1grad,h_Wtemp1,h_W1grad,HIDDEN_SIZE*VISIBLE_SIZE);//W1grad = W1grad + d2 * xM'; --> h_W1grad
	    addVectors(h_b1grad,h_d2,h_b1grad,HIDDEN_SIZE);//b1grad = b1grad + d2; --> h_b1grad
 
	    /*
	    %for calculating cost
	    %equiv. to (HwbXi-y)^2
	    cost = cost + norm(a3 - xM)^2; 
		*/

	    subVectors(h_a3,&h_inputs[i],h_temp1,VISIBLE_SIZE);//(a3 - xM) --> h_temp1
		float temp = 0;
		temp = normVector(h_temp1,VISIBLE_SIZE);//norm(a3 - xM)^2; --> temp
		cost += temp*temp;//cost = cost + norm(a3 - xM)^2; --> cost
    }

	/*
    %W1grad = [(1/m) \Delta W^{(1)} + \lambda W^{(1)}]
	W2grad = W2grad ./ M + lambda .* W2;
	b2grad = b2grad ./ M;
	W1grad = W1grad ./ M + lambda .* W1;
	b1grad = b1grad ./ M;
	*/

	//NOTE: M = SAMPLE_SIZE = 10000 by default

	//W2grad = W2grad ./ M + lambda .* W2;
	vectElemFloatDiv(h_W2grad,h_W2grad,VISIBLE_SIZE*HIDDEN_SIZE,SAMPLE_SIZE);//W2grad ./ M  --> h_W2grad
	vectElemFloatMult(h_W2,h_Wtemp1,VISIBLE_SIZE*HIDDEN_SIZE,LAMBDA);// lambda .* W2; --> h_Wtemp1
	addVectors(h_W2grad,h_Wtemp1,h_W2grad,VISIBLE_SIZE*HIDDEN_SIZE);//W2grad = W2grad ./ M + lambda .* W2; --> h_W2grad
	//b2grad = b2grad ./ M;
	vectElemFloatDiv(h_b2grad,h_b2grad,VISIBLE_SIZE,SAMPLE_SIZE);//b2grad = b2grad ./ M; --> h_b2grad
	//W1grad = W1grad ./ M + lambda .* W1;
	vectElemFloatDiv(h_W2grad,h_W2grad,VISIBLE_SIZE*HIDDEN_SIZE,SAMPLE_SIZE);//W1grad ./ M  --> h_W2grad
	vectElemFloatMult(h_W2,h_Wtemp1,VISIBLE_SIZE*HIDDEN_SIZE,LAMBDA);// lambda .* W1; --> h_Wtemp1
	addVectors(h_W2grad,h_Wtemp1,h_W2grad,VISIBLE_SIZE*HIDDEN_SIZE);//W1grad = W1grad ./ M + lambda .* W1; --> h_W1grad
	//b1grad = b1grad ./ M;
	vectElemFloatDiv(h_b1grad,h_b1grad,HIDDEN_SIZE,SAMPLE_SIZE);//b1grad = b1grad ./ M; --> h_b1grad

	/*
	%rho
	sparsePen = sparsityParam .* log(sparsityParam./rhoHat) + (1-sparsityParam).*log((1-sparsityParam)./(1-rhoHat));
	*/

	initializeVector(h_temp1,HIDDEN_SIZE,1.0);//1--> h_temp1
	subVectors(h_temp1,h_rhoHat,h_temp2,HIDDEN_SIZE);//(1-rhoHat) --> h_temp2
	initializeVector(h_temp1, HIDDEN_SIZE, SPARSITY_COMPLEMENT);//(1-sparsityParam) --> h_temp1
	vectElemVectDiv(h_temp1,h_temp2,h_temp2,HIDDEN_SIZE);//(1-sparsityParam)./(1-rhoHat) --> h_temp2
	vectElemLog(h_temp2,h_temp2,HIDDEN_SIZE);//log((1-sparsityParam)./(1-rhoHat)) --> h_temp2
	vectElemVectMult(h_temp1,h_temp2,h_temp2,HIDDEN_SIZE);//(1-sparsityParam).*log((1-sparsityParam)./(1-rhoHat)) --> h_temp2
	initializeVector(h_temp1,HIDDEN_SIZE,SPARSITY_PARAM);//sparsityParam --> h_temp1
	vectElemVectDiv(h_temp1,h_rhoHat,h_temp1,HIDDEN_SIZE);//(sparsityParam./rhoHat) --> h_temp1
	vectElemLog(h_temp1,h_temp1,HIDDEN_SIZE);//log(sparsityParam./rhoHat) --> h_temp1
	vectElemFloatMult(h_temp1,h_temp1,HIDDEN_SIZE,SPARSITY_PARAM);//sparsityParam .* log(sparsityParam./rhoHat)--> h_temp1
	addVectors(h_temp1,h_temp2,h_sparsePen,HIDDEN_SIZE);//sparsePen = --> h_sparsePen

	/*
	cost = (cost / (2 * M)) + (lambda / 2 ) * (sum(sum(W1.^2)) + (sum(sum(W2.^2)))) + beta * sum(sparsePen); 
	*/

	vectElemVectMult(h_W1,h_W1,h_Wtemp1,VISIBLE_SIZE*HIDDEN_SIZE);//W1.^2 --> h_Wtemp1
	float sumW1 = sumVector(h_Wtemp1,VISIBLE_SIZE*HIDDEN_SIZE);//sum(sum(W1.^2)) --> sumW1
	vectElemVectMult(h_W2,h_W2,h_Wtemp2,VISIBLE_SIZE*HIDDEN_SIZE);//W2.^2 --> h_Wtemp2
	float sumW2 = sumVector(h_Wtemp2,VISIBLE_SIZE*HIDDEN_SIZE);// (sum(sum(W2.^2))) --> sumW2
	
	cost = (cost/(2*SAMPLE_SIZE)) + (LAMBDA/2)*(sumW1 + sumW2) + BETA*sumVector(h_sparsePen,HIDDEN_SIZE);

	/***************************************
	     END AND PRINT SERIAL TIMING
	****************************************/

    clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &time2);
    time_stamp[OPTION] = diff(time1,time2);

	printTiming(time_stamp,OPTIONS);

    /***************************************
			   DEBUG OUTPUTS
	****************************************/
	
    cout << "z2" << endl;//DEBUG
	printVector(h_z2,HIDDEN_SIZE);//DEBUG
	cout << "a2" << endl;//DEBUG
	printVector(h_a2,HIDDEN_SIZE);//DEBUG
	cout << "rhoHat" << endl;//DEBUG
	printVector(h_rhoHat,HIDDEN_SIZE);//DEBUG
	cout << "z3" << endl;//DEBUG
	printVector(h_z3,VISIBLE_SIZE);//DEBUG
	cout << "a3" << endl;//DEBUG
	printVector(h_a3,VISIBLE_SIZE);//DEBUG
	cout << "Cost: " << cost << endl;//DEBUG
	cout << "sparsePen" << endl;//DEBUGs
	printVector(h_sparsePen,HIDDEN_SIZE);//DEBUG

	/*
	cout << "Wtemp1" << endl;//DEBUG
	printVector(h_Wtemp1,VISIBLE_SIZE*HIDDEN_SIZE);//DEBUG
	
	cout << "W2" << endl;//DEBUG
	printVector(h_W2, HIDDEN_SIZE);//DEBUG
	mmm_kij(h_W2,h_a2,h_z3,VISIBLE_SIZE,HIDDEN_SIZE,HIDDEN_SIZE,1);//DEBUG
	cout<< "Z3_kij" << endl;//DEBUG
	printVector(h_z3, VISIBLE_SIZE);//DEBUG

	mmm_kij(h_W2,h_a2,h_z3,VISIBLE_SIZE,HIDDEN_SIZE,HIDDEN_SIZE,1);//DEBUG
	cout << "Z3_ijk" << endl;//DEBUG
	printVector(h_z3,VISIBLE_SIZE);//DEBUG

	cout << "d2" << endl;//DEBUG
	printVector(h_d2,HIDDEN_SIZE);//DEBUG
	cout << "d3" << endl;//DEBUG
	printVector(h_d3,VISIBLE_SIZE);//DEBUG
	
	cout << "b1" << endl;//DEBUG
	printVector(h_b1,HIDDEN_SIZE);//DEBUG
	cout << "b2" << endl;//DEBUG
	printVector(h_b2,VISIBLE_SIZE);//DEBUG
	*/

	/***************************************
			   FREEING MEMORY
	****************************************/

    free(h_inputs);
    free(h_rhoHat);
    free(h_W1);
    free(h_W2);
    free(h_b1);
    free(h_b2);
    free(h_W1grad);
    free(h_W2grad);
    free(h_b1grad);
    free(h_b2grad);
    free(h_z2);
    free(h_z3);
    free(h_a2);
    free(h_a3);
    free(h_d2);
    free(h_d3);
    free(h_temp1);
    free(h_temp2);
    free(h_Wtemp1);
    free(h_Wtemp2);
    free(h_sparsePen);

    return 0;
}

/***********************************************
		TIMING FUNCTIONS AND STRUCTS
***********************************************/

struct timespec diff(struct timespec start, struct timespec end)
{
  struct timespec temp;
  if ((end.tv_nsec-start.tv_nsec)<0) {
    temp.tv_sec = end.tv_sec-start.tv_sec-1;
    temp.tv_nsec = 1000000000+end.tv_nsec-start.tv_nsec;
  } else {
    temp.tv_sec = end.tv_sec-start.tv_sec;
    temp.tv_nsec = end.tv_nsec-start.tv_nsec;
  }
  return temp;
}

void printTiming(struct timespec* time_stamp,int numTimings){
	
	for (int j = 0; j < numTimings; j++) {
        if (j != 0) printf(", ");
        printf("\nCPU time: %ld (nsec)", (long int)((double)(CPG)*(double)
            (GIG * time_stamp[j].tv_sec + time_stamp[j].tv_nsec)));
    }
    printf("\n");
}


/***********************************************
		NAIVE VECTOR OPERATIONS
***********************************************/

float sumVector(float* src,int length){
	float sum = 0;
	for(int i = 0;i < length;i++){
		sum += src[i];
	}
	return sum;
}

void vectElemLog(float* src,float* dest,int length){
	for(int i = 0;i < length;i++){
		dest[i] = log(src[i]);
	}
}

float normVector(float* src,int length){
	float x = 0;
	float sum = 0;
	for(int i = 0;i < length;i++){
		x = src[i];
		sum += x*x;
	}
	sum = sqrt(sum);
	return sum;
}

void vectElemSigmoid(float* src,float* dest,int length){
	for(int i = 0; i < length;i++){
		dest[i] = float(1/(1+exp(-src[i])));
	}
}

void vectElemVectMult(float* src1, float* src2, float* dest, int length){
	for(int i = 0; i < length;i++){
		dest[i] = src1[i] * src2[i];
	}
}

//faster if float is used instead?
void vectElemIntDiv(float* src, float* dest,int length,int divisor){
	for(int i = 0;i < length;i++){
		dest[i] = float(src[i]/divisor);
	}
}

void vectElemFloatDiv(float* src, float* dest,int length,float divisor){
	for(int i = 0;i < length;i++){
		dest[i] = float(src[i]/divisor);
	}
}

void vectElemFloatMult(float* src, float* dest, int length,float multiplicand){
	for(int i = 0;i < length;i++){
		dest[i] = src[i] * multiplicand;
	}
}

void vectElemVectDiv(float* src1,float* src2,float* dest,int length){
	for(int i = 0;i < length;i++){
		dest[i] = (src1[i]/src2[i]);
	}
}

//Just for debugging eh?
void printVector(float* A, int length){
	for(int i = 0;i < length; i++){
		cout << A[i] << endl;
	}
}

void initializeVector(float *array, int length, float val){
	for(int i = 0; i < length; i++){
		array[i] = val;
	}
}

//Just for debugging eh?
void printMatrix(float* A, int rows, int cols){
	for(int i = 0;i < rows; i++){
		for(int j = 0;j < cols;j++){
			cout << A[i*rows+j] << "\t";
		}
		cout << endl;
	}
}

void addVectors(float* src1, float* src2, float* dest, int length){
	for(int i = 0;i < length; i++){
		dest[i] = src1[i] + src2[i];
	}
}

void subVectors(float* src1, float* src2, float* dest, int length){
	for(int i = 0;i < length;i++){
		dest[i] = src1[i] - src2[i];
	}
}

void dotPdt(float* src1,float* src2, float *dest, int length){
	float accum = 0;
	for(int i = 0; i< length;i++){
		accum += src1[i] * src2[i];
	}
	*dest = accum;
	//cout << accum << endl;//DEBUG
}

//don't use me. I am broken.
float altDotPdt(float* A, float* B, int length){
	float accum = 0;
	for(int i = 0; i < length; i++){
		accum += A[i] + B[i];
	}
	return accum;
}

void matrixTranspose(float* src,float* dest,int rows,int cols){
	for(int i = 0;i < rows;i++){
		for(int j = 0;j < cols;j++){
			//cout << src[i*rows+j] << "I: " << i << "J: " << j << endl;//DEBUG
			dest[j*rows+i] = src[i*cols+j];
		}
	} 	
}

void initializeMatrixWeightsRand(float *arr, int rows, int cols, int seed) {
    int i;
    float randNum, r;
    srand(seed);

    //rows and cols depend on hidden and visible sizes
    int numElements = rows*cols;

    for (i = 0; i < numElements; i++) {
    	//Choose weights uniformly from the interval [-r, r]
        r = sqrt(6) / sqrt(rows+cols+1); 
        randNum = float(rand()%10000)/10000;
        randNum = randNum * 2 * r - r;
        arr[i] = randNum;
    }
}

void initializeMatrixWeightsZero(float *arr, int rows, int cols) {
    //rows and cols depend on hidden and visible sizes
    int numElements = rows*cols;

    for (int i = 0; i < numElements; i++) {
        arr[i] = 0.0;
    }
}

//initialize the vector weights to 0
void initializeVectorWeightsZero(float *arr, int numElements){
	int i;
	for (i = 0; i < numElements; i++){
		arr[i] = 0;
	}
}


void mmm_kij(float* src1, float* src2, float* dest, int row1, int col1, int row2, int col2){
	for(int k = 0; k < row1; k++){
		for(int i = 0; i < col1; i++){//or row2
			for(int j = 0; j < col2; j++){
				dest[k*col2+j] += src1[j*col1+i] * src2[i*col2+j]; 
				//cout << "src1: " << src1[i*col1+j] << " src2: " << src2[j*col2+k] << endl;//DEBUG
				//cout << "I: " << i << " J: " << j << " K: " << k << endl;//DEBUG
			}
		}
	}
}

//http://www.cplusplus.com/forum/general/13087/
//http://www.cplusplus.com/forum/general/17771/
//http://www.cplusplus.com/forum/beginner/24906/
void readCSV(float* array, int numElements, string filename){
	
	ifstream infile(filename.c_str());
	int index = 0;

	if(infile){
		string line;
		while(getline(infile,line)){
			istringstream sep(line);
			string result;
			while(getline(sep, result,',')){
				array[index] = atof(result.c_str());
				if(array[index] == 0){
					cout << index << endl;//DEBUG
				}
				index++;
			}
		}
	}
	//cout << "COUNT WAS " << index << endl;//DEBUG
	//cout << "Last val was " << array[index-1] << endl;//DEBUG
}


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

                                        # End of file scope inline assembly
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0                          # -- Begin function main
.LCPI0_0:
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0
.LCPI0_1:
	.long	0x3f800000                      # float 1
.LCPI0_2:
	.long	0x461c4000                      # float 1.0E+4
.LCPI0_3:
	.long	0x40400000                      # float 3
.LCPI0_4:
	.long	0x38d1b717                      # float 9.99999974E-5
.LCPI0_5:
	.long	0x3c23d70a                      # float 0.00999999977
.LCPI0_7:
	.long	0x469c4000                      # float 2.0E+4
.LCPI0_9:
	.long	0x00000000                      # float 0
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0
.LCPI0_6:
	.quad	0x3f0a36e2eb1c432d              # double 5.0000000000000002E-5
.LCPI0_8:
	.quad	0x4008000000000000              # double 3
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
.Lfunc_begin0:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception0
# %bb.0:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$312, %rsp                      # imm = 0x138
	.cfi_def_cfa_offset 368
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	$2560000, %edi                  # imm = 0x271000
	callq	malloc
	movq	%rax, 56(%rsp)                  # 8-byte Spill
	movl	$1, %edi
	movl	$100, %esi
	callq	calloc@PLT
	movq	%rax, 24(%rsp)                  # 8-byte Spill
	movl	$6400, %edi                     # imm = 0x1900
	callq	malloc
	movq	%rax, %rbp
	movl	$6400, %edi                     # imm = 0x1900
	callq	malloc
	movq	%rax, %r13
	movl	$1, %edi
	movl	$6400, %esi                     # imm = 0x1900
	callq	calloc@PLT
	movq	%rax, 136(%rsp)                 # 8-byte Spill
	movl	$1, %edi
	movl	$6400, %esi                     # imm = 0x1900
	callq	calloc@PLT
	movq	%rax, 72(%rsp)                  # 8-byte Spill
	movl	$1, %edi
	movl	$100, %esi
	callq	calloc@PLT
	movq	%rax, 104(%rsp)                 # 8-byte Spill
	movl	$1, %edi
	movl	$256, %esi                      # imm = 0x100
	callq	calloc@PLT
	movq	%rax, 128(%rsp)                 # 8-byte Spill
	movl	$100, %edi
	callq	malloc
	movq	%rax, 96(%rsp)                  # 8-byte Spill
	movl	$256, %edi                      # imm = 0x100
	callq	malloc
	movq	%rax, 88(%rsp)                  # 8-byte Spill
	movl	$1, %edi
	movl	$100, %esi
	callq	calloc@PLT
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	movl	$1, %edi
	movl	$256, %esi                      # imm = 0x100
	callq	calloc@PLT
	movq	%rax, 80(%rsp)                  # 8-byte Spill
	movl	$1, %edi
	movl	$100, %esi
	callq	calloc@PLT
	movq	%rax, %rbx
	movl	$1, %edi
	movl	$256, %esi                      # imm = 0x100
	callq	calloc@PLT
	movq	%rax, 152(%rsp)                 # 8-byte Spill
	movl	$100, %edi
	callq	malloc
	movq	%rax, %r15
	movl	$256, %edi                      # imm = 0x100
	callq	malloc
	movq	%rax, %r14
	movl	$256, %edi                      # imm = 0x100
	callq	malloc
	movq	%rax, %r12
	movl	$256, %edi                      # imm = 0x100
	callq	malloc
	movq	%rax, 48(%rsp)                  # 8-byte Spill
	movl	$6400, %edi                     # imm = 0x1900
	callq	malloc
	movq	%rax, 64(%rsp)                  # 8-byte Spill
	movl	$6400, %edi                     # imm = 0x1900
	callq	malloc
	movq	%rax, 120(%rsp)                 # 8-byte Spill
	movl	$100, %edi
	callq	malloc
	movq	%rax, 112(%rsp)                 # 8-byte Spill
	movq	%rbp, 40(%rsp)                  # 8-byte Spill
	movq	%rbp, %rdi
	movl	$25, %esi
	movl	$64, %edx
	movl	$2254, %ecx                     # imm = 0x8CE
	callq	_Z27initializeMatrixWeightsRandPfiii
	movq	%r13, 32(%rsp)                  # 8-byte Spill
	movq	%r13, %rdi
	movl	$64, %esi
	movl	$25, %edx
	movl	$1345, %ecx                     # imm = 0x541
	callq	_Z27initializeMatrixWeightsRandPfiii
	leaq	256(%rsp), %rbp
	movq	%rbp, -16(%rbp)
	leaq	240(%rsp), %r13
	movl	$.L.str, %esi
	movl	$.L.str+13, %edx
	movq	%r13, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
.Ltmp0:
	movq	56(%rsp), %rdi                  # 8-byte Reload
	movq	%r13, %rdx
	callq	_Z7readCSVPfiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.Ltmp1:
# %bb.1:
	movq	240(%rsp), %rdi
	cmpq	%rbp, %rdi
	je	.LBB0_3
# %bb.2:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB0_3:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	leaq	224(%rsp), %rbp
	movq	%rbp, -16(%rbp)
	leaq	208(%rsp), %r13
	movl	$.L.str.1, %esi
	movl	$.L.str.1+6, %edx
	movq	%r13, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
.Ltmp3:
	movq	40(%rsp), %rdi                  # 8-byte Reload
	movq	%r13, %rdx
	callq	_Z7readCSVPfiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.Ltmp4:
# %bb.4:
	movq	208(%rsp), %rdi
	cmpq	%rbp, %rdi
	je	.LBB0_6
# %bb.5:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i268
	callq	_ZdlPv
.LBB0_6:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit270
	leaq	192(%rsp), %rbp
	movq	%rbp, -16(%rbp)
	leaq	176(%rsp), %r13
	movl	$.L.str.2, %esi
	movl	$.L.str.2+6, %edx
	movq	%r13, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
.Ltmp6:
	movq	32(%rsp), %rdi                  # 8-byte Reload
	movq	%r13, %rdx
	callq	_Z7readCSVPfiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.Ltmp7:
# %bb.7:
	movq	176(%rsp), %rdi
	cmpq	%rbp, %rdi
	je	.LBB0_9
# %bb.8:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i272
	callq	_ZdlPv
.LBB0_9:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit274
	xorl	%r13d, %r13d
	movl	$.L.str.3, %edi
	xorl	%eax, %eax
	callq	printf
	leaq	160(%rsp), %rsi
	movl	$2, %edi
	callq	clock_gettime
	movaps	.LCPI0_0(%rip), %xmm2           # xmm2 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
	movq	56(%rsp), %rbp                  # 8-byte Reload
	movq	16(%rsp), %rsi                  # 8-byte Reload
.LBB0_10:                               # %.preheader621
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB0_11 Depth 2
                                        #       Child Loop BB0_12 Depth 3
                                        #     Child Loop BB0_15 Depth 2
                                        #     Child Loop BB0_17 Depth 2
                                        #     Child Loop BB0_19 Depth 2
	movq	40(%rsp), %rax                  # 8-byte Reload
	xorl	%ecx, %ecx
.LBB0_11:                               #   Parent Loop BB0_10 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB0_12 Depth 3
	xorps	%xmm0, %xmm0
	xorl	%edx, %edx
.LBB0_12:                               # %.lr.ph.i296
                                        #   Parent Loop BB0_10 Depth=1
                                        #     Parent Loop BB0_11 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movss	(%rbp,%rdx,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	mulss	(%rax,%rdx,4), %xmm1
	addss	%xmm1, %xmm0
	incq	%rdx
	cmpq	$64, %rdx
	jne	.LBB0_12
# %bb.13:                               # %_Z6dotPdtPfS_S_i.exit
                                        #   in Loop: Header=BB0_11 Depth=2
	movss	%xmm0, (%rsi,%rcx,4)
	incq	%rcx
	addq	$256, %rax                      # imm = 0x100
	cmpq	$25, %rcx
	jne	.LBB0_11
# %bb.14:                               # %.lr.ph.i.preheader
                                        #   in Loop: Header=BB0_10 Depth=1
	movq	%r13, 8(%rsp)                   # 8-byte Spill
	xorl	%eax, %eax
	movq	104(%rsp), %rcx                 # 8-byte Reload
.LBB0_15:                               # %.lr.ph.i
                                        #   Parent Loop BB0_10 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rsi,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	addss	(%rcx,%rax,4), %xmm0
	movss	%xmm0, (%rsi,%rax,4)
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_15
# %bb.16:                               # %.lr.ph.i287.preheader
                                        #   in Loop: Header=BB0_10 Depth=1
	xorl	%r13d, %r13d
.LBB0_17:                               # %.lr.ph.i287
                                        #   Parent Loop BB0_10 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rsi,%r13,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	xorps	%xmm2, %xmm0
	callq	expf
	movss	.LCPI0_1(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	movaps	.LCPI0_0(%rip), %xmm2           # xmm2 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
	movq	16(%rsp), %rsi                  # 8-byte Reload
	addss	%xmm1, %xmm0
	divss	%xmm0, %xmm1
	movss	%xmm1, (%rbx,%r13,4)
	incq	%r13
	cmpq	$25, %r13
	jne	.LBB0_17
# %bb.18:                               # %.lr.ph.i291.preheader
                                        #   in Loop: Header=BB0_10 Depth=1
	xorl	%eax, %eax
	movq	24(%rsp), %rcx                  # 8-byte Reload
.LBB0_19:                               # %.lr.ph.i291
                                        #   Parent Loop BB0_10 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rcx,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	addss	(%rbx,%rax,4), %xmm0
	movss	%xmm0, (%rcx,%rax,4)
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_19
# %bb.20:                               # %_Z10addVectorsPfS_S_i.exit295
                                        #   in Loop: Header=BB0_10 Depth=1
	movq	8(%rsp), %rdx                   # 8-byte Reload
	leaq	64(%rdx), %r13
	addq	$256, %rbp                      # imm = 0x100
	cmpq	$639936, %rdx                   # imm = 0x9C3C0
	jb	.LBB0_10
# %bb.21:                               # %.preheader620.preheader
	xorl	%eax, %eax
	movss	.LCPI0_2(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
.LBB0_22:                               # %.preheader620
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rcx,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	divss	%xmm1, %xmm0
	movss	%xmm0, (%rcx,%rax,4)
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_22
# %bb.23:                               # %.preheader.preheader
	xorl	%eax, %eax
	movq	56(%rsp), %rbp                  # 8-byte Reload
	xorps	%xmm0, %xmm0
	movss	%xmm0, 8(%rsp)                  # 4-byte Spill
.LBB0_24:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB0_25 Depth 2
                                        #       Child Loop BB0_26 Depth 3
                                        #     Child Loop BB0_29 Depth 2
                                        #     Child Loop BB0_31 Depth 2
                                        #     Child Loop BB0_33 Depth 2
                                        #       Child Loop BB0_34 Depth 3
                                        #     Child Loop BB0_37 Depth 2
                                        #     Child Loop BB0_39 Depth 2
                                        #     Child Loop BB0_41 Depth 2
                                        #     Child Loop BB0_43 Depth 2
                                        #     Child Loop BB0_45 Depth 2
                                        #     Child Loop BB0_47 Depth 2
                                        #     Child Loop BB0_49 Depth 2
                                        #     Child Loop BB0_51 Depth 2
                                        #     Child Loop BB0_53 Depth 2
                                        #     Child Loop BB0_55 Depth 2
                                        #     Child Loop BB0_57 Depth 2
                                        #     Child Loop BB0_59 Depth 2
                                        #     Child Loop BB0_61 Depth 2
                                        #     Child Loop BB0_63 Depth 2
                                        #     Child Loop BB0_65 Depth 2
                                        #     Child Loop BB0_67 Depth 2
                                        #       Child Loop BB0_68 Depth 3
                                        #     Child Loop BB0_71 Depth 2
                                        #       Child Loop BB0_72 Depth 3
                                        #     Child Loop BB0_75 Depth 2
                                        #     Child Loop BB0_77 Depth 2
                                        #     Child Loop BB0_79 Depth 2
                                        #     Child Loop BB0_81 Depth 2
                                        #     Child Loop BB0_83 Depth 2
                                        #     Child Loop BB0_85 Depth 2
                                        #       Child Loop BB0_86 Depth 3
                                        #     Child Loop BB0_89 Depth 2
                                        #     Child Loop BB0_91 Depth 2
                                        #     Child Loop BB0_93 Depth 2
                                        #       Child Loop BB0_94 Depth 3
                                        #     Child Loop BB0_97 Depth 2
                                        #     Child Loop BB0_99 Depth 2
                                        #     Child Loop BB0_101 Depth 2
                                        #     Child Loop BB0_103 Depth 2
	movq	%rax, 144(%rsp)                 # 8-byte Spill
	movq	40(%rsp), %rax                  # 8-byte Reload
	xorl	%ecx, %ecx
.LBB0_25:                               #   Parent Loop BB0_24 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB0_26 Depth 3
	xorps	%xmm0, %xmm0
	xorl	%edx, %edx
.LBB0_26:                               # %.lr.ph.i424
                                        #   Parent Loop BB0_24 Depth=1
                                        #     Parent Loop BB0_25 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movss	(%rbp,%rdx,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	mulss	(%rax,%rdx,4), %xmm1
	addss	%xmm1, %xmm0
	incq	%rdx
	cmpq	$64, %rdx
	jne	.LBB0_26
# %bb.27:                               # %_Z6dotPdtPfS_S_i.exit429
                                        #   in Loop: Header=BB0_25 Depth=2
	movss	%xmm0, (%rsi,%rcx,4)
	incq	%rcx
	addq	$256, %rax                      # imm = 0x100
	cmpq	$25, %rcx
	jne	.LBB0_25
# %bb.28:                               # %.lr.ph.i414.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
	movq	104(%rsp), %rcx                 # 8-byte Reload
.LBB0_29:                               # %.lr.ph.i414
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rsi,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	addss	(%rcx,%rax,4), %xmm0
	movss	%xmm0, (%rsi,%rax,4)
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_29
# %bb.30:                               # %.lr.ph.i419.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%r13d, %r13d
.LBB0_31:                               # %.lr.ph.i419
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rsi,%r13,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	xorps	.LCPI0_0(%rip), %xmm0
	callq	expf
	movss	.LCPI0_1(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	movq	16(%rsp), %rsi                  # 8-byte Reload
	addss	%xmm1, %xmm0
	divss	%xmm0, %xmm1
	movss	%xmm1, (%rbx,%r13,4)
	incq	%r13
	cmpq	$25, %r13
	jne	.LBB0_31
# %bb.32:                               # %_Z15vectElemSigmoidPfS_i.exit423.preheader.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	movq	32(%rsp), %rax                  # 8-byte Reload
	xorl	%ecx, %ecx
	movq	80(%rsp), %rsi                  # 8-byte Reload
	movq	128(%rsp), %rdi                 # 8-byte Reload
.LBB0_33:                               # %_Z15vectElemSigmoidPfS_i.exit423.preheader
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB0_34 Depth 3
	xorps	%xmm0, %xmm0
	xorl	%edx, %edx
.LBB0_34:                               # %.lr.ph.i509
                                        #   Parent Loop BB0_24 Depth=1
                                        #     Parent Loop BB0_33 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movss	(%rbx,%rdx,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	mulss	(%rax,%rdx,4), %xmm1
	addss	%xmm1, %xmm0
	incq	%rdx
	cmpq	$64, %rdx
	jne	.LBB0_34
# %bb.35:                               # %_Z6dotPdtPfS_S_i.exit515
                                        #   in Loop: Header=BB0_33 Depth=2
	movss	%xmm0, (%rsi,%rcx,4)
	incq	%rcx
	addq	$100, %rax
	cmpq	$64, %rcx
	jne	.LBB0_33
# %bb.36:                               # %.lr.ph.i430.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
.LBB0_37:                               # %.lr.ph.i430
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rsi,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	addss	(%rdi,%rax,4), %xmm0
	movss	%xmm0, (%rsi,%rax,4)
	incq	%rax
	cmpq	$64, %rax
	jne	.LBB0_37
# %bb.38:                               # %.lr.ph.i435.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%r13d, %r13d
.LBB0_39:                               # %.lr.ph.i435
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rsi,%r13,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	xorps	.LCPI0_0(%rip), %xmm0
	callq	expf
	movss	.LCPI0_1(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	movq	152(%rsp), %r8                  # 8-byte Reload
	movq	80(%rsp), %rsi                  # 8-byte Reload
	addss	%xmm1, %xmm0
	divss	%xmm0, %xmm1
	movss	%xmm1, (%r8,%r13,4)
	incq	%r13
	cmpq	$64, %r13
	jne	.LBB0_39
# %bb.40:                               # %.lr.ph.i440.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
.LBB0_41:                               # %.lr.ph.i440
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movl	$1065353216, (%r12,%rax,4)      # imm = 0x3F800000
	incq	%rax
	cmpq	$64, %rax
	jne	.LBB0_41
# %bb.42:                               # %.lr.ph.i445.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
	movq	24(%rsp), %r13                  # 8-byte Reload
	movq	48(%rsp), %r9                   # 8-byte Reload
	movq	64(%rsp), %r10                  # 8-byte Reload
	movss	.LCPI0_3(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
.LBB0_43:                               # %.lr.ph.i445
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%r12,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	subss	(%r8,%rax,4), %xmm0
	movss	%xmm0, (%r12,%rax,4)
	incq	%rax
	cmpq	$64, %rax
	jne	.LBB0_43
# %bb.44:                               # %.lr.ph.i450.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
.LBB0_45:                               # %.lr.ph.i450
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%r8,%rax,4), %xmm0             # xmm0 = mem[0],zero,zero,zero
	mulss	(%r12,%rax,4), %xmm0
	movss	%xmm0, (%r12,%rax,4)
	incq	%rax
	cmpq	$64, %rax
	jne	.LBB0_45
# %bb.46:                               # %.lr.ph.i455.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
.LBB0_47:                               # %.lr.ph.i455
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%r8,%rax,4), %xmm0             # xmm0 = mem[0],zero,zero,zero
	subss	(%rbp,%rax,4), %xmm0
	movss	%xmm0, (%r9,%rax,4)
	incq	%rax
	cmpq	$64, %rax
	jne	.LBB0_47
# %bb.48:                               # %.lr.ph.i460.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
.LBB0_49:                               # %.lr.ph.i460
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%r12,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	mulss	(%r9,%rax,4), %xmm0
	movss	%xmm0, (%r14,%rax,4)
	incq	%rax
	cmpq	$64, %rax
	jne	.LBB0_49
# %bb.50:                               # %.lr.ph.i465.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
.LBB0_51:                               # %.lr.ph.i465
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movl	$1065353216, (%r9,%rax,4)       # imm = 0x3F800000
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_51
# %bb.52:                               # %.lr.ph.i470.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
.LBB0_53:                               # %.lr.ph.i470
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%r9,%rax,4), %xmm0             # xmm0 = mem[0],zero,zero,zero
	subss	(%r13,%rax,4), %xmm0
	movss	%xmm0, (%r9,%rax,4)
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_53
# %bb.54:                               # %.lr.ph.i475.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
.LBB0_55:                               # %.lr.ph.i475
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movl	$1065185444, (%r12,%rax,4)      # imm = 0x3F7D70A4
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_55
# %bb.56:                               # %.lr.ph.i480.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
.LBB0_57:                               # %.lr.ph.i480
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%r12,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	divss	(%r9,%rax,4), %xmm0
	movss	%xmm0, (%r9,%rax,4)
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_57
# %bb.58:                               # %.lr.ph.i485.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
.LBB0_59:                               # %.lr.ph.i485
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movl	$-1138501878, (%r12,%rax,4)     # imm = 0xBC23D70A
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_59
# %bb.60:                               # %.lr.ph.i490.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
.LBB0_61:                               # %.lr.ph.i490
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%r12,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	divss	(%r13,%rax,4), %xmm0
	movss	%xmm0, (%r12,%rax,4)
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_61
# %bb.62:                               # %.lr.ph.i495.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
.LBB0_63:                               # %.lr.ph.i495
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%r12,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	addss	(%r9,%rax,4), %xmm0
	movss	%xmm0, (%r12,%rax,4)
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_63
# %bb.64:                               # %.lr.ph.i500.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
.LBB0_65:                               # %.lr.ph.i500
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%r12,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm0
	movss	%xmm0, (%r12,%rax,4)
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_65
# %bb.66:                               # %.preheader.i.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	movq	32(%rsp), %rax                  # 8-byte Reload
	movq	%r10, %rcx
	xorl	%edx, %edx
.LBB0_67:                               # %.preheader.i
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB0_68 Depth 3
	movq	%rcx, %rsi
	xorl	%edi, %edi
.LBB0_68:                               #   Parent Loop BB0_24 Depth=1
                                        #     Parent Loop BB0_67 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movss	(%rax,%rdi,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rsi)
	incq	%rdi
	addq	$256, %rsi                      # imm = 0x100
	cmpq	$25, %rdi
	jne	.LBB0_68
# %bb.69:                               # %._crit_edge.i
                                        #   in Loop: Header=BB0_67 Depth=2
	incq	%rdx
	addq	$4, %rcx
	addq	$100, %rax
	cmpq	$64, %rdx
	jne	.LBB0_67
# %bb.70:                               # %_Z15matrixTransposePfS_ii.exit.preheader.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	movq	%r10, %rax
	xorl	%ecx, %ecx
	movq	136(%rsp), %rsi                 # 8-byte Reload
.LBB0_71:                               # %_Z15matrixTransposePfS_ii.exit.preheader
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB0_72 Depth 3
	xorps	%xmm0, %xmm0
	xorl	%edx, %edx
.LBB0_72:                               # %.lr.ph.i611
                                        #   Parent Loop BB0_24 Depth=1
                                        #     Parent Loop BB0_71 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movss	(%r14,%rdx,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	mulss	(%rax,%rdx,4), %xmm1
	addss	%xmm1, %xmm0
	incq	%rdx
	cmpq	$64, %rdx
	jne	.LBB0_72
# %bb.73:                               # %_Z6dotPdtPfS_S_i.exit617
                                        #   in Loop: Header=BB0_71 Depth=2
	movss	%xmm0, (%r9,%rcx,4)
	incq	%rcx
	addq	$100, %rax
	cmpq	$64, %rcx
	jne	.LBB0_71
# %bb.74:                               # %.lr.ph.i516.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
.LBB0_75:                               # %.lr.ph.i516
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%r9,%rax,4), %xmm0             # xmm0 = mem[0],zero,zero,zero
	addss	(%r12,%rax,4), %xmm0
	movss	%xmm0, (%r9,%rax,4)
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_75
# %bb.76:                               # %.lr.ph.i522.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
.LBB0_77:                               # %.lr.ph.i522
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movl	$1065353216, (%r12,%rax,4)      # imm = 0x3F800000
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_77
# %bb.78:                               # %.lr.ph.i528.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
.LBB0_79:                               # %.lr.ph.i528
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%r12,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	subss	(%rbx,%rax,4), %xmm0
	movss	%xmm0, (%r12,%rax,4)
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_79
# %bb.80:                               # %.lr.ph.i534.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
.LBB0_81:                               # %.lr.ph.i534
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rbx,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	mulss	(%r12,%rax,4), %xmm0
	movss	%xmm0, (%r12,%rax,4)
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_81
# %bb.82:                               # %.lr.ph.i540.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
.LBB0_83:                               # %.lr.ph.i540
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%r12,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	mulss	(%r9,%rax,4), %xmm0
	movss	%xmm0, (%r15,%rax,4)
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_83
# %bb.84:                               # %.preheader24.i.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	movq	%r10, %rax
	xorl	%ecx, %ecx
.LBB0_85:                               # %.preheader24.i
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB0_86 Depth 3
	xorl	%edx, %edx
.LBB0_86:                               #   Parent Loop BB0_24 Depth=1
                                        #     Parent Loop BB0_85 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movss	(%r14,%rdx,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	mulss	(%rbx,%rdx,4), %xmm0
	addss	(%rax,%rdx,4), %xmm0
	movss	%xmm0, (%rax,%rdx,4)
	incq	%rdx
	cmpq	$25, %rdx
	jne	.LBB0_86
# %bb.87:                               # %._crit_edge.i553
                                        #   in Loop: Header=BB0_85 Depth=2
	incq	%rcx
	addq	$100, %rax
	cmpq	$64, %rcx
	jne	.LBB0_85
# %bb.88:                               # %.lr.ph.i554.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
	movq	72(%rsp), %rcx                  # 8-byte Reload
.LBB0_89:                               # %.lr.ph.i554
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rcx,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	addss	(%r10,%rax,4), %xmm0
	movss	%xmm0, (%rcx,%rax,4)
	incq	%rax
	cmpq	$1600, %rax                     # imm = 0x640
	jne	.LBB0_89
# %bb.90:                               # %.lr.ph.i560.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
	movq	88(%rsp), %rcx                  # 8-byte Reload
.LBB0_91:                               # %.lr.ph.i560
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rcx,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	addss	(%r14,%rax,4), %xmm0
	movss	%xmm0, (%rcx,%rax,4)
	incq	%rax
	cmpq	$64, %rax
	jne	.LBB0_91
# %bb.92:                               # %.preheader24.i566.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	movq	%r10, %rax
	xorl	%ecx, %ecx
.LBB0_93:                               # %.preheader24.i566
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB0_94 Depth 3
	xorl	%edx, %edx
.LBB0_94:                               #   Parent Loop BB0_24 Depth=1
                                        #     Parent Loop BB0_93 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movss	(%r15,%rdx,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	mulss	(%rbp,%rdx,4), %xmm0
	addss	(%rax,%rdx,4), %xmm0
	movss	%xmm0, (%rax,%rdx,4)
	incq	%rdx
	cmpq	$64, %rdx
	jne	.LBB0_94
# %bb.95:                               # %._crit_edge.i580
                                        #   in Loop: Header=BB0_93 Depth=2
	incq	%rcx
	addq	$256, %rax                      # imm = 0x100
	cmpq	$25, %rcx
	jne	.LBB0_93
# %bb.96:                               # %.lr.ph.i587.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
.LBB0_97:                               # %.lr.ph.i587
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rsi,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	addss	(%r10,%rax,4), %xmm0
	movss	%xmm0, (%rsi,%rax,4)
	incq	%rax
	cmpq	$1600, %rax                     # imm = 0x640
	jne	.LBB0_97
# %bb.98:                               # %.lr.ph.i593.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
	movq	96(%rsp), %rcx                  # 8-byte Reload
.LBB0_99:                               # %.lr.ph.i593
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rcx,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	addss	(%r15,%rax,4), %xmm0
	movss	%xmm0, (%rcx,%rax,4)
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_99
# %bb.100:                              # %.lr.ph.i599.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorl	%eax, %eax
.LBB0_101:                              # %.lr.ph.i599
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%r8,%rax,4), %xmm0             # xmm0 = mem[0],zero,zero,zero
	subss	(%rbp,%rax,4), %xmm0
	movss	%xmm0, (%r12,%rax,4)
	incq	%rax
	cmpq	$64, %rax
	jne	.LBB0_101
# %bb.102:                              # %.lr.ph.i605.preheader
                                        #   in Loop: Header=BB0_24 Depth=1
	xorps	%xmm0, %xmm0
	xorl	%eax, %eax
.LBB0_103:                              # %.lr.ph.i605
                                        #   Parent Loop BB0_24 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%r12,%rax,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm1
	addss	%xmm1, %xmm0
	incq	%rax
	cmpq	$64, %rax
	jne	.LBB0_103
# %bb.104:                              # %_Z10normVectorPfi.exit
                                        #   in Loop: Header=BB0_24 Depth=1
	ucomiss	.LCPI0_9(%rip), %xmm0
	jb	.LBB0_160
# %bb.105:                              #   in Loop: Header=BB0_24 Depth=1
	sqrtss	%xmm0, %xmm0
	jmp	.LBB0_161
.LBB0_160:                              # %call.sqrt
                                        #   in Loop: Header=BB0_24 Depth=1
	callq	sqrtf
	movq	64(%rsp), %r10                  # 8-byte Reload
	movq	48(%rsp), %r9                   # 8-byte Reload
.LBB0_161:                              # %_Z10normVectorPfi.exit.split
                                        #   in Loop: Header=BB0_24 Depth=1
	movq	72(%rsp), %rcx                  # 8-byte Reload
	movq	16(%rsp), %rsi                  # 8-byte Reload
	movss	.LCPI0_2(%rip), %xmm2           # xmm2 = mem[0],zero,zero,zero
	movq	144(%rsp), %rdx                 # 8-byte Reload
	mulss	%xmm0, %xmm0
	movss	8(%rsp), %xmm1                  # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	addss	%xmm0, %xmm1
	movss	%xmm1, 8(%rsp)                  # 4-byte Spill
	leaq	64(%rdx), %rax
	addq	$256, %rbp                      # imm = 0x100
	cmpq	$639936, %rdx                   # imm = 0x9C3C0
	jb	.LBB0_24
# %bb.162:                              # %.lr.ph.i300.preheader
	xorl	%eax, %eax
.LBB0_112:                              # %.lr.ph.i300
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rcx,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	divss	%xmm2, %xmm0
	movss	%xmm0, (%rcx,%rax,4)
	incq	%rax
	cmpq	$1600, %rax                     # imm = 0x640
	jne	.LBB0_112
# %bb.113:                              # %.lr.ph.i304.preheader
	xorl	%eax, %eax
	movss	.LCPI0_4(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	movq	32(%rsp), %rbp                  # 8-byte Reload
.LBB0_114:                              # %.lr.ph.i304
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rbp,%rax,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	movss	%xmm1, (%r10,%rax,4)
	incq	%rax
	cmpq	$1600, %rax                     # imm = 0x640
	jne	.LBB0_114
# %bb.115:                              # %.lr.ph.i308.preheader
	xorl	%eax, %eax
.LBB0_116:                              # %.lr.ph.i308
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rcx,%rax,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	addss	(%r10,%rax,4), %xmm1
	movss	%xmm1, (%rcx,%rax,4)
	incq	%rax
	cmpq	$1600, %rax                     # imm = 0x640
	jne	.LBB0_116
# %bb.117:                              # %.lr.ph.i313.preheader
	xorl	%eax, %eax
	movq	88(%rsp), %rdx                  # 8-byte Reload
.LBB0_118:                              # %.lr.ph.i313
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rdx,%rax,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	divss	%xmm2, %xmm1
	movss	%xmm1, (%rdx,%rax,4)
	incq	%rax
	cmpq	$64, %rax
	jne	.LBB0_118
# %bb.119:                              # %.lr.ph.i318.preheader
	xorl	%eax, %eax
.LBB0_120:                              # %.lr.ph.i318
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rcx,%rax,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	divss	%xmm2, %xmm1
	movss	%xmm1, (%rcx,%rax,4)
	incq	%rax
	cmpq	$1600, %rax                     # imm = 0x640
	jne	.LBB0_120
# %bb.121:                              # %.lr.ph.i323.preheader
	xorl	%eax, %eax
.LBB0_122:                              # %.lr.ph.i323
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rbp,%rax,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	movss	%xmm1, (%r10,%rax,4)
	incq	%rax
	cmpq	$1600, %rax                     # imm = 0x640
	jne	.LBB0_122
# %bb.123:                              # %.lr.ph.i328.preheader
	xorl	%eax, %eax
.LBB0_124:                              # %.lr.ph.i328
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rcx,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	addss	(%r10,%rax,4), %xmm0
	movss	%xmm0, (%rcx,%rax,4)
	incq	%rax
	cmpq	$1600, %rax                     # imm = 0x640
	jne	.LBB0_124
# %bb.125:                              # %.lr.ph.i333.preheader
	xorl	%eax, %eax
	movq	96(%rsp), %rcx                  # 8-byte Reload
.LBB0_126:                              # %.lr.ph.i333
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rcx,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	divss	%xmm2, %xmm0
	movss	%xmm0, (%rcx,%rax,4)
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_126
# %bb.127:                              # %.lr.ph.i338.preheader
	xorl	%eax, %eax
.LBB0_128:                              # %.lr.ph.i338
                                        # =>This Inner Loop Header: Depth=1
	movl	$1065353216, (%r12,%rax,4)      # imm = 0x3F800000
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_128
# %bb.129:                              # %.lr.ph.i342.preheader
	xorl	%eax, %eax
.LBB0_130:                              # %.lr.ph.i342
                                        # =>This Inner Loop Header: Depth=1
	movss	(%r12,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	subss	(%r13,%rax,4), %xmm0
	movss	%xmm0, (%r9,%rax,4)
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_130
# %bb.131:                              # %.lr.ph.i346.preheader
	xorl	%eax, %eax
.LBB0_132:                              # %.lr.ph.i346
                                        # =>This Inner Loop Header: Depth=1
	movl	$1065185444, (%r12,%rax,4)      # imm = 0x3F7D70A4
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_132
# %bb.133:                              # %.lr.ph.i351.preheader
	xorl	%eax, %eax
.LBB0_134:                              # %.lr.ph.i351
                                        # =>This Inner Loop Header: Depth=1
	movss	(%r12,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	divss	(%r9,%rax,4), %xmm0
	movss	%xmm0, (%r9,%rax,4)
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_134
# %bb.135:                              # %.lr.ph.i355.preheader
	xorl	%r13d, %r13d
.LBB0_136:                              # %.lr.ph.i355
                                        # =>This Inner Loop Header: Depth=1
	movss	(%r9,%r13,4), %xmm0             # xmm0 = mem[0],zero,zero,zero
	callq	logf
	movq	48(%rsp), %r9                   # 8-byte Reload
	movss	%xmm0, (%r9,%r13,4)
	incq	%r13
	cmpq	$25, %r13
	jne	.LBB0_136
# %bb.137:                              # %.lr.ph.i359.preheader
	xorl	%eax, %eax
	movq	24(%rsp), %rcx                  # 8-byte Reload
.LBB0_138:                              # %.lr.ph.i359
                                        # =>This Inner Loop Header: Depth=1
	movss	(%r12,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	mulss	(%r9,%rax,4), %xmm0
	movss	%xmm0, (%r9,%rax,4)
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_138
# %bb.139:                              # %.lr.ph.i363.preheader
	xorl	%eax, %eax
.LBB0_140:                              # %.lr.ph.i363
                                        # =>This Inner Loop Header: Depth=1
	movl	$1008981770, (%r12,%rax,4)      # imm = 0x3C23D70A
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_140
# %bb.141:                              # %.lr.ph.i368.preheader
	xorl	%eax, %eax
.LBB0_142:                              # %.lr.ph.i368
                                        # =>This Inner Loop Header: Depth=1
	movss	(%r12,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	divss	(%rcx,%rax,4), %xmm0
	movss	%xmm0, (%r12,%rax,4)
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_142
# %bb.143:                              # %.lr.ph.i373.preheader
	xorl	%r13d, %r13d
.LBB0_144:                              # %.lr.ph.i373
                                        # =>This Inner Loop Header: Depth=1
	movss	(%r12,%r13,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	callq	logf
	movss	%xmm0, (%r12,%r13,4)
	incq	%r13
	cmpq	$25, %r13
	jne	.LBB0_144
# %bb.145:                              # %.lr.ph.i378.preheader
	xorl	%eax, %eax
	movss	.LCPI0_5(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
.LBB0_146:                              # %.lr.ph.i378
                                        # =>This Inner Loop Header: Depth=1
	movss	(%r12,%rax,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	movss	%xmm1, (%r12,%rax,4)
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_146
# %bb.147:                              # %.lr.ph.i383.preheader
	xorl	%eax, %eax
	movq	40(%rsp), %rcx                  # 8-byte Reload
	movq	48(%rsp), %rdx                  # 8-byte Reload
	movq	64(%rsp), %rsi                  # 8-byte Reload
	movq	120(%rsp), %rdi                 # 8-byte Reload
	movq	112(%rsp), %r8                  # 8-byte Reload
.LBB0_148:                              # %.lr.ph.i383
                                        # =>This Inner Loop Header: Depth=1
	movss	(%r12,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	addss	(%rdx,%rax,4), %xmm0
	movss	%xmm0, (%r8,%rax,4)
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_148
# %bb.149:                              # %.lr.ph.i388.preheader
	xorl	%eax, %eax
.LBB0_150:                              # %.lr.ph.i388
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rcx,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm0
	movss	%xmm0, (%rsi,%rax,4)
	incq	%rax
	cmpq	$1600, %rax                     # imm = 0x640
	jne	.LBB0_150
# %bb.151:                              # %.lr.ph.i393.preheader
	xorps	%xmm0, %xmm0
	xorl	%eax, %eax
.LBB0_152:                              # %.lr.ph.i393
                                        # =>This Inner Loop Header: Depth=1
	addss	(%rsi,%rax,4), %xmm0
	incq	%rax
	cmpq	$1600, %rax                     # imm = 0x640
	jne	.LBB0_152
# %bb.153:                              # %.lr.ph.i397.preheader
	xorl	%eax, %eax
.LBB0_154:                              # %.lr.ph.i397
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rbp,%rax,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm1
	movss	%xmm1, (%rdi,%rax,4)
	incq	%rax
	cmpq	$1600, %rax                     # imm = 0x640
	jne	.LBB0_154
# %bb.155:                              # %.lr.ph.i402.preheader
	xorps	%xmm1, %xmm1
	xorl	%eax, %eax
.LBB0_156:                              # %.lr.ph.i402
                                        # =>This Inner Loop Header: Depth=1
	addss	(%rdi,%rax,4), %xmm1
	incq	%rax
	cmpq	$1600, %rax                     # imm = 0x640
	jne	.LBB0_156
# %bb.157:                              # %.lr.ph.i408.preheader
	xorps	%xmm2, %xmm2
	xorl	%eax, %eax
.LBB0_158:                              # %.lr.ph.i408
                                        # =>This Inner Loop Header: Depth=1
	addss	(%r8,%rax,4), %xmm2
	incq	%rax
	cmpq	$25, %rax
	jne	.LBB0_158
# %bb.159:                              # %_Z9sumVectorPfi.exit413
	addss	%xmm1, %xmm0
	cvtss2sd	%xmm0, %xmm0
	mulsd	.LCPI0_6(%rip), %xmm0
	movss	8(%rsp), %xmm1                  # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	divss	.LCPI0_7(%rip), %xmm1
	cvtss2sd	%xmm1, %xmm1
	cvtss2sd	%xmm2, %xmm2
	mulsd	.LCPI0_8(%rip), %xmm2
	addsd	%xmm0, %xmm1
	addsd	%xmm1, %xmm2
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm2, %xmm0
	movss	%xmm0, 8(%rsp)                  # 4-byte Spill
	leaq	296(%rsp), %r13
	movl	$2, %edi
	movq	%r13, %rsi
	callq	clock_gettime
	movq	8(%r13), %rax
	subq	168(%rsp), %rax
	movq	160(%rsp), %rcx
	leaq	1000000000(%rax), %rdx
	movq	%rcx, %rsi
	negq	%rsi
	testq	%rax, %rax
	notq	%rcx
	cmovnsq	%rsi, %rcx
	cmovnsq	%rax, %rdx
	addq	(%r13), %rcx
	leaq	272(%rsp), %rdi
	movq	%rcx, (%rdi)
	movq	%rdx, 8(%rdi)
	movl	$1, %esi
	callq	_Z11printTimingP8timespeci
	movl	$_ZSt4cout, %r13d
	movl	$_ZSt4cout, %edi
	movl	$.L.str.4, %esi
	movl	$2, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%r13, %rdi
	movl	$_ZSt4cout, %r13d
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movq	16(%rsp), %rdi                  # 8-byte Reload
	movl	$25, %esi
	callq	_Z11printVectorPfi
	movl	$_ZSt4cout, %edi
	movl	$.L.str.5, %esi
	movl	$2, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%r13, %rdi
	movl	$_ZSt4cout, %r13d
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movq	%rbx, %rdi
	movl	$25, %esi
	callq	_Z11printVectorPfi
	movl	$_ZSt4cout, %edi
	movl	$.L.str.6, %esi
	movl	$6, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%r13, %rdi
	movl	$_ZSt4cout, %r13d
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movq	24(%rsp), %rdi                  # 8-byte Reload
	movl	$25, %esi
	callq	_Z11printVectorPfi
	movl	$_ZSt4cout, %edi
	movl	$.L.str.7, %esi
	movl	$2, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%r13, %rdi
	movl	$_ZSt4cout, %r13d
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movq	80(%rsp), %rdi                  # 8-byte Reload
	movl	$64, %esi
	callq	_Z11printVectorPfi
	movl	$_ZSt4cout, %edi
	movl	$.L.str.8, %esi
	movl	$2, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%r13, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movq	152(%rsp), %rbp                 # 8-byte Reload
	movq	%rbp, %rdi
	movl	$64, %esi
	callq	_Z11printVectorPfi
	movl	$_ZSt4cout, %edi
	movl	$.L.str.9, %esi
	movl	$6, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	cvtss2sd	8(%rsp), %xmm0                  # 4-byte Folded Reload
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %r13
	movq	(%rax), %rcx
	movq	-24(%rcx), %rdi
	addq	%rax, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r13, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.10, %esi
	movl	$9, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	movl	$_ZSt4cout, %eax
	addq	%rax, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movq	112(%rsp), %r13                 # 8-byte Reload
	movq	%r13, %rdi
	movl	$25, %esi
	callq	_Z11printVectorPfi
	movq	56(%rsp), %rdi                  # 8-byte Reload
	callq	free
	movq	24(%rsp), %rdi                  # 8-byte Reload
	callq	free
	movq	40(%rsp), %rdi                  # 8-byte Reload
	callq	free
	movq	32(%rsp), %rdi                  # 8-byte Reload
	callq	free
	movq	104(%rsp), %rdi                 # 8-byte Reload
	callq	free
	movq	128(%rsp), %rdi                 # 8-byte Reload
	callq	free
	movq	136(%rsp), %rdi                 # 8-byte Reload
	callq	free
	movq	72(%rsp), %rdi                  # 8-byte Reload
	callq	free
	movq	96(%rsp), %rdi                  # 8-byte Reload
	callq	free
	movq	88(%rsp), %rdi                  # 8-byte Reload
	callq	free
	movq	16(%rsp), %rdi                  # 8-byte Reload
	callq	free
	movq	80(%rsp), %rdi                  # 8-byte Reload
	callq	free
	movq	%rbx, %rdi
	callq	free
	movq	%rbp, %rdi
	callq	free
	movq	%r15, %rdi
	callq	free
	movq	%r14, %rdi
	callq	free
	movq	%r12, %rdi
	callq	free
	movq	48(%rsp), %rdi                  # 8-byte Reload
	callq	free
	movq	64(%rsp), %rdi                  # 8-byte Reload
	callq	free
	movq	120(%rsp), %rdi                 # 8-byte Reload
	callq	free
	movq	%r13, %rdi
	callq	free
	xorl	%eax, %eax
	addq	$312, %rsp                      # imm = 0x138
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB0_111:
	.cfi_def_cfa_offset 368
.Ltmp8:
	movq	%rax, %rbx
	movq	176(%rsp), %rdi
	jmp	.LBB0_107
.LBB0_110:
.Ltmp5:
	movq	%rax, %rbx
	movq	208(%rsp), %rdi
	jmp	.LBB0_107
.LBB0_106:
.Ltmp2:
	movq	%rax, %rbx
	movq	240(%rsp), %rdi
.LBB0_107:
	cmpq	%rbp, %rdi
	je	.LBB0_109
# %bb.108:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i275
	callq	_ZdlPv
.LBB0_109:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit277
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end0:
	.size	main, .Lfunc_end0-main
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table0:
.Lexception0:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end0-.Lcst_begin0
.Lcst_begin0:
	.uleb128 .Lfunc_begin0-.Lfunc_begin0    # >> Call Site 1 <<
	.uleb128 .Ltmp0-.Lfunc_begin0           #   Call between .Lfunc_begin0 and .Ltmp0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp0-.Lfunc_begin0           # >> Call Site 2 <<
	.uleb128 .Ltmp1-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp1
	.uleb128 .Ltmp2-.Lfunc_begin0           #     jumps to .Ltmp2
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp1-.Lfunc_begin0           # >> Call Site 3 <<
	.uleb128 .Ltmp3-.Ltmp1                  #   Call between .Ltmp1 and .Ltmp3
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp3-.Lfunc_begin0           # >> Call Site 4 <<
	.uleb128 .Ltmp4-.Ltmp3                  #   Call between .Ltmp3 and .Ltmp4
	.uleb128 .Ltmp5-.Lfunc_begin0           #     jumps to .Ltmp5
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp4-.Lfunc_begin0           # >> Call Site 5 <<
	.uleb128 .Ltmp6-.Ltmp4                  #   Call between .Ltmp4 and .Ltmp6
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp6-.Lfunc_begin0           # >> Call Site 6 <<
	.uleb128 .Ltmp7-.Ltmp6                  #   Call between .Ltmp6 and .Ltmp7
	.uleb128 .Ltmp8-.Lfunc_begin0           #     jumps to .Ltmp8
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp7-.Lfunc_begin0           # >> Call Site 7 <<
	.uleb128 .Lfunc_end0-.Ltmp7             #   Call between .Ltmp7 and .Lfunc_end0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z27initializeMatrixWeightsRandPfiii
.LCPI1_0:
	.quad	0x4003988e1409212e              # double 2.4494897427831779
.LCPI1_2:
	.quad	0x0000000000000000              # double 0
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0
.LCPI1_1:
	.long	0x461c4000                      # float 1.0E+4
	.text
	.globl	_Z27initializeMatrixWeightsRandPfiii
	.type	_Z27initializeMatrixWeightsRandPfiii,@function
_Z27initializeMatrixWeightsRandPfiii:   # @_Z27initializeMatrixWeightsRandPfiii
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movl	%ecx, %edi
	callq	srand
	movl	%r14d, %eax
	imull	%r15d, %eax
	testl	%eax, %eax
	jle	.LBB1_5
# %bb.1:                                # %.lr.ph
	leal	(%r15,%r14), %ecx
	incl	%ecx
	cvtsi2sd	%ecx, %xmm0
	movl	%eax, %r14d
	xorl	%r15d, %r15d
	movsd	%xmm0, 16(%rsp)                 # 8-byte Spill
	sqrtsd	%xmm0, %xmm0
	movsd	%xmm0, 24(%rsp)                 # 8-byte Spill
.LBB1_2:                                # =>This Inner Loop Header: Depth=1
	movsd	16(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	ucomisd	.LCPI1_2(%rip), %xmm0
	movsd	24(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	jae	.LBB1_4
# %bb.3:                                # %call.sqrt
                                        #   in Loop: Header=BB1_2 Depth=1
	movsd	16(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	callq	sqrt
.LBB1_4:                                # %.split
                                        #   in Loop: Header=BB1_2 Depth=1
	movsd	.LCPI1_0(%rip), %xmm1           # xmm1 = mem[0],zero
	divsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm1, %xmm0
	movss	%xmm0, 12(%rsp)                 # 4-byte Spill
	callq	rand
	cltq
	imulq	$1759218605, %rax, %rcx         # imm = 0x68DB8BAD
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$44, %rcx
	addl	%edx, %ecx
	imull	$10000, %ecx, %ecx              # imm = 0x2710
	subl	%ecx, %eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	divss	.LCPI1_1(%rip), %xmm0
	addss	%xmm0, %xmm0
	movss	12(%rsp), %xmm1                 # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm0
	subss	%xmm1, %xmm0
	movss	%xmm0, (%rbx,%r15,4)
	incq	%r15
	cmpq	%r15, %r14
	jne	.LBB1_2
.LBB1_5:                                # %._crit_edge
	addq	$32, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end1:
	.size	_Z27initializeMatrixWeightsRandPfiii, .Lfunc_end1-_Z27initializeMatrixWeightsRandPfiii
	.cfi_endproc
                                        # -- End function
	.globl	_Z27initializeMatrixWeightsZeroPfii # -- Begin function _Z27initializeMatrixWeightsZeroPfii
	.type	_Z27initializeMatrixWeightsZeroPfii,@function
_Z27initializeMatrixWeightsZeroPfii:    # @_Z27initializeMatrixWeightsZeroPfii
	.cfi_startproc
# %bb.0:
	imull	%edx, %esi
	testl	%esi, %esi
	jle	.LBB2_1
# %bb.2:                                # %.lr.ph.preheader
	movl	%esi, %edx
	shlq	$2, %rdx
	xorl	%esi, %esi
	jmp	memset@PLT                      # TAILCALL
.LBB2_1:                                # %._crit_edge
	retq
.Lfunc_end2:
	.size	_Z27initializeMatrixWeightsZeroPfii, .Lfunc_end2-_Z27initializeMatrixWeightsZeroPfii
	.cfi_endproc
                                        # -- End function
	.globl	_Z27initializeVectorWeightsZeroPfi # -- Begin function _Z27initializeVectorWeightsZeroPfi
	.type	_Z27initializeVectorWeightsZeroPfi,@function
_Z27initializeVectorWeightsZeroPfi:     # @_Z27initializeVectorWeightsZeroPfi
	.cfi_startproc
# %bb.0:
	testl	%esi, %esi
	jle	.LBB3_1
# %bb.2:                                # %.lr.ph.preheader
	movl	%esi, %edx
	shlq	$2, %rdx
	xorl	%esi, %esi
	jmp	memset@PLT                      # TAILCALL
.LBB3_1:                                # %._crit_edge
	retq
.Lfunc_end3:
	.size	_Z27initializeVectorWeightsZeroPfi, .Lfunc_end3-_Z27initializeVectorWeightsZeroPfi
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z7readCSVPfiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LCPI4_0:
	.long	0x00000000                      # float 0
	.text
	.globl	_Z7readCSVPfiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.type	_Z7readCSVPfiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE,@function
_Z7readCSVPfiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: # @_Z7readCSVPfiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.Lfunc_begin1:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception1
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$968, %rsp                      # imm = 0x3C8
	.cfi_def_cfa_offset 1024
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdi, %r14
	movq	(%rdx), %rsi
	leaq	64(%rsp), %rbx
	movq	%rbx, %rdi
	movl	$8, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
	movq	(%rbx), %rax
	movq	-24(%rax), %rax
	testb	$5, 96(%rsp,%rax)
	jne	.LBB4_24
# %bb.1:
	leaq	48(%rsp), %rcx
	movq	%rcx, -16(%rcx)
	movq	$0, -8(%rcx)
	movb	$0, (%rcx)
	xorl	%r15d, %r15d
	leaq	32(%rsp), %r13
	leaq	584(%rsp), %rbp
	movq	%rsp, %rbx
.LBB4_2:                                # =>This Loop Header: Depth=1
                                        #     Child Loop BB4_7 Depth 2
	leaq	(%rsp,%rax), %rdi
	addq	$64, %rdi
.Ltmp9:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp10:
# %bb.3:                                # %.noexc
                                        #   in Loop: Header=BB4_2 Depth=1
.Ltmp11:
	movsbl	%al, %edx
	leaq	64(%rsp), %rdi
	movq	%r13, %rsi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp12:
# %bb.4:                                #   in Loop: Header=BB4_2 Depth=1
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	testb	$5, 32(%rax,%rcx)
	jne	.LBB4_22
# %bb.5:                                #   in Loop: Header=BB4_2 Depth=1
.Ltmp14:
	movq	%rbp, %rdi
	movq	%r13, %rsi
	movl	$8, %edx
	callq	_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode
.Ltmp15:
# %bb.6:                                #   in Loop: Header=BB4_2 Depth=1
	leaq	16(%rsp), %rax
	movq	%rax, (%rsp)
	movq	$0, 8(%rsp)
	movb	$0, 16(%rsp)
	movslq	%r15d, %r15
.LBB4_7:                                #   Parent Loop BB4_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
.Ltmp17:
	movq	%rbp, %rdi
	movq	%rbx, %rsi
	movl	$44, %edx
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp18:
# %bb.8:                                #   in Loop: Header=BB4_7 Depth=2
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	testb	$5, 32(%rax,%rcx)
	movq	(%rsp), %rdi
	jne	.LBB4_19
# %bb.9:                                #   in Loop: Header=BB4_7 Depth=2
	callq	atof
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%r14,%r15,4)
	ucomiss	.LCPI4_0(%rip), %xmm0
	jne	.LBB4_14
	jp	.LBB4_14
# %bb.10:                               #   in Loop: Header=BB4_7 Depth=2
.Ltmp19:
	movl	$_ZSt4cout, %edi
	movl	%r15d, %esi
	callq	_ZNSolsEi
.Ltmp20:
# %bb.11:                               #   in Loop: Header=BB4_7 Depth=2
	movq	%rax, %r12
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r12, %rdi
.Ltmp21:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp22:
# %bb.12:                               # %.noexc28
                                        #   in Loop: Header=BB4_7 Depth=2
.Ltmp23:
	movsbl	%al, %esi
	movq	%r12, %rdi
	callq	_ZNSo3putEc
.Ltmp24:
# %bb.13:                               # %.noexc29
                                        #   in Loop: Header=BB4_7 Depth=2
.Ltmp25:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp26:
.LBB4_14:                               # %_ZNSolsEPFRSoS_E.exit
                                        #   in Loop: Header=BB4_7 Depth=2
	incq	%r15
	jmp	.LBB4_7
.LBB4_19:                               #   in Loop: Header=BB4_2 Depth=1
	leaq	16(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB4_21
# %bb.20:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i19
                                        #   in Loop: Header=BB4_2 Depth=1
	callq	_ZdlPv
.LBB4_21:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit21
                                        #   in Loop: Header=BB4_2 Depth=1
	movl	$_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE, %esi
	movq	%rbp, %rdi
	callq	_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev
	leaq	704(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
	movq	64(%rsp), %rax
	movq	-24(%rax), %rax
	jmp	.LBB4_2
.LBB4_22:
	movq	32(%rsp), %rdi
	leaq	48(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB4_24
# %bb.23:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i22
	callq	_ZdlPv
.LBB4_24:
	leaq	64(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	addq	$968, %rsp                      # imm = 0x3C8
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB4_15:
	.cfi_def_cfa_offset 1024
.Ltmp16:
	jmp	.LBB4_26
.LBB4_25:
.Ltmp13:
.LBB4_26:
	movq	%rax, %rbx
	jmp	.LBB4_27
.LBB4_16:
.Ltmp27:
	movq	%rax, %rbx
	movq	(%rsp), %rdi
	leaq	16(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB4_18
# %bb.17:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB4_18:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	leaq	584(%rsp), %rdi
	movl	$_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE, %esi
	callq	_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev
	leaq	704(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
.LBB4_27:
	movq	32(%rsp), %rdi
	leaq	48(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB4_29
# %bb.28:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i25
	callq	_ZdlPv
.LBB4_29:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit27
	leaq	64(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end4:
	.size	_Z7readCSVPfiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, .Lfunc_end4-_Z7readCSVPfiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table4:
.Lexception1:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end1-.Lcst_begin1
.Lcst_begin1:
	.uleb128 .Lfunc_begin1-.Lfunc_begin1    # >> Call Site 1 <<
	.uleb128 .Ltmp9-.Lfunc_begin1           #   Call between .Lfunc_begin1 and .Ltmp9
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp9-.Lfunc_begin1           # >> Call Site 2 <<
	.uleb128 .Ltmp12-.Ltmp9                 #   Call between .Ltmp9 and .Ltmp12
	.uleb128 .Ltmp13-.Lfunc_begin1          #     jumps to .Ltmp13
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp14-.Lfunc_begin1          # >> Call Site 3 <<
	.uleb128 .Ltmp15-.Ltmp14                #   Call between .Ltmp14 and .Ltmp15
	.uleb128 .Ltmp16-.Lfunc_begin1          #     jumps to .Ltmp16
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp17-.Lfunc_begin1          # >> Call Site 4 <<
	.uleb128 .Ltmp26-.Ltmp17                #   Call between .Ltmp17 and .Ltmp26
	.uleb128 .Ltmp27-.Lfunc_begin1          #     jumps to .Ltmp27
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp26-.Lfunc_begin1          # >> Call Site 5 <<
	.uleb128 .Lfunc_end4-.Ltmp26            #   Call between .Ltmp26 and .Lfunc_end4
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end1:
	.p2align	2, 0x0
                                        # -- End function
	.text
	.globl	_Z6dotPdtPfS_S_i                # -- Begin function _Z6dotPdtPfS_S_i
	.type	_Z6dotPdtPfS_S_i,@function
_Z6dotPdtPfS_S_i:                       # @_Z6dotPdtPfS_S_i
	.cfi_startproc
# %bb.0:
	testl	%ecx, %ecx
	jle	.LBB5_1
# %bb.3:                                # %.lr.ph.preheader
	movl	%ecx, %eax
	xorps	%xmm0, %xmm0
	xorl	%ecx, %ecx
.LBB5_4:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rdi,%rcx,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	mulss	(%rsi,%rcx,4), %xmm1
	addss	%xmm1, %xmm0
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB5_4
	jmp	.LBB5_2
.LBB5_1:
	xorps	%xmm0, %xmm0
.LBB5_2:                                # %._crit_edge
	movss	%xmm0, (%rdx)
	retq
.Lfunc_end5:
	.size	_Z6dotPdtPfS_S_i, .Lfunc_end5-_Z6dotPdtPfS_S_i
	.cfi_endproc
                                        # -- End function
	.globl	_Z10addVectorsPfS_S_i           # -- Begin function _Z10addVectorsPfS_S_i
	.type	_Z10addVectorsPfS_S_i,@function
_Z10addVectorsPfS_S_i:                  # @_Z10addVectorsPfS_S_i
	.cfi_startproc
# %bb.0:
	testl	%ecx, %ecx
	jle	.LBB6_3
# %bb.1:                                # %.lr.ph.preheader
	movl	%ecx, %eax
	xorl	%ecx, %ecx
.LBB6_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rdi,%rcx,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	addss	(%rsi,%rcx,4), %xmm0
	movss	%xmm0, (%rdx,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB6_2
.LBB6_3:                                # %._crit_edge
	retq
.Lfunc_end6:
	.size	_Z10addVectorsPfS_S_i, .Lfunc_end6-_Z10addVectorsPfS_S_i
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0                          # -- Begin function _Z15vectElemSigmoidPfS_i
.LCPI7_0:
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0
.LCPI7_1:
	.long	0x3f800000                      # float 1
	.text
	.globl	_Z15vectElemSigmoidPfS_i
	.type	_Z15vectElemSigmoidPfS_i,@function
_Z15vectElemSigmoidPfS_i:               # @_Z15vectElemSigmoidPfS_i
	.cfi_startproc
# %bb.0:
	testl	%edx, %edx
	jle	.LBB7_4
# %bb.1:                                # %.lr.ph.preheader
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	%edx, %r15d
	xorl	%r12d, %r12d
.LBB7_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movss	(%r14,%r12,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	xorps	.LCPI7_0(%rip), %xmm0
	callq	expf
	movss	.LCPI7_1(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	addss	%xmm1, %xmm0
	divss	%xmm0, %xmm1
	movss	%xmm1, (%rbx,%r12,4)
	incq	%r12
	cmpq	%r12, %r15
	jne	.LBB7_2
# %bb.3:
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
	.cfi_restore %r12
	.cfi_restore %r14
	.cfi_restore %r15
.LBB7_4:                                # %._crit_edge
	retq
.Lfunc_end7:
	.size	_Z15vectElemSigmoidPfS_i, .Lfunc_end7-_Z15vectElemSigmoidPfS_i
	.cfi_endproc
                                        # -- End function
	.globl	_Z14vectElemIntDivPfS_ii        # -- Begin function _Z14vectElemIntDivPfS_ii
	.type	_Z14vectElemIntDivPfS_ii,@function
_Z14vectElemIntDivPfS_ii:               # @_Z14vectElemIntDivPfS_ii
	.cfi_startproc
# %bb.0:
	testl	%edx, %edx
	jle	.LBB8_3
# %bb.1:                                # %.lr.ph
	cvtsi2ss	%ecx, %xmm0
	movl	%edx, %eax
	xorl	%ecx, %ecx
.LBB8_2:                                # =>This Inner Loop Header: Depth=1
	movss	(%rdi,%rcx,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	divss	%xmm0, %xmm1
	movss	%xmm1, (%rsi,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB8_2
.LBB8_3:                                # %._crit_edge
	retq
.Lfunc_end8:
	.size	_Z14vectElemIntDivPfS_ii, .Lfunc_end8-_Z14vectElemIntDivPfS_ii
	.cfi_endproc
                                        # -- End function
	.globl	_Z16initializeVectorPfif        # -- Begin function _Z16initializeVectorPfif
	.type	_Z16initializeVectorPfif,@function
_Z16initializeVectorPfif:               # @_Z16initializeVectorPfif
	.cfi_startproc
# %bb.0:
	testl	%esi, %esi
	jle	.LBB9_3
# %bb.1:                                # %.lr.ph.preheader
	movl	%esi, %eax
	xorl	%ecx, %ecx
.LBB9_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movss	%xmm0, (%rdi,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB9_2
.LBB9_3:                                # %._crit_edge
	retq
.Lfunc_end9:
	.size	_Z16initializeVectorPfif, .Lfunc_end9-_Z16initializeVectorPfif
	.cfi_endproc
                                        # -- End function
	.globl	_Z10subVectorsPfS_S_i           # -- Begin function _Z10subVectorsPfS_S_i
	.type	_Z10subVectorsPfS_S_i,@function
_Z10subVectorsPfS_S_i:                  # @_Z10subVectorsPfS_S_i
	.cfi_startproc
# %bb.0:
	testl	%ecx, %ecx
	jle	.LBB10_3
# %bb.1:                                # %.lr.ph.preheader
	movl	%ecx, %eax
	xorl	%ecx, %ecx
.LBB10_2:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rdi,%rcx,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	subss	(%rsi,%rcx,4), %xmm0
	movss	%xmm0, (%rdx,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB10_2
.LBB10_3:                               # %._crit_edge
	retq
.Lfunc_end10:
	.size	_Z10subVectorsPfS_S_i, .Lfunc_end10-_Z10subVectorsPfS_S_i
	.cfi_endproc
                                        # -- End function
	.globl	_Z16vectElemVectMultPfS_S_i     # -- Begin function _Z16vectElemVectMultPfS_S_i
	.type	_Z16vectElemVectMultPfS_S_i,@function
_Z16vectElemVectMultPfS_S_i:            # @_Z16vectElemVectMultPfS_S_i
	.cfi_startproc
# %bb.0:
	testl	%ecx, %ecx
	jle	.LBB11_3
# %bb.1:                                # %.lr.ph.preheader
	movl	%ecx, %eax
	xorl	%ecx, %ecx
.LBB11_2:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rdi,%rcx,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	mulss	(%rsi,%rcx,4), %xmm0
	movss	%xmm0, (%rdx,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB11_2
.LBB11_3:                               # %._crit_edge
	retq
.Lfunc_end11:
	.size	_Z16vectElemVectMultPfS_S_i, .Lfunc_end11-_Z16vectElemVectMultPfS_S_i
	.cfi_endproc
                                        # -- End function
	.globl	_Z15vectElemVectDivPfS_S_i      # -- Begin function _Z15vectElemVectDivPfS_S_i
	.type	_Z15vectElemVectDivPfS_S_i,@function
_Z15vectElemVectDivPfS_S_i:             # @_Z15vectElemVectDivPfS_S_i
	.cfi_startproc
# %bb.0:
	testl	%ecx, %ecx
	jle	.LBB12_3
# %bb.1:                                # %.lr.ph.preheader
	movl	%ecx, %eax
	xorl	%ecx, %ecx
.LBB12_2:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rdi,%rcx,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	divss	(%rsi,%rcx,4), %xmm0
	movss	%xmm0, (%rdx,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB12_2
.LBB12_3:                               # %._crit_edge
	retq
.Lfunc_end12:
	.size	_Z15vectElemVectDivPfS_S_i, .Lfunc_end12-_Z15vectElemVectDivPfS_S_i
	.cfi_endproc
                                        # -- End function
	.globl	_Z17vectElemFloatMultPfS_if     # -- Begin function _Z17vectElemFloatMultPfS_if
	.type	_Z17vectElemFloatMultPfS_if,@function
_Z17vectElemFloatMultPfS_if:            # @_Z17vectElemFloatMultPfS_if
	.cfi_startproc
# %bb.0:
	testl	%edx, %edx
	jle	.LBB13_3
# %bb.1:                                # %.lr.ph.preheader
	movl	%edx, %eax
	xorl	%ecx, %ecx
.LBB13_2:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rdi,%rcx,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	movss	%xmm1, (%rsi,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB13_2
.LBB13_3:                               # %._crit_edge
	retq
.Lfunc_end13:
	.size	_Z17vectElemFloatMultPfS_if, .Lfunc_end13-_Z17vectElemFloatMultPfS_if
	.cfi_endproc
                                        # -- End function
	.globl	_Z15matrixTransposePfS_ii       # -- Begin function _Z15matrixTransposePfS_ii
	.type	_Z15matrixTransposePfS_ii,@function
_Z15matrixTransposePfS_ii:              # @_Z15matrixTransposePfS_ii
	.cfi_startproc
# %bb.0:
	testl	%edx, %edx
	jle	.LBB14_7
# %bb.1:                                # %.preheader.lr.ph
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movl	%edx, %eax
	movl	%ecx, %edx
	leaq	(,%rax,4), %r8
	xorl	%r9d, %r9d
	xorl	%r10d, %r10d
.LBB14_2:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB14_4 Depth 2
	testl	%ecx, %ecx
	jle	.LBB14_5
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB14_2 Depth=1
	movl	%r9d, %r11d
	leaq	(%rdi,%r11,4), %r11
	movq	%rsi, %rbx
	xorl	%r14d, %r14d
.LBB14_4:                               #   Parent Loop BB14_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%r11,%r14,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rbx)
	incq	%r14
	addq	%r8, %rbx
	cmpq	%r14, %rdx
	jne	.LBB14_4
.LBB14_5:                               # %._crit_edge
                                        #   in Loop: Header=BB14_2 Depth=1
	incq	%r10
	addl	%ecx, %r9d
	addq	$4, %rsi
	cmpq	%rax, %r10
	jne	.LBB14_2
# %bb.6:
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
	.cfi_restore %r14
.LBB14_7:                               # %._crit_edge18
	retq
.Lfunc_end14:
	.size	_Z15matrixTransposePfS_ii, .Lfunc_end14-_Z15matrixTransposePfS_ii
	.cfi_endproc
                                        # -- End function
	.globl	_Z7mmm_kijPfS_S_iiii            # -- Begin function _Z7mmm_kijPfS_S_iiii
	.type	_Z7mmm_kijPfS_S_iiii,@function
_Z7mmm_kijPfS_S_iiii:                   # @_Z7mmm_kijPfS_S_iiii
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%r8d, -20(%rsp)                 # 4-byte Spill
	movq	%rdx, -8(%rsp)                  # 8-byte Spill
	movq	%rdi, -16(%rsp)                 # 8-byte Spill
	testl	%ecx, %ecx
	jle	.LBB15_9
# %bb.1:                                # %.preheader24.lr.ph
	movl	56(%rsp), %eax
	movslq	-20(%rsp), %r9                  # 4-byte Folded Reload
	movl	%ecx, %r8d
	movl	%r9d, %r10d
	movl	%eax, %r11d
	shlq	$2, %r9
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
.LBB15_2:                               # %.preheader24
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB15_4 Depth 2
                                        #       Child Loop BB15_6 Depth 3
	cmpl	$0, -20(%rsp)                   # 4-byte Folded Reload
	jle	.LBB15_8
# %bb.3:                                # %.preheader.lr.ph
                                        #   in Loop: Header=BB15_2 Depth=1
	movl	%ebx, %ecx
	movq	-8(%rsp), %rdx                  # 8-byte Reload
	leaq	(%rdx,%rcx,4), %r15
	xorl	%r12d, %r12d
	movq	-16(%rsp), %rdi                 # 8-byte Reload
	xorl	%ebp, %ebp
.LBB15_4:                               # %.preheader
                                        #   Parent Loop BB15_2 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB15_6 Depth 3
	testl	%eax, %eax
	jle	.LBB15_7
# %bb.5:                                # %.lr.ph
                                        #   in Loop: Header=BB15_4 Depth=2
	movl	%r12d, %ecx
	leaq	(%rsi,%rcx,4), %rcx
	movq	%rdi, %r13
	xorl	%edx, %edx
.LBB15_6:                               #   Parent Loop BB15_2 Depth=1
                                        #     Parent Loop BB15_4 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movss	(%r13), %xmm0                   # xmm0 = mem[0],zero,zero,zero
	mulss	(%rcx,%rdx,4), %xmm0
	addss	(%r15,%rdx,4), %xmm0
	movss	%xmm0, (%r15,%rdx,4)
	incq	%rdx
	addq	%r9, %r13
	cmpq	%rdx, %r11
	jne	.LBB15_6
.LBB15_7:                               # %._crit_edge
                                        #   in Loop: Header=BB15_4 Depth=2
	incq	%rbp
	addl	%eax, %r12d
	addq	$4, %rdi
	cmpq	%r10, %rbp
	jne	.LBB15_4
.LBB15_8:                               # %._crit_edge27
                                        #   in Loop: Header=BB15_2 Depth=1
	incq	%r14
	addl	%eax, %ebx
	cmpq	%r8, %r14
	jne	.LBB15_2
.LBB15_9:                               # %._crit_edge29
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end15:
	.size	_Z7mmm_kijPfS_S_iiii, .Lfunc_end15-_Z7mmm_kijPfS_S_iiii
	.cfi_endproc
                                        # -- End function
	.globl	_Z10normVectorPfi               # -- Begin function _Z10normVectorPfi
	.type	_Z10normVectorPfi,@function
_Z10normVectorPfi:                      # @_Z10normVectorPfi
	.cfi_startproc
# %bb.0:
	xorps	%xmm1, %xmm1
	xorps	%xmm0, %xmm0
	testl	%esi, %esi
	jle	.LBB16_3
# %bb.1:                                # %.lr.ph.preheader
	movl	%esi, %eax
	xorl	%ecx, %ecx
.LBB16_2:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rdi,%rcx,4), %xmm2            # xmm2 = mem[0],zero,zero,zero
	mulss	%xmm2, %xmm2
	addss	%xmm2, %xmm0
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB16_2
.LBB16_3:                               # %._crit_edge
	ucomiss	%xmm1, %xmm0
	jb	sqrtf                           # TAILCALL
# %bb.4:                                # %._crit_edge.split
	sqrtss	%xmm0, %xmm0
	retq
.Lfunc_end16:
	.size	_Z10normVectorPfi, .Lfunc_end16-_Z10normVectorPfi
	.cfi_endproc
                                        # -- End function
	.globl	_Z16vectElemFloatDivPfS_if      # -- Begin function _Z16vectElemFloatDivPfS_if
	.type	_Z16vectElemFloatDivPfS_if,@function
_Z16vectElemFloatDivPfS_if:             # @_Z16vectElemFloatDivPfS_if
	.cfi_startproc
# %bb.0:
	testl	%edx, %edx
	jle	.LBB17_3
# %bb.1:                                # %.lr.ph.preheader
	movl	%edx, %eax
	xorl	%ecx, %ecx
.LBB17_2:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rdi,%rcx,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	divss	%xmm0, %xmm1
	movss	%xmm1, (%rsi,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB17_2
.LBB17_3:                               # %._crit_edge
	retq
.Lfunc_end17:
	.size	_Z16vectElemFloatDivPfS_if, .Lfunc_end17-_Z16vectElemFloatDivPfS_if
	.cfi_endproc
                                        # -- End function
	.globl	_Z11vectElemLogPfS_i            # -- Begin function _Z11vectElemLogPfS_i
	.type	_Z11vectElemLogPfS_i,@function
_Z11vectElemLogPfS_i:                   # @_Z11vectElemLogPfS_i
	.cfi_startproc
# %bb.0:
	testl	%edx, %edx
	jle	.LBB18_4
# %bb.1:                                # %.lr.ph.preheader
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	%edx, %r15d
	xorl	%r12d, %r12d
.LBB18_2:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movss	(%r14,%r12,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	callq	logf
	movss	%xmm0, (%rbx,%r12,4)
	incq	%r12
	cmpq	%r12, %r15
	jne	.LBB18_2
# %bb.3:
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
	.cfi_restore %r12
	.cfi_restore %r14
	.cfi_restore %r15
.LBB18_4:                               # %._crit_edge
	retq
.Lfunc_end18:
	.size	_Z11vectElemLogPfS_i, .Lfunc_end18-_Z11vectElemLogPfS_i
	.cfi_endproc
                                        # -- End function
	.globl	_Z9sumVectorPfi                 # -- Begin function _Z9sumVectorPfi
	.type	_Z9sumVectorPfi,@function
_Z9sumVectorPfi:                        # @_Z9sumVectorPfi
	.cfi_startproc
# %bb.0:
	testl	%esi, %esi
	jle	.LBB19_1
# %bb.3:                                # %.lr.ph.preheader
	movl	%esi, %eax
	xorps	%xmm0, %xmm0
	xorl	%ecx, %ecx
.LBB19_4:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	addss	(%rdi,%rcx,4), %xmm0
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB19_4
# %bb.2:                                # %._crit_edge
	retq
.LBB19_1:
	xorps	%xmm0, %xmm0
	retq
.Lfunc_end19:
	.size	_Z9sumVectorPfi, .Lfunc_end19-_Z9sumVectorPfi
	.cfi_endproc
                                        # -- End function
	.globl	_Z4diff8timespecS_              # -- Begin function _Z4diff8timespecS_
	.type	_Z4diff8timespecS_,@function
_Z4diff8timespecS_:                     # @_Z4diff8timespecS_
	.cfi_startproc
# %bb.0:
	subq	%rsi, %rcx
	leaq	1000000000(%rcx), %rsi
	movq	%rdi, %rax
	negq	%rax
	testq	%rcx, %rcx
	notq	%rdi
	cmovsq	%rdi, %rax
	cmovnsq	%rcx, %rsi
	addq	%rdx, %rax
	movq	%rsi, %rdx
	retq
.Lfunc_end20:
	.size	_Z4diff8timespecS_, .Lfunc_end20-_Z4diff8timespecS_
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z11printTimingP8timespeci
.LCPI21_0:
	.quad	0x4004374bc6a7ef9e              # double 2.5270000000000001
	.text
	.globl	_Z11printTimingP8timespeci
	.type	_Z11printTimingP8timespeci,@function
_Z11printTimingP8timespeci:             # @_Z11printTimingP8timespeci
	.cfi_startproc
# %bb.0:
	testl	%esi, %esi
	jle	.LBB21_6
# %bb.1:                                # %.lr.ph.preheader
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdi, %rbx
	movl	%esi, %r14d
	shlq	$4, %r14
	xorl	%r15d, %r15d
.LBB21_2:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	testq	%r15, %r15
	je	.LBB21_4
# %bb.3:                                #   in Loop: Header=BB21_2 Depth=1
	movl	$.L.str.11, %edi
	xorl	%eax, %eax
	callq	printf
.LBB21_4:                               #   in Loop: Header=BB21_2 Depth=1
	imulq	$1000000000, (%rbx,%r15), %rax  # imm = 0x3B9ACA00
	addq	8(%rbx,%r15), %rax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	mulsd	.LCPI21_0(%rip), %xmm0
	cvttsd2si	%xmm0, %rsi
	movl	$.L.str.12, %edi
	xorl	%eax, %eax
	callq	printf
	addq	$16, %r15
	cmpq	%r15, %r14
	jne	.LBB21_2
# %bb.5:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
	.cfi_restore %r14
	.cfi_restore %r15
.LBB21_6:                               # %._crit_edge
	movl	$10, %edi
	jmp	putchar@PLT                     # TAILCALL
.Lfunc_end21:
	.size	_Z11printTimingP8timespeci, .Lfunc_end21-_Z11printTimingP8timespeci
	.cfi_endproc
                                        # -- End function
	.globl	_Z11printVectorPfi              # -- Begin function _Z11printVectorPfi
	.type	_Z11printVectorPfi,@function
_Z11printVectorPfi:                     # @_Z11printVectorPfi
	.cfi_startproc
# %bb.0:
	testl	%esi, %esi
	jle	.LBB22_4
# %bb.1:                                # %.lr.ph.preheader
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdi, %rbx
	movl	%esi, %r15d
	xorl	%r12d, %r12d
.LBB22_2:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	xorps	%xmm0, %xmm0
	cvtss2sd	(%rbx,%r12,4), %xmm0
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %r14
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r14, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	incq	%r12
	cmpq	%r12, %r15
	jne	.LBB22_2
# %bb.3:
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
	.cfi_restore %r12
	.cfi_restore %r14
	.cfi_restore %r15
.LBB22_4:                               # %._crit_edge
	retq
.Lfunc_end22:
	.size	_Z11printVectorPfi, .Lfunc_end22-_Z11printVectorPfi
	.cfi_endproc
                                        # -- End function
	.globl	_Z11printMatrixPfii             # -- Begin function _Z11printMatrixPfii
	.type	_Z11printMatrixPfii,@function
_Z11printMatrixPfii:                    # @_Z11printMatrixPfii
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%edx, 4(%rsp)                   # 4-byte Spill
	movq	%rdi, 8(%rsp)                   # 8-byte Spill
	testl	%esi, %esi
	jle	.LBB23_6
# %bb.1:                                # %.preheader.lr.ph
	movl	%esi, %ebp
	movl	%esi, %eax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	movl	4(%rsp), %r12d                  # 4-byte Reload
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
.LBB23_2:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB23_4 Depth 2
	cmpl	$0, 4(%rsp)                     # 4-byte Folded Reload
	jle	.LBB23_5
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB23_2 Depth=1
	movl	%r13d, %eax
	movq	8(%rsp), %rcx                   # 8-byte Reload
	leaq	(%rcx,%rax,4), %rbx
	xorl	%r15d, %r15d
.LBB23_4:                               #   Parent Loop BB23_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	xorps	%xmm0, %xmm0
	cvtss2sd	(%rbx,%r15,4), %xmm0
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
	movl	$.L.str.14, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	incq	%r15
	cmpq	%r15, %r12
	jne	.LBB23_4
.LBB23_5:                               # %._crit_edge
                                        #   in Loop: Header=BB23_2 Depth=1
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	movl	$_ZSt4cout, %eax
	addq	%rax, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	incq	%r14
	addl	%ebp, %r13d
	cmpq	16(%rsp), %r14                  # 8-byte Folded Reload
	jne	.LBB23_2
.LBB23_6:                               # %._crit_edge13
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end23:
	.size	_Z11printMatrixPfii, .Lfunc_end23-_Z11printMatrixPfii
	.cfi_endproc
                                        # -- End function
	.globl	_Z9altDotPdtPfS_i               # -- Begin function _Z9altDotPdtPfS_i
	.type	_Z9altDotPdtPfS_i,@function
_Z9altDotPdtPfS_i:                      # @_Z9altDotPdtPfS_i
	.cfi_startproc
# %bb.0:
	testl	%edx, %edx
	jle	.LBB24_1
# %bb.3:                                # %.lr.ph.preheader
	movl	%edx, %eax
	xorps	%xmm0, %xmm0
	xorl	%ecx, %ecx
.LBB24_4:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rdi,%rcx,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	addss	(%rsi,%rcx,4), %xmm1
	addss	%xmm1, %xmm0
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB24_4
# %bb.2:                                # %._crit_edge
	retq
.LBB24_1:
	xorps	%xmm0, %xmm0
	retq
.Lfunc_end24:
	.size	_Z9altDotPdtPfS_i, .Lfunc_end24-_Z9altDotPdtPfS_i
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag,"axG",@progbits,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag,comdat
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag # -- Begin function _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.p2align	1, 0x90
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag,@function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag: # @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	subq	%rsi, %r14
	movq	%r14, (%rsp)
	cmpq	$15, %r14
	jbe	.LBB25_1
# %bb.2:
	movq	%rsp, %r12
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm
	movq	%rax, (%rbx)
	movq	(%r12), %rcx
	movq	%rcx, 16(%rbx)
	jmp	.LBB25_3
.LBB25_1:                               # %._crit_edge
	movq	(%rbx), %rax
.LBB25_3:
	testq	%r14, %r14
	je	.LBB25_7
# %bb.4:
	cmpq	$1, %r14
	jne	.LBB25_6
# %bb.5:
	movb	(%r15), %cl
	movb	%cl, (%rax)
	jmp	.LBB25_7
.LBB25_6:
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	memcpy@PLT
.LBB25_7:                               # %_ZZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tagEN6_GuardD2Ev.exit
	movq	(%rsp), %rax
	movq	%rax, 8(%rbx)
	movq	(%rbx), %rcx
	movb	$0, (%rcx,%rax)
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end25:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag, .Lfunc_end25-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.cfi_endproc
                                        # -- End function
	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"c_patches.csv"
	.size	.L.str, 14

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"W1.csv"
	.size	.L.str.1, 7

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"W2.csv"
	.size	.L.str.2, 7

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"\nTesting Baseline Sparse Autoencoder"
	.size	.L.str.3, 37

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

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

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

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

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

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

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

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

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"\nCPU time: %ld (nsec)"
	.size	.L.str.12, 22

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

	.type	__hip_cuid_,@object             # @__hip_cuid_
	.bss
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               # 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym _Unwind_Resume
	.addrsig_sym _ZSt4cout
	.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
