#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 M_PI;
int /*<<< orphan*/ derivs_four(double *, double *, double const *,
                               double const *);
double fmod(double, int);
void integrate_four_rk4(double *y, const double *params, const double *kij,
                        double *output, const double dt, const unsigned N,
                        const unsigned stride) {
  unsigned i, j, k;
  double dt2, dt6;
  double y1[4 * 1], y2[4 * 1], k1[4 * 1], k2[4 * 1], k3[4 * 1], k4[4 * 1];
  dt2 = dt / 2.;
  dt6 = dt / 6.;
  for (j = 0; j < 4; j++)
    output[j] = y[j * 1];
  for (i = 1; i < N; i++) {
    for (j = 0; j < stride; j++) {
      derivs_four(y, k1, params, kij);
      for (k = 0; k < 4 * 1; k++)
        y1[k] = y[k] + k1[k] * dt2;
      derivs_four(y1, k2, params, kij);
      for (k = 0; k < 4 * 1; k++)
        y2[k] = y[k] + k2[k] * dt2;
      derivs_four(y2, k3, params, kij);
      for (k = 0; k < 4 * 1; k++)
        y2[k] = y[k] + k3[k] * dt;
      derivs_four(y2, k4, params, kij);
      for (k = 0; k < 4 * 1; k++) {
        y[k] += dt6 * (k1[k] + 2. * (k2[k] + k3[k]) + k4[k]);
        y[k] = fmod(y[k], 2. * M_PI);
      }
    }
    for (j = 0; j < 4; j++)
      output[4 * i + j] = y[j * 1];
  }
}


x86 assembly (clang, -O0):
<integrate_four_rk4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%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  0xeb3(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xe95(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x38(%rbp)
cmpl   $0x4,-0x38(%rbp)
jae    11b0 <integrate_four_rk4+0x90>
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%ecx
shl    $0x0,%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    117b <integrate_four_rk4+0x5b>
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jae    1440 <integrate_four_rk4+0x320>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x30(%rbp),%eax
jae    13e9 <integrate_four_rk4+0x2c9>
mov    -0x8(%rbp),%rdi
lea    -0xb0(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1040 <derivs_four@plt>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x4,-0x3c(%rbp)
jae    123b <integrate_four_rk4+0x11b>
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x3c(%rbp),%eax
movsd  -0xb0(%rbp,%rax,8),%xmm0
ff ff
movsd  -0x48(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x3c(%rbp),%eax
movsd  %xmm0,-0x70(%rbp,%rax,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11f5 <integrate_four_rk4+0xd5>
lea    -0x70(%rbp),%rdi
lea    -0xd0(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1040 <derivs_four@plt>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x4,-0x3c(%rbp)
jae    12a3 <integrate_four_rk4+0x183>
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x3c(%rbp),%eax
movsd  -0xd0(%rbp,%rax,8),%xmm0
ff ff
movsd  -0x48(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x3c(%rbp),%eax
movsd  %xmm0,-0x90(%rbp,%rax,8)
ff ff
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    125a <integrate_four_rk4+0x13a>
lea    -0x90(%rbp),%rdi
lea    -0xf0(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1040 <derivs_four@plt>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x4,-0x3c(%rbp)
jae    130e <integrate_four_rk4+0x1ee>
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x3c(%rbp),%eax
movsd  -0xf0(%rbp,%rax,8),%xmm0
ff ff
movsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x3c(%rbp),%eax
movsd  %xmm0,-0x90(%rbp,%rax,8)
ff ff
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    12c5 <integrate_four_rk4+0x1a5>
lea    -0x90(%rbp),%rdi
lea    -0x110(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1040 <derivs_four@plt>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x4,-0x3c(%rbp)
jae    13d6 <integrate_four_rk4+0x2b6>
movsd  -0x50(%rbp),%xmm0
mov    -0x3c(%rbp),%eax
movsd  -0xb0(%rbp,%rax,8),%xmm1
ff ff
mov    -0x3c(%rbp),%eax
movsd  -0xd0(%rbp,%rax,8),%xmm2
ff ff
mov    -0x3c(%rbp),%eax
addsd  -0xf0(%rbp,%rax,8),%xmm2
ff ff
addsd  %xmm2,%xmm2
addsd  %xmm1,%xmm2
mov    -0x3c(%rbp),%eax
addsd  -0x110(%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    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    0x2c45(%rip),%rax
cvtsi2sdl (%rax),%xmm2
movsd  0xc59(%rip),%xmm1
mulsd  %xmm2,%xmm1
cvttsd2si %xmm1,%edi
call   1030 <fmod@plt>
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1330 <integrate_four_rk4+0x210>
jmp    13db <integrate_four_rk4+0x2bb>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    11ca <integrate_four_rk4+0xaa>
movl   $0x0,-0x38(%rbp)
cmpl   $0x4,-0x38(%rbp)
jae    142d <integrate_four_rk4+0x30d>
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%ecx
shl    $0x0,%ecx
mov    %ecx,%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%ecx
shl    $0x2,%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    13f0 <integrate_four_rk4+0x2d0>
jmp    1432 <integrate_four_rk4+0x312>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11b7 <integrate_four_rk4+0x97>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<integrate_four_rk4>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x128,%rsp
mov    %r9d,0xc(%rsp)
movsd  (%rdi),%xmm1
movsd  %xmm1,(%rcx)
movsd  0x8(%rdi),%xmm1
movsd  %xmm1,0x8(%rcx)
movsd  0x10(%rdi),%xmm1
movsd  %xmm1,0x10(%rcx)
movsd  0x18(%rdi),%xmm1
mov    %rcx,0x30(%rsp)
movsd  %xmm1,0x18(%rcx)
cmp    $0x2,%r8d
jb     146d <integrate_four_rk4+0x34d>
mov    %rdx,%r14
mov    %rsi,%r13
mov    %rdi,%rbp
movsd  0xe84(%rip),%xmm1
movapd %xmm0,%xmm2
divsd  0xe80(%rip),%xmm2
movapd %xmm2,0x10(%rsp)
mulsd  %xmm0,%xmm1
mov    %r8d,%eax
mov    %rax,0x28(%rsp)
unpcklpd %xmm1,%xmm1
movapd %xmm1,0xa0(%rsp)
unpcklpd %xmm0,%xmm0
movapd %xmm0,0xf0(%rsp)
mov    $0x1,%edx
mov    0x2e28(%rip),%rbx
jmp    121b <integrate_four_rk4+0xfb>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x38(%rsp),%rdx
lea    0x0(,%rdx,4),%eax
movsd  0x0(%rbp),%xmm0
mov    0x30(%rsp),%rcx
movsd  %xmm0,(%rcx,%rax,8)
movsd  0x8(%rbp),%xmm0
movsd  %xmm0,0x8(%rcx,%rax,8)
movsd  0x10(%rbp),%xmm0
movsd  %xmm0,0x10(%rcx,%rax,8)
movsd  0x18(%rbp),%xmm0
movsd  %xmm0,0x18(%rcx,%rax,8)
add    $0x1,%rdx
cmp    0x28(%rsp),%rdx
je     146d <integrate_four_rk4+0x34d>
mov    %rdx,0x38(%rsp)
mov    0xc(%rsp),%eax
mov    %eax,%r15d
test   %eax,%eax
je     11d0 <integrate_four_rk4+0xb0>
nopl   0x0(%rax,%rax,1)
mov    %rbp,%rdi
lea    0x80(%rsp),%rsi
mov    %r13,%rdx
mov    %r14,%rcx
call   1040 <derivs_four@plt>
movupd 0x0(%rbp),%xmm0
movapd 0x80(%rsp),%xmm1
movapd 0xa0(%rsp),%xmm2
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x100(%rsp)
movupd 0x10(%rbp),%xmm0
movapd 0x90(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x110(%rsp)
lea    0x100(%rsp),%rdi
lea    0x60(%rsp),%rsi
mov    %r13,%rdx
mov    %r14,%rcx
call   1040 <derivs_four@plt>
movupd 0x0(%rbp),%xmm0
movapd 0x60(%rsp),%xmm1
movapd 0xa0(%rsp),%xmm2
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0xd0(%rsp)
movupd 0x10(%rbp),%xmm0
movapd 0x70(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0xe0(%rsp)
mov    %r14,%r12
lea    0xd0(%rsp),%r14
mov    %r14,%rdi
lea    0x40(%rsp),%rsi
mov    %r13,%rdx
mov    %r12,%rcx
call   1040 <derivs_four@plt>
movupd 0x0(%rbp),%xmm0
movapd 0x40(%rsp),%xmm1
movapd 0xf0(%rsp),%xmm2
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0xd0(%rsp)
movupd 0x10(%rbp),%xmm0
movapd 0x50(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0xe0(%rsp)
mov    %r14,%rdi
mov    %r12,%r14
lea    0xb0(%rsp),%rsi
mov    %r13,%rdx
mov    %r12,%rcx
call   1040 <derivs_four@plt>
movsd  0x60(%rsp),%xmm0
addsd  0x40(%rsp),%xmm0
addsd  %xmm0,%xmm0
addsd  0x80(%rsp),%xmm0
addsd  0xb0(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
addsd  0x0(%rbp),%xmm0
movsd  %xmm0,0x0(%rbp)
mov    (%rbx),%edi
add    %edi,%edi
call   1030 <fmod@plt>
movsd  %xmm0,0x0(%rbp)
movsd  0x68(%rsp),%xmm0
addsd  0x48(%rsp),%xmm0
addsd  %xmm0,%xmm0
addsd  0x88(%rsp),%xmm0
addsd  0xb8(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
addsd  0x8(%rbp),%xmm0
movsd  %xmm0,0x8(%rbp)
mov    (%rbx),%edi
add    %edi,%edi
call   1030 <fmod@plt>
movsd  %xmm0,0x8(%rbp)
movsd  0x70(%rsp),%xmm0
addsd  0x50(%rsp),%xmm0
addsd  %xmm0,%xmm0
addsd  0x90(%rsp),%xmm0
addsd  0xc0(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
addsd  0x10(%rbp),%xmm0
movsd  %xmm0,0x10(%rbp)
mov    (%rbx),%edi
add    %edi,%edi
call   1030 <fmod@plt>
movsd  %xmm0,0x10(%rbp)
movsd  0x78(%rsp),%xmm0
addsd  0x58(%rsp),%xmm0
addsd  %xmm0,%xmm0
addsd  0x98(%rsp),%xmm0
addsd  0xc8(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
addsd  0x18(%rbp),%xmm0
movsd  %xmm0,0x18(%rbp)
mov    (%rbx),%edi
add    %edi,%edi
call   1030 <fmod@plt>
movsd  %xmm0,0x18(%rbp)
add    $0xffffffff,%r15d
jne    1230 <integrate_four_rk4+0x110>
jmp    11d0 <integrate_four_rk4+0xb0>
add    $0x128,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@M_PI = global i32 0
define void @integrate_four_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 [4 x double]
%21 = alloca [4 x double]
%22 = alloca [4 x double]
%23 = alloca [4 x double]
%24 = alloca [4 x double]
%25 = alloca [4 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, 4
br i1 %32, label %33, label %47
33: ; preds = %30
%34 = load double*, double** %8
%35 = load i32, i32* %16
%36 = mul i32 %35, 1
%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 = %217, %47
%49 = load i32, i32* %15
%50 = load i32, i32* %13
%51 = icmp ult i32 %49, %50
br i1 %51, label %52, label %220
52: ; preds = %48
store i32 0, i32* %16
br label %53
53: ; preds = %192, %52
%54 = load i32, i32* %16
%55 = load i32, i32* %14
%56 = icmp ult i32 %54, %55
br i1 %56, label %57, label %195
57: ; preds = %53
%58 = load double*, double** %8
%59 = getelementptr inbounds [4 x double], [4 x double]* %22, i64 0, i64 0
%60 = load double*, double** %9
%61 = load double*, double** %10
%62 = call i32 @derivs_four(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, 4
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 [4 x double], [4 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 [4 x double], [4 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 [4 x double], [4 x double]* %20, i64 0, i64 0
%86 = getelementptr inbounds [4 x double], [4 x double]* %23, i64 0, i64 0
%87 = load double*, double** %9
%88 = load double*, double** %10
%89 = call i32 @derivs_four(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, 4
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 [4 x double], [4 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 [4 x double], [4 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 [4 x double], [4 x double]* %21, i64 0, i64 0
%113 = getelementptr inbounds [4 x double], [4 x double]* %24, i64 0, i64 0
%114 = load double*, double** %9
%115 = load double*, double** %10
%116 = call i32 @derivs_four(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, 4
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 [4 x double], [4 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 [4 x double], [4 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 [4 x double], [4 x double]* %21, i64 0, i64 0
%140 = getelementptr inbounds [4 x double], [4 x double]* %25, i64 0, i64 0
%141 = load double*, double** %9
%142 = load double*, double** %10
%143 = call i32 @derivs_four(double* %139, double* %140, double* %141, double* %142)
store i32 0, i32* %17
br label %144
144: ; preds = %188, %138
%145 = load i32, i32* %17
%146 = icmp ult i32 %145, 4
br i1 %146, label %147, label %191
147: ; preds = %144
%148 = load double, double* %19
%149 = load i32, i32* %17
%150 = zext i32 %149 to i64
%151 = getelementptr inbounds [4 x double], [4 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 [4 x double], [4 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 [4 x double], [4 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 [4 x double], [4 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
%174 = load double*, double** %8
%175 = load i32, i32* %17
%176 = zext i32 %175 to i64
%177 = getelementptr inbounds double, double* %174, i64 %176
%178 = load double, double* %177
%179 = load i32, i32* @M_PI
%180 = sitofp i32 %179 to double
%181 = fmul double 2.000000e+00, %180
%182 = fptosi double %181 to i32
%183 = call double @fmod(double %178, i32 %182)
%184 = load double*, double** %8
%185 = load i32, i32* %17
%186 = zext i32 %185 to i64
%187 = getelementptr inbounds double, double* %184, i64 %186
store double %183, double* %187
br label %188
188: ; preds = %147
%189 = load i32, i32* %17
%190 = add i32 %189, 1
store i32 %190, i32* %17
br label %144
191: ; preds = %144
br label %192
192: ; preds = %191
%193 = load i32, i32* %16
%194 = add i32 %193, 1
store i32 %194, i32* %16
br label %53
195: ; preds = %53
store i32 0, i32* %16
br label %196
196: ; preds = %213, %195
%197 = load i32, i32* %16
%198 = icmp ult i32 %197, 4
br i1 %198, label %199, label %216
199: ; preds = %196
%200 = load double*, double** %8
%201 = load i32, i32* %16
%202 = mul i32 %201, 1
%203 = zext i32 %202 to i64
%204 = getelementptr inbounds double, double* %200, i64 %203
%205 = load double, double* %204
%206 = load double*, double** %11
%207 = load i32, i32* %15
%208 = mul i32 4, %207
%209 = load i32, i32* %16
%210 = add i32 %208, %209
%211 = zext i32 %210 to i64
%212 = getelementptr inbounds double, double* %206, i64 %211
store double %205, double* %212
br label %213
213: ; preds = %199
%214 = load i32, i32* %16
%215 = add i32 %214, 1
store i32 %215, i32* %16
br label %196
216: ; preds = %196
br label %217
217: ; preds = %216
%218 = load i32, i32* %15
%219 = add i32 %218, 1
store i32 %219, i32* %15
br label %48
220: ; preds = %48
ret void
}

LLVM IR (-O2):
@M_PI = global i32 0
define void @integrate_four_rk4(double* %0, double* %1, double* %2, double* nocapture writeonly %3, double %4, i32 %5, i32 %6) {
%8 = alloca [4 x double]
%9 = alloca [4 x double]
%10 = alloca [4 x double]
%11 = alloca [4 x double]
%12 = alloca [4 x double]
%13 = alloca [4 x double]
%14 = bitcast [4 x double]* %8 to i8*
%15 = bitcast [4 x double]* %9 to i8*
%16 = bitcast [4 x double]* %10 to i8*
%17 = bitcast [4 x double]* %11 to i8*
%18 = bitcast [4 x double]* %12 to i8*
%19 = bitcast [4 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 1
%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 2
%26 = load double, double* %25
%27 = getelementptr inbounds double, double* %3, i64 2
store double %26, double* %27
%28 = getelementptr inbounds double, double* %0, i64 3
%29 = load double, double* %28
%30 = getelementptr inbounds double, double* %3, i64 3
store double %29, double* %30
%31 = fdiv double %4, 6.000000e+00
%32 = icmp ugt i32 %5, 1
br i1 %32, label %33, label %170
33: ; preds = %7
%34 = icmp eq i32 %6, 0
%35 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 0
%36 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 0
%37 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 0
%38 = getelementptr inbounds [4 x double], [4 x double]* %9, i64 0, i64 0
%39 = getelementptr inbounds [4 x double], [4 x double]* %12, i64 0, i64 0
%40 = getelementptr inbounds [4 x double], [4 x double]* %13, i64 0, i64 0
%41 = zext i32 %5 to i64
%42 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 1
%43 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 2
%44 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 2
%45 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 3
%46 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 1
%47 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 2
%48 = getelementptr inbounds [4 x double], [4 x double]* %9, i64 0, i64 2
%49 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 3
%50 = getelementptr inbounds [4 x double], [4 x double]* %12, i64 0, i64 1
%51 = getelementptr inbounds [4 x double], [4 x double]* %12, i64 0, i64 2
%52 = getelementptr inbounds [4 x double], [4 x double]* %12, i64 0, i64 3
%53 = getelementptr inbounds [4 x double], [4 x double]* %13, i64 0, i64 1
%54 = getelementptr inbounds [4 x double], [4 x double]* %13, i64 0, i64 2
%55 = getelementptr inbounds [4 x double], [4 x double]* %13, i64 0, i64 3
%56 = bitcast double* %0 to <2 x double>*
%57 = bitcast [4 x double]* %10 to <2 x double>*
%58 = insertelement <2 x double> poison, double %20, i64 0
%59 = shufflevector <2 x double> %58, <2 x double> poison, <2 x i32> zeroinitializer
%60 = bitcast [4 x double]* %8 to <2 x double>*
%61 = bitcast double* %25 to <2 x double>*
%62 = bitcast double* %43 to <2 x double>*
%63 = bitcast double* %44 to <2 x double>*
%64 = bitcast double* %0 to <2 x double>*
%65 = bitcast [4 x double]* %11 to <2 x double>*
%66 = bitcast [4 x double]* %9 to <2 x double>*
%67 = bitcast double* %25 to <2 x double>*
%68 = bitcast double* %47 to <2 x double>*
%69 = bitcast double* %48 to <2 x double>*
%70 = bitcast double* %0 to <2 x double>*
%71 = bitcast [4 x double]* %12 to <2 x double>*
%72 = insertelement <2 x double> poison, double %4, i64 0
%73 = shufflevector <2 x double> %72, <2 x double> poison, <2 x i32> zeroinitializer
%74 = bitcast [4 x double]* %9 to <2 x double>*
%75 = bitcast double* %25 to <2 x double>*
%76 = bitcast double* %51 to <2 x double>*
%77 = bitcast double* %48 to <2 x double>*
br label %78
78: ; preds = %33, %80
%79 = phi i64 [ 1, %33 ], [ %94, %80 ]
br i1 %34, label %80, label %96
80: ; preds = %96, %78
%81 = shl i64 %79, 2
%82 = and i64 %81, 4294967292
%83 = load double, double* %0
%84 = getelementptr inbounds double, double* %3, i64 %82
store double %83, double* %84
%85 = load double, double* %22
%86 = or i64 %82, 1
%87 = getelementptr inbounds double, double* %3, i64 %86
store double %85, double* %87
%88 = load double, double* %25
%89 = or i64 %82, 2
%90 = getelementptr inbounds double, double* %3, i64 %89
store double %88, double* %90
%91 = load double, double* %28
%92 = or i64 %82, 3
%93 = getelementptr inbounds double, double* %3, i64 %92
store double %91, double* %93
%94 = add nuw nsw i64 %79, 1
%95 = icmp eq i64 %94, %41
br i1 %95, label %170, label %78
96: ; preds = %78, %96
%97 = phi i32 [ %168, %96 ], [ 0, %78 ]
%98 = call i32 @derivs_four(double* %0, double* %35, double* %1, double* %2)
%99 = load <2 x double>, <2 x double>* %56
%100 = load <2 x double>, <2 x double>* %57
%101 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %100, <2 x double> %59, <2 x double> %99)
store <2 x double> %101, <2 x double>* %60
%102 = load <2 x double>, <2 x double>* %61
%103 = load <2 x double>, <2 x double>* %62
%104 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %103, <2 x double> %59, <2 x double> %102)
store <2 x double> %104, <2 x double>* %63
%105 = call i32 @derivs_four(double* %36, double* %37, double* %1, double* %2)
%106 = load <2 x double>, <2 x double>* %64
%107 = load <2 x double>, <2 x double>* %65
%108 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %107, <2 x double> %59, <2 x double> %106)
store <2 x double> %108, <2 x double>* %66
%109 = load <2 x double>, <2 x double>* %67
%110 = load <2 x double>, <2 x double>* %68
%111 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %110, <2 x double> %59, <2 x double> %109)
store <2 x double> %111, <2 x double>* %69
%112 = call i32 @derivs_four(double* %38, double* %39, double* %1, double* %2)
%113 = load <2 x double>, <2 x double>* %70
%114 = load <2 x double>, <2 x double>* %71
%115 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %114, <2 x double> %73, <2 x double> %113)
store <2 x double> %115, <2 x double>* %74
%116 = load <2 x double>, <2 x double>* %75
%117 = load <2 x double>, <2 x double>* %76
%118 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %117, <2 x double> %73, <2 x double> %116)
store <2 x double> %118, <2 x double>* %77
%119 = call i32 @derivs_four(double* %38, double* %40, double* %1, double* %2)
%120 = load double, double* %35
%121 = load double, double* %37
%122 = load double, double* %39
%123 = fadd double %121, %122
%124 = call double @llvm.fmuladd.f64(double %123, double 2.000000e+00, double %120)
%125 = load double, double* %40
%126 = fadd double %125, %124
%127 = load double, double* %0
%128 = call double @llvm.fmuladd.f64(double %31, double %126, double %127)
store double %128, double* %0
%129 = load i32, i32* @M_PI
%130 = shl i32 %129, 1
%131 = call double @fmod(double %128, i32 %130)
store double %131, double* %0
%132 = load double, double* %42
%133 = load double, double* %46
%134 = load double, double* %50
%135 = fadd double %133, %134
%136 = call double @llvm.fmuladd.f64(double %135, double 2.000000e+00, double %132)
%137 = load double, double* %53
%138 = fadd double %137, %136
%139 = load double, double* %22
%140 = call double @llvm.fmuladd.f64(double %31, double %138, double %139)
store double %140, double* %22
%141 = load i32, i32* @M_PI
%142 = shl i32 %141, 1
%143 = call double @fmod(double %140, i32 %142)
store double %143, double* %22
%144 = load double, double* %43
%145 = load double, double* %47
%146 = load double, double* %51
%147 = fadd double %145, %146
%148 = call double @llvm.fmuladd.f64(double %147, double 2.000000e+00, double %144)
%149 = load double, double* %54
%150 = fadd double %149, %148
%151 = load double, double* %25
%152 = call double @llvm.fmuladd.f64(double %31, double %150, double %151)
store double %152, double* %25
%153 = load i32, i32* @M_PI
%154 = shl i32 %153, 1
%155 = call double @fmod(double %152, i32 %154)
store double %155, double* %25
%156 = load double, double* %45
%157 = load double, double* %49
%158 = load double, double* %52
%159 = fadd double %157, %158
%160 = call double @llvm.fmuladd.f64(double %159, double 2.000000e+00, double %156)
%161 = load double, double* %55
%162 = fadd double %161, %160
%163 = load double, double* %28
%164 = call double @llvm.fmuladd.f64(double %31, double %162, double %163)
store double %164, double* %28
%165 = load i32, i32* @M_PI
%166 = shl i32 %165, 1
%167 = call double @fmod(double %164, i32 %166)
store double %167, double* %28
%168 = add nuw i32 %97, 1
%169 = icmp eq i32 %168, %6
br i1 %169, label %80, label %96
170: ; preds = %80, %7
ret void
}