#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(int);
int /*<<< orphan*/ plotLine(int, int, int, int);
int /*<<< orphan*/ printf(char *, int, int, int, int, int, int);
int /*<<< orphan*/ setPixel(int, int);
void plotBasicQuadBezier(int x0, int y0, int x1, int y1, int x2, int y2) {
  printf("P0 = %d, %d;  P1 = %d, %d;  P2 = %d, %d\n", x0, y0, x1, y1, x2, y2);
  int sx = x0 < x2 ? 1 : -1, sy = y0 < y2 ? 1 : -1;
  double x = x0 - 2 * x1 + x2, y = y0 - 2 * y1 + y2;
  double xy = 2 * x * y * sx * sy;
  double cur = sx * sy * (x * (y2 - y0) - y * (x2 - x0)) / 2;
  double dx = (1 - 2 * abs(x0 - x1)) * y * y + abs(y0 - y1) * xy -
              2 * cur * abs(y0 - y2);
  double dy = (1 - 2 * abs(y0 - y1)) * x * x + abs(x0 - x1) * xy +
              2 * cur * abs(x0 - x2);
  double ex = (1 - 2 * abs(x2 - x1)) * y * y + abs(y2 - y1) * xy +
              2 * cur * abs(y0 - y2);
  double ey = (1 - 2 * abs(y2 - y1)) * x * x + abs(x2 - x1) * xy -
              2 * cur * abs(x0 - x2);
  if (cur == 0) {
    plotLine(x0, y0, x2, y2);
    return;
  }
  x *= 2 * x;
  y *= 2 * y;
  if (cur < 0) {
    x = -x;
    dx = -dx;
    ex = -ex;
    xy = -xy;
    y = -y;
    dy = -dy;
    ey = -ey;
  }
  if (dx >= -y || dy <= -x || ex <= -y || ey >= -x) {
    x1 = (x0 + 4 * x1 + x2) / 6;
    y1 = (y0 + 4 * y1 + y2) / 6;
    plotLine(x0, y0, x1, y1);
    plotLine(x1, y1, x2, y2);
    return;
  }
  dx -= xy;
  ex = dx + dy;
  dy -= xy;
  for (;;) {
    setPixel(x0, y0);
    ey = 2 * ex - dy;
    if (2 * ex >= dx) {
      if (x0 == x2)
        break;
      x0 += sx;
      dy -= xy;
      ex += dx += y;
    }
    if (ey <= 0) {
      if (y0 == y2)
        break;
      y0 += sy;
      dx -= xy;
      ex += dy += x;
    }
  }
}


x86 assembly (clang, -O0):
<plotBasicQuadBezier>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    -0x18(%rbp),%eax
lea    0xe8e(%rip),%rdi
mov    %eax,(%rsp)
call   1040 <printf@plt>
mov    -0x4(%rbp),%edx
mov    -0x14(%rbp),%esi
mov    $0xffffffff,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmovl  %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%edx
mov    -0x18(%rbp),%esi
mov    $0xffffffff,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmovl  %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
sub    %ecx,%eax
add    -0x14(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%ecx
shl    $0x1,%ecx
sub    %ecx,%eax
add    -0x18(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe18(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
cvtsi2sdl -0x1c(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x1c(%rbp),%eax
imul   -0x20(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  -0x28(%rbp),%xmm1
mov    -0x18(%rbp),%eax
sub    -0x8(%rbp),%eax
cvtsi2sd %eax,%xmm3
movsd  -0x30(%rbp),%xmm2
mov    -0x14(%rbp),%eax
sub    -0x4(%rbp),%eax
cvtsi2sd %eax,%xmm4
mulsd  %xmm4,%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd9f(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x4(%rbp),%edi
sub    -0xc(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
mov    -0x8(%rbp),%edi
sub    -0x10(%rbp),%edi
call   1030 <abs@plt>
movsd  -0xe0(%rbp),%xmm0
ff
movsd  -0xd8(%rbp),%xmm2
ff
cvtsi2sd %eax,%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  0xd25(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
mov    -0x8(%rbp),%edi
sub    -0x18(%rbp),%edi
call   1030 <abs@plt>
movsd  -0xd0(%rbp),%xmm0
ff
movsd  -0xc8(%rbp),%xmm1
ff
cvtsi2sd %eax,%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%edi
sub    -0x10(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x4(%rbp),%edi
sub    -0xc(%rbp),%edi
call   1030 <abs@plt>
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm2
ff
cvtsi2sd %eax,%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  0xc64(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x4(%rbp),%edi
sub    -0x14(%rbp),%edi
call   1030 <abs@plt>
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xa8(%rbp),%xmm1
ff
cvtsi2sd %eax,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x14(%rbp),%edi
sub    -0xc(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x18(%rbp),%edi
sub    -0x10(%rbp),%edi
call   1030 <abs@plt>
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm2
ff
cvtsi2sd %eax,%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xbba(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x8(%rbp),%edi
sub    -0x18(%rbp),%edi
call   1030 <abs@plt>
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm1
ff
cvtsi2sd %eax,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%edi
sub    -0x10(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x14(%rbp),%edi
sub    -0xc(%rbp),%edi
call   1030 <abs@plt>
movsd  -0x80(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
cvtsi2sd %eax,%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xb1f(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x4(%rbp),%edi
sub    -0x14(%rbp),%edi
call   1030 <abs@plt>
movsd  -0x70(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
cvtsi2sd %eax,%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x40(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1556 <plotBasicQuadBezier+0x416>
jp     1556 <plotBasicQuadBezier+0x416>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1060 <plotLine@plt>
jmp    18a3 <plotBasicQuadBezier+0x763>
movsd  0xaa2(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xa8b(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x40(%rbp),%xmm0
jbe    1679 <plotBasicQuadBezier+0x539>
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x58(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x50(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x60(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
ucomisd %xmm1,%xmm0
jae    1725 <plotBasicQuadBezier+0x5e5>
movsd  -0x50(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
ucomisd %xmm1,%xmm0
jae    1725 <plotBasicQuadBezier+0x5e5>
movsd  -0x58(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
ucomisd %xmm1,%xmm0
jae    1725 <plotBasicQuadBezier+0x5e5>
movsd  -0x60(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
ucomisd %xmm1,%xmm0
jb     177e <plotBasicQuadBezier+0x63e>
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x2,%ecx
add    %ecx,%eax
add    -0x14(%rbp),%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%ecx
shl    $0x2,%ecx
add    %ecx,%eax
add    -0x18(%rbp),%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1060 <plotLine@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1060 <plotLine@plt>
jmp    18a3 <plotBasicQuadBezier+0x763>
movsd  -0x38(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <setPixel@plt>
movsd  -0x58(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0x80c(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
ucomisd -0x48(%rbp),%xmm0
jb     184a <plotBasicQuadBezier+0x70a>
mov    -0x4(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    1815 <plotBasicQuadBezier+0x6d5>
jmp    18a3 <plotBasicQuadBezier+0x763>
mov    -0x1c(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
movsd  -0x38(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x30(%rbp),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x60(%rbp),%xmm0
jb     189e <plotBasicQuadBezier+0x75e>
mov    -0x8(%rbp),%eax
cmp    -0x18(%rbp),%eax
jne    1869 <plotBasicQuadBezier+0x729>
jmp    18a3 <plotBasicQuadBezier+0x763>
mov    -0x20(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
movsd  -0x38(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x28(%rbp),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    17b3 <plotBasicQuadBezier+0x673>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plotBasicQuadBezier>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %r9d,%r13d
mov    %r8d,%r15d
mov    %ecx,%ebp
mov    %edx,%ebx
mov    %esi,%r12d
mov    %edi,%r14d
mov    %r9d,(%rsp)
lea    0xed7(%rip),%rdi
mov    %r14d,%esi
mov    %r12d,%edx
mov    %ebx,%ecx
mov    %ebp,%r8d
mov    %r15d,%r9d
call   1030 <printf@plt>
mov    %rbx,%r10
mov    %rbp,%r9
xor    %eax,%eax
mov    %r15d,%esi
sub    %r14d,%esi
setg   %al
lea    (%rax,%rax,1),%ebx
add    $0xffffffff,%ebx
xor    %eax,%eax
mov    %r13d,%edi
sub    %r12d,%edi
setg   %al
lea    (%rax,%rax,1),%ebp
add    $0xffffffff,%ebp
lea    0x0(%r13,%r12,1),%r8d
mov    %r8d,%edx
sub    %r9d,%edx
sub    %r9d,%edx
cvtsi2sd %edx,%xmm9
lea    (%r15,%r14,1),%ecx
movd   %r15d,%xmm0
movd   %r13d,%xmm10
punpckldq %xmm0,%xmm10
movd   %r14d,%xmm0
movd   %r12d,%xmm5
punpckldq %xmm0,%xmm5
movdqa %xmm5,%xmm2
punpcklqdq %xmm10,%xmm2
movd   %r9d,%xmm0
movd   %r10d,%xmm1
punpckldq %xmm1,%xmm0
pshufd $0x44,%xmm0,%xmm0
psubd  %xmm0,%xmm2
movdqa %xmm2,%xmm0
psrad  $0x1f,%xmm0
paddd  %xmm0,%xmm2
pxor   %xmm0,%xmm2
shufps $0xf4,%xmm2,%xmm1
movaps %xmm2,%xmm3
shufps $0x21,%xmm1,%xmm3
paddd  %xmm3,%xmm3
pxor   %xmm0,%xmm0
psubd  %xmm3,%xmm0
movd   %ecx,%xmm1
movdqa 0xde4(%rip),%xmm4
por    %xmm4,%xmm0
shufps $0x0,%xmm1,%xmm4
psubd  %xmm3,%xmm4
shufps $0x23,%xmm0,%xmm4
shufps $0xe2,%xmm4,%xmm4
cvtdq2pd %xmm4,%xmm3
movapd %xmm3,%xmm15
unpckhpd %xmm3,%xmm15
mov    %ebp,%eax
imul   %ebx,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
xorps  %xmm4,%xmm4
cvtsi2sd %edi,%xmm4
cvtsi2sd %esi,%xmm7
mulsd  %xmm9,%xmm7
mulsd  %xmm15,%xmm4
subsd  %xmm7,%xmm4
mulsd  %xmm1,%xmm4
mulsd  0xdb1(%rip),%xmm4
xorpd  %xmm8,%xmm8
ucomisd %xmm8,%xmm4
jne    128e <plotBasicQuadBezier+0x15e>
jp     128e <plotBasicQuadBezier+0x15e>
mov    %r14d,%edi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %r13d,%ecx
jmp    1554 <plotBasicQuadBezier+0x424>
mov    %r13,0x18(%rsp)
cvtdq2pd %xmm0,%xmm0
movapd %xmm15,%xmm14
addsd  %xmm15,%xmm14
movapd %xmm14,%xmm1
cvtsi2sd %ebx,%xmm6
mulsd  %xmm9,%xmm1
mulsd  %xmm1,%xmm6
mov    %ebp,%edi
xorps  %xmm7,%xmm7
cvtsi2sd %ebp,%xmm7
mulsd  %xmm6,%xmm7
movapd %xmm4,%xmm1
addsd  %xmm4,%xmm1
psubd  %xmm10,%xmm5
movdqa %xmm5,%xmm6
psrad  $0x1f,%xmm6
paddd  %xmm6,%xmm5
pxor   %xmm6,%xmm5
cvtdq2pd %xmm5,%xmm10
movapd 0xd24(%rip),%xmm13
pshufd $0xee,%xmm2,%xmm11
movd   %xmm11,%eax
add    %eax,%eax
mov    $0x1,%esi
sub    %eax,%esi
cvtsi2sd %esi,%xmm12
movapd %xmm9,%xmm6
unpcklpd %xmm12,%xmm6
mulpd  %xmm3,%xmm6
cvtsi2sd %edx,%xmm3
xorpd  %xmm1,%xmm13
mulpd  %xmm3,%xmm0
cvtdq2pd %xmm2,%xmm12
cvtdq2pd %xmm11,%xmm2
movapd %xmm7,%xmm5
unpcklpd %xmm7,%xmm5
mulpd  %xmm5,%xmm2
mulpd  %xmm12,%xmm5
mulpd  %xmm3,%xmm0
addpd  %xmm5,%xmm0
mulpd  %xmm6,%xmm3
addpd  %xmm2,%xmm3
movapd %xmm13,%xmm5
unpcklpd %xmm1,%xmm5
unpcklpd %xmm13,%xmm1
mulpd  %xmm10,%xmm1
addpd  %xmm3,%xmm1
mulpd  %xmm10,%xmm5
addpd  %xmm0,%xmm5
mulsd  %xmm15,%xmm14
movapd %xmm9,%xmm0
addsd  %xmm9,%xmm0
mulsd  %xmm9,%xmm0
ucomisd %xmm4,%xmm8
jbe    13b4 <plotBasicQuadBezier+0x284>
movapd %xmm0,%xmm2
movapd 0xc7e(%rip),%xmm0
xorpd  %xmm0,%xmm14
movapd %xmm14,0x30(%rsp)
xorpd  %xmm0,%xmm7
xorpd  %xmm0,%xmm2
xorpd  %xmm0,%xmm5
xorpd  %xmm0,%xmm1
movapd %xmm2,%xmm0
jmp    13bb <plotBasicQuadBezier+0x28b>
movapd %xmm14,0x30(%rsp)
movapd 0xc4d(%rip),%xmm2
movapd %xmm0,0x60(%rsp)
xorpd  %xmm0,%xmm2
ucomisd %xmm2,%xmm5
jae    1502 <plotBasicQuadBezier+0x3d2>
movapd 0xc31(%rip),%xmm0
xorpd  0x30(%rsp),%xmm0
movapd %xmm5,%xmm3
unpckhpd %xmm5,%xmm3
ucomisd %xmm3,%xmm0
jae    1502 <plotBasicQuadBezier+0x3d2>
ucomisd %xmm1,%xmm2
jae    1502 <plotBasicQuadBezier+0x3d2>
unpckhpd %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jae    1502 <plotBasicQuadBezier+0x3d2>
subsd  %xmm7,%xmm5
movapd %xmm5,0x20(%rsp)
addsd  %xmm3,%xmm5
movsd  %xmm5,0x10(%rsp)
subsd  %xmm7,%xmm3
mov    %edi,%r13d
mov    0x18(%rsp),%rbp
movapd %xmm7,0x40(%rsp)
jmp    1462 <plotBasicQuadBezier+0x332>
nopw   0x0(%rax,%rax,1)
movapd 0x50(%rsp),%xmm3
movapd %xmm3,%xmm0
movapd 0x40(%rsp),%xmm7
subsd  %xmm3,%xmm1
xorpd  %xmm2,%xmm2
ucomisd %xmm1,%xmm2
movapd %xmm0,%xmm3
jae    14c7 <plotBasicQuadBezier+0x397>
movapd %xmm3,0x50(%rsp)
mov    %r14d,%edi
mov    %r12d,%esi
call   1040 <setPixel@plt>
movsd  0x10(%rsp),%xmm1
addsd  %xmm1,%xmm1
movapd 0x20(%rsp),%xmm2
ucomisd %xmm2,%xmm1
jb     1440 <plotBasicQuadBezier+0x310>
cmp    %r15d,%r14d
movapd 0x40(%rsp),%xmm7
movapd 0x50(%rsp),%xmm3
je     1567 <plotBasicQuadBezier+0x437>
add    %ebx,%r14d
movapd %xmm3,%xmm0
subsd  %xmm7,%xmm0
addsd  0x60(%rsp),%xmm2
movapd %xmm2,0x20(%rsp)
movsd  0x10(%rsp),%xmm4
addsd  %xmm2,%xmm4
movsd  %xmm4,0x10(%rsp)
jmp    1450 <plotBasicQuadBezier+0x320>
cmp    %ebp,%r12d
movapd 0x20(%rsp),%xmm1
je     1567 <plotBasicQuadBezier+0x437>
add    %r13d,%r12d
subsd  %xmm7,%xmm1
movapd %xmm1,0x20(%rsp)
addsd  0x30(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movapd %xmm0,%xmm3
jmp    1462 <plotBasicQuadBezier+0x332>
lea    (%rcx,%r10,4),%eax
cltq
imul   $0x2aaaaaab,%rax,%r13
mov    %r13,%rax
shr    $0x3f,%rax
shr    $0x20,%r13
add    %eax,%r13d
lea    (%r8,%r9,4),%eax
cltq
imul   $0x2aaaaaab,%rax,%rbp
mov    %rbp,%rax
shr    $0x3f,%rax
shr    $0x20,%rbp
add    %eax,%ebp
mov    %r14d,%edi
mov    %r12d,%esi
mov    %r13d,%edx
mov    %ebp,%ecx
call   1050 <plotLine@plt>
mov    %r13d,%edi
mov    %ebp,%esi
mov    %r15d,%edx
mov    0x18(%rsp),%rcx
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <plotLine@plt>
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [41 x i8] c"P0 = %d, %d; P1 = %d, %d; P2 = %d, %d\0A\00"
define void @plotBasicQuadBezier(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5)
%8 = icmp sgt i32 %4, %0
%9 = select i1 %8, i32 1, i32 -1
%10 = icmp sgt i32 %5, %1
%11 = select i1 %10, i32 1, i32 -1
%12 = add i32 %4, %0
%13 = mul i32 %3, -2
%14 = add i32 %5, %1
%15 = add i32 %14, %13
%16 = sitofp i32 %15 to double
%17 = insertelement <4 x i32> poison, i32 %1, i64 0
%18 = insertelement <4 x i32> %17, i32 %0, i64 1
%19 = insertelement <4 x i32> %18, i32 %5, i64 2
%20 = insertelement <4 x i32> %19, i32 %4, i64 3
%21 = insertelement <4 x i32> poison, i32 %3, i64 0
%22 = insertelement <4 x i32> %21, i32 %2, i64 1
%23 = shufflevector <4 x i32> %22, <4 x i32> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
%24 = sub nsw <4 x i32> %20, %23
%25 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %24, i1 true)
%26 = insertelement <4 x i32> poison, i32 %2, i64 3
%27 = shufflevector <4 x i32> %26, <4 x i32> %25, <4 x i32> <i32 5, i32 4, i32 7, i32 3>
%28 = mul <4 x i32> %27, <i32 -2, i32 -2, i32 -2, i32 -2>
%29 = insertelement <4 x i32> <i32 1, i32 1, i32 1, i32 poison>, i32 %12, i64 3
%30 = or <4 x i32> %29, %28
%31 = add <4 x i32> %29, %28
%32 = shufflevector <4 x i32> %30, <4 x i32> %31, <4 x i32> <i32 0, i32 1, i32 2, i32 7>
%33 = sitofp <4 x i32> %32 to <4 x double>
%34 = extractelement <4 x double> %33, i64 3
%35 = fmul double %34, 2.000000e+00
%36 = fmul double %35, %16
%37 = sitofp i32 %9 to double
%38 = fmul double %36, %37
%39 = sitofp i32 %11 to double
%40 = fmul double %38, %39
%41 = mul nsw i32 %11, %9
%42 = sitofp i32 %41 to double
%43 = sub nsw i32 %5, %1
%44 = sitofp i32 %43 to double
%45 = sub nsw i32 %4, %0
%46 = sitofp i32 %45 to double
%47 = fneg double %16
%48 = fmul double %46, %47
%49 = tail call double @llvm.fmuladd.f64(double %34, double %44, double %48)
%50 = fmul double %49, %42
%51 = fmul double %50, 5.000000e-01
%52 = fmul double %51, 2.000000e+00
%53 = fneg double %52
%54 = insertelement <2 x i32> poison, i32 %1, i64 0
%55 = insertelement <2 x i32> %54, i32 %0, i64 1
%56 = insertelement <2 x i32> poison, i32 %5, i64 0
%57 = insertelement <2 x i32> %56, i32 %4, i64 1
%58 = sub nsw <2 x i32> %55, %57
%59 = call <2 x i32> @llvm.abs.v2i32(<2 x i32> %58, i1 true)
%60 = sitofp <2 x i32> %59 to <2 x double>
%61 = shufflevector <2 x double> %60, <2 x double> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
%62 = extractelement <4 x i32> %25, i64 2
%63 = mul i32 %62, -2
%64 = or i32 %63, 1
%65 = sitofp i32 %64 to double
%66 = insertelement <4 x double> poison, double %16, i64 0
%67 = shufflevector <4 x double> %66, <4 x double> %33, <4 x i32> <i32 0, i32 7, i32 undef, i32 undef>
%68 = insertelement <4 x double> %67, double %16, i64 2
%69 = insertelement <4 x double> %68, double %65, i64 3
%70 = fmul <4 x double> %69, %33
%71 = sitofp <4 x i32> %25 to <4 x double>
%72 = insertelement <4 x double> poison, double %40, i64 0
%73 = shufflevector <4 x double> %72, <4 x double> poison, <4 x i32> zeroinitializer
%74 = fmul <4 x double> %73, %71
%75 = shufflevector <4 x double> %67, <4 x double> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
%76 = call <4 x double> @llvm.fmuladd.v4f64(<4 x double> %70, <4 x double> %75, <4 x double> %74)
%77 = insertelement <4 x double> poison, double %53, i64 0
%78 = insertelement <4 x double> %77, double %52, i64 1
%79 = shufflevector <4 x double> %78, <4 x double> poison, <4 x i32> <i32 0, i32 1, i32 1, i32 0>
%80 = call <4 x double> @llvm.fmuladd.v4f64(<4 x double> %79, <4 x double> %61, <4 x double> %76)
%81 = fcmp oeq double %51, 0.000000e+00
br i1 %81, label %82, label %84
82: ; preds = %6
%83 = tail call i32 @plotLine(i32 %0, i32 %1, i32 %4, i32 %5)
br label %161
84: ; preds = %6
%85 = fmul double %35, %34
%86 = fmul double %16, 2.000000e+00
%87 = fmul double %86, %16
%88 = fcmp olt double %51, 0.000000e+00
br i1 %88, label %89, label %94
89: ; preds = %84
%90 = fneg double %85
%91 = fneg double %40
%92 = fneg double %87
%93 = fneg <4 x double> %80
br label %94
94: ; preds = %89, %84
%95 = phi double [ %90, %89 ], [ %85, %84 ]
%96 = phi double [ %92, %89 ], [ %87, %84 ]
%97 = phi double [ %91, %89 ], [ %40, %84 ]
%98 = phi <4 x double> [ %93, %89 ], [ %80, %84 ]
%99 = fneg double %96
%100 = extractelement <4 x double> %98, i64 0
%101 = fcmp ult double %100, %99
br i1 %101, label %102, label %112
102: ; preds = %94
%103 = fneg double %95
%104 = extractelement <4 x double> %98, i64 1
%105 = fcmp ugt double %104, %103
%106 = extractelement <4 x double> %98, i64 2
%107 = fcmp ugt double %106, %99
%108 = select i1 %105, i1 %107, i1 false
%109 = extractelement <4 x double> %98, i64 3
%110 = fcmp ult double %109, %103
%111 = select i1 %108, i1 %110, i1 false
br i1 %111, label %121, label %112
112: ; preds = %102, %94
%113 = shl nsw i32 %2, 2
%114 = add i32 %12, %113
%115 = sdiv i32 %114, 6
%116 = shl nsw i32 %3, 2
%117 = add i32 %14, %116
%118 = sdiv i32 %117, 6
%119 = tail call i32 @plotLine(i32 %0, i32 %1, i32 %115, i32 %118)
%120 = tail call i32 @plotLine(i32 %115, i32 %118, i32 %4, i32 %5)
br label %161
121: ; preds = %102
%122 = fsub double %100, %97
%123 = fadd double %122, %104
%124 = fsub double %104, %97
br label %125
125: ; preds = %156, %121
%126 = phi i32 [ %157, %156 ], [ %1, %121 ]
%127 = phi i32 [ %149, %156 ], [ %0, %121 ]
%128 = phi double [ %158, %156 ], [ %122, %121 ]
%129 = phi double [ %159, %156 ], [ %124, %121 ]
%130 = phi double [ %160, %156 ], [ %123, %121 ]
br label %131
131: ; preds = %125, %148
%132 = phi i32 [ %149, %148 ], [ %127, %125 ]
%133 = phi double [ %150, %148 ], [ %128, %125 ]
%134 = phi double [ %151, %148 ], [ %129, %125 ]
%135 = phi double [ %152, %148 ], [ %130, %125 ]
%136 = tail call i32 @setPixel(i32 %132, i32 %126)
%137 = fneg double %134
%138 = tail call double @llvm.fmuladd.f64(double %135, double 2.000000e+00, double %137)
%139 = fmul double %135, 2.000000e+00
%140 = fcmp ult double %139, %133
br i1 %140, label %148, label %141
141: ; preds = %131
%142 = icmp eq i32 %132, %4
br i1 %142, label %161, label %143
143: ; preds = %141
%144 = add nsw i32 %132, %9
%145 = fsub double %134, %97
%146 = fadd double %96, %133
%147 = fadd double %146, %135
br label %148
148: ; preds = %143, %131
%149 = phi i32 [ %144, %143 ], [ %132, %131 ]
%150 = phi double [ %146, %143 ], [ %133, %131 ]
%151 = phi double [ %145, %143 ], [ %134, %131 ]
%152 = phi double [ %147, %143 ], [ %135, %131 ]
%153 = fcmp ugt double %138, 0.000000e+00
br i1 %153, label %131, label %154
154: ; preds = %148
%155 = icmp eq i32 %126, %5
br i1 %155, label %161, label %156
156: ; preds = %154
%157 = add nsw i32 %126, %11
%158 = fsub double %150, %97
%159 = fadd double %95, %151
%160 = fadd double %152, %159
br label %125
161: ; preds = %141, %154, %112, %82
ret void
}