#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 */
double fabs(double);
int floor(double);
void make_lookup_poly_grad(double coord, int q, int dim, int *d1, double *table,
                           double *dtable, double **ptpend) {
  register int d2, fcoord;
  register int k, m;
  register double *tp, *dtp, *tpend, *p, num, dnum, x, dx;
  static int oq = 0, k0, k1;
  static double denom[256];
  coord--;
  if (q != oq) {
    double v;
    oq = q;
    if (q % 2) {
      k0 = -(q - 1) / 2;
      k1 = (q - 1) / 2;
    } else {
      k0 = -(q - 2) / 2;
      k1 = q / 2;
    }
    for (k = k0, p = denom; k <= k1; k++, p++) {
      v = 1.0;
      for (m = k0; m < k; m++)
        v = v * (k - m);
      for (m = k + 1; m <= k1; m++)
        v = v * (k - m);
      *p = v;
    }
  }
  fcoord = floor(q % 2 ? coord + 0.5 : coord);
  *d1 = fcoord + k0;
  if (*d1 >= 0) {
    p = denom;
    k = k0;
  } else {
    p = denom - (*d1);
    k = k0 - (*d1);
    *d1 = 0;
  }
  d2 = fcoord + k1;
  if (d2 >= dim)
    d2 = dim - 1;
  *ptpend = tpend = table + (d2 - *d1);
  tp = table;
  dtp = dtable;
  if (tp < tpend) {
    x = coord - fcoord;
    dx = x + 0.00001;
    if (fabs(x) > 0.0001) {
      num = 1.0;
      dnum = 1.0;
      for (m = k0; m < k; m++) {
        num = num * (x - m);
        dnum = dnum * (dx - m);
      }
      for (m = k + 1; m <= k1; m++) {
        num = num * (x - m);
        dnum = dnum * (dx - m);
      }
      *(tp++) = num / (double)(*p);
      *(dtp++) = (dnum - num) / 0.00001 / (double)(*(p++));
      while (tp <= tpend) {
        k++;
        num = num * (x - k + 1) / (x - k);
        dnum = dnum * (dx - k + 1) / (dx - k);
        *(tp++) = num / (double)(*p);
        *(dtp++) = (dnum - num) / 0.00001 / (double)(*(p++));
      }
    } else {
      while (tp <= tpend) {
        num = 1.0;
        dnum = 1.0;
        for (m = k0; m < k; m++) {
          num = num * (x - m);
          dnum = dnum * (dx - m);
        }
        for (m = k + 1; m <= k1; m++) {
          num = num * (x - m);
          dnum = dnum * (dx - m);
        }
        *(tp++) = num / (double)(*p);
        *(dtp++) = (dnum - num) / 0.00001 / (double)(*(p++));
        k++;
      }
    }
  }
}


x86 assembly (clang, -O0):
<make_lookup_poly_grad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movsd  0xec2(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    -0xc(%rbp),%eax
cmp    0x2eef(%rip),%eax
je     12b5 <make_lookup_poly_grad+0x1a5>
mov    -0xc(%rbp),%eax
mov    %eax,0x2ee0(%rip)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11a5 <make_lookup_poly_grad+0x95>
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,0x2eb8(%rip)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,0x2ea8(%rip)
jmp    11ce <make_lookup_poly_grad+0xbe>
mov    -0xc(%rbp),%ecx
sub    $0x2,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,0x2e87(%rip)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,0x2e7a(%rip)
mov    0x2e70(%rip),%eax
mov    %eax,-0x3c(%rbp)
lea    0x2e72(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    -0x3c(%rbp),%eax
cmp    0x2e5d(%rip),%eax
jg     12b0 <make_lookup_poly_grad+0x1a0>
movsd  0xe27(%rip),%xmm0
movsd  %xmm0,-0x88(%rbp)
mov    0x2e3d(%rip),%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1242 <make_lookup_poly_grad+0x132>
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x3c(%rbp),%eax
sub    -0x40(%rbp),%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    120a <make_lookup_poly_grad+0xfa>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    0x2df4(%rip),%eax
jg     1286 <make_lookup_poly_grad+0x176>
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x3c(%rbp),%eax
sub    -0x40(%rbp),%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    124b <make_lookup_poly_grad+0x13b>
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x60(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x60(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x60(%rbp)
jmp    11e2 <make_lookup_poly_grad+0xd2>
jmp    12b5 <make_lookup_poly_grad+0x1a5>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     12e3 <make_lookup_poly_grad+0x1d3>
movsd  0xd37(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    12f0 <make_lookup_poly_grad+0x1e0>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
call   1030 <floor@plt>
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%ecx
add    0x2d3b(%rip),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
cmpl   $0x0,(%rax)
jl     1335 <make_lookup_poly_grad+0x225>
lea    0x2d2d(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0x2d17(%rip),%eax
mov    %eax,-0x3c(%rbp)
jmp    136c <make_lookup_poly_grad+0x25c>
mov    -0x18(%rbp),%rax
movslq (%rax),%rax
xor    %ecx,%ecx
sub    %rax,%rcx
lea    0x2d08(%rip),%rax
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    0x2ceb(%rip),%eax
mov    -0x18(%rbp),%rcx
sub    (%rcx),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x38(%rbp),%eax
add    0x2cd3(%rip),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     138d <make_lookup_poly_grad+0x27d>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x34(%rbp),%eax
mov    -0x18(%rbp),%rdx
sub    (%rdx),%eax
cltq
shl    $0x3,%rax
add    %rax,%rcx
mov    %rcx,-0x58(%rbp)
mov    -0x30(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x48(%rbp),%rax
cmp    -0x58(%rbp),%rax
jae    178d <make_lookup_poly_grad+0x67d>
movsd  -0x8(%rbp),%xmm0
cvtsi2sdl -0x38(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xc31(%rip),%xmm0
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x78(%rbp),%xmm0
movaps 0xc33(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xc07(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1633 <make_lookup_poly_grad+0x523>
movsd  0xc05(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xbf8(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    0x2c11(%rip),%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1488 <make_lookup_poly_grad+0x378>
movsd  -0x68(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
cvtsi2sdl -0x40(%rbp),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
cvtsi2sdl -0x40(%rbp),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1436 <make_lookup_poly_grad+0x326>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    0x2bae(%rip),%eax
jg     14e6 <make_lookup_poly_grad+0x3d6>
movsd  -0x68(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
cvtsi2sdl -0x40(%rbp),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
cvtsi2sdl -0x40(%rbp),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1491 <make_lookup_poly_grad+0x381>
movsd  -0x68(%rbp),%xmm0
mov    -0x60(%rbp),%rax
divsd  (%rax),%xmm0
mov    -0x48(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x48(%rbp)
movsd  %xmm0,(%rax)
movsd  -0x70(%rbp),%xmm0
subsd  -0x68(%rbp),%xmm0
movsd  0xb00(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x60(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x60(%rbp)
divsd  (%rax),%xmm0
mov    -0x50(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x50(%rbp)
movsd  %xmm0,(%rax)
mov    -0x48(%rbp),%rax
cmp    -0x58(%rbp),%rax
ja     162e <make_lookup_poly_grad+0x51e>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
cvtsi2sdl -0x3c(%rbp),%xmm2
subsd  %xmm2,%xmm1
movsd  0xaac(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x78(%rbp),%xmm1
cvtsi2sdl -0x3c(%rbp),%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
cvtsi2sdl -0x3c(%rbp),%xmm2
subsd  %xmm2,%xmm1
movsd  0xa72(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x80(%rbp),%xmm1
cvtsi2sdl -0x3c(%rbp),%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x68(%rbp),%xmm0
mov    -0x60(%rbp),%rax
divsd  (%rax),%xmm0
mov    -0x48(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x48(%rbp)
movsd  %xmm0,(%rax)
movsd  -0x70(%rbp),%xmm0
subsd  -0x68(%rbp),%xmm0
movsd  0xa19(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x60(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x60(%rbp)
divsd  (%rax),%xmm0
mov    -0x50(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x50(%rbp)
movsd  %xmm0,(%rax)
jmp    1542 <make_lookup_poly_grad+0x432>
jmp    1788 <make_lookup_poly_grad+0x678>
jmp    1638 <make_lookup_poly_grad+0x528>
mov    -0x48(%rbp),%rax
cmp    -0x58(%rbp),%rax
ja     1783 <make_lookup_poly_grad+0x673>
movsd  0x9d2(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0x9c5(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    0x29de(%rip),%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    16bb <make_lookup_poly_grad+0x5ab>
movsd  -0x68(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
cvtsi2sdl -0x40(%rbp),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
cvtsi2sdl -0x40(%rbp),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1669 <make_lookup_poly_grad+0x559>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    0x297b(%rip),%eax
jg     1719 <make_lookup_poly_grad+0x609>
movsd  -0x68(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
cvtsi2sdl -0x40(%rbp),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
cvtsi2sdl -0x40(%rbp),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    16c4 <make_lookup_poly_grad+0x5b4>
movsd  -0x68(%rbp),%xmm0
mov    -0x60(%rbp),%rax
divsd  (%rax),%xmm0
mov    -0x48(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x48(%rbp)
movsd  %xmm0,(%rax)
movsd  -0x70(%rbp),%xmm0
subsd  -0x68(%rbp),%xmm0
movsd  0x8cd(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x60(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x60(%rbp)
divsd  (%rax),%xmm0
mov    -0x50(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x50(%rbp)
movsd  %xmm0,(%rax)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1638 <make_lookup_poly_grad+0x528>
jmp    1788 <make_lookup_poly_grad+0x678>
jmp    178d <make_lookup_poly_grad+0x67d>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_lookup_poly_grad>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r9,%rbx
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,0x8(%rsp)
mov    %esi,%r12d
movapd %xmm0,%xmm3
cmp    %edi,0x2f07(%rip)
jne    1146 <make_lookup_poly_grad+0x36>
and    $0x1,%edi
mov    %edi,%r8d
jmp    12ad <make_lookup_poly_grad+0x19d>
mov    %edi,0x2ef4(%rip)
xor    %eax,%eax
mov    %edi,%r8d
and    $0x1,%r8d
sete   %al
sub    %edi,%eax
mov    %eax,%ecx
add    $0x1,%ecx
shr    $0x1f,%ecx
lea    (%rax,%rcx,1),%r9d
add    $0x1,%r9d
sar    %r9d
mov    %r9d,0x2ed0(%rip)
sar    %edi
mov    %edi,0x2ecc(%rip)
cmp    %edi,%r9d
jg     12ad <make_lookup_poly_grad+0x19d>
mov    %rbx,%r13
lea    -0x1(%r9),%r11d
lea    0x2ebd(%rip),%rsi
xor    %ebx,%ebx
movsd  0xe6b(%rip),%xmm0
mov    %r9d,%ecx
jmp    11cc <make_lookup_poly_grad+0xbc>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0x1(%rcx),%eax
movsd  %xmm1,(%rsi)
add    $0x8,%rsi
add    $0x1,%ebx
add    $0x1,%r11d
cmp    %edi,%ecx
mov    %eax,%ecx
je     12aa <make_lookup_poly_grad+0x19a>
movapd %xmm0,%xmm1
cmp    %r9d,%ecx
jle    127b <make_lookup_poly_grad+0x16b>
lea    -0x1(%rbx),%r10d
movapd %xmm0,%xmm1
mov    %r9d,%eax
test   $0x3,%bl
je     121a <make_lookup_poly_grad+0x10a>
mov    %ebx,%eax
and    $0x3,%eax
neg    %eax
xor    %ebp,%ebp
movapd %xmm0,%xmm1
cs nopw 0x0(%rax,%rax,1)
lea    (%rbx,%rbp,1),%edx
xorps  %xmm2,%xmm2
cvtsi2sd %edx,%xmm2
mulsd  %xmm2,%xmm1
add    $0xffffffff,%ebp
cmp    %ebp,%eax
jne    1200 <make_lookup_poly_grad+0xf0>
mov    %r9d,%eax
sub    %ebp,%eax
cmp    $0x3,%r10d
jb     127b <make_lookup_poly_grad+0x16b>
neg    %eax
mov    %r11d,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
lea    (%rax,%rbp,1),%edx
add    $0x1,%edx
xorps  %xmm2,%xmm2
cvtsi2sd %edx,%xmm2
lea    (%rax,%rbp,1),%edx
mulsd  %xmm1,%xmm2
xorps  %xmm1,%xmm1
cvtsi2sd %edx,%xmm1
mulsd  %xmm2,%xmm1
lea    -0x1(%rax,%rbp,1),%edx
xorps  %xmm2,%xmm2
cvtsi2sd %edx,%xmm2
mulsd  %xmm1,%xmm2
lea    -0x2(%rax,%rbp,1),%edx
xorps  %xmm1,%xmm1
cvtsi2sd %edx,%xmm1
mulsd  %xmm2,%xmm1
lea    (%rax,%rbp,1),%edx
add    $0xfffffffc,%edx
add    $0xfffffffc,%ebp
cmp    $0xffffffff,%edx
jne    1230 <make_lookup_poly_grad+0x120>
cmp    %edi,%ecx
jge    11b0 <make_lookup_poly_grad+0xa0>
mov    $0xffffffff,%eax
mov    %ecx,%ebp
nopw   0x0(%rax,%rax,1)
xorps  %xmm2,%xmm2
cvtsi2sd %eax,%xmm2
mulsd  %xmm2,%xmm1
add    $0x1,%ebp
add    $0xffffffff,%eax
cmp    %edi,%ebp
jl     1290 <make_lookup_poly_grad+0x180>
jmp    11b0 <make_lookup_poly_grad+0xa0>
mov    %r13,%rbx
addsd  0xd4b(%rip),%xmm3
movapd %xmm3,%xmm0
test   %r8d,%r8d
je     12ca <make_lookup_poly_grad+0x1ba>
movsd  0xd4a(%rip),%xmm0
addsd  %xmm3,%xmm0
movapd %xmm3,0x10(%rsp)
call   1030 <floor@plt>
movapd 0x10(%rsp),%xmm5
mov    0x2d63(%rip),%ebp
lea    (%rax,%rbp,1),%ecx
movslq %ecx,%rdx
lea    0x0(,%rdx,8),%rsi
lea    0x2d5a(%rip),%rdi
mov    %rdi,%rcx
sub    %rsi,%rcx
mov    %eax,%r13d
neg    %r13d
xor    %esi,%esi
test   %edx,%edx
cmovns %edx,%esi
cmovns %ebp,%r13d
cmovns %rdi,%rcx
mov    0x8(%rsp),%rdx
mov    %esi,(%rdx)
mov    0x2d2a(%rip),%edi
lea    (%rdi,%rax,1),%edx
lea    -0x1(%r12),%r9d
cmp    %r12d,%edx
cmovl  %edx,%r9d
sub    %esi,%r9d
movslq %r9d,%rdx
lea    (%r15,%rdx,8),%r8
mov    %r8,(%rbx)
test   %edx,%edx
jle    1790 <make_lookup_poly_grad+0x680>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
subsd  %xmm0,%xmm5
movsd  0xcc3(%rip),%xmm0
addsd  %xmm5,%xmm0
movapd 0xccf(%rip),%xmm1
andpd  %xmm5,%xmm1
ucomisd 0xcb3(%rip),%xmm1
jbe    13cd <make_lookup_poly_grad+0x2bd>
mov    %r13d,%edx
sub    %ebp,%edx
jle    1553 <make_lookup_poly_grad+0x443>
mov    %ebp,%eax
not    %eax
add    %r13d,%eax
and    $0x3,%edx
je     1560 <make_lookup_poly_grad+0x450>
movapd %xmm0,%xmm2
unpcklpd %xmm5,%xmm2
movapd 0xca6(%rip),%xmm1
nopw   0x0(%rax,%rax,1)
xorps  %xmm3,%xmm3
cvtsi2sd %ebp,%xmm3
unpcklpd %xmm3,%xmm3
movapd %xmm2,%xmm4
subpd  %xmm3,%xmm4
mulpd  %xmm4,%xmm1
add    $0x1,%ebp
add    $0xffffffff,%edx
jne    13a0 <make_lookup_poly_grad+0x290>
cmp    $0x3,%eax
jae    1571 <make_lookup_poly_grad+0x461>
jmp    15ed <make_lookup_poly_grad+0x4dd>
mov    %r13d,%r9d
sub    %ebp,%r9d
mov    %ebp,%r10d
not    %r10d
add    %r13d,%r10d
unpcklpd %xmm0,%xmm5
mov    %r13d,%ebx
sub    %bpl,%bl
xor    %eax,%eax
movapd 0xc50(%rip),%xmm0
movsd  0xc20(%rip),%xmm1
jmp    1449 <make_lookup_poly_grad+0x339>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r13d
movsd  (%rcx),%xmm3
movapd %xmm2,%xmm4
divsd  %xmm3,%xmm4
movsd  %xmm4,(%r15)
add    $0x8,%r15
movapd %xmm2,%xmm3
unpckhpd %xmm2,%xmm3
subsd  %xmm2,%xmm3
divsd  %xmm1,%xmm3
divsd  (%rcx),%xmm3
add    $0x8,%rcx
movsd  %xmm3,(%r14)
add    $0x8,%r14
add    $0x1,%eax
add    $0x1,%bl
cmp    %r8,%r15
ja     1790 <make_lookup_poly_grad+0x680>
movzbl %bl,%ebx
and    $0x3,%ebx
movapd %xmm0,%xmm2
cmp    %r13d,%ebp
jge    151d <make_lookup_poly_grad+0x40d>
lea    (%r10,%rax,1),%r11d
lea    (%r9,%rax,1),%esi
mov    %ebp,%edx
movapd %xmm0,%xmm2
test   $0x3,%sil
je     149f <make_lookup_poly_grad+0x38f>
mov    %ebx,%esi
mov    %ebp,%edx
movapd %xmm0,%xmm2
nopl   0x0(%rax,%rax,1)
xorps  %xmm3,%xmm3
cvtsi2sd %edx,%xmm3
unpcklpd %xmm3,%xmm3
movapd %xmm5,%xmm4
subpd  %xmm3,%xmm4
mulpd  %xmm4,%xmm2
add    $0x1,%edx
add    $0xffffffff,%esi
jne    1480 <make_lookup_poly_grad+0x370>
cmp    $0x3,%r11d
jb     151d <make_lookup_poly_grad+0x40d>
cs nopw 0x0(%rax,%rax,1)
nop
xorps  %xmm3,%xmm3
cvtsi2sd %edx,%xmm3
unpcklpd %xmm3,%xmm3
movapd %xmm5,%xmm4
subpd  %xmm3,%xmm4
mulpd  %xmm2,%xmm4
lea    0x1(%rdx),%esi
xorps  %xmm2,%xmm2
cvtsi2sd %esi,%xmm2
unpcklpd %xmm2,%xmm2
movapd %xmm5,%xmm3
subpd  %xmm2,%xmm3
lea    0x2(%rdx),%esi
xorps  %xmm2,%xmm2
cvtsi2sd %esi,%xmm2
mulpd  %xmm4,%xmm3
unpcklpd %xmm2,%xmm2
movapd %xmm5,%xmm4
subpd  %xmm2,%xmm4
mulpd  %xmm3,%xmm4
lea    0x3(%rdx),%esi
xorps  %xmm3,%xmm3
cvtsi2sd %esi,%xmm3
unpcklpd %xmm3,%xmm3
movapd %xmm5,%xmm2
subpd  %xmm3,%xmm2
mulpd  %xmm4,%xmm2
add    $0x4,%edx
cmp    %r13d,%edx
jl     14b0 <make_lookup_poly_grad+0x3a0>
cmp    %edi,%r13d
jge    1400 <make_lookup_poly_grad+0x2f0>
mov    %r13d,%edx
nopl   0x0(%rax)
add    $0x1,%edx
xorps  %xmm3,%xmm3
cvtsi2sd %edx,%xmm3
unpcklpd %xmm3,%xmm3
movapd %xmm5,%xmm4
subpd  %xmm3,%xmm4
mulpd  %xmm4,%xmm2
cmp    %edi,%edx
jl     1530 <make_lookup_poly_grad+0x420>
jmp    1400 <make_lookup_poly_grad+0x2f0>
movapd 0xae5(%rip),%xmm1
jmp    15ed <make_lookup_poly_grad+0x4dd>
movapd 0xad8(%rip),%xmm1
cmp    $0x3,%eax
jb     15ed <make_lookup_poly_grad+0x4dd>
movapd %xmm0,%xmm2
unpcklpd %xmm5,%xmm2
nopl   0x0(%rax)
xorps  %xmm3,%xmm3
cvtsi2sd %ebp,%xmm3
unpcklpd %xmm3,%xmm3
movapd %xmm2,%xmm4
subpd  %xmm3,%xmm4
mulpd  %xmm1,%xmm4
lea    0x1(%rbp),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
unpcklpd %xmm1,%xmm1
movapd %xmm2,%xmm3
subpd  %xmm1,%xmm3
lea    0x2(%rbp),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulpd  %xmm4,%xmm3
unpcklpd %xmm1,%xmm1
movapd %xmm2,%xmm4
subpd  %xmm1,%xmm4
mulpd  %xmm3,%xmm4
lea    0x3(%rbp),%eax
xorps  %xmm3,%xmm3
cvtsi2sd %eax,%xmm3
unpcklpd %xmm3,%xmm3
movapd %xmm2,%xmm1
subpd  %xmm3,%xmm1
mulpd  %xmm4,%xmm1
add    $0x4,%ebp
cmp    %r13d,%ebp
jne    1580 <make_lookup_poly_grad+0x470>
mov    %edi,%esi
sub    %r13d,%esi
jle    16d3 <make_lookup_poly_grad+0x5c3>
mov    %r13d,%edx
not    %edx
add    %edi,%edx
and    $0x3,%esi
je     1639 <make_lookup_poly_grad+0x529>
movapd %xmm0,%xmm2
unpcklpd %xmm5,%xmm2
mov    %r13d,%eax
nop
add    $0x1,%eax
xorps  %xmm3,%xmm3
cvtsi2sd %eax,%xmm3
unpcklpd %xmm3,%xmm3
movapd %xmm2,%xmm4
subpd  %xmm3,%xmm4
mulpd  %xmm4,%xmm1
add    $0xffffffff,%esi
jne    1610 <make_lookup_poly_grad+0x500>
cmp    $0x3,%edx
jae    1645 <make_lookup_poly_grad+0x535>
jmp    16d3 <make_lookup_poly_grad+0x5c3>
mov    %r13d,%eax
cmp    $0x3,%edx
jb     16d3 <make_lookup_poly_grad+0x5c3>
movapd %xmm0,%xmm2
unpcklpd %xmm5,%xmm2
neg    %edi
add    $0x2,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0x1(%rax),%edx
xorps  %xmm3,%xmm3
cvtsi2sd %edx,%xmm3
unpcklpd %xmm3,%xmm3
movapd %xmm2,%xmm4
subpd  %xmm3,%xmm4
mulpd  %xmm1,%xmm4
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
unpcklpd %xmm1,%xmm1
movapd %xmm2,%xmm3
subpd  %xmm1,%xmm3
mulpd  %xmm4,%xmm3
lea    0x1(%rax),%edx
xorps  %xmm1,%xmm1
cvtsi2sd %edx,%xmm1
unpcklpd %xmm1,%xmm1
movapd %xmm2,%xmm4
subpd  %xmm1,%xmm4
mulpd  %xmm3,%xmm4
lea    0x2(%rax),%edx
xorps  %xmm3,%xmm3
cvtsi2sd %edx,%xmm3
unpcklpd %xmm3,%xmm3
movapd %xmm2,%xmm1
subpd  %xmm3,%xmm1
mulpd  %xmm4,%xmm1
lea    (%rdi,%rax,1),%edx
add    $0x4,%edx
add    $0x4,%eax
cmp    $0x2,%edx
jne    1660 <make_lookup_poly_grad+0x550>
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
movsd  (%rcx),%xmm3
movapd %xmm1,%xmm4
subsd  %xmm2,%xmm4
divsd  %xmm3,%xmm2
movsd  %xmm2,(%r15)
divsd  0x920(%rip),%xmm4
divsd  (%rcx),%xmm4
movsd  %xmm4,(%r14)
test   %r9d,%r9d
jle    1790 <make_lookup_poly_grad+0x680>
add    $0x8,%r15
unpcklpd %xmm5,%xmm0
mov    %r13d,%eax
mov    $0x1,%edx
movapd 0x91e(%rip),%xmm2
movsd  0x8ee(%rip),%xmm3
nopw   0x0(%rax,%rax,1)
lea    (%rax,%rdx,1),%esi
xorps  %xmm4,%xmm4
cvtsi2sd %esi,%xmm4
unpcklpd %xmm4,%xmm4
movapd %xmm0,%xmm5
subpd  %xmm4,%xmm5
movapd %xmm5,%xmm4
addpd  %xmm2,%xmm4
mulpd  %xmm1,%xmm4
divpd  %xmm5,%xmm4
movapd %xmm4,%xmm5
movapd %xmm4,%xmm1
unpckhpd %xmm4,%xmm4
movsd  (%rcx,%rdx,8),%xmm6
subsd  %xmm4,%xmm5
divsd  %xmm6,%xmm4
movsd  %xmm4,(%r15)
divsd  %xmm3,%xmm5
divsd  (%rcx,%rdx,8),%xmm5
movsd  %xmm5,(%r14,%rdx,8)
add    $0x8,%r15
add    $0x1,%rdx
cmp    %r8,%r15
jbe    1730 <make_lookup_poly_grad+0x620>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@make_lookup_poly_grad.oq = internal unnamed_addr global i32 0
@make_lookup_poly_grad.k0 = internal unnamed_addr global i32 0
@make_lookup_poly_grad.k1 = internal unnamed_addr global i32 0
@make_lookup_poly_grad.denom = internal unnamed_addr global [256 x double] zeroinitializer
define void @make_lookup_poly_grad(double %0, i32 %1, i32 %2, i32* nocapture %3, double* %4, double* nocapture writeonly %5, double** nocapture writeonly %6) {
%8 = fadd double %0, -1.000000e+00
%9 = load i32, i32* @make_lookup_poly_grad.oq
%10 = icmp eq i32 %9, %1
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = and i32 %1, 1
br label %85
13: ; preds = %7
store i32 %1, i32* @make_lookup_poly_grad.oq
%14 = and i32 %1, 1
%15 = icmp eq i32 %14, 0
%16 = select i1 %15, i32 2, i32 1
%17 = xor i1 %15, true
%18 = sext i1 %17 to i32
%19 = add nsw i32 %18, %1
%20 = sub i32 %16, %1
%21 = sdiv i32 %20, 2
store i32 %21, i32* @make_lookup_poly_grad.k0
%22 = sdiv i32 %19, 2
store i32 %22, i32* @make_lookup_poly_grad.k1
%23 = icmp sgt i32 %21, %22
br i1 %23, label %85, label %24
24: ; preds = %13, %80
%25 = phi i32 [ %84, %80 ], [ 0, %13 ]
%26 = phi double* [ %82, %80 ], [ getelementptr inbounds ([256 x double], [256 x double]* @make_lookup_poly_grad.denom, i64 0, i64 0), %13 ]
%27 = phi i32 [ %70, %80 ], [ %21, %13 ]
%28 = add i32 %25, -1
%29 = icmp sgt i32 %27, %21
br i1 %29, label %30, label %68
30: ; preds = %24
%31 = and i32 %25, 3
%32 = icmp eq i32 %31, 0
br i1 %32, label %43, label %33
33: ; preds = %30, %33
%34 = phi double [ %39, %33 ], [ 1.000000e+00, %30 ]
%35 = phi i32 [ %40, %33 ], [ %21, %30 ]
%36 = phi i32 [ %41, %33 ], [ 0, %30 ]
%37 = sub nsw i32 %27, %35
%38 = sitofp i32 %37 to double
%39 = fmul double %34, %38
%40 = add nsw i32 %35, 1
%41 = add i32 %36, 1
%42 = icmp eq i32 %41, %31
br i1 %42, label %43, label %33
43: ; preds = %33, %30
%44 = phi double [ undef, %30 ], [ %39, %33 ]
%45 = phi double [ 1.000000e+00, %30 ], [ %39, %33 ]
%46 = phi i32 [ %21, %30 ], [ %40, %33 ]
%47 = icmp ult i32 %28, 3
br i1 %47, label %68, label %48
48: ; preds = %43, %48
%49 = phi double [ %65, %48 ], [ %45, %43 ]
%50 = phi i32 [ %66, %48 ], [ %46, %43 ]
%51 = sub nsw i32 %27, %50
%52 = sitofp i32 %51 to double
%53 = fmul double %49, %52
%54 = xor i32 %50, -1
%55 = add i32 %27, %54
%56 = sitofp i32 %55 to double
%57 = fmul double %53, %56
%58 = add nsw i32 %50, 2
%59 = sub nsw i32 %27, %58
%60 = sitofp i32 %59 to double
%61 = fmul double %57, %60
%62 = add nsw i32 %50, 3
%63 = sub nsw i32 %27, %62
%64 = sitofp i32 %63 to double
%65 = fmul double %61, %64
%66 = add nsw i32 %50, 4
%67 = icmp eq i32 %66, %27
br i1 %67, label %68, label %48
68: ; preds = %43, %48, %24
%69 = phi double [ 1.000000e+00, %24 ], [ %44, %43 ], [ %65, %48 ]
%70 = add i32 %27, 1
%71 = icmp slt i32 %27, %22
br i1 %71, label %72, label %80
72: ; preds = %68, %72
%73 = phi double [ %77, %72 ], [ %69, %68 ]
%74 = phi i32 [ %78, %72 ], [ %70, %68 ]
%75 = sub nsw i32 %27, %74
%76 = sitofp i32 %75 to double
%77 = fmul double %73, %76
%78 = add nsw i32 %74, 1
%79 = icmp slt i32 %74, %22
br i1 %79, label %72, label %80
80: ; preds = %72, %68
%81 = phi double [ %69, %68 ], [ %77, %72 ]
store double %81, double* %26
%82 = getelementptr inbounds double, double* %26, i64 1
%83 = icmp eq i32 %27, %22
%84 = add i32 %25, 1
br i1 %83, label %85, label %24
85: ; preds = %80, %11, %13
%86 = phi i32 [ %12, %11 ], [ %14, %13 ], [ %14, %80 ]
%87 = icmp eq i32 %86, 0
%88 = fadd double %8, 5.000000e-01
%89 = select i1 %87, double %8, double %88
%90 = tail call i32 @floor(double %89)
%91 = load i32, i32* @make_lookup_poly_grad.k0
%92 = add nsw i32 %91, %90
%93 = icmp sgt i32 %92, -1
%94 = sext i32 %92 to i64
%95 = sub nsw i64 0, %94
%96 = getelementptr inbounds [256 x double], [256 x double]* @make_lookup_poly_grad.denom, i64 0, i64 %95
%97 = sub i32 0, %90
%98 = select i1 %93, i32 %92, i32 0
%99 = select i1 %93, i32 %91, i32 %97
%100 = select i1 %93, double* getelementptr inbounds ([256 x double], [256 x double]* @make_lookup_poly_grad.denom, i64 0, i64 0), double* %96
store i32 %98, i32* %3
%101 = load i32, i32* @make_lookup_poly_grad.k1
%102 = add nsw i32 %101, %90
%103 = icmp slt i32 %102, %2
%104 = add nsw i32 %2, -1
%105 = select i1 %103, i32 %102, i32 %104
%106 = sub nsw i32 %105, %98
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds double, double* %4, i64 %107
store double* %108, double** %6
%109 = icmp sgt i32 %106, 0
br i1 %109, label %110, label %391
110: ; preds = %85
%111 = sitofp i32 %90 to double
%112 = fsub double %8, %111
%113 = fadd double %112, 1.000000e-05
%114 = tail call double @llvm.fabs.f64(double %112)
%115 = fcmp ogt double %114, 1.000000e-04
br i1 %115, label %132, label %116
116: ; preds = %110
%117 = sub i32 %99, %91
%118 = xor i32 %91, -1
%119 = add i32 %99, %118
%120 = insertelement <2 x double> poison, double %112, i64 0
%121 = insertelement <2 x double> %120, double %113, i64 1
%122 = insertelement <2 x double> poison, double %112, i64 0
%123 = insertelement <2 x double> %122, double %113, i64 1
%124 = insertelement <2 x double> poison, double %112, i64 0
%125 = insertelement <2 x double> %124, double %113, i64 1
%126 = insertelement <2 x double> poison, double %112, i64 0
%127 = insertelement <2 x double> %126, double %113, i64 1
%128 = insertelement <2 x double> poison, double %112, i64 0
%129 = insertelement <2 x double> %128, double %113, i64 1
%130 = insertelement <2 x double> poison, double %112, i64 0
%131 = insertelement <2 x double> %130, double %113, i64 1
br label %304
132: ; preds = %110
%133 = icmp sgt i32 %99, %91
br i1 %133, label %134, label %169
134: ; preds = %132
%135 = sub i32 %99, %91
%136 = xor i32 %91, -1
%137 = add i32 %99, %136
%138 = and i32 %135, 3
%139 = icmp eq i32 %138, 0
br i1 %139, label %155, label %140
140: ; preds = %134
%141 = insertelement <2 x double> poison, double %113, i64 0
%142 = insertelement <2 x double> %141, double %112, i64 1
br label %143
143: ; preds = %143, %140
%144 = phi i32 [ %152, %143 ], [ %91, %140 ]
%145 = phi <2 x double> [ %151, %143 ], [ <double 1.000000e+00, double 1.000000e+00>, %140 ]
%146 = phi i32 [ %153, %143 ], [ 0, %140 ]
%147 = sitofp i32 %144 to double
%148 = insertelement <2 x double> poison, double %147, i64 0
%149 = shufflevector <2 x double> %148, <2 x double> poison, <2 x i32> zeroinitializer
%150 = fsub <2 x double> %142, %149
%151 = fmul <2 x double> %145, %150
%152 = add nsw i32 %144, 1
%153 = add i32 %146, 1
%154 = icmp eq i32 %153, %138
br i1 %154, label %155, label %143
155: ; preds = %143, %134
%156 = phi <2 x double> [ undef, %134 ], [ %151, %143 ]
%157 = phi i32 [ %91, %134 ], [ %152, %143 ]
%158 = phi <2 x double> [ <double 1.000000e+00, double 1.000000e+00>, %134 ], [ %151, %143 ]
%159 = icmp ult i32 %137, 3
br i1 %159, label %169, label %160
160: ; preds = %155
%161 = insertelement <2 x double> poison, double %113, i64 0
%162 = insertelement <2 x double> %161, double %112, i64 1
%163 = insertelement <2 x double> poison, double %113, i64 0
%164 = insertelement <2 x double> %163, double %112, i64 1
%165 = insertelement <2 x double> poison, double %113, i64 0
%166 = insertelement <2 x double> %165, double %112, i64 1
%167 = insertelement <2 x double> poison, double %113, i64 0
%168 = insertelement <2 x double> %167, double %112, i64 1
br label %207
169: ; preds = %155, %207, %132
%170 = phi <2 x double> [ <double 1.000000e+00, double 1.000000e+00>, %132 ], [ %156, %155 ], [ %232, %207 ]
%171 = icmp sgt i32 %101, %99
br i1 %171, label %172, label %263
172: ; preds = %169
%173 = sub i32 %101, %99
%174 = xor i32 %99, -1
%175 = add i32 %101, %174
%176 = and i32 %173, 3
%177 = icmp eq i32 %176, 0
br i1 %177, label %193, label %178
178: ; preds = %172
%179 = insertelement <2 x double> poison, double %113, i64 0
%180 = insertelement <2 x double> %179, double %112, i64 1
br label %181
181: ; preds = %181, %178
%182 = phi i32 [ %185, %181 ], [ %99, %178 ]
%183 = phi <2 x double> [ %190, %181 ], [ %170, %178 ]
%184 = phi i32 [ %191, %181 ], [ 0, %178 ]
%185 = add nsw i32 %182, 1
%186 = sitofp i32 %185 to double
%187 = insertelement <2 x double> poison, double %186, i64 0
%188 = shufflevector <2 x double> %187, <2 x double> poison, <2 x i32> zeroinitializer
%189 = fsub <2 x double> %180, %188
%190 = fmul <2 x double> %183, %189
%191 = add i32 %184, 1
%192 = icmp eq i32 %191, %176
br i1 %192, label %193, label %181
193: ; preds = %181, %172
%194 = phi <2 x double> [ undef, %172 ], [ %190, %181 ]
%195 = phi i32 [ %99, %172 ], [ %185, %181 ]
%196 = phi <2 x double> [ %170, %172 ], [ %190, %181 ]
%197 = icmp ult i32 %175, 3
br i1 %197, label %263, label %198
198: ; preds = %193
%199 = insertelement <2 x double> poison, double %113, i64 0
%200 = insertelement <2 x double> %199, double %112, i64 1
%201 = insertelement <2 x double> poison, double %113, i64 0
%202 = insertelement <2 x double> %201, double %112, i64 1
%203 = insertelement <2 x double> poison, double %113, i64 0
%204 = insertelement <2 x double> %203, double %112, i64 1
%205 = insertelement <2 x double> poison, double %113, i64 0
%206 = insertelement <2 x double> %205, double %112, i64 1
br label %235
207: ; preds = %207, %160
%208 = phi i32 [ %157, %160 ], [ %233, %207 ]
%209 = phi <2 x double> [ %158, %160 ], [ %232, %207 ]
%210 = sitofp i32 %208 to double
%211 = insertelement <2 x double> poison, double %210, i64 0
%212 = shufflevector <2 x double> %211, <2 x double> poison, <2 x i32> zeroinitializer
%213 = fsub <2 x double> %162, %212
%214 = fmul <2 x double> %209, %213
%215 = add nsw i32 %208, 1
%216 = sitofp i32 %215 to double
%217 = insertelement <2 x double> poison, double %216, i64 0
%218 = shufflevector <2 x double> %217, <2 x double> poison, <2 x i32> zeroinitializer
%219 = fsub <2 x double> %164, %218
%220 = fmul <2 x double> %214, %219
%221 = add nsw i32 %208, 2
%222 = sitofp i32 %221 to double
%223 = insertelement <2 x double> poison, double %222, i64 0
%224 = shufflevector <2 x double> %223, <2 x double> poison, <2 x i32> zeroinitializer
%225 = fsub <2 x double> %166, %224
%226 = fmul <2 x double> %220, %225
%227 = add nsw i32 %208, 3
%228 = sitofp i32 %227 to double
%229 = insertelement <2 x double> poison, double %228, i64 0
%230 = shufflevector <2 x double> %229, <2 x double> poison, <2 x i32> zeroinitializer
%231 = fsub <2 x double> %168, %230
%232 = fmul <2 x double> %226, %231
%233 = add nsw i32 %208, 4
%234 = icmp eq i32 %233, %99
br i1 %234, label %169, label %207
235: ; preds = %235, %198
%236 = phi i32 [ %195, %198 ], [ %256, %235 ]
%237 = phi <2 x double> [ %196, %198 ], [ %261, %235 ]
%238 = add nsw i32 %236, 1
%239 = sitofp i32 %238 to double
%240 = insertelement <2 x double> poison, double %239, i64 0
%241 = shufflevector <2 x double> %240, <2 x double> poison, <2 x i32> zeroinitializer
%242 = fsub <2 x double> %200, %241
%243 = fmul <2 x double> %237, %242
%244 = add nsw i32 %236, 2
%245 = sitofp i32 %244 to double
%246 = insertelement <2 x double> poison, double %245, i64 0
%247 = shufflevector <2 x double> %246, <2 x double> poison, <2 x i32> zeroinitializer
%248 = fsub <2 x double> %202, %247
%249 = fmul <2 x double> %243, %248
%250 = add nsw i32 %236, 3
%251 = sitofp i32 %250 to double
%252 = insertelement <2 x double> poison, double %251, i64 0
%253 = shufflevector <2 x double> %252, <2 x double> poison, <2 x i32> zeroinitializer
%254 = fsub <2 x double> %204, %253
%255 = fmul <2 x double> %249, %254
%256 = add nsw i32 %236, 4
%257 = sitofp i32 %256 to double
%258 = insertelement <2 x double> poison, double %257, i64 0
%259 = shufflevector <2 x double> %258, <2 x double> poison, <2 x i32> zeroinitializer
%260 = fsub <2 x double> %206, %259
%261 = fmul <2 x double> %255, %260
%262 = icmp eq i32 %256, %101
br i1 %262, label %263, label %235
263: ; preds = %193, %235, %169
%264 = phi <2 x double> [ %170, %169 ], [ %194, %193 ], [ %261, %235 ]
%265 = load double, double* %100
%266 = extractelement <2 x double> %264, i64 1
%267 = fdiv double %266, %265
store double %267, double* %4
%268 = extractelement <2 x double> %264, i64 0
%269 = fsub double %268, %266
%270 = fdiv double %269, 1.000000e-05
%271 = load double, double* %100
%272 = fdiv double %270, %271
store double %272, double* %5
%273 = icmp slt i32 %106, 1
br i1 %273, label %391, label %274
274: ; preds = %263
%275 = getelementptr inbounds double, double* %4, i64 1
%276 = insertelement <2 x double> poison, double %113, i64 0
%277 = insertelement <2 x double> %276, double %112, i64 1
br label %278
278: ; preds = %274, %278
%279 = phi double* [ %302, %278 ], [ %275, %274 ]
%280 = phi double* [ %285, %278 ], [ %100, %274 ]
%281 = phi double* [ %284, %278 ], [ %5, %274 ]
%282 = phi i32 [ %286, %278 ], [ %99, %274 ]
%283 = phi <2 x double> [ %293, %278 ], [ %264, %274 ]
%284 = getelementptr inbounds double, double* %281, i64 1
%285 = getelementptr inbounds double, double* %280, i64 1
%286 = add nsw i32 %282, 1
%287 = sitofp i32 %286 to double
%288 = insertelement <2 x double> poison, double %287, i64 0
%289 = shufflevector <2 x double> %288, <2 x double> poison, <2 x i32> zeroinitializer
%290 = fsub <2 x double> %277, %289
%291 = fadd <2 x double> %290, <double 1.000000e+00, double 1.000000e+00>
%292 = fmul <2 x double> %283, %291
%293 = fdiv <2 x double> %292, %290
%294 = load double, double* %285
%295 = extractelement <2 x double> %293, i64 1
%296 = fdiv double %295, %294
store double %296, double* %279
%297 = extractelement <2 x double> %293, i64 0
%298 = fsub double %297, %295
%299 = fdiv double %298, 1.000000e-05
%300 = load double, double* %285
%301 = fdiv double %299, %300
store double %301, double* %284
%302 = getelementptr inbounds double, double* %279, i64 1
%303 = icmp ugt double* %302, %108
br i1 %303, label %391, label %278
304: ; preds = %116, %375
%305 = phi i32 [ 0, %116 ], [ %390, %375 ]
%306 = phi double* [ %100, %116 ], [ %385, %375 ]
%307 = phi i32 [ %99, %116 ], [ %363, %375 ]
%308 = phi double* [ %5, %116 ], [ %388, %375 ]
%309 = phi double* [ %4, %116 ], [ %380, %375 ]
%310 = add i32 %119, %305
%311 = icmp slt i32 %91, %307
br i1 %311, label %312, label %361
312: ; preds = %304
%313 = add i32 %117, %305
%314 = and i32 %313, 3
%315 = icmp eq i32 %314, 0
br i1 %315, label %328, label %316
316: ; preds = %312, %316
%317 = phi i32 [ %325, %316 ], [ %91, %312 ]
%318 = phi <2 x double> [ %324, %316 ], [ <double 1.000000e+00, double 1.000000e+00>, %312 ]
%319 = phi i32 [ %326, %316 ], [ 0, %312 ]
%320 = sitofp i32 %317 to double
%321 = insertelement <2 x double> poison, double %320, i64 0
%322 = shufflevector <2 x double> %321, <2 x double> poison, <2 x i32> zeroinitializer
%323 = fsub <2 x double> %121, %322
%324 = fmul <2 x double> %318, %323
%325 = add nsw i32 %317, 1
%326 = add i32 %319, 1
%327 = icmp eq i32 %326, %314
br i1 %327, label %328, label %316
328: ; preds = %316, %312
%329 = phi i32 [ %91, %312 ], [ %325, %316 ]
%330 = phi <2 x double> [ <double 1.000000e+00, double 1.000000e+00>, %312 ], [ %324, %316 ]
%331 = phi <2 x double> [ undef, %312 ], [ %324, %316 ]
%332 = icmp ult i32 %310, 3
br i1 %332, label %361, label %333
333: ; preds = %328, %333
%334 = phi i32 [ %359, %333 ], [ %329, %328 ]
%335 = phi <2 x double> [ %358, %333 ], [ %330, %328 ]
%336 = sitofp i32 %334 to double
%337 = insertelement <2 x double> poison, double %336, i64 0
%338 = shufflevector <2 x double> %337, <2 x double> poison, <2 x i32> zeroinitializer
%339 = fsub <2 x double> %123, %338
%340 = fmul <2 x double> %335, %339
%341 = add nsw i32 %334, 1
%342 = sitofp i32 %341 to double
%343 = insertelement <2 x double> poison, double %342, i64 0
%344 = shufflevector <2 x double> %343, <2 x double> poison, <2 x i32> zeroinitializer
%345 = fsub <2 x double> %125, %344
%346 = fmul <2 x double> %340, %345
%347 = add nsw i32 %334, 2
%348 = sitofp i32 %347 to double
%349 = insertelement <2 x double> poison, double %348, i64 0
%350 = shufflevector <2 x double> %349, <2 x double> poison, <2 x i32> zeroinitializer
%351 = fsub <2 x double> %127, %350
%352 = fmul <2 x double> %346, %351
%353 = add nsw i32 %334, 3
%354 = sitofp i32 %353 to double
%355 = insertelement <2 x double> poison, double %354, i64 0
%356 = shufflevector <2 x double> %355, <2 x double> poison, <2 x i32> zeroinitializer
%357 = fsub <2 x double> %129, %356
%358 = fmul <2 x double> %352, %357
%359 = add nsw i32 %334, 4
%360 = icmp slt i32 %359, %307
br i1 %360, label %333, label %361
361: ; preds = %328, %333, %304
%362 = phi <2 x double> [ <double 1.000000e+00, double 1.000000e+00>, %304 ], [ %331, %328 ], [ %358, %333 ]
%363 = add nsw i32 %307, 1
%364 = icmp slt i32 %307, %101
br i1 %364, label %365, label %375
365: ; preds = %361, %365
%366 = phi i32 [ %373, %365 ], [ %363, %361 ]
%367 = phi <2 x double> [ %372, %365 ], [ %362, %361 ]
%368 = sitofp i32 %366 to double
%369 = insertelement <2 x double> poison, double %368, i64 0
%370 = shufflevector <2 x double> %369, <2 x double> poison, <2 x i32> zeroinitializer
%371 = fsub <2 x double> %131, %370
%372 = fmul <2 x double> %367, %371
%373 = add nsw i32 %366, 1
%374 = icmp slt i32 %366, %101
br i1 %374, label %365, label %375
375: ; preds = %365, %361
%376 = phi <2 x double> [ %362, %361 ], [ %372, %365 ]
%377 = load double, double* %306
%378 = extractelement <2 x double> %376, i64 0
%379 = fdiv double %378, %377
%380 = getelementptr inbounds double, double* %309, i64 1
store double %379, double* %309
%381 = shufflevector <2 x double> %376, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%382 = fsub <2 x double> %381, %376
%383 = extractelement <2 x double> %382, i64 0
%384 = fdiv double %383, 1.000000e-05
%385 = getelementptr inbounds double, double* %306, i64 1
%386 = load double, double* %306
%387 = fdiv double %384, %386
%388 = getelementptr inbounds double, double* %308, i64 1
store double %387, double* %308
%389 = icmp ugt double* %380, %108
%390 = add i32 %305, 1
br i1 %389, label %391, label %304
391: ; preds = %375, %278, %263, %85
ret void
}