// File: /workspace/github_c_makefile_star2_O1/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, 0x18(%rsp)
movsd %xmm1, 0x10(%rsp)
movq %r9, %r12
movl %r8d, %ebp
movsd %xmm0, 0x8(%rsp)
movl %ecx, %r13d
movq %rdx, 0x20(%rsp)
movq %rsi, %r15
movq %rdi, %rbx
movl 0x70(%rsp), %r14d
leaq 0x5f71b(%rip), %rdi     # 0xa29d0
callq 0x534b6
movsd %xmm0, 0x30(%rbx)
cmpl $0x2, %r14d
je 0x432de
movl $0x1, %eax
testl %r14d, %r14d
jne 0x432f0
leaq 0x8f59a(%rip), %rax     # 0xd2870
movq (%rax), %rax
movl 0x10(%rax), %eax
jmp 0x432f0
leaq 0x8f58b(%rip), %rax     # 0xd2870
movq (%rax), %rax
movl 0x1c0(%rax), %eax
decl %eax
movl %eax, (%rbx)
leaq 0x8f577(%rip), %rax     # 0xd2870
movq (%rax), %rax
movl 0x1c0(%rax), %eax
decl %eax
movl %eax, 0x4(%rbx)
leaq 0x5f5d8(%rip), %rdi     # 0xa28e6
callq 0x5341c
movl %eax, 0x14(%rbx)
leaq 0x5f5bb(%rip), %rdi     # 0xa28d8
callq 0x534b6
movsd %xmm0, 0x38(%rbx)
leaq 0x5f59e(%rip), %rdi     # 0xa28cc
callq 0x534b6
movsd %xmm0, 0x40(%rbx)
movl %r13d, 0x58(%rbx)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x60(%rbx)
movl 0x60(%rsp), %eax
movl %eax, 0x68(%rbx)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x70(%rbx)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x78(%rbx)
movl %ebp, 0x54(%rbx)
movl 0x68(%rsp), %eax
movl %eax, 0x84(%rbx)
cmpl $0x1, %ebp
sete %al
testq %r12, %r12
sete %cl
testb %cl, %al
je 0x4338a
movl $0x1, 0x48(%rbx)
jmp 0x433a0
testl %ebp, %ebp
jle 0x433a0
leaq 0x48(%rbx), %rdi
movl %ebp, %edx
shlq $0x2, %rdx
movq %r12, %rsi
callq 0x4310
leaq 0x5f531(%rip), %rdi     # 0xa28d8
callq 0x534b6
movsd %xmm0, 0x20(%rbx)
movq %r15, %rdi
callq 0x2fa14
movl %eax, 0x8(%rbx)
movl %eax, 0x10(%rbx)
movq 0x20(%rsp), %rdi
callq 0x2fa14
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