// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/eps.c
// Function: plot_regression_node_model
void plot_regression_node_model(FILE* outfile, Regressionnodeptr rootnode, Point p, int radius, double outputmean, double outputvariance)
{
 double output, prevoutput, input, posy1, posy2; 
 double minoutput = -1.5, maxoutput = 1.5;
 int i, width = (2 * WIDTHFACTOR - 0.5) * radius, height = width, left = p.x - width / 2, right = p.x + width / 2, top = p.y - 2 * radius, bottom = p.y - 2 * radius - height, bottom2 = p.y - 2 * radius - height / 2;
 write_rectangle(outfile, left, top, right, bottom, FILL_NONE, BLACK);
 for (i = 1; i < 4; i++)
  {
   write_line(outfile, left + i * ((right - left) / 4.0), bottom, left + i * ((right - left) / 4.0), bottom + 2);   
   write_line(outfile, left + i * ((right - left) / 4.0), top, left + i * ((right - left) / 4.0), top - 2);   
  }
 for (i = 1; i < 6; i++)
  {
   write_line(outfile, left, bottom + i * ((top - bottom) / 6.0), left + 2, bottom + i * ((top - bottom) / 6.0));   
   write_line(outfile, right - 2, bottom + i * ((top - bottom) / 6.0), right, bottom + i * ((top - bottom) / 6.0));   
  }
 setcolor(outfile, RED);
 for (i = 0; i <= width; i++)
  {
   prevoutput = output;
   input = ((-2 + i * (4.0 / width)) - mean.values[0].floatvalue) / sqrt(variance.values[0].floatvalue);
   output = soft_output_of_subregressiontree(rootnode, input) * sqrt(outputvariance) + outputmean;
   if (i != 0 && output <= maxoutput && output >= minoutput)
    {
     posy1 = return_pos(prevoutput, bottom, top, minoutput, maxoutput);
     posy2 = return_pos(output, bottom, top, minoutput, maxoutput);
     write_line(outfile, left + i - 1, posy1, left + i, posy2);      
    }
  }
 setcolor(outfile, BLACK);
 write_rectangle(outfile, left + width, top, right + width / 2, bottom2, FILL_NONE, BLACK);
 for (i = 0; i <= width / 2; i++)
  {
   prevoutput = output;
   input = ((-2 + i * (8.0 / width)) - mean.values[0].floatvalue) / sqrt(variance.values[0].floatvalue);
   output = sigmoid(rootnode->w.values[0][0] + rootnode->w.values[1][0] * input);
   if (i != 0)
    {
     posy1 = return_pos(prevoutput, bottom2, top, 0.0, 1.0);
     posy2 = return_pos(output, bottom2, top, 0.0, 1.0);
     write_line(outfile, left + width + i - 1, posy1, left + width + i, posy2);      
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movl %edx, -0x24(%rbp)
movsd %xmm2, -0x30(%rbp)
movsd %xmm3, -0x38(%rbp)
movsd 0xb0616(%rip), %xmm0    # 0xe4968
movsd %xmm0, -0x68(%rbp)
movsd 0xae719(%rip), %xmm0    # 0xe2a78
movsd %xmm0, -0x70(%rbp)
cvtsi2sdl -0x24(%rbp), %xmm1
movsd 0xb05ef(%rip), %xmm0    # 0xe4960
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x78(%rbp)
movl -0x78(%rbp), %eax
movl %eax, -0x7c(%rbp)
movsd -0x10(%rbp), %xmm0
movl -0x78(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cvtsi2sd %eax, %xmm1
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x80(%rbp)
movsd -0x10(%rbp), %xmm0
movl -0x78(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cvtsi2sd %eax, %xmm1
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x84(%rbp)
movsd -0x8(%rbp), %xmm0
movl -0x24(%rbp), %eax
shll %eax
cvtsi2sd %eax, %xmm1
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x88(%rbp)
movsd -0x8(%rbp), %xmm0
movl -0x24(%rbp), %eax
shll %eax
cvtsi2sd %eax, %xmm1
subsd %xmm1, %xmm0
cvtsi2sdl -0x7c(%rbp), %xmm1
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x8c(%rbp)
movsd -0x8(%rbp), %xmm0
movl -0x24(%rbp), %eax
shll %eax
cvtsi2sd %eax, %xmm1
subsd %xmm1, %xmm0
movl -0x7c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cvtsi2sd %eax, %xmm1
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x90(%rbp)
movq -0x18(%rbp), %rdi
movl -0x80(%rbp), %esi
movl -0x88(%rbp), %edx
movl -0x84(%rbp), %ecx
movl -0x8c(%rbp), %r8d
xorl %r9d, %r9d
movl $0x0, (%rsp)
callq 0x32d30
movl $0x1, -0x74(%rbp)
cmpl $0x4, -0x74(%rbp)
jge 0x3456b
movq -0x18(%rbp), %rdi
cvtsi2sdl -0x80(%rbp), %xmm1
cvtsi2sdl -0x74(%rbp), %xmm0
movl -0x84(%rbp), %eax
subl -0x80(%rbp), %eax
cvtsi2sd %eax, %xmm2
movsd 0xae5f0(%rip), %xmm3    # 0xe2a80
divsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %esi
movl -0x8c(%rbp), %edx
cvtsi2sdl -0x80(%rbp), %xmm1
cvtsi2sdl -0x74(%rbp), %xmm0
movl -0x84(%rbp), %eax
subl -0x80(%rbp), %eax
cvtsi2sd %eax, %xmm2
movsd 0xae5bb(%rip), %xmm3    # 0xe2a80
divsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movl -0x8c(%rbp), %r8d
addl $0x2, %r8d
callq 0x32a70
movq -0x18(%rbp), %rdi
cvtsi2sdl -0x80(%rbp), %xmm1
cvtsi2sdl -0x74(%rbp), %xmm0
movl -0x84(%rbp), %eax
subl -0x80(%rbp), %eax
cvtsi2sd %eax, %xmm2
movsd 0xae578(%rip), %xmm3    # 0xe2a80
divsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %esi
movl -0x88(%rbp), %edx
cvtsi2sdl -0x80(%rbp), %xmm1
cvtsi2sdl -0x74(%rbp), %xmm0
movl -0x84(%rbp), %eax
subl -0x80(%rbp), %eax
cvtsi2sd %eax, %xmm2
movsd 0xae543(%rip), %xmm3    # 0xe2a80
divsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movl -0x88(%rbp), %r8d
subl $0x2, %r8d
callq 0x32a70
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x34463
movl $0x1, -0x74(%rbp)
cmpl $0x6, -0x74(%rbp)
jge 0x3468a
movq -0x18(%rbp), %rdi
movl -0x80(%rbp), %esi
cvtsi2sdl -0x8c(%rbp), %xmm1
cvtsi2sdl -0x74(%rbp), %xmm0
movl -0x88(%rbp), %eax
subl -0x8c(%rbp), %eax
cvtsi2sd %eax, %xmm2
movsd 0xb02c0(%rip), %xmm3    # 0xe4868
divsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %edx
movl -0x80(%rbp), %ecx
addl $0x2, %ecx
cvtsi2sdl -0x8c(%rbp), %xmm1
cvtsi2sdl -0x74(%rbp), %xmm0
movl -0x88(%rbp), %eax
subl -0x8c(%rbp), %eax
cvtsi2sd %eax, %xmm2
movsd 0xb0285(%rip), %xmm3    # 0xe4868
divsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %r8d
callq 0x32a70
movq -0x18(%rbp), %rdi
movl -0x84(%rbp), %esi
subl $0x2, %esi
cvtsi2sdl -0x8c(%rbp), %xmm1
cvtsi2sdl -0x74(%rbp), %xmm0
movl -0x88(%rbp), %eax
subl -0x8c(%rbp), %eax
cvtsi2sd %eax, %xmm2
movsd 0xb023d(%rip), %xmm3    # 0xe4868
divsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %edx
movl -0x84(%rbp), %ecx
cvtsi2sdl -0x8c(%rbp), %xmm1
cvtsi2sdl -0x74(%rbp), %xmm0
movl -0x88(%rbp), %eax
subl -0x8c(%rbp), %eax
cvtsi2sd %eax, %xmm2
movsd 0xb0202(%rip), %xmm3    # 0xe4868
divsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %r8d
callq 0x32a70
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x34572
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x31ae0
movl $0x0, -0x74(%rbp)
movl -0x74(%rbp), %eax
cmpl -0x78(%rbp), %eax
jg 0x34804
movsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
cvtsi2sdl -0x74(%rbp), %xmm0
cvtsi2sdl -0x78(%rbp), %xmm2
movsd 0xae3b9(%rip), %xmm1    # 0xe2a80
divsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd 0xb01e1(%rip), %xmm1    # 0xe48b8
addsd %xmm1, %xmm0
leaq 0x3ad896(%rip), %rax    # 0x3e1f78
movq (%rax), %rax
subsd (%rax), %xmm0
movsd %xmm0, -0xa0(%rbp)
leaq 0x3ad8b0(%rip), %rax    # 0x3e1fa8
movq (%rax), %rax
movsd (%rax), %xmm0
callq 0x42a0
movaps %xmm0, %xmm1
movsd -0xa0(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x20(%rbp), %rdi
movsd -0x50(%rbp), %xmm0
callq 0xbe9f0
movsd %xmm0, -0x98(%rbp)
movsd -0x38(%rbp), %xmm0
callq 0x42a0
movaps %xmm0, %xmm2
movsd -0x98(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
cmpl $0x0, -0x74(%rbp)
je 0x347f4
movsd -0x40(%rbp), %xmm1
movsd -0x70(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x347f4
movsd -0x40(%rbp), %xmm0
ucomisd -0x68(%rbp), %xmm0
jb 0x347f4
movsd -0x48(%rbp), %xmm0
movl -0x8c(%rbp), %edi
movl -0x88(%rbp), %esi
movsd -0x68(%rbp), %xmm1
movsd -0x70(%rbp), %xmm2
callq 0x42230
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x40(%rbp), %xmm0
movl -0x8c(%rbp), %edi
movl -0x88(%rbp), %esi
movsd -0x68(%rbp), %xmm1
movsd -0x70(%rbp), %xmm2
callq 0x42230
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x60(%rbp)
movq -0x18(%rbp), %rdi
movl -0x80(%rbp), %esi
addl -0x74(%rbp), %esi
subl $0x1, %esi
cvttsd2si -0x58(%rbp), %edx
movl -0x80(%rbp), %ecx
addl -0x74(%rbp), %ecx
cvttsd2si -0x60(%rbp), %r8d
callq 0x32a70
jmp 0x347f6
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x3469f
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x31ae0
movq -0x18(%rbp), %rdi
movl -0x80(%rbp), %esi
addl -0x78(%rbp), %esi
movl -0x88(%rbp), %eax
movl %eax, -0xa4(%rbp)
movl -0x84(%rbp), %ecx
movl -0x78(%rbp), %eax
movl $0x2, %r8d
cltd
idivl %r8d
movl -0xa4(%rbp), %edx
addl %eax, %ecx
movl -0x90(%rbp), %r8d
xorl %r9d, %r9d
movl $0x0, (%rsp)
callq 0x32d30
movl $0x0, -0x74(%rbp)
movl -0x74(%rbp), %eax
movl %eax, -0xa8(%rbp)
movl -0x78(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0xa8(%rbp), %eax
cmpl %ecx, %eax
jg 0x349b7
movsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
cvtsi2sdl -0x74(%rbp), %xmm0
cvtsi2sdl -0x78(%rbp), %xmm2
movsd 0xb00b3(%rip), %xmm1    # 0xe4950
divsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd 0xb000b(%rip), %xmm1    # 0xe48b8
addsd %xmm1, %xmm0
leaq 0x3ad6c0(%rip), %rax    # 0x3e1f78
movq (%rax), %rax
subsd (%rax), %xmm0
movsd %xmm0, -0xb0(%rbp)
leaq 0x3ad6da(%rip), %rax    # 0x3e1fa8
movq (%rax), %rax
movsd (%rax), %xmm0
callq 0x42a0
movaps %xmm0, %xmm1
movsd -0xb0(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq (%rax), %rax
movsd (%rax), %xmm1
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rax
movsd (%rax), %xmm0
movsd -0x50(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x7aab0
movsd %xmm0, -0x40(%rbp)
cmpl $0x0, -0x74(%rbp)
je 0x349a7
movsd -0x48(%rbp), %xmm0
movl -0x90(%rbp), %edi
movl -0x88(%rbp), %esi
xorps %xmm1, %xmm1
movsd 0xad6d2(%rip), %xmm2    # 0xe2018
callq 0x42230
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x40(%rbp), %xmm0
movl -0x90(%rbp), %edi
movl -0x88(%rbp), %esi
xorps %xmm1, %xmm1
movsd 0xad6a8(%rip), %xmm2    # 0xe2018
callq 0x42230
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x60(%rbp)
movq -0x18(%rbp), %rdi
movl -0x80(%rbp), %esi
addl -0x78(%rbp), %esi
addl -0x74(%rbp), %esi
subl $0x1, %esi
cvttsd2si -0x58(%rbp), %edx
movl -0x80(%rbp), %ecx
addl -0x78(%rbp), %ecx
addl -0x74(%rbp), %ecx
cvttsd2si -0x60(%rbp), %r8d
callq 0x32a70
jmp 0x349a9
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x3485d
addq $0xc0, %rsp
popq %rbp
retq