#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int abs(long);
double fabs(double);
int floor(float);
int /*<<< orphan*/ plotCubicBezierSeg(int, int, int, int, int, int, int, int);
double sqrt(double);
void plotCubicBezier(int x0, int y0, int x1, int y1, int x2, int y2, int x3,
                     int y3) {
  int n = 0, i = 0;
  long xc = x0 + x1 - x2 - x3, xa = xc - 4 * (x1 - x2);
  long xb = x0 - x1 - x2 + x3, xd = xb + 4 * (x1 + x2);
  long yc = y0 + y1 - y2 - y3, ya = yc - 4 * (y1 - y2);
  long yb = y0 - y1 - y2 + y3, yd = yb + 4 * (y1 + y2);
  float fx0 = x0, fx1, fx2, fx3, fy0 = y0, fy1, fy2, fy3;
  double t1 = xb * xb - xa * xc, t2, t[5];
  if (xa == 0) {
    if (abs(xc) < 2 * abs(xb))
      t[n++] = xc / (2.0 * xb);
  } else if (t1 > 0.0) {
    t2 = sqrt(t1);
    t1 = (xb - t2) / xa;
    if (fabs(t1) < 1.0)
      t[n++] = t1;
    t1 = (xb + t2) / xa;
    if (fabs(t1) < 1.0)
      t[n++] = t1;
  }
  t1 = yb * yb - ya * yc;
  if (ya == 0) {
    if (abs(yc) < 2 * abs(yb))
      t[n++] = yc / (2.0 * yb);
  } else if (t1 > 0.0) {
    t2 = sqrt(t1);
    t1 = (yb - t2) / ya;
    if (fabs(t1) < 1.0)
      t[n++] = t1;
    t1 = (yb + t2) / ya;
    if (fabs(t1) < 1.0)
      t[n++] = t1;
  }
  for (i = 1; i < n; i++)
    if ((t1 = t[i - 1]) > t[i]) {
      t[i - 1] = t[i];
      t[i] = t1;
      i = 0;
    }
  t1 = -1.0;
  t[n] = 1.0;
  for (i = 0; i <= n; i++) {
    t2 = t[i];
    fx1 = (t1 * (t1 * xb - 2 * xc) - t2 * (t1 * (t1 * xa - 2 * xb) + xc) + xd) /
              8 -
          fx0;
    fy1 = (t1 * (t1 * yb - 2 * yc) - t2 * (t1 * (t1 * ya - 2 * yb) + yc) + yd) /
              8 -
          fy0;
    fx2 = (t2 * (t2 * xb - 2 * xc) - t1 * (t2 * (t2 * xa - 2 * xb) + xc) + xd) /
              8 -
          fx0;
    fy2 = (t2 * (t2 * yb - 2 * yc) - t1 * (t2 * (t2 * ya - 2 * yb) + yc) + yd) /
              8 -
          fy0;
    fx0 -= fx3 = (t2 * (t2 * (3 * xb - t2 * xa) - 3 * xc) + xd) / 8;
    fy0 -= fy3 = (t2 * (t2 * (3 * yb - t2 * ya) - 3 * yc) + yd) / 8;
    x3 = floor(fx3 + 0.5);
    y3 = floor(fy3 + 0.5);
    if (fx0 != 0.0) {
      fx1 *= fx0 = (x0 - x3) / fx0;
      fx2 *= fx0;
    }
    if (fy0 != 0.0) {
      fy1 *= fy0 = (y0 - y3) / fy0;
      fy2 *= fy0;
    }
    if (x0 != x3 || y0 != y3)
      plotCubicBezierSeg(x0, y0, x0 + fx1, y0 + fy1, x0 + fx2, y0 + fy2, x3,
                         y3);
    x0 = x3;
    y0 = y3;
    fx0 = fx3;
    fy0 = fy3;
    t1 = t2;
  }
}


x86 assembly (clang, -O0):
<plotCubicBezier>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x4(%rbp),%eax
add    -0xc(%rbp),%eax
sub    -0x14(%rbp),%eax
sub    0x10(%rbp),%eax
cltq
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    -0x14(%rbp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
sub    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x4(%rbp),%eax
sub    -0xc(%rbp),%eax
sub    -0x14(%rbp),%eax
add    0x10(%rbp),%eax
cltq
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    -0x14(%rbp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
sub    -0x18(%rbp),%eax
sub    0x18(%rbp),%eax
cltq
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    -0x10(%rbp),%ecx
sub    -0x18(%rbp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
sub    %rcx,%rax
mov    %rax,-0x50(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
sub    -0x18(%rbp),%eax
add    0x18(%rbp),%eax
cltq
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    -0x18(%rbp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
movss  %xmm0,-0x64(%rbp)
cvtsi2ssl -0x8(%rbp),%xmm0
movss  %xmm0,-0x74(%rbp)
mov    -0x38(%rbp),%rax
imul   -0x38(%rbp),%rax
mov    -0x30(%rbp),%rcx
imul   -0x28(%rbp),%rcx
sub    %rcx,%rax
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
cmpq   $0x0,-0x30(%rbp)
jne    12ba <plotCubicBezier+0x17a>
mov    -0x28(%rbp),%rdi
call   1030 <abs@plt>
mov    %eax,-0xc4(%rbp)
mov    -0x38(%rbp),%rdi
call   1030 <abs@plt>
mov    %eax,%ecx
mov    -0xc4(%rbp),%eax
shl    $0x1,%ecx
cmp    %ecx,%eax
jge    12b5 <plotCubicBezier+0x175>
cvtsi2sdq -0x28(%rbp),%xmm0
cvtsi2sdq -0x38(%rbp),%xmm2
movsd  0xd71(%rip),%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
cltq
movsd  %xmm0,-0xc0(%rbp,%rax,8)
ff ff
jmp    13b4 <plotCubicBezier+0x274>
movsd  -0x88(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    13af <plotCubicBezier+0x26f>
movsd  -0x88(%rbp),%xmm0
ff
call   1040 <sqrt@plt>
movsd  %xmm0,-0x90(%rbp)
ff
cvtsi2sdq -0x38(%rbp),%xmm0
subsd  -0x90(%rbp),%xmm0
ff
cvtsi2sdq -0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm1
ff
movaps 0xd1d(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xce1(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1347 <plotCubicBezier+0x207>
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
cltq
movsd  %xmm0,-0xc0(%rbp,%rax,8)
ff ff
cvtsi2sdq -0x38(%rbp),%xmm0
addsd  -0x90(%rbp),%xmm0
ff
cvtsi2sdq -0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm1
ff
movaps 0xcba(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xc7e(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    13aa <plotCubicBezier+0x26a>
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
cltq
movsd  %xmm0,-0xc0(%rbp,%rax,8)
ff ff
jmp    13af <plotCubicBezier+0x26f>
jmp    13b4 <plotCubicBezier+0x274>
mov    -0x58(%rbp),%rax
imul   -0x58(%rbp),%rax
mov    -0x50(%rbp),%rcx
imul   -0x48(%rbp),%rcx
sub    %rcx,%rax
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
cmpq   $0x0,-0x50(%rbp)
jne    1443 <plotCubicBezier+0x303>
mov    -0x48(%rbp),%rdi
call   1030 <abs@plt>
mov    %eax,-0xc8(%rbp)
mov    -0x58(%rbp),%rdi
call   1030 <abs@plt>
mov    %eax,%ecx
mov    -0xc8(%rbp),%eax
shl    $0x1,%ecx
cmp    %ecx,%eax
jge    143e <plotCubicBezier+0x2fe>
cvtsi2sdq -0x48(%rbp),%xmm0
cvtsi2sdq -0x58(%rbp),%xmm2
movsd  0xbe8(%rip),%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
cltq
movsd  %xmm0,-0xc0(%rbp,%rax,8)
ff ff
jmp    153d <plotCubicBezier+0x3fd>
movsd  -0x88(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1538 <plotCubicBezier+0x3f8>
movsd  -0x88(%rbp),%xmm0
ff
call   1040 <sqrt@plt>
movsd  %xmm0,-0x90(%rbp)
ff
cvtsi2sdq -0x58(%rbp),%xmm0
subsd  -0x90(%rbp),%xmm0
ff
cvtsi2sdq -0x50(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm1
ff
movaps 0xb94(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xb58(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    14d0 <plotCubicBezier+0x390>
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
cltq
movsd  %xmm0,-0xc0(%rbp,%rax,8)
ff ff
cvtsi2sdq -0x58(%rbp),%xmm0
addsd  -0x90(%rbp),%xmm0
ff
cvtsi2sdq -0x50(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm1
ff
movaps 0xb31(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xaf5(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1533 <plotCubicBezier+0x3f3>
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
cltq
movsd  %xmm0,-0xc0(%rbp,%rax,8)
ff ff
jmp    1538 <plotCubicBezier+0x3f8>
jmp    153d <plotCubicBezier+0x3fd>
movl   $0x1,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    15c9 <plotCubicBezier+0x489>
mov    -0x20(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0xc0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x88(%rbp)
ff
movslq -0x20(%rbp),%rax
ucomisd -0xc0(%rbp,%rax,8),%xmm0
ff ff
jbe    15b6 <plotCubicBezier+0x476>
movslq -0x20(%rbp),%rax
movsd  -0xc0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x20(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  %xmm0,-0xc0(%rbp,%rax,8)
ff ff
movsd  -0x88(%rbp),%xmm0
ff
movslq -0x20(%rbp),%rax
movsd  %xmm0,-0xc0(%rbp,%rax,8)
ff ff
movl   $0x0,-0x20(%rbp)
jmp    15bb <plotCubicBezier+0x47b>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1544 <plotCubicBezier+0x404>
movsd  0xa3f(%rip),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movslq -0x1c(%rbp),%rax
movsd  0xa1b(%rip),%xmm0
movsd  %xmm0,-0xc0(%rbp,%rax,8)
ff ff
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     1c84 <plotCubicBezier+0xb44>
movslq -0x20(%rbp),%rax
movsd  -0xc0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm2
ff
cvtsi2sdq -0x38(%rbp),%xmm3
mov    -0x28(%rbp),%rax
shl    $0x1,%rax
cvtsi2sd %rax,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x90(%rbp),%xmm1
ff
movsd  -0x88(%rbp),%xmm3
ff
movsd  -0x88(%rbp),%xmm5
ff
cvtsi2sdq -0x30(%rbp),%xmm6
mov    -0x38(%rbp),%rax
shl    $0x1,%rax
cvtsi2sd %rax,%xmm4
movq   %xmm4,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm4
mulsd  %xmm6,%xmm5
addsd  %xmm4,%xmm5
cvtsi2sdq -0x28(%rbp),%xmm4
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsi2sdq -0x40(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  0x93b(%rip),%xmm1
divsd  %xmm1,%xmm0
movss  -0x64(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x68(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm2
ff
cvtsi2sdq -0x58(%rbp),%xmm3
mov    -0x48(%rbp),%rax
shl    $0x1,%rax
cvtsi2sd %rax,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x90(%rbp),%xmm1
ff
movsd  -0x88(%rbp),%xmm3
ff
movsd  -0x88(%rbp),%xmm5
ff
cvtsi2sdq -0x50(%rbp),%xmm6
mov    -0x58(%rbp),%rax
shl    $0x1,%rax
cvtsi2sd %rax,%xmm4
movq   %xmm4,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm4
mulsd  %xmm6,%xmm5
addsd  %xmm4,%xmm5
cvtsi2sdq -0x48(%rbp),%xmm4
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsi2sdq -0x60(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  0x852(%rip),%xmm1
divsd  %xmm1,%xmm0
movss  -0x74(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x78(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x90(%rbp),%xmm2
ff
cvtsi2sdq -0x38(%rbp),%xmm3
mov    -0x28(%rbp),%rax
shl    $0x1,%rax
cvtsi2sd %rax,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x90(%rbp),%xmm3
ff
movsd  -0x90(%rbp),%xmm5
ff
cvtsi2sdq -0x30(%rbp),%xmm6
mov    -0x38(%rbp),%rax
shl    $0x1,%rax
cvtsi2sd %rax,%xmm4
movq   %xmm4,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm4
mulsd  %xmm6,%xmm5
addsd  %xmm4,%xmm5
cvtsi2sdq -0x28(%rbp),%xmm4
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsi2sdq -0x40(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  0x769(%rip),%xmm1
divsd  %xmm1,%xmm0
movss  -0x64(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x6c(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x90(%rbp),%xmm2
ff
cvtsi2sdq -0x58(%rbp),%xmm3
mov    -0x48(%rbp),%rax
shl    $0x1,%rax
cvtsi2sd %rax,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x90(%rbp),%xmm3
ff
movsd  -0x90(%rbp),%xmm5
ff
cvtsi2sdq -0x50(%rbp),%xmm6
mov    -0x58(%rbp),%rax
shl    $0x1,%rax
cvtsi2sd %rax,%xmm4
movq   %xmm4,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm4
mulsd  %xmm6,%xmm5
addsd  %xmm4,%xmm5
cvtsi2sdq -0x48(%rbp),%xmm4
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsi2sdq -0x60(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  0x680(%rip),%xmm1
divsd  %xmm1,%xmm0
movss  -0x74(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x7c(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x90(%rbp),%xmm2
ff
imul   $0x3,-0x38(%rbp),%rax
cvtsi2sd %rax,%xmm1
movsd  -0x90(%rbp),%xmm3
ff
cvtsi2sdq -0x30(%rbp),%xmm4
movq   %xmm3,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm3
mulsd  %xmm4,%xmm3
addsd  %xmm1,%xmm3
imul   $0x3,-0x28(%rbp),%rax
cvtsi2sd %rax,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
cvtsi2sdq -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x5e0(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm1
movss  %xmm1,-0x70(%rbp)
movss  -0x64(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,-0x64(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x90(%rbp),%xmm2
ff
imul   $0x3,-0x58(%rbp),%rax
cvtsi2sd %rax,%xmm1
movsd  -0x90(%rbp),%xmm3
ff
cvtsi2sdq -0x50(%rbp),%xmm4
movq   %xmm3,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm3
mulsd  %xmm4,%xmm3
addsd  %xmm1,%xmm3
imul   $0x3,-0x48(%rbp),%rax
cvtsi2sd %rax,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
cvtsi2sdq -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x53f(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm1
movss  %xmm1,-0x80(%rbp)
movss  -0x74(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,-0x74(%rbp)
movss  -0x70(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0x50b(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1060 <floor@plt>
mov    %eax,0x10(%rbp)
movss  -0x80(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0x4ea(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1060 <floor@plt>
mov    %eax,0x18(%rbp)
movss  -0x64(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1b5f <plotCubicBezier+0xa1f>
jp     1b5f <plotCubicBezier+0xa1f>
jmp    1b8c <plotCubicBezier+0xa4c>
mov    -0x4(%rbp),%eax
sub    0x10(%rbp),%eax
cvtsi2ss %eax,%xmm0
divss  -0x64(%rbp),%xmm0
movss  %xmm0,-0x64(%rbp)
mulss  -0x68(%rbp),%xmm0
movss  %xmm0,-0x68(%rbp)
movss  -0x64(%rbp),%xmm0
mulss  -0x6c(%rbp),%xmm0
movss  %xmm0,-0x6c(%rbp)
movss  -0x74(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1bad <plotCubicBezier+0xa6d>
jp     1bad <plotCubicBezier+0xa6d>
jmp    1bda <plotCubicBezier+0xa9a>
mov    -0x8(%rbp),%eax
sub    0x18(%rbp),%eax
cvtsi2ss %eax,%xmm0
divss  -0x74(%rbp),%xmm0
movss  %xmm0,-0x74(%rbp)
mulss  -0x78(%rbp),%xmm0
movss  %xmm0,-0x78(%rbp)
movss  -0x74(%rbp),%xmm0
mulss  -0x7c(%rbp),%xmm0
movss  %xmm0,-0x7c(%rbp)
mov    -0x4(%rbp),%eax
cmp    0x10(%rbp),%eax
jne    1bf2 <plotCubicBezier+0xab2>
mov    -0x8(%rbp),%eax
cmp    0x18(%rbp),%eax
je     1c46 <plotCubicBezier+0xb06>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
cvtsi2ssl -0x4(%rbp),%xmm0
addss  -0x68(%rbp),%xmm0
cvttss2si %xmm0,%edx
cvtsi2ssl -0x8(%rbp),%xmm0
addss  -0x78(%rbp),%xmm0
cvttss2si %xmm0,%ecx
cvtsi2ssl -0x4(%rbp),%xmm0
addss  -0x6c(%rbp),%xmm0
cvttss2si %xmm0,%r8d
cvtsi2ssl -0x8(%rbp),%xmm0
addss  -0x7c(%rbp),%xmm0
cvttss2si %xmm0,%r9d
mov    0x10(%rbp),%r10d
mov    0x18(%rbp),%eax
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1050 <plotCubicBezierSeg@plt>
mov    0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    0x18(%rbp),%eax
mov    %eax,-0x8(%rbp)
movss  -0x70(%rbp),%xmm0
movss  %xmm0,-0x64(%rbp)
movss  -0x80(%rbp),%xmm0
movss  %xmm0,-0x74(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    15f5 <plotCubicBezier+0x4b5>
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plotCubicBezier>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1c8,%rsp
mov    %r8d,%r12d
mov    %esi,%r14d
mov    %edi,%r13d
mov    0x208(%rsp),%r8d
mov    0x200(%rsp),%esi
lea    (%rdx,%r13,1),%ebx
sub    %r12d,%ebx
sub    %esi,%ebx
movslq %ebx,%rdi
mov    %edx,%eax
sub    %r12d,%eax
shl    $0x2,%eax
cltq
mov    %rdi,%rbp
sub    %rax,%rbp
add    %edx,%r12d
mov    %r13d,%r10d
sub    %r12d,%r10d
add    %esi,%r10d
movslq %r10d,%r15
lea    (%rcx,%r14,1),%esi
sub    %r9d,%esi
sub    %r8d,%esi
movslq %esi,%rax
mov    %ecx,%edx
sub    %r9d,%edx
shl    $0x2,%edx
movslq %edx,%rdx
mov    %rax,0x8(%rsp)
sub    %rdx,%rax
mov    %rax,0x60(%rsp)
add    %ecx,%r9d
mov    %r14d,%r11d
sub    %r9d,%r11d
add    %r8d,%r11d
test   %rbp,%rbp
mov    %rdi,0x10(%rsp)
mov    %r15,0x50(%rsp)
mov    %r9,0x18(%rsp)
mov    %rbp,0x40(%rsp)
mov    %r10d,0x4(%rsp)
mov    %esi,0x30(%rsp)
je     1212 <plotCubicBezier+0xd2>
mov    %r15,%rax
imul   %r15,%rax
mov    %rbp,%rcx
imul   %rdi,%rcx
sub    %rcx,%rax
test   %rax,%rax
jle    1264 <plotCubicBezier+0x124>
cvtsi2sd %rax,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     126e <plotCubicBezier+0x12e>
sqrtsd %xmm0,%xmm0
jmp    127f <plotCubicBezier+0x13f>
mov    %r11d,%ebp
call   1030 <abs@plt>
mov    %eax,0x20(%rsp)
mov    %r15,%rdi
call   1030 <abs@plt>
mov    %ebp,%r11d
mov    0x4(%rsp),%r10d
add    %eax,%eax
xor    %r15d,%r15d
cmp    %eax,0x20(%rsp)
mov    0x8(%rsp),%rdi
jge    12ed <plotCubicBezier+0x1ad>
cvtsi2sd %ebx,%xmm0
cvtsi2sd %r10d,%xmm1
addsd  %xmm1,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,0x70(%rsp)
mov    $0x1,%r15d
jmp    12ed <plotCubicBezier+0x1ad>
xor    %r15d,%r15d
mov    0x8(%rsp),%rdi
jmp    12ed <plotCubicBezier+0x1ad>
mov    %r10d,%ebx
mov    %r11d,%r15d
call   1040 <sqrt@plt>
mov    %r15d,%r11d
mov    %ebx,%r10d
xorps  %xmm1,%xmm1
cvtsi2sd %r10d,%xmm1
movapd %xmm1,%xmm4
cvtsi2sd %rbp,%xmm2
subsd  %xmm0,%xmm4
divsd  %xmm2,%xmm4
movapd 0xd60(%rip),%xmm5
andpd  %xmm4,%xmm5
xor    %r15d,%r15d
movsd  0xd81(%rip),%xmm3
ucomisd %xmm5,%xmm3
mov    0x8(%rsp),%rdi
jbe    12c6 <plotCubicBezier+0x186>
movsd  %xmm4,0x70(%rsp)
mov    $0x1,%r15d
addsd  %xmm1,%xmm0
divsd  %xmm2,%xmm0
movapd 0xd2a(%rip),%xmm1
andpd  %xmm0,%xmm1
ucomisd %xmm1,%xmm3
jbe    12ed <plotCubicBezier+0x1ad>
mov    %r15d,%eax
add    $0x1,%r15d
movsd  %xmm0,0x70(%rsp,%rax,8)
movslq %r11d,%rbx
mov    0x60(%rsp),%r8
test   %r8,%r8
je     132c <plotCubicBezier+0x1ec>
mov    %rbx,%rax
imul   %rbx,%rax
mov    %r8,%rcx
imul   %rdi,%rcx
sub    %rcx,%rax
test   %rax,%rax
jle    1408 <plotCubicBezier+0x2c8>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1384 <plotCubicBezier+0x244>
sqrtsd %xmm0,%xmm0
jmp    139e <plotCubicBezier+0x25e>
mov    %r11d,0x20(%rsp)
mov    %r8,%rbp
call   1030 <abs@plt>
mov    %eax,0xa0(%rsp)
mov    %rbx,%rdi
call   1030 <abs@plt>
mov    %rbp,%r8
mov    0x8(%rsp),%rdi
mov    0x20(%rsp),%r11d
mov    0x4(%rsp),%r10d
add    %eax,%eax
cmp    %eax,0xa0(%rsp)
jge    1408 <plotCubicBezier+0x2c8>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x30(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %r11d,%xmm1
addsd  %xmm1,%xmm1
divsd  %xmm1,%xmm0
jmp    13fb <plotCubicBezier+0x2bb>
mov    %r11d,%ebp
call   1040 <sqrt@plt>
mov    0x60(%rsp),%r8
mov    0x8(%rsp),%rdi
mov    %ebp,%r11d
mov    0x4(%rsp),%r10d
xorps  %xmm1,%xmm1
cvtsi2sd %r11d,%xmm1
movapd %xmm1,%xmm4
subsd  %xmm0,%xmm4
xorps  %xmm2,%xmm2
cvtsi2sd %r8,%xmm2
divsd  %xmm2,%xmm4
movapd 0xc3e(%rip),%xmm5
andpd  %xmm4,%xmm5
movsd  0xc62(%rip),%xmm3
ucomisd %xmm5,%xmm3
jbe    13e1 <plotCubicBezier+0x2a1>
mov    %r15d,%eax
add    $0x1,%r15d
movsd  %xmm4,0x70(%rsp,%rax,8)
addsd  %xmm1,%xmm0
divsd  %xmm2,%xmm0
movapd 0xc0f(%rip),%xmm1
andpd  %xmm0,%xmm1
ucomisd %xmm1,%xmm3
jbe    1408 <plotCubicBezier+0x2c8>
mov    %r15d,%eax
add    $0x1,%r15d
movsd  %xmm0,0x70(%rsp,%rax,8)
cmp    $0x2,%r15d
jb     1451 <plotCubicBezier+0x311>
mov    $0x1,%eax
jmp    1428 <plotCubicBezier+0x2e8>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmp    %r15d,%eax
jge    1465 <plotCubicBezier+0x325>
movslq %eax,%rcx
movsd  0x68(%rsp,%rcx,8),%xmm0
movsd  0x70(%rsp,%rcx,8),%xmm1
ucomisd %xmm1,%xmm0
jbe    1420 <plotCubicBezier+0x2e0>
lea    -0x1(%rcx),%rax
movsd  %xmm1,0x70(%rsp,%rax,8)
movsd  %xmm0,0x70(%rsp,%rcx,8)
xor    %eax,%eax
jmp    1420 <plotCubicBezier+0x2e0>
mov    %r15d,%eax
movabs $0x3ff0000000000000,%rcx
mov    %rcx,0x70(%rsp,%rax,8)
jmp    1480 <plotCubicBezier+0x340>
mov    %r15d,%eax
movabs $0x3ff0000000000000,%rcx
mov    %rcx,0x70(%rsp,%rax,8)
test   %r15d,%r15d
js     1943 <plotCubicBezier+0x803>
shl    $0x2,%r12d
mov    0x18(%rsp),%rcx
shl    $0x2,%ecx
movslq %r12d,%rax
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
cvtsi2ss %r13d,%xmm0
movss  %xmm0,0x18(%rsp)
mov    0x50(%rsp),%rsi
add    %rsi,%rax
xorps  %xmm2,%xmm2
cvtsi2ss %r14d,%xmm2
add    %rbx,%rcx
cvtsi2sd %r10d,%xmm9
mov    0x10(%rsp),%rbp
mov    %rbp,%rdx
add    %rbp,%rdx
cvtsi2sd %rdx,%xmm10
cvtsi2sdq 0x40(%rsp),%xmm8
movapd 0xb39(%rip),%xmm6
lea    (%rsi,%rsi,1),%rdx
cvtsi2sd %rdx,%xmm11
xorpd  %xmm6,%xmm10
cvtsi2sd %r11d,%xmm7
lea    (%rdi,%rdi,1),%rdx
xorps  %xmm3,%xmm3
cvtsi2sd %rdx,%xmm3
cvtsi2sd %r8,%xmm12
xorpd  %xmm6,%xmm11
lea    (%rbx,%rbx,1),%rdx
xorps  %xmm4,%xmm4
cvtsi2sd %rdx,%xmm4
xorpd  %xmm6,%xmm3
xorpd  %xmm6,%xmm4
xorps  %xmm5,%xmm5
cvtsi2sd %edi,%xmm5
xorps  %xmm0,%xmm0
cvtsi2sd %rcx,%xmm0
lea    (%rsi,%rsi,2),%rcx
lea    0x0(%rbp,%rbp,2),%rdx
xorps  %xmm1,%xmm1
cvtsi2sd %rdx,%xmm1
xorpd  %xmm6,%xmm1
movapd %xmm1,0x170(%rsp)
lea    (%rbx,%rbx,2),%rdx
lea    (%rdi,%rdi,2),%rsi
xorps  %xmm1,%xmm1
cvtsi2sd %rsi,%xmm1
xorpd  %xmm6,%xmm1
movapd %xmm1,0x160(%rsp)
add    $0x1,%r15d
unpcklpd %xmm7,%xmm7
movapd %xmm7,0x1b0(%rsp)
pshufd $0x44,%xmm3,%xmm1
movdqa %xmm1,0x150(%rsp)
movapd %xmm12,0x1a0(%rsp)
movapd %xmm12,%xmm6
unpcklpd %xmm12,%xmm6
movapd %xmm6,0x140(%rsp)
pshufd $0x44,%xmm4,%xmm1
movdqa %xmm1,0x130(%rsp)
unpcklpd %xmm5,%xmm5
movapd %xmm5,0x190(%rsp)
movapd %xmm0,0x180(%rsp)
unpcklpd %xmm0,%xmm0
movapd %xmm0,0x120(%rsp)
unpcklpd %xmm9,%xmm9
movapd %xmm9,0x20(%rsp)
pshufd $0x44,%xmm10,%xmm0
movdqa %xmm0,0x110(%rsp)
movapd %xmm8,0xa0(%rsp)
unpcklpd %xmm8,%xmm8
movapd %xmm8,0x100(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
pshufd $0x44,%xmm11,%xmm1
movdqa %xmm1,0xe0(%rsp)
unpcklpd %xmm0,%xmm0
movapd %xmm0,0xf0(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movapd %xmm0,0xd0(%rsp)
unpcklpd %xmm0,%xmm0
movapd %xmm0,0xc0(%rsp)
xor    %ebp,%ebp
xorps  %xmm0,%xmm0
cvtsi2sd %rcx,%xmm0
movsd  %xmm0,0xb8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %rdx,%xmm0
movsd  %xmm0,0xb0(%rsp)
movsd  0x9cc(%rip),%xmm0
jmp    16e4 <plotCubicBezier+0x5a4>
xchg   %ax,%ax
xorps  %xmm1,%xmm1
cvtsi2ss %r13d,%xmm1
movaps %xmm4,%xmm2
addss  %xmm1,%xmm2
cvttss2si %xmm2,%edx
xorps  %xmm2,%xmm2
cvtsi2ss %r14d,%xmm2
movaps %xmm0,%xmm3
addss  %xmm2,%xmm3
cvttss2si %xmm3,%ecx
shufps $0x55,%xmm4,%xmm4
addss  %xmm1,%xmm4
cvttss2si %xmm4,%r8d
shufps $0x55,%xmm0,%xmm0
addss  %xmm2,%xmm0
cvttss2si %xmm0,%r9d
mov    %r13d,%edi
mov    %r14d,%esi
push   %r12
push   %rbx
call   1050 <plotCubicBezierSeg@plt>
movss  0x18(%rsp),%xmm5
add    $0x10,%rsp
add    $0x1,%rbp
mov    %ebx,%r13d
movaps %xmm5,%xmm2
mov    %r12d,%r14d
cmp    %rbp,%r15
movapd 0x60(%rsp),%xmm0
je     1943 <plotCubicBezier+0x803>
movss  %xmm2,0x10(%rsp)
movss  0x18(%rsp),%xmm2
movapd %xmm0,%xmm5
movsd  0x70(%rsp,%rbp,8),%xmm4
movapd %xmm4,%xmm6
unpcklpd %xmm0,%xmm6
movapd %xmm4,%xmm0
xorpd  0x902(%rip),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
movaps %xmm2,%xmm7
unpcklpd %xmm4,%xmm5
movapd %xmm5,%xmm2
mulpd  0x20(%rsp),%xmm2
addpd  0x110(%rsp),%xmm2
movapd %xmm5,%xmm3
mulpd  0x100(%rsp),%xmm3
addpd  0xe0(%rsp),%xmm3
mulpd  %xmm5,%xmm3
addpd  0xf0(%rsp),%xmm3
movapd %xmm6,0x40(%rsp)
mulpd  %xmm6,%xmm3
movapd %xmm5,0x50(%rsp)
mulpd  %xmm5,%xmm2
subpd  %xmm3,%xmm2
addpd  0xc0(%rsp),%xmm2
mulpd  0x8a5(%rip),%xmm2
movlhps %xmm1,%xmm1
subpd  %xmm1,%xmm2
cvtpd2ps %xmm2,%xmm1
movapd %xmm1,0x30(%rsp)
movapd %xmm0,%xmm1
mulsd  0xa0(%rsp),%xmm1
addsd  0xb8(%rsp),%xmm1
mulsd  %xmm4,%xmm1
addsd  0x170(%rsp),%xmm1
mulsd  %xmm4,%xmm1
addsd  0xd0(%rsp),%xmm1
movsd  0x87c(%rip),%xmm2
mulsd  %xmm2,%xmm1
cvtsd2ss %xmm1,%xmm1
subss  %xmm1,%xmm7
movss  %xmm7,0x4(%rsp)
mulsd  0x1a0(%rsp),%xmm0
addsd  0xb0(%rsp),%xmm0
mulsd  %xmm4,%xmm0
addsd  0x160(%rsp),%xmm0
movapd %xmm4,0x60(%rsp)
mulsd  %xmm4,%xmm0
addsd  0x180(%rsp),%xmm0
mulsd  %xmm2,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x8(%rsp)
movss  %xmm1,0x18(%rsp)
movaps %xmm1,%xmm0
movss  0x821(%rip),%xmm1
addss  %xmm1,%xmm0
call   1060 <floor@plt>
mov    %eax,%ebx
movss  0x8(%rsp),%xmm0
addss  0x808(%rip),%xmm0
call   1060 <floor@plt>
movss  0x4(%rsp),%xmm1
mov    %eax,%r12d
ucomiss 0x7f7(%rip),%xmm1
jne    1859 <plotCubicBezier+0x719>
jnp    1880 <plotCubicBezier+0x740>
mov    %r13d,%eax
sub    %ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
divss  %xmm1,%xmm0
shufps $0x0,%xmm0,%xmm0
movaps 0x30(%rsp),%xmm4
mulps  %xmm0,%xmm4
movss  0x10(%rsp),%xmm3
jmp    188b <plotCubicBezier+0x74b>
nopl   (%rax)
movss  0x10(%rsp),%xmm3
movaps 0x30(%rsp),%xmm4
movss  0x8(%rsp),%xmm5
movapd 0x50(%rsp),%xmm6
movapd 0x40(%rsp),%xmm7
xorps  %xmm0,%xmm0
cvtss2sd %xmm3,%xmm0
movapd %xmm6,%xmm1
mulpd  0x1b0(%rsp),%xmm1
addpd  0x150(%rsp),%xmm1
movapd %xmm6,%xmm2
mulpd  0x140(%rsp),%xmm2
addpd  0x130(%rsp),%xmm2
mulpd  %xmm6,%xmm2
addpd  0x190(%rsp),%xmm2
mulpd  %xmm7,%xmm2
mulpd  %xmm6,%xmm1
subpd  %xmm2,%xmm1
addpd  0x120(%rsp),%xmm1
mulpd  0x726(%rip),%xmm1
movlhps %xmm0,%xmm0
subpd  %xmm0,%xmm1
cvtpd2ps %xmm1,%xmm0
subss  %xmm5,%xmm3
ucomiss 0x73c(%rip),%xmm3
jne    1914 <plotCubicBezier+0x7d4>
jnp    192c <plotCubicBezier+0x7ec>
mov    %r14d,%eax
sub    %r12d,%eax
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
divss  %xmm3,%xmm1
shufps $0x0,%xmm1,%xmm1
mulps  %xmm1,%xmm0
cmp    %ebx,%r13d
jne    1670 <plotCubicBezier+0x530>
cmp    %r12d,%r14d
je     16c8 <plotCubicBezier+0x588>
jmp    1670 <plotCubicBezier+0x530>
add    $0x1c8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @plotCubicBezier(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i64
%20 = alloca i64
%21 = alloca i64
%22 = alloca i64
%23 = alloca i64
%24 = alloca i64
%25 = alloca i64
%26 = alloca i64
%27 = alloca float
%28 = alloca float
%29 = alloca float
%30 = alloca float
%31 = alloca float
%32 = alloca float
%33 = alloca float
%34 = alloca float
%35 = alloca double
%36 = alloca double
%37 = alloca [5 x double]
store i32 %0, i32* %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i32 %7, i32* %16
store i32 0, i32* %17
store i32 0, i32* %18
%38 = load i32, i32* %9
%39 = load i32, i32* %11
%40 = add nsw i32 %38, %39
%41 = load i32, i32* %13
%42 = sub nsw i32 %40, %41
%43 = load i32, i32* %15
%44 = sub nsw i32 %42, %43
%45 = sext i32 %44 to i64
store i64 %45, i64* %19
%46 = load i64, i64* %19
%47 = load i32, i32* %11
%48 = load i32, i32* %13
%49 = sub nsw i32 %47, %48
%50 = mul nsw i32 4, %49
%51 = sext i32 %50 to i64
%52 = sub nsw i64 %46, %51
store i64 %52, i64* %20
%53 = load i32, i32* %9
%54 = load i32, i32* %11
%55 = sub nsw i32 %53, %54
%56 = load i32, i32* %13
%57 = sub nsw i32 %55, %56
%58 = load i32, i32* %15
%59 = add nsw i32 %57, %58
%60 = sext i32 %59 to i64
store i64 %60, i64* %21
%61 = load i64, i64* %21
%62 = load i32, i32* %11
%63 = load i32, i32* %13
%64 = add nsw i32 %62, %63
%65 = mul nsw i32 4, %64
%66 = sext i32 %65 to i64
%67 = add nsw i64 %61, %66
store i64 %67, i64* %22
%68 = load i32, i32* %10
%69 = load i32, i32* %12
%70 = add nsw i32 %68, %69
%71 = load i32, i32* %14
%72 = sub nsw i32 %70, %71
%73 = load i32, i32* %16
%74 = sub nsw i32 %72, %73
%75 = sext i32 %74 to i64
store i64 %75, i64* %23
%76 = load i64, i64* %23
%77 = load i32, i32* %12
%78 = load i32, i32* %14
%79 = sub nsw i32 %77, %78
%80 = mul nsw i32 4, %79
%81 = sext i32 %80 to i64
%82 = sub nsw i64 %76, %81
store i64 %82, i64* %24
%83 = load i32, i32* %10
%84 = load i32, i32* %12
%85 = sub nsw i32 %83, %84
%86 = load i32, i32* %14
%87 = sub nsw i32 %85, %86
%88 = load i32, i32* %16
%89 = add nsw i32 %87, %88
%90 = sext i32 %89 to i64
store i64 %90, i64* %25
%91 = load i64, i64* %25
%92 = load i32, i32* %12
%93 = load i32, i32* %14
%94 = add nsw i32 %92, %93
%95 = mul nsw i32 4, %94
%96 = sext i32 %95 to i64
%97 = add nsw i64 %91, %96
store i64 %97, i64* %26
%98 = load i32, i32* %9
%99 = sitofp i32 %98 to float
store float %99, float* %27
%100 = load i32, i32* %10
%101 = sitofp i32 %100 to float
store float %101, float* %31
%102 = load i64, i64* %21
%103 = load i64, i64* %21
%104 = mul nsw i64 %102, %103
%105 = load i64, i64* %20
%106 = load i64, i64* %19
%107 = mul nsw i64 %105, %106
%108 = sub nsw i64 %104, %107
%109 = sitofp i64 %108 to double
store double %109, double* %35
%110 = load i64, i64* %20
%111 = icmp eq i64 %110, 0
br i1 %111, label %112, label %131
112: ; preds = %8
%113 = load i64, i64* %19
%114 = call i32 @abs(i64 %113)
%115 = load i64, i64* %21
%116 = call i32 @abs(i64 %115)
%117 = mul nsw i32 2, %116
%118 = icmp slt i32 %114, %117
br i1 %118, label %119, label %130
119: ; preds = %112
%120 = load i64, i64* %19
%121 = sitofp i64 %120 to double
%122 = load i64, i64* %21
%123 = sitofp i64 %122 to double
%124 = fmul double 2.000000e+00, %123
%125 = fdiv double %121, %124
%126 = load i32, i32* %17
%127 = add nsw i32 %126, 1
store i32 %127, i32* %17
%128 = sext i32 %126 to i64
%129 = getelementptr inbounds [5 x double], [5 x double]* %37, i64 0, i64 %128
store double %125, double* %129
br label %130
130: ; preds = %119, %112
br label %172
131: ; preds = %8
%132 = load double, double* %35
%133 = fcmp ogt double %132, 0.000000e+00
br i1 %133, label %134, label %171
134: ; preds = %131
%135 = load double, double* %35
%136 = call double @sqrt(double %135)
store double %136, double* %36
%137 = load i64, i64* %21
%138 = sitofp i64 %137 to double
%139 = load double, double* %36
%140 = fsub double %138, %139
%141 = load i64, i64* %20
%142 = sitofp i64 %141 to double
%143 = fdiv double %140, %142
store double %143, double* %35
%144 = load double, double* %35
%145 = call double @llvm.fabs.f64(double %144)
%146 = fcmp olt double %145, 1.000000e+00
br i1 %146, label %147, label %153
147: ; preds = %134
%148 = load double, double* %35
%149 = load i32, i32* %17
%150 = add nsw i32 %149, 1
store i32 %150, i32* %17
%151 = sext i32 %149 to i64
%152 = getelementptr inbounds [5 x double], [5 x double]* %37, i64 0, i64 %151
store double %148, double* %152
br label %153
153: ; preds = %147, %134
%154 = load i64, i64* %21
%155 = sitofp i64 %154 to double
%156 = load double, double* %36
%157 = fadd double %155, %156
%158 = load i64, i64* %20
%159 = sitofp i64 %158 to double
%160 = fdiv double %157, %159
store double %160, double* %35
%161 = load double, double* %35
%162 = call double @llvm.fabs.f64(double %161)
%163 = fcmp olt double %162, 1.000000e+00
br i1 %163, label %164, label %170
164: ; preds = %153
%165 = load double, double* %35
%166 = load i32, i32* %17
%167 = add nsw i32 %166, 1
store i32 %167, i32* %17
%168 = sext i32 %166 to i64
%169 = getelementptr inbounds [5 x double], [5 x double]* %37, i64 0, i64 %168
store double %165, double* %169
br label %170
170: ; preds = %164, %153
br label %171
171: ; preds = %170, %131
br label %172
172: ; preds = %171, %130
%173 = load i64, i64* %25
%174 = load i64, i64* %25
%175 = mul nsw i64 %173, %174
%176 = load i64, i64* %24
%177 = load i64, i64* %23
%178 = mul nsw i64 %176, %177
%179 = sub nsw i64 %175, %178
%180 = sitofp i64 %179 to double
store double %180, double* %35
%181 = load i64, i64* %24
%182 = icmp eq i64 %181, 0
br i1 %182, label %183, label %202
183: ; preds = %172
%184 = load i64, i64* %23
%185 = call i32 @abs(i64 %184)
%186 = load i64, i64* %25
%187 = call i32 @abs(i64 %186)
%188 = mul nsw i32 2, %187
%189 = icmp slt i32 %185, %188
br i1 %189, label %190, label %201
190: ; preds = %183
%191 = load i64, i64* %23
%192 = sitofp i64 %191 to double
%193 = load i64, i64* %25
%194 = sitofp i64 %193 to double
%195 = fmul double 2.000000e+00, %194
%196 = fdiv double %192, %195
%197 = load i32, i32* %17
%198 = add nsw i32 %197, 1
store i32 %198, i32* %17
%199 = sext i32 %197 to i64
%200 = getelementptr inbounds [5 x double], [5 x double]* %37, i64 0, i64 %199
store double %196, double* %200
br label %201
201: ; preds = %190, %183
br label %243
202: ; preds = %172
%203 = load double, double* %35
%204 = fcmp ogt double %203, 0.000000e+00
br i1 %204, label %205, label %242
205: ; preds = %202
%206 = load double, double* %35
%207 = call double @sqrt(double %206)
store double %207, double* %36
%208 = load i64, i64* %25
%209 = sitofp i64 %208 to double
%210 = load double, double* %36
%211 = fsub double %209, %210
%212 = load i64, i64* %24
%213 = sitofp i64 %212 to double
%214 = fdiv double %211, %213
store double %214, double* %35
%215 = load double, double* %35
%216 = call double @llvm.fabs.f64(double %215)
%217 = fcmp olt double %216, 1.000000e+00
br i1 %217, label %218, label %224
218: ; preds = %205
%219 = load double, double* %35
%220 = load i32, i32* %17
%221 = add nsw i32 %220, 1
store i32 %221, i32* %17
%222 = sext i32 %220 to i64
%223 = getelementptr inbounds [5 x double], [5 x double]* %37, i64 0, i64 %222
store double %219, double* %223
br label %224
224: ; preds = %218, %205
%225 = load i64, i64* %25
%226 = sitofp i64 %225 to double
%227 = load double, double* %36
%228 = fadd double %226, %227
%229 = load i64, i64* %24
%230 = sitofp i64 %229 to double
%231 = fdiv double %228, %230
store double %231, double* %35
%232 = load double, double* %35
%233 = call double @llvm.fabs.f64(double %232)
%234 = fcmp olt double %233, 1.000000e+00
br i1 %234, label %235, label %241
235: ; preds = %224
%236 = load double, double* %35
%237 = load i32, i32* %17
%238 = add nsw i32 %237, 1
store i32 %238, i32* %17
%239 = sext i32 %237 to i64
%240 = getelementptr inbounds [5 x double], [5 x double]* %37, i64 0, i64 %239
store double %236, double* %240
br label %241
241: ; preds = %235, %224
br label %242
242: ; preds = %241, %202
br label %243
243: ; preds = %242, %201
store i32 1, i32* %18
br label %244
244: ; preds = %273, %243
%245 = load i32, i32* %18
%246 = load i32, i32* %17
%247 = icmp slt i32 %245, %246
br i1 %247, label %248, label %276
248: ; preds = %244
%249 = load i32, i32* %18
%250 = sub nsw i32 %249, 1
%251 = sext i32 %250 to i64
%252 = getelementptr inbounds [5 x double], [5 x double]* %37, i64 0, i64 %251
%253 = load double, double* %252
store double %253, double* %35
%254 = load i32, i32* %18
%255 = sext i32 %254 to i64
%256 = getelementptr inbounds [5 x double], [5 x double]* %37, i64 0, i64 %255
%257 = load double, double* %256
%258 = fcmp ogt double %253, %257
br i1 %258, label %259, label %272
259: ; preds = %248
%260 = load i32, i32* %18
%261 = sext i32 %260 to i64
%262 = getelementptr inbounds [5 x double], [5 x double]* %37, i64 0, i64 %261
%263 = load double, double* %262
%264 = load i32, i32* %18
%265 = sub nsw i32 %264, 1
%266 = sext i32 %265 to i64
%267 = getelementptr inbounds [5 x double], [5 x double]* %37, i64 0, i64 %266
store double %263, double* %267
%268 = load double, double* %35
%269 = load i32, i32* %18
%270 = sext i32 %269 to i64
%271 = getelementptr inbounds [5 x double], [5 x double]* %37, i64 0, i64 %270
store double %268, double* %271
store i32 0, i32* %18
br label %272
272: ; preds = %259, %248
br label %273
273: ; preds = %272
%274 = load i32, i32* %18
%275 = add nsw i32 %274, 1
store i32 %275, i32* %18
br label %244
276: ; preds = %244
store double -1.000000e+00, double* %35
%277 = load i32, i32* %17
%278 = sext i32 %277 to i64
%279 = getelementptr inbounds [5 x double], [5 x double]* %37, i64 0, i64 %278
store double 1.000000e+00, double* %279
store i32 0, i32* %18
br label %280
280: ; preds = %546, %276
%281 = load i32, i32* %18
%282 = load i32, i32* %17
%283 = icmp sle i32 %281, %282
br i1 %283, label %284, label %549
284: ; preds = %280
%285 = load i32, i32* %18
%286 = sext i32 %285 to i64
%287 = getelementptr inbounds [5 x double], [5 x double]* %37, i64 0, i64 %286
%288 = load double, double* %287
store double %288, double* %36
%289 = load double, double* %35
%290 = load double, double* %35
%291 = load i64, i64* %21
%292 = sitofp i64 %291 to double
%293 = load i64, i64* %19
%294 = mul nsw i64 2, %293
%295 = sitofp i64 %294 to double
%296 = fneg double %295
%297 = call double @llvm.fmuladd.f64(double %290, double %292, double %296)
%298 = load double, double* %36
%299 = load double, double* %35
%300 = load double, double* %35
%301 = load i64, i64* %20
%302 = sitofp i64 %301 to double
%303 = load i64, i64* %21
%304 = mul nsw i64 2, %303
%305 = sitofp i64 %304 to double
%306 = fneg double %305
%307 = call double @llvm.fmuladd.f64(double %300, double %302, double %306)
%308 = load i64, i64* %19
%309 = sitofp i64 %308 to double
%310 = call double @llvm.fmuladd.f64(double %299, double %307, double %309)
%311 = fmul double %298, %310
%312 = fneg double %311
%313 = call double @llvm.fmuladd.f64(double %289, double %297, double %312)
%314 = load i64, i64* %22
%315 = sitofp i64 %314 to double
%316 = fadd double %313, %315
%317 = fdiv double %316, 8.000000e+00
%318 = load float, float* %27
%319 = fpext float %318 to double
%320 = fsub double %317, %319
%321 = fptrunc double %320 to float
store float %321, float* %28
%322 = load double, double* %35
%323 = load double, double* %35
%324 = load i64, i64* %25
%325 = sitofp i64 %324 to double
%326 = load i64, i64* %23
%327 = mul nsw i64 2, %326
%328 = sitofp i64 %327 to double
%329 = fneg double %328
%330 = call double @llvm.fmuladd.f64(double %323, double %325, double %329)
%331 = load double, double* %36
%332 = load double, double* %35
%333 = load double, double* %35
%334 = load i64, i64* %24
%335 = sitofp i64 %334 to double
%336 = load i64, i64* %25
%337 = mul nsw i64 2, %336
%338 = sitofp i64 %337 to double
%339 = fneg double %338
%340 = call double @llvm.fmuladd.f64(double %333, double %335, double %339)
%341 = load i64, i64* %23
%342 = sitofp i64 %341 to double
%343 = call double @llvm.fmuladd.f64(double %332, double %340, double %342)
%344 = fmul double %331, %343
%345 = fneg double %344
%346 = call double @llvm.fmuladd.f64(double %322, double %330, double %345)
%347 = load i64, i64* %26
%348 = sitofp i64 %347 to double
%349 = fadd double %346, %348
%350 = fdiv double %349, 8.000000e+00
%351 = load float, float* %31
%352 = fpext float %351 to double
%353 = fsub double %350, %352
%354 = fptrunc double %353 to float
store float %354, float* %32
%355 = load double, double* %36
%356 = load double, double* %36
%357 = load i64, i64* %21
%358 = sitofp i64 %357 to double
%359 = load i64, i64* %19
%360 = mul nsw i64 2, %359
%361 = sitofp i64 %360 to double
%362 = fneg double %361
%363 = call double @llvm.fmuladd.f64(double %356, double %358, double %362)
%364 = load double, double* %35
%365 = load double, double* %36
%366 = load double, double* %36
%367 = load i64, i64* %20
%368 = sitofp i64 %367 to double
%369 = load i64, i64* %21
%370 = mul nsw i64 2, %369
%371 = sitofp i64 %370 to double
%372 = fneg double %371
%373 = call double @llvm.fmuladd.f64(double %366, double %368, double %372)
%374 = load i64, i64* %19
%375 = sitofp i64 %374 to double
%376 = call double @llvm.fmuladd.f64(double %365, double %373, double %375)
%377 = fmul double %364, %376
%378 = fneg double %377
%379 = call double @llvm.fmuladd.f64(double %355, double %363, double %378)
%380 = load i64, i64* %22
%381 = sitofp i64 %380 to double
%382 = fadd double %379, %381
%383 = fdiv double %382, 8.000000e+00
%384 = load float, float* %27
%385 = fpext float %384 to double
%386 = fsub double %383, %385
%387 = fptrunc double %386 to float
store float %387, float* %29
%388 = load double, double* %36
%389 = load double, double* %36
%390 = load i64, i64* %25
%391 = sitofp i64 %390 to double
%392 = load i64, i64* %23
%393 = mul nsw i64 2, %392
%394 = sitofp i64 %393 to double
%395 = fneg double %394
%396 = call double @llvm.fmuladd.f64(double %389, double %391, double %395)
%397 = load double, double* %35
%398 = load double, double* %36
%399 = load double, double* %36
%400 = load i64, i64* %24
%401 = sitofp i64 %400 to double
%402 = load i64, i64* %25
%403 = mul nsw i64 2, %402
%404 = sitofp i64 %403 to double
%405 = fneg double %404
%406 = call double @llvm.fmuladd.f64(double %399, double %401, double %405)
%407 = load i64, i64* %23
%408 = sitofp i64 %407 to double
%409 = call double @llvm.fmuladd.f64(double %398, double %406, double %408)
%410 = fmul double %397, %409
%411 = fneg double %410
%412 = call double @llvm.fmuladd.f64(double %388, double %396, double %411)
%413 = load i64, i64* %26
%414 = sitofp i64 %413 to double
%415 = fadd double %412, %414
%416 = fdiv double %415, 8.000000e+00
%417 = load float, float* %31
%418 = fpext float %417 to double
%419 = fsub double %416, %418
%420 = fptrunc double %419 to float
store float %420, float* %33
%421 = load double, double* %36
%422 = load double, double* %36
%423 = load i64, i64* %21
%424 = mul nsw i64 3, %423
%425 = sitofp i64 %424 to double
%426 = load double, double* %36
%427 = load i64, i64* %20
%428 = sitofp i64 %427 to double
%429 = fneg double %426
%430 = call double @llvm.fmuladd.f64(double %429, double %428, double %425)
%431 = load i64, i64* %19
%432 = mul nsw i64 3, %431
%433 = sitofp i64 %432 to double
%434 = fneg double %433
%435 = call double @llvm.fmuladd.f64(double %422, double %430, double %434)
%436 = load i64, i64* %22
%437 = sitofp i64 %436 to double
%438 = call double @llvm.fmuladd.f64(double %421, double %435, double %437)
%439 = fdiv double %438, 8.000000e+00
%440 = fptrunc double %439 to float
store float %440, float* %30
%441 = load float, float* %27
%442 = fsub float %441, %440
store float %442, float* %27
%443 = load double, double* %36
%444 = load double, double* %36
%445 = load i64, i64* %25
%446 = mul nsw i64 3, %445
%447 = sitofp i64 %446 to double
%448 = load double, double* %36
%449 = load i64, i64* %24
%450 = sitofp i64 %449 to double
%451 = fneg double %448
%452 = call double @llvm.fmuladd.f64(double %451, double %450, double %447)
%453 = load i64, i64* %23
%454 = mul nsw i64 3, %453
%455 = sitofp i64 %454 to double
%456 = fneg double %455
%457 = call double @llvm.fmuladd.f64(double %444, double %452, double %456)
%458 = load i64, i64* %26
%459 = sitofp i64 %458 to double
%460 = call double @llvm.fmuladd.f64(double %443, double %457, double %459)
%461 = fdiv double %460, 8.000000e+00
%462 = fptrunc double %461 to float
store float %462, float* %34
%463 = load float, float* %31
%464 = fsub float %463, %462
store float %464, float* %31
%465 = load float, float* %30
%466 = fpext float %465 to double
%467 = fadd double %466, 5.000000e-01
%468 = fptrunc double %467 to float
%469 = call i32 @floor(float %468)
store i32 %469, i32* %15
%470 = load float, float* %34
%471 = fpext float %470 to double
%472 = fadd double %471, 5.000000e-01
%473 = fptrunc double %472 to float
%474 = call i32 @floor(float %473)
store i32 %474, i32* %16
%475 = load float, float* %27
%476 = fpext float %475 to double
%477 = fcmp une double %476, 0.000000e+00
br i1 %477, label %478, label %490
478: ; preds = %284
%479 = load i32, i32* %9
%480 = load i32, i32* %15
%481 = sub nsw i32 %479, %480
%482 = sitofp i32 %481 to float
%483 = load float, float* %27
%484 = fdiv float %482, %483
store float %484, float* %27
%485 = load float, float* %28
%486 = fmul float %485, %484
store float %486, float* %28
%487 = load float, float* %27
%488 = load float, float* %29
%489 = fmul float %488, %487
store float %489, float* %29
br label %490
490: ; preds = %478, %284
%491 = load float, float* %31
%492 = fpext float %491 to double
%493 = fcmp une double %492, 0.000000e+00
br i1 %493, label %494, label %506
494: ; preds = %490
%495 = load i32, i32* %10
%496 = load i32, i32* %16
%497 = sub nsw i32 %495, %496
%498 = sitofp i32 %497 to float
%499 = load float, float* %31
%500 = fdiv float %498, %499
store float %500, float* %31
%501 = load float, float* %32
%502 = fmul float %501, %500
store float %502, float* %32
%503 = load float, float* %31
%504 = load float, float* %33
%505 = fmul float %504, %503
store float %505, float* %33
br label %506
506: ; preds = %494, %490
%507 = load i32, i32* %9
%508 = load i32, i32* %15
%509 = icmp ne i32 %507, %508
br i1 %509, label %514, label %510
510: ; preds = %506
%511 = load i32, i32* %10
%512 = load i32, i32* %16
%513 = icmp ne i32 %511, %512
br i1 %513, label %514, label %540
514: ; preds = %510, %506
%515 = load i32, i32* %9
%516 = load i32, i32* %10
%517 = load i32, i32* %9
%518 = sitofp i32 %517 to float
%519 = load float, float* %28
%520 = fadd float %518, %519
%521 = fptosi float %520 to i32
%522 = load i32, i32* %10
%523 = sitofp i32 %522 to float
%524 = load float, float* %32
%525 = fadd float %523, %524
%526 = fptosi float %525 to i32
%527 = load i32, i32* %9
%528 = sitofp i32 %527 to float
%529 = load float, float* %29
%530 = fadd float %528, %529
%531 = fptosi float %530 to i32
%532 = load i32, i32* %10
%533 = sitofp i32 %532 to float
%534 = load float, float* %33
%535 = fadd float %533, %534
%536 = fptosi float %535 to i32
%537 = load i32, i32* %15
%538 = load i32, i32* %16
%539 = call i32 @plotCubicBezierSeg(i32 %515, i32 %516, i32 %521, i32 %526, i32 %531, i32 %536, i32 %537, i32 %538)
br label %540
540: ; preds = %514, %510
%541 = load i32, i32* %15
store i32 %541, i32* %9
%542 = load i32, i32* %16
store i32 %542, i32* %10
%543 = load float, float* %30
store float %543, float* %27
%544 = load float, float* %34
store float %544, float* %31
%545 = load double, double* %36
store double %545, double* %35
br label %546
546: ; preds = %540
%547 = load i32, i32* %18
%548 = add nsw i32 %547, 1
store i32 %548, i32* %18
br label %280
549: ; preds = %280
ret void
}

LLVM IR (-O2):
define void @plotCubicBezier(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca [5 x double]
%10 = add i32 %2, %0
%11 = add i32 %4, %6
%12 = sub i32 %10, %11
%13 = sext i32 %12 to i64
%14 = sub nsw i32 %2, %4
%15 = shl nsw i32 %14, 2
%16 = sext i32 %15 to i64
%17 = sub nsw i64 %13, %16
%18 = add i32 %4, %2
%19 = sub i32 %0, %18
%20 = add nsw i32 %19, %6
%21 = sext i32 %20 to i64
%22 = shl nsw i32 %18, 2
%23 = sext i32 %22 to i64
%24 = add nsw i64 %21, %23
%25 = add i32 %3, %1
%26 = add i32 %5, %7
%27 = sub i32 %25, %26
%28 = sext i32 %27 to i64
%29 = sub nsw i32 %3, %5
%30 = shl nsw i32 %29, 2
%31 = sext i32 %30 to i64
%32 = sub nsw i64 %28, %31
%33 = add i32 %5, %3
%34 = sub i32 %1, %33
%35 = add nsw i32 %34, %7
%36 = sext i32 %35 to i64
%37 = shl nsw i32 %33, 2
%38 = sext i32 %37 to i64
%39 = add nsw i64 %36, %38
%40 = sitofp i32 %0 to float
%41 = sitofp i32 %1 to float
%42 = mul nsw i64 %21, %21
%43 = mul nsw i64 %17, %13
%44 = sub nsw i64 %42, %43
%45 = sitofp i64 %44 to double
%46 = bitcast [5 x double]* %9 to i8*
%47 = icmp eq i64 %17, 0
br i1 %47, label %48, label %59
48: ; preds = %8
%49 = tail call i32 @abs(i64 %13)
%50 = tail call i32 @abs(i64 %21)
%51 = shl nsw i32 %50, 1
%52 = icmp slt i32 %49, %51
br i1 %52, label %53, label %81
53: ; preds = %48
%54 = sitofp i32 %12 to double
%55 = sitofp i32 %20 to double
%56 = fmul double %55, 2.000000e+00
%57 = fdiv double %54, %56
%58 = getelementptr inbounds [5 x double], [5 x double]* %9, i64 0, i64 0
store double %57, double* %58
br label %81
59: ; preds = %8
%60 = icmp sgt i64 %44, 0
br i1 %60, label %61, label %81
61: ; preds = %59
%62 = tail call double @sqrt(double %45)
%63 = sitofp i32 %20 to double
%64 = fsub double %63, %62
%65 = sitofp i64 %17 to double
%66 = fdiv double %64, %65
%67 = tail call double @llvm.fabs.f64(double %66)
%68 = fcmp olt double %67, 1.000000e+00
br i1 %68, label %69, label %71
69: ; preds = %61
%70 = getelementptr inbounds [5 x double], [5 x double]* %9, i64 0, i64 0
store double %66, double* %70
br label %71
71: ; preds = %69, %61
%72 = phi i32 [ 1, %69 ], [ 0, %61 ]
%73 = fadd double %62, %63
%74 = fdiv double %73, %65
%75 = tail call double @llvm.fabs.f64(double %74)
%76 = fcmp olt double %75, 1.000000e+00
br i1 %76, label %77, label %81
77: ; preds = %71
%78 = add nuw nsw i32 %72, 1
%79 = zext i32 %72 to i64
%80 = getelementptr inbounds [5 x double], [5 x double]* %9, i64 0, i64 %79
store double %74, double* %80
br label %81
81: ; preds = %59, %77, %71, %48, %53
%82 = phi i32 [ 1, %53 ], [ 0, %48 ], [ %78, %77 ], [ %72, %71 ], [ 0, %59 ]
%83 = mul nsw i64 %36, %36
%84 = mul nsw i64 %32, %28
%85 = sub nsw i64 %83, %84
%86 = sitofp i64 %85 to double
%87 = icmp eq i64 %32, 0
br i1 %87, label %88, label %98
88: ; preds = %81
%89 = tail call i32 @abs(i64 %28)
%90 = tail call i32 @abs(i64 %36)
%91 = shl nsw i32 %90, 1
%92 = icmp slt i32 %89, %91
br i1 %92, label %93, label %124
93: ; preds = %88
%94 = sitofp i32 %27 to double
%95 = sitofp i32 %35 to double
%96 = fmul double %95, 2.000000e+00
%97 = fdiv double %94, %96
br label %118
98: ; preds = %81
%99 = icmp sgt i64 %85, 0
br i1 %99, label %100, label %124
100: ; preds = %98
%101 = tail call double @sqrt(double %86)
%102 = sitofp i32 %35 to double
%103 = fsub double %102, %101
%104 = sitofp i64 %32 to double
%105 = fdiv double %103, %104
%106 = tail call double @llvm.fabs.f64(double %105)
%107 = fcmp olt double %106, 1.000000e+00
br i1 %107, label %108, label %112
108: ; preds = %100
%109 = add nuw nsw i32 %82, 1
%110 = zext i32 %82 to i64
%111 = getelementptr inbounds [5 x double], [5 x double]* %9, i64 0, i64 %110
store double %105, double* %111
br label %112
112: ; preds = %108, %100
%113 = phi i32 [ %109, %108 ], [ %82, %100 ]
%114 = fadd double %101, %102
%115 = fdiv double %114, %104
%116 = tail call double @llvm.fabs.f64(double %115)
%117 = fcmp olt double %116, 1.000000e+00
br i1 %117, label %118, label %124
118: ; preds = %112, %93
%119 = phi i32 [ %82, %93 ], [ %113, %112 ]
%120 = phi double [ %97, %93 ], [ %115, %112 ]
%121 = add nuw nsw i32 %119, 1
%122 = zext i32 %119 to i64
%123 = getelementptr inbounds [5 x double], [5 x double]* %9, i64 0, i64 %122
store double %120, double* %123
br label %124
124: ; preds = %118, %98, %112, %88
%125 = phi i32 [ %82, %88 ], [ %113, %112 ], [ %82, %98 ], [ %121, %118 ]
%126 = icmp ugt i32 %125, 1
br i1 %126, label %130, label %127
127: ; preds = %124
%128 = zext i32 %125 to i64
%129 = getelementptr inbounds [5 x double], [5 x double]* %9, i64 0, i64 %128
store double 1.000000e+00, double* %129
br label %149
130: ; preds = %124, %141
%131 = phi i32 [ %143, %141 ], [ 1, %124 ]
%132 = add nsw i32 %131, -1
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds [5 x double], [5 x double]* %9, i64 0, i64 %133
%135 = load double, double* %134
%136 = sext i32 %131 to i64
%137 = getelementptr inbounds [5 x double], [5 x double]* %9, i64 0, i64 %136
%138 = load double, double* %137
%139 = fcmp ogt double %135, %138
br i1 %139, label %140, label %141
140: ; preds = %130
store double %138, double* %134
store double %135, double* %137
br label %141
141: ; preds = %130, %140
%142 = phi i32 [ 0, %140 ], [ %131, %130 ]
%143 = add nsw i32 %142, 1
%144 = icmp slt i32 %143, %125
br i1 %144, label %130, label %145
145: ; preds = %141
%146 = sext i32 %125 to i64
%147 = getelementptr inbounds [5 x double], [5 x double]* %9, i64 0, i64 %146
store double 1.000000e+00, double* %147
%148 = icmp slt i32 %125, 0
br i1 %148, label %303, label %149
149: ; preds = %127, %145
%150 = sitofp i32 %20 to double
%151 = shl nsw i64 %13, 1
%152 = sitofp i64 %151 to double
%153 = fneg double %152
%154 = sitofp i64 %17 to double
%155 = shl nsw i64 %21, 1
%156 = sitofp i64 %155 to double
%157 = fneg double %156
%158 = sitofp i32 %12 to double
%159 = sitofp i64 %24 to double
%160 = sitofp i32 %35 to double
%161 = shl nsw i64 %28, 1
%162 = sitofp i64 %161 to double
%163 = fneg double %162
%164 = sitofp i64 %32 to double
%165 = shl nsw i64 %36, 1
%166 = sitofp i64 %165 to double
%167 = fneg double %166
%168 = sitofp i32 %27 to double
%169 = sitofp i64 %39 to double
%170 = mul nsw i64 %21, 3
%171 = sitofp i64 %170 to double
%172 = mul nsw i64 %13, 3
%173 = sitofp i64 %172 to double
%174 = fneg double %173
%175 = mul nsw i64 %36, 3
%176 = sitofp i64 %175 to double
%177 = mul nsw i64 %28, 3
%178 = sitofp i64 %177 to double
%179 = fneg double %178
%180 = add nuw nsw i32 %125, 1
%181 = zext i32 %180 to i64
%182 = insertelement <2 x double> poison, double %160, i64 0
%183 = shufflevector <2 x double> %182, <2 x double> poison, <2 x i32> zeroinitializer
%184 = insertelement <2 x double> poison, double %163, i64 0
%185 = shufflevector <2 x double> %184, <2 x double> poison, <2 x i32> zeroinitializer
%186 = insertelement <2 x double> poison, double %164, i64 0
%187 = shufflevector <2 x double> %186, <2 x double> poison, <2 x i32> zeroinitializer
%188 = insertelement <2 x double> poison, double %167, i64 0
%189 = shufflevector <2 x double> %188, <2 x double> poison, <2 x i32> zeroinitializer
%190 = insertelement <2 x double> poison, double %168, i64 0
%191 = shufflevector <2 x double> %190, <2 x double> poison, <2 x i32> zeroinitializer
%192 = insertelement <2 x double> poison, double %169, i64 0
%193 = shufflevector <2 x double> %192, <2 x double> poison, <2 x i32> zeroinitializer
%194 = insertelement <2 x double> poison, double %150, i64 0
%195 = shufflevector <2 x double> %194, <2 x double> poison, <2 x i32> zeroinitializer
%196 = insertelement <2 x double> poison, double %153, i64 0
%197 = shufflevector <2 x double> %196, <2 x double> poison, <2 x i32> zeroinitializer
%198 = insertelement <2 x double> poison, double %154, i64 0
%199 = shufflevector <2 x double> %198, <2 x double> poison, <2 x i32> zeroinitializer
%200 = insertelement <2 x double> poison, double %157, i64 0
%201 = shufflevector <2 x double> %200, <2 x double> poison, <2 x i32> zeroinitializer
%202 = insertelement <2 x double> poison, double %158, i64 0
%203 = shufflevector <2 x double> %202, <2 x double> poison, <2 x i32> zeroinitializer
%204 = insertelement <2 x double> poison, double %159, i64 0
%205 = shufflevector <2 x double> %204, <2 x double> poison, <2 x i32> zeroinitializer
br label %206
206: ; preds = %149, %300
%207 = phi i64 [ 0, %149 ], [ %301, %300 ]
%208 = phi double [ -1.000000e+00, %149 ], [ %214, %300 ]
%209 = phi i32 [ %0, %149 ], [ %258, %300 ]
%210 = phi float [ %41, %149 ], [ %255, %300 ]
%211 = phi i32 [ %1, %149 ], [ %260, %300 ]
%212 = phi float [ %40, %149 ], [ %249, %300 ]
%213 = getelementptr inbounds [5 x double], [5 x double]* %9, i64 0, i64 %207
%214 = load double, double* %213
%215 = insertelement <2 x double> poison, double %214, i64 0
%216 = insertelement <2 x double> %215, double %208, i64 1
%217 = fneg <2 x double> %216
%218 = fpext float %212 to double
%219 = fpext float %210 to double
%220 = insertelement <2 x double> poison, double %208, i64 0
%221 = insertelement <2 x double> %220, double %214, i64 1
%222 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %221, <2 x double> %195, <2 x double> %197)
%223 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %221, <2 x double> %199, <2 x double> %201)
%224 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %221, <2 x double> %223, <2 x double> %203)
%225 = fmul <2 x double> %224, %217
%226 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %221, <2 x double> %222, <2 x double> %225)
%227 = fadd <2 x double> %226, %205
%228 = fmul <2 x double> %227, <double 1.250000e-01, double 1.250000e-01>
%229 = insertelement <2 x double> poison, double %218, i64 0
%230 = shufflevector <2 x double> %229, <2 x double> poison, <2 x i32> zeroinitializer
%231 = fsub <2 x double> %228, %230
%232 = fptrunc <2 x double> %231 to <2 x float>
%233 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %221, <2 x double> %183, <2 x double> %185)
%234 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %221, <2 x double> %187, <2 x double> %189)
%235 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %221, <2 x double> %234, <2 x double> %191)
%236 = fmul <2 x double> %235, %217
%237 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %221, <2 x double> %233, <2 x double> %236)
%238 = fadd <2 x double> %237, %193
%239 = fmul <2 x double> %238, <double 1.250000e-01, double 1.250000e-01>
%240 = insertelement <2 x double> poison, double %219, i64 0
%241 = shufflevector <2 x double> %240, <2 x double> poison, <2 x i32> zeroinitializer
%242 = fsub <2 x double> %239, %241
%243 = fptrunc <2 x double> %242 to <2 x float>
%244 = extractelement <2 x double> %217, i64 0
%245 = tail call double @llvm.fmuladd.f64(double %244, double %154, double %171)
%246 = tail call double @llvm.fmuladd.f64(double %214, double %245, double %174)
%247 = tail call double @llvm.fmuladd.f64(double %214, double %246, double %159)
%248 = fmul double %247, 1.250000e-01
%249 = fptrunc double %248 to float
%250 = fsub float %212, %249
%251 = tail call double @llvm.fmuladd.f64(double %244, double %164, double %176)
%252 = tail call double @llvm.fmuladd.f64(double %214, double %251, double %179)
%253 = tail call double @llvm.fmuladd.f64(double %214, double %252, double %169)
%254 = fmul double %253, 1.250000e-01
%255 = fptrunc double %254 to float
%256 = fsub float %210, %255
%257 = fadd float %249, 5.000000e-01
%258 = tail call i32 @floor(float %257)
%259 = fadd float %255, 5.000000e-01
%260 = tail call i32 @floor(float %259)
%261 = fcmp une float %250, 0.000000e+00
br i1 %261, label %262, label %269
262: ; preds = %206
%263 = sub nsw i32 %209, %258
%264 = sitofp i32 %263 to float
%265 = fdiv float %264, %250
%266 = insertelement <2 x float> poison, float %265, i64 0
%267 = shufflevector <2 x float> %266, <2 x float> poison, <2 x i32> zeroinitializer
%268 = fmul <2 x float> %267, %232
br label %269
269: ; preds = %262, %206
%270 = phi <2 x float> [ %268, %262 ], [ %232, %206 ]
%271 = fcmp une float %256, 0.000000e+00
br i1 %271, label %272, label %279
272: ; preds = %269
%273 = sub nsw i32 %211, %260
%274 = sitofp i32 %273 to float
%275 = fdiv float %274, %256
%276 = insertelement <2 x float> poison, float %275, i64 0
%277 = shufflevector <2 x float> %276, <2 x float> poison, <2 x i32> zeroinitializer
%278 = fmul <2 x float> %277, %243
br label %279
279: ; preds = %272, %269
%280 = phi <2 x float> [ %278, %272 ], [ %243, %269 ]
%281 = icmp eq i32 %209, %258
%282 = icmp eq i32 %211, %260
%283 = select i1 %281, i1 %282, i1 false
br i1 %283, label %300, label %284
284: ; preds = %279
%285 = sitofp i32 %209 to float
%286 = extractelement <2 x float> %270, i64 0
%287 = fadd float %286, %285
%288 = fptosi float %287 to i32
%289 = sitofp i32 %211 to float
%290 = extractelement <2 x float> %280, i64 0
%291 = fadd float %290, %289
%292 = fptosi float %291 to i32
%293 = extractelement <2 x float> %270, i64 1
%294 = fadd float %293, %285
%295 = fptosi float %294 to i32
%296 = extractelement <2 x float> %280, i64 1
%297 = fadd float %296, %289
%298 = fptosi float %297 to i32
%299 = tail call i32 @plotCubicBezierSeg(i32 %209, i32 %211, i32 %288, i32 %292, i32 %295, i32 %298, i32 %258, i32 %260)
br label %300
300: ; preds = %279, %284
%301 = add nuw nsw i64 %207, 1
%302 = icmp eq i64 %301, %181
br i1 %302, label %303, label %206
303: ; preds = %300, %145
ret void
}