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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double *bspline_prod(double *, int, double *, int, int, int, int, int, int);
int /*<<< orphan*/ free(double *);
double bspline_quad(double *knots, int nknots, int m, int l, int r, int dl,
                    int dr) {
  double *y;
  double qx[18] = {
      -0.9915651684209309,  -0.95582394957139838, -0.89260246649755604,
      -0.80370495897252303, -0.69168704306035333, -0.55977083107394743,
      -0.41175116146284346, -0.25188622569150576, -0.084775013041735417,
      0.084775013041735306, 0.25188622569150554,  0.41175116146284246,
      0.55977083107394743,  0.69168704306035189,  0.80370495897252314,
      0.89260246649755637,  0.95582394957139616,  0.9915651684209319};
  double qw[18] = {
      0.021616013526480963, 0.049714548894972385, 0.076425730254889301,
      0.10094204410628659,  0.12255520671147889,  0.14064291467065104,
      0.15468467512626605,  0.16427648374583206,  0.16914238296314324,
      0.16914238296314299,  0.16427648374583295,  0.1546846751262658,
      0.14064291467065093,  0.12255520671147752,  0.10094204410628753,
      0.076425730254888483, 0.049714548894967854, 0.021616013526484387};
  double x[18];
  int nq = 18;
  int k, kk;
  int lower, upper;
  double result, a, b, partial;
  result = 0;
  lower = l - m - 1;
  if (lower < 0) {
    lower = 0;
  }
  upper = lower + 2 * m + 4;
  if (upper > nknots - 1) {
    upper = nknots - 1;
  }
  for (k = lower; k < upper; k++) {
    partial = 0.;
    a = knots[k];
    b = knots[k + 1];
    for (kk = 0; kk < nq; kk++) {
      x[kk] = (b - a) * (qx[kk] + 1) / 2. + a;
    }
    y = bspline_prod(x, nq, knots, nknots, m, l, r, dl, dr);
    for (kk = 0; kk < nq; kk++) {
      partial += y[kk] * qw[kk];
    }
    free(y);
    result += (b - a) * partial / 2.;
  }
  return (result);
}


x86 assembly (clang, -O0):
<bspline_quad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x230,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
lea    -0xc0(%rbp),%rdi
lea    0xeaf(%rip),%rsi
mov    $0x90,%edx
call   1050 <memcpy@plt>
lea    -0x150(%rbp),%rdi
lea    0xf27(%rip),%rsi
mov    $0x90,%edx
call   1050 <memcpy@plt>
movl   $0x12,-0x1e4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x200(%rbp)
ff
mov    -0x14(%rbp),%eax
sub    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x1f0(%rbp)
cmpl   $0x0,-0x1f0(%rbp)
jge    11be <bspline_quad+0x8e>
movl   $0x0,-0x1f0(%rbp)
mov    -0x1f0(%rbp),%eax
mov    -0x10(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
add    $0x4,%eax
mov    %eax,-0x1f4(%rbp)
mov    -0x1f4(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jle    11f5 <bspline_quad+0xc5>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x1f4(%rbp)
mov    -0x1f0(%rbp),%eax
mov    %eax,-0x1e8(%rbp)
mov    -0x1e8(%rbp),%eax
cmp    -0x1f4(%rbp),%eax
jge    13c9 <bspline_quad+0x299>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x218(%rbp)
ff
mov    -0x8(%rbp),%rax
movslq -0x1e8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x208(%rbp)
ff
mov    -0x8(%rbp),%rax
mov    -0x1e8(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x210(%rbp)
ff
movl   $0x0,-0x1ec(%rbp)
mov    -0x1ec(%rbp),%eax
cmp    -0x1e4(%rbp),%eax
jge    12d3 <bspline_quad+0x1a3>
movsd  -0x210(%rbp),%xmm0
ff
subsd  -0x208(%rbp),%xmm0
ff
movslq -0x1ec(%rbp),%rax
movsd  0xd7a(%rip),%xmm1
addsd  -0xc0(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm1,%xmm0
movsd  0xd5d(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x208(%rbp),%xmm0
ff
movslq -0x1ec(%rbp),%rax
movsd  %xmm0,-0x1e0(%rbp,%rax,8)
ff ff
mov    -0x1ec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1ec(%rbp)
jmp    125d <bspline_quad+0x12d>
lea    -0x1e0(%rbp),%rdi
mov    -0x1e4(%rbp),%esi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    -0x18(%rbp),%r11d
mov    -0x1c(%rbp),%r10d
mov    0x10(%rbp),%eax
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1040 <bspline_prod@plt>
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x1ec(%rbp)
mov    -0x1ec(%rbp),%eax
cmp    -0x1e4(%rbp),%eax
jge    1378 <bspline_quad+0x248>
mov    -0x28(%rbp),%rax
movslq -0x1ec(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x1ec(%rbp),%rax
movsd  -0x150(%rbp,%rax,8),%xmm2
ff ff
movsd  -0x218(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x218(%rbp)
ff
mov    -0x1ec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1ec(%rbp)
jmp    131a <bspline_quad+0x1ea>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
movsd  -0x210(%rbp),%xmm0
ff
subsd  -0x208(%rbp),%xmm0
ff
mulsd  -0x218(%rbp),%xmm0
ff
movsd  0xc5f(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x200(%rbp),%xmm0
ff
movsd  %xmm0,-0x200(%rbp)
ff
mov    -0x1e8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1e8(%rbp)
jmp    1201 <bspline_quad+0xd1>
movsd  -0x200(%rbp),%xmm0
ff
add    $0x230,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bspline_quad>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %ecx,%ebx
mov    %edx,%r12d
mov    %edx,%eax
not    %eax
xor    %ecx,%ecx
add    %ebx,%eax
cmovs  %ecx,%eax
mov    %esi,%r14d
mov    %rdi,%r15
lea    (%rax,%r12,2),%edi
add    $0x4,%edi
lea    -0x1(%r14),%esi
cmp    %r14d,%edi
cmovl  %edi,%esi
xorpd  %xmm0,%xmm0
cmp    %esi,%eax
jge    144f <bspline_quad+0x32f>
mov    %r9d,%ebp
mov    %r8d,%r13d
mov    %eax,%eax
mov    %esi,%esi
mov    %rsi,(%rsp)
xorpd  %xmm0,%xmm0
cs nopw 0x0(%rax,%rax,1)
movsd  %xmm0,0x18(%rsp)
lea    0x1(%rax),%rsi
mov    %rsi,0x10(%rsp)
movsd  (%r15,%rax,8),%xmm0
movsd  0x8(%r15,%rax,8),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,0x20(%rsp)
unpcklpd %xmm1,%xmm1
unpcklpd %xmm0,%xmm0
movapd %xmm1,%xmm2
mulpd  0xe46(%rip),%xmm2
movapd 0xe4e(%rip),%xmm3
mulpd  %xmm3,%xmm2
addpd  %xmm0,%xmm2
movapd %xmm2,0x30(%rsp)
movapd %xmm1,%xmm2
mulpd  0xe44(%rip),%xmm2
mulpd  %xmm3,%xmm2
addpd  %xmm0,%xmm2
movapd %xmm2,0x40(%rsp)
movapd %xmm1,%xmm2
mulpd  0xe3a(%rip),%xmm2
mulpd  %xmm3,%xmm2
addpd  %xmm0,%xmm2
movapd %xmm2,0x50(%rsp)
movapd %xmm1,%xmm2
mulpd  0xe30(%rip),%xmm2
mulpd  %xmm3,%xmm2
addpd  %xmm0,%xmm2
movapd %xmm2,0x60(%rsp)
movapd %xmm1,%xmm2
mulpd  0xe26(%rip),%xmm2
mulpd  %xmm3,%xmm2
addpd  %xmm0,%xmm2
movapd %xmm2,0x70(%rsp)
movapd %xmm1,%xmm2
mulpd  0xe1c(%rip),%xmm2
mulpd  %xmm3,%xmm2
addpd  %xmm0,%xmm2
movapd %xmm2,0x80(%rsp)
movapd %xmm1,%xmm2
mulpd  0xe0f(%rip),%xmm2
mulpd  %xmm3,%xmm2
addpd  %xmm0,%xmm2
movapd %xmm2,0x90(%rsp)
movapd %xmm1,%xmm2
mulpd  0xe02(%rip),%xmm2
mulpd  %xmm3,%xmm2
addpd  %xmm0,%xmm2
movapd %xmm2,0xa0(%rsp)
mulpd  0xdf9(%rip),%xmm1
mulpd  %xmm3,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0xb0(%rsp)
sub    $0x8,%rsp
lea    0x38(%rsp),%rdi
mov    $0x12,%esi
mov    %r15,%rdx
mov    %r14d,%ecx
mov    %r12d,%r8d
mov    %ebx,%r9d
mov    0x108(%rsp),%eax
push   %rax
push   %rbp
push   %r13
call   1040 <bspline_prod@plt>
add    $0x20,%rsp
movsd  (%rax),%xmm0
mulsd  0xdbe(%rip),%xmm0
addsd  0xe4e(%rip),%xmm0
movsd  0x8(%rax),%xmm1
mulsd  0xdb1(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rax),%xmm0
mulsd  0xda8(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  0x18(%rax),%xmm1
mulsd  0xd9f(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0x20(%rax),%xmm0
mulsd  0xd96(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  0x28(%rax),%xmm1
mulsd  0xd8d(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0x30(%rax),%xmm0
mulsd  0xd84(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  0x38(%rax),%xmm1
mulsd  0xd7b(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0x40(%rax),%xmm0
mulsd  0xd72(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  0x48(%rax),%xmm1
mulsd  0xd69(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0x50(%rax),%xmm0
mulsd  0xd60(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  0x58(%rax),%xmm1
mulsd  0xd57(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0x60(%rax),%xmm0
mulsd  0xd4e(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  0x68(%rax),%xmm1
mulsd  0xd45(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0x70(%rax),%xmm0
mulsd  0xd3c(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  0x78(%rax),%xmm1
mulsd  0xd33(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0x80(%rax),%xmm0
mulsd  0xd27(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  0x88(%rax),%xmm1
mulsd  0xd1b(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
mov    %rax,%rdi
call   1030 <free@plt>
movsd  0x18(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  0x20(%rsp),%xmm1
mulsd  0xcf7(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    0x10(%rsp),%rsi
mov    %rsi,%rax
cmp    %rsi,(%rsp)
jne    1180 <bspline_quad+0x60>
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.bspline_quad.qx = [18 x double] [double 0xBFEFBAE6E0470F67, double 0xBFEE961C1B849113, double 0xBFEC90330C3DF336, double 0xBFE9B7F3764D70B5, double 0xBFE6224CDDA05B6F, double 0xBFE1E9A48496F47D, double 0xBFDA5A218B24AADB, double 0xBFD01EE7676A1AE8, double 0xBFB5B3D0B4884009, double 0x3FB5B3D0B4884001, double 0x3FD01EE7676A1AE4, double 0x3FDA5A218B24AAC9, double 0x3FE1E9A48496F47D, double 0x3FE6224CDDA05B62, double 0x3FE9B7F3764D70B6, double 0x3FEC90330C3DF339, double 0x3FEE961C1B8490FF, double 0x3FEFBAE6E0470F70]
@__const.bspline_quad.qw = [18 x double] [double 0x3F9622821CAA1DD1, double 0x3FA9742F7347523E, double 0x3FB390A2FC0485D8, double 0x3FB9D7567A3A5707, double 0x3FBF5FC72CC7C327, double 0x3FC2009647765824, double 0x3FC3CCB51A6E0A90, double 0x3FC5070306985945, double 0x3FC5A6752598DBCD, double 0x3FC5A6752598DBC4, double 0x3FC5070306985965, double 0x3FC3CCB51A6E0A87, double 0x3FC2009647765820, double 0x3FBF5FC72CC7C2C4, double 0x3FB9D7567A3A574B, double 0x3FB390A2FC04859D, double 0x3FA9742F73474FB1, double 0x3F9622821CAA21AC]
define double @bspline_quad(double* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca double*
%16 = alloca [18 x double]
%17 = alloca [18 x double]
%18 = alloca [18 x double]
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
store double* %0, double** %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%28 = bitcast [18 x double]* %16 to i8*
%29 = bitcast [18 x double]* %17 to i8*
store i32 18, i32* %19
store double 0.000000e+00, double* %24
%30 = load i32, i32* %11
%31 = load i32, i32* %10
%32 = sub nsw i32 %30, %31
%33 = sub nsw i32 %32, 1
store i32 %33, i32* %22
%34 = load i32, i32* %22
%35 = icmp slt i32 %34, 0
br i1 %35, label %36, label %37
36: ; preds = %7
store i32 0, i32* %22
br label %37
37: ; preds = %36, %7
%38 = load i32, i32* %22
%39 = load i32, i32* %10
%40 = mul nsw i32 2, %39
%41 = add nsw i32 %38, %40
%42 = add nsw i32 %41, 4
store i32 %42, i32* %23
%43 = load i32, i32* %23
%44 = load i32, i32* %9
%45 = sub nsw i32 %44, 1
%46 = icmp sgt i32 %43, %45
br i1 %46, label %47, label %50
47: ; preds = %37
%48 = load i32, i32* %9
%49 = sub nsw i32 %48, 1
store i32 %49, i32* %23
br label %50
50: ; preds = %47, %37
%51 = load i32, i32* %22
store i32 %51, i32* %20
br label %52
52: ; preds = %132, %50
%53 = load i32, i32* %20
%54 = load i32, i32* %23
%55 = icmp slt i32 %53, %54
br i1 %55, label %56, label %135
56: ; preds = %52
store double 0.000000e+00, double* %27
%57 = load double*, double** %8
%58 = load i32, i32* %20
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds double, double* %57, i64 %59
%61 = load double, double* %60
store double %61, double* %25
%62 = load double*, double** %8
%63 = load i32, i32* %20
%64 = add nsw i32 %63, 1
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds double, double* %62, i64 %65
%67 = load double, double* %66
store double %67, double* %26
store i32 0, i32* %21
br label %68
68: ; preds = %88, %56
%69 = load i32, i32* %21
%70 = load i32, i32* %19
%71 = icmp slt i32 %69, %70
br i1 %71, label %72, label %91
72: ; preds = %68
%73 = load double, double* %26
%74 = load double, double* %25
%75 = fsub double %73, %74
%76 = load i32, i32* %21
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [18 x double], [18 x double]* %16, i64 0, i64 %77
%79 = load double, double* %78
%80 = fadd double %79, 1.000000e+00
%81 = fmul double %75, %80
%82 = fdiv double %81, 2.000000e+00
%83 = load double, double* %25
%84 = fadd double %82, %83
%85 = load i32, i32* %21
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds [18 x double], [18 x double]* %18, i64 0, i64 %86
store double %84, double* %87
br label %88
88: ; preds = %72
%89 = load i32, i32* %21
%90 = add nsw i32 %89, 1
store i32 %90, i32* %21
br label %68
91: ; preds = %68
%92 = getelementptr inbounds [18 x double], [18 x double]* %18, i64 0, i64 0
%93 = load i32, i32* %19
%94 = load double*, double** %8
%95 = load i32, i32* %9
%96 = load i32, i32* %10
%97 = load i32, i32* %11
%98 = load i32, i32* %12
%99 = load i32, i32* %13
%100 = load i32, i32* %14
%101 = call double* @bspline_prod(double* %92, i32 %93, double* %94, i32 %95, i32 %96, i32 %97, i32 %98, i32 %99, i32 %100)
store double* %101, double** %15
store i32 0, i32* %21
br label %102
102: ; preds = %118, %91
%103 = load i32, i32* %21
%104 = load i32, i32* %19
%105 = icmp slt i32 %103, %104
br i1 %105, label %106, label %121
106: ; preds = %102
%107 = load double*, double** %15
%108 = load i32, i32* %21
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds double, double* %107, i64 %109
%111 = load double, double* %110
%112 = load i32, i32* %21
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds [18 x double], [18 x double]* %17, i64 0, i64 %113
%115 = load double, double* %114
%116 = load double, double* %27
%117 = call double @llvm.fmuladd.f64(double %111, double %115, double %116)
store double %117, double* %27
br label %118
118: ; preds = %106
%119 = load i32, i32* %21
%120 = add nsw i32 %119, 1
store i32 %120, i32* %21
br label %102
121: ; preds = %102
%122 = load double*, double** %15
%123 = call i32 @free(double* %122)
%124 = load double, double* %26
%125 = load double, double* %25
%126 = fsub double %124, %125
%127 = load double, double* %27
%128 = fmul double %126, %127
%129 = fdiv double %128, 2.000000e+00
%130 = load double, double* %24
%131 = fadd double %130, %129
store double %131, double* %24
br label %132
132: ; preds = %121
%133 = load i32, i32* %20
%134 = add nsw i32 %133, 1
store i32 %134, i32* %20
br label %52
135: ; preds = %52
%136 = load double, double* %24
ret double %136
}

LLVM IR (-O2):
define double @bspline_quad(double* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca [18 x double]
%9 = bitcast [18 x double]* %8 to i8*
%10 = xor i32 %2, -1
%11 = add i32 %10, %3
%12 = icmp sgt i32 %11, 0
%13 = select i1 %12, i32 %11, i32 0
%14 = shl nsw i32 %2, 1
%15 = add i32 %14, 4
%16 = add i32 %15, %13
%17 = icmp slt i32 %16, %1
%18 = add nsw i32 %1, -1
%19 = select i1 %17, i32 %16, i32 %18
%20 = icmp slt i32 %13, %19
br i1 %20, label %21, label %141
21: ; preds = %7
%22 = getelementptr inbounds [18 x double], [18 x double]* %8, i64 0, i64 0
%23 = zext i32 %13 to i64
%24 = zext i32 %19 to i64
%25 = bitcast [18 x double]* %8 to <2 x double>*
%26 = getelementptr inbounds [18 x double], [18 x double]* %8, i64 0, i64 2
%27 = bitcast double* %26 to <2 x double>*
%28 = getelementptr inbounds [18 x double], [18 x double]* %8, i64 0, i64 4
%29 = bitcast double* %28 to <2 x double>*
%30 = getelementptr inbounds [18 x double], [18 x double]* %8, i64 0, i64 6
%31 = bitcast double* %30 to <2 x double>*
%32 = getelementptr inbounds [18 x double], [18 x double]* %8, i64 0, i64 8
%33 = bitcast double* %32 to <2 x double>*
%34 = getelementptr inbounds [18 x double], [18 x double]* %8, i64 0, i64 10
%35 = bitcast double* %34 to <2 x double>*
%36 = getelementptr inbounds [18 x double], [18 x double]* %8, i64 0, i64 12
%37 = bitcast double* %36 to <2 x double>*
%38 = getelementptr inbounds [18 x double], [18 x double]* %8, i64 0, i64 14
%39 = bitcast double* %38 to <2 x double>*
%40 = getelementptr inbounds [18 x double], [18 x double]* %8, i64 0, i64 16
%41 = bitcast double* %40 to <2 x double>*
br label %42
42: ; preds = %21, %42
%43 = phi i64 [ %23, %21 ], [ %47, %42 ]
%44 = phi double [ 0.000000e+00, %21 ], [ %139, %42 ]
%45 = getelementptr inbounds double, double* %0, i64 %43
%46 = load double, double* %45
%47 = add nuw nsw i64 %43, 1
%48 = getelementptr inbounds double, double* %0, i64 %47
%49 = load double, double* %48
%50 = fsub double %49, %46
%51 = insertelement <2 x double> poison, double %50, i64 0
%52 = shufflevector <2 x double> %51, <2 x double> poison, <2 x i32> zeroinitializer
%53 = insertelement <2 x double> poison, double %46, i64 0
%54 = shufflevector <2 x double> %53, <2 x double> poison, <2 x i32> zeroinitializer
%55 = fmul <2 x double> %52, <double 0x3F814647EE3C2640, double 0x3FA69E3E47B6EED0>
%56 = fmul <2 x double> %55, <double 5.000000e-01, double 5.000000e-01>
%57 = fadd <2 x double> %54, %56
store <2 x double> %57, <2 x double>* %25
%58 = fmul <2 x double> %52, <double 0x3FBB7E679E106650, double 0x3FC9203226CA3D2C>
%59 = fmul <2 x double> %58, <double 5.000000e-01, double 5.000000e-01>
%60 = fadd <2 x double> %54, %59
store <2 x double> %60, <2 x double>* %27
%61 = fmul <2 x double> %52, <double 0x3FD3BB6644BF4922, double 0x3FDC2CB6F6D21706>
%62 = fmul <2 x double> %61, <double 5.000000e-01, double 5.000000e-01>
%63 = fadd <2 x double> %54, %62
store <2 x double> %63, <2 x double>* %29
%64 = fmul <2 x double> %52, <double 0x3FE2D2EF3A6DAA92, double 0x3FE7F08C4C4AF28C>
%65 = fmul <2 x double> %64, <double 5.000000e-01, double 5.000000e-01>
%66 = fadd <2 x double> %54, %65
store <2 x double> %66, <2 x double>* %31
%67 = fmul <2 x double> %52, <double 0x3FED4985E96EF7FF, double 0x3FF15B3D0B488400>
%68 = fmul <2 x double> %67, <double 5.000000e-01, double 5.000000e-01>
%69 = fadd <2 x double> %54, %68
store <2 x double> %69, <2 x double>* %33
%70 = fmul <2 x double> %52, <double 0x3FF407B9D9DA86B9, double 0x3FF6968862C92AB2>
%71 = fmul <2 x double> %70, <double 5.000000e-01, double 5.000000e-01>
%72 = fadd <2 x double> %54, %71
store <2 x double> %72, <2 x double>* %35
%73 = fmul <2 x double> %52, <double 0x3FF8F4D2424B7A3E, double 0x3FFB11266ED02DB1>
%74 = fmul <2 x double> %73, <double 5.000000e-01, double 5.000000e-01>
%75 = fadd <2 x double> %54, %74
store <2 x double> %75, <2 x double>* %37
%76 = fmul <2 x double> %52, <double 0x3FFCDBF9BB26B85B, double 0x3FFE4819861EF99C>
%77 = fmul <2 x double> %76, <double 5.000000e-01, double 5.000000e-01>
%78 = fadd <2 x double> %54, %77
store <2 x double> %78, <2 x double>* %39
%79 = fmul <2 x double> %52, <double 0x3FFF4B0E0DC24880, double 0x3FFFDD73702387B8>
%80 = fmul <2 x double> %79, <double 5.000000e-01, double 5.000000e-01>
%81 = fadd <2 x double> %54, %80
store <2 x double> %81, <2 x double>* %41
%82 = call double* @bspline_prod(double* %22, i32 18, double* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6)
%83 = load double, double* %82
%84 = call double @llvm.fmuladd.f64(double %83, double 0x3F9622821CAA1DD1, double 0.000000e+00)
%85 = getelementptr inbounds double, double* %82, i64 1
%86 = load double, double* %85
%87 = call double @llvm.fmuladd.f64(double %86, double 0x3FA9742F7347523E, double %84)
%88 = getelementptr inbounds double, double* %82, i64 2
%89 = load double, double* %88
%90 = call double @llvm.fmuladd.f64(double %89, double 0x3FB390A2FC0485D8, double %87)
%91 = getelementptr inbounds double, double* %82, i64 3
%92 = load double, double* %91
%93 = call double @llvm.fmuladd.f64(double %92, double 0x3FB9D7567A3A5707, double %90)
%94 = getelementptr inbounds double, double* %82, i64 4
%95 = load double, double* %94
%96 = call double @llvm.fmuladd.f64(double %95, double 0x3FBF5FC72CC7C327, double %93)
%97 = getelementptr inbounds double, double* %82, i64 5
%98 = load double, double* %97
%99 = call double @llvm.fmuladd.f64(double %98, double 0x3FC2009647765824, double %96)
%100 = getelementptr inbounds double, double* %82, i64 6
%101 = load double, double* %100
%102 = call double @llvm.fmuladd.f64(double %101, double 0x3FC3CCB51A6E0A90, double %99)
%103 = getelementptr inbounds double, double* %82, i64 7
%104 = load double, double* %103
%105 = call double @llvm.fmuladd.f64(double %104, double 0x3FC5070306985945, double %102)
%106 = getelementptr inbounds double, double* %82, i64 8
%107 = load double, double* %106
%108 = call double @llvm.fmuladd.f64(double %107, double 0x3FC5A6752598DBCD, double %105)
%109 = getelementptr inbounds double, double* %82, i64 9
%110 = load double, double* %109
%111 = call double @llvm.fmuladd.f64(double %110, double 0x3FC5A6752598DBC4, double %108)
%112 = getelementptr inbounds double, double* %82, i64 10
%113 = load double, double* %112
%114 = call double @llvm.fmuladd.f64(double %113, double 0x3FC5070306985965, double %111)
%115 = getelementptr inbounds double, double* %82, i64 11
%116 = load double, double* %115
%117 = call double @llvm.fmuladd.f64(double %116, double 0x3FC3CCB51A6E0A87, double %114)
%118 = getelementptr inbounds double, double* %82, i64 12
%119 = load double, double* %118
%120 = call double @llvm.fmuladd.f64(double %119, double 0x3FC2009647765820, double %117)
%121 = getelementptr inbounds double, double* %82, i64 13
%122 = load double, double* %121
%123 = call double @llvm.fmuladd.f64(double %122, double 0x3FBF5FC72CC7C2C4, double %120)
%124 = getelementptr inbounds double, double* %82, i64 14
%125 = load double, double* %124
%126 = call double @llvm.fmuladd.f64(double %125, double 0x3FB9D7567A3A574B, double %123)
%127 = getelementptr inbounds double, double* %82, i64 15
%128 = load double, double* %127
%129 = call double @llvm.fmuladd.f64(double %128, double 0x3FB390A2FC04859D, double %126)
%130 = getelementptr inbounds double, double* %82, i64 16
%131 = load double, double* %130
%132 = call double @llvm.fmuladd.f64(double %131, double 0x3FA9742F73474FB1, double %129)
%133 = getelementptr inbounds double, double* %82, i64 17
%134 = load double, double* %133
%135 = call double @llvm.fmuladd.f64(double %134, double 0x3F9622821CAA21AC, double %132)
%136 = call i32 @free(double* %82)
%137 = fmul double %50, %135
%138 = fmul double %137, 5.000000e-01
%139 = fadd double %44, %138
%140 = icmp eq i64 %47, %24
br i1 %140, label %141, label %42
141: ; preds = %42, %7
%142 = phi double [ 0.000000e+00, %7 ], [ %139, %42 ]
ret double %142
}