#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 function1(double);
double function2(double);
double function3(double);
double function4(double);
int /*<<< orphan*/ printf(char *, double);
int main() {
  printf("%f\n", function1(2.54));
  printf("%f\n", function2(2.54));
  printf("%f\n", function3(2.54));
  printf("%f\n", function4(2.54));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xe99(%rip),%xmm0
call   1030 <function1@plt>
lea    0xe95(%rip),%rdi
call   1050 <printf@plt>
movsd  0xe80(%rip),%xmm0
call   1070 <function2@plt>
lea    0xe7c(%rip),%rdi
call   1050 <printf@plt>
movsd  0xe67(%rip),%xmm0
call   1040 <function3@plt>
lea    0xe63(%rip),%rdi
call   1050 <printf@plt>
movsd  0xe4e(%rip),%xmm0
call   1060 <function4@plt>
lea    0xe4a(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
movsd  0xea7(%rip),%xmm0
call   1030 <function1@plt>
lea    0xea3(%rip),%rbx
mov    %rbx,%rdi
call   1050 <printf@plt>
movsd  0xe8b(%rip),%xmm0
call   1070 <function2@plt>
mov    %rbx,%rdi
call   1050 <printf@plt>
movsd  0xe76(%rip),%xmm0
call   1040 <function3@plt>
mov    %rbx,%rdi
call   1050 <printf@plt>
movsd  0xe61(%rip),%xmm0
call   1060 <function4@plt>
mov    %rbx,%rdi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call double @function1(double 2.540000e+00)
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %2)
%4 = call double @function2(double 2.540000e+00)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %4)
%6 = call double @function3(double 2.540000e+00)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %6)
%8 = call double @function4(double 2.540000e+00)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call double @function1(double 2.540000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %1)
%3 = tail call double @function2(double 2.540000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %3)
%5 = tail call double @function3(double 2.540000e+00)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %5)
%7 = tail call double @function4(double 2.540000e+00)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %7)
ret i32 0
}