#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 /*<<< orphan*/ BasisFuns(int, double, int, double *, double *, double *,
                             double *);
int FindSpan(int, int, double, double *);
void oneBspEval2(int degU, int degV, double *cp, int ncp, int kcp,
                 double *knotU, double *knotV, double *us, double *ep,
                 double *leftU, double *rightU, double *NU, double *leftV,
                 double *rightV, double *NV) {
  int i, j, spanU, spanV, ind, ind2, fourncp, myint;
  double NN;
  fourncp = 4 * ncp;
  if (us[0] <= knotU[degU]) {
    if (us[1] <= knotV[degV]) {
      ep[0] = cp[0];
      ep[1] = cp[1];
      ep[2] = cp[2];
      ep[3] = cp[3];
    } else if (us[1] >= knotV[kcp]) {
      myint = fourncp * (kcp - 1);
      ep[0] = cp[myint];
      ep[1] = cp[myint + 1];
      ep[2] = cp[myint + 2];
      ep[3] = cp[myint + 3];
    } else {
      ep[0] = 0.0;
      ep[1] = 0.0;
      ep[2] = 0.0;
      ep[3] = 0.0;
      spanV = FindSpan(kcp, degV, us[1], knotV);
      BasisFuns(spanV, us[1], degV, knotV, NV, leftV, rightV);
      ind = spanV - degV;
      for (i = 0; i <= degV; i++) {
        ep[0] += NV[i] * cp[(ind + i) * fourncp];
        ep[1] += NV[i] * cp[(ind + i) * fourncp + 1];
        ep[2] += NV[i] * cp[(ind + i) * fourncp + 2];
        ep[3] += NV[i] * cp[(ind + i) * fourncp + 3];
      }
    }
  } else if (us[0] >= knotU[ncp]) {
    if (us[1] <= knotV[degV]) {
      ep[0] = cp[fourncp - 4];
      ep[1] = cp[fourncp - 3];
      ep[2] = cp[fourncp - 2];
      ep[3] = cp[fourncp - 1];
    } else if (us[1] >= knotV[kcp]) {
      myint = fourncp * kcp;
      ep[0] = cp[myint - 4];
      ep[1] = cp[myint - 3];
      ep[2] = cp[myint - 2];
      ep[3] = cp[myint - 1];
    } else {
      ep[0] = 0.0;
      ep[1] = 0.0;
      ep[2] = 0.0;
      ep[3] = 0.0;
      spanV = FindSpan(kcp, degV, us[1], knotV);
      BasisFuns(spanV, us[1], degV, knotV, NV, leftV, rightV);
      ind = spanV - degV;
      myint = (ind + 1) * fourncp;
      for (i = 0; i <= degV; i++) {
        ep[0] += NV[i] * cp[i * fourncp + myint - 4];
        ep[1] += NV[i] * cp[i * fourncp + myint - 3];
        ep[2] += NV[i] * cp[i * fourncp + myint - 2];
        ep[3] += NV[i] * cp[i * fourncp + myint - 1];
      }
    }
  } else {
    ep[0] = 0.0;
    ep[1] = 0.0;
    ep[2] = 0.0;
    ep[3] = 0.0;
    if (us[1] <= knotV[degV]) {
      spanU = FindSpan(ncp, degU, us[0], knotU);
      BasisFuns(spanU, us[0], degU, knotU, NU, leftU, rightU);
      ind = spanU - degU;
      for (i = 0; i <= degU; i++) {
        ep[0] += NU[i] * cp[(ind + i) * 4];
        ep[1] += NU[i] * cp[(ind + i) * 4 + 1];
        ep[2] += NU[i] * cp[(ind + i) * 4 + 2];
        ep[3] += NU[i] * cp[(ind + i) * 4 + 3];
      }
    } else if (us[1] >= knotV[kcp]) {
      spanU = FindSpan(ncp, degU, us[0], knotU);
      BasisFuns(spanU, us[0], degU, knotU, NU, leftU, rightU);
      ind = spanU - degU;
      myint = ind * 4 + (kcp - 1) * fourncp;
      for (i = 0; i <= degU; i++) {
        ep[0] += NU[i] * cp[i * 4 + myint];
        ep[1] += NU[i] * cp[i * 4 + myint + 1];
        ep[2] += NU[i] * cp[i * 4 + myint + 2];
        ep[3] += NU[i] * cp[i * 4 + myint + 3];
      }
    } else {
      spanU = FindSpan(ncp, degU, us[0], knotU);
      BasisFuns(spanU, us[0], degU, knotU, NU, leftU, rightU);
      spanV = FindSpan(kcp, degV, us[1], knotV);
      BasisFuns(spanV, us[1], degV, knotV, NV, leftV, rightV);
      ind = spanU - degU;
      ind2 = spanV - degV;
      myint = ind2 * fourncp + ind * 4;
      for (i = 0; i <= degV; i++) {
        for (j = 0; j <= degU; j++) {
          NN = NV[i] * NU[j];
          ep[0] += NN * cp[i * fourncp + j * 4 + myint];
          ep[1] += NN * cp[i * fourncp + j * 4 + myint + 1];
          ep[2] += NN * cp[i * fourncp + j * 4 + myint + 2];
          ep[3] += NN * cp[i * fourncp + j * 4 + myint + 3];
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<oneBspEval2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x50(%rbp),%rax
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x3c(%rbp)
mov    0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movslq -0x4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jb     141c <oneBspEval2+0x2fc>
mov    0x18(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jb     11f4 <oneBspEval2+0xd4>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    0x20(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    0x20(%rbp),%rax
movsd  %xmm0,0x18(%rax)
jmp    1417 <oneBspEval2+0x2f7>
mov    0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jb     128a <oneBspEval2+0x16a>
mov    -0x3c(%rbp),%eax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
imul   %ecx,%eax
mov    %eax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
mov    -0x40(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
mov    -0x40(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
mov    -0x40(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movsd  %xmm0,0x18(%rax)
jmp    1412 <oneBspEval2+0x2f2>
mov    0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x10(%rax)
mov    0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x18(%rax)
mov    -0x18(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    0x10(%rbp),%rdx
call   1040 <FindSpan@plt>
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%edi
mov    0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%esi
mov    0x10(%rbp),%rdx
mov    0x50(%rbp),%rcx
mov    0x40(%rbp),%r8
mov    0x48(%rbp),%r9
call   1030 <BasisFuns@plt>
mov    -0x30(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x34(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     140d <oneBspEval2+0x2ed>
mov    0x50(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    -0x24(%rbp),%ecx
imul   -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x20(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    0x50(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    -0x24(%rbp),%ecx
imul   -0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rax)
mov    0x50(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    -0x24(%rbp),%ecx
imul   -0x3c(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x20(%rbp),%rax
movsd  0x10(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rax)
mov    0x50(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    -0x24(%rbp),%ecx
imul   -0x3c(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x20(%rbp),%rax
movsd  0x18(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x18(%rax)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1308 <oneBspEval2+0x1e8>
jmp    1412 <oneBspEval2+0x2f2>
jmp    1417 <oneBspEval2+0x2f7>
jmp    1c2a <oneBspEval2+0xb0a>
mov    0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jb     16ff <oneBspEval2+0x5df>
mov    0x18(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jb     14c7 <oneBspEval2+0x3a7>
mov    -0x10(%rbp),%rax
mov    -0x3c(%rbp),%ecx
sub    $0x4,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
mov    -0x3c(%rbp),%ecx
sub    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
mov    -0x3c(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
mov    -0x3c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movsd  %xmm0,0x18(%rax)
jmp    16fa <oneBspEval2+0x5da>
mov    0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jb     155d <oneBspEval2+0x43d>
mov    -0x3c(%rbp),%eax
imul   -0x18(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x40(%rbp),%ecx
sub    $0x4,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
mov    -0x40(%rbp),%ecx
sub    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
mov    -0x40(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
mov    -0x40(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movsd  %xmm0,0x18(%rax)
jmp    16f5 <oneBspEval2+0x5d5>
mov    0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x10(%rax)
mov    0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x18(%rax)
mov    -0x18(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    0x10(%rbp),%rdx
call   1040 <FindSpan@plt>
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%edi
mov    0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%esi
mov    0x10(%rbp),%rdx
mov    0x50(%rbp),%rcx
mov    0x40(%rbp),%r8
mov    0x48(%rbp),%r9
call   1030 <BasisFuns@plt>
mov    -0x30(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
imul   -0x3c(%rbp),%eax
mov    %eax,-0x40(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     16f0 <oneBspEval2+0x5d0>
mov    0x50(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0x3c(%rbp),%ecx
add    -0x40(%rbp),%ecx
sub    $0x4,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x20(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    0x50(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0x3c(%rbp),%ecx
add    -0x40(%rbp),%ecx
sub    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rax)
mov    0x50(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0x3c(%rbp),%ecx
add    -0x40(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x20(%rbp),%rax
movsd  0x10(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rax)
mov    0x50(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0x3c(%rbp),%ecx
add    -0x40(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x20(%rbp),%rax
movsd  0x18(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x18(%rax)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    15e8 <oneBspEval2+0x4c8>
jmp    16f5 <oneBspEval2+0x5d5>
jmp    16fa <oneBspEval2+0x5da>
jmp    1c25 <oneBspEval2+0xb05>
mov    0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x10(%rax)
mov    0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x18(%rax)
mov    0x18(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jb     18a1 <oneBspEval2+0x781>
mov    -0x14(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rdx
call   1040 <FindSpan@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%edi
mov    0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x4(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    0x38(%rbp),%rcx
mov    0x28(%rbp),%r8
mov    0x30(%rbp),%r9
call   1030 <BasisFuns@plt>
mov    -0x2c(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x34(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     189c <oneBspEval2+0x77c>
mov    0x38(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    -0x24(%rbp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x20(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    0x38(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    -0x24(%rbp),%ecx
shl    $0x2,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rax)
mov    0x38(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    -0x24(%rbp),%ecx
shl    $0x2,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x20(%rbp),%rax
movsd  0x10(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rax)
mov    0x38(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    -0x24(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x20(%rbp),%rax
movsd  0x18(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x18(%rax)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    179b <oneBspEval2+0x67b>
jmp    1c20 <oneBspEval2+0xb00>
mov    0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jb     1a25 <oneBspEval2+0x905>
mov    -0x14(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rdx
call   1040 <FindSpan@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%edi
mov    0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x4(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    0x38(%rbp),%rcx
mov    0x28(%rbp),%r8
mov    0x30(%rbp),%r9
call   1030 <BasisFuns@plt>
mov    -0x2c(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
shl    $0x2,%eax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
imul   -0x3c(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x40(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1a20 <oneBspEval2+0x900>
mov    0x38(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
shl    $0x2,%ecx
add    -0x40(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x20(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    0x38(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
shl    $0x2,%ecx
add    -0x40(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rax)
mov    0x38(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
shl    $0x2,%ecx
add    -0x40(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x20(%rbp),%rax
movsd  0x10(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rax)
mov    0x38(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
shl    $0x2,%ecx
add    -0x40(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x20(%rbp),%rax
movsd  0x18(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x18(%rax)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    191f <oneBspEval2+0x7ff>
jmp    1c1b <oneBspEval2+0xafb>
mov    -0x14(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rdx
call   1040 <FindSpan@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%edi
mov    0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x4(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    0x38(%rbp),%rcx
mov    0x28(%rbp),%r8
mov    0x30(%rbp),%r9
call   1030 <BasisFuns@plt>
mov    -0x18(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    0x10(%rbp),%rdx
call   1040 <FindSpan@plt>
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%edi
mov    0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%esi
mov    0x10(%rbp),%rdx
mov    0x50(%rbp),%rcx
mov    0x40(%rbp),%r8
mov    0x48(%rbp),%r9
call   1030 <BasisFuns@plt>
mov    -0x2c(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
imul   -0x3c(%rbp),%eax
mov    -0x34(%rbp),%ecx
shl    $0x2,%ecx
add    %ecx,%eax
mov    %eax,-0x40(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1c16 <oneBspEval2+0xaf6>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1c03 <oneBspEval2+0xae3>
mov    0x50(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x38(%rbp),%rax
movslq -0x28(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0x3c(%rbp),%ecx
mov    -0x28(%rbp),%edx
shl    $0x2,%edx
add    %edx,%ecx
add    -0x40(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x20(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movsd  -0x48(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0x3c(%rbp),%ecx
mov    -0x28(%rbp),%edx
shl    $0x2,%edx
add    %edx,%ecx
add    -0x40(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rax)
movsd  -0x48(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0x3c(%rbp),%ecx
mov    -0x28(%rbp),%edx
shl    $0x2,%edx
add    %edx,%ecx
add    -0x40(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x20(%rbp),%rax
movsd  0x10(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rax)
movsd  -0x48(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0x3c(%rbp),%ecx
mov    -0x28(%rbp),%edx
shl    $0x2,%edx
add    %edx,%ecx
add    -0x40(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x20(%rbp),%rax
movsd  0x18(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x18(%rax)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1adf <oneBspEval2+0x9bf>
jmp    1c08 <oneBspEval2+0xae8>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1acc <oneBspEval2+0x9ac>
jmp    1c1b <oneBspEval2+0xafb>
jmp    1c20 <oneBspEval2+0xb00>
jmp    1c25 <oneBspEval2+0xb05>
jmp    1c2a <oneBspEval2+0xb0a>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oneBspEval2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r9,%r13
mov    %rdx,%rbx
mov    %edi,%ebp
mov    0xc0(%rsp),%r14
mov    0x90(%rsp),%r12
mov    0x88(%rsp),%r9
mov    0x80(%rsp),%rdx
lea    0x0(,%rcx,4),%edi
movsd  (%r9),%xmm0
movslq %ebp,%rax
movsd  0x0(%r13,%rax,8),%xmm1
ucomisd %xmm0,%xmm1
jae    139e <oneBspEval2+0x27e>
movslq %ecx,%rax
ucomisd 0x0(%r13,%rax,8),%xmm0
jae    14f3 <oneBspEval2+0x3d3>
mov    0xa8(%rsp),%r15
xorpd  %xmm0,%xmm0
movupd %xmm0,0x10(%r12)
movupd %xmm0,(%r12)
movsd  0x8(%r9),%xmm1
movslq %esi,%rax
movsd  (%rdx,%rax,8),%xmm0
ucomisd %xmm1,%xmm0
jae    166b <oneBspEval2+0x54b>
mov    %edi,0xc(%rsp)
mov    %rsi,0x38(%rsp)
movslq %r8d,%rax
movsd  (%rdx,%rax,8),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%r9),%xmm0
mov    %ecx,%edi
mov    %ebp,%esi
mov    %r13,%rdx
mov    %rcx,0x18(%rsp)
mov    %r8,0x28(%rsp)
movsd  %xmm1,0x40(%rsp)
call   1040 <FindSpan@plt>
mov    0x88(%rsp),%rcx
movsd  (%rcx),%xmm0
mov    %rax,0x20(%rsp)
mov    %eax,%edi
mov    %rbp,0x30(%rsp)
mov    %ebp,%esi
mov    %r13,%rdx
mov    %r15,%rcx
mov    0x98(%rsp),%r8
mov    0xa0(%rsp),%r9
call   1030 <BasisFuns@plt>
movsd  0x40(%rsp),%xmm0
ucomisd 0x10(%rsp),%xmm0
jae    17e8 <oneBspEval2+0x6c8>
mov    0x88(%rsp),%rax
movsd  0x8(%rax),%xmm0
mov    0x28(%rsp),%rdi
mov    0x38(%rsp),%r13
mov    %r13d,%esi
mov    0x80(%rsp),%rbp
mov    %rbp,%rdx
call   1040 <FindSpan@plt>
mov    0x88(%rsp),%rcx
movsd  0x8(%rcx),%xmm0
mov    %eax,0x10(%rsp)
mov    %eax,%edi
mov    %r13d,%esi
mov    %rbp,%rdx
mov    %r14,%rcx
mov    0xb0(%rsp),%r8
mov    0xb8(%rsp),%r9
call   1030 <BasisFuns@plt>
test   %r13d,%r13d
mov    0x30(%rsp),%r10
mov    0xc(%rsp),%ecx
js     190c <oneBspEval2+0x7ec>
lea    0x1(%r10),%eax
lea    0x1(%r13),%r8d
mov    0x10(%rsp),%edx
sub    %r13d,%edx
mov    0x18(%rsp),%rbp
imul   %edx,%ebp
mov    0x20(%rsp),%rdx
shl    $0x2,%edx
lea    (%rdx,%rbp,4),%edx
lea    0x0(,%r10,4),%esi
sub    %esi,%edx
mov    %ecx,%r9d
shl    $0x2,%rax
xor    %edi,%edi
jmp    12f0 <oneBspEval2+0x1d0>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rdi
add    %r9,%rdx
cmp    %r8,%rdi
je     190c <oneBspEval2+0x7ec>
test   %r10d,%r10d
js     12e0 <oneBspEval2+0x1c0>
movsd  (%r12),%xmm0
movsd  0x8(%r12),%xmm1
movsd  0x10(%r12),%xmm2
movsd  0x18(%r12),%xmm3
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%r14,%rdi,8),%xmm4
mulsd  (%r15,%rbp,2),%xmm4
lea    (%rdx,%rbp,1),%rcx
movslq %ecx,%rcx
movsd  (%rbx,%rcx,8),%xmm5
mulsd  %xmm4,%xmm5
addsd  %xmm5,%xmm0
movsd  %xmm0,(%r12)
lea    0x1(%rcx),%esi
movslq %esi,%rsi
movsd  (%rbx,%rsi,8),%xmm5
mulsd  %xmm4,%xmm5
addsd  %xmm5,%xmm1
lea    0x2(%rcx),%esi
movslq %esi,%rsi
movsd  %xmm1,0x8(%r12)
movsd  (%rbx,%rsi,8),%xmm5
mulsd  %xmm4,%xmm5
addsd  %xmm5,%xmm2
movsd  %xmm2,0x10(%r12)
add    $0x3,%ecx
movslq %ecx,%rcx
mulsd  (%rbx,%rcx,8),%xmm4
addsd  %xmm4,%xmm3
movsd  %xmm3,0x18(%r12)
add    $0x4,%rbp
cmp    %rbp,%rax
jne    1320 <oneBspEval2+0x200>
jmp    12e0 <oneBspEval2+0x1c0>
movsd  0x8(%r9),%xmm0
movslq %esi,%rax
movsd  (%rdx,%rax,8),%xmm1
ucomisd %xmm0,%xmm1
jae    163f <oneBspEval2+0x51f>
movslq %r8d,%rax
ucomisd (%rdx,%rax,8),%xmm0
jae    176e <oneBspEval2+0x64e>
xorpd  %xmm0,%xmm0
movupd %xmm0,0x10(%r12)
movupd %xmm0,(%r12)
movsd  0x8(%r9),%xmm0
mov    %edi,%ebp
mov    %r8d,%edi
mov    %rsi,%r13
call   1040 <FindSpan@plt>
mov    %eax,%r15d
mov    0x88(%rsp),%rax
movsd  0x8(%rax),%xmm0
mov    %r15d,%edi
mov    %r13d,%esi
mov    0x80(%rsp),%rdx
mov    %r14,%rcx
mov    0xb0(%rsp),%r8
mov    0xb8(%rsp),%r9
call   1030 <BasisFuns@plt>
test   %r13d,%r13d
js     190c <oneBspEval2+0x7ec>
sub    %r13d,%r15d
movslq %r15d,%rcx
movslq %ebp,%r8
add    $0x1,%r13d
movsd  (%r12),%xmm0
movsd  0x8(%r12),%xmm1
movsd  0x10(%r12),%xmm2
movsd  0x18(%r12),%xmm3
imul   %r8,%rcx
mov    %r8,%rdx
shl    $0x20,%rdx
lea    (%rbx,%rcx,8),%rsi
shl    $0x20,%rcx
shl    $0x3,%r8
xor    %edi,%edi
nopl   0x0(%rax,%rax,1)
movsd  (%r14,%rdi,8),%xmm4
mulsd  (%rsi),%xmm4
addsd  %xmm4,%xmm0
movsd  %xmm0,(%r12)
movsd  (%r14,%rdi,8),%xmm4
mov    %rcx,%rbp
sar    $0x1d,%rbp
mov    %rbp,%rax
or     $0x8,%rax
mulsd  (%rbx,%rax,1),%xmm4
addsd  %xmm4,%xmm1
movsd  %xmm1,0x8(%r12)
movsd  (%r14,%rdi,8),%xmm4
mov    %rbp,%rax
or     $0x10,%rax
mulsd  (%rbx,%rax,1),%xmm4
addsd  %xmm4,%xmm2
movsd  %xmm2,0x10(%r12)
movsd  (%r14,%rdi,8),%xmm4
or     $0x18,%rbp
mulsd  (%rbx,%rbp,1),%xmm4
addsd  %xmm4,%xmm3
movsd  %xmm3,0x18(%r12)
add    $0x1,%rdi
add    %rdx,%rcx
add    %r8,%rsi
cmp    %rdi,%r13
jne    1470 <oneBspEval2+0x350>
jmp    190c <oneBspEval2+0x7ec>
movsd  0x8(%r9),%xmm0
movslq %esi,%rax
movsd  (%rdx,%rax,8),%xmm1
ucomisd %xmm0,%xmm1
jae    17b4 <oneBspEval2+0x694>
movslq %r8d,%rax
ucomisd (%rdx,%rax,8),%xmm0
jae    18ce <oneBspEval2+0x7ae>
mov    %rcx,0x18(%rsp)
xorpd  %xmm0,%xmm0
movupd %xmm0,0x10(%r12)
movupd %xmm0,(%r12)
movsd  0x8(%r9),%xmm0
mov    %edi,%ebp
mov    %r8d,%edi
mov    %rsi,%r13
call   1040 <FindSpan@plt>
mov    %eax,%r15d
mov    0x88(%rsp),%rax
movsd  0x8(%rax),%xmm0
mov    %r15d,%edi
mov    %r13d,%esi
mov    0x80(%rsp),%rdx
mov    %r14,%rcx
mov    0xb0(%rsp),%r8
mov    0xb8(%rsp),%r9
call   1030 <BasisFuns@plt>
test   %r13d,%r13d
js     190c <oneBspEval2+0x7ec>
mov    %ebp,%edi
lea    0x1(%r13),%eax
movsd  (%r12),%xmm0
movsd  0x8(%r12),%xmm1
movsd  0x10(%r12),%xmm2
movsd  0x18(%r12),%xmm3
sub    %r13d,%r15d
add    $0x1,%r15d
mov    0x18(%rsp),%rbp
imul   %r15d,%ebp
lea    -0x2(,%rbp,4),%ecx
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movsd  (%r14,%rdx,8),%xmm4
lea    -0x2(%rcx),%esi
movslq %esi,%rsi
mulsd  (%rbx,%rsi,8),%xmm4
addsd  %xmm4,%xmm0
movsd  %xmm0,(%r12)
movsd  (%r14,%rdx,8),%xmm4
lea    -0x1(%rcx),%esi
movslq %esi,%rsi
mulsd  (%rbx,%rsi,8),%xmm4
addsd  %xmm4,%xmm1
movsd  %xmm1,0x8(%r12)
movsd  (%r14,%rdx,8),%xmm4
movslq %ecx,%rcx
mulsd  (%rbx,%rcx,8),%xmm4
addsd  %xmm4,%xmm2
movsd  %xmm2,0x10(%r12)
movsd  (%r14,%rdx,8),%xmm4
lea    0x1(%rdx),%rsi
lea    0x1(%rcx),%edx
movslq %edx,%rdx
mulsd  (%rbx,%rdx,8),%xmm4
addsd  %xmm4,%xmm3
movsd  %xmm3,0x18(%r12)
add    %edi,%ecx
mov    %rsi,%rdx
cmp    %rsi,%rax
jne    15c0 <oneBspEval2+0x4a0>
jmp    190c <oneBspEval2+0x7ec>
movsd  (%rbx),%xmm0
movsd  %xmm0,(%r12)
movsd  0x8(%rbx),%xmm0
movsd  %xmm0,0x8(%r12)
movsd  0x10(%rbx),%xmm0
movsd  %xmm0,0x10(%r12)
mov    $0x3,%eax
jmp    1900 <oneBspEval2+0x7e0>
movsd  (%r9),%xmm0
mov    %ecx,%edi
mov    %ebp,%esi
mov    %r13,%rdx
mov    %rbp,%r14
call   1040 <FindSpan@plt>
mov    %eax,%ebp
mov    0x88(%rsp),%rax
movsd  (%rax),%xmm0
mov    %ebp,%edi
mov    %r14d,%esi
mov    %r13,%rdx
mov    %r15,%rcx
mov    0x98(%rsp),%r8
mov    0xa0(%rsp),%r9
call   1030 <BasisFuns@plt>
test   %r14d,%r14d
js     190c <oneBspEval2+0x7ec>
mov    %r14d,%eax
movsd  (%r12),%xmm0
movsd  0x8(%r12),%xmm1
movsd  0x10(%r12),%xmm2
movsd  0x18(%r12),%xmm3
shl    $0x2,%ebp
shl    $0x2,%r14d
sub    %r14d,%ebp
lea    0x4(,%rax,4),%rax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movsd  (%r15,%rcx,2),%xmm4
lea    (%rcx,%rbp,1),%rdx
movslq %edx,%rdx
mulsd  (%rbx,%rdx,8),%xmm4
addsd  %xmm4,%xmm0
movsd  %xmm0,(%r12)
movsd  (%r15,%rcx,2),%xmm4
lea    0x1(%rdx),%esi
movslq %esi,%rsi
mulsd  (%rbx,%rsi,8),%xmm4
addsd  %xmm4,%xmm1
movsd  %xmm1,0x8(%r12)
movsd  (%r15,%rcx,2),%xmm4
lea    0x2(%rdx),%esi
movslq %esi,%rsi
mulsd  (%rbx,%rsi,8),%xmm4
addsd  %xmm4,%xmm2
movsd  %xmm2,0x10(%r12)
movsd  (%r15,%rcx,2),%xmm4
add    $0x3,%edx
movslq %edx,%rdx
mulsd  (%rbx,%rdx,8),%xmm4
addsd  %xmm4,%xmm3
movsd  %xmm3,0x18(%r12)
add    $0x4,%rcx
cmp    %rcx,%rax
jne    16f0 <oneBspEval2+0x5d0>
jmp    190c <oneBspEval2+0x7ec>
add    $0xffffffff,%r8d
imul   %edi,%r8d
movslq %r8d,%rax
movsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,(%r12)
mov    %eax,%ecx
or     $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rbx,%rcx,8),%xmm0
movsd  %xmm0,0x8(%r12)
mov    %eax,%ecx
or     $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rbx,%rcx,8),%xmm0
movsd  %xmm0,0x10(%r12)
or     $0x3,%eax
jmp    18fe <oneBspEval2+0x7de>
movslq %edi,%rax
movsd  -0x20(%rbx,%rax,8),%xmm0
movsd  %xmm0,(%r12)
movsd  -0x18(%rbx,%rax,8),%xmm0
movsd  %xmm0,0x8(%r12)
movsd  -0x10(%rbx,%rax,8),%xmm0
movsd  %xmm0,0x10(%r12)
add    $0xffffffff,%edi
movslq %edi,%rax
jmp    1900 <oneBspEval2+0x7e0>
mov    0x28(%rsp),%rbp
mov    0x30(%rsp),%rcx
test   %ecx,%ecx
mov    0xc(%rsp),%eax
js     190c <oneBspEval2+0x7ec>
mov    0x20(%rsp),%rdx
sub    %ecx,%edx
add    $0xffffffff,%ebp
imul   %eax,%ebp
lea    0x0(%rbp,%rdx,4),%eax
movslq %eax,%rdi
mov    %ecx,%edx
movsd  (%r12),%xmm0
movsd  0x8(%r12),%xmm1
movsd  0x10(%r12),%xmm2
movsd  0x18(%r12),%xmm3
lea    (%rbx,%rdi,8),%rcx
shl    $0x20,%rdi
lea    0x8(,%rdx,8),%rdx
xor    %esi,%esi
movabs $0x400000000,%r8
nopl   0x0(%rax,%rax,1)
movsd  (%r15,%rsi,1),%xmm4
mulsd  (%rcx,%rsi,4),%xmm4
addsd  %xmm4,%xmm0
movsd  %xmm0,(%r12)
movsd  (%r15,%rsi,1),%xmm4
mov    %rdi,%rbp
sar    $0x1d,%rbp
mov    %rbp,%rax
or     $0x8,%rax
mulsd  (%rbx,%rax,1),%xmm4
addsd  %xmm4,%xmm1
movsd  %xmm1,0x8(%r12)
movsd  (%r15,%rsi,1),%xmm4
mov    %rbp,%rax
or     $0x10,%rax
mulsd  (%rbx,%rax,1),%xmm4
addsd  %xmm4,%xmm2
movsd  %xmm2,0x10(%r12)
movsd  (%r15,%rsi,1),%xmm4
or     $0x18,%rbp
mulsd  (%rbx,%rbp,1),%xmm4
addsd  %xmm4,%xmm3
movsd  %xmm3,0x18(%r12)
add    $0x8,%rsi
add    %r8,%rdi
cmp    %rsi,%rdx
jne    1850 <oneBspEval2+0x730>
jmp    190c <oneBspEval2+0x7ec>
imul   %r8d,%edi
movslq %edi,%rax
movsd  -0x20(%rbx,%rax,8),%xmm0
movsd  %xmm0,(%r12)
movsd  -0x18(%rbx,%rax,8),%xmm0
movsd  %xmm0,0x8(%r12)
movsd  -0x10(%rbx,%rax,8),%xmm0
movsd  %xmm0,0x10(%r12)
add    $0xffffffff,%eax
cltq
movsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,0x18(%r12)
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @oneBspEval2(i32 %0, i32 %1, double* %2, i32 %3, i32 %4, double* %5, double* %6, double* %7, double* %8, double* %9, double* %10, double* %11, double* %12, double* %13, double* %14) {
%16 = alloca i32
%17 = alloca i32
%18 = alloca double*
%19 = alloca i32
%20 = alloca i32
%21 = alloca double*
%22 = alloca double*
%23 = alloca double*
%24 = alloca double*
%25 = alloca double*
%26 = alloca double*
%27 = alloca double*
%28 = alloca double*
%29 = alloca double*
%30 = alloca double*
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
%37 = alloca i32
%38 = alloca i32
%39 = alloca double
store i32 %0, i32* %16
store i32 %1, i32* %17
store double* %2, double** %18
store i32 %3, i32* %19
store i32 %4, i32* %20
store double* %5, double** %21
store double* %6, double** %22
store double* %7, double** %23
store double* %8, double** %24
store double* %9, double** %25
store double* %10, double** %26
store double* %11, double** %27
store double* %12, double** %28
store double* %13, double** %29
store double* %14, double** %30
%40 = load i32, i32* %19
%41 = mul nsw i32 4, %40
store i32 %41, i32* %37
%42 = load double*, double** %23
%43 = getelementptr inbounds double, double* %42, i64 0
%44 = load double, double* %43
%45 = load double*, double** %21
%46 = load i32, i32* %16
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds double, double* %45, i64 %47
%49 = load double, double* %48
%50 = fcmp ole double %44, %49
br i1 %50, label %51, label %243
51: ; preds = %15
%52 = load double*, double** %23
%53 = getelementptr inbounds double, double* %52, i64 1
%54 = load double, double* %53
%55 = load double*, double** %22
%56 = load i32, i32* %17
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds double, double* %55, i64 %57
%59 = load double, double* %58
%60 = fcmp ole double %54, %59
br i1 %60, label %61, label %82
61: ; preds = %51
%62 = load double*, double** %18
%63 = getelementptr inbounds double, double* %62, i64 0
%64 = load double, double* %63
%65 = load double*, double** %24
%66 = getelementptr inbounds double, double* %65, i64 0
store double %64, double* %66
%67 = load double*, double** %18
%68 = getelementptr inbounds double, double* %67, i64 1
%69 = load double, double* %68
%70 = load double*, double** %24
%71 = getelementptr inbounds double, double* %70, i64 1
store double %69, double* %71
%72 = load double*, double** %18
%73 = getelementptr inbounds double, double* %72, i64 2
%74 = load double, double* %73
%75 = load double*, double** %24
%76 = getelementptr inbounds double, double* %75, i64 2
store double %74, double* %76
%77 = load double*, double** %18
%78 = getelementptr inbounds double, double* %77, i64 3
%79 = load double, double* %78
%80 = load double*, double** %24
%81 = getelementptr inbounds double, double* %80, i64 3
store double %79, double* %81
br label %242
82: ; preds = %51
%83 = load double*, double** %23
%84 = getelementptr inbounds double, double* %83, i64 1
%85 = load double, double* %84
%86 = load double*, double** %22
%87 = load i32, i32* %20
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds double, double* %86, i64 %88
%90 = load double, double* %89
%91 = fcmp oge double %85, %90
br i1 %91, label %92, label %128
92: ; preds = %82
%93 = load i32, i32* %37
%94 = load i32, i32* %20
%95 = sub nsw i32 %94, 1
%96 = mul nsw i32 %93, %95
store i32 %96, i32* %38
%97 = load double*, double** %18
%98 = load i32, i32* %38
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds double, double* %97, i64 %99
%101 = load double, double* %100
%102 = load double*, double** %24
%103 = getelementptr inbounds double, double* %102, i64 0
store double %101, double* %103
%104 = load double*, double** %18
%105 = load i32, i32* %38
%106 = add nsw i32 %105, 1
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds double, double* %104, i64 %107
%109 = load double, double* %108
%110 = load double*, double** %24
%111 = getelementptr inbounds double, double* %110, i64 1
store double %109, double* %111
%112 = load double*, double** %18
%113 = load i32, i32* %38
%114 = add nsw i32 %113, 2
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds double, double* %112, i64 %115
%117 = load double, double* %116
%118 = load double*, double** %24
%119 = getelementptr inbounds double, double* %118, i64 2
store double %117, double* %119
%120 = load double*, double** %18
%121 = load i32, i32* %38
%122 = add nsw i32 %121, 3
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds double, double* %120, i64 %123
%125 = load double, double* %124
%126 = load double*, double** %24
%127 = getelementptr inbounds double, double* %126, i64 3
store double %125, double* %127
br label %241
128: ; preds = %82
%129 = load double*, double** %24
%130 = getelementptr inbounds double, double* %129, i64 0
store double 0.000000e+00, double* %130
%131 = load double*, double** %24
%132 = getelementptr inbounds double, double* %131, i64 1
store double 0.000000e+00, double* %132
%133 = load double*, double** %24
%134 = getelementptr inbounds double, double* %133, i64 2
store double 0.000000e+00, double* %134
%135 = load double*, double** %24
%136 = getelementptr inbounds double, double* %135, i64 3
store double 0.000000e+00, double* %136
%137 = load i32, i32* %20
%138 = load i32, i32* %17
%139 = load double*, double** %23
%140 = getelementptr inbounds double, double* %139, i64 1
%141 = load double, double* %140
%142 = load double*, double** %22
%143 = call i32 @FindSpan(i32 %137, i32 %138, double %141, double* %142)
store i32 %143, i32* %34
%144 = load i32, i32* %34
%145 = load double*, double** %23
%146 = getelementptr inbounds double, double* %145, i64 1
%147 = load double, double* %146
%148 = load i32, i32* %17
%149 = load double*, double** %22
%150 = load double*, double** %30
%151 = load double*, double** %28
%152 = load double*, double** %29
%153 = call i32 @BasisFuns(i32 %144, double %147, i32 %148, double* %149, double* %150, double* %151, double* %152)
%154 = load i32, i32* %34
%155 = load i32, i32* %17
%156 = sub nsw i32 %154, %155
store i32 %156, i32* %35
store i32 0, i32* %31
br label %157
157: ; preds = %237, %128
%158 = load i32, i32* %31
%159 = load i32, i32* %17
%160 = icmp sle i32 %158, %159
br i1 %160, label %161, label %240
161: ; preds = %157
%162 = load double*, double** %30
%163 = load i32, i32* %31
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds double, double* %162, i64 %164
%166 = load double, double* %165
%167 = load double*, double** %18
%168 = load i32, i32* %35
%169 = load i32, i32* %31
%170 = add nsw i32 %168, %169
%171 = load i32, i32* %37
%172 = mul nsw i32 %170, %171
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds double, double* %167, i64 %173
%175 = load double, double* %174
%176 = load double*, double** %24
%177 = getelementptr inbounds double, double* %176, i64 0
%178 = load double, double* %177
%179 = call double @llvm.fmuladd.f64(double %166, double %175, double %178)
store double %179, double* %177
%180 = load double*, double** %30
%181 = load i32, i32* %31
%182 = sext i32 %181 to i64
%183 = getelementptr inbounds double, double* %180, i64 %182
%184 = load double, double* %183
%185 = load double*, double** %18
%186 = load i32, i32* %35
%187 = load i32, i32* %31
%188 = add nsw i32 %186, %187
%189 = load i32, i32* %37
%190 = mul nsw i32 %188, %189
%191 = add nsw i32 %190, 1
%192 = sext i32 %191 to i64
%193 = getelementptr inbounds double, double* %185, i64 %192
%194 = load double, double* %193
%195 = load double*, double** %24
%196 = getelementptr inbounds double, double* %195, i64 1
%197 = load double, double* %196
%198 = call double @llvm.fmuladd.f64(double %184, double %194, double %197)
store double %198, double* %196
%199 = load double*, double** %30
%200 = load i32, i32* %31
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds double, double* %199, i64 %201
%203 = load double, double* %202
%204 = load double*, double** %18
%205 = load i32, i32* %35
%206 = load i32, i32* %31
%207 = add nsw i32 %205, %206
%208 = load i32, i32* %37
%209 = mul nsw i32 %207, %208
%210 = add nsw i32 %209, 2
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds double, double* %204, i64 %211
%213 = load double, double* %212
%214 = load double*, double** %24
%215 = getelementptr inbounds double, double* %214, i64 2
%216 = load double, double* %215
%217 = call double @llvm.fmuladd.f64(double %203, double %213, double %216)
store double %217, double* %215
%218 = load double*, double** %30
%219 = load i32, i32* %31
%220 = sext i32 %219 to i64
%221 = getelementptr inbounds double, double* %218, i64 %220
%222 = load double, double* %221
%223 = load double*, double** %18
%224 = load i32, i32* %35
%225 = load i32, i32* %31
%226 = add nsw i32 %224, %225
%227 = load i32, i32* %37
%228 = mul nsw i32 %226, %227
%229 = add nsw i32 %228, 3
%230 = sext i32 %229 to i64
%231 = getelementptr inbounds double, double* %223, i64 %230
%232 = load double, double* %231
%233 = load double*, double** %24
%234 = getelementptr inbounds double, double* %233, i64 3
%235 = load double, double* %234
%236 = call double @llvm.fmuladd.f64(double %222, double %232, double %235)
store double %236, double* %234
br label %237
237: ; preds = %161
%238 = load i32, i32* %31
%239 = add nsw i32 %238, 1
store i32 %239, i32* %31
br label %157
240: ; preds = %157
br label %241
241: ; preds = %240, %92
br label %242
242: ; preds = %241, %61
br label %849
243: ; preds = %15
%244 = load double*, double** %23
%245 = getelementptr inbounds double, double* %244, i64 0
%246 = load double, double* %245
%247 = load double*, double** %21
%248 = load i32, i32* %19
%249 = sext i32 %248 to i64
%250 = getelementptr inbounds double, double* %247, i64 %249
%251 = load double, double* %250
%252 = fcmp oge double %246, %251
br i1 %252, label %253, label %462
253: ; preds = %243
%254 = load double*, double** %23
%255 = getelementptr inbounds double, double* %254, i64 1
%256 = load double, double* %255
%257 = load double*, double** %22
%258 = load i32, i32* %17
%259 = sext i32 %258 to i64
%260 = getelementptr inbounds double, double* %257, i64 %259
%261 = load double, double* %260
%262 = fcmp ole double %256, %261
br i1 %262, label %263, label %296
263: ; preds = %253
%264 = load double*, double** %18
%265 = load i32, i32* %37
%266 = sub nsw i32 %265, 4
%267 = sext i32 %266 to i64
%268 = getelementptr inbounds double, double* %264, i64 %267
%269 = load double, double* %268
%270 = load double*, double** %24
%271 = getelementptr inbounds double, double* %270, i64 0
store double %269, double* %271
%272 = load double*, double** %18
%273 = load i32, i32* %37
%274 = sub nsw i32 %273, 3
%275 = sext i32 %274 to i64
%276 = getelementptr inbounds double, double* %272, i64 %275
%277 = load double, double* %276
%278 = load double*, double** %24
%279 = getelementptr inbounds double, double* %278, i64 1
store double %277, double* %279
%280 = load double*, double** %18
%281 = load i32, i32* %37
%282 = sub nsw i32 %281, 2
%283 = sext i32 %282 to i64
%284 = getelementptr inbounds double, double* %280, i64 %283
%285 = load double, double* %284
%286 = load double*, double** %24
%287 = getelementptr inbounds double, double* %286, i64 2
store double %285, double* %287
%288 = load double*, double** %18
%289 = load i32, i32* %37
%290 = sub nsw i32 %289, 1
%291 = sext i32 %290 to i64
%292 = getelementptr inbounds double, double* %288, i64 %291
%293 = load double, double* %292
%294 = load double*, double** %24
%295 = getelementptr inbounds double, double* %294, i64 3
store double %293, double* %295
br label %461
296: ; preds = %253
%297 = load double*, double** %23
%298 = getelementptr inbounds double, double* %297, i64 1
%299 = load double, double* %298
%300 = load double*, double** %22
%301 = load i32, i32* %20
%302 = sext i32 %301 to i64
%303 = getelementptr inbounds double, double* %300, i64 %302
%304 = load double, double* %303
%305 = fcmp oge double %299, %304
br i1 %305, label %306, label %342
306: ; preds = %296
%307 = load i32, i32* %37
%308 = load i32, i32* %20
%309 = mul nsw i32 %307, %308
store i32 %309, i32* %38
%310 = load double*, double** %18
%311 = load i32, i32* %38
%312 = sub nsw i32 %311, 4
%313 = sext i32 %312 to i64
%314 = getelementptr inbounds double, double* %310, i64 %313
%315 = load double, double* %314
%316 = load double*, double** %24
%317 = getelementptr inbounds double, double* %316, i64 0
store double %315, double* %317
%318 = load double*, double** %18
%319 = load i32, i32* %38
%320 = sub nsw i32 %319, 3
%321 = sext i32 %320 to i64
%322 = getelementptr inbounds double, double* %318, i64 %321
%323 = load double, double* %322
%324 = load double*, double** %24
%325 = getelementptr inbounds double, double* %324, i64 1
store double %323, double* %325
%326 = load double*, double** %18
%327 = load i32, i32* %38
%328 = sub nsw i32 %327, 2
%329 = sext i32 %328 to i64
%330 = getelementptr inbounds double, double* %326, i64 %329
%331 = load double, double* %330
%332 = load double*, double** %24
%333 = getelementptr inbounds double, double* %332, i64 2
store double %331, double* %333
%334 = load double*, double** %18
%335 = load i32, i32* %38
%336 = sub nsw i32 %335, 1
%337 = sext i32 %336 to i64
%338 = getelementptr inbounds double, double* %334, i64 %337
%339 = load double, double* %338
%340 = load double*, double** %24
%341 = getelementptr inbounds double, double* %340, i64 3
store double %339, double* %341
br label %460
342: ; preds = %296
%343 = load double*, double** %24
%344 = getelementptr inbounds double, double* %343, i64 0
store double 0.000000e+00, double* %344
%345 = load double*, double** %24
%346 = getelementptr inbounds double, double* %345, i64 1
store double 0.000000e+00, double* %346
%347 = load double*, double** %24
%348 = getelementptr inbounds double, double* %347, i64 2
store double 0.000000e+00, double* %348
%349 = load double*, double** %24
%350 = getelementptr inbounds double, double* %349, i64 3
store double 0.000000e+00, double* %350
%351 = load i32, i32* %20
%352 = load i32, i32* %17
%353 = load double*, double** %23
%354 = getelementptr inbounds double, double* %353, i64 1
%355 = load double, double* %354
%356 = load double*, double** %22
%357 = call i32 @FindSpan(i32 %351, i32 %352, double %355, double* %356)
store i32 %357, i32* %34
%358 = load i32, i32* %34
%359 = load double*, double** %23
%360 = getelementptr inbounds double, double* %359, i64 1
%361 = load double, double* %360
%362 = load i32, i32* %17
%363 = load double*, double** %22
%364 = load double*, double** %30
%365 = load double*, double** %28
%366 = load double*, double** %29
%367 = call i32 @BasisFuns(i32 %358, double %361, i32 %362, double* %363, double* %364, double* %365, double* %366)
%368 = load i32, i32* %34
%369 = load i32, i32* %17
%370 = sub nsw i32 %368, %369
store i32 %370, i32* %35
%371 = load i32, i32* %35
%372 = add nsw i32 %371, 1
%373 = load i32, i32* %37
%374 = mul nsw i32 %372, %373
store i32 %374, i32* %38
store i32 0, i32* %31
br label %375
375: ; preds = %456, %342
%376 = load i32, i32* %31
%377 = load i32, i32* %17
%378 = icmp sle i32 %376, %377
br i1 %378, label %379, label %459
379: ; preds = %375
%380 = load double*, double** %30
%381 = load i32, i32* %31
%382 = sext i32 %381 to i64
%383 = getelementptr inbounds double, double* %380, i64 %382
%384 = load double, double* %383
%385 = load double*, double** %18
%386 = load i32, i32* %31
%387 = load i32, i32* %37
%388 = mul nsw i32 %386, %387
%389 = load i32, i32* %38
%390 = add nsw i32 %388, %389
%391 = sub nsw i32 %390, 4
%392 = sext i32 %391 to i64
%393 = getelementptr inbounds double, double* %385, i64 %392
%394 = load double, double* %393
%395 = load double*, double** %24
%396 = getelementptr inbounds double, double* %395, i64 0
%397 = load double, double* %396
%398 = call double @llvm.fmuladd.f64(double %384, double %394, double %397)
store double %398, double* %396
%399 = load double*, double** %30
%400 = load i32, i32* %31
%401 = sext i32 %400 to i64
%402 = getelementptr inbounds double, double* %399, i64 %401
%403 = load double, double* %402
%404 = load double*, double** %18
%405 = load i32, i32* %31
%406 = load i32, i32* %37
%407 = mul nsw i32 %405, %406
%408 = load i32, i32* %38
%409 = add nsw i32 %407, %408
%410 = sub nsw i32 %409, 3
%411 = sext i32 %410 to i64
%412 = getelementptr inbounds double, double* %404, i64 %411
%413 = load double, double* %412
%414 = load double*, double** %24
%415 = getelementptr inbounds double, double* %414, i64 1
%416 = load double, double* %415
%417 = call double @llvm.fmuladd.f64(double %403, double %413, double %416)
store double %417, double* %415
%418 = load double*, double** %30
%419 = load i32, i32* %31
%420 = sext i32 %419 to i64
%421 = getelementptr inbounds double, double* %418, i64 %420
%422 = load double, double* %421
%423 = load double*, double** %18
%424 = load i32, i32* %31
%425 = load i32, i32* %37
%426 = mul nsw i32 %424, %425
%427 = load i32, i32* %38
%428 = add nsw i32 %426, %427
%429 = sub nsw i32 %428, 2
%430 = sext i32 %429 to i64
%431 = getelementptr inbounds double, double* %423, i64 %430
%432 = load double, double* %431
%433 = load double*, double** %24
%434 = getelementptr inbounds double, double* %433, i64 2
%435 = load double, double* %434
%436 = call double @llvm.fmuladd.f64(double %422, double %432, double %435)
store double %436, double* %434
%437 = load double*, double** %30
%438 = load i32, i32* %31
%439 = sext i32 %438 to i64
%440 = getelementptr inbounds double, double* %437, i64 %439
%441 = load double, double* %440
%442 = load double*, double** %18
%443 = load i32, i32* %31
%444 = load i32, i32* %37
%445 = mul nsw i32 %443, %444
%446 = load i32, i32* %38
%447 = add nsw i32 %445, %446
%448 = sub nsw i32 %447, 1
%449 = sext i32 %448 to i64
%450 = getelementptr inbounds double, double* %442, i64 %449
%451 = load double, double* %450
%452 = load double*, double** %24
%453 = getelementptr inbounds double, double* %452, i64 3
%454 = load double, double* %453
%455 = call double @llvm.fmuladd.f64(double %441, double %451, double %454)
store double %455, double* %453
br label %456
456: ; preds = %379
%457 = load i32, i32* %31
%458 = add nsw i32 %457, 1
store i32 %458, i32* %31
br label %375
459: ; preds = %375
br label %460
460: ; preds = %459, %306
br label %461
461: ; preds = %460, %263
br label %848
462: ; preds = %243
%463 = load double*, double** %24
%464 = getelementptr inbounds double, double* %463, i64 0
store double 0.000000e+00, double* %464
%465 = load double*, double** %24
%466 = getelementptr inbounds double, double* %465, i64 1
store double 0.000000e+00, double* %466
%467 = load double*, double** %24
%468 = getelementptr inbounds double, double* %467, i64 2
store double 0.000000e+00, double* %468
%469 = load double*, double** %24
%470 = getelementptr inbounds double, double* %469, i64 3
store double 0.000000e+00, double* %470
%471 = load double*, double** %23
%472 = getelementptr inbounds double, double* %471, i64 1
%473 = load double, double* %472
%474 = load double*, double** %22
%475 = load i32, i32* %17
%476 = sext i32 %475 to i64
%477 = getelementptr inbounds double, double* %474, i64 %476
%478 = load double, double* %477
%479 = fcmp ole double %473, %478
br i1 %479, label %480, label %581
480: ; preds = %462
%481 = load i32, i32* %19
%482 = load i32, i32* %16
%483 = load double*, double** %23
%484 = getelementptr inbounds double, double* %483, i64 0
%485 = load double, double* %484
%486 = load double*, double** %21
%487 = call i32 @FindSpan(i32 %481, i32 %482, double %485, double* %486)
store i32 %487, i32* %33
%488 = load i32, i32* %33
%489 = load double*, double** %23
%490 = getelementptr inbounds double, double* %489, i64 0
%491 = load double, double* %490
%492 = load i32, i32* %16
%493 = load double*, double** %21
%494 = load double*, double** %27
%495 = load double*, double** %25
%496 = load double*, double** %26
%497 = call i32 @BasisFuns(i32 %488, double %491, i32 %492, double* %493, double* %494, double* %495, double* %496)
%498 = load i32, i32* %33
%499 = load i32, i32* %16
%500 = sub nsw i32 %498, %499
store i32 %500, i32* %35
store i32 0, i32* %31
br label %501
501: ; preds = %577, %480
%502 = load i32, i32* %31
%503 = load i32, i32* %16
%504 = icmp sle i32 %502, %503
br i1 %504, label %505, label %580
505: ; preds = %501
%506 = load double*, double** %27
%507 = load i32, i32* %31
%508 = sext i32 %507 to i64
%509 = getelementptr inbounds double, double* %506, i64 %508
%510 = load double, double* %509
%511 = load double*, double** %18
%512 = load i32, i32* %35
%513 = load i32, i32* %31
%514 = add nsw i32 %512, %513
%515 = mul nsw i32 %514, 4
%516 = sext i32 %515 to i64
%517 = getelementptr inbounds double, double* %511, i64 %516
%518 = load double, double* %517
%519 = load double*, double** %24
%520 = getelementptr inbounds double, double* %519, i64 0
%521 = load double, double* %520
%522 = call double @llvm.fmuladd.f64(double %510, double %518, double %521)
store double %522, double* %520
%523 = load double*, double** %27
%524 = load i32, i32* %31
%525 = sext i32 %524 to i64
%526 = getelementptr inbounds double, double* %523, i64 %525
%527 = load double, double* %526
%528 = load double*, double** %18
%529 = load i32, i32* %35
%530 = load i32, i32* %31
%531 = add nsw i32 %529, %530
%532 = mul nsw i32 %531, 4
%533 = add nsw i32 %532, 1
%534 = sext i32 %533 to i64
%535 = getelementptr inbounds double, double* %528, i64 %534
%536 = load double, double* %535
%537 = load double*, double** %24
%538 = getelementptr inbounds double, double* %537, i64 1
%539 = load double, double* %538
%540 = call double @llvm.fmuladd.f64(double %527, double %536, double %539)
store double %540, double* %538
%541 = load double*, double** %27
%542 = load i32, i32* %31
%543 = sext i32 %542 to i64
%544 = getelementptr inbounds double, double* %541, i64 %543
%545 = load double, double* %544
%546 = load double*, double** %18
%547 = load i32, i32* %35
%548 = load i32, i32* %31
%549 = add nsw i32 %547, %548
%550 = mul nsw i32 %549, 4
%551 = add nsw i32 %550, 2
%552 = sext i32 %551 to i64
%553 = getelementptr inbounds double, double* %546, i64 %552
%554 = load double, double* %553
%555 = load double*, double** %24
%556 = getelementptr inbounds double, double* %555, i64 2
%557 = load double, double* %556
%558 = call double @llvm.fmuladd.f64(double %545, double %554, double %557)
store double %558, double* %556
%559 = load double*, double** %27
%560 = load i32, i32* %31
%561 = sext i32 %560 to i64
%562 = getelementptr inbounds double, double* %559, i64 %561
%563 = load double, double* %562
%564 = load double*, double** %18
%565 = load i32, i32* %35
%566 = load i32, i32* %31
%567 = add nsw i32 %565, %566
%568 = mul nsw i32 %567, 4
%569 = add nsw i32 %568, 3
%570 = sext i32 %569 to i64
%571 = getelementptr inbounds double, double* %564, i64 %570
%572 = load double, double* %571
%573 = load double*, double** %24
%574 = getelementptr inbounds double, double* %573, i64 3
%575 = load double, double* %574
%576 = call double @llvm.fmuladd.f64(double %563, double %572, double %575)
store double %576, double* %574
br label %577
577: ; preds = %505
%578 = load i32, i32* %31
%579 = add nsw i32 %578, 1
store i32 %579, i32* %31
br label %501
580: ; preds = %501
br label %847
581: ; preds = %462
%582 = load double*, double** %23
%583 = getelementptr inbounds double, double* %582, i64 1
%584 = load double, double* %583
%585 = load double*, double** %22
%586 = load i32, i32* %20
%587 = sext i32 %586 to i64
%588 = getelementptr inbounds double, double* %585, i64 %587
%589 = load double, double* %588
%590 = fcmp oge double %584, %589
br i1 %590, label %591, label %699
591: ; preds = %581
%592 = load i32, i32* %19
%593 = load i32, i32* %16
%594 = load double*, double** %23
%595 = getelementptr inbounds double, double* %594, i64 0
%596 = load double, double* %595
%597 = load double*, double** %21
%598 = call i32 @FindSpan(i32 %592, i32 %593, double %596, double* %597)
store i32 %598, i32* %33
%599 = load i32, i32* %33
%600 = load double*, double** %23
%601 = getelementptr inbounds double, double* %600, i64 0
%602 = load double, double* %601
%603 = load i32, i32* %16
%604 = load double*, double** %21
%605 = load double*, double** %27
%606 = load double*, double** %25
%607 = load double*, double** %26
%608 = call i32 @BasisFuns(i32 %599, double %602, i32 %603, double* %604, double* %605, double* %606, double* %607)
%609 = load i32, i32* %33
%610 = load i32, i32* %16
%611 = sub nsw i32 %609, %610
store i32 %611, i32* %35
%612 = load i32, i32* %35
%613 = mul nsw i32 %612, 4
%614 = load i32, i32* %20
%615 = sub nsw i32 %614, 1
%616 = load i32, i32* %37
%617 = mul nsw i32 %615, %616
%618 = add nsw i32 %613, %617
store i32 %618, i32* %38
store i32 0, i32* %31
br label %619
619: ; preds = %695, %591
%620 = load i32, i32* %31
%621 = load i32, i32* %16
%622 = icmp sle i32 %620, %621
br i1 %622, label %623, label %698
623: ; preds = %619
%624 = load double*, double** %27
%625 = load i32, i32* %31
%626 = sext i32 %625 to i64
%627 = getelementptr inbounds double, double* %624, i64 %626
%628 = load double, double* %627
%629 = load double*, double** %18
%630 = load i32, i32* %31
%631 = mul nsw i32 %630, 4
%632 = load i32, i32* %38
%633 = add nsw i32 %631, %632
%634 = sext i32 %633 to i64
%635 = getelementptr inbounds double, double* %629, i64 %634
%636 = load double, double* %635
%637 = load double*, double** %24
%638 = getelementptr inbounds double, double* %637, i64 0
%639 = load double, double* %638
%640 = call double @llvm.fmuladd.f64(double %628, double %636, double %639)
store double %640, double* %638
%641 = load double*, double** %27
%642 = load i32, i32* %31
%643 = sext i32 %642 to i64
%644 = getelementptr inbounds double, double* %641, i64 %643
%645 = load double, double* %644
%646 = load double*, double** %18
%647 = load i32, i32* %31
%648 = mul nsw i32 %647, 4
%649 = load i32, i32* %38
%650 = add nsw i32 %648, %649
%651 = add nsw i32 %650, 1
%652 = sext i32 %651 to i64
%653 = getelementptr inbounds double, double* %646, i64 %652
%654 = load double, double* %653
%655 = load double*, double** %24
%656 = getelementptr inbounds double, double* %655, i64 1
%657 = load double, double* %656
%658 = call double @llvm.fmuladd.f64(double %645, double %654, double %657)
store double %658, double* %656
%659 = load double*, double** %27
%660 = load i32, i32* %31
%661 = sext i32 %660 to i64
%662 = getelementptr inbounds double, double* %659, i64 %661
%663 = load double, double* %662
%664 = load double*, double** %18
%665 = load i32, i32* %31
%666 = mul nsw i32 %665, 4
%667 = load i32, i32* %38
%668 = add nsw i32 %666, %667
%669 = add nsw i32 %668, 2
%670 = sext i32 %669 to i64
%671 = getelementptr inbounds double, double* %664, i64 %670
%672 = load double, double* %671
%673 = load double*, double** %24
%674 = getelementptr inbounds double, double* %673, i64 2
%675 = load double, double* %674
%676 = call double @llvm.fmuladd.f64(double %663, double %672, double %675)
store double %676, double* %674
%677 = load double*, double** %27
%678 = load i32, i32* %31
%679 = sext i32 %678 to i64
%680 = getelementptr inbounds double, double* %677, i64 %679
%681 = load double, double* %680
%682 = load double*, double** %18
%683 = load i32, i32* %31
%684 = mul nsw i32 %683, 4
%685 = load i32, i32* %38
%686 = add nsw i32 %684, %685
%687 = add nsw i32 %686, 3
%688 = sext i32 %687 to i64
%689 = getelementptr inbounds double, double* %682, i64 %688
%690 = load double, double* %689
%691 = load double*, double** %24
%692 = getelementptr inbounds double, double* %691, i64 3
%693 = load double, double* %692
%694 = call double @llvm.fmuladd.f64(double %681, double %690, double %693)
store double %694, double* %692
br label %695
695: ; preds = %623
%696 = load i32, i32* %31
%697 = add nsw i32 %696, 1
store i32 %697, i32* %31
br label %619
698: ; preds = %619
br label %846
699: ; preds = %581
%700 = load i32, i32* %19
%701 = load i32, i32* %16
%702 = load double*, double** %23
%703 = getelementptr inbounds double, double* %702, i64 0
%704 = load double, double* %703
%705 = load double*, double** %21
%706 = call i32 @FindSpan(i32 %700, i32 %701, double %704, double* %705)
store i32 %706, i32* %33
%707 = load i32, i32* %33
%708 = load double*, double** %23
%709 = getelementptr inbounds double, double* %708, i64 0
%710 = load double, double* %709
%711 = load i32, i32* %16
%712 = load double*, double** %21
%713 = load double*, double** %27
%714 = load double*, double** %25
%715 = load double*, double** %26
%716 = call i32 @BasisFuns(i32 %707, double %710, i32 %711, double* %712, double* %713, double* %714, double* %715)
%717 = load i32, i32* %20
%718 = load i32, i32* %17
%719 = load double*, double** %23
%720 = getelementptr inbounds double, double* %719, i64 1
%721 = load double, double* %720
%722 = load double*, double** %22
%723 = call i32 @FindSpan(i32 %717, i32 %718, double %721, double* %722)
store i32 %723, i32* %34
%724 = load i32, i32* %34
%725 = load double*, double** %23
%726 = getelementptr inbounds double, double* %725, i64 1
%727 = load double, double* %726
%728 = load i32, i32* %17
%729 = load double*, double** %22
%730 = load double*, double** %30
%731 = load double*, double** %28
%732 = load double*, double** %29
%733 = call i32 @BasisFuns(i32 %724, double %727, i32 %728, double* %729, double* %730, double* %731, double* %732)
%734 = load i32, i32* %33
%735 = load i32, i32* %16
%736 = sub nsw i32 %734, %735
store i32 %736, i32* %35
%737 = load i32, i32* %34
%738 = load i32, i32* %17
%739 = sub nsw i32 %737, %738
store i32 %739, i32* %36
%740 = load i32, i32* %36
%741 = load i32, i32* %37
%742 = mul nsw i32 %740, %741
%743 = load i32, i32* %35
%744 = mul nsw i32 %743, 4
%745 = add nsw i32 %742, %744
store i32 %745, i32* %38
store i32 0, i32* %31
br label %746
746: ; preds = %842, %699
%747 = load i32, i32* %31
%748 = load i32, i32* %17
%749 = icmp sle i32 %747, %748
br i1 %749, label %750, label %845
750: ; preds = %746
store i32 0, i32* %32
br label %751
751: ; preds = %838, %750
%752 = load i32, i32* %32
%753 = load i32, i32* %16
%754 = icmp sle i32 %752, %753
br i1 %754, label %755, label %841
755: ; preds = %751
%756 = load double*, double** %30
%757 = load i32, i32* %31
%758 = sext i32 %757 to i64
%759 = getelementptr inbounds double, double* %756, i64 %758
%760 = load double, double* %759
%761 = load double*, double** %27
%762 = load i32, i32* %32
%763 = sext i32 %762 to i64
%764 = getelementptr inbounds double, double* %761, i64 %763
%765 = load double, double* %764
%766 = fmul double %760, %765
store double %766, double* %39
%767 = load double, double* %39
%768 = load double*, double** %18
%769 = load i32, i32* %31
%770 = load i32, i32* %37
%771 = mul nsw i32 %769, %770
%772 = load i32, i32* %32
%773 = mul nsw i32 %772, 4
%774 = add nsw i32 %771, %773
%775 = load i32, i32* %38
%776 = add nsw i32 %774, %775
%777 = sext i32 %776 to i64
%778 = getelementptr inbounds double, double* %768, i64 %777
%779 = load double, double* %778
%780 = load double*, double** %24
%781 = getelementptr inbounds double, double* %780, i64 0
%782 = load double, double* %781
%783 = call double @llvm.fmuladd.f64(double %767, double %779, double %782)
store double %783, double* %781
%784 = load double, double* %39
%785 = load double*, double** %18
%786 = load i32, i32* %31
%787 = load i32, i32* %37
%788 = mul nsw i32 %786, %787
%789 = load i32, i32* %32
%790 = mul nsw i32 %789, 4
%791 = add nsw i32 %788, %790
%792 = load i32, i32* %38
%793 = add nsw i32 %791, %792
%794 = add nsw i32 %793, 1
%795 = sext i32 %794 to i64
%796 = getelementptr inbounds double, double* %785, i64 %795
%797 = load double, double* %796
%798 = load double*, double** %24
%799 = getelementptr inbounds double, double* %798, i64 1
%800 = load double, double* %799
%801 = call double @llvm.fmuladd.f64(double %784, double %797, double %800)
store double %801, double* %799
%802 = load double, double* %39
%803 = load double*, double** %18
%804 = load i32, i32* %31
%805 = load i32, i32* %37
%806 = mul nsw i32 %804, %805
%807 = load i32, i32* %32
%808 = mul nsw i32 %807, 4
%809 = add nsw i32 %806, %808
%810 = load i32, i32* %38
%811 = add nsw i32 %809, %810
%812 = add nsw i32 %811, 2
%813 = sext i32 %812 to i64
%814 = getelementptr inbounds double, double* %803, i64 %813
%815 = load double, double* %814
%816 = load double*, double** %24
%817 = getelementptr inbounds double, double* %816, i64 2
%818 = load double, double* %817
%819 = call double @llvm.fmuladd.f64(double %802, double %815, double %818)
store double %819, double* %817
%820 = load double, double* %39
%821 = load double*, double** %18
%822 = load i32, i32* %31
%823 = load i32, i32* %37
%824 = mul nsw i32 %822, %823
%825 = load i32, i32* %32
%826 = mul nsw i32 %825, 4
%827 = add nsw i32 %824, %826
%828 = load i32, i32* %38
%829 = add nsw i32 %827, %828
%830 = add nsw i32 %829, 3
%831 = sext i32 %830 to i64
%832 = getelementptr inbounds double, double* %821, i64 %831
%833 = load double, double* %832
%834 = load double*, double** %24
%835 = getelementptr inbounds double, double* %834, i64 3
%836 = load double, double* %835
%837 = call double @llvm.fmuladd.f64(double %820, double %833, double %836)
store double %837, double* %835
br label %838
838: ; preds = %755
%839 = load i32, i32* %32
%840 = add nsw i32 %839, 1
store i32 %840, i32* %32
br label %751
841: ; preds = %751
br label %842
842: ; preds = %841
%843 = load i32, i32* %31
%844 = add nsw i32 %843, 1
store i32 %844, i32* %31
br label %746
845: ; preds = %746
br label %846
846: ; preds = %845, %698
br label %847
847: ; preds = %846, %580
br label %848
848: ; preds = %847, %461
br label %849
849: ; preds = %848, %242
ret void
}

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