// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/process.c
// Function: convert_datasets
void convert_datasets(char separator, char* newdatadirectory, char* newinifile)
{
 /*!Last Changed 02.01.2006*/
 /*!Last Changed 02.11.2005*/
 Datasetptr d;
 Feature tmp;
 char tmpdir[READLINELENGTH], *fname, *dname, tmpcommand[READLINELENGTH];
 int i;
 FILE* outfile;
 Instanceptr data;
 convert_missing_values = NO;
 outfile = fopen(newinifile, "w");
 if (!outfile)
  {
   printf(m1248, newinifile);
   return;
  }
 fprintf(outfile, "<datasets>\n");
 strcpy(tmpdir, datadir);
 d = Datasets;
 while (d)
  {
   read_from_train_file(d, &data);
   safe_free(datadir);
   datadir = strcopy(datadir, newdatadirectory);
   fname = dataset_file_name(d);
   outfile = fopen(fname, "w");
   if (!outfile)
    {
     printf(m1248, newinifile);
     continue;
    }
   current_dataset = d;
   print_instance_list(outfile, separator, d, data);
   fclose(outfile);
   safe_free(fname);
   deallocate(data);
   if (d->classdefno != d->featurecount - 1)
    {
     tmp = d->features[d->classdefno];
     for (i = d->classdefno; i < d->featurecount - 1; i++)
       d->features[i] = d->features[i + 1];
     d->features[d->featurecount - 1] = tmp;
    }
   swap_char(&(d->separator), &separator);
   dname = dataset_directory_name(d);
   sprintf(tmpcommand, "mkdir %s", dname);
   safe_free(dname);
   system(tmpcommand);
   save_definitions_of_dataset_as_xml(outfile, d);
   swap_char(&(d->separator), &separator);
   if (d->classdefno != d->featurecount - 1)
    {
     tmp = d->features[d->featurecount - 1];
     for (i = d->featurecount - 1; i > d->classdefno; i--)
       d->features[i] = d->features[i - 1];
     d->features[d->classdefno] = tmp;
    }
   printf(m1225, d->name);
   d = d->next;
   safe_free(datadir);
   datadir = strcopy(datadir, tmpdir);
  }
 fprintf(outfile, "</datasets>\n");
 fclose(outfile);
 convert_missing_values = YES;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf45a8, %rsp          # imm = 0xF45A8
movq %rdx, %rbx
movq %rsi, %r14
movb %dil, 0x7(%rsp)
movl $0x0, 0x77596(%rip)     # 0xd52ac
leaq 0x4dc50(%rip), %rsi     # 0xab96d
movq %rdx, %rdi
callq 0x40f0
testq %rax, %rax
je 0x5e033
movq %rax, %rbp
leaq 0x4dc55(%rip), %rdi     # 0xab98d
movl $0xb, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x42c0
movq 0x77b2f(%rip), %rsi     # 0xd5880
leaq 0x360(%rsp), %rdi
callq 0x4270
movq 0x77b13(%rip), %r15     # 0xd5878
testq %r15, %r15
je 0x5dff6
leaq 0x8(%rsp), %r13
movq %rbx, 0x10(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0x5dcbd
movq 0x77af6(%rip), %rdi     # 0xd5880
callq 0x3a180
movq 0x77aea(%rip), %rdi     # 0xd5880
movq %r14, %rsi
callq 0x3b494
movq %rax, 0x77adb(%rip)     # 0xd5880
movq %r15, %rdi
callq 0x16542
movq %rax, %r12
movq %rax, %rdi
leaq 0x4dbb3(%rip), %rsi     # 0xab96d
callq 0x40f0
testq %rax, %rax
jne 0x5ddd7
leaq 0x4881b(%rip), %rdi     # 0xa65e6
movq %rbx, %rsi
xorl %eax, %eax
callq 0x4030
jmp 0x5dd78
movq %rax, %rbp
movq %r15, 0x77a8f(%rip)     # 0xd5870
movsbl 0x7(%rsp), %esi
movq 0x8(%rsp), %r13
movq %rax, %rdi
movq %r15, %rdx
movq %r13, %rcx
callq 0x304a2
movq %rbp, %rdi
callq 0x42a0
movq %r12, %rdi
callq 0x3a180
movq %r13, %rdi
callq 0x2ff55
movslq 0x1407128(%r15), %r13
movslq 0x1bc(%r15), %rbx
decq %rbx
cmpl %ebx, %r13d
je 0x5dea5
imulq $0x340, %r13, %r12      # imm = 0x340
leaq (%r15,%r12), %rsi
addq $0x30f08, %rsi          # imm = 0x30F08
movl $0x340, %edx            # imm = 0x340
leaq 0x20(%rsp), %rdi
callq 0x4310
cmpl %ebx, %r13d
jge 0x5de85
addq %r15, %r12
addq $0x31248, %r12          # imm = 0x31248
leaq -0x340(%r12), %rdi
incq %r13
movl $0x340, %edx            # imm = 0x340
movq %r12, %rsi
callq 0x4310
movslq 0x1bc(%r15), %rbx
decq %rbx
addq $0x340, %r12            # imm = 0x340
cmpq %rbx, %r13
jl 0x5de57
leaq 0x30f08(%r15), %rax
imulq $0x340, %rbx, %rdi      # imm = 0x340
addq %rax, %rdi
movl $0x340, %edx            # imm = 0x340
leaq 0x20(%rsp), %rsi
callq 0x4310
leaq 0x1a8(%r15), %rdi
movq %rdi, 0x18(%rsp)
leaq 0x7(%rsp), %rbx
movq %rbx, %rsi
callq 0x3a5a6
movq %r15, %rdi
callq 0x164dc
movq %rax, %r12
leaq 0x7a480(%rsp), %r13
movq %r13, %rdi
leaq 0x48a4a(%rip), %rsi     # 0xa6925
movq %rax, %rdx
xorl %eax, %eax
callq 0x41b0
movq %r12, %rdi
callq 0x3a180
movq %r13, %rdi
callq 0x4100
movq %rbp, %rdi
movq %r15, %rsi
callq 0x16898
movq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x3a5a6
movslq 0x1407128(%r15), %rbx
movslq 0x1bc(%r15), %r12
leaq -0x1(%r12), %r13
cmpl %r13d, %ebx
je 0x5dfa3
imulq $0x340, %r13, %rax      # imm = 0x340
leaq (%r15,%rax), %rsi
addq $0x30f08, %rsi          # imm = 0x30F08
movl $0x340, %edx            # imm = 0x340
leaq 0x20(%rsp), %rdi
callq 0x4310
cmpl %ebx, %r13d
jle 0x5df83
imulq $0x340, %r12, %rax      # imm = 0x340
leaq (%r15,%rax), %rdi
addq $0x30bc8, %rdi          # imm = 0x30BC8
leaq -0x340(%rdi), %r12
movl $0x340, %edx            # imm = 0x340
movq %r12, %rsi
callq 0x4310
decq %r13
movslq 0x1407128(%r15), %rbx
movq %r12, %rdi
cmpq %rbx, %r13
jg 0x5df5d
leaq 0x30f08(%r15), %rax
imulq $0x340, %rbx, %rdi      # imm = 0x340
addq %rax, %rdi
movl $0x340, %edx            # imm = 0x340
leaq 0x20(%rsp), %rsi
callq 0x4310
movq 0x8(%r15), %rsi
leaq 0x4d9eb(%rip), %rdi     # 0xab999
xorl %eax, %eax
callq 0x4030
movq 0x1407270(%r15), %r15
movq 0x778bd(%rip), %rdi     # 0xd5880
callq 0x3a180
movq 0x778b1(%rip), %rdi     # 0xd5880
leaq 0x360(%rsp), %rsi
callq 0x3b494
movq %rax, 0x7789d(%rip)     # 0xd5880
testq %r15, %r15
movq 0x10(%rsp), %rbx
leaq 0x8(%rsp), %r13
jne 0x5dd78
leaq 0x4d9b5(%rip), %rdi     # 0xab9b2
movl $0xc, %esi
movl $0x1, %edx
movq %rbp, %rcx
callq 0x42c0
movq %rbp, %rdi
callq 0x42a0
movl $0x1, 0x7728b(%rip)     # 0xd52ac
addq $0xf45a8, %rsp          # imm = 0xF45A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x485ac(%rip), %rdi     # 0xa65e6
movq %rbx, %rsi
xorl %eax, %eax
addq $0xf45a8, %rsp          # imm = 0xF45A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4030