// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/eps.c
// Function: plot_regression_node
void plot_regression_node(FILE* outfile, Regressionnodeptr rootnode, int maxdepth, int maxwidth, int algorithm, double outputmean, double outputvariance)
{
 int dx, dy, radius = (epsaxis + MARGIN) / (WIDTHFACTOR * maxwidth), node_width = (epsaxis + MARGIN) / maxwidth, node_height = img.height / maxdepth;
 double l;
 Point p1, p2, parent;
 if (rootnode)
  {
   p1.x = MARGIN / 2 + (rootnode->x + 0.5) * node_width;
   p1.y = img.height - (rootnode->y + 0.5) * node_height + MARGIN / 2;
   write_circle(outfile, p1.x, p1.y, radius);
   if (rootnode->parent)
    {
     parent.x = MARGIN / 2 + (rootnode->parent->x + 0.5) * node_width;
     parent.y = img.height - (rootnode->parent->y + 0.5) * node_height + MARGIN / 2;
     l = point_to_point_distance(p1, parent);
     dx = fabs(parent.x - p1.x) * radius / l;
     dy = fabs(parent.y - p1.y) * radius / l;
     if (rootnode == rootnode->parent->left)
      {  
       p1.x = p1.x + dx;
       p2.x = parent.x - dx;
      }
     else
      {
       p1.x = p1.x - dx;
       p2.x = parent.x + dx;      
      }
     p1.y = p1.y + dy;
     p2.y = parent.y - dy;
     write_line(outfile, p1.x, p1.y, p2.x, p2.y);
    }
   plot_regression_node(outfile, rootnode->left, maxdepth, maxwidth, algorithm, outputmean, outputvariance);
   plot_regression_node(outfile, rootnode->right, maxdepth, maxwidth, algorithm, outputmean, outputvariance);
  }  
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movsd %xmm1, 0x30(%rsp)
movsd %xmm0, 0x28(%rsp)
movl %r8d, 0x10(%rsp)
movl %ecx, %ebp
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r12
leal (,%rbp,2), %eax
movl %eax, 0x14(%rsp)
movl %edx, 0xc(%rsp)
movl $0x244, %eax            # imm = 0x244
xorl %edx, %edx
idivl 0x14(%rsp)
testq %r15, %r15
je 0x250b1
movl %eax, %r13d
leaq 0x38a22d(%rip), %rax    # 0x3af0b8
movl (%rax), %ecx
movl %ecx, %eax
cltd
idivl %ebx
movl %eax, %esi
movl $0x244, %eax            # imm = 0x244
xorl %edx, %edx
movq %rbp, %r14
idivl %ebp
xorps %xmm3, %xmm3
cvtsi2sdl 0x90(%r15), %xmm3
movsd 0x7de64(%rip), %xmm1    # 0xa2d18
addsd %xmm1, %xmm3
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, (%rsp)
mulsd %xmm0, %xmm3
xorps %xmm4, %xmm4
cvtsi2sd %ecx, %xmm4
xorps %xmm0, %xmm0
cvtsi2sdl 0x94(%r15), %xmm0
movsd 0x7fe85(%rip), %xmm2    # 0xa4d68
addsd %xmm2, %xmm3
addsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
movsd %xmm1, 0x40(%rsp)
mulsd %xmm1, %xmm0
subsd %xmm0, %xmm4
movsd %xmm3, 0x18(%rsp)
cvttsd2si %xmm3, %ebx
addsd %xmm2, %xmm4
movsd %xmm4, 0x20(%rsp)
cvttsd2si %xmm4, %ebp
leal (%r13,%rbx), %edx
movq %r12, %rdi
leaq 0x800bc(%rip), %rsi     # 0xa4fe3
movl %ebp, %ecx
xorl %eax, %eax
callq 0x42e0
movq %r12, %rdi
leaq 0x800b7(%rip), %rsi     # 0xa4ff1
movl %r13d, %edx
movl %ebx, %ecx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x42e0
movq 0x18(%r15), %rax
testq %rax, %rax
je 0x25081
xorps %xmm3, %xmm3
cvtsi2sdl 0x90(%rax), %xmm3
movsd 0x7ddaf(%rip), %xmm1    # 0xa2d18
addsd %xmm1, %xmm3
mulsd (%rsp), %xmm3
movsd 0x7fdee(%rip), %xmm4    # 0xa4d68
addsd %xmm4, %xmm3
movapd %xmm3, %xmm2
movsd %xmm3, 0x38(%rsp)
leaq 0x38a129(%rip), %rcx    # 0x3af0b8
xorps %xmm3, %xmm3
cvtsi2sdl (%rcx), %xmm3
xorps %xmm0, %xmm0
cvtsi2sdl 0x94(%rax), %xmm0
addsd %xmm1, %xmm0
mulsd 0x40(%rsp), %xmm0
subsd %xmm0, %xmm3
addsd %xmm4, %xmm3
movsd 0x18(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
movsd %xmm3, (%rsp)
callq 0x2dd8e
movsd 0x38(%rsp), %xmm7
movapd %xmm7, %xmm2
movsd 0x18(%rsp), %xmm5
subsd %xmm5, %xmm2
andpd 0x7e1fb(%rip), %xmm2    # 0xa31e0
xorps %xmm1, %xmm1
cvtsi2sd %r13d, %xmm1
mulsd %xmm1, %xmm2
divsd %xmm0, %xmm2
cvttpd2dq %xmm2, %xmm2
movq 0x18(%r15), %rax
cvtdq2pd %xmm2, %xmm2
movapd %xmm2, %xmm4
xorpd 0x7e1c3(%rip), %xmm4    # 0xa31d0
movapd %xmm4, %xmm3
cmpq %r15, (%rax)
je 0x2501a
movapd %xmm2, %xmm3
je 0x25020
movapd %xmm4, %xmm2
movsd (%rsp), %xmm8
movapd %xmm8, %xmm4
movsd 0x20(%rsp), %xmm6
subsd %xmm6, %xmm4
andpd 0x7e1a3(%rip), %xmm4    # 0xa31e0
mulsd %xmm1, %xmm4
divsd %xmm0, %xmm4
addsd %xmm3, %xmm7
addsd %xmm2, %xmm5
cvttpd2dq %xmm4, %xmm0
cvtdq2pd %xmm0, %xmm0
addsd %xmm0, %xmm6
subsd %xmm0, %xmm8
cvttsd2si %xmm5, %edx
cvttsd2si %xmm6, %ecx
cvttsd2si %xmm7, %r8d
cvttsd2si %xmm8, %r9d
movq %r12, %rdi
leaq 0x7ff88(%rip), %rsi     # 0xa5002
xorl %eax, %eax
callq 0x42e0
movq (%r15), %rsi
movq %r12, %rdi
movl 0xc(%rsp), %ebx
movl %ebx, %edx
movq %r14, %rbp
movl %ebp, %ecx
movl 0x10(%rsp), %r8d
movsd 0x28(%rsp), %xmm0
movsd 0x30(%rsp), %xmm1
callq 0x24e35
movq 0x8(%r15), %r15
jmp 0x24e6d
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq