// File: /workspace/github_c_makefile_star2_O0/xtanitfy[P]Murphy/src/functions.c
// Function: weightInit
int weightInit(BLOB_s *k)
{
	double arr[][5]= {
		{0.1667,0.0971,0.0427,-0.0349,-0.1637},
        { -0.0996,-0.0161,0.1081,0.1613,-0.0545},
        {0.0396,-0.1783,0.1562,0.1544,0.1160},
        {-0.0052,0.1190,0.0882,-0.0332,-0.1815},
        {0.1449,-0.0205,-0.1199,0.1458,-0.1337}
	};

	BLOB_DATA_PTR(k,ptr);

	int outputNum = k->numSize;
	int inputNum = k->channelSize;
	int sectionY = k->heightSize;
	int sectionX = k->widthSize;
	
	/*��ʱ��������*/
	CHECK_EXPR_RET(sectionY != 5,-1);
	CHECK_EXPR_RET(sectionX != 5,-1);
	
	for (int oy = 0;oy < outputNum;oy++) {	
		for (int ix = 0;ix < inputNum;ix++) {
			for (int y = 0;y < sectionY;y++) {	
				for (int x = 0;x  < sectionX;x++) {
					ptr[oy][ix][y][x] = arr[y][x];
				}
			}
		}
	}
	

	//printf("weightInit OK!\n");
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x10(%rbp)
leaq -0xe0(%rbp), %rdi
leaq 0x8233(%rip), %rsi      # 0xb2f0
movl $0xc8, %edx
callq 0x1090
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x120(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x118(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x110(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xe8(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl %eax, -0xec(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, -0xf0(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl %eax, -0xf4(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movl %eax, -0xf8(%rbp)
cmpl $0x5, -0xf4(%rbp)
je 0x3171
leaq 0x7eca(%rip), %rdi      # 0xb015
leaq 0x8266(%rip), %rsi      # 0xb3b8
leaq 0x826b(%rip), %rdx      # 0xb3c4
movl $0x28, %ecx
movb $0x0, %al
callq 0x1030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x32ff
cmpl $0x5, -0xf8(%rbp)
je 0x31a7
leaq 0x7e94(%rip), %rdi      # 0xb015
leaq 0x8230(%rip), %rsi      # 0xb3b8
leaq 0x8235(%rip), %rdx      # 0xb3c4
movl $0x29, %ecx
movb $0x0, %al
callq 0x1030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x32ff
movl $0x0, -0xfc(%rbp)
movl -0xfc(%rbp), %eax
cmpl -0xec(%rbp), %eax
jge 0x32f8
movl $0x0, -0x100(%rbp)
movl -0x100(%rbp), %eax
cmpl -0xf0(%rbp), %eax
jge 0x32e2
movl $0x0, -0x104(%rbp)
movl -0x104(%rbp), %eax
cmpl -0xf4(%rbp), %eax
jge 0x32cc
movl $0x0, -0x108(%rbp)
movl -0x108(%rbp), %eax
cmpl -0xf8(%rbp), %eax
jge 0x32b6
movq -0x110(%rbp), %rdx
movq -0x118(%rbp), %rsi
movq -0x120(%rbp), %rdi
movslq -0x104(%rbp), %rcx
leaq -0xe0(%rbp), %rax
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movslq -0x108(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0xe8(%rbp), %rax
movslq -0xfc(%rbp), %rcx
imulq %rsi, %rdi
imulq %rdx, %rdi
imulq %rdi, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq -0x100(%rbp), %rcx
imulq %rdx, %rsi
imulq %rsi, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq -0x104(%rbp), %rcx
imulq %rdx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq -0x108(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x108(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x108(%rbp)
jmp 0x3205
jmp 0x32b8
movl -0x104(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x104(%rbp)
jmp 0x31e9
jmp 0x32ce
movl -0x100(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x100(%rbp)
jmp 0x31cd
jmp 0x32e4
movl -0xfc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xfc(%rbp)
jmp 0x31b1
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopl (%rax,%rax)