// File: /workspace/github_c_makefile_star2_O2/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 $0x1e8498, %rsp         # imm = 0x1E8498
movq %rcx, 0x8(%rsp)
movq %rdx, %r14
movq %rsi, %r15
movl %edi, 0x4(%rsp)
movzbl 0x4(%rdx), %eax
cmpl $0x3e, %eax
je 0x74cc3
cmpl $0x3d, %eax
je 0x74cb6
cmpl $0x3c, %eax
jne 0x74cc9
movb $0x0, 0x2(%rsp)
movw $0x3d3c, (%rsp)         # imm = 0x3D3C
jmp 0x74cc9
movb $0x0, 0x2(%rsp)
movw $0x3d3d, (%rsp)         # imm = 0x3D3D
jmp 0x74cc9
movw $0x3e, (%rsp)
movl (%r14), %ecx
testl %ecx, %ecx
js 0x74d1f
leaq 0x2bb8b(%rip), %rdx     # 0xa0862
leaq 0x7a130(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x73250
movslq (%r14), %rax
imulq $0x340, %rax, %rax      # imm = 0x340
cmpl $0x2, 0x30f08(%r15,%rax)
jae 0x74e04
cvttsd2si 0x8(%r14), %edx
leaq 0x2be4b(%rip), %rsi     # 0xa0b59
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x41b0
jmp 0x74e1f
cmpl $-0x2, %ecx
jne 0x74e1f
movsd 0x30(%r14), %xmm0
leaq 0x2b479(%rip), %rsi     # 0xa01ae
leaq 0x10(%rsp), %rdi
movb $0x1, %al
callq 0x41b0
leaq 0x2be11(%rip), %rsi     # 0xa0b59
leaq 0x16e370(%rsp), %r13
movq %r13, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x41b0
leaq 0x2ba85(%rip), %rdx     # 0xa07e8
leaq 0xf4250(%rsp), %r12
movq %r12, %rdi
movl 0x4(%rsp), %esi
movq %r13, %rcx
callq 0x7327f
movq 0x28(%r14), %rax
movq (%rax), %rax
movsd (%rax), %xmm0
leaq 0x2baba(%rip), %rsi     # 0xa0846
leaq 0x7a130(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rdx
movb $0x1, %al
callq 0x41b0
pushq $0x1
popq %rbp
movslq 0x1c0(%r15), %rax
decq %rax
cmpq %rax, %rbp
jge 0x74e1f
movq %r13, %rdi
leaq 0x2bd9c(%rip), %rsi     # 0xa0b59
movl %ebp, %edx
xorl %eax, %eax
callq 0x41b0
movq %r12, %rdi
movl 0x4(%rsp), %esi
leaq 0x2ba14(%rip), %rdx     # 0xa07e8
movq %r13, %rcx
callq 0x7327f
movq 0x28(%r14), %rax
movq (%rax), %rax
movsd (%rax,%rbp,8), %xmm0
movq %rbx, %rdi
leaq 0x2ba4f(%rip), %rsi     # 0xa0841
movq %rbx, %rdx
movq %r12, %rcx
movb $0x1, %al
callq 0x41b0
incq %rbp
jmp 0x74da4
jne 0x74e1f
movsd 0x8(%r14), %xmm0
leaq 0x2b39b(%rip), %rsi     # 0xa01ae
leaq 0x10(%rsp), %rdi
movb $0x1, %al
callq 0x41b0
movq %rsp, %rsi
leaq 0x7a130(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movl 0x4(%rsp), %edi
movq 0x8(%rsp), %r8
callq 0x7356c
addq $0x1e8498, %rsp         # imm = 0x1E8498
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq