#include <iostream>
#include <fstream>
#include <string>
#include <cassert>
#include <random>
#include <algorithm>
#include <vector>
#include <unistd.h>
#include <ctime>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>

const int IMAGE_DIM = 28; 
const int FCL1_DIM = 1024; 
const int FCL2_DIM = 10; 

void switchEndian(int &ui)
{
    ui = (ui >> 24) | ((ui<<8) & 0x00FF0000) | ((ui>>8) & 0x0000FF00) | (ui << 24);
}

float ***read_image_file(std::string filename, int &magic_number, int &number_of_items, int &rows, int &columns) 
{
	std::ifstream infile;
	infile.open(filename.c_str(), std::ios::binary);
	infile.read(reinterpret_cast<char*>(&magic_number), sizeof(magic_number));
	infile.read(reinterpret_cast<char*>(&number_of_items), sizeof(number_of_items));
	infile.read(reinterpret_cast<char*>(&rows), sizeof(rows));
	infile.read(reinterpret_cast<char*>(&columns), sizeof(columns));

	switchEndian(magic_number);
	switchEndian(number_of_items);
	switchEndian(rows);
	switchEndian(columns);

	float ***pixels = new float**[number_of_items];
	for (int i = 0; i < number_of_items; i++)
	{
		pixels[i] = new float*[rows];
		for (int r = 0; r < rows; r++)
		{
			pixels[i][r] = new float[columns];
			for (int c = 0; c < columns; c++)
			{
				unsigned char temp;
				infile.read(reinterpret_cast<char*>(&temp), 1);
				pixels[i][r][c] = ((int)temp / 127.5) - 1.0;
			}
		}
	}
	return pixels;
}

int *read_label_file(std::string filename, int &magic_number, int &number_of_items)
{
	std::ifstream infile;
	infile.open(filename.c_str(), std::ios::binary);
	infile.read(reinterpret_cast<char*>(&magic_number), 4);
	infile.read(reinterpret_cast<char*>(&number_of_items), 4);

	switchEndian(magic_number);
	switchEndian(number_of_items);

	int *labels = new int[number_of_items];
	for (int i = 0; i < number_of_items; i++) 
	{
		char temp;
		infile.read(reinterpret_cast<char*>(&temp), 1);
		labels[i] = temp;
	}
	return labels;
}

float *first_dense_layer(float **image, float ***weights, float *bias)
{
	srand(123);

	float *sums = new float[FCL1_DIM];
	for (int i = 0; i < FCL1_DIM; i++)
	{
		float sum = 0;
		int random_num = rand() % 1000;
		if (random_num < 4)
		{
			sums[i] = 0;
			continue;
		}
		for (int r = 0; r < IMAGE_DIM; r++)
		{
			for (int c = 0; c < IMAGE_DIM; c++)
			{
				sum += weights[i][r][c] * image[r][c];
			}
		}
		sum += bias[i];
		sums[i] = (sum > 0) ? sum : 0;
	}
	return sums;
}

float *second_dense_layer(float *layer, float **weights, float *bias)
{
	float *sums = new float[FCL2_DIM];
	for (int i = 0; i < FCL2_DIM; i++) // 10
	{
		float sum = 0;
		for (int j = 0; j < FCL1_DIM; j++) // 1024
		{
			sum += weights[i][j] * layer[j];
		}
		sum += bias[i];
		sums[i] = sum;
	}
	return sums;
}

float *soft_max(float *layer)
{
	float *output = new float[FCL2_DIM];
	float sum = 0;
	float max = layer[0];
	for (int i = 0; i < FCL2_DIM; i++)
	{
		max = (max > layer[i]) ? max : layer[i];
	}
	for (int i = 0; i < FCL2_DIM; i++)
	{
		output[i] = exp(layer[i] - max);
		sum += output[i];
	}
	for (int i = 0; i < FCL2_DIM; i++)
	{
		output[i] = output[i] / sum;
	}
	return output;
}

float cross_entropy(float *soft_maxes, int label)
{
	return -1 * log(soft_maxes[label]);
}

void soft_max_backprop(float *downstream, float *upstream, float *sm_output)
{
	for (int i = 0; i < FCL2_DIM; i++) 
	{
		downstream[i] = 0;
		for (int j = 0; j < FCL2_DIM; j++)
		{
			if (i == j) 
			{
				downstream[i] += upstream[j] * (sm_output[j] * (1 - sm_output[i]));
			}
			else 
			{
				downstream[i] += upstream[j] * (-sm_output[i] * sm_output[j]);
			}
		}
	}
}

void fcl_2_backprop(float *downstream, float *upstream, float *fcl_1_output, float *bias_deriv, float **weights, float **weight_deriv, float batch_size)
{
	for (int i = 0; i < FCL2_DIM; i++)
	{
		for (int j = 0; j < FCL1_DIM; j++)
		{
			downstream[j] = 0;
		}
		for (int j = 0; j < FCL1_DIM; j++)
		{
			downstream[j] += upstream[i] * weights[i][j];
			weight_deriv[i][j] += (upstream[i] * fcl_1_output[j]) / batch_size;
		}
		bias_deriv[i] = upstream[i] / batch_size;
	}
}

void fcl_1_backprop(float *downstream, float *upstream, float **image_output, float *bias_deriv, float ***weights, float ***weight_deriv, float batch_size)
{
	for (int i = 0; i < FCL1_DIM; i++)
	{
		for (int a = 0; a < IMAGE_DIM; a++)
		{
			for (int b = 0; b < IMAGE_DIM; b++)
			{
				weight_deriv[i][a][b] += (upstream[i] * image_output[a][b]) / batch_size;
			}
		}
		bias_deriv[i] = upstream[i] / batch_size;
	}
}

void fcl_1_update(float ***weights, float ***weight_deriv, float *bias, float *bias_deriv, float rate)
{
	for (int i = 0; i < FCL1_DIM; i++)
	{
		for (int a = 0; a < IMAGE_DIM; a++)
		{
			for (int b = 0; b < IMAGE_DIM; b++)
			{
				weights[i][a][b] -= rate * weight_deriv[i][a][b];
				weight_deriv[i][a][b] = 0;
			}
		}
		bias[i] -= rate * bias_deriv[i];
		bias_deriv[i] = 0;
	}
}

__global__ void cuda_fcl1_update(float *weights, float *weight_deriv, float *bias, float *bias_deriv, float rate)
{
	int n = 28 * 28 * 1024;
	int id = blockIdx.x*blockDim.x + threadIdx.x;

	if (id > n) return;

	weights[id] -= rate * weight_deriv[id];
	weight_deriv[id] = 0;
	if (id % (28 * 28) == 0) 
	{
		bias[id / (28 * 28)] -= rate * bias_deriv[id / (28 * 28)];
		bias_deriv[id / (28 * 28)] = 0;
	}
}

void fcl_2_update(float **weights, float **weight_deriv, float *bias, float *bias_deriv, float rate)
{
	for (int i = 0; i < FCL2_DIM; i++)
	{
		for (int j = 0; j < FCL1_DIM; j++)
		{
			weights[i][j] -= rate * weight_deriv[i][j];
			weight_deriv[i][j] = 0;
		}
		bias[i] -= rate * bias_deriv[i];
		bias_deriv[i] = 0;
	}
}

__global__ void cuda_fcl2_update(float *weights, float *weight_deriv, float *bias, float *bias_deriv, float rate)
{
	int n = 1024 * 10;
	int id = blockIdx.x*blockDim.x + threadIdx.x;

	if (id > n) return;

	weights[id] -= rate * weight_deriv[id];
	weight_deriv[id] = 0;
	if (id % (1024) == 0)
	{
		bias[id / 1024] -= rate * bias_deriv[id / 1024];
		bias_deriv[id / 1024] = 0;
	}
}

float ***create_weights(int x, int y, int z)
{
	std::default_random_engine eng;
	eng.seed(123);
	std::normal_distribution<float> init;

	float ***ret = new float**[x];
	for (int i = 0; i < x; i++) // 1024
	{
		ret[i] = new float*[y];
		for (int j = 0; j < y; j++) // 28
		{
			ret[i][j] = new float[z];
			for (int k = 0; k < z; k++) // 28
			{
				ret[i][j][k] = init(eng) / sqrt(x);
			}
		}
	}
	return ret;
}

float **create_weights(int x, int y)
{
	std::default_random_engine eng;
	eng.seed(456);
	std::normal_distribution<float> init;
	float **ret = new float*[x];

	for (int i = 0; i < x; i++) // 10
	{
		ret[i] = new float[y];
		for (int j = 0; j < y; j++) // 1024
		{
			ret[i][j] = init(eng) / sqrt(x);
		}
	}
	return ret;
}

float ***create_weight_deriv(int a, int b, int c)
{
	float ***ret = new float**[a];
	for (int i = 0; i < a; i++) // 1024
	{
		ret[i] = new float*[b];
		for (int j = 0; j < b; j++) // 28
		{
			ret[i][j] = new float[c];
			for (int k = 0; k < c; k++) // 28
			{
				ret[i][j][k] = 0;
			}
		}
	}
	return ret;
}

float **create_weight_deriv(int a, int b)
{
	float **ret = new float*[a];
	for (int i = 0; i < a; i++) // 10
	{
		ret[i] = new float[b];
		for (int j = 0; j < b; j++) // 1024
		{
			ret[i][j] = 0;
		}
	}
	return ret;
}

int main(int argc, char **argv)
{
	if (argc != 3)
	{
		printf("USAGE: ./prog3 <image file> <label file>\n");
		return 0;
	}

	int magic_number_label, magic_number_image, number_of_labels, number_of_images, rows, columns;

	// Read in the labels and images and store them
	float ***images = read_image_file(std::string(argv[1]), magic_number_image, number_of_images, rows, columns);
	int *labels = read_label_file(std::string(argv[2]), magic_number_label, number_of_labels);
	assert(number_of_labels == number_of_images);

	float ***image_layer_weights = create_weights(FCL1_DIM, IMAGE_DIM, IMAGE_DIM);
	float **connected_layer_weights = create_weights(FCL2_DIM, FCL1_DIM);
	float ***image_weight_deriv = create_weight_deriv(FCL1_DIM, IMAGE_DIM, IMAGE_DIM);
	float **connected_weight_deriv = create_weight_deriv(FCL2_DIM, FCL1_DIM);

	float *fcl_1 = new float[FCL1_DIM]();
	float *fcl_1_bias = new float[FCL1_DIM]();
	float *fcl_1_ds_deriv = new float[FCL1_DIM]();
	float *fcl_1_bias_deriv = new float[FCL1_DIM]();

	float *fcl_2 = new float[FCL2_DIM]();
	float *fcl_2_bias = new float[FCL2_DIM]();
	float *fcl_2_ds_deriv = new float[FCL1_DIM]();
	float *fcl_2_bias_deriv = new float[FCL2_DIM]();

	float *sm_layer = new float[FCL2_DIM]();
	float *sm_ds_deriv = new float[FCL2_DIM]();
	float *ce_ds_deriv = new float[FCL2_DIM]();

	// CUDA variables

	float *d_fcl1_weights, *d_fcl1_weight_deriv, *d_fcl1_bias, *d_fcl1_bias_deriv;
	float *h_fcl1_weights = new float[28*28*1024];
	float *h_fcl1_weight_deriv = new float[28*28*1024];

	float *d_fcl2_weights, *d_fcl2_weight_deriv, *d_fcl2_bias, *d_fcl2_bias_deriv;
	float *h_fcl2_weights = new float[10*1024];
	float *h_fcl2_weight_deriv = new float[10*1024];

	cudaMalloc(&d_fcl1_weights, 28*28*1024*sizeof(float));
	cudaMalloc(&d_fcl1_weight_deriv, 28*28*1024*sizeof(float));
	cudaMalloc(&d_fcl1_bias, 1024*sizeof(float));
	cudaMalloc(&d_fcl1_bias_deriv, 1024*sizeof(float));

	cudaMalloc(&d_fcl2_weights, 10*1024*sizeof(float));
	cudaMalloc(&d_fcl2_weight_deriv, 10*1024*sizeof(float));
	cudaMalloc(&d_fcl2_bias, 10*sizeof(float));
	cudaMalloc(&d_fcl2_bias_deriv, 10*sizeof(float));

	/* TRAINING */
	std::clock_t start = std::clock();
	for (int epoch = 0; epoch < 100; epoch++) 
	{	
		std::clock_t start = std::clock();
		for (int r = 0; r < 100; r++)
		{
			float wrong = 0;
			float right = 0;
			int mini_batch = 100;
			//printf("Starting round: %d\n", r);
			
			for (int image = 0; image < mini_batch; image++)
			{
				int batch_size = mini_batch;
				float rate = mini_batch / 1000.0; // 0.1 for 100 images, 0.01 for 10 images
				
				int label = labels[100*r + image];

				// FCL 1 Forward
				fcl_1 = first_dense_layer(images[100*r + image], image_layer_weights, fcl_1_bias);
				
				// FCL 2 Forward
				fcl_2 = second_dense_layer(fcl_1, connected_layer_weights, fcl_2_bias);
				
				// Softmax Forward
				sm_layer = soft_max(fcl_2);

				// Compute Right/Wrong
				int index = std::distance(sm_layer, std::max_element(sm_layer, sm_layer + FCL2_DIM));
				if (index == label) right++;
				else wrong++;

				// Cross Entropy Forward
				for (int j = 0; j < FCL2_DIM; j++) ce_ds_deriv[j] = 0;
				ce_ds_deriv[label] = -1 / sm_layer[label];

				// Softmax Backprop
				soft_max_backprop(sm_ds_deriv, ce_ds_deriv, sm_layer);

				// FCL 2 Backprop
				fcl_2_backprop(fcl_2_ds_deriv, sm_ds_deriv, fcl_1, fcl_2_bias_deriv, connected_layer_weights, connected_weight_deriv, batch_size);

				// FCL 1 Backprop
				fcl_1_backprop(fcl_1_ds_deriv, fcl_2_ds_deriv, images[100*r + image], fcl_1_bias_deriv, image_layer_weights, image_weight_deriv, batch_size);		

				// FCL 1 Update
				// fcl_1_update(image_layer_weights, image_weight_deriv, fcl_1_bias, fcl_1_bias_deriv, rate);
			
				for (int i = 0; i < 1024; i++)
				{
					for (int j = 0; j < 28; j++)
					{
						for (int k = 0; k < 28; k++)
						{
							h_fcl1_weights[i*28*28 + j*28 + k] = image_layer_weights[i][j][k];
							h_fcl1_weight_deriv[i*28*28 + j*28 + k] = image_weight_deriv[i][j][k];
						}
					}
				}
				cudaMemcpy(d_fcl1_weights, h_fcl1_weights, 28*28*1024*sizeof(float), cudaMemcpyHostToDevice);
				cudaMemcpy(d_fcl1_weight_deriv, h_fcl1_weight_deriv, 28*28*1024*sizeof(float), cudaMemcpyHostToDevice);
				cudaMemcpy(d_fcl1_bias, fcl_1_bias, 1024*sizeof(float), cudaMemcpyHostToDevice);
				cudaMemcpy(d_fcl1_bias_deriv, fcl_1_bias_deriv, 1024*sizeof(float), cudaMemcpyHostToDevice);

				int blockSize = 1024;
				int gridSize = (int)ceil((float)(28*28*1024)/blockSize);
				cuda_fcl1_update<<<gridSize, blockSize>>>(d_fcl1_weights, d_fcl1_weight_deriv, d_fcl1_bias, d_fcl1_bias_deriv, rate);
				
				cudaMemcpy(h_fcl1_weights, d_fcl1_weights, 28*28*1024*sizeof(float), cudaMemcpyDeviceToHost);
				cudaMemcpy(h_fcl1_weight_deriv, d_fcl1_weight_deriv, 28*28*1024*sizeof(float), cudaMemcpyDeviceToHost);
				cudaMemcpy(fcl_1_bias, d_fcl1_bias, 1024*sizeof(float), cudaMemcpyDeviceToHost);
				cudaMemcpy(fcl_1_bias_deriv, d_fcl1_bias_deriv, 1024*sizeof(float), cudaMemcpyDeviceToHost);

				for (int i = 0; i < 1024; i++)
				{
					for (int j = 0; j < 28; j++)
					{
						for (int k = 0; k < 28; k++)
						{
							image_layer_weights[i][j][k] = h_fcl1_weights[i*28*28 + j*28 + k];
							image_weight_deriv[i][j][k] = h_fcl1_weight_deriv[i*28*28 + j*28 + k];
						}
					}
				}

				// FCL 2 Update
				// fcl_2_update(connected_layer_weights, connected_weight_deriv, fcl_2_bias, fcl_2_bias_deriv, rate);

				for (int i = 0; i < 10; i++)
				{
					for (int j = 0; j < 1024; j++)
					{
						h_fcl2_weights[i*1024 + j] = connected_layer_weights[i][j];
						h_fcl2_weight_deriv[i*1024 + j] = connected_weight_deriv[i][j];
					}
				}
				cudaMemcpy(d_fcl2_weights, h_fcl2_weights, 10*1024*sizeof(float), cudaMemcpyHostToDevice);
				cudaMemcpy(d_fcl2_weight_deriv, h_fcl2_weight_deriv, 10*1024*sizeof(float), cudaMemcpyHostToDevice);
				cudaMemcpy(d_fcl2_bias, fcl_2_bias, 10*sizeof(float), cudaMemcpyHostToDevice);
				cudaMemcpy(d_fcl2_bias_deriv, fcl_2_bias_deriv, 10*sizeof(float), cudaMemcpyHostToDevice);

				blockSize = 1024;
				gridSize = (int)ceil((float)(10*1024)/blockSize);
				cuda_fcl2_update<<<gridSize, blockSize>>>(d_fcl2_weights, d_fcl2_weight_deriv, d_fcl2_bias, d_fcl2_bias_deriv, rate);

				cudaMemcpy(h_fcl2_weights, d_fcl2_weights, 10*1024*sizeof(float), cudaMemcpyDeviceToHost);
				cudaMemcpy(h_fcl2_weight_deriv, d_fcl2_weight_deriv, 10*1024*sizeof(float), cudaMemcpyDeviceToHost);
				cudaMemcpy(fcl_2_bias, d_fcl2_bias, 10*sizeof(float), cudaMemcpyDeviceToHost);
				cudaMemcpy(d_fcl2_bias_deriv, d_fcl2_bias_deriv, 10*sizeof(float), cudaMemcpyDeviceToHost);

				for (int i = 0; i < 10; i++)
				{
					for (int j = 0; j < 1024; j++)
					{
						connected_layer_weights[i][j] = h_fcl2_weights[i*1024 + j];
						connected_weight_deriv[i][j] = h_fcl2_weight_deriv[i*1024 + j];
					}
				}
			}
			if (r % 5 == 0)
			{
				float round_time = (std::clock() - start) / (double)CLOCKS_PER_SEC;
				printf("Epoch: %d, Round: %d, Accuracy: %f, Time: %f sec (%f min)\n", epoch, r, right / (right + wrong), round_time, round_time / 60);
			}
		}
	}

	/* FORWARD */
	/*
	int forward_right = 0;
	int forward_wrong = 0;
	for (int image = 0; image < number_of_images; image++)
	{
		int label = labels[image];

		fcl_1 = first_dense_layer(images[image], image_layer_weights, fcl_1_bias);
		fcl_2 = second_dense_layer(fcl_1, connected_layer_weights, fcl_2_bias);
		sm_layer = soft_max(fcl_2);

		int index = std::distance(sm_layer, std::max_element(sm_layer, sm_layer + FCL2_DIM));
		if (index == label) forward_right++;
		else forward_wrong++;

		printf("Ratio: %f\n", (float)forward_right / float(forward_right + forward_wrong));
	}
	*/

	printf("Got through with no issues.\n");
}

	.file	"tmpxft_00239099_00000000-6_cuda.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB5099:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE5099:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.type	_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0, @function
_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0:
.LFB5876:
	.cfi_startproc
	jmp	cudaMalloc@PLT
	.cfi_endproc
.LFE5876:
	.size	_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0, .-_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0
	.globl	_Z12switchEndianRi
	.type	_Z12switchEndianRi, @function
_Z12switchEndianRi:
.LFB5080:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	movl	%eax, %edx
	movl	%eax, %ecx
	sall	$24, %ecx
	sarl	$24, %edx
	orl	%ecx, %edx
	movl	%eax, %ecx
	sarl	$8, %eax
	sall	$8, %ecx
	andl	$65280, %eax
	andl	$16711680, %ecx
	orl	%ecx, %edx
	orl	%edx, %eax
	movl	%eax, (%rdi)
	ret
	.cfi_endproc
.LFE5080:
	.size	_Z12switchEndianRi, .-_Z12switchEndianRi
	.globl	_Z17first_dense_layerPPfPS0_S_
	.type	_Z17first_dense_layerPPfPS0_S_, @function
_Z17first_dense_layerPPfPS0_S_:
.LFB5083:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	$1000, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rdx, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rsi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdi, %rbp
	movl	$123, %edi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	pushq	%rcx
	.cfi_def_cfa_offset 64
	call	srand@PLT
	movl	$4096, %edi
	call	_Znam@PLT
	movq	%rax, %r15
.L11:
	call	rand@PLT
	xorps	%xmm0, %xmm0
	cltd
	idivl	%r14d
	cmpl	$3, %edx
	jle	.L5
	movq	(%r12,%rbx,2), %rdi
	xorl	%edx, %edx
.L6:
	movq	(%rdi,%rdx), %rsi
	movq	0(%rbp,%rdx), %rcx
	xorl	%eax, %eax
.L7:
	movss	(%rsi,%rax), %xmm1
	mulss	(%rcx,%rax), %xmm1
	addq	$4, %rax
	addss	%xmm1, %xmm0
	cmpq	$112, %rax
	jne	.L7
	addq	$8, %rdx
	cmpq	$224, %rdx
	jne	.L6
	addss	0(%r13,%rbx), %xmm0
	xorps	%xmm1, %xmm1
	comiss	%xmm1, %xmm0
	ja	.L5
	movaps	%xmm1, %xmm0
.L5:
	movss	%xmm0, (%r15,%rbx)
	addq	$4, %rbx
	cmpq	$4096, %rbx
	jne	.L11
	popq	%rdx
	.cfi_def_cfa_offset 56
	movq	%r15, %rax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5083:
	.size	_Z17first_dense_layerPPfPS0_S_, .-_Z17first_dense_layerPPfPS0_S_
	.globl	_Z18second_dense_layerPfPS_S_
	.type	_Z18second_dense_layerPfPS_S_, @function
_Z18second_dense_layerPfPS_S_:
.LFB5084:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rdx, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rdi, %rbp
	movl	$40, %edi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rsi, %rbx
	call	_Znam@PLT
	xorl	%ecx, %ecx
.L19:
	movq	(%rbx,%rcx,2), %rdx
	xorl	%r8d, %r8d
	xorps	%xmm0, %xmm0
.L20:
	movss	(%rdx,%r8), %xmm1
	mulss	0(%rbp,%r8), %xmm1
	addq	$4, %r8
	addss	%xmm1, %xmm0
	cmpq	$4096, %r8
	jne	.L20
	addss	(%r12,%rcx), %xmm0
	movss	%xmm0, (%rax,%rcx)
	addq	$4, %rcx
	cmpq	$40, %rcx
	jne	.L19
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5084:
	.size	_Z18second_dense_layerPfPS_S_, .-_Z18second_dense_layerPfPS_S_
	.globl	_Z8soft_maxPf
	.type	_Z8soft_maxPf, @function
_Z8soft_maxPf:
.LFB5085:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rdi, %r12
	movl	$40, %edi
	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
	call	_Znam@PLT
	movss	(%r12), %xmm2
	movq	%rax, %rbx
	xorl	%eax, %eax
.L27:
	maxss	(%r12,%rax,4), %xmm2
	incq	%rax
	cmpq	$10, %rax
	jne	.L27
	xorl	%ebp, %ebp
	xorps	%xmm1, %xmm1
.L28:
	movss	(%r12,%rbp), %xmm0
	movss	%xmm1, 12(%rsp)
	movss	%xmm2, 8(%rsp)
	subss	%xmm2, %xmm0
	call	expf@PLT
	movss	12(%rsp), %xmm1
	movss	8(%rsp), %xmm2
	movss	%xmm0, (%rbx,%rbp)
	addq	$4, %rbp
	cmpq	$40, %rbp
	addss	%xmm0, %xmm1
	jne	.L28
	xorl	%eax, %eax
.L29:
	movss	(%rbx,%rax,4), %xmm0
	divss	%xmm1, %xmm0
	movss	%xmm0, (%rbx,%rax,4)
	incq	%rax
	cmpq	$10, %rax
	jne	.L29
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%rbx, %rax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5085:
	.size	_Z8soft_maxPf, .-_Z8soft_maxPf
	.globl	_Z13cross_entropyPfi
	.type	_Z13cross_entropyPfi, @function
_Z13cross_entropyPfi:
.LFB5086:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	pushq	%rax
	.cfi_def_cfa_offset 16
	movss	(%rdi,%rsi,4), %xmm0
	call	logf@PLT
	xorps	.LC1(%rip), %xmm0
	popq	%rdx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5086:
	.size	_Z13cross_entropyPfi, .-_Z13cross_entropyPfi
	.globl	_Z17soft_max_backpropPfS_S_
	.type	_Z17soft_max_backpropPfS_S_, @function
_Z17soft_max_backpropPfS_S_:
.LFB5087:
	.cfi_startproc
	endbr64
	movss	.LC2(%rip), %xmm6
	xorl	%eax, %eax
	movss	.LC1(%rip), %xmm5
.L41:
	movl	$0x00000000, (%rdi,%rax,4)
	xorl	%ecx, %ecx
.L40:
	movss	(%rdi,%rax,4), %xmm1
	movss	(%rsi,%rcx,4), %xmm3
	movss	(%rdx,%rax,4), %xmm0
	movss	(%rdx,%rcx,4), %xmm4
	cmpl	%eax, %ecx
	jne	.L38
	movaps	%xmm6, %xmm2
	subss	%xmm0, %xmm2
	mulss	%xmm4, %xmm2
	movaps	%xmm2, %xmm0
	jmp	.L44
.L38:
	xorps	%xmm5, %xmm0
	mulss	%xmm4, %xmm0
.L44:
	mulss	%xmm3, %xmm0
	incq	%rcx
	addss	%xmm0, %xmm1
	movss	%xmm1, (%rdi,%rax,4)
	cmpq	$10, %rcx
	jne	.L40
	incq	%rax
	cmpq	$10, %rax
	jne	.L41
	ret
	.cfi_endproc
.LFE5087:
	.size	_Z17soft_max_backpropPfS_S_, .-_Z17soft_max_backpropPfS_S_
	.globl	_Z14fcl_2_backpropPfS_S_S_PS_S0_f
	.type	_Z14fcl_2_backpropPfS_S_S_PS_S0_f, @function
_Z14fcl_2_backpropPfS_S_S_PS_S0_f:
.LFB5088:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsi, %r11
	movq	%rdi, %r10
	movq	%rcx, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	xorl	%esi, %esi
	movq	%rdx, %rbx
	xorl	%eax, %eax
.L46:
	movl	$1024, %ecx
	movq	%r10, %rdi
	xorl	%edx, %edx
	rep stosl
	movq	(%r8,%rsi,2), %rdi
	movq	(%r9,%rsi,2), %rcx
.L47:
	movss	(%r11,%rsi), %xmm1
	mulss	(%rdi,%rdx), %xmm1
	addss	(%r10,%rdx), %xmm1
	movss	%xmm1, (%r10,%rdx)
	movss	(%r11,%rsi), %xmm1
	mulss	(%rbx,%rdx), %xmm1
	divss	%xmm0, %xmm1
	addss	(%rcx,%rdx), %xmm1
	movss	%xmm1, (%rcx,%rdx)
	addq	$4, %rdx
	cmpq	$4096, %rdx
	jne	.L47
	movss	(%r11,%rsi), %xmm1
	divss	%xmm0, %xmm1
	movss	%xmm1, 0(%rbp,%rsi)
	addq	$4, %rsi
	cmpq	$40, %rsi
	jne	.L46
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5088:
	.size	_Z14fcl_2_backpropPfS_S_S_PS_S0_f, .-_Z14fcl_2_backpropPfS_S_S_PS_S0_f
	.globl	_Z14fcl_1_backpropPfS_PS_S_PS0_S1_f
	.type	_Z14fcl_1_backpropPfS_PS_S_PS0_S1_f, @function
_Z14fcl_1_backpropPfS_PS_S_PS0_S1_f:
.LFB5089:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdx, %rdi
	movq	%rcx, %r8
	xorl	%eax, %eax
.L52:
	movq	(%r9,%rax,2), %r11
	xorl	%ecx, %ecx
.L56:
	movq	(%r11,%rcx), %r10
	movq	(%rdi,%rcx), %rbx
	xorl	%edx, %edx
.L53:
	movss	(%rsi,%rax), %xmm1
	mulss	(%rbx,%rdx), %xmm1
	divss	%xmm0, %xmm1
	addss	(%r10,%rdx), %xmm1
	movss	%xmm1, (%r10,%rdx)
	addq	$4, %rdx
	cmpq	$112, %rdx
	jne	.L53
	addq	$8, %rcx
	cmpq	$224, %rcx
	jne	.L56
	movss	(%rsi,%rax), %xmm1
	divss	%xmm0, %xmm1
	movss	%xmm1, (%r8,%rax)
	addq	$4, %rax
	cmpq	$4096, %rax
	jne	.L52
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5089:
	.size	_Z14fcl_1_backpropPfS_PS_S_PS0_S1_f, .-_Z14fcl_1_backpropPfS_PS_S_PS0_S1_f
	.globl	_Z12fcl_1_updatePPPfS1_S_S_f
	.type	_Z12fcl_1_updatePPPfS1_S_S_f, @function
_Z12fcl_1_updatePPPfS1_S_S_f:
.LFB5090:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %r9
	movq	%rsi, %r8
	movq	%rdx, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	xorl	%eax, %eax
.L60:
	movq	(%r9,%rax,2), %rbp
	movq	(%r8,%rax,2), %rbx
	xorl	%esi, %esi
.L64:
	movq	0(%rbp,%rsi), %r11
	movq	(%rbx,%rsi), %r10
	xorl	%edx, %edx
.L61:
	movss	(%r10,%rdx), %xmm2
	movss	(%r11,%rdx), %xmm1
	mulss	%xmm0, %xmm2
	subss	%xmm2, %xmm1
	movss	%xmm1, (%r11,%rdx)
	movl	$0x00000000, (%r10,%rdx)
	addq	$4, %rdx
	cmpq	$112, %rdx
	jne	.L61
	addq	$8, %rsi
	cmpq	$224, %rsi
	jne	.L64
	movss	(%rcx,%rax), %xmm2
	movss	(%rdi,%rax), %xmm1
	mulss	%xmm0, %xmm2
	subss	%xmm2, %xmm1
	movss	%xmm1, (%rdi,%rax)
	movl	$0x00000000, (%rcx,%rax)
	addq	$4, %rax
	cmpq	$4096, %rax
	jne	.L60
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5090:
	.size	_Z12fcl_1_updatePPPfS1_S_S_f, .-_Z12fcl_1_updatePPPfS1_S_S_f
	.globl	_Z12fcl_2_updatePPfS0_S_S_f
	.type	_Z12fcl_2_updatePPfS0_S_S_f, @function
_Z12fcl_2_updatePPfS0_S_S_f:
.LFB5091:
	.cfi_startproc
	endbr64
	movq	%rdi, %r8
	xorl	%eax, %eax
	movq	%rsi, %rdi
.L68:
	movq	(%r8,%rax,2), %r10
	movq	(%rdi,%rax,2), %r9
	xorl	%esi, %esi
.L69:
	movss	(%r9,%rsi), %xmm2
	movss	(%r10,%rsi), %xmm1
	mulss	%xmm0, %xmm2
	subss	%xmm2, %xmm1
	movss	%xmm1, (%r10,%rsi)
	movl	$0x00000000, (%r9,%rsi)
	addq	$4, %rsi
	cmpq	$4096, %rsi
	jne	.L69
	movss	(%rcx,%rax), %xmm2
	movss	(%rdx,%rax), %xmm1
	mulss	%xmm0, %xmm2
	subss	%xmm2, %xmm1
	movss	%xmm1, (%rdx,%rax)
	movl	$0x00000000, (%rcx,%rax)
	addq	$4, %rax
	cmpq	$40, %rax
	jne	.L68
	ret
	.cfi_endproc
.LFE5091:
	.size	_Z12fcl_2_updatePPfS0_S_S_f, .-_Z12fcl_2_updatePPfS0_S_S_f
	.globl	_Z19create_weight_deriviii
	.type	_Z19create_weight_deriviii, @function
_Z19create_weight_deriviii:
.LFB5094:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movabsq	$1152921504606846975, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movl	%edi, (%rsp)
	movslq	%edi, %rdi
	movl	%esi, 4(%rsp)
	cmpq	%rdi, %r14
	jb	.L73
	salq	$3, %rdi
	movl	%edx, %ebp
	xorl	%ebx, %ebx
	call	_Znam@PLT
	movslq	4(%rsp), %r12
	movslq	%ebp, %r13
	movq	%rax, %r15
	leaq	0(,%r12,8), %rax
	movq	%rax, 16(%rsp)
	leaq	0(,%r13,4), %rax
	movq	%rax, 24(%rsp)
	jmp	.L74
.L73:
	call	__cxa_throw_bad_array_new_length@PLT
.L79:
	cmpq	%r12, %r14
	jb	.L73
	movq	16(%rsp), %rdi
	call	_Znam@PLT
	xorl	%esi, %esi
	movq	%rax, (%r15,%rbx,8)
.L75:
	cmpl	%esi, 4(%rsp)
	jg	.L78
	incq	%rbx
.L74:
	cmpl	%ebx, (%rsp)
	jg	.L79
	jmp	.L81
.L78:
	movabsq	$2305843009213693950, %rax
	cmpq	%r13, %rax
	jb	.L73
	leaq	0(,%rsi,8), %r8
	movq	24(%rsp), %rdi
	movq	%rsi, 40(%rsp)
	movq	%r8, %rax
	addq	(%r15,%rbx,8), %rax
	movq	%r8, 32(%rsp)
	movq	%rax, 8(%rsp)
	call	_Znam@PLT
	movq	8(%rsp), %rcx
	movq	32(%rsp), %r8
	movq	40(%rsp), %rsi
	movq	%rax, (%rcx)
	xorl	%eax, %eax
.L76:
	cmpl	%eax, %ebp
	jle	.L82
	movq	(%r15,%rbx,8), %rdi
	movq	(%rdi,%r8), %rdi
	movl	$0x00000000, (%rdi,%rax,4)
	incq	%rax
	jmp	.L76
.L82:
	incq	%rsi
	jmp	.L75
.L81:
	addq	$56, %rsp
	.cfi_def_cfa_offset 56
	movq	%r15, %rax
	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
.LFE5094:
	.size	_Z19create_weight_deriviii, .-_Z19create_weight_deriviii
	.globl	_Z19create_weight_derivii
	.type	_Z19create_weight_derivii, @function
_Z19create_weight_derivii:
.LFB5095:
	.cfi_startproc
	endbr64
	movabsq	$1152921504606846975, %rax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%edi, %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	cmpq	%rdi, %rax
	jb	.L84
	movl	%esi, %r13d
	movq	%rdi, %r12
	xorl	%ebp, %ebp
	salq	$3, %rdi
	call	_Znam@PLT
	movslq	%r13d, %r14
	movabsq	$2305843009213693950, %r15
	movq	%rax, %rbx
	leaq	0(,%r14,4), %rax
	movq	%rax, 8(%rsp)
	jmp	.L85
.L84:
	call	__cxa_throw_bad_array_new_length@PLT
.L91:
	incq	%rbp
.L85:
	cmpl	%ebp, %r12d
	jle	.L90
	cmpq	%r14, %r15
	jb	.L84
	movq	8(%rsp), %rdi
	call	_Znam@PLT
	xorl	%edx, %edx
	movq	%rax, (%rbx,%rbp,8)
.L86:
	cmpl	%edx, %r13d
	jle	.L91
	movl	$0x00000000, (%rax,%rdx,4)
	incq	%rdx
	jmp	.L86
.L90:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	movq	%rbx, %rax
	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
.LFE5095:
	.size	_Z19create_weight_derivii, .-_Z19create_weight_derivii
	.globl	_Z43__device_stub__Z16cuda_fcl1_updatePfS_S_S_fPfS_S_S_f
	.type	_Z43__device_stub__Z16cuda_fcl1_updatePfS_S_S_fPfS_S_S_f, @function
_Z43__device_stub__Z16cuda_fcl1_updatePfS_S_S_fPfS_S_S_f:
.LFB5121:
	.cfi_startproc
	endbr64
	subq	$168, %rsp
	.cfi_def_cfa_offset 176
	movq	%rdi, 40(%rsp)
	leaq	64(%rsp), %rdi
	movq	%rsi, 32(%rsp)
	leaq	76(%rsp), %rsi
	movq	%rdx, 24(%rsp)
	leaq	48(%rsp), %rdx
	movq	%rcx, 16(%rsp)
	leaq	56(%rsp), %rcx
	movss	%xmm0, 12(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 152(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	movl	$1, 72(%rsp)
	movq	%rax, 112(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 144(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 64(%rsp)
	movq	%rax, 76(%rsp)
	movl	$1, 84(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L92
	pushq	56(%rsp)
	.cfi_def_cfa_offset 184
	leaq	_Z16cuda_fcl1_updatePfS_S_S_f(%rip), %rdi
	pushq	56(%rsp)
	.cfi_def_cfa_offset 192
	movq	92(%rsp), %rcx
	movl	100(%rsp), %r8d
	movq	80(%rsp), %rsi
	movl	88(%rsp), %edx
	leaq	128(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 184
	popq	%rdx
	.cfi_def_cfa_offset 176
.L92:
	movq	152(%rsp), %rax
	subq	%fs:40, %rax
	je	.L94
	call	__stack_chk_fail@PLT
.L94:
	addq	$168, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5121:
	.size	_Z43__device_stub__Z16cuda_fcl1_updatePfS_S_S_fPfS_S_S_f, .-_Z43__device_stub__Z16cuda_fcl1_updatePfS_S_S_fPfS_S_S_f
	.globl	_Z16cuda_fcl1_updatePfS_S_S_f
	.type	_Z16cuda_fcl1_updatePfS_S_S_f, @function
_Z16cuda_fcl1_updatePfS_S_S_f:
.LFB5122:
	.cfi_startproc
	endbr64
	jmp	_Z43__device_stub__Z16cuda_fcl1_updatePfS_S_S_fPfS_S_S_f
	.cfi_endproc
.LFE5122:
	.size	_Z16cuda_fcl1_updatePfS_S_S_f, .-_Z16cuda_fcl1_updatePfS_S_S_f
	.globl	_Z43__device_stub__Z16cuda_fcl2_updatePfS_S_S_fPfS_S_S_f
	.type	_Z43__device_stub__Z16cuda_fcl2_updatePfS_S_S_fPfS_S_S_f, @function
_Z43__device_stub__Z16cuda_fcl2_updatePfS_S_S_fPfS_S_S_f:
.LFB5123:
	.cfi_startproc
	endbr64
	subq	$168, %rsp
	.cfi_def_cfa_offset 176
	movq	%rdi, 40(%rsp)
	leaq	64(%rsp), %rdi
	movq	%rsi, 32(%rsp)
	leaq	76(%rsp), %rsi
	movq	%rdx, 24(%rsp)
	leaq	48(%rsp), %rdx
	movq	%rcx, 16(%rsp)
	leaq	56(%rsp), %rcx
	movss	%xmm0, 12(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 152(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	movl	$1, 72(%rsp)
	movq	%rax, 112(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 144(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 64(%rsp)
	movq	%rax, 76(%rsp)
	movl	$1, 84(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L97
	pushq	56(%rsp)
	.cfi_def_cfa_offset 184
	leaq	_Z16cuda_fcl2_updatePfS_S_S_f(%rip), %rdi
	pushq	56(%rsp)
	.cfi_def_cfa_offset 192
	movq	92(%rsp), %rcx
	movl	100(%rsp), %r8d
	movq	80(%rsp), %rsi
	movl	88(%rsp), %edx
	leaq	128(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 184
	popq	%rdx
	.cfi_def_cfa_offset 176
.L97:
	movq	152(%rsp), %rax
	subq	%fs:40, %rax
	je	.L99
	call	__stack_chk_fail@PLT
.L99:
	addq	$168, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5123:
	.size	_Z43__device_stub__Z16cuda_fcl2_updatePfS_S_S_fPfS_S_S_f, .-_Z43__device_stub__Z16cuda_fcl2_updatePfS_S_S_fPfS_S_S_f
	.globl	_Z16cuda_fcl2_updatePfS_S_S_f
	.type	_Z16cuda_fcl2_updatePfS_S_S_f, @function
_Z16cuda_fcl2_updatePfS_S_S_f:
.LFB5124:
	.cfi_startproc
	endbr64
	jmp	_Z43__device_stub__Z16cuda_fcl2_updatePfS_S_S_fPfS_S_S_f
	.cfi_endproc
.LFE5124:
	.size	_Z16cuda_fcl2_updatePfS_S_S_f, .-_Z16cuda_fcl2_updatePfS_S_S_f
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"_Z16cuda_fcl2_updatePfS_S_S_f"
.LC4:
	.string	"_Z16cuda_fcl1_updatePfS_S_S_f"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB5126:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	pushq	$0
	.cfi_def_cfa_offset 24
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC3(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z16cuda_fcl2_updatePfS_S_S_f(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC4(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z16cuda_fcl1_updatePfS_S_S_f(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE5126:
	.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
.LC5:
	.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_:
.LFB5443:
	.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	.L105
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L110
	leaq	.LC5(%rip), %rdi
	call	_ZSt19__throw_logic_errorPKc@PLT
.L105:
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	movq	%rsi, %rbp
	call	strlen@PLT
	movq	%rax, (%rsp)
	leaq	0(%rbp,%rax), %r12
	cmpq	$15, %rax
	jbe	.L107
	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)
.L107:
	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	.L108
.L110:
	call	__stack_chk_fail@PLT
.L108:
	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
.LFE5443:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_, .-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
	.set	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.text
	.globl	_Z15read_image_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_S5_S5_
	.type	_Z15read_image_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_S5_S5_, @function
_Z15read_image_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_S5_S5_:
.LFB5081:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA5081
	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
	movq	%r8, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rsi, %rbx
	subq	$584, %rsp
	.cfi_def_cfa_offset 640
	movq	%rdx, 16(%rsp)
	movq	%rcx, 24(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 568(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rax
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
.LEHB0:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev@PLT
.LEHE0:
	movq	0(%rbp), %rsi
	movq	8(%rsp), %rdi
	movl	$4, %edx
.LEHB1:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode@PLT
	movq	8(%rsp), %rdi
	movl	$4, %edx
	movq	%rbx, %rsi
	call	_ZNSi4readEPcl@PLT
	movq	16(%rsp), %rsi
	movq	8(%rsp), %rdi
	movl	$4, %edx
	call	_ZNSi4readEPcl@PLT
	movq	24(%rsp), %rsi
	movq	8(%rsp), %rdi
	movl	$4, %edx
	call	_ZNSi4readEPcl@PLT
	movq	8(%rsp), %rdi
	movl	$4, %edx
	movq	%r12, %rsi
	call	_ZNSi4readEPcl@PLT
	movq	%rbx, %rdi
	call	_Z12switchEndianRi
	movq	16(%rsp), %rdi
	call	_Z12switchEndianRi
	movq	24(%rsp), %rdi
	call	_Z12switchEndianRi
	movq	%r12, %rdi
	call	_Z12switchEndianRi
	movq	16(%rsp), %rax
	movslq	(%rax), %rdi
	movabsq	$1152921504606846975, %rax
	cmpq	%rdi, %rax
	jb	.L112
	salq	$3, %rdi
	call	_Znam@PLT
	movq	%rax, %rbx
	xorl	%ebp, %ebp
	jmp	.L113
.L112:
	movq	568(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L131
	call	__cxa_throw_bad_array_new_length@PLT
.L125:
	movq	24(%rsp), %rax
	movslq	(%rax), %rdi
	movabsq	$1152921504606846975, %rax
	cmpq	%rdi, %rax
	jb	.L115
	salq	$3, %rdi
	call	_Znam@PLT
	movq	%rax, (%rbx,%rbp,8)
	xorl	%r13d, %r13d
.L118:
	movq	24(%rsp), %rax
	cmpl	%r13d, (%rax)
	jg	.L124
	incq	%rbp
.L113:
	movq	16(%rsp), %rax
	cmpl	%ebp, (%rax)
	jg	.L125
	jmp	.L134
.L115:
	movq	568(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L131
	call	__cxa_throw_bad_array_new_length@PLT
.L124:
	movabsq	$2305843009213693950, %rax
	movslq	(%r12), %rdi
	cmpq	%rdi, %rax
	jb	.L119
	movq	(%rbx,%rbp,8), %r14
	leaq	0(,%r13,8), %r15
	salq	$2, %rdi
	addq	%r15, %r14
	call	_Znam@PLT
	movq	%rax, (%r14)
	xorl	%r14d, %r14d
	jmp	.L122
.L119:
	movq	568(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L131
	call	__cxa_throw_bad_array_new_length@PLT
.L123:
	movq	8(%rsp), %rdi
	leaq	47(%rsp), %rsi
	movl	$1, %edx
	call	_ZNSi4readEPcl@PLT
.LEHE1:
	movzbl	47(%rsp), %edx
	movq	(%rbx,%rbp,8), %rax
	cvtsi2sdl	%edx, %xmm0
	divsd	.LC6(%rip), %xmm0
	movq	(%rax,%r15), %rax
	subsd	.LC7(%rip), %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%rax,%r14,4)
	incq	%r14
.L122:
	cmpl	%r14d, (%r12)
	jg	.L123
	incq	%r13
	jmp	.L118
.L134:
	movq	8(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	568(%rsp), %rax
	subq	%fs:40, %rax
	je	.L128
	jmp	.L131
.L130:
	endbr64
	movq	%rax, %rbx
.L126:
	movq	8(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	568(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L131
	movq	%rbx, %rdi
.LEHB2:
	call	_Unwind_Resume@PLT
.LEHE2:
.L131:
	call	__stack_chk_fail@PLT
.L128:
	addq	$584, %rsp
	.cfi_def_cfa_offset 56
	movq	%rbx, %rax
	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
.LFE5081:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA5081:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE5081-.LLSDACSB5081
.LLSDACSB5081:
	.uleb128 .LEHB0-.LFB5081
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB5081
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L130-.LFB5081
	.uleb128 0
	.uleb128 .LEHB2-.LFB5081
	.uleb128 .LEHE2-.LEHB2
	.uleb128 0
	.uleb128 0
.LLSDACSE5081:
	.text
	.size	_Z15read_image_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_S5_S5_, .-_Z15read_image_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_S5_S5_
	.globl	_Z15read_label_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_
	.type	_Z15read_label_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_, @function
_Z15read_label_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_:
.LFB5082:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA5082
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movq	%rsi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%rdx, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$544, %rsp
	.cfi_def_cfa_offset 592
	movq	%fs:40, %rax
	movq	%rax, 536(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	movq	%rbx, %rdi
.LEHB3:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev@PLT
.LEHE3:
	movq	0(%r13), %rsi
	movl	$4, %edx
	movq	%rbx, %rdi
.LEHB4:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode@PLT
	movl	$4, %edx
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	_ZNSi4readEPcl@PLT
	movl	$4, %edx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	_ZNSi4readEPcl@PLT
	movq	%r12, %rdi
	call	_Z12switchEndianRi
	movq	%rbp, %rdi
	call	_Z12switchEndianRi
	movslq	0(%rbp), %rdi
	movabsq	$2305843009213693950, %rax
	cmpq	%rdi, %rax
	jb	.L136
	salq	$2, %rdi
	call	_Znam@PLT
	movq	%rax, %r12
	xorl	%r13d, %r13d
	leaq	15(%rsp), %r14
	jmp	.L137
.L136:
	movq	536(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L145
	call	__cxa_throw_bad_array_new_length@PLT
.L139:
	movl	$1, %edx
	movq	%r14, %rsi
	movq	%rbx, %rdi
	call	_ZNSi4readEPcl@PLT
.LEHE4:
	movsbl	15(%rsp), %eax
	movl	%eax, (%r12,%r13,4)
	incq	%r13
.L137:
	cmpl	%r13d, 0(%rbp)
	jg	.L139
	movq	%rbx, %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	536(%rsp), %rax
	subq	%fs:40, %rax
	je	.L142
	jmp	.L145
.L144:
	endbr64
	movq	%rax, %rbp
.L140:
	movq	%rbx, %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	536(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L145
	movq	%rbp, %rdi
.LEHB5:
	call	_Unwind_Resume@PLT
.LEHE5:
.L145:
	call	__stack_chk_fail@PLT
.L142:
	addq	$544, %rsp
	.cfi_def_cfa_offset 48
	movq	%r12, %rax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5082:
	.section	.gcc_except_table
.LLSDA5082:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE5082-.LLSDACSB5082
.LLSDACSB5082:
	.uleb128 .LEHB3-.LFB5082
	.uleb128 .LEHE3-.LEHB3
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB4-.LFB5082
	.uleb128 .LEHE4-.LEHB4
	.uleb128 .L144-.LFB5082
	.uleb128 0
	.uleb128 .LEHB5-.LFB5082
	.uleb128 .LEHE5-.LEHB5
	.uleb128 0
	.uleb128 0
.LLSDACSE5082:
	.text
	.size	_Z15read_label_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_, .-_Z15read_label_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_
	.section	.text._ZSt18generate_canonicalIfLm24ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_,"axG",@progbits,_ZSt18generate_canonicalIfLm24ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_,comdat
	.weak	_ZSt18generate_canonicalIfLm24ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_
	.type	_ZSt18generate_canonicalIfLm24ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_, @function
_ZSt18generate_canonicalIfLm24ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_:
.LFB5832:
	.cfi_startproc
	endbr64
	imulq	$16807, (%rdi), %rax
	movl	$2147483647, %ecx
	xorl	%edx, %edx
	divq	%rcx
	movq	%rdx, (%rdi)
	decq	%rdx
	js	.L149
	cvtsi2ssq	%rdx, %xmm0
	jmp	.L150
.L149:
	movq	%rdx, %rax
	andl	$1, %edx
	shrq	%rax
	orq	%rdx, %rax
	cvtsi2ssq	%rax, %xmm0
	addss	%xmm0, %xmm0
.L150:
	xorps	%xmm1, %xmm1
	addss	%xmm1, %xmm0
	mulss	.LC9(%rip), %xmm0
	comiss	.LC2(%rip), %xmm0
	jb	.L148
	movss	.LC8(%rip), %xmm0
.L148:
	ret
	.cfi_endproc
.LFE5832:
	.size	_ZSt18generate_canonicalIfLm24ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_, .-_ZSt18generate_canonicalIfLm24ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_
	.text
	.align 2
	.type	_ZNSt19normal_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_RKNS0_10param_typeE.isra.0, @function
_ZNSt19normal_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_RKNS0_10param_typeE.isra.0:
.LFB5879:
	.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
	subq	$40, %rsp
	.cfi_def_cfa_offset 64
	cmpb	$0, 12(%rdi)
	movss	%xmm0, 16(%rsp)
	movss	%xmm1, 20(%rsp)
	je	.L158
	movb	$0, 12(%rdi)
	movss	8(%rdi), %xmm1
	jmp	.L155
.L162:
	xorps	%xmm0, %xmm0
	ucomiss	%xmm0, %xmm2
	jp	.L157
	jne	.L157
.L158:
	movq	%rbp, %rdi
	call	_ZSt18generate_canonicalIfLm24ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_
	movq	%rbp, %rdi
	addss	%xmm0, %xmm0
	subss	.LC2(%rip), %xmm0
	movss	%xmm0, 12(%rsp)
	call	_ZSt18generate_canonicalIfLm24ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_
	movss	12(%rsp), %xmm2
	addss	%xmm0, %xmm0
	mulss	%xmm2, %xmm2
	movaps	%xmm0, %xmm1
	subss	.LC2(%rip), %xmm1
	movaps	%xmm1, %xmm0
	mulss	%xmm1, %xmm0
	addss	%xmm0, %xmm2
	comiss	.LC2(%rip), %xmm2
	ja	.L158
	jmp	.L162
.L157:
	movaps	%xmm2, %xmm0
	movss	%xmm1, 28(%rsp)
	movss	%xmm2, 24(%rsp)
	call	logf@PLT
	mulss	.LC10(%rip), %xmm0
	movss	24(%rsp), %xmm2
	divss	%xmm2, %xmm0
	call	sqrtf@PLT
	movss	12(%rsp), %xmm2
	movss	28(%rsp), %xmm1
	movb	$1, 12(%rbx)
	mulss	%xmm0, %xmm2
	mulss	%xmm0, %xmm1
	movss	%xmm2, 8(%rbx)
.L155:
	mulss	20(%rsp), %xmm1
	movss	16(%rsp), %xmm0
	addq	$40, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	addss	%xmm1, %xmm0
	ret
	.cfi_endproc
.LFE5879:
	.size	_ZNSt19normal_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_RKNS0_10param_typeE.isra.0, .-_ZNSt19normal_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_RKNS0_10param_typeE.isra.0
	.globl	_Z14create_weightsii
	.type	_Z14create_weightsii, @function
_Z14create_weightsii:
.LFB5093:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%edi, %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	movl	$127, %eax
	movl	$0x00000000, 48(%rsp)
	salq	$55, %rax
	movb	$0, 52(%rsp)
	movq	%rax, 40(%rsp)
	movabsq	$1152921504606846975, %rax
	movq	$456, 32(%rsp)
	cmpq	%rdi, %rax
	jb	.L164
	movl	%esi, %r12d
	movq	%rdi, %rbx
	salq	$3, %rdi
	xorl	%r14d, %r14d
	call	_Znam@PLT
	movslq	%r12d, %r13
	movq	%rax, %rbp
	leaq	0(,%r13,4), %rax
	movq	%rax, 8(%rsp)
	jmp	.L165
.L164:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L172
	call	__cxa_throw_bad_array_new_length@PLT
.L174:
	incq	%r14
.L165:
	cmpl	%r14d, %ebx
	jle	.L173
	movabsq	$2305843009213693950, %rax
	cmpq	%r13, %rax
	jb	.L164
	movq	8(%rsp), %rdi
	xorl	%r15d, %r15d
	call	_Znam@PLT
	movq	%rax, 0(%rbp,%r14,8)
.L167:
	cmpl	%r15d, %r12d
	jle	.L174
	movss	.LC2(%rip), %xmm1
	leaq	32(%rsp), %rsi
	leaq	40(%rsp), %rdi
	xorps	%xmm0, %xmm0
	movq	%rax, 24(%rsp)
	call	_ZNSt19normal_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_RKNS0_10param_typeE.isra.0
	movss	%xmm0, 20(%rsp)
	cvtsi2sdl	%ebx, %xmm0
	call	sqrt@PLT
	movss	20(%rsp), %xmm1
	movq	24(%rsp), %rax
	cvtss2sd	%xmm1, %xmm1
	divsd	%xmm0, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movss	%xmm1, (%rax,%r15,4)
	incq	%r15
	jmp	.L167
.L173:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	je	.L170
.L172:
	call	__stack_chk_fail@PLT
.L170:
	addq	$72, %rsp
	.cfi_def_cfa_offset 56
	movq	%rbp, %rax
	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
.LFE5093:
	.size	_Z14create_weightsii, .-_Z14create_weightsii
	.globl	_Z14create_weightsiii
	.type	_Z14create_weightsiii, @function
_Z14create_weightsiii:
.LFB5092:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movl	%edi, 4(%rsp)
	movslq	%edi, %rdi
	movl	%esi, 8(%rsp)
	movl	%edx, 12(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	movl	$127, %eax
	movl	$0x00000000, 64(%rsp)
	salq	$55, %rax
	movb	$0, 68(%rsp)
	movq	%rax, 56(%rsp)
	movabsq	$1152921504606846975, %rax
	movq	$123, 48(%rsp)
	cmpq	%rdi, %rax
	jb	.L176
	salq	$3, %rdi
	xorl	%r15d, %r15d
	call	_Znam@PLT
	movslq	8(%rsp), %r12
	movslq	12(%rsp), %r13
	movq	%rax, %rbx
	leaq	0(,%r12,8), %rax
	movq	%rax, 24(%rsp)
	leaq	0(,%r13,4), %rax
	movq	%rax, 32(%rsp)
	jmp	.L177
.L176:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L186
	call	__cxa_throw_bad_array_new_length@PLT
.L183:
	movabsq	$1152921504606846975, %rax
	cmpq	%r12, %rax
	jb	.L176
	movq	24(%rsp), %rdi
	xorl	%ebp, %ebp
	call	_Znam@PLT
	movq	%rax, (%rbx,%r15,8)
.L179:
	cmpl	%ebp, 8(%rsp)
	jg	.L182
	incq	%r15
.L177:
	cmpl	%r15d, 4(%rsp)
	jg	.L183
	jmp	.L187
.L182:
	movabsq	$2305843009213693950, %rax
	cmpq	%r13, %rax
	jb	.L176
	movq	(%rbx,%r15,8), %rax
	movq	32(%rsp), %rdi
	leaq	0(,%rbp,8), %r14
	addq	%r14, %rax
	movq	%rax, 16(%rsp)
	call	_Znam@PLT
	movq	16(%rsp), %rcx
	movq	%rax, (%rcx)
	xorl	%eax, %eax
.L180:
	cmpl	%eax, 12(%rsp)
	jle	.L188
	movss	.LC2(%rip), %xmm1
	leaq	48(%rsp), %rsi
	leaq	56(%rsp), %rdi
	xorps	%xmm0, %xmm0
	movq	%rax, 40(%rsp)
	call	_ZNSt19normal_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_RKNS0_10param_typeE.isra.0
	movss	%xmm0, 16(%rsp)
	cvtsi2sdl	4(%rsp), %xmm0
	call	sqrt@PLT
	movss	16(%rsp), %xmm2
	movq	(%rbx,%r15,8), %rsi
	movaps	%xmm0, %xmm1
	movq	40(%rsp), %rax
	cvtss2sd	%xmm2, %xmm0
	divsd	%xmm1, %xmm0
	movq	(%rsi,%r14), %rsi
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%rsi,%rax,4)
	incq	%rax
	jmp	.L180
.L188:
	incq	%rbp
	jmp	.L179
.L187:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	je	.L184
.L186:
	call	__stack_chk_fail@PLT
.L184:
	addq	$88, %rsp
	.cfi_def_cfa_offset 56
	movq	%rbx, %rax
	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
.LFE5092:
	.size	_Z14create_weightsiii, .-_Z14create_weightsiii
	.section	.rodata.str1.1
.LC11:
	.string	"USAGE: ./prog3 <image file> <label file>\n"
.LC17:
	.string	"Epoch: %d, Round: %d, Accuracy: %f, Time: %f sec (%f min)\n"
.LC18:
	.string	"Got through with no issues.\n"
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB5096:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA5096
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$344, %rsp
	.cfi_def_cfa_offset 400
	movq	%fs:40, %rax
	movq	%rax, 328(%rsp)
	xorl	%eax, %eax
	cmpl	$3, %edi
	je	.L190
	leaq	.LC11(%rip), %rsi
	movl	$2, %edi
	jmp	.L236
.L190:
	leaq	296(%rsp), %rbx
	movq	%rsi, %rbp
	leaq	284(%rsp), %r12
	movq	8(%rsi), %rsi
	movq	%r12, %rdx
	movq	%rbx, %rdi
.LEHB6:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE6:
	leaq	200(%rsp), %rcx
	movq	%rbx, %rdi
	leaq	196(%rsp), %rdx
	leaq	188(%rsp), %rsi
	leaq	204(%rsp), %r8
.LEHB7:
	call	_Z15read_image_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_S5_S5_
.LEHE7:
	movq	%rbx, %rdi
	movq	%rax, 152(%rsp)
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	16(%rbp), %rsi
	movq	%r12, %rdx
	movq	%rbx, %rdi
.LEHB8:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE8:
	leaq	192(%rsp), %rdx
	leaq	184(%rsp), %rsi
	movq	%rbx, %rdi
.LEHB9:
	call	_Z15read_label_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_
.LEHE9:
	movq	%rbx, %rdi
	movq	%rax, 160(%rsp)
	xorl	%ebx, %ebx
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movl	$28, %edx
	movl	$28, %esi
	movl	$1024, %edi
.LEHB10:
	call	_Z14create_weightsiii
	movl	$1024, %esi
	movl	$10, %edi
	movq	%rax, 8(%rsp)
	call	_Z14create_weightsii
	movl	$28, %edx
	movl	$28, %esi
	movl	$1024, %edi
	movq	%rax, 16(%rsp)
	call	_Z19create_weight_deriviii
	movl	$1024, %esi
	movl	$10, %edi
	movq	%rax, 72(%rsp)
	call	_Z19create_weight_derivii
	movl	$4096, %edi
	movq	%rax, 80(%rsp)
	call	_Znam@PLT
	movl	$1024, %ecx
	movq	%rax, %rdi
	movl	%ebx, %eax
	rep stosl
	movl	$4096, %edi
	call	_Znam@PLT
	movl	$1024, %ecx
	movq	%rax, 24(%rsp)
	movq	%rax, %rdi
	movl	%ebx, %eax
	rep stosl
	movl	$4096, %edi
	call	_Znam@PLT
	movl	$1024, %ecx
	movq	%rax, 120(%rsp)
	movq	%rax, %rdi
	movl	%ebx, %eax
	rep stosl
	movl	$4096, %edi
	call	_Znam@PLT
	movl	$1024, %ecx
	movq	%rax, 32(%rsp)
	movq	%rax, %rdi
	movl	%ebx, %eax
	rep stosl
	movl	$40, %edi
	call	_Znam@PLT
	movl	$10, %ecx
	movq	%rax, %rdi
	movl	%ebx, %eax
	rep stosl
	movl	$40, %edi
	call	_Znam@PLT
	movl	$10, %ecx
	movq	%rax, 40(%rsp)
	movq	%rax, %rdi
	movl	%ebx, %eax
	rep stosl
	movl	$4096, %edi
	call	_Znam@PLT
	movl	$1024, %ecx
	movq	%rax, 88(%rsp)
	movq	%rax, %rdi
	movl	%ebx, %eax
	rep stosl
	movl	$40, %edi
	call	_Znam@PLT
	movl	$10, %ecx
	movq	%rax, 96(%rsp)
	movq	%rax, %rdi
	movl	%ebx, %eax
	rep stosl
	movl	$40, %edi
	call	_Znam@PLT
	movl	$10, %ecx
	movq	%rax, %rdi
	movl	%ebx, %eax
	rep stosl
	movl	$40, %edi
	call	_Znam@PLT
	movl	$10, %ecx
	movq	%rax, 104(%rsp)
	movq	%rax, %rdi
	movl	%ebx, %eax
	rep stosl
	movl	$40, %edi
	call	_Znam@PLT
	movl	$3211264, %edi
	movq	%rax, 112(%rsp)
	call	_Znam@PLT
	movl	$3211264, %edi
	movq	%rax, 48(%rsp)
	call	_Znam@PLT
	movl	$40960, %edi
	movq	%rax, 56(%rsp)
	call	_Znam@PLT
	movl	$40960, %edi
	movq	%rax, %rbx
	call	_Znam@PLT
	leaq	208(%rsp), %rdi
	movl	$3211264, %esi
	movq	%rax, %rbp
	call	_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0
	leaq	216(%rsp), %rdi
	movl	$3211264, %esi
	call	_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0
	leaq	224(%rsp), %rdi
	movl	$4096, %esi
	call	_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0
	leaq	232(%rsp), %rdi
	movl	$4096, %esi
	call	_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0
	leaq	240(%rsp), %rdi
	movl	$40960, %esi
	call	_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0
	leaq	248(%rsp), %rdi
	movl	$40960, %esi
	call	_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0
	leaq	256(%rsp), %rdi
	movl	$40, %esi
	call	_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0
	leaq	264(%rsp), %rdi
	movl	$40, %esi
	call	_Z10cudaMallocIfE9cudaErrorPPT_m.isra.0
	call	clock@PLT
	xorl	%eax, %eax
	movl	%eax, 136(%rsp)
.L218:
	call	clock@PLT
	xorl	%r12d, %r12d
	movq	%rax, 168(%rsp)
.L192:
	imulq	$800, %r12, %r13
	movq	152(%rsp), %rax
	movq	160(%rsp), %rdx
	movl	%r12d, 140(%rsp)
	movl	$0x00000000, 64(%rsp)
	xorl	%r14d, %r14d
	movl	$0x00000000, 68(%rsp)
	addq	%rax, %r13
	imulq	$400, %r12, %rax
	addq	%rdx, %rax
	movq	%rax, 144(%rsp)
.L215:
	movq	144(%rsp), %rax
	movq	24(%rsp), %rdx
	movq	8(%rsp), %rsi
	movq	0(%r13), %rdi
	movl	(%rax,%r14,4), %r15d
	call	_Z17first_dense_layerPPfPS0_S_
	movq	40(%rsp), %rdx
	movq	16(%rsp), %rsi
	movq	%rax, %rdi
	movq	%rax, 128(%rsp)
	call	_Z18second_dense_layerPfPS_S_
	movq	%rax, %rdi
	call	_Z8soft_maxPf
	movq	%rax, %rdx
	leaq	40(%rax), %rsi
	movq	%rax, %rcx
.L193:
	addq	$4, %rcx
	cmpq	%rcx, %rsi
	je	.L239
	movss	(%rcx), %xmm0
	comiss	(%rax), %xmm0
	jbe	.L193
	movq	%rcx, %rax
	jmp	.L193
.L239:
	subq	%rdx, %rax
	sarq	$2, %rax
	cmpl	%eax, %r15d
	jne	.L196
	movss	.LC2(%rip), %xmm4
	addss	64(%rsp), %xmm4
	movss	%xmm4, 64(%rsp)
	jmp	.L197
.L196:
	movss	.LC2(%rip), %xmm5
	addss	68(%rsp), %xmm5
	movss	%xmm5, 68(%rsp)
.L197:
	movq	112(%rsp), %rdi
	xorl	%eax, %eax
	movl	$10, %ecx
	movslq	%r15d, %r8
	movss	.LC12(%rip), %xmm0
	divss	(%rdx,%r8,4), %xmm0
	rep stosl
	movq	112(%rsp), %rax
	movq	104(%rsp), %rdi
	movss	%xmm0, (%rax,%r8,4)
	movq	%rax, %rsi
	call	_Z17soft_max_backpropPfS_S_
	movq	80(%rsp), %r9
	movq	16(%rsp), %r8
	movss	.LC13(%rip), %xmm0
	movq	96(%rsp), %rcx
	movq	128(%rsp), %rdx
	movq	104(%rsp), %rsi
	movq	88(%rsp), %rdi
	call	_Z14fcl_2_backpropPfS_S_S_PS_S0_f
	movq	0(%r13), %rdx
	movq	72(%rsp), %r9
	movq	8(%rsp), %r8
	movq	32(%rsp), %rcx
	movq	88(%rsp), %rsi
	movq	120(%rsp), %rdi
	call	_Z14fcl_1_backpropPfS_PS_S_PS0_S1_f
	xorl	%edx, %edx
.L198:
	movq	8(%rsp), %rax
	imulq	$392, %rdx, %rsi
	xorl	%ecx, %ecx
	movq	(%rax,%rdx), %r8
	movq	72(%rsp), %rax
	movq	(%rax,%rdx), %rdi
.L202:
	movq	48(%rsp), %r10
	movq	56(%rsp), %r9
	xorl	%eax, %eax
	movq	(%r8,%rcx), %r15
	movq	(%rdi,%rcx), %r11
	addq	%rsi, %r10
	addq	%rsi, %r9
.L199:
	movss	(%r15,%rax), %xmm0
	movss	%xmm0, (%r10,%rax)
	movss	(%r11,%rax), %xmm0
	movss	%xmm0, (%r9,%rax)
	addq	$4, %rax
	cmpq	$112, %rax
	jne	.L199
	addq	$8, %rcx
	addq	$112, %rsi
	cmpq	$224, %rcx
	jne	.L202
	addq	$8, %rdx
	cmpq	$8192, %rdx
	jne	.L198
	movq	48(%rsp), %rsi
	movl	$1, %ecx
	movl	$3211264, %edx
	movq	208(%rsp), %rdi
	call	cudaMemcpy@PLT
	movq	56(%rsp), %rsi
	movl	$1, %ecx
	movq	216(%rsp), %rdi
	movl	$3211264, %edx
	call	cudaMemcpy@PLT
	movq	24(%rsp), %rsi
	movl	$1, %ecx
	movq	224(%rsp), %rdi
	movl	$4096, %edx
	call	cudaMemcpy@PLT
	movq	32(%rsp), %rsi
	movl	$1, %ecx
	movq	232(%rsp), %rdi
	movl	$4096, %edx
	call	cudaMemcpy@PLT
	movl	$4194305, %edx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$268435505, %edi
	salq	$10, %rdx
	movl	$1, %ecx
	movl	$1, %esi
	salq	$4, %rdi
	movq	%rdx, 284(%rsp)
	movl	$1, 292(%rsp)
	movq	%rdi, 272(%rsp)
	movl	$1, 280(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L203
	movss	.LC14(%rip), %xmm0
	movq	232(%rsp), %rcx
	movq	224(%rsp), %rdx
	movq	216(%rsp), %rsi
	movq	208(%rsp), %rdi
	call	_Z43__device_stub__Z16cuda_fcl1_updatePfS_S_S_fPfS_S_S_f
.L203:
	movq	48(%rsp), %rdi
	movl	$2, %ecx
	movl	$3211264, %edx
	movq	208(%rsp), %rsi
	call	cudaMemcpy@PLT
	movq	56(%rsp), %rdi
	movl	$2, %ecx
	movq	216(%rsp), %rsi
	movl	$3211264, %edx
	call	cudaMemcpy@PLT
	movq	24(%rsp), %rdi
	movl	$2, %ecx
	movq	224(%rsp), %rsi
	movl	$4096, %edx
	call	cudaMemcpy@PLT
	movq	32(%rsp), %rdi
	movl	$4096, %edx
	movq	232(%rsp), %rsi
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	xorl	%edx, %edx
.L204:
	movq	8(%rsp), %rax
	imulq	$392, %rdx, %rsi
	xorl	%ecx, %ecx
	movq	(%rax,%rdx), %r8
	movq	72(%rsp), %rax
	movq	(%rax,%rdx), %rdi
.L208:
	movq	48(%rsp), %r10
	movq	56(%rsp), %r9
	xorl	%eax, %eax
	movq	(%r8,%rcx), %r15
	movq	(%rdi,%rcx), %r11
	addq	%rsi, %r10
	addq	%rsi, %r9
.L205:
	movss	(%r10,%rax), %xmm0
	movss	%xmm0, (%r15,%rax)
	movss	(%r9,%rax), %xmm0
	movss	%xmm0, (%r11,%rax)
	addq	$4, %rax
	cmpq	$112, %rax
	jne	.L205
	addq	$8, %rcx
	addq	$112, %rsi
	cmpq	$224, %rcx
	jne	.L208
	addq	$8, %rdx
	cmpq	$8192, %rdx
	jne	.L204
	xorl	%eax, %eax
.L207:
	movq	16(%rsp), %rsi
	movq	%rax, %rcx
	xorl	%edx, %edx
	salq	$9, %rcx
	movq	(%rsi,%rax), %rdi
	movq	80(%rsp), %rsi
	movq	(%rsi,%rax), %rsi
.L209:
	movss	(%rdi,%rdx), %xmm0
	movss	%xmm0, (%rbx,%rcx)
	movss	(%rsi,%rdx), %xmm0
	addq	$4, %rdx
	movss	%xmm0, 0(%rbp,%rcx)
	addq	$4, %rcx
	cmpq	$4096, %rdx
	jne	.L209
	addq	$8, %rax
	cmpq	$80, %rax
	jne	.L207
	movq	240(%rsp), %rdi
	movl	$1, %ecx
	movl	$40960, %edx
	movq	%rbx, %rsi
	call	cudaMemcpy@PLT
	movq	248(%rsp), %rdi
	movl	$1, %ecx
	movq	%rbp, %rsi
	movl	$40960, %edx
	call	cudaMemcpy@PLT
	movq	40(%rsp), %rsi
	movl	$1, %ecx
	movq	256(%rsp), %rdi
	movl	$40, %edx
	call	cudaMemcpy@PLT
	movq	96(%rsp), %rsi
	movl	$1, %ecx
	movq	264(%rsp), %rdi
	movl	$40, %edx
	call	cudaMemcpy@PLT
	movl	$4194305, %edx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$2147483653, %edi
	salq	$10, %rdx
	movl	$1, %ecx
	movl	$1, %esi
	addq	%rdi, %rdi
	movq	%rdx, 284(%rsp)
	movl	$1, 292(%rsp)
	movq	%rdi, 272(%rsp)
	movl	$1, 280(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L211
	movss	.LC14(%rip), %xmm0
	movq	264(%rsp), %rcx
	movq	256(%rsp), %rdx
	movq	248(%rsp), %rsi
	movq	240(%rsp), %rdi
	call	_Z43__device_stub__Z16cuda_fcl2_updatePfS_S_S_fPfS_S_S_f
.L211:
	movq	240(%rsp), %rsi
	movl	$2, %ecx
	movl	$40960, %edx
	movq	%rbx, %rdi
	call	cudaMemcpy@PLT
	movq	248(%rsp), %rsi
	movl	$2, %ecx
	movq	%rbp, %rdi
	movl	$40960, %edx
	call	cudaMemcpy@PLT
	movq	40(%rsp), %rdi
	movl	$2, %ecx
	movq	256(%rsp), %rsi
	movl	$40, %edx
	call	cudaMemcpy@PLT
	movl	$2, %ecx
	movl	$40, %edx
	movq	264(%rsp), %rdi
	movq	%rdi, %rsi
	call	cudaMemcpy@PLT
	xorl	%eax, %eax
.L212:
	movq	80(%rsp), %rcx
	movq	16(%rsp), %rdx
	movq	(%rcx,%rax), %rsi
	movq	%rax, %rcx
	movq	(%rdx,%rax), %rdi
	xorl	%edx, %edx
	salq	$9, %rcx
.L213:
	movss	(%rbx,%rcx), %xmm0
	movss	%xmm0, (%rdi,%rdx)
	movss	0(%rbp,%rcx), %xmm0
	addq	$4, %rcx
	movss	%xmm0, (%rsi,%rdx)
	addq	$4, %rdx
	cmpq	$4096, %rdx
	jne	.L213
	addq	$8, %rax
	cmpq	$80, %rax
	jne	.L212
	incq	%r14
	addq	$8, %r13
	cmpq	$100, %r14
	jne	.L215
	movl	140(%rsp), %eax
	movl	$5, %ecx
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	.L216
	call	clock@PLT
	movss	68(%rsp), %xmm3
	addss	64(%rsp), %xmm3
	movl	$2, %edi
	movss	64(%rsp), %xmm0
	movq	168(%rsp), %rsi
	movl	140(%rsp), %ecx
	movl	136(%rsp), %edx
	divss	%xmm3, %xmm0
	subq	%rsi, %rax
	leaq	.LC17(%rip), %rsi
	cvtsi2sdq	%rax, %xmm1
	movb	$3, %al
	divsd	.LC15(%rip), %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movaps	%xmm1, %xmm2
	cvtss2sd	%xmm1, %xmm1
	divss	.LC16(%rip), %xmm2
	cvtss2sd	%xmm2, %xmm2
	cvtss2sd	%xmm0, %xmm0
	call	__printf_chk@PLT
.L216:
	incq	%r12
	cmpq	$100, %r12
	jne	.L192
	incl	136(%rsp)
	cmpl	$100, 136(%rsp)
	jne	.L218
	leaq	.LC18(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
.L236:
	call	__printf_chk@PLT
	movq	328(%rsp), %rax
	subq	%fs:40, %rax
	je	.L223
	jmp	.L234
.L226:
	endbr64
	jmp	.L238
.L227:
	endbr64
.L238:
	movq	%rax, %rbp
.L221:
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	328(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L234
	movq	%rbp, %rdi
	call	_Unwind_Resume@PLT
.LEHE10:
.L234:
	call	__stack_chk_fail@PLT
.L223:
	addq	$344, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5096:
	.section	.gcc_except_table
.LLSDA5096:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE5096-.LLSDACSB5096
.LLSDACSB5096:
	.uleb128 .LEHB6-.LFB5096
	.uleb128 .LEHE6-.LEHB6
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB7-.LFB5096
	.uleb128 .LEHE7-.LEHB7
	.uleb128 .L226-.LFB5096
	.uleb128 0
	.uleb128 .LEHB8-.LFB5096
	.uleb128 .LEHE8-.LEHB8
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB9-.LFB5096
	.uleb128 .LEHE9-.LEHB9
	.uleb128 .L227-.LFB5096
	.uleb128 0
	.uleb128 .LEHB10-.LFB5096
	.uleb128 .LEHE10-.LEHB10
	.uleb128 0
	.uleb128 0
.LLSDACSE5096:
	.section	.text.startup
	.size	main, .-main
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	-2147483648
	.long	0
	.long	0
	.long	0
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC2:
	.long	1065353216
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC6:
	.long	0
	.long	1080025088
	.align 8
.LC7:
	.long	0
	.long	1072693248
	.section	.rodata.cst4
	.align 4
.LC8:
	.long	1065353215
	.align 4
.LC9:
	.long	805306368
	.align 4
.LC10:
	.long	-1073741824
	.align 4
.LC12:
	.long	-1082130432
	.align 4
.LC13:
	.long	1120403456
	.align 4
.LC14:
	.long	1036831949
	.section	.rodata.cst8
	.align 8
.LC15:
	.long	0
	.long	1093567616
	.section	.rodata.cst4
	.align 4
.LC16:
	.long	1114636288
	.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 <hip/hip_runtime.h>
#include <iostream>
#include <fstream>
#include <string>
#include <cassert>
#include <random>
#include <algorithm>
#include <vector>
#include <unistd.h>
#include <ctime>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>

const int IMAGE_DIM = 28; 
const int FCL1_DIM = 1024; 
const int FCL2_DIM = 10; 

void switchEndian(int &ui)
{
    ui = (ui >> 24) | ((ui<<8) & 0x00FF0000) | ((ui>>8) & 0x0000FF00) | (ui << 24);
}

float ***read_image_file(std::string filename, int &magic_number, int &number_of_items, int &rows, int &columns) 
{
	std::ifstream infile;
	infile.open(filename.c_str(), std::ios::binary);
	infile.read(reinterpret_cast<char*>(&magic_number), sizeof(magic_number));
	infile.read(reinterpret_cast<char*>(&number_of_items), sizeof(number_of_items));
	infile.read(reinterpret_cast<char*>(&rows), sizeof(rows));
	infile.read(reinterpret_cast<char*>(&columns), sizeof(columns));

	switchEndian(magic_number);
	switchEndian(number_of_items);
	switchEndian(rows);
	switchEndian(columns);

	float ***pixels = new float**[number_of_items];
	for (int i = 0; i < number_of_items; i++)
	{
		pixels[i] = new float*[rows];
		for (int r = 0; r < rows; r++)
		{
			pixels[i][r] = new float[columns];
			for (int c = 0; c < columns; c++)
			{
				unsigned char temp;
				infile.read(reinterpret_cast<char*>(&temp), 1);
				pixels[i][r][c] = ((int)temp / 127.5) - 1.0;
			}
		}
	}
	return pixels;
}

int *read_label_file(std::string filename, int &magic_number, int &number_of_items)
{
	std::ifstream infile;
	infile.open(filename.c_str(), std::ios::binary);
	infile.read(reinterpret_cast<char*>(&magic_number), 4);
	infile.read(reinterpret_cast<char*>(&number_of_items), 4);

	switchEndian(magic_number);
	switchEndian(number_of_items);

	int *labels = new int[number_of_items];
	for (int i = 0; i < number_of_items; i++) 
	{
		char temp;
		infile.read(reinterpret_cast<char*>(&temp), 1);
		labels[i] = temp;
	}
	return labels;
}

float *first_dense_layer(float **image, float ***weights, float *bias)
{
	srand(123);

	float *sums = new float[FCL1_DIM];
	for (int i = 0; i < FCL1_DIM; i++)
	{
		float sum = 0;
		int random_num = rand() % 1000;
		if (random_num < 4)
		{
			sums[i] = 0;
			continue;
		}
		for (int r = 0; r < IMAGE_DIM; r++)
		{
			for (int c = 0; c < IMAGE_DIM; c++)
			{
				sum += weights[i][r][c] * image[r][c];
			}
		}
		sum += bias[i];
		sums[i] = (sum > 0) ? sum : 0;
	}
	return sums;
}

float *second_dense_layer(float *layer, float **weights, float *bias)
{
	float *sums = new float[FCL2_DIM];
	for (int i = 0; i < FCL2_DIM; i++) // 10
	{
		float sum = 0;
		for (int j = 0; j < FCL1_DIM; j++) // 1024
		{
			sum += weights[i][j] * layer[j];
		}
		sum += bias[i];
		sums[i] = sum;
	}
	return sums;
}

float *soft_max(float *layer)
{
	float *output = new float[FCL2_DIM];
	float sum = 0;
	float max = layer[0];
	for (int i = 0; i < FCL2_DIM; i++)
	{
		max = (max > layer[i]) ? max : layer[i];
	}
	for (int i = 0; i < FCL2_DIM; i++)
	{
		output[i] = exp(layer[i] - max);
		sum += output[i];
	}
	for (int i = 0; i < FCL2_DIM; i++)
	{
		output[i] = output[i] / sum;
	}
	return output;
}

float cross_entropy(float *soft_maxes, int label)
{
	return -1 * log(soft_maxes[label]);
}

void soft_max_backprop(float *downstream, float *upstream, float *sm_output)
{
	for (int i = 0; i < FCL2_DIM; i++) 
	{
		downstream[i] = 0;
		for (int j = 0; j < FCL2_DIM; j++)
		{
			if (i == j) 
			{
				downstream[i] += upstream[j] * (sm_output[j] * (1 - sm_output[i]));
			}
			else 
			{
				downstream[i] += upstream[j] * (-sm_output[i] * sm_output[j]);
			}
		}
	}
}

void fcl_2_backprop(float *downstream, float *upstream, float *fcl_1_output, float *bias_deriv, float **weights, float **weight_deriv, float batch_size)
{
	for (int i = 0; i < FCL2_DIM; i++)
	{
		for (int j = 0; j < FCL1_DIM; j++)
		{
			downstream[j] = 0;
		}
		for (int j = 0; j < FCL1_DIM; j++)
		{
			downstream[j] += upstream[i] * weights[i][j];
			weight_deriv[i][j] += (upstream[i] * fcl_1_output[j]) / batch_size;
		}
		bias_deriv[i] = upstream[i] / batch_size;
	}
}

void fcl_1_backprop(float *downstream, float *upstream, float **image_output, float *bias_deriv, float ***weights, float ***weight_deriv, float batch_size)
{
	for (int i = 0; i < FCL1_DIM; i++)
	{
		for (int a = 0; a < IMAGE_DIM; a++)
		{
			for (int b = 0; b < IMAGE_DIM; b++)
			{
				weight_deriv[i][a][b] += (upstream[i] * image_output[a][b]) / batch_size;
			}
		}
		bias_deriv[i] = upstream[i] / batch_size;
	}
}

void fcl_1_update(float ***weights, float ***weight_deriv, float *bias, float *bias_deriv, float rate)
{
	for (int i = 0; i < FCL1_DIM; i++)
	{
		for (int a = 0; a < IMAGE_DIM; a++)
		{
			for (int b = 0; b < IMAGE_DIM; b++)
			{
				weights[i][a][b] -= rate * weight_deriv[i][a][b];
				weight_deriv[i][a][b] = 0;
			}
		}
		bias[i] -= rate * bias_deriv[i];
		bias_deriv[i] = 0;
	}
}

__global__ void cuda_fcl1_update(float *weights, float *weight_deriv, float *bias, float *bias_deriv, float rate)
{
	int n = 28 * 28 * 1024;
	int id = blockIdx.x*blockDim.x + threadIdx.x;

	if (id > n) return;

	weights[id] -= rate * weight_deriv[id];
	weight_deriv[id] = 0;
	if (id % (28 * 28) == 0) 
	{
		bias[id / (28 * 28)] -= rate * bias_deriv[id / (28 * 28)];
		bias_deriv[id / (28 * 28)] = 0;
	}
}

void fcl_2_update(float **weights, float **weight_deriv, float *bias, float *bias_deriv, float rate)
{
	for (int i = 0; i < FCL2_DIM; i++)
	{
		for (int j = 0; j < FCL1_DIM; j++)
		{
			weights[i][j] -= rate * weight_deriv[i][j];
			weight_deriv[i][j] = 0;
		}
		bias[i] -= rate * bias_deriv[i];
		bias_deriv[i] = 0;
	}
}

__global__ void cuda_fcl2_update(float *weights, float *weight_deriv, float *bias, float *bias_deriv, float rate)
{
	int n = 1024 * 10;
	int id = blockIdx.x*blockDim.x + threadIdx.x;

	if (id > n) return;

	weights[id] -= rate * weight_deriv[id];
	weight_deriv[id] = 0;
	if (id % (1024) == 0)
	{
		bias[id / 1024] -= rate * bias_deriv[id / 1024];
		bias_deriv[id / 1024] = 0;
	}
}

float ***create_weights(int x, int y, int z)
{
	std::default_random_engine eng;
	eng.seed(123);
	std::normal_distribution<float> init;

	float ***ret = new float**[x];
	for (int i = 0; i < x; i++) // 1024
	{
		ret[i] = new float*[y];
		for (int j = 0; j < y; j++) // 28
		{
			ret[i][j] = new float[z];
			for (int k = 0; k < z; k++) // 28
			{
				ret[i][j][k] = init(eng) / sqrt(x);
			}
		}
	}
	return ret;
}

float **create_weights(int x, int y)
{
	std::default_random_engine eng;
	eng.seed(456);
	std::normal_distribution<float> init;
	float **ret = new float*[x];

	for (int i = 0; i < x; i++) // 10
	{
		ret[i] = new float[y];
		for (int j = 0; j < y; j++) // 1024
		{
			ret[i][j] = init(eng) / sqrt(x);
		}
	}
	return ret;
}

float ***create_weight_deriv(int a, int b, int c)
{
	float ***ret = new float**[a];
	for (int i = 0; i < a; i++) // 1024
	{
		ret[i] = new float*[b];
		for (int j = 0; j < b; j++) // 28
		{
			ret[i][j] = new float[c];
			for (int k = 0; k < c; k++) // 28
			{
				ret[i][j][k] = 0;
			}
		}
	}
	return ret;
}

float **create_weight_deriv(int a, int b)
{
	float **ret = new float*[a];
	for (int i = 0; i < a; i++) // 10
	{
		ret[i] = new float[b];
		for (int j = 0; j < b; j++) // 1024
		{
			ret[i][j] = 0;
		}
	}
	return ret;
}

int main(int argc, char **argv)
{
	if (argc != 3)
	{
		printf("USAGE: ./prog3 <image file> <label file>\n");
		return 0;
	}

	int magic_number_label, magic_number_image, number_of_labels, number_of_images, rows, columns;

	// Read in the labels and images and store them
	float ***images = read_image_file(std::string(argv[1]), magic_number_image, number_of_images, rows, columns);
	int *labels = read_label_file(std::string(argv[2]), magic_number_label, number_of_labels);
	assert(number_of_labels == number_of_images);

	float ***image_layer_weights = create_weights(FCL1_DIM, IMAGE_DIM, IMAGE_DIM);
	float **connected_layer_weights = create_weights(FCL2_DIM, FCL1_DIM);
	float ***image_weight_deriv = create_weight_deriv(FCL1_DIM, IMAGE_DIM, IMAGE_DIM);
	float **connected_weight_deriv = create_weight_deriv(FCL2_DIM, FCL1_DIM);

	float *fcl_1 = new float[FCL1_DIM]();
	float *fcl_1_bias = new float[FCL1_DIM]();
	float *fcl_1_ds_deriv = new float[FCL1_DIM]();
	float *fcl_1_bias_deriv = new float[FCL1_DIM]();

	float *fcl_2 = new float[FCL2_DIM]();
	float *fcl_2_bias = new float[FCL2_DIM]();
	float *fcl_2_ds_deriv = new float[FCL1_DIM]();
	float *fcl_2_bias_deriv = new float[FCL2_DIM]();

	float *sm_layer = new float[FCL2_DIM]();
	float *sm_ds_deriv = new float[FCL2_DIM]();
	float *ce_ds_deriv = new float[FCL2_DIM]();

	// CUDA variables

	float *d_fcl1_weights, *d_fcl1_weight_deriv, *d_fcl1_bias, *d_fcl1_bias_deriv;
	float *h_fcl1_weights = new float[28*28*1024];
	float *h_fcl1_weight_deriv = new float[28*28*1024];

	float *d_fcl2_weights, *d_fcl2_weight_deriv, *d_fcl2_bias, *d_fcl2_bias_deriv;
	float *h_fcl2_weights = new float[10*1024];
	float *h_fcl2_weight_deriv = new float[10*1024];

	hipMalloc(&d_fcl1_weights, 28*28*1024*sizeof(float));
	hipMalloc(&d_fcl1_weight_deriv, 28*28*1024*sizeof(float));
	hipMalloc(&d_fcl1_bias, 1024*sizeof(float));
	hipMalloc(&d_fcl1_bias_deriv, 1024*sizeof(float));

	hipMalloc(&d_fcl2_weights, 10*1024*sizeof(float));
	hipMalloc(&d_fcl2_weight_deriv, 10*1024*sizeof(float));
	hipMalloc(&d_fcl2_bias, 10*sizeof(float));
	hipMalloc(&d_fcl2_bias_deriv, 10*sizeof(float));

	/* TRAINING */
	std::clock_t start = std::clock();
	for (int epoch = 0; epoch < 100; epoch++) 
	{	
		std::clock_t start = std::clock();
		for (int r = 0; r < 100; r++)
		{
			float wrong = 0;
			float right = 0;
			int mini_batch = 100;
			//printf("Starting round: %d\n", r);
			
			for (int image = 0; image < mini_batch; image++)
			{
				int batch_size = mini_batch;
				float rate = mini_batch / 1000.0; // 0.1 for 100 images, 0.01 for 10 images
				
				int label = labels[100*r + image];

				// FCL 1 Forward
				fcl_1 = first_dense_layer(images[100*r + image], image_layer_weights, fcl_1_bias);
				
				// FCL 2 Forward
				fcl_2 = second_dense_layer(fcl_1, connected_layer_weights, fcl_2_bias);
				
				// Softmax Forward
				sm_layer = soft_max(fcl_2);

				// Compute Right/Wrong
				int index = std::distance(sm_layer, std::max_element(sm_layer, sm_layer + FCL2_DIM));
				if (index == label) right++;
				else wrong++;

				// Cross Entropy Forward
				for (int j = 0; j < FCL2_DIM; j++) ce_ds_deriv[j] = 0;
				ce_ds_deriv[label] = -1 / sm_layer[label];

				// Softmax Backprop
				soft_max_backprop(sm_ds_deriv, ce_ds_deriv, sm_layer);

				// FCL 2 Backprop
				fcl_2_backprop(fcl_2_ds_deriv, sm_ds_deriv, fcl_1, fcl_2_bias_deriv, connected_layer_weights, connected_weight_deriv, batch_size);

				// FCL 1 Backprop
				fcl_1_backprop(fcl_1_ds_deriv, fcl_2_ds_deriv, images[100*r + image], fcl_1_bias_deriv, image_layer_weights, image_weight_deriv, batch_size);		

				// FCL 1 Update
				// fcl_1_update(image_layer_weights, image_weight_deriv, fcl_1_bias, fcl_1_bias_deriv, rate);
			
				for (int i = 0; i < 1024; i++)
				{
					for (int j = 0; j < 28; j++)
					{
						for (int k = 0; k < 28; k++)
						{
							h_fcl1_weights[i*28*28 + j*28 + k] = image_layer_weights[i][j][k];
							h_fcl1_weight_deriv[i*28*28 + j*28 + k] = image_weight_deriv[i][j][k];
						}
					}
				}
				hipMemcpy(d_fcl1_weights, h_fcl1_weights, 28*28*1024*sizeof(float), hipMemcpyHostToDevice);
				hipMemcpy(d_fcl1_weight_deriv, h_fcl1_weight_deriv, 28*28*1024*sizeof(float), hipMemcpyHostToDevice);
				hipMemcpy(d_fcl1_bias, fcl_1_bias, 1024*sizeof(float), hipMemcpyHostToDevice);
				hipMemcpy(d_fcl1_bias_deriv, fcl_1_bias_deriv, 1024*sizeof(float), hipMemcpyHostToDevice);

				int blockSize = 1024;
				int gridSize = (int)ceil((float)(28*28*1024)/blockSize);
				cuda_fcl1_update<<<gridSize, blockSize>>>(d_fcl1_weights, d_fcl1_weight_deriv, d_fcl1_bias, d_fcl1_bias_deriv, rate);
				
				hipMemcpy(h_fcl1_weights, d_fcl1_weights, 28*28*1024*sizeof(float), hipMemcpyDeviceToHost);
				hipMemcpy(h_fcl1_weight_deriv, d_fcl1_weight_deriv, 28*28*1024*sizeof(float), hipMemcpyDeviceToHost);
				hipMemcpy(fcl_1_bias, d_fcl1_bias, 1024*sizeof(float), hipMemcpyDeviceToHost);
				hipMemcpy(fcl_1_bias_deriv, d_fcl1_bias_deriv, 1024*sizeof(float), hipMemcpyDeviceToHost);

				for (int i = 0; i < 1024; i++)
				{
					for (int j = 0; j < 28; j++)
					{
						for (int k = 0; k < 28; k++)
						{
							image_layer_weights[i][j][k] = h_fcl1_weights[i*28*28 + j*28 + k];
							image_weight_deriv[i][j][k] = h_fcl1_weight_deriv[i*28*28 + j*28 + k];
						}
					}
				}

				// FCL 2 Update
				// fcl_2_update(connected_layer_weights, connected_weight_deriv, fcl_2_bias, fcl_2_bias_deriv, rate);

				for (int i = 0; i < 10; i++)
				{
					for (int j = 0; j < 1024; j++)
					{
						h_fcl2_weights[i*1024 + j] = connected_layer_weights[i][j];
						h_fcl2_weight_deriv[i*1024 + j] = connected_weight_deriv[i][j];
					}
				}
				hipMemcpy(d_fcl2_weights, h_fcl2_weights, 10*1024*sizeof(float), hipMemcpyHostToDevice);
				hipMemcpy(d_fcl2_weight_deriv, h_fcl2_weight_deriv, 10*1024*sizeof(float), hipMemcpyHostToDevice);
				hipMemcpy(d_fcl2_bias, fcl_2_bias, 10*sizeof(float), hipMemcpyHostToDevice);
				hipMemcpy(d_fcl2_bias_deriv, fcl_2_bias_deriv, 10*sizeof(float), hipMemcpyHostToDevice);

				blockSize = 1024;
				gridSize = (int)ceil((float)(10*1024)/blockSize);
				cuda_fcl2_update<<<gridSize, blockSize>>>(d_fcl2_weights, d_fcl2_weight_deriv, d_fcl2_bias, d_fcl2_bias_deriv, rate);

				hipMemcpy(h_fcl2_weights, d_fcl2_weights, 10*1024*sizeof(float), hipMemcpyDeviceToHost);
				hipMemcpy(h_fcl2_weight_deriv, d_fcl2_weight_deriv, 10*1024*sizeof(float), hipMemcpyDeviceToHost);
				hipMemcpy(fcl_2_bias, d_fcl2_bias, 10*sizeof(float), hipMemcpyDeviceToHost);
				hipMemcpy(d_fcl2_bias_deriv, d_fcl2_bias_deriv, 10*sizeof(float), hipMemcpyDeviceToHost);

				for (int i = 0; i < 10; i++)
				{
					for (int j = 0; j < 1024; j++)
					{
						connected_layer_weights[i][j] = h_fcl2_weights[i*1024 + j];
						connected_weight_deriv[i][j] = h_fcl2_weight_deriv[i*1024 + j];
					}
				}
			}
			if (r % 5 == 0)
			{
				float round_time = (std::clock() - start) / (double)CLOCKS_PER_SEC;
				printf("Epoch: %d, Round: %d, Accuracy: %f, Time: %f sec (%f min)\n", epoch, r, right / (right + wrong), round_time, round_time / 60);
			}
		}
	}

	/* FORWARD */
	/*
	int forward_right = 0;
	int forward_wrong = 0;
	for (int image = 0; image < number_of_images; image++)
	{
		int label = labels[image];

		fcl_1 = first_dense_layer(images[image], image_layer_weights, fcl_1_bias);
		fcl_2 = second_dense_layer(fcl_1, connected_layer_weights, fcl_2_bias);
		sm_layer = soft_max(fcl_2);

		int index = std::distance(sm_layer, std::max_element(sm_layer, sm_layer + FCL2_DIM));
		if (index == label) forward_right++;
		else forward_wrong++;

		printf("Ratio: %f\n", (float)forward_right / float(forward_right + forward_wrong));
	}
	*/

	printf("Got through with no issues.\n");
}

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

                                        # End of file scope inline assembly
	.globl	_Z12switchEndianRi              # -- Begin function _Z12switchEndianRi
	.type	_Z12switchEndianRi,@function
_Z12switchEndianRi:                     # @_Z12switchEndianRi
	.cfi_startproc
# %bb.0:
	movl	(%rdi), %eax
	movl	%eax, %ecx
	sarl	$24, %ecx
	movl	%eax, %edx
	shll	$8, %edx
	andl	$16711680, %edx                 # imm = 0xFF0000
	movl	%eax, %esi
	shrl	$8, %esi
	andl	$65280, %esi                    # imm = 0xFF00
	shll	$24, %eax
	orl	%ecx, %eax
	orl	%edx, %eax
	orl	%esi, %eax
	movl	%eax, (%rdi)
	retq
.Lfunc_end0:
	.size	_Z12switchEndianRi, .Lfunc_end0-_Z12switchEndianRi
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z15read_image_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_S5_S5_
.LCPI1_0:
	.quad	0x405fe00000000000              # double 127.5
.LCPI1_1:
	.quad	0xbff0000000000000              # double -1
	.text
	.globl	_Z15read_image_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_S5_S5_
	.type	_Z15read_image_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_S5_S5_,@function
_Z15read_image_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_S5_S5_: # @_Z15read_image_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_S5_S5_
.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	$568, %rsp                      # imm = 0x238
	.cfi_def_cfa_offset 624
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%r8, %rbx
	movq	%rcx, 16(%rsp)                  # 8-byte Spill
	movq	%rdx, 24(%rsp)                  # 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r12
	leaq	48(%rsp), %r13
	movq	%r13, %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev
	movq	(%r12), %rsi
.Ltmp0:
	movq	%r13, %rdi
	movl	$4, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode
.Ltmp1:
# %bb.1:
.Ltmp2:
	leaq	48(%rsp), %rdi
	movl	$4, %edx
	movq	%r15, %rsi
	callq	_ZNSi4readEPcl
.Ltmp3:
# %bb.2:
.Ltmp4:
	leaq	48(%rsp), %rdi
	movl	$4, %edx
	movq	24(%rsp), %rsi                  # 8-byte Reload
	callq	_ZNSi4readEPcl
.Ltmp5:
# %bb.3:
.Ltmp6:
	leaq	48(%rsp), %rdi
	movl	$4, %edx
	movq	16(%rsp), %rsi                  # 8-byte Reload
	callq	_ZNSi4readEPcl
.Ltmp7:
# %bb.4:
.Ltmp8:
	leaq	48(%rsp), %rdi
	movl	$4, %edx
	movq	%rbx, %rsi
	callq	_ZNSi4readEPcl
.Ltmp9:
# %bb.5:
	movl	(%r15), %edx
	movl	%edx, %esi
	sarl	$24, %esi
	movl	%edx, %edi
	shll	$8, %edi
	movl	$16711680, %eax                 # imm = 0xFF0000
	andl	%eax, %edi
	movl	%edx, %r8d
	shrl	$8, %r8d
	movl	$65280, %ecx                    # imm = 0xFF00
	andl	%ecx, %r8d
	shll	$24, %edx
	orl	%esi, %edx
	orl	%edi, %edx
	orl	%r8d, %edx
	movl	%edx, (%r15)
	movq	24(%rsp), %r10                  # 8-byte Reload
	movl	(%r10), %edx
	movl	%edx, %esi
	sarl	$24, %esi
	movl	%edx, %edi
	shll	$8, %edi
	andl	%eax, %edi
	movl	%edx, %r8d
	shrl	$8, %r8d
	andl	%ecx, %r8d
	shll	$24, %edx
	orl	%esi, %edx
	orl	%edi, %edx
	orl	%r8d, %edx
	movl	%edx, (%r10)
	movq	16(%rsp), %r9                   # 8-byte Reload
	movl	(%r9), %edx
	movl	%edx, %esi
	sarl	$24, %esi
	movl	%edx, %edi
	shll	$8, %edi
	andl	%eax, %edi
	movl	%edx, %r8d
	shrl	$8, %r8d
	andl	%ecx, %r8d
	shll	$24, %edx
	orl	%esi, %edx
	orl	%edi, %edx
	orl	%r8d, %edx
	movl	%edx, (%r9)
	movl	(%rbx), %r12d
	movl	%r12d, %edx
	sarl	$24, %edx
	movl	%r12d, %esi
	shll	$8, %esi
	andl	%eax, %esi
	movl	%r12d, %eax
	shrl	$8, %eax
	andl	%ecx, %eax
	shll	$24, %r12d
	orl	%edx, %r12d
	orl	%esi, %r12d
	orl	%eax, %r12d
	movl	%r12d, (%rbx)
	movslq	(%r10), %r15
	leaq	(,%r15,8), %rax
	testq	%r15, %r15
	movq	$-1, %rdi
	cmovnsq	%rax, %rdi
.Ltmp11:
	callq	_Znam
	movq	%rax, 40(%rsp)                  # 8-byte Spill
.Ltmp12:
# %bb.6:                                # %.preheader
	testl	%r15d, %r15d
	jle	.LBB1_15
# %bb.7:                                # %.lr.ph48.preheader
	movq	16(%rsp), %rax                  # 8-byte Reload
	movl	(%rax), %r13d
	xorl	%r14d, %r14d
	leaq	15(%rsp), %rbp
.LBB1_8:                                # %.lr.ph48
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB1_18 Depth 2
                                        #       Child Loop BB1_21 Depth 3
	movq	%r15, 32(%rsp)                  # 8-byte Spill
	movslq	%r13d, %rax
	leaq	(,%rax,8), %rdi
	testl	%eax, %eax
	movq	$-1, %rax
	cmovsq	%rax, %rdi
.Ltmp14:
	callq	_Znam
.Ltmp15:
# %bb.9:                                #   in Loop: Header=BB1_8 Depth=1
	movq	%rax, %r15
	movq	40(%rsp), %rax                  # 8-byte Reload
	movq	%r15, (%rax,%r14,8)
	testl	%r13d, %r13d
	jle	.LBB1_10
# %bb.17:                               # %.lr.ph45.preheader
                                        #   in Loop: Header=BB1_8 Depth=1
	movq	%r14, 32(%rsp)                  # 8-byte Spill
	xorl	%r14d, %r14d
.LBB1_18:                               # %.lr.ph45
                                        #   Parent Loop BB1_8 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB1_21 Depth 3
	movslq	%r12d, %rax
	leaq	(,%rax,4), %rdi
	testl	%eax, %eax
	movq	$-1, %rax
	cmovsq	%rax, %rdi
.Ltmp17:
	callq	_Znam
.Ltmp18:
# %bb.19:                               #   in Loop: Header=BB1_18 Depth=2
	movq	%rax, (%r15,%r14,8)
	testl	%r12d, %r12d
	jle	.LBB1_24
# %bb.20:                               # %.lr.ph.preheader
                                        #   in Loop: Header=BB1_18 Depth=2
	xorl	%r13d, %r13d
.LBB1_21:                               # %.lr.ph
                                        #   Parent Loop BB1_8 Depth=1
                                        #     Parent Loop BB1_18 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
.Ltmp20:
	movl	$1, %edx
	leaq	48(%rsp), %rdi
	movq	%rbp, %rsi
	callq	_ZNSi4readEPcl
.Ltmp21:
# %bb.22:                               #   in Loop: Header=BB1_21 Depth=3
	movzbl	15(%rsp), %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	divsd	.LCPI1_0(%rip), %xmm0
	addsd	.LCPI1_1(%rip), %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movq	(%r15,%r14,8), %rax
	movss	%xmm0, (%rax,%r13,4)
	incq	%r13
	movslq	(%rbx), %r12
	cmpq	%r12, %r13
	jl	.LBB1_21
# %bb.23:                               # %._crit_edge.loopexit
                                        #   in Loop: Header=BB1_18 Depth=2
	movq	16(%rsp), %rax                  # 8-byte Reload
	movl	(%rax), %r13d
.LBB1_24:                               # %._crit_edge
                                        #   in Loop: Header=BB1_18 Depth=2
	incq	%r14
	movslq	%r13d, %rax
	cmpq	%rax, %r14
	jl	.LBB1_18
# %bb.13:                               # %._crit_edge46.loopexit
                                        #   in Loop: Header=BB1_8 Depth=1
	movq	24(%rsp), %rax                  # 8-byte Reload
	movl	(%rax), %r15d
	movq	32(%rsp), %r14                  # 8-byte Reload
	jmp	.LBB1_14
.LBB1_10:                               #   in Loop: Header=BB1_8 Depth=1
	movq	32(%rsp), %r15                  # 8-byte Reload
.LBB1_14:                               # %._crit_edge46
                                        #   in Loop: Header=BB1_8 Depth=1
	incq	%r14
	movslq	%r15d, %rax
	cmpq	%rax, %r14
	jl	.LBB1_8
.LBB1_15:                               # %._crit_edge49
	leaq	48(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	movq	40(%rsp), %rax                  # 8-byte Reload
	addq	$568, %rsp                      # imm = 0x238
	.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
.LBB1_12:
	.cfi_def_cfa_offset 624
.Ltmp13:
	jmp	.LBB1_27
.LBB1_11:
.Ltmp10:
	jmp	.LBB1_27
.LBB1_16:
.Ltmp16:
	jmp	.LBB1_27
.LBB1_25:
.Ltmp19:
	jmp	.LBB1_27
.LBB1_26:
.Ltmp22:
.LBB1_27:
	movq	%rax, %rbx
	leaq	48(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end1:
	.size	_Z15read_image_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_S5_S5_, .Lfunc_end1-_Z15read_image_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_S5_S5_
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table1:
.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 .Ltmp9-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp9
	.uleb128 .Ltmp10-.Lfunc_begin0          #     jumps to .Ltmp10
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp11-.Lfunc_begin0          # >> Call Site 3 <<
	.uleb128 .Ltmp12-.Ltmp11                #   Call between .Ltmp11 and .Ltmp12
	.uleb128 .Ltmp13-.Lfunc_begin0          #     jumps to .Ltmp13
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp14-.Lfunc_begin0          # >> Call Site 4 <<
	.uleb128 .Ltmp15-.Ltmp14                #   Call between .Ltmp14 and .Ltmp15
	.uleb128 .Ltmp16-.Lfunc_begin0          #     jumps to .Ltmp16
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp17-.Lfunc_begin0          # >> Call Site 5 <<
	.uleb128 .Ltmp18-.Ltmp17                #   Call between .Ltmp17 and .Ltmp18
	.uleb128 .Ltmp19-.Lfunc_begin0          #     jumps to .Ltmp19
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp20-.Lfunc_begin0          # >> Call Site 6 <<
	.uleb128 .Ltmp21-.Ltmp20                #   Call between .Ltmp20 and .Ltmp21
	.uleb128 .Ltmp22-.Lfunc_begin0          #     jumps to .Ltmp22
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp21-.Lfunc_begin0          # >> Call Site 7 <<
	.uleb128 .Lfunc_end1-.Ltmp21            #   Call between .Ltmp21 and .Lfunc_end1
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.text
	.globl	_Z15read_label_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_ # -- Begin function _Z15read_label_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_
	.type	_Z15read_label_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_,@function
_Z15read_label_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_: # @_Z15read_label_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_
.Lfunc_begin1:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception1
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$536, %rsp                      # imm = 0x218
	.cfi_def_cfa_offset 592
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r15
	leaq	16(%rsp), %r12
	movq	%r12, %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev
	movq	(%r15), %rsi
.Ltmp23:
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode
.Ltmp24:
# %bb.1:
.Ltmp25:
	leaq	16(%rsp), %rdi
	movl	$4, %edx
	movq	%r14, %rsi
	callq	_ZNSi4readEPcl
.Ltmp26:
# %bb.2:
.Ltmp27:
	leaq	16(%rsp), %rdi
	movl	$4, %edx
	movq	%rbx, %rsi
	callq	_ZNSi4readEPcl
.Ltmp28:
# %bb.3:
	movl	(%r14), %eax
	movl	%eax, %ecx
	sarl	$24, %ecx
	movl	%eax, %edx
	shll	$8, %edx
	movl	$16711680, %esi                 # imm = 0xFF0000
	andl	%esi, %edx
	movl	%eax, %edi
	shrl	$8, %edi
	movl	$65280, %r8d                    # imm = 0xFF00
	andl	%r8d, %edi
	shll	$24, %eax
	orl	%ecx, %eax
	orl	%edx, %eax
	orl	%edi, %eax
	movl	%eax, (%r14)
	movl	(%rbx), %ebp
	movl	%ebp, %eax
	sarl	$24, %eax
	movl	%ebp, %ecx
	shll	$8, %ecx
	andl	%esi, %ecx
	movl	%ebp, %edx
	shrl	$8, %edx
	andl	%r8d, %edx
	shll	$24, %ebp
	orl	%eax, %ebp
	orl	%ecx, %ebp
	orl	%edx, %ebp
	movl	%ebp, (%rbx)
	movslq	%ebp, %rax
	leaq	(,%rax,4), %rcx
	testl	%eax, %eax
	movq	$-1, %rdi
	cmovnsq	%rcx, %rdi
.Ltmp30:
	callq	_Znam
.Ltmp31:
# %bb.4:                                # %.preheader
	movq	%rax, %r14
	testl	%ebp, %ebp
	jle	.LBB2_8
# %bb.5:                                # %.lr.ph.preheader
	xorl	%r13d, %r13d
	leaq	16(%rsp), %r15
	leaq	15(%rsp), %r12
.LBB2_6:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
.Ltmp33:
	movl	$1, %edx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_ZNSi4readEPcl
.Ltmp34:
# %bb.7:                                #   in Loop: Header=BB2_6 Depth=1
	movsbl	15(%rsp), %eax
	movl	%eax, (%r14,%r13,4)
	incq	%r13
	movslq	(%rbx), %rax
	cmpq	%rax, %r13
	jl	.LBB2_6
.LBB2_8:                                # %._crit_edge
	leaq	16(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	movq	%r14, %rax
	addq	$536, %rsp                      # imm = 0x218
	.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
.LBB2_10:
	.cfi_def_cfa_offset 592
.Ltmp32:
	jmp	.LBB2_12
.LBB2_9:
.Ltmp29:
	jmp	.LBB2_12
.LBB2_11:
.Ltmp35:
.LBB2_12:
	movq	%rax, %rbx
	leaq	16(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end2:
	.size	_Z15read_label_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_, .Lfunc_end2-_Z15read_label_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table2:
.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 .Ltmp23-.Lfunc_begin1          #   Call between .Lfunc_begin1 and .Ltmp23
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp23-.Lfunc_begin1          # >> Call Site 2 <<
	.uleb128 .Ltmp28-.Ltmp23                #   Call between .Ltmp23 and .Ltmp28
	.uleb128 .Ltmp29-.Lfunc_begin1          #     jumps to .Ltmp29
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp30-.Lfunc_begin1          # >> Call Site 3 <<
	.uleb128 .Ltmp31-.Ltmp30                #   Call between .Ltmp30 and .Ltmp31
	.uleb128 .Ltmp32-.Lfunc_begin1          #     jumps to .Ltmp32
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp33-.Lfunc_begin1          # >> Call Site 4 <<
	.uleb128 .Ltmp34-.Ltmp33                #   Call between .Ltmp33 and .Ltmp34
	.uleb128 .Ltmp35-.Lfunc_begin1          #     jumps to .Ltmp35
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp34-.Lfunc_begin1          # >> Call Site 5 <<
	.uleb128 .Lfunc_end2-.Ltmp34            #   Call between .Ltmp34 and .Lfunc_end2
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end1:
	.p2align	2, 0x0
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z17first_dense_layerPPfPS0_S_
.LCPI3_0:
	.long	0x00000000                      # float 0
	.text
	.globl	_Z17first_dense_layerPPfPS0_S_
	.type	_Z17first_dense_layerPPfPS0_S_,@function
_Z17first_dense_layerPPfPS0_S_:         # @_Z17first_dense_layerPPfPS0_S_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	$123, %edi
	callq	srand
	movl	$4096, %edi                     # imm = 0x1000
	callq	_Znam
	movq	%rax, %r12
	xorl	%r13d, %r13d
.LBB3_1:                                # =>This Loop Header: Depth=1
                                        #     Child Loop BB3_3 Depth 2
                                        #       Child Loop BB3_4 Depth 3
	callq	rand
	cltq
	imulq	$274877907, %rax, %rcx          # imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
	imull	$1000, %ecx, %ecx               # imm = 0x3E8
	subl	%ecx, %eax
	xorps	%xmm0, %xmm0
	cmpl	$4, %eax
	jl	.LBB3_7
# %bb.2:                                # %.preheader27
                                        #   in Loop: Header=BB3_1 Depth=1
	movq	(%r14,%r13,8), %rax
	xorl	%ecx, %ecx
.LBB3_3:                                # %.preheader
                                        #   Parent Loop BB3_1 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB3_4 Depth 3
	movq	(%rax,%rcx,8), %rdx
	movq	(%r15,%rcx,8), %rsi
	xorl	%edi, %edi
.LBB3_4:                                #   Parent Loop BB3_1 Depth=1
                                        #     Parent Loop BB3_3 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movss	(%rdx,%rdi,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	mulss	(%rsi,%rdi,4), %xmm1
	addss	%xmm1, %xmm0
	incq	%rdi
	cmpq	$28, %rdi
	jne	.LBB3_4
# %bb.5:                                #   in Loop: Header=BB3_3 Depth=2
	incq	%rcx
	cmpq	$28, %rcx
	jne	.LBB3_3
# %bb.6:                                #   in Loop: Header=BB3_1 Depth=1
	addss	(%rbx,%r13,4), %xmm0
	maxss	.LCPI3_0(%rip), %xmm0
.LBB3_7:                                #   in Loop: Header=BB3_1 Depth=1
	movss	%xmm0, (%r12,%r13,4)
	incq	%r13
	cmpq	$1024, %r13                     # imm = 0x400
	jne	.LBB3_1
# %bb.8:
	movq	%r12, %rax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end3:
	.size	_Z17first_dense_layerPPfPS0_S_, .Lfunc_end3-_Z17first_dense_layerPPfPS0_S_
	.cfi_endproc
                                        # -- End function
	.globl	_Z18second_dense_layerPfPS_S_   # -- Begin function _Z18second_dense_layerPfPS_S_
	.type	_Z18second_dense_layerPfPS_S_,@function
_Z18second_dense_layerPfPS_S_:          # @_Z18second_dense_layerPfPS_S_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	$40, %edi
	callq	_Znam
	xorl	%ecx, %ecx
.LBB4_1:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB4_2 Depth 2
	movq	(%r14,%rcx,8), %rdx
	xorps	%xmm0, %xmm0
	xorl	%esi, %esi
.LBB4_2:                                #   Parent Loop BB4_1 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rdx,%rsi,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	mulss	(%r15,%rsi,4), %xmm1
	addss	%xmm1, %xmm0
	incq	%rsi
	cmpq	$1024, %rsi                     # imm = 0x400
	jne	.LBB4_2
# %bb.3:                                #   in Loop: Header=BB4_1 Depth=1
	addss	(%rbx,%rcx,4), %xmm0
	movss	%xmm0, (%rax,%rcx,4)
	incq	%rcx
	cmpq	$10, %rcx
	jne	.LBB4_1
# %bb.4:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end4:
	.size	_Z18second_dense_layerPfPS_S_, .Lfunc_end4-_Z18second_dense_layerPfPS_S_
	.cfi_endproc
                                        # -- End function
	.globl	_Z8soft_maxPf                   # -- Begin function _Z8soft_maxPf
	.type	_Z8soft_maxPf,@function
_Z8soft_maxPf:                          # @_Z8soft_maxPf
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdi, %r14
	movl	$40, %edi
	callq	_Znam
	movq	%rax, %rbx
	movss	(%r14), %xmm1                   # xmm1 = mem[0],zero,zero,zero
	xorl	%eax, %eax
.LBB5_1:                                # =>This Inner Loop Header: Depth=1
	maxss	(%r14,%rax,4), %xmm1
	incq	%rax
	cmpq	$10, %rax
	jne	.LBB5_1
# %bb.2:                                # %.preheader31.preheader
	xorps	%xmm2, %xmm2
	xorl	%r15d, %r15d
	movss	%xmm1, 8(%rsp)                  # 4-byte Spill
.LBB5_3:                                # %.preheader31
                                        # =>This Inner Loop Header: Depth=1
	movss	%xmm2, 12(%rsp)                 # 4-byte Spill
	movss	(%r14,%r15,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	subss	%xmm1, %xmm0
	callq	expf
	movss	12(%rsp), %xmm2                 # 4-byte Reload
                                        # xmm2 = mem[0],zero,zero,zero
	movss	8(%rsp), %xmm1                  # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	movss	%xmm0, (%rbx,%r15,4)
	addss	%xmm0, %xmm2
	incq	%r15
	cmpq	$10, %r15
	jne	.LBB5_3
# %bb.4:                                # %.preheader.preheader
	xorl	%eax, %eax
.LBB5_5:                                # %.preheader
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rbx,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	divss	%xmm2, %xmm0
	movss	%xmm0, (%rbx,%rax,4)
	incq	%rax
	cmpq	$10, %rax
	jne	.LBB5_5
# %bb.6:
	movq	%rbx, %rax
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end5:
	.size	_Z8soft_maxPf, .Lfunc_end5-_Z8soft_maxPf
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0                          # -- Begin function _Z13cross_entropyPfi
.LCPI6_0:
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.text
	.globl	_Z13cross_entropyPfi
	.type	_Z13cross_entropyPfi,@function
_Z13cross_entropyPfi:                   # @_Z13cross_entropyPfi
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movslq	%esi, %rax
	movss	(%rdi,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	callq	logf
	xorps	.LCPI6_0(%rip), %xmm0
	popq	%rax
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end6:
	.size	_Z13cross_entropyPfi, .Lfunc_end6-_Z13cross_entropyPfi
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0                          # -- Begin function _Z17soft_max_backpropPfS_S_
.LCPI7_0:
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0
.LCPI7_1:
	.long	0x3f800000                      # float 1
	.text
	.globl	_Z17soft_max_backpropPfS_S_
	.type	_Z17soft_max_backpropPfS_S_,@function
_Z17soft_max_backpropPfS_S_:            # @_Z17soft_max_backpropPfS_S_
	.cfi_startproc
# %bb.0:
	xorl	%eax, %eax
	movss	.LCPI7_1(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	movaps	.LCPI7_0(%rip), %xmm1           # xmm1 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
.LBB7_1:                                # =>This Loop Header: Depth=1
                                        #     Child Loop BB7_2 Depth 2
	movl	$0, (%rdi,%rax,4)
	xorps	%xmm2, %xmm2
	xorl	%ecx, %ecx
.LBB7_2:                                #   Parent Loop BB7_1 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	cmpq	%rcx, %rax
	jne	.LBB7_6
# %bb.3:                                #   in Loop: Header=BB7_2 Depth=2
	movss	(%rdx,%rax,4), %xmm4            # xmm4 = mem[0],zero,zero,zero
	movaps	%xmm0, %xmm3
	subss	%xmm4, %xmm3
	mulss	%xmm4, %xmm3
	mulss	(%rsi,%rax,4), %xmm3
	jmp	.LBB7_7
.LBB7_6:                                #   in Loop: Header=BB7_2 Depth=2
	movss	(%rdx,%rax,4), %xmm3            # xmm3 = mem[0],zero,zero,zero
	xorps	%xmm1, %xmm3
	mulss	(%rdx,%rcx,4), %xmm3
	mulss	(%rsi,%rcx,4), %xmm3
.LBB7_7:                                #   in Loop: Header=BB7_2 Depth=2
	addss	%xmm3, %xmm2
	movss	%xmm2, (%rdi,%rax,4)
	incq	%rcx
	cmpq	$10, %rcx
	jne	.LBB7_2
# %bb.4:                                #   in Loop: Header=BB7_1 Depth=1
	incq	%rax
	cmpq	$10, %rax
	jne	.LBB7_1
# %bb.5:
	retq
.Lfunc_end7:
	.size	_Z17soft_max_backpropPfS_S_, .Lfunc_end7-_Z17soft_max_backpropPfS_S_
	.cfi_endproc
                                        # -- End function
	.globl	_Z14fcl_2_backpropPfS_S_S_PS_S0_f # -- Begin function _Z14fcl_2_backpropPfS_S_S_PS_S0_f
	.type	_Z14fcl_2_backpropPfS_S_S_PS_S0_f,@function
_Z14fcl_2_backpropPfS_S_S_PS_S0_f:      # @_Z14fcl_2_backpropPfS_S_S_PS_S0_f
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%r9, 16(%rsp)                   # 8-byte Spill
	movq	%r8, %r14
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %rbp
	xorl	%ebx, %ebx
	movss	%xmm0, 12(%rsp)                 # 4-byte Spill
.LBB8_1:                                # %.preheader29
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB8_2 Depth 2
	movl	$4096, %edx                     # imm = 0x1000
	movq	%rbp, %rdi
	xorl	%esi, %esi
	callq	memset@PLT
	movss	12(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	movq	(%r14,%rbx,8), %rax
	movq	16(%rsp), %rcx                  # 8-byte Reload
	movq	(%rcx,%rbx,8), %rcx
	xorl	%edx, %edx
.LBB8_2:                                #   Parent Loop BB8_1 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%r13,%rbx,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	mulss	(%rax,%rdx,4), %xmm1
	addss	(%rbp,%rdx,4), %xmm1
	movss	%xmm1, (%rbp,%rdx,4)
	movss	(%r13,%rbx,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	mulss	(%r12,%rdx,4), %xmm1
	divss	%xmm0, %xmm1
	addss	(%rcx,%rdx,4), %xmm1
	movss	%xmm1, (%rcx,%rdx,4)
	incq	%rdx
	cmpq	$1024, %rdx                     # imm = 0x400
	jne	.LBB8_2
# %bb.3:                                #   in Loop: Header=BB8_1 Depth=1
	movss	(%r13,%rbx,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	divss	%xmm0, %xmm1
	movss	%xmm1, (%r15,%rbx,4)
	incq	%rbx
	cmpq	$10, %rbx
	jne	.LBB8_1
# %bb.4:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end8:
	.size	_Z14fcl_2_backpropPfS_S_S_PS_S0_f, .Lfunc_end8-_Z14fcl_2_backpropPfS_S_S_PS_S0_f
	.cfi_endproc
                                        # -- End function
	.globl	_Z14fcl_1_backpropPfS_PS_S_PS0_S1_f # -- Begin function _Z14fcl_1_backpropPfS_PS_S_PS0_S1_f
	.type	_Z14fcl_1_backpropPfS_PS_S_PS0_S1_f,@function
_Z14fcl_1_backpropPfS_PS_S_PS0_S1_f:    # @_Z14fcl_1_backpropPfS_PS_S_PS0_S1_f
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	xorl	%eax, %eax
.LBB9_1:                                # %.preheader22
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB9_2 Depth 2
                                        #       Child Loop BB9_3 Depth 3
	movq	(%r9,%rax,8), %rdi
	xorl	%r8d, %r8d
.LBB9_2:                                # %.preheader
                                        #   Parent Loop BB9_1 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB9_3 Depth 3
	movq	(%rdx,%r8,8), %r10
	movq	(%rdi,%r8,8), %r11
	xorl	%ebx, %ebx
.LBB9_3:                                #   Parent Loop BB9_1 Depth=1
                                        #     Parent Loop BB9_2 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movss	(%rsi,%rax,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	mulss	(%r10,%rbx,4), %xmm1
	divss	%xmm0, %xmm1
	addss	(%r11,%rbx,4), %xmm1
	movss	%xmm1, (%r11,%rbx,4)
	incq	%rbx
	cmpq	$28, %rbx
	jne	.LBB9_3
# %bb.4:                                #   in Loop: Header=BB9_2 Depth=2
	incq	%r8
	cmpq	$28, %r8
	jne	.LBB9_2
# %bb.5:                                #   in Loop: Header=BB9_1 Depth=1
	movss	(%rsi,%rax,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	divss	%xmm0, %xmm1
	movss	%xmm1, (%rcx,%rax,4)
	incq	%rax
	cmpq	$1024, %rax                     # imm = 0x400
	jne	.LBB9_1
# %bb.6:
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end9:
	.size	_Z14fcl_1_backpropPfS_PS_S_PS0_S1_f, .Lfunc_end9-_Z14fcl_1_backpropPfS_PS_S_PS0_S1_f
	.cfi_endproc
                                        # -- End function
	.globl	_Z12fcl_1_updatePPPfS1_S_S_f    # -- Begin function _Z12fcl_1_updatePPPfS1_S_S_f
	.type	_Z12fcl_1_updatePPPfS1_S_S_f,@function
_Z12fcl_1_updatePPPfS1_S_S_f:           # @_Z12fcl_1_updatePPPfS1_S_S_f
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	xorl	%eax, %eax
.LBB10_1:                               # %.preheader27
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB10_2 Depth 2
                                        #       Child Loop BB10_3 Depth 3
	movq	(%rsi,%rax,8), %r8
	movq	(%rdi,%rax,8), %r9
	xorl	%r10d, %r10d
.LBB10_2:                               # %.preheader
                                        #   Parent Loop BB10_1 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB10_3 Depth 3
	movq	(%r8,%r10,8), %r11
	movq	(%r9,%r10,8), %rbx
	xorl	%r14d, %r14d
.LBB10_3:                               #   Parent Loop BB10_1 Depth=1
                                        #     Parent Loop BB10_2 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movss	(%r11,%r14,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	movss	(%rbx,%r14,4), %xmm2            # xmm2 = mem[0],zero,zero,zero
	subss	%xmm1, %xmm2
	movss	%xmm2, (%rbx,%r14,4)
	movl	$0, (%r11,%r14,4)
	incq	%r14
	cmpq	$28, %r14
	jne	.LBB10_3
# %bb.4:                                #   in Loop: Header=BB10_2 Depth=2
	incq	%r10
	cmpq	$28, %r10
	jne	.LBB10_2
# %bb.5:                                #   in Loop: Header=BB10_1 Depth=1
	movss	(%rcx,%rax,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	movss	(%rdx,%rax,4), %xmm2            # xmm2 = mem[0],zero,zero,zero
	subss	%xmm1, %xmm2
	movss	%xmm2, (%rdx,%rax,4)
	movl	$0, (%rcx,%rax,4)
	incq	%rax
	cmpq	$1024, %rax                     # imm = 0x400
	jne	.LBB10_1
# %bb.6:
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end10:
	.size	_Z12fcl_1_updatePPPfS1_S_S_f, .Lfunc_end10-_Z12fcl_1_updatePPPfS1_S_S_f
	.cfi_endproc
                                        # -- End function
	.globl	_Z31__device_stub__cuda_fcl1_updatePfS_S_S_f # -- Begin function _Z31__device_stub__cuda_fcl1_updatePfS_S_S_f
	.type	_Z31__device_stub__cuda_fcl1_updatePfS_S_S_f,@function
_Z31__device_stub__cuda_fcl1_updatePfS_S_S_f: # @_Z31__device_stub__cuda_fcl1_updatePfS_S_S_f
	.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	12(%rsp), %rcx
	movss	%xmm0, (%rcx)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%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	$_Z16cuda_fcl1_updatePfS_S_S_f, %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_end11:
	.size	_Z31__device_stub__cuda_fcl1_updatePfS_S_S_f, .Lfunc_end11-_Z31__device_stub__cuda_fcl1_updatePfS_S_S_f
	.cfi_endproc
                                        # -- End function
	.globl	_Z12fcl_2_updatePPfS0_S_S_f     # -- Begin function _Z12fcl_2_updatePPfS0_S_S_f
	.type	_Z12fcl_2_updatePPfS0_S_S_f,@function
_Z12fcl_2_updatePPfS0_S_S_f:            # @_Z12fcl_2_updatePPfS0_S_S_f
	.cfi_startproc
# %bb.0:
	xorl	%eax, %eax
.LBB12_1:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB12_2 Depth 2
	movq	(%rsi,%rax,8), %r8
	movq	(%rdi,%rax,8), %r9
	xorl	%r10d, %r10d
.LBB12_2:                               #   Parent Loop BB12_1 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%r8,%r10,4), %xmm1             # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	movss	(%r9,%r10,4), %xmm2             # xmm2 = mem[0],zero,zero,zero
	subss	%xmm1, %xmm2
	movss	%xmm2, (%r9,%r10,4)
	movl	$0, (%r8,%r10,4)
	incq	%r10
	cmpq	$1024, %r10                     # imm = 0x400
	jne	.LBB12_2
# %bb.3:                                #   in Loop: Header=BB12_1 Depth=1
	movss	(%rcx,%rax,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	movss	(%rdx,%rax,4), %xmm2            # xmm2 = mem[0],zero,zero,zero
	subss	%xmm1, %xmm2
	movss	%xmm2, (%rdx,%rax,4)
	movl	$0, (%rcx,%rax,4)
	incq	%rax
	cmpq	$10, %rax
	jne	.LBB12_1
# %bb.4:
	retq
.Lfunc_end12:
	.size	_Z12fcl_2_updatePPfS0_S_S_f, .Lfunc_end12-_Z12fcl_2_updatePPfS0_S_S_f
	.cfi_endproc
                                        # -- End function
	.globl	_Z31__device_stub__cuda_fcl2_updatePfS_S_S_f # -- Begin function _Z31__device_stub__cuda_fcl2_updatePfS_S_S_f
	.type	_Z31__device_stub__cuda_fcl2_updatePfS_S_S_f,@function
_Z31__device_stub__cuda_fcl2_updatePfS_S_S_f: # @_Z31__device_stub__cuda_fcl2_updatePfS_S_S_f
	.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	12(%rsp), %rcx
	movss	%xmm0, (%rcx)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%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	$_Z16cuda_fcl2_updatePfS_S_S_f, %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_end13:
	.size	_Z31__device_stub__cuda_fcl2_updatePfS_S_S_f, .Lfunc_end13-_Z31__device_stub__cuda_fcl2_updatePfS_S_S_f
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z14create_weightsiii
.LCPI14_0:
	.quad	0x0000000000000000              # double 0
	.text
	.globl	_Z14create_weightsiii
	.type	_Z14create_weightsiii,@function
_Z14create_weightsiii:                  # @_Z14create_weightsiii
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%edx, 8(%rsp)                   # 4-byte Spill
	movl	%esi, 4(%rsp)                   # 4-byte Spill
	movl	%edi, %ebp
	movq	$123, 80(%rsp)
	movabsq	$4575657221408423936, %rax      # imm = 0x3F80000000000000
	movq	%rax, 88(%rsp)
	movl	$0, 96(%rsp)
	movb	$0, 100(%rsp)
	movl	%edi, %eax
	movq	%rax, 40(%rsp)                  # 8-byte Spill
	leaq	(,%rax,8), %rdi
	testl	%ebp, %ebp
	movq	$-1, %r14
	cmovsq	%r14, %rdi
	callq	_Znam
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	testl	%ebp, %ebp
	jle	.LBB14_11
# %bb.1:                                # %.lr.ph32
	movl	4(%rsp), %eax                   # 4-byte Reload
	movl	%eax, %ecx
	movq	%rcx, 64(%rsp)                  # 8-byte Spill
	leaq	(,%rcx,8), %rcx
	testl	%eax, %eax
	cmovsq	%r14, %rcx
	movq	%rcx, 32(%rsp)                  # 8-byte Spill
	movl	8(%rsp), %eax                   # 4-byte Reload
	movl	%eax, %ebx
	leaq	(,%rbx,4), %rcx
	testl	%eax, %eax
	cmovsq	%r14, %rcx
	movq	%rcx, 56(%rsp)                  # 8-byte Spill
	cvtsi2sd	%ebp, %xmm0
	xorl	%r15d, %r15d
	leaq	80(%rsp), %r13
	leaq	88(%rsp), %rbp
	movsd	%xmm0, 24(%rsp)                 # 8-byte Spill
	sqrtsd	%xmm0, %xmm0
	movsd	%xmm0, 72(%rsp)                 # 8-byte Spill
.LBB14_2:                               # =>This Loop Header: Depth=1
                                        #     Child Loop BB14_4 Depth 2
                                        #       Child Loop BB14_6 Depth 3
	movq	32(%rsp), %rdi                  # 8-byte Reload
	callq	_Znam
	movq	%rax, %r14
	movq	16(%rsp), %rax                  # 8-byte Reload
	movq	%r15, 48(%rsp)                  # 8-byte Spill
	movq	%r14, (%rax,%r15,8)
	cmpl	$0, 4(%rsp)                     # 4-byte Folded Reload
	jle	.LBB14_10
# %bb.3:                                # %.lr.ph28.preheader
                                        #   in Loop: Header=BB14_2 Depth=1
	xorl	%r15d, %r15d
.LBB14_4:                               # %.lr.ph28
                                        #   Parent Loop BB14_2 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB14_6 Depth 3
	movq	56(%rsp), %rdi                  # 8-byte Reload
	callq	_Znam
	movq	%rax, (%r14,%r15,8)
	cmpl	$0, 8(%rsp)                     # 4-byte Folded Reload
	jle	.LBB14_9
# %bb.5:                                # %.lr.ph.preheader
                                        #   in Loop: Header=BB14_4 Depth=2
	xorl	%r12d, %r12d
.LBB14_6:                               # %.lr.ph
                                        #   Parent Loop BB14_2 Depth=1
                                        #     Parent Loop BB14_4 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movq	%rbp, %rdi
	movq	%r13, %rsi
	movq	%rbp, %rdx
	callq	_ZNSt19normal_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_RKNS0_10param_typeE
	movapd	%xmm0, %xmm1
	movsd	24(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	ucomisd	.LCPI14_0(%rip), %xmm0
	movsd	72(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	jae	.LBB14_8
# %bb.7:                                # %call.sqrt
                                        #   in Loop: Header=BB14_6 Depth=3
	movsd	24(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	movss	%xmm1, 12(%rsp)                 # 4-byte Spill
	callq	sqrt
	movss	12(%rsp), %xmm1                 # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
.LBB14_8:                               # %.lr.ph.split
                                        #   in Loop: Header=BB14_6 Depth=3
	cvtss2sd	%xmm1, %xmm1
	divsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm1, %xmm0
	movq	(%r14,%r15,8), %rax
	movss	%xmm0, (%rax,%r12,4)
	incq	%r12
	cmpq	%r12, %rbx
	jne	.LBB14_6
.LBB14_9:                               # %._crit_edge
                                        #   in Loop: Header=BB14_4 Depth=2
	incq	%r15
	cmpq	64(%rsp), %r15                  # 8-byte Folded Reload
	jne	.LBB14_4
.LBB14_10:                              # %._crit_edge29
                                        #   in Loop: Header=BB14_2 Depth=1
	movq	48(%rsp), %r15                  # 8-byte Reload
	incq	%r15
	cmpq	40(%rsp), %r15                  # 8-byte Folded Reload
	jne	.LBB14_2
.LBB14_11:                              # %._crit_edge33
	movq	16(%rsp), %rax                  # 8-byte Reload
	addq	$104, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end14:
	.size	_Z14create_weightsiii, .Lfunc_end14-_Z14create_weightsiii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z14create_weightsii
.LCPI15_0:
	.quad	0x0000000000000000              # double 0
	.text
	.globl	_Z14create_weightsii
	.type	_Z14create_weightsii,@function
_Z14create_weightsii:                   # @_Z14create_weightsii
	.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	$72, %rsp
	.cfi_def_cfa_offset 128
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%esi, (%rsp)                    # 4-byte Spill
	movl	%edi, %ebp
	movq	$456, 48(%rsp)                  # imm = 0x1C8
	movabsq	$4575657221408423936, %rax      # imm = 0x3F80000000000000
	movq	%rax, 56(%rsp)
	movl	$0, 64(%rsp)
	movb	$0, 68(%rsp)
	movl	%edi, %eax
	movq	%rax, 32(%rsp)                  # 8-byte Spill
	leaq	(,%rax,8), %rdi
	testl	%ebp, %ebp
	movq	$-1, %r14
	cmovsq	%r14, %rdi
	callq	_Znam
	movq	%rax, 8(%rsp)                   # 8-byte Spill
	testl	%ebp, %ebp
	jle	.LBB15_8
# %bb.1:                                # %.lr.ph19
	movl	(%rsp), %eax                    # 4-byte Reload
	movl	%eax, %ebx
	leaq	(,%rbx,4), %rcx
	testl	%eax, %eax
	cmovsq	%r14, %rcx
	movq	%rcx, 24(%rsp)                  # 8-byte Spill
	cvtsi2sd	%ebp, %xmm0
	xorl	%r14d, %r14d
	leaq	48(%rsp), %r12
	leaq	56(%rsp), %r13
	movsd	%xmm0, 16(%rsp)                 # 8-byte Spill
	sqrtsd	%xmm0, %xmm0
	movsd	%xmm0, 40(%rsp)                 # 8-byte Spill
.LBB15_2:                               # =>This Loop Header: Depth=1
                                        #     Child Loop BB15_4 Depth 2
	movq	24(%rsp), %rdi                  # 8-byte Reload
	callq	_Znam
	movq	%rax, %rbp
	movq	8(%rsp), %rax                   # 8-byte Reload
	movq	%rbp, (%rax,%r14,8)
	cmpl	$0, (%rsp)                      # 4-byte Folded Reload
	jle	.LBB15_7
# %bb.3:                                # %.lr.ph.preheader
                                        #   in Loop: Header=BB15_2 Depth=1
	xorl	%r15d, %r15d
.LBB15_4:                               # %.lr.ph
                                        #   Parent Loop BB15_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_ZNSt19normal_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_RKNS0_10param_typeE
	movapd	%xmm0, %xmm1
	movsd	16(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	ucomisd	.LCPI15_0(%rip), %xmm0
	movsd	40(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	jae	.LBB15_6
# %bb.5:                                # %call.sqrt
                                        #   in Loop: Header=BB15_4 Depth=2
	movsd	16(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	movss	%xmm1, 4(%rsp)                  # 4-byte Spill
	callq	sqrt
	movss	4(%rsp), %xmm1                  # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
.LBB15_6:                               # %.lr.ph.split
                                        #   in Loop: Header=BB15_4 Depth=2
	cvtss2sd	%xmm1, %xmm1
	divsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm1, %xmm0
	movss	%xmm0, (%rbp,%r15,4)
	incq	%r15
	cmpq	%r15, %rbx
	jne	.LBB15_4
.LBB15_7:                               # %._crit_edge
                                        #   in Loop: Header=BB15_2 Depth=1
	incq	%r14
	cmpq	32(%rsp), %r14                  # 8-byte Folded Reload
	jne	.LBB15_2
.LBB15_8:                               # %._crit_edge20
	movq	8(%rsp), %rax                   # 8-byte Reload
	addq	$72, %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_end15:
	.size	_Z14create_weightsii, .Lfunc_end15-_Z14create_weightsii
	.cfi_endproc
                                        # -- End function
	.globl	_Z19create_weight_deriviii      # -- Begin function _Z19create_weight_deriviii
	.type	_Z19create_weight_deriviii,@function
_Z19create_weight_deriviii:             # @_Z19create_weight_deriviii
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%edx, %ebx
	movl	%esi, 4(%rsp)                   # 4-byte Spill
	movl	%edi, %ebp
	movl	%edi, %eax
	movq	%rax, 24(%rsp)                  # 8-byte Spill
	leaq	(,%rax,8), %rdi
	testl	%ebp, %ebp
	movq	$-1, %r14
	cmovsq	%r14, %rdi
	callq	_Znam
	movq	%rax, 8(%rsp)                   # 8-byte Spill
	testl	%ebp, %ebp
	jle	.LBB16_8
# %bb.1:                                # %.lr.ph30
	movl	4(%rsp), %eax                   # 4-byte Reload
	movl	%eax, %r15d
	leaq	(,%r15,8), %rcx
	testl	%eax, %eax
	cmovsq	%r14, %rcx
	movq	%rcx, 16(%rsp)                  # 8-byte Spill
	movl	%ebx, %r13d
	shlq	$2, %r13
	testl	%ebx, %ebx
	cmovnsq	%r13, %r14
	xorl	%r12d, %r12d
.LBB16_2:                               # =>This Loop Header: Depth=1
                                        #     Child Loop BB16_4 Depth 2
	movq	16(%rsp), %rdi                  # 8-byte Reload
	callq	_Znam
	movq	%rax, %rbp
	movq	8(%rsp), %rax                   # 8-byte Reload
	movq	%r12, 32(%rsp)                  # 8-byte Spill
	movq	%rbp, (%rax,%r12,8)
	cmpl	$0, 4(%rsp)                     # 4-byte Folded Reload
	jle	.LBB16_7
# %bb.3:                                # %.lr.ph26.preheader
                                        #   in Loop: Header=BB16_2 Depth=1
	xorl	%r12d, %r12d
.LBB16_4:                               # %.lr.ph26
                                        #   Parent Loop BB16_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movq	%r14, %rdi
	callq	_Znam
	movq	%rax, (%rbp,%r12,8)
	testl	%ebx, %ebx
	jle	.LBB16_6
# %bb.5:                                # %.lr.ph.preheader
                                        #   in Loop: Header=BB16_4 Depth=2
	movq	%rax, %rdi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	memset@PLT
.LBB16_6:                               # %._crit_edge
                                        #   in Loop: Header=BB16_4 Depth=2
	incq	%r12
	cmpq	%r12, %r15
	jne	.LBB16_4
.LBB16_7:                               # %._crit_edge27
                                        #   in Loop: Header=BB16_2 Depth=1
	movq	32(%rsp), %r12                  # 8-byte Reload
	incq	%r12
	cmpq	24(%rsp), %r12                  # 8-byte Folded Reload
	jne	.LBB16_2
.LBB16_8:                               # %._crit_edge31
	movq	8(%rsp), %rax                   # 8-byte Reload
	addq	$40, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end16:
	.size	_Z19create_weight_deriviii, .Lfunc_end16-_Z19create_weight_deriviii
	.cfi_endproc
                                        # -- End function
	.globl	_Z19create_weight_derivii       # -- Begin function _Z19create_weight_derivii
	.type	_Z19create_weight_derivii,@function
_Z19create_weight_derivii:              # @_Z19create_weight_derivii
	.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
	pushq	%rax
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%esi, %ebx
	movl	%edi, %ebp
	movl	%edi, %r13d
	leaq	(,%r13,8), %rdi
	testl	%ebp, %ebp
	movq	$-1, %r14
	cmovsq	%r14, %rdi
	callq	_Znam
	movq	%rax, %r15
	testl	%ebp, %ebp
	jle	.LBB17_5
# %bb.1:                                # %.lr.ph17
	movl	%ebx, %r12d
	shlq	$2, %r12
	testl	%ebx, %ebx
	cmovnsq	%r12, %r14
	xorl	%ebp, %ebp
.LBB17_2:                               # =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_Znam
	movq	%rax, (%r15,%rbp,8)
	testl	%ebx, %ebx
	jle	.LBB17_4
# %bb.3:                                # %.lr.ph.preheader
                                        #   in Loop: Header=BB17_2 Depth=1
	movq	%rax, %rdi
	xorl	%esi, %esi
	movq	%r12, %rdx
	callq	memset@PLT
.LBB17_4:                               # %._crit_edge
                                        #   in Loop: Header=BB17_2 Depth=1
	incq	%rbp
	cmpq	%rbp, %r13
	jne	.LBB17_2
.LBB17_5:                               # %._crit_edge18
	movq	%r15, %rax
	addq	$8, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end17:
	.size	_Z19create_weight_derivii, .Lfunc_end17-_Z19create_weight_derivii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function main
.LCPI18_0:
	.long	0x3f800000                      # float 1
.LCPI18_1:
	.long	0xbf800000                      # float -1
.LCPI18_2:
	.long	0x42c80000                      # float 100
.LCPI18_3:
	.long	0x3dcccccd                      # float 0.100000001
.LCPI18_5:
	.long	0x42700000                      # float 60
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0
.LCPI18_4:
	.quad	0x412e848000000000              # double 1.0E+6
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
.Lfunc_begin2:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception2
# %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	$360, %rsp                      # imm = 0x168
	.cfi_def_cfa_offset 416
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	cmpl	$3, %edi
	jne	.LBB18_1
# %bb.3:
	movq	%rsi, %rbx
	movq	8(%rsi), %rsi
.Ltmp36:
	leaq	328(%rsp), %rdi
	leaq	16(%rsp), %rdx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
.Ltmp37:
# %bb.4:
.Ltmp39:
	leaq	328(%rsp), %rdi
	leaq	288(%rsp), %rsi
	leaq	280(%rsp), %rdx
	leaq	276(%rsp), %rcx
	leaq	272(%rsp), %r8
	callq	_Z15read_image_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_S5_S5_
	movq	%rax, 232(%rsp)                 # 8-byte Spill
.Ltmp40:
# %bb.5:
	leaq	344(%rsp), %rax
	movq	-16(%rax), %rdi
	cmpq	%rax, %rdi
	je	.LBB18_7
# %bb.6:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB18_7:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	movq	16(%rbx), %rsi
.Ltmp42:
	leaq	296(%rsp), %rdi
	leaq	16(%rsp), %rdx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
.Ltmp43:
# %bb.8:
.Ltmp45:
	leaq	296(%rsp), %rdi
	leaq	292(%rsp), %rsi
	leaq	284(%rsp), %rdx
	callq	_Z15read_label_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS5_
	movq	%rax, 224(%rsp)                 # 8-byte Spill
.Ltmp46:
# %bb.9:
	leaq	312(%rsp), %rax
	movq	-16(%rax), %rdi
	cmpq	%rax, %rdi
	je	.LBB18_11
# %bb.10:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i203
	callq	_ZdlPv
.LBB18_11:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit205
	movl	$1024, %edi                     # imm = 0x400
	movl	$28, %esi
	movl	$28, %edx
	callq	_Z14create_weightsiii
	movq	%rax, 64(%rsp)                  # 8-byte Spill
	movl	$10, %edi
	movl	$1024, %esi                     # imm = 0x400
	callq	_Z14create_weightsii
	movq	%rax, %r14
	movl	$1024, %edi                     # imm = 0x400
	movl	$28, %esi
	movl	$28, %edx
	callq	_Z19create_weight_deriviii
	movq	%rax, %rbp
	movl	$10, %edi
	movl	$1024, %esi                     # imm = 0x400
	callq	_Z19create_weight_derivii
	movq	%rax, 160(%rsp)                 # 8-byte Spill
	movl	$4096, %edi                     # imm = 0x1000
	callq	_Znam
	xorl	%r15d, %r15d
	movl	$4096, %edx                     # imm = 0x1000
	movq	%rax, 56(%rsp)                  # 8-byte Spill
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	memset@PLT
	movl	$4096, %edi                     # imm = 0x1000
	callq	_Znam
	movq	%rax, %r13
	movl	$4096, %edx                     # imm = 0x1000
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	memset@PLT
	movl	$40, %edi
	callq	_Znam
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movups	%xmm0, 16(%rax)
	movq	%rax, 48(%rsp)                  # 8-byte Spill
	movq	%r15, 32(%rax)
	movl	$4096, %edi                     # imm = 0x1000
	callq	_Znam
	movl	$4096, %edx                     # imm = 0x1000
	movq	%rax, 216(%rsp)                 # 8-byte Spill
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	memset@PLT
	movl	$40, %edi
	callq	_Znam
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movups	%xmm0, 16(%rax)
	movq	%rax, 152(%rsp)                 # 8-byte Spill
	movq	%r15, 32(%rax)
	movl	$40, %edi
	callq	_Znam
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movups	%xmm0, 16(%rax)
	movq	%rax, 208(%rsp)                 # 8-byte Spill
	movq	%r15, 32(%rax)
	movl	$40, %edi
	callq	_Znam
	movq	%rax, %rcx
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movups	%xmm0, 16(%rax)
	xorl	%eax, %eax
	movq	%rax, 24(%rsp)                  # 8-byte Spill
	movq	%rcx, 200(%rsp)                 # 8-byte Spill
	movq	%r15, 32(%rcx)
	movl	$3211264, %edi                  # imm = 0x310000
	callq	_Znam
	movq	%rax, 40(%rsp)                  # 8-byte Spill
	movl	$3211264, %edi                  # imm = 0x310000
	callq	_Znam
	movq	%rax, 144(%rsp)                 # 8-byte Spill
	movl	$40960, %edi                    # imm = 0xA000
	callq	_Znam
	movq	%rax, 136(%rsp)                 # 8-byte Spill
	movl	$40960, %edi                    # imm = 0xA000
	callq	_Znam
	movq	%rax, 32(%rsp)                  # 8-byte Spill
	leaq	16(%rsp), %rdi
	movl	$3211264, %esi                  # imm = 0x310000
	callq	hipMalloc
	leaq	120(%rsp), %rdi
	movl	$3211264, %esi                  # imm = 0x310000
	callq	hipMalloc
	leaq	112(%rsp), %rdi
	movl	$4096, %esi                     # imm = 0x1000
	callq	hipMalloc
	leaq	104(%rsp), %rdi
	movl	$4096, %esi                     # imm = 0x1000
	callq	hipMalloc
	leaq	96(%rsp), %rdi
	movl	$40960, %esi                    # imm = 0xA000
	callq	hipMalloc
	leaq	88(%rsp), %rdi
	movl	$40960, %esi                    # imm = 0xA000
	callq	hipMalloc
	leaq	80(%rsp), %rdi
	movl	$40, %esi
	callq	hipMalloc
	leaq	72(%rsp), %rdi
	movl	$40, %esi
	callq	hipMalloc
	callq	clock
	movl	$3136, %r12d                    # imm = 0xC40
	movq	%r14, 176(%rsp)                 # 8-byte Spill
	movq	%r13, 168(%rsp)                 # 8-byte Spill
.LBB18_12:                              # =>This Loop Header: Depth=1
                                        #     Child Loop BB18_13 Depth 2
                                        #       Child Loop BB18_14 Depth 3
                                        #         Child Loop BB18_15 Depth 4
                                        #         Child Loop BB18_19 Depth 4
                                        #           Child Loop BB18_20 Depth 5
                                        #             Child Loop BB18_21 Depth 6
                                        #         Child Loop BB18_25 Depth 4
                                        #           Child Loop BB18_26 Depth 5
                                        #             Child Loop BB18_27 Depth 6
                                        #         Child Loop BB18_35 Depth 4
                                        #           Child Loop BB18_36 Depth 5
                                        #             Child Loop BB18_37 Depth 6
                                        #         Child Loop BB18_41 Depth 4
                                        #           Child Loop BB18_42 Depth 5
                                        #         Child Loop BB18_47 Depth 4
                                        #           Child Loop BB18_48 Depth 5
	callq	clock
	movq	%rax, 184(%rsp)                 # 8-byte Spill
	xorl	%ebx, %ebx
.LBB18_13:                              # %.preheader229
                                        #   Parent Loop BB18_12 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB18_14 Depth 3
                                        #         Child Loop BB18_15 Depth 4
                                        #         Child Loop BB18_19 Depth 4
                                        #           Child Loop BB18_20 Depth 5
                                        #             Child Loop BB18_21 Depth 6
                                        #         Child Loop BB18_25 Depth 4
                                        #           Child Loop BB18_26 Depth 5
                                        #             Child Loop BB18_27 Depth 6
                                        #         Child Loop BB18_35 Depth 4
                                        #           Child Loop BB18_36 Depth 5
                                        #             Child Loop BB18_37 Depth 6
                                        #         Child Loop BB18_41 Depth 4
                                        #           Child Loop BB18_42 Depth 5
                                        #         Child Loop BB18_47 Depth 4
                                        #           Child Loop BB18_48 Depth 5
	movq	%rbx, 192(%rsp)                 # 8-byte Spill
	imulq	$100, %rbx, %rax
	movq	%rax, 240(%rsp)                 # 8-byte Spill
	xorps	%xmm0, %xmm0
	movss	%xmm0, 12(%rsp)                 # 4-byte Spill
	xorl	%ecx, %ecx
	movss	%xmm0, 8(%rsp)                  # 4-byte Spill
.LBB18_14:                              #   Parent Loop BB18_12 Depth=1
                                        #     Parent Loop BB18_13 Depth=2
                                        # =>    This Loop Header: Depth=3
                                        #         Child Loop BB18_15 Depth 4
                                        #         Child Loop BB18_19 Depth 4
                                        #           Child Loop BB18_20 Depth 5
                                        #             Child Loop BB18_21 Depth 6
                                        #         Child Loop BB18_25 Depth 4
                                        #           Child Loop BB18_26 Depth 5
                                        #             Child Loop BB18_27 Depth 6
                                        #         Child Loop BB18_35 Depth 4
                                        #           Child Loop BB18_36 Depth 5
                                        #             Child Loop BB18_37 Depth 6
                                        #         Child Loop BB18_41 Depth 4
                                        #           Child Loop BB18_42 Depth 5
                                        #         Child Loop BB18_47 Depth 4
                                        #           Child Loop BB18_48 Depth 5
	movq	240(%rsp), %rax                 # 8-byte Reload
	movq	%rcx, 264(%rsp)                 # 8-byte Spill
	addq	%rcx, %rax
	movq	224(%rsp), %rcx                 # 8-byte Reload
	movslq	(%rcx,%rax,4), %rbx
	movq	232(%rsp), %rcx                 # 8-byte Reload
	movq	(%rcx,%rax,8), %r15
	movq	%r15, %rdi
	movq	64(%rsp), %rsi                  # 8-byte Reload
	movq	56(%rsp), %rdx                  # 8-byte Reload
	callq	_Z17first_dense_layerPPfPS0_S_
	movq	%rax, 248(%rsp)                 # 8-byte Spill
	movq	%rax, %rdi
	movq	%r14, %rsi
	movq	48(%rsp), %rdx                  # 8-byte Reload
	callq	_Z18second_dense_layerPfPS_S_
	movq	%rax, %rdi
	callq	_Z8soft_maxPf
	movss	(%rax), %xmm0                   # xmm0 = mem[0],zero,zero,zero
	movl	$4, %ecx
	movq	%rax, %r14
.LBB18_15:                              # %.lr.ph.i.i
                                        #   Parent Loop BB18_12 Depth=1
                                        #     Parent Loop BB18_13 Depth=2
                                        #       Parent Loop BB18_14 Depth=3
                                        # =>      This Inner Loop Header: Depth=4
	movss	(%rax,%rcx), %xmm1              # xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	leaq	(%rax,%rcx), %rdx
	cmovaq	%rdx, %r14
	maxss	%xmm0, %xmm1
	addq	$4, %rcx
	movaps	%xmm1, %xmm0
	cmpq	$40, %rcx
	jne	.LBB18_15
# %bb.16:                               # %_ZSt11max_elementIPfET_S1_S1_.exit
                                        #   in Loop: Header=BB18_14 Depth=3
	subq	%rax, %r14
	shrq	$2, %r14
	movss	.LCPI18_0(%rip), %xmm1          # xmm1 = mem[0],zero,zero,zero
	cmpl	%r14d, %ebx
	jne	.LBB18_18
# %bb.17:                               #   in Loop: Header=BB18_14 Depth=3
	movss	8(%rsp), %xmm0                  # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	addss	%xmm1, %xmm0
	movss	%xmm0, 8(%rsp)                  # 4-byte Spill
.LBB18_18:                              # %_ZSt11max_elementIPfET_S1_S1_.exit
                                        #   in Loop: Header=BB18_14 Depth=3
	xorps	%xmm0, %xmm0
	movq	200(%rsp), %rsi                 # 8-byte Reload
	movups	%xmm0, 16(%rsi)
	movups	%xmm0, (%rsi)
	movq	$0, 32(%rsi)
	movss	12(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	addss	%xmm1, %xmm0
	movss	%xmm0, 132(%rsp)                # 4-byte Spill
	movss	.LCPI18_1(%rip), %xmm0          # xmm0 = mem[0],zero,zero,zero
	divss	(%rax,%rbx,4), %xmm0
	movq	%rbx, 256(%rsp)                 # 8-byte Spill
	movss	%xmm0, (%rsi,%rbx,4)
	movq	208(%rsp), %r13                 # 8-byte Reload
	movq	%r13, %rdi
	movq	%rax, %rdx
	callq	_Z17soft_max_backpropPfS_S_
	movq	216(%rsp), %rbx                 # 8-byte Reload
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	248(%rsp), %rdx                 # 8-byte Reload
	movq	152(%rsp), %rcx                 # 8-byte Reload
	movq	176(%rsp), %r8                  # 8-byte Reload
	movq	160(%rsp), %r9                  # 8-byte Reload
	movss	.LCPI18_2(%rip), %xmm0          # xmm0 = mem[0],zero,zero,zero
	callq	_Z14fcl_2_backpropPfS_S_S_PS_S0_f
	movss	.LCPI18_2(%rip), %xmm2          # xmm2 = mem[0],zero,zero,zero
	xorl	%eax, %eax
	movq	144(%rsp), %r9                  # 8-byte Reload
	movq	168(%rsp), %r10                 # 8-byte Reload
.LBB18_19:                              # %.preheader22.i
                                        #   Parent Loop BB18_12 Depth=1
                                        #     Parent Loop BB18_13 Depth=2
                                        #       Parent Loop BB18_14 Depth=3
                                        # =>      This Loop Header: Depth=4
                                        #           Child Loop BB18_20 Depth 5
                                        #             Child Loop BB18_21 Depth 6
	movq	(%rbp,%rax,8), %rcx
	movss	(%rbx,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	xorl	%edx, %edx
.LBB18_20:                              # %.preheader.i
                                        #   Parent Loop BB18_12 Depth=1
                                        #     Parent Loop BB18_13 Depth=2
                                        #       Parent Loop BB18_14 Depth=3
                                        #         Parent Loop BB18_19 Depth=4
                                        # =>        This Loop Header: Depth=5
                                        #             Child Loop BB18_21 Depth 6
	movq	(%r15,%rdx,8), %rsi
	movq	(%rcx,%rdx,8), %rdi
	xorl	%r8d, %r8d
.LBB18_21:                              #   Parent Loop BB18_12 Depth=1
                                        #     Parent Loop BB18_13 Depth=2
                                        #       Parent Loop BB18_14 Depth=3
                                        #         Parent Loop BB18_19 Depth=4
                                        #           Parent Loop BB18_20 Depth=5
                                        # =>          This Inner Loop Header: Depth=6
	movss	(%rsi,%r8,4), %xmm1             # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	divss	%xmm2, %xmm1
	addss	(%rdi,%r8,4), %xmm1
	movss	%xmm1, (%rdi,%r8,4)
	incq	%r8
	cmpq	$28, %r8
	jne	.LBB18_21
# %bb.22:                               #   in Loop: Header=BB18_20 Depth=5
	incq	%rdx
	cmpq	$28, %rdx
	jne	.LBB18_20
# %bb.23:                               #   in Loop: Header=BB18_19 Depth=4
	divss	%xmm2, %xmm0
	movss	%xmm0, (%r10,%rax,4)
	incq	%rax
	cmpq	$1024, %rax                     # imm = 0x400
	jne	.LBB18_19
# %bb.24:                               # %.preheader227.preheader
                                        #   in Loop: Header=BB18_14 Depth=3
	movq	40(%rsp), %rax                  # 8-byte Reload
	movq	%r9, %rcx
	xorl	%edx, %edx
	movq	160(%rsp), %rbx                 # 8-byte Reload
.LBB18_25:                              # %.preheader227
                                        #   Parent Loop BB18_12 Depth=1
                                        #     Parent Loop BB18_13 Depth=2
                                        #       Parent Loop BB18_14 Depth=3
                                        # =>      This Loop Header: Depth=4
                                        #           Child Loop BB18_26 Depth 5
                                        #             Child Loop BB18_27 Depth 6
	movq	64(%rsp), %rsi                  # 8-byte Reload
	movq	(%rsi,%rdx,8), %rsi
	movq	(%rbp,%rdx,8), %rdi
	movq	%rax, %r8
	movq	%rcx, %r9
	xorl	%r10d, %r10d
.LBB18_26:                              # %.preheader223
                                        #   Parent Loop BB18_12 Depth=1
                                        #     Parent Loop BB18_13 Depth=2
                                        #       Parent Loop BB18_14 Depth=3
                                        #         Parent Loop BB18_25 Depth=4
                                        # =>        This Loop Header: Depth=5
                                        #             Child Loop BB18_27 Depth 6
	movq	(%rsi,%r10,8), %r11
	movq	(%rdi,%r10,8), %r15
	xorl	%r13d, %r13d
.LBB18_27:                              #   Parent Loop BB18_12 Depth=1
                                        #     Parent Loop BB18_13 Depth=2
                                        #       Parent Loop BB18_14 Depth=3
                                        #         Parent Loop BB18_25 Depth=4
                                        #           Parent Loop BB18_26 Depth=5
                                        # =>          This Inner Loop Header: Depth=6
	movss	(%r11,%r13,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%r8,%r13,4)
	movss	(%r15,%r13,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%r9,%r13,4)
	incq	%r13
	cmpq	$28, %r13
	jne	.LBB18_27
# %bb.28:                               #   in Loop: Header=BB18_26 Depth=5
	incq	%r10
	addq	$112, %r9
	addq	$112, %r8
	cmpq	$28, %r10
	jne	.LBB18_26
# %bb.29:                               # %_Z14fcl_1_backpropPfS_PS_S_PS0_S1_f.exit
                                        #   in Loop: Header=BB18_25 Depth=4
	incq	%rdx
	addq	%r12, %rcx
	addq	%r12, %rax
	cmpq	$1024, %rdx                     # imm = 0x400
	jne	.LBB18_25
# %bb.30:                               #   in Loop: Header=BB18_14 Depth=3
	cmpl	%r14d, 256(%rsp)                # 4-byte Folded Reload
	je	.LBB18_32
# %bb.31:                               #   in Loop: Header=BB18_14 Depth=3
	movss	132(%rsp), %xmm0                # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 12(%rsp)                 # 4-byte Spill
.LBB18_32:                              #   in Loop: Header=BB18_14 Depth=3
	movq	16(%rsp), %rdi
	movl	$3211264, %edx                  # imm = 0x310000
	movq	40(%rsp), %rsi                  # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	movq	120(%rsp), %rdi
	movl	$3211264, %edx                  # imm = 0x310000
	movq	144(%rsp), %r14                 # 8-byte Reload
	movq	%r14, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	112(%rsp), %rdi
	movl	$4096, %edx                     # imm = 0x1000
	movq	56(%rsp), %rsi                  # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	movq	104(%rsp), %rdi
	movl	$4096, %edx                     # imm = 0x1000
	movq	168(%rsp), %r15                 # 8-byte Reload
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movabsq	$4294968320, %rdx               # imm = 0x100000400
	leaq	-240(%rdx), %rdi
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB18_34
# %bb.33:                               #   in Loop: Header=BB18_14 Depth=3
	movq	16(%rsp), %rdi
	movq	120(%rsp), %rsi
	movq	112(%rsp), %rdx
	movq	104(%rsp), %rcx
	movss	.LCPI18_3(%rip), %xmm0          # xmm0 = mem[0],zero,zero,zero
	callq	_Z31__device_stub__cuda_fcl1_updatePfS_S_S_f
.LBB18_34:                              #   in Loop: Header=BB18_14 Depth=3
	movq	16(%rsp), %rsi
	movl	$3211264, %edx                  # imm = 0x310000
	movq	40(%rsp), %r13                  # 8-byte Reload
	movq	%r13, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	120(%rsp), %rsi
	movl	$3211264, %edx                  # imm = 0x310000
	movq	%r14, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	112(%rsp), %rsi
	movl	$4096, %edx                     # imm = 0x1000
	movq	56(%rsp), %rdi                  # 8-byte Reload
	movl	$2, %ecx
	callq	hipMemcpy
	movq	104(%rsp), %rsi
	movl	$4096, %edx                     # imm = 0x1000
	movq	%r15, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	%r13, %rax
	movq	%r14, %rcx
	xorl	%edx, %edx
	movq	136(%rsp), %r13                 # 8-byte Reload
.LBB18_35:                              # %.preheader226
                                        #   Parent Loop BB18_12 Depth=1
                                        #     Parent Loop BB18_13 Depth=2
                                        #       Parent Loop BB18_14 Depth=3
                                        # =>      This Loop Header: Depth=4
                                        #           Child Loop BB18_36 Depth 5
                                        #             Child Loop BB18_37 Depth 6
	movq	64(%rsp), %rsi                  # 8-byte Reload
	movq	(%rsi,%rdx,8), %rsi
	movq	(%rbp,%rdx,8), %rdi
	movq	%rax, %r8
	movq	%rcx, %r9
	xorl	%r10d, %r10d
.LBB18_36:                              # %.preheader
                                        #   Parent Loop BB18_12 Depth=1
                                        #     Parent Loop BB18_13 Depth=2
                                        #       Parent Loop BB18_14 Depth=3
                                        #         Parent Loop BB18_35 Depth=4
                                        # =>        This Loop Header: Depth=5
                                        #             Child Loop BB18_37 Depth 6
	movq	(%rsi,%r10,8), %r11
	movq	(%rdi,%r10,8), %r14
	xorl	%r15d, %r15d
.LBB18_37:                              #   Parent Loop BB18_12 Depth=1
                                        #     Parent Loop BB18_13 Depth=2
                                        #       Parent Loop BB18_14 Depth=3
                                        #         Parent Loop BB18_35 Depth=4
                                        #           Parent Loop BB18_36 Depth=5
                                        # =>          This Inner Loop Header: Depth=6
	movss	(%r8,%r15,4), %xmm0             # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%r11,%r15,4)
	movss	(%r9,%r15,4), %xmm0             # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%r14,%r15,4)
	incq	%r15
	cmpq	$28, %r15
	jne	.LBB18_37
# %bb.38:                               #   in Loop: Header=BB18_36 Depth=5
	incq	%r10
	addq	$112, %r9
	addq	$112, %r8
	cmpq	$28, %r10
	jne	.LBB18_36
# %bb.39:                               #   in Loop: Header=BB18_35 Depth=4
	incq	%rdx
	addq	%r12, %rcx
	addq	%r12, %rax
	cmpq	$1024, %rdx                     # imm = 0x400
	jne	.LBB18_35
# %bb.40:                               # %.preheader225.preheader
                                        #   in Loop: Header=BB18_14 Depth=3
	movq	%r13, %rax
	movq	32(%rsp), %rcx                  # 8-byte Reload
	xorl	%edx, %edx
	movq	176(%rsp), %r14                 # 8-byte Reload
	movl	$4096, %r15d                    # imm = 0x1000
.LBB18_41:                              # %.preheader225
                                        #   Parent Loop BB18_12 Depth=1
                                        #     Parent Loop BB18_13 Depth=2
                                        #       Parent Loop BB18_14 Depth=3
                                        # =>      This Loop Header: Depth=4
                                        #           Child Loop BB18_42 Depth 5
	movq	(%r14,%rdx,8), %rsi
	movq	(%rbx,%rdx,8), %rdi
	xorl	%r8d, %r8d
.LBB18_42:                              #   Parent Loop BB18_12 Depth=1
                                        #     Parent Loop BB18_13 Depth=2
                                        #       Parent Loop BB18_14 Depth=3
                                        #         Parent Loop BB18_41 Depth=4
                                        # =>        This Inner Loop Header: Depth=5
	movss	(%rsi,%r8,4), %xmm0             # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rax,%r8,4)
	movss	(%rdi,%r8,4), %xmm0             # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rcx,%r8,4)
	incq	%r8
	cmpq	$1024, %r8                      # imm = 0x400
	jne	.LBB18_42
# %bb.43:                               #   in Loop: Header=BB18_41 Depth=4
	incq	%rdx
	addq	%r15, %rcx
	addq	%r15, %rax
	cmpq	$10, %rdx
	jne	.LBB18_41
# %bb.44:                               #   in Loop: Header=BB18_14 Depth=3
	movq	96(%rsp), %rdi
	movl	$40960, %edx                    # imm = 0xA000
	movq	%r13, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	88(%rsp), %rdi
	movl	$40960, %edx                    # imm = 0xA000
	movq	32(%rsp), %rsi                  # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	movq	80(%rsp), %rdi
	movl	$40, %edx
	movq	48(%rsp), %rsi                  # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	movq	72(%rsp), %rdi
	movl	$40, %edx
	movq	152(%rsp), %rsi                 # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	movabsq	$4294968320, %rdx               # imm = 0x100000400
	leaq	-1014(%rdx), %rdi
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB18_46
# %bb.45:                               #   in Loop: Header=BB18_14 Depth=3
	movq	96(%rsp), %rdi
	movq	88(%rsp), %rsi
	movq	80(%rsp), %rdx
	movq	72(%rsp), %rcx
	movss	.LCPI18_3(%rip), %xmm0          # xmm0 = mem[0],zero,zero,zero
	callq	_Z31__device_stub__cuda_fcl2_updatePfS_S_S_f
.LBB18_46:                              #   in Loop: Header=BB18_14 Depth=3
	movq	96(%rsp), %rsi
	movl	$40960, %edx                    # imm = 0xA000
	movq	%r13, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	88(%rsp), %rsi
	movl	$40960, %edx                    # imm = 0xA000
	movq	32(%rsp), %r13                  # 8-byte Reload
	movq	%r13, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	80(%rsp), %rsi
	movl	$40, %edx
	movq	48(%rsp), %rdi                  # 8-byte Reload
	movl	$2, %ecx
	callq	hipMemcpy
	movq	72(%rsp), %rdi
	movl	$40, %edx
	movq	%rdi, %rsi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	136(%rsp), %rax                 # 8-byte Reload
	movq	%r13, %rcx
	xorl	%edx, %edx
.LBB18_47:                              # %.preheader224
                                        #   Parent Loop BB18_12 Depth=1
                                        #     Parent Loop BB18_13 Depth=2
                                        #       Parent Loop BB18_14 Depth=3
                                        # =>      This Loop Header: Depth=4
                                        #           Child Loop BB18_48 Depth 5
	movq	(%r14,%rdx,8), %rsi
	movq	(%rbx,%rdx,8), %rdi
	xorl	%r8d, %r8d
.LBB18_48:                              #   Parent Loop BB18_12 Depth=1
                                        #     Parent Loop BB18_13 Depth=2
                                        #       Parent Loop BB18_14 Depth=3
                                        #         Parent Loop BB18_47 Depth=4
                                        # =>        This Inner Loop Header: Depth=5
	movss	(%rax,%r8,4), %xmm0             # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rsi,%r8,4)
	movss	(%rcx,%r8,4), %xmm0             # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rdi,%r8,4)
	incq	%r8
	cmpq	$1024, %r8                      # imm = 0x400
	jne	.LBB18_48
# %bb.49:                               #   in Loop: Header=BB18_47 Depth=4
	incq	%rdx
	addq	%r15, %rcx
	addq	%r15, %rax
	cmpq	$10, %rdx
	jne	.LBB18_47
# %bb.50:                               #   in Loop: Header=BB18_14 Depth=3
	movq	264(%rsp), %rcx                 # 8-byte Reload
	incq	%rcx
	cmpq	$100, %rcx
	jne	.LBB18_14
# %bb.51:                               #   in Loop: Header=BB18_13 Depth=2
	movq	192(%rsp), %rbx                 # 8-byte Reload
	imull	$-858993459, %ebx, %eax         # imm = 0xCCCCCCCD
	cmpl	$858993460, %eax                # imm = 0x33333334
	jae	.LBB18_53
# %bb.52:                               #   in Loop: Header=BB18_13 Depth=2
	callq	clock
	subq	184(%rsp), %rax                 # 8-byte Folded Reload
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	divsd	.LCPI18_4(%rip), %xmm0
	cvtsd2ss	%xmm0, %xmm2
	movss	12(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	movss	8(%rsp), %xmm1                  # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	addss	%xmm1, %xmm0
	divss	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtss2sd	%xmm1, %xmm0
	xorps	%xmm1, %xmm1
	cvtss2sd	%xmm2, %xmm1
	divss	.LCPI18_5(%rip), %xmm2
	cvtss2sd	%xmm2, %xmm2
	movl	$.L.str.1, %edi
	movq	24(%rsp), %rsi                  # 8-byte Reload
                                        # kill: def $esi killed $esi killed $rsi
	movl	%ebx, %edx
	movb	$3, %al
	callq	printf
.LBB18_53:                              #   in Loop: Header=BB18_13 Depth=2
	incq	%rbx
	cmpq	$100, %rbx
	jne	.LBB18_13
# %bb.54:                               #   in Loop: Header=BB18_12 Depth=1
	movq	24(%rsp), %rax                  # 8-byte Reload
	incl	%eax
	movq	%rax, 24(%rsp)                  # 8-byte Spill
	cmpl	$100, %eax
	jne	.LBB18_12
# %bb.55:
	movl	$.Lstr, %edi
	jmp	.LBB18_2
.LBB18_1:
	movl	$.Lstr.1, %edi
.LBB18_2:
	callq	puts@PLT
	xorl	%eax, %eax
	addq	$360, %rsp                      # imm = 0x168
	.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
.LBB18_63:
	.cfi_def_cfa_offset 416
.Ltmp47:
	movq	%rax, %rbx
	leaq	312(%rsp), %rax
	jmp	.LBB18_60
.LBB18_62:
.Ltmp44:
	jmp	.LBB18_57
.LBB18_59:
.Ltmp41:
	movq	%rax, %rbx
	leaq	344(%rsp), %rax
.LBB18_60:
	movq	-16(%rax), %rdi
	cmpq	%rax, %rdi
	je	.LBB18_58
# %bb.61:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i206
	callq	_ZdlPv
	jmp	.LBB18_58
.LBB18_56:
.Ltmp38:
.LBB18_57:
	movq	%rax, %rbx
.LBB18_58:
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end18:
	.size	main, .Lfunc_end18-main
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table18:
.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 .Ltmp36-.Lfunc_begin2          # >> Call Site 1 <<
	.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 2 <<
	.uleb128 .Ltmp40-.Ltmp39                #   Call between .Ltmp39 and .Ltmp40
	.uleb128 .Ltmp41-.Lfunc_begin2          #     jumps to .Ltmp41
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp42-.Lfunc_begin2          # >> Call Site 3 <<
	.uleb128 .Ltmp43-.Ltmp42                #   Call between .Ltmp42 and .Ltmp43
	.uleb128 .Ltmp44-.Lfunc_begin2          #     jumps to .Ltmp44
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp45-.Lfunc_begin2          # >> Call Site 4 <<
	.uleb128 .Ltmp46-.Ltmp45                #   Call between .Ltmp45 and .Ltmp46
	.uleb128 .Ltmp47-.Lfunc_begin2          #     jumps to .Ltmp47
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp46-.Lfunc_begin2          # >> Call Site 5 <<
	.uleb128 .Lfunc_end18-.Ltmp46           #   Call between .Ltmp46 and .Lfunc_end18
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end2:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_,"axG",@progbits,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_,comdat
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_ # -- Begin function _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.p2align	1, 0x90
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_,@function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_: # @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.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
	leaq	16(%rdi), %rax
	movq	%rax, (%rdi)
	testq	%rsi, %rsi
	je	.LBB19_1
# %bb.2:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	strlen
	leaq	(%rax,%rbx), %rdx
	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	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag # TAILCALL
.LBB19_1:
	.cfi_def_cfa_offset 32
	movl	$.L.str.3, %edi
	callq	_ZSt19__throw_logic_errorPKc
.Lfunc_end19:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_, .Lfunc_end19-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag,"axG",@progbits,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag,comdat
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag # -- Begin function _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.p2align	1, 0x90
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag,@function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag: # @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	subq	%rsi, %r14
	movq	%r14, (%rsp)
	cmpq	$15, %r14
	jbe	.LBB20_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	.LBB20_3
.LBB20_1:                               # %._crit_edge
	movq	(%rbx), %rax
.LBB20_3:
	testq	%r14, %r14
	je	.LBB20_7
# %bb.4:
	cmpq	$1, %r14
	jne	.LBB20_6
# %bb.5:
	movb	(%r15), %cl
	movb	%cl, (%rax)
	jmp	.LBB20_7
.LBB20_6:
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	memcpy@PLT
.LBB20_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_end20:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag, .Lfunc_end20-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _ZNSt19normal_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_RKNS0_10param_typeE
.LCPI21_0:
	.long	0xbf800000                      # float -1
.LCPI21_1:
	.long	0x3f800000                      # float 1
.LCPI21_2:
	.long	0xc0000000                      # float -2
.LCPI21_3:
	.long	0x00000000                      # float 0
	.section	.text._ZNSt19normal_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_RKNS0_10param_typeE,"axG",@progbits,_ZNSt19normal_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_RKNS0_10param_typeE,comdat
	.weak	_ZNSt19normal_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_RKNS0_10param_typeE
	.p2align	1, 0x90
	.type	_ZNSt19normal_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_RKNS0_10param_typeE,@function
_ZNSt19normal_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_RKNS0_10param_typeE: # @_ZNSt19normal_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_RKNS0_10param_typeE
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdx, %rbx
	movq	%rdi, %r14
	cmpb	$0, 12(%rdi)
	je	.LBB21_1
# %bb.9:
	movb	$0, 12(%r14)
	movss	8(%r14), %xmm1                  # xmm1 = mem[0],zero,zero,zero
	jmp	.LBB21_8
.LBB21_1:
	movq	%rsi, %r15
.LBB21_2:                               # %.preheader
                                        # =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_ZSt18generate_canonicalIfLm24ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_
	movaps	%xmm0, %xmm1
	addss	%xmm0, %xmm1
	movss	.LCPI21_0(%rip), %xmm0          # xmm0 = mem[0],zero,zero,zero
	addss	%xmm0, %xmm1
	movss	%xmm1, 4(%rsp)                  # 4-byte Spill
	movq	%r15, %rdi
	callq	_ZSt18generate_canonicalIfLm24ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_
	addss	%xmm0, %xmm0
	addss	.LCPI21_0(%rip), %xmm0
	movss	4(%rsp), %xmm1                  # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm1
	movaps	%xmm0, %xmm2
	mulss	%xmm0, %xmm2
	addss	%xmm1, %xmm2
	ucomiss	.LCPI21_1(%rip), %xmm2
	ja	.LBB21_2
# %bb.3:                                # %.preheader
                                        #   in Loop: Header=BB21_2 Depth=1
	ucomiss	.LCPI21_3(%rip), %xmm2
	jne	.LBB21_4
	jnp	.LBB21_2
.LBB21_4:
	movss	%xmm0, 12(%rsp)                 # 4-byte Spill
	movaps	%xmm2, %xmm0
	movss	%xmm2, 8(%rsp)                  # 4-byte Spill
	callq	logf
	mulss	.LCPI21_2(%rip), %xmm0
	divss	8(%rsp), %xmm0                  # 4-byte Folded Reload
	xorps	%xmm1, %xmm1
	ucomiss	%xmm1, %xmm0
	jb	.LBB21_6
# %bb.5:
	sqrtss	%xmm0, %xmm0
	jmp	.LBB21_7
.LBB21_6:                               # %call.sqrt
	callq	sqrtf
.LBB21_7:                               # %.split
	movss	4(%rsp), %xmm1                  # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	movss	%xmm1, 8(%r14)
	movb	$1, 12(%r14)
	movss	12(%rsp), %xmm1                 # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
.LBB21_8:
	mulss	4(%rbx), %xmm1
	addss	(%rbx), %xmm1
	movaps	%xmm1, %xmm0
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end21:
	.size	_ZNSt19normal_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_RKNS0_10param_typeE, .Lfunc_end21-_ZNSt19normal_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_RKNS0_10param_typeE
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _ZSt18generate_canonicalIfLm24ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_
.LCPI22_0:
	.quad	0x41dfffffff800000              # double 2147483646
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0
.LCPI22_1:
	.long	0x40000000                      # float 2
.LCPI22_2:
	.long	0x5f000000                      # float 9.22337203E+18
.LCPI22_3:
	.long	0x3f800000                      # float 1
	.section	.text._ZSt18generate_canonicalIfLm24ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_,"axG",@progbits,_ZSt18generate_canonicalIfLm24ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_,comdat
	.weak	_ZSt18generate_canonicalIfLm24ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_
	.type	_ZSt18generate_canonicalIfLm24ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_,@function
_ZSt18generate_canonicalIfLm24ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_: # @_ZSt18generate_canonicalIfLm24ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$64, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -16
	movq	%rdi, %rbx
	fldl	.LCPI22_0(%rip)
	fstpt	(%rsp)
	callq	logl
	fstpt	52(%rsp)                        # 10-byte Folded Spill
	flds	.LCPI22_1(%rip)
	fstpt	(%rsp)
	callq	logl
	fldt	52(%rsp)                        # 10-byte Folded Reload
	fdivp	%st, %st(1)
	flds	.LCPI22_2(%rip)
	xorl	%ecx, %ecx
	fxch	%st(1)
	fucomi	%st(1), %st
	fldz
	fcmovnb	%st(2), %st
	fstp	%st(2)
	fsubp	%st, %st(1)
	setae	%cl
	fnstcw	28(%rsp)
	movzwl	28(%rsp), %eax
	orl	$3072, %eax                     # imm = 0xC00
	movw	%ax, 30(%rsp)
	fldcw	30(%rsp)
	fistpll	40(%rsp)
	fldcw	28(%rsp)
	shlq	$63, %rcx
	xorq	40(%rsp), %rcx
	leaq	23(%rcx), %rax
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %rcx
	cmpq	$1, %rax
	adcq	$0, %rcx
	movq	(%rbx), %rsi
	xorps	%xmm0, %xmm0
	movss	.LCPI22_3(%rip), %xmm1          # xmm1 = mem[0],zero,zero,zero
	movabsq	$8589934597, %rdi               # imm = 0x200000005
.LBB22_1:                               # %select.unfold
                                        # =>This Inner Loop Header: Depth=1
	imulq	$16807, %rsi, %rsi              # imm = 0x41A7
	movq	%rsi, %rax
	mulq	%rdi
	movq	%rsi, %rax
	subq	%rdx, %rax
	shrq	%rax
	addq	%rdx, %rax
	shrq	$30, %rax
	movq	%rax, %rdx
	shlq	$31, %rdx
	subq	%rdx, %rax
	leaq	(%rsi,%rax), %rdx
	decq	%rdx
	testq	%rdx, %rdx
	js	.LBB22_2
# %bb.3:                                # %select.unfold
                                        #   in Loop: Header=BB22_1 Depth=1
	xorps	%xmm2, %xmm2
	cvtsi2ss	%rdx, %xmm2
	jmp	.LBB22_4
.LBB22_2:                               #   in Loop: Header=BB22_1 Depth=1
	movq	%rdx, %r8
	shrq	%r8
	andl	$1, %edx
	orq	%r8, %rdx
	xorps	%xmm2, %xmm2
	cvtsi2ss	%rdx, %xmm2
	addss	%xmm2, %xmm2
.LBB22_4:                               # %select.unfold
                                        #   in Loop: Header=BB22_1 Depth=1
	addq	%rax, %rsi
	mulss	%xmm1, %xmm2
	movss	%xmm1, 36(%rsp)
	flds	36(%rsp)
	fmull	.LCPI22_0(%rip)
	addss	%xmm2, %xmm0
	fstps	32(%rsp)
	movss	32(%rsp), %xmm1                 # xmm1 = mem[0],zero,zero,zero
	decq	%rcx
	jne	.LBB22_1
# %bb.5:
	movq	%rsi, (%rbx)
	divss	%xmm1, %xmm0
	ucomiss	.LCPI22_3(%rip), %xmm0
	jae	.LBB22_7
# %bb.6:
	addq	$64, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.LBB22_7:
	.cfi_def_cfa_offset 80
	movss	.LCPI22_3(%rip), %xmm0          # xmm0 = mem[0],zero,zero,zero
	xorps	%xmm1, %xmm1
	addq	$64, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	nextafterf                      # TAILCALL
.Lfunc_end22:
	.size	_ZSt18generate_canonicalIfLm24ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_, .Lfunc_end22-_ZSt18generate_canonicalIfLm24ESt26linear_congruential_engineImLm16807ELm0ELm2147483647EEET_RT1_
	.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:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -16
	movq	__hip_gpubin_handle(%rip), %rbx
	testq	%rbx, %rbx
	jne	.LBB23_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB23_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z16cuda_fcl1_updatePfS_S_S_f, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z16cuda_fcl2_updatePfS_S_S_f, %esi
	movl	$.L__unnamed_2, %edx
	movl	$.L__unnamed_2, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end23:
	.size	__hip_module_ctor, .Lfunc_end23-__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	.LBB24_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
.LBB24_2:
	retq
.Lfunc_end24:
	.size	__hip_module_dtor, .Lfunc_end24-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z16cuda_fcl1_updatePfS_S_S_f,@object # @_Z16cuda_fcl1_updatePfS_S_S_f
	.section	.rodata,"a",@progbits
	.globl	_Z16cuda_fcl1_updatePfS_S_S_f
	.p2align	3, 0x0
_Z16cuda_fcl1_updatePfS_S_S_f:
	.quad	_Z31__device_stub__cuda_fcl1_updatePfS_S_S_f
	.size	_Z16cuda_fcl1_updatePfS_S_S_f, 8

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

	.type	.L.str.1,@object                # @.str.1
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.1:
	.asciz	"Epoch: %d, Round: %d, Accuracy: %f, Time: %f sec (%f min)\n"
	.size	.L.str.1, 59

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"basic_string: construction from null is not valid"
	.size	.L.str.3, 50

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z16cuda_fcl1_updatePfS_S_S_f"
	.size	.L__unnamed_1, 30

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z16cuda_fcl2_updatePfS_S_S_f"
	.size	.L__unnamed_2, 30

	.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

	.type	.Lstr,@object                   # @str
	.section	.rodata.str1.1,"aMS",@progbits,1
.Lstr:
	.asciz	"Got through with no issues."
	.size	.Lstr, 28

	.type	.Lstr.1,@object                 # @str.1
.Lstr.1:
	.asciz	"USAGE: ./prog3 <image file> <label file>"
	.size	.Lstr.1, 41

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym _Z31__device_stub__cuda_fcl1_updatePfS_S_S_f
	.addrsig_sym _Z31__device_stub__cuda_fcl2_updatePfS_S_S_f
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Unwind_Resume
	.addrsig_sym _Z16cuda_fcl1_updatePfS_S_S_f
	.addrsig_sym _Z16cuda_fcl2_updatePfS_S_S_f
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z16cuda_fcl1_updatePfS_S_S_f ; -- Begin function _Z16cuda_fcl1_updatePfS_S_S_f
	.globl	_Z16cuda_fcl1_updatePfS_S_S_f
	.p2align	8
	.type	_Z16cuda_fcl1_updatePfS_S_S_f,@function
_Z16cuda_fcl1_updatePfS_S_S_f:          ; @_Z16cuda_fcl1_updatePfS_S_S_f
; %bb.0:
	s_load_b32 s2, s[0:1], 0x34
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s2, v[0:1]
	s_mov_b32 s2, exec_lo
	v_cmpx_gt_i32_e32 0xc4001, v1
	s_cbranch_execz .LBB0_3
; %bb.1:
	s_load_b256 s[4:11], s[0:1], 0x0
	v_ashrrev_i32_e32 v2, 31, v1
	v_mul_hi_i32 v0, 0x5397829d, v1
	s_load_b32 s0, s[0:1], 0x20
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[2:3], 2, v[1:2]
	v_lshrrev_b32_e32 v8, 31, v0
	v_ashrrev_i32_e32 v0, 8, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_4)
	v_add_nc_u32_e32 v0, v0, v8
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v4, vcc_lo, s6, v2
	v_add_co_ci_u32_e32 v5, vcc_lo, s7, v3, vcc_lo
	v_add_co_u32 v6, vcc_lo, s4, v2
	v_add_co_ci_u32_e32 v7, vcc_lo, s5, v3, vcc_lo
	v_mul_i32_i24_e32 v8, 0x310, v0
	global_load_b32 v2, v[4:5], off
	global_load_b32 v3, v[6:7], off
	v_sub_nc_u32_e32 v1, v1, v8
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_eq_u32_e32 vcc_lo, 0, v1
	s_waitcnt vmcnt(0)
	v_fma_f32 v3, -v2, s0, v3
	v_mov_b32_e32 v2, 0
	global_store_b32 v[6:7], v3, off
	global_store_b32 v[4:5], v2, off
	s_and_b32 exec_lo, exec_lo, vcc_lo
	s_cbranch_execz .LBB0_3
; %bb.2:
	v_ashrrev_i32_e32 v1, 31, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[0:1], 2, v[0:1]
	v_add_co_u32 v3, vcc_lo, s10, v0
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v4, vcc_lo, s11, v1, vcc_lo
	v_add_co_u32 v0, vcc_lo, s8, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s9, v1, vcc_lo
	global_load_b32 v5, v[3:4], off
	global_load_b32 v6, v[0:1], off
	s_waitcnt vmcnt(0)
	v_fma_f32 v5, -v5, s0, v6
	global_store_b32 v[0:1], v5, off
	global_store_b32 v[3:4], v2, off
.LBB0_3:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z16cuda_fcl1_updatePfS_S_S_f
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 296
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 9
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z16cuda_fcl1_updatePfS_S_S_f, .Lfunc_end0-_Z16cuda_fcl1_updatePfS_S_S_f
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 312
; NumSgprs: 18
; NumVgprs: 9
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 9
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z16cuda_fcl2_updatePfS_S_S_f ; -- Begin function _Z16cuda_fcl2_updatePfS_S_S_f
	.globl	_Z16cuda_fcl2_updatePfS_S_S_f
	.p2align	8
	.type	_Z16cuda_fcl2_updatePfS_S_S_f,@function
_Z16cuda_fcl2_updatePfS_S_S_f:          ; @_Z16cuda_fcl2_updatePfS_S_S_f
; %bb.0:
	s_load_b32 s2, s[0:1], 0x34
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s2, v[0:1]
	s_mov_b32 s2, exec_lo
	v_cmpx_gt_i32_e32 0x2801, v1
	s_cbranch_execz .LBB1_3
; %bb.1:
	s_load_b256 s[4:11], s[0:1], 0x0
	v_ashrrev_i32_e32 v2, 31, v1
	s_load_b32 s0, s[0:1], 0x20
	v_and_b32_e32 v7, 0x3ff, v1
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[2:3], 2, v[1:2]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v4, vcc_lo, s6, v2
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v5, vcc_lo, s7, v3, vcc_lo
	v_add_co_u32 v2, vcc_lo, s4, v2
	v_add_co_ci_u32_e32 v3, vcc_lo, s5, v3, vcc_lo
	global_load_b32 v0, v[4:5], off
	global_load_b32 v6, v[2:3], off
	s_waitcnt vmcnt(0)
	v_fma_f32 v6, -v0, s0, v6
	v_mov_b32_e32 v0, 0
	v_cmp_eq_u32_e32 vcc_lo, 0, v7
	global_store_b32 v[2:3], v6, off
	global_store_b32 v[4:5], v0, off
	s_and_b32 exec_lo, exec_lo, vcc_lo
	s_cbranch_execz .LBB1_3
; %bb.2:
	v_ashrrev_i32_e32 v1, 10, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v2, 31, v1
	v_lshlrev_b64 v[1:2], 2, v[1:2]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v3, vcc_lo, s10, v1
	v_add_co_ci_u32_e32 v4, vcc_lo, s11, v2, vcc_lo
	v_add_co_u32 v1, vcc_lo, s8, v1
	v_add_co_ci_u32_e32 v2, vcc_lo, s9, v2, vcc_lo
	global_load_b32 v5, v[3:4], off
	global_load_b32 v6, v[1:2], off
	s_waitcnt vmcnt(0)
	v_fma_f32 v5, -v5, s0, v6
	global_store_b32 v[1:2], v5, off
	global_store_b32 v[3:4], v0, off
.LBB1_3:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z16cuda_fcl2_updatePfS_S_S_f
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 296
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 8
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end1:
	.size	_Z16cuda_fcl2_updatePfS_S_S_f, .Lfunc_end1-_Z16cuda_fcl2_updatePfS_S_S_f
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 284
; NumSgprs: 18
; NumVgprs: 8
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 8
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.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
      - .offset:         32
        .size:           4
        .value_kind:     by_value
      - .offset:         40
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         44
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         48
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         52
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         54
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         56
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         58
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         60
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         62
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         96
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         104
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 296
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z16cuda_fcl1_updatePfS_S_S_f
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z16cuda_fcl1_updatePfS_S_S_f.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     9
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
      - .offset:         32
        .size:           4
        .value_kind:     by_value
      - .offset:         40
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         44
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         48
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         52
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         54
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         56
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         58
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         60
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         62
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         96
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         104
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 296
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z16cuda_fcl2_updatePfS_S_S_f
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z16cuda_fcl2_updatePfS_S_S_f.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
