// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/plot.c
// Function: plot_regression_model
void plot_regression_model(void* model, void* parameters, int algorithm, Instance mean, Instance variance, double outputmean, double outputvariance)
{
 int i, color;
 char st[2];
 double meanx, stdevx;
 Instanceptr currentinstance;
 Point p, p3, p4;
 Prediction predicted;
 if (!get_parameter_o("hold"))
   clear_image();
 color = img.imagelegend.legendcount;
 add_legend((char)('A' + color), regression_algorithms[algorithm - ONEFEATURE].name);
 p4.x = GRAY;
 p3.x = color;
 st[0] = '.';
 st[1] = '\0';
 if (regression_algorithms[algorithm - ONEFEATURE].mustnormalize)
  {
   meanx = mean.values[0].floatvalue;
   stdevx = sqrt(variance.values[0].floatvalue);
  }
 currentinstance = empty_instance(2);
 for (i = 0; i < MESHDEPTH * PARTITIONS; i++)
  {
   p.x = img.xaxis.lim.min + i * ((img.xaxis.lim.max - img.xaxis.lim.min) / (MESHDEPTH * PARTITIONS));
   if (regression_algorithms[algorithm - ONEFEATURE].mustnormalize)
     currentinstance->values[0].floatvalue = (p.x - meanx) / stdevx;
   else
     currentinstance->values[0].floatvalue = p.x;
   predicted = regression_algorithms[algorithm - ONEFEATURE].test_algorithm(currentinstance, model, parameters, NULL);
   if (get_parameter_o("normalizeoutput"))
     p.y = predicted.regvalue * sqrt(outputvariance) + outputmean;
   else
     p.y = predicted.regvalue;
   add_object(OBJECT_POINT, p, dummyp, p3, st);
   if (in_list(algorithm, 2, SVMREG, SIMPLEXSVMREG))
    {
     if (get_parameter_o("normalizeoutput"))
       p.y = (predicted.regvalue - get_parameter_f("svmepsilon")) * sqrt(outputvariance) + outputmean;
     else
       p.y = predicted.regvalue - get_parameter_f("svmepsilon");
     add_object(OBJECT_POINT, p, dummyp, p4, st);      
     if (get_parameter_o("normalizeoutput"))
       p.y = (predicted.regvalue + get_parameter_f("svmepsilon")) * sqrt(outputvariance) + outputmean;
     else
       p.y = predicted.regvalue + get_parameter_f("svmepsilon");
     add_object(OBJECT_POINT, p, dummyp, p4, st);      
    }
  }
 export_image();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
leaq 0x40(%rbp), %rax
movq %rax, -0x100(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movsd %xmm0, -0x20(%rbp)
movsd %xmm1, -0x28(%rbp)
leaq 0x6adcb(%rip), %rdi     # 0xe7308
callq 0x79440
cmpl $0x0, %eax
jne 0x7c54e
movb $0x0, %al
callq 0x41a40
leaq 0x365b33(%rip), %rax    # 0x3e2088
movl 0xec(%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
addl $0x41, %eax
movl -0x14(%rbp), %ecx
subl $0x7d0, %ecx            # imm = 0x7D0
movslq %ecx, %rdx
leaq 0x88289(%rip), %rcx     # 0x104800
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movq 0x10(%rcx), %rsi
movsbl %al, %edi
callq 0x3efa0
movsd 0x681d6(%rip), %xmm0    # 0xe4768
movsd %xmm0, -0x80(%rbp)
cvtsi2sdl -0x30(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
movb $0x2e, -0x32(%rbp)
movb $0x0, -0x31(%rbp)
movl -0x14(%rbp), %eax
subl $0x7d0, %eax            # imm = 0x7D0
movslq %eax, %rcx
leaq 0x88245(%rip), %rax     # 0x104800
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x1c(%rax)
je 0x7c5f3
movq -0x100(%rbp), %rax
movq -0xf8(%rbp), %rcx
movq (%rcx), %rcx
movsd (%rcx), %xmm0
movsd %xmm0, -0x40(%rbp)
movq (%rax), %rax
movsd (%rax), %xmm0
callq 0x42a0
movsd %xmm0, -0x48(%rbp)
movl $0x2, %edi
callq 0x1e140
movq %rax, -0x50(%rbp)
movl $0x0, -0x2c(%rbp)
cmpl $0x1f4, -0x2c(%rbp)     # imm = 0x1F4
jge 0x7c948
leaq 0x365a6c(%rip), %rax    # 0x3e2088
movsd 0x10(%rax), %xmm1
cvtsi2sdl -0x2c(%rbp), %xmm0
leaq 0x365a5b(%rip), %rax    # 0x3e2088
movsd 0x18(%rax), %xmm2
leaq 0x365a4f(%rip), %rax    # 0x3e2088
subsd 0x10(%rax), %xmm2
movsd 0x6833a(%rip), %xmm3    # 0xe4980
divsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
movl -0x14(%rbp), %eax
subl $0x7d0, %eax            # imm = 0x7D0
movslq %eax, %rcx
leaq 0x88197(%rip), %rax     # 0x104800
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x1c(%rax)
je 0x7c692
movsd -0x60(%rbp), %xmm0
subsd -0x40(%rbp), %xmm0
divsd -0x48(%rbp), %xmm0
movq -0x50(%rbp), %rax
movq (%rax), %rax
movsd %xmm0, (%rax)
jmp 0x7c6a2
movsd -0x60(%rbp), %xmm0
movq -0x50(%rbp), %rax
movq (%rax), %rax
movsd %xmm0, (%rax)
movl -0x14(%rbp), %eax
subl $0x7d0, %eax            # imm = 0x7D0
movslq %eax, %rcx
leaq 0x8814c(%rip), %rax     # 0x104800
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq -0x50(%rbp), %rsi
movq -0x8(%rbp), %rdx
movq -0x10(%rbp), %rcx
leaq -0xf0(%rbp), %rdi
xorl %r8d, %r8d
callq *%rax
leaq -0xb8(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
movl $0x38, %edx
callq 0x42b0
leaq 0x6b031(%rip), %rdi     # 0xe7727
callq 0x79440
cmpl $0x0, %eax
je 0x7c739
movsd -0xb8(%rbp), %xmm0
movsd %xmm0, -0x108(%rbp)
movsd -0x28(%rbp), %xmm0
callq 0x42a0
movaps %xmm0, %xmm2
movsd -0x108(%rbp), %xmm0
movsd -0x20(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
jmp 0x7c746
movsd -0xb8(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
leaq -0x32(%rbp), %rsi
movsd -0x60(%rbp), %xmm0
movsd -0x58(%rbp), %xmm1
movsd 0x888e4(%rip), %xmm2    # 0x105040
movsd 0x888e4(%rip), %xmm3    # 0x105048
movsd -0x70(%rbp), %xmm4
movsd -0x68(%rbp), %xmm5
movl $0x8, %edi
callq 0x3f100
movl -0x14(%rbp), %edi
movl $0x2, %esi
movl $0x7d8, %edx            # imm = 0x7D8
movl $0x7d9, %ecx            # imm = 0x7D9
movb $0x0, %al
callq 0x53e40
cmpl $0x0, %eax
je 0x7c938
leaq 0x6af86(%rip), %rdi     # 0xe7727
callq 0x79440
cmpl $0x0, %eax
je 0x7c807
movsd -0xb8(%rbp), %xmm0
movsd %xmm0, -0x118(%rbp)
leaq 0x65ffb(%rip), %rdi     # 0xe27bd
callq 0x79040
movaps %xmm0, %xmm1
movsd -0x118(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x110(%rbp)
movsd -0x28(%rbp), %xmm0
callq 0x42a0
movaps %xmm0, %xmm2
movsd -0x110(%rbp), %xmm0
movsd -0x20(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
jmp 0x7c837
movsd -0xb8(%rbp), %xmm0
movsd %xmm0, -0x120(%rbp)
leaq 0x65f9f(%rip), %rdi     # 0xe27bd
callq 0x79040
movaps %xmm0, %xmm1
movsd -0x120(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
leaq -0x32(%rbp), %rsi
movsd -0x60(%rbp), %xmm0
movsd -0x58(%rbp), %xmm1
movsd 0x887f3(%rip), %xmm2    # 0x105040
movsd 0x887f3(%rip), %xmm3    # 0x105048
movsd -0x80(%rbp), %xmm4
movsd -0x78(%rbp), %xmm5
movl $0x8, %edi
callq 0x3f100
leaq 0x6aeb7(%rip), %rdi     # 0xe7727
callq 0x79440
cmpl $0x0, %eax
je 0x7c8d6
movsd -0xb8(%rbp), %xmm0
movsd %xmm0, -0x130(%rbp)
leaq 0x65f2c(%rip), %rdi     # 0xe27bd
callq 0x79040
movaps %xmm0, %xmm1
movsd -0x130(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x128(%rbp)
movsd -0x28(%rbp), %xmm0
callq 0x42a0
movaps %xmm0, %xmm2
movsd -0x128(%rbp), %xmm0
movsd -0x20(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
jmp 0x7c906
movsd -0xb8(%rbp), %xmm0
movsd %xmm0, -0x138(%rbp)
leaq 0x65ed0(%rip), %rdi     # 0xe27bd
callq 0x79040
movaps %xmm0, %xmm1
movsd -0x138(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
leaq -0x32(%rbp), %rsi
movsd -0x60(%rbp), %xmm0
movsd -0x58(%rbp), %xmm1
movsd 0x88724(%rip), %xmm2    # 0x105040
movsd 0x88724(%rip), %xmm3    # 0x105048
movsd -0x80(%rbp), %xmm4
movsd -0x78(%rbp), %xmm5
movl $0x8, %edi
callq 0x3f100
jmp 0x7c93a
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x7c608
movb $0x0, %al
callq 0x42280
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopl (%rax,%rax)