// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/process.c
// Function: test_model
void test_model(char* modelfilename, char* testfilename)
{
 /*!Last Changed 20.12.2005*/
 void** model;
 void* parameters;
 FILE* posfile;
 Instanceptr means = NULL, variances = NULL;
 int i, k, modelcount, algorithm, runstart, **partition, *classes, *classcounts;
 totalrun = 0;
 model = load_model(modelfilename, &modelcount, &algorithm, &means, &variances);
 mustrealize = must_realize(algorithm);
 mustnormalize = must_normalize(algorithm);
 if (must_realize(algorithm))
   exchange_classdefno(current_dataset);
 if (!model)
   return;
 if (get_parameter_o("printposterior"))
  {
   posfile = fopen(get_parameter_s("posteriorfilename"), "w");
   if (!posfile)
     return;
  }
 parameters = prepare_supervised_algorithm_parameters(algorithm);
 if (isinteger(testfilename) && get_parameter_i("foldcount") > 1)
  {
   runstart = atoi(testfilename);
   get_prior_information();
   mysrand(runstart);
   partition = safemalloc(get_parameter_i("runcount") * sizeof(int *), "test_model", 12);
   classes = read_train_and_test_lines(&classcounts);
   if (get_parameter_f("testpercentage") > 0)
     read_data_from_lines(testlines, testlinecount, &separateddata);
   for (i = 0; i < get_parameter_i("runcount"); i++)
     partition[i] = stratified_partition(classes, trainlinecount, current_dataset->classno, classcounts);
   for (i = 0; i < get_parameter_i("runcount"); i++)
     for (k = 0; k < get_parameter_i("runtofold"); k++)
      {
       get_fold(k, partition[i]);
       test_single(model[totalrun], parameters, algorithm, posfile, means, variances);
      }
   free_2d((void**)partition, get_parameter_i("runcount"));
   if (current_dataset->classno > 0)
    {
     safe_free(classes);
     safe_free(classcounts);
    }
   if (get_parameter_f("testpercentage") > 0)
    {
     deallocate(separateddata);
     separateddata = NULL;
    }
   free_train_and_test_lines();
  }
 else
  {
   for (i = 0; i < modelcount; i++)
    {
     read_from_data_file(current_dataset, testfilename, &testdata); 
     test_single(model[i], parameters, algorithm, posfile, means, variances);
    }
  }
 for (i = 0; i < modelcount; i++)
  {
   free_model_of_supervised_algorithm(algorithm, model[i], current_dataset);
   if (must_normalize(algorithm))
    {
     safe_free(means[i].values);
     safe_free(variances[i].values);
    }
  }
 if (must_normalize(algorithm))
  {
   safe_free(means);
   safe_free(variances);
  }
 safe_free(model);
 free_supervised_algorithm_parameters(algorithm, parameters);
 if (get_parameter_o("printposterior"))
   fclose(posfile);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movl $0x0, 0x356be3(%rip)    # 0x3e1ff0
movq -0x8(%rbp), %rdi
leaq -0x44(%rbp), %rsi
leaq -0x48(%rbp), %rdx
leaq -0x30(%rbp), %rcx
leaq -0x38(%rbp), %r8
callq 0x88d40
movq %rax, -0x18(%rbp)
movl -0x48(%rbp), %edi
callq 0x4480
movl %eax, 0x356b3c(%rip)    # 0x3e1f74
movl -0x48(%rbp), %edi
callq 0x44f0
movl %eax, 0x2dc9fa(%rip)    # 0x367e40
movl -0x48(%rbp), %edi
callq 0x4480
cmpl $0x0, %eax
je 0x8b45f
movq 0x7a3e6(%rip), %rdi     # 0x105840
callq 0x1a880
cmpq $0x0, -0x18(%rbp)
jne 0x8b46b
jmp 0x8b7d3
leaq 0x5ceaa(%rip), %rdi     # 0xe831c
callq 0x79440
cmpl $0x0, %eax
je 0x8b4a9
leaq 0x5cfa9(%rip), %rdi     # 0xe842c
callq 0x79190
movq %rax, %rdi
leaq 0x5cd2c(%rip), %rsi     # 0xe81be
callq 0x40c0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x8b4a7
jmp 0x8b7d3
jmp 0x8b4a9
movl -0x48(%rbp), %edi
callq 0x7410
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x53bd0
cmpl $0x0, %eax
je 0x8b6bc
leaq 0x5c298(%rip), %rdi     # 0xe7766
callq 0x78f10
cmpl $0x1, %eax
jle 0x8b6bc
movq -0x10(%rbp), %rdi
callq 0x41c0
movl %eax, -0x4c(%rbp)
callq 0x86430
movl -0x4c(%rbp), %edi
callq 0x54580
leaq 0x5c261(%rip), %rdi     # 0xe775d
callq 0x78f10
movslq %eax, %rdi
shlq $0x3, %rdi
leaq 0x5cf2f(%rip), %rsi     # 0xe843e
movl $0xc, %edx
callq 0x52d70
movq %rax, -0x58(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x87220
movq %rax, -0x60(%rbp)
leaq 0x5ced2(%rip), %rdi     # 0xe8403
callq 0x79040
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x8b558
movq 0x7a2e2(%rip), %rdi     # 0x105828
movl 0x79f90(%rip), %esi     # 0x1054dc
leaq 0x2dc8c5(%rip), %rdx    # 0x367e18
callq 0x87530
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x6c(%rbp)
leaq 0x5c1f1(%rip), %rdi     # 0xe775d
callq 0x78f10
movl %eax, %ecx
movl -0x6c(%rbp), %eax
cmpl %ecx, %eax
jge 0x8b5b1
movq -0x60(%rbp), %rdi
movl 0x79f5c(%rip), %esi     # 0x1054e0
movq 0x7a2b5(%rip), %rax     # 0x105840
movl 0x10(%rax), %edx
movq -0x68(%rbp), %rcx
callq 0x43d20
movq %rax, %rdx
movq -0x58(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x8b55f
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x70(%rbp)
leaq 0x5c198(%rip), %rdi     # 0xe775d
callq 0x78f10
movl %eax, %ecx
movl -0x70(%rbp), %eax
cmpl %ecx, %eax
jge 0x8b64b
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x74(%rbp)
leaq 0x5ce62(%rip), %rdi     # 0xe8449
callq 0x78f10
movl %eax, %ecx
movl -0x74(%rbp), %eax
cmpl %ecx, %eax
jge 0x8b63b
movl -0x40(%rbp), %edi
movq -0x58(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x867e0
movq -0x18(%rbp), %rax
movslq 0x3569dc(%rip), %rcx    # 0x3e1ff0
movq (%rax,%rcx,8), %rdi
movq -0x20(%rbp), %rsi
movl -0x48(%rbp), %edx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
callq 0x8b130
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x8b5da
jmp 0x8b63d
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x8b5b8
movq -0x58(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq 0x5c103(%rip), %rdi     # 0xe775d
callq 0x78f10
movq -0x80(%rbp), %rdi
movl %eax, %esi
callq 0x52e20
movq 0x7a1cf(%rip), %rax     # 0x105840
cmpl $0x0, 0x10(%rax)
jle 0x8b689
movq -0x60(%rbp), %rdi
callq 0x52e80
movq -0x68(%rbp), %rdi
callq 0x52e80
leaq 0x5cd73(%rip), %rdi     # 0xe8403
callq 0x79040
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x8b6b5
movq 0x2dc773(%rip), %rdi    # 0x367e18
callq 0x44510
movq $0x0, 0x2dc763(%rip) # 0x367e18
callq 0x8b040
jmp 0x8b713
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0x8b711
movq 0x7a16e(%rip), %rdi     # 0x105840
movq -0x10(%rbp), %rsi
leaq 0x2dc72b(%rip), %rdx    # 0x367e08
callq 0x85390
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x20(%rbp), %rsi
movl -0x48(%rbp), %edx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
callq 0x8b130
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x8b6c3
jmp 0x8b713
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0x8b785
movl -0x48(%rbp), %edi
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x7a108(%rip), %rdx     # 0x105840
callq 0x5ac0
movl -0x48(%rbp), %edi
callq 0x44f0
cmpl $0x0, %eax
je 0x8b778
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x52e80
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x52e80
jmp 0x8b77a
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x8b71a
movl -0x48(%rbp), %edi
callq 0x44f0
cmpl $0x0, %eax
je 0x8b7a4
movq -0x30(%rbp), %rdi
callq 0x52e80
movq -0x38(%rbp), %rdi
callq 0x52e80
movq -0x18(%rbp), %rdi
callq 0x52e80
movl -0x48(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0x5a00
leaq 0x5cb5c(%rip), %rdi     # 0xe831c
callq 0x79440
cmpl $0x0, %eax
je 0x8b7d3
movq -0x28(%rbp), %rdi
callq 0x4250
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)