// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/dataset.c
// Function: save_definitions_of_dataset_as_xml
void save_definitions_of_dataset_as_xml(FILE* outfile, Datasetptr d)
{
 int i, j;
 char filetype[11];
 switch (d->storetype)
  {
   case         STORE_DB:strcpy(filetype, "database");
                         break;
   case       STORE_TEXT:strcpy(filetype, "text");
                         break;
   case STORE_SEQUENTIAL:strcpy(filetype, "sequential");
                         break;
   case     STORE_KERNEL:strcpy(filetype, "kernel");
                         break;
   case STORE_MULTILABEL:strcpy(filetype, "multilabel");
                         break;
  }
 if (d->classno != 0)
  {
   if (d->storetype == STORE_KERNEL)
    {
     fprintf(outfile, "\t<dataset name=\"%s\" task=\"classification\" size=\"%d\" directory=\"%s\" filetype=\"%s\" separator=\"%c\" filename=\"%s\" kernelcount=\"%d\" sigma=\"%.6f\">\n", d->name, d->datacount, d->directory, filetype, d->separator, d->file, d->kernelcount, d->sigma);
     fprintf(outfile, "\t\t<kernels>\n");
     for (i = 0; i < d->kernelcount; i++)
       fprintf(outfile, "\t\t\t<kernel value=\"%s\"/>\n", d->kernelfiles[i]);
     fprintf(outfile, "\t\t</kernels>\n");
    }
   else
     if (d->storetype == STORE_MULTILABEL)
       fprintf(outfile, "\t<dataset name=\"%s\" task=\"classification\" size=\"%d\" directory=\"%s\" filetype=\"%s\" separator=\"%c\" filename=\"%s\" classcount=\"%d\" classlabelstart=\"%d\" sigma=\"%.6f\">\n", d->name, d->datacount, d->directory, filetype, d->separator, d->file, d->classno, d->classdefno, d->sigma);
     else
       fprintf(outfile, "\t<dataset name=\"%s\" task=\"classification\" size=\"%d\" directory=\"%s\" filetype=\"%s\" separator=\"%c\" filename=\"%s\" sigma=\"%.6f\">\n", d->name, d->datacount, d->directory, filetype, d->separator, d->file, d->sigma);
   if (d->storetype != STORE_MULTILABEL)
    {
     fprintf(outfile, "\t\t<classes>\n");
     for (i = 0; i < d->classno; i++)
       fprintf(outfile, "\t\t\t<class value=\"%s\" size=\"%d\"/>\n", d->classes[i], d->classcounts[i]);
     fprintf(outfile, "\t\t</classes>\n");
    }
  }
 else
  {
   if (d->storetype == STORE_KERNEL)
    {
     fprintf(outfile, "\t<dataset name=\"%s\" task=\"regression\" size=\"%d\" directory=\"%s\" filetype=\"%s\" separator=\"%c\" filename=\"%s\" kernelcount=\"%d\" sigma=\"%.6f\">\n", d->name, d->datacount, d->directory, filetype, d->separator, d->file, d->kernelcount, d->sigma);
     fprintf(outfile, "\t\t<kernels>\n");
     for (i = 0; i < d->kernelcount; i++)
       fprintf(outfile, "\t\t\t<kernel value=\"%s\"/>\n", d->kernelfiles[i]);
     fprintf(outfile, "\t\t</kernels>\n");
    }
   else
     fprintf(outfile, "\t<dataset name=\"%s\" task=\"regression\" size=\"%d\" directory=\"%s\" filetype=\"%s\" separator=\"%c\" filename=\"%s\" sigma=\"%.6f\">\n", d->name, d->datacount, d->directory, filetype, d->separator, d->file, d->sigma);
  }
 fprintf(outfile, "\t\t<attributes>\n");
 for (i = 0; i < d->featurecount; i++)
   switch (d->features[i].type){
     case    INTEGER:fprintf(outfile, "\t\t\t<attribute type=\"Integer\" available=\"True\" min=\"%d\" max=\"%d\"/>\n", d->features[i].min.intvalue, d->features[i].max.intvalue);
                     break;
     case       REAL:fprintf(outfile, "\t\t\t<attribute type=\"Real\" available=\"True\" min=\"%.6f\" max=\"%.6f\"/>\n", d->features[i].min.floatvalue, d->features[i].max.floatvalue);
                     break;
     case     STRING:fprintf(outfile, "\t\t\t<attribute type=\"String\" available=\"True\">\n");
                     for (j = 0; j < d->features[i].valuecount; j++)
                       fprintf(outfile, "\t\t\t\t<value>%s</value>\n", d->features[i].strings[j]);
                     fprintf(outfile, "\t\t\t</attribute>\n");
                     break;
     case   CLASSDEF:fprintf(outfile, "\t\t\t<attribute type=\"Output\" available=\"True\">\n");
                     for (j = 0; j < d->features[i].valuecount; j++)
                       fprintf(outfile, "\t\t\t\t<value>%s</value>\n", d->features[i].strings[j]);
                     fprintf(outfile, "\t\t\t</attribute>\n");
                     break;
     case     REGDEF:fprintf(outfile, "\t\t\t<attribute type=\"Output\" available=\"True\" min=\"%.6f\" max=\"%.6f\"/>\n", d->features[i].min.floatvalue, d->features[i].max.floatvalue);
                     break;
    }
 fprintf(outfile, "\t\t</attributes>\n");
 fprintf(outfile, "\t</dataset>\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r13
movq %rdi, %rbx
movl 0x140713c(%rsi), %eax
cmpq $0x4, %rax
ja 0x1534c
leaq 0x8119f(%rip), %rcx     # 0x9646c
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movb $0x0, 0xc(%rsp)
movl $0x74786574, 0x8(%rsp)  # imm = 0x74786574
jmp 0x1534c
movabsq $0x62616c69746c756d, %rcx # imm = 0x62616C69746C756D
movq %rcx, 0x8(%rsp)
movl $0x6c6562, 0xf(%rsp)    # imm = 0x6C6562
jmp 0x1534c
movabsq $0x69746e6575716573, %rcx # imm = 0x69746E6575716573
movq %rcx, 0x8(%rsp)
movl $0x6c6169, 0xf(%rsp)    # imm = 0x6C6169
jmp 0x1534c
movl $0x6c656e, 0xb(%rsp)    # imm = 0x6C656E
movl $0x6e72656b, 0x8(%rsp)  # imm = 0x6E72656B
cmpl $0x0, 0x10(%r13)
je 0x15414
leaq 0x10(%r13), %r12
jmp 0x1536f
movabsq $0x6573616261746164, %rcx # imm = 0x6573616261746164
movq %rcx, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movl 0x10(%r13), %r10d
testl %r10d, %r10d
je 0x1540b
leaq 0x10(%r13), %r12
cmpl $0x4, %eax
je 0x154d2
cmpl $0x3, %eax
jne 0x15525
movl 0x1407120(%r13), %ecx
movq 0x1407118(%r13), %r8
movsbl 0x1a8(%r13), %r10d
movq 0x8(%r13), %rdx
movl 0x1407268(%r13), %r11d
movsd 0x1407130(%r13), %xmm0
subq $0x8, %rsp
leaq 0x815a7(%rip), %rsi     # 0x9694b
leaq 0x10(%rsp), %r9
movq %rbx, %rdi
movb $0x1, %al
pushq %r11
pushq 0x1b0(%r13)
pushq %r10
callq 0x42e0
addq $0x20, %rsp
leaq 0x81610(%rip), %rdi     # 0x969d9
pushq $0xc
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x42c0
leaq 0x81608(%rip), %r15     # 0x969e6
xorl %r14d, %r14d
movslq 0x1407268(%r13), %rax
cmpq %rax, %r14
jge 0x154ac
movq 0x1407218(%r13,%r14,8), %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x42e0
incq %r14
jmp 0x153e1
cmpl $0x3, %eax
jne 0x155d5
movl 0x1407120(%r13), %ecx
movq 0x1407118(%r13), %r8
movsbl 0x1a8(%r13), %r10d
movq 0x8(%r13), %rdx
movl 0x1407268(%r13), %r11d
movsd 0x1407130(%r13), %xmm0
subq $0x8, %rsp
leaq 0x81720(%rip), %rsi     # 0x96b69
leaq 0x10(%rsp), %r9
movq %rbx, %rdi
movb $0x1, %al
pushq %r11
pushq 0x1b0(%r13)
pushq %r10
callq 0x42e0
addq $0x20, %rsp
leaq 0x8156b(%rip), %rdi     # 0x969d9
pushq $0xc
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x42c0
leaq 0x81563(%rip), %r15     # 0x969e6
xorl %r14d, %r14d
movslq 0x1407268(%r13), %rax
cmpq %rax, %r14
jge 0x154c6
movq 0x1407218(%r13,%r14,8), %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x42e0
incq %r14
jmp 0x15486
leaq 0x8154c(%rip), %rdi     # 0x969ff
pushq $0xd
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x42c0
jmp 0x15569
leaq 0x81532(%rip), %rdi     # 0x969ff
jmp 0x155c5
movl 0x1407120(%r13), %ecx
movq 0x1407118(%r13), %r8
movsbl 0x1a8(%r13), %r11d
movq 0x8(%r13), %rdx
movl 0x1407128(%r13), %r14d
movsd 0x1407130(%r13), %xmm0
leaq 0x8150a(%rip), %rsi     # 0x96a0d
leaq 0x8(%rsp), %r9
movq %rbx, %rdi
movb $0x1, %al
pushq %r14
pushq %r10
pushq 0x1b0(%r13)
pushq %r11
callq 0x42e0
addq $0x20, %rsp
jmp 0x15569
movl 0x1407120(%r13), %ecx
movq 0x1407118(%r13), %r8
movsbl 0x1a8(%r13), %r10d
movq 0x8(%r13), %rdx
movsd 0x1407130(%r13), %xmm0
leaq 0x81560(%rip), %rsi     # 0x96aaf
leaq 0x8(%rsp), %r9
movq %rbx, %rdi
movb $0x1, %al
pushq 0x1b0(%r13)
pushq %r10
callq 0x42e0
popq %rcx
popq %rdx
cmpl $0x4, 0x140713c(%r13)
je 0x15619
leaq 0x815ae(%rip), %rdi     # 0x96b2c
pushq $0xc
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x42c0
leaq 0x815a6(%rip), %r15     # 0x96b39
xorl %r14d, %r14d
movslq (%r12), %rax
cmpq %rax, %r14
jge 0x155be
movq 0x18(%r13,%r14,8), %rdx
movl 0x1407140(%r13,%r14,4), %ecx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x42e0
incq %r14
jmp 0x15596
leaq 0x81596(%rip), %rdi     # 0x96b5b
pushq $0xd
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x42c0
jmp 0x15619
movl 0x1407120(%r13), %ecx
movq 0x1407118(%r13), %r8
movsbl 0x1a8(%r13), %r10d
movq 0x8(%r13), %rdx
movsd 0x1407130(%r13), %xmm0
leaq 0x815f4(%rip), %rsi     # 0x96bf3
leaq 0x8(%rsp), %r9
movq %rbx, %rdi
movb $0x1, %al
pushq 0x1b0(%r13)
pushq %r10
callq 0x42e0
popq %rcx
popq %rdx
leaq 0x8164c(%rip), %rdi     # 0x96c6c
pushq $0xf
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x42c0
leaq 0x30f08(%r13), %rcx
leaq 0x30f28(%r13), %rbp
leaq 0x816ef(%rip), %r12     # 0x96d32
xorl %r15d, %r15d
movq %r13, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movslq 0x1bc(%r13), %rax
cmpq %rax, %r15
jge 0x1577e
imulq $0x340, %r15, %r14      # imm = 0x340
movl (%rcx,%r14), %eax
cmpq $0x4, %rax
ja 0x1576f
addq %rcx, %r14
leaq 0x80e01(%rip), %rcx     # 0x96480
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x8(%r14), %edx
movl 0x10(%r14), %ecx
movq %rbx, %rdi
leaq 0x815e2(%rip), %rsi     # 0x96c7c
xorl %eax, %eax
callq 0x42e0
jmp 0x1576a
movsd 0x8(%r14), %xmm0
movsd 0x10(%r14), %xmm1
movq %rbx, %rdi
leaq 0x816cd(%rip), %rsi     # 0x96d89
jmp 0x156d4
movsd 0x8(%r14), %xmm0
movsd 0x10(%r14), %xmm1
movq %rbx, %rdi
leaq 0x815eb(%rip), %rsi     # 0x96cbf
movb $0x2, %al
callq 0x42e0
jmp 0x1576a
leaq 0x81673(%rip), %rdi     # 0x96d5a
pushq $0x2e
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x42c0
xorl %r13d, %r13d
movslq 0x18(%r14), %rax
cmpq %rax, %r13
jge 0x15750
movq (%rbp,%r13,8), %rdx
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x42e0
incq %r13
jmp 0x156f8
leaq 0x815e4(%rip), %rdi     # 0x96d03
pushq $0x2e
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x42c0
xorl %r13d, %r13d
movslq 0x18(%r14), %rax
cmpq %rax, %r13
jge 0x15750
movq (%rbp,%r13,8), %rdx
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x42e0
incq %r13
jmp 0x15730
leaq 0x815f2(%rip), %rdi     # 0x96d49
pushq $0x10
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x42c0
movq 0x20(%rsp), %r13
movq 0x18(%rsp), %rcx
incq %r15
addq $0x340, %rbp            # imm = 0x340
jmp 0x15650
leaq 0x8164a(%rip), %rdi     # 0x96dcf
pushq $0x10
popq %rsi
pushq $0x1
popq %r14
movq %r14, %rdx
movq %rbx, %rcx
callq 0x42c0
leaq 0x81642(%rip), %rdi     # 0x96de0
pushq $0xc
popq %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x42c0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq