// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/eps.c
// Function: plot_decision_node
void plot_decision_node(FILE* outfile, Decisionnodeptr rootnode, int maxdepth, int maxwidth)
{
 int i, dx, dy, radius = img.width / (5 * maxwidth), node_width = img.width / maxwidth, node_height = img.height / maxdepth;
 double l;
 Point p1, p2, parent;
 if (rootnode)
  {
   p1.x = (rootnode->x + 0.5) * node_width;
   p1.y = img.height - (rootnode->y + 0.5) * node_height;
   write_circle(outfile, p1.x, p1.y, radius);
   if (rootnode->parent)
    {
     parent.x = (rootnode->parent->x + 0.5) * node_width;
     parent.y = img.height - (rootnode->parent->y + 0.5) * node_height;
     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);
    }
   if (rootnode->featureno >= 0 && current_dataset->features[rootnode->featureno].type == STRING)
     for (i = 0; i < current_dataset->features[rootnode->featureno].valuecount; i++)
       plot_decision_node(outfile, &(rootnode->string[i]), maxdepth, maxwidth);
   else
    {
     plot_decision_node(outfile, rootnode->left, maxdepth, maxwidth);
     plot_decision_node(outfile, rootnode->right, maxdepth, maxwidth);    
    }
  } 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
leaq 0x38c1fa(%rip), %rsi    # 0x3af0b8
movq %rcx, 0x18(%rsp)
leal (%rcx,%rcx,4), %eax
movl %eax, 0x24(%rsp)
movl %edx, 0xc(%rsp)
movl 0x4(%rsi), %ecx
movl %ecx, %eax
cltd
idivl 0x24(%rsp)
testq %r14, %r14
je 0x23163
movl %eax, %r12d
movq %rsi, %rbx
movl (%rsi), %esi
movl %esi, %eax
cltd
idivl %ebp
movl %eax, %edi
movl %ecx, %eax
cltd
idivl 0x18(%rsp)
xorps %xmm2, %xmm2
cvtsi2sdl 0x134(%r14), %xmm2
xorps %xmm3, %xmm3
cvtsi2sd %eax, %xmm3
movsd 0x7fe06(%rip), %xmm1    # 0xa2d18
addsd %xmm1, %xmm2
movsd %xmm3, 0x10(%rsp)
mulsd %xmm3, %xmm2
xorps %xmm3, %xmm3
cvtsi2sd %esi, %xmm3
xorps %xmm0, %xmm0
cvtsi2sdl 0x138(%r14), %xmm0
xorps %xmm4, %xmm4
cvtsi2sd %edi, %xmm4
addsd %xmm1, %xmm0
movsd %xmm4, 0x40(%rsp)
mulsd %xmm4, %xmm0
movsd %xmm2, 0x28(%rsp)
cvttsd2si %xmm2, %r13d
subsd %xmm0, %xmm3
movsd %xmm3, 0x30(%rsp)
cvttsd2si %xmm3, %ebp
leal (%r12,%r13), %edx
movq %r15, %rdi
leaq 0x82074(%rip), %rsi     # 0xa4fe3
movl %ebp, %ecx
xorl %eax, %eax
callq 0x42e0
movq %r15, %rdi
leaq 0x8206f(%rip), %rsi     # 0xa4ff1
movl %r12d, %edx
movl %r13d, %ecx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x42e0
movq 0x18(%r14), %rax
testq %rax, %rax
je 0x230b2
xorps %xmm2, %xmm2
cvtsi2sdl 0x134(%rax), %xmm2
movsd 0x7fd66(%rip), %xmm1    # 0xa2d18
addsd %xmm1, %xmm2
xorps %xmm3, %xmm3
cvtsi2sdl (%rbx), %xmm3
xorps %xmm0, %xmm0
cvtsi2sdl 0x138(%rax), %xmm0
mulsd 0x10(%rsp), %xmm2
movsd %xmm2, 0x38(%rsp)
addsd %xmm1, %xmm0
mulsd 0x40(%rsp), %xmm0
subsd %xmm0, %xmm3
movsd 0x28(%rsp), %xmm0
movsd 0x30(%rsp), %xmm1
movsd %xmm3, 0x10(%rsp)
callq 0x2dd8e
movsd 0x38(%rsp), %xmm7
movapd %xmm7, %xmm2
movsd 0x28(%rsp), %xmm5
subsd %xmm5, %xmm2
andpd 0x801cb(%rip), %xmm2    # 0xa31e0
xorps %xmm1, %xmm1
cvtsi2sd %r12d, %xmm1
mulsd %xmm1, %xmm2
divsd %xmm0, %xmm2
cvttpd2dq %xmm2, %xmm2
movq 0x18(%r14), %rax
cvtdq2pd %xmm2, %xmm4
movapd %xmm4, %xmm2
xorpd 0x80193(%rip), %xmm2    # 0xa31d0
movapd %xmm4, %xmm3
cmpq %r14, (%rax)
je 0x2304a
movapd %xmm2, %xmm3
je 0x23050
movapd %xmm4, %xmm2
movsd 0x10(%rsp), %xmm8
movapd %xmm8, %xmm4
movsd 0x30(%rsp), %xmm6
subsd %xmm6, %xmm4
andpd 0x80172(%rip), %xmm4    # 0xa31e0
mulsd %xmm1, %xmm4
divsd %xmm0, %xmm4
addsd %xmm3, %xmm5
addsd %xmm2, %xmm7
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 %r15, %rdi
leaq 0x81f57(%rip), %rsi     # 0xa5002
xorl %eax, %eax
callq 0x42e0
movslq 0x30(%r14), %rax
testq %rax, %rax
js 0x230d6
leaq 0xaf7ae(%rip), %rcx     # 0xd2870
movq (%rcx), %rcx
imulq $0x340, %rax, %rax      # imm = 0x340
cmpl $0x1, 0x30f08(%rcx,%rax)
je 0x230f8
movq (%r14), %rsi
movq %r15, %rdi
movl 0xc(%rsp), %ebp
movl %ebp, %edx
movq 0x18(%rsp), %rcx
callq 0x22ea1
movq 0x8(%r14), %r14
movq %rbx, %rsi
jmp 0x22ece
leaq 0xaf771(%rip), %rax     # 0xd2870
movq (%rax), %rax
movslq 0x30(%r14), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
cmpl $0x0, 0x30f20(%rax,%rcx)
movl 0xc(%rsp), %ebp
jle 0x23163
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x10(%r14), %rsi
addq %r12, %rsi
movq %r15, %rdi
movl %ebp, %edx
movq 0x18(%rsp), %rcx
callq 0x22ea1
incq %r13
leaq 0xaf72f(%rip), %rax     # 0xd2870
movq (%rax), %rax
movslq 0x30(%r14), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
movslq 0x30f20(%rax,%rcx), %rax
addq $0x160, %r12            # imm = 0x160
cmpq %rax, %r13
jl 0x23121
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq