#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 */
typedef int /*<<< orphan*/ numeroStr;

/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
int main(int argc, char *argv[]) {
  int numero;
  char numeroStr[2];
  printf("Introduzca un numero: ");
  fgets(numeroStr, sizeof(numeroStr), stdin);
  switch (numero) {
  case 0:
    printf("Numero neutro con respecto a la suma\n");
    break;
  case 1:
    printf("Numero neutro con respecto a la multiplicacion\n");
    break;
  case 2:
    printf("Base del sistema binario\n");
    break;
  case 3:
    printf("Lados del triangulo\n");
    break;
  case 4:
    printf("Casas de Hogwarts\n");
    break;
  case 5:
    printf("Puntas de una estrella\n");
    break;
  case 6:
    printf("Primer numero perfecto\n");
    break;
  case 7:
    printf("Numero magico\n");
    break;
  default:
    printf("Solo se imprimen resultados para numeros del 0 al 7\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xee3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edx
lea    -0x16(%rbp),%rdi
mov    $0x2,%esi
call   1040 <fgets@plt>
mov    -0x14(%rbp),%eax
mov    %rax,-0x20(%rbp)
sub    $0x7,%rax
ja     1206 <main+0xe6>
mov    -0x20(%rbp),%rax
lea    0xe8b(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
jmp    1212 <main+0xf2>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
jmp    1212 <main+0xf2>
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
jmp    1212 <main+0xf2>
lea    0xeef(%rip),%rdi
call   1030 <printf@plt>
jmp    1212 <main+0xf2>
lea    0xef3(%rip),%rdi
call   1030 <printf@plt>
jmp    1212 <main+0xf2>
lea    0xef5(%rip),%rdi
call   1030 <printf@plt>
jmp    1212 <main+0xf2>
lea    0xefc(%rip),%rdi
call   1030 <printf@plt>
jmp    1212 <main+0xf2>
lea    0xf03(%rip),%rdi
call   1030 <printf@plt>
jmp    1212 <main+0xf2>
lea    0xf01(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
lea    0x6(%rsp),%rdi
mov    $0x2,%esi
call   1050 <fgets@plt>
lea    0xebb(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Introduzca un numero: \00"
@stdin = global i32 0
@.str.1 = [38 x i8] c"Numero neutro con respecto a la suma\0A\00"
@.str.2 = [48 x i8] c"Numero neutro con respecto a la multiplicacion\0A\00"
@.str.3 = [26 x i8] c"Base del sistema binario\0A\00"
@.str.4 = [21 x i8] c"Lados del triangulo\0A\00"
@.str.5 = [19 x i8] c"Casas de Hogwarts\0A\00"
@.str.6 = [24 x i8] c"Puntas de una estrella\0A\00"
@.str.7 = [24 x i8] c"Primer numero perfecto\0A\00"
@.str.8 = [15 x i8] c"Numero magico\0A\00"
@.str.9 = [53 x i8] c"Solo se imprimen resultados para numeros del 0 al 7\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [2 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%9 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
%10 = load i32, i32* @stdin
%11 = call i32 @fgets(i8* %9, i32 2, i32 %10)
%12 = load i32, i32* %6
switch i32 %12, label %29 [
i32 0, label %13
i32 1, label %15
i32 2, label %17
i32 3, label %19
i32 4, label %21
i32 5, label %23
i32 6, label %25
i32 7, label %27
]
13: ; preds = %2
%14 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
br label %31
15: ; preds = %2
%16 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
br label %31
17: ; preds = %2
%18 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
br label %31
19: ; preds = %2
%20 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
br label %31
21: ; preds = %2
%22 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
br label %31
23: ; preds = %2
%24 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
br label %31
25: ; preds = %2
%26 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0))
br label %31
27: ; preds = %2
%28 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0))
br label %31
29: ; preds = %2
%30 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.9, i64 0, i64 0))
br label %31
31: ; preds = %29, %27, %25, %23, %21, %19, %17, %15, %13
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):
@.str = [23 x i8] c"Introduzca un numero: \00"
@stdin = global i32 0
@str = [37 x i8] c"Numero neutro con respecto a la suma\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [2 x i8]
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stdin
%7 = call i32 @fgets(i8* %4, i32 2, i32 %6)
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
ret i32 0
}