// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/process.c
// Function: read_train_and_test_lines
int* read_train_and_test_lines(int** classcounts)
{
 /*!Last Changed 26.11.2005*/
 /*!Last Changed 30.10.2005*/
 char myline[READLINELENGTH];
 int* partition, i = 0, classno, *classes = NULL;
 if (current_dataset->classno > 0)
   *classcounts = safecalloc(current_dataset->classno, sizeof(int), "read_train_and_test_lines", 5);
 if (!open_dataset(current_dataset))
   return NULL;  
 if (get_parameter_f("testpercentage") > 0)
   partition = stratified_partition(prior_class_information, current_dataset->datacount, current_dataset->classno, current_dataset->classcounts);
 while (get_single_instance(current_dataset, myline))
  {
   if (is_line_comment(myline))
     continue;
   if (current_dataset->classno > 0)
    {
     classno = prior_class_information[i];
     if (get_parameter_f("testpercentage") > 0 && partition[i] < get_parameter_f("testpercentage") * current_dataset->classcounts[classno])
       add_single_data_line(&testlines, &testlinecount, myline);
     else
      {
       (*classcounts)[classno]++;
       classes = alloc(classes, (trainlinecount + 1) * sizeof(int), trainlinecount + 1);
       classes[trainlinecount] = classno;
       add_single_data_line(&trainlines, &trainlinecount, myline);
      }
    }
   else
    {
     if (get_parameter_f("testpercentage") > 0 && partition[i] < get_parameter_f("testpercentage") * current_dataset->datacount)
       add_single_data_line(&testlines, &testlinecount, myline);
     else
       add_single_data_line(&trainlines, &trainlinecount, myline);
    }
   i++;
  }
 if (get_parameter_f("testpercentage") > 0)
   safe_free(partition);
 close_dataset(current_dataset);
 return classes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x7a160, %rsp          # imm = 0x7A160
movq %rdi, -0x10(%rbp)
movl $0x0, -0x7a13c(%rbp)
movq $0x0, -0x7a148(%rbp)
movq 0x7e5f5(%rip), %rax     # 0x105840
cmpl $0x0, 0x10(%rax)
jle 0x8727c
movq 0x7e5e8(%rip), %rax     # 0x105840
movslq 0x10(%rax), %rdi
movl $0x4, %esi
leaq 0x611aa(%rip), %rdx     # 0xe8412
movl $0x5, %ecx
callq 0x52f40
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq 0x7e5bd(%rip), %rdi     # 0x105840
callq 0x86540
cmpl $0x0, %eax
jne 0x8729a
movq $0x0, -0x8(%rbp)
jmp 0x8751c
leaq 0x61162(%rip), %rdi     # 0xe8403
callq 0x79040
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x872e7
movq 0x2e0b72(%rip), %rdi    # 0x367e28
movq 0x7e583(%rip), %rax     # 0x105840
movl 0x1407120(%rax), %esi
movq 0x7e576(%rip), %rax     # 0x105840
movl 0x10(%rax), %edx
movq 0x7e56c(%rip), %rcx     # 0x105840
addq $0x1407140, %rcx        # imm = 0x1407140
callq 0x43d20
movq %rax, -0x7a138(%rbp)
jmp 0x872e9
movq 0x7e550(%rip), %rdi     # 0x105840
leaq -0x7a130(%rbp), %rsi
callq 0x863c0
cmpq $0x0, %rax
je 0x874e4
leaq -0x7a130(%rbp), %rdi
callq 0x532e0
cmpl $0x0, %eax
je 0x87319
jmp 0x872e9
movq 0x7e520(%rip), %rax     # 0x105840
cmpl $0x0, 0x10(%rax)
jle 0x8743b
movq 0x2e0af7(%rip), %rax    # 0x367e28
movslq -0x7a13c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x7a140(%rbp)
leaq 0x610bb(%rip), %rdi     # 0xe8403
callq 0x79040
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x873c2
movq -0x7a138(%rbp), %rax
movslq -0x7a13c(%rbp), %rcx
cvtsi2sdl (%rax,%rcx,4), %xmm0
movsd %xmm0, -0x7a150(%rbp)
leaq 0x6108b(%rip), %rdi     # 0xe8403
callq 0x79040
movsd -0x7a150(%rbp), %xmm1
movq 0x7e4b4(%rip), %rax     # 0x105840
movslq -0x7a140(%rbp), %rcx
cvtsi2sdl 0x1407140(%rax,%rcx,4), %xmm2
mulsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x873c2
leaq -0x7a130(%rbp), %rdx
leaq 0x7e474(%rip), %rdi     # 0x105828
leaq 0x7e121(%rip), %rsi     # 0x1054dc
callq 0x8afb0
jmp 0x87436
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq -0x7a140(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movq -0x7a148(%rbp), %rdi
movl 0x7e0fa(%rip), %eax     # 0x1054e0
addl $0x1, %eax
movslq %eax, %rsi
shlq $0x2, %rsi
movl 0x7e0ea(%rip), %edx     # 0x1054e0
addl $0x1, %edx
callq 0x52d10
movq %rax, -0x7a148(%rbp)
movl -0x7a140(%rbp), %edx
movq -0x7a148(%rbp), %rax
movslq 0x7e0c7(%rip), %rcx     # 0x1054e0
movl %edx, (%rax,%rcx,4)
leaq -0x7a130(%rbp), %rdx
leaq 0x7e406(%rip), %rdi     # 0x105830
leaq 0x7e0af(%rip), %rsi     # 0x1054e0
callq 0x8afb0
jmp 0x874d0
leaq 0x60fc1(%rip), %rdi     # 0xe8403
callq 0x79040
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x874b4
movq -0x7a138(%rbp), %rax
movslq -0x7a13c(%rbp), %rcx
cvtsi2sdl (%rax,%rcx,4), %xmm0
movsd %xmm0, -0x7a158(%rbp)
leaq 0x60f91(%rip), %rdi     # 0xe8403
callq 0x79040
movsd -0x7a158(%rbp), %xmm1
movq 0x7e3ba(%rip), %rax     # 0x105840
cvtsi2sdl 0x1407120(%rax), %xmm2
mulsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x874b4
leaq -0x7a130(%rbp), %rdx
leaq 0x7e382(%rip), %rdi     # 0x105828
leaq 0x7e02f(%rip), %rsi     # 0x1054dc
callq 0x8afb0
jmp 0x874ce
leaq -0x7a130(%rbp), %rdx
leaq 0x7e36e(%rip), %rdi     # 0x105830
leaq 0x7e017(%rip), %rsi     # 0x1054e0
callq 0x8afb0
jmp 0x874d0
movl -0x7a13c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7a13c(%rbp)
jmp 0x872e9
leaq 0x60f18(%rip), %rdi     # 0xe8403
callq 0x79040
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x87505
movq -0x7a138(%rbp), %rdi
callq 0x52e80
movq 0x7e334(%rip), %rdi     # 0x105840
callq 0x865f0
movq -0x7a148(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x7a160, %rsp          # imm = 0x7A160
popq %rbp
retq
nopl (%rax)