#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 */
float f1(float);
float f2(float);
float getfloat(char *);
int /*<<< orphan*/ printf(char *, float, float);
int /*<<< orphan*/ putchar(char);
int main(void) {
  float x, y, z;
  x = getfloat("Ingrese un número real :");
  putchar('\n');
  y = f1(x);
  z = f2(x);
  printf("El doble de %g es %g\n", x, y);
  printf("El triple de %g es %g\n", x, z);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
call   1070 <getfloat@plt>
movss  %xmm0,-0x8(%rbp)
mov    $0xa,%edi
call   1040 <putchar@plt>
movss  -0x8(%rbp),%xmm0
call   1060 <f1@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <f2@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
lea    0xe71(%rip),%rdi
call   1050 <printf@plt>
movss  -0x8(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
lea    0xe71(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xea5(%rip),%rdi
call   1070 <getfloat@plt>
movss  %xmm0,0xc(%rsp)
mov    $0xa,%edi
call   1040 <putchar@plt>
movss  0xc(%rsp),%xmm0
call   1060 <f1@plt>
movss  %xmm0,0x10(%rsp)
movss  0xc(%rsp),%xmm0
call   1030 <f2@plt>
movss  %xmm0,0x14(%rsp)
lea    0xe81(%rip),%rdi
movss  0xc(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
call   1050 <printf@plt>
lea    0xe7f(%rip),%rdi
movss  0xc(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Ingrese un n\C3\BAmero real :\00"
@.str.1 = [22 x i8] c"El doble de %g es %g\0A\00"
@.str.2 = [23 x i8] c"El triple de %g es %g\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
%5 = call float @getfloat(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
store float %5, float* %2
%6 = call i32 @putchar(i8 signext 10)
%7 = load float, float* %2
%8 = call float @f1(float %7)
store float %8, float* %3
%9 = load float, float* %2
%10 = call float @f2(float %9)
store float %10, float* %4
%11 = load float, float* %2
%12 = load float, float* %3
%13 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), float %11, float %12)
%14 = load float, float* %2
%15 = load float, float* %4
%16 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), float %14, float %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"Ingrese un n\C3\BAmero real :\00"
@.str.1 = [22 x i8] c"El doble de %g es %g\0A\00"
@.str.2 = [23 x i8] c"El triple de %g es %g\0A\00"
define i32 @main() {
%1 = tail call float @getfloat(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @putchar(i8 signext 10)
%3 = tail call float @f1(float %1)
%4 = tail call float @f2(float %1)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), float %1, float %3)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), float %1, float %4)
ret i32 0
}