#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*/ exp(double);
int /*<<< orphan*/ printf(char *, double, int /*<<< orphan*/);
int main() {
  double x = 0;
  printf("The exponential value of %lf is %lf\n", x, exp(x));
  printf("The exponential value of %lf is %lf\n", x + 1, exp(x + 1));
  printf("The exponential value of %lf is %lf\n", x + 2, exp(x + 2));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <exp@plt>
movsd  -0x28(%rbp),%xmm0
mov    %eax,%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
movsd  0xea2(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe90(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
call   1040 <exp@plt>
movsd  -0x20(%rbp),%xmm0
mov    %eax,%esi
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
movsd  0xe63(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe51(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
call   1040 <exp@plt>
movsd  -0x18(%rbp),%xmm0
mov    %eax,%esi
lea    0xe49(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xorps  %xmm0,%xmm0
call   1040 <exp@plt>
lea    0xee0(%rip),%rbx
xorps  %xmm0,%xmm0
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
movsd  0xebb(%rip),%xmm0
call   1040 <exp@plt>
mov    %rbx,%rdi
movsd  0xeab(%rip),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
movsd  0xea4(%rip),%xmm0
call   1040 <exp@plt>
mov    %rbx,%rdi
movsd  0xe94(%rip),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"The exponential value of %lf is %lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
store double 0.000000e+00, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = call i32 @exp(double %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), double %3, i32 %5)
%7 = load double, double* %2
%8 = fadd double %7, 1.000000e+00
%9 = load double, double* %2
%10 = fadd double %9, 1.000000e+00
%11 = call i32 @exp(double %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), double %8, i32 %11)
%13 = load double, double* %2
%14 = fadd double %13, 2.000000e+00
%15 = load double, double* %2
%16 = fadd double %15, 2.000000e+00
%17 = call i32 @exp(double %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), double %14, i32 %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"The exponential value of %lf is %lf\0A\00"
define i32 @main() {
%1 = tail call i32 @exp(double 0.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), double 0.000000e+00, i32 %1)
%3 = tail call i32 @exp(double 1.000000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), double 1.000000e+00, i32 %3)
%5 = tail call i32 @exp(double 2.000000e+00)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), double 2.000000e+00, i32 %5)
ret i32 0
}