// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/savecode.c
// Function: code_condition
void code_condition(PROGRAMMING_LANGUAGE_TYPE language, Datasetptr d, Decisionconditionptr condition, char* st)
{
 /*!Last Changed 15.06.2006*/ 
 char stop[3], operand1[MAXLENGTH], operand2[MAXLENGTH], st2[MAXLENGTH], st3[MAXLENGTH];
 int i;
 switch (condition->comparison){
   case '<':strcpy(stop, "<=");
            break;
   case '>':strcpy(stop, ">");
            break;
   case '=':strcpy(stop, "==");
            break;
 }
 if (condition->featureindex >= 0)
  {
   code_array_index(operand1, language, "testdata", condition->featureindex);
   switch (d->features[condition->featureindex].type){
     case INTEGER:
     case STRING :sprintf(operand2, "%d", (int) condition->value);
                  break;
     case REAL   :sprintf(operand2, "%.6f", condition->value);
                  break;
   }
  }
 else
   if (condition->featureindex == LINEAR)
    {
     sprintf(operand2, "%.6f", condition->w0);
     sprintf(st2, "%d", 0);
     code_array_index_variable(st3, language, "testdataconverted", st2);
     sprintf(operand1, "%.6f * %s", condition->w.values[0][0], st3);
     for (i = 1; i < d->multifeaturecount - 1; i++)
      {
       sprintf(st2, "%d", i);
       code_array_index_variable(st3, language, "testdataconverted", st2);
       sprintf(operand1, "%s + %.6f * %s", operand1, condition->w.values[0][i], st3);
      }     
    }
 code_simple_logical_expression(language, stop, operand1, operand2, st);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e84a8, %rsp         # imm = 0x1E84A8
movq %rcx, 0x18(%rsp)
movq %rdx, %r14
movq %rsi, %r12
movl %edi, %r15d
movzbl 0x4(%rdx), %eax
cmpl $0x3e, %eax
je 0x7dfd1
cmpl $0x3d, %eax
je 0x7dfc3
cmpl $0x3c, %eax
jne 0x7dfd8
movb $0x0, 0xe(%rsp)
movw $0x3d3c, 0xc(%rsp)      # imm = 0x3D3C
jmp 0x7dfd8
movb $0x0, 0xe(%rsp)
movw $0x3d3d, 0xc(%rsp)      # imm = 0x3D3D
jmp 0x7dfd8
movw $0x3e, 0xc(%rsp)
movl (%r14), %ecx
testl %ecx, %ecx
js 0x7e033
leaq 0x2f880(%rip), %rdx     # 0xad866
leaq 0x7a140(%rsp), %rdi
movl %r15d, %ebx
movl %r15d, %esi
callq 0x7c219
movslq (%r14), %rax
imulq $0x340, %rax, %rax      # imm = 0x340
cmpl $0x2, 0x30f08(%r12,%rax)
jae 0x7e14c
cvttsd2si 0x8(%r14), %edx
leaq 0x2fb3e(%rip), %rsi     # 0xadb5d
leaq 0x20(%rsp), %rdi
xorl %eax, %eax
callq 0x41b0
movl %ebx, %r15d
jmp 0x7e16a
cmpl $-0x2, %ecx
jne 0x7e16a
movsd 0x30(%r14), %xmm0
leaq 0x2f169(%rip), %rsi     # 0xad1b2
leaq 0x20(%rsp), %rdi
movb $0x1, %al
movq %r12, 0x10(%rsp)
callq 0x41b0
leaq 0x2fafc(%rip), %rsi     # 0xadb5d
leaq 0x16e380(%rsp), %rbx
movq %rbx, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x41b0
leaq 0x2f770(%rip), %rdx     # 0xad7ec
leaq 0xf4260(%rsp), %r12
movq %r12, %rdi
movl %r15d, %esi
movq %rbx, %rcx
callq 0x7c24c
movq 0x28(%r14), %rax
movq (%rax), %rax
movsd (%rax), %xmm0
leaq 0x2f7a6(%rip), %rsi     # 0xad84a
leaq 0x7a140(%rsp), %rdi
movq %r12, %rdx
movb $0x1, %al
callq 0x41b0
movq 0x10(%rsp), %rax
cmpl $0x3, 0x1c0(%rax)
jl 0x7e16a
movl $0x1, %r12d
leaq 0x16e380(%rsp), %rbx
leaq 0xf4260(%rsp), %r13
leaq 0x7a140(%rsp), %rbp
movq %rbx, %rdi
leaq 0x2fa6d(%rip), %rsi     # 0xadb5d
movl %r12d, %edx
xorl %eax, %eax
callq 0x41b0
movq %r13, %rdi
movl %r15d, %esi
leaq 0x2f6e5(%rip), %rdx     # 0xad7ec
movq %rbx, %rcx
callq 0x7c24c
movq 0x28(%r14), %rax
movq (%rax), %rax
movsd (%rax,%r12,8), %xmm0
movq %rbp, %rdi
leaq 0x2f71f(%rip), %rsi     # 0xad845
movq %rbp, %rdx
movq %r13, %rcx
movb $0x1, %al
callq 0x41b0
incq %r12
movq 0x10(%rsp), %rax
movslq 0x1c0(%rax), %rax
decq %rax
cmpq %rax, %r12
jl 0x7e0e6
jmp 0x7e16a
movl %ebx, %r15d
jne 0x7e16a
movsd 0x8(%r14), %xmm0
leaq 0x2f054(%rip), %rsi     # 0xad1b2
leaq 0x20(%rsp), %rdi
movb $0x1, %al
callq 0x41b0
leaq 0xc(%rsp), %rsi
leaq 0x7a140(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movl %r15d, %edi
movq 0x18(%rsp), %r8
callq 0x7c601
addq $0x1e84a8, %rsp         # imm = 0x1E84A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq