int rkqs(y, dydx, n, x, htry, eps, yscal, hdid, hnext, work, ier)
double *hdid, *hnext, *x, *dydx, eps, htry, *y, *yscal, *work;
int n, *ier;
{
  int i;
  double errmax, h, htemp, xnew, *yerr, *ytemp;
  double *work2;
  yerr = work;
  ytemp = work + n;
  work2 = ytemp + n;
  h = htry;
  *ier = 0;
  for (;;) {
    rkck(y, dydx, n, *x, h, ytemp, yerr, work2);
    errmax = 0.0;
    for (i = 0; i < n; i++)
      errmax =
          ((errmax) > (fabs(yerr[i] / yscal[i])) ? (errmax)
                                                 : (fabs(yerr[i] / yscal[i])));
    errmax /= eps;
    if (errmax > 1.0) {
      htemp = 0.9 * h * pow(errmax, -0.25);
      h = (h >= 0.0 ? ((htemp) > (0.1 * h) ? (htemp) : (0.1 * h))
                    : ((htemp) < (0.1 * h) ? (htemp) : (0.1 * h)));
      xnew = (*x) + h;
      if (xnew == *x) {
        *ier = 1;
        return -1;
      }
      continue;
    } else {
      if (errmax > 1.89e-4)
        *hnext = 0.9 * h * pow(errmax, -0.2);
      else
        *hnext = 5.0 * h;
      *x += (*hdid = h);
      for (i = 0; i < n; i++)
        y[i] = ytemp[i];
      break;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<rkqs>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %rcx,-0x28(%rbp)
movsd  %xmm0,-0x30(%rbp)
movsd  %xmm1,-0x38(%rbp)
mov    %r8,-0x40(%rbp)
mov    %r9,-0x48(%rbp)
mov    0x18(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x80(%rbp)
mov    -0x80(%rbp),%rax
movslq -0x1c(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x88(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    0x20(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x60(%rbp),%xmm1
mov    -0x80(%rbp),%rcx
mov    -0x78(%rbp),%r8
mov    -0x88(%rbp),%r9
mov    $0x2,%al
call   1040 <rkck@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1274 <rkqs+0x154>
movsd  -0x58(%rbp),%xmm0
mov    -0x78(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm1
movaps 0xe34(%rip),%xmm2
pand   %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jbe    122c <rkqs+0x10c>
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    1259 <rkqs+0x139>
mov    -0x78(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movaps 0xdf3(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x58(%rbp)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    11da <rkqs+0xba>
movsd  -0x38(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0xd6c(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    13e9 <rkqs+0x2c9>
movsd  0xd7a(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  0xd68(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x98(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x60(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1343 <rkqs+0x223>
movsd  -0x68(%rbp),%xmm0
movsd  0xd38(%rip),%xmm1
mulsd  -0x60(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jbe    1319 <rkqs+0x1f9>
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
jmp    132e <rkqs+0x20e>
movsd  0xd0f(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    1396 <rkqs+0x276>
movsd  -0x68(%rbp),%xmm1
movsd  0xce0(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1371 <rkqs+0x251>
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    1386 <rkqs+0x266>
movsd  0xcb7(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0x60(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
mov    -0x28(%rbp),%rax
ucomisd (%rax),%xmm0
jne    13e4 <rkqs+0x2c4>
jp     13e4 <rkqs+0x2c4>
mov    0x20(%rbp),%rax
movl   $0x1,(%rax)
movl   $0xffffffff,-0x4(%rbp)
jmp    14b8 <rkqs+0x398>
jmp    119d <rkqs+0x7d>
movsd  -0x58(%rbp),%xmm0
movsd  0xc12(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1443 <rkqs+0x323>
movsd  0xc18(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  0xbf6(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xb8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1458 <rkqs+0x338>
movsd  0xbc5(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x60(%rbp),%xmm0
mov    -0x48(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    14ac <rkqs+0x38c>
mov    -0x80(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1478 <rkqs+0x358>
jmp    14b1 <rkqs+0x391>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rkqs>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r9,0x28(%rsp)
mov    %r8,%r12
movsd  %xmm1,0x40(%rsp)
movapd %xmm0,%xmm1
mov    %rcx,%r8
mov    %edx,%ebp
mov    %rsi,0x38(%rsp)
mov    %rdi,%r14
mov    0x90(%rsp),%rdx
mov    0x88(%rsp),%rbx
movslq %ebp,%rax
lea    (%rbx,%rax,8),%rcx
lea    (%rcx,%rax,8),%rsi
mov    %rsi,0x30(%rsp)
movl   $0x0,(%rdx)
mov    %r8,0x20(%rsp)
movsd  (%r8),%xmm0
mov    %rax,(%rsp)
mov    %eax,%r15d
mov    %r15,0x10(%rsp)
and    $0xfffffffe,%r15d
jmp    11b0 <rkqs+0x90>
nop
mov    0x20(%rsp),%rax
movsd  (%rax),%xmm0
movapd %xmm1,%xmm2
addsd  %xmm0,%xmm2
ucomisd %xmm0,%xmm2
mov    %r13,%rcx
jne    11b0 <rkqs+0x90>
jnp    12f7 <rkqs+0x1d7>
mov    %r14,%rdi
mov    0x38(%rsp),%rsi
mov    %ebp,%edx
movsd  %xmm1,0x8(%rsp)
mov    %rcx,%r13
mov    %rbx,%r8
mov    0x30(%rsp),%r9
mov    $0x2,%al
call   1040 <rkck@plt>
xorpd  %xmm0,%xmm0
test   %ebp,%ebp
jle    123f <rkqs+0x11f>
xorpd  %xmm0,%xmm0
xor    %eax,%eax
cmp    $0x1,%ebp
je     1221 <rkqs+0x101>
movapd 0xe13(%rip),%xmm3
nopl   (%rax)
movsd  (%rbx,%rax,8),%xmm1
movsd  0x8(%rbx,%rax,8),%xmm2
divsd  (%r12,%rax,8),%xmm1
andpd  %xmm3,%xmm1
maxsd  %xmm1,%xmm0
divsd  0x8(%r12,%rax,8),%xmm2
andpd  %xmm3,%xmm2
maxsd  %xmm2,%xmm0
add    $0x2,%rax
cmp    %rax,%r15
jne    11f0 <rkqs+0xd0>
testb  $0x1,0x10(%rsp)
je     123f <rkqs+0x11f>
movsd  (%rbx,%rax,8),%xmm1
divsd  (%r12,%rax,8),%xmm1
andpd  0xdc5(%rip),%xmm1
maxsd  %xmm1,%xmm0
divsd  0x40(%rsp),%xmm0
ucomisd 0xdc3(%rip),%xmm0
jbe    12ba <rkqs+0x19a>
movsd  0x8(%rsp),%xmm1
mulsd  0xdcb(%rip),%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  0xdcd(%rip),%xmm1
call   1030 <pow@plt>
mulsd  0x18(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
movapd %xmm1,%xmm2
mulsd  0xdb8(%rip),%xmm2
xor    %eax,%eax
ucomisd %xmm0,%xmm2
seta   %al
xor    %ecx,%ecx
ucomisd %xmm2,%xmm0
seta   %cl
ucomisd 0xda6(%rip),%xmm1
cmovb  %eax,%ecx
movapd %xmm0,%xmm1
test   %cl,%cl
jne    1190 <rkqs+0x70>
movapd %xmm2,%xmm1
jmp    1190 <rkqs+0x70>
ucomisd 0xd56(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
jbe    130f <rkqs+0x1ef>
movsd  0xd56(%rip),%xmm2
mulsd  %xmm1,%xmm2
movsd  %xmm2,0x18(%rsp)
movsd  0xd4c(%rip),%xmm1
call   1030 <pow@plt>
movsd  0x8(%rsp),%xmm1
mulsd  0x18(%rsp),%xmm0
jmp    131b <rkqs+0x1fb>
mov    0x90(%rsp),%rax
movl   $0x1,(%rax)
mov    $0xffffffff,%eax
jmp    14fb <rkqs+0x3db>
movsd  0xd09(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    0x80(%rsp),%rax
movsd  %xmm0,(%rax)
mov    0x28(%rsp),%rax
movsd  %xmm1,(%rax)
mov    0x20(%rsp),%rax
addsd  (%rax),%xmm1
movsd  %xmm1,(%rax)
test   %ebp,%ebp
jle    1352 <rkqs+0x232>
cmp    $0x4,%ebp
jae    1359 <rkqs+0x239>
xor    %ecx,%ecx
mov    0x10(%rsp),%rbp
jmp    147a <rkqs+0x35a>
xor    %eax,%eax
jmp    14fb <rkqs+0x3db>
mov    0x10(%rsp),%rbp
mov    (%rsp),%rax
add    %rbp,%rax
lea    (%rbx,%rax,8),%rax
cmp    %r14,%rax
jbe    137e <rkqs+0x25e>
lea    (%r14,%rbp,8),%rax
cmp    %rax,%r13
jae    137e <rkqs+0x25e>
xor    %ecx,%ecx
jmp    147a <rkqs+0x35a>
mov    %ebp,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rsi
mov    %rsi,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edx,%eax
and    $0x3,%eax
cmp    $0xc,%rsi
jae    13a4 <rkqs+0x284>
xor    %esi,%esi
jmp    1424 <rkqs+0x304>
and    $0xfffffffffffffffc,%rdx
mov    (%rsp),%rsi
lea    (%rbx,%rsi,8),%rdi
add    $0x70,%rdi
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
movups -0x70(%rdi,%rsi,8),%xmm0
movups -0x60(%rdi,%rsi,8),%xmm1
movups %xmm0,(%r14,%rsi,8)
movups %xmm1,0x10(%r14,%rsi,8)
movups -0x50(%rdi,%rsi,8),%xmm0
movups -0x40(%rdi,%rsi,8),%xmm1
movups %xmm0,0x20(%r14,%rsi,8)
movups %xmm1,0x30(%r14,%rsi,8)
movups -0x30(%rdi,%rsi,8),%xmm0
movups -0x20(%rdi,%rsi,8),%xmm1
movups %xmm0,0x40(%r14,%rsi,8)
movups %xmm1,0x50(%r14,%rsi,8)
movupd -0x10(%rdi,%rsi,8),%xmm0
movupd (%rdi,%rsi,8),%xmm1
movupd %xmm0,0x60(%r14,%rsi,8)
movupd %xmm1,0x70(%r14,%rsi,8)
add    $0x10,%rsi
add    $0xfffffffffffffffc,%rdx
jne    13c0 <rkqs+0x2a0>
test   %rax,%rax
je     146f <rkqs+0x34f>
lea    (%r14,%rsi,8),%rdx
add    $0x10,%rdx
add    (%rsp),%rsi
lea    (%rbx,%rsi,8),%rsi
add    $0x10,%rsi
shl    $0x5,%rax
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movupd -0x10(%rsi,%rdi,1),%xmm0
movupd (%rsi,%rdi,1),%xmm1
movupd %xmm0,-0x10(%rdx,%rdi,1)
movupd %xmm1,(%rdx,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rax
jne    1450 <rkqs+0x330>
xor    %eax,%eax
cmp    %rbp,%rcx
je     14fb <rkqs+0x3db>
mov    %rcx,%rdx
not    %rdx
add    %rbp,%rdx
mov    %rbp,%rax
and    $0x3,%rax
je     14a7 <rkqs+0x387>
nopl   0x0(%rax)
movsd  0x0(%r13,%rcx,8),%xmm0
movsd  %xmm0,(%r14,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rax
jne    1490 <rkqs+0x370>
xor    %eax,%eax
cmp    $0x3,%rdx
jb     14fb <rkqs+0x3db>
mov    (%rsp),%rdx
lea    (%rbx,%rdx,8),%rdx
add    $0x18,%rdx
nopl   0x0(%rax,%rax,1)
movsd  -0x18(%rdx,%rcx,8),%xmm0
movsd  %xmm0,(%r14,%rcx,8)
movsd  -0x10(%rdx,%rcx,8),%xmm0
movsd  %xmm0,0x8(%r14,%rcx,8)
movsd  -0x8(%rdx,%rcx,8),%xmm0
movsd  %xmm0,0x10(%r14,%rcx,8)
movsd  (%rdx,%rcx,8),%xmm0
movsd  %xmm0,0x18(%r14,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%rbp
jne    14c0 <rkqs+0x3a0>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rkqs(double* %0, double* %1, i32 %2, double* %3, double %4, double %5, double* %6, double* %7, double* %8, double* %9, i32* %10) {
%12 = alloca i32
%13 = alloca double*
%14 = alloca double*
%15 = alloca i32
%16 = alloca double*
%17 = alloca double
%18 = alloca double
%19 = alloca double*
%20 = alloca double*
%21 = alloca double*
%22 = alloca double*
%23 = alloca i32*
%24 = alloca i32
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double*
%30 = alloca double*
%31 = alloca double*
store double* %0, double** %13
store double* %1, double** %14
store i32 %2, i32* %15
store double* %3, double** %16
store double %4, double* %17
store double %5, double* %18
store double* %6, double** %19
store double* %7, double** %20
store double* %8, double** %21
store double* %9, double** %22
store i32* %10, i32** %23
%32 = load double*, double** %22
store double* %32, double** %29
%33 = load double*, double** %22
%34 = load i32, i32* %15
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds double, double* %33, i64 %35
store double* %36, double** %30
%37 = load double*, double** %30
%38 = load i32, i32* %15
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds double, double* %37, i64 %39
store double* %40, double** %31
%41 = load double, double* %17
store double %41, double* %26
%42 = load i32*, i32** %23
store i32 0, i32* %42
br label %43
43: ; preds = %143, %11
%44 = load double*, double** %13
%45 = load double*, double** %14
%46 = load i32, i32* %15
%47 = load double*, double** %16
%48 = load double, double* %47
%49 = load double, double* %26
%50 = load double*, double** %30
%51 = load double*, double** %29
%52 = load double*, double** %31
%53 = call i32 (double*, double*, i32, double, double, double*, double*, double*, ...) bitcast (i32 (...)* @rkck to i32 (double*, double*, i32, double, double, double*, double*, double*, ...)*)(double* %44, double* %45, i32 %46, double %48, double %49, double* %50, double* %51, double* %52)
store double 0.000000e+00, double* %25
store i32 0, i32* %24
br label %54
54: ; preds = %90, %43
%55 = load i32, i32* %24
%56 = load i32, i32* %15
%57 = icmp slt i32 %55, %56
br i1 %57, label %58, label %93
58: ; preds = %54
%59 = load double, double* %25
%60 = load double*, double** %29
%61 = load i32, i32* %24
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds double, double* %60, i64 %62
%64 = load double, double* %63
%65 = load double*, double** %19
%66 = load i32, i32* %24
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds double, double* %65, i64 %67
%69 = load double, double* %68
%70 = fdiv double %64, %69
%71 = call double @llvm.fabs.f64(double %70)
%72 = fcmp ogt double %59, %71
br i1 %72, label %73, label %75
73: ; preds = %58
%74 = load double, double* %25
br label %88
75: ; preds = %58
%76 = load double*, double** %29
%77 = load i32, i32* %24
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds double, double* %76, i64 %78
%80 = load double, double* %79
%81 = load double*, double** %19
%82 = load i32, i32* %24
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds double, double* %81, i64 %83
%85 = load double, double* %84
%86 = fdiv double %80, %85
%87 = call double @llvm.fabs.f64(double %86)
br label %88
88: ; preds = %75, %73
%89 = phi double [ %74, %73 ], [ %87, %75 ]
store double %89, double* %25
br label %90
90: ; preds = %88
%91 = load i32, i32* %24
%92 = add nsw i32 %91, 1
store i32 %92, i32* %24
br label %54
93: ; preds = %54
%94 = load double, double* %18
%95 = load double, double* %25
%96 = fdiv double %95, %94
store double %96, double* %25
%97 = load double, double* %25
%98 = fcmp ogt double %97, 1.000000e+00
br i1 %98, label %99, label %144
99: ; preds = %93
%100 = load double, double* %26
%101 = fmul double 9.000000e-01, %100
%102 = load double, double* %25
%103 = call double @pow(double %102, double -2.500000e-01)
%104 = fmul double %101, %103
store double %104, double* %27
%105 = load double, double* %26
%106 = fcmp oge double %105, 0.000000e+00
br i1 %106, label %107, label %119
107: ; preds = %99
%108 = load double, double* %27
%109 = load double, double* %26
%110 = fmul double 1.000000e-01, %109
%111 = fcmp ogt double %108, %110
br i1 %111, label %112, label %114
112: ; preds = %107
%113 = load double, double* %27
br label %117
114: ; preds = %107
%115 = load double, double* %26
%116 = fmul double 1.000000e-01, %115
br label %117
117: ; preds = %114, %112
%118 = phi double [ %113, %112 ], [ %116, %114 ]
br label %131
119: ; preds = %99
%120 = load double, double* %27
%121 = load double, double* %26
%122 = fmul double 1.000000e-01, %121
%123 = fcmp olt double %120, %122
br i1 %123, label %124, label %126
124: ; preds = %119
%125 = load double, double* %27
br label %129
126: ; preds = %119
%127 = load double, double* %26
%128 = fmul double 1.000000e-01, %127
br label %129
129: ; preds = %126, %124
%130 = phi double [ %125, %124 ], [ %128, %126 ]
br label %131
131: ; preds = %129, %117
%132 = phi double [ %118, %117 ], [ %130, %129 ]
store double %132, double* %26
%133 = load double*, double** %16
%134 = load double, double* %133
%135 = load double, double* %26
%136 = fadd double %134, %135
store double %136, double* %28
%137 = load double, double* %28
%138 = load double*, double** %16
%139 = load double, double* %138
%140 = fcmp oeq double %137, %139
br i1 %140, label %141, label %143
141: ; preds = %131
%142 = load i32*, i32** %23
store i32 1, i32* %142
store i32 -1, i32* %12
br label %183
143: ; preds = %131
br label %43
144: ; preds = %93
%145 = load double, double* %25
%146 = fcmp ogt double %145, 1.890000e-04
br i1 %146, label %147, label %154
147: ; preds = %144
%148 = load double, double* %26
%149 = fmul double 9.000000e-01, %148
%150 = load double, double* %25
%151 = call double @pow(double %150, double -2.000000e-01)
%152 = fmul double %149, %151
%153 = load double*, double** %21
store double %152, double* %153
br label %158
154: ; preds = %144
%155 = load double, double* %26
%156 = fmul double 5.000000e+00, %155
%157 = load double*, double** %21
store double %156, double* %157
br label %158
158: ; preds = %154, %147
%159 = load double, double* %26
%160 = load double*, double** %20
store double %159, double* %160
%161 = load double*, double** %16
%162 = load double, double* %161
%163 = fadd double %162, %159
store double %163, double* %161
store i32 0, i32* %24
br label %164
164: ; preds = %178, %158
%165 = load i32, i32* %24
%166 = load i32, i32* %15
%167 = icmp slt i32 %165, %166
br i1 %167, label %168, label %181
168: ; preds = %164
%169 = load double*, double** %30
%170 = load i32, i32* %24
%171 = sext i32 %170 to i64
%172 = getelementptr inbounds double, double* %169, i64 %171
%173 = load double, double* %172
%174 = load double*, double** %13
%175 = load i32, i32* %24
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds double, double* %174, i64 %176
store double %173, double* %177
br label %178
178: ; preds = %168
%179 = load i32, i32* %24
%180 = add nsw i32 %179, 1
store i32 %180, i32* %24
br label %164
181: ; preds = %164
br label %182
182: ; preds = %181
store i32 0, i32* %12
br label %183
183: ; preds = %182, %141
%184 = load i32, i32* %12
ret i32 %184
}

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