// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/dataset.c
// Function: extract_definitions_of_dataset
void extract_definitions_of_dataset(char* datasetname)
{
 /*!Last Changed 09.05.2008 added time variant datasets*/
 /*!Last Changed 02.04.2005*/
 /*!Last Changed 31.01.2004*/
 Datasetptr tmp;
 int i, tmpi, framecount;
 FILE* infile;
 char* fname, myline[READLINELENGTH], *st, separators[2];
 double tmpf;
 tmp = search_dataset(Datasets, datasetname);
 if (!tmp)
  {
   printf(m1259, datasetname);
   return;
  }
 sprintf(separators,"%c",tmp->separator);
 fname = dataset_file_name(tmp);
 infile = fopen(fname, "r");
 if (!infile)
   return;
 for (i = 0; i < tmp->featurecount; i++)
   switch (tmp->features[i].type)
    {
     case  INTEGER:tmp->features[i].max.intvalue = -INT_MAX;
                   tmp->features[i].min.intvalue = +INT_MAX;
                   break;
     case     REAL:
     case   REGDEF:tmp->features[i].max.floatvalue = (double) -INT_MAX;
                   tmp->features[i].min.floatvalue = (double) +INT_MAX;
                   break;
     case   STRING:tmp->features[i].valuecount = 0;
                   break;
    }
 tmp->datacount = 0;
 while (fgets(myline, READLINELENGTH, infile))
  {
   myline[strlen(myline) - 1] = '\0';
   st = strtok(myline, separators);
   i = 0;
   if (tmp->storetype == STORE_SEQUENTIAL)
    {
     st = strtok(NULL, separators);
     framecount = atoi(st);
     st = strtok(NULL, separators);
     i++;
    }
   while (st)
    {
     switch (tmp->features[i].type)
      {
       case INTEGER:if (isinteger(st))
                     {
                      tmpi = atoi(st);
                      if (tmpi < tmp->features[i].min.intvalue)
                        tmp->features[i].min.intvalue = tmpi;
                      else
                        if (tmpi > tmp->features[i].max.intvalue)
                          tmp->features[i].max.intvalue = tmpi;
                     }
                    else                      
                      return;
                    break;
       case    REAL:
       case  REGDEF:if (isfloat(st))
                     {
                      tmpf = (double) atof(st);
                      if (tmpf < tmp->features[i].min.floatvalue)
                        tmp->features[i].min.floatvalue = tmpf;
                      else
                        if (tmpf > tmp->features[i].max.floatvalue)
                          tmp->features[i].max.floatvalue = tmpf;
                     }
                    else
                      return;
                    break;
       case  STRING:if (listindex(st, tmp->features[i].strings, tmp->features[i].valuecount) == -1)
                     {
                      tmp->features[i].strings[tmp->features[i].valuecount] = strcopy(tmp->features[i].strings[tmp->features[i].valuecount], st);
                      (tmp->features[i].valuecount)++;
                      if (tmp->features[i].valuecount > MAXVALUES)
                       {
                        printf(m1420, i + 1);
                        exit(0);
                       }
                     }
                    break;  
      }
     st = strtok(NULL, separators);
     i++;
     if (tmp->storetype == STORE_SEQUENTIAL && i == tmp->featurecount)
       i = 1;
    }
   (tmp->datacount)++;
  }
 fclose(infile);
 safe_free(fname);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x7a180, %rsp          # imm = 0x7A180
movq %rdi, -0x8(%rbp)
leaq 0xe5af2(%rip), %rax     # 0x105848
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x1db80
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1fd84
movq -0x8(%rbp), %rsi
leaq 0xc37bc(%rip), %rdi     # 0xe3534
movb $0x0, %al
callq 0x4030
jmp 0x20312
leaq -0x7a15a(%rbp), %rdi
movq -0x10(%rbp), %rax
movsbl 0x1a8(%rax), %edx
leaq 0xc6b7b(%rip), %rsi     # 0xe6918
movb $0x0, %al
callq 0x4170
movq -0x10(%rbp), %rdi
callq 0x1fc90
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
leaq 0xc83ea(%rip), %rsi     # 0xe81a6
callq 0x40c0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x1fdd1
jmp 0x20312
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x1bc(%rcx), %eax
jge 0x1fee4
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
movl 0x30f08(%rax,%rcx), %eax
movq %rax, -0x7a170(%rbp)
subq $0x4, %rax
ja 0x1fed4
movq -0x7a170(%rbp), %rax
leaq 0xc32b8(%rip), %rcx     # 0xe30d8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x14(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movl $0x80000001, 0x10(%rax) # imm = 0x80000001
movq -0x10(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x14(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movl $0x7fffffff, 0x8(%rax)  # imm = 0x7FFFFFFF
jmp 0x1fed4
movq -0x10(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x14(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movsd 0xc217f(%rip), %xmm0    # 0xe2008
movsd %xmm0, 0x10(%rax)
movq -0x10(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x14(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movsd 0xc2162(%rip), %xmm0    # 0xe2010
movsd %xmm0, 0x8(%rax)
jmp 0x1fed4
movq -0x10(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x14(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movl $0x0, 0x18(%rax)
jmp 0x1fed6
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1fdd8
movq -0x10(%rbp), %rax
movl $0x0, 0x1407120(%rax)
leaq -0x7a150(%rbp), %rdi
movq -0x28(%rbp), %rdx
movl $0x7a120, %esi          # imm = 0x7A120
callq 0x40f0
cmpq $0x0, %rax
je 0x20300
leaq -0x7a150(%rbp), %rdi
callq 0x4150
subq $0x1, %rax
movb $0x0, -0x7a150(%rbp,%rax)
leaq -0x7a150(%rbp), %rdi
leaq -0x7a15a(%rbp), %rsi
callq 0x4230
movq %rax, -0x7a158(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, 0x140713c(%rax)
jne 0x1ff9d
leaq -0x7a15a(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edi
callq 0x4230
movq %rax, -0x7a158(%rbp)
movq -0x7a158(%rbp), %rdi
callq 0x41c0
movl %eax, -0x1c(%rbp)
leaq -0x7a15a(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edi
callq 0x4230
movq %rax, -0x7a158(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1ff9f
cmpq $0x0, -0x7a158(%rbp)
je 0x202e8
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
movl 0x30f08(%rax,%rcx), %eax
movq %rax, -0x7a178(%rbp)
subq $0x4, %rax
ja 0x202a0
movq -0x7a178(%rbp), %rax
leaq 0xc30e2(%rip), %rcx     # 0xe30c4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x7a158(%rbp), %rdi
callq 0x53bd0
cmpl $0x0, %eax
je 0x20093
movq -0x7a158(%rbp), %rdi
callq 0x41c0
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
addq $0x30f08, %rcx          # imm = 0x30F08
movslq -0x14(%rbp), %rdx
imulq $0x340, %rdx, %rdx      # imm = 0x340
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
jge 0x20050
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x14(%rbp), %rdx
imulq $0x340, %rdx, %rdx      # imm = 0x340
addq %rdx, %rax
movl %ecx, 0x8(%rax)
jmp 0x20091
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
addq $0x30f08, %rcx          # imm = 0x30F08
movslq -0x14(%rbp), %rdx
imulq $0x340, %rdx, %rdx      # imm = 0x340
addq %rdx, %rcx
cmpl 0x10(%rcx), %eax
jle 0x2008f
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x14(%rbp), %rdx
imulq $0x340, %rdx, %rdx      # imm = 0x340
addq %rdx, %rax
movl %ecx, 0x10(%rax)
jmp 0x20091
jmp 0x20098
jmp 0x20312
jmp 0x202a0
movq -0x7a158(%rbp), %rdi
callq 0x53b00
cmpl $0x0, %eax
je 0x20168
movq -0x7a158(%rbp), %rdi
callq 0x4100
movsd %xmm0, -0x7a168(%rbp)
movsd -0x7a168(%rbp), %xmm1
movq -0x10(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x14(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x20118
movsd -0x7a168(%rbp), %xmm0
movq -0x10(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x14(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
jmp 0x20166
movsd -0x7a168(%rbp), %xmm0
movq -0x10(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x14(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
ucomisd 0x10(%rax), %xmm0
jbe 0x20164
movsd -0x7a168(%rbp), %xmm0
movq -0x10(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x14(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movsd %xmm0, 0x10(%rax)
jmp 0x20166
jmp 0x2016d
jmp 0x20312
jmp 0x202a0
movq -0x7a158(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x30f08, %rsi          # imm = 0x30F08
movslq -0x14(%rbp), %rax
imulq $0x340, %rax, %rax      # imm = 0x340
addq %rax, %rsi
addq $0x20, %rsi
movq -0x10(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x14(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movl 0x18(%rax), %edx
callq 0x54910
cmpl $-0x1, %eax
jne 0x2029e
movq -0x10(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x14(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movq -0x10(%rbp), %rcx
addq $0x30f08, %rcx          # imm = 0x30F08
movslq -0x14(%rbp), %rdx
imulq $0x340, %rdx, %rdx      # imm = 0x340
addq %rdx, %rcx
movslq 0x18(%rcx), %rcx
movq 0x20(%rax,%rcx,8), %rdi
movq -0x7a158(%rbp), %rsi
callq 0x54ba0
movq %rax, %rdx
movq -0x10(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x14(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movq -0x10(%rbp), %rcx
addq $0x30f08, %rcx          # imm = 0x30F08
movslq -0x14(%rbp), %rsi
imulq $0x340, %rsi, %rsi      # imm = 0x340
addq %rsi, %rcx
movslq 0x18(%rcx), %rcx
movq %rdx, 0x20(%rax,%rcx,8)
movq -0x10(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x14(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x14(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
cmpl $0x64, 0x18(%rax)
jle 0x2029c
movl -0x14(%rbp), %esi
addl $0x1, %esi
leaq 0xc32c1(%rip), %rdi     # 0xe354f
movb $0x0, %al
callq 0x4030
xorl %edi, %edi
callq 0x40a0
jmp 0x2029e
jmp 0x202a0
leaq -0x7a15a(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edi
callq 0x4230
movq %rax, -0x7a158(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, 0x140713c(%rax)
jne 0x202e3
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x1bc(%rcx), %eax
jne 0x202e3
movl $0x1, -0x14(%rbp)
jmp 0x1ff9f
movq -0x10(%rbp), %rax
movl 0x1407120(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1407120(%rax)
jmp 0x1fef2
movq -0x28(%rbp), %rdi
callq 0x4250
movq -0x30(%rbp), %rdi
callq 0x52e80
addq $0x7a180, %rsp          # imm = 0x7A180
popq %rbp
retq
nopl (%rax,%rax)