// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/process.c
// Function: export_datafolds
void export_datafolds(char* separator, int newseed)
{
 /*!Last Changed 21.04.2007 added export_single_file*/
 /*!Last Changed 30.10.2005*/
 /*!Last Changed 16.10.2005*/
 /*!Last Changed 26.04.2005 added runcount and mysrand*/
 /*!Last Changed 02.02.2004 added safemalloc*/
 int i, k, **partition, *classes, *classcounts;
 mustnormalize = NO;
 get_prior_information();
 mysrand(newseed);
 classes = read_train_and_test_lines(&classcounts);
 partition = safemalloc(get_parameter_i("runcount") * sizeof(int *), "export_datafolds", 10);
 for (k = 0; k < get_parameter_i("runcount"); k++)
   partition[k] = stratified_partition(classes, trainlinecount, current_dataset->classno, classcounts);
 for (k = 0; k < get_parameter_i("runcount"); k++)
   for (i = 0; i < get_parameter_i("foldcount"); i++)
    {
     get_fold(i, partition[k]);
     pre_process();
     if (get_parameter_l("namestype") != NAMES_CMU)
      {
       export_single_file(separator, 0, k, i, traindata, NULL);
       export_single_file(separator, 1, k, i, testdata, NULL);
      }
     else
       export_single_file(separator, 0, k, i, traindata, testdata);
     post_process(YES);
     if (traindata)
      {
       deallocate(traindata);
       traindata = NULL;
      }
     if (testdata)
      {
       deallocate(testdata);
       testdata = NULL;
      }
    }
 free_2d((void**)partition, get_parameter_i("runcount"));
 free_train_and_test_lines();
 safe_free(classes);
 if (current_dataset->classno > 0)
   safe_free(classcounts);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movq %rdi, %r14
movl $0x0, 0x2d8b37(%rip)    # 0x337e70
callq 0x5e2e1
movl %ebx, %edi
callq 0x3af63
leaq 0x8(%rsp), %rdi
callq 0x5ed85
movq %rax, %rbp
leaq 0x4b9a4(%rip), %rbx     # 0xaacfd
movq %rbx, %rdi
callq 0x54920
movslq %eax, %rdi
shlq $0x3, %rdi
leaq 0x4c6ac(%rip), %rsi     # 0xaba1b
movl $0xa, %edx
callq 0x3a0e1
movq %rax, %r15
movq %rbx, %rdi
callq 0x54920
testl %eax, %eax
jle 0x5f3c8
movq 0x8(%rsp), %rbx
xorl %r13d, %r13d
leaq 0x4b966(%rip), %r12     # 0xaacfd
movl 0x76173(%rip), %esi     # 0xd5510
movq 0x764cc(%rip), %rax     # 0xd5870
movl 0x10(%rax), %edx
movq %rbp, %rdi
movq %rbx, %rcx
callq 0x2f9b1
movq %rax, (%r15,%r13,8)
incq %r13
movq %r12, %rdi
callq 0x54920
cltq
cmpq %rax, %r13
jl 0x5f397
movq %rbp, 0x10(%rsp)
leaq 0x4b929(%rip), %rdi     # 0xaacfd
callq 0x54920
testl %eax, %eax
jle 0x5f4d7
xorl %r12d, %r12d
leaq 0x4f7fd(%rip), %r13     # 0xaebe8
leaq 0x47cc9(%rip), %rbp     # 0xa70bb
movq %r13, %rdi
callq 0x54920
testl %eax, %eax
jle 0x5f4bd
xorl %ebx, %ebx
movq (%r15,%r12,8), %rsi
movl %ebx, %edi
callq 0x5e577
callq 0x5f670
movq %rbp, %rdi
callq 0x54afc
movq 0x2d8a0d(%rip), %r8     # 0x337e30
cmpl $0x5, %eax
jne 0x5f43b
movq 0x2d8a09(%rip), %r9     # 0x337e38
movq %r14, %rdi
xorl %esi, %esi
movl %r12d, %edx
movl %ebx, %ecx
jmp 0x5f464
movq %r14, %rdi
xorl %esi, %esi
movl %r12d, %edx
movl %ebx, %ecx
xorl %r9d, %r9d
callq 0x5f22b
movq 0x2d89e4(%rip), %r8     # 0x337e38
movq %r14, %rdi
movl $0x1, %esi
movl %r12d, %edx
movl %ebx, %ecx
xorl %r9d, %r9d
callq 0x5f22b
movl $0x1, %edi
callq 0x5d9af
movq 0x2d89b6(%rip), %rdi    # 0x337e30
testq %rdi, %rdi
je 0x5f48f
callq 0x2ff55
movq $0x0, 0x2d89a1(%rip) # 0x337e30
movq 0x2d89a2(%rip), %rdi    # 0x337e38
testq %rdi, %rdi
je 0x5f4ab
callq 0x2ff55
movq $0x0, 0x2d898d(%rip) # 0x337e38
incl %ebx
movq %r13, %rdi
callq 0x54920
cmpl %eax, %ebx
jl 0x5f404
incq %r12
leaq 0x4b836(%rip), %rdi     # 0xaacfd
callq 0x54920
cltq
cmpq %rax, %r12
jl 0x5f3f2
leaq 0x4b81f(%rip), %rdi     # 0xaacfd
callq 0x54920
movq %r15, %rdi
movl %eax, %esi
callq 0x3a14b
callq 0x619ea
movq 0x10(%rsp), %rdi
callq 0x3a180
movq 0x7636d(%rip), %rax     # 0xd5870
cmpl $0x0, 0x10(%rax)
jle 0x5f521
movq 0x8(%rsp), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3a180
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq