// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x9252(%rip), %rdi      # 0xb198
leaq -0x20(%rbp), %rsi
callq 0x1d90
movl -0x1c(%rbp), %eax
imull -0x20(%rbp), %eax
imull -0x18(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x20(%rbp), %rcx
cmpq %rcx, %rax
je 0x1f9b
leaq 0x90a0(%rip), %rdi      # 0xb015
leaq 0x91fb(%rip), %rsi      # 0xb177
leaq 0x9231(%rip), %rdx      # 0xb1b4
movl $0x4e, %ecx
movb $0x0, %al
callq 0x1030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x21dd
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x1c(%rbp), %rcx
cmpq %rcx, %rax
je 0x1fd9
leaq 0x9062(%rip), %rdi      # 0xb015
leaq 0x91bd(%rip), %rsi      # 0xb177
leaq 0x91f3(%rip), %rdx      # 0xb1b4
movl $0x4f, %ecx
movb $0x0, %al
callq 0x1030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x21dd
movslq -0x24(%rbp), %rdi
shlq $0x3, %rdi
callq 0x10e0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
movl -0x24(%rbp), %edx
leaq 0x91a0(%rip), %rdi      # 0xb198
callq 0x1e90
movslq -0x20(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
leaq -0x38(%rbp), %rdi
movl $0x1, %r8d
xorl %r9d, %r9d
movq %r8, %rcx
callq 0x2280
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x29d0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movslq -0x4c(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x21d6
movl $0x0, -0x50(%rbp)
movslq -0x50(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x21c6
movl $0x0, -0x54(%rbp)
movslq -0x54(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jae 0x21b6
movl $0x0, -0x58(%rbp)
movslq -0x58(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x28(%rcx), %rax
jae 0x21a6
movq -0x78(%rbp), %rdx
movq -0x80(%rbp), %rsi
movq -0x88(%rbp), %rdi
movq -0x60(%rbp), %r8
movq -0x68(%rbp), %r9
movq -0x70(%rbp), %r10
movq -0x48(%rbp), %rax
movslq -0x4c(%rbp), %rcx
imulq %r9, %r10
imulq %r8, %r10
imulq %r10, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq -0x50(%rbp), %rcx
imulq %r8, %r9
imulq %r9, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq -0x54(%rbp), %rcx
imulq %r8, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq -0x58(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x40(%rbp), %rax
movslq -0x4c(%rbp), %rcx
imulq %rsi, %rdi
imulq %rdx, %rdi
imulq %rdi, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq -0x50(%rbp), %rcx
imulq %rdx, %rsi
imulq %rsi, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq -0x54(%rbp), %rcx
imulq %rdx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq -0x58(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x20df
jmp 0x21a8
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x20c6
jmp 0x21b8
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x20ad
jmp 0x21c8
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x2094
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)