// File: /workspace/github_c_makefile_star2_O1/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 0x9089e(%rip), %rsi     # 0xa88a1
movq %rax, %rdi
callq 0x40f0
testq %rax, %rax
je 0x18087
movq %rax, %rbx
leaq 0xba85e(%rip), %rax     # 0xd2878
movq (%rax), %r15
testq %r15, %r15
je 0x1803b
movq 0x8(%r15), %rdi
movq %r14, %rsi
callq 0x4260
testl %eax, %eax
je 0x1803e
movq 0x1407270(%r15), %r15
jmp 0x1801d
xorl %r15d, %r15d
leaq 0x8c034(%rip), %rdi     # 0xa4079
callq 0x535f7
testl %eax, %eax
je 0x18096
cmpl $0x1, %eax
jne 0x180b2
cmpl $0x2, 0x10(%r15)
jl 0x180d0
leaq 0x8c02e(%rip), %r14     # 0xa408f
xorl %r12d, %r12d
movq 0x18(%r15,%r12,8), %rdx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x42e0
incq %r12
movslq 0x10(%r15), %rax
decq %rax
cmpq %rax, %r12
jl 0x18064
jmp 0x180d3
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x1407128(%r15), %edx
incl %edx
leaq 0x8bfdd(%rip), %rsi     # 0xa4083
movq %rbx, %rdi
xorl %eax, %eax
callq 0x42e0
jmp 0x180e9
leaq 0x8bfc0(%rip), %rdi     # 0xa4079
callq 0x535f7
leaq 0x8bfd5(%rip), %rdi     # 0xa409a
movl %eax, %esi
xorl %eax, %eax
callq 0x4030
jmp 0x180e9
xorl %r12d, %r12d
movq 0x18(%r15,%r12,8), %rdx
leaq 0x8bfb5(%rip), %rsi     # 0xa4094
movq %rbx, %rdi
xorl %eax, %eax
callq 0x42e0
cmpl $0x0, 0x1bc(%r15)
jle 0x18216
leaq 0x30f08(%r15), %rbp
leaq 0x30f28(%r15), %r14
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %rbp, 0x10(%rsp)
movq %r15, 0x8(%rsp)
leaq 0x8bf5d(%rip), %rdi     # 0xa4079
callq 0x535f7
testl %eax, %eax
je 0x18137
imulq $0x340, %r12, %rax      # imm = 0x340
cmpl $0x3, (%rbp,%rax)
je 0x181fc
incl %r13d
movq %rbx, %rdi
leaq 0x8bf98(%rip), %rsi     # 0xa40dc
movl %r13d, 0x4(%rsp)
movl %r13d, %edx
xorl %eax, %eax
callq 0x42e0
imulq $0x340, %r12, %r13      # imm = 0x340
movl (%rbp,%r13), %eax
cmpq $0x3, %rax
ja 0x181de
leaq 0x8b328(%rip), %rcx     # 0xa3494
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0xa, %esi
movl $0x1, %edx
leaq 0x8bf62(%rip), %rdi     # 0xa40e8
movq %rbx, %rcx
callq 0x42c0
jmp 0x181de
addq %rbp, %r13
cmpl $0x2, 0x18(%r13)
jl 0x181c5
xorl %ebp, %ebp
leaq 0x8bf50(%rip), %r15     # 0xa40f3
movq (%r14,%rbp,8), %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x42e0
incq %rbp
movslq 0x18(%r13), %rax
decq %rax
cmpq %rax, %rbp
jl 0x181a3
jmp 0x181c7
xorl %ebp, %ebp
movq 0x20(%r13,%rbp,8), %rdi
movq %rbx, %rsi
callq 0x41f0
movq 0x10(%rsp), %rbp
movq 0x8(%rsp), %r15
movl $0x2, %esi
movl $0x1, %edx
leaq 0x8be9d(%rip), %rdi     # 0xa408c
movq %rbx, %rcx
callq 0x42c0
movl 0x4(%rsp), %r13d
incq %r12
movslq 0x1bc(%r15), %rax
addq $0x340, %r14            # imm = 0x340
cmpq %rax, %r12
jl 0x18115
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x42a0