// File: /workspace/github_c_makefile_star2_O1/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
ja 0x16691
leaq 0x8ce4b(%rip), %rcx     # 0xa346c
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movb $0x0, 0xc(%rsp)
movl $0x74786574, 0x8(%rsp)  # imm = 0x74786574
jmp 0x16691
movabsq $0x62616c69746c756d, %rcx # imm = 0x62616C69746C756D
movq %rcx, 0x8(%rsp)
movl $0x6c6562, 0xf(%rsp)    # imm = 0x6C6562
jmp 0x16691
movabsq $0x69746e6575716573, %rcx # imm = 0x69746E6575716573
movq %rcx, 0x8(%rsp)
movl $0x6c6169, 0xf(%rsp)    # imm = 0x6C6169
jmp 0x16691
movl $0x6c656e, 0xb(%rsp)    # imm = 0x6C656E
movl $0x6e72656b, 0x8(%rsp)  # imm = 0x6E72656B
jmp 0x16691
movabsq $0x6573616261746164, %rcx # imm = 0x6573616261746164
movq %rcx, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movl 0x10(%r12), %r14d
testl %r14d, %r14d
je 0x1677e
movq 0x8(%r12), %rdx
movq 0x1b0(%r12), %r11
movl 0x1407120(%r12), %ecx
movq 0x1407118(%r12), %r8
movsbl 0x1a8(%r12), %r10d
cmpl $0x4, %eax
je 0x16842
cmpl $0x3, %eax
jne 0x16878
movl 0x1407268(%r12), %r14d
movsd 0x1407130(%r12), %xmm0
subq $0x8, %rsp
leaq 0x8d273(%rip), %rsi     # 0xa3967
leaq 0x10(%rsp), %r9
movq %rbx, %rdi
movb $0x1, %al
pushq %r14
pushq %r11
pushq %r10
callq 0x42e0
addq $0x20, %rsp
leaq 0x8d2e1(%rip), %rdi     # 0xa39f5
movl $0xc, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
cmpl $0x0, 0x1407268(%r12)
jle 0x16760
leaq 0x8d2ca(%rip), %r15     # 0xa3a02
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 0x1673b
leaq 0x8d2b4(%rip), %rdi     # 0xa3a1b
movl $0xd, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
jmp 0x168a0
movq 0x8(%r12), %rdx
movq 0x1b0(%r12), %r11
movl 0x1407120(%r12), %ecx
movq 0x1407118(%r12), %r8
movsbl 0x1a8(%r12), %r10d
cmpl $0x3, %eax
jne 0x1691c
movl 0x1407268(%r12), %r14d
movsd 0x1407130(%r12), %xmm0
subq $0x8, %rsp
leaq 0x8d3bb(%rip), %rsi     # 0xa3b85
leaq 0x10(%rsp), %r9
movq %rbx, %rdi
movb $0x1, %al
pushq %r14
pushq %r11
pushq %r10
callq 0x42e0
addq $0x20, %rsp
leaq 0x8d20b(%rip), %rdi     # 0xa39f5
movl $0xc, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
cmpl $0x0, 0x1407268(%r12)
jle 0x16836
leaq 0x8d1f4(%rip), %r15     # 0xa3a02
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 0x16811
leaq 0x8d1de(%rip), %rdi     # 0xa3a1b
jmp 0x16908
movl 0x1407128(%r12), %r15d
movsd 0x1407130(%r12), %xmm0
leaq 0x8d1ce(%rip), %rsi     # 0xa3a29
leaq 0x8(%rsp), %r9
movq %rbx, %rdi
movb $0x1, %al
pushq %r15
pushq %r14
pushq %r11
pushq %r10
callq 0x42e0
addq $0x20, %rsp
jmp 0x168a0
movsd 0x1407130(%r12), %xmm0
leaq 0x8d242(%rip), %rsi     # 0xa3acb
leaq 0x8(%rsp), %r9
movq %rbx, %rdi
movb $0x1, %al
pushq %r11
pushq %r10
callq 0x42e0
addq $0x10, %rsp
cmpl $0x4, 0x140713c(%r12)
je 0x16944
leaq 0x8d292(%rip), %rdi     # 0xa3b48
movl $0xc, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
cmpl $0x0, 0x10(%r12)
jle 0x16901
leaq 0x8d27e(%rip), %r15     # 0xa3b55
xorl %r14d, %r14d
movq 0x18(%r12,%r14,8), %rdx
movl 0x1407140(%r12,%r14,4), %ecx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x42e0
incq %r14
movslq 0x10(%r12), %rax
cmpq %rax, %r14
jl 0x168da
leaq 0x8d26f(%rip), %rdi     # 0xa3b77
movl $0xd, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
jmp 0x16944
movsd 0x1407130(%r12), %xmm0
leaq 0x8d2e2(%rip), %rsi     # 0xa3c0f
leaq 0x8(%rsp), %r9
movq %rbx, %rdi
movb $0x1, %al
pushq %r11
pushq %r10
callq 0x42e0
addq $0x10, %rsp
leaq 0x8d33d(%rip), %rdi     # 0xa3c88
movl $0xf, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
cmpl $0x0, 0x1bc(%r12)
jle 0x16acf
leaq 0x30f08(%r12), %rcx
leaq 0x30f28(%r12), %r15
leaq 0x8d3cb(%rip), %r13     # 0xa3d4e
xorl %ebp, %ebp
movq %r12, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
imulq $0x340, %rbp, %r14      # imm = 0x340
movl (%rcx,%r14), %eax
cmpq $0x4, %rax
ja 0x16ab4
addq %rcx, %r14
leaq 0x8cad2(%rip), %rcx     # 0xa3480
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x8(%r14), %edx
movl 0x10(%r14), %ecx
movq %rbx, %rdi
leaq 0x8d2cf(%rip), %rsi     # 0xa3c98
xorl %eax, %eax
callq 0x42e0
jmp 0x16aaf
movsd 0x8(%r14), %xmm0
movsd 0x10(%r14), %xmm1
movq %rbx, %rdi
leaq 0x8d3ba(%rip), %rsi     # 0xa3da5
jmp 0x16a03
movsd 0x8(%r14), %xmm0
movsd 0x10(%r14), %xmm1
movq %rbx, %rdi
leaq 0x8d2d8(%rip), %rsi     # 0xa3cdb
movb $0x2, %al
callq 0x42e0
jmp 0x16aaf
movl $0x2e, %esi
movl $0x1, %edx
leaq 0x8d356(%rip), %rdi     # 0xa3d76
movq %rbx, %rcx
callq 0x42c0
cmpl $0x0, 0x18(%r14)
jle 0x16a91
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 0x16a32
jmp 0x16a91
movl $0x2e, %esi
movl $0x1, %edx
leaq 0x8d2bd(%rip), %rdi     # 0xa3d1f
movq %rbx, %rcx
callq 0x42c0
cmpl $0x0, 0x18(%r14)
jle 0x16a91
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 0x16a74
movl $0x10, %esi
movl $0x1, %edx
leaq 0x8d2c3(%rip), %rdi     # 0xa3d65
movq %rbx, %rcx
callq 0x42c0
movq 0x20(%rsp), %r12
movq 0x18(%rsp), %rcx
incq %rbp
movslq 0x1bc(%r12), %rax
addq $0x340, %r15            # imm = 0x340
cmpq %rax, %rbp
jl 0x1698f
leaq 0x8d315(%rip), %rdi     # 0xa3deb
movl $0x10, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
leaq 0x8d30d(%rip), %rdi     # 0xa3dfc
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