// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/eps.c
// Function: plot_regression_model_at_node
void plot_regression_model_at_node(FILE* outfile, Regressionnodeptr rootnode, int maxdepth, int maxwidth, double outputmean, double outputvariance)
{
 int radius = (epsaxis + MARGIN) / (WIDTHFACTOR * maxwidth), node_width = (epsaxis + MARGIN) / maxwidth, node_height = img.height / maxdepth;
 Point p1, 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 + 2 * radius;
   if (rootnode->featureno == LEAF_NODE)
     plot_regression_leaf_model(outfile, rootnode, p1, radius, SOFTREGTREE, outputmean, outputvariance);
   else
     plot_regression_node_model(outfile, rootnode, p1, radius, outputmean, outputvariance);
   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 + 2 * radius;
     write_line(outfile, p1.x, p1.y - 2 * radius, parent.x, parent.y - (2 * WIDTHFACTOR + 1.5) * radius);
    }   
   plot_regression_model_at_node(outfile, rootnode->left, maxdepth, maxwidth, outputmean, outputvariance);
   plot_regression_model_at_node(outfile, rootnode->right, maxdepth, maxwidth, outputmean, outputvariance);
  }  
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r14
leal (%rbx,%rbx), %ecx
movl $0x244, %eax            # imm = 0x244
xorl %edx, %edx
idivl %ecx
movl %eax, %r15d
leal (%r15,%r15), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x18(%rsp)
movq %rdi, %r12
cvtsi2sd %r15d, %xmm0
leaq 0x3875d2(%rip), %r13    # 0x3aa0b8
mulsd 0x7528a(%rip), %xmm0    # 0x97d78
movsd %xmm0, 0x20(%rsp)
testq %r14, %r14
je 0x22c5e
movl (%r13), %ecx
movl %ecx, %eax
cltd
idivl %ebp
movl %eax, %esi
movl $0x244, %eax            # imm = 0x244
xorl %edx, %edx
idivl %ebx
cvtsi2sdl 0x90(%r14), %xmm3
cvtsi2sd %eax, %xmm1
movsd 0x731fa(%rip), %xmm4    # 0x95d20
addsd %xmm4, %xmm3
movsd %xmm1, 0x30(%rsp)
mulsd %xmm1, %xmm3
cvtsi2sd %ecx, %xmm1
movsd 0x75230(%rip), %xmm2    # 0x97d70
addsd %xmm2, %xmm3
cvtsi2sdl 0x94(%r14), %xmm0
addsd %xmm4, %xmm0
cvtsi2sd %esi, %xmm4
movsd %xmm4, 0x28(%rsp)
mulsd %xmm4, %xmm0
subsd %xmm0, %xmm1
addsd %xmm2, %xmm1
addsd 0x18(%rsp), %xmm1
cmpl $-0x1, 0x68(%r14)
movsd %xmm3, 0x40(%rsp)
movsd %xmm1, 0x38(%rsp)
movq %r12, %rdi
movq %r14, %rsi
movapd %xmm3, %xmm0
movl %r15d, %edx
je 0x22ba0
movsd 0x8(%rsp), %xmm2
movsd 0x10(%rsp), %xmm3
callq 0x219a1
jmp 0x22bb6
movl $0x7de, %ecx            # imm = 0x7DE
movsd 0x8(%rsp), %xmm2
movsd 0x10(%rsp), %xmm3
callq 0x21f03
movq 0x18(%r14), %rax
testq %rax, %rax
je 0x22c3a
cvtsi2sdl 0x90(%rax), %xmm0
movsd 0x73151(%rip), %xmm3    # 0x95d20
addsd %xmm3, %xmm0
mulsd 0x30(%rsp), %xmm0
cvtsi2sdl (%r13), %xmm1
cvtsi2sdl 0x94(%rax), %xmm2
movsd 0x75181(%rip), %xmm4    # 0x97d70
addsd %xmm4, %xmm0
addsd %xmm3, %xmm2
mulsd 0x28(%rsp), %xmm2
subsd %xmm2, %xmm1
addsd %xmm4, %xmm1
movsd 0x18(%rsp), %xmm2
addsd %xmm2, %xmm1
cvttsd2si 0x40(%rsp), %esi
addsd 0x20(%rsp), %xmm1
movsd 0x38(%rsp), %xmm3
subsd %xmm2, %xmm3
cvttsd2si %xmm3, %edx
cvttsd2si %xmm0, %ecx
cvttsd2si %xmm1, %r8d
movq %r12, %rdi
callq 0x20866
movq (%r14), %rsi
movq %r12, %rdi
movl %ebp, %edx
movl %ebx, %ecx
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
callq 0x22a99
movq 0x8(%r14), %r14
jmp 0x22af4
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq