#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 fabs(double);
int /*<<< orphan*/ gslpolyfit(double *, double *, int, int, double *);
int indexx(double, float *, int);
int /*<<< orphan*/ willus_mem_alloc_warn(void **, int, char *, int);
int /*<<< orphan*/ willus_mem_free(double **, char *);
double interp_high_order_slopef(double x0, float *x, float *y, int n, int order,
                                double dx) {
  int i0, i1, j, nlocal;
  double c[16];
  double xx, y0;
  void *ptr;
  double *x1, *y1;
  static char *funcname = "interp_high_order_slopef";
  if (order > 15)
    order = 15;
  dx = fabs(dx) / 2.;
  if (x0 < x[0])
    x0 = x[0];
  else if (x0 > x[n - 1])
    x0 = x[n - 1];
  i0 = indexx(x0, x, n);
  if (i0 < 0)
    i0 = 0;
  if (i0 > n - 1)
    i0 = n - 1;
  for (i1 = i0; i0 >= 0 && x[i0] + dx >= x0; i0--)
    ;
  i0++;
  for (; i1 < n && x[i1] - dx <= x0; i1++)
    ;
  i1--;
  nlocal = (i1 - i0) + 1;
  if (nlocal < 2) {
    if (i0 >= n - 1)
      i0--;
    if (i0 < 0)
      return (0.);
    return ((y[i0 + 1] - y[i0]) / (x[i0 + 1] - x[i0]));
  }
  if (nlocal < order + 1)
    order = nlocal - 1;
  willus_mem_alloc_warn(&ptr, sizeof(double) * 2 * nlocal, funcname, 10);
  x1 = (double *)ptr;
  y1 = &x1[nlocal];
  for (j = 0; j < nlocal; j++) {
    x1[j] = x[j + i0];
    y1[j] = y[j + i0];
  }
  gslpolyfit(x1, y1, nlocal, order, c);
  willus_mem_free(&x1, funcname);
  for (y0 = 0., xx = 1., j = 1; j <= order; y0 += j * xx * c[j], xx *= x0, j++)
    ;
  return (y0);
}


x86 assembly (clang, -O0):
<interp_high_order_slopef>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movsd  %xmm0,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %edx,-0x24(%rbp)
mov    %ecx,-0x28(%rbp)
movsd  %xmm1,-0x30(%rbp)
cmpl   $0xf,-0x28(%rbp)
jle    1184 <interp_high_order_slopef+0x34>
movl   $0xf,-0x28(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1060 <fabs@plt>
cvtsi2sd %eax,%xmm0
movsd  0xe66(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm1
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    11d4 <interp_high_order_slopef+0x84>
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1219 <interp_high_order_slopef+0xc9>
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1214 <interp_high_order_slopef+0xc4>
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1219 <interp_high_order_slopef+0xc9>
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1050 <indexx@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0x0,-0x34(%rbp)
jge    123e <interp_high_order_slopef+0xee>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jle    1258 <interp_high_order_slopef+0x108>
mov    -0x24(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x38(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x34(%rbp)
mov    %al,-0xe9(%rbp)
jl     1294 <interp_high_order_slopef+0x144>
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  -0x30(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
setae  %al
mov    %al,-0xe9(%rbp)
mov    -0xe9(%rbp),%al
test   $0x1,%al
jne    12a7 <interp_high_order_slopef+0x157>
jmp    12ba <interp_high_order_slopef+0x16a>
jmp    12ac <interp_high_order_slopef+0x15c>
mov    -0x34(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x34(%rbp)
jmp    125e <interp_high_order_slopef+0x10e>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x38(%rbp),%ecx
xor    %eax,%eax
cmp    -0x24(%rbp),%ecx
mov    %al,-0xea(%rbp)
jge    12ff <interp_high_order_slopef+0x1af>
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm1
subsd  -0x30(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
mov    %al,-0xea(%rbp)
mov    -0xea(%rbp),%al
test   $0x1,%al
jne    1312 <interp_high_order_slopef+0x1c2>
jmp    1325 <interp_high_order_slopef+0x1d5>
jmp    1317 <interp_high_order_slopef+0x1c7>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    12c3 <interp_high_order_slopef+0x173>
mov    -0x38(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
sub    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
cmpl   $0x2,-0x40(%rbp)
jge    13c5 <interp_high_order_slopef+0x275>
mov    -0x34(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jl     135e <interp_high_order_slopef+0x20e>
mov    -0x34(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x34(%rbp)
cmpl   $0x0,-0x34(%rbp)
jge    1375 <interp_high_order_slopef+0x225>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    155d <interp_high_order_slopef+0x40d>
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
subss  (%rax,%rcx,4),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm1
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
subss  (%rax,%rcx,4),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    155d <interp_high_order_slopef+0x40d>
mov    -0x40(%rbp),%eax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    13df <interp_high_order_slopef+0x28f>
mov    -0x40(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x28(%rbp)
movslq -0x40(%rbp),%rax
shl    $0x4,%rax
mov    %eax,%esi
mov    0x2c58(%rip),%rdx
lea    -0xd8(%rbp),%rdi
mov    $0xa,%ecx
call   1030 <willus_mem_alloc_warn@plt>
mov    -0xd8(%rbp),%rax
mov    %rax,-0xe0(%rbp)
mov    -0xe0(%rbp),%rax
movslq -0x40(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xe8(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x40(%rbp),%eax
jge    1495 <interp_high_order_slopef+0x345>
mov    -0x18(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0xe0(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0xe8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    142f <interp_high_order_slopef+0x2df>
mov    -0xe0(%rbp),%rdi
mov    -0xe8(%rbp),%rsi
mov    -0x40(%rbp),%edx
mov    -0x28(%rbp),%ecx
lea    -0xc0(%rbp),%r8
call   1040 <gslpolyfit@plt>
mov    0x2b8c(%rip),%rsi
lea    -0xe0(%rbp),%rdi
call   1070 <willus_mem_free@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  0xb2d(%rip),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x28(%rbp),%eax
jg     1550 <interp_high_order_slopef+0x400>
jmp    14fb <interp_high_order_slopef+0x3ab>
cvtsi2sdl -0x3c(%rbp),%xmm0
mulsd  -0xc8(%rbp),%xmm0
ff
movslq -0x3c(%rbp),%rax
movsd  -0xc0(%rbp,%rax,8),%xmm2
ff ff
movsd  -0xd0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
mulsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xc8(%rbp)
ff
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    14ea <interp_high_order_slopef+0x39a>
movsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interp_high_order_slopef>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb8,%rsp
mov    %edx,%r12d
mov    %rsi,0x10(%rsp)
mov    %rdi,%r13
movsd  %xmm0,0x8(%rsp)
cmp    $0xf,%ecx
mov    $0xf,%r15d
cmovl  %ecx,%r15d
movaps %xmm1,%xmm0
call   1060 <fabs@plt>
movsd  0x8(%rsp),%xmm3
cvtsi2sd %eax,%xmm2
movss  0x0(%r13),%xmm0
cvtss2sd %xmm0,%xmm0
lea    -0x1(%r12),%ebp
ucomisd %xmm3,%xmm0
ja     11c4 <interp_high_order_slopef+0x74>
movslq %ebp,%rax
movss  0x0(%r13,%rax,4),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
ucomisd %xmm1,%xmm3
movapd %xmm3,%xmm0
jbe    11c4 <interp_high_order_slopef+0x74>
movaps %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
mulsd  0xe2e(%rip),%xmm2
movsd  %xmm2,0x18(%rsp)
mov    %r13,%rdi
mov    %r12d,%esi
call   1050 <indexx@plt>
movsd  0x18(%rsp),%xmm2
movsd  0x8(%rsp),%xmm1
xor    %r14d,%r14d
test   %eax,%eax
cmovns %eax,%r14d
cmp    %r12d,%r14d
cmovge %ebp,%r14d
mov    %r14d,%eax
test   %r14d,%r14d
js     1236 <interp_high_order_slopef+0xe6>
mov    %r14d,%eax
nopw   0x0(%rax,%rax,1)
movss  0x0(%r13,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jb     1236 <interp_high_order_slopef+0xe6>
lea    -0x1(%rax),%rcx
test   %rax,%rax
mov    %rcx,%rax
jg     1210 <interp_high_order_slopef+0xc0>
mov    $0xffffffff,%eax
lea    0x1(%rax),%ebx
movslq %r14d,%rcx
movslq %r12d,%rdx
add    $0x1,%r14d
cmp    %r14d,%r12d
cmovg  %r12d,%r14d
nopw   0x0(%rax,%rax,1)
movss  0x0(%r13,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
subsd  %xmm2,%xmm0
ucomisd %xmm0,%xmm1
jb     1270 <interp_high_order_slopef+0x120>
add    $0x1,%rcx
cmp    %rdx,%rcx
jl     1250 <interp_high_order_slopef+0x100>
jmp    1273 <interp_high_order_slopef+0x123>
mov    %ecx,%r14d
sub    %eax,%r14d
lea    -0x2(%r14),%ecx
test   %ecx,%ecx
jle    12cb <interp_high_order_slopef+0x17b>
add    $0xffffffff,%r14d
cmp    %r15d,%ecx
cmovl  %ecx,%r15d
mov    %r14d,%r12d
mov    %r14d,%esi
shl    $0x4,%esi
lea    0xd77(%rip),%rdx
lea    0x28(%rsp),%rdi
mov    $0xa,%ecx
call   1030 <willus_mem_alloc_warn@plt>
mov    0x28(%rsp),%rdi
mov    %rdi,0x20(%rsp)
lea    (%rdi,%r12,8),%rsi
movslq %ebx,%r8
cmp    $0x4,%r14d
jae    1305 <interp_high_order_slopef+0x1b5>
xor    %ecx,%ecx
mov    0x10(%rsp),%r9
jmp    1363 <interp_high_order_slopef+0x213>
cmp    %ebp,%ebx
cmovl  %ebx,%eax
test   %eax,%eax
js     13f8 <interp_high_order_slopef+0x2a8>
mov    %eax,%eax
mov    0x10(%rsp),%rcx
movss  0x4(%rcx,%rax,4),%xmm0
subss  (%rcx,%rax,4),%xmm0
movss  0x4(%r13,%rax,4),%xmm1
subss  0x0(%r13,%rax,4),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
jmp    1478 <interp_high_order_slopef+0x328>
mov    %r12d,%ecx
and    $0xfffffffc,%ecx
mov    0x10(%rsp),%r9
lea    (%r9,%r8,4),%rdx
add    $0x8,%rdx
lea    0x8(,%r8,4),%rax
add    %r13,%rax
lea    (%rdi,%r12,8),%rbx
add    $0x10,%rbx
xor    %ebp,%ebp
nopl   (%rax)
cvtps2pd -0x8(%rax,%rbp,4),%xmm0
cvtps2pd (%rax,%rbp,4),%xmm1
movups %xmm0,(%rdi,%rbp,8)
movups %xmm1,0x10(%rdi,%rbp,8)
cvtps2pd -0x8(%rdx,%rbp,4),%xmm0
cvtps2pd (%rdx,%rbp,4),%xmm1
movups %xmm0,-0x10(%rbx,%rbp,8)
movupd %xmm1,(%rbx,%rbp,8)
add    $0x4,%rbp
cmp    %rbp,%rcx
jne    1330 <interp_high_order_slopef+0x1e0>
cmp    %r12,%rcx
je     13b6 <interp_high_order_slopef+0x266>
add    %rcx,%r8
lea    0x0(,%r8,4),%rdx
add    %r13,%rdx
lea    (%r9,%r8,4),%rax
lea    (%rcx,%r12,1),%rbp
lea    (%rdi,%rbp,8),%rbx
lea    (%rdi,%rcx,8),%rbp
sub    %rcx,%r12
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
movss  (%rdx,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x0(%rbp,%rcx,8)
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%r12
jne    1390 <interp_high_order_slopef+0x240>
lea    0x30(%rsp),%r8
mov    %r14d,%edx
mov    %r15d,%ecx
call   1040 <gslpolyfit@plt>
lea    0xc43(%rip),%rsi
lea    0x20(%rsp),%rdi
call   1070 <willus_mem_free@plt>
test   %r15d,%r15d
jle    13f8 <interp_high_order_slopef+0x2a8>
mov    %r15d,%eax
cmp    $0x1,%r15d
jne    13fe <interp_high_order_slopef+0x2ae>
movsd  0xc1b(%rip),%xmm1
xorpd  %xmm0,%xmm0
mov    $0x1,%ecx
jmp    145f <interp_high_order_slopef+0x30f>
xorpd  %xmm0,%xmm0
jmp    1478 <interp_high_order_slopef+0x328>
mov    %eax,%edx
and    $0xfffffffe,%edx
movsd  0xbfd(%rip),%xmm1
xorpd  %xmm0,%xmm0
mov    $0x1,%ecx
movsd  0x8(%rsp),%xmm3
nopw   0x0(%rax,%rax,1)
xorps  %xmm2,%xmm2
cvtsi2sd %ecx,%xmm2
mulsd  %xmm1,%xmm2
mulsd  0x30(%rsp,%rcx,8),%xmm2
addsd  %xmm0,%xmm2
lea    0x1(%rcx),%rsi
xorps  %xmm0,%xmm0
cvtsi2sd %esi,%xmm0
mulsd  %xmm3,%xmm1
mulsd  %xmm1,%xmm0
mulsd  0x38(%rsp,%rcx,8),%xmm0
addsd  %xmm2,%xmm0
mulsd  %xmm3,%xmm1
add    $0x2,%rcx
cmp    %rdx,%rsi
jne    1420 <interp_high_order_slopef+0x2d0>
test   $0x1,%al
je     1478 <interp_high_order_slopef+0x328>
xorps  %xmm2,%xmm2
cvtsi2sd %ecx,%xmm2
mulsd  %xmm2,%xmm1
mulsd  0x30(%rsp,%rcx,8),%xmm1
addsd  %xmm1,%xmm0
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@interp_high_order_slopef.funcname = internal global i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i32 0, i32 0)
@.str = [25 x i8] c"interp_high_order_slopef\00"
define double @interp_high_order_slopef(double %0, float* %1, float* %2, i32 %3, i32 %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca float*
%10 = alloca float*
%11 = alloca i32
%12 = alloca i32
%13 = alloca double
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca [16 x double]
%19 = alloca double
%20 = alloca double
%21 = alloca i8*
%22 = alloca double*
%23 = alloca double*
store double %0, double* %8
store float* %1, float** %9
store float* %2, float** %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store double %5, double* %13
%24 = load i32, i32* %12
%25 = icmp sgt i32 %24, 15
br i1 %25, label %26, label %27
26: ; preds = %6
store i32 15, i32* %12
br label %27
27: ; preds = %26, %6
%28 = load double, double* %13
%29 = call i32 @fabs(double %28)
%30 = sitofp i32 %29 to double
%31 = fdiv double %30, 2.000000e+00
store double %31, double* %13
%32 = load double, double* %8
%33 = load float*, float** %9
%34 = getelementptr inbounds float, float* %33, i64 0
%35 = load float, float* %34
%36 = fpext float %35 to double
%37 = fcmp olt double %32, %36
br i1 %37, label %38, label %43
38: ; preds = %27
%39 = load float*, float** %9
%40 = getelementptr inbounds float, float* %39, i64 0
%41 = load float, float* %40
%42 = fpext float %41 to double
store double %42, double* %8
br label %62
43: ; preds = %27
%44 = load double, double* %8
%45 = load float*, float** %9
%46 = load i32, i32* %11
%47 = sub nsw i32 %46, 1
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds float, float* %45, i64 %48
%50 = load float, float* %49
%51 = fpext float %50 to double
%52 = fcmp ogt double %44, %51
br i1 %52, label %53, label %61
53: ; preds = %43
%54 = load float*, float** %9
%55 = load i32, i32* %11
%56 = sub nsw i32 %55, 1
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds float, float* %54, i64 %57
%59 = load float, float* %58
%60 = fpext float %59 to double
store double %60, double* %8
br label %61
61: ; preds = %53, %43
br label %62
62: ; preds = %61, %38
%63 = load double, double* %8
%64 = load float*, float** %9
%65 = load i32, i32* %11
%66 = call i32 @indexx(double %63, float* %64, i32 %65)
store i32 %66, i32* %14
%67 = load i32, i32* %14
%68 = icmp slt i32 %67, 0
br i1 %68, label %69, label %70
69: ; preds = %62
store i32 0, i32* %14
br label %70
70: ; preds = %69, %62
%71 = load i32, i32* %14
%72 = load i32, i32* %11
%73 = sub nsw i32 %72, 1
%74 = icmp sgt i32 %71, %73
br i1 %74, label %75, label %78
75: ; preds = %70
%76 = load i32, i32* %11
%77 = sub nsw i32 %76, 1
store i32 %77, i32* %14
br label %78
78: ; preds = %75, %70
%79 = load i32, i32* %14
store i32 %79, i32* %15
br label %80
80: ; preds = %97, %78
%81 = load i32, i32* %14
%82 = icmp sge i32 %81, 0
br i1 %82, label %83, label %94
83: ; preds = %80
%84 = load float*, float** %9
%85 = load i32, i32* %14
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds float, float* %84, i64 %86
%88 = load float, float* %87
%89 = fpext float %88 to double
%90 = load double, double* %13
%91 = fadd double %89, %90
%92 = load double, double* %8
%93 = fcmp oge double %91, %92
br label %94
94: ; preds = %83, %80
%95 = phi i1 [ false, %80 ], [ %93, %83 ]
br i1 %95, label %96, label %100
96: ; preds = %94
br label %97
97: ; preds = %96
%98 = load i32, i32* %14
%99 = add nsw i32 %98, -1
store i32 %99, i32* %14
br label %80
100: ; preds = %94
%101 = load i32, i32* %14
%102 = add nsw i32 %101, 1
store i32 %102, i32* %14
br label %103
103: ; preds = %121, %100
%104 = load i32, i32* %15
%105 = load i32, i32* %11
%106 = icmp slt i32 %104, %105
br i1 %106, label %107, label %118
107: ; preds = %103
%108 = load float*, float** %9
%109 = load i32, i32* %15
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds float, float* %108, i64 %110
%112 = load float, float* %111
%113 = fpext float %112 to double
%114 = load double, double* %13
%115 = fsub double %113, %114
%116 = load double, double* %8
%117 = fcmp ole double %115, %116
br label %118
118: ; preds = %107, %103
%119 = phi i1 [ false, %103 ], [ %117, %107 ]
br i1 %119, label %120, label %124
120: ; preds = %118
br label %121
121: ; preds = %120
%122 = load i32, i32* %15
%123 = add nsw i32 %122, 1
store i32 %123, i32* %15
br label %103
124: ; preds = %118
%125 = load i32, i32* %15
%126 = add nsw i32 %125, -1
store i32 %126, i32* %15
%127 = load i32, i32* %15
%128 = load i32, i32* %14
%129 = sub nsw i32 %127, %128
%130 = add nsw i32 %129, 1
store i32 %130, i32* %17
%131 = load i32, i32* %17
%132 = icmp slt i32 %131, 2
br i1 %132, label %133, label %172
133: ; preds = %124
%134 = load i32, i32* %14
%135 = load i32, i32* %11
%136 = sub nsw i32 %135, 1
%137 = icmp sge i32 %134, %136
br i1 %137, label %138, label %141
138: ; preds = %133
%139 = load i32, i32* %14
%140 = add nsw i32 %139, -1
store i32 %140, i32* %14
br label %141
141: ; preds = %138, %133
%142 = load i32, i32* %14
%143 = icmp slt i32 %142, 0
br i1 %143, label %144, label %145
144: ; preds = %141
store double 0.000000e+00, double* %7
br label %257
145: ; preds = %141
%146 = load float*, float** %10
%147 = load i32, i32* %14
%148 = add nsw i32 %147, 1
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds float, float* %146, i64 %149
%151 = load float, float* %150
%152 = load float*, float** %10
%153 = load i32, i32* %14
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds float, float* %152, i64 %154
%156 = load float, float* %155
%157 = fsub float %151, %156
%158 = load float*, float** %9
%159 = load i32, i32* %14
%160 = add nsw i32 %159, 1
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds float, float* %158, i64 %161
%163 = load float, float* %162
%164 = load float*, float** %9
%165 = load i32, i32* %14
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds float, float* %164, i64 %166
%168 = load float, float* %167
%169 = fsub float %163, %168
%170 = fdiv float %157, %169
%171 = fpext float %170 to double
store double %171, double* %7
br label %257
172: ; preds = %124
%173 = load i32, i32* %17
%174 = load i32, i32* %12
%175 = add nsw i32 %174, 1
%176 = icmp slt i32 %173, %175
br i1 %176, label %177, label %180
177: ; preds = %172
%178 = load i32, i32* %17
%179 = sub nsw i32 %178, 1
store i32 %179, i32* %12
br label %180
180: ; preds = %177, %172
%181 = load i32, i32* %17
%182 = sext i32 %181 to i64
%183 = mul i64 16, %182
%184 = trunc i64 %183 to i32
%185 = load i8*, i8** @interp_high_order_slopef.funcname
%186 = call i32 @willus_mem_alloc_warn(i8** %21, i32 %184, i8* %185, i32 10)
%187 = load i8*, i8** %21
%188 = bitcast i8* %187 to double*
store double* %188, double** %22
%189 = load double*, double** %22
%190 = load i32, i32* %17
%191 = sext i32 %190 to i64
%192 = getelementptr inbounds double, double* %189, i64 %191
store double* %192, double** %23
store i32 0, i32* %16
br label %193
193: ; preds = %222, %180
%194 = load i32, i32* %16
%195 = load i32, i32* %17
%196 = icmp slt i32 %194, %195
br i1 %196, label %197, label %225
197: ; preds = %193
%198 = load float*, float** %9
%199 = load i32, i32* %16
%200 = load i32, i32* %14
%201 = add nsw i32 %199, %200
%202 = sext i32 %201 to i64
%203 = getelementptr inbounds float, float* %198, i64 %202
%204 = load float, float* %203
%205 = fpext float %204 to double
%206 = load double*, double** %22
%207 = load i32, i32* %16
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds double, double* %206, i64 %208
store double %205, double* %209
%210 = load float*, float** %10
%211 = load i32, i32* %16
%212 = load i32, i32* %14
%213 = add nsw i32 %211, %212
%214 = sext i32 %213 to i64
%215 = getelementptr inbounds float, float* %210, i64 %214
%216 = load float, float* %215
%217 = fpext float %216 to double
%218 = load double*, double** %23
%219 = load i32, i32* %16
%220 = sext i32 %219 to i64
%221 = getelementptr inbounds double, double* %218, i64 %220
store double %217, double* %221
br label %222
222: ; preds = %197
%223 = load i32, i32* %16
%224 = add nsw i32 %223, 1
store i32 %224, i32* %16
br label %193
225: ; preds = %193
%226 = load double*, double** %22
%227 = load double*, double** %23
%228 = load i32, i32* %17
%229 = load i32, i32* %12
%230 = getelementptr inbounds [16 x double], [16 x double]* %18, i64 0, i64 0
%231 = call i32 @gslpolyfit(double* %226, double* %227, i32 %228, i32 %229, double* %230)
%232 = load i8*, i8** @interp_high_order_slopef.funcname
%233 = call i32 @willus_mem_free(double** %22, i8* %232)
store double 0.000000e+00, double* %20
store double 1.000000e+00, double* %19
store i32 1, i32* %16
br label %234
234: ; preds = %239, %225
%235 = load i32, i32* %16
%236 = load i32, i32* %12
%237 = icmp sle i32 %235, %236
br i1 %237, label %238, label %255
238: ; preds = %234
br label %239
239: ; preds = %238
%240 = load i32, i32* %16
%241 = sitofp i32 %240 to double
%242 = load double, double* %19
%243 = fmul double %241, %242
%244 = load i32, i32* %16
%245 = sext i32 %244 to i64
%246 = getelementptr inbounds [16 x double], [16 x double]* %18, i64 0, i64 %245
%247 = load double, double* %246
%248 = load double, double* %20
%249 = call double @llvm.fmuladd.f64(double %243, double %247, double %248)
store double %249, double* %20
%250 = load double, double* %8
%251 = load double, double* %19
%252 = fmul double %251, %250
store double %252, double* %19
%253 = load i32, i32* %16
%254 = add nsw i32 %253, 1
store i32 %254, i32* %16
br label %234
255: ; preds = %234
%256 = load double, double* %20
store double %256, double* %7
br label %257
257: ; preds = %255, %145, %144
%258 = load double, double* %7
ret double %258
}

LLVM IR (-O2):
@.str = [25 x i8] c"interp_high_order_slopef\00"
define double @interp_high_order_slopef(double %0, float* %1, float* nocapture %2, i32 %3, i32 %4, double %5) {
%7 = alloca [16 x double]
%8 = alloca i8*
%9 = alloca double*
%10 = bitcast [16 x double]* %7 to i8*
%11 = bitcast i8** %8 to i8*
%12 = bitcast double** %9 to i8*
%13 = icmp slt i32 %4, 15
%14 = select i1 %13, i32 %4, i32 15
%15 = tail call i32 @fabs(double %5)
%16 = sitofp i32 %15 to double
%17 = fmul double %16, 5.000000e-01
%18 = load float, float* %1
%19 = fpext float %18 to double
%20 = fcmp ogt double %19, %0
%21 = add nsw i32 %3, -1
br i1 %20, label %29, label %22
22: ; preds = %6
%23 = sext i32 %21 to i64
%24 = getelementptr inbounds float, float* %1, i64 %23
%25 = load float, float* %24
%26 = fpext float %25 to double
%27 = fcmp olt double %26, %0
br i1 %27, label %28, label %29
28: ; preds = %22
br label %29
29: ; preds = %6, %22, %28
%30 = phi double [ %0, %22 ], [ %26, %28 ], [ %19, %6 ]
%31 = tail call i32 @indexx(double %30, float* %1, i32 %3)
%32 = icmp sgt i32 %31, 0
%33 = select i1 %32, i32 %31, i32 0
%34 = icmp slt i32 %33, %3
%35 = select i1 %34, i32 %33, i32 %21
%36 = icmp sgt i32 %35, -1
br i1 %36, label %37, label %51
37: ; preds = %29
%38 = zext i32 %35 to i64
br label %39
39: ; preds = %37, %46
%40 = phi i64 [ %38, %37 ], [ %47, %46 ]
%41 = getelementptr inbounds float, float* %1, i64 %40
%42 = load float, float* %41
%43 = fpext float %42 to double
%44 = fadd double %17, %43
%45 = fcmp ult double %44, %30
br i1 %45, label %49, label %46
46: ; preds = %39
%47 = add nsw i64 %40, -1
%48 = icmp sgt i64 %40, 0
br i1 %48, label %39, label %51
49: ; preds = %39
%50 = trunc i64 %40 to i32
br label %51
51: ; preds = %46, %49, %29
%52 = phi i32 [ %35, %29 ], [ %50, %49 ], [ -1, %46 ]
%53 = add nsw i32 %52, 1
%54 = sext i32 %35 to i64
%55 = sext i32 %3 to i64
%56 = add i32 %35, 1
%57 = call i32 @llvm.smax.i32(i32 %3, i32 %56)
br label %58
58: ; preds = %51, %65
%59 = phi i64 [ %54, %51 ], [ %66, %65 ]
%60 = getelementptr inbounds float, float* %1, i64 %59
%61 = load float, float* %60
%62 = fpext float %61 to double
%63 = fsub double %62, %17
%64 = fcmp ugt double %63, %30
br i1 %64, label %68, label %65
65: ; preds = %58
%66 = add nsw i64 %59, 1
%67 = icmp slt i64 %66, %55
br i1 %67, label %58, label %70
68: ; preds = %58
%69 = trunc i64 %59 to i32
br label %70
70: ; preds = %65, %68
%71 = phi i32 [ %69, %68 ], [ %57, %65 ]
%72 = sub i32 -2, %52
%73 = add i32 %71, %72
%74 = add i32 %73, 1
%75 = icmp slt i32 %73, 1
br i1 %75, label %76, label %96
76: ; preds = %70
%77 = icmp slt i32 %53, %21
%78 = select i1 %77, i32 %53, i32 %52
%79 = icmp slt i32 %78, 0
br i1 %79, label %202, label %80
80: ; preds = %76
%81 = add nuw nsw i32 %78, 1
%82 = zext i32 %81 to i64
%83 = getelementptr inbounds float, float* %2, i64 %82
%84 = load float, float* %83
%85 = zext i32 %78 to i64
%86 = getelementptr inbounds float, float* %2, i64 %85
%87 = load float, float* %86
%88 = fsub float %84, %87
%89 = getelementptr inbounds float, float* %1, i64 %82
%90 = load float, float* %89
%91 = getelementptr inbounds float, float* %1, i64 %85
%92 = load float, float* %91
%93 = fsub float %90, %92
%94 = fdiv float %88, %93
%95 = fpext float %94 to double
br label %202
96: ; preds = %70
%97 = icmp slt i32 %73, %14
%98 = select i1 %97, i32 %73, i32 %14
%99 = zext i32 %74 to i64
%100 = shl i32 %74, 4
%101 = call i32 @willus_mem_alloc_warn(i8** %8, i32 %100, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 10)
%102 = bitcast i8** %8 to double**
%103 = load double*, double** %102
store double* %103, double** %9
%104 = getelementptr inbounds double, double* %103, i64 %99
%105 = sext i32 %53 to i64
%106 = icmp ult i32 %74, 4
br i1 %106, label %140, label %107
107: ; preds = %96
%108 = and i64 %99, 4294967292
br label %109
109: ; preds = %109, %107
%110 = phi i64 [ 0, %107 ], [ %136, %109 ]
%111 = add nsw i64 %110, %105
%112 = getelementptr inbounds float, float* %1, i64 %111
%113 = bitcast float* %112 to <2 x float>*
%114 = load <2 x float>, <2 x float>* %113
%115 = getelementptr inbounds float, float* %112, i64 2
%116 = bitcast float* %115 to <2 x float>*
%117 = load <2 x float>, <2 x float>* %116
%118 = fpext <2 x float> %114 to <2 x double>
%119 = fpext <2 x float> %117 to <2 x double>
%120 = getelementptr inbounds double, double* %103, i64 %110
%121 = bitcast double* %120 to <2 x double>*
store <2 x double> %118, <2 x double>* %121
%122 = getelementptr inbounds double, double* %120, i64 2
%123 = bitcast double* %122 to <2 x double>*
store <2 x double> %119, <2 x double>* %123
%124 = getelementptr inbounds float, float* %2, i64 %111
%125 = bitcast float* %124 to <2 x float>*
%126 = load <2 x float>, <2 x float>* %125
%127 = getelementptr inbounds float, float* %124, i64 2
%128 = bitcast float* %127 to <2 x float>*
%129 = load <2 x float>, <2 x float>* %128
%130 = fpext <2 x float> %126 to <2 x double>
%131 = fpext <2 x float> %129 to <2 x double>
%132 = getelementptr inbounds double, double* %104, i64 %110
%133 = bitcast double* %132 to <2 x double>*
store <2 x double> %130, <2 x double>* %133
%134 = getelementptr inbounds double, double* %132, i64 2
%135 = bitcast double* %134 to <2 x double>*
store <2 x double> %131, <2 x double>* %135
%136 = add nuw i64 %110, 4
%137 = icmp eq i64 %136, %108
br i1 %137, label %138, label %109
138: ; preds = %109
%139 = icmp eq i64 %108, %99
br i1 %139, label %155, label %140
140: ; preds = %96, %138
%141 = phi i64 [ 0, %96 ], [ %108, %138 ]
br label %142
142: ; preds = %140, %142
%143 = phi i64 [ %153, %142 ], [ %141, %140 ]
%144 = add nsw i64 %143, %105
%145 = getelementptr inbounds float, float* %1, i64 %144
%146 = load float, float* %145
%147 = fpext float %146 to double
%148 = getelementptr inbounds double, double* %103, i64 %143
store double %147, double* %148
%149 = getelementptr inbounds float, float* %2, i64 %144
%150 = load float, float* %149
%151 = fpext float %150 to double
%152 = getelementptr inbounds double, double* %104, i64 %143
store double %151, double* %152
%153 = add nuw nsw i64 %143, 1
%154 = icmp eq i64 %153, %99
br i1 %154, label %155, label %142
155: ; preds = %142, %138
%156 = getelementptr inbounds [16 x double], [16 x double]* %7, i64 0, i64 0
%157 = call i32 @gslpolyfit(double* %103, double* %104, i32 %74, i32 %98, double* %156)
%158 = call i32 @willus_mem_free(double** %9, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%159 = icmp slt i32 %98, 1
br i1 %159, label %202, label %160
160: ; preds = %155
%161 = zext i32 %98 to i64
%162 = and i64 %161, 1
%163 = icmp eq i32 %98, 1
br i1 %163, label %189, label %164
164: ; preds = %160
%165 = and i64 %161, 4294967294
br label %166
166: ; preds = %166, %164
%167 = phi i64 [ 1, %164 ], [ %186, %166 ]
%168 = phi double [ 0.000000e+00, %164 ], [ %184, %166 ]
%169 = phi double [ 1.000000e+00, %164 ], [ %185, %166 ]
%170 = phi i64 [ 0, %164 ], [ %187, %166 ]
%171 = trunc i64 %167 to i32
%172 = sitofp i32 %171 to double
%173 = fmul double %169, %172
%174 = getelementptr inbounds [16 x double], [16 x double]* %7, i64 0, i64 %167
%175 = load double, double* %174
%176 = call double @llvm.fmuladd.f64(double %173, double %175, double %168)
%177 = fmul double %30, %169
%178 = add nuw nsw i64 %167, 1
%179 = trunc i64 %178 to i32
%180 = sitofp i32 %179 to double
%181 = fmul double %177, %180
%182 = getelementptr inbounds [16 x double], [16 x double]* %7, i64 0, i64 %178
%183 = load double, double* %182
%184 = call double @llvm.fmuladd.f64(double %181, double %183, double %176)
%185 = fmul double %30, %177
%186 = add nuw nsw i64 %167, 2
%187 = add i64 %170, 2
%188 = icmp eq i64 %187, %165
br i1 %188, label %189, label %166
189: ; preds = %166, %160
%190 = phi double [ undef, %160 ], [ %184, %166 ]
%191 = phi i64 [ 1, %160 ], [ %186, %166 ]
%192 = phi double [ 0.000000e+00, %160 ], [ %184, %166 ]
%193 = phi double [ 1.000000e+00, %160 ], [ %185, %166 ]
%194 = icmp eq i64 %162, 0
br i1 %194, label %202, label %195
195: ; preds = %189
%196 = trunc i64 %191 to i32
%197 = sitofp i32 %196 to double
%198 = fmul double %193, %197
%199 = getelementptr inbounds [16 x double], [16 x double]* %7, i64 0, i64 %191
%200 = load double, double* %199
%201 = call double @llvm.fmuladd.f64(double %198, double %200, double %192)
br label %202
202: ; preds = %195, %189, %155, %76, %80
%203 = phi double [ %95, %80 ], [ 0.000000e+00, %76 ], [ 0.000000e+00, %155 ], [ %190, %189 ], [ %201, %195 ]
ret double %203
}