int main() {
  int mes;
  printf("Numero do mes: ");
  scanf("%d", &mes);
  if (mes < 1 || mes > 12) {
    printf("Erro\n");
    return 0;
  }
  printf("%s", (char *[12]){"Janeiro", "Fevereiro", "Marco", "Abril", "Maio",
                            "Junho", "Julho", "Agosto", "Setembro", "Outubro",
                            "Novembro", "Dezembro"}[mes - 1]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebc(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jl     1173 <main+0x43>
cmpl   $0xc,-0x8(%rbp)
jle    118d <main+0x5d>
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    11bd <main+0x8d>
lea    -0x68(%rbp),%rdi
lea    0x2ea0(%rip),%rsi
mov    $0x60,%edx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x68(%rbp,%rax,8),%rsi
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeca(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
lea    -0xd(%rax),%ecx
cmp    $0xfffffff3,%ecx
ja     116c <main+0x3c>
lea    0xf0a(%rip),%rdi
call   1030 <puts@plt>
jmp    118b <main+0x5b>
add    $0xffffffff,%eax
lea    0xefe(%rip),%rcx
movslq (%rcx,%rax,4),%rsi
add    %rcx,%rsi
lea    0xe8f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Numero do mes: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [6 x i8] c"Erro\0A\00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [8 x i8] c"Janeiro\00"
@.str.5 = [10 x i8] c"Fevereiro\00"
@.str.6 = [6 x i8] c"Marco\00"
@.str.7 = [6 x i8] c"Abril\00"
@.str.8 = [5 x i8] c"Maio\00"
@.str.9 = [6 x i8] c"Junho\00"
@.str.10 = [6 x i8] c"Julho\00"
@.str.11 = [7 x i8] c"Agosto\00"
@.str.12 = [9 x i8] c"Setembro\00"
@.str.13 = [8 x i8] c"Outubro\00"
@.str.14 = [9 x i8] c"Novembro\00"
@.str.15 = [9 x i8] c"Dezembro\00"
@constinit = private global [12 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i32 0, i32 0)]
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [12 x i8*]
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 1
br i1 %7, label %11, label %8
8: ; preds = %0
%9 = load i32, i32* %2
%10 = icmp sgt i32 %9, 12
br i1 %10, label %11, label %13
11: ; preds = %8, %0
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %1
br label %22
13: ; preds = %8
%14 = getelementptr inbounds [12 x i8*], [12 x i8*]* %3, i64 0, i64 0
%15 = bitcast [12 x i8*]* %3 to i8*
%16 = load i32, i32* %2
%17 = sub nsw i32 %16, 1
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [12 x i8*], [12 x i8*]* %3, i64 0, i64 %18
%20 = load i8*, i8** %19
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %20)
br label %22
22: ; preds = %13, %11
%23 = load i32, i32* %1
ret i32 %23
}

LLVM IR (-O2):
@.str = [16 x i8] c"Numero do mes: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [8 x i8] c"Janeiro\00"
@.str.5 = [10 x i8] c"Fevereiro\00"
@.str.6 = [6 x i8] c"Marco\00"
@.str.7 = [6 x i8] c"Abril\00"
@.str.8 = [5 x i8] c"Maio\00"
@.str.9 = [6 x i8] c"Junho\00"
@.str.10 = [6 x i8] c"Julho\00"
@.str.11 = [7 x i8] c"Agosto\00"
@.str.12 = [9 x i8] c"Setembro\00"
@.str.13 = [8 x i8] c"Outubro\00"
@.str.14 = [9 x i8] c"Novembro\00"
@.str.15 = [9 x i8] c"Dezembro\00"
@reltable.main = [12 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.4 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.5 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.6 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.7 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.8 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.9 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.10 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.11 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.12 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.13 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.14 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.15 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32)]
@str = [5 x i8] c"Erro\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = add i32 %5, -13
%7 = icmp ult i32 %6, -12
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
br label %16
10: ; preds = %0
%11 = add nsw i32 %5, -1
%12 = zext i32 %11 to i64
%13 = shl i64 %12, 2
%14 = call i8* @llvm.load.relative.i64(i8* bitcast ([12 x i32]* @reltable.main to i8*), i64 %13)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %14)
br label %16
16: ; preds = %10, %8
ret i32 0
}