// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xf45d0, %rsp          # imm = 0xF45D0
movb %dil, %al
movb %al, -0x1(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, 0x7f5a9(%rip)     # 0x10527c
movq -0x18(%rbp), %rdi
leaq 0x624e0(%rip), %rsi     # 0xe81be
callq 0x40c0
movq %rax, -0xf45c0(%rbp)
cmpq $0x0, -0xf45c0(%rbp)
jne 0x85d0b
movq -0x18(%rbp), %rsi
leaq 0x5d4c7(%rip), %rdi     # 0xe31c6
movb $0x0, %al
callq 0x4030
jmp 0x8610e
movq -0xf45c0(%rbp), %rdi
leaq 0x62528(%rip), %rsi     # 0xe8241
movb $0x0, %al
callq 0x4280
leaq -0x7a480(%rbp), %rdi
movq 0x7fb22(%rip), %rsi     # 0x105850
callq 0x4220
movq 0x7fb0e(%rip), %rax     # 0x105848
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x860e3
movq -0x20(%rbp), %rdi
leaq -0xf45c8(%rbp), %rsi
callq 0x85c60
movq 0x7faf0(%rip), %rdi     # 0x105850
callq 0x52e80
movq 0x7fae4(%rip), %rdi     # 0x105850
movq -0x10(%rbp), %rsi
callq 0x54ba0
movq %rax, 0x7fad4(%rip)     # 0x105850
movq -0x20(%rbp), %rdi
callq 0x1fc90
movq %rax, -0x7a488(%rbp)
movq -0x7a488(%rbp), %rdi
leaq 0x62424(%rip), %rsi     # 0xe81be
callq 0x40c0
movq %rax, -0xf45c0(%rbp)
cmpq $0x0, -0xf45c0(%rbp)
jne 0x85dc7
movq -0x18(%rbp), %rsi
leaq 0x5d40b(%rip), %rdi     # 0xe31c6
movb $0x0, %al
callq 0x4030
jmp 0x85d3e
movq -0x20(%rbp), %rax
movq %rax, 0x7fa6e(%rip)     # 0x105840
movq -0xf45c0(%rbp), %rdi
movb -0x1(%rbp), %al
movq -0x20(%rbp), %rdx
movq -0xf45c8(%rbp), %rcx
movsbl %al, %esi
callq 0x44c60
movq -0xf45c0(%rbp), %rdi
callq 0x4250
movq -0x7a488(%rbp), %rdi
callq 0x52e80
movq -0xf45c8(%rbp), %rdi
callq 0x44510
movq -0x20(%rbp), %rax
movl 0x1407128(%rax), %eax
movq -0x20(%rbp), %rcx
movl 0x1bc(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
je 0x85f16
movq -0x20(%rbp), %rsi
addq $0x30f08, %rsi          # imm = 0x30F08
movq -0x20(%rbp), %rax
movslq 0x1407128(%rax), %rax
imulq $0x340, %rax, %rax      # imm = 0x340
addq %rax, %rsi
leaq -0x360(%rbp), %rdi
movl $0x340, %edx            # imm = 0x340
callq 0x42b0
movq -0x20(%rbp), %rax
movl 0x1407128(%rax), %eax
movl %eax, -0xf45b4(%rbp)
movl -0xf45b4(%rbp), %eax
movq -0x20(%rbp), %rcx
movl 0x1bc(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x85ee1
movq -0x20(%rbp), %rdi
addq $0x30f08, %rdi          # imm = 0x30F08
movslq -0xf45b4(%rbp), %rax
imulq $0x340, %rax, %rax      # imm = 0x340
addq %rax, %rdi
movq -0x20(%rbp), %rsi
addq $0x30f08, %rsi          # imm = 0x30F08
movl -0xf45b4(%rbp), %eax
addl $0x1, %eax
cltq
imulq $0x340, %rax, %rax      # imm = 0x340
addq %rax, %rsi
movl $0x340, %edx            # imm = 0x340
callq 0x42b0
movl -0xf45b4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xf45b4(%rbp)
jmp 0x85e73
movq -0x20(%rbp), %rdi
addq $0x30f08, %rdi          # imm = 0x30F08
movq -0x20(%rbp), %rax
movl 0x1bc(%rax), %eax
subl $0x1, %eax
cltq
imulq $0x340, %rax, %rax      # imm = 0x340
addq %rax, %rdi
leaq -0x360(%rbp), %rsi
movl $0x340, %edx            # imm = 0x340
callq 0x42b0
movq -0x20(%rbp), %rdi
addq $0x1a8, %rdi            # imm = 0x1A8
leaq -0x1(%rbp), %rsi
callq 0x533a0
movq -0x20(%rbp), %rdi
callq 0x1fbf0
movq %rax, -0x7a490(%rbp)
leaq -0xf45b0(%rbp), %rdi
movq -0x7a490(%rbp), %rdx
leaq 0x5d5dc(%rip), %rsi     # 0xe352b
movb $0x0, %al
callq 0x4170
movq -0x7a490(%rbp), %rdi
callq 0x52e80
leaq -0xf45b0(%rbp), %rdi
callq 0x40d0
movq -0xf45c0(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x20320
movq -0x20(%rbp), %rdi
addq $0x1a8, %rdi            # imm = 0x1A8
leaq -0x1(%rbp), %rsi
callq 0x533a0
movq -0x20(%rbp), %rax
movl 0x1407128(%rax), %eax
movq -0x20(%rbp), %rcx
movl 0x1bc(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
je 0x86093
movq -0x20(%rbp), %rsi
addq $0x30f08, %rsi          # imm = 0x30F08
movq -0x20(%rbp), %rax
movl 0x1bc(%rax), %eax
subl $0x1, %eax
cltq
imulq $0x340, %rax, %rax      # imm = 0x340
addq %rax, %rsi
leaq -0x360(%rbp), %rdi
movl $0x340, %edx            # imm = 0x340
callq 0x42b0
movq -0x20(%rbp), %rax
movl 0x1bc(%rax), %eax
subl $0x1, %eax
movl %eax, -0xf45b4(%rbp)
movl -0xf45b4(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x1407128(%rcx), %eax
jle 0x86062
movq -0x20(%rbp), %rdi
addq $0x30f08, %rdi          # imm = 0x30F08
movslq -0xf45b4(%rbp), %rax
imulq $0x340, %rax, %rax      # imm = 0x340
addq %rax, %rdi
movq -0x20(%rbp), %rsi
addq $0x30f08, %rsi          # imm = 0x30F08
movl -0xf45b4(%rbp), %eax
subl $0x1, %eax
cltq
imulq $0x340, %rax, %rax      # imm = 0x340
addq %rax, %rsi
movl $0x340, %edx            # imm = 0x340
callq 0x42b0
movl -0xf45b4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xf45b4(%rbp)
jmp 0x85ff9
movq -0x20(%rbp), %rdi
addq $0x30f08, %rdi          # imm = 0x30F08
movq -0x20(%rbp), %rax
movslq 0x1407128(%rax), %rax
imulq $0x340, %rax, %rax      # imm = 0x340
addq %rax, %rdi
leaq -0x360(%rbp), %rsi
movl $0x340, %edx            # imm = 0x340
callq 0x42b0
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x621ab(%rip), %rdi     # 0xe824d
movb $0x0, %al
callq 0x4030
movq -0x20(%rbp), %rax
movq 0x1407270(%rax), %rax
movq %rax, -0x20(%rbp)
movq 0x7f791(%rip), %rdi     # 0x105850
callq 0x52e80
movq 0x7f785(%rip), %rdi     # 0x105850
leaq -0x7a480(%rbp), %rsi
callq 0x54ba0
movq %rax, 0x7f772(%rip)     # 0x105850
jmp 0x85d3e
movq -0xf45c0(%rbp), %rdi
leaq 0x62175(%rip), %rsi     # 0xe8266
movb $0x0, %al
callq 0x4280
movq -0xf45c0(%rbp), %rdi
callq 0x4250
movl $0x1, 0x7f16e(%rip)     # 0x10527c
addq $0xf45d0, %rsp          # imm = 0xF45D0
popq %rbp
retq
nopw (%rax,%rax)