// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/loadmodel.c
// Function: load_model_mlpgeneric
void* load_model_mlpgeneric(FILE* infile, Datasetptr d)
{
 /*!Last Changed 25.12.2005*/
	int i;
 Mlpnetworkptr m;
	m = safemalloc(sizeof(Mlpnetwork), "load_model_mlpgeneric", 3);
	fscanf(infile, "%d %d %d", &(m->P.dimnum), &(m->P.classnum), &(m->P.layernum));
	for (i = 0; i < m->P.layernum; i++)
		 fscanf(infile, "%d", &(m->P.hidden[i]));
	m->weights = safemalloc((m->P.layernum + 1) * sizeof(matrix), "load_model_mlpgeneric", 7);
	for (i = 0; i < m->P.layernum; i++)
			if (i == 0)
	 			m->weights[i] = load_matrix(infile, m->P.hidden[i], m->P.dimnum + 1);
			else
			 	m->weights[i] = load_matrix(infile, m->P.hidden[i], m->P.hidden[i-1] + 1);
	if (m->P.layernum == 0)
			m->weights[m->P.layernum] = load_matrix(infile, m->P.classnum, m->P.dimnum + 1);
	else
			m->weights[m->P.layernum] = load_matrix(infile, m->P.classnum, m->P.hidden[m->P.layernum - 1] + 1);	
	return m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x98, %edi
leaq 0x90c39(%rip), %rsi     # 0xe6888
movl $0x3, %edx
callq 0x52d70
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
addq $0x8, %rdx
addq $0x4, %rdx
movq -0x20(%rbp), %rcx
addq $0x8, %rcx
movq -0x20(%rbp), %r8
addq $0x8, %r8
addq $0x54, %r8
leaq 0x8f803(%rip), %rsi     # 0xe548b
movb $0x0, %al
callq 0x4070
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x5c(%rcx), %eax
jge 0x55cd6
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
addq $0x8, %rdx
addq $0x48, %rdx
movslq -0x14(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdx
leaq 0x975a1(%rip), %rsi     # 0xed265
movb $0x0, %al
callq 0x4070
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x55c96
movq -0x20(%rbp), %rax
movl 0x5c(%rax), %eax
addl $0x1, %eax
movslq %eax, %rdi
shlq $0x4, %rdi
leaq 0x90b9a(%rip), %rsi     # 0xe6888
movl $0x7, %edx
callq 0x52d70
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x5c(%rcx), %eax
jge 0x55de1
cmpl $0x0, -0x14(%rbp)
jne 0x55d74
movq -0x20(%rbp), %rax
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl 0x50(%rax,%rcx,4), %esi
movq -0x20(%rbp), %rax
movl 0xc(%rax), %edx
addl $0x1, %edx
callq 0x54cc0
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, -0x30(%rbp)
movq %rdx, -0x28(%rbp)
movq -0x30(%rbp), %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x55dd1
movq -0x20(%rbp), %rax
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl 0x50(%rax,%rcx,4), %esi
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl 0x50(%rax,%rcx,4), %edx
addl $0x1, %edx
callq 0x54cc0
movq %rax, %rcx
movq -0x70(%rbp), %rax
movq %rcx, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x40(%rbp), %rcx
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x55dd3
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x55d09
movq -0x20(%rbp), %rax
cmpl $0x0, 0x5c(%rax)
jne 0x55e3f
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movslq 0x5c(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl 0x8(%rax), %esi
movq -0x20(%rbp), %rax
movl 0xc(%rax), %edx
addl $0x1, %edx
callq 0x54cc0
movq %rax, %rcx
movq -0x78(%rbp), %rax
movq %rcx, -0x50(%rbp)
movq %rdx, -0x48(%rbp)
movq -0x50(%rbp), %rcx
movq %rcx, (%rax)
movq -0x48(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x55e9f
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movslq 0x5c(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl 0x8(%rax), %esi
movq -0x20(%rbp), %rax
movq -0x20(%rbp), %rcx
movl 0x5c(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl 0x50(%rax,%rcx,4), %edx
addl $0x1, %edx
callq 0x54cc0
movq %rax, %rcx
movq -0x80(%rbp), %rax
movq %rcx, -0x60(%rbp)
movq %rdx, -0x58(%rbp)
movq -0x60(%rbp), %rcx
movq %rcx, (%rax)
movq -0x58(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)