// File: /workspace/github_c_makefile_star2_O2/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
movl %esi, %ebp
movq %rdi, (%rsp)
leaq 0x37eac6(%rip), %rax    # 0x3a9fa4
cmpl $0x0, (%rax)
je 0x2b607
leaq 0x6d563(%rip), %r12     # 0x98a51
leaq 0x10(%rsp), %r13
xorl %ebx, %ebx
movslq 0x1c0(%r14), %rax
decq %rax
cmpq %rax, %rbx
jge 0x2b5d6
cmpl $0x0, 0x18864(%r14,%rbx,4)
je 0x2b5ce
leaq 0xa2352(%rip), %rax     # 0xcd870
movq (%rax), %rax
movslq 0x1407128(%rax), %rax
xorl %ecx, %ecx
cmpq %rax, %rbx
setge %cl
shlq $0x3, %rcx
addq (%r15), %rcx
movsd (%rcx,%rbx,8), %xmm0
ucomisd 0x6a7b4(%rip), %xmm0    # 0x95cf8
jne 0x2b55a
jp 0x2b55a
movq (%rsp), %rdi
movq %r12, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x42e0
jmp 0x2b5ce
movsd %xmm0, 0x8(%rsp)
leaq 0x6baf4(%rip), %rdi     # 0x9705b
callq 0x4cf11
cmpl $0x5, %eax
jne 0x2b5a7
movl 0x1c0(%r14), %eax
addl $-0x2, %eax
cmpq %rax, %rbx
jne 0x2b5a7
movq %r13, %rdi
xorl %esi, %esi
leaq 0x6d4d5(%rip), %rdx     # 0x98a61
callq 0x35305
movq (%rsp), %rdi
movq %r13, %rsi
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0x42e0
jmp 0x2b5ce
movq %r13, %rdi
xorl %esi, %esi
leaq 0x6e745(%rip), %rdx     # 0x99cf8
callq 0x35305
movq (%rsp), %rdi
movq %r13, %rsi
movsd 0x8(%rsp), %xmm0
movl %ebp, %edx
movb $0x1, %al
callq 0x42e0
incq %rbx
jmp 0x2b4f5
cmpl $0x0, 0x10(%r14)
je 0x2b7d0
leaq 0xa2288(%rip), %rax     # 0xcd870
movq (%rax), %rax
movslq 0x1407128(%rax), %rax
cmpq $-0x1, %rax
je 0x2b828
movq (%r15), %rcx
movl (%rcx,%rax,8), %ebp
jmp 0x2b82b
leaq 0x30f08(%r14), %r12
leaq 0x6d403(%rip), %r13     # 0x98a18
movq %r12, 0x8(%rsp)
xorl %ebx, %ebx
movslq 0x1bc(%r14), %rax
cmpq %rax, %rbx
jge 0x2b729
cmpl $0x0, 0x1c(%r12)
je 0x2b71a
movl (%r12), %esi
cmpq $0x4, %rsi
ja 0x2b6f6
movslq (%r13,%rsi,4), %rax
addq %r13, %rax
jmpq *%rax
leaq 0x6ba04(%rip), %rdi     # 0x9705b
callq 0x4cf11
movl %eax, %edi
pushq $0x3
popq %rcx
movl %ecx, %esi
pushq $0x1
popq %rdx
pushq $0x4
popq %r8
xorl %eax, %eax
callq 0x35812
testl %eax, %eax
je 0x2b680
cmpl $0x3, (%r12)
je 0x2b71a
movq (%r15), %rax
movslq (%rax,%rbx,8), %rax
cmpq $-0x1, %rax
je 0x2b6e0
movq 0x20(%r12,%rax,8), %rdx
movq (%rsp), %rdi
leaq 0x6af13(%rip), %rsi     # 0x965b0
movl %ebp, %ecx
xorl %eax, %eax
callq 0x42e0
jmp 0x2b71a
movq (%r15), %rax
movsd (%rax,%rbx,8), %xmm0
ucomisd 0x6a640(%rip), %xmm0    # 0x95cf8
jne 0x2b6bc
jnp 0x2b6e0
movq (%rsp), %rdi
leaq 0x6d38e(%rip), %rsi     # 0x98a55
movl %ebp, %edx
movb $0x1, %al
callq 0x42e0
jmp 0x2b71a
movq (%r15), %rax
movl (%rax,%rbx,8), %edx
cmpl $0x75bcd15, %edx        # imm = 0x75BCD15
jne 0x2b706
movq (%rsp), %rdi
leaq 0x6d366(%rip), %rsi     # 0x98a51
movl %ebp, %edx
xorl %eax, %eax
callq 0x42e0
jmp 0x2b71a
leaq 0x6ac71(%rip), %rdi     # 0x9636e
xorl %eax, %eax
callq 0x4030
jmp 0x2b71a
movq (%rsp), %rdi
leaq 0x6ae9a(%rip), %rsi     # 0x965ab
movl %ebp, %ecx
xorl %eax, %eax
callq 0x42e0
incq %rbx
addq $0x340, %r12            # imm = 0x340
jmp 0x2b61c
cmpl $0x0, 0x10(%r14)
je 0x2ba25
leaq 0xa2135(%rip), %rax     # 0xcd870
movq (%rax), %rax
movslq 0x1407128(%rax), %rax
cmpq $-0x1, %rax
je 0x2ba25
movq (%r15), %rcx
movslq (%rcx,%rax,8), %r15
cmpq $-0x1, %r15
je 0x2ba25
leaq 0x6b8f4(%rip), %rdi     # 0x9705b
callq 0x4cf11
pushq $0x1
popq %rdx
pushq $0x3
popq %rcx
pushq $0x4
popq %r8
movl %eax, %edi
movl %ecx, %esi
xorl %eax, %eax
callq 0x35812
testl %eax, %eax
je 0x2ba25
leaq 0x6b8cb(%rip), %rdi     # 0x9705b
callq 0x4cf11
cmpl $0x1, %eax
jne 0x2b9a3
movslq 0x1407128(%r14), %rax
imulq $0x340, %rax, %rax      # imm = 0x340
movq 0x8(%rsp), %rcx
addq %rax, %rcx
movq 0x20(%rcx,%r15,8), %rdx
leaq 0x6d29d(%rip), %rsi     # 0x98a5d
movq (%rsp), %rdi
xorl %eax, %eax
callq 0x42e0
jmp 0x2ba25
cmpl $-0x1, 0x1407128(%r14)
je 0x2ba25
movq (%r15), %rax
leaq 0xa2088(%rip), %rcx     # 0xcd870
movq (%rcx), %rcx
movslq 0x1407128(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x6b857(%rip), %rdi     # 0x9705b
callq 0x4cf11
cmpl $0x5, %eax
jne 0x2b91b
leaq 0x6d255(%rip), %rdx     # 0x98a6e
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
jmp 0x2b93c
pushq $-0x1
popq %rbp
leaq 0x6b829(%rip), %rdi     # 0x9705b
callq 0x4cf11
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
pushq $0x3
popq %rcx
movl %eax, %edi
xorl %eax, %eax
callq 0x35812
testl %eax, %eax
je 0x2b85c
leaq 0xa201c(%rip), %rax     # 0xcd870
movq (%rax), %rdi
callq 0x11d5c
leaq 0x6b7f8(%rip), %rdi     # 0x9705b
callq 0x4cf11
cmpl $0x1, %eax
jne 0x2b8a0
movslq 0x1407128(%r14), %rax
imulq $0x340, %rax, %rax      # imm = 0x340
addq %r14, %rax
movslq %ebp, %rcx
movq 0x30f28(%rax,%rcx,8), %rdx
leaq 0x6d1cd(%rip), %rsi     # 0x98a5d
movq (%rsp), %rdi
xorl %eax, %eax
callq 0x42e0
jmp 0x2b9f4
leaq 0x6b7b4(%rip), %rdi     # 0x9705b
callq 0x4cf11
cmpl $0x3, %eax
jne 0x2b8db
movslq 0x1407128(%r14), %rax
imulq $0x340, %rax, %rax      # imm = 0x340
addq %r14, %rax
movslq %ebp, %rcx
movq 0x30f28(%rax,%rcx,8), %rdi
movq (%rsp), %rsi
callq 0x41f0
jmp 0x2b9f4
leaq 0x6b779(%rip), %rdi     # 0x9705b
callq 0x4cf11
xorl %ebx, %ebx
pushq $0x3
popq %rsi
pushq $0x2
popq %rcx
pushq $0x4
popq %r8
movl %eax, %edi
xorl %edx, %edx
xorl %eax, %eax
callq 0x35812
testl %eax, %eax
je 0x2b95a
leaq 0x75250(%rip), %rsi     # 0xa0b59
movq (%rsp), %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x42e0
jmp 0x2b9f4
leaq 0x6b739(%rip), %rdi     # 0x9705b
callq 0x4cf11
cmpl $0x3, %eax
jne 0x2ba25
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x35305
movq (%rsp), %rdi
movq %r14, %rsi
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0x42e0
jmp 0x2ba25
leaq 0x6d107(%rip), %r13     # 0x98a68
pushq $0x3
popq %r15
pushq $0x1
popq %r12
movl 0x10(%r14), %eax
decl %eax
cmpl %eax, %ebx
jge 0x2b996
cmpl %ebx, %ebp
movq %r13, %rdi
leaq 0x6d0e5(%rip), %rax     # 0x98a64
cmoveq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq (%rsp), %rcx
callq 0x42c0
incl %ebx
jmp 0x2b969
cmpl %eax, %ebp
jne 0x2b9de
leaq 0x6d0cb(%rip), %rdi     # 0x98a6c
jmp 0x2b9e5
leaq 0x6b6b1(%rip), %rdi     # 0x9705b
callq 0x4cf11
cmpl $0x3, %eax
jne 0x2ba7c
movslq 0x1407128(%r14), %rax
imulq $0x340, %rax, %rax      # imm = 0x340
movq 0x8(%rsp), %rcx
addq %rax, %rcx
movq 0x20(%rcx,%r15,8), %rdi
movq (%rsp), %rsi
callq 0x41f0
jmp 0x2ba25
leaq 0x6d08b(%rip), %rdi     # 0x98a70
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
movq (%rsp), %rcx
callq 0x42c0
leaq 0x6b660(%rip), %rdi     # 0x9705b
callq 0x4cf11
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
pushq $0x3
popq %rcx
movl %eax, %edi
xorl %eax, %eax
callq 0x35812
testl %eax, %eax
je 0x2ba25
leaq 0xa1e53(%rip), %rax     # 0xcd870
movq (%rax), %rdi
callq 0x11d5c
leaq 0x6b62f(%rip), %rdi     # 0x9705b
callq 0x4cf11
pushq $0x2
popq %rsi
pushq $0x1
popq %rcx
movl %eax, %edi
xorl %edx, %edx
xorl %eax, %eax
callq 0x35812
testl %eax, %eax
je 0x2ba5e
leaq 0x6b621(%rip), %rdi     # 0x9706e
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
movq (%rsp), %rcx
callq 0x42c0
jmp 0x2ba6a
pushq $0xa
popq %rdi
movq (%rsp), %rsi
callq 0x4150
addq $0x7a138, %rsp          # imm = 0x7A138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x750d6(%rip), %rsi     # 0xa0b59
movq (%rsp), %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x42e0
jmp 0x2ba25