#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*/ printf(char *, float);
void numReales(void) {
  float x = 12.56;
  printf("El valor de x es: %f\n", x);
  printf(" pero lo podemos escribir con 2 decimales: %5.2f\n", x);
  printf(" o solo con uno %5.1f\n", x);
  printf(" o con 7 cifras %7.1f\n", x);
  printf(" o alineado a la izquierda %-7.1f\n", x);
  printf(" o sin decimales %2.0f\n", x);
  printf(" o solo con una cifra %1.0f\n", x);
}


x86 assembly (clang, -O0):
<numReales>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  0xee0(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
movss  -0x4(%rbp),%xmm0
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
movss  -0x4(%rbp),%xmm0
lea    0xef9(%rip),%rdi
call   1030 <printf@plt>
movss  -0x4(%rbp),%xmm0
lea    0xeff(%rip),%rdi
call   1030 <printf@plt>
movss  -0x4(%rbp),%xmm0
lea    0xf05(%rip),%rdi
call   1030 <printf@plt>
movss  -0x4(%rbp),%xmm0
lea    0xf17(%rip),%rdi
call   1030 <printf@plt>
movss  -0x4(%rbp),%xmm0
lea    0xf1e(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<numReales>:
push   %rax
lea    0xeec(%rip),%rdi
movss  0xee0(%rip),%xmm0
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
movss  0xecc(%rip),%xmm0
call   1030 <printf@plt>
lea    0xf0c(%rip),%rdi
movss  0xeb8(%rip),%xmm0
call   1030 <printf@plt>
lea    0xf0f(%rip),%rdi
movss  0xea4(%rip),%xmm0
call   1030 <printf@plt>
lea    0xf12(%rip),%rdi
movss  0xe90(%rip),%xmm0
call   1030 <printf@plt>
lea    0xf21(%rip),%rdi
movss  0xe7c(%rip),%xmm0
call   1030 <printf@plt>
lea    0xf25(%rip),%rdi
movss  0xe68(%rip),%xmm0
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"El valor de x es: %f\0A\00"
@.str.1 = [50 x i8] c" pero lo podemos escribir con 2 decimales: %5.2f\0A\00"
@.str.2 = [23 x i8] c" o solo con uno %5.1f\0A\00"
@.str.3 = [23 x i8] c" o con 7 cifras %7.1f\0A\00"
@.str.4 = [35 x i8] c" o alineado a la izquierda %-7.1f\0A\00"
@.str.5 = [24 x i8] c" o sin decimales %2.0f\0A\00"
@.str.6 = [29 x i8] c" o solo con una cifra %1.0f\0A\00"
define void @numReales() {
%1 = alloca float
store float 0x40291EB860000000, float* %1
%2 = load float, float* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), float %2)
%4 = load float, float* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), float %4)
%6 = load float, float* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), float %6)
%8 = load float, float* %1
%9 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), float %8)
%10 = load float, float* %1
%11 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), float %10)
%12 = load float, float* %1
%13 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), float %12)
%14 = load float, float* %1
%15 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), float %14)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"El valor de x es: %f\0A\00"
@.str.1 = [50 x i8] c" pero lo podemos escribir con 2 decimales: %5.2f\0A\00"
@.str.2 = [23 x i8] c" o solo con uno %5.1f\0A\00"
@.str.3 = [23 x i8] c" o con 7 cifras %7.1f\0A\00"
@.str.4 = [35 x i8] c" o alineado a la izquierda %-7.1f\0A\00"
@.str.5 = [24 x i8] c" o sin decimales %2.0f\0A\00"
@.str.6 = [29 x i8] c" o solo con una cifra %1.0f\0A\00"
define void @numReales() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), float 0x40291EB860000000)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), float 0x40291EB860000000)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), float 0x40291EB860000000)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), float 0x40291EB860000000)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), float 0x40291EB860000000)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), float 0x40291EB860000000)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), float 0x40291EB860000000)
ret void
}