// File: /workspace/github_c_makefile_star2_O2/xtanitfy[P]Murphy/examples/mnist/mnist_read_input.c
// Function: Mnist_GetInitFw
int Mnist_GetInitFw(BLOB_s *pBLOB)
{
#define INIT_FW_BIN_FILE  "data/mnist/ffw_10_192_1.bin"

	SIZE_s size;
	getSizeFromFilename(INIT_FW_BIN_FILE,&size);
	//readMatFromFile
	int allSize = size.w*size.h*size.n;
#if 0
	printf("pBLOB->num :%ld\n",pBLOB->num);
	printf("pBLOB->height:%ld\n",pBLOB->height);
	printf("pBLOB->width:%ld\n",pBLOB->width);
	printf("size.h:%d\n", size.h);
	printf("size.w:%d\n", size.w);
#endif
	CHECK_EXPR_RET(pBLOB->numSize!= size.h,-1);
	CHECK_EXPR_RET(pBLOB->channelSize!= size.w,-1);
	
	double *data = (double *)malloc(sizeof(double)*allSize);
	readMatFromFile(INIT_FW_BIN_FILE,data,allSize);
	
	BLOB_s *pBlobData;
	BLOB_create(&pBlobData,size.h,size.w,1,1,FALSE);
	BLOB_shapeByPtr(pBlobData,data,allSize);
	
	BLOB_DATA_PTR(pBLOB,ptr);
	BLOB_DATA_PTR(pBlobData,ptr1);
	
	for (int i_out = 0;i_out < pBLOB->numSize;i_out++) {	
		for (int i_in = 0;i_in < pBLOB->channelSize;i_in++) {
			for (int i_height = 0;i_height < pBLOB->heightSize;i_height++) {
				for (int i_width = 0;i_width < pBLOB->widthSize;i_width++) {	
					ptr[i_out][i_in][i_height][i_width] = 
							ptr1[i_out][i_in][i_height][i_width];
				}
			}
		}
	}
	
	

	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x567b(%rip), %rdi      # 0x71c0
leaq 0x30(%rsp), %r14
movq %r14, %rsi
callq 0x1a3d
movslq (%r14), %rax
movq 0x10(%rbx), %r14
cmpq %rax, %r14
jne 0x1cb0
movslq 0x34(%rsp), %rcx
movq 0x18(%rbx), %r12
cmpq %rcx, %r12
jne 0x1cc9
imulq %rcx, %rax
movslq 0x38(%rsp), %r15
imulq %rax, %r15
movq %r15, %rdi
shlq $0x3, %rdi
callq 0x10e0
movq %rax, %r13
leaq 0x5629(%rip), %rdi      # 0x71c0
movq %rax, %rsi
movl %r15d, %edx
callq 0x1acc
leaq 0x40(%rsp), %rbp
pushq $0x1
popq %rcx
movq %rbp, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rcx, %r8
xorl %r9d, %r9d
callq 0x1d38
movq (%rbp), %rdi
movq %r13, %rsi
movl %r15d, %edx
callq 0x2135
movq 0x18(%rbx), %rax
movq 0x20(%rbx), %rcx
movq 0x28(%rbx), %rdx
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
movq %rsi, 0x18(%rsp)
movq (%rbp), %rsi
movq 0x8(%rsi), %r14
movq 0x28(%rsi), %r9
movq 0x20(%rsi), %r10
imulq %r9, %r10
movq 0x18(%rsi), %r8
xorl %esi, %esi
imulq %r10, %r8
shlq $0x3, %r8
movq %r8, 0x10(%rsp)
shlq $0x3, %r10
shlq $0x3, %r9
movq %rdx, %rbx
imulq %rcx, %rbx
movq %rbx, %r8
imulq %rax, %r8
shlq $0x3, %r8
movq %r8, 0x8(%rsp)
shlq $0x3, %rbx
leaq (,%rdx,8), %r15
cmpq 0x18(%rsp), %rsi
je 0x1ced
movq %rsi, 0x28(%rsp)
movq %rdi, 0x20(%rsp)
movq %rdi, %rsi
movq %r14, %r8
xorl %edi, %edi
cmpq %rax, %rdi
je 0x1c97
movq %rsi, %r12
movq %r8, %r13
xorl %ebp, %ebp
cmpq %rcx, %rbp
je 0x1c8c
xorl %r11d, %r11d
cmpq %r11, %rdx
je 0x1c81
movsd (%r13,%r11,8), %xmm0
movsd %xmm0, (%r12,%r11,8)
incq %r11
jmp 0x1c6a
incq %rbp
addq %r9, %r13
addq %r15, %r12
jmp 0x1c62
incq %rdi
addq %r10, %r8
addq %rbx, %rsi
jmp 0x1c55
movq 0x28(%rsp), %rsi
incq %rsi
addq 0x10(%rsp), %r14
movq 0x20(%rsp), %rdi
addq 0x8(%rsp), %rdi
jmp 0x1c38
leaq 0x538e(%rip), %rdi      # 0x7045
leaq 0x54e1(%rip), %rsi      # 0x719f
leaq 0x5517(%rip), %rdx      # 0x71dc
pushq $0x4e
jmp 0x1ce0
leaq 0x5375(%rip), %rdi      # 0x7045
leaq 0x54c8(%rip), %rsi      # 0x719f
leaq 0x54fe(%rip), %rdx      # 0x71dc
pushq $0x4f
popq %rcx
xorl %eax, %eax
callq 0x1030
pushq $-0x1
popq %rax
jmp 0x1cef
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq