// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/dataset.c
// Function: free_dataset
void free_dataset(Datasetptr dataset)
{
 /*!Last Changed 06.01.2007*/
 /*!Last Changed 29.01.2004*/
 int i, j;
 for (i = 0; i < dataset->featurecount; i++)
   if (dataset->features[i].type == CLASSDEF || dataset->features[i].type == STRING)
     for (j = 0; j < dataset->features[i].valuecount; j++)
       safe_free(dataset->features[i].strings[j]);
 if (dataset->storetype != STORE_MULTILABEL)
   for (i = 0; i < dataset->classno; i++)
     safe_free(dataset->classes[i]);
 safe_free(dataset->name);
 switch (dataset->storetype)
  {
   case       STORE_TEXT:
   case STORE_SEQUENTIAL:
   case STORE_MULTILABEL:if (dataset->directory)
                           safe_free(dataset->directory);
                         if (dataset->file)
                           safe_free(dataset->file);
                         break;
   case       STORE_DB  :safe_free(dataset->dsnname);
                         safe_free(dataset->tablename);
                         break;
   case     STORE_KERNEL:if (dataset->directory)
                           safe_free(dataset->directory);
                         if (dataset->file)
                           safe_free(dataset->file);
                         if (dataset->kernel)
                          {
                           matrix_free(*(dataset->kernel));
                           safe_free(dataset->kernel);
                          }
                         break;
   default              :printf(m1237, dataset->storetype);
                         break;
  }
 safe_free(dataset);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x30f08(%rdi), %r14
leaq 0x30f28(%rdi), %r15
xorl %r12d, %r12d
movslq 0x1bc(%rbx), %rax
cmpq %rax, %r12
jge 0x12789
imulq $0x340, %r12, %r13      # imm = 0x340
movl (%r14,%r13), %eax
orl $0x2, %eax
cmpl $0x3, %eax
jne 0x1277d
addq %r14, %r13
xorl %ebp, %ebp
movslq 0x18(%r13), %rax
cmpq %rax, %rbp
jge 0x1277d
movq (%r15,%rbp,8), %rdi
callq 0x34ff7
incq %rbp
jmp 0x12766
incq %r12
addq $0x340, %r15            # imm = 0x340
jmp 0x12742
cmpl $0x4, 0x140713c(%rbx)
jne 0x127dd
movq 0x8(%rbx), %rdi
callq 0x34ff7
movl 0x140713c(%rbx), %esi
cmpq $0x4, %rsi
ja 0x12855
leaq 0x83c7e(%rip), %rax     # 0x96430
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x1407118(%rbx), %rdi
testq %rdi, %rdi
je 0x127cc
callq 0x34ff7
movq 0x1b0(%rbx), %rdi
testq %rdi, %rdi
jne 0x1284e
jmp 0x12863
xorl %r14d, %r14d
movslq 0x10(%rbx), %rax
cmpq %rax, %r14
jge 0x12792
movq 0x18(%rbx,%r14,8), %rdi
callq 0x34ff7
incq %r14
jmp 0x127e0
movq 0x1407118(%rbx), %rdi
testq %rdi, %rdi
je 0x12809
callq 0x34ff7
movq 0x1b0(%rbx), %rdi
testq %rdi, %rdi
je 0x1281a
callq 0x34ff7
movq 0x1407210(%rbx), %rax
testq %rax, %rax
je 0x12863
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x3929f
movq 0x1407210(%rbx), %rdi
jmp 0x1284e
movq 0x1407108(%rbx), %rdi
callq 0x34ff7
movq 0x1407110(%rbx), %rdi
callq 0x34ff7
jmp 0x12863
leaq 0x83fbc(%rip), %rdi     # 0x96818
xorl %eax, %eax
callq 0x4030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x34ff7