// File: /workspace/github_c_makefile_star2_O3/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 0x9335c(%rip), %rsi     # 0xab96d
movq %rax, %rdi
callq 0x40f0
testq %rax, %rax
je 0x18695
movq %rax, %rbx
leaq 0xbd250(%rip), %rax     # 0xd5878
movq (%rax), %r15
testq %r15, %r15
je 0x18649
movq 0x8(%r15), %rdi
movq %r14, %rsi
callq 0x4260
testl %eax, %eax
je 0x1864c
movq 0x1407270(%r15), %r15
jmp 0x1862b
xorl %r15d, %r15d
leaq 0x8ea68(%rip), %rdi     # 0xa70bb
callq 0x54afc
testl %eax, %eax
je 0x186a4
cmpl $0x1, %eax
jne 0x186c0
cmpl $0x2, 0x10(%r15)
jl 0x186de
leaq 0x8ea62(%rip), %r14     # 0xa70d1
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 0x18672
jmp 0x186e1
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x1407128(%r15), %edx
incl %edx
leaq 0x8ea11(%rip), %rsi     # 0xa70c5
movq %rbx, %rdi
xorl %eax, %eax
callq 0x42e0
jmp 0x186f7
leaq 0x8e9f4(%rip), %rdi     # 0xa70bb
callq 0x54afc
leaq 0x8ea09(%rip), %rdi     # 0xa70dc
movl %eax, %esi
xorl %eax, %eax
callq 0x4030
jmp 0x186f7
xorl %r12d, %r12d
movq 0x18(%r15,%r12,8), %rdx
leaq 0x8e9e9(%rip), %rsi     # 0xa70d6
movq %rbx, %rdi
xorl %eax, %eax
callq 0x42e0
cmpl $0x0, 0x1bc(%r15)
jle 0x18824
leaq 0x30f08(%r15), %rbp
leaq 0x30f28(%r15), %r14
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %rbp, 0x10(%rsp)
movq %r15, 0x8(%rsp)
leaq 0x8e991(%rip), %rdi     # 0xa70bb
callq 0x54afc
testl %eax, %eax
je 0x18745
imulq $0x340, %r12, %rax      # imm = 0x340
cmpl $0x3, (%rbp,%rax)
je 0x1880a
incl %r13d
movq %rbx, %rdi
leaq 0x8e9cc(%rip), %rsi     # 0xa711e
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 0x187ec
leaq 0x8dd9a(%rip), %rcx     # 0xa6514
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0xa, %esi
movl $0x1, %edx
leaq 0x8e996(%rip), %rdi     # 0xa712a
movq %rbx, %rcx
callq 0x42c0
jmp 0x187ec
addq %rbp, %r13
cmpl $0x2, 0x18(%r13)
jl 0x187d3
xorl %ebp, %ebp
leaq 0x8e984(%rip), %r15     # 0xa7135
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 0x187b1
jmp 0x187d5
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 0x8e8d1(%rip), %rdi     # 0xa70ce
movq %rbx, %rcx
callq 0x42c0
movl 0x4(%rsp), %r13d
incq %r12
movslq 0x1bc(%r15), %rax
addq $0x340, %r14            # imm = 0x340
cmpq %rax, %r12
jl 0x18723
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x42a0