// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/process.c
// Function: save_model
void save_model(FILE* modelfile, int algorithm, void* model, void* parameters)
{
 /*!Last Changed 05.08.2007 added QDACLASS algorithm*/
 /*!Last Changed 02.04.2007 added HMM algorithm*/
 /*!Last Changed 19.12.2005*/
 Svmtree_parameterptr psvmtree;
 Kforest_parameterptr pkf;
 if (get_algorithm_type(algorithm) == REGRESSION && get_parameter_o("normalizeoutput"))
   save_output_mean_and_variance(modelfile, outputmean, outputvariance);
 if (must_normalize(algorithm))
   save_mean_and_variance(modelfile, current_dataset, mean, variance, must_realize(algorithm));
 switch (algorithm)
  {
   case SELECTMAX    :save_model_selectmax(modelfile, current_dataset, (Model_selectmaxptr) model);
                      break;
   case ONEFEATURE   :save_model_onefeature(modelfile, current_dataset, (Model_onefeatureptr) model);
                      break;
   case SELECTAVERAGE:save_model_selectaverage(modelfile, current_dataset, (double*) model);
                      break;
   case GAUSSIAN     :save_model_gaussian(modelfile, current_dataset, (Model_gaussianptr) model);
                      break;
   case NEARESTMEAN  :save_model_nearestmean(modelfile, current_dataset, (Instanceptr) model);
                      break;
   case LINEARREG    :save_model_linearreg(modelfile, current_dataset, (Model_linearregressionptr) model);
                      break;
   case QUANTIZEREG  :save_model_quantizereg(modelfile, current_dataset, (Model_quantizeregptr) model);
                      break;
   case KNN          :
   case KNNREG       :save_model_knn(modelfile, current_dataset, (Instanceptr) model);
                      break;
   case GPROCESSREG  :save_model_gprocessreg(modelfile, current_dataset, (Model_gprocessregressionptr) model);
                      break;
   case C45          :
   case LDT          :save_model_c45(modelfile, current_dataset, (Decisionnodeptr) model, 0);
                      break;
   case SOFTTREE     :save_model_softtree(modelfile, current_dataset, (Decisionnodeptr) model, 0);
                      break;
   case SVMTREE      :psvmtree = (Svmtree_parameterptr) parameters;
                      if (psvmtree->multiclasstype == ONE_VS_ONE)
                        save_model_svmtree(modelfile, current_dataset, (Decisionnodeptr*) model, current_dataset->classno * (current_dataset->classno - 1) / 2);
                      else
                        save_model_svmtree(modelfile, current_dataset, (Decisionnodeptr*) model, current_dataset->classno);
                      break;
   case RANDOMFOREST :pkf = (Kforest_parameterptr) parameters;
                      save_model_randomforest(modelfile, current_dataset, (Decisionnodeptr*) model, pkf->forestsize);
                      break;
   case SVMREGTREE   :
   case REGTREE      :
   case SOFTREGTREE  :save_model_regtree(modelfile, current_dataset, (Regressionnodeptr) model, 0);
                      break;
   case REGRULE      :save_model_regrule(modelfile, current_dataset, (Regressionrulesetptr) model);
                      break;
   case RISE         :save_model_rise(modelfile, current_dataset, (Model_riseptr) model);
                      break;
   case IREP         :
   case IREP2        :
   case RIPPER       :
   case C45RULES     :
   case MULTIRIPPER  :
   case REXRIPPER    :
   case CN2          :
   case LERILS       :
   case PART         :save_model_ripper(modelfile, current_dataset, (Rulesetptr) model);
                      break;
   case DIVS         :save_model_divs(modelfile, current_dataset, (Model_divsptr) model);
                      break;
   case NAIVEBAYES   :save_model_naivebayes(modelfile, current_dataset, (Model_naivebayesptr) model);
                      break;
   case QDACLASS     :save_model_qdaclass(modelfile, current_dataset, (Model_qdaclassptr) model);
                      break;
   case LDACLASS     :save_model_ldaclass(modelfile, current_dataset, (Model_ldaclassptr) model);
                      break;
   case LOGISTIC     :save_model_logistic(modelfile, current_dataset, (double**) model);
                      break;
   case RBF          :
   case RBFREG       :save_model_rbf(modelfile, current_dataset, (Rbfnetworkptr) model);
                      break;
   case MLPGENERIC   :
   case MLPGENERICREG:
   case DNC          :
   case DNCREG       :save_model_mlpgeneric(modelfile, current_dataset, (Mlpnetworkptr) model);
                      break;
   case MULTILDT     :
   case CART         :save_model_multildt(modelfile, current_dataset, (Decisionnodeptr) model, 0);
                      break;
   case NBTREE       :save_model_nodeboundedtree(modelfile, current_dataset, (Decisionnodeptr) model, 0);
                      break;
   case SVM          :
   case SVMREG       :save_model_svm(modelfile, current_dataset, (Svm_modelptr) model);
                      break;
   case HMM          :save_model_hmm(modelfile, current_dataset, (Hmmptr*) model);
                      break;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl -0xc(%rbp), %edi
callq 0x4400
cmpl $0x1, %eax
jne 0x899a1
leaq 0x5dda9(%rip), %rdi     # 0xe7727
callq 0x79440
cmpl $0x0, %eax
je 0x899a1
movq -0x8(%rbp), %rdi
movsd 0x35864c(%rip), %xmm0   # 0x3e1fe0
movsd 0x35864c(%rip), %xmm1   # 0x3e1fe8
callq 0xba1e0
movl -0xc(%rbp), %edi
callq 0x44f0
cmpl $0x0, %eax
je 0x89a1c
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0x7be83(%rip), %rax     # 0x105840
movq %rax, -0x38(%rbp)
movl -0xc(%rbp), %edi
callq 0x4480
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl %eax, %edx
movups 0x3585ee(%rip), %xmm0   # 0x3e1fc8
movq %rsp, %rax
movups %xmm0, 0x50(%rax)
movups 0x3585d0(%rip), %xmm0   # 0x3e1fb8
movups %xmm0, 0x40(%rax)
movups 0x3585b5(%rip), %xmm0   # 0x3e1fa8
movups %xmm0, 0x30(%rax)
movups 0x35859a(%rip), %xmm0   # 0x3e1f98
movups %xmm0, 0x20(%rax)
movups 0x35857f(%rip), %xmm0   # 0x3e1f88
movups %xmm0, 0x10(%rax)
movups 0x358564(%rip), %xmm0   # 0x3e1f78
movups %xmm0, (%rax)
callq 0xba260
movl -0xc(%rbp), %eax
movl %eax, -0x44(%rbp)
subl $0x3e8, %eax            # imm = 0x3E8
je 0x89c9b
jmp 0x89a2f
movl -0x44(%rbp), %eax
subl $0x3e9, %eax            # imm = 0x3E9
je 0x89d4a
jmp 0x89a3f
movl -0x44(%rbp), %eax
subl $0x3ea, %eax            # imm = 0x3EA
je 0x89d7c
jmp 0x89a4f
movl -0x44(%rbp), %eax
subl $0x3eb, %eax            # imm = 0x3EB
je 0x89cff
jmp 0x89a5f
movl -0x44(%rbp), %eax
subl $0x3ec, %eax            # imm = 0x3EC
je 0x89f01
jmp 0x89a6f
movl -0x44(%rbp), %eax
subl $0x3ed, %eax            # imm = 0x3ED
je 0x89d7c
jmp 0x89a7f
movl -0x44(%rbp), %eax
addl $0xfffffc12, %eax       # imm = 0xFFFFFC12
subl $0x5, %eax
jb 0x89e9d
jmp 0x89a92
movl -0x44(%rbp), %eax
subl $0x3f4, %eax            # imm = 0x3F4
je 0x89f49
jmp 0x89aa2
movl -0x44(%rbp), %eax
subl $0x3f5, %eax            # imm = 0x3F5
je 0x89e9d
jmp 0x89ab2
movl -0x44(%rbp), %eax
subl $0x3f6, %eax            # imm = 0x3F6
je 0x89f5f
jmp 0x89ac2
movl -0x44(%rbp), %eax
subl $0x3f8, %eax            # imm = 0x3F8
je 0x89f1a
jmp 0x89ad2
movl -0x44(%rbp), %eax
subl $0x3f9, %eax            # imm = 0x3F9
je 0x89f8f
jmp 0x89ae2
movl -0x44(%rbp), %eax
subl $0x3fb, %eax            # imm = 0x3FB
je 0x89db2
jmp 0x89af2
movl -0x44(%rbp), %eax
subl $0x3fc, %eax            # imm = 0x3FC
je 0x89ce6
jmp 0x89b02
movl -0x44(%rbp), %eax
subl $0x3fd, %eax            # imm = 0x3FD
je 0x89f77
jmp 0x89b12
movl -0x44(%rbp), %eax
subl $0x3fe, %eax            # imm = 0x3FE
je 0x89fa5
jmp 0x89b22
movl -0x44(%rbp), %eax
subl $0x3ff, %eax            # imm = 0x3FF
je 0x89f49
jmp 0x89b32
movl -0x44(%rbp), %eax
subl $0x400, %eax            # imm = 0x400
je 0x89ee8
jmp 0x89b42
movl -0x44(%rbp), %eax
subl $0x401, %eax            # imm = 0x401
je 0x89ecf
jmp 0x89b52
movl -0x44(%rbp), %eax
subl $0x402, %eax            # imm = 0x402
je 0x89f33
jmp 0x89b62
movl -0x44(%rbp), %eax
subl $0x403, %eax            # imm = 0x403
je 0x89e29
jmp 0x89b72
movl -0x44(%rbp), %eax
subl $0x404, %eax            # imm = 0x404
je 0x89e84
jmp 0x89b82
movl -0x44(%rbp), %eax
subl $0x405, %eax            # imm = 0x405
je 0x89eb6
jmp 0x89b92
movl -0x44(%rbp), %eax
addl $0xfffffbfa, %eax       # imm = 0xFFFFFBFA
subl $0x3, %eax
jb 0x89e9d
jmp 0x89ba5
movl -0x44(%rbp), %eax
subl $0x409, %eax            # imm = 0x409
je 0x89d97
jmp 0x89bb5
movl -0x44(%rbp), %eax
subl $0x40a, %eax            # imm = 0x40A
je 0x89f5f
jmp 0x89bc5
movl -0x44(%rbp), %eax
subl $0x7d0, %eax            # imm = 0x7D0
je 0x89cb4
jmp 0x89bd5
movl -0x44(%rbp), %eax
subl $0x7d1, %eax            # imm = 0x7D1
je 0x89d4a
jmp 0x89be5
movl -0x44(%rbp), %eax
subl $0x7d2, %eax            # imm = 0x7D2
je 0x89e50
jmp 0x89bf5
movl -0x44(%rbp), %eax
subl $0x7d3, %eax            # imm = 0x7D3
je 0x89f49
jmp 0x89c05
movl -0x44(%rbp), %eax
subl $0x7d4, %eax            # imm = 0x7D4
je 0x89ccd
jmp 0x89c15
movl -0x44(%rbp), %eax
subl $0x7d5, %eax            # imm = 0x7D5
je 0x89d18
jmp 0x89c25
movl -0x44(%rbp), %eax
subl $0x7d6, %eax            # imm = 0x7D6
je 0x89d31
jmp 0x89c35
movl -0x44(%rbp), %eax
subl $0x7d7, %eax            # imm = 0x7D7
je 0x89e6b
jmp 0x89c45
movl -0x44(%rbp), %eax
subl $0x7d8, %eax            # imm = 0x7D8
je 0x89f8f
jmp 0x89c55
movl -0x44(%rbp), %eax
subl $0x7da, %eax            # imm = 0x7DA
je 0x89f49
jmp 0x89c65
movl -0x44(%rbp), %eax
subl $0x7db, %eax            # imm = 0x7DB
je 0x89f33
jmp 0x89c75
movl -0x44(%rbp), %eax
subl $0x7dc, %eax            # imm = 0x7DC
je 0x89d63
jmp 0x89c85
movl -0x44(%rbp), %eax
addl $0xfffff823, %eax       # imm = 0xFFFFF823
subl $0x2, %eax
jb 0x89e50
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7bb9a(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
callq 0xba2e0
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7bb81(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
callq 0xbb670
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7bb68(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
callq 0xbb710
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7bb4f(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
callq 0xba330
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7bb36(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
callq 0xbac60
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7bb1d(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
callq 0xbb770
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7bb04(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
callq 0xbb7e0
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7baeb(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
callq 0xba3d0
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7bad2(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
callq 0xbbf60
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7bab9(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
xorl %ecx, %ecx
callq 0xba590
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7ba9e(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
xorl %ecx, %ecx
callq 0xba440
jmp 0x89fb9
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x89e06
movq -0x8(%rbp), %rdi
movq 0x7ba71(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq 0x7ba62(%rip), %rax     # 0x105840
movl 0x10(%rax), %eax
movq 0x7ba58(%rip), %rcx     # 0x105840
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
imull %ecx, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movq -0x50(%rbp), %rdx
movl %eax, %ecx
callq 0xba7b0
jmp 0x89e24
movq -0x8(%rbp), %rdi
movq 0x7ba2f(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
movq 0x7ba24(%rip), %rax     # 0x105840
movl 0x10(%rax), %ecx
callq 0xba7b0
jmp 0x89fb9
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq 0x7ba04(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rax
movl (%rax), %ecx
callq 0xba810
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7b9e5(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
xorl %ecx, %ecx
callq 0xbb930
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7b9ca(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
callq 0xbbfe0
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7b9b1(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
callq 0xbb3e0
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7b998(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
callq 0xbb350
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7b97f(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
callq 0xbb4c0
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7b966(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
callq 0xbacc0
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7b94d(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
callq 0xbade0
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7b934(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
callq 0xbaeb0
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7b91b(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
callq 0xba850
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7b902(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
callq 0xba890
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7b8ec(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
callq 0xba910
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7b8d6(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
xorl %ecx, %ecx
callq 0xba9b0
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7b8be(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
xorl %ecx, %ecx
callq 0xbaae0
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7b8a6(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
callq 0xbaf60
jmp 0x89fb9
movq -0x8(%rbp), %rdi
movq 0x7b890(%rip), %rsi     # 0x105840
movq -0x18(%rbp), %rdx
callq 0xbbb40
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)