#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 */
double dp3(double, double);
int pow(int, int);
void solve3(double *q1, double *q3, double *p3, double dt, double Nsteps) {
  int i;
  double a0 = -pow(2, 1 / 3) / (2 - pow(2, 1 / 3));
  double a1 = 1 / (2 - pow(2, 1 / 3));
  for (i = 0; i < Nsteps - 1; i++) {
    p3[i + 1] = p3[i] + 0.5 * a0 * dt * dp3(q1[i], q3[i]);
    q3[i + 1] = q3[i] + a0 * dt * p3[i + 1];
    p3[i + 1] = p3[i + 1] + 0.5 * a0 * dt * dp3(q1[i + 1], q3[i + 1]);
    p3[i + 1] = p3[i + 1] + 0.5 * a1 * dt * dp3(q1[i + 1], q3[i + 1]);
    q3[i + 1] = q3[i + 1] + a1 * dt * p3[i + 1];
    p3[i + 1] = p3[i + 1] + 0.5 * a1 * dt * dp3(q1[i + 1], q3[i + 1]);
    p3[i + 1] = p3[i + 1] + 0.5 * a0 * dt * dp3(q1[i + 1], q3[i + 1]);
    q3[i + 1] = q3[i + 1] + a0 * dt * p3[i + 1];
    p3[i + 1] = p3[i + 1] + 0.5 * a0 * dt * dp3(q1[i + 1], q3[i + 1]);
  }
}


x86 assembly (clang, -O0):
<solve3>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
mov    $0x2,%edi
xor    %esi,%esi
call   1040 <pow@plt>
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x44(%rbp)
mov    $0x2,%edi
xor    %esi,%esi
call   1040 <pow@plt>
mov    %eax,%edx
mov    -0x44(%rbp),%eax
mov    $0x2,%ecx
sub    %edx,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    $0x2,%edi
xor    %esi,%esi
call   1040 <pow@plt>
mov    $0x2,%ecx
sub    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x0,-0x2c(%rbp)
cvtsi2sdl -0x2c(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
movsd  0xe49(%rip),%xmm2
subsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    15a9 <solve3+0x489>
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  0xe26(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
call   1030 <dp3@plt>
movsd  -0xa8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x38(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0xd63(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
call   1030 <dp3@plt>
movsd  -0x98(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x90(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xcd9(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
call   1030 <dp3@plt>
movsd  -0x88(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x80(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x40(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xc10(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
call   1030 <dp3@plt>
movsd  -0x78(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x70(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xb92(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
call   1030 <dp3@plt>
movsd  -0x68(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x60(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x38(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xacc(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
call   1030 <dp3@plt>
movsd  -0x58(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x50(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11a5 <solve3+0x85>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve3>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
movsd  %xmm1,0x18(%rsp)
movsd  %xmm0,0x8(%rsp)
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
mov    $0x2,%ebp
xor    %r13d,%r13d
mov    $0x2,%edi
xor    %esi,%esi
call   1040 <pow@plt>
mov    %eax,%r12d
mov    $0x2,%edi
xor    %esi,%esi
call   1040 <pow@plt>
mov    $0x2,%ecx
sub    %eax,%ecx
mov    %r12d,%eax
cltd
idiv   %ecx
mov    %eax,%r12d
mov    $0x2,%edi
xor    %esi,%esi
call   1040 <pow@plt>
movsd  0x18(%rsp),%xmm1
sub    %eax,%ebp
add    $0xffffffff,%eax
cmp    $0x3,%eax
cmovae %r13d,%ebp
addsd  0xe64(%rip),%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jbe    1365 <solve3+0x245>
neg    %r12d
xorps  %xmm0,%xmm0
cvtsi2sd %r12d,%xmm0
cvtsi2sd %ebp,%xmm2
movsd  0xe47(%rip),%xmm3
movapd %xmm0,%xmm4
mulsd  %xmm3,%xmm4
movsd  0x8(%rsp),%xmm5
mulsd  %xmm5,%xmm4
movsd  %xmm4,0x10(%rsp)
mulsd  %xmm5,%xmm0
movsd  %xmm0,0x28(%rsp)
mulsd  %xmm2,%xmm3
mulsd  %xmm5,%xmm3
movsd  %xmm3,0x20(%rsp)
mulsd  %xmm5,%xmm2
movsd  %xmm2,0x30(%rsp)
movsd  (%r14),%xmm0
mov    $0x1,%ebp
movsd  %xmm1,0x18(%rsp)
nopl   0x0(%rax,%rax,1)
movsd  %xmm0,0x8(%rsp)
movsd  -0x8(%r15,%rbp,8),%xmm0
movsd  -0x8(%rbx,%rbp,8),%xmm1
call   1030 <dp3@plt>
mulsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%r14,%rbp,8)
mulsd  0x28(%rsp),%xmm1
addsd  -0x8(%rbx,%rbp,8),%xmm1
movsd  %xmm1,(%rbx,%rbp,8)
movsd  (%r14,%rbp,8),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%r15,%rbp,8),%xmm0
call   1030 <dp3@plt>
mulsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  %xmm1,(%r14,%rbp,8)
movsd  (%r15,%rbp,8),%xmm0
movsd  (%rbx,%rbp,8),%xmm1
call   1030 <dp3@plt>
mulsd  0x20(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%r14,%rbp,8)
mulsd  0x30(%rsp),%xmm1
addsd  (%rbx,%rbp,8),%xmm1
movsd  %xmm1,(%rbx,%rbp,8)
movsd  (%r14,%rbp,8),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%r15,%rbp,8),%xmm0
call   1030 <dp3@plt>
mulsd  0x20(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  %xmm1,(%r14,%rbp,8)
movsd  (%r15,%rbp,8),%xmm0
movsd  (%rbx,%rbp,8),%xmm1
call   1030 <dp3@plt>
mulsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%r14,%rbp,8)
mulsd  0x28(%rsp),%xmm1
addsd  (%rbx,%rbp,8),%xmm1
movsd  %xmm1,(%rbx,%rbp,8)
movsd  (%r14,%rbp,8),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%r15,%rbp,8),%xmm0
call   1030 <dp3@plt>
movsd  0x18(%rsp),%xmm1
mulsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
xorps  %xmm2,%xmm2
cvtsi2sd %ebp,%xmm2
movsd  %xmm0,(%r14,%rbp,8)
add    $0x1,%rbp
ucomisd %xmm2,%xmm1
ja     1210 <solve3+0xf0>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @solve3(double* nocapture %0, double* nocapture %1, double* nocapture %2, double %3, double %4) {
%6 = tail call i32 @pow(i32 2, i32 0)
%7 = tail call i32 @pow(i32 2, i32 0)
%8 = sub nsw i32 2, %7
%9 = sdiv i32 %6, %8
%10 = sub nsw i32 0, %9
%11 = sitofp i32 %10 to double
%12 = tail call i32 @pow(i32 2, i32 0)
%13 = sub nsw i32 2, %12
%14 = add i32 %12, -1
%15 = icmp ult i32 %14, 3
%16 = select i1 %15, i32 %13, i32 0
%17 = sitofp i32 %16 to double
%18 = fadd double %4, -1.000000e+00
%19 = fcmp ogt double %18, 0.000000e+00
br i1 %19, label %20, label %70
20: ; preds = %5
%21 = fmul double %11, 5.000000e-01
%22 = fmul double %21, %3
%23 = fmul double %11, %3
%24 = fmul double %17, 5.000000e-01
%25 = fmul double %24, %3
%26 = fmul double %17, %3
%27 = load double, double* %2
br label %28
28: ; preds = %20, %28
%29 = phi double [ %27, %20 ], [ %66, %28 ]
%30 = phi i64 [ 0, %20 ], [ %37, %28 ]
%31 = getelementptr inbounds double, double* %0, i64 %30
%32 = load double, double* %31
%33 = getelementptr inbounds double, double* %1, i64 %30
%34 = load double, double* %33
%35 = tail call double @dp3(double %32, double %34)
%36 = tail call double @llvm.fmuladd.f64(double %22, double %35, double %29)
%37 = add nuw i64 %30, 1
%38 = getelementptr inbounds double, double* %2, i64 %37
store double %36, double* %38
%39 = load double, double* %33
%40 = tail call double @llvm.fmuladd.f64(double %23, double %36, double %39)
%41 = getelementptr inbounds double, double* %1, i64 %37
store double %40, double* %41
%42 = load double, double* %38
%43 = getelementptr inbounds double, double* %0, i64 %37
%44 = load double, double* %43
%45 = tail call double @dp3(double %44, double %40)
%46 = tail call double @llvm.fmuladd.f64(double %22, double %45, double %42)
store double %46, double* %38
%47 = load double, double* %43
%48 = load double, double* %41
%49 = tail call double @dp3(double %47, double %48)
%50 = tail call double @llvm.fmuladd.f64(double %25, double %49, double %46)
store double %50, double* %38
%51 = load double, double* %41
%52 = tail call double @llvm.fmuladd.f64(double %26, double %50, double %51)
store double %52, double* %41
%53 = load double, double* %38
%54 = load double, double* %43
%55 = tail call double @dp3(double %54, double %52)
%56 = tail call double @llvm.fmuladd.f64(double %25, double %55, double %53)
store double %56, double* %38
%57 = load double, double* %43
%58 = load double, double* %41
%59 = tail call double @dp3(double %57, double %58)
%60 = tail call double @llvm.fmuladd.f64(double %22, double %59, double %56)
store double %60, double* %38
%61 = load double, double* %41
%62 = tail call double @llvm.fmuladd.f64(double %23, double %60, double %61)
store double %62, double* %41
%63 = load double, double* %38
%64 = load double, double* %43
%65 = tail call double @dp3(double %64, double %62)
%66 = tail call double @llvm.fmuladd.f64(double %22, double %65, double %63)
store double %66, double* %38
%67 = trunc i64 %37 to i32
%68 = sitofp i32 %67 to double
%69 = fcmp ogt double %18, %68
br i1 %69, label %28, label %70
70: ; preds = %28, %5
ret void
}