#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 const *);
void integrate_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];
  dt2 = dt / 2.;
  dt6 = dt / 6.;
  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):
<integrate_one_rk4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%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   $0x3,-0x30(%rbp)
jae    1195 <integrate_one_rk4+0x85>
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    1165 <integrate_one_rk4+0x55>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jae    13ca <integrate_one_rk4+0x2ba>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x18(%rbp),%eax
jae    137a <integrate_one_rk4+0x26a>
mov    -0x8(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <derivs_one@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x3,-0x34(%rbp)
jae    121c <integrate_one_rk4+0x10c>
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    11d6 <integrate_one_rk4+0xc6>
lea    -0x60(%rbp),%rdi
lea    -0xc0(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <derivs_one@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x3,-0x34(%rbp)
jae    127d <integrate_one_rk4+0x16d>
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    1237 <integrate_one_rk4+0x127>
lea    -0x80(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <derivs_one@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x3,-0x34(%rbp)
jae    12de <integrate_one_rk4+0x1ce>
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    1298 <integrate_one_rk4+0x188>
lea    -0x80(%rbp),%rdi
lea    -0x100(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <derivs_one@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x3,-0x34(%rbp)
jae    1367 <integrate_one_rk4+0x257>
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    12f9 <integrate_one_rk4+0x1e9>
jmp    136c <integrate_one_rk4+0x25c>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11af <integrate_one_rk4+0x9f>
movl   $0x0,-0x30(%rbp)
cmpl   $0x3,-0x30(%rbp)
jae    13b7 <integrate_one_rk4+0x2a7>
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    1381 <integrate_one_rk4+0x271>
jmp    13bc <integrate_one_rk4+0x2ac>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    119c <integrate_one_rk4+0x8c>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<integrate_one_rk4>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x138,%rsp
mov    %edx,0x4(%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     13bd <integrate_one_rk4+0x2ad>
mov    %rcx,%rbx
mov    %rdi,%rbp
movsd  0xea0(%rip),%xmm3
movapd %xmm0,%xmm4
divsd  0xe9c(%rip),%xmm4
mulsd  %xmm0,%xmm3
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    0x40(%rsp),%r14
lea    0x80(%rsp),%r13
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    1224 <integrate_one_rk4+0x114>
xchg   %ax,%ax
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     13bd <integrate_one_rk4+0x2ad>
mov    %rdx,0x8(%rsp)
mov    0x4(%rsp),%eax
mov    %eax,%r15d
test   %eax,%eax
je     11e0 <integrate_one_rk4+0xd0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbp,%rdi
mov    %r12,%rsi
mov    %rbx,%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    %r14,%rsi
mov    %rbx,%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    %r13,%rdi
lea    0x20(%rsp),%rsi
mov    %rbx,%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    %r13,%rdi
lea    0x100(%rsp),%rsi
mov    %rbx,%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,%r15d
jne    1240 <integrate_one_rk4+0x130>
jmp    11e5 <integrate_one_rk4+0xd5>
add    $0x138,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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