#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*/ derivs_three(double *, double *, double const *,
                                double const *);
void integrate_three_rk4(double *y, const double *params,
                         const double *coupling, double *output,
                         const double dt, const unsigned N,
                         const unsigned stride) {
  unsigned i, j, k;
  double dt2, dt6;
  double y1[3 * 5], y2[3 * 5], k1[3 * 5], k2[3 * 5], k3[3 * 5], k4[3 * 5];
  dt2 = dt / 2.;
  dt6 = dt / 6.;
  for (j = 0; j < 3; j++)
    output[j] = y[5 * j];
  for (i = 1; i < N; i++) {
    for (j = 0; j < stride; j++) {
      derivs_three(y, k1, params, coupling);
      for (k = 0; k < 3 * 5; k++)
        y1[k] = y[k] + k1[k] * dt2;
      derivs_three(y1, k2, params, coupling);
      for (k = 0; k < 3 * 5; k++)
        y2[k] = y[k] + k2[k] * dt2;
      derivs_three(y2, k3, params, coupling);
      for (k = 0; k < 3 * 5; k++)
        y2[k] = y[k] + k3[k] * dt;
      derivs_three(y2, k4, params, coupling);
      for (k = 0; k < 3 * 5; k++)
        y[k] += dt6 * (k1[k] + 2. * (k2[k] + k3[k]) + k4[k]);
    }
    for (j = 0; j < 3; j++)
      output[3 * i + j] = y[5 * j];
  }
}


x86 assembly (clang, -O0):
<integrate_three_rk4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x350,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
mov    %r9d,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xec3(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xea5(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x38(%rbp)
cmpl   $0x3,-0x38(%rbp)
jae    119e <integrate_three_rk4+0x8e>
mov    -0x8(%rbp),%rax
imul   $0x5,-0x38(%rbp),%ecx
mov    %ecx,%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x38(%rbp),%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    116b <integrate_three_rk4+0x5b>
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jae    13f8 <integrate_three_rk4+0x2e8>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x30(%rbp),%eax
jae    13a5 <integrate_three_rk4+0x295>
mov    -0x8(%rbp),%rdi
lea    -0x1d0(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <derivs_three@plt>
movl   $0x0,-0x3c(%rbp)
cmpl   $0xf,-0x3c(%rbp)
jae    122c <integrate_three_rk4+0x11c>
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x3c(%rbp),%eax
movsd  -0x1d0(%rbp,%rax,8),%xmm0
ff ff
movsd  -0x48(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x3c(%rbp),%eax
movsd  %xmm0,-0xd0(%rbp,%rax,8)
ff ff
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11e3 <integrate_three_rk4+0xd3>
lea    -0xd0(%rbp),%rdi
lea    -0x250(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <derivs_three@plt>
movl   $0x0,-0x3c(%rbp)
cmpl   $0xf,-0x3c(%rbp)
jae    1297 <integrate_three_rk4+0x187>
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x3c(%rbp),%eax
movsd  -0x250(%rbp,%rax,8),%xmm0
ff ff
movsd  -0x48(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x3c(%rbp),%eax
movsd  %xmm0,-0x150(%rbp,%rax,8)
ff ff
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    124e <integrate_three_rk4+0x13e>
lea    -0x150(%rbp),%rdi
lea    -0x2d0(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <derivs_three@plt>
movl   $0x0,-0x3c(%rbp)
cmpl   $0xf,-0x3c(%rbp)
jae    1302 <integrate_three_rk4+0x1f2>
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x3c(%rbp),%eax
movsd  -0x2d0(%rbp,%rax,8),%xmm0
ff ff
movsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x3c(%rbp),%eax
movsd  %xmm0,-0x150(%rbp,%rax,8)
ff ff
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    12b9 <integrate_three_rk4+0x1a9>
lea    -0x150(%rbp),%rdi
lea    -0x350(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <derivs_three@plt>
movl   $0x0,-0x3c(%rbp)
cmpl   $0xf,-0x3c(%rbp)
jae    1392 <integrate_three_rk4+0x282>
movsd  -0x50(%rbp),%xmm0
mov    -0x3c(%rbp),%eax
movsd  -0x1d0(%rbp,%rax,8),%xmm1
ff ff
mov    -0x3c(%rbp),%eax
movsd  -0x250(%rbp,%rax,8),%xmm2
ff ff
mov    -0x3c(%rbp),%eax
addsd  -0x2d0(%rbp,%rax,8),%xmm2
ff ff
addsd  %xmm2,%xmm2
addsd  %xmm1,%xmm2
mov    -0x3c(%rbp),%eax
addsd  -0x350(%rbp,%rax,8),%xmm2
ff ff
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1324 <integrate_three_rk4+0x214>
jmp    1397 <integrate_three_rk4+0x287>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    11b8 <integrate_three_rk4+0xa8>
movl   $0x0,-0x38(%rbp)
cmpl   $0x3,-0x38(%rbp)
jae    13e5 <integrate_three_rk4+0x2d5>
mov    -0x8(%rbp),%rax
imul   $0x5,-0x38(%rbp),%ecx
mov    %ecx,%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
imul   $0x3,-0x34(%rbp),%ecx
add    -0x38(%rbp),%ecx
mov    %ecx,%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    13ac <integrate_three_rk4+0x29c>
jmp    13ea <integrate_three_rk4+0x2da>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11a5 <integrate_three_rk4+0x95>
add    $0x350,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<integrate_three_rk4>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x368,%rsp
movaps %xmm0,0x20(%rsp)
movsd  (%rdi),%xmm0
movsd  %xmm0,(%rcx)
movsd  0x28(%rdi),%xmm0
movsd  %xmm0,0x8(%rcx)
movsd  0x50(%rdi),%xmm0
mov    %rcx,0x10(%rsp)
movsd  %xmm0,0x10(%rcx)
cmp    $0x2,%r8d
jb     15b2 <integrate_three_rk4+0x4a2>
mov    %r9d,%r15d
mov    %rdx,%r12
mov    %rsi,%rbp
mov    %rdi,%rbx
movsd  0xe9b(%rip),%xmm1
movapd 0x20(%rsp),%xmm0
mulsd  %xmm0,%xmm1
movapd %xmm0,%xmm2
divsd  0xe8d(%rip),%xmm2
mov    %r8d,%eax
mov    %rax,0x8(%rsp)
movapd %xmm1,0x40(%rsp)
unpcklpd %xmm1,%xmm1
movapd %xmm1,0x30(%rsp)
unpcklpd %xmm0,%xmm0
movapd %xmm0,0xd0(%rsp)
mov    $0x1,%edx
lea    0x50(%rsp),%r14
movapd %xmm2,0xe0(%rsp)
jmp    1203 <integrate_three_rk4+0xf3>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x18(%rsp),%rdx
lea    (%rdx,%rdx,2),%eax
movsd  (%rbx),%xmm0
mov    0x10(%rsp),%rcx
movsd  %xmm0,(%rcx,%rax,8)
movsd  0x28(%rbx),%xmm0
lea    0x1(%rdx,%rdx,2),%eax
movsd  %xmm0,(%rcx,%rax,8)
movsd  0x50(%rbx),%xmm0
lea    (%rdx,%rdx,2),%eax
add    $0x2,%eax
movsd  %xmm0,(%rcx,%rax,8)
add    $0x1,%rdx
cmp    0x8(%rsp),%rdx
je     15b2 <integrate_three_rk4+0x4a2>
mov    %rdx,0x18(%rsp)
test   %r15d,%r15d
je     11c0 <integrate_three_rk4+0xb0>
xor    %r13d,%r13d
mov    %rbx,%rdi
lea    0x1f0(%rsp),%rsi
mov    %rbp,%rdx
mov    %r12,%rcx
call   1030 <derivs_three@plt>
movupd (%rbx),%xmm0
movapd 0x1f0(%rsp),%xmm1
movapd 0x30(%rsp),%xmm2
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x270(%rsp)
movupd 0x10(%rbx),%xmm0
movapd 0x200(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x280(%rsp)
movupd 0x20(%rbx),%xmm0
movapd 0x210(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x290(%rsp)
movupd 0x30(%rbx),%xmm0
movapd 0x220(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x2a0(%rsp)
movupd 0x40(%rbx),%xmm0
movapd 0x230(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x2b0(%rsp)
movupd 0x50(%rbx),%xmm0
movapd 0x240(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x2c0(%rsp)
movupd 0x60(%rbx),%xmm0
movapd 0x250(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x2d0(%rsp)
movsd  0x260(%rsp),%xmm0
mulsd  0x40(%rsp),%xmm0
addsd  0x70(%rbx),%xmm0
movsd  %xmm0,0x2e0(%rsp)
lea    0x270(%rsp),%rdi
lea    0x170(%rsp),%rsi
mov    %rbp,%rdx
mov    %r12,%rcx
call   1030 <derivs_three@plt>
movupd (%rbx),%xmm0
movapd 0x170(%rsp),%xmm1
movapd 0x30(%rsp),%xmm2
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x50(%rsp)
movupd 0x10(%rbx),%xmm0
movapd 0x180(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x60(%rsp)
movupd 0x20(%rbx),%xmm0
movapd 0x190(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x70(%rsp)
movupd 0x30(%rbx),%xmm0
movapd 0x1a0(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x80(%rsp)
movupd 0x40(%rbx),%xmm0
movapd 0x1b0(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x90(%rsp)
movupd 0x50(%rbx),%xmm0
movapd 0x1c0(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0xa0(%rsp)
movupd 0x60(%rbx),%xmm0
movapd 0x1d0(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0xb0(%rsp)
movsd  0x1e0(%rsp),%xmm0
mulsd  0x40(%rsp),%xmm0
addsd  0x70(%rbx),%xmm0
movsd  %xmm0,0xc0(%rsp)
mov    %r14,%rdi
lea    0xf0(%rsp),%rsi
mov    %rbp,%rdx
mov    %r12,%rcx
call   1030 <derivs_three@plt>
movupd (%rbx),%xmm0
movapd 0xf0(%rsp),%xmm1
movapd 0xd0(%rsp),%xmm2
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x50(%rsp)
movupd 0x10(%rbx),%xmm0
movapd 0x100(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x60(%rsp)
movupd 0x20(%rbx),%xmm0
movapd 0x110(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x70(%rsp)
movupd 0x30(%rbx),%xmm0
movapd 0x120(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x80(%rsp)
movupd 0x40(%rbx),%xmm0
movapd 0x130(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x90(%rsp)
movupd 0x50(%rbx),%xmm0
movapd 0x140(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0xa0(%rsp)
movupd 0x60(%rbx),%xmm0
movapd 0x150(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0xb0(%rsp)
movsd  0x160(%rsp),%xmm0
mulsd  0x20(%rsp),%xmm0
addsd  0x70(%rbx),%xmm0
movsd  %xmm0,0xc0(%rsp)
mov    %r14,%rdi
lea    0x2f0(%rsp),%rsi
mov    %rbp,%rdx
mov    %r12,%rcx
call   1030 <derivs_three@plt>
movapd 0xe0(%rsp),%xmm2
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movsd  0x170(%rsp,%rax,8),%xmm0
addsd  0xf0(%rsp,%rax,8),%xmm0
addsd  %xmm0,%xmm0
addsd  0x1f0(%rsp,%rax,8),%xmm0
addsd  0x2f0(%rsp,%rax,8),%xmm0
mulsd  %xmm2,%xmm0
addsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,(%rbx,%rax,8)
add    $0x1,%rax
cmp    $0xf,%rax
jne    1560 <integrate_three_rk4+0x450>
add    $0x1,%r13d
cmp    %r15d,%r13d
jne    1210 <integrate_three_rk4+0x100>
jmp    11c0 <integrate_three_rk4+0xb0>
add    $0x368,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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