// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mlp.c
// Function: prepare_Mlpparameters
Mlpparameters prepare_Mlpparameters(Instanceptr data, Instanceptr validation, int weightdecay, double decayalpha, int layernum, int* hiddennodes, int windowsize, double errorthreshold, double errordropratio, int maxhidden, SUPERVISED_ALGORITHM_TYPE algorithm_type)
{
 /*!Last Changed 16.04.2007 added dnc parameter preparation*/
	/*!Last Changed 25.06.2005*/
	int i;
	Mlpparameters mlpparams;
	mlpparams.alpha = get_parameter_f("alpha");
 switch (algorithm_type)
  {
   case CLASSIFICATION:mlpparams.classnum = current_dataset->classno;
                       break;
   case    AUTOENCODER:mlpparams.classnum = current_dataset->multifeaturecount - 1;
                       break;
   case     REGRESSION:mlpparams.classnum = 1;
                       break;
               default:mlpparams.classnum = 1;
                       break;
  }
	mlpparams.dimnum = current_dataset->multifeaturecount - 1;
	mlpparams.epochs = get_parameter_i("perceptronrun");
	mlpparams.eta = get_parameter_f("learning_rate");
	mlpparams.etadecrease = get_parameter_f("etadecrease");
	mlpparams.weightdecay = weightdecay;
	mlpparams.decayalpha = decayalpha;
 mlpparams.windowsize = windowsize;
 mlpparams.errorthreshold = errorthreshold;
 mlpparams.errordropratio = errordropratio;
	mlpparams.layernum = layernum;
	mlpparams.maxhidden = maxhidden;
 if (layernum == 1 && hiddennodes == NULL)
   mlpparams.hidden[0] = 1;
 else
	  for (i = 0; i < layernum; i++)
    	mlpparams.hidden[i] = hiddennodes[i];
	mlpparams.initialeta = get_parameter_f("learning_rate");
	mlpparams.inputnum = data_size(data);
	mlpparams.trnum = mlpparams.inputnum;
	mlpparams.cvnum = data_size(validation);
	mlpparams.randrange = 0.01;
	return mlpparams;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movsd %xmm2, 0x20(%rsp)
movsd %xmm1, 0x18(%rsp)
movq %r9, %r12
movl %r8d, %r13d
movsd %xmm0, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x70(%rsp), %ebp
leaq 0x57a84(%rip), %rdi     # 0x959d0
callq 0x4cdcf
movsd %xmm0, 0x30(%rbx)
cmpl $0x2, %ebp
je 0x3df6e
testl %ebp, %ebp
jne 0x3df82
leaq 0x8f90a(%rip), %rax     # 0xcd870
movq (%rax), %rax
movl 0x10(%rax), %eax
jmp 0x3df85
leaq 0x8f8fb(%rip), %rax     # 0xcd870
movq (%rax), %rax
movl 0x1c0(%rax), %eax
decl %eax
jmp 0x3df85
pushq $0x1
popq %rax
movl 0x68(%rsp), %ebp
movl %eax, (%rbx)
leaq 0x8f8de(%rip), %rax     # 0xcd870
movq (%rax), %rax
movl 0x1c0(%rax), %eax
decl %eax
movl %eax, 0x4(%rbx)
leaq 0x5793f(%rip), %rdi     # 0x958e6
callq 0x4cd35
movl %eax, 0x14(%rbx)
leaq 0x57922(%rip), %rdi     # 0x958d8
callq 0x4cdcf
movsd %xmm0, 0x38(%rbx)
leaq 0x57905(%rip), %rdi     # 0x958cc
callq 0x4cdcf
movsd %xmm0, 0x40(%rbx)
movl 0xc(%rsp), %eax
movl %eax, 0x58(%rbx)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x60(%rbx)
movl 0x60(%rsp), %eax
movl %eax, 0x68(%rbx)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x70(%rbx)
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x78(%rbx)
movl %r13d, 0x54(%rbx)
movl %ebp, 0x84(%rbx)
cmpl $0x1, %r13d
sete %al
testq %r12, %r12
sete %cl
testb %cl, %al
je 0x3e06c
movl $0x1, 0x48(%rbx)
leaq 0x578af(%rip), %rdi     # 0x958d8
callq 0x4cdcf
movsd %xmm0, 0x20(%rbx)
movq %r15, %rdi
callq 0x2c3cc
movl %eax, 0x8(%rbx)
movl %eax, 0x10(%rbx)
movq %r14, %rdi
callq 0x2c3cc
movl %eax, 0xc(%rbx)
movabsq $0x3f847ae147ae147b, %rax # imm = 0x3F847AE147AE147B
movq %rax, 0x28(%rbx)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
testl %r13d, %r13d
cmovlel %eax, %r13d
cmpq %rax, %r13
je 0x3e022
movl (%r12,%rax,4), %ecx
movl %ecx, 0x48(%rbx,%rax,4)
incq %rax
jmp 0x3e075