// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/savecode.c
// Function: code_regressionnode
void code_regressionnode(FILE* testcodefile, PROGRAMMING_LANGUAGE_TYPE language, Datasetptr d, Regressionnodeptr m, int level)
{
 /*!Last Changed 14.06.2006*/
 int i;
 char st[MAXLENGTH], st2[MAXLENGTH], st3[MAXLENGTH], st4[MAXLENGTH];
 if (m->featureno != LEAF_NODE)
  {
   if (m->featureno >= 0)
    {
     code_array_index(st3, language, "testdataconverted", m->featureno);
     sprintf(st4, "%.6f", m->split);
    }
   else
     if (m->featureno == LINEAR)
      {
       code_array_index_variable(st2, language, "testdataconverted", "0");
       sprintf(st3, "%.6f * %s", real_feature(m->leftcenter, 0), st2);
       sprintf(st4, "%.6f * %s", real_feature(m->rightcenter, 0), st2);
       for (i = 1; i < d->multifeaturecount - 1; i++)
        {
         sprintf(st, "%d", i);
         code_array_index_variable(st2, language, "testdataconverted", st);
         sprintf(st3, "%s + %.6f * %s", st3, real_feature(m->leftcenter, i), st2);
         sprintf(st4, "%s + %.6f * %s", st4, real_feature(m->rightcenter, i), st2);
        }
      }
   code_if(testcodefile, language, "<=", st3, st4); 
   code_regressionnode(testcodefile, language, d, m->left, level + 1);
   code_else(testcodefile, language);
   code_regressionnode(testcodefile, language, d, m->right, level + 1);
   code_endif(testcodefile, language);      
  }
 else
  {
   if (m->leaftype == CONSTANTLEAF)
     code_function_return_regression(testcodefile, "regtree", language, m->regressionvalue);
   else
    {
     sprintf(st3, "%.6f", m->w.values[0][0]);
     for (i = 0; i < d->multifeaturecount - 1; i++)
      {
       sprintf(st, "%d", i);
       code_array_index_variable(st2, language, "testdataconverted", st);
       sprintf(st3, "%s + %.6f * %s", st3, m->w.values[i + 1][0], st2);
      }
     code_function_return_string(testcodefile, "regtree", language, st3);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e84e0, %rsp         # imm = 0x1E84E0
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq -0x20(%rbp), %rax
cmpl $-0x1, 0x68(%rax)
je 0xb2610
movq -0x20(%rbp), %rax
cmpl $0x0, 0x68(%rax)
jl 0xb23e6
leaq -0x16e390(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x20(%rbp), %rax
movl 0x68(%rax), %ecx
leaq 0x3ab36(%rip), %rdx     # 0xecef4
callq 0xb0420
leaq -0x1e84b0(%rbp), %rdi
movq -0x20(%rbp), %rax
movsd 0x50(%rax), %xmm0
leaq 0x3a4e0(%rip), %rsi     # 0xec8ba
movb $0x1, %al
callq 0x4170
jmp 0xb2593
movq -0x20(%rbp), %rax
cmpl $-0x2, 0x68(%rax)
jne 0xb2591
leaq -0xf4270(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x3aaef(%rip), %rdx     # 0xecef4
leaq 0x3ae7b(%rip), %rcx     # 0xed287
callq 0xb04c0
leaq -0x16e390(%rbp), %rax
movq %rax, -0x1e84c0(%rbp)
movq -0x20(%rbp), %rax
movq 0x80(%rax), %rdi
xorl %esi, %esi
callq 0x42c40
movq -0x1e84c0(%rbp), %rdi
leaq -0xf4270(%rbp), %rdx
leaq 0x3ab0c(%rip), %rsi     # 0xecf52
movb $0x1, %al
callq 0x4170
leaq -0x1e84b0(%rbp), %rax
movq %rax, -0x1e84b8(%rbp)
movq -0x20(%rbp), %rax
movq 0x88(%rax), %rdi
xorl %esi, %esi
callq 0x42c40
movq -0x1e84b8(%rbp), %rdi
leaq -0xf4270(%rbp), %rdx
leaq 0x3aad0(%rip), %rsi     # 0xecf52
movb $0x1, %al
callq 0x4170
movl $0x1, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x18(%rbp), %rcx
movl 0x1c0(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0xb258f
leaq -0x7a150(%rbp), %rdi
movl -0x28(%rbp), %edx
leaq 0x3adac(%rip), %rsi     # 0xed265
movb $0x0, %al
callq 0x4170
leaq -0xf4270(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x7a150(%rbp), %rcx
leaq 0x3aa1c(%rip), %rdx     # 0xecef4
callq 0xb04c0
leaq -0x16e390(%rbp), %rax
movq %rax, -0x1e84e0(%rbp)
leaq -0x16e390(%rbp), %rax
movq %rax, -0x1e84d8(%rbp)
movq -0x20(%rbp), %rax
movq 0x80(%rax), %rdi
movl -0x28(%rbp), %esi
callq 0x42c40
movq -0x1e84e0(%rbp), %rdi
movq -0x1e84d8(%rbp), %rdx
leaq -0xf4270(%rbp), %rcx
leaq 0x3aa25(%rip), %rsi     # 0xecf4d
movb $0x1, %al
callq 0x4170
leaq -0x1e84b0(%rbp), %rax
movq %rax, -0x1e84d0(%rbp)
leaq -0x1e84b0(%rbp), %rax
movq %rax, -0x1e84c8(%rbp)
movq -0x20(%rbp), %rax
movq 0x88(%rax), %rdi
movl -0x28(%rbp), %esi
callq 0x42c40
movq -0x1e84d0(%rbp), %rdi
movq -0x1e84c8(%rbp), %rdx
leaq -0xf4270(%rbp), %rcx
leaq 0x3a9d3(%rip), %rsi     # 0xecf4d
movb $0x1, %al
callq 0x4170
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xb2490
jmp 0xb2591
jmp 0xb2593
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x16e390(%rbp), %rcx
leaq -0x1e84b0(%rbp), %r8
leaq 0x33513(%rip), %rdx     # 0xe5ac2
callq 0xb0d00
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movl -0x24(%rbp), %r8d
addl $0x1, %r8d
callq 0xb2370
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xb0e70
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
movl -0x24(%rbp), %r8d
addl $0x1, %r8d
callq 0xb2370
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xb0ec0
jmp 0xb2715
movq -0x20(%rbp), %rax
cmpl $0x0, 0x6c(%rax)
jne 0xb263b
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
movq -0x20(%rbp), %rax
movsd 0x70(%rax), %xmm0
leaq 0x343b6(%rip), %rsi     # 0xe69e7
callq 0xb02c0
jmp 0xb2713
leaq -0x16e390(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq (%rax), %rax
movsd (%rax), %xmm0
leaq 0x3a262(%rip), %rsi     # 0xec8ba
movb $0x1, %al
callq 0x4170
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x18(%rbp), %rcx
movl 0x1c0(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0xb26f9
leaq -0x7a150(%rbp), %rdi
movl -0x28(%rbp), %edx
leaq 0x3abda(%rip), %rsi     # 0xed265
movb $0x0, %al
callq 0x4170
leaq -0xf4270(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x7a150(%rbp), %rcx
leaq 0x3a84a(%rip), %rdx     # 0xecef4
callq 0xb04c0
leaq -0x16e390(%rbp), %rdi
leaq -0x16e390(%rbp), %rdx
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x28(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
leaq -0xf4270(%rbp), %rcx
leaq 0x3a869(%rip), %rsi     # 0xecf4d
movb $0x1, %al
callq 0x4170
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xb2666
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq -0x16e390(%rbp), %rcx
leaq 0x342d9(%rip), %rsi     # 0xe69e7
callq 0xb01f0
jmp 0xb2715
addq $0x1e84e0, %rsp         # imm = 0x1E84E0
popq %rbp
retq
nop