// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/dataset.c
// Function: create_multi_label_dataset
int create_multi_label_dataset(char* datasetname, char* separator, int class_start, char* directoryname, char* filename, char* discretefeatures)
{
 Datasetptr tmp;
 int i;
 char* fname, *st, myline[READLINELENGTH];
 FILE* infile;
 Intervalptr intervals;
 tmp = search_dataset(Datasets, datasetname);
 if (tmp)
  {
  printf(m1120);
  delete_dataset(datasetname);
  }
 tmp = empty_dataset(datasetname, directoryname, filename, separator[0]);
 tmp->datacount = 1;
 tmp->allfeatures = 0;
 tmp->storetype = STORE_MULTILABEL;
 tmp->classdefno = class_start;
 for (i = 0; i < MAXCLASSES; i++)
   tmp->classcounts[i] = 0;
 intervals = create_intervals(discretefeatures);
 fname = dataset_file_name(tmp);
 infile = fopen(fname, "r");
 if (!infile)
  {
   printf(m1121, fname);
   free_dataset(tmp);
   safe_free(fname);
   return 0;
  }
 if (fgets(myline, READLINELENGTH, infile))
  {
   myline[strlen(myline) - 1]='\0';
   st = strtok(myline, separator);
   while (st)
    {
     if (strcmp(st,"?") == 0)
      {
       free_dataset(tmp);
       safe_free(fname);
       printf(m1127);
       return 0;
      }
     if (tmp->allfeatures < class_start)
      {
       if (is_in_interval(intervals, tmp->allfeatures))
         tmp->features[tmp->allfeatures].type = STRING;
       else
         if (isinteger(st))
           tmp->features[tmp->allfeatures].type = INTEGER;
         else
           tmp->features[tmp->allfeatures].type = REAL;
       tmp->features[tmp->allfeatures].selected = YES;
      }
     tmp->allfeatures++;
     st = strtok(NULL, separator);
    }
   if (tmp->allfeatures < class_start + 2)
    {
     free_dataset(tmp);
     safe_free(fname);
     printf(m1125);
     return 0;
    }
   if (tmp->allfeatures <= 1)
    {
     free_dataset(tmp);
     safe_free(fname);
     printf(m1123);
     return 0;
    }
   if (tmp->allfeatures > MAXFEATURES)
    {
     free_dataset(tmp);
     safe_free(fname);
     printf(m1421, tmp->allfeatures);
     return 0;
    }
   tmp->classno = tmp->allfeatures - class_start;
  }
 else
  {
   free_dataset(tmp);
   safe_free(fname);
   printf(m1122);
   return 0;
  }
 while (fgets(myline, READLINELENGTH, infile))
  {
   if (strlen(myline) <= 1)
     continue;
   myline[strlen(myline) - 1] = '\0';
   tmp->datacount++;
   st = strtok(myline, separator);
   i = 0;
   while (st)
    {
     if (strcmp(st, "?") != 0 && i < class_start)
       switch (tmp->features[i].type)
        {
         case  INTEGER:if (!isinteger(st) && isfloat(st))
                         tmp->features[i].type = REAL;
                       break;
        }
     i++;
     st = strtok(NULL, separator);
    }
   if (i != tmp->allfeatures)
    {
     free_dataset(tmp);
     safe_free(fname);
     printf(m1261, tmp->datacount, tmp->allfeatures);
     return 0;
    }
  }
 tmp->allfeatures = class_start;
 tmp->featurecount = tmp->allfeatures;
 for (i = 0; i < tmp->featurecount; i++)
   tmp->availability[i] = 1;
 fclose(infile);
 tmp->active = NO;
 add_dataset(tmp);
 printf(m1126);
 safe_free(fname);
 free_intervals(intervals);
 return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x7a190, %rsp          # imm = 0x7A190
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
leaq 0xe452f(%rip), %rax     # 0x105848
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x1db80
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x21347
leaq 0xc2805(%rip), %rdi     # 0xe3b3c
movb $0x0, %al
callq 0x4030
movq -0x10(%rbp), %rdi
callq 0x21250
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
callq 0x1e640
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl $0x1, 0x1407120(%rax)
movq -0x40(%rbp), %rax
movl $0x0, 0x1b8(%rax)
movq -0x40(%rbp), %rax
movl $0x4, 0x140713c(%rax)
movl -0x1c(%rbp), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x1407128(%rax)
movl $0x0, -0x44(%rbp)
cmpl $0x32, -0x44(%rbp)
jge 0x213c5
movq -0x40(%rbp), %rax
movslq -0x44(%rbp), %rcx
movl $0x0, 0x1407140(%rax,%rcx,4)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x213a1
movq -0x38(%rbp), %rdi
callq 0x46f50
movq %rax, -0x7a190(%rbp)
movq -0x40(%rbp), %rdi
callq 0x1fc90
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
leaq 0xc6db9(%rip), %rsi     # 0xe81a6
callq 0x40c0
movq %rax, -0x7a188(%rbp)
cmpq $0x0, -0x7a188(%rbp)
jne 0x21433
movq -0x50(%rbp), %rsi
leaq 0xc27bd(%rip), %rdi     # 0xe3bcb
movb $0x0, %al
callq 0x4030
movq -0x40(%rbp), %rdi
callq 0x1b710
movq -0x50(%rbp), %rdi
callq 0x52e80
movl $0x0, -0x4(%rbp)
jmp 0x218df
leaq -0x7a180(%rbp), %rdi
movq -0x7a188(%rbp), %rdx
movl $0x7a120, %esi          # imm = 0x7A120
callq 0x40f0
cmpq $0x0, %rax
je 0x216a2
leaq -0x7a180(%rbp), %rdi
callq 0x4150
subq $0x1, %rax
movb $0x0, -0x7a180(%rbp,%rax)
leaq -0x7a180(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4230
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0x215cd
movq -0x58(%rbp), %rdi
leaq 0xc2820(%rip), %rsi     # 0xe3cb7
callq 0x4210
cmpl $0x0, %eax
jne 0x214cd
movq -0x40(%rbp), %rdi
callq 0x1b710
movq -0x50(%rbp), %rdi
callq 0x52e80
leaq 0xc27ff(%rip), %rdi     # 0xe3cb9
movb $0x0, %al
callq 0x4030
movl $0x0, -0x4(%rbp)
jmp 0x218df
movq -0x40(%rbp), %rax
movl 0x1b8(%rax), %eax
cmpl -0x1c(%rbp), %eax
jge 0x215a4
movq -0x7a190(%rbp), %rdi
movq -0x40(%rbp), %rax
movl 0x1b8(%rax), %esi
callq 0x46ef0
cmpl $0x0, %eax
je 0x21522
movq -0x40(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movq -0x40(%rbp), %rcx
movslq 0x1b8(%rcx), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movl $0x1, (%rax)
jmp 0x2157e
movq -0x58(%rbp), %rdi
callq 0x53bd0
cmpl $0x0, %eax
je 0x21557
movq -0x40(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movq -0x40(%rbp), %rcx
movslq 0x1b8(%rcx), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movl $0x0, (%rax)
jmp 0x2157c
movq -0x40(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movq -0x40(%rbp), %rcx
movslq 0x1b8(%rcx), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movl $0x2, (%rax)
jmp 0x2157e
movq -0x40(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movq -0x40(%rbp), %rcx
movslq 0x1b8(%rcx), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movl $0x1, 0x1c(%rax)
movq -0x40(%rbp), %rax
movl 0x1b8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1b8(%rax)
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edi
callq 0x4230
movq %rax, -0x58(%rbp)
jmp 0x21481
movq -0x40(%rbp), %rax
movl 0x1b8(%rax), %eax
movl -0x1c(%rbp), %ecx
addl $0x2, %ecx
cmpl %ecx, %eax
jge 0x2160d
movq -0x40(%rbp), %rdi
callq 0x1b710
movq -0x50(%rbp), %rdi
callq 0x52e80
leaq 0xc26ea(%rip), %rdi     # 0xe3ce4
movb $0x0, %al
callq 0x4030
movl $0x0, -0x4(%rbp)
jmp 0x218df
movq -0x40(%rbp), %rax
cmpl $0x1, 0x1b8(%rax)
jg 0x21646
movq -0x40(%rbp), %rdi
callq 0x1b710
movq -0x50(%rbp), %rdi
callq 0x52e80
leaq 0xc26e6(%rip), %rdi     # 0xe3d19
movb $0x0, %al
callq 0x4030
movl $0x0, -0x4(%rbp)
jmp 0x218df
movq -0x40(%rbp), %rax
cmpl $0x61a8, 0x1b8(%rax)    # imm = 0x61A8
jle 0x2168c
movq -0x40(%rbp), %rdi
callq 0x1b710
movq -0x50(%rbp), %rdi
callq 0x52e80
movq -0x40(%rbp), %rax
movl 0x1b8(%rax), %esi
leaq 0xc26d3(%rip), %rdi     # 0xe3d4c
movb $0x0, %al
callq 0x4030
movl $0x0, -0x4(%rbp)
jmp 0x218df
movq -0x40(%rbp), %rax
movl 0x1b8(%rax), %ecx
subl -0x1c(%rbp), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x216ce
movq -0x40(%rbp), %rdi
callq 0x1b710
movq -0x50(%rbp), %rdi
callq 0x52e80
leaq 0xc26bf(%rip), %rdi     # 0xe3d7a
movb $0x0, %al
callq 0x4030
movl $0x0, -0x4(%rbp)
jmp 0x218df
jmp 0x216d0
leaq -0x7a180(%rbp), %rdi
movq -0x7a188(%rbp), %rdx
movl $0x7a120, %esi          # imm = 0x7A120
callq 0x40f0
cmpq $0x0, %rax
je 0x21841
leaq -0x7a180(%rbp), %rdi
callq 0x4150
cmpq $0x1, %rax
ja 0x21706
jmp 0x216d0
leaq -0x7a180(%rbp), %rdi
callq 0x4150
subq $0x1, %rax
movb $0x0, -0x7a180(%rbp,%rax)
movq -0x40(%rbp), %rax
movl 0x1407120(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1407120(%rax)
leaq -0x7a180(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4230
movq %rax, -0x58(%rbp)
movl $0x0, -0x44(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0x217ed
movq -0x58(%rbp), %rdi
leaq 0xc2555(%rip), %rsi     # 0xe3cb7
callq 0x4210
cmpl $0x0, %eax
je 0x217ce
movl -0x44(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x217ce
movq -0x40(%rbp), %rax
movslq -0x44(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
movl 0x30f08(%rax,%rcx), %eax
testl %eax, %eax
jne 0x217cc
jmp 0x21790
movq -0x58(%rbp), %rdi
callq 0x53bd0
cmpl $0x0, %eax
jne 0x217ca
movq -0x58(%rbp), %rdi
callq 0x53b00
cmpl $0x0, %eax
je 0x217ca
movq -0x40(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x44(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movl $0x2, (%rax)
jmp 0x217cc
jmp 0x217ce
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edi
callq 0x4230
movq %rax, -0x58(%rbp)
jmp 0x2174c
movl -0x44(%rbp), %eax
movq -0x40(%rbp), %rcx
cmpl 0x1b8(%rcx), %eax
je 0x2183c
movq -0x40(%rbp), %rdi
callq 0x1b710
movq -0x50(%rbp), %rdi
callq 0x52e80
movq -0x40(%rbp), %rax
movl 0x1407120(%rax), %esi
movq -0x40(%rbp), %rax
movl 0x1b8(%rax), %edx
leaq 0xc2582(%rip), %rdi     # 0xe3dab
movb $0x0, %al
callq 0x4030
movl $0x0, -0x4(%rbp)
jmp 0x218df
jmp 0x216d0
movl -0x1c(%rbp), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x1b8(%rax)
movq -0x40(%rbp), %rax
movl 0x1b8(%rax), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x1bc(%rax)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x40(%rbp), %rcx
cmpl 0x1bc(%rcx), %eax
jge 0x21896
movq -0x40(%rbp), %rax
movslq -0x44(%rbp), %rcx
movl $0x1, 0x1c4(%rax,%rcx,4)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x21869
movq -0x7a188(%rbp), %rdi
callq 0x4250
movq -0x40(%rbp), %rax
movl $0x0, (%rax)
movq -0x40(%rbp), %rdi
callq 0x1eaf0
leaq 0xc23a7(%rip), %rdi     # 0xe3c63
movb $0x0, %al
callq 0x4030
movq -0x50(%rbp), %rdi
callq 0x52e80
movq -0x7a190(%rbp), %rdi
callq 0x46e50
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x7a190, %rsp          # imm = 0x7A190
popq %rbp
retq
nopl (%rax,%rax)