#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 *, ...);
int scanf(char *, int *, ...);
main() {
  int a, r;
  float b;
  char c;
  printf("Introducir un valor entero, un real y un char\n=>");
  r = scanf("%d %f %c", &a, &b, &c);
  printf("\nNúmero de datos leídos: %d\n", r);
  printf("Datos leídos: %d %f %c\n", a, b, c);
  printf("\nValor hexadecimal: ");
  scanf("%i", &a);
  printf("Valor decimal:     %i\n", a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0xd(%rbp),%rcx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsbl -0xd(%rbp),%edx
lea    0xede(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x4(%rbp),%esi
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
lea    0x8(%rsp),%rbx
lea    0xc(%rsp),%rdx
lea    0x7(%rsp),%rcx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xee0(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x8(%rsp),%esi
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsbl 0x7(%rsp),%edx
lea    0xedc(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x8(%rsp),%esi
lea    0xedc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [49 x i8] c"Introducir un valor entero, un real y un char\0A=>\00"
@.str.1 = [9 x i8] c"%d %f %c\00"
@.str.2 = [31 x i8] c"\0AN\C3\BAmero de datos le\C3\ADdos: %d\0A\00"
@.str.3 = [25 x i8] c"Datos le\C3\ADdos: %d %f %c\0A\00"
@.str.4 = [21 x i8] c"\0AValor hexadecimal: \00"
@.str.5 = [3 x i8] c"%i\00"
@.str.6 = [23 x i8] c"Valor decimal: %i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca i8
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %1, float* %3, i8* %4)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %1
%10 = load float, float* %3
%11 = fpext float %10 to double
%12 = load i8, i8* %4
%13 = sext i8 %12 to i32
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 %9, double %11, i32 %13)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
%16 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %1)
%17 = load i32, i32* %1
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [49 x i8] c"Introducir un valor entero, un real y un char\0A=>\00"
@.str.1 = [9 x i8] c"%d %f %c\00"
@.str.2 = [31 x i8] c"\0AN\C3\BAmero de datos le\C3\ADdos: %d\0A\00"
@.str.3 = [25 x i8] c"Datos le\C3\ADdos: %d %f %c\0A\00"
@.str.4 = [21 x i8] c"\0AValor hexadecimal: \00"
@.str.5 = [3 x i8] c"%i\00"
@.str.6 = [23 x i8] c"Valor decimal: %i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i8
%4 = bitcast i32* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %1, float* %2, i8* %3)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %1
%10 = load float, float* %2
%11 = fpext float %10 to double
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 %9, double %11, i32 %13)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
%16 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %1)
%17 = load i32, i32* %1
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %17)
ret i32 0
}