// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movsd %xmm0, -0x28(%rbp)
movsd %xmm1, -0x30(%rbp)
movl -0x18(%rbp), %ecx
shll %ecx
movl $0x244, %eax            # imm = 0x244
cltd
idivl %ecx
movl %eax, -0x3c(%rbp)
movl $0x244, %eax            # imm = 0x244
cltd
idivl -0x18(%rbp)
movl %eax, -0x40(%rbp)
leaq 0x3acdae(%rip), %rax    # 0x3e2088
movl (%rax), %eax
cltd
idivl -0x14(%rbp)
movl %eax, -0x44(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3558d
movq -0x10(%rbp), %rax
cvtsi2sdl 0x90(%rax), %xmm0
movsd 0xad6b6(%rip), %xmm1    # 0xe29b8
addsd %xmm1, %xmm0
cvtsi2sdl -0x40(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd 0xaf659(%rip), %xmm1    # 0xe4970
addsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
leaq 0x3acd61(%rip), %rax    # 0x3e2088
cvtsi2sdl (%rax), %xmm1
movq -0x10(%rbp), %rax
cvtsi2sdl 0x94(%rax), %xmm0
movsd 0xad679(%rip), %xmm2    # 0xe29b8
addsd %xmm2, %xmm0
cvtsi2sdl -0x44(%rbp), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0xaf601(%rip), %xmm1    # 0xe4970
addsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movq -0x8(%rbp), %rdi
cvttsd2si -0x60(%rbp), %esi
cvttsd2si -0x58(%rbp), %edx
movl -0x3c(%rbp), %ecx
callq 0x32b00
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x35544
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cvtsi2sdl 0x90(%rax), %xmm0
movsd 0xad603(%rip), %xmm1    # 0xe29b8
addsd %xmm1, %xmm0
cvtsi2sdl -0x40(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd 0xaf5a6(%rip), %xmm1    # 0xe4970
addsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
leaq 0x3accae(%rip), %rax    # 0x3e2088
cvtsi2sdl (%rax), %xmm1
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cvtsi2sdl 0x94(%rax), %xmm0
movsd 0xad5c2(%rip), %xmm2    # 0xe29b8
addsd %xmm2, %xmm0
cvtsi2sdl -0x44(%rbp), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0xaf54a(%rip), %xmm1    # 0xe4970
addsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x60(%rbp), %xmm0
movsd -0x58(%rbp), %xmm1
movsd -0x80(%rbp), %xmm2
movsd -0x78(%rbp), %xmm3
callq 0x42070
movsd %xmm0, -0x50(%rbp)
movsd -0x80(%rbp), %xmm0
subsd -0x60(%rbp), %xmm0
movaps 0xada02(%rip), %xmm1    # 0xe2e60
pand %xmm1, %xmm0
cvtsi2sdl -0x3c(%rbp), %xmm1
mulsd %xmm1, %xmm0
divsd -0x50(%rbp), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x34(%rbp)
movsd -0x78(%rbp), %xmm0
subsd -0x58(%rbp), %xmm0
movaps 0xad9d8(%rip), %xmm1    # 0xe2e60
pand %xmm1, %xmm0
cvtsi2sdl -0x3c(%rbp), %xmm1
mulsd %xmm1, %xmm0
divsd -0x50(%rbp), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq (%rcx), %rax
jne 0x354da
movsd -0x60(%rbp), %xmm0
cvtsi2sdl -0x34(%rbp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x80(%rbp), %xmm0
cvtsi2sdl -0x34(%rbp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x70(%rbp)
jmp 0x35500
movsd -0x60(%rbp), %xmm0
cvtsi2sdl -0x34(%rbp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x80(%rbp), %xmm0
cvtsi2sdl -0x34(%rbp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x58(%rbp), %xmm0
cvtsi2sdl -0x38(%rbp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x78(%rbp), %xmm0
cvtsi2sdl -0x38(%rbp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x68(%rbp)
movq -0x8(%rbp), %rdi
cvttsd2si -0x60(%rbp), %esi
cvttsd2si -0x58(%rbp), %edx
cvttsd2si -0x70(%rbp), %ecx
cvttsd2si -0x68(%rbp), %r8d
callq 0x32a70
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
movl -0x1c(%rbp), %r8d
movsd -0x28(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
callq 0x35290
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
movl -0x1c(%rbp), %r8d
movsd -0x28(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
callq 0x35290
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)