#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 /*<<< orphan*/ scanf(char *, ...);
void leer(void) {
  char letra;
  int numero;
  printf("Escribe un número: ");
  scanf(" %d", &numero);
  printf("Escribe una letra: ");
  scanf(" %c", &letra);
  printf("El número es %d y la letra es %c\n", numero, letra);
}


x86 assembly (clang, -O0):
<leer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
lea    -0x1(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
movsbl -0x1(%rbp),%edx
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<leer>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
lea    0x3(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
movsbl 0x3(%rsp),%edx
lea    0xebe(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Escribe un n\C3\BAmero: \00"
@.str.1 = [4 x i8] c" %d\00"
@.str.2 = [20 x i8] c"Escribe una letra: \00"
@.str.3 = [4 x i8] c" %c\00"
@.str.4 = [35 x i8] c"El n\C3\BAmero es %d y la letra es %c\0A\00"
define void @leer() {
%1 = alloca i8
%2 = alloca i32
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %1)
%7 = load i32, i32* %2
%8 = load i8, i8* %1
%9 = sext i8 %8 to i32
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %7, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Escribe un n\C3\BAmero: \00"
@.str.1 = [4 x i8] c" %d\00"
@.str.2 = [20 x i8] c"Escribe una letra: \00"
@.str.3 = [4 x i8] c" %c\00"
@.str.4 = [35 x i8] c"El n\C3\BAmero es %d y la letra es %c\0A\00"
define void @leer() {
%1 = alloca i8
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %1)
%8 = load i32, i32* %2
%9 = load i8, i8* %1
%10 = sext i8 %9 to i32
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %8, i32 %10)
ret void
}