// File: /workspace/github_c_makefile_star2_O3/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
movl 0x1bc(%rdi), %eax
testl %eax, %eax
jle 0x137e0
leaq 0x30f08(%rbx), %r14
leaq 0x30f28(%rbx), %r15
xorl %r12d, %r12d
imulq $0x340, %r12, %r13      # imm = 0x340
movl (%r14,%r13), %ecx
orl $0x2, %ecx
cmpl $0x3, %ecx
jne 0x137ce
addq %r14, %r13
cmpl $0x0, 0x18(%r13)
jle 0x137ce
xorl %ebp, %ebp
movq (%r15,%rbp,8), %rdi
callq 0x3a180
incq %rbp
movslq 0x18(%r13), %rax
cmpq %rax, %rbp
jl 0x137b3
movl 0x1bc(%rbx), %eax
incq %r12
movslq %eax, %rcx
addq $0x340, %r15            # imm = 0x340
cmpq %rcx, %r12
jl 0x13794
cmpl $0x4, 0x140713c(%rbx)
je 0x13808
cmpl $0x0, 0x10(%rbx)
jle 0x13808
xorl %r14d, %r14d
movq 0x18(%rbx,%r14,8), %rdi
callq 0x3a180
incq %r14
movslq 0x10(%rbx), %rax
cmpq %rax, %r14
jl 0x137f2
movq 0x8(%rbx), %rdi
callq 0x3a180
movl 0x140713c(%rbx), %esi
cmpq $0x4, %rsi
ja 0x138ad
leaq 0x92c88(%rip), %rax     # 0xa64b0
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x1407118(%rbx), %rdi
testq %rdi, %rdi
je 0x13842
callq 0x3a180
movq 0x1b0(%rbx), %rdi
testq %rdi, %rdi
jne 0x138a6
jmp 0x138bb
movq 0x1407118(%rbx), %rdi
testq %rdi, %rdi
je 0x13861
callq 0x3a180
movq 0x1b0(%rbx), %rdi
testq %rdi, %rdi
je 0x13872
callq 0x3a180
movq 0x1407210(%rbx), %rax
testq %rax, %rax
je 0x138bb
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x3ed51
movq 0x1407210(%rbx), %rdi
jmp 0x138a6
movq 0x1407108(%rbx), %rdi
callq 0x3a180
movq 0x1407110(%rbx), %rdi
callq 0x3a180
jmp 0x138bb
leaq 0x92fc4(%rip), %rdi     # 0xa6878
xorl %eax, %eax
callq 0x4030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3a180