#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 *, ...);
main() {
  char car;
  static char nombre[] = "La temperatura ambiente";
  int a, b, c;
  float x, y, z;
  car = 'C';
  a = 20;
  b = 350;
  c = 4995;
  x = 34.5;
  y = 1234;
  z = 1.248;
  printf("\n%s es de ", nombre);
  printf("%d grados %c\n", a, car);
  printf("\n");
  printf("a = %6d\tb = %6d\tc = %6d\n", a, b, c);
  printf("\nLos resultados son los siguientes:\n");
  printf("\n%5s\t\t%5s\t\t%5s\n", "x", "y", "z");
  printf("________________________________________\n");
  printf("\n%8.2f\t%8.2f\t%8.2f", x, y, z);
  printf("\n%8.2f\t%8.2f\t%8.2f\n", x + y, y / 5, z * 2);
  printf("\n\n");
  z *= (x + y);
  printf("Valor resultante: %.3f\n", z);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movb   $0x43,-0x1(%rbp)
movl   $0x14,-0x8(%rbp)
movl   $0x15e,-0xc(%rbp)
movl   $0x1383,-0x10(%rbp)
movss  0xed7(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xec6(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xeb5(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
lea    0xeb5(%rip),%rdi
lea    0x2eca(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
movsbl -0x1(%rbp),%edx
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf4a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeaf(%rip),%rdi
lea    0xeb8(%rip),%rsi
lea    0xeb3(%rip),%rdx
lea    0xeae(%rip),%rcx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x1c(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xea3(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x18(%rbp),%xmm1
movss  0xdda(%rip),%xmm2
divss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
movss  0xdc6(%rip),%xmm2
mulss  -0x1c(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xe74(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
mulss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe52(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf00(%rip),%rdi
lea    0x2f01(%rip),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xef6(%rip),%rdi
mov    $0x14,%esi
mov    $0x43,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xee2(%rip),%rdi
mov    $0x14,%esi
mov    $0x15e,%edx
mov    $0x1383,%ecx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf33(%rip),%rdi
call   1040 <puts@plt>
lea    0xed2(%rip),%rdi
lea    0xedb(%rip),%rsi
lea    0xed6(%rip),%rdx
lea    0xed1(%rip),%rcx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf28(%rip),%rdi
call   1040 <puts@plt>
lea    0xeb9(%rip),%rdi
movsd  0xe31(%rip),%xmm0
movsd  0xe31(%rip),%xmm1
movsd  0xe31(%rip),%xmm2
mov    $0x3,%al
call   1050 <printf@plt>
lea    0xea6(%rip),%rdi
movsd  0xe23(%rip),%xmm0
movsd  0xe23(%rip),%xmm1
movsd  0xe23(%rip),%xmm2
mov    $0x3,%al
call   1050 <printf@plt>
lea    0xe3c(%rip),%rdi
call   1040 <puts@plt>
lea    0xe88(%rip),%rdi
movsd  0xe09(%rip),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@main.nombre = internal global [24 x i8] c"La temperatura ambiente\00"
@.str = [11 x i8] c"\0A%s es de \00"
@.str.1 = [14 x i8] c"%d grados %c\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [25 x i8] c"a = %6d\09b = %6d\09c = %6d\0A\00"
@.str.4 = [37 x i8] c"\0ALos resultados son los siguientes:\0A\00"
@.str.5 = [16 x i8] c"\0A%5s\09\09%5s\09\09%5s\0A\00"
@.str.6 = [2 x i8] c"x\00"
@.str.7 = [2 x i8] c"y\00"
@.str.8 = [2 x i8] c"z\00"
@.str.9 = [42 x i8] c"________________________________________\0A\00"
@.str.10 = [19 x i8] c"\0A%8.2f\09%8.2f\09%8.2f\00"
@.str.11 = [20 x i8] c"\0A%8.2f\09%8.2f\09%8.2f\0A\00"
@.str.12 = [3 x i8] c"\0A\0A\00"
@.str.13 = [24 x i8] c"Valor resultante: %.3f\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca float
%7 = alloca float
store i8 67, i8* %1
store i32 20, i32* %2
store i32 350, i32* %3
store i32 4995, i32* %4
store float 3.450000e+01, float* %5
store float 1.234000e+03, float* %6
store float 0x3FF3F7CEE0000000, float* %7
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @main.nombre, i64 0, i64 0))
%9 = load i32, i32* %2
%10 = load i8, i8* %1
%11 = sext i8 %10 to i32
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32 %11)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 %14, i32 %15, i32 %16)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.9, i64 0, i64 0))
%21 = load float, float* %5
%22 = fpext float %21 to double
%23 = load float, float* %6
%24 = fpext float %23 to double
%25 = load float, float* %7
%26 = fpext float %25 to double
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), double %22, double %24, double %26)
%28 = load float, float* %5
%29 = load float, float* %6
%30 = fadd float %28, %29
%31 = fpext float %30 to double
%32 = load float, float* %6
%33 = fdiv float %32, 5.000000e+00
%34 = fpext float %33 to double
%35 = load float, float* %7
%36 = fmul float %35, 2.000000e+00
%37 = fpext float %36 to double
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0), double %31, double %34, double %37)
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
%40 = load float, float* %5
%41 = load float, float* %6
%42 = fadd float %40, %41
%43 = load float, float* %7
%44 = fmul float %43, %42
store float %44, float* %7
%45 = load float, float* %7
%46 = fpext float %45 to double
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0), double %46)
ret i32 0
}

LLVM IR (-O2):
@main.nombre = internal global [24 x i8] c"La temperatura ambiente\00"
@.str = [11 x i8] c"\0A%s es de \00"
@.str.1 = [14 x i8] c"%d grados %c\0A\00"
@.str.3 = [25 x i8] c"a = %6d\09b = %6d\09c = %6d\0A\00"
@.str.5 = [16 x i8] c"\0A%5s\09\09%5s\09\09%5s\0A\00"
@.str.6 = [2 x i8] c"x\00"
@.str.7 = [2 x i8] c"y\00"
@.str.8 = [2 x i8] c"z\00"
@.str.10 = [19 x i8] c"\0A%8.2f\09%8.2f\09%8.2f\00"
@.str.11 = [20 x i8] c"\0A%8.2f\09%8.2f\09%8.2f\0A\00"
@.str.13 = [24 x i8] c"Valor resultante: %.3f\0A\00"
@str = [36 x i8] c"\0ALos resultados son los siguientes:\00"
@str.14 = [41 x i8] c"________________________________________\00"
@str.15 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @main.nombre, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 20, i32 67)
%3 = tail call i32 @putchar(i32 10)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 20, i32 350, i32 4995)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.14, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), double 3.450000e+01, double 1.234000e+03, double 0x3FF3F7CEE0000000)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0), double 1.268500e+03, double 0x406ED999A0000000, double 0x4003F7CEE0000000)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.15, i64 0, i64 0))
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0), double 0x4098BC5A20000000)
ret i32 0
}