// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/dataset.c
// Function: save_names_file
void save_names_file(char* datasetname, char* namesfile)
{
 /*!Last Changed 19.02.2004 added C5.0 names type*/
 /*!Last Changed 27.10.2003*/
 int i, j, k;
 Datasetptr d;
 FILE* outfile;
 outfile = fopen(namesfile, "w");
 if (!outfile)
   return;
 d = search_dataset(Datasets, datasetname);
 switch (get_parameter_l("namestype"))
  {
   case NAMES_C50   :fprintf(outfile,"Feature%d.\n",d->classdefno + 1);
                     break;
   case NAMES_RIPPER:for (i = 0; i < d->classno-1; i++)
                       fprintf(outfile,"c%s,",d->classes[i]);
                     fprintf(outfile,"c%s.\n",d->classes[i]);
                     break;
   default          :printf(m1239, get_parameter_l("namestype"));
                     break;
  }
 k = 0;
 for (i = 0; i < d->featurecount; i++)
   if (get_parameter_l("namestype") == NAMES_C50 || d->features[i].type != CLASSDEF)
    {
     k++;
     fprintf(outfile,"Feature%d: ",k);
     switch (d->features[i].type)
      {
       case INTEGER :
       case REAL    :fprintf(outfile,"continuous");
                     break;
       case STRING  :
       case CLASSDEF:for (j = 0; j < d->features[i].valuecount-1; j++)
                       fprintf(outfile,"%s, ",d->features[i].strings[j]);
                     fprintf(outfile,"%s",d->features[i].strings[j]);
                     break;
      }
     fprintf(outfile,".\n");
    }
 fclose(outfile);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rax
movq %rdi, %r14
leaq 0x84dee(%rip), %rsi     # 0x9b891
movq %rax, %rdi
callq 0x40f0
testq %rax, %rax
je 0x16b0a
movq %rax, %rbx
leaq 0xb6dbe(%rip), %rax     # 0xcd878
movq (%rax), %rdi
movq %r14, %rsi
callq 0x13da6
movq %rax, %rbp
leaq 0x8058c(%rip), %rdi     # 0x9705b
callq 0x4cf11
testl %eax, %eax
je 0x16b31
cmpl $0x1, %eax
jne 0x16b4c
leaq 0x8058d(%rip), %r14     # 0x97071
xorl %r15d, %r15d
movslq 0x10(%rbp), %rax
decq %rax
cmpq %rax, %r15
jge 0x16b19
movq 0x18(%rbp,%r15,8), %rdx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x42e0
incq %r15
jmp 0x16ae7
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rbp,%r15,8), %rdx
leaq 0x80551(%rip), %rsi     # 0x97076
movq %rbx, %rdi
xorl %eax, %eax
callq 0x42e0
jmp 0x16b68
movl 0x1407128(%rbp), %edx
incl %edx
leaq 0x80525(%rip), %rsi     # 0x97065
movq %rbx, %rdi
xorl %eax, %eax
callq 0x42e0
jmp 0x16b68
leaq 0x80508(%rip), %rdi     # 0x9705b
callq 0x4cf11
leaq 0x8051d(%rip), %rdi     # 0x9707c
movl %eax, %esi
xorl %eax, %eax
callq 0x4030
leaq 0x30f08(%rbp), %rax
movq %rax, (%rsp)
movq %rbp, %r14
addq $0x30f28, %r14          # imm = 0x30F28
leaq 0x80551(%rip), %r13     # 0x970d5
xorl %r15d, %r15d
xorl %r12d, %r12d
movq %rbp, 0x10(%rsp)
movslq 0x1bc(%rbp), %rax
cmpq %rax, %r15
jge 0x16c7f
leaq 0x804b5(%rip), %rdi     # 0x9705b
callq 0x4cf11
testl %eax, %eax
je 0x16bc4
imulq $0x340, %r15, %rax      # imm = 0x340
movq (%rsp), %rcx
cmpl $0x3, (%rcx,%rax)
je 0x16c70
incl %r12d
movq %rbx, %rdi
leaq 0x804ed(%rip), %rsi     # 0x970be
movl %r12d, 0xc(%rsp)
movl %r12d, %edx
xorl %eax, %eax
callq 0x42e0
imulq $0x340, %r15, %r12      # imm = 0x340
movq (%rsp), %rax
movl (%rax,%r12), %eax
cmpq $0x3, %rax
ja 0x16c56
leaq 0x7f898(%rip), %rcx     # 0x96494
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x804be(%rip), %rdi     # 0x970ca
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x42c0
jmp 0x16c56
addq (%rsp), %r12
xorl %ebp, %ebp
movslq 0x18(%r12), %rax
decq %rax
cmpq %rax, %rbp
jge 0x16c45
movq (%r14,%rbp,8), %rdx
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x42e0
incq %rbp
jmp 0x16c22
movq (%r14,%rbp,8), %rdi
movq %rbx, %rsi
callq 0x41f0
movq 0x10(%rsp), %rbp
leaq 0x80411(%rip), %rdi     # 0x9706e
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x42c0
movl 0xc(%rsp), %r12d
incq %r15
addq $0x340, %r14            # imm = 0x340
jmp 0x16b8f
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x42a0