// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/process.c
// Function: test_meta_algorithm
void test_meta_algorithm(int meta_algorithm, int algorithm, void** model, void* parameters, int testsize)
{
 Instanceptr test, next;
 int testindex = 0, classno;
 double real;
 Prediction predicted;
 if (get_algorithm_type(algorithm) == CLASSIFICATION)
   result = performance_initialize(testsize);
 else
   result = performance_initialize_regression(testsize);
 testmean = find_mean(testdata);
 testvariance = find_variance(testdata);
 test = testdata;
 while (test)
  {
   next = test->next;
   test->next = NULL;
   if (get_algorithm_type(algorithm) == CLASSIFICATION)
    {
     predicted = meta_classification_algorithms[meta_algorithm - ONE_VERSUS_ONE].test_algorithm(test, model, algorithm, parameters, ((Classificationresultptr) result)->posteriors[testindex]);
     if (get_parameter_o("changedecisionthreshold") == ON && current_dataset->classno == 2)
      {
       if (((Classificationresultptr) result)->posteriors[testindex][0] > get_parameter_f("decisionthreshold"))
         predicted.classno = 0;
       else
         predicted.classno = 1;
      }
    }
   else
     predicted = meta_regression_algorithms[meta_algorithm - BAGGING_REGRESSION].test_algorithm(test, model, algorithm, parameters, NULL);
   test->next = next;
   if (get_algorithm_type(algorithm) == CLASSIFICATION)
    {
     classno = give_classno(test);
     ((Classificationresultptr) result)->class_counts[classno]++;
     if (classno == predicted.classno)
      {
       ((Classificationresultptr) result)->class_performance[classno]++;
       ((Classificationresultptr) result)->performance++;
       test->classified = YES;
      }
     else
      {
       test->classified = NO;
      }
     ((Classificationresultptr) result)->confusion_matrix[classno][predicted.classno]++;
    }
   else
    {
     real = give_regressionvalue(test);
     ((Regressionresultptr) result)->absoluteerrors[testindex] = predicted.regvalue;
     ((Regressionresultptr) result)->regressionperformance += (real - predicted.regvalue) * (real - predicted.regvalue);    
    }
   testindex++;
   test = test->next;
  }
 safe_free(testmean.values);
 safe_free(testvariance.values);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x8(%rbp), %edi
callq 0x4400
cmpl $0x0, %eax
jne 0x8a012
movl -0x1c(%rbp), %edi
callq 0xba40
movq %rax, 0x357fe8(%rip)    # 0x3e1ff8
jmp 0x8a021
movl -0x1c(%rbp), %edi
callq 0xa0320
movq %rax, 0x357fd7(%rip)    # 0x3e1ff8
movq 0x2ddde0(%rip), %rsi    # 0x367e08
leaq -0xa8(%rbp), %rdi
callq 0x19b30
leaq 0x357fc5(%rip), %rdi    # 0x3e2000
leaq -0xa8(%rbp), %rsi
movl $0x30, %edx
callq 0x42b0
movq 0x2dddb5(%rip), %rsi    # 0x367e08
leaq -0xd8(%rbp), %rdi
callq 0x1a0a0
leaq 0x357fca(%rip), %rdi    # 0x3e2030
leaq -0xd8(%rbp), %rsi
movl $0x30, %edx
callq 0x42b0
movq 0x2ddd8a(%rip), %rax    # 0x367e08
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x8a2e2
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq $0x0, 0x10(%rax)
movl -0x8(%rbp), %edi
callq 0x4400
cmpl $0x0, %eax
jne 0x8a17f
movl -0x4(%rbp), %eax
subl $0x64, %eax
movslq %eax, %rcx
leaq 0x7aeba(%rip), %rax     # 0x104f80
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x8(%rbp), %ecx
movq -0x18(%rbp), %r8
movq 0x357f11(%rip), %rdi    # 0x3e1ff8
movq 0x28(%rdi), %rdi
movslq -0x34(%rbp), %r9
movq (%rdi,%r9,8), %r9
leaq -0x110(%rbp), %rdi
callq *%rax
leaq -0x78(%rbp), %rdi
leaq -0x110(%rbp), %rsi
movl $0x38, %edx
callq 0x42b0
leaq 0x5d5ec(%rip), %rdi     # 0xe7704
callq 0x79440
cmpl $0x1, %eax
jne 0x8a17d
movq 0x7b717(%rip), %rax     # 0x105840
cmpl $0x2, 0x10(%rax)
jne 0x8a17d
movq 0x357ec2(%rip), %rax    # 0x3e1ff8
movq 0x28(%rax), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x150(%rbp)
leaq 0x5d5b5(%rip), %rdi     # 0xe770a
callq 0x79040
movaps %xmm0, %xmm1
movsd -0x150(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x8a174
movl $0x0, -0x70(%rbp)
jmp 0x8a17b
movl $0x1, -0x70(%rbp)
jmp 0x8a17d
jmp 0x8a1cc
movl -0x4(%rbp), %eax
subl $0xc8, %eax
movslq %eax, %rcx
leaq 0x7ae3f(%rip), %rax     # 0x104fd0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x8(%rbp), %ecx
movq -0x18(%rbp), %r8
leaq -0x148(%rbp), %rdi
xorl %r9d, %r9d
callq *%rax
leaq -0x78(%rbp), %rdi
leaq -0x148(%rbp), %rsi
movl $0x38, %edx
callq 0x42b0
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x8(%rbp), %edi
callq 0x4400
cmpl $0x0, %eax
jne 0x8a275
movq -0x28(%rbp), %rdi
callq 0x43530
movl %eax, -0x38(%rbp)
movq 0x357dfc(%rip), %rax    # 0x3e1ff8
movq 0x10(%rax), %rax
movslq -0x38(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movl -0x38(%rbp), %eax
cmpl -0x70(%rbp), %eax
jne 0x8a248
movq 0x357ddc(%rip), %rax    # 0x3e1ff8
movq 0x8(%rax), %rax
movslq -0x38(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movq 0x357dc4(%rip), %rax    # 0x3e1ff8
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movl $0x1, 0x1c(%rax)
jmp 0x8a253
movq -0x28(%rbp), %rax
movl $0x0, 0x1c(%rax)
movq 0x357d9e(%rip), %rax    # 0x3e1ff8
movq 0x18(%rax), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x70(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
jmp 0x8a2c8
movq -0x28(%rbp), %rdi
callq 0x43580
movsd %xmm0, -0x40(%rbp)
movsd -0x78(%rbp), %xmm0
movq 0x357d69(%rip), %rax    # 0x3e1ff8
movq (%rax), %rax
movslq -0x34(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0x40(%rbp), %xmm0
subsd -0x78(%rbp), %xmm0
movsd -0x40(%rbp), %xmm2
subsd -0x78(%rbp), %xmm2
movq 0x357d42(%rip), %rax    # 0x3e1ff8
movsd 0x8(%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x8a082
movq 0x357d17(%rip), %rdi    # 0x3e2000
callq 0x52e80
movq 0x357d3b(%rip), %rdi    # 0x3e2030
callq 0x52e80
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
nopw %cs:(%rax,%rax)