// File: /workspace/github_c_makefile_star2_O3/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, %r12
movq %rdi, %rbx
movl 0x140713c(%rsi), %eax
cmpq $0x4, %rax
movq %rsi, 0x18(%rsp)
ja 0x1694b
leaq 0x8fc24(%rip), %rcx     # 0xa64ec
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movb $0x0, 0xc(%rsp)
movl $0x74786574, 0x8(%rsp)  # imm = 0x74786574
jmp 0x1694b
movabsq $0x62616c69746c756d, %rcx # imm = 0x62616C69746C756D
movq %rcx, 0x8(%rsp)
movl $0x6c6562, 0xf(%rsp)    # imm = 0x6C6562
jmp 0x1694b
movabsq $0x69746e6575716573, %rcx # imm = 0x69746E6575716573
movq %rcx, 0x8(%rsp)
movl $0x6c6169, 0xf(%rsp)    # imm = 0x6C6169
jmp 0x1694b
movl $0x6c656e, 0xb(%rsp)    # imm = 0x6C656E
movl $0x6e72656b, 0x8(%rsp)  # imm = 0x6E72656B
cmpl $0x0, 0x10(%r12)
je 0x16a3f
movq %r12, %r13
addq $0x10, %r12
jmp 0x16974
movabsq $0x6573616261746164, %rcx # imm = 0x6573616261746164
movq %rcx, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movl 0x10(%r12), %r10d
testl %r10d, %r10d
je 0x16a36
addq $0x10, %r12
cmpl $0x4, %eax
je 0x16b0a
cmpl $0x3, %eax
jne 0x16b62
movq 0x18(%rsp), %r13
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 0x90002(%rip), %rsi     # 0xa69ab
leaq 0x10(%rsp), %r9
movq %rbx, %rdi
movb $0x1, %al
pushq %r11
pushq 0x1b0(%r13)
pushq %r10
callq 0x42e0
addq $0x20, %rsp
leaq 0x9006b(%rip), %rdi     # 0xa6a39
movl $0xc, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
cmpl $0x0, 0x1407268(%r13)
jle 0x16a18
leaq 0x90055(%rip), %r15     # 0xa6a46
xorl %r14d, %r14d
movq 0x1407218(%r13,%r14,8), %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x42e0
incq %r14
movslq 0x1407268(%r13), %rax
cmpq %rax, %r14
jl 0x169f4
leaq 0x90040(%rip), %rdi     # 0xa6a5f
movl $0xd, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
jmp 0x16bad
cmpl $0x3, %eax
jne 0x16c26
movl 0x1407120(%r12), %ecx
movq 0x1407118(%r12), %r8
movsbl 0x1a8(%r12), %r10d
movq 0x8(%r12), %rdx
movl 0x1407268(%r12), %r11d
movsd 0x1407130(%r12), %xmm0
subq $0x8, %rsp
leaq 0x9014f(%rip), %rsi     # 0xa6bc9
leaq 0x10(%rsp), %r9
movq %rbx, %rdi
movb $0x1, %al
pushq %r11
pushq 0x1b0(%r12)
pushq %r10
callq 0x42e0
addq $0x20, %rsp
leaq 0x8ff99(%rip), %rdi     # 0xa6a39
movl $0xc, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
cmpl $0x0, 0x1407268(%r12)
jle 0x16aec
leaq 0x8ff82(%rip), %r15     # 0xa6a46
xorl %r14d, %r14d
movq 0x1407218(%r12,%r14,8), %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x42e0
incq %r14
movslq 0x1407268(%r12), %rax
cmpq %rax, %r14
jl 0x16ac7
leaq 0x8ff6c(%rip), %rdi     # 0xa6a5f
movl $0xd, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
jmp 0x16c72
movq 0x18(%rsp), %r13
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 0x8ff2d(%rip), %rsi     # 0xa6a6d
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 0x16bad
movq 0x18(%rsp), %r13
movl 0x1407120(%r13), %ecx
movq 0x1407118(%r13), %r8
movsbl 0x1a8(%r13), %r10d
movq 0x8(%r13), %rdx
movsd 0x1407130(%r13), %xmm0
leaq 0x8ff7e(%rip), %rsi     # 0xa6b0f
leaq 0x8(%rsp), %r9
movq %rbx, %rdi
movb $0x1, %al
pushq 0x1b0(%r13)
pushq %r10
callq 0x42e0
addq $0x10, %rsp
cmpl $0x4, 0x140713c(%r13)
je 0x16c75
leaq 0x8ffca(%rip), %rdi     # 0xa6b8c
movl $0xc, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
cmpl $0x0, (%r12)
jle 0x16c0b
leaq 0x8ffb7(%rip), %r15     # 0xa6b99
xorl %r14d, %r14d
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
movslq 0x10(%r13), %rax
cmpq %rax, %r14
jl 0x16be5
leaq 0x8ffa9(%rip), %rdi     # 0xa6bbb
movl $0xd, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
jmp 0x16c75
movl 0x1407120(%r12), %ecx
movq 0x1407118(%r12), %r8
movsbl 0x1a8(%r12), %r10d
movq 0x8(%r12), %rdx
movsd 0x1407130(%r12), %xmm0
leaq 0x8fffe(%rip), %rsi     # 0xa6c53
leaq 0x8(%rsp), %r9
movq %rbx, %rdi
movb $0x1, %al
pushq 0x1b0(%r12)
pushq %r10
callq 0x42e0
addq $0x10, %rsp
movq %r12, %r13
leaq 0x90050(%rip), %rdi     # 0xa6ccc
movl $0xf, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
cmpl $0x0, 0x1bc(%r13)
jle 0x16dfb
movq %r13, %r12
leaq 0x30f08(%r13), %rcx
leaq 0x30f28(%r13), %r15
leaq 0x900de(%rip), %r13     # 0xa6d92
xorl %ebp, %ebp
movq %rcx, 0x20(%rsp)
imulq $0x340, %rbp, %r14      # imm = 0x340
movl (%rcx,%r14), %eax
cmpq $0x4, %rax
ja 0x16de0
addq %rcx, %r14
leaq 0x8f826(%rip), %rcx     # 0xa6500
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x8(%r14), %edx
movl 0x10(%r14), %ecx
movq %rbx, %rdi
leaq 0x8ffe7(%rip), %rsi     # 0xa6cdc
xorl %eax, %eax
callq 0x42e0
jmp 0x16ddb
movsd 0x8(%r14), %xmm0
movsd 0x10(%r14), %xmm1
movq %rbx, %rdi
leaq 0x900d2(%rip), %rsi     # 0xa6de9
jmp 0x16d2f
movsd 0x8(%r14), %xmm0
movsd 0x10(%r14), %xmm1
movq %rbx, %rdi
leaq 0x8fff0(%rip), %rsi     # 0xa6d1f
movb $0x2, %al
callq 0x42e0
jmp 0x16ddb
movl $0x2e, %esi
movl $0x1, %edx
leaq 0x9006e(%rip), %rdi     # 0xa6dba
movq %rbx, %rcx
callq 0x42c0
cmpl $0x0, 0x18(%r14)
jle 0x16dbd
xorl %r12d, %r12d
movq (%r15,%r12,8), %rdx
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x42e0
incq %r12
movslq 0x18(%r14), %rax
cmpq %rax, %r12
jl 0x16d5e
jmp 0x16dbd
movl $0x2e, %esi
movl $0x1, %edx
leaq 0x8ffd5(%rip), %rdi     # 0xa6d63
movq %rbx, %rcx
callq 0x42c0
cmpl $0x0, 0x18(%r14)
jle 0x16dbd
xorl %r12d, %r12d
movq (%r15,%r12,8), %rdx
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x42e0
incq %r12
movslq 0x18(%r14), %rax
cmpq %rax, %r12
jl 0x16da0
movl $0x10, %esi
movl $0x1, %edx
leaq 0x8ffdb(%rip), %rdi     # 0xa6da9
movq %rbx, %rcx
callq 0x42c0
movq 0x18(%rsp), %r12
movq 0x20(%rsp), %rcx
incq %rbp
movslq 0x1bc(%r12), %rax
addq $0x340, %r15            # imm = 0x340
cmpq %rax, %rbp
jl 0x16cbb
leaq 0x9002d(%rip), %rdi     # 0xa6e2f
movl $0x10, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
leaq 0x90025(%rip), %rdi     # 0xa6e40
movl $0xc, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq