#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 findFinalV(int, int, double, int);
int /*<<< orphan*/ printf(char *, double, double, double, double, double);
int main() {
  double test1 = findFinalV(100, 15, .2, 10);
  double test2 = findFinalV(200, 15, .2, 10);
  double test3 = findFinalV(200, 20, .2, 10);
  double test4 = findFinalV(200, 20, .3, 10);
  double test5 = findFinalV(200, 20, .3, 20);
  printf(" %f %f %f %f %f\n", test1, test2, test3, test4, test5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x64,%edi
mov    $0xf,%esi
movsd  0xec7(%rip),%xmm0
mov    $0xa,%edx
call   1040 <findFinalV@plt>
movsd  %xmm0,-0x10(%rbp)
mov    $0xc8,%edi
mov    $0xf,%esi
movsd  0xea6(%rip),%xmm0
mov    $0xa,%edx
call   1040 <findFinalV@plt>
movsd  %xmm0,-0x18(%rbp)
mov    $0xc8,%edi
mov    $0x14,%esi
movsd  0xe85(%rip),%xmm0
mov    $0xa,%edx
call   1040 <findFinalV@plt>
movsd  %xmm0,-0x20(%rbp)
mov    $0xc8,%edi
mov    $0x14,%esi
movsd  0xe5c(%rip),%xmm0
mov    $0xa,%edx
call   1040 <findFinalV@plt>
movsd  %xmm0,-0x28(%rbp)
mov    $0xc8,%edi
mov    $0x14,%edx
movsd  0xe3b(%rip),%xmm0
mov    %edx,%esi
call   1040 <findFinalV@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm4
lea    0xe1f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movsd  0xed4(%rip),%xmm0
mov    $0x64,%edi
mov    $0xf,%esi
mov    $0xa,%edx
call   1040 <findFinalV@plt>
movsd  %xmm0,0x20(%rsp)
mov    $0xc8,%edi
mov    $0xf,%esi
movsd  0xea8(%rip),%xmm0
mov    $0xa,%edx
call   1040 <findFinalV@plt>
movsd  %xmm0,0x18(%rsp)
mov    $0xc8,%edi
mov    $0x14,%esi
movsd  0xe86(%rip),%xmm0
mov    $0xa,%edx
call   1040 <findFinalV@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0xe76(%rip),%xmm0
mov    $0xc8,%edi
mov    $0x14,%esi
mov    $0xa,%edx
call   1040 <findFinalV@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0xc8,%edi
mov    $0x14,%esi
movsd  0xe4a(%rip),%xmm0
mov    $0x14,%edx
call   1040 <findFinalV@plt>
movaps %xmm0,%xmm4
lea    0xe3e(%rip),%rdi
movsd  0x20(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x8(%rsp),%xmm3
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [17 x i8] c" %f %f %f %f %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store i32 0, i32* %1
%7 = call double @findFinalV(i32 100, i32 15, double 2.000000e-01, i32 10)
store double %7, double* %2
%8 = call double @findFinalV(i32 200, i32 15, double 2.000000e-01, i32 10)
store double %8, double* %3
%9 = call double @findFinalV(i32 200, i32 20, double 2.000000e-01, i32 10)
store double %9, double* %4
%10 = call double @findFinalV(i32 200, i32 20, double 3.000000e-01, i32 10)
store double %10, double* %5
%11 = call double @findFinalV(i32 200, i32 20, double 3.000000e-01, i32 20)
store double %11, double* %6
%12 = load double, double* %2
%13 = load double, double* %3
%14 = load double, double* %4
%15 = load double, double* %5
%16 = load double, double* %6
%17 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %12, double %13, double %14, double %15, double %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c" %f %f %f %f %f\0A\00"
define i32 @main() {
%1 = tail call double @findFinalV(i32 100, i32 15, double 2.000000e-01, i32 10)
%2 = tail call double @findFinalV(i32 200, i32 15, double 2.000000e-01, i32 10)
%3 = tail call double @findFinalV(i32 200, i32 20, double 2.000000e-01, i32 10)
%4 = tail call double @findFinalV(i32 200, i32 20, double 3.000000e-01, i32 10)
%5 = tail call double @findFinalV(i32 200, i32 20, double 3.000000e-01, i32 20)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %1, double %2, double %3, double %4, double %5)
ret i32 0
}