/********************************************************************

sequential.cu the sequential version of NN 

Input: 
/usr/local/cuda-10.1/bin/nvcc -arch=compute_52 -o sequential.out sequential.cu
./sequential.out block_size activationtype     // block_size = 0; activationtype=1 means sigomid and 2 means ReLU

Output: 
elapsed_time - the elapsed time to perform the multiplication.
accuracy on training set and test set.

********************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <cuda_runtime.h>
#include <time.h>
#include <math.h>

#include <iostream>  
#include <string>  
#include <vector>  
#include <fstream>  
#include <sstream> 
#include<random> 
using namespace std; 


#define X_trn(x, y) X_trn[x * size_train + y] // 196 * 964
#define X_tst(x, y) X_tst[x * size_test + y]  // 196 * 414
#define Y_trn(x, y) Y_trn[x * size_train + y] // 1   * 964
#define Y_tst(x, y) Y_tst[x * size_test + y]  // 1   * 414
#define X(x, y) X[x * size_batch + y]  // 196 * 964
#define Y(x, y) Y[x * size_batch + y]  // 1   * 414


#define W1(x, y) W1[x * size_input + y]       // 20 * 196
#define b1(x, y) b1[x * 1 + y]                // 20 * 1
#define W2(x, y) W2[x * size_hidden + y]      // 2  * 20
#define b2(x, y) b2[x * 1 + y]                // 2  * 1

#define dW1(x, y) dW1[x * size_input + y]     // 20 * 196
#define db1(x, y) db1[x * 1 + y]              // 20 * 1
#define dW2(x, y) dW2[x * size_hidden + y]    // 2  * 20
#define db2(x, y) db2[x * 1 + y]              // 2  * 1

#define Z1(x, y) Z1[x * size_batch + y]       // 20 * 964
#define A1(x, y) A1[x * size_batch + y]       // 20 * 964
#define Z2(x, y) Z2[x * size_batch + y]       // 2  * 964
#define A2(x, y) A2[x * size_batch + y]       // 2  * 964

#define dZ1(x, y) dZ1[x * size_batch + y]     // 20 * 964
#define dA1(x, y) dA1[x * size_batch + y]     // 20 * 964
#define dZ2(x, y) dZ2[x * size_batch + y]     // 2  * 964
#define dA2(x, y) dA2[x * size_batch + y]     // 2  * 964


#define dev_X_trn(x, y) dev_X_trn[x * size_train + y] // 196 * 964
#define dev_X_tst(x, y) dev_X_tst[x * size_test + y]  // 196 * 414
#define dev_Y_trn(x, y) dev_Y_trn[x * size_train + y] // 1   * 964
#define dev_Y_tst(x, y) dev_Y_tst[x * size_test + y]  // 1   * 414
#define dev_X(x, y) dev_X[x * size_batch + y] // 196 * 964
#define dev_Y(x, y) dev_Y[x * size_batch + y]  // 1   * 414


#define dev_W1(x, y) dev_W1[x * size_input + y]       // 20 * 196
#define dev_b1(x, y) dev_b1[x * 1 + y]                // 20 * 1
#define dev_W2(x, y) dev_W2[x * size_hidden + y]      // 2  * 20
#define dev_b2(x, y) dev_b2[x * 1 + y]                // 2  * 1

#define dev_dW1(x, y) dev_dW1[x * size_input + y]     // 20 * 196
#define dev_db1(x, y) dev_db1[x * 1 + y]              // 20 * 1
#define dev_dW2(x, y) dev_dW2[x * size_hidden + y]    // 2  * 20
#define dev_db2(x, y) dev_db2[x * 1 + y]              // 2  * 1

#define dev_Z1(x, y) dev_Z1[x * size_batch + y]       // 20 * 964
#define dev_A1(x, y) dev_A1[x * size_batch + y]       // 20 * 964
#define dev_Z2(x, y) dev_Z2[x * size_batch + y]       // 2  * 964
#define dev_A2(x, y) dev_A2[x * size_batch + y]       // 2  * 964

#define dev_dZ1(x, y) dev_dZ1[x * size_batch + y]     // 20 * 964
#define dev_dA1(x, y) dev_dA1[x * size_batch + y]     // 20 * 964
#define dev_dZ2(x, y) dev_dZ2[x * size_batch + y]     // 2  * 964
#define dev_dA2(x, y) dev_dA2[x * size_batch + y]     // 2  * 964

#define max_index(x, y) max_index[y] // 1  * 964

int size_train  = 964;
int size_test   = 414;
int size_batch  = 0;

int size_input  = 196;
int size_hidden = 20;
int size_output = 2;

int size_X_trn = 196*964;
int size_Y_trn = 1*964;
int size_X_tst = 196*414;
int size_Y_tst = 1*414;
int size_Xbatch = 0;
int size_Ybatch = 0;


int size_W1 = size_hidden*size_input;
int size_b1 = size_hidden*1;
int size_W2 = size_output*size_hidden;
int size_b2 = size_output*1;

int size_dW1 = size_hidden*size_input;
int size_db1 = size_hidden*1;
int size_dW2 = size_output*size_hidden;
int size_db2 = size_output*1;

#define size_Z1 size_hidden*size_batch
#define size_A1 size_hidden*size_batch
#define size_Z2 size_output*size_batch
#define size_A2 size_output*size_batch

#define size_dZ1 size_hidden*size_batch
#define size_dA1 size_hidden*size_batch
#define size_dZ2 size_output*size_batch
#define size_dA2 size_output*size_batch

#define size_max_index 1*size_batch

double *X_trn, *X_tst;
int *Y_trn, *Y_tst;
double *W1, *b1, *W2, *b2;
double *dW1, *db1, *dW2, *db2;
double *Z1, *A1, *Z2, *A2;
double *dZ1, *dA1, *dZ2, *dA2;
int *max_index;



void HiddenLayer(double* dev_X, double* dev_W1, double* dev_b1, double* dev_A1, double* dev_Z1, int size_input, int size_batch, int acti_type, int max_row, int max_col)

{

  for(int i = 0; i < max_row; i++) {
    for(int j = 0; j < max_col; j++) {
      double partial = 0.0;
    	for (int k = 0; k < size_input; k++){
    		partial += dev_W1(i,k) * dev_X(k,j);
      }
    	dev_Z1(i,j) = partial + dev_b1(i,0);
	    // Sigmoid
    	if (acti_type == 1)
    		dev_A1(i,j) = 1 / (1 + exp(0 - dev_Z1(i,j)));
    	// ReLU
    	if (acti_type == 2) {
    		if (dev_Z1(i,j) < 0)
    			dev_A1(i,j) = 0;
    		if (dev_Z1(i,j) >= 0)
    			dev_A1(i,j) = dev_Z1(i,j);
    	}
    }
  }
}

void OutputLayer(double* dev_A1, double* dev_W2, double* dev_b2, double* dev_Z2, int size_hidden, int size_batch, int max_row, int max_col)

{

  for(int i = 0; i < max_row; i++) {
    for(int j = 0; j < max_col; j++) {
	    double partial = 0.0;
    	for (int k = 0; k < size_hidden; k++){
    		partial += dev_W2(i,k) * dev_A1(k,j);
      }
    	dev_Z2(i,j) = partial + dev_b2(i,0);
    }
  }
 
}

void Softmax(double* Z2, int row, int col, double* A2, int* max_index)
{

  int c, r;  
	double max = 0, sum = 0;
	for (c = 0; c < col; c++) {
    max = Z2(0, c);
    max_index[c] = 1;    
		for (r = 1; r < row; r++) {   
			if (Z2(r, c) > max){      
				max = Z2(r, c);        
        max_index[c] = 0;        
      }
		}
		sum = 0;
		for (r = 0; r < row; r++)
			sum += exp(Z2(r, c));
		for (r = 0; r < row; r++)
			A2(r, c) = exp(Z2(r, c)) / sum;
  }
  return;

}


double cross_entropy_loss(int* Y, double* A2, int col) 
{
  
  int c;
  double loss = 0;
  for(c = 0; c < col; c++) {
    loss += -log(A2(0, c)) * Y(0, c) - log(A2(1, c)) * (1-Y(0, c));
  }
  return loss/col;
  
}

/* init Z and A in the host */
void initialize_ZA(int size_batch) {

  Z1 = (double *) malloc(size_Z1*sizeof(double));   // 20*964
  A1 = (double *) malloc(size_A1*sizeof(double));   // 20*964
  Z2 = (double *) malloc(size_Z2*sizeof(double));   // 2*964
  A2 = (double *) malloc(size_A2*sizeof(double));   // 2*964

  dZ1 = (double *) malloc(size_dZ1*sizeof(double));  // 20*964
  dA1 = (double *) malloc(size_dA1*sizeof(double));  // 20*964
  dZ2 = (double *) malloc(size_dZ2*sizeof(double));  // 2*964
  dA2 = (double *) malloc(size_dA2*sizeof(double));  // 2*964
  
  max_index = (int *) malloc(size_max_index*sizeof(int));             // 1*964
    
  memset (Z1,0,  size_Z1);
  memset (A1,0,  size_A1);
  memset (Z2,0,  size_Z2);
  memset (A2,0,  size_A2);
  
  memset (dZ1,0, size_dZ1);
  memset (dA1,0, size_dA1);
  memset (dZ2,0, size_dZ2);
  memset (dA2,0, size_dA2);
  
  memset (max_index,0,size_max_index);

}

void forward(double* X, int* Y, string type, int acti_type,  int block_size){

  if(type == "train"){
    size_batch  = size_train;
    size_Xbatch = size_X_trn;
    size_Ybatch = size_Y_trn;        
  }
  else{
    size_batch = size_test;
    size_Xbatch = size_X_tst;
    size_Ybatch = size_Y_tst;    
  }

  // init Z and A in the host
  initialize_ZA(size_batch);

  // hidden layer and activation function to get Z1 and A1
  HiddenLayer(X, W1, b1, A1, Z1, size_input, size_batch, acti_type, size_hidden, size_batch); 

  // output layer to get Z2
  OutputLayer(A1, W2, b2, Z2, size_hidden, size_batch, size_output, size_batch);
 
  // softmax layer to get A2
  Softmax(Z2, size_output, size_batch, A2, max_index);

}


void Back_dZ2 (double* dev_A2, int* dev_Y_trn, double* dev_dZ2, int size_train, int size_batch, int max_row, int max_col)

{

  for(int i = 0; i < max_row; i++) {
    for(int j = 0; j < max_col; j++) {
    	// int c = threadIdx.x; // column of Z2
      dev_dZ2(0, j) = (dev_A2(0, j) - dev_Y_trn(0, j)) / size_train;
      dev_dZ2(1, j) = (dev_Y_trn(0, j) - dev_A2(0, j)) / size_train;
     }
  }

}

// dW1(20*196) = dZ1(20*964) * X(196*964)
// dW2(2*20) = dZ2(2*964) * A1(20*964)
void Back_dW (double* dev_A, double* dev_dZ, double* dev_dW, int size_batch, int W_col, int max_row, int max_col)

{  

  for(int i = 0; i < max_row; i++) {
    for(int j = 0; j < max_col; j++) {
      double tmp = 0.0;
    	for (int k = 0; k < size_batch; k++) {
    		tmp += dev_dZ[i*size_batch+k] * dev_A[j*size_batch+k];
      }
    	dev_dW[i*W_col+j] = tmp;
    }
  }

}

// db1(20*1) is from dZ1(20*964)
// db2(2*1) is from dZ1(2*964)
void Back_db(double* dZ, double* db, int row, int col, int size_batch)

{
  int r, c;
  for(r = 0; r < row; r++) {
    double tmp = 0;
    for(c = 0; c < col; c++) {
      tmp += dZ[r*size_batch+c];
    }
    db[r*1+0] = tmp;
  }
}
    
void Back_dA1 (double* dev_W2, double* dev_dZ2, double* dev_dA1, int size_batch, int size_hidden, int size_output, int max_row, int max_col)

{  
    
  // dA1(20*964) = dZ2(2*964) * W2(2*20)
  for(int i = 0; i < max_row; i++) {
    for(int j = 0; j < max_col; j++) { 
      double partial = 0.0;
    	for (int k = 0; k < size_output; k++) {
    		partial += dev_W2(k,i) * dev_dZ2(k,j);
      }
    	dev_dA1(i,j) = partial;
    }
  }

}


void Back_dZ1 (double* dev_dA1, double* dev_A1, double* dev_Z1, double* dev_dZ1, int size_batch, int acti_type, int max_row, int max_col)

{  

  for(int i = 0; i < max_row; i++) {
    for(int j = 0; j < max_col; j++) { 
      if(acti_type == 1){ // Sigmoid
          dev_dZ1(i, j) = dev_dA1(i, j) * dev_A1(i, j) * (1-dev_A1(i, j)); // dZ1 = dA1*A1*(1-A1)
      } 
      else if(acti_type == 2) { // ReLU
        if(dev_Z1(i, j) < 0) 
          dev_dZ1(i, j) = 0;
        else
          dev_dZ1(i, j) = dev_dA1(i, j); //dZ1 = dA1*Z1_mask
      }
    }
  }

}

void backprop(int acti_type, int block_size) { // type = 1 is Sigmoid

  // get dZ2
  Back_dZ2(A2, Y_trn, dZ2, size_train, size_train, 1, size_train);

  // get dw2
  Back_dW(A1, dZ2, dW2, size_train, size_hidden, size_output, size_hidden);


  // get db2
  Back_db(dZ2, db2, size_output, size_train, size_train);

  // get dA1
  Back_dA1(W2, dZ2, dA1, size_train, size_hidden, size_output, size_hidden, size_train);    


  // get dZ1
  Back_dZ1(dA1, A1, Z1, dZ1, size_train, acti_type, size_hidden, size_train);


  // get dW1
  Back_dW(X_trn, dZ1, dW1, size_train, size_input, size_hidden, size_input);

  // get b1
  Back_db(dZ1, db1, size_hidden, size_train, size_train);

}

void update_Wb(double* dev_dWb, double* dev_Wb, int col, double learn_rate, int max_row, int max_col)
{

  for(int i = 0; i < max_row; i++) {
    for(int j = 0; j < max_col; j++) { 
      dev_Wb[i*col+j] = dev_Wb[i*col+j] - learn_rate * dev_dWb[i*col+j];
    }
  }
  
}

void updateParameter(double learn_rate, int block_size)
{

  // update w1
  update_Wb(dW1, W1, size_input, learn_rate, size_hidden, size_input);

  // update b1
  update_Wb(db1, b1, 1, learn_rate, size_hidden, 1);

  
  // update w2
  update_Wb(dW2, W2, size_hidden, learn_rate, size_output, size_hidden);
  
  // update b2
  update_Wb(db2, b2, 1, learn_rate, size_output, 1);
 

}


void read_X(string data_path, double* array)
{  
  ifstream inFile(data_path);  
  string row;   
  int p;
  p = 0;
  string value;
  while (getline(inFile, row)){  
    stringstream col(row);    
    while (getline(col, value, ',')){
      array[p] = stod(value);      
      p++;
    }   
  }  
}


void read_Y(string data_path, int* array)
{  
  ifstream inFile(data_path);  
  string row;   
  int p;
  p = 0;
  string value;
  while (getline(inFile, row)){  
    stringstream col(row);    
    while (getline(col, value, ',')){
      array[p] = stod(value);      
      p++;
    }   
  }  
}

/* Set the value and reading data */
void read_data()
{

  X_trn = (double *) malloc(size_X_trn * sizeof(double));  // 196*964
  Y_trn = (int *)    malloc(size_Y_trn * sizeof(int));     // 1*964
  X_tst = (double *) malloc(size_X_tst * sizeof(double));  // 196*414
  Y_tst = (int *)    malloc(size_Y_tst * sizeof(int));     // 1*414
  
  
  string X_trn_path = "X_trn.csv"; // Defined the name of cvs file
  string Y_trn_path = "Y_trn.csv";
  string X_tst_path = "X_tst.csv";
  string Y_tst_path = "Y_tst.csv";
        
  read_X(X_trn_path, X_trn); //Execution 
  read_Y(Y_trn_path, Y_trn);  
  read_X(X_tst_path, X_tst);  
  read_Y(Y_tst_path, Y_tst);  

}

void initialize_Wb() {
  
  W1 = (double *) malloc(size_W1*sizeof(double));   // 20*196
  b1 = (double *) malloc(size_b1*sizeof(double));   // 20*1
  W2 = (double *) malloc(size_W2*sizeof(double));   // 2*20
  b2 = (double *) malloc(size_b2*sizeof(double));   // 2*1
  
  dW1 = (double *) malloc(size_dW1*sizeof(double)); // 20*196
  db1 = (double *) malloc(size_db1*sizeof(double)); // 20*1
  dW2 = (double *) malloc(size_dW2*sizeof(double)); // 2*20
  db2 = (double *) malloc(size_db2*sizeof(double)); // 2*1

  memset (W1,0.5,size_W1);
  memset (b1,0,  size_b1);
  memset (W2,0.5,size_W2);
  memset (b2,0,  size_b2);
  
  memset (dW1,0, size_dW1);
  memset (db1,0, size_db1);
  memset (dW2,0, size_dW2);
  memset (db2,0, size_db2);
  
	default_random_engine e;
	uniform_real_distribution<double> u(-1,1);
 
  for (int i = 0; i < size_W1; i++) {
    W1[i] = u(e);
  }  
  for (int i = 0; i < size_W2; i++) {
    W2[i] = u(e);
  }   
  for (int i = 0; i < size_b1; i++) {
    b1[i] = 0;
  } 
  for (int i = 0; i < size_b2; i++) {
    b2[i] = 0;
  } 
  
}

double accuracy(int* max_index, int* Y, int size_batch) 
{
  
  int i;
  double count = 0;
  for(i = 0; i < size_batch; i++) {
    if(Y(0, i) == max_index(0, i))
      count += 1;
  }  
  return count/double(size_batch);
  
}

double train(double* X_trn, int* Y_trn, int acti_type, int block_size) {

  forward(X_trn, Y_trn, "train", acti_type, block_size);
  backprop(acti_type, block_size); // 1 Sigmoid 2 ReLU 
  updateParameter(0.01, block_size);
  return cross_entropy_loss(Y_trn, A2, size_train);
  
}

double test(double* X, int* Y, string type, int acti_type, int block_size) {

  forward(X, Y, type, acti_type, block_size);
  if(type == "train")
    return accuracy(max_index, Y, size_train);
  else
    return accuracy(max_index, Y, size_test);
  
}

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

  int block_size;
  double loss;
  double acc_trn, acc_tst;
  int e;
  int epochs = 20000;
  int acti_type = 1;
   
  if ( argc < 3 ){
    printf(" Usage: first argument: block size \n");
    printf(" second argument: activation type \n");
    return -1;
  } else if ( argc > 3 ) {
    printf("\n Too many arguments. \n");
    return -1;
  } else {
    block_size = atoi(argv[1]);
    acti_type = atoi(argv[2]);
  }
  

  initialize_Wb();
  read_data();
  float elapsed_time = 0.0;
  cudaEvent_t start, stop;
  cudaEventCreate(&start);
  cudaEventCreate(&stop);
  cudaEventRecord(start);
  for(e = 0; e < epochs; e++) {
    loss = train(X_trn, Y_trn, acti_type, block_size);
    // printf("%f \n", loss);
    // printf("the %d epoch, the training loss is: %f \n", e, loss);
  }
  cudaEventRecord(stop);
  cudaEventSynchronize(stop);
  cudaEventElapsedTime(&elapsed_time, start, stop);
  printf( "Elapsed Time: %.4e msec. \n", elapsed_time );
  
  acc_trn = test(X_trn, Y_trn, "train", acti_type, block_size);
  acc_tst = test(X_tst, Y_tst, "test", acti_type, block_size);
  printf("the %d epoch, the training accuracy is: %f, the test accuracy is: %f\n", e, acc_trn, acc_tst);
  
}


	.file	"tmpxft_0037f54e_00000000-6_sequential.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4932:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4932:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z11HiddenLayerPdS_S_S_S_iiiii
	.type	_Z11HiddenLayerPdS_S_S_S_iiiii, @function
_Z11HiddenLayerPdS_S_S_S_iiiii:
.LFB4907:
	.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
	movl	%r9d, %r14d
	xorl	%r9d, %r9d
	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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movslq	128(%rsp), %rax
	movq	%rsi, 8(%rsp)
	xorl	%esi, %esi
	salq	$3, %rax
	movq	%rax, %r15
.L3:
	cmpl	%r13d, 144(%rsp)
	jle	.L2
	movq	8(%rsp), %r10
	movslq	%r9d, %rbx
	movslq	%esi, %rax
	xorl	%r12d, %r12d
	salq	$3, %rbx
	leaq	(%rcx,%rbx), %rbp
	leaq	(%r10,%rax,8), %r11
	addq	%r8, %rbx
.L15:
	cmpl	%r12d, 152(%rsp)
	jle	.L12
	leaq	(%rdi,%r12,8), %r10
	xorl	%eax, %eax
	xorps	%xmm1, %xmm1
.L13:
	cmpl	%eax, %r14d
	jle	.L20
	movsd	(%r11,%rax,8), %xmm0
	mulsd	(%r10), %xmm0
	incq	%rax
	addq	%r15, %r10
	addsd	%xmm0, %xmm1
	jmp	.L13
.L20:
	addsd	(%rdx,%r13,8), %xmm1
	cmpl	$1, 136(%rsp)
	movsd	%xmm1, (%rbx)
	jne	.L5
	xorps	%xmm0, %xmm0
	movq	%r8, 56(%rsp)
	subsd	%xmm1, %xmm0
	movq	%rcx, 48(%rsp)
	movq	%rdx, 40(%rsp)
	movq	%rdi, 32(%rsp)
	movl	%esi, 28(%rsp)
	movl	%r9d, 24(%rsp)
	movq	%r11, 16(%rsp)
	call	exp@PLT
	movq	16(%rsp), %r11
	movl	24(%rsp), %r9d
	addsd	.LC1(%rip), %xmm0
	movsd	.LC1(%rip), %xmm1
	movl	28(%rsp), %esi
	movq	32(%rsp), %rdi
	movq	40(%rsp), %rdx
	movq	48(%rsp), %rcx
	divsd	%xmm0, %xmm1
	movq	56(%rsp), %r8
	movsd	%xmm1, 0(%rbp)
	jmp	.L6
.L5:
	cmpl	$2, 136(%rsp)
	jne	.L6
	xorps	%xmm0, %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L8
	movsd	%xmm0, 0(%rbp)
.L8:
	movsd	(%rbx), %xmm0
	xorps	%xmm1, %xmm1
	comisd	%xmm1, %xmm0
	jb	.L6
	movsd	%xmm0, 0(%rbp)
.L6:
	incq	%r12
	addq	$8, %rbp
	addq	$8, %rbx
	jmp	.L15
.L12:
	incq	%r13
	addl	128(%rsp), %r9d
	addl	%r14d, %esi
	jmp	.L3
.L2:
	addq	$72, %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
.LFE4907:
	.size	_Z11HiddenLayerPdS_S_S_S_iiiii, .-_Z11HiddenLayerPdS_S_S_S_iiiii
	.globl	_Z11OutputLayerPdS_S_S_iiii
	.type	_Z11OutputLayerPdS_S_S_iiii, @function
_Z11OutputLayerPdS_S_S_iiii:
.LFB4908:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdi, %r11
	movq	%rcx, %r10
	xorl	%edi, %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
	movslq	%r9d, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	salq	$3, %r12
	movq	%rdx, %rbp
	xorl	%edx, %edx
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
.L22:
	cmpl	%edx, 56(%rsp)
	jle	.L21
	movslq	%ebx, %rax
	leaq	(%r10,%rax,8), %r14
	movslq	%edi, %rax
	leaq	(%rsi,%rax,8), %r13
	xorl	%eax, %eax
.L27:
	cmpl	%eax, 64(%rsp)
	jle	.L24
	leaq	(%r11,%rax,8), %r15
	xorl	%ecx, %ecx
	xorps	%xmm0, %xmm0
.L25:
	cmpl	%ecx, %r8d
	jle	.L29
	movsd	0(%r13,%rcx,8), %xmm1
	mulsd	(%r15), %xmm1
	incq	%rcx
	addq	%r12, %r15
	addsd	%xmm1, %xmm0
	jmp	.L25
.L29:
	addsd	0(%rbp,%rdx,8), %xmm0
	movsd	%xmm0, (%r14,%rax,8)
	incq	%rax
	jmp	.L27
.L24:
	incq	%rdx
	addl	%r9d, %ebx
	addl	%r8d, %edi
	jmp	.L22
.L21:
	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
.LFE4908:
	.size	_Z11OutputLayerPdS_S_S_iiii, .-_Z11OutputLayerPdS_S_S_iiii
	.globl	_Z7SoftmaxPdiiS_Pi
	.type	_Z7SoftmaxPdiiS_Pi, @function
_Z7SoftmaxPdiiS_Pi:
.LFB4909:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%esi, %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r8, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movl	%edx, 24(%rsp)
	movq	%rcx, 16(%rsp)
.L31:
	movl	%ebx, %r14d
	cmpl	%ebx, 24(%rsp)
	jle	.L43
	movsd	0(%rbp,%rbx,8), %xmm0
	movl	$1, %esi
	movl	$1, 0(%r13,%rbx,4)
.L32:
	cmpl	%r15d, %esi
	jge	.L44
	movl	size_batch(%rip), %edx
	imull	%esi, %edx
	addl	%r14d, %edx
	movslq	%edx, %rdx
	movsd	0(%rbp,%rdx,8), %xmm1
	comisd	%xmm0, %xmm1
	jbe	.L33
	xorl	%eax, %eax
	movaps	%xmm1, %xmm0
	movl	%eax, 0(%r13,%rbx,4)
.L33:
	incl	%esi
	jmp	.L32
.L44:
	movq	$0x000000000, 8(%rsp)
	xorl	%r12d, %r12d
.L36:
	cmpl	%r15d, %r12d
	jge	.L45
	movl	size_batch(%rip), %edx
	imull	%r12d, %edx
	incl	%r12d
	addl	%r14d, %edx
	movslq	%edx, %rdx
	movsd	0(%rbp,%rdx,8), %xmm0
	call	exp@PLT
	addsd	8(%rsp), %xmm0
	movsd	%xmm0, 8(%rsp)
	jmp	.L36
.L45:
	xorl	%edx, %edx
.L38:
	cmpl	%r15d, %edx
	jge	.L46
	movl	%edx, %r12d
	imull	size_batch(%rip), %r12d
	movl	%edx, 28(%rsp)
	addl	%r14d, %r12d
	movslq	%r12d, %r12
	movsd	0(%rbp,%r12,8), %xmm0
	call	exp@PLT
	movq	16(%rsp), %rax
	movl	28(%rsp), %edx
	divsd	8(%rsp), %xmm0
	incl	%edx
	movsd	%xmm0, (%rax,%r12,8)
	jmp	.L38
.L46:
	incq	%rbx
	jmp	.L31
.L43:
	addq	$40, %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
.LFE4909:
	.size	_Z7SoftmaxPdiiS_Pi, .-_Z7SoftmaxPdiiS_Pi
	.globl	_Z18cross_entropy_lossPiPdi
	.type	_Z18cross_entropy_lossPiPdi, @function
_Z18cross_entropy_lossPiPdi:
.LFB4910:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xorps	%xmm2, %xmm2
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movq	%rsi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movl	%edx, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	xorl	%ebx, %ebx
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
.L48:
	cmpl	%ebx, %ebp
	jle	.L51
	movsd	0(%r13,%rbx,8), %xmm0
	movsd	%xmm2, 8(%rsp)
	call	log@PLT
	movl	size_batch(%rip), %eax
	movl	(%r12,%rbx,4), %r14d
	movsd	%xmm0, (%rsp)
	addl	%ebx, %eax
	incq	%rbx
	cltq
	movsd	0(%r13,%rax,8), %xmm0
	call	log@PLT
	movsd	(%rsp), %xmm1
	movl	$1, %eax
	xorps	.LC2(%rip), %xmm1
	movaps	%xmm0, %xmm3
	subl	%r14d, %eax
	movsd	8(%rsp), %xmm2
	movaps	%xmm1, %xmm0
	cvtsi2sdl	%r14d, %xmm1
	mulsd	%xmm1, %xmm0
	cvtsi2sdl	%eax, %xmm1
	mulsd	%xmm3, %xmm1
	subsd	%xmm1, %xmm0
	addsd	%xmm0, %xmm2
	jmp	.L48
.L51:
	cvtsi2sdl	%ebp, %xmm0
	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
	divsd	%xmm0, %xmm2
	movaps	%xmm2, %xmm0
	ret
	.cfi_endproc
.LFE4910:
	.size	_Z18cross_entropy_lossPiPdi, .-_Z18cross_entropy_lossPiPdi
	.globl	_Z13initialize_ZAi
	.type	_Z13initialize_ZAi, @function
_Z13initialize_ZAi:
.LFB4911:
	.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
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movslq	%edi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movl	size_hidden(%rip), %ebp
	imull	%r12d, %ebp
	movslq	%ebp, %rbp
	leaq	0(,%rbp,8), %rax
	movq	%rax, %rdi
	movq	%rax, (%rsp)
	call	malloc@PLT
	leaq	0(,%rbp,8), %rdi
	movq	%rax, 56(%rsp)
	movq	%rax, Z1(%rip)
	call	malloc@PLT
	movl	size_output(%rip), %ebx
	movq	%rax, 48(%rsp)
	imull	%r12d, %ebx
	movq	%rax, A1(%rip)
	movslq	%ebx, %rbx
	leaq	0(,%rbx,8), %rax
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	call	malloc@PLT
	leaq	0(,%rbx,8), %rdi
	movq	%rax, 40(%rsp)
	movq	%rax, Z2(%rip)
	call	malloc@PLT
	movq	(%rsp), %rdi
	movq	%rax, 32(%rsp)
	movq	%rax, A2(%rip)
	call	malloc@PLT
	movq	(%rsp), %rdi
	movq	%rax, %r15
	movq	%rax, dZ1(%rip)
	call	malloc@PLT
	leaq	0(,%rbx,8), %rdi
	movq	%rax, %r14
	movq	%rax, dA1(%rip)
	call	malloc@PLT
	leaq	0(,%rbx,8), %rdi
	movq	%rax, %r13
	movq	%rax, dZ2(%rip)
	call	malloc@PLT
	movq	%rax, 16(%rsp)
	movq	%rax, dA2(%rip)
	leaq	0(,%r12,4), %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	(%rsp), %rcx
	movq	56(%rsp), %rdi
	xorl	%esi, %esi
	movq	%rbp, %rdx
	movq	%rax, 24(%rsp)
	movq	%rax, max_index(%rip)
	call	__memset_chk@PLT
	movq	(%rsp), %rcx
	movq	48(%rsp), %rdi
	xorl	%esi, %esi
	movq	%rbp, %rdx
	call	__memset_chk@PLT
	movq	8(%rsp), %rcx
	movq	%rbx, %rdx
	xorl	%esi, %esi
	movq	40(%rsp), %rdi
	call	__memset_chk@PLT
	movq	8(%rsp), %rcx
	movq	%rbx, %rdx
	xorl	%esi, %esi
	movq	32(%rsp), %rdi
	call	__memset_chk@PLT
	movq	(%rsp), %rcx
	movq	%rbp, %rdx
	movq	%r15, %rdi
	xorl	%esi, %esi
	call	__memset_chk@PLT
	movq	(%rsp), %rcx
	movq	%rbp, %rdx
	movq	%r14, %rdi
	xorl	%esi, %esi
	call	__memset_chk@PLT
	movq	8(%rsp), %rcx
	movq	%rbx, %rdx
	movq	%r13, %rdi
	xorl	%esi, %esi
	call	__memset_chk@PLT
	movq	8(%rsp), %rcx
	movq	%rbx, %rdx
	xorl	%esi, %esi
	movq	16(%rsp), %rdi
	call	__memset_chk@PLT
	movq	24(%rsp), %rdi
	addq	$72, %rsp
	.cfi_def_cfa_offset 56
	xorl	%esi, %esi
	popq	%rbx
	.cfi_def_cfa_offset 48
	leaq	0(,%r12,4), %rcx
	popq	%rbp
	.cfi_def_cfa_offset 40
	movq	%r12, %rdx
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	__memset_chk@PLT
	.cfi_endproc
.LFE4911:
	.size	_Z13initialize_ZAi, .-_Z13initialize_ZAi
	.globl	_Z8Back_dZ2PdPiS_iiii
	.type	_Z8Back_dZ2PdPiS_iiii, @function
_Z8Back_dZ2PdPiS_iiii:
.LFB4913:
	.cfi_startproc
	endbr64
	movslq	%r8d, %r8
	movl	%ecx, %r10d
	xorl	%ecx, %ecx
	leaq	(%rdx,%r8,8), %r8
.L55:
	cmpl	%r9d, %ecx
	jge	.L59
	xorl	%eax, %eax
.L57:
	cmpl	%eax, 8(%rsp)
	jle	.L60
	cvtsi2sdl	(%rsi,%rax,4), %xmm0
	movsd	(%rdi,%rax,8), %xmm1
	cvtsi2sdl	%r10d, %xmm2
	subsd	%xmm0, %xmm1
	divsd	%xmm2, %xmm1
	movsd	%xmm1, (%rdx,%rax,8)
	subsd	(%rdi,%rax,8), %xmm0
	divsd	%xmm2, %xmm0
	movsd	%xmm0, (%r8,%rax,8)
	incq	%rax
	jmp	.L57
.L60:
	incl	%ecx
	jmp	.L55
.L59:
	ret
	.cfi_endproc
.LFE4913:
	.size	_Z8Back_dZ2PdPiS_iiii, .-_Z8Back_dZ2PdPiS_iiii
	.globl	_Z7Back_dWPdS_S_iiii
	.type	_Z7Back_dWPdS_S_iiii, @function
_Z7Back_dWPdS_S_iiii:
.LFB4914:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdx, %r11
	movl	%ecx, %eax
	xorl	%r10d, %r10d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rdi, %r12
	movq	%rsi, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
.L62:
	cmpl	%r9d, %ebp
	jge	.L61
	movslq	%ebx, %rdx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	leaq	(%r11,%rdx,8), %r14
	movslq	%r10d, %rdx
	leaq	(%rdi,%rdx,8), %r13
.L67:
	cmpl	%ecx, 56(%rsp)
	jle	.L64
	movslq	%esi, %rdx
	xorps	%xmm0, %xmm0
	leaq	(%r12,%rdx,8), %r15
	xorl	%edx, %edx
.L65:
	cmpl	%edx, %eax
	jle	.L69
	movsd	0(%r13,%rdx,8), %xmm1
	mulsd	(%r15,%rdx,8), %xmm1
	incq	%rdx
	addsd	%xmm1, %xmm0
	jmp	.L65
.L69:
	movsd	%xmm0, (%r14,%rcx,8)
	addl	%eax, %esi
	incq	%rcx
	jmp	.L67
.L64:
	incl	%ebp
	addl	%r8d, %ebx
	addl	%eax, %r10d
	jmp	.L62
.L61:
	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
.LFE4914:
	.size	_Z7Back_dWPdS_S_iiii, .-_Z7Back_dWPdS_S_iiii
	.globl	_Z7Back_dbPdS_iii
	.type	_Z7Back_dbPdS_iii, @function
_Z7Back_dbPdS_iii:
.LFB4915:
	.cfi_startproc
	endbr64
	movq	%rsi, %r10
	xorl	%r9d, %r9d
	xorl	%esi, %esi
.L71:
	cmpl	%esi, %edx
	jle	.L70
	movslq	%r9d, %rax
	xorps	%xmm0, %xmm0
	leaq	(%rdi,%rax,8), %r11
	xorl	%eax, %eax
.L74:
	cmpl	%eax, %ecx
	jle	.L75
	addsd	(%r11,%rax,8), %xmm0
	incq	%rax
	jmp	.L74
.L75:
	movsd	%xmm0, (%r10,%rsi,8)
	addl	%r8d, %r9d
	incq	%rsi
	jmp	.L71
.L70:
	ret
	.cfi_endproc
.LFE4915:
	.size	_Z7Back_dbPdS_iii, .-_Z7Back_dbPdS_iii
	.globl	_Z8Back_dA1PdS_S_iiiii
	.type	_Z8Back_dA1PdS_S_iiiii, @function
_Z8Back_dA1PdS_S_iiiii:
.LFB4916:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movslq	%r8d, %r8
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	0(,%r8,8), %r11
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movq	%rdx, %r12
	xorl	%edx, %edx
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%rsi, %rbp
	movslq	%ecx, %rsi
	xorl	%ecx, %ecx
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rsi, %r13
	movq	%rdi, %rbx
	salq	$3, %rsi
.L77:
	cmpl	48(%rsp), %ecx
	jge	.L76
	movslq	%edx, %rax
	leaq	(%r12,%rax,8), %r14
	xorl	%eax, %eax
.L82:
	cmpl	%eax, 56(%rsp)
	jle	.L79
	leaq	0(%rbp,%rax,8), %r10
	movq	%rbx, %r8
	xorps	%xmm0, %xmm0
	xorl	%edi, %edi
.L80:
	cmpl	%r9d, %edi
	jge	.L84
	movsd	(%r8), %xmm1
	mulsd	(%r10), %xmm1
	incl	%edi
	addq	%r11, %r8
	addq	%rsi, %r10
	addsd	%xmm1, %xmm0
	jmp	.L80
.L84:
	movsd	%xmm0, (%r14,%rax,8)
	incq	%rax
	jmp	.L82
.L79:
	incl	%ecx
	addl	%r13d, %edx
	addq	$8, %rbx
	jmp	.L77
.L76:
	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
.LFE4916:
	.size	_Z8Back_dA1PdS_S_iiiii, .-_Z8Back_dA1PdS_S_iiiii
	.globl	_Z8Back_dZ1PdS_S_S_iiii
	.type	_Z8Back_dZ1PdS_S_S_iiii, @function
_Z8Back_dZ1PdS_S_S_iiii:
.LFB4917:
	.cfi_startproc
	endbr64
	movsd	.LC1(%rip), %xmm3
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsi, %r11
	xorl	%r10d, %r10d
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rcx, %rsi
	movq	%rdx, %rbx
	xorl	%ecx, %ecx
	xorps	%xmm2, %xmm2
.L86:
	cmpl	24(%rsp), %r10d
	jge	.L97
	xorl	%eax, %eax
.L92:
	cmpl	32(%rsp), %eax
	jge	.L98
	cmpl	$1, %r9d
	jne	.L87
	leal	(%rax,%rcx), %edx
	movaps	%xmm3, %xmm4
	movslq	%edx, %rdx
	movsd	(%r11,%rdx,8), %xmm1
	movsd	(%rdi,%rdx,8), %xmm0
	mulsd	%xmm1, %xmm0
	subsd	%xmm1, %xmm4
	mulsd	%xmm4, %xmm0
	movsd	%xmm0, (%rsi,%rdx,8)
	jmp	.L88
.L87:
	cmpl	$2, %r9d
	jne	.L88
	leal	(%rax,%rcx), %edx
	movslq	%edx, %rdx
	comisd	(%rbx,%rdx,8), %xmm2
	leaq	(%rsi,%rdx,8), %rbp
	jbe	.L95
	movq	$0x000000000, 0(%rbp)
	jmp	.L88
.L95:
	movsd	(%rdi,%rdx,8), %xmm0
	movsd	%xmm0, 0(%rbp)
.L88:
	incl	%eax
	jmp	.L92
.L98:
	incl	%r10d
	addl	%r8d, %ecx
	jmp	.L86
.L97:
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4917:
	.size	_Z8Back_dZ1PdS_S_S_iiii, .-_Z8Back_dZ1PdS_S_S_iiii
	.globl	_Z8backpropii
	.type	_Z8backpropii, @function
_Z8backpropii:
.LFB4918:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$1, %r9d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%edi, %r13d
	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
	pushq	%rax
	.cfi_def_cfa_offset 64
	movl	size_train(%rip), %ebx
	movq	dZ2(%rip), %r12
	movq	Y_trn(%rip), %rsi
	pushq	%rbx
	.cfi_def_cfa_offset 72
	movq	A2(%rip), %rdi
	movl	%ebx, %r8d
	movl	%ebx, %ecx
	movq	%r12, %rdx
	call	_Z8Back_dZ2PdPiS_iiii
	movl	size_hidden(%rip), %ebp
	movl	%ebx, %ecx
	movq	%r12, %rsi
	movq	A1(%rip), %r15
	movl	size_output(%rip), %r9d
	pushq	%rbp
	.cfi_def_cfa_offset 80
	movq	dW2(%rip), %rdx
	movl	%ebp, %r8d
	movq	%r15, %rdi
	call	_Z7Back_dWPdS_S_iiii
	movl	%ebx, %ecx
	movl	%ebx, %r8d
	movl	%r9d, %edx
	movq	db2(%rip), %rsi
	movq	%r12, %rdi
	movl	%r9d, 20(%rsp)
	call	_Z7Back_dbPdS_iii
	pushq	%rbx
	.cfi_def_cfa_offset 88
	movq	dA1(%rip), %r14
	movl	%ebp, %r8d
	pushq	%rbp
	.cfi_def_cfa_offset 96
	movq	W2(%rip), %rdi
	movq	%r12, %rsi
	movl	36(%rsp), %r9d
	movq	%r14, %rdx
	call	_Z8Back_dA1PdS_S_iiiii
	addq	$32, %rsp
	.cfi_def_cfa_offset 64
	movl	%r13d, %r9d
	movl	%ebx, %r8d
	pushq	%rbx
	.cfi_def_cfa_offset 72
	movq	dZ1(%rip), %r12
	movq	%r15, %rsi
	movq	%r14, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 80
	movq	Z1(%rip), %rdx
	movq	%r12, %rcx
	call	_Z8Back_dZ1PdS_S_S_iiii
	movl	%ebx, %ecx
	movq	%r12, %rsi
	movl	%ebp, %r9d
	movl	size_input(%rip), %r8d
	movq	dW1(%rip), %rdx
	movq	X_trn(%rip), %rdi
	pushq	%r8
	.cfi_def_cfa_offset 88
	call	_Z7Back_dWPdS_S_iiii
	movq	db1(%rip), %rsi
	movl	%ebx, %ecx
	movl	%ebp, %edx
	addq	$32, %rsp
	.cfi_def_cfa_offset 56
	movl	%ebx, %r8d
	movq	%r12, %rdi
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	_Z7Back_dbPdS_iii
	.cfi_endproc
.LFE4918:
	.size	_Z8backpropii, .-_Z8backpropii
	.globl	_Z9update_WbPdS_idii
	.type	_Z9update_WbPdS_idii, @function
_Z9update_WbPdS_idii:
.LFB4919:
	.cfi_startproc
	endbr64
	movq	%rdi, %r10
	movl	%edx, %r11d
	xorl	%edi, %edi
	xorl	%r9d, %r9d
.L102:
	cmpl	%ecx, %r9d
	jge	.L101
	movslq	%edi, %rax
	xorl	%edx, %edx
	salq	$3, %rax
.L105:
	cmpl	%r8d, %edx
	jge	.L106
	movsd	(%r10,%rax), %xmm2
	movsd	(%rsi,%rax), %xmm1
	incl	%edx
	mulsd	%xmm0, %xmm2
	subsd	%xmm2, %xmm1
	movsd	%xmm1, (%rsi,%rax)
	addq	$8, %rax
	jmp	.L105
.L106:
	incl	%r9d
	addl	%r11d, %edi
	jmp	.L102
.L101:
	ret
	.cfi_endproc
.LFE4919:
	.size	_Z9update_WbPdS_idii, .-_Z9update_WbPdS_idii
	.globl	_Z15updateParameterdi
	.type	_Z15updateParameterdi, @function
_Z15updateParameterdi:
.LFB4920:
	.cfi_startproc
	endbr64
	movl	size_input(%rip), %edx
	movq	W1(%rip), %rsi
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	size_hidden(%rip), %ebx
	movq	dW1(%rip), %rdi
	movl	%edx, %r8d
	movl	%ebx, %ecx
	call	_Z9update_WbPdS_idii
	movl	$1, %r8d
	movl	$1, %edx
	movq	b1(%rip), %rsi
	movq	db1(%rip), %rdi
	call	_Z9update_WbPdS_idii
	movl	size_output(%rip), %ecx
	movl	%ebx, %r8d
	movl	%ebx, %edx
	movq	W2(%rip), %rsi
	movq	dW2(%rip), %rdi
	call	_Z9update_WbPdS_idii
	movq	b2(%rip), %rsi
	movl	$1, %edx
	popq	%rbx
	.cfi_def_cfa_offset 8
	movq	db2(%rip), %rdi
	movl	$1, %r8d
	jmp	_Z9update_WbPdS_idii
	.cfi_endproc
.LFE4920:
	.size	_Z15updateParameterdi, .-_Z15updateParameterdi
	.globl	_Z8accuracyPiS_i
	.type	_Z8accuracyPiS_i, @function
_Z8accuracyPiS_i:
.LFB4926:
	.cfi_startproc
	endbr64
	movsd	.LC1(%rip), %xmm1
	xorl	%eax, %eax
	xorps	%xmm0, %xmm0
.L110:
	cmpl	%eax, %edx
	jle	.L113
	movl	(%rdi,%rax,4), %ecx
	cmpl	%ecx, (%rsi,%rax,4)
	jne	.L111
	addsd	%xmm1, %xmm0
.L111:
	incq	%rax
	jmp	.L110
.L113:
	cvtsi2sdl	%edx, %xmm1
	divsd	%xmm1, %xmm0
	ret
	.cfi_endproc
.LFE4926:
	.size	_Z8accuracyPiS_i, .-_Z8accuracyPiS_i
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4955:
	.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
.LFE4955:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.text._ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev,"axG",@progbits,_ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD5Ev,comdat
	.align 2
	.weak	_ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.type	_ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev, @function
_ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev:
.LFB5088:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	call	__errno_location@PLT
	cmpl	$0, (%rax)
	jne	.L116
	movl	(%rbx), %edx
	movl	%edx, (%rax)
.L116:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5088:
	.size	_ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev, .-_ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.weak	_ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	.set	_ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev,_ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.section	.text._ZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,"axG",@progbits,_ZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,comdat
	.weak	_ZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_
	.type	_ZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_, @function
_ZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_:
.LFB5083:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA5083
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdi, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rsi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rcx, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdx, %rbx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %r13
	call	__errno_location@PLT
	leaq	32(%rsp), %rsi
	movq	%rbx, %rdi
	movq	%rax, %rbp
	movl	(%rax), %eax
	movl	%eax, 28(%rsp)
	xorl	%eax, %eax
	movl	%eax, 0(%rbp)
.LEHB0:
	call	*%r15
	movq	32(%rsp), %rax
	cmpq	%rbx, %rax
	jne	.L120
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L132
	movq	%r14, %rdi
	call	_ZSt24__throw_invalid_argumentPKc@PLT
.L120:
	cmpl	$34, 0(%rbp)
	jne	.L122
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L132
	movq	%r14, %rdi
	call	_ZSt20__throw_out_of_rangePKc@PLT
.LEHE0:
.L122:
	testq	%r12, %r12
	je	.L124
	subq	%rbx, %rax
	movq	%rax, (%r12)
.L124:
	movq	%r13, %rdi
	movsd	%xmm0, 8(%rsp)
	call	_ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	movsd	8(%rsp), %xmm0
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	je	.L127
	jmp	.L132
.L128:
	endbr64
	movq	%rax, %rbx
.L125:
	movq	%r13, %rdi
	call	_ZZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L132
	movq	%rbx, %rdi
.LEHB1:
	call	_Unwind_Resume@PLT
.LEHE1:
.L132:
	call	__stack_chk_fail@PLT
.L127:
	addq	$56, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5083:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table._ZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,"aG",@progbits,_ZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,comdat
.LLSDA5083:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE5083-.LLSDACSB5083
.LLSDACSB5083:
	.uleb128 .LEHB0-.LFB5083
	.uleb128 .LEHE0-.LEHB0
	.uleb128 .L128-.LFB5083
	.uleb128 0
	.uleb128 .LEHB1-.LFB5083
	.uleb128 .LEHE1-.LEHB1
	.uleb128 0
	.uleb128 0
.LLSDACSE5083:
	.section	.text._ZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,"axG",@progbits,_ZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,comdat
	.size	_ZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_, .-_ZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_
	.section	.rodata._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.str1.1,"aMS",@progbits,1
.LC3:
	.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_:
.LFB5272:
	.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	.L136
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L141
	leaq	.LC3(%rip), %rdi
	call	_ZSt19__throw_logic_errorPKc@PLT
.L136:
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	movq	%rsi, %rbp
	call	strlen@PLT
	movq	%rax, (%rsp)
	leaq	0(%rbp,%rax), %r12
	cmpq	$15, %rax
	jbe	.L138
	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)
.L138:
	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	.L139
.L141:
	call	__stack_chk_fail@PLT
.L139:
	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
.LFE5272:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_, .-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
	.set	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.section	.text._ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_,"axG",@progbits,_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_,comdat
	.weak	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_
	.type	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_, @function
_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_:
.LFB5287:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	8(%rdi), %r12
	movq	%rsi, %rdi
	movq	%rsi, 8(%rsp)
	call	strlen@PLT
	movq	8(%rsp), %rsi
	movq	%rax, %rdx
	xorl	%eax, %eax
	cmpq	%rdx, %r12
	jne	.L142
	movb	$1, %al
	testq	%r12, %r12
	je	.L142
	movq	(%rbx), %rdi
	movq	%r12, %rdx
	call	memcmp@PLT
	testl	%eax, %eax
	sete	%al
.L142:
	addq	$24, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5287:
	.size	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_, .-_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC4:
	.string	"train"
	.text
	.globl	_Z7forwardPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
	.type	_Z7forwardPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii, @function
_Z7forwardPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii:
.LFB4912:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC4(%rip), %rsi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movl	%ecx, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%rdi, %rbp
	movq	%rdx, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_
	testb	%al, %al
	je	.L148
	movl	size_train(%rip), %eax
	movl	%eax, size_batch(%rip)
	movl	size_X_trn(%rip), %eax
	movl	%eax, size_Xbatch(%rip)
	movl	size_Y_trn(%rip), %eax
	jmp	.L149
.L148:
	movl	size_test(%rip), %eax
	movl	%eax, size_batch(%rip)
	movl	size_X_tst(%rip), %eax
	movl	%eax, size_Xbatch(%rip)
	movl	size_Y_tst(%rip), %eax
.L149:
	movl	size_batch(%rip), %ebx
	movl	%eax, size_Ybatch(%rip)
	movl	%ebx, %edi
	call	_Z13initialize_ZAi
	movl	size_hidden(%rip), %r14d
	pushq	%rbx
	.cfi_def_cfa_offset 56
	movq	%rbp, %rdi
	movq	A1(%rip), %r13
	movl	size_input(%rip), %r9d
	movq	Z1(%rip), %r8
	movq	b1(%rip), %rdx
	pushq	%r14
	.cfi_def_cfa_offset 64
	pushq	%r12
	.cfi_def_cfa_offset 72
	movq	W1(%rip), %rsi
	movq	%r13, %rcx
	pushq	%rbx
	.cfi_def_cfa_offset 80
	call	_Z11HiddenLayerPdS_S_S_S_iiiii
	movl	size_output(%rip), %r12d
	addq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	Z2(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	movq	b2(%rip), %rdx
	movl	%r14d, %r8d
	movq	%r13, %rdi
	pushq	%r12
	.cfi_def_cfa_offset 64
	movq	W2(%rip), %rsi
	movq	%rbp, %rcx
	movl	%ebx, %r9d
	call	_Z11OutputLayerPdS_S_S_iiii
	movq	max_index(%rip), %r8
	popq	%rax
	.cfi_def_cfa_offset 56
	movl	%r12d, %esi
	movq	A2(%rip), %rcx
	popq	%rdx
	.cfi_def_cfa_offset 48
	movq	%rbp, %rdi
	movl	%ebx, %edx
	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
	jmp	_Z7SoftmaxPdiiS_Pi
	.cfi_endproc
.LFE4912:
	.size	_Z7forwardPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii, .-_Z7forwardPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
	.globl	_Z5trainPdPiii
	.type	_Z5trainPdPiii, @function
_Z5trainPdPiii:
.LFB4927:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movq	%rdi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movl	%edx, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%rsi, %rbp
	leaq	.LC4(%rip), %rsi
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movl	%ecx, %ebx
	subq	$48, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r13
	leaq	7(%rsp), %rdx
	movq	%r13, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
	movl	%ebx, %r8d
	movl	%r12d, %ecx
	movq	%r13, %rdx
	movq	%rbp, %rsi
	movq	%r14, %rdi
	call	_Z7forwardPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
	movq	%r13, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movl	%r12d, %edi
	movl	%ebx, %esi
	call	_Z8backpropii
	movsd	.LC5(%rip), %xmm0
	movl	%ebx, %edi
	call	_Z15updateParameterdi
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	je	.L152
	call	__stack_chk_fail@PLT
.L152:
	movl	size_train(%rip), %edx
	movq	A2(%rip), %rsi
	movq	%rbp, %rdi
	addq	$48, %rsp
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	jmp	_Z18cross_entropy_lossPiPdi
	.cfi_endproc
.LFE4927:
	.size	_Z5trainPdPiii, .-_Z5trainPdPiii
	.globl	_Z4testPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
	.type	_Z4testPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii, @function
_Z4testPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii:
.LFB4928:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%rdx, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rsi, %rbx
	movq	%rdx, %rsi
	subq	$72, %rsp
	.cfi_def_cfa_offset 112
	movl	%ecx, 12(%rsp)
	leaq	24(%rsp), %r12
	movl	%r8d, 8(%rsp)
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_@PLT
	movl	8(%rsp), %r8d
	movq	%rbx, %rsi
	movq	%r12, %rdx
	movl	12(%rsp), %ecx
	movq	%r13, %rdi
	call	_Z7forwardPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	.LC4(%rip), %rsi
	movq	%rbp, %rdi
	call	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_
	testb	%al, %al
	je	.L156
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	movl	size_train(%rip), %edx
	je	.L161
	jmp	.L162
.L156:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	movl	size_test(%rip), %edx
	je	.L161
.L162:
	call	__stack_chk_fail@PLT
.L161:
	movq	max_index(%rip), %rdi
	addq	$72, %rsp
	.cfi_def_cfa_offset 40
	movq	%rbx, %rsi
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	jmp	_Z8accuracyPiS_i
	.cfi_endproc
.LFE4928:
	.size	_Z4testPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii, .-_Z4testPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
	.section	.rodata.str1.1
.LC6:
	.string	"stod"
	.text
	.globl	_Z6read_XNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPd
	.type	_Z6read_XNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPd, @function
_Z6read_XNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPd:
.LFB4921:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4921
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$8, %edx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rsi, %r14
	movq	%rdi, %rsi
	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
	xorl	%ebx, %ebx
	subq	$1016, %rsp
	.cfi_def_cfa_offset 1072
	movq	%fs:40, %rax
	movq	%rax, 1000(%rsp)
	xorl	%eax, %eax
	leaq	480(%rsp), %rax
	leaq	24(%rsp), %rbp
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
.LEHB2:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode@PLT
.LEHE2:
	leaq	40(%rsp), %rax
	xorl	%edx, %edx
	movb	$0, 40(%rsp)
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	%rax, 32(%rsp)
	leaq	72(%rsp), %rax
	movq	%rax, 56(%rsp)
	movq	%rdx, 64(%rsp)
	movb	$0, 72(%rsp)
.L164:
	movq	8(%rsp), %rdi
	movq	%rbp, %rsi
	leaq	56(%rsp), %r13
.LEHB3:
	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	.L176
	leaq	88(%rsp), %r12
	movl	$24, %edx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode@PLT
.LEHE3:
	movslq	%ebx, %rbx
	leaq	.LC6(%rip), %r15
.L165:
	movl	$44, %edx
	movq	%r13, %rsi
	movq	%r12, %rdi
.LEHB4:
	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	.L177
	movq	56(%rsp), %rdx
	movq	strtod@GOTPCREL(%rip), %rdi
	xorl	%ecx, %ecx
	movq	%r15, %rsi
	call	_ZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_
.LEHE4:
	movsd	%xmm0, (%r14,%rbx,8)
	incq	%rbx
	jmp	.L165
.L177:
	movq	%r12, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	jmp	.L164
.L176:
	movq	%r13, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	8(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	1000(%rsp), %rax
	subq	%fs:40, %rax
	je	.L171
	jmp	.L174
.L172:
	endbr64
	movq	%rax, %rbx
.L168:
	movq	%r12, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	jmp	.L169
.L173:
	endbr64
	movq	%rax, %rbx
.L169:
	movq	%r13, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	8(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	1000(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L174
	movq	%rbx, %rdi
.LEHB5:
	call	_Unwind_Resume@PLT
.LEHE5:
.L174:
	call	__stack_chk_fail@PLT
.L171:
	addq	$1016, %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
.LFE4921:
	.section	.gcc_except_table,"a",@progbits
.LLSDA4921:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4921-.LLSDACSB4921
.LLSDACSB4921:
	.uleb128 .LEHB2-.LFB4921
	.uleb128 .LEHE2-.LEHB2
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB3-.LFB4921
	.uleb128 .LEHE3-.LEHB3
	.uleb128 .L173-.LFB4921
	.uleb128 0
	.uleb128 .LEHB4-.LFB4921
	.uleb128 .LEHE4-.LEHB4
	.uleb128 .L172-.LFB4921
	.uleb128 0
	.uleb128 .LEHB5-.LFB4921
	.uleb128 .LEHE5-.LEHB5
	.uleb128 0
	.uleb128 0
.LLSDACSE4921:
	.text
	.size	_Z6read_XNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPd, .-_Z6read_XNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPd
	.globl	_Z6read_YNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi
	.type	_Z6read_YNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi, @function
_Z6read_YNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi:
.LFB4923:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4923
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$8, %edx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rsi, %r14
	movq	%rdi, %rsi
	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
	xorl	%ebx, %ebx
	subq	$1016, %rsp
	.cfi_def_cfa_offset 1072
	movq	%fs:40, %rax
	movq	%rax, 1000(%rsp)
	xorl	%eax, %eax
	leaq	480(%rsp), %rax
	leaq	24(%rsp), %rbp
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
.LEHB6:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode@PLT
.LEHE6:
	leaq	40(%rsp), %rax
	xorl	%edx, %edx
	movb	$0, 40(%rsp)
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	%rax, 32(%rsp)
	leaq	72(%rsp), %rax
	movq	%rax, 56(%rsp)
	movq	%rdx, 64(%rsp)
	movb	$0, 72(%rsp)
.L179:
	movq	8(%rsp), %rdi
	movq	%rbp, %rsi
	leaq	56(%rsp), %r13
.LEHB7:
	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	.L191
	leaq	88(%rsp), %r12
	movl	$24, %edx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode@PLT
.LEHE7:
	movslq	%ebx, %rbx
	leaq	.LC6(%rip), %r15
.L180:
	movl	$44, %edx
	movq	%r13, %rsi
	movq	%r12, %rdi
.LEHB8:
	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	.L192
	movq	56(%rsp), %rdx
	movq	strtod@GOTPCREL(%rip), %rdi
	xorl	%ecx, %ecx
	movq	%r15, %rsi
	call	_ZN9__gnu_cxx6__stoaIddcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_
.LEHE8:
	cvttsd2sil	%xmm0, %eax
	movl	%eax, (%r14,%rbx,4)
	incq	%rbx
	jmp	.L180
.L192:
	movq	%r12, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	jmp	.L179
.L191:
	movq	%r13, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	8(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	1000(%rsp), %rax
	subq	%fs:40, %rax
	je	.L186
	jmp	.L189
.L187:
	endbr64
	movq	%rax, %rbx
.L183:
	movq	%r12, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	jmp	.L184
.L188:
	endbr64
	movq	%rax, %rbx
.L184:
	movq	%r13, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	8(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	1000(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L189
	movq	%rbx, %rdi
.LEHB9:
	call	_Unwind_Resume@PLT
.LEHE9:
.L189:
	call	__stack_chk_fail@PLT
.L186:
	addq	$1016, %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
.LFE4923:
	.section	.gcc_except_table
.LLSDA4923:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4923-.LLSDACSB4923
.LLSDACSB4923:
	.uleb128 .LEHB6-.LFB4923
	.uleb128 .LEHE6-.LEHB6
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB7-.LFB4923
	.uleb128 .LEHE7-.LEHB7
	.uleb128 .L188-.LFB4923
	.uleb128 0
	.uleb128 .LEHB8-.LFB4923
	.uleb128 .LEHE8-.LEHB8
	.uleb128 .L187-.LFB4923
	.uleb128 0
	.uleb128 .LEHB9-.LFB4923
	.uleb128 .LEHE9-.LEHB9
	.uleb128 0
	.uleb128 0
.LLSDACSE4923:
	.text
	.size	_Z6read_YNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi, .-_Z6read_YNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi
	.section	.rodata.str1.1
.LC7:
	.string	"X_trn.csv"
.LC8:
	.string	"Y_trn.csv"
.LC9:
	.string	"X_tst.csv"
.LC10:
	.string	"Y_tst.csv"
	.text
	.globl	_Z9read_datav
	.type	_Z9read_datav, @function
_Z9read_datav:
.LFB4924:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4924
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$184, %rsp
	.cfi_def_cfa_offset 240
	movslq	size_X_trn(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	7(%rsp), %rbx
	leaq	8(%rsp), %rbp
	salq	$3, %rdi
	leaq	40(%rsp), %r12
	call	malloc@PLT
	movslq	size_Y_trn(%rip), %rdi
	movq	%rax, X_trn(%rip)
	salq	$2, %rdi
	call	malloc@PLT
	movslq	size_X_tst(%rip), %rdi
	movq	%rax, Y_trn(%rip)
	salq	$3, %rdi
	call	malloc@PLT
	movslq	size_Y_tst(%rip), %rdi
	movq	%rax, X_tst(%rip)
	salq	$2, %rdi
	call	malloc@PLT
	movq	%rbx, %rdx
	leaq	.LC7(%rip), %rsi
	movq	%rbp, %rdi
	movq	%rax, Y_tst(%rip)
.LEHB10:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE10:
	movq	%rbx, %rdx
	leaq	.LC8(%rip), %rsi
	movq	%r12, %rdi
.LEHB11:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE11:
	leaq	72(%rsp), %r13
	movq	%rbx, %rdx
	leaq	.LC9(%rip), %rsi
	movq	%r13, %rdi
.LEHB12:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE12:
	leaq	104(%rsp), %r14
	movq	%rbx, %rdx
	leaq	.LC10(%rip), %rsi
	movq	%r14, %rdi
.LEHB13:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE13:
	leaq	136(%rsp), %r15
	movq	%rbp, %rsi
	movq	X_trn(%rip), %rbx
	movq	%r15, %rdi
.LEHB14:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_@PLT
.LEHE14:
	movq	%rbx, %rsi
	movq	%r15, %rdi
.LEHB15:
	call	_Z6read_XNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPd
.LEHE15:
	movq	%r15, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%r12, %rsi
	movq	%r15, %rdi
	movq	Y_trn(%rip), %rbx
.LEHB16:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_@PLT
.LEHE16:
	movq	%rbx, %rsi
	movq	%r15, %rdi
.LEHB17:
	call	_Z6read_YNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi
.LEHE17:
	movq	%r15, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%r13, %rsi
	movq	%r15, %rdi
	movq	X_tst(%rip), %rbx
.LEHB18:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_@PLT
.LEHE18:
	movq	%rbx, %rsi
	movq	%r15, %rdi
.LEHB19:
	call	_Z6read_XNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPd
.LEHE19:
	movq	%r15, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%r14, %rsi
	movq	%r15, %rdi
	movq	Y_tst(%rip), %rbx
.LEHB20:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_@PLT
.LEHE20:
	movq	%rbx, %rsi
	movq	%r15, %rdi
.LEHB21:
	call	_Z6read_YNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi
.LEHE21:
	movq	%r15, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%r14, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%r13, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L203
	jmp	.L212
.L207:
	endbr64
	jmp	.L214
.L209:
	endbr64
	jmp	.L214
.L210:
	endbr64
	jmp	.L214
.L211:
	endbr64
.L214:
	movq	%rax, %rbx
.L198:
	movq	%r15, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L195
.L208:
	endbr64
	movq	%rax, %rbx
.L195:
	movq	%r14, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L199
.L206:
	endbr64
	movq	%rax, %rbx
.L199:
	movq	%r13, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L200
.L205:
	endbr64
	movq	%rax, %rbx
.L200:
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L201
.L204:
	endbr64
	movq	%rax, %rbx
.L201:
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L212
	movq	%rbx, %rdi
.LEHB22:
	call	_Unwind_Resume@PLT
.LEHE22:
.L212:
	call	__stack_chk_fail@PLT
.L203:
	addq	$184, %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
.LFE4924:
	.section	.gcc_except_table
.LLSDA4924:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4924-.LLSDACSB4924
.LLSDACSB4924:
	.uleb128 .LEHB10-.LFB4924
	.uleb128 .LEHE10-.LEHB10
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB11-.LFB4924
	.uleb128 .LEHE11-.LEHB11
	.uleb128 .L204-.LFB4924
	.uleb128 0
	.uleb128 .LEHB12-.LFB4924
	.uleb128 .LEHE12-.LEHB12
	.uleb128 .L205-.LFB4924
	.uleb128 0
	.uleb128 .LEHB13-.LFB4924
	.uleb128 .LEHE13-.LEHB13
	.uleb128 .L206-.LFB4924
	.uleb128 0
	.uleb128 .LEHB14-.LFB4924
	.uleb128 .LEHE14-.LEHB14
	.uleb128 .L208-.LFB4924
	.uleb128 0
	.uleb128 .LEHB15-.LFB4924
	.uleb128 .LEHE15-.LEHB15
	.uleb128 .L207-.LFB4924
	.uleb128 0
	.uleb128 .LEHB16-.LFB4924
	.uleb128 .LEHE16-.LEHB16
	.uleb128 .L208-.LFB4924
	.uleb128 0
	.uleb128 .LEHB17-.LFB4924
	.uleb128 .LEHE17-.LEHB17
	.uleb128 .L209-.LFB4924
	.uleb128 0
	.uleb128 .LEHB18-.LFB4924
	.uleb128 .LEHE18-.LEHB18
	.uleb128 .L208-.LFB4924
	.uleb128 0
	.uleb128 .LEHB19-.LFB4924
	.uleb128 .LEHE19-.LEHB19
	.uleb128 .L210-.LFB4924
	.uleb128 0
	.uleb128 .LEHB20-.LFB4924
	.uleb128 .LEHE20-.LEHB20
	.uleb128 .L208-.LFB4924
	.uleb128 0
	.uleb128 .LEHB21-.LFB4924
	.uleb128 .LEHE21-.LEHB21
	.uleb128 .L211-.LFB4924
	.uleb128 0
	.uleb128 .LEHB22-.LFB4924
	.uleb128 .LEHE22-.LEHB22
	.uleb128 0
	.uleb128 0
.LLSDACSE4924:
	.text
	.size	_Z9read_datav, .-_Z9read_datav
	.section	.text._ZSt18generate_canonicalIdLm53ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_,"axG",@progbits,_ZSt18generate_canonicalIdLm53ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_,comdat
	.weak	_ZSt18generate_canonicalIdLm53ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_
	.type	_ZSt18generate_canonicalIdLm53ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_, @function
_ZSt18generate_canonicalIdLm53ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_:
.LFB5700:
	.cfi_startproc
	endbr64
	imulq	$16807, (%rdi), %rax
	movl	$2147483647, %ecx
	xorl	%edx, %edx
	divq	%rcx
	movq	%rdx, %rax
	decq	%rax
	js	.L216
	cvtsi2sdq	%rax, %xmm0
	jmp	.L217
.L216:
	movq	%rax, %rcx
	andl	$1, %eax
	shrq	%rcx
	orq	%rax, %rcx
	cvtsi2sdq	%rcx, %xmm0
	addsd	%xmm0, %xmm0
.L217:
	imulq	$16807, %rdx, %rax
	movl	$2147483647, %ecx
	xorps	%xmm1, %xmm1
	xorl	%edx, %edx
	addsd	%xmm1, %xmm0
	divq	%rcx
	movq	%rdx, (%rdi)
	decq	%rdx
	js	.L218
	cvtsi2sdq	%rdx, %xmm1
	jmp	.L219
.L218:
	movq	%rdx, %rax
	andl	$1, %edx
	shrq	%rax
	orq	%rdx, %rax
	cvtsi2sdq	%rax, %xmm1
	addsd	%xmm1, %xmm1
.L219:
	mulsd	.LC12(%rip), %xmm1
	addsd	%xmm1, %xmm0
	divsd	.LC13(%rip), %xmm0
	comisd	.LC1(%rip), %xmm0
	jb	.L215
	movsd	.LC11(%rip), %xmm0
.L215:
	ret
	.cfi_endproc
.LFE5700:
	.size	_ZSt18generate_canonicalIdLm53ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_, .-_ZSt18generate_canonicalIdLm53ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_
	.text
	.globl	_Z13initialize_Wbv
	.type	_Z13initialize_Wbv, @function
_Z13initialize_Wbv:
.LFB4925:
	.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
	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	$184, %rsp
	.cfi_def_cfa_offset 240
	movslq	size_W1(%rip), %rdx
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	0(,%rdx,8), %rcx
	movl	%edx, (%rsp)
	movq	%rcx, %rdi
	movq	%rdx, 152(%rsp)
	movq	%rcx, 144(%rsp)
	call	malloc@PLT
	movslq	size_b1(%rip), %r11
	movq	%rax, W1(%rip)
	movq	%rax, %r13
	leaq	0(,%r11,8), %rax
	movl	%r11d, 4(%rsp)
	movq	%rax, %rdi
	movq	%r11, 136(%rsp)
	movq	%rax, 8(%rsp)
	call	malloc@PLT
	movslq	size_W2(%rip), %r10
	movq	%rax, b1(%rip)
	movq	%rax, %rbp
	leaq	0(,%r10,8), %rax
	movl	%r10d, 24(%rsp)
	movq	%rax, %rdi
	movq	%r10, 128(%rsp)
	movq	%rax, 16(%rsp)
	call	malloc@PLT
	movq	%rax, W2(%rip)
	movq	%rax, %r12
	movslq	size_b2(%rip), %rax
	movl	%eax, 28(%rsp)
	movq	%rax, 32(%rsp)
	salq	$3, %rax
	movq	%rax, %rdi
	movq	%rax, 40(%rsp)
	call	malloc@PLT
	movq	%rax, b2(%rip)
	movq	%rax, %rbx
	movslq	size_dW1(%rip), %rax
	movq	%rax, 48(%rsp)
	salq	$3, %rax
	movq	%rax, %rdi
	movq	%rax, 56(%rsp)
	call	malloc@PLT
	movq	%rax, 96(%rsp)
	movq	%rax, dW1(%rip)
	movslq	size_db1(%rip), %rax
	movq	%rax, 64(%rsp)
	salq	$3, %rax
	movq	%rax, %rdi
	movq	%rax, 72(%rsp)
	call	malloc@PLT
	movslq	size_dW2(%rip), %r9
	movq	%rax, 104(%rsp)
	movq	%rax, db1(%rip)
	leaq	0(,%r9,8), %rax
	movq	%rax, %rdi
	movq	%r9, 120(%rsp)
	movq	%rax, 80(%rsp)
	call	malloc@PLT
	movslq	size_db2(%rip), %r8
	movq	%rax, dW2(%rip)
	movq	%rax, %r15
	leaq	0(,%r8,8), %rax
	movq	%r8, 112(%rsp)
	movq	%rax, %rdi
	movq	%rax, 88(%rsp)
	call	malloc@PLT
	movq	144(%rsp), %rcx
	xorl	%esi, %esi
	movq	%r13, %rdi
	movq	152(%rsp), %rdx
	movq	%rax, %r14
	movq	%rax, db2(%rip)
	call	__memset_chk@PLT
	movq	8(%rsp), %rcx
	xorl	%esi, %esi
	movq	%rbp, %rdi
	movq	136(%rsp), %rdx
	call	__memset_chk@PLT
	movq	16(%rsp), %rcx
	xorl	%esi, %esi
	movq	%r12, %rdi
	movq	128(%rsp), %rdx
	call	__memset_chk@PLT
	movq	40(%rsp), %rcx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	movq	32(%rsp), %rdx
	call	__memset_chk@PLT
	movq	56(%rsp), %rcx
	movq	48(%rsp), %rdx
	xorl	%esi, %esi
	movq	96(%rsp), %rdi
	call	__memset_chk@PLT
	movq	72(%rsp), %rcx
	movq	64(%rsp), %rdx
	xorl	%esi, %esi
	movq	104(%rsp), %rdi
	call	__memset_chk@PLT
	movq	80(%rsp), %rcx
	xorl	%esi, %esi
	movq	%r15, %rdi
	movq	120(%rsp), %rdx
	call	__memset_chk@PLT
	movq	88(%rsp), %rcx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movq	112(%rsp), %rdx
	xorl	%r14d, %r14d
	call	__memset_chk@PLT
	movq	$1, 160(%rsp)
.L223:
	cmpl	%r14d, (%rsp)
	jle	.L233
	leaq	160(%rsp), %rdi
	call	_ZSt18generate_canonicalIdLm53ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_
	addsd	%xmm0, %xmm0
	subsd	.LC1(%rip), %xmm0
	movsd	%xmm0, 0(%r13,%r14,8)
	incq	%r14
	jmp	.L223
.L233:
	xorl	%r13d, %r13d
.L225:
	cmpl	%r13d, 24(%rsp)
	jle	.L234
	leaq	160(%rsp), %rdi
	call	_ZSt18generate_canonicalIdLm53ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_
	addsd	%xmm0, %xmm0
	subsd	.LC1(%rip), %xmm0
	movsd	%xmm0, (%r12,%r13,8)
	incq	%r13
	jmp	.L225
.L234:
	xorl	%eax, %eax
.L227:
	cmpl	%eax, 4(%rsp)
	jle	.L235
	movq	$0x000000000, 0(%rbp,%rax,8)
	incq	%rax
	jmp	.L227
.L235:
	xorl	%eax, %eax
.L229:
	cmpl	%eax, 28(%rsp)
	jle	.L236
	movq	$0x000000000, (%rbx,%rax,8)
	incq	%rax
	jmp	.L229
.L236:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L231
	call	__stack_chk_fail@PLT
.L231:
	addq	$184, %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
.LFE4925:
	.size	_Z13initialize_Wbv, .-_Z13initialize_Wbv
	.section	.rodata.str1.1
.LC14:
	.string	" Usage: first argument: block size \n"
.LC15:
	.string	" second argument: activation type \n"
.LC16:
	.string	"\n Too many arguments. \n"
.LC18:
	.string	"Elapsed Time: %.4e msec. \n"
.LC19:
	.string	"test"
.LC20:
	.string	"the %d epoch, the training accuracy is: %f, the test accuracy is: %f\n"
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB4929:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4929
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$80, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	cmpl	$2, %edi
	jg	.L238
	leaq	.LC14(%rip), %rsi
	movl	$2, %edi
.LEHB23:
	call	__printf_chk@PLT
	leaq	.LC15(%rip), %rsi
	jmp	.L252
.L238:
	cmpl	$3, %edi
	je	.L240
	leaq	.LC16(%rip), %rsi
.L252:
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	orl	$-1, %eax
	jmp	.L237
.L240:
	movq	8(%rsi), %rdi
	movq	%rsi, %rbx
	call	atoi@PLT
	movq	16(%rbx), %rdi
	movl	$20000, %ebx
	movl	%eax, %r12d
	call	atoi@PLT
	movl	%eax, %ebp
	call	_Z13initialize_Wbv
	call	_Z9read_datav
	leaq	24(%rsp), %rdi
	movl	$0x00000000, 20(%rsp)
	call	cudaEventCreate@PLT
	leaq	32(%rsp), %rdi
	call	cudaEventCreate@PLT
	movq	24(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
.L242:
	movq	Y_trn(%rip), %rsi
	movq	X_trn(%rip), %rdi
	movl	%r12d, %ecx
	movl	%ebp, %edx
	call	_Z5trainPdPiii
	decl	%ebx
	jne	.L242
	movq	32(%rsp), %rdi
	xorl	%esi, %esi
	leaq	40(%rsp), %rbx
	leaq	19(%rsp), %r13
	call	cudaEventRecord@PLT
	movq	32(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	32(%rsp), %rdx
	movq	24(%rsp), %rsi
	leaq	20(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	leaq	.LC18(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	20(%rsp), %xmm0
	call	__printf_chk@PLT
	movq	%r13, %rdx
	leaq	.LC4(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE23:
	movl	%r12d, %r8d
	movl	%ebp, %ecx
	movq	%rbx, %rdx
	movq	Y_trn(%rip), %rsi
	movq	X_trn(%rip), %rdi
.LEHB24:
	call	_Z4testPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
.LEHE24:
	movq	%rbx, %rdi
	movq	%xmm0, %r14
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%r13, %rdx
	leaq	.LC19(%rip), %rsi
	movq	%rbx, %rdi
.LEHB25:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE25:
	movl	%r12d, %r8d
	movl	%ebp, %ecx
	movq	%rbx, %rdx
	movq	Y_tst(%rip), %rsi
	movq	X_tst(%rip), %rdi
.LEHB26:
	call	_Z4testPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
.LEHE26:
	movq	%rbx, %rdi
	movsd	%xmm0, 8(%rsp)
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movsd	8(%rsp), %xmm1
	movb	$2, %al
	movq	%r14, %xmm0
	movl	$20000, %edx
	leaq	.LC20(%rip), %rsi
	movl	$2, %edi
.LEHB27:
	call	__printf_chk@PLT
	xorl	%eax, %eax
	jmp	.L237
.L248:
	endbr64
	jmp	.L255
.L249:
	endbr64
.L255:
	movq	%rax, %rbp
.L245:
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L254
	movq	%rbp, %rdi
	call	_Unwind_Resume@PLT
.LEHE27:
.L237:
	movq	72(%rsp), %rdx
	subq	%fs:40, %rdx
	je	.L247
.L254:
	call	__stack_chk_fail@PLT
.L247:
	addq	$80, %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
.LFE4929:
	.section	.gcc_except_table
.LLSDA4929:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4929-.LLSDACSB4929
.LLSDACSB4929:
	.uleb128 .LEHB23-.LFB4929
	.uleb128 .LEHE23-.LEHB23
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB24-.LFB4929
	.uleb128 .LEHE24-.LEHB24
	.uleb128 .L248-.LFB4929
	.uleb128 0
	.uleb128 .LEHB25-.LFB4929
	.uleb128 .LEHE25-.LEHB25
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB26-.LFB4929
	.uleb128 .LEHE26-.LEHB26
	.uleb128 .L249-.LFB4929
	.uleb128 0
	.uleb128 .LEHB27-.LFB4929
	.uleb128 .LEHE27-.LEHB27
	.uleb128 0
	.uleb128 0
.LLSDACSE4929:
	.section	.text.startup
	.size	main, .-main
	.type	_GLOBAL__sub_I_size_train, @function
_GLOBAL__sub_I_size_train:
.LFB5742:
	.cfi_startproc
	endbr64
	movl	size_hidden(%rip), %eax
	movl	size_output(%rip), %edx
	movl	size_input(%rip), %esi
	movl	%eax, %ecx
	movl	%eax, size_b1(%rip)
	imull	%eax, %esi
	movl	%edx, size_b2(%rip)
	imull	%edx, %ecx
	movl	%eax, size_db1(%rip)
	movl	%edx, size_db2(%rip)
	movl	%esi, size_W1(%rip)
	movl	%ecx, size_W2(%rip)
	movl	%esi, size_dW1(%rip)
	movl	%ecx, size_dW2(%rip)
	ret
	.cfi_endproc
.LFE5742:
	.size	_GLOBAL__sub_I_size_train, .-_GLOBAL__sub_I_size_train
	.section	.init_array
	.align 8
	.quad	_GLOBAL__sub_I_size_train
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.globl	max_index
	.bss
	.align 8
	.type	max_index, @object
	.size	max_index, 8
max_index:
	.zero	8
	.globl	dA2
	.align 8
	.type	dA2, @object
	.size	dA2, 8
dA2:
	.zero	8
	.globl	dZ2
	.align 8
	.type	dZ2, @object
	.size	dZ2, 8
dZ2:
	.zero	8
	.globl	dA1
	.align 8
	.type	dA1, @object
	.size	dA1, 8
dA1:
	.zero	8
	.globl	dZ1
	.align 8
	.type	dZ1, @object
	.size	dZ1, 8
dZ1:
	.zero	8
	.globl	A2
	.align 8
	.type	A2, @object
	.size	A2, 8
A2:
	.zero	8
	.globl	Z2
	.align 8
	.type	Z2, @object
	.size	Z2, 8
Z2:
	.zero	8
	.globl	A1
	.align 8
	.type	A1, @object
	.size	A1, 8
A1:
	.zero	8
	.globl	Z1
	.align 8
	.type	Z1, @object
	.size	Z1, 8
Z1:
	.zero	8
	.globl	db2
	.align 8
	.type	db2, @object
	.size	db2, 8
db2:
	.zero	8
	.globl	dW2
	.align 8
	.type	dW2, @object
	.size	dW2, 8
dW2:
	.zero	8
	.globl	db1
	.align 8
	.type	db1, @object
	.size	db1, 8
db1:
	.zero	8
	.globl	dW1
	.align 8
	.type	dW1, @object
	.size	dW1, 8
dW1:
	.zero	8
	.globl	b2
	.align 8
	.type	b2, @object
	.size	b2, 8
b2:
	.zero	8
	.globl	W2
	.align 8
	.type	W2, @object
	.size	W2, 8
W2:
	.zero	8
	.globl	b1
	.align 8
	.type	b1, @object
	.size	b1, 8
b1:
	.zero	8
	.globl	W1
	.align 8
	.type	W1, @object
	.size	W1, 8
W1:
	.zero	8
	.globl	Y_tst
	.align 8
	.type	Y_tst, @object
	.size	Y_tst, 8
Y_tst:
	.zero	8
	.globl	Y_trn
	.align 8
	.type	Y_trn, @object
	.size	Y_trn, 8
Y_trn:
	.zero	8
	.globl	X_tst
	.align 8
	.type	X_tst, @object
	.size	X_tst, 8
X_tst:
	.zero	8
	.globl	X_trn
	.align 8
	.type	X_trn, @object
	.size	X_trn, 8
X_trn:
	.zero	8
	.globl	size_db2
	.align 4
	.type	size_db2, @object
	.size	size_db2, 4
size_db2:
	.zero	4
	.globl	size_dW2
	.align 4
	.type	size_dW2, @object
	.size	size_dW2, 4
size_dW2:
	.zero	4
	.globl	size_db1
	.align 4
	.type	size_db1, @object
	.size	size_db1, 4
size_db1:
	.zero	4
	.globl	size_dW1
	.align 4
	.type	size_dW1, @object
	.size	size_dW1, 4
size_dW1:
	.zero	4
	.globl	size_b2
	.align 4
	.type	size_b2, @object
	.size	size_b2, 4
size_b2:
	.zero	4
	.globl	size_W2
	.align 4
	.type	size_W2, @object
	.size	size_W2, 4
size_W2:
	.zero	4
	.globl	size_b1
	.align 4
	.type	size_b1, @object
	.size	size_b1, 4
size_b1:
	.zero	4
	.globl	size_W1
	.align 4
	.type	size_W1, @object
	.size	size_W1, 4
size_W1:
	.zero	4
	.globl	size_Ybatch
	.align 4
	.type	size_Ybatch, @object
	.size	size_Ybatch, 4
size_Ybatch:
	.zero	4
	.globl	size_Xbatch
	.align 4
	.type	size_Xbatch, @object
	.size	size_Xbatch, 4
size_Xbatch:
	.zero	4
	.globl	size_Y_tst
	.data
	.align 4
	.type	size_Y_tst, @object
	.size	size_Y_tst, 4
size_Y_tst:
	.long	414
	.globl	size_X_tst
	.align 4
	.type	size_X_tst, @object
	.size	size_X_tst, 4
size_X_tst:
	.long	81144
	.globl	size_Y_trn
	.align 4
	.type	size_Y_trn, @object
	.size	size_Y_trn, 4
size_Y_trn:
	.long	964
	.globl	size_X_trn
	.align 4
	.type	size_X_trn, @object
	.size	size_X_trn, 4
size_X_trn:
	.long	188944
	.globl	size_output
	.align 4
	.type	size_output, @object
	.size	size_output, 4
size_output:
	.long	2
	.globl	size_hidden
	.align 4
	.type	size_hidden, @object
	.size	size_hidden, 4
size_hidden:
	.long	20
	.globl	size_input
	.align 4
	.type	size_input, @object
	.size	size_input, 4
size_input:
	.long	196
	.globl	size_batch
	.bss
	.align 4
	.type	size_batch, @object
	.size	size_batch, 4
size_batch:
	.zero	4
	.globl	size_test
	.data
	.align 4
	.type	size_test, @object
	.size	size_test, 4
size_test:
	.long	414
	.globl	size_train
	.align 4
	.type	size_train, @object
	.size	size_train, 4
size_train:
	.long	964
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1072693248
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.section	.rodata.cst8
	.align 8
.LC5:
	.long	1202590843
	.long	1065646817
	.align 8
.LC11:
	.long	-1
	.long	1072693247
	.align 8
.LC12:
	.long	-8388608
	.long	1105199103
	.align 8
.LC13:
	.long	-16777216
	.long	1137704959
	.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:

/********************************************************************

sequential.cu the sequential version of NN 

Input: 
/usr/local/cuda-10.1/bin/nvcc -arch=compute_52 -o sequential.out sequential.cu
./sequential.out block_size activationtype     // block_size = 0; activationtype=1 means sigomid and 2 means ReLU

Output: 
elapsed_time - the elapsed time to perform the multiplication.
accuracy on training set and test set.

********************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <hip/hip_runtime.h>
#include <time.h>
#include <math.h>

#include <iostream>  
#include <string>  
#include <vector>  
#include <fstream>  
#include <sstream> 
#include<random> 
using namespace std; 


#define X_trn(x, y) X_trn[x * size_train + y] // 196 * 964
#define X_tst(x, y) X_tst[x * size_test + y]  // 196 * 414
#define Y_trn(x, y) Y_trn[x * size_train + y] // 1   * 964
#define Y_tst(x, y) Y_tst[x * size_test + y]  // 1   * 414
#define X(x, y) X[x * size_batch + y]  // 196 * 964
#define Y(x, y) Y[x * size_batch + y]  // 1   * 414


#define W1(x, y) W1[x * size_input + y]       // 20 * 196
#define b1(x, y) b1[x * 1 + y]                // 20 * 1
#define W2(x, y) W2[x * size_hidden + y]      // 2  * 20
#define b2(x, y) b2[x * 1 + y]                // 2  * 1

#define dW1(x, y) dW1[x * size_input + y]     // 20 * 196
#define db1(x, y) db1[x * 1 + y]              // 20 * 1
#define dW2(x, y) dW2[x * size_hidden + y]    // 2  * 20
#define db2(x, y) db2[x * 1 + y]              // 2  * 1

#define Z1(x, y) Z1[x * size_batch + y]       // 20 * 964
#define A1(x, y) A1[x * size_batch + y]       // 20 * 964
#define Z2(x, y) Z2[x * size_batch + y]       // 2  * 964
#define A2(x, y) A2[x * size_batch + y]       // 2  * 964

#define dZ1(x, y) dZ1[x * size_batch + y]     // 20 * 964
#define dA1(x, y) dA1[x * size_batch + y]     // 20 * 964
#define dZ2(x, y) dZ2[x * size_batch + y]     // 2  * 964
#define dA2(x, y) dA2[x * size_batch + y]     // 2  * 964


#define dev_X_trn(x, y) dev_X_trn[x * size_train + y] // 196 * 964
#define dev_X_tst(x, y) dev_X_tst[x * size_test + y]  // 196 * 414
#define dev_Y_trn(x, y) dev_Y_trn[x * size_train + y] // 1   * 964
#define dev_Y_tst(x, y) dev_Y_tst[x * size_test + y]  // 1   * 414
#define dev_X(x, y) dev_X[x * size_batch + y] // 196 * 964
#define dev_Y(x, y) dev_Y[x * size_batch + y]  // 1   * 414


#define dev_W1(x, y) dev_W1[x * size_input + y]       // 20 * 196
#define dev_b1(x, y) dev_b1[x * 1 + y]                // 20 * 1
#define dev_W2(x, y) dev_W2[x * size_hidden + y]      // 2  * 20
#define dev_b2(x, y) dev_b2[x * 1 + y]                // 2  * 1

#define dev_dW1(x, y) dev_dW1[x * size_input + y]     // 20 * 196
#define dev_db1(x, y) dev_db1[x * 1 + y]              // 20 * 1
#define dev_dW2(x, y) dev_dW2[x * size_hidden + y]    // 2  * 20
#define dev_db2(x, y) dev_db2[x * 1 + y]              // 2  * 1

#define dev_Z1(x, y) dev_Z1[x * size_batch + y]       // 20 * 964
#define dev_A1(x, y) dev_A1[x * size_batch + y]       // 20 * 964
#define dev_Z2(x, y) dev_Z2[x * size_batch + y]       // 2  * 964
#define dev_A2(x, y) dev_A2[x * size_batch + y]       // 2  * 964

#define dev_dZ1(x, y) dev_dZ1[x * size_batch + y]     // 20 * 964
#define dev_dA1(x, y) dev_dA1[x * size_batch + y]     // 20 * 964
#define dev_dZ2(x, y) dev_dZ2[x * size_batch + y]     // 2  * 964
#define dev_dA2(x, y) dev_dA2[x * size_batch + y]     // 2  * 964

#define max_index(x, y) max_index[y] // 1  * 964

int size_train  = 964;
int size_test   = 414;
int size_batch  = 0;

int size_input  = 196;
int size_hidden = 20;
int size_output = 2;

int size_X_trn = 196*964;
int size_Y_trn = 1*964;
int size_X_tst = 196*414;
int size_Y_tst = 1*414;
int size_Xbatch = 0;
int size_Ybatch = 0;


int size_W1 = size_hidden*size_input;
int size_b1 = size_hidden*1;
int size_W2 = size_output*size_hidden;
int size_b2 = size_output*1;

int size_dW1 = size_hidden*size_input;
int size_db1 = size_hidden*1;
int size_dW2 = size_output*size_hidden;
int size_db2 = size_output*1;

#define size_Z1 size_hidden*size_batch
#define size_A1 size_hidden*size_batch
#define size_Z2 size_output*size_batch
#define size_A2 size_output*size_batch

#define size_dZ1 size_hidden*size_batch
#define size_dA1 size_hidden*size_batch
#define size_dZ2 size_output*size_batch
#define size_dA2 size_output*size_batch

#define size_max_index 1*size_batch

double *X_trn, *X_tst;
int *Y_trn, *Y_tst;
double *W1, *b1, *W2, *b2;
double *dW1, *db1, *dW2, *db2;
double *Z1, *A1, *Z2, *A2;
double *dZ1, *dA1, *dZ2, *dA2;
int *max_index;



void HiddenLayer(double* dev_X, double* dev_W1, double* dev_b1, double* dev_A1, double* dev_Z1, int size_input, int size_batch, int acti_type, int max_row, int max_col)

{

  for(int i = 0; i < max_row; i++) {
    for(int j = 0; j < max_col; j++) {
      double partial = 0.0;
    	for (int k = 0; k < size_input; k++){
    		partial += dev_W1(i,k) * dev_X(k,j);
      }
    	dev_Z1(i,j) = partial + dev_b1(i,0);
	    // Sigmoid
    	if (acti_type == 1)
    		dev_A1(i,j) = 1 / (1 + exp(0 - dev_Z1(i,j)));
    	// ReLU
    	if (acti_type == 2) {
    		if (dev_Z1(i,j) < 0)
    			dev_A1(i,j) = 0;
    		if (dev_Z1(i,j) >= 0)
    			dev_A1(i,j) = dev_Z1(i,j);
    	}
    }
  }
}

void OutputLayer(double* dev_A1, double* dev_W2, double* dev_b2, double* dev_Z2, int size_hidden, int size_batch, int max_row, int max_col)

{

  for(int i = 0; i < max_row; i++) {
    for(int j = 0; j < max_col; j++) {
	    double partial = 0.0;
    	for (int k = 0; k < size_hidden; k++){
    		partial += dev_W2(i,k) * dev_A1(k,j);
      }
    	dev_Z2(i,j) = partial + dev_b2(i,0);
    }
  }
 
}

void Softmax(double* Z2, int row, int col, double* A2, int* max_index)
{

  int c, r;  
	double max = 0, sum = 0;
	for (c = 0; c < col; c++) {
    max = Z2(0, c);
    max_index[c] = 1;    
		for (r = 1; r < row; r++) {   
			if (Z2(r, c) > max){      
				max = Z2(r, c);        
        max_index[c] = 0;        
      }
		}
		sum = 0;
		for (r = 0; r < row; r++)
			sum += exp(Z2(r, c));
		for (r = 0; r < row; r++)
			A2(r, c) = exp(Z2(r, c)) / sum;
  }
  return;

}


double cross_entropy_loss(int* Y, double* A2, int col) 
{
  
  int c;
  double loss = 0;
  for(c = 0; c < col; c++) {
    loss += -log(A2(0, c)) * Y(0, c) - log(A2(1, c)) * (1-Y(0, c));
  }
  return loss/col;
  
}

/* init Z and A in the host */
void initialize_ZA(int size_batch) {

  Z1 = (double *) malloc(size_Z1*sizeof(double));   // 20*964
  A1 = (double *) malloc(size_A1*sizeof(double));   // 20*964
  Z2 = (double *) malloc(size_Z2*sizeof(double));   // 2*964
  A2 = (double *) malloc(size_A2*sizeof(double));   // 2*964

  dZ1 = (double *) malloc(size_dZ1*sizeof(double));  // 20*964
  dA1 = (double *) malloc(size_dA1*sizeof(double));  // 20*964
  dZ2 = (double *) malloc(size_dZ2*sizeof(double));  // 2*964
  dA2 = (double *) malloc(size_dA2*sizeof(double));  // 2*964
  
  max_index = (int *) malloc(size_max_index*sizeof(int));             // 1*964
    
  memset (Z1,0,  size_Z1);
  memset (A1,0,  size_A1);
  memset (Z2,0,  size_Z2);
  memset (A2,0,  size_A2);
  
  memset (dZ1,0, size_dZ1);
  memset (dA1,0, size_dA1);
  memset (dZ2,0, size_dZ2);
  memset (dA2,0, size_dA2);
  
  memset (max_index,0,size_max_index);

}

void forward(double* X, int* Y, string type, int acti_type,  int block_size){

  if(type == "train"){
    size_batch  = size_train;
    size_Xbatch = size_X_trn;
    size_Ybatch = size_Y_trn;        
  }
  else{
    size_batch = size_test;
    size_Xbatch = size_X_tst;
    size_Ybatch = size_Y_tst;    
  }

  // init Z and A in the host
  initialize_ZA(size_batch);

  // hidden layer and activation function to get Z1 and A1
  HiddenLayer(X, W1, b1, A1, Z1, size_input, size_batch, acti_type, size_hidden, size_batch); 

  // output layer to get Z2
  OutputLayer(A1, W2, b2, Z2, size_hidden, size_batch, size_output, size_batch);
 
  // softmax layer to get A2
  Softmax(Z2, size_output, size_batch, A2, max_index);

}


void Back_dZ2 (double* dev_A2, int* dev_Y_trn, double* dev_dZ2, int size_train, int size_batch, int max_row, int max_col)

{

  for(int i = 0; i < max_row; i++) {
    for(int j = 0; j < max_col; j++) {
    	// int c = threadIdx.x; // column of Z2
      dev_dZ2(0, j) = (dev_A2(0, j) - dev_Y_trn(0, j)) / size_train;
      dev_dZ2(1, j) = (dev_Y_trn(0, j) - dev_A2(0, j)) / size_train;
     }
  }

}

// dW1(20*196) = dZ1(20*964) * X(196*964)
// dW2(2*20) = dZ2(2*964) * A1(20*964)
void Back_dW (double* dev_A, double* dev_dZ, double* dev_dW, int size_batch, int W_col, int max_row, int max_col)

{  

  for(int i = 0; i < max_row; i++) {
    for(int j = 0; j < max_col; j++) {
      double tmp = 0.0;
    	for (int k = 0; k < size_batch; k++) {
    		tmp += dev_dZ[i*size_batch+k] * dev_A[j*size_batch+k];
      }
    	dev_dW[i*W_col+j] = tmp;
    }
  }

}

// db1(20*1) is from dZ1(20*964)
// db2(2*1) is from dZ1(2*964)
void Back_db(double* dZ, double* db, int row, int col, int size_batch)

{
  int r, c;
  for(r = 0; r < row; r++) {
    double tmp = 0;
    for(c = 0; c < col; c++) {
      tmp += dZ[r*size_batch+c];
    }
    db[r*1+0] = tmp;
  }
}
    
void Back_dA1 (double* dev_W2, double* dev_dZ2, double* dev_dA1, int size_batch, int size_hidden, int size_output, int max_row, int max_col)

{  
    
  // dA1(20*964) = dZ2(2*964) * W2(2*20)
  for(int i = 0; i < max_row; i++) {
    for(int j = 0; j < max_col; j++) { 
      double partial = 0.0;
    	for (int k = 0; k < size_output; k++) {
    		partial += dev_W2(k,i) * dev_dZ2(k,j);
      }
    	dev_dA1(i,j) = partial;
    }
  }

}


void Back_dZ1 (double* dev_dA1, double* dev_A1, double* dev_Z1, double* dev_dZ1, int size_batch, int acti_type, int max_row, int max_col)

{  

  for(int i = 0; i < max_row; i++) {
    for(int j = 0; j < max_col; j++) { 
      if(acti_type == 1){ // Sigmoid
          dev_dZ1(i, j) = dev_dA1(i, j) * dev_A1(i, j) * (1-dev_A1(i, j)); // dZ1 = dA1*A1*(1-A1)
      } 
      else if(acti_type == 2) { // ReLU
        if(dev_Z1(i, j) < 0) 
          dev_dZ1(i, j) = 0;
        else
          dev_dZ1(i, j) = dev_dA1(i, j); //dZ1 = dA1*Z1_mask
      }
    }
  }

}

void backprop(int acti_type, int block_size) { // type = 1 is Sigmoid

  // get dZ2
  Back_dZ2(A2, Y_trn, dZ2, size_train, size_train, 1, size_train);

  // get dw2
  Back_dW(A1, dZ2, dW2, size_train, size_hidden, size_output, size_hidden);


  // get db2
  Back_db(dZ2, db2, size_output, size_train, size_train);

  // get dA1
  Back_dA1(W2, dZ2, dA1, size_train, size_hidden, size_output, size_hidden, size_train);    


  // get dZ1
  Back_dZ1(dA1, A1, Z1, dZ1, size_train, acti_type, size_hidden, size_train);


  // get dW1
  Back_dW(X_trn, dZ1, dW1, size_train, size_input, size_hidden, size_input);

  // get b1
  Back_db(dZ1, db1, size_hidden, size_train, size_train);

}

void update_Wb(double* dev_dWb, double* dev_Wb, int col, double learn_rate, int max_row, int max_col)
{

  for(int i = 0; i < max_row; i++) {
    for(int j = 0; j < max_col; j++) { 
      dev_Wb[i*col+j] = dev_Wb[i*col+j] - learn_rate * dev_dWb[i*col+j];
    }
  }
  
}

void updateParameter(double learn_rate, int block_size)
{

  // update w1
  update_Wb(dW1, W1, size_input, learn_rate, size_hidden, size_input);

  // update b1
  update_Wb(db1, b1, 1, learn_rate, size_hidden, 1);

  
  // update w2
  update_Wb(dW2, W2, size_hidden, learn_rate, size_output, size_hidden);
  
  // update b2
  update_Wb(db2, b2, 1, learn_rate, size_output, 1);
 

}


void read_X(string data_path, double* array)
{  
  ifstream inFile(data_path);  
  string row;   
  int p;
  p = 0;
  string value;
  while (getline(inFile, row)){  
    stringstream col(row);    
    while (getline(col, value, ',')){
      array[p] = stod(value);      
      p++;
    }   
  }  
}


void read_Y(string data_path, int* array)
{  
  ifstream inFile(data_path);  
  string row;   
  int p;
  p = 0;
  string value;
  while (getline(inFile, row)){  
    stringstream col(row);    
    while (getline(col, value, ',')){
      array[p] = stod(value);      
      p++;
    }   
  }  
}

/* Set the value and reading data */
void read_data()
{

  X_trn = (double *) malloc(size_X_trn * sizeof(double));  // 196*964
  Y_trn = (int *)    malloc(size_Y_trn * sizeof(int));     // 1*964
  X_tst = (double *) malloc(size_X_tst * sizeof(double));  // 196*414
  Y_tst = (int *)    malloc(size_Y_tst * sizeof(int));     // 1*414
  
  
  string X_trn_path = "X_trn.csv"; // Defined the name of cvs file
  string Y_trn_path = "Y_trn.csv";
  string X_tst_path = "X_tst.csv";
  string Y_tst_path = "Y_tst.csv";
        
  read_X(X_trn_path, X_trn); //Execution 
  read_Y(Y_trn_path, Y_trn);  
  read_X(X_tst_path, X_tst);  
  read_Y(Y_tst_path, Y_tst);  

}

void initialize_Wb() {
  
  W1 = (double *) malloc(size_W1*sizeof(double));   // 20*196
  b1 = (double *) malloc(size_b1*sizeof(double));   // 20*1
  W2 = (double *) malloc(size_W2*sizeof(double));   // 2*20
  b2 = (double *) malloc(size_b2*sizeof(double));   // 2*1
  
  dW1 = (double *) malloc(size_dW1*sizeof(double)); // 20*196
  db1 = (double *) malloc(size_db1*sizeof(double)); // 20*1
  dW2 = (double *) malloc(size_dW2*sizeof(double)); // 2*20
  db2 = (double *) malloc(size_db2*sizeof(double)); // 2*1

  memset (W1,0.5,size_W1);
  memset (b1,0,  size_b1);
  memset (W2,0.5,size_W2);
  memset (b2,0,  size_b2);
  
  memset (dW1,0, size_dW1);
  memset (db1,0, size_db1);
  memset (dW2,0, size_dW2);
  memset (db2,0, size_db2);
  
	default_random_engine e;
	uniform_real_distribution<double> u(-1,1);
 
  for (int i = 0; i < size_W1; i++) {
    W1[i] = u(e);
  }  
  for (int i = 0; i < size_W2; i++) {
    W2[i] = u(e);
  }   
  for (int i = 0; i < size_b1; i++) {
    b1[i] = 0;
  } 
  for (int i = 0; i < size_b2; i++) {
    b2[i] = 0;
  } 
  
}

double accuracy(int* max_index, int* Y, int size_batch) 
{
  
  int i;
  double count = 0;
  for(i = 0; i < size_batch; i++) {
    if(Y(0, i) == max_index(0, i))
      count += 1;
  }  
  return count/double(size_batch);
  
}

double train(double* X_trn, int* Y_trn, int acti_type, int block_size) {

  forward(X_trn, Y_trn, "train", acti_type, block_size);
  backprop(acti_type, block_size); // 1 Sigmoid 2 ReLU 
  updateParameter(0.01, block_size);
  return cross_entropy_loss(Y_trn, A2, size_train);
  
}

double test(double* X, int* Y, string type, int acti_type, int block_size) {

  forward(X, Y, type, acti_type, block_size);
  if(type == "train")
    return accuracy(max_index, Y, size_train);
  else
    return accuracy(max_index, Y, size_test);
  
}

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

  int block_size;
  double loss;
  double acc_trn, acc_tst;
  int e;
  int epochs = 20000;
  int acti_type = 1;
   
  if ( argc < 3 ){
    printf(" Usage: first argument: block size \n");
    printf(" second argument: activation type \n");
    return -1;
  } else if ( argc > 3 ) {
    printf("\n Too many arguments. \n");
    return -1;
  } else {
    block_size = atoi(argv[1]);
    acti_type = atoi(argv[2]);
  }
  

  initialize_Wb();
  read_data();
  float elapsed_time = 0.0;
  hipEvent_t start, stop;
  hipEventCreate(&start);
  hipEventCreate(&stop);
  hipEventRecord(start);
  for(e = 0; e < epochs; e++) {
    loss = train(X_trn, Y_trn, acti_type, block_size);
    // printf("%f \n", loss);
    // printf("the %d epoch, the training loss is: %f \n", e, loss);
  }
  hipEventRecord(stop);
  hipEventSynchronize(stop);
  hipEventElapsedTime(&elapsed_time, start, stop);
  printf( "Elapsed Time: %.4e msec. \n", elapsed_time );
  
  acc_trn = test(X_trn, Y_trn, "train", acti_type, block_size);
  acc_tst = test(X_tst, Y_tst, "test", acti_type, block_size);
  printf("the %d epoch, the training accuracy is: %f, the test accuracy is: %f\n", e, acc_trn, acc_tst);
  
}


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

                                        # End of file scope inline assembly
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z11HiddenLayerPdS_S_S_S_iiiii
.LCPI0_0:
	.quad	0x3ff0000000000000              # double 1
	.text
	.globl	_Z11HiddenLayerPdS_S_S_S_iiiii
	.type	_Z11HiddenLayerPdS_S_S_S_iiiii,@function
_Z11HiddenLayerPdS_S_S_S_iiiii:         # @_Z11HiddenLayerPdS_S_S_S_iiiii
	.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	$88, %rsp
	.cfi_def_cfa_offset 144
	.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, 24(%rsp)                  # 8-byte Spill
	movl	160(%rsp), %eax
	testl	%eax, %eax
	jle	.LBB0_11
# %bb.1:                                # %.preheader59.lr.ph
	movq	%rsi, %r13
	movl	152(%rsp), %edi
	movslq	144(%rsp), %rsi
	movslq	%r9d, %r10
	movl	%eax, %eax
	movq	%rax, 32(%rsp)                  # 8-byte Spill
	movl	168(%rsp), %r11d
	movl	%r10d, %ebp
	shlq	$3, %r10
	movq	%r10, 40(%rsp)                  # 8-byte Spill
	movq	%rsi, 16(%rsp)                  # 8-byte Spill
	leaq	(,%rsi,8), %rbx
	xorl	%r10d, %r10d
	xorpd	%xmm2, %xmm2
	movl	%r9d, 12(%rsp)                  # 4-byte Spill
	movq	%r8, 64(%rsp)                   # 8-byte Spill
	movq	%rcx, 56(%rsp)                  # 8-byte Spill
	movq	%rdx, 48(%rsp)                  # 8-byte Spill
.LBB0_2:                                # %.preheader59
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB0_4 Depth 2
                                        #       Child Loop BB0_13 Depth 3
	cmpl	$0, 168(%rsp)
	jle	.LBB0_10
# %bb.3:                                # %.preheader.lr.ph
                                        #   in Loop: Header=BB0_2 Depth=1
	movq	%r10, %rax
	imulq	16(%rsp), %rax                  # 8-byte Folded Reload
	movq	%rax, 80(%rsp)                  # 8-byte Spill
	movq	24(%rsp), %r14                  # 8-byte Reload
	xorl	%r15d, %r15d
	movq	%r10, 72(%rsp)                  # 8-byte Spill
.LBB0_4:                                # %.preheader
                                        #   Parent Loop BB0_2 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB0_13 Depth 3
	xorpd	%xmm1, %xmm1
	testl	%r9d, %r9d
	jle	.LBB0_5
# %bb.12:                               # %.lr.ph.preheader
                                        #   in Loop: Header=BB0_4 Depth=2
	movq	%r14, %rax
	xorl	%esi, %esi
.LBB0_13:                               # %.lr.ph
                                        #   Parent Loop BB0_2 Depth=1
                                        #     Parent Loop BB0_4 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movsd	(%r13,%rsi,8), %xmm0            # xmm0 = mem[0],zero
	mulsd	(%rax), %xmm0
	addsd	%xmm0, %xmm1
	incq	%rsi
	addq	%rbx, %rax
	cmpq	%rsi, %rbp
	jne	.LBB0_13
.LBB0_5:                                # %._crit_edge
                                        #   in Loop: Header=BB0_4 Depth=2
	addsd	(%rdx,%r10,8), %xmm1
	movq	80(%rsp), %rax                  # 8-byte Reload
	leaq	(%r15,%rax), %r12
	movsd	%xmm1, (%r8,%r12,8)
	cmpl	$1, %edi
	je	.LBB0_14
# %bb.6:                                # %._crit_edge
                                        #   in Loop: Header=BB0_4 Depth=2
	cmpl	$2, %edi
	jne	.LBB0_16
# %bb.7:                                #   in Loop: Header=BB0_4 Depth=2
	ucomisd	%xmm1, %xmm2
	jbe	.LBB0_9
# %bb.8:                                #   in Loop: Header=BB0_4 Depth=2
	movq	$0, (%rcx,%r12,8)
	movsd	(%r8,%r12,8), %xmm1             # xmm1 = mem[0],zero
.LBB0_9:                                #   in Loop: Header=BB0_4 Depth=2
	ucomisd	%xmm2, %xmm1
	jae	.LBB0_15
	jmp	.LBB0_16
.LBB0_14:                               #   in Loop: Header=BB0_4 Depth=2
	xorpd	%xmm0, %xmm0
	subsd	%xmm1, %xmm0
	callq	exp
	xorpd	%xmm2, %xmm2
	movq	72(%rsp), %r10                  # 8-byte Reload
	movl	168(%rsp), %r11d
	movl	152(%rsp), %edi
	movq	48(%rsp), %rdx                  # 8-byte Reload
	movq	56(%rsp), %rcx                  # 8-byte Reload
	movq	64(%rsp), %r8                   # 8-byte Reload
	movl	12(%rsp), %r9d                  # 4-byte Reload
	movsd	.LCPI0_0(%rip), %xmm1           # xmm1 = mem[0],zero
	addsd	%xmm1, %xmm0
	divsd	%xmm0, %xmm1
.LBB0_15:                               # %.sink.split
                                        #   in Loop: Header=BB0_4 Depth=2
	movsd	%xmm1, (%rcx,%r12,8)
.LBB0_16:                               #   in Loop: Header=BB0_4 Depth=2
	incq	%r15
	addq	$8, %r14
	cmpq	%r11, %r15
	jne	.LBB0_4
.LBB0_10:                               # %._crit_edge63
                                        #   in Loop: Header=BB0_2 Depth=1
	incq	%r10
	addq	40(%rsp), %r13                  # 8-byte Folded Reload
	cmpq	32(%rsp), %r10                  # 8-byte Folded Reload
	jne	.LBB0_2
.LBB0_11:                               # %._crit_edge65
	addq	$88, %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_end0:
	.size	_Z11HiddenLayerPdS_S_S_S_iiiii, .Lfunc_end0-_Z11HiddenLayerPdS_S_S_S_iiiii
	.cfi_endproc
                                        # -- End function
	.globl	_Z11OutputLayerPdS_S_S_iiii     # -- Begin function _Z11OutputLayerPdS_S_S_iiii
	.type	_Z11OutputLayerPdS_S_S_iiii,@function
_Z11OutputLayerPdS_S_S_iiii:            # @_Z11OutputLayerPdS_S_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
	movq	%rcx, -8(%rsp)                  # 8-byte Spill
	movq	%rdi, -16(%rsp)                 # 8-byte Spill
	movl	56(%rsp), %eax
	testl	%eax, %eax
	jle	.LBB1_9
# %bb.1:                                # %.preheader28.lr.ph
	movslq	%r9d, %r9
	movslq	%r8d, %r10
	movl	%eax, %r11d
	movl	64(%rsp), %ebx
	movl	%r10d, %r14d
	shlq	$3, %r10
	leaq	(,%r9,8), %r15
	xorl	%r12d, %r12d
.LBB1_2:                                # %.preheader28
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB1_4 Depth 2
                                        #       Child Loop BB1_6 Depth 3
	cmpl	$0, 64(%rsp)
	jle	.LBB1_8
# %bb.3:                                # %.preheader.lr.ph
                                        #   in Loop: Header=BB1_2 Depth=1
	movq	%r12, %rax
	imulq	%r9, %rax
	movq	-8(%rsp), %rcx                  # 8-byte Reload
	leaq	(%rcx,%rax,8), %r13
	movq	-16(%rsp), %rdi                 # 8-byte Reload
	xorl	%eax, %eax
.LBB1_4:                                # %.preheader
                                        #   Parent Loop BB1_2 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB1_6 Depth 3
	xorpd	%xmm0, %xmm0
	testl	%r8d, %r8d
	jle	.LBB1_7
# %bb.5:                                # %.lr.ph.preheader
                                        #   in Loop: Header=BB1_4 Depth=2
	movq	%rdi, %rbp
	xorl	%ecx, %ecx
.LBB1_6:                                # %.lr.ph
                                        #   Parent Loop BB1_2 Depth=1
                                        #     Parent Loop BB1_4 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movsd	(%rsi,%rcx,8), %xmm1            # xmm1 = mem[0],zero
	mulsd	(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	incq	%rcx
	addq	%r15, %rbp
	cmpq	%rcx, %r14
	jne	.LBB1_6
.LBB1_7:                                # %._crit_edge
                                        #   in Loop: Header=BB1_4 Depth=2
	addsd	(%rdx,%r12,8), %xmm0
	movsd	%xmm0, (%r13,%rax,8)
	incq	%rax
	addq	$8, %rdi
	cmpq	%rbx, %rax
	jne	.LBB1_4
.LBB1_8:                                # %._crit_edge32
                                        #   in Loop: Header=BB1_2 Depth=1
	incq	%r12
	addq	%r10, %rsi
	cmpq	%r11, %r12
	jne	.LBB1_2
.LBB1_9:                                # %._crit_edge34
	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_end1:
	.size	_Z11OutputLayerPdS_S_S_iiii, .Lfunc_end1-_Z11OutputLayerPdS_S_S_iiii
	.cfi_endproc
                                        # -- End function
	.globl	_Z7SoftmaxPdiiS_Pi              # -- Begin function _Z7SoftmaxPdiiS_Pi
	.type	_Z7SoftmaxPdiiS_Pi,@function
_Z7SoftmaxPdiiS_Pi:                     # @_Z7SoftmaxPdiiS_Pi
	.cfi_startproc
# %bb.0:
	testl	%edx, %edx
	jle	.LBB2_15
# %bb.1:                                # %.lr.ph51
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%r8, %rbx
	movq	%rcx, %r14
	movl	%esi, %ebp
	movq	%rdi, %r15
	movl	%edx, %eax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	xorl	%r13d, %r13d
.LBB2_2:                                # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_4 Depth 2
                                        #     Child Loop BB2_9 Depth 2
                                        #     Child Loop BB2_12 Depth 2
	movsd	(%r15,%r13,8), %xmm0            # xmm0 = mem[0],zero
	movl	$1, (%rbx,%r13,4)
	cmpl	$2, %ebp
	jl	.LBB2_7
# %bb.3:                                # %.lr.ph.preheader
                                        #   in Loop: Header=BB2_2 Depth=1
	movl	size_batch(%rip), %ecx
	movl	$1, %eax
.LBB2_4:                                # %.lr.ph
                                        #   Parent Loop BB2_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movl	%ecx, %edx
	imull	%eax, %edx
	addl	%r13d, %edx
	movslq	%edx, %rdx
	movsd	(%r15,%rdx,8), %xmm1            # xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	jbe	.LBB2_6
# %bb.5:                                #   in Loop: Header=BB2_4 Depth=2
	movl	$0, (%rbx,%r13,4)
	movl	size_batch(%rip), %ecx
	movapd	%xmm1, %xmm0
.LBB2_6:                                #   in Loop: Header=BB2_4 Depth=2
	incl	%eax
	cmpl	%eax, %ebp
	jne	.LBB2_4
.LBB2_7:                                # %.preheader41
                                        #   in Loop: Header=BB2_2 Depth=1
	testl	%ebp, %ebp
	jle	.LBB2_13
# %bb.8:                                # %.lr.ph46.preheader
                                        #   in Loop: Header=BB2_2 Depth=1
	xorl	%r12d, %r12d
	xorpd	%xmm1, %xmm1
.LBB2_9:                                # %.lr.ph46
                                        #   Parent Loop BB2_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	%xmm1, 8(%rsp)                  # 8-byte Spill
	movl	size_batch(%rip), %eax
	imull	%r12d, %eax
	addl	%r13d, %eax
	cltq
	movsd	(%r15,%rax,8), %xmm0            # xmm0 = mem[0],zero
	callq	exp
	movsd	8(%rsp), %xmm1                  # 8-byte Reload
                                        # xmm1 = mem[0],zero
	addsd	%xmm0, %xmm1
	incl	%r12d
	cmpl	%r12d, %ebp
	jne	.LBB2_9
# %bb.10:                               # %.preheader
                                        #   in Loop: Header=BB2_2 Depth=1
	testl	%ebp, %ebp
	jle	.LBB2_13
# %bb.11:                               # %.lr.ph48.preheader
                                        #   in Loop: Header=BB2_2 Depth=1
	movl	size_batch(%rip), %eax
	xorl	%r12d, %r12d
.LBB2_12:                               # %.lr.ph48
                                        #   Parent Loop BB2_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	%xmm1, 8(%rsp)                  # 8-byte Spill
	imull	%r12d, %eax
	addl	%r13d, %eax
	cltq
	movsd	(%r15,%rax,8), %xmm0            # xmm0 = mem[0],zero
	callq	exp
	movsd	8(%rsp), %xmm1                  # 8-byte Reload
                                        # xmm1 = mem[0],zero
	divsd	%xmm1, %xmm0
	movl	size_batch(%rip), %eax
	movl	%eax, %ecx
	imull	%r12d, %ecx
	addl	%r13d, %ecx
	movslq	%ecx, %rcx
	movsd	%xmm0, (%r14,%rcx,8)
	incl	%r12d
	cmpl	%r12d, %ebp
	jne	.LBB2_12
.LBB2_13:                               # %._crit_edge
                                        #   in Loop: Header=BB2_2 Depth=1
	incq	%r13
	cmpq	16(%rsp), %r13                  # 8-byte Folded Reload
	jne	.LBB2_2
# %bb.14:
	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
	.cfi_restore %rbx
	.cfi_restore %r12
	.cfi_restore %r13
	.cfi_restore %r14
	.cfi_restore %r15
	.cfi_restore %rbp
.LBB2_15:                               # %._crit_edge52
	retq
.Lfunc_end2:
	.size	_Z7SoftmaxPdiiS_Pi, .Lfunc_end2-_Z7SoftmaxPdiiS_Pi
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0                          # -- Begin function _Z18cross_entropy_lossPiPdi
.LCPI3_0:
	.quad	0x8000000000000000              # double -0
	.quad	0x8000000000000000              # double -0
	.text
	.globl	_Z18cross_entropy_lossPiPdi
	.type	_Z18cross_entropy_lossPiPdi,@function
_Z18cross_entropy_lossPiPdi:            # @_Z18cross_entropy_lossPiPdi
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movl	%edx, %ebx
	testl	%edx, %edx
	jle	.LBB3_1
# %bb.2:                                # %.lr.ph.preheader
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	%ebx, %r12d
	xorpd	%xmm0, %xmm0
	xorl	%r13d, %r13d
.LBB3_3:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movsd	%xmm0, 8(%rsp)                  # 8-byte Spill
	movsd	(%r14,%r13,8), %xmm0            # xmm0 = mem[0],zero
	callq	log
	xorpd	.LCPI3_0(%rip), %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sdl	(%r15,%r13,4), %xmm1
	movslq	size_batch(%rip), %rax
	mulsd	%xmm0, %xmm1
	movsd	%xmm1, (%rsp)                   # 8-byte Spill
	addq	%r13, %rax
	movsd	(%r14,%rax,8), %xmm0            # xmm0 = mem[0],zero
	callq	log
	movl	$1, %eax
	subl	(%r15,%r13,4), %eax
	xorps	%xmm1, %xmm1
	cvtsi2sd	%eax, %xmm1
	mulsd	%xmm0, %xmm1
	movsd	(%rsp), %xmm2                   # 8-byte Reload
                                        # xmm2 = mem[0],zero
	subsd	%xmm1, %xmm2
	movsd	8(%rsp), %xmm0                  # 8-byte Reload
                                        # xmm0 = mem[0],zero
	addsd	%xmm2, %xmm0
	incq	%r13
	cmpq	%r13, %r12
	jne	.LBB3_3
	jmp	.LBB3_4
.LBB3_1:
	xorpd	%xmm0, %xmm0
.LBB3_4:                                # %._crit_edge
	xorps	%xmm1, %xmm1
	cvtsi2sd	%ebx, %xmm1
	divsd	%xmm1, %xmm0
	addq	$16, %rsp
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end3:
	.size	_Z18cross_entropy_lossPiPdi, .Lfunc_end3-_Z18cross_entropy_lossPiPdi
	.cfi_endproc
                                        # -- End function
	.globl	_Z13initialize_ZAi              # -- Begin function _Z13initialize_ZAi
	.type	_Z13initialize_ZAi,@function
_Z13initialize_ZAi:                     # @_Z13initialize_ZAi
	.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	$56, %rsp
	.cfi_def_cfa_offset 112
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movslq	size_hidden(%rip), %r14
	movslq	%edi, %rax
	imulq	%rax, %r14
	movq	%rax, %r12
	movq	%rax, (%rsp)                    # 8-byte Spill
	leaq	(,%r14,8), %rbx
	movq	%rbx, %rdi
	callq	malloc
	movq	%rax, 48(%rsp)                  # 8-byte Spill
	movq	%rax, Z1(%rip)
	movq	%rbx, %rdi
	callq	malloc
	movq	%rax, 40(%rsp)                  # 8-byte Spill
	movq	%rax, A1(%rip)
	movslq	size_output(%rip), %r15
	imulq	%r12, %r15
	leaq	(,%r15,8), %r12
	movq	%r12, %rdi
	callq	malloc
	movq	%rax, %rbp
	movq	%rax, Z2(%rip)
	movq	%r12, %rdi
	callq	malloc
	movq	%rax, 24(%rsp)                  # 8-byte Spill
	movq	%rax, A2(%rip)
	movq	%rbx, %rdi
	callq	malloc
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	movq	%rax, dZ1(%rip)
	movq	%rbx, %rdi
	callq	malloc
	movq	%rax, %r13
	movq	%rax, dA1(%rip)
	movq	%r12, %rdi
	callq	malloc
	movq	%rax, 8(%rsp)                   # 8-byte Spill
	movq	%rax, dZ2(%rip)
	movq	%r12, %rdi
	callq	malloc
	movq	%rax, 32(%rsp)                  # 8-byte Spill
	movq	%rax, dA2(%rip)
	movq	(%rsp), %r12                    # 8-byte Reload
	leaq	(,%r12,4), %rdi
	callq	malloc
	movq	%rax, %rbx
	movq	%rax, max_index(%rip)
	movq	48(%rsp), %rdi                  # 8-byte Reload
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	memset@PLT
	movq	40(%rsp), %rdi                  # 8-byte Reload
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	memset@PLT
	movq	%rbp, %rdi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	memset@PLT
	movq	24(%rsp), %rdi                  # 8-byte Reload
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	memset@PLT
	movq	16(%rsp), %rdi                  # 8-byte Reload
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	memset@PLT
	movq	%r13, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	memset@PLT
	movq	8(%rsp), %rdi                   # 8-byte Reload
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	memset@PLT
	movq	32(%rsp), %rdi                  # 8-byte Reload
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	memset@PLT
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movq	%r12, %rdx
	addq	$56, %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
	jmp	memset@PLT                      # TAILCALL
.Lfunc_end4:
	.size	_Z13initialize_ZAi, .Lfunc_end4-_Z13initialize_ZAi
	.cfi_endproc
                                        # -- End function
	.globl	_Z7forwardPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii # -- Begin function _Z7forwardPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
	.type	_Z7forwardPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii,@function
_Z7forwardPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii: # @_Z7forwardPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movl	%ecx, %ebx
	movq	%rdi, %r14
	movl	$size_Y_tst, %eax
	movl	$size_test, %esi
	movl	$size_X_tst, %ecx
	cmpq	$5, 8(%rdx)
	jne	.LBB5_3
# %bb.1:                                # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit
	movq	(%rdx), %rdx
	movl	$1767993972, %edi               # imm = 0x69617274
	xorl	(%rdx), %edi
	movzbl	4(%rdx), %edx
	xorl	$110, %edx
	orl	%edi, %edx
	jne	.LBB5_3
# %bb.2:                                # %.thread
	movl	$size_Y_trn, %eax
	movl	$size_train, %esi
	movl	$size_X_trn, %ecx
.LBB5_3:                                # %.thread12
	movl	(%rsi), %edi
	movl	%edi, size_batch(%rip)
	movl	(%rcx), %ecx
	movl	%ecx, size_Xbatch(%rip)
	movl	(%rax), %eax
	movl	%eax, size_Ybatch(%rip)
	callq	_Z13initialize_ZAi
	movq	W1(%rip), %rsi
	movq	b1(%rip), %rdx
	movq	A1(%rip), %rcx
	movq	Z1(%rip), %r8
	movl	size_input(%rip), %r9d
	movl	size_batch(%rip), %eax
	movl	size_hidden(%rip), %r10d
	movq	%r14, %rdi
	pushq	%rax
	.cfi_adjust_cfa_offset 8
	pushq	%r10
	.cfi_adjust_cfa_offset 8
	pushq	%rbx
	.cfi_adjust_cfa_offset 8
	pushq	%rax
	.cfi_adjust_cfa_offset 8
	callq	_Z11HiddenLayerPdS_S_S_S_iiiii
	addq	$32, %rsp
	.cfi_adjust_cfa_offset -32
	movq	A1(%rip), %rdi
	movq	W2(%rip), %rsi
	movq	b2(%rip), %rdx
	movq	Z2(%rip), %rcx
	movl	size_hidden(%rip), %r8d
	movl	size_batch(%rip), %r9d
	movl	size_output(%rip), %eax
	pushq	%r9
	.cfi_adjust_cfa_offset 8
	pushq	%rax
	.cfi_adjust_cfa_offset 8
	callq	_Z11OutputLayerPdS_S_S_iiii
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movq	Z2(%rip), %rdi
	movl	size_output(%rip), %esi
	movl	size_batch(%rip), %edx
	movq	A2(%rip), %rcx
	movq	max_index(%rip), %r8
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	jmp	_Z7SoftmaxPdiiS_Pi              # TAILCALL
.Lfunc_end5:
	.size	_Z7forwardPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii, .Lfunc_end5-_Z7forwardPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
	.cfi_endproc
                                        # -- End function
	.globl	_Z8Back_dZ2PdPiS_iiii           # -- Begin function _Z8Back_dZ2PdPiS_iiii
	.type	_Z8Back_dZ2PdPiS_iiii,@function
_Z8Back_dZ2PdPiS_iiii:                  # @_Z8Back_dZ2PdPiS_iiii
	.cfi_startproc
# %bb.0:
	testl	%r9d, %r9d
	jle	.LBB6_6
# %bb.1:                                # %.preheader.lr.ph
	movl	8(%rsp), %eax
	cvtsi2sd	%ecx, %xmm0
	movslq	%r8d, %r8
	movl	%eax, %ecx
	leaq	(%rdx,%r8,8), %r8
	xorl	%r10d, %r10d
.LBB6_2:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB6_4 Depth 2
	testl	%eax, %eax
	jle	.LBB6_5
# %bb.3:                                # %.lr.ph.preheader
                                        #   in Loop: Header=BB6_2 Depth=1
	xorl	%r11d, %r11d
.LBB6_4:                                # %.lr.ph
                                        #   Parent Loop BB6_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%rdi,%r11,8), %xmm1            # xmm1 = mem[0],zero
	xorps	%xmm2, %xmm2
	cvtsi2sdl	(%rsi,%r11,4), %xmm2
	subsd	%xmm2, %xmm1
	divsd	%xmm0, %xmm1
	movsd	%xmm1, (%rdx,%r11,8)
	subsd	(%rdi,%r11,8), %xmm2
	divsd	%xmm0, %xmm2
	movsd	%xmm2, (%r8,%r11,8)
	incq	%r11
	cmpq	%r11, %rcx
	jne	.LBB6_4
.LBB6_5:                                # %._crit_edge
                                        #   in Loop: Header=BB6_2 Depth=1
	incl	%r10d
	cmpl	%r9d, %r10d
	jne	.LBB6_2
.LBB6_6:                                # %._crit_edge28
	retq
.Lfunc_end6:
	.size	_Z8Back_dZ2PdPiS_iiii, .Lfunc_end6-_Z8Back_dZ2PdPiS_iiii
	.cfi_endproc
                                        # -- End function
	.globl	_Z7Back_dWPdS_S_iiii            # -- Begin function _Z7Back_dWPdS_S_iiii
	.type	_Z7Back_dWPdS_S_iiii,@function
_Z7Back_dWPdS_S_iiii:                   # @_Z7Back_dWPdS_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
	movq	%rdx, -8(%rsp)                  # 8-byte Spill
	testl	%r9d, %r9d
	jle	.LBB7_7
# %bb.1:                                # %.preheader26.lr.ph
	movslq	%r8d, %rdx
	movl	%r9d, %r9d
	movl	56(%rsp), %r10d
	movl	%ecx, %r11d
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
.LBB7_2:                                # %.preheader26
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB7_4 Depth 2
                                        #       Child Loop BB7_9 Depth 3
	cmpl	$0, 56(%rsp)
	jle	.LBB7_6
# %bb.3:                                # %.preheader.lr.ph
                                        #   in Loop: Header=BB7_2 Depth=1
	movl	%ebx, %eax
	leaq	(%rsi,%rax,8), %r15
	movq	%r14, %rax
	imulq	%rdx, %rax
	movq	-8(%rsp), %r8                   # 8-byte Reload
	leaq	(%r8,%rax,8), %r12
	xorl	%r13d, %r13d
	xorl	%ebp, %ebp
.LBB7_4:                                # %.preheader
                                        #   Parent Loop BB7_2 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB7_9 Depth 3
	testl	%ecx, %ecx
	jle	.LBB7_5
# %bb.8:                                # %.lr.ph
                                        #   in Loop: Header=BB7_4 Depth=2
	movl	%r13d, %eax
	leaq	(%rdi,%rax,8), %rax
	xorpd	%xmm0, %xmm0
	xorl	%r8d, %r8d
.LBB7_9:                                #   Parent Loop BB7_2 Depth=1
                                        #     Parent Loop BB7_4 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movsd	(%r15,%r8,8), %xmm1             # xmm1 = mem[0],zero
	mulsd	(%rax,%r8,8), %xmm1
	addsd	%xmm1, %xmm0
	incq	%r8
	cmpq	%r8, %r11
	jne	.LBB7_9
	jmp	.LBB7_10
.LBB7_5:                                #   in Loop: Header=BB7_4 Depth=2
	xorpd	%xmm0, %xmm0
.LBB7_10:                               # %._crit_edge
                                        #   in Loop: Header=BB7_4 Depth=2
	movsd	%xmm0, (%r12,%rbp,8)
	incq	%rbp
	addl	%ecx, %r13d
	cmpq	%r10, %rbp
	jne	.LBB7_4
.LBB7_6:                                # %._crit_edge30
                                        #   in Loop: Header=BB7_2 Depth=1
	incq	%r14
	addl	%ecx, %ebx
	cmpq	%r9, %r14
	jne	.LBB7_2
.LBB7_7:                                # %._crit_edge32
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end7:
	.size	_Z7Back_dWPdS_S_iiii, .Lfunc_end7-_Z7Back_dWPdS_S_iiii
	.cfi_endproc
                                        # -- End function
	.globl	_Z7Back_dbPdS_iii               # -- Begin function _Z7Back_dbPdS_iii
	.type	_Z7Back_dbPdS_iii,@function
_Z7Back_dbPdS_iii:                      # @_Z7Back_dbPdS_iii
	.cfi_startproc
# %bb.0:
	testl	%edx, %edx
	jle	.LBB8_6
# %bb.1:                                # %.preheader.lr.ph
	movslq	%r8d, %rax
	movl	%edx, %edx
	movl	%ecx, %r8d
	shlq	$3, %rax
	xorl	%r9d, %r9d
.LBB8_2:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB8_4 Depth 2
	xorpd	%xmm0, %xmm0
	testl	%ecx, %ecx
	jle	.LBB8_5
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB8_2 Depth=1
	xorl	%r10d, %r10d
.LBB8_4:                                #   Parent Loop BB8_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	addsd	(%rdi,%r10,8), %xmm0
	incq	%r10
	cmpq	%r10, %r8
	jne	.LBB8_4
.LBB8_5:                                # %._crit_edge
                                        #   in Loop: Header=BB8_2 Depth=1
	movsd	%xmm0, (%rsi,%r9,8)
	incq	%r9
	addq	%rax, %rdi
	cmpq	%rdx, %r9
	jne	.LBB8_2
.LBB8_6:                                # %._crit_edge18
	retq
.Lfunc_end8:
	.size	_Z7Back_dbPdS_iii, .Lfunc_end8-_Z7Back_dbPdS_iii
	.cfi_endproc
                                        # -- End function
	.globl	_Z8Back_dA1PdS_S_iiiii          # -- Begin function _Z8Back_dA1PdS_S_iiiii
	.type	_Z8Back_dA1PdS_S_iiiii,@function
_Z8Back_dA1PdS_S_iiiii:                 # @_Z8Back_dA1PdS_S_iiiii
	.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
	movq	%rdx, -8(%rsp)                  # 8-byte Spill
	movq	%rsi, -16(%rsp)                 # 8-byte Spill
	movl	56(%rsp), %eax
	testl	%eax, %eax
	jle	.LBB9_9
# %bb.1:                                # %.preheader25.lr.ph
	movq	%rdi, %r10
	movslq	%r8d, %r8
	movslq	%ecx, %rdx
	movl	%eax, %ecx
	movl	64(%rsp), %r11d
	movl	%r9d, %eax
	leaq	(,%rdx,8), %r14
	shlq	$3, %r8
	xorl	%r15d, %r15d
.LBB9_2:                                # %.preheader25
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB9_4 Depth 2
                                        #       Child Loop BB9_6 Depth 3
	cmpl	$0, 64(%rsp)
	jle	.LBB9_8
# %bb.3:                                # %.preheader.lr.ph
                                        #   in Loop: Header=BB9_2 Depth=1
	movq	%r15, %rsi
	imulq	%rdx, %rsi
	movq	-8(%rsp), %rdi                  # 8-byte Reload
	leaq	(%rdi,%rsi,8), %r12
	movq	-16(%rsp), %rsi                 # 8-byte Reload
	xorl	%ebp, %ebp
.LBB9_4:                                # %.preheader
                                        #   Parent Loop BB9_2 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB9_6 Depth 3
	xorpd	%xmm0, %xmm0
	testl	%r9d, %r9d
	jle	.LBB9_7
# %bb.5:                                # %.lr.ph.preheader
                                        #   in Loop: Header=BB9_4 Depth=2
	movq	%rax, %rbx
	movq	%r10, %rdi
	movq	%rsi, %r13
.LBB9_6:                                # %.lr.ph
                                        #   Parent Loop BB9_2 Depth=1
                                        #     Parent Loop BB9_4 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movsd	(%rdi), %xmm1                   # xmm1 = mem[0],zero
	mulsd	(%r13), %xmm1
	addsd	%xmm1, %xmm0
	addq	%r14, %r13
	addq	%r8, %rdi
	decq	%rbx
	jne	.LBB9_6
.LBB9_7:                                # %._crit_edge
                                        #   in Loop: Header=BB9_4 Depth=2
	movsd	%xmm0, (%r12,%rbp,8)
	incq	%rbp
	addq	$8, %rsi
	cmpq	%r11, %rbp
	jne	.LBB9_4
.LBB9_8:                                # %._crit_edge29
                                        #   in Loop: Header=BB9_2 Depth=1
	incq	%r15
	addq	$8, %r10
	cmpq	%rcx, %r15
	jne	.LBB9_2
.LBB9_9:                                # %._crit_edge31
	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_end9:
	.size	_Z8Back_dA1PdS_S_iiiii, .Lfunc_end9-_Z8Back_dA1PdS_S_iiiii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z8Back_dZ1PdS_S_S_iiii
.LCPI10_0:
	.quad	0x3ff0000000000000              # double 1
	.text
	.globl	_Z8Back_dZ1PdS_S_S_iiii
	.type	_Z8Back_dZ1PdS_S_S_iiii,@function
_Z8Back_dZ1PdS_S_S_iiii:                # @_Z8Back_dZ1PdS_S_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	56(%rsp), %eax
	testl	%eax, %eax
	jle	.LBB10_8
# %bb.1:                                # %.preheader.lr.ph
	movslq	%r8d, %r8
	movl	%eax, %r10d
	movl	64(%rsp), %r11d
	xorl	%ebx, %ebx
	movsd	.LCPI10_0(%rip), %xmm0          # xmm0 = mem[0],zero
	xorl	%r14d, %r14d
.LBB10_2:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB10_4 Depth 2
	cmpl	$0, 64(%rsp)
	jle	.LBB10_7
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB10_2 Depth=1
	movq	%r14, %r15
	imulq	%r8, %r15
	movq	%r11, %r12
	movq	%rbx, %r13
	xorl	%ebp, %ebp
.LBB10_4:                               #   Parent Loop BB10_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	cmpl	$2, %r9d
	je	.LBB10_9
# %bb.5:                                #   in Loop: Header=BB10_4 Depth=2
	cmpl	$1, %r9d
	jne	.LBB10_12
# %bb.6:                                #   in Loop: Header=BB10_4 Depth=2
	leaq	(%r15,%rbp), %rax
	movsd	(%rsi,%r13,8), %xmm2            # xmm2 = mem[0],zero
	movsd	(%rdi,%r13,8), %xmm3            # xmm3 = mem[0],zero
	mulsd	%xmm2, %xmm3
	movapd	%xmm0, %xmm1
	subsd	%xmm2, %xmm1
	mulsd	%xmm3, %xmm1
	jmp	.LBB10_11
.LBB10_9:                               #   in Loop: Header=BB10_4 Depth=2
	xorpd	%xmm1, %xmm1
	ucomisd	(%rdx,%r13,8), %xmm1
	movq	%r13, %rax
	ja	.LBB10_11
# %bb.10:                               #   in Loop: Header=BB10_4 Depth=2
	movsd	(%rdi,%r13,8), %xmm1            # xmm1 = mem[0],zero
	movq	%r13, %rax
.LBB10_11:                              # %.sink.split
                                        #   in Loop: Header=BB10_4 Depth=2
	movsd	%xmm1, (%rcx,%rax,8)
.LBB10_12:                              #   in Loop: Header=BB10_4 Depth=2
	incq	%rbp
	incq	%r13
	decq	%r12
	jne	.LBB10_4
.LBB10_7:                               # %._crit_edge
                                        #   in Loop: Header=BB10_2 Depth=1
	incq	%r14
	addq	%r8, %rbx
	cmpq	%r10, %r14
	jne	.LBB10_2
.LBB10_8:                               # %._crit_edge43
	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_end10:
	.size	_Z8Back_dZ1PdS_S_S_iiii, .Lfunc_end10-_Z8Back_dZ1PdS_S_S_iiii
	.cfi_endproc
                                        # -- End function
	.globl	_Z8backpropii                   # -- Begin function _Z8backpropii
	.type	_Z8backpropii,@function
_Z8backpropii:                          # @_Z8backpropii
	.cfi_startproc
# %bb.0:                                # %.preheader.i
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movl	%edi, %ebx
	movq	dZ2(%rip), %rsi
	movslq	size_train(%rip), %rdi
	movl	%edi, %ecx
	testq	%rdi, %rdi
	jle	.LBB11_3
# %bb.1:                                # %.lr.ph.i.preheader
	movq	A2(%rip), %rax
	movq	Y_trn(%rip), %rdx
	cvtsi2sd	%edi, %xmm0
	leaq	(%rsi,%rdi,8), %rdi
	xorl	%r8d, %r8d
.LBB11_2:                               # %.lr.ph.i
                                        # =>This Inner Loop Header: Depth=1
	movsd	(%rax,%r8,8), %xmm1             # xmm1 = mem[0],zero
	xorps	%xmm2, %xmm2
	cvtsi2sdl	(%rdx,%r8,4), %xmm2
	subsd	%xmm2, %xmm1
	divsd	%xmm0, %xmm1
	movsd	%xmm1, (%rsi,%r8,8)
	subsd	(%rax,%r8,8), %xmm2
	divsd	%xmm0, %xmm2
	movsd	%xmm2, (%rdi,%r8,8)
	incq	%r8
	cmpq	%r8, %rcx
	jne	.LBB11_2
.LBB11_3:                               # %._crit_edge.i
	movq	A1(%rip), %rdi
	movq	dW2(%rip), %rdx
	movl	size_hidden(%rip), %r8d
	movl	size_output(%rip), %r9d
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
                                        # kill: def $ecx killed $ecx killed $rcx
	pushq	%r8
	.cfi_adjust_cfa_offset 8
	callq	_Z7Back_dWPdS_S_iiii
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movq	dZ2(%rip), %rsi
	movl	size_output(%rip), %r9d
	movslq	size_train(%rip), %rax
	movl	%eax, %ecx
	testl	%r9d, %r9d
	jle	.LBB11_9
# %bb.4:                                # %.preheader.lr.ph.i
	movq	db2(%rip), %rdx
	leaq	(,%rax,8), %rdi
	xorl	%r8d, %r8d
	movq	%rsi, %r10
.LBB11_5:                               # %.preheader.i2
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB11_7 Depth 2
	xorpd	%xmm0, %xmm0
	testl	%eax, %eax
	jle	.LBB11_8
# %bb.6:                                # %.lr.ph.i4
                                        #   in Loop: Header=BB11_5 Depth=1
	xorl	%r11d, %r11d
.LBB11_7:                               #   Parent Loop BB11_5 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	addsd	(%r10,%r11,8), %xmm0
	incq	%r11
	cmpq	%r11, %rcx
	jne	.LBB11_7
.LBB11_8:                               # %._crit_edge.i3
                                        #   in Loop: Header=BB11_5 Depth=1
	movsd	%xmm0, (%rdx,%r8,8)
	incq	%r8
	addq	%rdi, %r10
	cmpq	%r9, %r8
	jne	.LBB11_5
.LBB11_9:                               # %_Z7Back_dbPdS_iii.exit
	movq	W2(%rip), %rdi
	movq	dA1(%rip), %rdx
	movl	size_hidden(%rip), %r8d
                                        # kill: def $r9d killed $r9d killed $r9
	pushq	%rcx
	.cfi_adjust_cfa_offset 8
	pushq	%r8
	.cfi_adjust_cfa_offset 8
	callq	_Z8Back_dA1PdS_S_iiiii
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movq	dA1(%rip), %rdi
	movq	A1(%rip), %rsi
	movq	Z1(%rip), %rdx
	movq	dZ1(%rip), %rcx
	movl	size_train(%rip), %r8d
	movl	size_hidden(%rip), %eax
	movl	%ebx, %r9d
	pushq	%r8
	.cfi_adjust_cfa_offset 8
	pushq	%rax
	.cfi_adjust_cfa_offset 8
	callq	_Z8Back_dZ1PdS_S_S_iiii
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movq	X_trn(%rip), %rdi
	movq	dZ1(%rip), %rsi
	movq	dW1(%rip), %rdx
	movl	size_train(%rip), %ecx
	movl	size_input(%rip), %r8d
	movl	size_hidden(%rip), %r9d
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	pushq	%r8
	.cfi_adjust_cfa_offset 8
	callq	_Z7Back_dWPdS_S_iiii
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movl	size_hidden(%rip), %eax
	testl	%eax, %eax
	jle	.LBB11_15
# %bb.10:                               # %.preheader.lr.ph.i10
	movq	dZ1(%rip), %rcx
	movq	db1(%rip), %rdx
	movl	size_train(%rip), %esi
	movslq	%esi, %rdi
	shlq	$3, %rdi
	xorl	%r8d, %r8d
.LBB11_11:                              # %.preheader.i13
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB11_13 Depth 2
	xorpd	%xmm0, %xmm0
	testl	%esi, %esi
	jle	.LBB11_14
# %bb.12:                               # %.lr.ph.i19
                                        #   in Loop: Header=BB11_11 Depth=1
	xorl	%r9d, %r9d
.LBB11_13:                              #   Parent Loop BB11_11 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	addsd	(%rcx,%r9,8), %xmm0
	incq	%r9
	cmpq	%r9, %rsi
	jne	.LBB11_13
.LBB11_14:                              # %._crit_edge.i15
                                        #   in Loop: Header=BB11_11 Depth=1
	movsd	%xmm0, (%rdx,%r8,8)
	incq	%r8
	addq	%rdi, %rcx
	cmpq	%rax, %r8
	jne	.LBB11_11
.LBB11_15:                              # %_Z7Back_dbPdS_iii.exit26
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end11:
	.size	_Z8backpropii, .Lfunc_end11-_Z8backpropii
	.cfi_endproc
                                        # -- End function
	.globl	_Z9update_WbPdS_idii            # -- Begin function _Z9update_WbPdS_idii
	.type	_Z9update_WbPdS_idii,@function
_Z9update_WbPdS_idii:                   # @_Z9update_WbPdS_idii
	.cfi_startproc
# %bb.0:
	testl	%ecx, %ecx
	jle	.LBB12_6
# %bb.1:                                # %.preheader.lr.ph
	movslq	%edx, %rax
	movl	%ecx, %ecx
	movl	%r8d, %edx
	shlq	$3, %rax
	xorl	%r9d, %r9d
.LBB12_2:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB12_4 Depth 2
	testl	%r8d, %r8d
	jle	.LBB12_5
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB12_2 Depth=1
	xorl	%r10d, %r10d
.LBB12_4:                               #   Parent Loop BB12_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%rsi,%r10,8), %xmm1            # xmm1 = mem[0],zero
	movsd	(%rdi,%r10,8), %xmm2            # xmm2 = mem[0],zero
	mulsd	%xmm0, %xmm2
	subsd	%xmm2, %xmm1
	movsd	%xmm1, (%rsi,%r10,8)
	incq	%r10
	cmpq	%r10, %rdx
	jne	.LBB12_4
.LBB12_5:                               # %._crit_edge
                                        #   in Loop: Header=BB12_2 Depth=1
	incq	%r9
	addq	%rax, %rsi
	addq	%rax, %rdi
	cmpq	%rcx, %r9
	jne	.LBB12_2
.LBB12_6:                               # %._crit_edge21
	retq
.Lfunc_end12:
	.size	_Z9update_WbPdS_idii, .Lfunc_end12-_Z9update_WbPdS_idii
	.cfi_endproc
                                        # -- End function
	.globl	_Z15updateParameterdi           # -- Begin function _Z15updateParameterdi
	.type	_Z15updateParameterdi,@function
_Z15updateParameterdi:                  # @_Z15updateParameterdi
	.cfi_startproc
# %bb.0:
	movslq	size_hidden(%rip), %rax
	movl	%eax, %ecx
	testq	%rax, %rax
	jle	.LBB13_8
# %bb.1:                                # %.preheader.lr.ph.i
	movq	dW1(%rip), %rdx
	movq	W1(%rip), %rsi
	movl	size_input(%rip), %edi
	movslq	%edi, %r8
	shlq	$3, %r8
	xorl	%r9d, %r9d
.LBB13_2:                               # %.preheader.i
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB13_4 Depth 2
	testl	%edi, %edi
	jle	.LBB13_5
# %bb.3:                                # %.lr.ph.i
                                        #   in Loop: Header=BB13_2 Depth=1
	xorl	%r10d, %r10d
.LBB13_4:                               #   Parent Loop BB13_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%rsi,%r10,8), %xmm1            # xmm1 = mem[0],zero
	movsd	(%rdx,%r10,8), %xmm2            # xmm2 = mem[0],zero
	mulsd	%xmm0, %xmm2
	subsd	%xmm2, %xmm1
	movsd	%xmm1, (%rsi,%r10,8)
	incq	%r10
	cmpq	%r10, %rdi
	jne	.LBB13_4
.LBB13_5:                               # %._crit_edge.i
                                        #   in Loop: Header=BB13_2 Depth=1
	incq	%r9
	addq	%r8, %rdx
	addq	%r8, %rsi
	cmpq	%rcx, %r9
	jne	.LBB13_2
# %bb.6:                                # %_Z9update_WbPdS_idii.exit
	movq	db1(%rip), %rdx
	movq	b1(%rip), %rsi
	xorl	%edi, %edi
.LBB13_7:                               # %.preheader.i6
                                        # =>This Inner Loop Header: Depth=1
	movsd	(%rsi,%rdi,8), %xmm1            # xmm1 = mem[0],zero
	movsd	(%rdx,%rdi,8), %xmm2            # xmm2 = mem[0],zero
	mulsd	%xmm0, %xmm2
	subsd	%xmm2, %xmm1
	movsd	%xmm1, (%rsi,%rdi,8)
	incq	%rdi
	cmpq	%rdi, %rcx
	jne	.LBB13_7
.LBB13_8:                               # %_Z9update_WbPdS_idii.exit15
	movl	size_output(%rip), %edx
	testl	%edx, %edx
	jle	.LBB13_16
# %bb.9:                                # %.preheader.lr.ph.i16
	movq	dW2(%rip), %rsi
	movq	W2(%rip), %rdi
	movl	%eax, %r8d
	shlq	$3, %rax
	xorl	%r9d, %r9d
.LBB13_10:                              # %.preheader.i19
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB13_12 Depth 2
	testl	%ecx, %ecx
	jle	.LBB13_13
# %bb.11:                               # %.lr.ph.i24
                                        #   in Loop: Header=BB13_10 Depth=1
	xorl	%r10d, %r10d
.LBB13_12:                              #   Parent Loop BB13_10 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%rdi,%r10,8), %xmm1            # xmm1 = mem[0],zero
	movsd	(%rsi,%r10,8), %xmm2            # xmm2 = mem[0],zero
	mulsd	%xmm0, %xmm2
	subsd	%xmm2, %xmm1
	movsd	%xmm1, (%rdi,%r10,8)
	incq	%r10
	cmpq	%r10, %r8
	jne	.LBB13_12
.LBB13_13:                              # %._crit_edge.i21
                                        #   in Loop: Header=BB13_10 Depth=1
	incq	%r9
	addq	%rax, %rsi
	addq	%rax, %rdi
	cmpq	%rdx, %r9
	jne	.LBB13_10
# %bb.14:                               # %_Z9update_WbPdS_idii.exit28
	movq	db2(%rip), %rax
	movq	b2(%rip), %rcx
	xorl	%esi, %esi
.LBB13_15:                              # %.preheader.i31
                                        # =>This Inner Loop Header: Depth=1
	movsd	(%rcx,%rsi,8), %xmm1            # xmm1 = mem[0],zero
	movsd	(%rax,%rsi,8), %xmm2            # xmm2 = mem[0],zero
	mulsd	%xmm0, %xmm2
	subsd	%xmm2, %xmm1
	movsd	%xmm1, (%rcx,%rsi,8)
	incq	%rsi
	cmpq	%rsi, %rdx
	jne	.LBB13_15
.LBB13_16:                              # %_Z9update_WbPdS_idii.exit40
	retq
.Lfunc_end13:
	.size	_Z15updateParameterdi, .Lfunc_end13-_Z15updateParameterdi
	.cfi_endproc
                                        # -- End function
	.globl	_Z6read_XNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPd # -- Begin function _Z6read_XNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPd
	.type	_Z6read_XNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPd,@function
_Z6read_XNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPd: # @_Z6read_XNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPd
.Lfunc_begin0:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception0
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$984, %rsp                      # imm = 0x3D8
	.cfi_def_cfa_offset 1040
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, %r14
	movq	%rdi, %rsi
	leaq	464(%rsp), %r13
	movq	%r13, %rdi
	movl	$8, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode
	leaq	56(%rsp), %rax
	movq	%rax, -16(%rax)
	xorl	%ebx, %ebx
	movq	%rbx, -8(%rax)
	movb	%bl, (%rax)
	leaq	24(%rsp), %rax
	movq	%rax, -16(%rax)
	movq	%rbx, -8(%rax)
	movb	%bl, (%rax)
.LBB14_1:                               # =>This Loop Header: Depth=1
                                        #     Child Loop BB14_6 Depth 2
	movq	464(%rsp), %rax
	movq	-24(%rax), %rdi
	addq	%r13, %rdi
.Ltmp0:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp1:
# %bb.2:                                # %.noexc
                                        #   in Loop: Header=BB14_1 Depth=1
.Ltmp2:
	movsbl	%al, %edx
	movq	%r13, %rdi
	leaq	40(%rsp), %rsi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp3:
# %bb.3:                                #   in Loop: Header=BB14_1 Depth=1
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	testb	$5, 32(%rax,%rcx)
	jne	.LBB14_23
# %bb.4:                                #   in Loop: Header=BB14_1 Depth=1
.Ltmp5:
	leaq	72(%rsp), %rdi
	leaq	40(%rsp), %rsi
	movl	$24, %edx
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode
.Ltmp6:
# %bb.5:                                # %.preheader.preheader
                                        #   in Loop: Header=BB14_1 Depth=1
	movslq	%ebx, %rbx
.LBB14_6:                               # %.preheader
                                        #   Parent Loop BB14_1 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
.Ltmp8:
	leaq	72(%rsp), %rdi
	leaq	8(%rsp), %rsi
	movl	$44, %edx
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp9:
# %bb.7:                                #   in Loop: Header=BB14_6 Depth=2
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	testb	$5, 32(%rax,%rcx)
	jne	.LBB14_22
# %bb.8:                                #   in Loop: Header=BB14_6 Depth=2
	movq	8(%rsp), %r12
	callq	__errno_location
	movq	%rax, %r15
	movl	(%rax), %ebp
	movl	$0, (%rax)
	movq	%r12, %rdi
	movq	%rsp, %rsi
	callq	strtod
	cmpq	%r12, (%rsp)
	je	.LBB14_9
# %bb.13:                               #   in Loop: Header=BB14_6 Depth=2
	movl	(%r15), %eax
	testl	%eax, %eax
	je	.LBB14_17
# %bb.14:                               #   in Loop: Header=BB14_6 Depth=2
	cmpl	$34, %eax
	jne	.LBB14_18
	jmp	.LBB14_15
.LBB14_17:                              #   in Loop: Header=BB14_6 Depth=2
	movl	%ebp, (%r15)
.LBB14_18:                              #   in Loop: Header=BB14_6 Depth=2
	movsd	%xmm0, (%r14,%rbx,8)
	incq	%rbx
	jmp	.LBB14_6
.LBB14_22:                              #   in Loop: Header=BB14_1 Depth=1
	movl	$_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE, %esi
	leaq	72(%rsp), %rdi
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev
	leaq	200(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
	jmp	.LBB14_1
.LBB14_23:
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB14_25
# %bb.24:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB14_25:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	movq	40(%rsp), %rdi
	leaq	56(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB14_27
# %bb.26:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i12
	callq	_ZdlPv
.LBB14_27:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit14
	leaq	464(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	addq	$984, %rsp                      # imm = 0x3D8
	.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
.LBB14_9:
	.cfi_def_cfa_offset 1040
.Ltmp13:
	movl	$.L.str.18, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp14:
# %bb.10:
.LBB14_15:                              # %.critedge.i.i
.Ltmp11:
	movl	$.L.str.18, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp12:
# %bb.16:
.LBB14_19:
.Ltmp7:
	jmp	.LBB14_29
.LBB14_28:
.Ltmp4:
.LBB14_29:
	movq	%rax, %rbx
	jmp	.LBB14_30
.LBB14_20:
.Ltmp10:
	movq	%rax, %rbx
	jmp	.LBB14_21
.LBB14_11:
.Ltmp15:
	movq	%rax, %rbx
	cmpl	$0, (%r15)
	jne	.LBB14_21
# %bb.12:
	movl	%ebp, (%r15)
.LBB14_21:                              # %.body
	leaq	72(%rsp), %rdi
	movl	$_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE, %esi
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev
	leaq	200(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
.LBB14_30:
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB14_32
# %bb.31:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i15
	callq	_ZdlPv
.LBB14_32:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit17
	movq	40(%rsp), %rdi
	leaq	56(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB14_34
# %bb.33:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i18
	callq	_ZdlPv
.LBB14_34:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit20
	leaq	464(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end14:
	.size	_Z6read_XNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPd, .Lfunc_end14-_Z6read_XNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPd
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table14:
.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 .Ltmp3-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp3
	.uleb128 .Ltmp4-.Lfunc_begin0           #     jumps to .Ltmp4
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp5-.Lfunc_begin0           # >> Call Site 3 <<
	.uleb128 .Ltmp6-.Ltmp5                  #   Call between .Ltmp5 and .Ltmp6
	.uleb128 .Ltmp7-.Lfunc_begin0           #     jumps to .Ltmp7
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp8-.Lfunc_begin0           # >> Call Site 4 <<
	.uleb128 .Ltmp9-.Ltmp8                  #   Call between .Ltmp8 and .Ltmp9
	.uleb128 .Ltmp10-.Lfunc_begin0          #     jumps to .Ltmp10
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp13-.Lfunc_begin0          # >> Call Site 5 <<
	.uleb128 .Ltmp12-.Ltmp13                #   Call between .Ltmp13 and .Ltmp12
	.uleb128 .Ltmp15-.Lfunc_begin0          #     jumps to .Ltmp15
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp12-.Lfunc_begin0          # >> Call Site 6 <<
	.uleb128 .Lfunc_end14-.Ltmp12           #   Call between .Ltmp12 and .Lfunc_end14
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.text
	.globl	_Z6read_YNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi # -- Begin function _Z6read_YNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi
	.type	_Z6read_YNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi,@function
_Z6read_YNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi: # @_Z6read_YNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi
.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	$984, %rsp                      # imm = 0x3D8
	.cfi_def_cfa_offset 1040
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, %r14
	movq	%rdi, %rsi
	leaq	464(%rsp), %r13
	movq	%r13, %rdi
	movl	$8, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode
	leaq	56(%rsp), %rax
	movq	%rax, -16(%rax)
	xorl	%ebx, %ebx
	movq	%rbx, -8(%rax)
	movb	%bl, (%rax)
	leaq	24(%rsp), %rax
	movq	%rax, -16(%rax)
	movq	%rbx, -8(%rax)
	movb	%bl, (%rax)
.LBB15_1:                               # =>This Loop Header: Depth=1
                                        #     Child Loop BB15_6 Depth 2
	movq	464(%rsp), %rax
	movq	-24(%rax), %rdi
	addq	%r13, %rdi
.Ltmp16:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp17:
# %bb.2:                                # %.noexc
                                        #   in Loop: Header=BB15_1 Depth=1
.Ltmp18:
	movsbl	%al, %edx
	movq	%r13, %rdi
	leaq	40(%rsp), %rsi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp19:
# %bb.3:                                #   in Loop: Header=BB15_1 Depth=1
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	testb	$5, 32(%rax,%rcx)
	jne	.LBB15_23
# %bb.4:                                #   in Loop: Header=BB15_1 Depth=1
.Ltmp21:
	leaq	72(%rsp), %rdi
	leaq	40(%rsp), %rsi
	movl	$24, %edx
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode
.Ltmp22:
# %bb.5:                                # %.preheader.preheader
                                        #   in Loop: Header=BB15_1 Depth=1
	movslq	%ebx, %rbx
.LBB15_6:                               # %.preheader
                                        #   Parent Loop BB15_1 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
.Ltmp24:
	leaq	72(%rsp), %rdi
	leaq	8(%rsp), %rsi
	movl	$44, %edx
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp25:
# %bb.7:                                #   in Loop: Header=BB15_6 Depth=2
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	testb	$5, 32(%rax,%rcx)
	jne	.LBB15_22
# %bb.8:                                #   in Loop: Header=BB15_6 Depth=2
	movq	8(%rsp), %r12
	callq	__errno_location
	movq	%rax, %r15
	movl	(%rax), %ebp
	movl	$0, (%rax)
	movq	%r12, %rdi
	movq	%rsp, %rsi
	callq	strtod
	cmpq	%r12, (%rsp)
	je	.LBB15_9
# %bb.13:                               #   in Loop: Header=BB15_6 Depth=2
	movl	(%r15), %eax
	testl	%eax, %eax
	je	.LBB15_17
# %bb.14:                               #   in Loop: Header=BB15_6 Depth=2
	cmpl	$34, %eax
	jne	.LBB15_18
	jmp	.LBB15_15
.LBB15_17:                              #   in Loop: Header=BB15_6 Depth=2
	movl	%ebp, (%r15)
.LBB15_18:                              #   in Loop: Header=BB15_6 Depth=2
	cvttsd2si	%xmm0, %eax
	movl	%eax, (%r14,%rbx,4)
	incq	%rbx
	jmp	.LBB15_6
.LBB15_22:                              #   in Loop: Header=BB15_1 Depth=1
	movl	$_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE, %esi
	leaq	72(%rsp), %rdi
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev
	leaq	200(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
	jmp	.LBB15_1
.LBB15_23:
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB15_25
# %bb.24:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB15_25:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	movq	40(%rsp), %rdi
	leaq	56(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB15_27
# %bb.26:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i12
	callq	_ZdlPv
.LBB15_27:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit14
	leaq	464(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	addq	$984, %rsp                      # imm = 0x3D8
	.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
.LBB15_9:
	.cfi_def_cfa_offset 1040
.Ltmp29:
	movl	$.L.str.18, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp30:
# %bb.10:
.LBB15_15:                              # %.critedge.i.i
.Ltmp27:
	movl	$.L.str.18, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp28:
# %bb.16:
.LBB15_19:
.Ltmp23:
	jmp	.LBB15_29
.LBB15_28:
.Ltmp20:
.LBB15_29:
	movq	%rax, %rbx
	jmp	.LBB15_30
.LBB15_20:
.Ltmp26:
	movq	%rax, %rbx
	jmp	.LBB15_21
.LBB15_11:
.Ltmp31:
	movq	%rax, %rbx
	cmpl	$0, (%r15)
	jne	.LBB15_21
# %bb.12:
	movl	%ebp, (%r15)
.LBB15_21:                              # %.body
	leaq	72(%rsp), %rdi
	movl	$_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE, %esi
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev
	leaq	200(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
.LBB15_30:
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB15_32
# %bb.31:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i15
	callq	_ZdlPv
.LBB15_32:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit17
	movq	40(%rsp), %rdi
	leaq	56(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB15_34
# %bb.33:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i18
	callq	_ZdlPv
.LBB15_34:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit20
	leaq	464(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end15:
	.size	_Z6read_YNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi, .Lfunc_end15-_Z6read_YNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table15:
.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 .Ltmp16-.Lfunc_begin1          #   Call between .Lfunc_begin1 and .Ltmp16
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp16-.Lfunc_begin1          # >> Call Site 2 <<
	.uleb128 .Ltmp19-.Ltmp16                #   Call between .Ltmp16 and .Ltmp19
	.uleb128 .Ltmp20-.Lfunc_begin1          #     jumps to .Ltmp20
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp21-.Lfunc_begin1          # >> Call Site 3 <<
	.uleb128 .Ltmp22-.Ltmp21                #   Call between .Ltmp21 and .Ltmp22
	.uleb128 .Ltmp23-.Lfunc_begin1          #     jumps to .Ltmp23
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp24-.Lfunc_begin1          # >> Call Site 4 <<
	.uleb128 .Ltmp25-.Ltmp24                #   Call between .Ltmp24 and .Ltmp25
	.uleb128 .Ltmp26-.Lfunc_begin1          #     jumps to .Ltmp26
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp29-.Lfunc_begin1          # >> Call Site 5 <<
	.uleb128 .Ltmp28-.Ltmp29                #   Call between .Ltmp29 and .Ltmp28
	.uleb128 .Ltmp31-.Lfunc_begin1          #     jumps to .Ltmp31
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp28-.Lfunc_begin1          # >> Call Site 6 <<
	.uleb128 .Lfunc_end15-.Ltmp28           #   Call between .Ltmp28 and .Lfunc_end15
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end1:
	.p2align	2, 0x0
                                        # -- End function
	.text
	.globl	_Z9read_datav                   # -- Begin function _Z9read_datav
	.type	_Z9read_datav,@function
_Z9read_datav:                          # @_Z9read_datav
.Lfunc_begin2:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception2
# %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	$264, %rsp                      # imm = 0x108
	.cfi_def_cfa_offset 320
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movslq	size_X_trn(%rip), %rdi
	shlq	$3, %rdi
	callq	malloc
	movq	%rax, X_trn(%rip)
	movslq	size_Y_trn(%rip), %rdi
	shlq	$2, %rdi
	callq	malloc
	movq	%rax, Y_trn(%rip)
	movslq	size_X_tst(%rip), %rdi
	shlq	$3, %rdi
	callq	malloc
	movq	%rax, X_tst(%rip)
	movslq	size_Y_tst(%rip), %rdi
	shlq	$2, %rdi
	callq	malloc
	movq	%rax, Y_tst(%rip)
	leaq	120(%rsp), %r14
	movq	%r14, -16(%r14)
	leaq	104(%rsp), %rdi
	movl	$.L.str.8, %esi
	movl	$.L.str.8+9, %edx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	leaq	88(%rsp), %r15
	movq	%r15, -16(%r15)
.Ltmp32:
	leaq	72(%rsp), %rdi
	movl	$.L.str.9, %esi
	movl	$.L.str.9+9, %edx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
.Ltmp33:
# %bb.1:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit11
	leaq	56(%rsp), %r12
	movq	%r12, -16(%r12)
.Ltmp35:
	leaq	40(%rsp), %rdi
	movl	$.L.str.10, %esi
	movl	$.L.str.10+9, %edx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
.Ltmp36:
# %bb.2:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit12
	leaq	24(%rsp), %r13
	movq	%r13, -16(%r13)
.Ltmp38:
	leaq	8(%rsp), %rdi
	movl	$.L.str.11, %esi
	movl	$.L.str.11+9, %edx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
.Ltmp39:
# %bb.3:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit13
	leaq	248(%rsp), %rbp
	movq	%rbp, -16(%rbp)
	movq	104(%rsp), %rsi
	movq	112(%rsp), %rdx
	addq	%rsi, %rdx
.Ltmp41:
	leaq	232(%rsp), %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag
.Ltmp42:
# %bb.4:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_.exit
	movq	X_trn(%rip), %rsi
.Ltmp43:
	leaq	232(%rsp), %rdi
	callq	_Z6read_XNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPd
.Ltmp44:
# %bb.5:
	movq	232(%rsp), %rdi
	cmpq	%rbp, %rdi
	je	.LBB16_7
# %bb.6:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB16_7:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	leaq	216(%rsp), %rbp
	movq	%rbp, -16(%rbp)
	movq	72(%rsp), %rsi
	movq	80(%rsp), %rdx
	addq	%rsi, %rdx
.Ltmp46:
	leaq	200(%rsp), %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag
.Ltmp47:
# %bb.8:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_.exit14
	movq	Y_trn(%rip), %rsi
.Ltmp48:
	leaq	200(%rsp), %rdi
	callq	_Z6read_YNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi
.Ltmp49:
# %bb.9:
	movq	200(%rsp), %rdi
	cmpq	%rbp, %rdi
	je	.LBB16_11
# %bb.10:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i15
	callq	_ZdlPv
.LBB16_11:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit17
	leaq	184(%rsp), %rbp
	movq	%rbp, -16(%rbp)
	movq	40(%rsp), %rsi
	movq	48(%rsp), %rdx
	addq	%rsi, %rdx
.Ltmp51:
	leaq	168(%rsp), %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag
.Ltmp52:
# %bb.12:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_.exit18
	movq	X_tst(%rip), %rsi
.Ltmp53:
	leaq	168(%rsp), %rdi
	callq	_Z6read_XNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPd
.Ltmp54:
# %bb.13:
	movq	168(%rsp), %rdi
	cmpq	%rbp, %rdi
	je	.LBB16_15
# %bb.14:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i19
	callq	_ZdlPv
.LBB16_15:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit21
	leaq	152(%rsp), %rbp
	movq	%rbp, -16(%rbp)
	movq	8(%rsp), %rsi
	movq	16(%rsp), %rdx
	addq	%rsi, %rdx
.Ltmp56:
	leaq	136(%rsp), %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag
.Ltmp57:
# %bb.16:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_.exit22
	movq	Y_tst(%rip), %rsi
.Ltmp59:
	leaq	136(%rsp), %rdi
	callq	_Z6read_YNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi
.Ltmp60:
# %bb.17:
	movq	136(%rsp), %rdi
	cmpq	%rbp, %rdi
	je	.LBB16_19
# %bb.18:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i23
	callq	_ZdlPv
.LBB16_19:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit25
	movq	8(%rsp), %rdi
	cmpq	%r13, %rdi
	je	.LBB16_21
# %bb.20:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i26
	callq	_ZdlPv
.LBB16_21:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit28
	movq	40(%rsp), %rdi
	cmpq	%r12, %rdi
	je	.LBB16_23
# %bb.22:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i29
	callq	_ZdlPv
.LBB16_23:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit31
	movq	72(%rsp), %rdi
	cmpq	%r15, %rdi
	je	.LBB16_25
# %bb.24:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i32
	callq	_ZdlPv
.LBB16_25:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit34
	movq	104(%rsp), %rdi
	cmpq	%r14, %rdi
	je	.LBB16_27
# %bb.26:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i35
	callq	_ZdlPv
.LBB16_27:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit37
	addq	$264, %rsp                      # imm = 0x108
	.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
.LBB16_35:
	.cfi_def_cfa_offset 320
.Ltmp61:
	movq	%rax, %rbx
	movq	136(%rsp), %rdi
	jmp	.LBB16_36
.LBB16_34:
.Ltmp55:
	movq	%rax, %rbx
	movq	168(%rsp), %rdi
	jmp	.LBB16_36
.LBB16_33:
.Ltmp50:
	movq	%rax, %rbx
	movq	200(%rsp), %rdi
	jmp	.LBB16_36
.LBB16_32:
.Ltmp45:
	movq	%rax, %rbx
	movq	232(%rsp), %rdi
.LBB16_36:
	cmpq	%rbp, %rdi
	je	.LBB16_38
# %bb.37:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i47
	callq	_ZdlPv
	jmp	.LBB16_38
.LBB16_30:
.Ltmp40:
	movq	%rax, %rbx
	jmp	.LBB16_40
.LBB16_29:
.Ltmp37:
	movq	%rax, %rbx
	jmp	.LBB16_42
.LBB16_28:
.Ltmp34:
	movq	%rax, %rbx
	jmp	.LBB16_44
.LBB16_31:
.Ltmp58:
	movq	%rax, %rbx
.LBB16_38:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit40
	movq	8(%rsp), %rdi
	cmpq	%r13, %rdi
	je	.LBB16_40
# %bb.39:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i50
	callq	_ZdlPv
.LBB16_40:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit52
	movq	40(%rsp), %rdi
	cmpq	%r12, %rdi
	je	.LBB16_42
# %bb.41:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i53
	callq	_ZdlPv
.LBB16_42:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit55
	movq	72(%rsp), %rdi
	cmpq	%r15, %rdi
	je	.LBB16_44
# %bb.43:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i56
	callq	_ZdlPv
.LBB16_44:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit58
	movq	104(%rsp), %rdi
	cmpq	%r14, %rdi
	je	.LBB16_46
# %bb.45:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i59
	callq	_ZdlPv
.LBB16_46:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit61
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end16:
	.size	_Z9read_datav, .Lfunc_end16-_Z9read_datav
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table16:
.Lexception2:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end2-.Lcst_begin2
.Lcst_begin2:
	.uleb128 .Lfunc_begin2-.Lfunc_begin2    # >> Call Site 1 <<
	.uleb128 .Ltmp32-.Lfunc_begin2          #   Call between .Lfunc_begin2 and .Ltmp32
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp32-.Lfunc_begin2          # >> Call Site 2 <<
	.uleb128 .Ltmp33-.Ltmp32                #   Call between .Ltmp32 and .Ltmp33
	.uleb128 .Ltmp34-.Lfunc_begin2          #     jumps to .Ltmp34
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp35-.Lfunc_begin2          # >> Call Site 3 <<
	.uleb128 .Ltmp36-.Ltmp35                #   Call between .Ltmp35 and .Ltmp36
	.uleb128 .Ltmp37-.Lfunc_begin2          #     jumps to .Ltmp37
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp38-.Lfunc_begin2          # >> Call Site 4 <<
	.uleb128 .Ltmp39-.Ltmp38                #   Call between .Ltmp38 and .Ltmp39
	.uleb128 .Ltmp40-.Lfunc_begin2          #     jumps to .Ltmp40
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp41-.Lfunc_begin2          # >> Call Site 5 <<
	.uleb128 .Ltmp42-.Ltmp41                #   Call between .Ltmp41 and .Ltmp42
	.uleb128 .Ltmp58-.Lfunc_begin2          #     jumps to .Ltmp58
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp43-.Lfunc_begin2          # >> Call Site 6 <<
	.uleb128 .Ltmp44-.Ltmp43                #   Call between .Ltmp43 and .Ltmp44
	.uleb128 .Ltmp45-.Lfunc_begin2          #     jumps to .Ltmp45
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp46-.Lfunc_begin2          # >> Call Site 7 <<
	.uleb128 .Ltmp47-.Ltmp46                #   Call between .Ltmp46 and .Ltmp47
	.uleb128 .Ltmp58-.Lfunc_begin2          #     jumps to .Ltmp58
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp48-.Lfunc_begin2          # >> Call Site 8 <<
	.uleb128 .Ltmp49-.Ltmp48                #   Call between .Ltmp48 and .Ltmp49
	.uleb128 .Ltmp50-.Lfunc_begin2          #     jumps to .Ltmp50
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp51-.Lfunc_begin2          # >> Call Site 9 <<
	.uleb128 .Ltmp52-.Ltmp51                #   Call between .Ltmp51 and .Ltmp52
	.uleb128 .Ltmp58-.Lfunc_begin2          #     jumps to .Ltmp58
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp53-.Lfunc_begin2          # >> Call Site 10 <<
	.uleb128 .Ltmp54-.Ltmp53                #   Call between .Ltmp53 and .Ltmp54
	.uleb128 .Ltmp55-.Lfunc_begin2          #     jumps to .Ltmp55
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp56-.Lfunc_begin2          # >> Call Site 11 <<
	.uleb128 .Ltmp57-.Ltmp56                #   Call between .Ltmp56 and .Ltmp57
	.uleb128 .Ltmp58-.Lfunc_begin2          #     jumps to .Ltmp58
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp59-.Lfunc_begin2          # >> Call Site 12 <<
	.uleb128 .Ltmp60-.Ltmp59                #   Call between .Ltmp59 and .Ltmp60
	.uleb128 .Ltmp61-.Lfunc_begin2          #     jumps to .Ltmp61
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp60-.Lfunc_begin2          # >> Call Site 13 <<
	.uleb128 .Lfunc_end16-.Ltmp60           #   Call between .Ltmp60 and .Lfunc_end16
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end2:
	.p2align	2, 0x0
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z13initialize_Wbv
.LCPI17_0:
	.quad	0xbff0000000000000              # double -1
	.text
	.globl	_Z13initialize_Wbv
	.type	_Z13initialize_Wbv,@function
_Z13initialize_Wbv:                     # @_Z13initialize_Wbv
	.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	$104, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movslq	size_W1(%rip), %rax
	movq	%rax, 80(%rsp)                  # 8-byte Spill
	leaq	(,%rax,8), %rdi
	callq	malloc
	movq	%rax, %r13
	movq	%rax, W1(%rip)
	movslq	size_b1(%rip), %rax
	movq	%rax, 96(%rsp)                  # 8-byte Spill
	leaq	(,%rax,8), %rdi
	callq	malloc
	movq	%rax, 56(%rsp)                  # 8-byte Spill
	movq	%rax, b1(%rip)
	movl	size_W2(%rip), %eax
	movl	%eax, 12(%rsp)                  # 4-byte Spill
	cltq
	movq	%rax, 88(%rsp)                  # 8-byte Spill
	leaq	(,%rax,8), %rdi
	callq	malloc
	movq	%rax, 40(%rsp)                  # 8-byte Spill
	movq	%rax, W2(%rip)
	movslq	size_b2(%rip), %rax
	movq	%rax, 72(%rsp)                  # 8-byte Spill
	leaq	(,%rax,8), %rdi
	callq	malloc
	movq	%rax, 24(%rsp)                  # 8-byte Spill
	movq	%rax, b2(%rip)
	movslq	size_dW1(%rip), %rax
	movq	%rax, 64(%rsp)                  # 8-byte Spill
	leaq	(,%rax,8), %rdi
	callq	malloc
	movq	%rax, %rbx
	movq	%rax, dW1(%rip)
	movslq	size_db1(%rip), %rax
	movq	%rax, 48(%rsp)                  # 8-byte Spill
	leaq	(,%rax,8), %rdi
	callq	malloc
	movq	%rax, %r14
	movq	%rax, db1(%rip)
	movslq	size_dW2(%rip), %rax
	movq	%rax, 32(%rsp)                  # 8-byte Spill
	leaq	(,%rax,8), %rdi
	callq	malloc
	movq	%rax, %r15
	movq	%rax, dW2(%rip)
	movslq	size_db2(%rip), %rbp
	leaq	(,%rbp,8), %rdi
	callq	malloc
	movq	%rax, %r12
	movq	%rax, db2(%rip)
	movq	%r13, %rdi
	xorl	%esi, %esi
	movq	80(%rsp), %r13                  # 8-byte Reload
	movq	%r13, %rdx
	callq	memset@PLT
	movq	56(%rsp), %rdi                  # 8-byte Reload
	xorl	%esi, %esi
	movq	96(%rsp), %rdx                  # 8-byte Reload
	callq	memset@PLT
	movq	40(%rsp), %rdi                  # 8-byte Reload
	xorl	%esi, %esi
	movq	88(%rsp), %rdx                  # 8-byte Reload
	callq	memset@PLT
	movq	24(%rsp), %rdi                  # 8-byte Reload
	xorl	%esi, %esi
	movq	72(%rsp), %rdx                  # 8-byte Reload
	callq	memset@PLT
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movq	64(%rsp), %rdx                  # 8-byte Reload
	callq	memset@PLT
	movq	%r14, %rdi
	xorl	%esi, %esi
	movq	48(%rsp), %rdx                  # 8-byte Reload
	callq	memset@PLT
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	32(%rsp), %rdx                  # 8-byte Reload
	callq	memset@PLT
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	%rbp, %rdx
	callq	memset@PLT
	movl	12(%rsp), %eax                  # 4-byte Reload
	movq	$1, 16(%rsp)
	testq	%r13, %r13
	jle	.LBB17_4
# %bb.1:                                # %.lr.ph.preheader
	xorl	%r14d, %r14d
	leaq	16(%rsp), %rbx
.LBB17_2:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_ZSt18generate_canonicalIdLm53ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_
	addsd	%xmm0, %xmm0
	addsd	.LCPI17_0(%rip), %xmm0
	movq	W1(%rip), %rax
	movsd	%xmm0, (%rax,%r14,8)
	incq	%r14
	movslq	size_W1(%rip), %rax
	cmpq	%rax, %r14
	jl	.LBB17_2
# %bb.3:                                # %.preheader18.loopexit
	movl	size_W2(%rip), %eax
.LBB17_4:                               # %.preheader18
	testl	%eax, %eax
	jle	.LBB17_7
# %bb.5:                                # %.lr.ph21.preheader
	xorl	%r14d, %r14d
	leaq	16(%rsp), %rbx
.LBB17_6:                               # %.lr.ph21
                                        # =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_ZSt18generate_canonicalIdLm53ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_
	addsd	%xmm0, %xmm0
	addsd	.LCPI17_0(%rip), %xmm0
	movq	W2(%rip), %rax
	movsd	%xmm0, (%rax,%r14,8)
	incq	%r14
	movslq	size_W2(%rip), %rax
	cmpq	%rax, %r14
	jl	.LBB17_6
.LBB17_7:                               # %.preheader17
	movl	size_b1(%rip), %edx
	testl	%edx, %edx
	jle	.LBB17_9
# %bb.8:                                # %.lr.ph23
	movq	b1(%rip), %rdi
	shlq	$3, %rdx
	xorl	%esi, %esi
	callq	memset@PLT
.LBB17_9:                               # %.preheader
	movl	size_b2(%rip), %edx
	testl	%edx, %edx
	jle	.LBB17_11
# %bb.10:                               # %.lr.ph25
	movq	b2(%rip), %rdi
	shlq	$3, %rdx
	xorl	%esi, %esi
	callq	memset@PLT
.LBB17_11:                              # %._crit_edge
	addq	$104, %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_end17:
	.size	_Z13initialize_Wbv, .Lfunc_end17-_Z13initialize_Wbv
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z8accuracyPiS_i
.LCPI18_0:
	.quad	0x3ff0000000000000              # double 1
	.text
	.globl	_Z8accuracyPiS_i
	.type	_Z8accuracyPiS_i,@function
_Z8accuracyPiS_i:                       # @_Z8accuracyPiS_i
	.cfi_startproc
# %bb.0:
	testl	%edx, %edx
	jle	.LBB18_1
# %bb.3:                                # %.lr.ph.preheader
	movl	%edx, %eax
	xorpd	%xmm2, %xmm2
	xorl	%ecx, %ecx
	movsd	.LCPI18_0(%rip), %xmm1          # xmm1 = mem[0],zero
	movapd	%xmm2, %xmm0
.LBB18_4:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movl	(%rsi,%rcx,4), %r8d
	addsd	%xmm1, %xmm0
	cmpl	(%rdi,%rcx,4), %r8d
	je	.LBB18_6
# %bb.5:                                # %.lr.ph
                                        #   in Loop: Header=BB18_4 Depth=1
	movapd	%xmm2, %xmm0
.LBB18_6:                               # %.lr.ph
                                        #   in Loop: Header=BB18_4 Depth=1
	incq	%rcx
	movapd	%xmm0, %xmm2
	cmpq	%rcx, %rax
	jne	.LBB18_4
	jmp	.LBB18_2
.LBB18_1:
	xorpd	%xmm0, %xmm0
.LBB18_2:                               # %._crit_edge
	xorps	%xmm1, %xmm1
	cvtsi2sd	%edx, %xmm1
	divsd	%xmm1, %xmm0
	retq
.Lfunc_end18:
	.size	_Z8accuracyPiS_i, .Lfunc_end18-_Z8accuracyPiS_i
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z5trainPdPiii
.LCPI19_0:
	.quad	0x3f847ae147ae147b              # double 0.01
	.text
	.globl	_Z5trainPdPiii
	.type	_Z5trainPdPiii,@function
_Z5trainPdPiii:                         # @_Z5trainPdPiii
	.cfi_startproc
# %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	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%edx, %ebp
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	16(%rsp), %r12
	movq	%r12, -16(%r12)
	movq	%rsp, %r15
	movl	$.L.str, %esi
	movl	$.L.str+5, %edx
	movq	%r15, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	movq	%r14, %rdi
	movq	%r15, %rdx
	movl	%ebp, %ecx
	callq	_Z7forwardPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
	movq	(%r15), %rdi
	cmpq	%r12, %rdi
	je	.LBB19_2
# %bb.1:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB19_2:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	movl	%ebp, %edi
	callq	_Z8backpropii
	movsd	.LCPI19_0(%rip), %xmm0          # xmm0 = mem[0],zero
	callq	_Z15updateParameterdi
	movq	A2(%rip), %rsi
	movl	size_train(%rip), %edx
	movq	%rbx, %rdi
	callq	_Z18cross_entropy_lossPiPdi
	addq	$32, %rsp
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end19:
	.size	_Z5trainPdPiii, .Lfunc_end19-_Z5trainPdPiii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z4testPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
.LCPI20_0:
	.quad	0x3ff0000000000000              # double 1
	.text
	.globl	_Z4testPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
	.type	_Z4testPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii,@function
_Z4testPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii: # @_Z4testPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
	.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	$40, %rsp
	.cfi_def_cfa_offset 96
	.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	%ecx, %ebp
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	leaq	24(%rsp), %r13
	movq	%r13, -16(%r13)
	movq	(%rdx), %rsi
	movq	8(%rdx), %rdx
	addq	%rsi, %rdx
	leaq	8(%rsp), %r12
	movq	%r12, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag
	movq	%r15, %rdi
	movq	%r12, %rdx
	movl	%ebp, %ecx
	callq	_Z7forwardPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
	movq	(%r12), %rdi
	cmpq	%r13, %rdi
	je	.LBB20_2
# %bb.1:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB20_2:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	cmpq	$5, 8(%r14)
	jne	.LBB20_10
# %bb.3:                                # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit
	movq	(%r14), %rax
	movl	$1767993972, %ecx               # imm = 0x69617274
	xorl	(%rax), %ecx
	movzbl	4(%rax), %eax
	xorl	$110, %eax
	orl	%ecx, %eax
	je	.LBB20_4
.LBB20_10:                              # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit.thread21
	movl	size_test(%rip), %eax
	testl	%eax, %eax
	jle	.LBB20_5
# %bb.11:                               # %.lr.ph.preheader.i12
	movq	max_index(%rip), %rcx
	xorpd	%xmm2, %xmm2
	xorl	%edx, %edx
	movsd	.LCPI20_0(%rip), %xmm1          # xmm1 = mem[0],zero
	movapd	%xmm2, %xmm0
.LBB20_12:                              # %.lr.ph.i14
                                        # =>This Inner Loop Header: Depth=1
	movl	(%rbx,%rdx,4), %esi
	addsd	%xmm1, %xmm0
	cmpl	(%rcx,%rdx,4), %esi
	je	.LBB20_14
# %bb.13:                               # %.lr.ph.i14
                                        #   in Loop: Header=BB20_12 Depth=1
	movapd	%xmm2, %xmm0
.LBB20_14:                              # %.lr.ph.i14
                                        #   in Loop: Header=BB20_12 Depth=1
	incq	%rdx
	movapd	%xmm0, %xmm2
	cmpq	%rdx, %rax
	jne	.LBB20_12
	jmp	.LBB20_15
.LBB20_4:                               # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit.thread
	movl	size_train(%rip), %eax
	testl	%eax, %eax
	jle	.LBB20_5
# %bb.6:                                # %.lr.ph.preheader.i
	movq	max_index(%rip), %rcx
	xorpd	%xmm2, %xmm2
	xorl	%edx, %edx
	movsd	.LCPI20_0(%rip), %xmm1          # xmm1 = mem[0],zero
	movapd	%xmm2, %xmm0
.LBB20_7:                               # %.lr.ph.i
                                        # =>This Inner Loop Header: Depth=1
	movl	(%rbx,%rdx,4), %esi
	addsd	%xmm1, %xmm0
	cmpl	(%rcx,%rdx,4), %esi
	je	.LBB20_9
# %bb.8:                                # %.lr.ph.i
                                        #   in Loop: Header=BB20_7 Depth=1
	movapd	%xmm2, %xmm0
.LBB20_9:                               # %.lr.ph.i
                                        #   in Loop: Header=BB20_7 Depth=1
	incq	%rdx
	movapd	%xmm0, %xmm2
	cmpq	%rdx, %rax
	jne	.LBB20_7
	jmp	.LBB20_15
.LBB20_5:
	xorpd	%xmm0, %xmm0
.LBB20_15:                              # %_Z8accuracyPiS_i.exit
	xorps	%xmm1, %xmm1
	cvtsi2sd	%eax, %xmm1
	divsd	%xmm1, %xmm0
	addq	$40, %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_end20:
	.size	_Z4testPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii, .Lfunc_end20-_Z4testPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
	.cfi_endproc
                                        # -- End function
	.globl	main                            # -- Begin function main
	.type	main,@function
main:                                   # @main
.Lfunc_begin3:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception3
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	cmpl	$2, %edi
	jg	.LBB21_2
# %bb.1:
	movl	$.Lstr.1, %edi
	callq	puts@PLT
	movl	$.Lstr.2, %edi
	jmp	.LBB21_4
.LBB21_2:
	cmpl	$3, %edi
	jne	.LBB21_3
# %bb.5:
	movq	16(%rsi), %rdi
	callq	atoi
	movl	%eax, %ebx
	callq	_Z13initialize_Wbv
	callq	_Z9read_datav
	movl	$0, 12(%rsp)
	leaq	32(%rsp), %r14
	movq	%r14, %rdi
	callq	hipEventCreate
	movq	%rsp, %rdi
	callq	hipEventCreate
	movq	(%r14), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movl	$20000, %ebp                    # imm = 0x4E20
.LBB21_6:                               # =>This Inner Loop Header: Depth=1
	movq	X_trn(%rip), %rdi
	movq	Y_trn(%rip), %rsi
	movl	%ebx, %edx
	callq	_Z5trainPdPiii
	decl	%ebp
	jne	.LBB21_6
# %bb.7:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit
	movq	(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	(%rsp), %rdi
	callq	hipEventSynchronize
	movq	32(%rsp), %rsi
	movq	(%rsp), %rdx
	leaq	12(%rsp), %r14
	movq	%r14, %rdi
	callq	hipEventElapsedTime
	xorps	%xmm0, %xmm0
	cvtss2sd	(%r14), %xmm0
	movl	$.L.str.15, %edi
	movb	$1, %al
	callq	printf
	movq	X_trn(%rip), %r14
	movq	Y_trn(%rip), %r15
	leaq	88(%rsp), %r13
	movq	%r13, -16(%r13)
	leaq	72(%rsp), %r12
	movl	$.L.str, %esi
	movl	$.L.str+5, %edx
	movq	%r12, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
.Ltmp62:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movl	%ebx, %ecx
	callq	_Z4testPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
	movsd	%xmm0, 24(%rsp)                 # 8-byte Spill
.Ltmp63:
# %bb.8:
	movq	72(%rsp), %rdi
	cmpq	%r13, %rdi
	je	.LBB21_10
# %bb.9:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB21_10:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	movq	X_tst(%rip), %r14
	movq	Y_tst(%rip), %r15
	leaq	56(%rsp), %r13
	movq	%r13, -16(%r13)
	leaq	40(%rsp), %r12
	movl	$.L.str.16, %esi
	movl	$.L.str.16+4, %edx
	movq	%r12, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
.Ltmp65:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movl	%ebx, %ecx
	callq	_Z4testPdPiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii
.Ltmp66:
# %bb.11:
	movaps	%xmm0, %xmm1
	movq	40(%rsp), %rdi
	cmpq	%r13, %rdi
	je	.LBB21_13
# %bb.12:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i31
	movsd	%xmm1, 16(%rsp)                 # 8-byte Spill
	callq	_ZdlPv
	movsd	16(%rsp), %xmm1                 # 8-byte Reload
                                        # xmm1 = mem[0],zero
.LBB21_13:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit33
	movl	$.L.str.17, %edi
	movl	$20000, %esi                    # imm = 0x4E20
	movsd	24(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	movb	$2, %al
	callq	printf
	xorl	%eax, %eax
	jmp	.LBB21_14
.LBB21_3:
	movl	$.Lstr, %edi
.LBB21_4:
	callq	puts@PLT
	movl	$-1, %eax
.LBB21_14:
	addq	$104, %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
.LBB21_16:
	.cfi_def_cfa_offset 160
.Ltmp67:
	movq	%rax, %rbx
	movq	40(%rsp), %rdi
	jmp	.LBB21_17
.LBB21_15:
.Ltmp64:
	movq	%rax, %rbx
	movq	72(%rsp), %rdi
.LBB21_17:
	cmpq	%r13, %rdi
	je	.LBB21_19
# %bb.18:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i37
	callq	_ZdlPv
.LBB21_19:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit36
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end21:
	.size	main, .Lfunc_end21-main
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table21:
.Lexception3:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end3-.Lcst_begin3
.Lcst_begin3:
	.uleb128 .Lfunc_begin3-.Lfunc_begin3    # >> Call Site 1 <<
	.uleb128 .Ltmp62-.Lfunc_begin3          #   Call between .Lfunc_begin3 and .Ltmp62
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp62-.Lfunc_begin3          # >> Call Site 2 <<
	.uleb128 .Ltmp63-.Ltmp62                #   Call between .Ltmp62 and .Ltmp63
	.uleb128 .Ltmp64-.Lfunc_begin3          #     jumps to .Ltmp64
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp63-.Lfunc_begin3          # >> Call Site 3 <<
	.uleb128 .Ltmp65-.Ltmp63                #   Call between .Ltmp63 and .Ltmp65
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp65-.Lfunc_begin3          # >> Call Site 4 <<
	.uleb128 .Ltmp66-.Ltmp65                #   Call between .Ltmp65 and .Ltmp66
	.uleb128 .Ltmp67-.Lfunc_begin3          #     jumps to .Ltmp67
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp66-.Lfunc_begin3          # >> Call Site 5 <<
	.uleb128 .Lfunc_end21-.Ltmp66           #   Call between .Ltmp66 and .Lfunc_end21
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end3:
	.p2align	2, 0x0
                                        # -- 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	.LBB22_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	.LBB22_3
.LBB22_1:                               # %._crit_edge
	movq	(%rbx), %rax
.LBB22_3:
	testq	%r14, %r14
	je	.LBB22_7
# %bb.4:
	cmpq	$1, %r14
	jne	.LBB22_6
# %bb.5:
	movb	(%r15), %cl
	movb	%cl, (%rax)
	jmp	.LBB22_7
.LBB22_6:
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	memcpy@PLT
.LBB22_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_end22:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag, .Lfunc_end22-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag,"axG",@progbits,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag,comdat
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag # -- Begin function _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag
	.p2align	1, 0x90
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag,@function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag: # @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_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	.LBB23_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	.LBB23_3
.LBB23_1:                               # %._crit_edge
	movq	(%rbx), %rax
.LBB23_3:
	testq	%r14, %r14
	je	.LBB23_7
# %bb.4:
	cmpq	$1, %r14
	jne	.LBB23_6
# %bb.5:
	movb	(%r15), %cl
	movb	%cl, (%rax)
	jmp	.LBB23_7
.LBB23_6:
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	memcpy@PLT
.LBB23_7:                               # %_ZZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_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_end23:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag, .Lfunc_end23-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _ZSt18generate_canonicalIdLm53ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_
.LCPI24_0:
	.quad	0x41dfffffff800000              # double 2147483646
.LCPI24_3:
	.quad	0x3ff0000000000000              # double 1
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0
.LCPI24_1:
	.long	0x40000000                      # float 2
.LCPI24_2:
	.long	0x5f000000                      # float 9.22337203E+18
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0
.LCPI24_4:
	.long	1127219200                      # 0x43300000
	.long	1160773632                      # 0x45300000
	.long	0                               # 0x0
	.long	0                               # 0x0
.LCPI24_5:
	.quad	0x4330000000000000              # double 4503599627370496
	.quad	0x4530000000000000              # double 1.9342813113834067E+25
	.section	.text._ZSt18generate_canonicalIdLm53ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_,"axG",@progbits,_ZSt18generate_canonicalIdLm53ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_,comdat
	.weak	_ZSt18generate_canonicalIdLm53ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_
	.type	_ZSt18generate_canonicalIdLm53ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_,@function
_ZSt18generate_canonicalIdLm53ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_: # @_ZSt18generate_canonicalIdLm53ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$64, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -16
	movq	%rdi, %rbx
	fldl	.LCPI24_0(%rip)
	fstpt	(%rsp)
	callq	logl
	fstpt	52(%rsp)                        # 10-byte Folded Spill
	flds	.LCPI24_1(%rip)
	fstpt	(%rsp)
	callq	logl
	fldt	52(%rsp)                        # 10-byte Folded Reload
	fdivp	%st, %st(1)
	flds	.LCPI24_2(%rip)
	xorl	%ecx, %ecx
	fxch	%st(1)
	fucomi	%st(1), %st
	fldz
	fcmovnb	%st(2), %st
	fstp	%st(2)
	fsubp	%st, %st(1)
	setae	%cl
	fnstcw	20(%rsp)
	movzwl	20(%rsp), %eax
	orl	$3072, %eax                     # imm = 0xC00
	movw	%ax, 22(%rsp)
	fldcw	22(%rsp)
	fistpll	40(%rsp)
	fldcw	20(%rsp)
	shlq	$63, %rcx
	xorq	40(%rsp), %rcx
	leaq	52(%rcx), %rax
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %rcx
	cmpq	$1, %rax
	adcq	$0, %rcx
	movq	(%rbx), %rax
	xorpd	%xmm0, %xmm0
	movsd	.LCPI24_3(%rip), %xmm1          # xmm1 = mem[0],zero
	movabsq	$8589934597, %rdi               # imm = 0x200000005
	movdqa	.LCPI24_4(%rip), %xmm2          # xmm2 = [1127219200,1160773632,0,0]
	movapd	.LCPI24_5(%rip), %xmm3          # xmm3 = [4.503599627370496E+15,1.9342813113834067E+25]
.LBB24_1:                               # %select.unfold
                                        # =>This Inner Loop Header: Depth=1
	imulq	$16807, %rax, %rsi              # imm = 0x41A7
	movq	%rsi, %rax
	mulq	%rdi
	movq	%rsi, %r8
	subq	%rdx, %r8
	shrq	%r8
	addq	%rdx, %r8
	shrq	$30, %r8
	movq	%r8, %rax
	shlq	$31, %rax
	subq	%rax, %r8
	leaq	(%rsi,%r8), %rax
	leaq	(%rsi,%r8), %rdx
	decq	%rdx
	movq	%rdx, %xmm4
	punpckldq	%xmm2, %xmm4            # xmm4 = xmm4[0],xmm2[0],xmm4[1],xmm2[1]
	subpd	%xmm3, %xmm4
	movapd	%xmm4, %xmm5
	unpckhpd	%xmm4, %xmm5                    # xmm5 = xmm5[1],xmm4[1]
	addsd	%xmm4, %xmm5
	mulsd	%xmm1, %xmm5
	movsd	%xmm1, 32(%rsp)
	fldl	32(%rsp)
	fmull	.LCPI24_0(%rip)
	addsd	%xmm5, %xmm0
	fstpl	24(%rsp)
	movsd	24(%rsp), %xmm1                 # xmm1 = mem[0],zero
	decq	%rcx
	jne	.LBB24_1
# %bb.2:
	movq	%rax, (%rbx)
	divsd	%xmm1, %xmm0
	ucomisd	.LCPI24_3(%rip), %xmm0
	jae	.LBB24_4
# %bb.3:
	addq	$64, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.LBB24_4:
	.cfi_def_cfa_offset 80
	movsd	.LCPI24_3(%rip), %xmm0          # xmm0 = mem[0],zero
	xorpd	%xmm1, %xmm1
	addq	$64, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	nextafter                       # TAILCALL
.Lfunc_end24:
	.size	_ZSt18generate_canonicalIdLm53ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_, .Lfunc_end24-_ZSt18generate_canonicalIdLm53ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_
	.cfi_endproc
                                        # -- End function
	.type	size_train,@object              # @size_train
	.data
	.globl	size_train
	.p2align	2, 0x0
size_train:
	.long	964                             # 0x3c4
	.size	size_train, 4

	.type	size_test,@object               # @size_test
	.globl	size_test
	.p2align	2, 0x0
size_test:
	.long	414                             # 0x19e
	.size	size_test, 4

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

	.type	size_input,@object              # @size_input
	.data
	.globl	size_input
	.p2align	2, 0x0
size_input:
	.long	196                             # 0xc4
	.size	size_input, 4

	.type	size_hidden,@object             # @size_hidden
	.globl	size_hidden
	.p2align	2, 0x0
size_hidden:
	.long	20                              # 0x14
	.size	size_hidden, 4

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

	.type	size_X_trn,@object              # @size_X_trn
	.globl	size_X_trn
	.p2align	2, 0x0
size_X_trn:
	.long	188944                          # 0x2e210
	.size	size_X_trn, 4

	.type	size_Y_trn,@object              # @size_Y_trn
	.globl	size_Y_trn
	.p2align	2, 0x0
size_Y_trn:
	.long	964                             # 0x3c4
	.size	size_Y_trn, 4

	.type	size_X_tst,@object              # @size_X_tst
	.globl	size_X_tst
	.p2align	2, 0x0
size_X_tst:
	.long	81144                           # 0x13cf8
	.size	size_X_tst, 4

	.type	size_Y_tst,@object              # @size_Y_tst
	.globl	size_Y_tst
	.p2align	2, 0x0
size_Y_tst:
	.long	414                             # 0x19e
	.size	size_Y_tst, 4

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

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

	.type	size_W1,@object                 # @size_W1
	.data
	.globl	size_W1
	.p2align	2, 0x0
size_W1:
	.long	3920                            # 0xf50
	.size	size_W1, 4

	.type	size_b1,@object                 # @size_b1
	.globl	size_b1
	.p2align	2, 0x0
size_b1:
	.long	20                              # 0x14
	.size	size_b1, 4

	.type	size_W2,@object                 # @size_W2
	.globl	size_W2
	.p2align	2, 0x0
size_W2:
	.long	40                              # 0x28
	.size	size_W2, 4

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

	.type	size_dW1,@object                # @size_dW1
	.globl	size_dW1
	.p2align	2, 0x0
size_dW1:
	.long	3920                            # 0xf50
	.size	size_dW1, 4

	.type	size_db1,@object                # @size_db1
	.globl	size_db1
	.p2align	2, 0x0
size_db1:
	.long	20                              # 0x14
	.size	size_db1, 4

	.type	size_dW2,@object                # @size_dW2
	.globl	size_dW2
	.p2align	2, 0x0
size_dW2:
	.long	40                              # 0x28
	.size	size_dW2, 4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"X_trn.csv"
	.size	.L.str.8, 10

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"Y_trn.csv"
	.size	.L.str.9, 10

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

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"Y_tst.csv"
	.size	.L.str.11, 10

	.type	.L.str.15,@object               # @.str.15
.L.str.15:
	.asciz	"Elapsed Time: %.4e msec. \n"
	.size	.L.str.15, 27

	.type	.L.str.16,@object               # @.str.16
.L.str.16:
	.asciz	"test"
	.size	.L.str.16, 5

	.type	.L.str.17,@object               # @.str.17
.L.str.17:
	.asciz	"the %d epoch, the training accuracy is: %f, the test accuracy is: %f\n"
	.size	.L.str.17, 70

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

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

	.type	.Lstr,@object                   # @str
	.section	.rodata.str1.1,"aMS",@progbits,1
.Lstr:
	.asciz	"\n Too many arguments. "
	.size	.Lstr, 23

	.type	.Lstr.1,@object                 # @str.1
.Lstr.1:
	.asciz	" Usage: first argument: block size "
	.size	.Lstr.1, 36

	.type	.Lstr.2,@object                 # @str.2
.Lstr.2:
	.asciz	" second argument: activation type "
	.size	.Lstr.2, 35

	.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 __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
