#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*/ savevalues_for(double);
int /*<<< orphan*/ stepforwards(int, int, int, double);
void Forward(double *lambda, double *diff) {
  int t;
  double l, l3;
  l = *lambda;
  l3 = (l - 1.0) * (l - 1.0) * (l - 1.0);
  l = l + 10.0 * l3;
  savevalues_for(l);
  for (t = 0; t < 52; t++)
    stepforwards(t, 902, 907, 1.0);
}


x86 assembly (clang, -O0):
<Forward>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xebe(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xead(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xe98(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
movsd  0xe71(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1040 <savevalues_for@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x34,-0x14(%rbp)
jge    11df <Forward+0xbf>
mov    -0x14(%rbp),%edi
mov    $0x386,%esi
mov    $0x38b,%edx
movsd  0xe3c(%rip),%xmm0
call   1030 <stepforwards@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11ad <Forward+0x8d>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Forward>:
push   %rbx
movsd  (%rdi),%xmm1
movsd  0xed3(%rip),%xmm2
addsd  %xmm1,%xmm2
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
mulsd  0xec3(%rip),%xmm0
addsd  %xmm1,%xmm0
call   1040 <savevalues_for@plt>
xor    %ebx,%ebx
mov    %ebx,%edi
mov    $0x386,%esi
mov    $0x38b,%edx
movsd  0xeac(%rip),%xmm0
call   1030 <stepforwards@plt>
add    $0x1,%ebx
cmp    $0x34,%ebx
jne    1150 <Forward+0x30>
pop    %rbx
ret

LLVM IR (-O0):
define void @Forward(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca i32
%6 = alloca double
%7 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%8 = load double*, double** %3
%9 = load double, double* %8
store double %9, double* %6
%10 = load double, double* %6
%11 = fsub double %10, 1.000000e+00
%12 = load double, double* %6
%13 = fsub double %12, 1.000000e+00
%14 = fmul double %11, %13
%15 = load double, double* %6
%16 = fsub double %15, 1.000000e+00
%17 = fmul double %14, %16
store double %17, double* %7
%18 = load double, double* %6
%19 = load double, double* %7
%20 = call double @llvm.fmuladd.f64(double 1.000000e+01, double %19, double %18)
store double %20, double* %6
%21 = load double, double* %6
%22 = call i32 @savevalues_for(double %21)
store i32 0, i32* %5
br label %23
23: ; preds = %29, %2
%24 = load i32, i32* %5
%25 = icmp slt i32 %24, 52
br i1 %25, label %26, label %32
26: ; preds = %23
%27 = load i32, i32* %5
%28 = call i32 @stepforwards(i32 %27, i32 902, i32 907, double 1.000000e+00)
br label %29
29: ; preds = %26
%30 = load i32, i32* %5
%31 = add nsw i32 %30, 1
store i32 %31, i32* %5
br label %23
32: ; preds = %23
ret void
}

LLVM IR (-O2):
define void @Forward(double* nocapture %0, double* nocapture readnone %1) {
%3 = load double, double* %0
%4 = fadd double %3, -1.000000e+00
%5 = fmul double %4, %4
%6 = fmul double %4, %5
%7 = tail call double @llvm.fmuladd.f64(double %6, double 1.000000e+01, double %3)
%8 = tail call i32 @savevalues_for(double %7)
br label %9
9: ; preds = %2, %9
%10 = phi i32 [ 0, %2 ], [ %12, %9 ]
%11 = tail call i32 @stepforwards(i32 %10, i32 902, i32 907, double 1.000000e+00)
%12 = add nuw nsw i32 %10, 1
%13 = icmp eq i32 %12, 52
br i1 %13, label %14, label %9
14: ; preds = %9
ret void
}