// File: /workspace/github_c_makefile_star2_O1/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
cmpl $0x0, 0x1bc(%rdi)
jle 0x137d7
leaq 0x30f08(%rbx), %r14
leaq 0x30f28(%rbx), %r15
xorl %r12d, %r12d
imulq $0x340, %r12, %r13      # imm = 0x340
movl (%r14,%r13), %eax
orl $0x2, %eax
cmpl $0x3, %eax
jne 0x137c1
addq %r14, %r13
cmpl $0x0, 0x18(%r13)
jle 0x137c1
xorl %ebp, %ebp
movq (%r15,%rbp,8), %rdi
callq 0x39194
incq %rbp
movslq 0x18(%r13), %rax
cmpq %rax, %rbp
jl 0x137ac
incq %r12
movslq 0x1bc(%rbx), %rax
addq $0x340, %r15            # imm = 0x340
cmpq %rax, %r12
jl 0x1378d
cmpl $0x4, 0x140713c(%rbx)
je 0x137ff
cmpl $0x0, 0x10(%rbx)
jle 0x137ff
xorl %r14d, %r14d
movq 0x18(%rbx,%r14,8), %rdi
callq 0x39194
incq %r14
movslq 0x10(%rbx), %rax
cmpq %rax, %r14
jl 0x137e9
movq 0x8(%rbx), %rdi
callq 0x39194
movl 0x140713c(%rbx), %esi
cmpq $0x4, %rsi
ja 0x138a4
leaq 0x8fc11(%rip), %rax     # 0xa3430
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x1407118(%rbx), %rdi
testq %rdi, %rdi
je 0x13839
callq 0x39194
movq 0x1b0(%rbx), %rdi
testq %rdi, %rdi
jne 0x1389d
jmp 0x138b2
movq 0x1407118(%rbx), %rdi
testq %rdi, %rdi
je 0x13858
callq 0x39194
movq 0x1b0(%rbx), %rdi
testq %rdi, %rdi
je 0x13869
callq 0x39194
movq 0x1407210(%rbx), %rax
testq %rax, %rax
je 0x138b2
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x3dbad
movq 0x1407210(%rbx), %rdi
jmp 0x1389d
movq 0x1407108(%rbx), %rdi
callq 0x39194
movq 0x1407110(%rbx), %rdi
callq 0x39194
jmp 0x138b2
leaq 0x8ff89(%rip), %rdi     # 0xa3834
xorl %eax, %eax
callq 0x4030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x39194