// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x1e84c0, %rsp         # imm = 0x1E84C0
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movsbl 0x4(%rax), %eax
movl %eax, -0x1e84b8(%rbp)
subl $0x3c, %eax
je 0xb2b69
jmp 0xb2b4f
movl -0x1e84b8(%rbp), %eax
subl $0x3d, %eax
je 0xb2b8d
jmp 0xb2b5c
movl -0x1e84b8(%rbp), %eax
subl $0x3e, %eax
je 0xb2b7b
jmp 0xb2b9d
leaq -0x23(%rbp), %rdi
leaq 0x32f4e(%rip), %rsi     # 0xe5ac2
callq 0x4220
jmp 0xb2b9d
leaq -0x23(%rbp), %rdi
leaq 0x3ac58(%rip), %rsi     # 0xed7de
callq 0x4220
jmp 0xb2b9d
leaq -0x23(%rbp), %rdi
leaq 0x32f30(%rip), %rsi     # 0xe5ac8
callq 0x4220
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jl 0xb2c3c
movl -0x4(%rbp), %esi
movq -0x18(%rbp), %rax
movl (%rax), %ecx
leaq 0x3a3b4(%rip), %rdx     # 0xecf6e
leaq -0x7a150(%rbp), %rdi
callq 0xb0420
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq (%rcx), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
movl 0x30f08(%rax,%rcx), %eax
movl %eax, -0x1e84bc(%rbp)
subl $0x2, %eax
jb 0xb2bf9
jmp 0xb2bec
movl -0x1e84bc(%rbp), %eax
subl $0x2, %eax
je 0xb2c19
jmp 0xb2c37
leaq -0xf4270(%rbp), %rdi
movq -0x18(%rbp), %rax
cvttsd2si 0x8(%rax), %edx
leaq 0x3a655(%rip), %rsi     # 0xed265
movb $0x0, %al
callq 0x4170
jmp 0xb2c37
leaq -0xf4270(%rbp), %rdi
movq -0x18(%rbp), %rax
movsd 0x8(%rax), %xmm0
leaq 0x39c8a(%rip), %rsi     # 0xec8ba
movb $0x1, %al
callq 0x4170
jmp 0xb2d75
movq -0x18(%rbp), %rax
cmpl $-0x2, (%rax)
jne 0xb2d73
leaq -0xf4270(%rbp), %rdi
movq -0x18(%rbp), %rax
movsd 0x30(%rax), %xmm0
leaq 0x39c5a(%rip), %rsi     # 0xec8ba
movb $0x1, %al
callq 0x4170
leaq -0x16e390(%rbp), %rdi
leaq 0x3a5f0(%rip), %rsi     # 0xed265
xorl %edx, %edx
movb $0x0, %al
callq 0x4170
leaq -0x1e84b0(%rbp), %rdi
movl -0x4(%rbp), %esi
leaq -0x16e390(%rbp), %rcx
leaq 0x3a25e(%rip), %rdx     # 0xecef4
callq 0xb04c0
leaq -0x7a150(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rax
movsd (%rax), %xmm0
leaq -0x1e84b0(%rbp), %rdx
leaq 0x3a293(%rip), %rsi     # 0xecf52
movb $0x1, %al
callq 0x4170
movl $0x1, -0x1e84b4(%rbp)
movl -0x1e84b4(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0x1c0(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0xb2d71
leaq -0x16e390(%rbp), %rdi
movl -0x1e84b4(%rbp), %edx
leaq 0x3a566(%rip), %rsi     # 0xed265
movb $0x0, %al
callq 0x4170
leaq -0x1e84b0(%rbp), %rdi
movl -0x4(%rbp), %esi
leaq -0x16e390(%rbp), %rcx
leaq 0x3a1d6(%rip), %rdx     # 0xecef4
callq 0xb04c0
leaq -0x7a150(%rbp), %rdi
leaq -0x7a150(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rax
movslq -0x1e84b4(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq -0x1e84b0(%rbp), %rcx
leaq 0x3a1f7(%rip), %rsi     # 0xecf4d
movb $0x1, %al
callq 0x4170
movl -0x1e84b4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1e84b4(%rbp)
jmp 0xb2cd0
jmp 0xb2d73
jmp 0xb2d75
movl -0x4(%rbp), %edi
leaq -0x23(%rbp), %rsi
leaq -0x7a150(%rbp), %rdx
leaq -0xf4270(%rbp), %rcx
movq -0x20(%rbp), %r8
callq 0xb0a80
addq $0x1e84c0, %rsp         # imm = 0x1E84C0
popq %rbp
retq
nopl (%rax)