#include <iostream>
#include <fstream>
#include <math.h>
#include <string>
#include <ctime>
#include <cstdlib>
#include <cuda.h>
#include <stdio.h>

const int n_x = 784; //Rozmiar warstwy wejsciowej, jednoczesnie rozmiar badanych obrazow (28x28)
const int n_h = 7;   //Ilosc neuronow w warstwie ukrytej
const int n_y = 1;   //Ilosc neuronow na wyjsciu sieci
float learning_rate = 0.075; //Predkosc uczenia
const int train_samples = 209; //Ilosc obrazow przechodzacych przez siec w fazie treningu
const int test_samples = 50;   //Ilosc obrazow przechodzacych przez siec w fazie testu
int num_samples = train_samples; //Aktualna ilosc obrazow przechodzacych przez siec
const int iter_num = 100;  //Ilosc przejsc zestawu treningowego przez siec
const int print_freq = 20;  //Czestotliwosc wyswietlania wartosci funkcji kosztu

//Struktura przechowujaca poszczegolne gradienty
struct grad_data {  
    float dW1[n_h][n_x];
    float dW2[n_y][n_h];
    float db1;
    float db2;
    float dA0[n_x][train_samples];
    float dA1[n_h][train_samples];
    float dA2[n_y][train_samples];
    float dZ1[n_h][train_samples];
    float dZ2[n_y][train_samples];
};

//Struktura przechowujaca parametry oraz wyjscia poszczegolnych warstw
struct param_data { 
    float train_x[n_x][train_samples];
    float test_x[n_x][test_samples];
    float train_y[n_y][train_samples];
    float test_y[n_y][test_samples];
    float W1[n_h][n_x];
    float W2[n_y][n_h];
    float b1;
    float b2;
    float A1[n_h][train_samples];
    float A2[n_y][train_samples];
    float Z1[n_h][train_samples];
    float Z2[n_y][train_samples];

    //Tablice pomocnicze
    float AT0[train_samples][n_x];
    float AT1[train_samples][n_h];
    float WT1[n_x][n_h];
    float WT2[n_h][n_y];
};

//Funkcje obslugujace struktury
void load_data(param_data&, grad_data&);
void delete_data(param_data&, grad_data&);

//Funkcja obliczajaca Z1 oraz dW1 
__global__ void kernel(float *arr1,float *arr2, float *arr_out, float *b, int *size_1, int *size_2)
{
    int x = blockIdx.x;
    int y = blockIdx.y;

    if((*size_1) == train_samples) { //Wtedy liczone jest dW1
        arr_out[x + (*size_2)*y] = 0;
        for(int i = 0; i < (*size_1) ; i++) 
            arr_out[x +(*size_2)*y] += (arr1[i + (*size_1)*y] * arr2[x + (*size_2)*i]) / train_samples;

    } else {                        //Wtedy liczone jest Z1
        arr_out[x + (*size_2)*y] = *b; 
        for(int i = 0; i < (*size_1) ; i++) 
            arr_out[x +(*size_2)*y] += (arr1[i + (*size_1)*y] * arr2[x + (*size_2)*i]); 

    } 
}

//Funkcja aktywacji warstwy wyjsciowej (Sigmoid)
void sigmoid(param_data &parameters) {
    int rows = 1;
    int cols = num_samples;

    for (int i = 0; i < rows; i++) {
        for (int j = 0; j < cols; j++) {
            parameters.A2[i][j] = 1 / (1 + exp(-parameters.Z2[i][j]));
        }
    }
}

//Funkcja aktywacji warstwy ukrytej (ReLu)
void relu(param_data &parameters) {
    int rows = n_h;
    int cols = num_samples;

    for (int i = 0; i < rows; i++) {
        for (int j = 0; j < cols; j++) {
            if (parameters.Z1[i][j] <= 0) parameters.A1[i][j] = 0;
            else parameters.A1[i][j] = parameters.Z1[i][j];
        }
    }
}

//Funkcja wyznaczajaca dZ1 za pomoca pochodnej z nieliniowej funkcji aktywacji (ReLu) oraz dA1
void relu_backward(param_data &parameters, grad_data &grads) {
    int rows = n_h;
    int cols = num_samples;

    for (int i = 0; i < rows; i++) {
        for (int j = 0; j < cols; j++) {
            if (parameters.Z1[i][j] <= 0) grads.dZ1[i][j] = 0;
            else grads.dZ1[i][j] = grads.dA1[i][j];
        }
    }
}

//Funkcja wyznaczajaca dZ2 za pomocą pochodnej z nieliniowej funkcji aktywacji (Sigmoid) oraz dA2 
void sigmoid_backward(param_data &parameters, grad_data &grads) {
    int rows = 1;
    int cols = num_samples;

    float s;
    for (int i = 0; i < rows; i++) {
        for (int j = 0; j < cols; j++) {
            s = 1 / (1 + exp(-parameters.Z2[i][j]));
            grads.dZ2[i][j] = grads.dA2[i][j] * s * (1 - s);
        }
    }
}

//Z1 = W1*X + b1    <-- liczone na GPU
void linear_forward_relu(param_data &parameters) {
    int rows_w = n_h;
    int cols_w = n_x;
    int rows_z = n_h;
    int cols_z = num_samples;
    float *arr1,*arr2,*arr_out, *b;
    int *size_1, *size_2;

    cudaMalloc((void **)&arr1, rows_w*cols_w*sizeof(float));
    cudaMalloc((void **)&arr2, cols_w*cols_z*sizeof(float));
    cudaMalloc((void **)&arr_out, rows_z*cols_z*sizeof(float));
    cudaMalloc((void **)&b, sizeof(float));
    cudaMalloc((void **)&size_1, sizeof(int));
    cudaMalloc((void **)&size_2, sizeof(int));

    cudaMemcpy(arr1,parameters.W1, rows_w*cols_w*sizeof(float), cudaMemcpyHostToDevice);
    cudaMemcpy(arr2,parameters.train_x, n_x*cols_z*sizeof(float), cudaMemcpyHostToDevice);
    cudaMemcpy(b,&parameters.b1, sizeof(float), cudaMemcpyHostToDevice);
    cudaMemcpy(size_1,&n_x, sizeof(int), cudaMemcpyHostToDevice);
    cudaMemcpy(size_2,&num_samples, sizeof(int), cudaMemcpyHostToDevice);

    dim3 grid(cols_z,rows_z);

    kernel<<<grid,1>>>(arr1,arr2,arr_out,b,size_1,size_2);
    //cudaDeviceSynchronize();

    cudaMemcpy(parameters.Z1,arr_out,rows_z*cols_z*sizeof(float),cudaMemcpyDeviceToHost);

    cudaFree(arr1);
    cudaFree(arr2);
    cudaFree(arr_out);
    cudaFree(b);
    cudaFree(size_1);
    cudaFree(size_2);

    // Alternatywny kod na CPU:
    // for (int i_z = 0; i_z < rows_z; i_z++) {
    //     for (int j_z = 0; j_z < cols_z; j_z++) {
    //         for (int j_w = 0; j_w < cols_w; j_w++) {
    //             parameters.Z1[i_z][j_z] += parameters.W1[i_z][j_w] * parameters.train_x[j_w][j_z];
    //         }
    //         parameters.Z1[i_z][j_z] += parameters.b1;
    //     }
    // } 
}

//Z2 = W2*A1 + b2  
void linear_forward_sigm(param_data &parameters) {
    int rows_w = n_y;
    int cols_w = n_h;
    int rows_z = n_y;
    int cols_z = num_samples;

    for (int i_z = 0; i_z < rows_z; i_z++) {
        for (int j_z = 0; j_z < cols_z; j_z++) {
            for (int j_w = 0; j_w < cols_w; j_w++) {
                parameters.Z2[i_z][j_z] += parameters.W2[i_z][j_w] * parameters.A1[j_w][j_z];
            }
            parameters.Z2[i_z][j_z] += parameters.b2;
        }
    }
}

//Funkcja wybierajaca tryb aktywacji
void linear_activation_forward(param_data &parameters, std::string activation) { 
    if (activation.compare("sigmoid") == 0) {
        linear_forward_sigm(parameters);
        sigmoid(parameters);
    }
    else {
        linear_forward_relu(parameters);
        relu(parameters);
    }
}

//Funkcja obliczajaca wartosc kosztu po pojedynczym przejsciu zestawu treningowego przez siec
float compute_cost(param_data &parameters) { 
    float cost = 0;
    float m = train_samples;

    for (int i = 0; i < m; i++) {
        cost += (-1 / m) * ( parameters.train_y[0][i] * log(parameters.A2[0][i]) + (1 - parameters.train_y[0][i]) * log(1 - parameters.A2[0][i]));
    }
    return cost;
}

//dW1 = (dZ1 * X.T) / train_samples  <-- liczone na GPU
//dA0 = (W1).T * dZ1                 <-- nie musi być liczone
//db1 = sum(dZ1) / train_samples     <-- liczone na CPU
void linear_backward_relu(param_data &parameters, grad_data &grads) { 
    int rows_dw1 = n_h;
    int cols_dw1 = n_x;
    int rows_dz1 = n_h;
    int cols_dz1 = train_samples;
    int rows_da0 = n_x;
    int cols_da0 = train_samples;
    int cols_wt1 = n_h;

    for (int i = 0; i < rows_da0; i++) {
        for (int j = 0; j < cols_da0; j++) {
            parameters.AT0[j][i] = parameters.train_x[i][j];
        }
    }

    for (int i = 0; i < rows_dw1; i++) {
        for (int j = 0; j < cols_dw1; j++) {
            parameters.WT1[j][i] = parameters.W1[i][j];
        }
    }

    for (int i = 0; i < rows_dz1; i++) {
        for (int j = 0; j < cols_dz1; j++) {
            grads.db1 += grads.dZ1[i][j] / train_samples;
        }
    }

    float *arr1,*arr2,*arr_out, *b;
    int *size_1, *size_2;

    cudaMalloc((void **)&arr1, rows_dz1*cols_dz1*sizeof(float));
    cudaMalloc((void **)&arr2, cols_da0*rows_da0*sizeof(float));
    cudaMalloc((void **)&arr_out, rows_dw1*cols_dw1*sizeof(float));
    cudaMalloc((void **)&b, sizeof(float));
    cudaMalloc((void **)&size_1, sizeof(int));
    cudaMalloc((void **)&size_2, sizeof(int));

    cudaMemcpy(arr1, grads.dZ1, rows_dz1*cols_dz1*sizeof(float), cudaMemcpyHostToDevice);
    cudaMemcpy(arr2, parameters.AT0, cols_da0*rows_da0*sizeof(float), cudaMemcpyHostToDevice);
    cudaMemcpy(b, &parameters.b1, sizeof(float), cudaMemcpyHostToDevice);
    cudaMemcpy(size_1, &train_samples, sizeof(int), cudaMemcpyHostToDevice);
    cudaMemcpy(size_2, &n_x, sizeof(int), cudaMemcpyHostToDevice);

    dim3 grid(cols_dw1,rows_dw1);

    kernel<<<grid,1>>>(arr1,arr2,arr_out,b,size_1,size_2);
   // cudaDeviceSynchronize();

    cudaMemcpy(grads.dW1,arr_out,rows_dw1*cols_dw1*sizeof(float),cudaMemcpyDeviceToHost);

    cudaFree(arr1);
    cudaFree(arr2);
    cudaFree(arr_out);
    cudaFree(b);
    cudaFree(size_1);
    cudaFree(size_2);

    //Alternatywna wersja na CPU:

    // for (int i_dw1 = 0; i_dw1 < rows_dw1; i_dw1++) {
    //     for (int j_dw1 = 0; j_dw1 < cols_dw1; j_dw1++) {
    //         for (int j_dz1 = 0; j_dz1 < cols_dz1; j_dz1++) {
    //             grads.dW1[i_dw1][j_dw1] += (grads.dZ1[i_dw1][j_dz1] * parameters.AT0[j_dz1][j_dw1]) / float(train_samples);
    //         }
    //     }
    // }

    // for (int i_da0 = 0; i_da0 < rows_da0; i_da0++) {
    //     for (int j_da0 = 0; j_da0 < cols_da0; j_da0++) {
    //         for (int j_wt1 = 0; j_wt1 < rows_dz1; j_wt1++) {
    //             grads.dA0[i_da0][j_da0] += parameters.WT1[i_da0][j_wt1] * grads.dZ1[j_wt1][j_da0];
    //         }
    //     }
    // }
}

//dW2 = dZ2 * (A1).T / train_samples   
//dA1 = (W2).T * dZ2                        <-- Wszystko liczone na CPU    
//db2 = sum(dZ2) /train_samples                
void linear_backward_sigm(param_data &parameters, grad_data &grads) {
    int rows_dw2 = n_y;
    int cols_dw2 = n_h;
    int rows_dz2 = n_y;
    int cols_dz2 = train_samples;
    int rows_da1 = n_h;
    int cols_da1 = train_samples;
    int cols_wt2 = n_y;


    for (int i = 0; i < rows_da1; i++) {
        for (int j = 0; j < cols_da1; j++) {
            parameters.AT1[j][i] = parameters.A1[i][j];
        }
    }

    for (int i = 0; i < rows_dw2; i++) {
        for (int j = 0; j < cols_dw2; j++) {
            parameters.WT2[j][i] = parameters.W2[i][j];
        }
    }


    for (int i = 0; i < rows_dz2; i++) {
        for (int j = 0; j < cols_dz2; j++) {
            grads.db2 += grads.dZ2[i][j] / train_samples;
        }
    }

    for (int i_dw2 = 0; i_dw2 < rows_dw2; i_dw2++) {
        for (int j_dw2 = 0; j_dw2 < cols_dw2; j_dw2++) {
            for (int j_dz2 = 0; j_dz2 < cols_dz2; j_dz2++) {
                grads.dW2[i_dw2][j_dw2] += (grads.dZ2[i_dw2][j_dz2] * parameters.AT1[j_dz2][j_dw2]) / train_samples;
            }
        }
    }


    for (int i_da1 = 0; i_da1 < rows_da1; i_da1++) {
        for (int j_da1 = 0; j_da1 < cols_da1; j_da1++) {
            for (int j_wt2 = 0; j_wt2 < cols_wt2; j_wt2++) {
                grads.dA1[i_da1][j_da1] += parameters.WT2[i_da1][j_wt2] * grads.dZ2[j_wt2][j_da1];
            }
        }
    }

}

//Funkcja wybierajaca tryb obliczania gradientow
void linear_activation_backward(param_data &parameters, grad_data &grads, std::string activation) {
    if (activation.compare("relu") == 0) {
        relu_backward(parameters, grads);
        linear_backward_relu(parameters, grads);
    }
    else {
        sigmoid_backward(parameters, grads);
        linear_backward_sigm(parameters, grads);
    }
}

//Aktualizowanie parametrów sieci po jednej iteracji
void update_parameters(param_data &parameters, grad_data &grads) {
    int rows_W1 = n_h;
    int cols_W1 = n_x;
    int rows_W2 = n_y;
    int cols_W2 = n_h;

    for (int i = 0; i < rows_W1; i++) {
        for (int j = 0; j < cols_W1; j++) {
            parameters.W1[i][j] -= learning_rate * grads.dW1[i][j];
        }
    }
    for (int i = 0; i < rows_W2; i++) {
        for (int j = 0; j < cols_W2; j++) {
            parameters.W2[i][j] -= learning_rate * grads.dW2[i][j];
        }
    }

    parameters.b1 -= learning_rate * grads.db1;
    parameters.b2 -= learning_rate * grads.db2;
    
}

//Glowna funkcja przechodzaca przez siec
void two_layer_model(param_data &parameters, grad_data &grads) {
    float cost = 0;

    for (int i = 0; i < iter_num + 1; i++) {
        delete_data(parameters, grads);

        linear_activation_forward(parameters, "relu");
        linear_activation_forward(parameters, "sigmoid");

        cost = compute_cost(parameters);

        for (int j = 0; j < train_samples; j++) {
            grads.dA2[0][j] = -((parameters.train_y[0][j] / parameters.A2[0][j]) - ((1. - parameters.train_y[0][j]) / (1. - parameters.A2[0][j])));
        }

        linear_activation_backward(parameters, grads, "sigmoid");
        linear_activation_backward(parameters, grads, "relu");

        update_parameters(parameters, grads);

        if (i % print_freq == 0) {
            std::cout << "Koszt po iteracji " << i << ": " << cost << "\n\n";
        }
    }

}

//Sprawdzanie skutecznosci sieci
void accuracy_check_train(param_data &parameters){
    float accuracy = 0;

    linear_activation_forward(parameters, "relu");
    linear_activation_forward(parameters, "sigmoid");

    for (int j = 0; j < train_samples; j++) {
            if(parameters.A2[0][j] >= 0.5 && parameters.train_y[0][j] == 1) accuracy += 1;
            else if(parameters.A2[0][j] < 0.5 && parameters.train_y[0][j] == 0) accuracy += 1;
    }

    std::cout << "Accuracy (training): " << accuracy / train_samples << "\n";

    num_samples = test_samples;
    accuracy = 0;

    linear_activation_forward(parameters, "relu");
    linear_activation_forward(parameters, "sigmoid");

    for (int j = 0; j < test_samples; j++) {
        if(parameters.A2[0][j] >= 0.5 && parameters.test_y[0][j] == 1) accuracy += 1;
        else if(parameters.A2[0][j] < 0.5 && parameters.test_y[0][j] == 0) accuracy += 1;
    }

    std::cout << "Accuracy (test): " << accuracy / test_samples << "\n";
}


int main() {
    param_data parameters;
    grad_data grads;

    load_data(parameters, grads);

    two_layer_model(parameters, grads);

    accuracy_check_train(parameters);

    return 0;
}

void load_data(param_data &parameters, grad_data &grads) {
    srand(time(NULL));

    std::cout << "Ladowanie zestawu treningowego i testowego.\n";

    std::string path = "train_x.txt";
    std::ifstream input(path.c_str());
    for (int i = 0; i < n_x; i++) 
        for (int j = 0; j < train_samples; j++) input >> parameters.train_x[i][j];

    path = "test_x.txt";
    std::ifstream input2(path.c_str());
    for (int i = 0; i < n_x; i++) 
        for (int j = 0; j < test_samples; j++) input2 >> parameters.test_x[i][j];

    
    std::cout << "Wczytano zestaw treningowy i testowy.\n";

    path = "train_y.txt";
    std::ifstream input3(path.c_str());
    for (int j = 0; j < train_samples; j++) input3 >> parameters.train_y[0][j];
    

    path = "test_y.txt";
    std::ifstream input4(path.c_str());
    for (int j = 0; j < test_samples; j++) input4 >> parameters.test_y[0][j];
    

    std::cout << "Wczytano zestaw klas.\n";

    for (int i = 0; i < n_h; i++) 
        for (int j = 0; j < n_x; j++) parameters.W1[i][j] = (rand()%10000 - 5000) * 0.000001;

    for (int i = 0; i < n_y; i++) 
        for (int j = 0; j < n_h; j++) parameters.W2[i][j] = (rand()%10000 - 5000) * 0.000001;

    parameters.b1 = 0;
    parameters.b2 = 0;
    grads.db1 = 0;
    grads.db2 = 0;
   
    for (int i = 0; i < n_h; i++) 
        for (int j = 0; j < train_samples; j++) parameters.Z1[i][j] = 0;

    for (int i = 0; i < n_y; i++) 
        for (int j = 0; j < train_samples; j++) parameters.Z2[i][j] = 0;
}

void delete_data(param_data& parameters, grad_data& grads) {

    for (int i = 0; i < n_h; i++) 
        for (int j = 0; j < train_samples; j++) 
            parameters.Z1[i][j] = 0;

    for (int i = 0; i < n_y; i++) 
        for (int j = 0; j < train_samples; j++) 
            parameters.Z2[i][j] = 0;
  
    for (int i = 0; i < n_h; i++) 
        for (int j = 0; j < train_samples; j++) 
            parameters.A1[i][j] = 0;

    for (int i = 0; i < n_y; i++) 
        for (int j = 0; j < train_samples; j++) 
            parameters.A2[i][j] = 0;

    for (int i = 0; i < n_h; i++) 
        for (int j = 0; j < n_x; j++) 
            grads.dW1[i][j] = 0;

    for (int i = 0; i < n_y; i++) 
        for (int j = 0; j < n_h; j++) 
            grads.dW2[i][j] = 0;

    for (int i = 0; i < n_h; i++) 
        for (int j = 0; j < train_samples; j++) 
            grads.dA1[i][j] = 0;

    for (int i = 0; i < n_y; i++) 
        for (int j = 0; j < train_samples; j++) 
            grads.dA2[i][j] = 0;

    for (int i = 0; i < n_h; i++) 
        for (int j = 0; j < train_samples; j++) 
            grads.dZ1[i][j] = 0;

    for (int i = 0; i < n_y; i++) 
        for (int j = 0; j < train_samples; j++) 
            grads.dZ2[i][j] = 0;

    for (int i = 0; i < n_x; i++) 
        for (int j = 0; j < train_samples; j++)
            grads.dA0[i][j] = 0;

    grads.db1 = 0;
    grads.db2 = 0;

}

	.file	"tmpxft_002296cb_00000000-6_neural_network.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3785:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE3785:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.align 2
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc.isra.0, @function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc.isra.0:
.LFB4495:
	.cfi_startproc
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	pushq	%rax
	.cfi_def_cfa_offset 32
	call	strlen@PLT
	movq	8(%rbx), %rdx
	movq	%rbp, %rcx
	popq	%r9
	.cfi_def_cfa_offset 24
	movq	%rbx, %rdi
	movq	%rax, %r8
	popq	%rbx
	.cfi_def_cfa_offset 16
	xorl	%esi, %esi
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm@PLT
	.cfi_endproc
.LFE4495:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc.isra.0, .-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc.isra.0
	.globl	_Z7sigmoidR10param_data
	.type	_Z7sigmoidR10param_data, @function
_Z7sigmoidR10param_data:
.LFB3766:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	num_samples(%rip), %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	xorl	%ebx, %ebx
.L5:
	cmpl	%ebx, %r12d
	jle	.L9
	movss	847788(%rbp,%rbx,4), %xmm0
	xorps	.LC0(%rip), %xmm0
	call	expf@PLT
	movss	.LC1(%rip), %xmm1
	addss	%xmm1, %xmm0
	divss	%xmm0, %xmm1
	movss	%xmm1, 841100(%rbp,%rbx,4)
	incq	%rbx
	jmp	.L5
.L9:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3766:
	.size	_Z7sigmoidR10param_data, .-_Z7sigmoidR10param_data
	.globl	_Z4reluR10param_data
	.type	_Z4reluR10param_data, @function
_Z4reluR10param_data:
.LFB3767:
	.cfi_startproc
	endbr64
	movl	num_samples(%rip), %esi
	xorl	%edx, %edx
	xorps	%xmm1, %xmm1
.L11:
	movq	%rdx, %rax
	xorl	%ecx, %ecx
.L16:
	cmpl	%esi, %ecx
	jge	.L18
	movss	841936(%rdi,%rax), %xmm0
	comiss	%xmm0, %xmm1
	jb	.L12
	xorps	%xmm0, %xmm0
.L12:
	movss	%xmm0, 835248(%rdi,%rax)
	incl	%ecx
	addq	$4, %rax
	jmp	.L16
.L18:
	addq	$836, %rdx
	cmpq	$5852, %rdx
	jne	.L11
	ret
	.cfi_endproc
.LFE3767:
	.size	_Z4reluR10param_data, .-_Z4reluR10param_data
	.globl	_Z13relu_backwardR10param_dataR9grad_data
	.type	_Z13relu_backwardR10param_dataR9grad_data, @function
_Z13relu_backwardR10param_dataR9grad_data:
.LFB3768:
	.cfi_startproc
	endbr64
	movl	num_samples(%rip), %r8d
	xorl	%edx, %edx
	xorps	%xmm1, %xmm1
.L20:
	movq	%rdx, %rax
	xorl	%ecx, %ecx
.L24:
	cmpl	%r8d, %ecx
	jge	.L26
	comiss	841936(%rdi,%rax), %xmm1
	xorps	%xmm0, %xmm0
	jnb	.L21
	movss	677412(%rsi,%rax), %xmm0
.L21:
	movss	%xmm0, 684100(%rsi,%rax)
	incl	%ecx
	addq	$4, %rax
	jmp	.L24
.L26:
	addq	$836, %rdx
	cmpq	$5852, %rdx
	jne	.L20
	ret
	.cfi_endproc
.LFE3768:
	.size	_Z13relu_backwardR10param_dataR9grad_data, .-_Z13relu_backwardR10param_dataR9grad_data
	.globl	_Z16sigmoid_backwardR10param_dataR9grad_data
	.type	_Z16sigmoid_backwardR10param_dataR9grad_data, @function
_Z16sigmoid_backwardR10param_dataR9grad_data:
.LFB3769:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	pushq	%rdx
	.cfi_def_cfa_offset 48
	movl	num_samples(%rip), %r13d
.L28:
	cmpl	%ebx, %r13d
	jle	.L31
	movss	847788(%r12,%rbx,4), %xmm0
	xorps	.LC0(%rip), %xmm0
	call	expf@PLT
	movss	.LC1(%rip), %xmm1
	addss	%xmm1, %xmm0
	movaps	%xmm1, %xmm2
	divss	%xmm0, %xmm2
	movss	683264(%rbp,%rbx,4), %xmm0
	mulss	%xmm2, %xmm0
	subss	%xmm2, %xmm1
	mulss	%xmm1, %xmm0
	movss	%xmm0, 689952(%rbp,%rbx,4)
	incq	%rbx
	jmp	.L28
.L31:
	popq	%rax
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3769:
	.size	_Z16sigmoid_backwardR10param_dataR9grad_data, .-_Z16sigmoid_backwardR10param_dataR9grad_data
	.globl	_Z19linear_forward_sigmR10param_data
	.type	_Z19linear_forward_sigmR10param_data, @function
_Z19linear_forward_sigmR10param_data:
.LFB3771:
	.cfi_startproc
	endbr64
	movl	num_samples(%rip), %r8d
	movq	%rdi, %rax
	xorl	%ecx, %ecx
.L33:
	cmpl	%r8d, %ecx
	jge	.L37
	movss	847788(%rax), %xmm0
	movq	%rax, %rsi
	xorl	%edx, %edx
.L34:
	movss	835212(%rdi,%rdx), %xmm1
	addq	$4, %rdx
	addq	$836, %rsi
	mulss	834412(%rsi), %xmm1
	addss	%xmm1, %xmm0
	cmpq	$28, %rdx
	jne	.L34
	addss	835244(%rdi), %xmm0
	incl	%ecx
	addq	$4, %rax
	movss	%xmm0, 847784(%rax)
	jmp	.L33
.L37:
	ret
	.cfi_endproc
.LFE3771:
	.size	_Z19linear_forward_sigmR10param_data, .-_Z19linear_forward_sigmR10param_data
	.globl	_Z12compute_costR10param_data
	.type	_Z12compute_costR10param_data, @function
_Z12compute_costR10param_data:
.LFB3773:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xorps	%xmm2, %xmm2
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	xorl	%ebx, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
.L39:
	incq	%rbx
	cmpq	$210, %rbx
	je	.L42
	movss	841096(%rbp,%rbx,4), %xmm4
	movss	%xmm2, 12(%rsp)
	movss	812220(%rbp,%rbx,4), %xmm1
	movaps	%xmm4, %xmm0
	movss	%xmm1, 8(%rsp)
	movss	%xmm4, (%rsp)
	call	logf@PLT
	movss	%xmm0, 4(%rsp)
	movss	.LC1(%rip), %xmm0
	subss	(%rsp), %xmm0
	call	logf@PLT
	movss	8(%rsp), %xmm1
	movss	12(%rsp), %xmm2
	movaps	%xmm0, %xmm3
	movss	.LC1(%rip), %xmm0
	subss	%xmm1, %xmm0
	mulss	4(%rsp), %xmm1
	mulss	%xmm3, %xmm0
	addss	%xmm1, %xmm0
	mulss	.LC3(%rip), %xmm0
	addss	%xmm0, %xmm2
	jmp	.L39
.L42:
	addq	$24, %rsp
	.cfi_def_cfa_offset 24
	movaps	%xmm2, %xmm0
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3773:
	.size	_Z12compute_costR10param_data, .-_Z12compute_costR10param_data
	.globl	_Z20linear_backward_sigmR10param_dataR9grad_data
	.type	_Z20linear_backward_sigmR10param_dataR9grad_data, @function
_Z20linear_backward_sigmR10param_dataR9grad_data:
.LFB3775:
	.cfi_startproc
	endbr64
	movq	%rsi, %rdx
	movq	%rdi, %rax
	leaq	28(%rdi), %r9
	movq	%rdi, %r8
	movq	%rdi, %rsi
.L44:
	movq	%rsi, %rdi
	xorl	%ecx, %ecx
.L45:
	movss	835248(%r8,%rcx,4), %xmm0
	incq	%rcx
	addq	$28, %rdi
	movss	%xmm0, 1504020(%rdi)
	cmpq	$209, %rcx
	jne	.L45
	addq	$4, %rsi
	addq	$836, %r8
	cmpq	%r9, %rsi
	jne	.L44
	movups	835212(%rax), %xmm3
	movups	835224(%rax), %xmm4
	xorl	%ecx, %ecx
	movss	.LC4(%rip), %xmm2
	movups	%xmm3, 1531852(%rax)
	movups	%xmm4, 1531864(%rax)
	movss	21984(%rdx), %xmm0
.L47:
	movss	689952(%rdx,%rcx), %xmm1
	addq	$4, %rcx
	divss	%xmm2, %xmm1
	addss	%xmm1, %xmm0
	cmpq	$836, %rcx
	jne	.L47
	movss	%xmm0, 21984(%rdx)
	xorl	%ecx, %ecx
.L50:
	movss	21952(%rdx,%rcx), %xmm1
	leaq	(%rax,%rcx), %rdi
	xorl	%esi, %esi
.L49:
	movss	689952(%rdx,%rsi), %xmm0
	addq	$4, %rsi
	addq	$28, %rdi
	mulss	1504020(%rdi), %xmm0
	divss	%xmm2, %xmm0
	addss	%xmm0, %xmm1
	cmpq	$836, %rsi
	jne	.L49
	movss	%xmm1, 21952(%rdx,%rcx)
	addq	$4, %rcx
	cmpq	$28, %rcx
	jne	.L50
	xorl	%esi, %esi
.L51:
	imulq	$209, %rsi, %rcx
	xorl	%edi, %edi
	movss	1531852(%rax,%rsi), %xmm1
	addq	%rdx, %rcx
.L52:
	movss	689952(%rdx,%rdi), %xmm0
	addq	$4, %rdi
	addq	$4, %rcx
	mulss	%xmm1, %xmm0
	addss	677408(%rcx), %xmm0
	movss	%xmm0, 677408(%rcx)
	cmpq	$836, %rdi
	jne	.L52
	addq	$4, %rsi
	cmpq	$28, %rsi
	jne	.L51
	ret
	.cfi_endproc
.LFE3775:
	.size	_Z20linear_backward_sigmR10param_dataR9grad_data, .-_Z20linear_backward_sigmR10param_dataR9grad_data
	.globl	_Z17update_parametersR10param_dataR9grad_data
	.type	_Z17update_parametersR10param_dataR9grad_data, @function
_Z17update_parametersR10param_dataR9grad_data:
.LFB3777:
	.cfi_startproc
	endbr64
	movss	learning_rate(%rip), %xmm0
	xorl	%edx, %edx
.L61:
	movq	%rdx, %rax
	xorl	%ecx, %ecx
.L62:
	movss	813260(%rdi,%rax), %xmm1
	movss	(%rsi,%rax), %xmm2
	incl	%ecx
	mulss	%xmm0, %xmm2
	subss	%xmm2, %xmm1
	movss	%xmm1, 813260(%rdi,%rax)
	addq	$4, %rax
	cmpl	$784, %ecx
	jne	.L62
	addq	$3136, %rdx
	cmpq	$21952, %rdx
	jne	.L61
	xorl	%eax, %eax
.L63:
	movss	21952(%rsi,%rax), %xmm2
	movss	835212(%rdi,%rax), %xmm1
	mulss	%xmm0, %xmm2
	subss	%xmm2, %xmm1
	movss	%xmm1, 835212(%rdi,%rax)
	addq	$4, %rax
	cmpq	$28, %rax
	jne	.L63
	movss	21980(%rsi), %xmm2
	movss	835240(%rdi), %xmm1
	mulss	%xmm0, %xmm2
	mulss	21984(%rsi), %xmm0
	subss	%xmm2, %xmm1
	movss	%xmm1, 835240(%rdi)
	movss	835244(%rdi), %xmm1
	subss	%xmm0, %xmm1
	movss	%xmm1, 835244(%rdi)
	ret
	.cfi_endproc
.LFE3777:
	.size	_Z17update_parametersR10param_dataR9grad_data, .-_Z17update_parametersR10param_dataR9grad_data
	.globl	_Z11delete_dataR10param_dataR9grad_data
	.type	_Z11delete_dataR10param_dataR9grad_data, @function
_Z11delete_dataR10param_dataR9grad_data:
.LFB3782:
	.cfi_startproc
	endbr64
	movq	%rsi, %rdx
	movq	%rdi, %r8
	leaq	841936(%rdi), %rsi
	xorl	%eax, %eax
	movq	%rsi, %rdi
	movl	$1463, %ecx
	leaq	847788(%r8), %rsi
	rep stosl
	movq	%rsi, %rdi
	movl	$209, %ecx
	leaq	835248(%r8), %rsi
	rep stosl
	addq	$841100, %r8
	movq	%rsi, %rdi
	movl	$1463, %ecx
	rep stosl
	movl	$209, %ecx
	movq	%r8, %rdi
	leaq	677412(%rdx), %rsi
	rep stosl
	movl	$5488, %ecx
	movq	%rdx, %rdi
	rep stosl
	movq	%rsi, %rdi
	movl	$1463, %ecx
	leaq	683264(%rdx), %rsi
	rep stosl
	movq	%rsi, %rdi
	movl	$209, %ecx
	leaq	684100(%rdx), %rsi
	rep stosl
	movq	%rsi, %rdi
	movl	$1463, %ecx
	leaq	689952(%rdx), %rsi
	rep stosl
	movq	%rsi, %rdi
	movl	$209, %ecx
	leaq	21988(%rdx), %rsi
	rep stosl
	movl	$163856, %ecx
	movq	%rsi, %rdi
	rep stosl
	xorl	%eax, %eax
	movl	$0x00000000, 21984(%rdx)
	movq	%rax, 21952(%rdx)
	movq	%rax, 21960(%rdx)
	movq	%rax, 21968(%rdx)
	movq	%rax, 21976(%rdx)
	ret
	.cfi_endproc
.LFE3782:
	.size	_Z11delete_dataR10param_dataR9grad_data, .-_Z11delete_dataR10param_dataR9grad_data
	.globl	_Z36__device_stub__Z6kernelPfS_S_S_PiS0_PfS_S_S_PiS0_
	.type	_Z36__device_stub__Z6kernelPfS_S_S_PiS0_PfS_S_S_PiS0_, @function
_Z36__device_stub__Z6kernelPfS_S_S_PiS0_PfS_S_S_PiS0_:
.LFB3807:
	.cfi_startproc
	endbr64
	subq	$184, %rsp
	.cfi_def_cfa_offset 192
	movq	%rdi, 40(%rsp)
	leaq	72(%rsp), %rdi
	movq	%rsi, 32(%rsp)
	leaq	84(%rsp), %rsi
	movq	%rdx, 24(%rsp)
	leaq	56(%rsp), %rdx
	movq	%rcx, 16(%rsp)
	leaq	64(%rsp), %rcx
	movq	%r8, 8(%rsp)
	movq	%r9, (%rsp)
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	movl	$1, 80(%rsp)
	movq	%rax, 120(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 152(%rsp)
	movq	%rsp, %rax
	movq	%rax, 160(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 72(%rsp)
	movq	%rax, 84(%rsp)
	movl	$1, 92(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L68
	pushq	64(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z6kernelPfS_S_S_PiS0_(%rip), %rdi
	pushq	64(%rsp)
	.cfi_def_cfa_offset 208
	movq	100(%rsp), %rcx
	movl	108(%rsp), %r8d
	movq	88(%rsp), %rsi
	movl	96(%rsp), %edx
	leaq	136(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 200
	popq	%rdx
	.cfi_def_cfa_offset 192
.L68:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L70
	call	__stack_chk_fail@PLT
.L70:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3807:
	.size	_Z36__device_stub__Z6kernelPfS_S_S_PiS0_PfS_S_S_PiS0_, .-_Z36__device_stub__Z6kernelPfS_S_S_PiS0_PfS_S_S_PiS0_
	.globl	_Z6kernelPfS_S_S_PiS0_
	.type	_Z6kernelPfS_S_S_PiS0_, @function
_Z6kernelPfS_S_S_PiS0_:
.LFB3808:
	.cfi_startproc
	endbr64
	jmp	_Z36__device_stub__Z6kernelPfS_S_S_PiS0_PfS_S_S_PiS0_
	.cfi_endproc
.LFE3808:
	.size	_Z6kernelPfS_S_S_PiS0_, .-_Z6kernelPfS_S_S_PiS0_
	.globl	_Z19linear_forward_reluR10param_data
	.type	_Z19linear_forward_reluR10param_data, @function
_Z19linear_forward_reluR10param_data:
.LFB3770:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$21952, %esi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rdi, %rbx
	subq	$88, %rsp
	.cfi_def_cfa_offset 128
	movl	num_samples(%rip), %r13d
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rdi
	call	cudaMalloc@PLT
	imull	$7, %r13d, %ebp
	leaq	8(%rsp), %rdi
	imull	$784, %r13d, %r12d
	movslq	%ebp, %rbp
	movslq	%r12d, %r12
	salq	$2, %rbp
	salq	$2, %r12
	movq	%r12, %rsi
	call	cudaMalloc@PLT
	leaq	16(%rsp), %rdi
	movq	%rbp, %rsi
	call	cudaMalloc@PLT
	leaq	24(%rsp), %rdi
	movl	$4, %esi
	call	cudaMalloc@PLT
	leaq	32(%rsp), %rdi
	movl	$4, %esi
	call	cudaMalloc@PLT
	leaq	40(%rsp), %rdi
	movl	$4, %esi
	call	cudaMalloc@PLT
	movq	(%rsp), %rdi
	movl	$1, %ecx
	leaq	813260(%rbx), %rsi
	movl	$21952, %edx
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdi
	movq	%r12, %rdx
	movq	%rbx, %rsi
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	movq	24(%rsp), %rdi
	movl	$1, %ecx
	leaq	835240(%rbx), %rsi
	movl	$4, %edx
	call	cudaMemcpy@PLT
	movq	32(%rsp), %rdi
	movl	$1, %ecx
	movl	$4, %edx
	leaq	_ZL3n_x(%rip), %rsi
	call	cudaMemcpy@PLT
	movq	40(%rsp), %rdi
	movl	$1, %ecx
	movl	$4, %edx
	leaq	num_samples(%rip), %rsi
	call	cudaMemcpy@PLT
	movl	%r13d, 48(%rsp)
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movabsq	$4294967303, %rax
	movl	$1, %ecx
	movabsq	$4294967297, %rdx
	movq	%rax, 52(%rsp)
	movq	48(%rsp), %rdi
	movl	56(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L74
	movq	40(%rsp), %r9
	movq	32(%rsp), %r8
	movq	24(%rsp), %rcx
	movq	16(%rsp), %rdx
	movq	8(%rsp), %rsi
	movq	(%rsp), %rdi
	call	_Z36__device_stub__Z6kernelPfS_S_S_PiS0_PfS_S_S_PiS0_
.L74:
	movq	16(%rsp), %rsi
	movl	$2, %ecx
	movq	%rbp, %rdx
	leaq	841936(%rbx), %rdi
	call	cudaMemcpy@PLT
	movq	(%rsp), %rdi
	call	cudaFree@PLT
	movq	8(%rsp), %rdi
	call	cudaFree@PLT
	movq	16(%rsp), %rdi
	call	cudaFree@PLT
	movq	24(%rsp), %rdi
	call	cudaFree@PLT
	movq	32(%rsp), %rdi
	call	cudaFree@PLT
	movq	40(%rsp), %rdi
	call	cudaFree@PLT
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	je	.L75
	call	__stack_chk_fail@PLT
.L75:
	addq	$88, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3770:
	.size	_Z19linear_forward_reluR10param_data, .-_Z19linear_forward_reluR10param_data
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC5:
	.string	"sigmoid"
	.text
	.globl	_Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.type	_Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, @function
_Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
.LFB3772:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	leaq	.LC5(%rip), %rsi
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc@PLT
	movq	%rbx, %rdi
	testl	%eax, %eax
	jne	.L78
	call	_Z19linear_forward_sigmR10param_data
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	_Z7sigmoidR10param_data
.L78:
	.cfi_restore_state
	call	_Z19linear_forward_reluR10param_data
	movq	%rbx, %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	_Z4reluR10param_data
	.cfi_endproc
.LFE3772:
	.size	_Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, .-_Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.globl	_Z20linear_backward_reluR10param_dataR9grad_data
	.type	_Z20linear_backward_reluR10param_dataR9grad_data, @function
_Z20linear_backward_reluR10param_dataR9grad_data:
.LFB3774:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %rdx
	movq	%rsi, %rbp
	leaq	3136(%rdi), %r8
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %rcx
	movq	%rdi, %rbx
	subq	$88, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
.L81:
	movq	%rcx, %rsi
	xorl	%eax, %eax
.L82:
	movss	(%rdi,%rax,4), %xmm0
	incq	%rax
	addq	$3136, %rsi
	movss	%xmm0, 845488(%rsi)
	cmpq	$209, %rax
	jne	.L82
	addq	$4, %rcx
	addq	$836, %rdi
	cmpq	%r8, %rcx
	jne	.L81
	leaq	28(%rbx), %rdi
	movq	%rbx, %rsi
.L85:
	movq	%rdx, %rcx
	xorl	%eax, %eax
.L84:
	movss	813260(%rsi,%rax,4), %xmm0
	incq	%rax
	addq	$28, %rcx
	movss	%xmm0, 1509872(%rcx)
	cmpq	$784, %rax
	jne	.L84
	addq	$4, %rdx
	addq	$3136, %rsi
	cmpq	%rdi, %rdx
	jne	.L85
	movss	21980(%rbp), %xmm0
	movss	.LC4(%rip), %xmm2
	movq	%rbp, %rdx
	leaq	5852(%rbp), %rcx
.L86:
	xorl	%eax, %eax
.L87:
	movss	684100(%rdx,%rax,4), %xmm1
	incq	%rax
	divss	%xmm2, %xmm1
	addss	%xmm1, %xmm0
	cmpq	$209, %rax
	jne	.L87
	addq	$836, %rdx
	cmpq	%rcx, %rdx
	jne	.L86
	movss	%xmm0, 21980(%rbp)
	movq	%rsp, %rdi
	movl	$5852, %esi
	call	cudaMalloc@PLT
	leaq	8(%rsp), %rdi
	movl	$655424, %esi
	call	cudaMalloc@PLT
	leaq	16(%rsp), %rdi
	movl	$21952, %esi
	call	cudaMalloc@PLT
	leaq	24(%rsp), %rdi
	movl	$4, %esi
	call	cudaMalloc@PLT
	leaq	32(%rsp), %rdi
	movl	$4, %esi
	call	cudaMalloc@PLT
	leaq	40(%rsp), %rdi
	movl	$4, %esi
	call	cudaMalloc@PLT
	movq	(%rsp), %rdi
	movl	$1, %ecx
	leaq	684100(%rbp), %rsi
	movl	$5852, %edx
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdi
	movl	$1, %ecx
	leaq	848624(%rbx), %rsi
	movl	$655424, %edx
	call	cudaMemcpy@PLT
	movq	24(%rsp), %rdi
	movl	$1, %ecx
	leaq	835240(%rbx), %rsi
	movl	$4, %edx
	call	cudaMemcpy@PLT
	movq	32(%rsp), %rdi
	movl	$1, %ecx
	movl	$4, %edx
	leaq	_ZL13train_samples(%rip), %rsi
	call	cudaMemcpy@PLT
	movq	40(%rsp), %rdi
	movl	$1, %ecx
	movl	$4, %edx
	leaq	_ZL3n_x(%rip), %rsi
	call	cudaMemcpy@PLT
	movl	$1879048241, %edi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	salq	$4, %rdi
	movl	$1, %ecx
	movl	$1, %esi
	movabsq	$4294967297, %rdx
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L89
	movq	40(%rsp), %r9
	movq	32(%rsp), %r8
	movq	24(%rsp), %rcx
	movq	16(%rsp), %rdx
	movq	8(%rsp), %rsi
	movq	(%rsp), %rdi
	call	_Z36__device_stub__Z6kernelPfS_S_S_PiS0_PfS_S_S_PiS0_
.L89:
	movq	16(%rsp), %rsi
	movl	$2, %ecx
	movl	$21952, %edx
	movq	%rbp, %rdi
	call	cudaMemcpy@PLT
	movq	(%rsp), %rdi
	call	cudaFree@PLT
	movq	8(%rsp), %rdi
	call	cudaFree@PLT
	movq	16(%rsp), %rdi
	call	cudaFree@PLT
	movq	24(%rsp), %rdi
	call	cudaFree@PLT
	movq	32(%rsp), %rdi
	call	cudaFree@PLT
	movq	40(%rsp), %rdi
	call	cudaFree@PLT
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	je	.L90
	call	__stack_chk_fail@PLT
.L90:
	addq	$88, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3774:
	.size	_Z20linear_backward_reluR10param_dataR9grad_data, .-_Z20linear_backward_reluR10param_dataR9grad_data
	.section	.rodata.str1.1
.LC6:
	.string	"relu"
	.text
	.globl	_Z26linear_activation_backwardR10param_dataR9grad_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.type	_Z26linear_activation_backwardR10param_dataR9grad_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, @function
_Z26linear_activation_backwardR10param_dataR9grad_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
.LFB3776:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsi, %rbp
	leaq	.LC6(%rip), %rsi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %rbx
	movq	%rdx, %rdi
	pushq	%rcx
	.cfi_def_cfa_offset 32
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc@PLT
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	testl	%eax, %eax
	jne	.L97
	call	_Z13relu_backwardR10param_dataR9grad_data
	popq	%rdx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	_Z20linear_backward_reluR10param_dataR9grad_data
.L97:
	.cfi_restore_state
	call	_Z16sigmoid_backwardR10param_dataR9grad_data
	popq	%rax
	.cfi_def_cfa_offset 24
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	_Z20linear_backward_sigmR10param_dataR9grad_data
	.cfi_endproc
.LFE3776:
	.size	_Z26linear_activation_backwardR10param_dataR9grad_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, .-_Z26linear_activation_backwardR10param_dataR9grad_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.section	.rodata.str1.1
.LC7:
	.string	"_Z6kernelPfS_S_S_PiS0_"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB3810:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	pushq	$0
	.cfi_def_cfa_offset 24
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC7(%rip), %rdx
	movq	%rax, %rdi
	leaq	_Z6kernelPfS_S_S_PiS0_(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFunction@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE3810:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.rodata._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.str1.1,"aMS",@progbits,1
.LC8:
	.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_:
.LFB4129:
	.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	.L102
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L107
	leaq	.LC8(%rip), %rdi
	call	_ZSt19__throw_logic_errorPKc@PLT
.L102:
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	movq	%rsi, %rbp
	call	strlen@PLT
	movq	%rax, (%rsp)
	leaq	0(%rbp,%rax), %r12
	cmpq	$15, %rax
	jbe	.L104
	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)
.L104:
	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	.L105
.L107:
	call	__stack_chk_fail@PLT
.L105:
	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
.LFE4129:
	.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	.rodata.str1.1
.LC10:
	.string	"Koszt po iteracji "
.LC11:
	.string	": "
.LC12:
	.string	"\n\n"
	.text
	.globl	_Z15two_layer_modelR10param_dataR9grad_data
	.type	_Z15two_layer_modelR10param_dataR9grad_data, @function
_Z15two_layer_modelR10param_dataR9grad_data:
.LFB3778:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA3778
	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
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdi, %rbx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
.L111:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	leaq	23(%rsp), %r13
	call	_Z11delete_dataR10param_dataR9grad_data
	leaq	.LC6(%rip), %r14
	leaq	24(%rsp), %rax
	movq	%r13, %rdx
	movq	%r14, %rsi
	movq	%rax, %rdi
	movq	%rax, (%rsp)
.LEHB0:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE0:
	movq	(%rsp), %rsi
	movq	%rbx, %rdi
.LEHB1:
	call	_Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LEHE1:
	movq	(%rsp), %rdi
	leaq	.LC5(%rip), %r15
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	(%rsp), %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
.LEHB2:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE2:
	movq	(%rsp), %rsi
	movq	%rbx, %rdi
.LEHB3:
	call	_Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LEHE3:
	movq	(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%rbx, %rdi
	call	_Z12compute_costR10param_data
	movsd	.LC9(%rip), %xmm4
	xorl	%eax, %eax
	movss	%xmm0, 12(%rsp)
.L109:
	movss	812224(%rbx,%rax), %xmm2
	movaps	%xmm4, %xmm3
	movss	841100(%rbx,%rax), %xmm1
	movaps	%xmm2, %xmm0
	cvtss2sd	%xmm2, %xmm2
	subsd	%xmm2, %xmm3
	movaps	%xmm4, %xmm2
	divss	%xmm1, %xmm0
	cvtss2sd	%xmm1, %xmm1
	subsd	%xmm1, %xmm2
	divsd	%xmm2, %xmm3
	cvtss2sd	%xmm0, %xmm0
	subsd	%xmm3, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	xorps	.LC0(%rip), %xmm0
	movss	%xmm0, 683264(%rbp,%rax)
	addq	$4, %rax
	cmpq	$836, %rax
	jne	.L109
	movq	(%rsp), %rdi
	movq	%r13, %rdx
	movq	%r15, %rsi
.LEHB4:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE4:
	movq	(%rsp), %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
.LEHB5:
	call	_Z26linear_activation_backwardR10param_dataR9grad_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LEHE5:
	movq	(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	(%rsp), %rdi
	movq	%r13, %rdx
	movq	%r14, %rsi
.LEHB6:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE6:
	movq	(%rsp), %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
.LEHB7:
	call	_Z26linear_activation_backwardR10param_dataR9grad_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LEHE7:
	movq	(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	_Z17update_parametersR10param_dataR9grad_data
	movl	%r12d, %eax
	movl	$20, %ecx
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	.L110
	leaq	.LC10(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
.LEHB8:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	%r12d, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	leaq	.LC11(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	cvtss2sd	12(%rsp), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	leaq	.LC12(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
.L110:
	incl	%r12d
	cmpl	$101, %r12d
	jne	.L111
	jmp	.L132
.L121:
	endbr64
	jmp	.L131
.L122:
	endbr64
	jmp	.L131
.L123:
	endbr64
	jmp	.L131
.L124:
	endbr64
.L131:
	movq	%rax, %rbx
.L118:
	movq	(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L130
	movq	%rbx, %rdi
	call	_Unwind_Resume@PLT
.LEHE8:
.L132:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	je	.L120
.L130:
	call	__stack_chk_fail@PLT
.L120:
	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
.LFE3778:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA3778:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE3778-.LLSDACSB3778
.LLSDACSB3778:
	.uleb128 .LEHB0-.LFB3778
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB3778
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L121-.LFB3778
	.uleb128 0
	.uleb128 .LEHB2-.LFB3778
	.uleb128 .LEHE2-.LEHB2
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB3-.LFB3778
	.uleb128 .LEHE3-.LEHB3
	.uleb128 .L122-.LFB3778
	.uleb128 0
	.uleb128 .LEHB4-.LFB3778
	.uleb128 .LEHE4-.LEHB4
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB5-.LFB3778
	.uleb128 .LEHE5-.LEHB5
	.uleb128 .L123-.LFB3778
	.uleb128 0
	.uleb128 .LEHB6-.LFB3778
	.uleb128 .LEHE6-.LEHB6
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB7-.LFB3778
	.uleb128 .LEHE7-.LEHB7
	.uleb128 .L124-.LFB3778
	.uleb128 0
	.uleb128 .LEHB8-.LFB3778
	.uleb128 .LEHE8-.LEHB8
	.uleb128 0
	.uleb128 0
.LLSDACSE3778:
	.text
	.size	_Z15two_layer_modelR10param_dataR9grad_data, .-_Z15two_layer_modelR10param_dataR9grad_data
	.section	.rodata.str1.1
.LC14:
	.string	"Accuracy (training): "
.LC15:
	.string	"\n"
.LC16:
	.string	"Accuracy (test): "
	.text
	.globl	_Z20accuracy_check_trainR10param_data
	.type	_Z20accuracy_check_trainR10param_data, @function
_Z20accuracy_check_trainR10param_data:
.LFB3779:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA3779
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC6(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%r15, %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
	movq	%rdi, %rbx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	23(%rsp), %rbp
	leaq	24(%rsp), %rax
	movq	%rax, %rdi
	movq	%rbp, %rdx
	movq	%rax, (%rsp)
.LEHB9:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE9:
	movq	(%rsp), %rsi
	movq	%rbx, %rdi
.LEHB10:
	call	_Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LEHE10:
	movq	(%rsp), %rdi
	leaq	.LC5(%rip), %r14
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	(%rsp), %rdi
	movq	%r14, %rsi
	movq	%rbp, %rdx
.LEHB11:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE11:
	movq	(%rsp), %rsi
	movq	%rbx, %rdi
.LEHB12:
	call	_Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LEHE12:
	movq	(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	xorps	%xmm0, %xmm0
	movss	.LC13(%rip), %xmm3
	xorl	%eax, %eax
	movss	.LC1(%rip), %xmm1
	movaps	%xmm0, %xmm4
.L140:
	movss	841100(%rbx,%rax), %xmm2
	comiss	.LC13(%rip), %xmm2
	jb	.L172
	ucomiss	812224(%rbx,%rax), %xmm1
	jmp	.L188
.L172:
	comiss	%xmm2, %xmm3
	jbe	.L136
	ucomiss	812224(%rbx,%rax), %xmm4
.L188:
	jp	.L136
	jne	.L136
	addss	%xmm1, %xmm0
.L136:
	addq	$4, %rax
	cmpq	$836, %rax
	jne	.L140
	leaq	_ZSt4cout(%rip), %r13
	leaq	.LC14(%rip), %rsi
	movss	%xmm0, 12(%rsp)
	movq	%r13, %rdi
	leaq	.LC15(%rip), %r12
.LEHB13:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movss	12(%rsp), %xmm0
	divss	.LC4(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%r12, %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	(%rsp), %rdi
	movq	%r15, %rsi
	movq	%rbp, %rdx
	movl	$50, num_samples(%rip)
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE13:
	movq	(%rsp), %rsi
	movq	%rbx, %rdi
.LEHB14:
	call	_Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LEHE14:
	movq	(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	(%rsp), %rdi
	movq	%r14, %rsi
	movq	%rbp, %rdx
.LEHB15:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE15:
	movq	(%rsp), %rsi
	movq	%rbx, %rdi
.LEHB16:
	call	_Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LEHE16:
	movq	(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	xorps	%xmm0, %xmm0
	movss	.LC13(%rip), %xmm3
	xorl	%eax, %eax
	movss	.LC1(%rip), %xmm1
	movaps	%xmm0, %xmm4
.L147:
	movss	841100(%rbx,%rax), %xmm2
	comiss	.LC13(%rip), %xmm2
	jb	.L173
	ucomiss	813060(%rbx,%rax), %xmm1
	jmp	.L190
.L173:
	comiss	%xmm2, %xmm3
	jbe	.L143
	ucomiss	813060(%rbx,%rax), %xmm4
.L190:
	jp	.L143
	jne	.L143
	addss	%xmm1, %xmm0
.L143:
	addq	$4, %rax
	cmpq	$200, %rax
	jne	.L147
	leaq	.LC16(%rip), %rsi
	movq	%r13, %rdi
	movss	%xmm0, (%rsp)
.LEHB17:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movss	(%rsp), %xmm0
	divss	.LC17(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L179
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%r12, %rsi
	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	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
.L158:
	.cfi_restore_state
	endbr64
	jmp	.L191
.L159:
	endbr64
	jmp	.L191
.L160:
	endbr64
	jmp	.L191
.L161:
	endbr64
.L191:
	movq	%rax, %rbx
.L155:
	movq	(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	je	.L156
.L179:
	call	__stack_chk_fail@PLT
.L156:
	movq	%rbx, %rdi
	call	_Unwind_Resume@PLT
.LEHE17:
	.cfi_endproc
.LFE3779:
	.section	.gcc_except_table
.LLSDA3779:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE3779-.LLSDACSB3779
.LLSDACSB3779:
	.uleb128 .LEHB9-.LFB3779
	.uleb128 .LEHE9-.LEHB9
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB10-.LFB3779
	.uleb128 .LEHE10-.LEHB10
	.uleb128 .L158-.LFB3779
	.uleb128 0
	.uleb128 .LEHB11-.LFB3779
	.uleb128 .LEHE11-.LEHB11
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB12-.LFB3779
	.uleb128 .LEHE12-.LEHB12
	.uleb128 .L159-.LFB3779
	.uleb128 0
	.uleb128 .LEHB13-.LFB3779
	.uleb128 .LEHE13-.LEHB13
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB14-.LFB3779
	.uleb128 .LEHE14-.LEHB14
	.uleb128 .L160-.LFB3779
	.uleb128 0
	.uleb128 .LEHB15-.LFB3779
	.uleb128 .LEHE15-.LEHB15
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB16-.LFB3779
	.uleb128 .LEHE16-.LEHB16
	.uleb128 .L161-.LFB3779
	.uleb128 0
	.uleb128 .LEHB17-.LFB3779
	.uleb128 .LEHE17-.LEHB17
	.uleb128 0
	.uleb128 0
.LLSDACSE3779:
	.text
	.size	_Z20accuracy_check_trainR10param_data, .-_Z20accuracy_check_trainR10param_data
	.section	.rodata.str1.1
.LC18:
	.string	"Ladowanie zestawu treningowego i testowego.\n"
.LC19:
	.string	"train_x.txt"
.LC20:
	.string	"test_x.txt"
.LC21:
	.string	"Wczytano zestaw treningowy i testowy.\n"
.LC22:
	.string	"train_y.txt"
.LC23:
	.string	"test_y.txt"
.LC24:
	.string	"Wczytano zestaw klas.\n"
	.text
	.globl	_Z9load_dataR10param_dataR9grad_data
	.type	_Z9load_dataR10param_dataR9grad_data, @function
_Z9load_dataR10param_dataR9grad_data:
.LFB3781:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA3781
	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
	movq	%rdi, %rbx
	xorl	%edi, %edi
	subq	$2168, %rsp
	.cfi_def_cfa_offset 2224
	movq	%rsi, 24(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 2152(%rsp)
	xorl	%eax, %eax
	call	time@PLT
	movl	%eax, %edi
	call	srand@PLT
	leaq	.LC18(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
.LEHB18:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	40(%rsp), %rax
	leaq	39(%rsp), %rdx
	movq	%rax, %rdi
	leaq	.LC19(%rip), %rsi
	movq	%rax, (%rsp)
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE18:
	leaq	72(%rsp), %rax
	movq	40(%rsp), %rsi
	movl	$8, %edx
	movq	%rax, %rdi
	movq	%rax, 16(%rsp)
.LEHB19:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE19:
	xorl	%r12d, %r12d
.L193:
	movq	%rbx, %rbp
	leaq	(%rbx,%r12,4), %r14
	movl	$209, %r13d
.L194:
	movq	16(%rsp), %rdi
	movq	%r14, %rsi
.LEHB20:
	call	_ZNSi10_M_extractIfEERSiRT_@PLT
	addq	$4, %r14
	decl	%r13d
	jne	.L194
	addq	$209, %r12
	cmpq	$163856, %r12
	jne	.L193
	movq	(%rsp), %rdi
	leaq	.LC20(%rip), %rsi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc.isra.0
	leaq	592(%rsp), %rax
	movq	40(%rsp), %rsi
	movl	$8, %edx
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE20:
	leaq	655424(%rbx), %r14
	xorl	%r15d, %r15d
.L196:
	movq	%r14, %r13
	movl	$50, %r12d
.L197:
	movq	8(%rsp), %rdi
	movq	%r13, %rsi
.LEHB21:
	call	_ZNSi10_M_extractIfEERSiRT_@PLT
	addq	$4, %r13
	decl	%r12d
	jne	.L197
	addq	$50, %r15
	addq	$200, %r14
	cmpq	$39200, %r15
	jne	.L196
	leaq	.LC21(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	(%rsp), %rdi
	leaq	.LC22(%rip), %rsi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc.isra.0
	leaq	1112(%rsp), %r15
	movq	40(%rsp), %rsi
	movl	$8, %edx
	movq	%r15, %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE21:
	leaq	812224(%rbx), %r13
	leaq	813060(%rbx), %r12
.L199:
	movq	%r13, %rsi
	movq	%r15, %rdi
.LEHB22:
	call	_ZNSi10_M_extractIfEERSiRT_@PLT
	addq	$4, %r13
	cmpq	%r12, %r13
	jne	.L199
	movq	(%rsp), %rdi
	leaq	.LC23(%rip), %rsi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc.isra.0
	leaq	1632(%rsp), %r14
	movq	40(%rsp), %rsi
	movl	$8, %edx
	movq	%r14, %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE22:
	leaq	813260(%rbx), %r13
.L200:
	movq	%r12, %rsi
	movq	%r14, %rdi
.LEHB23:
	call	_ZNSi10_M_extractIfEERSiRT_@PLT
	addq	$4, %r12
	cmpq	%r13, %r12
	jne	.L200
	leaq	.LC24(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
.LEHE23:
	leaq	21952(%rbx), %r13
.L201:
	xorl	%r12d, %r12d
.L202:
	call	rand@PLT
	movl	$10000, %ecx
	cltd
	idivl	%ecx
	subl	$5000, %edx
	cvtsi2sdl	%edx, %xmm0
	mulsd	.LC25(%rip), %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, 813260(%rbp,%r12,4)
	incq	%r12
	cmpq	$784, %r12
	jne	.L202
	addq	$3136, %rbp
	cmpq	%r13, %rbp
	jne	.L201
	xorl	%r12d, %r12d
	movl	$10000, %ebp
.L203:
	call	rand@PLT
	cltd
	idivl	%ebp
	subl	$5000, %edx
	cvtsi2sdl	%edx, %xmm0
	mulsd	.LC25(%rip), %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, 835212(%rbx,%r12)
	addq	$4, %r12
	cmpq	$28, %r12
	jne	.L203
	xorl	%eax, %eax
	xorl	%edx, %edx
	movl	$1463, %ecx
	movq	%rax, 835240(%rbx)
	movq	24(%rsp), %rax
	movq	%rdx, 21980(%rax)
	leaq	841936(%rbx), %rdx
	xorl	%eax, %eax
	addq	$847788, %rbx
	movq	%rdx, %rdi
	rep stosl
	movl	$209, %ecx
	movq	%rbx, %rdi
	rep stosl
	movq	%r14, %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	%r15, %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	8(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	leaq	72(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	leaq	40(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	2152(%rsp), %rax
	subq	%fs:40, %rax
	je	.L210
	jmp	.L225
.L217:
	endbr64
	movq	%rax, %rbx
.L204:
	movq	%r14, %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L205
.L216:
	endbr64
	movq	%rax, %rbx
.L205:
	movq	%r15, %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L206
.L215:
	endbr64
	movq	%rax, %rbx
.L206:
	movq	8(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L207
.L214:
	endbr64
	movq	%rax, %rbx
.L207:
	movq	16(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L208
.L213:
	endbr64
	movq	%rax, %rbx
.L208:
	movq	(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	2152(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L225
	movq	%rbx, %rdi
.LEHB24:
	call	_Unwind_Resume@PLT
.LEHE24:
.L225:
	call	__stack_chk_fail@PLT
.L210:
	addq	$2168, %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
.LFE3781:
	.section	.gcc_except_table
.LLSDA3781:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE3781-.LLSDACSB3781
.LLSDACSB3781:
	.uleb128 .LEHB18-.LFB3781
	.uleb128 .LEHE18-.LEHB18
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB19-.LFB3781
	.uleb128 .LEHE19-.LEHB19
	.uleb128 .L213-.LFB3781
	.uleb128 0
	.uleb128 .LEHB20-.LFB3781
	.uleb128 .LEHE20-.LEHB20
	.uleb128 .L214-.LFB3781
	.uleb128 0
	.uleb128 .LEHB21-.LFB3781
	.uleb128 .LEHE21-.LEHB21
	.uleb128 .L215-.LFB3781
	.uleb128 0
	.uleb128 .LEHB22-.LFB3781
	.uleb128 .LEHE22-.LEHB22
	.uleb128 .L216-.LFB3781
	.uleb128 0
	.uleb128 .LEHB23-.LFB3781
	.uleb128 .LEHE23-.LEHB23
	.uleb128 .L217-.LFB3781
	.uleb128 0
	.uleb128 .LEHB24-.LFB3781
	.uleb128 .LEHE24-.LEHB24
	.uleb128 0
	.uleb128 0
.LLSDACSE3781:
	.text
	.size	_Z9load_dataR10param_dataR9grad_data, .-_Z9load_dataR10param_dataR9grad_data
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB3780:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	-2220032(%rsp), %r11
	.cfi_def_cfa 11, 2220056
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2664, %rsp
	.cfi_def_cfa_offset 2222720
	movq	%fs:40, %rax
	movq	%rax, 2222680(%rsp)
	xorl	%eax, %eax
	leaq	690800(%rsp), %rbx
	leaq	12(%rsp), %rbp
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	_Z9load_dataR10param_dataR9grad_data
	movq	%rbx, %rdi
	movq	%rbp, %rsi
	call	_Z15two_layer_modelR10param_dataR9grad_data
	movq	%rbx, %rdi
	call	_Z20accuracy_check_trainR10param_data
	movq	2222680(%rsp), %rax
	subq	%fs:40, %rax
	je	.L228
	call	__stack_chk_fail@PLT
.L228:
	addq	$2222696, %rsp
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3780:
	.size	main, .-main
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.globl	num_samples
	.data
	.align 4
	.type	num_samples, @object
	.size	num_samples, 4
num_samples:
	.long	209
	.section	.rodata
	.align 4
	.type	_ZL13train_samples, @object
	.size	_ZL13train_samples, 4
_ZL13train_samples:
	.long	209
	.globl	learning_rate
	.data
	.align 4
	.type	learning_rate, @object
	.size	learning_rate, 4
learning_rate:
	.long	1033476506
	.section	.rodata
	.align 4
	.type	_ZL3n_x, @object
	.size	_ZL3n_x, 4
_ZL3n_x:
	.long	784
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	-2147483648
	.long	0
	.long	0
	.long	0
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC1:
	.long	1065353216
	.align 4
.LC3:
	.long	-1147352863
	.align 4
.LC4:
	.long	1129381888
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC9:
	.long	0
	.long	1072693248
	.section	.rodata.cst4
	.align 4
.LC13:
	.long	1056964608
	.align 4
.LC17:
	.long	1112014848
	.section	.rodata.cst8
	.align 8
.LC25:
	.long	-1598689907
	.long	1051772663
	.hidden	DW.ref.__gxx_personality_v0
	.weak	DW.ref.__gxx_personality_v0
	.section	.data.rel.local.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
	.align 8
	.type	DW.ref.__gxx_personality_v0, @object
	.size	DW.ref.__gxx_personality_v0, 8
DW.ref.__gxx_personality_v0:
	.quad	__gxx_personality_v0
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <iostream>
#include <fstream>
#include <math.h>
#include <string>
#include <ctime>
#include <cstdlib>
#include <hip/hip_runtime.h>
#include <stdio.h>

const int n_x = 784; //Rozmiar warstwy wejsciowej, jednoczesnie rozmiar badanych obrazow (28x28)
const int n_h = 7;   //Ilosc neuronow w warstwie ukrytej
const int n_y = 1;   //Ilosc neuronow na wyjsciu sieci
float learning_rate = 0.075; //Predkosc uczenia
const int train_samples = 209; //Ilosc obrazow przechodzacych przez siec w fazie treningu
const int test_samples = 50;   //Ilosc obrazow przechodzacych przez siec w fazie testu
int num_samples = train_samples; //Aktualna ilosc obrazow przechodzacych przez siec
const int iter_num = 100;  //Ilosc przejsc zestawu treningowego przez siec
const int print_freq = 20;  //Czestotliwosc wyswietlania wartosci funkcji kosztu

//Struktura przechowujaca poszczegolne gradienty
struct grad_data {  
    float dW1[n_h][n_x];
    float dW2[n_y][n_h];
    float db1;
    float db2;
    float dA0[n_x][train_samples];
    float dA1[n_h][train_samples];
    float dA2[n_y][train_samples];
    float dZ1[n_h][train_samples];
    float dZ2[n_y][train_samples];
};

//Struktura przechowujaca parametry oraz wyjscia poszczegolnych warstw
struct param_data { 
    float train_x[n_x][train_samples];
    float test_x[n_x][test_samples];
    float train_y[n_y][train_samples];
    float test_y[n_y][test_samples];
    float W1[n_h][n_x];
    float W2[n_y][n_h];
    float b1;
    float b2;
    float A1[n_h][train_samples];
    float A2[n_y][train_samples];
    float Z1[n_h][train_samples];
    float Z2[n_y][train_samples];

    //Tablice pomocnicze
    float AT0[train_samples][n_x];
    float AT1[train_samples][n_h];
    float WT1[n_x][n_h];
    float WT2[n_h][n_y];
};

//Funkcje obslugujace struktury
void load_data(param_data&, grad_data&);
void delete_data(param_data&, grad_data&);

//Funkcja obliczajaca Z1 oraz dW1 
__global__ void kernel(float *arr1,float *arr2, float *arr_out, float *b, int *size_1, int *size_2)
{
    int x = blockIdx.x;
    int y = blockIdx.y;

    if((*size_1) == train_samples) { //Wtedy liczone jest dW1
        arr_out[x + (*size_2)*y] = 0;
        for(int i = 0; i < (*size_1) ; i++) 
            arr_out[x +(*size_2)*y] += (arr1[i + (*size_1)*y] * arr2[x + (*size_2)*i]) / train_samples;

    } else {                        //Wtedy liczone jest Z1
        arr_out[x + (*size_2)*y] = *b; 
        for(int i = 0; i < (*size_1) ; i++) 
            arr_out[x +(*size_2)*y] += (arr1[i + (*size_1)*y] * arr2[x + (*size_2)*i]); 

    } 
}

//Funkcja aktywacji warstwy wyjsciowej (Sigmoid)
void sigmoid(param_data &parameters) {
    int rows = 1;
    int cols = num_samples;

    for (int i = 0; i < rows; i++) {
        for (int j = 0; j < cols; j++) {
            parameters.A2[i][j] = 1 / (1 + exp(-parameters.Z2[i][j]));
        }
    }
}

//Funkcja aktywacji warstwy ukrytej (ReLu)
void relu(param_data &parameters) {
    int rows = n_h;
    int cols = num_samples;

    for (int i = 0; i < rows; i++) {
        for (int j = 0; j < cols; j++) {
            if (parameters.Z1[i][j] <= 0) parameters.A1[i][j] = 0;
            else parameters.A1[i][j] = parameters.Z1[i][j];
        }
    }
}

//Funkcja wyznaczajaca dZ1 za pomoca pochodnej z nieliniowej funkcji aktywacji (ReLu) oraz dA1
void relu_backward(param_data &parameters, grad_data &grads) {
    int rows = n_h;
    int cols = num_samples;

    for (int i = 0; i < rows; i++) {
        for (int j = 0; j < cols; j++) {
            if (parameters.Z1[i][j] <= 0) grads.dZ1[i][j] = 0;
            else grads.dZ1[i][j] = grads.dA1[i][j];
        }
    }
}

//Funkcja wyznaczajaca dZ2 za pomocą pochodnej z nieliniowej funkcji aktywacji (Sigmoid) oraz dA2 
void sigmoid_backward(param_data &parameters, grad_data &grads) {
    int rows = 1;
    int cols = num_samples;

    float s;
    for (int i = 0; i < rows; i++) {
        for (int j = 0; j < cols; j++) {
            s = 1 / (1 + exp(-parameters.Z2[i][j]));
            grads.dZ2[i][j] = grads.dA2[i][j] * s * (1 - s);
        }
    }
}

//Z1 = W1*X + b1    <-- liczone na GPU
void linear_forward_relu(param_data &parameters) {
    int rows_w = n_h;
    int cols_w = n_x;
    int rows_z = n_h;
    int cols_z = num_samples;
    float *arr1,*arr2,*arr_out, *b;
    int *size_1, *size_2;

    hipMalloc((void **)&arr1, rows_w*cols_w*sizeof(float));
    hipMalloc((void **)&arr2, cols_w*cols_z*sizeof(float));
    hipMalloc((void **)&arr_out, rows_z*cols_z*sizeof(float));
    hipMalloc((void **)&b, sizeof(float));
    hipMalloc((void **)&size_1, sizeof(int));
    hipMalloc((void **)&size_2, sizeof(int));

    hipMemcpy(arr1,parameters.W1, rows_w*cols_w*sizeof(float), hipMemcpyHostToDevice);
    hipMemcpy(arr2,parameters.train_x, n_x*cols_z*sizeof(float), hipMemcpyHostToDevice);
    hipMemcpy(b,&parameters.b1, sizeof(float), hipMemcpyHostToDevice);
    hipMemcpy(size_1,&n_x, sizeof(int), hipMemcpyHostToDevice);
    hipMemcpy(size_2,&num_samples, sizeof(int), hipMemcpyHostToDevice);

    dim3 grid(cols_z,rows_z);

    kernel<<<grid,1>>>(arr1,arr2,arr_out,b,size_1,size_2);
    //cudaDeviceSynchronize();

    hipMemcpy(parameters.Z1,arr_out,rows_z*cols_z*sizeof(float),hipMemcpyDeviceToHost);

    hipFree(arr1);
    hipFree(arr2);
    hipFree(arr_out);
    hipFree(b);
    hipFree(size_1);
    hipFree(size_2);

    // Alternatywny kod na CPU:
    // for (int i_z = 0; i_z < rows_z; i_z++) {
    //     for (int j_z = 0; j_z < cols_z; j_z++) {
    //         for (int j_w = 0; j_w < cols_w; j_w++) {
    //             parameters.Z1[i_z][j_z] += parameters.W1[i_z][j_w] * parameters.train_x[j_w][j_z];
    //         }
    //         parameters.Z1[i_z][j_z] += parameters.b1;
    //     }
    // } 
}

//Z2 = W2*A1 + b2  
void linear_forward_sigm(param_data &parameters) {
    int rows_w = n_y;
    int cols_w = n_h;
    int rows_z = n_y;
    int cols_z = num_samples;

    for (int i_z = 0; i_z < rows_z; i_z++) {
        for (int j_z = 0; j_z < cols_z; j_z++) {
            for (int j_w = 0; j_w < cols_w; j_w++) {
                parameters.Z2[i_z][j_z] += parameters.W2[i_z][j_w] * parameters.A1[j_w][j_z];
            }
            parameters.Z2[i_z][j_z] += parameters.b2;
        }
    }
}

//Funkcja wybierajaca tryb aktywacji
void linear_activation_forward(param_data &parameters, std::string activation) { 
    if (activation.compare("sigmoid") == 0) {
        linear_forward_sigm(parameters);
        sigmoid(parameters);
    }
    else {
        linear_forward_relu(parameters);
        relu(parameters);
    }
}

//Funkcja obliczajaca wartosc kosztu po pojedynczym przejsciu zestawu treningowego przez siec
float compute_cost(param_data &parameters) { 
    float cost = 0;
    float m = train_samples;

    for (int i = 0; i < m; i++) {
        cost += (-1 / m) * ( parameters.train_y[0][i] * log(parameters.A2[0][i]) + (1 - parameters.train_y[0][i]) * log(1 - parameters.A2[0][i]));
    }
    return cost;
}

//dW1 = (dZ1 * X.T) / train_samples  <-- liczone na GPU
//dA0 = (W1).T * dZ1                 <-- nie musi być liczone
//db1 = sum(dZ1) / train_samples     <-- liczone na CPU
void linear_backward_relu(param_data &parameters, grad_data &grads) { 
    int rows_dw1 = n_h;
    int cols_dw1 = n_x;
    int rows_dz1 = n_h;
    int cols_dz1 = train_samples;
    int rows_da0 = n_x;
    int cols_da0 = train_samples;
    int cols_wt1 = n_h;

    for (int i = 0; i < rows_da0; i++) {
        for (int j = 0; j < cols_da0; j++) {
            parameters.AT0[j][i] = parameters.train_x[i][j];
        }
    }

    for (int i = 0; i < rows_dw1; i++) {
        for (int j = 0; j < cols_dw1; j++) {
            parameters.WT1[j][i] = parameters.W1[i][j];
        }
    }

    for (int i = 0; i < rows_dz1; i++) {
        for (int j = 0; j < cols_dz1; j++) {
            grads.db1 += grads.dZ1[i][j] / train_samples;
        }
    }

    float *arr1,*arr2,*arr_out, *b;
    int *size_1, *size_2;

    hipMalloc((void **)&arr1, rows_dz1*cols_dz1*sizeof(float));
    hipMalloc((void **)&arr2, cols_da0*rows_da0*sizeof(float));
    hipMalloc((void **)&arr_out, rows_dw1*cols_dw1*sizeof(float));
    hipMalloc((void **)&b, sizeof(float));
    hipMalloc((void **)&size_1, sizeof(int));
    hipMalloc((void **)&size_2, sizeof(int));

    hipMemcpy(arr1, grads.dZ1, rows_dz1*cols_dz1*sizeof(float), hipMemcpyHostToDevice);
    hipMemcpy(arr2, parameters.AT0, cols_da0*rows_da0*sizeof(float), hipMemcpyHostToDevice);
    hipMemcpy(b, &parameters.b1, sizeof(float), hipMemcpyHostToDevice);
    hipMemcpy(size_1, &train_samples, sizeof(int), hipMemcpyHostToDevice);
    hipMemcpy(size_2, &n_x, sizeof(int), hipMemcpyHostToDevice);

    dim3 grid(cols_dw1,rows_dw1);

    kernel<<<grid,1>>>(arr1,arr2,arr_out,b,size_1,size_2);
   // cudaDeviceSynchronize();

    hipMemcpy(grads.dW1,arr_out,rows_dw1*cols_dw1*sizeof(float),hipMemcpyDeviceToHost);

    hipFree(arr1);
    hipFree(arr2);
    hipFree(arr_out);
    hipFree(b);
    hipFree(size_1);
    hipFree(size_2);

    //Alternatywna wersja na CPU:

    // for (int i_dw1 = 0; i_dw1 < rows_dw1; i_dw1++) {
    //     for (int j_dw1 = 0; j_dw1 < cols_dw1; j_dw1++) {
    //         for (int j_dz1 = 0; j_dz1 < cols_dz1; j_dz1++) {
    //             grads.dW1[i_dw1][j_dw1] += (grads.dZ1[i_dw1][j_dz1] * parameters.AT0[j_dz1][j_dw1]) / float(train_samples);
    //         }
    //     }
    // }

    // for (int i_da0 = 0; i_da0 < rows_da0; i_da0++) {
    //     for (int j_da0 = 0; j_da0 < cols_da0; j_da0++) {
    //         for (int j_wt1 = 0; j_wt1 < rows_dz1; j_wt1++) {
    //             grads.dA0[i_da0][j_da0] += parameters.WT1[i_da0][j_wt1] * grads.dZ1[j_wt1][j_da0];
    //         }
    //     }
    // }
}

//dW2 = dZ2 * (A1).T / train_samples   
//dA1 = (W2).T * dZ2                        <-- Wszystko liczone na CPU    
//db2 = sum(dZ2) /train_samples                
void linear_backward_sigm(param_data &parameters, grad_data &grads) {
    int rows_dw2 = n_y;
    int cols_dw2 = n_h;
    int rows_dz2 = n_y;
    int cols_dz2 = train_samples;
    int rows_da1 = n_h;
    int cols_da1 = train_samples;
    int cols_wt2 = n_y;


    for (int i = 0; i < rows_da1; i++) {
        for (int j = 0; j < cols_da1; j++) {
            parameters.AT1[j][i] = parameters.A1[i][j];
        }
    }

    for (int i = 0; i < rows_dw2; i++) {
        for (int j = 0; j < cols_dw2; j++) {
            parameters.WT2[j][i] = parameters.W2[i][j];
        }
    }


    for (int i = 0; i < rows_dz2; i++) {
        for (int j = 0; j < cols_dz2; j++) {
            grads.db2 += grads.dZ2[i][j] / train_samples;
        }
    }

    for (int i_dw2 = 0; i_dw2 < rows_dw2; i_dw2++) {
        for (int j_dw2 = 0; j_dw2 < cols_dw2; j_dw2++) {
            for (int j_dz2 = 0; j_dz2 < cols_dz2; j_dz2++) {
                grads.dW2[i_dw2][j_dw2] += (grads.dZ2[i_dw2][j_dz2] * parameters.AT1[j_dz2][j_dw2]) / train_samples;
            }
        }
    }


    for (int i_da1 = 0; i_da1 < rows_da1; i_da1++) {
        for (int j_da1 = 0; j_da1 < cols_da1; j_da1++) {
            for (int j_wt2 = 0; j_wt2 < cols_wt2; j_wt2++) {
                grads.dA1[i_da1][j_da1] += parameters.WT2[i_da1][j_wt2] * grads.dZ2[j_wt2][j_da1];
            }
        }
    }

}

//Funkcja wybierajaca tryb obliczania gradientow
void linear_activation_backward(param_data &parameters, grad_data &grads, std::string activation) {
    if (activation.compare("relu") == 0) {
        relu_backward(parameters, grads);
        linear_backward_relu(parameters, grads);
    }
    else {
        sigmoid_backward(parameters, grads);
        linear_backward_sigm(parameters, grads);
    }
}

//Aktualizowanie parametrów sieci po jednej iteracji
void update_parameters(param_data &parameters, grad_data &grads) {
    int rows_W1 = n_h;
    int cols_W1 = n_x;
    int rows_W2 = n_y;
    int cols_W2 = n_h;

    for (int i = 0; i < rows_W1; i++) {
        for (int j = 0; j < cols_W1; j++) {
            parameters.W1[i][j] -= learning_rate * grads.dW1[i][j];
        }
    }
    for (int i = 0; i < rows_W2; i++) {
        for (int j = 0; j < cols_W2; j++) {
            parameters.W2[i][j] -= learning_rate * grads.dW2[i][j];
        }
    }

    parameters.b1 -= learning_rate * grads.db1;
    parameters.b2 -= learning_rate * grads.db2;
    
}

//Glowna funkcja przechodzaca przez siec
void two_layer_model(param_data &parameters, grad_data &grads) {
    float cost = 0;

    for (int i = 0; i < iter_num + 1; i++) {
        delete_data(parameters, grads);

        linear_activation_forward(parameters, "relu");
        linear_activation_forward(parameters, "sigmoid");

        cost = compute_cost(parameters);

        for (int j = 0; j < train_samples; j++) {
            grads.dA2[0][j] = -((parameters.train_y[0][j] / parameters.A2[0][j]) - ((1. - parameters.train_y[0][j]) / (1. - parameters.A2[0][j])));
        }

        linear_activation_backward(parameters, grads, "sigmoid");
        linear_activation_backward(parameters, grads, "relu");

        update_parameters(parameters, grads);

        if (i % print_freq == 0) {
            std::cout << "Koszt po iteracji " << i << ": " << cost << "\n\n";
        }
    }

}

//Sprawdzanie skutecznosci sieci
void accuracy_check_train(param_data &parameters){
    float accuracy = 0;

    linear_activation_forward(parameters, "relu");
    linear_activation_forward(parameters, "sigmoid");

    for (int j = 0; j < train_samples; j++) {
            if(parameters.A2[0][j] >= 0.5 && parameters.train_y[0][j] == 1) accuracy += 1;
            else if(parameters.A2[0][j] < 0.5 && parameters.train_y[0][j] == 0) accuracy += 1;
    }

    std::cout << "Accuracy (training): " << accuracy / train_samples << "\n";

    num_samples = test_samples;
    accuracy = 0;

    linear_activation_forward(parameters, "relu");
    linear_activation_forward(parameters, "sigmoid");

    for (int j = 0; j < test_samples; j++) {
        if(parameters.A2[0][j] >= 0.5 && parameters.test_y[0][j] == 1) accuracy += 1;
        else if(parameters.A2[0][j] < 0.5 && parameters.test_y[0][j] == 0) accuracy += 1;
    }

    std::cout << "Accuracy (test): " << accuracy / test_samples << "\n";
}


int main() {
    param_data parameters;
    grad_data grads;

    load_data(parameters, grads);

    two_layer_model(parameters, grads);

    accuracy_check_train(parameters);

    return 0;
}

void load_data(param_data &parameters, grad_data &grads) {
    srand(time(NULL));

    std::cout << "Ladowanie zestawu treningowego i testowego.\n";

    std::string path = "train_x.txt";
    std::ifstream input(path.c_str());
    for (int i = 0; i < n_x; i++) 
        for (int j = 0; j < train_samples; j++) input >> parameters.train_x[i][j];

    path = "test_x.txt";
    std::ifstream input2(path.c_str());
    for (int i = 0; i < n_x; i++) 
        for (int j = 0; j < test_samples; j++) input2 >> parameters.test_x[i][j];

    
    std::cout << "Wczytano zestaw treningowy i testowy.\n";

    path = "train_y.txt";
    std::ifstream input3(path.c_str());
    for (int j = 0; j < train_samples; j++) input3 >> parameters.train_y[0][j];
    

    path = "test_y.txt";
    std::ifstream input4(path.c_str());
    for (int j = 0; j < test_samples; j++) input4 >> parameters.test_y[0][j];
    

    std::cout << "Wczytano zestaw klas.\n";

    for (int i = 0; i < n_h; i++) 
        for (int j = 0; j < n_x; j++) parameters.W1[i][j] = (rand()%10000 - 5000) * 0.000001;

    for (int i = 0; i < n_y; i++) 
        for (int j = 0; j < n_h; j++) parameters.W2[i][j] = (rand()%10000 - 5000) * 0.000001;

    parameters.b1 = 0;
    parameters.b2 = 0;
    grads.db1 = 0;
    grads.db2 = 0;
   
    for (int i = 0; i < n_h; i++) 
        for (int j = 0; j < train_samples; j++) parameters.Z1[i][j] = 0;

    for (int i = 0; i < n_y; i++) 
        for (int j = 0; j < train_samples; j++) parameters.Z2[i][j] = 0;
}

void delete_data(param_data& parameters, grad_data& grads) {

    for (int i = 0; i < n_h; i++) 
        for (int j = 0; j < train_samples; j++) 
            parameters.Z1[i][j] = 0;

    for (int i = 0; i < n_y; i++) 
        for (int j = 0; j < train_samples; j++) 
            parameters.Z2[i][j] = 0;
  
    for (int i = 0; i < n_h; i++) 
        for (int j = 0; j < train_samples; j++) 
            parameters.A1[i][j] = 0;

    for (int i = 0; i < n_y; i++) 
        for (int j = 0; j < train_samples; j++) 
            parameters.A2[i][j] = 0;

    for (int i = 0; i < n_h; i++) 
        for (int j = 0; j < n_x; j++) 
            grads.dW1[i][j] = 0;

    for (int i = 0; i < n_y; i++) 
        for (int j = 0; j < n_h; j++) 
            grads.dW2[i][j] = 0;

    for (int i = 0; i < n_h; i++) 
        for (int j = 0; j < train_samples; j++) 
            grads.dA1[i][j] = 0;

    for (int i = 0; i < n_y; i++) 
        for (int j = 0; j < train_samples; j++) 
            grads.dA2[i][j] = 0;

    for (int i = 0; i < n_h; i++) 
        for (int j = 0; j < train_samples; j++) 
            grads.dZ1[i][j] = 0;

    for (int i = 0; i < n_y; i++) 
        for (int j = 0; j < train_samples; j++) 
            grads.dZ2[i][j] = 0;

    for (int i = 0; i < n_x; i++) 
        for (int j = 0; j < train_samples; j++)
            grads.dA0[i][j] = 0;

    grads.db1 = 0;
    grads.db2 = 0;

}

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

                                        # End of file scope inline assembly
	.globl	_Z21__device_stub__kernelPfS_S_S_PiS0_ # -- Begin function _Z21__device_stub__kernelPfS_S_S_PiS0_
	.type	_Z21__device_stub__kernelPfS_S_S_PiS0_,@function
_Z21__device_stub__kernelPfS_S_S_PiS0_: # @_Z21__device_stub__kernelPfS_S_S_PiS0_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$144, %rsp
	.cfi_def_cfa_offset 192
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	56(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	48(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	32(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	24(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	16(%rsp), %r8
	movq	%r9, (%r8)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	movq	%r8, 40(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	8(%rsp), %r12
	movq	%rsp, %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z6kernelPfS_S_S_PiS0_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$160, %rsp
	.cfi_adjust_cfa_offset -160
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z21__device_stub__kernelPfS_S_S_PiS0_, .Lfunc_end0-_Z21__device_stub__kernelPfS_S_S_PiS0_
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0                          # -- Begin function _Z7sigmoidR10param_data
.LCPI1_0:
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0
.LCPI1_1:
	.long	0x3f800000                      # float 1
	.text
	.globl	_Z7sigmoidR10param_data
	.type	_Z7sigmoidR10param_data,@function
_Z7sigmoidR10param_data:                # @_Z7sigmoidR10param_data
	.cfi_startproc
# %bb.0:                                # %.critedge
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movl	num_samples(%rip), %r14d
	testl	%r14d, %r14d
	jle	.LBB1_3
# %bb.1:                                # %.lr.ph
	movq	%rdi, %rbx
	xorl	%r15d, %r15d
.LBB1_2:                                # =>This Inner Loop Header: Depth=1
	movss	847788(%rbx,%r15,4), %xmm0      # xmm0 = mem[0],zero,zero,zero
	xorps	.LCPI1_0(%rip), %xmm0
	callq	expf
	movss	.LCPI1_1(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	addss	%xmm1, %xmm0
	divss	%xmm0, %xmm1
	movss	%xmm1, 841100(%rbx,%r15,4)
	incq	%r15
	cmpq	%r15, %r14
	jne	.LBB1_2
.LBB1_3:                                # %._crit_edge
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end1:
	.size	_Z7sigmoidR10param_data, .Lfunc_end1-_Z7sigmoidR10param_data
	.cfi_endproc
                                        # -- End function
	.globl	_Z4reluR10param_data            # -- Begin function _Z4reluR10param_data
	.type	_Z4reluR10param_data,@function
_Z4reluR10param_data:                   # @_Z4reluR10param_data
	.cfi_startproc
# %bb.0:
	movl	num_samples(%rip), %eax
	addq	$841936, %rdi                   # imm = 0xCD8D0
	xorl	%ecx, %ecx
	xorps	%xmm0, %xmm0
.LBB2_1:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_3 Depth 2
	testl	%eax, %eax
	jle	.LBB2_4
# %bb.2:                                # %.lr.ph.preheader
                                        #   in Loop: Header=BB2_1 Depth=1
	xorl	%edx, %edx
.LBB2_3:                                # %.lr.ph
                                        #   Parent Loop BB2_1 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rdi,%rdx,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	movaps	%xmm1, %xmm2
	cmpless	%xmm0, %xmm2
	andnps	%xmm1, %xmm2
	movss	%xmm2, -6688(%rdi,%rdx,4)
	incq	%rdx
	cmpq	%rdx, %rax
	jne	.LBB2_3
.LBB2_4:                                # %._crit_edge
                                        #   in Loop: Header=BB2_1 Depth=1
	incq	%rcx
	addq	$836, %rdi                      # imm = 0x344
	cmpq	$7, %rcx
	jne	.LBB2_1
# %bb.5:
	retq
.Lfunc_end2:
	.size	_Z4reluR10param_data, .Lfunc_end2-_Z4reluR10param_data
	.cfi_endproc
                                        # -- End function
	.globl	_Z13relu_backwardR10param_dataR9grad_data # -- Begin function _Z13relu_backwardR10param_dataR9grad_data
	.type	_Z13relu_backwardR10param_dataR9grad_data,@function
_Z13relu_backwardR10param_dataR9grad_data: # @_Z13relu_backwardR10param_dataR9grad_data
	.cfi_startproc
# %bb.0:
	movl	num_samples(%rip), %eax
	addq	$684100, %rsi                   # imm = 0xA7044
	addq	$841936, %rdi                   # imm = 0xCD8D0
	xorl	%ecx, %ecx
	movl	$836, %edx                      # imm = 0x344
.LBB3_1:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB3_3 Depth 2
	testl	%eax, %eax
	jle	.LBB3_6
# %bb.2:                                # %.lr.ph.preheader
                                        #   in Loop: Header=BB3_1 Depth=1
	xorl	%r8d, %r8d
.LBB3_3:                                # %.lr.ph
                                        #   Parent Loop BB3_1 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	xorps	%xmm0, %xmm0
	ucomiss	(%rdi,%r8,4), %xmm0
	jae	.LBB3_5
# %bb.4:                                #   in Loop: Header=BB3_3 Depth=2
	movss	-6688(%rsi,%r8,4), %xmm0        # xmm0 = mem[0],zero,zero,zero
.LBB3_5:                                #   in Loop: Header=BB3_3 Depth=2
	movss	%xmm0, (%rsi,%r8,4)
	incq	%r8
	cmpq	%r8, %rax
	jne	.LBB3_3
.LBB3_6:                                # %._crit_edge
                                        #   in Loop: Header=BB3_1 Depth=1
	incq	%rcx
	addq	%rdx, %rsi
	addq	%rdx, %rdi
	cmpq	$7, %rcx
	jne	.LBB3_1
# %bb.7:
	retq
.Lfunc_end3:
	.size	_Z13relu_backwardR10param_dataR9grad_data, .Lfunc_end3-_Z13relu_backwardR10param_dataR9grad_data
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0                          # -- Begin function _Z16sigmoid_backwardR10param_dataR9grad_data
.LCPI4_0:
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0
.LCPI4_1:
	.long	0x3f800000                      # float 1
	.text
	.globl	_Z16sigmoid_backwardR10param_dataR9grad_data
	.type	_Z16sigmoid_backwardR10param_dataR9grad_data,@function
_Z16sigmoid_backwardR10param_dataR9grad_data: # @_Z16sigmoid_backwardR10param_dataR9grad_data
	.cfi_startproc
# %bb.0:                                # %.critedge
	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
	movl	num_samples(%rip), %r15d
	testl	%r15d, %r15d
	jle	.LBB4_3
# %bb.1:                                # %.lr.ph
	movq	%rsi, %rbx
	movq	%rdi, %r14
	xorl	%r12d, %r12d
.LBB4_2:                                # =>This Inner Loop Header: Depth=1
	movss	847788(%r14,%r12,4), %xmm0      # xmm0 = mem[0],zero,zero,zero
	xorps	.LCPI4_0(%rip), %xmm0
	callq	expf
	movss	.LCPI4_1(%rip), %xmm2           # xmm2 = mem[0],zero,zero,zero
	addss	%xmm2, %xmm0
	movaps	%xmm2, %xmm1
	divss	%xmm0, %xmm1
	movaps	%xmm2, %xmm0
	subss	%xmm1, %xmm0
	mulss	683264(%rbx,%r12,4), %xmm1
	mulss	%xmm0, %xmm1
	movss	%xmm1, 689952(%rbx,%r12,4)
	incq	%r12
	cmpq	%r12, %r15
	jne	.LBB4_2
.LBB4_3:                                # %._crit_edge
	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_end4:
	.size	_Z16sigmoid_backwardR10param_dataR9grad_data, .Lfunc_end4-_Z16sigmoid_backwardR10param_dataR9grad_data
	.cfi_endproc
                                        # -- End function
	.globl	_Z19linear_forward_reluR10param_data # -- Begin function _Z19linear_forward_reluR10param_data
	.type	_Z19linear_forward_reluR10param_data,@function
_Z19linear_forward_reluR10param_data:   # @_Z19linear_forward_reluR10param_data
	.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
	movq	%rdi, %rbx
	movl	num_samples(%rip), %ebp
	movslq	%ebp, %r12
	leaq	32(%rsp), %rdi
	movl	$21952, %esi                    # imm = 0x55C0
	callq	hipMalloc
	imulq	$3136, %r12, %r15               # imm = 0xC40
	leaq	24(%rsp), %rdi
	movq	%r15, %rsi
	callq	hipMalloc
	leaq	(%r12,%r12,8), %rax
	leaq	(%rax,%rax,2), %r14
	addq	%r12, %r14
	leaq	16(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	leaq	48(%rsp), %r13
	movl	$4, %esi
	movq	%r13, %rdi
	callq	hipMalloc
	leaq	40(%rsp), %r12
	movl	$4, %esi
	movq	%r12, %rdi
	callq	hipMalloc
	leaq	8(%rsp), %rdi
	movl	$4, %esi
	callq	hipMalloc
	leaq	32(%rsp), %rax
	movq	(%rax), %rdi
	leaq	813260(%rbx), %rsi
	movl	$21952, %edx                    # imm = 0x55C0
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	24(%rsp), %rax
	movq	(%rax), %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%r13), %rdi
	leaq	835240(%rbx), %rsi
	movl	$4, %edx
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%r12), %rdi
	movl	$_ZL3n_x, %esi
	movl	$4, %edx
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	8(%rsp), %rax
	movq	(%rax), %rdi
	movl	$num_samples, %esi
	movl	$4, %edx
	movl	$1, %ecx
	callq	hipMemcpy
	movabsq	$30064771072, %rdi              # imm = 0x700000000
	orq	%rbp, %rdi
	movabsq	$4294967297, %rdx               # imm = 0x100000001
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB5_2
# %bb.1:
	movq	32(%rsp), %rdi
	movq	24(%rsp), %rsi
	movq	16(%rsp), %rdx
	movq	48(%rsp), %rcx
	movq	40(%rsp), %r8
	movq	8(%rsp), %r9
	callq	_Z21__device_stub__kernelPfS_S_S_PiS0_
.LBB5_2:
	addq	$841936, %rbx                   # imm = 0xCD8D0
	movq	16(%rsp), %rsi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	32(%rsp), %rdi
	callq	hipFree
	movq	24(%rsp), %rdi
	callq	hipFree
	movq	16(%rsp), %rdi
	callq	hipFree
	movq	48(%rsp), %rdi
	callq	hipFree
	movq	40(%rsp), %rdi
	callq	hipFree
	movq	8(%rsp), %rdi
	callq	hipFree
	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
	retq
.Lfunc_end5:
	.size	_Z19linear_forward_reluR10param_data, .Lfunc_end5-_Z19linear_forward_reluR10param_data
	.cfi_endproc
                                        # -- End function
	.globl	_Z19linear_forward_sigmR10param_data # -- Begin function _Z19linear_forward_sigmR10param_data
	.type	_Z19linear_forward_sigmR10param_data,@function
_Z19linear_forward_sigmR10param_data:   # @_Z19linear_forward_sigmR10param_data
	.cfi_startproc
# %bb.0:                                # %.critedge
	movl	num_samples(%rip), %eax
	testl	%eax, %eax
	jle	.LBB6_5
# %bb.1:                                # %.preheader.lr.ph
	leaq	835212(%rdi), %rcx
	movss	835244(%rdi), %xmm0             # xmm0 = mem[0],zero,zero,zero
	leaq	835248(%rdi), %rdx
	xorl	%esi, %esi
.LBB6_2:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB6_3 Depth 2
	movss	847788(%rdi,%rsi,4), %xmm1      # xmm1 = mem[0],zero,zero,zero
	xorl	%r8d, %r8d
	movq	%rcx, %r9
.LBB6_3:                                #   Parent Loop BB6_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%r9), %xmm2                    # xmm2 = mem[0],zero,zero,zero
	mulss	(%rdx,%r8,4), %xmm2
	addss	%xmm2, %xmm1
	movss	%xmm1, 847788(%rdi,%rsi,4)
	addq	$4, %r9
	addq	$209, %r8
	cmpq	$1463, %r8                      # imm = 0x5B7
	jne	.LBB6_3
# %bb.4:                                #   in Loop: Header=BB6_2 Depth=1
	addss	%xmm0, %xmm1
	movss	%xmm1, 847788(%rdi,%rsi,4)
	incq	%rsi
	addq	$4, %rdx
	cmpq	%rax, %rsi
	jne	.LBB6_2
.LBB6_5:                                # %._crit_edge
	retq
.Lfunc_end6:
	.size	_Z19linear_forward_sigmR10param_data, .Lfunc_end6-_Z19linear_forward_sigmR10param_data
	.cfi_endproc
                                        # -- End function
	.globl	_Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE # -- Begin function _Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.type	_Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE,@function
_Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: # @_Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	%rsi, %rax
	movq	%rdi, %rbx
	movl	$.L.str, %esi
	movq	%rax, %rdi
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc
	movq	%rbx, %rdi
	testl	%eax, %eax
	je	.LBB7_7
# %bb.1:
	callq	_Z19linear_forward_reluR10param_data
	movl	num_samples(%rip), %eax
	addq	$841936, %rbx                   # imm = 0xCD8D0
	xorl	%ecx, %ecx
	xorps	%xmm0, %xmm0
.LBB7_2:                                # %.preheader.i
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB7_4 Depth 2
	testl	%eax, %eax
	jle	.LBB7_5
# %bb.3:                                # %.lr.ph.i.preheader
                                        #   in Loop: Header=BB7_2 Depth=1
	xorl	%edx, %edx
.LBB7_4:                                # %.lr.ph.i
                                        #   Parent Loop BB7_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rbx,%rdx,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	movaps	%xmm1, %xmm2
	cmpless	%xmm0, %xmm2
	andnps	%xmm1, %xmm2
	movss	%xmm2, -6688(%rbx,%rdx,4)
	incq	%rdx
	cmpq	%rdx, %rax
	jne	.LBB7_4
.LBB7_5:                                # %._crit_edge.i
                                        #   in Loop: Header=BB7_2 Depth=1
	incq	%rcx
	addq	$836, %rbx                      # imm = 0x344
	cmpq	$7, %rcx
	jne	.LBB7_2
# %bb.6:                                # %_Z4reluR10param_data.exit
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.LBB7_7:
	.cfi_def_cfa_offset 16
	callq	_Z19linear_forward_sigmR10param_data
	movq	%rbx, %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	_Z7sigmoidR10param_data         # TAILCALL
.Lfunc_end7:
	.size	_Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, .Lfunc_end7-_Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z12compute_costR10param_data
.LCPI8_0:
	.long	0x3f800000                      # float 1
.LCPI8_1:
	.long	0xbb9cc8e1                      # float -0.00478468882
	.text
	.globl	_Z12compute_costR10param_data
	.type	_Z12compute_costR10param_data,@function
_Z12compute_costR10param_data:          # @_Z12compute_costR10param_data
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movq	%rdi, %rbx
	xorps	%xmm0, %xmm0
	xorl	%r14d, %r14d
.LBB8_1:                                # =>This Inner Loop Header: Depth=1
	movss	%xmm0, 16(%rsp)                 # 4-byte Spill
	movss	812224(%rbx,%r14,4), %xmm0      # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 12(%rsp)                 # 4-byte Spill
	movss	841100(%rbx,%r14,4), %xmm0      # xmm0 = mem[0],zero,zero,zero
	callq	logf
	movaps	%xmm0, %xmm1
	movss	.LCPI8_0(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	movaps	%xmm0, %xmm2
	subss	812224(%rbx,%r14,4), %xmm2
	movss	%xmm2, 20(%rsp)                 # 4-byte Spill
	mulss	12(%rsp), %xmm1                 # 4-byte Folded Reload
	movss	%xmm1, 12(%rsp)                 # 4-byte Spill
	subss	841100(%rbx,%r14,4), %xmm0
	callq	logf
	mulss	20(%rsp), %xmm0                 # 4-byte Folded Reload
	addss	12(%rsp), %xmm0                 # 4-byte Folded Reload
	mulss	.LCPI8_1(%rip), %xmm0
	movss	16(%rsp), %xmm1                 # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	addss	%xmm0, %xmm1
	movss	%xmm1, 16(%rsp)                 # 4-byte Spill
	movss	16(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	incq	%r14
	cmpq	$209, %r14
	jne	.LBB8_1
# %bb.2:
	addq	$24, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end8:
	.size	_Z12compute_costR10param_data, .Lfunc_end8-_Z12compute_costR10param_data
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z20linear_backward_reluR10param_dataR9grad_data
.LCPI9_0:
	.long	0x43510000                      # float 209
	.text
	.globl	_Z20linear_backward_reluR10param_dataR9grad_data
	.type	_Z20linear_backward_reluR10param_dataR9grad_data,@function
_Z20linear_backward_reluR10param_dataR9grad_data: # @_Z20linear_backward_reluR10param_dataR9grad_data
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	848624(%rdi), %rax
	xorl	%ecx, %ecx
	movq	%rdi, %rdx
.LBB9_1:                                # %.preheader64
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB9_2 Depth 2
	movq	%rax, %rsi
	xorl	%edi, %edi
.LBB9_2:                                #   Parent Loop BB9_1 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rdx,%rdi,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rsi)
	incq	%rdi
	addq	$3136, %rsi                     # imm = 0xC40
	cmpq	$209, %rdi
	jne	.LBB9_2
# %bb.3:                                #   in Loop: Header=BB9_1 Depth=1
	incq	%rcx
	addq	$836, %rdx                      # imm = 0x344
	addq	$4, %rax
	cmpq	$784, %rcx                      # imm = 0x310
	jne	.LBB9_1
# %bb.4:                                # %.preheader62.preheader
	leaq	813260(%r14), %rax
	leaq	1509900(%r14), %rcx
	xorl	%edx, %edx
.LBB9_5:                                # %.preheader62
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB9_6 Depth 2
	movq	%rcx, %rsi
	xorl	%edi, %edi
.LBB9_6:                                #   Parent Loop BB9_5 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rax,%rdi,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rsi)
	incq	%rdi
	addq	$28, %rsi
	cmpq	$784, %rdi                      # imm = 0x310
	jne	.LBB9_6
# %bb.7:                                #   in Loop: Header=BB9_5 Depth=1
	incq	%rdx
	addq	$3136, %rax                     # imm = 0xC40
	addq	$4, %rcx
	cmpq	$7, %rdx
	jne	.LBB9_5
# %bb.8:                                # %.preheader61
	movss	21980(%rbx), %xmm0              # xmm0 = mem[0],zero,zero,zero
	leaq	684100(%rbx), %rax
	xorl	%ecx, %ecx
	movss	.LCPI9_0(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
.LBB9_9:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB9_10 Depth 2
	xorl	%edx, %edx
.LBB9_10:                               #   Parent Loop BB9_9 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rax,%rdx,4), %xmm2            # xmm2 = mem[0],zero,zero,zero
	divss	%xmm1, %xmm2
	addss	%xmm2, %xmm0
	incq	%rdx
	cmpq	$209, %rdx
	jne	.LBB9_10
# %bb.11:                               #   in Loop: Header=BB9_9 Depth=1
	incq	%rcx
	addq	$836, %rax                      # imm = 0x344
	cmpq	$7, %rcx
	jne	.LBB9_9
# %bb.12:
	movss	%xmm0, 21980(%rbx)
	leaq	48(%rsp), %rbp
	movl	$5852, %esi                     # imm = 0x16DC
	movq	%rbp, %rdi
	callq	hipMalloc
	leaq	40(%rsp), %r12
	movl	$655424, %esi                   # imm = 0xA0040
	movq	%r12, %rdi
	callq	hipMalloc
	leaq	16(%rsp), %rdi
	movl	$21952, %esi                    # imm = 0x55C0
	callq	hipMalloc
	leaq	32(%rsp), %r15
	movl	$4, %esi
	movq	%r15, %rdi
	callq	hipMalloc
	leaq	24(%rsp), %r13
	movl	$4, %esi
	movq	%r13, %rdi
	callq	hipMalloc
	leaq	8(%rsp), %rdi
	movl	$4, %esi
	callq	hipMalloc
	movq	(%rbp), %rdi
	leaq	684100(%rbx), %rsi
	movl	$5852, %edx                     # imm = 0x16DC
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%r12), %rdi
	leaq	848624(%r14), %rsi
	movl	$655424, %edx                   # imm = 0xA0040
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%r15), %rdi
	addq	$835240, %r14                   # imm = 0xCBEA8
	movl	$4, %edx
	movq	%r14, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%r13), %rdi
	movl	$_ZL13train_samples, %esi
	movl	$4, %edx
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	8(%rsp), %rax
	movq	(%rax), %rdi
	movl	$_ZL3n_x, %esi
	movl	$4, %edx
	movl	$1, %ecx
	callq	hipMemcpy
	movabsq	$30064771856, %rdi              # imm = 0x700000310
	movabsq	$4294967297, %rdx               # imm = 0x100000001
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB9_14
# %bb.13:
	movq	48(%rsp), %rdi
	movq	40(%rsp), %rsi
	movq	16(%rsp), %rdx
	movq	32(%rsp), %rcx
	movq	24(%rsp), %r8
	movq	8(%rsp), %r9
	callq	_Z21__device_stub__kernelPfS_S_S_PiS0_
.LBB9_14:
	movq	16(%rsp), %rsi
	movl	$21952, %edx                    # imm = 0x55C0
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	48(%rsp), %rdi
	callq	hipFree
	movq	40(%rsp), %rdi
	callq	hipFree
	movq	16(%rsp), %rdi
	callq	hipFree
	movq	32(%rsp), %rdi
	callq	hipFree
	movq	24(%rsp), %rdi
	callq	hipFree
	movq	8(%rsp), %rdi
	callq	hipFree
	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
	retq
.Lfunc_end9:
	.size	_Z20linear_backward_reluR10param_dataR9grad_data, .Lfunc_end9-_Z20linear_backward_reluR10param_dataR9grad_data
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z20linear_backward_sigmR10param_dataR9grad_data
.LCPI10_0:
	.long	0x43510000                      # float 209
	.text
	.globl	_Z20linear_backward_sigmR10param_dataR9grad_data
	.type	_Z20linear_backward_sigmR10param_dataR9grad_data,@function
_Z20linear_backward_sigmR10param_dataR9grad_data: # @_Z20linear_backward_sigmR10param_dataR9grad_data
	.cfi_startproc
# %bb.0:
	leaq	835248(%rdi), %rax
	leaq	1504048(%rdi), %rcx
	xorl	%edx, %edx
.LBB10_1:                               # %.preheader86
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB10_2 Depth 2
	movq	%rcx, %r8
	xorl	%r9d, %r9d
.LBB10_2:                               #   Parent Loop BB10_1 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rax,%r9,4), %xmm0             # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%r8)
	incq	%r9
	addq	$28, %r8
	cmpq	$209, %r9
	jne	.LBB10_2
# %bb.3:                                #   in Loop: Header=BB10_1 Depth=1
	incq	%rdx
	addq	$836, %rax                      # imm = 0x344
	addq	$4, %rcx
	cmpq	$7, %rdx
	jne	.LBB10_1
# %bb.4:                                # %.preheader85
	xorl	%eax, %eax
.LBB10_5:                               # =>This Inner Loop Header: Depth=1
	movss	835212(%rdi,%rax,4), %xmm0      # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 1531852(%rdi,%rax,4)
	incq	%rax
	cmpq	$7, %rax
	jne	.LBB10_5
# %bb.6:                                # %.critedge.preheader
	movss	21984(%rsi), %xmm1              # xmm1 = mem[0],zero,zero,zero
	xorl	%eax, %eax
	movss	.LCPI10_0(%rip), %xmm0          # xmm0 = mem[0],zero,zero,zero
.LBB10_7:                               # %.critedge
                                        # =>This Inner Loop Header: Depth=1
	movss	689952(%rsi,%rax,4), %xmm2      # xmm2 = mem[0],zero,zero,zero
	divss	%xmm0, %xmm2
	addss	%xmm2, %xmm1
	incq	%rax
	cmpq	$209, %rax
	jne	.LBB10_7
# %bb.8:                                # %.critedge80.preheader
	movss	%xmm1, 21984(%rsi)
	leaq	1504048(%rdi), %rax
	xorl	%ecx, %ecx
.LBB10_9:                               # %.preheader84
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB10_10 Depth 2
	movss	21952(%rsi,%rcx,4), %xmm1       # xmm1 = mem[0],zero,zero,zero
	movq	%rax, %rdx
	xorl	%r8d, %r8d
.LBB10_10:                              #   Parent Loop BB10_9 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	689952(%rsi,%r8,4), %xmm2       # xmm2 = mem[0],zero,zero,zero
	mulss	(%rdx), %xmm2
	divss	%xmm0, %xmm2
	addss	%xmm2, %xmm1
	movss	%xmm1, 21952(%rsi,%rcx,4)
	incq	%r8
	addq	$28, %rdx
	cmpq	$209, %r8
	jne	.LBB10_10
# %bb.11:                               # %.critedge80
                                        #   in Loop: Header=BB10_9 Depth=1
	incq	%rcx
	addq	$4, %rax
	cmpq	$7, %rcx
	jne	.LBB10_9
# %bb.12:                               # %.preheader.preheader
	leaq	677412(%rsi), %rax
	xorl	%ecx, %ecx
.LBB10_13:                              # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB10_14 Depth 2
	xorl	%edx, %edx
.LBB10_14:                              # %.critedge83
                                        #   Parent Loop BB10_13 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	1531852(%rdi,%rcx,4), %xmm0     # xmm0 = mem[0],zero,zero,zero
	mulss	689952(%rsi,%rdx,4), %xmm0
	addss	(%rax,%rdx,4), %xmm0
	movss	%xmm0, (%rax,%rdx,4)
	incq	%rdx
	cmpq	$209, %rdx
	jne	.LBB10_14
# %bb.15:                               # %.critedge81
                                        #   in Loop: Header=BB10_13 Depth=1
	incq	%rcx
	addq	$836, %rax                      # imm = 0x344
	cmpq	$7, %rcx
	jne	.LBB10_13
# %bb.16:
	retq
.Lfunc_end10:
	.size	_Z20linear_backward_sigmR10param_dataR9grad_data, .Lfunc_end10-_Z20linear_backward_sigmR10param_dataR9grad_data
	.cfi_endproc
                                        # -- End function
	.globl	_Z26linear_activation_backwardR10param_dataR9grad_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE # -- Begin function _Z26linear_activation_backwardR10param_dataR9grad_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.type	_Z26linear_activation_backwardR10param_dataR9grad_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE,@function
_Z26linear_activation_backwardR10param_dataR9grad_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: # @_Z26linear_activation_backwardR10param_dataR9grad_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	$.L.str.1, %esi
	movq	%rdx, %rdi
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc
	testl	%eax, %eax
	je	.LBB11_1
# %bb.9:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_Z16sigmoid_backwardR10param_dataR9grad_data
	movq	%r14, %rdi
	movq	%rbx, %rsi
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	jmp	_Z20linear_backward_sigmR10param_dataR9grad_data # TAILCALL
.LBB11_1:
	.cfi_def_cfa_offset 32
	movl	num_samples(%rip), %eax
	leaq	684100(%rbx), %rcx
	leaq	841936(%r14), %rdx
	xorl	%esi, %esi
	movl	$836, %edi                      # imm = 0x344
.LBB11_2:                               # %.preheader.i
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB11_4 Depth 2
	testl	%eax, %eax
	jle	.LBB11_7
# %bb.3:                                # %.lr.ph.i.preheader
                                        #   in Loop: Header=BB11_2 Depth=1
	xorl	%r8d, %r8d
.LBB11_4:                               # %.lr.ph.i
                                        #   Parent Loop BB11_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	xorps	%xmm0, %xmm0
	ucomiss	(%rdx,%r8,4), %xmm0
	jae	.LBB11_6
# %bb.5:                                #   in Loop: Header=BB11_4 Depth=2
	movss	-6688(%rcx,%r8,4), %xmm0        # xmm0 = mem[0],zero,zero,zero
.LBB11_6:                               #   in Loop: Header=BB11_4 Depth=2
	movss	%xmm0, (%rcx,%r8,4)
	incq	%r8
	cmpq	%r8, %rax
	jne	.LBB11_4
.LBB11_7:                               # %._crit_edge.i
                                        #   in Loop: Header=BB11_2 Depth=1
	incq	%rsi
	addq	%rdi, %rcx
	addq	%rdi, %rdx
	cmpq	$7, %rsi
	jne	.LBB11_2
# %bb.8:                                # %_Z13relu_backwardR10param_dataR9grad_data.exit
	movq	%r14, %rdi
	movq	%rbx, %rsi
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	jmp	_Z20linear_backward_reluR10param_dataR9grad_data # TAILCALL
.Lfunc_end11:
	.size	_Z26linear_activation_backwardR10param_dataR9grad_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, .Lfunc_end11-_Z26linear_activation_backwardR10param_dataR9grad_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.cfi_endproc
                                        # -- End function
	.globl	_Z17update_parametersR10param_dataR9grad_data # -- Begin function _Z17update_parametersR10param_dataR9grad_data
	.type	_Z17update_parametersR10param_dataR9grad_data,@function
_Z17update_parametersR10param_dataR9grad_data: # @_Z17update_parametersR10param_dataR9grad_data
	.cfi_startproc
# %bb.0:
	movss	learning_rate(%rip), %xmm0      # xmm0 = mem[0],zero,zero,zero
	leaq	813260(%rdi), %rax
	xorl	%ecx, %ecx
	movl	$3136, %edx                     # imm = 0xC40
	movq	%rsi, %r8
.LBB12_1:                               # %.preheader30
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB12_2 Depth 2
	xorl	%r9d, %r9d
.LBB12_2:                               #   Parent Loop BB12_1 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%r8,%r9,4), %xmm1              # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	movss	(%rax,%r9,4), %xmm2             # xmm2 = mem[0],zero,zero,zero
	subss	%xmm1, %xmm2
	movss	%xmm2, (%rax,%r9,4)
	incq	%r9
	cmpq	$784, %r9                       # imm = 0x310
	jne	.LBB12_2
# %bb.3:                                #   in Loop: Header=BB12_1 Depth=1
	incq	%rcx
	addq	%rdx, %r8
	addq	%rdx, %rax
	cmpq	$7, %rcx
	jne	.LBB12_1
# %bb.4:                                # %.preheader
	xorl	%eax, %eax
.LBB12_5:                               # =>This Inner Loop Header: Depth=1
	movss	21952(%rsi,%rax,4), %xmm1       # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	movss	835212(%rdi,%rax,4), %xmm2      # xmm2 = mem[0],zero,zero,zero
	subss	%xmm1, %xmm2
	movss	%xmm2, 835212(%rdi,%rax,4)
	incq	%rax
	cmpq	$7, %rax
	jne	.LBB12_5
# %bb.6:                                # %.critedge
	movss	21980(%rsi), %xmm1              # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	movss	835240(%rdi), %xmm2             # xmm2 = mem[0],zero,zero,zero
	subss	%xmm1, %xmm2
	movss	835244(%rdi), %xmm1             # xmm1 = mem[0],zero,zero,zero
	movss	%xmm2, 835240(%rdi)
	mulss	21984(%rsi), %xmm0
	subss	%xmm0, %xmm1
	movss	%xmm1, 835244(%rdi)
	retq
.Lfunc_end12:
	.size	_Z17update_parametersR10param_dataR9grad_data, .Lfunc_end12-_Z17update_parametersR10param_dataR9grad_data
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z15two_layer_modelR10param_dataR9grad_data
.LCPI13_0:
	.quad	0x3ff0000000000000              # double 1
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0
.LCPI13_1:
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.text
	.globl	_Z15two_layer_modelR10param_dataR9grad_data
	.type	_Z15two_layer_modelR10param_dataR9grad_data,@function
_Z15two_layer_modelR10param_dataR9grad_data: # @_Z15two_layer_modelR10param_dataR9grad_data
.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	$152, %rsp
	.cfi_def_cfa_offset 208
	.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, %rbx
	movq	%rdi, %r14
	leaq	835248(%rdi), %rax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	leaq	104(%rsp), %r12
	xorl	%ebp, %ebp
.LBB13_1:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB13_8 Depth 2
	movl	$13376, %edx                    # imm = 0x3440
	movq	16(%rsp), %rdi                  # 8-byte Reload
	xorl	%esi, %esi
	callq	memset@PLT
	movl	$690788, %edx                   # imm = 0xA8A64
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	memset@PLT
	leaq	72(%rsp), %rax
	movq	%rax, 56(%rsp)
	movl	$.L.str.1, %esi
	movl	$.L.str.1+4, %edx
	leaq	56(%rsp), %r13
	movq	%r13, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
.Ltmp0:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.Ltmp1:
# %bb.2:                                #   in Loop: Header=BB13_1 Depth=1
	movq	56(%rsp), %rdi
	leaq	72(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB13_4
# %bb.3:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
                                        #   in Loop: Header=BB13_1 Depth=1
	callq	_ZdlPv
.LBB13_4:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
                                        #   in Loop: Header=BB13_1 Depth=1
	leaq	40(%rsp), %rax
	movq	%rax, 24(%rsp)
	movl	$.L.str, %esi
	movl	$.L.str+7, %edx
	leaq	24(%rsp), %r13
	movq	%r13, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
.Ltmp3:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.Ltmp4:
# %bb.5:                                #   in Loop: Header=BB13_1 Depth=1
	movq	24(%rsp), %rdi
	leaq	40(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB13_7
# %bb.6:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i45
                                        #   in Loop: Header=BB13_1 Depth=1
	callq	_ZdlPv
.LBB13_7:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit47
                                        #   in Loop: Header=BB13_1 Depth=1
	movq	%r14, %rdi
	callq	_Z12compute_costR10param_data
	movss	%xmm0, 12(%rsp)                 # 4-byte Spill
	movl	$210275, %eax                   # imm = 0x33563
	movsd	.LCPI13_0(%rip), %xmm4          # xmm4 = mem[0],zero
	movaps	.LCPI13_1(%rip), %xmm5          # xmm5 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
.LBB13_8:                               #   Parent Loop BB13_1 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	-28876(%r14,%rax,4), %xmm0      # xmm0 = mem[0],zero,zero,zero
	movss	(%r14,%rax,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	xorps	%xmm2, %xmm2
	cvtss2sd	%xmm0, %xmm2
	divss	%xmm1, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movapd	%xmm4, %xmm3
	subsd	%xmm2, %xmm3
	cvtss2sd	%xmm1, %xmm1
	movapd	%xmm4, %xmm2
	subsd	%xmm1, %xmm2
	divsd	%xmm2, %xmm3
	subsd	%xmm3, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	xorps	%xmm5, %xmm0
	movss	%xmm0, -157836(%rbx,%rax,4)
	incq	%rax
	cmpq	$210484, %rax                   # imm = 0x33634
	jne	.LBB13_8
# %bb.9:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit48
                                        #   in Loop: Header=BB13_1 Depth=1
	movq	%r12, 88(%rsp)
	movl	$.L.str, %esi
	movl	$.L.str+7, %edx
	leaq	88(%rsp), %r13
	movq	%r13, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
.Ltmp6:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r13, %rdx
	callq	_Z26linear_activation_backwardR10param_dataR9grad_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.Ltmp7:
# %bb.10:                               #   in Loop: Header=BB13_1 Depth=1
	movq	88(%rsp), %rdi
	cmpq	%r12, %rdi
	je	.LBB13_12
# %bb.11:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i55
                                        #   in Loop: Header=BB13_1 Depth=1
	callq	_ZdlPv
.LBB13_12:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit57
                                        #   in Loop: Header=BB13_1 Depth=1
	leaq	136(%rsp), %r13
	movq	%r13, 120(%rsp)
	movl	$.L.str.1, %esi
	movl	$.L.str.1+4, %edx
	leaq	120(%rsp), %r15
	movq	%r15, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
.Ltmp9:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_Z26linear_activation_backwardR10param_dataR9grad_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.Ltmp10:
# %bb.13:                               #   in Loop: Header=BB13_1 Depth=1
	movq	120(%rsp), %rdi
	cmpq	%r13, %rdi
	je	.LBB13_15
# %bb.14:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i59
                                        #   in Loop: Header=BB13_1 Depth=1
	callq	_ZdlPv
.LBB13_15:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit61
                                        #   in Loop: Header=BB13_1 Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_Z17update_parametersR10param_dataR9grad_data
	imull	$-858993459, %ebp, %eax         # imm = 0xCCCCCCCD
	rorl	$2, %eax
	cmpl	$214748364, %eax                # imm = 0xCCCCCCC
	ja	.LBB13_17
# %bb.16:                               #   in Loop: Header=BB13_1 Depth=1
	movl	$_ZSt4cout, %edi
	movl	$.L.str.2, %esi
	movl	$18, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movl	%ebp, %esi
	callq	_ZNSolsEi
	movq	%rax, %r13
	movl	$.L.str.3, %esi
	movl	$2, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	xorps	%xmm0, %xmm0
	cvtss2sd	12(%rsp), %xmm0                 # 4-byte Folded Reload
	movq	%r13, %rdi
	leaq	104(%rsp), %r12
	callq	_ZNSo9_M_insertIdEERSoT_
	movl	$.L.str.4, %esi
	movl	$2, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.LBB13_17:                              #   in Loop: Header=BB13_1 Depth=1
	incl	%ebp
	cmpl	$101, %ebp
	jne	.LBB13_1
# %bb.18:
	addq	$152, %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
.LBB13_19:
	.cfi_def_cfa_offset 208
.Ltmp2:
	movq	%rax, %rbx
	movq	56(%rsp), %rdi
	leaq	72(%rsp), %rax
	jmp	.LBB13_20
.LBB13_22:
.Ltmp5:
	movq	%rax, %rbx
	movq	24(%rsp), %rdi
	leaq	40(%rsp), %rax
.LBB13_20:
	cmpq	%rax, %rdi
	je	.LBB13_25
.LBB13_21:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i49
	callq	_ZdlPv
.LBB13_25:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit51
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.LBB13_23:
.Ltmp8:
	movq	%rax, %rbx
	movq	88(%rsp), %rdi
	cmpq	%r12, %rdi
	jne	.LBB13_21
	jmp	.LBB13_25
.LBB13_24:
.Ltmp11:
	movq	%rax, %rbx
	movq	120(%rsp), %rdi
	cmpq	%r13, %rdi
	jne	.LBB13_21
	jmp	.LBB13_25
.Lfunc_end13:
	.size	_Z15two_layer_modelR10param_dataR9grad_data, .Lfunc_end13-_Z15two_layer_modelR10param_dataR9grad_data
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table13:
.Lexception0:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end0-.Lcst_begin0
.Lcst_begin0:
	.uleb128 .Lfunc_begin0-.Lfunc_begin0    # >> Call Site 1 <<
	.uleb128 .Ltmp0-.Lfunc_begin0           #   Call between .Lfunc_begin0 and .Ltmp0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp0-.Lfunc_begin0           # >> Call Site 2 <<
	.uleb128 .Ltmp1-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp1
	.uleb128 .Ltmp2-.Lfunc_begin0           #     jumps to .Ltmp2
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp1-.Lfunc_begin0           # >> Call Site 3 <<
	.uleb128 .Ltmp3-.Ltmp1                  #   Call between .Ltmp1 and .Ltmp3
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp3-.Lfunc_begin0           # >> Call Site 4 <<
	.uleb128 .Ltmp4-.Ltmp3                  #   Call between .Ltmp3 and .Ltmp4
	.uleb128 .Ltmp5-.Lfunc_begin0           #     jumps to .Ltmp5
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp4-.Lfunc_begin0           # >> Call Site 5 <<
	.uleb128 .Ltmp6-.Ltmp4                  #   Call between .Ltmp4 and .Ltmp6
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp6-.Lfunc_begin0           # >> Call Site 6 <<
	.uleb128 .Ltmp7-.Ltmp6                  #   Call between .Ltmp6 and .Ltmp7
	.uleb128 .Ltmp8-.Lfunc_begin0           #     jumps to .Ltmp8
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp7-.Lfunc_begin0           # >> Call Site 7 <<
	.uleb128 .Ltmp9-.Ltmp7                  #   Call between .Ltmp7 and .Ltmp9
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp9-.Lfunc_begin0           # >> Call Site 8 <<
	.uleb128 .Ltmp10-.Ltmp9                 #   Call between .Ltmp9 and .Ltmp10
	.uleb128 .Ltmp11-.Lfunc_begin0          #     jumps to .Ltmp11
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp10-.Lfunc_begin0          # >> Call Site 9 <<
	.uleb128 .Lfunc_end13-.Ltmp10           #   Call between .Ltmp10 and .Lfunc_end13
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.text
	.globl	_Z11delete_dataR10param_dataR9grad_data # -- Begin function _Z11delete_dataR10param_dataR9grad_data
	.type	_Z11delete_dataR10param_dataR9grad_data,@function
_Z11delete_dataR10param_dataR9grad_data: # @_Z11delete_dataR10param_dataR9grad_data
	.cfi_startproc
# %bb.0:                                # %.preheader115
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	%rsi, %rbx
	addq	$835248, %rdi                   # imm = 0xCBEB0
	movl	$13376, %edx                    # imm = 0x3440
	xorl	%esi, %esi
	callq	memset@PLT
	movl	$690788, %edx                   # imm = 0xA8A64
	movq	%rbx, %rdi
	xorl	%esi, %esi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	memset@PLT                      # TAILCALL
.Lfunc_end14:
	.size	_Z11delete_dataR10param_dataR9grad_data, .Lfunc_end14-_Z11delete_dataR10param_dataR9grad_data
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z20accuracy_check_trainR10param_data
.LCPI15_0:
	.long	0x3f000000                      # float 0.5
.LCPI15_1:
	.long	0x3f800000                      # float 1
.LCPI15_2:
	.long	0x43510000                      # float 209
.LCPI15_3:
	.long	0x42480000                      # float 50
	.text
	.globl	_Z20accuracy_check_trainR10param_data
	.type	_Z20accuracy_check_trainR10param_data,@function
_Z20accuracy_check_trainR10param_data:  # @_Z20accuracy_check_trainR10param_data
.Lfunc_begin1:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception1
# %bb.0:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	subq	$144, %rsp
	.cfi_def_cfa_offset 176
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdi, %rbx
	leaq	128(%rsp), %r15
	movq	%r15, -16(%r15)
	leaq	112(%rsp), %r14
	movl	$.L.str.1, %esi
	movl	$.L.str.1+4, %edx
	movq	%r14, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
.Ltmp12:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.Ltmp13:
# %bb.1:
	movq	112(%rsp), %rdi
	cmpq	%r15, %rdi
	je	.LBB15_3
# %bb.2:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB15_3:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	leaq	96(%rsp), %r15
	movq	%r15, -16(%r15)
	leaq	80(%rsp), %r14
	movl	$.L.str, %esi
	movl	$.L.str+7, %edx
	movq	%r14, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
.Ltmp15:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.Ltmp16:
# %bb.4:
	movq	80(%rsp), %rdi
	cmpq	%r15, %rdi
	je	.LBB15_6
# %bb.5:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i51
	callq	_ZdlPv
.LBB15_6:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit53
	xorps	%xmm0, %xmm0
	movl	$203056, %eax                   # imm = 0x31930
	movss	.LCPI15_0(%rip), %xmm3          # xmm3 = mem[0],zero,zero,zero
	movss	.LCPI15_1(%rip), %xmm4          # xmm4 = mem[0],zero,zero,zero
	xorps	%xmm5, %xmm5
.LBB15_7:                               # =>This Inner Loop Header: Depth=1
	movss	28876(%rbx,%rax,4), %xmm1       # xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm3, %xmm1
	jb	.LBB15_9
# %bb.8:                                #   in Loop: Header=BB15_7 Depth=1
	movss	(%rbx,%rax,4), %xmm2            # xmm2 = mem[0],zero,zero,zero
	ucomiss	%xmm4, %xmm2
	jne	.LBB15_9
	jnp	.LBB15_11
.LBB15_9:                               #   in Loop: Header=BB15_7 Depth=1
	ucomiss	%xmm1, %xmm3
	jbe	.LBB15_12
# %bb.10:                               #   in Loop: Header=BB15_7 Depth=1
	movss	(%rbx,%rax,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	jne	.LBB15_12
	jp	.LBB15_12
.LBB15_11:                              #   in Loop: Header=BB15_7 Depth=1
	addss	%xmm4, %xmm5
.LBB15_12:                              #   in Loop: Header=BB15_7 Depth=1
	incq	%rax
	cmpq	$203265, %rax                   # imm = 0x31A01
	jne	.LBB15_7
# %bb.13:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit54
	movl	$_ZSt4cout, %edi
	movl	$.L.str.5, %esi
	movl	$21, %edx
	movss	%xmm5, 12(%rsp)                 # 4-byte Spill
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movss	12(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	divss	.LCPI15_2(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
	movl	$.L.str.6, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$50, num_samples(%rip)
	leaq	64(%rsp), %r15
	movq	%r15, -16(%r15)
	leaq	48(%rsp), %r14
	movl	$.L.str.1, %esi
	movl	$.L.str.1+4, %edx
	movq	%r14, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
.Ltmp18:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.Ltmp19:
# %bb.14:
	movq	48(%rsp), %rdi
	cmpq	%r15, %rdi
	je	.LBB15_16
# %bb.15:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i61
	callq	_ZdlPv
.LBB15_16:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit63
	leaq	32(%rsp), %r15
	movq	%r15, -16(%r15)
	leaq	16(%rsp), %r14
	movl	$.L.str, %esi
	movl	$.L.str+7, %edx
	movq	%r14, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
.Ltmp21:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_Z25linear_activation_forwardR10param_dataNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.Ltmp22:
# %bb.17:
	movq	16(%rsp), %rdi
	cmpq	%r15, %rdi
	je	.LBB15_19
# %bb.18:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i65
	callq	_ZdlPv
.LBB15_19:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit67
	xorps	%xmm0, %xmm0
	xorl	%eax, %eax
	xorps	%xmm5, %xmm5
	movss	.LCPI15_0(%rip), %xmm3          # xmm3 = mem[0],zero,zero,zero
	movss	.LCPI15_1(%rip), %xmm4          # xmm4 = mem[0],zero,zero,zero
.LBB15_20:                              # =>This Inner Loop Header: Depth=1
	movss	841100(%rbx,%rax,4), %xmm1      # xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm3, %xmm1
	jb	.LBB15_22
# %bb.21:                               #   in Loop: Header=BB15_20 Depth=1
	movss	813060(%rbx,%rax,4), %xmm2      # xmm2 = mem[0],zero,zero,zero
	ucomiss	%xmm4, %xmm2
	jne	.LBB15_22
	jnp	.LBB15_24
.LBB15_22:                              #   in Loop: Header=BB15_20 Depth=1
	ucomiss	%xmm1, %xmm3
	jbe	.LBB15_25
# %bb.23:                               #   in Loop: Header=BB15_20 Depth=1
	movss	813060(%rbx,%rax,4), %xmm1      # xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	jne	.LBB15_25
	jp	.LBB15_25
.LBB15_24:                              #   in Loop: Header=BB15_20 Depth=1
	addss	%xmm4, %xmm5
.LBB15_25:                              #   in Loop: Header=BB15_20 Depth=1
	incq	%rax
	cmpq	$50, %rax
	jne	.LBB15_20
# %bb.26:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.7, %esi
	movl	$17, %edx
	movss	%xmm5, 12(%rsp)                 # 4-byte Spill
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movss	12(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	divss	.LCPI15_3(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
	movl	$.L.str.6, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	addq	$144, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.LBB15_33:
	.cfi_def_cfa_offset 176
.Ltmp23:
	movq	%rax, %rbx
	movq	16(%rsp), %rdi
	jmp	.LBB15_28
.LBB15_32:
.Ltmp20:
	movq	%rax, %rbx
	movq	48(%rsp), %rdi
	jmp	.LBB15_28
.LBB15_31:
.Ltmp17:
	movq	%rax, %rbx
	movq	80(%rsp), %rdi
	jmp	.LBB15_28
.LBB15_27:
.Ltmp14:
	movq	%rax, %rbx
	movq	112(%rsp), %rdi
.LBB15_28:
	cmpq	%r15, %rdi
	je	.LBB15_30
# %bb.29:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i55
	callq	_ZdlPv
.LBB15_30:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit57
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end15:
	.size	_Z20accuracy_check_trainR10param_data, .Lfunc_end15-_Z20accuracy_check_trainR10param_data
	.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 .Ltmp12-.Lfunc_begin1          #   Call between .Lfunc_begin1 and .Ltmp12
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp12-.Lfunc_begin1          # >> Call Site 2 <<
	.uleb128 .Ltmp13-.Ltmp12                #   Call between .Ltmp12 and .Ltmp13
	.uleb128 .Ltmp14-.Lfunc_begin1          #     jumps to .Ltmp14
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp13-.Lfunc_begin1          # >> Call Site 3 <<
	.uleb128 .Ltmp15-.Ltmp13                #   Call between .Ltmp13 and .Ltmp15
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp15-.Lfunc_begin1          # >> Call Site 4 <<
	.uleb128 .Ltmp16-.Ltmp15                #   Call between .Ltmp15 and .Ltmp16
	.uleb128 .Ltmp17-.Lfunc_begin1          #     jumps to .Ltmp17
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp16-.Lfunc_begin1          # >> Call Site 5 <<
	.uleb128 .Ltmp18-.Ltmp16                #   Call between .Ltmp16 and .Ltmp18
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp18-.Lfunc_begin1          # >> Call Site 6 <<
	.uleb128 .Ltmp19-.Ltmp18                #   Call between .Ltmp18 and .Ltmp19
	.uleb128 .Ltmp20-.Lfunc_begin1          #     jumps to .Ltmp20
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp19-.Lfunc_begin1          # >> Call Site 7 <<
	.uleb128 .Ltmp21-.Ltmp19                #   Call between .Ltmp19 and .Ltmp21
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp21-.Lfunc_begin1          # >> Call Site 8 <<
	.uleb128 .Ltmp22-.Ltmp21                #   Call between .Ltmp21 and .Ltmp22
	.uleb128 .Ltmp23-.Lfunc_begin1          #     jumps to .Ltmp23
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp22-.Lfunc_begin1          # >> Call Site 9 <<
	.uleb128 .Lfunc_end15-.Ltmp22           #   Call between .Ltmp22 and .Lfunc_end15
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end1:
	.p2align	2, 0x0
                                        # -- End function
	.text
	.globl	main                            # -- Begin function main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	subq	$2222680, %rsp                  # imm = 0x21EA58
	.cfi_def_cfa_offset 2222704
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	leaq	690800(%rsp), %rbx
	leaq	12(%rsp), %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_Z9load_dataR10param_dataR9grad_data
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_Z15two_layer_modelR10param_dataR9grad_data
	movq	%rbx, %rdi
	callq	_Z20accuracy_check_trainR10param_data
	xorl	%eax, %eax
	addq	$2222680, %rsp                  # imm = 0x21EA58
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end16:
	.size	main, .Lfunc_end16-main
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z9load_dataR10param_dataR9grad_data
.LCPI17_0:
	.quad	0x3eb0c6f7a0b5ed8d              # double 9.9999999999999995E-7
	.text
	.globl	_Z9load_dataR10param_dataR9grad_data
	.type	_Z9load_dataR10param_dataR9grad_data,@function
_Z9load_dataR10param_dataR9grad_data:   # @_Z9load_dataR10param_dataR9grad_data
.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	$2120, %rsp                     # imm = 0x848
	.cfi_def_cfa_offset 2176
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, %r14
	movq	%rdi, %rbx
	xorl	%edi, %edi
	callq	time
	movl	%eax, %edi
	callq	srand
	movl	$_ZSt4cout, %edi
	movl	$.L.str.8, %esi
	movl	$44, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	leaq	24(%rsp), %rax
	movq	%rax, -16(%rax)
	leaq	8(%rsp), %r15
	movl	$.L.str.9, %esi
	movl	$.L.str.9+11, %edx
	movq	%r15, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	movq	(%r15), %rsi
.Ltmp24:
	leaq	1600(%rsp), %rdi
	movl	$8, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
.Ltmp25:
# %bb.1:                                # %.preheader108.preheader
	xorl	%r13d, %r13d
	leaq	1600(%rsp), %r15
	movq	%rbx, %rbp
.LBB17_2:                               # %.preheader108
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB17_3 Depth 2
	xorl	%r12d, %r12d
.LBB17_3:                               #   Parent Loop BB17_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	leaq	(%r12,%rbp), %rsi
.Ltmp27:
	movq	%r15, %rdi
	callq	_ZNSi10_M_extractIfEERSiRT_
.Ltmp28:
# %bb.4:                                # %_ZNSirsERf.exit
                                        #   in Loop: Header=BB17_3 Depth=2
	addq	$4, %r12
	cmpq	$836, %r12                      # imm = 0x344
	jne	.LBB17_3
# %bb.5:                                #   in Loop: Header=BB17_2 Depth=1
	incq	%r13
	addq	$836, %rbp                      # imm = 0x344
	cmpq	$784, %r13                      # imm = 0x310
	jne	.LBB17_2
# %bb.6:
	leaq	8(%rsp), %rdi
	movq	8(%rdi), %rdx
.Ltmp30:
	movl	$.L.str.10, %ecx
	movl	$10, %r8d
	xorl	%esi, %esi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm
.Ltmp31:
# %bb.7:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc.exit
	movq	8(%rsp), %rsi
.Ltmp33:
	leaq	1080(%rsp), %rdi
	movl	$8, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
.Ltmp34:
# %bb.8:                                # %.preheader106.preheader
	leaq	655424(%rbx), %r13
	xorl	%ebp, %ebp
	leaq	1080(%rsp), %r15
.LBB17_9:                               # %.preheader106
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB17_10 Depth 2
	xorl	%r12d, %r12d
.LBB17_10:                              #   Parent Loop BB17_9 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	leaq	(%r12,%r13), %rsi
.Ltmp36:
	movq	%r15, %rdi
	callq	_ZNSi10_M_extractIfEERSiRT_
.Ltmp37:
# %bb.11:                               # %_ZNSirsERf.exit92
                                        #   in Loop: Header=BB17_10 Depth=2
	addq	$4, %r12
	cmpq	$200, %r12
	jne	.LBB17_10
# %bb.12:                               #   in Loop: Header=BB17_9 Depth=1
	incq	%rbp
	addq	$200, %r13
	cmpq	$784, %rbp                      # imm = 0x310
	jne	.LBB17_9
# %bb.13:
.Ltmp39:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.11, %esi
	movl	$38, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp40:
# %bb.14:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
	leaq	8(%rsp), %rdi
	movq	8(%rdi), %rdx
.Ltmp41:
	movl	$.L.str.12, %ecx
	movl	$11, %r8d
	xorl	%esi, %esi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm
.Ltmp42:
# %bb.15:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc.exit93
	movq	8(%rsp), %rsi
.Ltmp44:
	leaq	560(%rsp), %rdi
	movl	$8, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
.Ltmp45:
# %bb.16:                               # %.preheader105
	leaq	812224(%rbx), %r13
	xorl	%ebp, %ebp
	leaq	560(%rsp), %r15
.LBB17_17:                              # =>This Inner Loop Header: Depth=1
	movq	%r13, %rsi
	addq	%rbp, %rsi
.Ltmp47:
	movq	%r15, %rdi
	callq	_ZNSi10_M_extractIfEERSiRT_
.Ltmp48:
# %bb.18:                               # %_ZNSirsERf.exit95
                                        #   in Loop: Header=BB17_17 Depth=1
	addq	$4, %rbp
	cmpq	$836, %rbp                      # imm = 0x344
	jne	.LBB17_17
# %bb.19:
	leaq	8(%rsp), %rdi
	movq	8(%rdi), %rdx
.Ltmp50:
	movl	$.L.str.13, %ecx
	movl	$10, %r8d
	xorl	%esi, %esi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm
.Ltmp51:
# %bb.20:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc.exit94
	movq	8(%rsp), %rsi
.Ltmp53:
	leaq	40(%rsp), %rdi
	movl	$8, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
.Ltmp54:
# %bb.21:                               # %.preheader104
	leaq	813060(%rbx), %r13
	xorl	%ebp, %ebp
	leaq	40(%rsp), %r15
.LBB17_22:                              # =>This Inner Loop Header: Depth=1
	movq	%r13, %rsi
	addq	%rbp, %rsi
.Ltmp56:
	movq	%r15, %rdi
	callq	_ZNSi10_M_extractIfEERSiRT_
.Ltmp57:
# %bb.23:                               # %_ZNSirsERf.exit97
                                        #   in Loop: Header=BB17_22 Depth=1
	addq	$4, %rbp
	cmpq	$200, %rbp
	jne	.LBB17_22
# %bb.24:
.Ltmp59:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.14, %esi
	movl	$22, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp60:
# %bb.25:                               # %.preheader103.preheader
	leaq	813260(%rbx), %r15
	xorl	%r13d, %r13d
.LBB17_26:                              # %.preheader103
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB17_27 Depth 2
	xorl	%ebp, %ebp
.LBB17_27:                              #   Parent Loop BB17_26 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	callq	rand
	movsd	.LCPI17_0(%rip), %xmm1          # xmm1 = mem[0],zero
	cltq
	imulq	$1759218605, %rax, %rcx         # imm = 0x68DB8BAD
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$44, %rcx
	addl	%edx, %ecx
	imull	$10000, %ecx, %ecx              # imm = 0x2710
	negl	%ecx
	addl	%ecx, %eax
	addl	$-5000, %eax                    # imm = 0xEC78
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	mulsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%r15,%rbp,4)
	incq	%rbp
	cmpq	$784, %rbp                      # imm = 0x310
	jne	.LBB17_27
# %bb.28:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit96
                                        #   in Loop: Header=BB17_26 Depth=1
	incq	%r13
	addq	$3136, %r15                     # imm = 0xC40
	cmpq	$7, %r13
	jne	.LBB17_26
# %bb.29:                               # %.preheader102
	xorl	%r15d, %r15d
.LBB17_30:                              # =>This Inner Loop Header: Depth=1
	callq	rand
	cltq
	imulq	$1759218605, %rax, %rcx         # imm = 0x68DB8BAD
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$44, %rcx
	addl	%edx, %ecx
	imull	$10000, %ecx, %ecx              # imm = 0x2710
	negl	%ecx
	addl	%ecx, %eax
	addl	$-5000, %eax                    # imm = 0xEC78
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	mulsd	.LCPI17_0(%rip), %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, 835212(%rbx,%r15,4)
	incq	%r15
	cmpq	$7, %r15
	jne	.LBB17_30
# %bb.31:                               # %.critedge
	xorl	%eax, %eax
	movq	%rax, 835240(%rbx)
	movq	%rax, 21980(%r14)
	addq	$841936, %rbx                   # imm = 0xCD8D0
	movl	$6688, %edx                     # imm = 0x1A20
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	memset@PLT
	leaq	40(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	leaq	560(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	leaq	1080(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	leaq	1600(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB17_33
# %bb.32:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB17_33:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	addq	$2120, %rsp                     # imm = 0x848
	.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
.LBB17_34:
	.cfi_def_cfa_offset 2176
.Ltmp61:
	jmp	.LBB17_43
.LBB17_35:
.Ltmp55:
	jmp	.LBB17_45
.LBB17_36:
.Ltmp52:
	jmp	.LBB17_45
.LBB17_37:
.Ltmp46:
	jmp	.LBB17_48
.LBB17_38:
.Ltmp35:
	jmp	.LBB17_51
.LBB17_39:
.Ltmp32:
	jmp	.LBB17_51
.LBB17_40:
.Ltmp26:
	movq	%rax, %rbx
	jmp	.LBB17_53
.LBB17_41:
.Ltmp43:
	jmp	.LBB17_48
.LBB17_42:
.Ltmp58:
.LBB17_43:
	movq	%rax, %rbx
	leaq	40(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	jmp	.LBB17_46
.LBB17_44:
.Ltmp49:
.LBB17_45:
	movq	%rax, %rbx
.LBB17_46:
	leaq	560(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	jmp	.LBB17_49
.LBB17_47:
.Ltmp38:
.LBB17_48:
	movq	%rax, %rbx
.LBB17_49:
	leaq	1080(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	jmp	.LBB17_52
.LBB17_50:
.Ltmp29:
.LBB17_51:
	movq	%rax, %rbx
.LBB17_52:
	leaq	1600(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
.LBB17_53:
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB17_55
# %bb.54:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i98
	callq	_ZdlPv
.LBB17_55:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit100
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end17:
	.size	_Z9load_dataR10param_dataR9grad_data, .Lfunc_end17-_Z9load_dataR10param_dataR9grad_data
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table17:
.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 .Ltmp24-.Lfunc_begin2          #   Call between .Lfunc_begin2 and .Ltmp24
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp24-.Lfunc_begin2          # >> Call Site 2 <<
	.uleb128 .Ltmp25-.Ltmp24                #   Call between .Ltmp24 and .Ltmp25
	.uleb128 .Ltmp26-.Lfunc_begin2          #     jumps to .Ltmp26
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp27-.Lfunc_begin2          # >> Call Site 3 <<
	.uleb128 .Ltmp28-.Ltmp27                #   Call between .Ltmp27 and .Ltmp28
	.uleb128 .Ltmp29-.Lfunc_begin2          #     jumps to .Ltmp29
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp30-.Lfunc_begin2          # >> Call Site 4 <<
	.uleb128 .Ltmp31-.Ltmp30                #   Call between .Ltmp30 and .Ltmp31
	.uleb128 .Ltmp32-.Lfunc_begin2          #     jumps to .Ltmp32
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp33-.Lfunc_begin2          # >> Call Site 5 <<
	.uleb128 .Ltmp34-.Ltmp33                #   Call between .Ltmp33 and .Ltmp34
	.uleb128 .Ltmp35-.Lfunc_begin2          #     jumps to .Ltmp35
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp36-.Lfunc_begin2          # >> Call Site 6 <<
	.uleb128 .Ltmp37-.Ltmp36                #   Call between .Ltmp36 and .Ltmp37
	.uleb128 .Ltmp38-.Lfunc_begin2          #     jumps to .Ltmp38
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp39-.Lfunc_begin2          # >> Call Site 7 <<
	.uleb128 .Ltmp42-.Ltmp39                #   Call between .Ltmp39 and .Ltmp42
	.uleb128 .Ltmp43-.Lfunc_begin2          #     jumps to .Ltmp43
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp44-.Lfunc_begin2          # >> Call Site 8 <<
	.uleb128 .Ltmp45-.Ltmp44                #   Call between .Ltmp44 and .Ltmp45
	.uleb128 .Ltmp46-.Lfunc_begin2          #     jumps to .Ltmp46
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp47-.Lfunc_begin2          # >> Call Site 9 <<
	.uleb128 .Ltmp48-.Ltmp47                #   Call between .Ltmp47 and .Ltmp48
	.uleb128 .Ltmp49-.Lfunc_begin2          #     jumps to .Ltmp49
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp50-.Lfunc_begin2          # >> Call Site 10 <<
	.uleb128 .Ltmp51-.Ltmp50                #   Call between .Ltmp50 and .Ltmp51
	.uleb128 .Ltmp52-.Lfunc_begin2          #     jumps to .Ltmp52
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp53-.Lfunc_begin2          # >> Call Site 11 <<
	.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 12 <<
	.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 13 <<
	.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 14 <<
	.uleb128 .Lfunc_end17-.Ltmp60           #   Call between .Ltmp60 and .Lfunc_end17
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end2:
	.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	.LBB18_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	.LBB18_3
.LBB18_1:                               # %._crit_edge
	movq	(%rbx), %rax
.LBB18_3:
	testq	%r14, %r14
	je	.LBB18_7
# %bb.4:
	cmpq	$1, %r14
	jne	.LBB18_6
# %bb.5:
	movb	(%r15), %cl
	movb	%cl, (%rax)
	jmp	.LBB18_7
.LBB18_6:
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	memcpy@PLT
.LBB18_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_end18:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag, .Lfunc_end18-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.cfi_endproc
                                        # -- End function
	.text
	.p2align	4, 0x90                         # -- Begin function __hip_module_ctor
	.type	__hip_module_ctor,@function
__hip_module_ctor:                      # @__hip_module_ctor
	.cfi_startproc
# %bb.0:
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	jne	.LBB19_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rdi
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB19_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z6kernelPfS_S_S_PiS0_, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$40, %rsp
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end19:
	.size	__hip_module_ctor, .Lfunc_end19-__hip_module_ctor
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_dtor
	.type	__hip_module_dtor,@function
__hip_module_dtor:                      # @__hip_module_dtor
	.cfi_startproc
# %bb.0:
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB20_2
# %bb.1:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	__hipUnregisterFatBinary
	movq	$0, __hip_gpubin_handle(%rip)
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
.LBB20_2:
	retq
.Lfunc_end20:
	.size	__hip_module_dtor, .Lfunc_end20-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	learning_rate,@object           # @learning_rate
	.data
	.globl	learning_rate
	.p2align	2, 0x0
learning_rate:
	.long	0x3d99999a                      # float 0.075000003
	.size	learning_rate, 4

	.type	num_samples,@object             # @num_samples
	.globl	num_samples
	.p2align	2, 0x0
num_samples:
	.long	209                             # 0xd1
	.size	num_samples, 4

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

	.type	_ZL3n_x,@object                 # @_ZL3n_x
	.p2align	2, 0x0
_ZL3n_x:
	.long	784                             # 0x310
	.size	_ZL3n_x, 4

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

	.type	_ZL13train_samples,@object      # @_ZL13train_samples
	.section	.rodata,"a",@progbits
	.p2align	2, 0x0
_ZL13train_samples:
	.long	209                             # 0xd1
	.size	_ZL13train_samples, 4

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

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"Koszt po iteracji "
	.size	.L.str.2, 19

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

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

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"Accuracy (training): "
	.size	.L.str.5, 22

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"\n"
	.size	.L.str.6, 2

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"Accuracy (test): "
	.size	.L.str.7, 18

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"Ladowanie zestawu treningowego i testowego.\n"
	.size	.L.str.8, 45

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"train_x.txt"
	.size	.L.str.9, 12

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"test_x.txt"
	.size	.L.str.10, 11

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"Wczytano zestaw treningowy i testowy.\n"
	.size	.L.str.11, 39

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"train_y.txt"
	.size	.L.str.12, 12

	.type	.L.str.13,@object               # @.str.13
.L.str.13:
	.asciz	"test_y.txt"
	.size	.L.str.13, 11

	.type	.L.str.14,@object               # @.str.14
.L.str.14:
	.asciz	"Wczytano zestaw klas.\n"
	.size	.L.str.14, 23

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z6kernelPfS_S_S_PiS0_"
	.size	.L__unnamed_1, 23

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

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

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

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z6kernelPfS_S_S_PiS0_  ; -- Begin function _Z6kernelPfS_S_S_PiS0_
	.globl	_Z6kernelPfS_S_S_PiS0_
	.p2align	8
	.type	_Z6kernelPfS_S_S_PiS0_,@function
_Z6kernelPfS_S_S_PiS0_:                 ; @_Z6kernelPfS_S_S_PiS0_
; %bb.0:
	s_load_b128 s[16:19], s[0:1], 0x20
	s_mov_b32 s2, s15
	s_waitcnt lgkmcnt(0)
	s_load_b32 s3, s[16:17], 0x0
	s_load_b256 s[4:11], s[0:1], 0x0
	s_mov_b32 s0, -1
	s_waitcnt lgkmcnt(0)
	s_cmpk_lg_i32 s3, 0xd1
	s_cbranch_scc0 .LBB0_5
; %bb.1:
	s_load_b32 s12, s[18:19], 0x0
	s_load_b32 s16, s[10:11], 0x0
	v_mov_b32_e32 v0, 0
	s_waitcnt lgkmcnt(0)
	s_mul_i32 s0, s12, s2
	v_mov_b32_e32 v1, s16
	s_add_i32 s0, s0, s14
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_ashr_i32 s1, s0, 31
	s_lshl_b64 s[0:1], s[0:1], 2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s0, s8, s0
	s_addc_u32 s1, s9, s1
	s_cmp_lt_i32 s3, 1
	global_store_b32 v0, v1, s[0:1]
	s_cbranch_scc1 .LBB0_4
; %bb.2:                                ; %.lr.ph
	s_ashr_i32 s15, s14, 31
	s_mul_i32 s20, s3, s2
	s_lshl_b64 s[10:11], s[14:15], 2
	v_mov_b32_e32 v1, s16
	s_add_u32 s10, s6, s10
	s_addc_u32 s11, s7, s11
	s_ashr_i32 s21, s20, 31
	s_ashr_i32 s13, s12, 31
	s_lshl_b64 s[20:21], s[20:21], 2
	s_lshl_b64 s[12:13], s[12:13], 2
	s_add_u32 s16, s4, s20
	s_addc_u32 s17, s5, s21
.LBB0_3:                                ; =>This Inner Loop Header: Depth=1
	s_clause 0x1
	global_load_b32 v2, v0, s[16:17]
	global_load_b32 v3, v0, s[10:11]
	s_add_i32 s3, s3, -1
	s_add_u32 s10, s10, s12
	s_addc_u32 s11, s11, s13
	s_add_u32 s16, s16, 4
	s_addc_u32 s17, s17, 0
	s_cmp_lg_u32 s3, 0
	s_waitcnt vmcnt(0)
	v_fmac_f32_e32 v1, v2, v3
	global_store_b32 v0, v1, s[0:1]
	s_cbranch_scc1 .LBB0_3
.LBB0_4:                                ; %Flow86
	s_mov_b32 s0, 0
.LBB0_5:                                ; %Flow88
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 vcc_lo, exec_lo, s0
	s_cbranch_vccnz .LBB0_8
; %bb.6:
	s_load_b32 s10, s[18:19], 0x0
	s_mul_i32 s12, s2, 0xd1
	v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v1, 0
	s_waitcnt lgkmcnt(0)
	s_mul_i32 s0, s10, s2
	s_ashr_i32 s11, s10, 31
	s_add_i32 s0, s0, s14
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_ashr_i32 s1, s0, 31
	s_lshl_b64 s[0:1], s[0:1], 2
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_4) | instid1(SALU_CYCLE_1)
	s_add_u32 s0, s8, s0
	s_addc_u32 s1, s9, s1
	s_ashr_i32 s15, s14, 31
	global_store_b32 v0, v0, s[0:1]
	s_lshl_b64 s[8:9], s[14:15], 2
	s_add_u32 s2, s6, s8
	s_addc_u32 s3, s7, s9
	s_ashr_i32 s13, s12, 31
	s_lshl_b64 s[6:7], s[10:11], 2
	s_lshl_b64 s[8:9], s[12:13], 2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s8, s4, s8
	s_addc_u32 s9, s5, s9
	s_mov_b64 s[4:5], 0
.LBB0_7:                                ; =>This Inner Loop Header: Depth=1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s10, s8, s4
	s_addc_u32 s11, s9, s5
	s_add_u32 s4, s4, 4
	s_clause 0x1
	global_load_b32 v2, v0, s[10:11]
	global_load_b32 v3, v0, s[2:3]
	s_addc_u32 s5, s5, 0
	s_add_u32 s2, s2, s6
	s_addc_u32 s3, s3, s7
	s_cmpk_eq_i32 s4, 0x344
	s_waitcnt vmcnt(0)
	v_mul_f32_e32 v2, v2, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_div_scale_f32 v3, null, 0x43510000, 0x43510000, v2
	v_div_scale_f32 v6, vcc_lo, v2, 0x43510000, v2
	v_rcp_f32_e32 v4, v3
	s_waitcnt_depctr 0xfff
	v_fma_f32 v5, -v3, v4, 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v4, v5, v4
	v_mul_f32_e32 v5, v6, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f32 v7, -v3, v5, v6
	v_fmac_f32_e32 v5, v7, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f32 v3, -v3, v5, v6
	v_div_fmas_f32 v3, v3, v4, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fixup_f32 v2, v3, 0x43510000, v2
	v_add_f32_e32 v1, v1, v2
	global_store_b32 v0, v1, s[0:1]
	s_cbranch_scc0 .LBB0_7
.LBB0_8:                                ; %.loopexit
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z6kernelPfS_S_S_PiS0_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 48
		.amdhsa_user_sgpr_count 14
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 1
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 8
		.amdhsa_next_free_sgpr 22
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z6kernelPfS_S_S_PiS0_, .Lfunc_end0-_Z6kernelPfS_S_S_PiS0_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 564
; NumSgprs: 24
; NumVgprs: 8
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 24
; NumVGPRsForWavesPerEU: 8
; Occupancy: 16
; WaveLimiterHint : 1
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 14
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         32
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         40
        .size:           8
        .value_kind:     global_buffer
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 48
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z6kernelPfS_S_S_PiS0_
    .private_segment_fixed_size: 0
    .sgpr_count:     24
    .sgpr_spill_count: 0
    .symbol:         _Z6kernelPfS_S_S_PiS0_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     8
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
