#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 DBETWEEN(double, double);
int /*<<< orphan*/ DPRINT(double);
int /*<<< orphan*/ DSENSITIVITY(double);
int main(int N) {
  double E, E0, E1, S0, S1, S;
  double A1, A2, A3;
  double B1, B2;
  int i;
  A1 = DBETWEEN(0.5, 0.8);
  A2 = DBETWEEN(-1.5, -1);
  A3 = DBETWEEN(0.8, 1.3);
  B1 = DBETWEEN(1.39, 1.41);
  B2 = DBETWEEN(-0.71, -0.69);
  E = DBETWEEN(0, 1.0);
  E0 = DBETWEEN(0, 1.0);
  for (i = 1; i <= N; i++) {
    E1 = E0;
    E0 = E;
    E = DBETWEEN(0, 1.0);
    S1 = S0;
    S0 = S;
    S = A1 * E + E0 * A2 + E1 * A3 + S0 * B1 + S1 * B2;
    DPRINT(S);
  }
  DSENSITIVITY(S);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
movsd  0xefe(%rip),%xmm0
movsd  0xed6(%rip),%xmm1
call   1040 <DBETWEEN@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  0xed4(%rip),%xmm0
movsd  0xed4(%rip),%xmm1
call   1040 <DBETWEEN@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  0xeaa(%rip),%xmm0
movsd  0xeaa(%rip),%xmm1
call   1040 <DBETWEEN@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  0xe80(%rip),%xmm0
movsd  0xe80(%rip),%xmm1
call   1040 <DBETWEEN@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  0xe56(%rip),%xmm0
movsd  0xe56(%rip),%xmm1
call   1040 <DBETWEEN@plt>
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  0xe31(%rip),%xmm1
call   1040 <DBETWEEN@plt>
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  0xe1c(%rip),%xmm1
call   1040 <DBETWEEN@plt>
movsd  %xmm0,-0x18(%rbp)
movl   $0x1,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     12ad <main+0x17d>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  0xde0(%rip),%xmm1
call   1040 <DBETWEEN@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x40(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
call   1030 <DPRINT@plt>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    11f5 <main+0xc5>
movsd  -0x38(%rbp),%xmm0
call   1050 <DSENSITIVITY@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
mov    %edi,%ebx
movsd  0xec1(%rip),%xmm0
movsd  0xec1(%rip),%xmm1
call   1040 <DBETWEEN@plt>
movsd  %xmm0,0x40(%rsp)
movsd  0xeb6(%rip),%xmm0
movsd  0xeb6(%rip),%xmm1
call   1040 <DBETWEEN@plt>
movsd  %xmm0,0x38(%rsp)
movsd  0xeab(%rip),%xmm1
movsd  0xe8b(%rip),%xmm0
call   1040 <DBETWEEN@plt>
movsd  %xmm0,0x30(%rsp)
movsd  0xe98(%rip),%xmm0
movsd  0xe98(%rip),%xmm1
call   1040 <DBETWEEN@plt>
movsd  %xmm0,0x28(%rsp)
movsd  0xe8d(%rip),%xmm0
movsd  0xe8d(%rip),%xmm1
call   1040 <DBETWEEN@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0xe82(%rip),%xmm1
xorpd  %xmm0,%xmm0
call   1040 <DBETWEEN@plt>
movsd  %xmm0,0x8(%rsp)
xorpd  %xmm0,%xmm0
movsd  0xe67(%rip),%xmm1
call   1040 <DBETWEEN@plt>
cs nopw 0x0(%rax,%rax,1)
movsd  %xmm0,(%rsp)
movsd  %xmm1,0x18(%rsp)
movsd  0x8(%rsp),%xmm1
movsd  %xmm1,0x10(%rsp)
xorpd  %xmm0,%xmm0
movsd  0xe35(%rip),%xmm1
call   1040 <DBETWEEN@plt>
movapd %xmm0,%xmm1
movsd  0x38(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm1,0x8(%rsp)
mulsd  0x40(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  (%rsp),%xmm0
mulsd  0x30(%rsp),%xmm0
addsd  %xmm1,%xmm0
movapd %xmm0,%xmm1
movsd  0x18(%rsp),%xmm0
mulsd  0x28(%rsp),%xmm0
addsd  %xmm1,%xmm0
movsd  0x48(%rsp),%xmm1
mulsd  0x20(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movapd %xmm1,%xmm0
call   1030 <DPRINT@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  %xmm1,0x48(%rsp)
movsd  (%rsp),%xmm1
add    $0xffffffff,%ebx
jne    11f0 <main+0xc0>
movaps %xmm1,%xmm0
call   1050 <DSENSITIVITY@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca i32
store i32 0, i32* %2
store i32 %0, i32* %3
%16 = call double @DBETWEEN(double 5.000000e-01, double 8.000000e-01)
store double %16, double* %10
%17 = call double @DBETWEEN(double -1.500000e+00, double -1.000000e+00)
store double %17, double* %11
%18 = call double @DBETWEEN(double 8.000000e-01, double 1.300000e+00)
store double %18, double* %12
%19 = call double @DBETWEEN(double 1.390000e+00, double 1.410000e+00)
store double %19, double* %13
%20 = call double @DBETWEEN(double -7.100000e-01, double -6.900000e-01)
store double %20, double* %14
%21 = call double @DBETWEEN(double 0.000000e+00, double 1.000000e+00)
store double %21, double* %4
%22 = call double @DBETWEEN(double 0.000000e+00, double 1.000000e+00)
store double %22, double* %5
store i32 1, i32* %15
br label %23
23: ; preds = %50, %1
%24 = load i32, i32* %15
%25 = load i32, i32* %3
%26 = icmp sle i32 %24, %25
br i1 %26, label %27, label %53
27: ; preds = %23
%28 = load double, double* %5
store double %28, double* %6
%29 = load double, double* %4
store double %29, double* %5
%30 = call double @DBETWEEN(double 0.000000e+00, double 1.000000e+00)
store double %30, double* %4
%31 = load double, double* %7
store double %31, double* %8
%32 = load double, double* %9
store double %32, double* %7
%33 = load double, double* %10
%34 = load double, double* %4
%35 = load double, double* %5
%36 = load double, double* %11
%37 = fmul double %35, %36
%38 = call double @llvm.fmuladd.f64(double %33, double %34, double %37)
%39 = load double, double* %6
%40 = load double, double* %12
%41 = call double @llvm.fmuladd.f64(double %39, double %40, double %38)
%42 = load double, double* %7
%43 = load double, double* %13
%44 = call double @llvm.fmuladd.f64(double %42, double %43, double %41)
%45 = load double, double* %8
%46 = load double, double* %14
%47 = call double @llvm.fmuladd.f64(double %45, double %46, double %44)
store double %47, double* %9
%48 = load double, double* %9
%49 = call i32 @DPRINT(double %48)
br label %50
50: ; preds = %27
%51 = load i32, i32* %15
%52 = add nsw i32 %51, 1
store i32 %52, i32* %15
br label %23
53: ; preds = %23
%54 = load double, double* %9
%55 = call i32 @DSENSITIVITY(double %54)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0) {
%2 = tail call double @DBETWEEN(double 5.000000e-01, double 8.000000e-01)
%3 = tail call double @DBETWEEN(double -1.500000e+00, double -1.000000e+00)
%4 = tail call double @DBETWEEN(double 8.000000e-01, double 1.300000e+00)
%5 = tail call double @DBETWEEN(double 1.390000e+00, double 1.410000e+00)
%6 = tail call double @DBETWEEN(double -7.100000e-01, double -6.900000e-01)
%7 = tail call double @DBETWEEN(double 0.000000e+00, double 1.000000e+00)
%8 = tail call double @DBETWEEN(double 0.000000e+00, double 1.000000e+00)
%9 = icmp sgt i32 %0, 0
br label %10
10: ; preds = %1, %10
%11 = phi i32 [ %23, %10 ], [ 1, %1 ]
%12 = phi double [ %16, %10 ], [ %7, %1 ]
%13 = phi double [ %12, %10 ], [ %8, %1 ]
%14 = phi double [ %15, %10 ], [ undef, %1 ]
%15 = phi double [ %21, %10 ], [ undef, %1 ]
%16 = tail call double @DBETWEEN(double 0.000000e+00, double 1.000000e+00)
%17 = fmul double %3, %12
%18 = tail call double @llvm.fmuladd.f64(double %2, double %16, double %17)
%19 = tail call double @llvm.fmuladd.f64(double %13, double %4, double %18)
%20 = tail call double @llvm.fmuladd.f64(double %15, double %5, double %19)
%21 = tail call double @llvm.fmuladd.f64(double %14, double %6, double %20)
%22 = tail call i32 @DPRINT(double %21)
%23 = add nuw i32 %11, 1
%24 = icmp eq i32 %11, %0
br i1 %24, label %25, label %10
25: ; preds = %10
%26 = tail call i32 @DSENSITIVITY(double %21)
ret i32 0
}