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


x86 assembly (clang, -O0):
<leech_two_rk4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1d0,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xec8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeaa(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x38(%rbp)
cmpl   $0xc,-0x38(%rbp)
jae    119b <leech_two_rk4+0x8b>
mov    -0x20(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%eax
movsd  %xmm0,-0x1d0(%rbp,%rax,8)
ff ff
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1166 <leech_two_rk4+0x56>
movl   $0x0,-0x38(%rbp)
cmpl   $0x3,-0x38(%rbp)
jae    11d5 <leech_two_rk4+0xc5>
mov    -0x8(%rbp),%rax
imul   $0x3,-0x38(%rbp),%ecx
mov    %ecx,%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
mov    -0x38(%rbp),%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    11a2 <leech_two_rk4+0x92>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jae    13cf <leech_two_rk4+0x2bf>
mov    -0x8(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
lea    -0x1d0(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1030 <derivs_two@plt>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x6,-0x3c(%rbp)
jae    1250 <leech_two_rk4+0x140>
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x3c(%rbp),%eax
movsd  -0xe0(%rbp,%rax,8),%xmm0
ff ff
movsd  -0x48(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x3c(%rbp),%eax
movsd  %xmm0,-0x80(%rbp,%rax,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    120a <leech_two_rk4+0xfa>
lea    -0x80(%rbp),%rdi
lea    -0x110(%rbp),%rsi
lea    -0x1d0(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1030 <derivs_two@plt>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x6,-0x3c(%rbp)
jae    12bb <leech_two_rk4+0x1ab>
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x3c(%rbp),%eax
movsd  -0x110(%rbp,%rax,8),%xmm0
ff ff
movsd  -0x48(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x3c(%rbp),%eax
movsd  %xmm0,-0xb0(%rbp,%rax,8)
ff ff
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1272 <leech_two_rk4+0x162>
lea    -0xb0(%rbp),%rdi
lea    -0x140(%rbp),%rsi
lea    -0x1d0(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1030 <derivs_two@plt>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x6,-0x3c(%rbp)
jae    1329 <leech_two_rk4+0x219>
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x3c(%rbp),%eax
movsd  -0x140(%rbp,%rax,8),%xmm0
movsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x3c(%rbp),%eax
movsd  %xmm0,-0xb0(%rbp,%rax,8)
ff ff
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    12e0 <leech_two_rk4+0x1d0>
lea    -0xb0(%rbp),%rdi
lea    -0x170(%rbp),%rsi
lea    -0x1d0(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1030 <derivs_two@plt>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x6,-0x3c(%rbp)
jae    13bc <leech_two_rk4+0x2ac>
movsd  -0x50(%rbp),%xmm0
mov    -0x3c(%rbp),%eax
movsd  -0xe0(%rbp,%rax,8),%xmm1
ff ff
mov    -0x3c(%rbp),%eax
movsd  -0x110(%rbp,%rax,8),%xmm2
ff ff
mov    -0x3c(%rbp),%eax
addsd  -0x140(%rbp,%rax,8),%xmm2
ff ff
addsd  %xmm2,%xmm2
addsd  %xmm1,%xmm2
mov    -0x3c(%rbp),%eax
addsd  -0x170(%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    134e <leech_two_rk4+0x23e>
jmp    13c1 <leech_two_rk4+0x2b1>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11dc <leech_two_rk4+0xcc>
movl   $0x0,-0x38(%rbp)
cmpl   $0x6,-0x38(%rbp)
jae    1406 <leech_two_rk4+0x2f6>
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
mov    -0x38(%rbp),%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    13d6 <leech_two_rk4+0x2c6>
add    $0x1d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<leech_two_rk4>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1c8,%rsp
mov    %rdi,%rbx
movups 0x58(%rdx),%xmm1
movaps %xmm1,0x1b0(%rsp)
movups 0x48(%rdx),%xmm1
movaps %xmm1,0x1a0(%rsp)
movupd 0x8(%rdx),%xmm4
movups 0x18(%rdx),%xmm1
movupd 0x28(%rdx),%xmm2
movupd 0x38(%rdx),%xmm3
movapd %xmm3,0x190(%rsp)
movapd %xmm2,0x180(%rsp)
movaps %xmm1,0x170(%rsp)
movapd %xmm4,0x160(%rsp)
movsd  (%rdi),%xmm1
movsd  %xmm1,(%r8)
movsd  0x18(%rdi),%xmm1
movsd  %xmm1,0x8(%r8)
movsd  0x30(%rdi),%xmm1
movsd  %xmm1,0x10(%r8)
test   %esi,%esi
je     141c <leech_two_rk4+0x30c>
mov    %rcx,%r15
mov    %esi,%ebp
mov    %r8,0x8(%rsp)
movsd  0xe55(%rip),%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm0,%xmm2
divsd  0xe4d(%rip),%xmm2
unpcklpd %xmm1,%xmm1
movapd %xmm1,0x10(%rsp)
unpcklpd %xmm0,%xmm0
movapd %xmm0,0xf0(%rsp)
unpcklpd %xmm2,%xmm2
movapd %xmm2,0xe0(%rsp)
lea    0x160(%rsp),%r13
lea    0xb0(%rsp),%r14
lea    0x100(%rsp),%r12
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
lea    0x80(%rsp),%rsi
mov    %r13,%rdx
mov    %r15,%rcx
call   1030 <derivs_two@plt>
movupd (%rbx),%xmm0
movapd 0x80(%rsp),%xmm1
movapd 0x10(%rsp),%xmm2
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x130(%rsp)
movupd 0x10(%rbx),%xmm0
movapd 0x90(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x140(%rsp)
movupd 0x20(%rbx),%xmm0
movapd 0xa0(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0x150(%rsp)
lea    0x130(%rsp),%rdi
lea    0x50(%rsp),%rsi
mov    %r13,%rdx
mov    %r15,%rcx
call   1030 <derivs_two@plt>
movupd (%rbx),%xmm0
movapd 0x50(%rsp),%xmm1
movapd 0x10(%rsp),%xmm2
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0xb0(%rsp)
movupd 0x10(%rbx),%xmm0
movapd 0x60(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0xc0(%rsp)
movupd 0x20(%rbx),%xmm0
movapd 0x70(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0xd0(%rsp)
mov    %r14,%rdi
lea    0x20(%rsp),%rsi
mov    %r13,%rdx
mov    %r15,%rcx
call   1030 <derivs_two@plt>
movupd (%rbx),%xmm0
movapd 0x20(%rsp),%xmm1
movapd 0xf0(%rsp),%xmm2
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0xb0(%rsp)
movupd 0x10(%rbx),%xmm0
movapd 0x30(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0xc0(%rsp)
movupd 0x20(%rbx),%xmm0
movapd 0x40(%rsp),%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm1,0xd0(%rsp)
mov    %r14,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
mov    %r15,%rcx
call   1030 <derivs_two@plt>
movapd 0x50(%rsp),%xmm1
addpd  0x20(%rsp),%xmm1
addpd  %xmm1,%xmm1
addpd  0x80(%rsp),%xmm1
addpd  0x100(%rsp),%xmm1
movupd (%rbx),%xmm0
movapd 0xe0(%rsp),%xmm4
mulpd  %xmm4,%xmm1
addpd  %xmm1,%xmm0
movupd 0x10(%rbx),%xmm1
movupd 0x20(%rbx),%xmm2
movupd %xmm0,(%rbx)
movapd 0x60(%rsp),%xmm3
addpd  0x30(%rsp),%xmm3
addpd  %xmm3,%xmm3
addpd  0x90(%rsp),%xmm3
addpd  0x110(%rsp),%xmm3
mulpd  %xmm4,%xmm3
addpd  %xmm1,%xmm3
movupd %xmm3,0x10(%rbx)
movapd 0x70(%rsp),%xmm1
addpd  0x40(%rsp),%xmm1
addpd  %xmm1,%xmm1
addpd  0xa0(%rsp),%xmm1
addpd  0x120(%rsp),%xmm1
mulpd  %xmm4,%xmm1
addpd  %xmm2,%xmm1
movupd %xmm1,0x20(%rbx)
add    $0xffffffff,%ebp
jne    1200 <leech_two_rk4+0xf0>
mov    0x8(%rsp),%r8
jmp    1420 <leech_two_rk4+0x310>
movsd  (%rbx),%xmm0
movsd  %xmm0,(%r8)
movsd  0x8(%rbx),%xmm0
movsd  %xmm0,0x8(%r8)
movsd  0x10(%rbx),%xmm0
movsd  %xmm0,0x10(%r8)
movsd  0x18(%rbx),%xmm0
movsd  %xmm0,0x18(%r8)
movsd  0x20(%rbx),%xmm0
movsd  %xmm0,0x20(%r8)
movsd  0x28(%rbx),%xmm0
movsd  %xmm0,0x28(%r8)
add    $0x1c8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @leech_two_rk4(double* %0, double %1, i32 %2, double* %3, double* %4, double* %5) {
%7 = alloca double*
%8 = alloca double
%9 = alloca i32
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca double
%17 = alloca double
%18 = alloca [6 x double]
%19 = alloca [6 x double]
%20 = alloca [6 x double]
%21 = alloca [6 x double]
%22 = alloca [6 x double]
%23 = alloca [6 x double]
%24 = alloca [12 x double]
store double* %0, double** %7
store double %1, double* %8
store i32 %2, i32* %9
store double* %3, double** %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** %10
%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 = %60, %45
%47 = load i32, i32* %14
%48 = icmp ult i32 %47, 3
br i1 %48, label %49, label %63
49: ; preds = %46
%50 = load double*, double** %7
%51 = load i32, i32* %14
%52 = mul i32 3, %51
%53 = zext i32 %52 to i64
%54 = getelementptr inbounds double, double* %50, i64 %53
%55 = load double, double* %54
%56 = load double*, double** %12
%57 = load i32, i32* %14
%58 = zext i32 %57 to i64
%59 = getelementptr inbounds double, double* %56, i64 %58
store double %55, double* %59
br label %60
60: ; preds = %49
%61 = load i32, i32* %14
%62 = add i32 %61, 1
store i32 %62, i32* %14
br label %46
63: ; preds = %46
store i32 0, i32* %13
br label %64
64: ; preds = %189, %63
%65 = load i32, i32* %13
%66 = load i32, i32* %9
%67 = icmp ult i32 %65, %66
br i1 %67, label %68, label %192
68: ; preds = %64
%69 = load double*, double** %7
%70 = getelementptr inbounds [6 x double], [6 x double]* %20, i64 0, i64 0
%71 = getelementptr inbounds [12 x double], [12 x double]* %24, i64 0, i64 0
%72 = load double*, double** %11
%73 = call i32 @derivs_two(double* %69, double* %70, double* %71, double* %72)
store i32 0, i32* %15
br label %74
74: ; preds = %92, %68
%75 = load i32, i32* %15
%76 = icmp ult i32 %75, 6
br i1 %76, label %77, label %95
77: ; preds = %74
%78 = load double*, double** %7
%79 = load i32, i32* %15
%80 = zext i32 %79 to i64
%81 = getelementptr inbounds double, double* %78, i64 %80
%82 = load double, double* %81
%83 = load i32, i32* %15
%84 = zext i32 %83 to i64
%85 = getelementptr inbounds [6 x double], [6 x double]* %20, i64 0, i64 %84
%86 = load double, double* %85
%87 = load double, double* %16
%88 = call double @llvm.fmuladd.f64(double %86, double %87, double %82)
%89 = load i32, i32* %15
%90 = zext i32 %89 to i64
%91 = getelementptr inbounds [6 x double], [6 x double]* %18, i64 0, i64 %90
store double %88, double* %91
br label %92
92: ; preds = %77
%93 = load i32, i32* %15
%94 = add i32 %93, 1
store i32 %94, i32* %15
br label %74
95: ; preds = %74
%96 = getelementptr inbounds [6 x double], [6 x double]* %18, i64 0, i64 0
%97 = getelementptr inbounds [6 x double], [6 x double]* %21, i64 0, i64 0
%98 = getelementptr inbounds [12 x double], [12 x double]* %24, i64 0, i64 0
%99 = load double*, double** %11
%100 = call i32 @derivs_two(double* %96, double* %97, double* %98, double* %99)
store i32 0, i32* %15
br label %101
101: ; preds = %119, %95
%102 = load i32, i32* %15
%103 = icmp ult i32 %102, 6
br i1 %103, label %104, label %122
104: ; preds = %101
%105 = load double*, double** %7
%106 = load i32, i32* %15
%107 = zext i32 %106 to i64
%108 = getelementptr inbounds double, double* %105, i64 %107
%109 = load double, double* %108
%110 = load i32, i32* %15
%111 = zext i32 %110 to i64
%112 = getelementptr inbounds [6 x double], [6 x double]* %21, i64 0, i64 %111
%113 = load double, double* %112
%114 = load double, double* %16
%115 = call double @llvm.fmuladd.f64(double %113, double %114, double %109)
%116 = load i32, i32* %15
%117 = zext i32 %116 to i64
%118 = getelementptr inbounds [6 x double], [6 x double]* %19, i64 0, i64 %117
store double %115, double* %118
br label %119
119: ; preds = %104
%120 = load i32, i32* %15
%121 = add i32 %120, 1
store i32 %121, i32* %15
br label %101
122: ; preds = %101
%123 = getelementptr inbounds [6 x double], [6 x double]* %19, i64 0, i64 0
%124 = getelementptr inbounds [6 x double], [6 x double]* %22, i64 0, i64 0
%125 = getelementptr inbounds [12 x double], [12 x double]* %24, i64 0, i64 0
%126 = load double*, double** %11
%127 = call i32 @derivs_two(double* %123, double* %124, double* %125, double* %126)
store i32 0, i32* %15
br label %128
128: ; preds = %146, %122
%129 = load i32, i32* %15
%130 = icmp ult i32 %129, 6
br i1 %130, label %131, label %149
131: ; preds = %128
%132 = load double*, double** %7
%133 = load i32, i32* %15
%134 = zext i32 %133 to i64
%135 = getelementptr inbounds double, double* %132, i64 %134
%136 = load double, double* %135
%137 = load i32, i32* %15
%138 = zext i32 %137 to i64
%139 = getelementptr inbounds [6 x double], [6 x double]* %22, i64 0, i64 %138
%140 = load double, double* %139
%141 = load double, double* %8
%142 = call double @llvm.fmuladd.f64(double %140, double %141, double %136)
%143 = load i32, i32* %15
%144 = zext i32 %143 to i64
%145 = getelementptr inbounds [6 x double], [6 x double]* %19, i64 0, i64 %144
store double %142, double* %145
br label %146
146: ; preds = %131
%147 = load i32, i32* %15
%148 = add i32 %147, 1
store i32 %148, i32* %15
br label %128
149: ; preds = %128
%150 = getelementptr inbounds [6 x double], [6 x double]* %19, i64 0, i64 0
%151 = getelementptr inbounds [6 x double], [6 x double]* %23, i64 0, i64 0
%152 = getelementptr inbounds [12 x double], [12 x double]* %24, i64 0, i64 0
%153 = load double*, double** %11
%154 = call i32 @derivs_two(double* %150, double* %151, double* %152, double* %153)
store i32 0, i32* %15
br label %155
155: ; preds = %185, %149
%156 = load i32, i32* %15
%157 = icmp ult i32 %156, 6
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 [6 x double], [6 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 [6 x double], [6 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 [6 x double], [6 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 [6 x double], [6 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* %13
%191 = add i32 %190, 1
store i32 %191, i32* %13
br label %64
192: ; preds = %64
store i32 0, i32* %14
br label %193
193: ; preds = %206, %192
%194 = load i32, i32* %14
%195 = icmp ult i32 %194, 6
br i1 %195, label %196, label %209
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* %14
%204 = zext i32 %203 to i64
%205 = getelementptr inbounds double, double* %202, i64 %204
store double %201, double* %205
br label %206
206: ; preds = %196
%207 = load i32, i32* %14
%208 = add i32 %207, 1
store i32 %208, i32* %14
br label %193
209: ; preds = %193
ret void
}

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