// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/instance.c
// Function: print_instance
void print_instance(FILE* outfile, char s, Datasetptr d, Instanceptr currentinstance)
{
 /*!Last Changed 13.02.2008 added regression datasets for !mustrealize*/
 /*!Last Changed 16.10.2005 updated to include the new namestype classatend*/
	/*!Last Changed 13.10.2004 updated to include the new namestype classic*/
	/*!Last Changed 10.03.2004 extended to regression*/
	/*!Last Changed 28.10.2003*/
	int i, sindex;
	double value;
	char pst[READLINELENGTH];
	if (!mustrealize)
	 {
   for (i = 0; i < d->featurecount; i++)
				 if (d->features[i].selected)
					 {
       switch (d->features[i].type)
					   {
         case  INTEGER:if (currentinstance->values[i].intvalue == ISELL)
					    			         			 fprintf(outfile,"?%c", s);
             						    else
             						      fprintf(outfile,"%d%c", currentinstance->values[i].intvalue, s);
             						    break;
  		  			case   REGDEF:
         case     REAL:if (currentinstance->values[i].floatvalue == ISELL)
             											 fprintf(outfile,"?%c", s);
             										else
             												fprintf(outfile, "%5.6f%c", currentinstance->values[i].floatvalue, s);
             						    break;
         case   STRING:
	    				case CLASSDEF:if (in_list(get_parameter_l("namestype"), 3, NAMES_RIPPER, NAMES_CLASSATEND, NAMES_AYSU) && d->features[i].type == CLASSDEF)
		    																			continue;
			  	  											    sindex = currentinstance->values[i].stringindex;
             						    if (sindex == -1)
             												fprintf(outfile, "?%c", s);
           	  									else
           			  			      fprintf(outfile, "%s%c", d->features[i].strings[sindex], s);
           					  	    break;
         default      :printf(m1238, d->features[i].type);
                       break;
					   }
				  }
   if (d->classno != 0)
    {/*Classification*/
     sindex = give_classno(currentinstance);
     if (sindex != -1 && in_list(get_parameter_l("namestype"), 3, NAMES_RIPPER, NAMES_CLASSATEND, NAMES_AYSU))
      {
       if (get_parameter_l("namestype") == NAMES_RIPPER)
         fprintf(outfile, "c%s", d->features[d->classdefno].strings[sindex]);
       else
         if (get_parameter_l("namestype") == NAMES_CLASSATEND)
           fprintf(outfile,"%s", d->features[d->classdefno].strings[sindex]);
         else
           fprintf(outfile,"%d", sindex);     
      }
    }
	 }
	else
	 {
		 for (i = 0; i < d->multifeaturecount - 1; i++)
				 if (d->selected[i])
					 {
				   value = real_feature(currentinstance, i);
       if (value == ISELL)
         fprintf(outfile, "?%c", s);
       else
							 {
								 if (get_parameter_l("namestype") == NAMES_CMU && i == d->multifeaturecount - 2)
									 {
										 set_precision(pst, NULL, "=>");
           fprintf(outfile, pst, value);
									 }
									else
									 {
										 set_precision(pst, NULL, "%c");
           fprintf(outfile, pst, value, s);
									 }
							 }
					 }
			if (d->classno != 0)
			 {/*Classification*/
     sindex = give_classno(currentinstance);
	  		if (in_list(get_parameter_l("namestype"), 2, NAMES_RIPPER, NAMES_CLASSATEND))
		  		 exchange_classdefno(current_dataset);
	  		if (get_parameter_l("namestype") == NAMES_RIPPER)
    			fprintf(outfile, "c%s", d->features[d->classdefno].strings[sindex]);
		  	else
			  	 if (get_parameter_l("namestype") == NAMES_CLASSATEND)
  		  			fprintf(outfile, "%s", d->features[d->classdefno].strings[sindex]);
		  			else
			  			 if (in_list(get_parameter_l("namestype"), 3, NAMES_C50, NAMES_CLASSIC, NAMES_AYSU))
				  		   fprintf(outfile, "%d", sindex);
			  				else
									 {								 
  								 for (i = 0; i < d->classno - 1; i++)
	  									 if (i == sindex)
		  										 fprintf(outfile, " +,");
			  								else
				  								 fprintf(outfile, " -,");
					  				if (sindex == d->classno - 1)
						  				 fprintf(outfile, " +;");
						  			else
							  			 fprintf(outfile, " -;");
									 }
			  if (in_list(get_parameter_l("namestype"), 2, NAMES_RIPPER, NAMES_CLASSATEND))
				   exchange_classdefno(current_dataset);
			 }
			else
     if (d->classdefno != -1) 
      {/*Regression*/
					  value = give_regressionvalue(currentinstance);
				   if (get_parameter_l("namestype") == NAMES_CMU)
        {
         set_precision(pst, NULL, ";");
						   fprintf(outfile, pst, value);        
        }
       else 
         if (get_parameter_l("namestype") == NAMES_CLASSATEND)
          {
           set_precision(pst, NULL, NULL);
           fprintf(outfile, pst, value);                  
          }
      }
	 }
	if (in_list(get_parameter_l("namestype"), 2, NAMES_C50, NAMES_RIPPER))
  	fprintf(outfile,".\n");
	else
			fprintf(outfile,"\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7a138, %rsp          # imm = 0x7A138
movq %rcx, %r15
movq %rdx, %r14
movq %rdi, (%rsp)
leaq 0x38047a(%rip), %rax    # 0x3aefa4
cmpl $0x0, (%rax)
je 0x2ec6a
cmpl $0x2, 0x1c0(%r14)
jl 0x2ec34
movsbl %sil, %ebp
leaq 0xa3d24(%rip), %r13     # 0xd2870
xorl %r12d, %r12d
cmpl $0x0, 0x18864(%r14,%r12,4)
je 0x2ec1e
movq (%r13), %rax
movslq 0x1407128(%rax), %rax
xorl %ecx, %ecx
cmpq %rax, %r12
setge %cl
shlq $0x3, %rcx
addq (%r15), %rcx
movsd (%rcx,%r12,8), %xmm0
ucomisd 0x7416a(%rip), %xmm0    # 0xa2cf0
jne 0x2eba0
jp 0x2eba0
movq (%rsp), %rdi
leaq 0x76ec4(%rip), %rsi     # 0xa5a59
movl %ebp, %edx
xorl %eax, %eax
callq 0x42e0
jmp 0x2ec1e
movsd %xmm0, 0x8(%rsp)
leaq 0x754cc(%rip), %rdi     # 0xa4079
callq 0x535f7
cmpl $0x5, %eax
jne 0x2ebf2
movl 0x1c0(%r14), %eax
addl $-0x2, %eax
cmpq %rax, %r12
jne 0x2ebf2
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
leaq 0x76e92(%rip), %rdx     # 0xa5a69
callq 0x39529
movq (%rsp), %rdi
movq %rbx, %rsi
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0x42e0
jmp 0x2ec1e
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
leaq 0x7815d(%rip), %rdx     # 0xa6d60
callq 0x39529
movq (%rsp), %rdi
movq %rbx, %rsi
movsd 0x8(%rsp), %xmm0
movl %ebp, %edx
movb $0x1, %al
callq 0x42e0
incq %r12
movslq 0x1c0(%r14), %rax
decq %rax
cmpq %rax, %r12
jl 0x2eb4f
cmpl $0x0, 0x10(%r14)
je 0x2edde
leaq 0xa3c2a(%rip), %r12     # 0xd2870
movq (%r12), %rax
movslq 0x1407128(%rax), %rax
cmpq $-0x1, %rax
movq (%rsp), %rbx
je 0x2ee3a
movq (%r15), %rcx
movl (%rcx,%rax,8), %ebp
jmp 0x2ee3f
cmpl $0x0, 0x1bc(%r14)
jle 0x2eda9
leaq 0x30f08(%r14), %r12
movsbl %sil, %eax
movl %eax, 0x8(%rsp)
leaq 0x76d92(%rip), %rbp     # 0xa5a20
xorl %ebx, %ebx
cmpl $0x0, 0x1c(%r12)
je 0x2ed8f
movl (%r12), %esi
cmpq $0x4, %rsi
ja 0x2ed69
movslq (%rbp,%rsi,4), %rax
addq %rbp, %rax
jmpq *%rax
leaq 0x753be(%rip), %rdi     # 0xa4079
callq 0x535f7
movl %eax, %edi
movl $0x3, %esi
movl $0x1, %edx
movl $0x3, %ecx
movl $0x4, %r8d
xorl %eax, %eax
callq 0x39a80
testl %eax, %eax
je 0x2eced
cmpl $0x3, (%r12)
je 0x2ed8f
movq (%r15), %rax
movslq (%rax,%rbx,8), %rax
cmpq $-0x1, %rax
je 0x2ed51
movq 0x20(%r12,%rax,8), %rdx
movq (%rsp), %rdi
leaq 0x748c2(%rip), %rsi     # 0xa35cc
movl 0x8(%rsp), %ecx
xorl %eax, %eax
callq 0x42e0
jmp 0x2ed8f
movq (%r15), %rax
movsd (%rax,%rbx,8), %xmm0
ucomisd 0x73fc9(%rip), %xmm0    # 0xa2cf0
jne 0x2ed2b
jnp 0x2ed51
movq (%rsp), %rdi
leaq 0x76d27(%rip), %rsi     # 0xa5a5d
movl 0x8(%rsp), %edx
movb $0x1, %al
callq 0x42e0
jmp 0x2ed8f
movq (%r15), %rax
movl (%rax,%rbx,8), %edx
cmpl $0x75bcd15, %edx        # imm = 0x75BCD15
jne 0x2ed79
movq (%rsp), %rdi
leaq 0x76cfd(%rip), %rsi     # 0xa5a59
movl 0x8(%rsp), %edx
xorl %eax, %eax
callq 0x42e0
jmp 0x2ed8f
leaq 0x745fe(%rip), %rdi     # 0xa336e
xorl %eax, %eax
callq 0x4030
jmp 0x2ed8f
movq (%rsp), %rdi
leaq 0x74843(%rip), %rsi     # 0xa35c7
movl 0x8(%rsp), %ecx
xorl %eax, %eax
callq 0x42e0
incq %rbx
movslq 0x1bc(%r14), %rax
addq $0x340, %r12            # imm = 0x340
cmpq %rax, %rbx
jl 0x2ec90
cmpl $0x0, 0x10(%r14)
movq (%rsp), %rbx
je 0x2f0ee
leaq 0xa3ab1(%rip), %rax     # 0xd2870
movq (%rax), %rax
movslq 0x1407128(%rax), %rax
cmpq $-0x1, %rax
je 0x2ef34
movq (%r15), %rcx
movl (%rcx,%rax,8), %ebp
jmp 0x2ef39
cmpl $-0x1, 0x1407128(%r14)
movq (%rsp), %rbx
je 0x2f0ee
movq (%r15), %rax
leaq 0xa3a76(%rip), %rcx     # 0xd2870
movq (%rcx), %rcx
movslq 0x1407128(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x75263(%rip), %rdi     # 0xa4079
callq 0x535f7
cmpl $0x5, %eax
jne 0x2efb7
leaq 0x76c4b(%rip), %rdx     # 0xa5a76
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
jmp 0x2efd8
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leaq 0x75233(%rip), %rdi     # 0xa4079
callq 0x535f7
movl %eax, %edi
movl $0x2, %esi
movl $0x1, %edx
movl $0x3, %ecx
xorl %eax, %eax
callq 0x39a80
testl %eax, %eax
je 0x2ee70
movq (%r12), %rdi
callq 0x12cfc
leaq 0x75202(%rip), %rdi     # 0xa4079
callq 0x535f7
cmpl $0x1, %eax
jne 0x2eeb3
movslq 0x1407128(%r14), %rax
imulq $0x340, %rax, %rax      # imm = 0x340
addq %r14, %rax
movslq %ebp, %rcx
movq 0x30f28(%rax,%rcx,8), %rdx
leaq 0x76bc1(%rip), %rsi     # 0xa5a65
movq %rbx, %rdi
xorl %eax, %eax
callq 0x42e0
jmp 0x2f0bd
leaq 0x751bf(%rip), %rdi     # 0xa4079
callq 0x535f7
cmpl $0x3, %eax
jne 0x2eeed
movslq 0x1407128(%r14), %rax
imulq $0x340, %rax, %rax      # imm = 0x340
addq %r14, %rax
movslq %ebp, %rcx
movq 0x30f28(%rax,%rcx,8), %rdi
movq %rbx, %rsi
callq 0x41f0
jmp 0x2f0bd
leaq 0x75185(%rip), %rdi     # 0xa4079
callq 0x535f7
movl %eax, %edi
movl $0x3, %esi
xorl %edx, %edx
movl $0x2, %ecx
movl $0x4, %r8d
xorl %eax, %eax
callq 0x39a80
testl %eax, %eax
je 0x2f02f
leaq 0x7ec3a(%rip), %rsi     # 0xadb5d
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x42e0
jmp 0x2f0bd
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $-0x1, %ebp
je 0x2f0ee
leaq 0x75130(%rip), %rdi     # 0xa4079
callq 0x535f7
movl %eax, %edi
movl $0x3, %esi
movl $0x1, %edx
movl $0x3, %ecx
movl $0x4, %r8d
xorl %eax, %eax
callq 0x39a80
testl %eax, %eax
je 0x2f0ee
leaq 0x750fe(%rip), %rdi     # 0xa4079
callq 0x535f7
cmpl $0x1, %eax
jne 0x2eff5
movslq 0x1407128(%r14), %rax
imulq $0x340, %rax, %rax      # imm = 0x340
addq %r14, %rax
movslq %ebp, %rcx
movq 0x30f28(%rax,%rcx,8), %rdx
leaq 0x76abd(%rip), %rsi     # 0xa5a65
movq %rbx, %rdi
xorl %eax, %eax
callq 0x42e0
jmp 0x2f0ee
leaq 0x750bb(%rip), %rdi     # 0xa4079
callq 0x535f7
cmpl $0x3, %eax
jne 0x2f0ee
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x39529
movq %rbx, %rdi
movq %r14, %rsi
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0x42e0
jmp 0x2f0ee
leaq 0x7507d(%rip), %rdi     # 0xa4079
callq 0x535f7
cmpl $0x3, %eax
jne 0x2f075
movslq 0x1407128(%r14), %rax
imulq $0x340, %rax, %rax      # imm = 0x340
addq %r14, %rax
movslq %ebp, %rcx
movq 0x30f28(%rax,%rcx,8), %rdi
movq %rbx, %rsi
callq 0x41f0
jmp 0x2f0ee
movl 0x10(%r14), %eax
cmpl $0x2, %eax
jl 0x2f08a
xorl %ebx, %ebx
leaq 0x76a2b(%rip), %r13     # 0xa5a6c
leaq 0x76a28(%rip), %r12     # 0xa5a70
movq (%rsp), %r15
cmpl %ebx, %ebp
movq %r12, %rdi
cmoveq %r13, %rdi
movl $0x3, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x42c0
incl %ebx
movl 0x10(%r14), %eax
decl %eax
cmpl %eax, %ebx
jl 0x2f04c
jmp 0x2f08c
leaq 0x7eae1(%rip), %rsi     # 0xadb5d
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x42e0
jmp 0x2f0ee
decl %eax
cmpl %eax, %ebp
jne 0x2f099
leaq 0x769dd(%rip), %rdi     # 0xa5a74
jmp 0x2f0a0
leaq 0x769d8(%rip), %rdi     # 0xa5a78
movl $0x3, %esi
movl $0x1, %edx
movq (%rsp), %rbx
movq %rbx, %rcx
callq 0x42c0
leaq 0xa37b3(%rip), %r12     # 0xd2870
leaq 0x74fb5(%rip), %rdi     # 0xa4079
callq 0x535f7
movl %eax, %edi
movl $0x2, %esi
movl $0x1, %edx
movl $0x3, %ecx
xorl %eax, %eax
callq 0x39a80
testl %eax, %eax
je 0x2f0ee
movq (%r12), %rdi
callq 0x12cfc
leaq 0x74f84(%rip), %rdi     # 0xa4079
callq 0x535f7
movl %eax, %edi
movl $0x2, %esi
xorl %edx, %edx
movl $0x1, %ecx
xorl %eax, %eax
callq 0x39a80
testl %eax, %eax
je 0x2f12e
leaq 0x74f72(%rip), %rdi     # 0xa408c
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
jmp 0x2f13b
movl $0xa, %edi
movq %rbx, %rsi
callq 0x4150
addq $0x7a138, %rsp          # imm = 0x7A138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq