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


x86 assembly (clang, -O0):
<leech_one_rk4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xec9(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeab(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movl   $0x0,-0x30(%rbp)
cmpl   $0xc,-0x30(%rbp)
jae    119a <leech_one_rk4+0x8a>
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%eax
movsd  %xmm0,-0x160(%rbp,%rax,8)
ff ff
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1165 <leech_one_rk4+0x55>
movl   $0x0,-0x30(%rbp)
cmpl   $0x3,-0x30(%rbp)
jae    11d1 <leech_one_rk4+0xc1>
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11a1 <leech_one_rk4+0x91>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jae    1412 <leech_one_rk4+0x302>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x18(%rbp),%eax
jae    13c2 <leech_one_rk4+0x2b2>
mov    -0x8(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
lea    -0x160(%rbp),%rdx
call   1030 <derivs_one@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x3,-0x34(%rbp)
jae    125b <leech_one_rk4+0x14b>
mov    -0x8(%rbp),%rax
mov    -0x34(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x34(%rbp),%eax
movsd  -0xa0(%rbp,%rax,8),%xmm0
ff ff
movsd  -0x40(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x34(%rbp),%eax
movsd  %xmm0,-0x60(%rbp,%rax,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1215 <leech_one_rk4+0x105>
lea    -0x60(%rbp),%rdi
lea    -0xc0(%rbp),%rsi
lea    -0x160(%rbp),%rdx
call   1030 <derivs_one@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x3,-0x34(%rbp)
jae    12bf <leech_one_rk4+0x1af>
mov    -0x8(%rbp),%rax
mov    -0x34(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x34(%rbp),%eax
movsd  -0xc0(%rbp,%rax,8),%xmm0
ff ff
movsd  -0x40(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x34(%rbp),%eax
movsd  %xmm0,-0x80(%rbp,%rax,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1279 <leech_one_rk4+0x169>
lea    -0x80(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
lea    -0x160(%rbp),%rdx
call   1030 <derivs_one@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x3,-0x34(%rbp)
jae    1323 <leech_one_rk4+0x213>
mov    -0x8(%rbp),%rax
mov    -0x34(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x34(%rbp),%eax
movsd  -0xe0(%rbp,%rax,8),%xmm0
ff ff
movsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x34(%rbp),%eax
movsd  %xmm0,-0x80(%rbp,%rax,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12dd <leech_one_rk4+0x1cd>
lea    -0x80(%rbp),%rdi
lea    -0x100(%rbp),%rsi
lea    -0x160(%rbp),%rdx
call   1030 <derivs_one@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x3,-0x34(%rbp)
jae    13af <leech_one_rk4+0x29f>
movsd  -0x48(%rbp),%xmm0
mov    -0x34(%rbp),%eax
movsd  -0xa0(%rbp,%rax,8),%xmm1
ff ff
mov    -0x34(%rbp),%eax
movsd  -0xc0(%rbp,%rax,8),%xmm2
ff ff
mov    -0x34(%rbp),%eax
addsd  -0xe0(%rbp,%rax,8),%xmm2
ff ff
addsd  %xmm2,%xmm2
addsd  %xmm1,%xmm2
mov    -0x34(%rbp),%eax
addsd  -0x100(%rbp,%rax,8),%xmm2
ff ff
mov    -0x8(%rbp),%rax
mov    -0x34(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1341 <leech_one_rk4+0x231>
jmp    13b4 <leech_one_rk4+0x2a4>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11eb <leech_one_rk4+0xdb>
movl   $0x0,-0x30(%rbp)
cmpl   $0x3,-0x30(%rbp)
jae    13ff <leech_one_rk4+0x2ef>
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
imul   $0x3,-0x2c(%rbp),%ecx
add    -0x30(%rbp),%ecx
mov    %ecx,%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    13c9 <leech_one_rk4+0x2b9>
jmp    1404 <leech_one_rk4+0x2f4>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11d8 <leech_one_rk4+0xc8>
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<leech_one_rk4>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1a8,%rsp
mov    %edx,0x4(%rsp)
movups 0x58(%rcx),%xmm1
movaps %xmm1,0x190(%rsp)
movups 0x48(%rcx),%xmm1
movaps %xmm1,0x180(%rsp)
movupd 0x8(%rcx),%xmm4
movups 0x18(%rcx),%xmm1
movupd 0x28(%rcx),%xmm2
movupd 0x38(%rcx),%xmm3
movapd %xmm3,0x170(%rsp)
movapd %xmm2,0x160(%rsp)
movaps %xmm1,0x150(%rsp)
movapd %xmm4,0x140(%rsp)
movsd  (%rdi),%xmm1
movsd  %xmm1,(%r8)
movsd  0x8(%rdi),%xmm1
movsd  %xmm1,0x8(%r8)
movsd  0x10(%rdi),%xmm1
mov    %r8,0x18(%rsp)
movsd  %xmm1,0x10(%r8)
cmp    $0x2,%esi
jb     141d <leech_one_rk4+0x30d>
mov    %rdi,%rbp
movsd  0xe55(%rip),%xmm3
mulsd  %xmm0,%xmm3
movapd %xmm0,%xmm4
divsd  0xe4d(%rip),%xmm4
mov    %esi,%eax
mov    %rax,0x10(%rsp)
movapd %xmm3,%xmm5
unpcklpd %xmm3,%xmm5
movapd %xmm0,%xmm6
unpcklpd %xmm0,%xmm6
movapd %xmm4,%xmm7
unpcklpd %xmm4,%xmm7
mov    $0x1,%edx
lea    0x60(%rsp),%r12
lea    0x140(%rsp),%r13
lea    0x40(%rsp),%r15
lea    0x80(%rsp),%rbx
movapd %xmm4,0xf0(%rsp)
movapd %xmm7,0xe0(%rsp)
movapd %xmm5,0xb0(%rsp)
movapd %xmm6,0xd0(%rsp)
movapd %xmm0,0xc0(%rsp)
movapd %xmm3,0xa0(%rsp)
jmp    1284 <leech_one_rk4+0x174>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  0x0(%rbp),%xmm2
mov    0x8(%rsp),%rdx
lea    (%rdx,%rdx,2),%eax
mov    0x18(%rsp),%rcx
movsd  %xmm2,(%rcx,%rax,8)
movsd  0x8(%rbp),%xmm1
lea    0x1(%rdx,%rdx,2),%eax
movsd  %xmm1,(%rcx,%rax,8)
movsd  0x10(%rbp),%xmm1
lea    (%rdx,%rdx,2),%eax
add    $0x2,%eax
movsd  %xmm1,(%rcx,%rax,8)
add    $0x1,%rdx
cmp    0x10(%rsp),%rdx
je     141d <leech_one_rk4+0x30d>
mov    %rdx,0x8(%rsp)
mov    0x4(%rsp),%eax
mov    %eax,%r14d
test   %eax,%eax
je     1240 <leech_one_rk4+0x130>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbp,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
call   1030 <derivs_one@plt>
movupd 0x0(%rbp),%xmm0
movapd 0x60(%rsp),%xmm1
mulpd  0xb0(%rsp),%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x120(%rsp)
movsd  0x70(%rsp),%xmm0
mulsd  0xa0(%rsp),%xmm0
addsd  0x10(%rbp),%xmm0
movsd  %xmm0,0x130(%rsp)
lea    0x120(%rsp),%rdi
mov    %r15,%rsi
mov    %r13,%rdx
call   1030 <derivs_one@plt>
movupd 0x0(%rbp),%xmm0
movapd 0x40(%rsp),%xmm1
mulpd  0xb0(%rsp),%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x80(%rsp)
movsd  0x50(%rsp),%xmm0
mulsd  0xa0(%rsp),%xmm0
addsd  0x10(%rbp),%xmm0
movsd  %xmm0,0x90(%rsp)
mov    %rbx,%rdi
lea    0x20(%rsp),%rsi
mov    %r13,%rdx
call   1030 <derivs_one@plt>
movupd 0x0(%rbp),%xmm0
movapd 0x20(%rsp),%xmm1
mulpd  0xd0(%rsp),%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x80(%rsp)
movsd  0x30(%rsp),%xmm0
mulsd  0xc0(%rsp),%xmm0
addsd  0x10(%rbp),%xmm0
movsd  %xmm0,0x90(%rsp)
mov    %rbx,%rdi
lea    0x100(%rsp),%rsi
mov    %r13,%rdx
call   1030 <derivs_one@plt>
movapd 0xe0(%rsp),%xmm7
movapd 0xf0(%rsp),%xmm4
movapd 0x40(%rsp),%xmm1
addpd  0x20(%rsp),%xmm1
addpd  %xmm1,%xmm1
addpd  0x60(%rsp),%xmm1
addpd  0x100(%rsp),%xmm1
mulpd  %xmm7,%xmm1
movupd 0x0(%rbp),%xmm2
addpd  %xmm1,%xmm2
movupd %xmm2,0x0(%rbp)
movsd  0x50(%rsp),%xmm1
addsd  0x30(%rsp),%xmm1
addsd  %xmm1,%xmm1
addsd  0x70(%rsp),%xmm1
addsd  0x110(%rsp),%xmm1
mulsd  %xmm4,%xmm1
addsd  0x10(%rbp),%xmm1
movsd  %xmm1,0x10(%rbp)
add    $0xffffffff,%r14d
jne    12a0 <leech_one_rk4+0x190>
jmp    1245 <leech_one_rk4+0x135>
add    $0x1a8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @leech_one_rk4(double* %0, double %1, i32 %2, i32 %3, double* nocapture %4, double* nocapture writeonly %5) {
%7 = alloca [3 x double]
%8 = alloca [3 x double]
%9 = alloca [3 x double]
%10 = alloca [3 x double]
%11 = alloca [3 x double]
%12 = alloca [3 x double]
%13 = alloca [12 x double]
%14 = bitcast [12 x double]* %13 to i8*
%15 = bitcast [3 x double]* %7 to i8*
%16 = bitcast [3 x double]* %8 to i8*
%17 = bitcast [3 x double]* %9 to i8*
%18 = bitcast [3 x double]* %10 to i8*
%19 = bitcast [3 x double]* %11 to i8*
%20 = bitcast [3 x double]* %12 to i8*
%21 = fmul double %1, 5.000000e-01
%22 = getelementptr double, double* %4, i64 1
%23 = bitcast double* %22 to i8*
%24 = load double, double* %0
store double %24, double* %5
%25 = getelementptr inbounds double, double* %0, i64 1
%26 = load double, double* %25
%27 = getelementptr inbounds double, double* %5, i64 1
store double %26, double* %27
%28 = getelementptr inbounds double, double* %0, i64 2
%29 = load double, double* %28
%30 = getelementptr inbounds double, double* %5, i64 2
store double %29, double* %30
%31 = fdiv double %1, 6.000000e+00
%32 = icmp ugt i32 %2, 1
br i1 %32, label %33, label %136
33: ; preds = %6
%34 = icmp eq i32 %3, 0
%35 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 0
%36 = getelementptr inbounds [12 x double], [12 x double]* %13, i64 0, i64 0
%37 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%38 = getelementptr inbounds [3 x double], [3 x double]* %10, i64 0, i64 0
%39 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%40 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 0
%41 = getelementptr inbounds [3 x double], [3 x double]* %12, i64 0, i64 0
%42 = zext i32 %2 to i64
%43 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 2
%44 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 2
%45 = getelementptr inbounds [3 x double], [3 x double]* %10, i64 0, i64 2
%46 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 2
%47 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 2
%48 = getelementptr inbounds [3 x double], [3 x double]* %12, i64 0, i64 2
%49 = bitcast double* %0 to <2 x double>*
%50 = bitcast [3 x double]* %9 to <2 x double>*
%51 = insertelement <2 x double> poison, double %21, i64 0
%52 = shufflevector <2 x double> %51, <2 x double> poison, <2 x i32> zeroinitializer
%53 = bitcast [3 x double]* %7 to <2 x double>*
%54 = bitcast double* %0 to <2 x double>*
%55 = bitcast [3 x double]* %10 to <2 x double>*
%56 = bitcast [3 x double]* %8 to <2 x double>*
%57 = bitcast double* %0 to <2 x double>*
%58 = bitcast [3 x double]* %11 to <2 x double>*
%59 = insertelement <2 x double> poison, double %1, i64 0
%60 = shufflevector <2 x double> %59, <2 x double> poison, <2 x i32> zeroinitializer
%61 = bitcast [3 x double]* %8 to <2 x double>*
%62 = bitcast [3 x double]* %9 to <2 x double>*
%63 = bitcast [3 x double]* %10 to <2 x double>*
%64 = bitcast [3 x double]* %11 to <2 x double>*
%65 = bitcast [3 x double]* %12 to <2 x double>*
%66 = bitcast double* %0 to <2 x double>*
%67 = insertelement <2 x double> poison, double %31, i64 0
%68 = shufflevector <2 x double> %67, <2 x double> poison, <2 x i32> zeroinitializer
%69 = bitcast double* %0 to <2 x double>*
br label %70
70: ; preds = %33, %76
%71 = phi i64 [ 1, %33 ], [ %90, %76 ]
br i1 %34, label %72, label %92
72: ; preds = %70
%73 = load double, double* %0
br label %76
74: ; preds = %92
%75 = extractelement <2 x double> %124, i64 0
br label %76
76: ; preds = %74, %72
%77 = phi double [ %73, %72 ], [ %75, %74 ]
%78 = trunc i64 %71 to i32
%79 = mul i32 %78, 3
%80 = zext i32 %79 to i64
%81 = getelementptr inbounds double, double* %5, i64 %80
store double %77, double* %81
%82 = load double, double* %25
%83 = add i32 %79, 1
%84 = zext i32 %83 to i64
%85 = getelementptr inbounds double, double* %5, i64 %84
store double %82, double* %85
%86 = load double, double* %28
%87 = add i32 %79, 2
%88 = zext i32 %87 to i64
%89 = getelementptr inbounds double, double* %5, i64 %88
store double %86, double* %89
%90 = add nuw nsw i64 %71, 1
%91 = icmp eq i64 %90, %42
br i1 %91, label %136, label %70
92: ; preds = %70, %92
%93 = phi i32 [ %134, %92 ], [ 0, %70 ]
%94 = call i32 @derivs_one(double* %0, double* %35, double* %36)
%95 = load <2 x double>, <2 x double>* %49
%96 = load <2 x double>, <2 x double>* %50
%97 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %96, <2 x double> %52, <2 x double> %95)
store <2 x double> %97, <2 x double>* %53
%98 = load double, double* %28
%99 = load double, double* %43
%100 = call double @llvm.fmuladd.f64(double %99, double %21, double %98)
store double %100, double* %44
%101 = call i32 @derivs_one(double* %37, double* %38, double* %36)
%102 = load <2 x double>, <2 x double>* %54
%103 = load <2 x double>, <2 x double>* %55
%104 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %103, <2 x double> %52, <2 x double> %102)
store <2 x double> %104, <2 x double>* %56
%105 = load double, double* %28
%106 = load double, double* %45
%107 = call double @llvm.fmuladd.f64(double %106, double %21, double %105)
store double %107, double* %46
%108 = call i32 @derivs_one(double* %39, double* %40, double* %36)
%109 = load <2 x double>, <2 x double>* %57
%110 = load <2 x double>, <2 x double>* %58
%111 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %110, <2 x double> %60, <2 x double> %109)
store <2 x double> %111, <2 x double>* %61
%112 = load double, double* %28
%113 = load double, double* %47
%114 = call double @llvm.fmuladd.f64(double %113, double %1, double %112)
store double %114, double* %46
%115 = call i32 @derivs_one(double* %39, double* %41, double* %36)
%116 = load <2 x double>, <2 x double>* %62
%117 = load <2 x double>, <2 x double>* %63
%118 = load <2 x double>, <2 x double>* %64
%119 = fadd <2 x double> %117, %118
%120 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %119, <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double> %116)
%121 = load <2 x double>, <2 x double>* %65
%122 = fadd <2 x double> %121, %120
%123 = load <2 x double>, <2 x double>* %66
%124 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %68, <2 x double> %122, <2 x double> %123)
store <2 x double> %124, <2 x double>* %69
%125 = load double, double* %43
%126 = load double, double* %45
%127 = load double, double* %47
%128 = fadd double %126, %127
%129 = call double @llvm.fmuladd.f64(double %128, double 2.000000e+00, double %125)
%130 = load double, double* %48
%131 = fadd double %130, %129
%132 = load double, double* %28
%133 = call double @llvm.fmuladd.f64(double %31, double %131, double %132)
store double %133, double* %28
%134 = add nuw i32 %93, 1
%135 = icmp eq i32 %134, %3
br i1 %135, label %74, label %92
136: ; preds = %76, %6
ret void
}