// File: /workspace/github_c_makefile_star2_O2/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
andl $0x0, 0x2d9208(%rip)    # 0x32fe70
callq 0x55d99
movl %ebx, %edi
callq 0x35ca7
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x567cb
movq %rax, %rbp
leaq 0x43fa2(%rip), %rbx     # 0x9ac2d
movq %rbx, %rdi
callq 0x4cd35
movslq %eax, %rdi
shlq $0x3, %rdi
leaq 0x44c9e(%rip), %rsi     # 0x9b93f
pushq $0xa
popq %rdx
callq 0x34f59
movq %rax, %r12
xorl %r13d, %r13d
movq (%r15), %r15
movq %rbx, %rdi
callq 0x4cd35
cltq
cmpq %rax, %r13
jge 0x56ce5
movl 0x76849(%rip), %esi     # 0xcd510
movq 0x76ba2(%rip), %rax     # 0xcd870
movl 0x10(%rax), %edx
movq %rbp, %rdi
movq %r15, %rcx
callq 0x2ba93
movq %rax, (%r12,%r13,8)
incq %r13
jmp 0x56cb2
movq %r15, (%rsp)
movq %rbp, 0x8(%rsp)
xorl %r13d, %r13d
leaq 0x47e14(%rip), %rbp     # 0x9eb0c
pushq $0x1
popq %r15
leaq 0x43f2a(%rip), %rdi     # 0x9ac2d
callq 0x4cd35
cltq
cmpq %rax, %r13
jge 0x56dd5
xorl %ebx, %ebx
movq %rbp, %rdi
callq 0x4cd35
cmpl %eax, %ebx
jge 0x56dcd
movq (%r12,%r13,8), %rsi
movl %ebx, %edi
callq 0x56001
callq 0x56f57
leaq 0x4031f(%rip), %rdi     # 0x9705b
callq 0x4cf11
movq 0x2d90e8(%rip), %r8     # 0x32fe30
cmpl $0x5, %eax
jne 0x56d60
movq 0x2d90e4(%rip), %r9     # 0x32fe38
movq %r14, %rdi
xorl %esi, %esi
movl %r13d, %edx
movl %ebx, %ecx
jmp 0x56d87
movq %r14, %rdi
xorl %esi, %esi
movl %r13d, %edx
movl %ebx, %ecx
xorl %r9d, %r9d
callq 0x56b5c
movq 0x2d90bf(%rip), %r8     # 0x32fe38
movq %r14, %rdi
movl %r15d, %esi
movl %r13d, %edx
movl %ebx, %ecx
xorl %r9d, %r9d
callq 0x56b5c
movl %r15d, %edi
callq 0x5549c
movq 0x2d9095(%rip), %rdi    # 0x32fe30
testq %rdi, %rdi
je 0x56dad
callq 0x2c010
andq $0x0, 0x2d9083(%rip)    # 0x32fe30
movq 0x2d9084(%rip), %rdi    # 0x32fe38
testq %rdi, %rdi
je 0x56dc6
callq 0x2c010
andq $0x0, 0x2d9072(%rip)    # 0x32fe38
incl %ebx
jmp 0x56d15
incq %r13
jmp 0x56cfc
leaq 0x43e51(%rip), %rdi     # 0x9ac2d
callq 0x4cd35
movq %r12, %rdi
movl %eax, %esi
callq 0x34fc3
callq 0x59120
movq 0x8(%rsp), %rdi
callq 0x34ff7
movq 0x76a6f(%rip), %rax     # 0xcd870
cmpl $0x0, 0x10(%rax)
jle 0x56e1e
movq (%rsp), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x34ff7
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq