// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/process.c
// Function: get_fold
void get_fold(int fold, int* partition)
{
 /*!Last Changed 25.05.2006*/
 /*!Last Changed 30.10.2005*/
 /*!Last Changed 23.11.2004 added traincount*/
 long i, trainindex;
 Instanceptr currentinstance, trainbefore = NULL, testbefore = NULL;
 i = 0;
 trainindex = 0;
 while (i < trainlinecount)
  {
   currentinstance = create_instance(current_dataset, trainlines[i], get_parameter_o("runwithclassnoise"));
   if (!currentinstance)/*If the line does not contain correct instance*/
     continue;
   if (partition[i] % get_parameter_i("foldcount") != fold)
    {
     if (trainbefore)
       trainbefore->next = currentinstance;
     else
       traindata = currentinstance;
     trainbefore = currentinstance;
     currentinstance->index = trainindex;
     trainindex++;
    }
   else
    {
     if (testbefore)
       testbefore->next = currentinstance;
     else
       testdata = currentinstance;
     testbefore = currentinstance;
     currentinstance->index = i;
    }
   i++;
  }
 current_dataset->traincount = trainindex;
 if (convert_missing_values)
  {
   handle_missing_values(traindata, traindata);
   handle_missing_values(traindata, testdata);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rax
movslq 0x7ecc6(%rip), %rcx     # 0x1054e0
cmpq %rcx, %rax
jge 0x86919
movq 0x7f016(%rip), %rax     # 0x105840
movq %rax, -0x48(%rbp)
movq 0x7effb(%rip), %rax     # 0x105830
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
leaq 0x61a2b(%rip), %rdi     # 0xe8273
callq 0x79440
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl %eax, %edx
callq 0x22c30
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x86869
jmp 0x8680f
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x4c(%rbp)
leaq 0x60ee8(%rip), %rdi     # 0xe7766
callq 0x78f10
movl %eax, %ecx
movl -0x4c(%rbp), %eax
cltd
idivl %ecx
cmpl -0x4(%rbp), %edx
je 0x868d3
cmpq $0x0, -0x30(%rbp)
je 0x868a5
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x868b0
movq -0x28(%rbp), %rax
movq %rax, 0x2e1550(%rip)    # 0x367e00
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x86908
cmpq $0x0, -0x38(%rbp)
je 0x868e8
movq -0x28(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x868f3
movq -0x28(%rbp), %rax
movq %rax, 0x2e1515(%rip)    # 0x367e08
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x8680f
movq -0x20(%rbp), %rax
movl %eax, %ecx
movq 0x7ef1a(%rip), %rax     # 0x105840
movl %ecx, 0x1407124(%rax)
cmpl $0x0, 0x7e949(%rip)     # 0x10527c
je 0x8695b
movq 0x2e14c4(%rip), %rdi    # 0x367e00
movq 0x2e14bd(%rip), %rsi    # 0x367e00
callq 0x85060
movq 0x2e14b1(%rip), %rdi    # 0x367e00
movq 0x2e14b2(%rip), %rsi    # 0x367e08
callq 0x85060
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)