// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/rule.c
// Function: condition_cover_instance
int condition_cover_instance(Instanceptr instance, Decisionconditionptr condition)
{
	/*!Last Changed 22.01.2004*/
	/*!Last Changed 09.01.2004*/
	/*!Last Changed 10.05.2003*/
	int fno;
	double combin;
	fno = condition->featureindex;
	if (fno >= 0)
	 {
	  if (condition->conditiontype == HYBRID_CONDITION)
			 {
     if (condition->comparison == '<' && real_feature(instance, fno) > condition->value)
				   return NO;
				 if (condition->comparison == '>' && real_feature(instance, fno) < condition->value)
				  	return NO;
			 }
			else
			 {
    	switch (current_dataset->features[fno].type)
					 {
	    	 case INTEGER:if (condition->comparison == '<' && instance->values[fno].intvalue > condition->value)
		    	 														return NO;
			   		 	          if (condition->comparison == '>' && instance->values[fno].intvalue < condition->value)
				    														return NO;
                    if (condition->comparison == '*' && (instance->values[fno].intvalue > condition->upperlimit || instance->values[fno].intvalue < condition->lowerlimit))
                      return NO;
				    	           break;
		     case    REAL:if (condition->comparison == '<' && instance->values[fno].floatvalue > condition->value)
				    														return NO;
				  	             if (condition->comparison == '>' && instance->values[fno].floatvalue < condition->value)
				  			  	 									return NO;
                    if (condition->comparison == '*' && (instance->values[fno].floatvalue > condition->upperlimit || instance->values[fno].floatvalue < condition->lowerlimit))
                      return NO;
					 						   					break;
   		 	case  STRING:if (instance->values[fno].stringindex != condition->value)
		    																return NO;
				    												break;
					 }
			 }
	 }
	else
		 if (in_list(fno, 2, LINEAR, QUADRATIC))
			 {
				 combin = multiply_with_matrix(instance, condition->w);
					if (combin < condition->w0 + 0.0001 && combin > condition->w0 - 0.0001)
						 return YES;
					if (combin < condition->w0 && condition->comparison == '>')
						 return NO;
					if (combin > condition->w0 && condition->comparison == '<')
						 return NO;
			 }
			else
				 if (fno == DISCRETEMIX)
					 {
							if (is_smaller_discrete_order(instance, condition->ksplit))
								 if (condition->comparison == '<')
								   return YES;
									else
										 return NO;
							else
								 if (condition->comparison == '>')
										 return YES;
									else
										 return NO;
					 }
	return YES;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movslq (%rsi), %r15
testq %r15, %r15
js 0x79658
cmpl $0x2, 0x40(%rbx)
jne 0x796e1
cmpb $0x3c, 0x4(%rbx)
jne 0x7962f
movq %r14, %rdi
movl %r15d, %esi
callq 0x2e4b6
ucomisd 0x8(%rbx), %xmm0
ja 0x79825
cmpb $0x3e, 0x4(%rbx)
jne 0x79829
movq %r14, %rdi
movl %r15d, %esi
callq 0x2e4b6
movsd 0x8(%rbx), %xmm1
ucomisd %xmm0, %xmm1
ja 0x79825
jmp 0x79829
movl %r15d, %edi
movl $0x2, %esi
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
movl $0xfffffffd, %ecx       # imm = 0xFFFFFFFD
xorl %eax, %eax
callq 0x39a80
testl %eax, %eax
je 0x79781
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq %r14, %rdi
callq 0x2e700
movsd 0x30(%rbx), %xmm1
movsd 0x2b252(%rip), %xmm2    # 0xa48e8
addsd %xmm1, %xmm2
ucomisd %xmm0, %xmm2
jbe 0x796b8
movsd 0x2b238(%rip), %xmm2    # 0xa48e0
addsd %xmm1, %xmm2
movb $0x1, %al
ucomisd %xmm2, %xmm0
ja 0x7982b
ucomisd %xmm0, %xmm1
jbe 0x796c8
cmpb $0x3e, 0x4(%rbx)
je 0x79825
ucomisd %xmm1, %xmm0
jbe 0x79829
cmpb $0x3c, 0x4(%rbx)
je 0x79825
jmp 0x79829
leaq 0x59188(%rip), %rax     # 0xd2870
movq (%rax), %rax
imulq $0x340, %r15, %rcx      # imm = 0x340
movl 0x30f08(%rax,%rcx), %eax
cmpl $0x2, %eax
je 0x797d3
cmpl $0x1, %eax
je 0x797bb
testl %eax, %eax
jne 0x79829
movzbl 0x4(%rbx), %eax
cmpl $0x2a, %eax
je 0x79770
cmpl $0x3e, %eax
je 0x7974c
cmpl $0x3c, %eax
jne 0x79829
movq (%r14), %rcx
cvtsi2sdl (%rcx,%r15,8), %xmm0
ucomisd 0x8(%rbx), %xmm0
ja 0x79825
cmpl $0x2a, %eax
je 0x79770
cmpl $0x3e, %eax
jne 0x79829
movq (%r14), %rcx
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx,%r15,8), %xmm0
movsd 0x8(%rbx), %xmm1
ucomisd %xmm0, %xmm1
ja 0x79825
cmpl $0x2a, %eax
jne 0x79829
movq (%r14), %rax
xorps %xmm0, %xmm0
cvtsi2sdl (%rax,%r15,8), %xmm0
jmp 0x7981e
cmpl $-0x5, %r15d
jne 0x79829
movupd 0x50(%rbx), %xmm0
movupd 0x60(%rbx), %xmm1
movupd %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
movq %r14, %rdi
callq 0x1cc31
movb 0x4(%rbx), %cl
testl %eax, %eax
je 0x79842
cmpb $0x3c, %cl
jmp 0x79845
movq (%r14), %rax
cvtsi2sdl (%rax,%r15,8), %xmm0
movsd 0x8(%rbx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x79825
jp 0x79825
jmp 0x79829
movzbl 0x4(%rbx), %eax
cmpl $0x2a, %eax
je 0x79815
cmpl $0x3e, %eax
je 0x79800
cmpl $0x3c, %eax
jne 0x79829
movq (%r14), %rcx
movsd (%rcx,%r15,8), %xmm0
ucomisd 0x8(%rbx), %xmm0
ja 0x79825
cmpl $0x2a, %eax
je 0x79815
cmpl $0x3e, %eax
jne 0x79829
movq (%r14), %rcx
movsd 0x8(%rbx), %xmm0
ucomisd (%rcx,%r15,8), %xmm0
ja 0x79825
cmpl $0x2a, %eax
jne 0x79829
movq (%r14), %rax
movsd (%rax,%r15,8), %xmm0
ucomisd 0x10(%rbx), %xmm0
jbe 0x79838
xorl %eax, %eax
jmp 0x7982b
movb $0x1, %al
movzbl %al, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movsd 0x18(%rbx), %xmm1
jmp 0x79649
cmpb $0x3e, %cl
sete %al
jmp 0x7982b