// File: /workspace/github_c_makefile_star2_O3/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 0x382c0a(%rip), %rax    # 0x3b1fa4
cmpl $0x0, (%rax)
je 0x2f4da
cmpl $0x2, 0x1c0(%r14)
jl 0x2f4a4
movsbl %sil, %ebp
leaq 0xa64b4(%rip), %r13     # 0xd5870
xorl %r12d, %r12d
cmpl $0x0, 0x18864(%r14,%r12,4)
je 0x2f48e
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 0x768fa(%rip), %xmm0    # 0xa5cf0
jne 0x2f410
jp 0x2f410
movq (%rsp), %rdi
leaq 0x796cc(%rip), %rsi     # 0xa8ad1
movl %ebp, %edx
xorl %eax, %eax
callq 0x42e0
jmp 0x2f48e
movsd %xmm0, 0x8(%rsp)
leaq 0x77c9e(%rip), %rdi     # 0xa70bb
callq 0x54afc
cmpl $0x5, %eax
jne 0x2f462
movl 0x1c0(%r14), %eax
addl $-0x2, %eax
cmpq %rax, %r12
jne 0x2f462
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
leaq 0x7969a(%rip), %rdx     # 0xa8ae1
callq 0x3a535
movq (%rsp), %rdi
movq %rbx, %rsi
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0x42e0
jmp 0x2f48e
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
leaq 0x7a95d(%rip), %rdx     # 0xa9dd0
callq 0x3a535
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 0x2f3bf
cmpl $0x0, 0x10(%r14)
je 0x2f6ca
leaq 0xa63ba(%rip), %r12     # 0xd5870
movq (%r12), %rax
movslq 0x1407128(%rax), %rax
cmpq $-0x1, %rax
movq (%rsp), %rbx
je 0x2f726
movq (%r15), %rcx
movl (%rcx,%rax,8), %ebp
jmp 0x2f72b
cmpl $0x0, 0x1bc(%r14)
jle 0x2f619
leaq 0x30f08(%r14), %r12
movsbl %sil, %eax
movl %eax, 0x8(%rsp)
leaq 0x7959a(%rip), %rbp     # 0xa8a98
xorl %ebx, %ebx
cmpl $0x0, 0x1c(%r12)
je 0x2f5ff
movl (%r12), %esi
cmpq $0x4, %rsi
ja 0x2f5d9
movslq (%rbp,%rsi,4), %rax
addq %rbp, %rax
jmpq *%rax
leaq 0x77b90(%rip), %rdi     # 0xa70bb
callq 0x54afc
movl %eax, %edi
movl $0x3, %esi
movl $0x1, %edx
movl $0x3, %ecx
movl $0x4, %r8d
xorl %eax, %eax
callq 0x3aa8c
testl %eax, %eax
je 0x2f55d
cmpl $0x3, (%r12)
je 0x2f5ff
movq (%r15), %rax
movslq (%rax,%rbx,8), %rax
cmpq $-0x1, %rax
je 0x2f5c1
movq 0x20(%r12,%rax,8), %rdx
movq (%rsp), %rdi
leaq 0x77096(%rip), %rsi     # 0xa6610
movl 0x8(%rsp), %ecx
xorl %eax, %eax
callq 0x42e0
jmp 0x2f5ff
movq (%r15), %rax
movsd (%rax,%rbx,8), %xmm0
ucomisd 0x76759(%rip), %xmm0    # 0xa5cf0
jne 0x2f59b
jnp 0x2f5c1
movq (%rsp), %rdi
leaq 0x7952f(%rip), %rsi     # 0xa8ad5
movl 0x8(%rsp), %edx
movb $0x1, %al
callq 0x42e0
jmp 0x2f5ff
movq (%r15), %rax
movl (%rax,%rbx,8), %edx
cmpl $0x75bcd15, %edx        # imm = 0x75BCD15
jne 0x2f5e9
movq (%rsp), %rdi
leaq 0x79505(%rip), %rsi     # 0xa8ad1
movl 0x8(%rsp), %edx
xorl %eax, %eax
callq 0x42e0
jmp 0x2f5ff
leaq 0x76d8e(%rip), %rdi     # 0xa636e
xorl %eax, %eax
callq 0x4030
jmp 0x2f5ff
movq (%rsp), %rdi
leaq 0x77017(%rip), %rsi     # 0xa660b
movl 0x8(%rsp), %ecx
xorl %eax, %eax
callq 0x42e0
incq %rbx
movslq 0x1bc(%r14), %rax
addq $0x340, %r12            # imm = 0x340
cmpq %rax, %rbx
jl 0x2f500
cmpl $0x0, 0x10(%r14)
movq (%rsp), %rbx
je 0x2f93c
leaq 0xa6241(%rip), %rax     # 0xd5870
movq (%rax), %rax
movslq 0x1407128(%rax), %rax
cmpq $-0x1, %rax
je 0x2f93c
movq (%r15), %rcx
movslq (%rcx,%rax,8), %r15
cmpq $-0x1, %r15
je 0x2f93c
leaq 0x77a60(%rip), %rdi     # 0xa70bb
callq 0x54afc
movl %eax, %edi
movl $0x3, %esi
movl $0x1, %edx
movl $0x3, %ecx
movl $0x4, %r8d
xorl %eax, %eax
callq 0x3aa8c
testl %eax, %eax
je 0x2f93c
leaq 0x77a2e(%rip), %rdi     # 0xa70bb
callq 0x54afc
cmpl $0x1, %eax
jne 0x2f8a0
movslq 0x1407128(%r14), %rax
imulq $0x340, %rax, %rax      # imm = 0x340
addq %r14, %rax
movq 0x30f28(%rax,%r15,8), %rdx
leaq 0x79422(%rip), %rsi     # 0xa8add
movq %rbx, %rdi
xorl %eax, %eax
callq 0x42e0
jmp 0x2f93c
cmpl $-0x1, 0x1407128(%r14)
movq (%rsp), %rbx
je 0x2f93c
movq (%r15), %rax
leaq 0xa618a(%rip), %rcx     # 0xd5870
movq (%rcx), %rcx
movslq 0x1407128(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x779b9(%rip), %rdi     # 0xa70bb
callq 0x54afc
cmpl $0x5, %eax
jne 0x2f81c
leaq 0x793d7(%rip), %rdx     # 0xa8aee
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
jmp 0x2f83d
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leaq 0x77989(%rip), %rdi     # 0xa70bb
callq 0x54afc
movl %eax, %edi
movl $0x2, %esi
movl $0x1, %edx
movl $0x3, %ecx
xorl %eax, %eax
callq 0x3aa8c
testl %eax, %eax
je 0x2f75c
movq (%r12), %rdi
callq 0x12c28
leaq 0x77958(%rip), %rdi     # 0xa70bb
callq 0x54afc
cmpl $0x1, %eax
jne 0x2f79f
movslq 0x1407128(%r14), %rax
imulq $0x340, %rax, %rax      # imm = 0x340
addq %r14, %rax
movslq %ebp, %rcx
movq 0x30f28(%rax,%rcx,8), %rdx
leaq 0x7934d(%rip), %rsi     # 0xa8add
movq %rbx, %rdi
xorl %eax, %eax
callq 0x42e0
jmp 0x2f90b
leaq 0x77915(%rip), %rdi     # 0xa70bb
callq 0x54afc
cmpl $0x3, %eax
jne 0x2f7d9
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 0x2f90b
leaq 0x778db(%rip), %rdi     # 0xa70bb
callq 0x54afc
movl %eax, %edi
movl $0x3, %esi
xorl %edx, %edx
movl $0x2, %ecx
movl $0x4, %r8d
xorl %eax, %eax
callq 0x3aa8c
testl %eax, %eax
je 0x2f85a
leaq 0x813ea(%rip), %rsi     # 0xb0bf5
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x42e0
jmp 0x2f90b
leaq 0x77898(%rip), %rdi     # 0xa70bb
callq 0x54afc
cmpl $0x3, %eax
jne 0x2f93c
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3a535
movq %rbx, %rdi
movq %r14, %rsi
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0x42e0
jmp 0x2f93c
movl 0x10(%r14), %eax
cmpl $0x2, %eax
jl 0x2f8d8
xorl %ebx, %ebx
leaq 0x79278(%rip), %r13     # 0xa8ae4
leaq 0x79275(%rip), %r12     # 0xa8ae8
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 0x2f877
jmp 0x2f8da
leaq 0x77814(%rip), %rdi     # 0xa70bb
callq 0x54afc
cmpl $0x3, %eax
jne 0x2f99b
movslq 0x1407128(%r14), %rax
imulq $0x340, %rax, %rax      # imm = 0x340
addq %r14, %rax
movq 0x30f28(%rax,%r15,8), %rdi
movq %rbx, %rsi
callq 0x41f0
jmp 0x2f93c
decl %eax
cmpl %eax, %ebp
jne 0x2f8e7
leaq 0x79207(%rip), %rdi     # 0xa8aec
jmp 0x2f8ee
leaq 0x79202(%rip), %rdi     # 0xa8af0
movl $0x3, %esi
movl $0x1, %edx
movq (%rsp), %rbx
movq %rbx, %rcx
callq 0x42c0
leaq 0xa5f65(%rip), %r12     # 0xd5870
leaq 0x777a9(%rip), %rdi     # 0xa70bb
callq 0x54afc
movl %eax, %edi
movl $0x2, %esi
movl $0x1, %edx
movl $0x3, %ecx
xorl %eax, %eax
callq 0x3aa8c
testl %eax, %eax
je 0x2f93c
movq (%r12), %rdi
callq 0x12c28
leaq 0x77778(%rip), %rdi     # 0xa70bb
callq 0x54afc
movl %eax, %edi
movl $0x2, %esi
xorl %edx, %edx
movl $0x1, %ecx
xorl %eax, %eax
callq 0x3aa8c
testl %eax, %eax
je 0x2f97c
leaq 0x77766(%rip), %rdi     # 0xa70ce
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
jmp 0x2f989
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
leaq 0x81253(%rip), %rsi     # 0xb0bf5
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x42e0
jmp 0x2f93c