// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/rule.c
// Function: condition_cover_instance2
int condition_cover_instance2(Instanceptr instance, Decisionconditionptr condition)
{
	/*!Last Changed 19.09.2004*/
	int fno;
	double combin;
	fno = condition->featureindex;
	if (fno >= 0)
	 {
	  if (condition->conditiontype == HYBRID_CONDITION)
			 {
     if (dequal(real_feature(instance, fno), condition->value))
						 return NO;
     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;
				    	           break;
		     case    REAL:if (condition->comparison == '<' && instance->values[fno].floatvalue >= condition->value - 0.0001)
				    														return NO;
				  	             if (condition->comparison == '>' && instance->values[fno].floatvalue <= condition->value + 0.0001)
				  			  	 									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 && condition->comparison == '>')
						 return NO;
					if (combin > condition->w0 && condition->comparison == '<')
						 return NO;
			 }
	return YES;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movslq (%rsi), %r15
testq %r15, %r15
js 0x7ab7b
cmpl $0x2, 0x40(%rbx)
jne 0x7abda
movq %r14, %rdi
movl %r15d, %esi
callq 0x2e4b6
movsd 0x8(%rbx), %xmm1
callq 0x38d52
xorl %ebp, %ebp
testl %eax, %eax
jne 0x7acae
cmpb $0x3c, 0x4(%rbx)
jne 0x7ab52
movq %r14, %rdi
movl %r15d, %esi
callq 0x2e4b6
ucomisd 0x8(%rbx), %xmm0
ja 0x7acae
cmpb $0x3e, 0x4(%rbx)
jne 0x7aca5
movq %r14, %rdi
movl %r15d, %esi
callq 0x2e4b6
movsd 0x8(%rbx), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x7aca5
jmp 0x7acae
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 0x7aca5
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq %r14, %rdi
callq 0x2e700
movsd 0x30(%rbx), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x7abc1
cmpb $0x3e, 0x4(%rbx)
je 0x7acac
ucomisd %xmm1, %xmm0
jbe 0x7aca5
cmpb $0x3c, 0x4(%rbx)
jne 0x7aca5
jmp 0x7acac
leaq 0x57c8f(%rip), %rax     # 0xd2870
movq (%rax), %rax
imulq $0x340, %r15, %rcx      # imm = 0x340
movl 0x30f08(%rax,%rcx), %eax
cmpl $0x2, %eax
je 0x7ac5f
cmpl $0x1, %eax
je 0x7ac47
testl %eax, %eax
jne 0x7aca5
movzbl 0x4(%rbx), %eax
cmpl $0x3e, %eax
je 0x7ac2e
cmpl $0x3c, %eax
jne 0x7aca5
movq (%r14), %rcx
cvtsi2sdl (%rcx,%r15,8), %xmm0
ucomisd 0x8(%rbx), %xmm0
jae 0x7acac
cmpb $0x3e, %al
jne 0x7aca5
movq (%r14), %rax
xorps %xmm0, %xmm0
cvtsi2sdl (%rax,%r15,8), %xmm0
movsd 0x8(%rbx), %xmm1
ucomisd %xmm0, %xmm1
jb 0x7aca5
jmp 0x7acac
movq (%r14), %rax
cvtsi2sdl (%rax,%r15,8), %xmm0
movsd 0x8(%rbx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x7acac
jp 0x7acac
jmp 0x7aca5
movzbl 0x4(%rbx), %eax
cmpl $0x3e, %eax
je 0x7ac8d
cmpl $0x3c, %eax
jne 0x7aca5
movq (%r14), %rcx
movsd (%rcx,%r15,8), %xmm0
movsd 0x8(%rbx), %xmm1
addsd 0x29c5d(%rip), %xmm1    # 0xa48e0
ucomisd %xmm1, %xmm0
jae 0x7acac
cmpb $0x3e, %al
jne 0x7aca5
movsd 0x8(%rbx), %xmm0
addsd 0x29c4e(%rip), %xmm0    # 0xa48e8
movq (%r14), %rax
ucomisd (%rax,%r15,8), %xmm0
jae 0x7acac
movl $0x1, %ebp
jmp 0x7acae
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq