#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 *);
int /*<<< orphan*/ findNURBSbasisFunIso(int, int, int, double *, double, double,
                                        double, int, int, double *, int, int,
                                        double *, double *, double *, double *,
                                        double *, double *, double *, double *);
int /*<<< orphan*/ findNURBSbasisFunU(int, int, double *, double, double, int,
                                      double *, int, double *, double *,
                                      double *, double *, int);
int /*<<< orphan*/ findNURBSbasisFunV(int, int, double *, double, double, int,
                                      double *, int, int, double *, double *,
                                      double *, double *, int);
void NURBSsurfaceBasisMax(int degU, int degV, double *cp, int ncp, int kcp,
                          double *knotU, double *knotV, double *us,
                          double *leftU, double *rightU, double *NU,
                          double *leftV, double *rightV, double *NV) {
  int i, j, ii, jj, spanU, spanV, ind, ind2, fourncp, myint, nus, orderU,
      orderV;
  double wgh, uv[2], funVal, stepU, stepV;
  fourncp = 4 * ncp;
  orderU = degU + 1;
  orderV = degV + 1;
  us[0] = knotU[0];
  us[1] = knotV[0];
  nus = 1;
  ind2 = 3;
  for (jj = 1; jj <= (ncp - 2); jj++) {
    uv[0] = 0.5 * (knotU[jj] + knotU[jj + orderU]);
    spanU = FindSpan(ncp, degU, uv[0], knotU);
    BasisFuns(spanU, uv[0], degU, knotU, NU, leftU, rightU);
    ind = spanU - degU;
    myint = ind * 4 + ind2;
    wgh = 0.0;
    for (j = 0; j <= degU; j++) {
      wgh += NU[j] * cp[j * 4 + myint];
    }
    funVal = NU[jj - ind] * cp[4 * jj + 3] / wgh;
    stepU = 0.25 * (knotU[jj + orderU] - knotU[jj]);
    findNURBSbasisFunU(jj, 15, uv, funVal, stepU, degU, cp, ncp, knotU, leftU,
                       rightU, NU, ind2);
    us[2 * nus] = uv[0];
    us[2 * nus + 1] = knotV[0];
    nus++;
  }
  us[2 * nus] = knotU[ncp];
  us[2 * nus + 1] = knotV[0];
  nus++;
  for (ii = 1; ii <= (kcp - 2); ii++) {
    uv[1] = 0.5 * (knotV[ii] + knotV[ii + orderV]);
    spanV = FindSpan(kcp, degV, uv[1], knotV);
    BasisFuns(spanV, uv[1], degV, knotV, NV, leftV, rightV);
    ind2 = spanV - degV;
    myint = ind2 * fourncp + 3;
    wgh = 0.0;
    for (i = 0; i <= degV; i++) {
      wgh += NV[i] * cp[i * fourncp + myint];
    }
    funVal = NV[ii - ind2] * cp[ii * fourncp + 3] / wgh;
    stepV = 0.25 * (knotV[ii + orderV] - knotV[ii]);
    findNURBSbasisFunV(ii, 15, uv, funVal, stepV, degV, cp, fourncp, kcp, knotV,
                       leftV, rightV, NV, 3);
    us[2 * nus] = knotU[0];
    us[2 * nus + 1] = uv[1];
    nus++;
    for (jj = 1; jj <= (ncp - 2); jj++) {
      uv[0] = 0.5 * (knotU[jj] + knotU[jj + orderU]);
      uv[1] = 0.5 * (knotV[ii] + knotV[ii + orderV]);
      spanU = FindSpan(ncp, degU, uv[0], knotU);
      BasisFuns(spanU, uv[0], degU, knotU, NU, leftU, rightU);
      ind = spanU - degU;
      spanV = FindSpan(kcp, degV, uv[1], knotV);
      BasisFuns(spanV, uv[1], degV, knotV, NV, leftV, rightV);
      ind2 = spanV - degV;
      myint = ind2 * fourncp + ind * 4 + 3;
      wgh = 0.0;
      for (i = 0; i <= degV; i++) {
        for (j = 0; j <= degU; j++) {
          wgh += NV[i] * NU[j] * cp[i * fourncp + j * 4 + myint];
        }
      }
      funVal =
          NV[ii - ind2] * NU[jj - ind] * cp[ii * fourncp + 4 * jj + 3] / wgh;
      stepU = 0.25 * (knotU[jj + orderU] - knotU[jj]);
      stepV = 0.25 * (knotV[ii + orderV] - knotV[ii]);
      findNURBSbasisFunIso(ii, jj, 15, uv, funVal, stepU, stepV, degU, degV, cp,
                           ncp, kcp, knotU, knotV, leftU, rightU, NU, leftV,
                           rightV, NV);
      us[2 * nus] = uv[0];
      us[2 * nus + 1] = uv[1];
      nus++;
    }
    uv[1] = 0.5 * (knotV[ii] + knotV[ii + orderV]);
    spanV = FindSpan(kcp, degV, uv[1], knotV);
    BasisFuns(spanV, uv[1], degV, knotV, NV, leftV, rightV);
    ind2 = spanV - degV;
    myint = (ind2 + 1) * fourncp - 1;
    wgh = 0.0;
    for (i = 0; i <= degV; i++) {
      wgh += NV[i] * cp[i * fourncp + myint];
    }
    funVal = NV[ii - ind2] * cp[ii * fourncp + 4 * (ncp - 1) + 3] / wgh;
    stepV = 0.25 * (knotV[ii + orderV] - knotV[ii]);
    findNURBSbasisFunV(ii, 15, uv, funVal, stepV, degV, cp, fourncp, kcp, knotV,
                       leftV, rightV, NV, fourncp - 1);
    us[2 * nus] = knotU[ncp];
    us[2 * nus + 1] = uv[1];
    nus++;
  }
  us[2 * nus] = knotU[0];
  us[2 * nus + 1] = knotV[kcp];
  nus++;
  ind2 = fourncp * (kcp - 1) + 3;
  for (jj = 1; jj <= (ncp - 2); jj++) {
    uv[0] = 0.5 * (knotU[jj] + knotU[jj + orderU]);
    spanU = FindSpan(ncp, degU, uv[0], knotU);
    BasisFuns(spanU, uv[0], degU, knotU, NU, leftU, rightU);
    ind = spanU - degU;
    myint = ind * 4 + ind2;
    wgh = 0.0;
    for (j = 0; j <= degU; j++) {
      wgh += NU[j] * cp[j * 4 + myint];
    }
    funVal = NU[jj - ind] * cp[4 * jj + ind2] / wgh;
    stepU = 0.25 * (knotU[jj + orderU] - knotU[jj]);
    findNURBSbasisFunU(jj, 15, uv, funVal, stepU, degU, cp, ncp, knotU, leftU,
                       rightU, NU, ind2);
    us[2 * nus] = uv[0];
    us[2 * nus + 1] = knotV[kcp];
    nus++;
  }
  us[2 * nus] = knotU[ncp];
  us[2 * nus + 1] = knotV[kcp];
}


x86 assembly (clang, -O0):
<NURBSsurfaceBasisMax>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
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,-0x2c(%rbp)
mov    %esi,-0x30(%rbp)
mov    %rdx,-0x38(%rbp)
mov    %ecx,-0x3c(%rbp)
mov    %r8d,-0x40(%rbp)
mov    %r9,-0x48(%rbp)
mov    -0x3c(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x48(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movl   $0x1,-0x74(%rbp)
movl   $0x3,-0x68(%rbp)
movl   $0x1,-0x58(%rbp)
mov    -0x58(%rbp),%eax
mov    -0x3c(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jg     13f7 <NURBSsurfaceBasisMax+0x2a7>
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    -0x78(%rbp),%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm1
movsd  0xdde(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x3c(%rbp),%edi
mov    -0x2c(%rbp),%esi
movsd  -0xa0(%rbp),%xmm0
ff
mov    -0x48(%rbp),%rdx
call   1060 <FindSpan@plt>
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%edi
movsd  -0xa0(%rbp),%xmm0
ff
mov    -0x2c(%rbp),%esi
mov    -0x48(%rbp),%rdx
mov    0x30(%rbp),%rcx
mov    0x20(%rbp),%r8
mov    0x28(%rbp),%r9
call   1050 <BasisFuns@plt>
mov    -0x5c(%rbp),%eax
sub    -0x2c(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x64(%rbp),%eax
shl    $0x2,%eax
add    -0x68(%rbp),%eax
mov    %eax,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jg     12e6 <NURBSsurfaceBasisMax+0x196>
mov    0x30(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
mov    -0x50(%rbp),%ecx
shl    $0x2,%ecx
add    -0x70(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1292 <NURBSsurfaceBasisMax+0x142>
mov    0x30(%rbp),%rax
mov    -0x58(%rbp),%ecx
sub    -0x64(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
mov    -0x58(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
divsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    -0x78(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm1
movsd  0xcc4(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x58(%rbp),%edi
lea    -0xa0(%rbp),%rdx
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm1
ff
mov    -0x2c(%rbp),%ecx
mov    -0x38(%rbp),%r8
mov    -0x3c(%rbp),%r9d
mov    -0x48(%rbp),%r14
mov    0x20(%rbp),%rbx
mov    0x28(%rbp),%r11
mov    0x30(%rbp),%r10
mov    -0x68(%rbp),%eax
mov    $0xf,%esi
mov    %r14,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r11,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %eax,0x20(%rsp)
call   1070 <findNURBSbasisFunU@plt>
movsd  -0xa0(%rbp),%xmm0
ff
mov    0x18(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x18(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    11ea <NURBSsurfaceBasisMax+0x9a>
mov    -0x48(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x18(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
movl   $0x1,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    -0x40(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jg     1bef <NURBSsurfaceBasisMax+0xa9f>
mov    0x10(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    0x10(%rbp),%rax
mov    -0x54(%rbp),%ecx
add    -0x7c(%rbp),%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm1
movsd  0xb85(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x40(%rbp),%edi
mov    -0x30(%rbp),%esi
movsd  -0x98(%rbp),%xmm0
ff
mov    0x10(%rbp),%rdx
call   1060 <FindSpan@plt>
mov    %eax,-0x60(%rbp)
mov    -0x60(%rbp),%edi
movsd  -0x98(%rbp),%xmm0
ff
mov    -0x30(%rbp),%esi
mov    0x10(%rbp),%rdx
mov    0x48(%rbp),%rcx
mov    0x38(%rbp),%r8
mov    0x40(%rbp),%r9
call   1050 <BasisFuns@plt>
mov    -0x60(%rbp),%eax
sub    -0x30(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    -0x68(%rbp),%eax
imul   -0x6c(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x30(%rbp),%eax
jg     1541 <NURBSsurfaceBasisMax+0x3f1>
mov    0x48(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
mov    -0x4c(%rbp),%ecx
imul   -0x6c(%rbp),%ecx
add    -0x70(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    14ec <NURBSsurfaceBasisMax+0x39c>
mov    0x48(%rbp),%rax
mov    -0x54(%rbp),%ecx
sub    -0x68(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0x6c(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
divsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
mov    0x10(%rbp),%rax
mov    -0x54(%rbp),%ecx
add    -0x7c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    0x10(%rbp),%rax
movslq -0x54(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm1
movsd  0xa68(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x54(%rbp),%edi
lea    -0xa0(%rbp),%rdx
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm1
ff
mov    -0x30(%rbp),%ecx
mov    -0x38(%rbp),%r8
mov    -0x6c(%rbp),%r9d
mov    -0x40(%rbp),%r14d
mov    0x10(%rbp),%rbx
mov    0x38(%rbp),%r11
mov    0x40(%rbp),%r10
mov    0x48(%rbp),%rax
mov    $0xf,%esi
mov    %r14d,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r11,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %rax,0x20(%rsp)
movl   $0x3,0x28(%rsp)
call   1040 <findNURBSbasisFunV@plt>
mov    -0x48(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x18(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x98(%rbp),%xmm0
ff
mov    0x18(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
movl   $0x1,-0x58(%rbp)
mov    -0x58(%rbp),%eax
mov    -0x3c(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jg     19d1 <NURBSsurfaceBasisMax+0x881>
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    -0x78(%rbp),%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm1
movsd  0x972(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    0x10(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    0x10(%rbp),%rax
mov    -0x54(%rbp),%ecx
add    -0x7c(%rbp),%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm1
movsd  0x93f(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x3c(%rbp),%edi
mov    -0x2c(%rbp),%esi
movsd  -0xa0(%rbp),%xmm0
ff
mov    -0x48(%rbp),%rdx
call   1060 <FindSpan@plt>
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%edi
movsd  -0xa0(%rbp),%xmm0
ff
mov    -0x2c(%rbp),%esi
mov    -0x48(%rbp),%rdx
mov    0x30(%rbp),%rcx
mov    0x20(%rbp),%r8
mov    0x28(%rbp),%r9
call   1050 <BasisFuns@plt>
mov    -0x5c(%rbp),%eax
sub    -0x2c(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x40(%rbp),%edi
mov    -0x30(%rbp),%esi
movsd  -0x98(%rbp),%xmm0
ff
mov    0x10(%rbp),%rdx
call   1060 <FindSpan@plt>
mov    %eax,-0x60(%rbp)
mov    -0x60(%rbp),%edi
movsd  -0x98(%rbp),%xmm0
ff
mov    -0x30(%rbp),%esi
mov    0x10(%rbp),%rdx
mov    0x48(%rbp),%rcx
mov    0x38(%rbp),%r8
mov    0x40(%rbp),%r9
call   1050 <BasisFuns@plt>
mov    -0x60(%rbp),%eax
sub    -0x30(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    -0x68(%rbp),%eax
imul   -0x6c(%rbp),%eax
mov    -0x64(%rbp),%ecx
shl    $0x2,%ecx
add    %ecx,%eax
add    $0x3,%eax
mov    %eax,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x30(%rbp),%eax
jg     1810 <NURBSsurfaceBasisMax+0x6c0>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jg     17fd <NURBSsurfaceBasisMax+0x6ad>
mov    0x48(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x30(%rbp),%rax
movslq -0x50(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
mov    -0x4c(%rbp),%ecx
imul   -0x6c(%rbp),%ecx
mov    -0x50(%rbp),%edx
shl    $0x2,%edx
add    %edx,%ecx
add    -0x70(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1793 <NURBSsurfaceBasisMax+0x643>
jmp    1802 <NURBSsurfaceBasisMax+0x6b2>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1780 <NURBSsurfaceBasisMax+0x630>
mov    0x48(%rbp),%rax
mov    -0x54(%rbp),%ecx
sub    -0x68(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x30(%rbp),%rax
mov    -0x58(%rbp),%ecx
sub    -0x64(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0x6c(%rbp),%ecx
mov    -0x58(%rbp),%edx
shl    $0x2,%edx
add    %edx,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
divsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    -0x78(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm1
movsd  0x77f(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    0x10(%rbp),%rax
mov    -0x54(%rbp),%ecx
add    -0x7c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    0x10(%rbp),%rax
movslq -0x54(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm1
movsd  0x74c(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x54(%rbp),%edi
mov    -0x58(%rbp),%esi
lea    -0xa0(%rbp),%rcx
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm1
ff
movsd  -0xb8(%rbp),%xmm2
ff
mov    -0x2c(%rbp),%r8d
mov    -0x30(%rbp),%r9d
mov    -0x38(%rbp),%rax
mov    -0x3c(%rbp),%edx
mov    %edx,-0xc8(%rbp)
mov    -0x40(%rbp),%edx
mov    %edx,-0xc4(%rbp)
mov    -0x48(%rbp),%r13
mov    0x10(%rbp),%r12
mov    0x20(%rbp),%r15
mov    0x28(%rbp),%r14
mov    0x30(%rbp),%rbx
mov    0x38(%rbp),%r11
mov    0x40(%rbp),%r10
mov    0x48(%rbp),%rdx
mov    %rdx,-0xc0(%rbp)
mov    $0xf,%edx
mov    %rax,(%rsp)
mov    -0xc8(%rbp),%eax
mov    %eax,0x8(%rsp)
mov    -0xc4(%rbp),%eax
mov    %eax,0x10(%rsp)
mov    -0xc0(%rbp),%rax
mov    %r13,0x18(%rsp)
mov    %r12,0x20(%rsp)
mov    %r15,0x28(%rsp)
mov    %r14,0x30(%rsp)
mov    %rbx,0x38(%rsp)
mov    %r11,0x40(%rsp)
mov    %r10,0x48(%rsp)
mov    %rax,0x50(%rsp)
call   1030 <findNURBSbasisFunIso@plt>
movsd  -0xa0(%rbp),%xmm0
ff
mov    0x18(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x98(%rbp),%xmm0
ff
mov    0x18(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    1656 <NURBSsurfaceBasisMax+0x506>
mov    0x10(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    0x10(%rbp),%rax
mov    -0x54(%rbp),%ecx
add    -0x7c(%rbp),%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm1
movsd  0x608(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x40(%rbp),%edi
mov    -0x30(%rbp),%esi
movsd  -0x98(%rbp),%xmm0
ff
mov    0x10(%rbp),%rdx
call   1060 <FindSpan@plt>
mov    %eax,-0x60(%rbp)
mov    -0x60(%rbp),%edi
movsd  -0x98(%rbp),%xmm0
ff
mov    -0x30(%rbp),%esi
mov    0x10(%rbp),%rdx
mov    0x48(%rbp),%rcx
mov    0x38(%rbp),%r8
mov    0x40(%rbp),%r9
call   1050 <BasisFuns@plt>
mov    -0x60(%rbp),%eax
sub    -0x30(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    -0x68(%rbp),%eax
add    $0x1,%eax
imul   -0x6c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x30(%rbp),%eax
jg     1ac1 <NURBSsurfaceBasisMax+0x971>
mov    0x48(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
mov    -0x4c(%rbp),%ecx
imul   -0x6c(%rbp),%ecx
add    -0x70(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1a6c <NURBSsurfaceBasisMax+0x91c>
mov    0x48(%rbp),%rax
mov    -0x54(%rbp),%ecx
sub    -0x68(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0x6c(%rbp),%ecx
mov    -0x3c(%rbp),%edx
sub    $0x1,%edx
shl    $0x2,%edx
add    %edx,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
divsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
mov    0x10(%rbp),%rax
mov    -0x54(%rbp),%ecx
add    -0x7c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    0x10(%rbp),%rax
movslq -0x54(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm1
movsd  0x4dd(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x54(%rbp),%edi
lea    -0xa0(%rbp),%rdx
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm1
ff
mov    -0x30(%rbp),%ecx
mov    -0x38(%rbp),%r8
mov    -0x6c(%rbp),%r9d
mov    -0x40(%rbp),%r15d
mov    0x10(%rbp),%r14
mov    0x38(%rbp),%rbx
mov    0x40(%rbp),%r11
mov    0x48(%rbp),%r10
mov    -0x6c(%rbp),%eax
sub    $0x1,%eax
mov    $0xf,%esi
mov    %r15d,(%rsp)
mov    %r14,0x8(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r10,0x20(%rsp)
mov    %eax,0x28(%rsp)
call   1040 <findNURBSbasisFunV@plt>
mov    -0x48(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x98(%rbp),%xmm0
ff
mov    0x18(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1443 <NURBSsurfaceBasisMax+0x2f3>
mov    -0x48(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x18(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x6c(%rbp),%eax
mov    -0x40(%rbp),%ecx
sub    $0x1,%ecx
imul   %ecx,%eax
add    $0x3,%eax
mov    %eax,-0x68(%rbp)
movl   $0x1,-0x58(%rbp)
mov    -0x58(%rbp),%eax
mov    -0x3c(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jg     1e5f <NURBSsurfaceBasisMax+0xd0f>
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    -0x78(%rbp),%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm1
movsd  0x37b(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x3c(%rbp),%edi
mov    -0x2c(%rbp),%esi
movsd  -0xa0(%rbp),%xmm0
ff
mov    -0x48(%rbp),%rdx
call   1060 <FindSpan@plt>
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%edi
movsd  -0xa0(%rbp),%xmm0
ff
mov    -0x2c(%rbp),%esi
mov    -0x48(%rbp),%rdx
mov    0x30(%rbp),%rcx
mov    0x20(%rbp),%r8
mov    0x28(%rbp),%r9
call   1050 <BasisFuns@plt>
mov    -0x5c(%rbp),%eax
sub    -0x2c(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x64(%rbp),%eax
shl    $0x2,%eax
add    -0x68(%rbp),%eax
mov    %eax,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jg     1d49 <NURBSsurfaceBasisMax+0xbf9>
mov    0x30(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
mov    -0x50(%rbp),%ecx
shl    $0x2,%ecx
add    -0x70(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1cf5 <NURBSsurfaceBasisMax+0xba5>
mov    0x30(%rbp),%rax
mov    -0x58(%rbp),%ecx
sub    -0x64(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
mov    -0x58(%rbp),%ecx
shl    $0x2,%ecx
add    -0x68(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
divsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    -0x78(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm1
movsd  0x261(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x58(%rbp),%edi
lea    -0xa0(%rbp),%rdx
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm1
ff
mov    -0x2c(%rbp),%ecx
mov    -0x38(%rbp),%r8
mov    -0x3c(%rbp),%r9d
mov    -0x48(%rbp),%r14
mov    0x20(%rbp),%rbx
mov    0x28(%rbp),%r11
mov    0x30(%rbp),%r10
mov    -0x68(%rbp),%eax
mov    $0xf,%esi
mov    %r14,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r11,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %eax,0x20(%rsp)
call   1070 <findNURBSbasisFunU@plt>
movsd  -0xa0(%rbp),%xmm0
ff
mov    0x18(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    1c4d <NURBSsurfaceBasisMax+0xafd>
mov    -0x48(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
add    $0xf8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<NURBSsurfaceBasisMax>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
mov    %r9,%r15
mov    %r8d,%r10d
mov    %ecx,%r8d
mov    %rdx,%rbx
mov    %rsi,0x48(%rsp)
mov    %edi,%esi
mov    0x150(%rsp),%rbp
mov    0x138(%rsp),%rcx
mov    0x130(%rsp),%r12
lea    0x1(%rsi),%eax
movsd  (%r9),%xmm0
movsd  %xmm0,(%rcx)
movsd  (%r12),%xmm0
movsd  %xmm0,0x8(%rcx)
mov    $0x1,%edx
movslq %eax,%rcx
mov    %rcx,%rax
mov    %rcx,0x88(%rsp)
mov    %ecx,%r9d
cmp    $0x3,%r8d
mov    %r15,0x60(%rsp)
mov    %r8,0x68(%rsp)
mov    %rsi,0x28(%rsp)
mov    %r9,0x58(%rsp)
mov    %r10,0x40(%rsp)
jl     13fc <NURBSsurfaceBasisMax+0x2ac>
lea    -0x1(%r8),%edx
and    $0xfffffffe,%r9d
mov    %r9,0x50(%rsp)
lea    0x38(%rbx),%rax
mov    %rax,0x8(%rsp)
mov    $0x1,%r14d
mov    0x140(%rsp),%r13
mov    %rdx,0x30(%rsp)
jmp    12d8 <NURBSsurfaceBasisMax+0x188>
nopw   0x0(%rax,%rax,1)
xorpd  %xmm1,%xmm1
mov    0x38(%rsp),%rdi
movslq %r12d,%rax
mov    %r14,%rdx
sub    %rax,%rdx
movsd  0x0(%rbp,%rdx,8),%xmm0
lea    0x0(,%r14,4),%eax
mulsd  0x18(%rbx,%rax,8),%xmm0
divsd  %xmm1,%xmm0
mov    0x60(%rsp),%r15
movsd  (%r15,%rdi,8),%xmm1
subsd  (%r15,%r14,8),%xmm1
mulsd  0x1db5(%rip),%xmm1
sub    $0x8,%rsp
mov    %r14d,%edi
mov    $0xf,%esi
lea    0x18(%rsp),%rdx
mov    %rbx,%r8
mov    0x70(%rsp),%r12
mov    %r12d,%r9d
push   $0x3
push   %rbp
mov    0x160(%rsp),%rax
push   %rax
mov    0x160(%rsp),%r13
push   %r13
push   %r15
call   1070 <findNURBSbasisFunU@plt>
mov    %r12,%r8
mov    0x58(%rsp),%rsi
add    $0x30,%rsp
movsd  0x10(%rsp),%xmm0
mov    %r14,%rax
shl    $0x4,%rax
mov    0x138(%rsp),%rcx
movsd  %xmm0,(%rcx,%rax,1)
mov    0x130(%rsp),%r12
movsd  (%r12),%xmm0
movsd  %xmm0,0x8(%rcx,%rax,1)
add    $0x1,%r14
mov    0x30(%rsp),%rdx
cmp    %rdx,%r14
je     13f2 <NURBSsurfaceBasisMax+0x2a2>
movsd  (%r15,%r14,8),%xmm0
mov    0x88(%rsp),%rax
add    %r14,%rax
mov    %rax,0x38(%rsp)
addsd  (%r15,%rax,8),%xmm0
mulsd  0x1d04(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    %r8d,%edi
mov    %r15,%rdx
call   1060 <FindSpan@plt>
mov    %eax,%r12d
movsd  0x10(%rsp),%xmm0
mov    %eax,%edi
mov    0x28(%rsp),%rsi
mov    %r15,%rdx
mov    %rbp,%rcx
mov    %r13,%r8
mov    0x148(%rsp),%r9
call   1050 <BasisFuns@plt>
mov    0x28(%rsp),%rcx
sub    %ecx,%r12d
test   %ecx,%ecx
js     1210 <NURBSsurfaceBasisMax+0xc0>
lea    0x3(,%r12,4),%eax
movslq %eax,%r8
je     13c0 <NURBSsurfaceBasisMax+0x270>
mov    0x8(%rsp),%rax
lea    (%rax,%r8,8),%rdx
add    $0xffffffffffffffe8,%rdx
xorpd  %xmm0,%xmm0
xor    %esi,%esi
mov    0x58(%rsp),%r9
mov    0x50(%rsp),%rax
mov    0x38(%rsp),%rdi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  0x0(%rbp,%rsi,8),%xmm2
mulsd  -0x20(%rdx),%xmm2
movsd  0x8(%rbp,%rsi,8),%xmm1
addsd  %xmm0,%xmm2
mulsd  (%rdx),%xmm1
addsd  %xmm2,%xmm1
add    $0x2,%rsi
add    $0x40,%rdx
movapd %xmm1,%xmm0
cmp    %rsi,%rax
jne    1380 <NURBSsurfaceBasisMax+0x230>
test   $0x1,%r9b
je     1219 <NURBSsurfaceBasisMax+0xc9>
jmp    13da <NURBSsurfaceBasisMax+0x28a>
nopw   0x0(%rax,%rax,1)
xorpd  %xmm1,%xmm1
xor    %esi,%esi
mov    0x58(%rsp),%r9
mov    0x38(%rsp),%rdi
test   $0x1,%r9b
je     1219 <NURBSsurfaceBasisMax+0xc9>
movsd  0x0(%rbp,%rsi,8),%xmm0
lea    (%r8,%rsi,4),%rax
mulsd  (%rbx,%rax,8),%xmm0
addsd  %xmm0,%xmm1
jmp    1219 <NURBSsurfaceBasisMax+0xc9>
mov    0x58(%rsp),%r9
mov    0x40(%rsp),%r10
lea    0x0(,%r8,4),%r11d
movslq %r8d,%rax
mov    %rax,0xb0(%rsp)
movsd  (%r15,%rax,8),%xmm0
lea    (%rdx,%rdx,1),%eax
mov    0x138(%rsp),%rcx
movsd  %xmm0,(%rcx,%rax,8)
movsd  (%r12),%xmm0
lea    (%rdx,%rdx,1),%eax
add    $0x1,%eax
movsd  %xmm0,(%rcx,%rax,8)
lea    0x1(%rdx),%edi
cmp    $0x2,%r10d
jg     144d <NURBSsurfaceBasisMax+0x2fd>
lea    -0x1(%r10),%eax
mov    %rax,0x70(%rsp)
jmp    1d7b <NURBSsurfaceBasisMax+0xc2b>
lea    -0x1(%r11),%eax
mov    %rax,0xd0(%rsp)
mov    0x48(%rsp),%r12
lea    0x1(%r12),%ecx
lea    -0x1(%r8),%eax
mov    %rax,0xe8(%rsp)
lea    -0x1(%r10),%eax
mov    %rax,0x70(%rsp)
lea    -0x1(%rcx),%rax
mov    %rax,0xb8(%rsp)
mov    %rcx,0x80(%rsp)
and    $0xfffffffe,%ecx
mov    %rcx,0xa8(%rsp)
mov    $0x1,%eax
sub    %r12d,%eax
mov    %rax,0xa0(%rsp)
lea    0x0(,%r8,8),%eax
mov    %eax,0x78(%rsp)
mov    %r12d,%eax
neg    %eax
mov    %eax,0x7c(%rsp)
lea    0x0(,%rsi,4),%eax
neg    %eax
mov    %eax,0x9c(%rsp)
lea    0x0(,%r9,4),%r13
and    $0xfffffffffffffff8,%r13
mov    $0x2,%eax
sub    %r12d,%eax
mov    %rax,0xc8(%rsp)
mov    %r11,0x20(%rsp)
mov    %r11d,%eax
mov    %rax,0xe0(%rsp)
mov    $0x1,%eax
mov    0x130(%rsp),%r14
jmp    1600 <NURBSsurfaceBasisMax+0x4b0>
nopw   0x0(%rax,%rax,1)
xorpd  %xmm1,%xmm1
mov    0x20(%rsp),%r9
mov    0x158(%rsp),%r11
mov    (%rsp),%rdi
movslq %r8d,%rax
mov    %rdi,%rcx
sub    %rax,%rcx
movsd  (%r14,%rcx,8),%xmm0
mov    0xd0(%rsp),%r10
mov    0xc0(%rsp),%rax
add    %r10d,%eax
cltq
mulsd  (%rbx,%rax,8),%xmm0
divsd  %xmm1,%xmm0
mov    %r14,%r15
mov    0x130(%rsp),%r14
mov    0x8(%rsp),%rax
movsd  (%r14,%rax,8),%xmm1
subsd  (%r14,%rdi,8),%xmm1
mulsd  0x1a92(%rip),%xmm1
mov    $0xf,%esi
lea    0x10(%rsp),%rdx
mov    %r12d,%ecx
mov    %rbx,%r8
push   %r10
push   %r15
mov    0x170(%rsp),%rax
push   %rax
push   %r11
push   %r14
mov    %r12,%r15
mov    0x68(%rsp),%r12
push   %r12
call   1040 <findNURBSbasisFunV@plt>
mov    %r12,%r10
add    $0x30,%rsp
mov    0xb0(%rsp),%rax
mov    0x60(%rsp),%rsi
movsd  (%rsi,%rax,8),%xmm0
mov    0x30(%rsp),%rdx
lea    (%rdx,%rdx,1),%eax
cltq
mov    0x138(%rsp),%rcx
movsd  %xmm0,(%rcx,%rax,8)
movsd  0x18(%rsp),%xmm0
lea    0x1(%rdx,%rdx,1),%eax
cltq
movsd  %xmm0,(%rcx,%rax,8)
mov    %r15,%r12
lea    0x1(%rdx),%edi
mov    0xd8(%rsp),%rax
cmp    0x70(%rsp),%rax
je     1d69 <NURBSsurfaceBasisMax+0xc19>
mov    %rdi,0x38(%rsp)
mov    %rdx,0x30(%rsp)
movsd  (%r14,%rax,8),%xmm0
mov    %rax,(%rsp)
add    $0x1,%rax
mov    %rax,0xd8(%rsp)
add    %r12d,%eax
cltq
mov    %rax,0x8(%rsp)
addsd  (%r14,%rax,8),%xmm0
mulsd  0x19c8(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
mov    %r10d,%edi
mov    %r12d,%esi
mov    %r14,%rdx
call   1060 <FindSpan@plt>
mov    %eax,%r15d
movsd  0x18(%rsp),%xmm0
mov    %eax,%edi
mov    %r12d,%esi
mov    %r14,%rdx
mov    0x168(%rsp),%r14
mov    %r14,%rcx
mov    0x158(%rsp),%r8
mov    0x160(%rsp),%r9
call   1050 <BasisFuns@plt>
mov    %r15d,%r8d
sub    %r12d,%r8d
test   %r12d,%r12d
js     1730 <NURBSsurfaceBasisMax+0x5e0>
cmpq   $0x0,0xb8(%rsp)
je     1760 <NURBSsurfaceBasisMax+0x610>
mov    0xa0(%rsp),%rcx
lea    (%rcx,%r15,1),%edx
mov    0x20(%rsp),%r9
imul   %r9d,%edx
add    $0x3,%edx
add    0x7c(%rsp),%r15d
imul   %r9d,%r15d
add    $0x3,%r15d
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
mov    0x160(%rsp),%r10
mov    0xa8(%rsp),%rsi
mov    0x78(%rsp),%eax
mov    (%rsp),%rdi
mov    0x8(%rsp),%r11
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movslq %r15d,%r15
movsd  (%r14,%rcx,8),%xmm2
movsd  0x8(%r14,%rcx,8),%xmm1
mulsd  (%rbx,%r15,8),%xmm2
addsd  %xmm0,%xmm2
movslq %edx,%rdx
mulsd  (%rbx,%rdx,8),%xmm1
addsd  %xmm2,%xmm1
add    $0x2,%rcx
add    %eax,%edx
add    %eax,%r15d
movapd %xmm1,%xmm0
cmp    %rcx,%rsi
jne    16f0 <NURBSsurfaceBasisMax+0x5a0>
jmp    177c <NURBSsurfaceBasisMax+0x62c>
nopw   0x0(%rax,%rax,1)
xorpd  %xmm1,%xmm1
mov    0x60(%rsp),%r12
mov    0x20(%rsp),%r9
mov    0x130(%rsp),%r15
mov    0x160(%rsp),%r10
mov    (%rsp),%rdi
mov    0x8(%rsp),%r11
jmp    17af <NURBSsurfaceBasisMax+0x65f>
nopl   0x0(%rax)
xorpd  %xmm1,%xmm1
xor    %ecx,%ecx
mov    0x20(%rsp),%r9
mov    0x160(%rsp),%r10
mov    (%rsp),%rdi
mov    0x8(%rsp),%r11
testb  $0x1,0x80(%rsp)
01
mov    0x60(%rsp),%r12
mov    0x130(%rsp),%r15
je     17af <NURBSsurfaceBasisMax+0x65f>
movsd  (%r14,%rcx,8),%xmm0
add    %r8d,%ecx
imul   %r9d,%ecx
or     $0x3,%ecx
movslq %ecx,%rcx
mulsd  (%rbx,%rcx,8),%xmm0
addsd  %xmm0,%xmm1
movslq %r8d,%rax
mov    %rdi,%rcx
sub    %rax,%rcx
movsd  (%r14,%rcx,8),%xmm0
mov    %r9d,%eax
imul   %edi,%eax
mov    %rax,0xc0(%rsp)
or     $0x3,%eax
cltq
mulsd  (%rbx,%rax,8),%xmm0
divsd  %xmm1,%xmm0
movsd  (%r15,%r11,8),%xmm1
subsd  (%r15,%rdi,8),%xmm1
mulsd  0x181a(%rip),%xmm1
mov    $0xf,%esi
lea    0x10(%rsp),%rdx
mov    0x48(%rsp),%rcx
mov    %rbx,%r8
push   $0x3
push   %r14
push   %r10
push   0x170(%rsp)
push   %r15
push   0x68(%rsp)
call   1040 <findNURBSbasisFunV@plt>
add    $0x30,%rsp
mov    0x38(%rsp),%rdx
lea    (%rdx,%rdx,1),%eax
mov    0x30(%rsp),%rsi
add    $0x2,%esi
movsd  (%r12),%xmm0
cltq
mov    0x138(%rsp),%rcx
movsd  %xmm0,(%rcx,%rax,8)
movsd  0x18(%rsp),%xmm0
lea    0x1(%rdx,%rdx,1),%eax
cltq
movsd  %xmm0,(%rcx,%rax,8)
mov    0x68(%rsp),%rdi
cmp    $0x3,%edi
jge    1880 <NURBSsurfaceBasisMax+0x730>
mov    %rsi,0x30(%rsp)
mov    0x40(%rsp),%rdi
mov    0x48(%rsp),%r12
mov    (%rsp),%rax
jmp    1c12 <NURBSsurfaceBasisMax+0xac2>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %esi,%esi
mov    %rsi,0x30(%rsp)
mov    $0x1,%ecx
mov    0x28(%rsp),%r14
mov    0x130(%rsp),%r15
mov    0x8(%rsp),%rsi
mov    (%rsp),%rax
jmp    1a05 <NURBSsurfaceBasisMax+0x8b5>
nopw   0x0(%rax,%rax,1)
xorpd  %xmm1,%xmm1
mov    0x28(%rsp),%r8
mov    %r15,%r14
movslq %r9d,%rax
mov    (%rsp),%rdx
mov    %rdx,%rcx
sub    %rax,%rcx
movsd  (%r14,%rcx,8),%xmm0
movslq 0x38(%rsp),%rax
mov    0x50(%rsp),%rsi
mov    %rsi,%rcx
sub    %rax,%rcx
mulsd  0x0(%rbp,%rcx,8),%xmm0
mov    0xc0(%rsp),%rax
lea    (%rax,%rsi,4),%eax
or     $0x3,%eax
cltq
mulsd  (%rbx,%rax,8),%xmm0
divsd  %xmm1,%xmm0
mov    0x60(%rsp),%r12
mov    0x90(%rsp),%rax
movsd  (%r12,%rax,8),%xmm1
subsd  (%r12,%rsi,8),%xmm1
movsd  0x16e9(%rip),%xmm3
mulsd  %xmm3,%xmm1
mov    0x130(%rsp),%r10
mov    0x8(%rsp),%rax
movsd  (%r10,%rax,8),%xmm2
mov    %rdx,%rdi
subsd  (%r10,%rdx,8),%xmm2
mulsd  %xmm3,%xmm2
sub    $0x8,%rsp
mov    $0xf,%edx
lea    0x18(%rsp),%rcx
mov    %r14,%rax
mov    %r8,%r14
mov    0x50(%rsp),%r9
push   %rax
mov    0x170(%rsp),%rax
push   %rax
mov    0x170(%rsp),%rax
push   %rax
push   %rbp
mov    0x170(%rsp),%r15
push   %r15
mov    0x170(%rsp),%r15
push   %r15
push   %r10
push   %r12
push   0x88(%rsp)
mov    0xb8(%rsp),%r15
push   %r15
push   %rbx
call   1030 <findNURBSbasisFunIso@plt>
mov    %r15,%rdi
mov    0x190(%rsp),%r15
add    $0x60,%rsp
movsd  0x10(%rsp),%xmm0
mov    0x30(%rsp),%rsi
lea    (%rsi,%rsi,1),%eax
cltq
mov    0x138(%rsp),%rcx
movsd  %xmm0,(%rcx,%rax,8)
movsd  0x18(%rsp),%xmm0
lea    0x1(%rsi,%rsi,1),%eax
cltq
movsd  %xmm0,(%rcx,%rax,8)
mov    (%rsp),%rax
mov    0x50(%rsp),%rcx
add    $0x1,%rsi
mov    %rsi,0x30(%rsp)
mov    0x8(%rsp),%rsi
add    $0x1,%rcx
cmp    0xe8(%rsp),%rcx
je     1c00 <NURBSsurfaceBasisMax+0xab0>
movsd  (%r12,%rcx,8),%xmm1
movhpd (%r15,%rax,8),%xmm1
mov    0x88(%rsp),%rax
mov    %rcx,0x50(%rsp)
add    %rcx,%rax
mov    %rax,0x90(%rsp)
movsd  (%r12,%rax,8),%xmm0
movhpd (%r15,%rsi,8),%xmm0
addpd  %xmm1,%xmm0
mulpd  0x15cf(%rip),%xmm0
movapd %xmm0,0x10(%rsp)
mov    %r14d,%esi
mov    %r12,%rdx
call   1060 <FindSpan@plt>
mov    %r14,%r15
mov    %eax,%r14d
movsd  0x10(%rsp),%xmm0
mov    %eax,%edi
mov    %r15d,%esi
mov    %r12,%rdx
mov    %rbp,%rcx
mov    0x140(%rsp),%r8
mov    0x148(%rsp),%r9
call   1050 <BasisFuns@plt>
mov    %r14,%rax
mov    %r14,0xf0(%rsp)
sub    %r15d,%eax
mov    %eax,0x38(%rsp)
movsd  0x18(%rsp),%xmm0
mov    0x40(%rsp),%rdi
mov    0x48(%rsp),%r12
mov    %r12d,%esi
mov    0x130(%rsp),%r15
mov    %r15,%rdx
call   1060 <FindSpan@plt>
mov    %eax,%r14d
movsd  0x18(%rsp),%xmm0
mov    %eax,%edi
mov    %r12d,%esi
mov    %r15,%rdx
mov    0x168(%rsp),%rcx
mov    %rcx,%r15
mov    0x158(%rsp),%r8
mov    0x160(%rsp),%r9
call   1050 <BasisFuns@plt>
mov    %r14d,%r9d
sub    %r12d,%r9d
test   %r12d,%r12d
js     18b0 <NURBSsurfaceBasisMax+0x760>
add    0x7c(%rsp),%r14d
mov    0x20(%rsp),%r11
imul   %r11d,%r14d
add    0x9c(%rsp),%r14d
mov    0xf0(%rsp),%rax
lea    (%r14,%rax,4),%ecx
xorpd  %xmm1,%xmm1
xor    %edx,%edx
mov    0x28(%rsp),%r8
mov    0x58(%rsp),%r10
mov    %r15,%r14
mov    0x80(%rsp),%r15
mov    0xe0(%rsp),%r12
jmp    1b50 <NURBSsurfaceBasisMax+0xa00>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rdx
add    %r12,%rcx
cmp    %r15,%rdx
je     18bc <NURBSsurfaceBasisMax+0x76c>
test   %r8d,%r8d
js     1b40 <NURBSsurfaceBasisMax+0x9f0>
movsd  (%r14,%rdx,8),%xmm0
je     1bc0 <NURBSsurfaceBasisMax+0xa70>
xor    %edi,%edi
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  0x0(%rbp,%rdi,2),%xmm2
mulsd  %xmm0,%xmm2
lea    (%rcx,%rdi,1),%eax
add    $0x3,%eax
cltq
mulsd  (%rbx,%rax,8),%xmm2
addsd  %xmm1,%xmm2
movsd  0x8(%rbp,%rdi,2),%xmm1
mulsd  %xmm0,%xmm1
lea    0x7(%rcx,%rdi,1),%eax
cltq
mulsd  (%rbx,%rax,8),%xmm1
addsd  %xmm2,%xmm1
add    $0x2,%rsi
add    $0x8,%rdi
cmp    %rdi,%r13
jne    1b70 <NURBSsurfaceBasisMax+0xa20>
test   $0x1,%r10b
je     1b40 <NURBSsurfaceBasisMax+0x9f0>
jmp    1bcc <NURBSsurfaceBasisMax+0xa7c>
nopl   0x0(%rax)
xor    %esi,%esi
test   $0x1,%r10b
je     1b40 <NURBSsurfaceBasisMax+0x9f0>
lea    (%r9,%rdx,1),%eax
imul   %r11d,%eax
or     $0x3,%eax
mulsd  0x0(%rbp,%rsi,8),%xmm0
add    0x38(%rsp),%esi
lea    (%rax,%rsi,4),%eax
cltq
mulsd  (%rbx,%rax,8),%xmm0
addsd  %xmm0,%xmm1
jmp    1b40 <NURBSsurfaceBasisMax+0x9f0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x40(%rsp),%rdi
mov    0x48(%rsp),%r12
mov    0x168(%rsp),%r14
movsd  (%r15,%rax,8),%xmm0
mov    0x8(%rsp),%rax
addsd  (%r15,%rax,8),%xmm0
mulsd  0x13d5(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
mov    %r12d,%esi
mov    %r15,%rdx
call   1060 <FindSpan@plt>
mov    %r15,%rdx
mov    %eax,%r15d
movsd  0x18(%rsp),%xmm0
mov    %eax,%edi
mov    %r12d,%esi
mov    %r14,%rcx
mov    0x158(%rsp),%r8
mov    0x160(%rsp),%r9
call   1050 <BasisFuns@plt>
mov    %r15d,%r8d
sub    %r12d,%r8d
test   %r12d,%r12d
js     1510 <NURBSsurfaceBasisMax+0x3c0>
cmpq   $0x0,0xb8(%rsp)
je     1d20 <NURBSsurfaceBasisMax+0xbd0>
mov    0xc8(%rsp),%rcx
lea    (%rcx,%r15,1),%edx
mov    0x20(%rsp),%r9
imul   %r9d,%edx
add    $0xffffffff,%edx
add    0xa0(%rsp),%r15d
imul   %r9d,%r15d
add    $0xffffffff,%r15d
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
mov    0x158(%rsp),%r11
mov    0xa8(%rsp),%rsi
mov    0x78(%rsp),%eax
mov    (%rsp),%rdi
nopl   0x0(%rax)
movslq %r15d,%r15
movsd  (%r14,%rcx,8),%xmm2
movsd  0x8(%r14,%rcx,8),%xmm1
mulsd  (%rbx,%r15,8),%xmm2
addsd  %xmm0,%xmm2
movslq %edx,%rdx
mulsd  (%rbx,%rdx,8),%xmm1
addsd  %xmm2,%xmm1
add    $0x2,%rcx
add    %eax,%edx
add    %eax,%r15d
movapd %xmm1,%xmm0
cmp    %rcx,%rsi
jne    1cd0 <NURBSsurfaceBasisMax+0xb80>
testb  $0x1,0x80(%rsp)
01
je     1525 <NURBSsurfaceBasisMax+0x3d5>
jmp    1d45 <NURBSsurfaceBasisMax+0xbf5>
nopl   0x0(%rax,%rax,1)
xorpd  %xmm1,%xmm1
xor    %ecx,%ecx
mov    0x20(%rsp),%r9
mov    0x158(%rsp),%r11
mov    (%rsp),%rdi
testb  $0x1,0x80(%rsp)
01
je     1525 <NURBSsurfaceBasisMax+0x3d5>
lea    0x1(%r8),%edx
movsd  (%r14,%rcx,8),%xmm0
add    %edx,%ecx
imul   %r9d,%ecx
add    $0xffffffff,%ecx
movslq %ecx,%rcx
mulsd  (%rbx,%rcx,8),%xmm0
addsd  %xmm0,%xmm1
jmp    1525 <NURBSsurfaceBasisMax+0x3d5>
mov    %rsi,%r15
mov    0x28(%rsp),%rsi
mov    0x58(%rsp),%r9
mov    0x20(%rsp),%r11
lea    (%rdi,%rdi,1),%eax
add    $0x2,%edx
movsd  (%r15),%xmm0
cltq
mov    0x138(%rsp),%r8
movsd  %xmm0,(%r8,%rax,8)
movslq %r10d,%rcx
mov    0x130(%rsp),%rax
mov    %rcx,(%rsp)
movsd  (%rax,%rcx,8),%xmm0
lea    0x1(%rdi,%rdi,1),%eax
cltq
movsd  %xmm0,(%r8,%rax,8)
mov    0x68(%rsp),%r13
cmp    $0x3,%r13d
jge    1e11 <NURBSsurfaceBasisMax+0xcc1>
mov    0xb0(%rsp),%rax
movsd  (%r15,%rax,8),%xmm0
lea    (%rdx,%rdx,1),%eax
cltq
mov    0x138(%rsp),%rcx
movsd  %xmm0,(%rcx,%rax,8)
mov    0x130(%rsp),%rax
mov    (%rsp),%rsi
movsd  (%rax,%rsi,8),%xmm0
lea    (%rdx,%rdx,1),%eax
add    $0x1,%eax
cltq
movsd  %xmm0,(%rcx,%rax,8)
add    $0xf8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x70(%rsp),%rcx
imul   %ecx,%r11d
mov    %r11d,%eax
or     $0x3,%eax
mov    %rax,0x8(%rsp)
mov    %edx,%edx
lea    -0x1(%r13),%eax
mov    %rax,0x40(%rsp)
and    $0xfffffffe,%r9d
mov    %r9,0x48(%rsp)
lea    0x0(,%rsi,4),%eax
mov    $0x7,%edi
sub    %eax,%edi
mov    %rdi,0x90(%rsp)
imul   %r13d,%ecx
mov    %rcx,0x70(%rsp)
sub    %eax,%r11d
add    $0x3,%r11d
mov    %r11,0x20(%rsp)
mov    %r13,%rdi
mov    $0x1,%r12d
mov    0x148(%rsp),%r14
mov    0x140(%rsp),%r13
jmp    1f6d <NURBSsurfaceBasisMax+0xe1d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xorpd  %xmm1,%xmm1
mov    0x50(%rsp),%r11
movslq %r9d,%rax
mov    0x38(%rsp),%r12
mov    %r12,%rdx
sub    %rax,%rdx
movsd  0x0(%rbp,%rdx,8),%xmm0
mov    0x8(%rsp),%r10
lea    (%r10,%r12,4),%eax
cltq
mulsd  (%rbx,%rax,8),%xmm0
divsd  %xmm1,%xmm0
mov    0x60(%rsp),%r15
movsd  (%r15,%r11,8),%xmm1
subsd  (%r15,%r12,8),%xmm1
mulsd  0x112e(%rip),%xmm1
sub    $0x8,%rsp
mov    %r12d,%edi
mov    $0xf,%esi
lea    0x18(%rsp),%rdx
mov    %rbx,%r8
mov    0x70(%rsp),%r9
push   %r10
push   %rbp
mov    0x160(%rsp),%r14
push   %r14
mov    0x160(%rsp),%r13
push   %r13
push   %r15
call   1070 <findNURBSbasisFunU@plt>
mov    0x58(%rsp),%rsi
add    $0x30,%rsp
movsd  0x10(%rsp),%xmm0
mov    0x30(%rsp),%rdx
lea    (%rdx,%rdx,1),%eax
cltq
mov    0x138(%rsp),%rcx
movsd  %xmm0,(%rcx,%rax,8)
mov    0x130(%rsp),%rax
mov    (%rsp),%rdi
movsd  (%rax,%rdi,8),%xmm0
mov    0x68(%rsp),%rdi
lea    (%rdx,%rdx,1),%eax
add    $0x1,%eax
cltq
movsd  %xmm0,(%rcx,%rax,8)
add    $0x1,%rdx
add    $0x1,%r12
cmp    0x40(%rsp),%r12
je     1dc1 <NURBSsurfaceBasisMax+0xc71>
mov    %rdx,0x30(%rsp)
movsd  (%r15,%r12,8),%xmm0
mov    0x88(%rsp),%rax
mov    %r12,0x38(%rsp)
add    %r12,%rax
mov    %rax,0x50(%rsp)
addsd  (%r15,%rax,8),%xmm0
mulsd  0x1065(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    %r15,%rdx
call   1060 <FindSpan@plt>
mov    %eax,%r12d
movsd  0x10(%rsp),%xmm0
mov    %eax,%edi
mov    0x28(%rsp),%rsi
mov    %r15,%rdx
mov    %rbp,%rcx
mov    %r13,%r8
mov    %r14,%r9
call   1050 <BasisFuns@plt>
mov    0x28(%rsp),%rcx
mov    %r12d,%r9d
sub    %ecx,%r9d
test   %ecx,%ecx
js     1e90 <NURBSsurfaceBasisMax+0xd40>
je     2070 <NURBSsurfaceBasisMax+0xf20>
mov    0x70(%rsp),%rdx
add    %r12d,%edx
mov    0x90(%rsp),%rax
lea    (%rax,%rdx,4),%edx
mov    0x20(%rsp),%rsi
lea    (%rsi,%r12,4),%esi
xorpd  %xmm0,%xmm0
xor    %edi,%edi
mov    0x58(%rsp),%r8
mov    0x48(%rsp),%rax
mov    0x50(%rsp),%r11
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movslq %esi,%rsi
movsd  0x0(%rbp,%rdi,8),%xmm2
movsd  0x8(%rbp,%rdi,8),%xmm1
mulsd  (%rbx,%rsi,8),%xmm2
addsd  %xmm0,%xmm2
movslq %edx,%rdx
mulsd  (%rbx,%rdx,8),%xmm1
addsd  %xmm2,%xmm1
add    $0x2,%rdi
add    $0x8,%edx
add    $0x8,%esi
movapd %xmm1,%xmm0
cmp    %rdi,%rax
jne    2020 <NURBSsurfaceBasisMax+0xed0>
test   $0x1,%r8b
je     1e99 <NURBSsurfaceBasisMax+0xd49>
jmp    208a <NURBSsurfaceBasisMax+0xf3a>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xorpd  %xmm1,%xmm1
xor    %edi,%edi
mov    0x58(%rsp),%r8
mov    0x50(%rsp),%r11
test   $0x1,%r8b
je     1e99 <NURBSsurfaceBasisMax+0xd49>
movsd  0x0(%rbp,%rdi,8),%xmm0
add    %r9d,%edi
mov    0x8(%rsp),%rdx
lea    (%rdx,%rdi,4),%edx
movslq %edx,%rdx
mulsd  (%rbx,%rdx,8),%xmm0
addsd  %xmm0,%xmm1
jmp    1e99 <NURBSsurfaceBasisMax+0xd49>

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

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