// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rcx, %r15
movq %rdx, %rbx
movl %esi, %r12d
movq %rdi, %r14
movl %esi, %edi
callq 0x445c
cmpl $0x1, %eax
jne 0x608f7
leaq 0x4a3f1(%rip), %rdi     # 0xaacc7
callq 0x54bec
testl %eax, %eax
je 0x608f7
movsd 0x351729(%rip), %xmm0   # 0x3b2010
movsd 0x351729(%rip), %xmm1   # 0x3b2018
movq %r14, %rdi
callq 0x87b28
movl %r12d, %edi
callq 0x44c0
testl %eax, %eax
je 0x60966
movq 0x74f66(%rip), %r13     # 0xd5870
movl %r12d, %edi
callq 0x4488
movups 0x3516df(%rip), %xmm0   # 0x3b1ff8
movups %xmm0, 0x50(%rsp)
movups 0x3516c3(%rip), %xmm0   # 0x3b1fe8
movups %xmm0, 0x40(%rsp)
movups 0x3516a7(%rip), %xmm0   # 0x3b1fd8
movups %xmm0, 0x30(%rsp)
movups 0x35168b(%rip), %xmm0   # 0x3b1fc8
movups %xmm0, 0x20(%rsp)
movups 0x35166f(%rip), %xmm0   # 0x3b1fb8
movups %xmm0, 0x10(%rsp)
movups 0x351653(%rip), %xmm0   # 0x3b1fa8
movups %xmm0, (%rsp)
movq %r14, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0x87b97
leal -0x3e8(%r12), %eax
cmpl $0x22, %eax
ja 0x609a2
leaq 0x4a6aa(%rip), %rcx     # 0xab024
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x74ee6(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x887de
addl $0xfffff830, %r12d      # imm = 0xFFFFF830
cmpl $0xe, %r12d
ja 0x60c5c
leaq 0x4a6f6(%rip), %rax     # 0xab0b0
movslq (%rax,%r12,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x74ea6(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x88c22
movq 0x74e85(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x88058
movq 0x74e66(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x880d0
movq 0x74e45(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x87dbe
movq 0x74e24(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x87c74
movq 0x74e05(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x88003
movq 0x74de6(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x8850a
movq 0x74dc7(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x883e8
movq 0x74da8(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x88322
movq 0x74d89(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x88487
movq 0x74d6a(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x881c3
movq 0x74d49(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x87c13
movq 0x74d2a(%rip), %rsi     # 0xd5870
movl (%r15), %ecx
movq %r14, %rdi
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x87fb1
cmpl $0x0, 0x10(%r15)
movq 0x74d03(%rip), %rsi     # 0xd5870
movl 0x10(%rsi), %ecx
je 0x60d24
movq %r14, %rdi
movq %rbx, %rdx
jmp 0x60d39
movq 0x74ce8(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x87be0
movq 0x74cc9(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x87ff0
movq 0x74caa(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x87cbc
movq 0x74c89(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x882e5
movq 0x74c6a(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x88daa
movq 0x74c4b(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x888e5
movq 0x74c2c(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x88831
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x74bff(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x88aef
movq 0x74be0(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x89056
movq 0x74bc1(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x88a2b
movq 0x74ba2(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x890ae
movq 0x74b83(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x88aab
movq 0x74b64(%rip), %rsi     # 0xd5870
movq %r14, %rdi
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x88b43
leal -0x1(%rcx), %eax
imull %ecx, %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
movq %r14, %rdi
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x87f72