#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*/ LC_ALL;
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
main() {
  setlocale(LC_ALL, "");
  int mes;
  printf("\n [ ------------------- Qual o mês? ------------------- ] \n");
  printf("\n   Por favor, digite o número do mês desejado: ");
  scanf("%d", &mes);
  if (mes <= 0 || mes >= 13) {
    printf("\n   Erro: mês inválido! \n");
  } else {
    switch (mes) {
    case 1:
      printf("\n   %d - Janeiro \n", mes);
      break;
    case 2:
      printf("\n   %d - Fevereiro \n", mes);
      break;
    case 3:
      printf("\n   %d - Março \n", mes);
      break;
    case 4:
      printf("\n   %d - Abril \n", mes);
      break;
    case 5:
      printf("\n   %d - Maio \n", mes);
      break;
    case 6:
      printf("\n   %d - Junho \n", mes);
      break;
    case 7:
      printf("\n   %d - Julho \n", mes);
      break;
    case 8:
      printf("\n   %d - Agosto \n", mes);
      break;
    case 9:
      printf("\n   %d - Setembro \n", mes);
      break;
    case 10:
      printf("\n   %d - Outubro \n", mes);
      break;
    case 11:
      printf("\n   %d - Novembro \n", mes);
      break;
    case 12:
      printf("\n   %d - Dezembro \n", mes);
      break;
    }
  }
  printf("\n [ --------------------------------------------------- ] \n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
lea    0xf6f(%rip),%rsi
call   1040 <setlocale@plt>
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf04(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf29(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jle    1194 <main+0x64>
cmpl   $0xd,-0x8(%rbp)
jl     11a7 <main+0x77>
lea    0xf08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d8 <main+0x1a8>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0xb,%eax
ja     12d3 <main+0x1a3>
mov    -0x10(%rbp),%rax
lea    0xe39(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%esi
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d3 <main+0x1a3>
mov    -0x8(%rbp),%esi
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d3 <main+0x1a3>
mov    -0x8(%rbp),%esi
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d3 <main+0x1a3>
mov    -0x8(%rbp),%esi
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d3 <main+0x1a3>
mov    -0x8(%rbp),%esi
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d3 <main+0x1a3>
mov    -0x8(%rbp),%esi
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d3 <main+0x1a3>
mov    -0x8(%rbp),%esi
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d3 <main+0x1a3>
mov    -0x8(%rbp),%esi
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d3 <main+0x1a3>
mov    -0x8(%rbp),%esi
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d3 <main+0x1a3>
mov    -0x8(%rbp),%esi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d3 <main+0x1a3>
mov    -0x8(%rbp),%esi
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d3 <main+0x1a3>
mov    -0x8(%rbp),%esi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d8 <main+0x1a8>
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
lea    0xf5f(%rip),%rsi
call   1050 <setlocale@plt>
lea    0xfe7(%rip),%rdi
call   1030 <puts@plt>
lea    0xec7(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeec(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%eax
lea    -0xd(%rax),%ecx
cmp    $0xfffffff3,%ecx
ja     119e <main+0x5e>
lea    0x1027(%rip),%rdi
call   1030 <puts@plt>
jmp    126d <main+0x12d>
add    $0xffffffff,%eax
cmp    $0xb,%eax
ja     126d <main+0x12d>
lea    0xe4f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xea5(%rip),%rdi
mov    $0x1,%esi
jmp    1266 <main+0x126>
lea    0xea7(%rip),%rdi
mov    $0x2,%esi
jmp    1266 <main+0x126>
lea    0xeab(%rip),%rdi
mov    $0x3,%esi
jmp    1266 <main+0x126>
lea    0xeaf(%rip),%rdi
mov    $0x4,%esi
jmp    1266 <main+0x126>
lea    0xeb2(%rip),%rdi
mov    $0x5,%esi
jmp    1266 <main+0x126>
lea    0xeb4(%rip),%rdi
mov    $0x6,%esi
jmp    1266 <main+0x126>
lea    0xeb7(%rip),%rdi
mov    $0x7,%esi
jmp    1266 <main+0x126>
lea    0xeba(%rip),%rdi
mov    $0x8,%esi
jmp    1266 <main+0x126>
lea    0xebe(%rip),%rdi
mov    $0x9,%esi
jmp    1266 <main+0x126>
lea    0xec4(%rip),%rdi
mov    $0xa,%esi
jmp    1266 <main+0x126>
lea    0xec9(%rip),%rdi
mov    $0xb,%esi
jmp    1266 <main+0x126>
lea    0xecf(%rip),%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf0c(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [61 x i8] c"\0A [ ------------------- Qual o m\C3\AAs? ------------------- ] \0A\00"
@.str.2 = [51 x i8] c"\0A Por favor, digite o n\C3\BAmero do m\C3\AAs desejado: \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [28 x i8] c"\0A Erro: m\C3\AAs inv\C3\A1lido! \0A\00"
@.str.5 = [19 x i8] c"\0A %d - Janeiro \0A\00"
@.str.6 = [21 x i8] c"\0A %d - Fevereiro \0A\00"
@.str.7 = [18 x i8] c"\0A %d - Mar\C3\A7o \0A\00"
@.str.8 = [17 x i8] c"\0A %d - Abril \0A\00"
@.str.9 = [16 x i8] c"\0A %d - Maio \0A\00"
@.str.10 = [17 x i8] c"\0A %d - Junho \0A\00"
@.str.11 = [17 x i8] c"\0A %d - Julho \0A\00"
@.str.12 = [18 x i8] c"\0A %d - Agosto \0A\00"
@.str.13 = [20 x i8] c"\0A %d - Setembro \0A\00"
@.str.14 = [19 x i8] c"\0A %d - Outubro \0A\00"
@.str.15 = [20 x i8] c"\0A %d - Novembro \0A\00"
@.str.16 = [20 x i8] c"\0A %d - Dezembro \0A\00"
@.str.17 = [60 x i8] c"\0A [ --------------------------------------------------- ] \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @LC_ALL
%4 = call i32 @setlocale(i32 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%8 = load i32, i32* %2
%9 = icmp sle i32 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %0
%11 = load i32, i32* %2
%12 = icmp sge i32 %11, 13
br i1 %12, label %13, label %15
13: ; preds = %10, %0
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
br label %54
15: ; preds = %10
%16 = load i32, i32* %2
switch i32 %16, label %53 [
i32 1, label %17
i32 2, label %20
i32 3, label %23
i32 4, label %26
i32 5, label %29
i32 6, label %32
i32 7, label %35
i32 8, label %38
i32 9, label %41
i32 10, label %44
i32 11, label %47
i32 12, label %50
]
17: ; preds = %15
%18 = load i32, i32* %2
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %18)
br label %53
20: ; preds = %15
%21 = load i32, i32* %2
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i32 %21)
br label %53
23: ; preds = %15
%24 = load i32, i32* %2
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i32 %24)
br label %53
26: ; preds = %15
%27 = load i32, i32* %2
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i32 %27)
br label %53
29: ; preds = %15
%30 = load i32, i32* %2
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), i32 %30)
br label %53
32: ; preds = %15
%33 = load i32, i32* %2
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), i32 %33)
br label %53
35: ; preds = %15
%36 = load i32, i32* %2
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0), i32 %36)
br label %53
38: ; preds = %15
%39 = load i32, i32* %2
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0), i32 %39)
br label %53
41: ; preds = %15
%42 = load i32, i32* %2
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0), i32 %42)
br label %53
44: ; preds = %15
%45 = load i32, i32* %2
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i32 %45)
br label %53
47: ; preds = %15
%48 = load i32, i32* %2
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.15, i64 0, i64 0), i32 %48)
br label %53
50: ; preds = %15
%51 = load i32, i32* %2
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.16, i64 0, i64 0), i32 %51)
br label %53
53: ; preds = %15, %50, %47, %44, %41, %38, %35, %32, %29, %26, %23, %20, %17
br label %54
54: ; preds = %53, %13
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.17, i64 0, i64 0))
%56 = load i32, i32* %1
ret i32 %56
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.2 = [51 x i8] c"\0A Por favor, digite o n\C3\BAmero do m\C3\AAs desejado: \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.5 = [19 x i8] c"\0A %d - Janeiro \0A\00"
@.str.6 = [21 x i8] c"\0A %d - Fevereiro \0A\00"
@.str.7 = [18 x i8] c"\0A %d - Mar\C3\A7o \0A\00"
@.str.8 = [17 x i8] c"\0A %d - Abril \0A\00"
@.str.9 = [16 x i8] c"\0A %d - Maio \0A\00"
@.str.10 = [17 x i8] c"\0A %d - Junho \0A\00"
@.str.11 = [17 x i8] c"\0A %d - Julho \0A\00"
@.str.12 = [18 x i8] c"\0A %d - Agosto \0A\00"
@.str.13 = [20 x i8] c"\0A %d - Setembro \0A\00"
@.str.14 = [19 x i8] c"\0A %d - Outubro \0A\00"
@.str.15 = [20 x i8] c"\0A %d - Novembro \0A\00"
@.str.16 = [20 x i8] c"\0A %d - Dezembro \0A\00"
@str = [60 x i8] c"\0A [ ------------------- Qual o m\C3\AAs? ------------------- ] \00"
@str.18 = [59 x i8] c"\0A [ --------------------------------------------------- ] \00"
@str.19 = [27 x i8] c"\0A Erro: m\C3\AAs inv\C3\A1lido! \00"
define i32 @main() {
%1 = alloca i32
%2 = load i32, i32* @LC_ALL
%3 = tail call i32 @setlocale(i32 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = bitcast i32* %1 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%8 = load i32, i32* %1
%9 = add i32 %8, -13
%10 = icmp ult i32 %9, -12
br i1 %10, label %11, label %13
11: ; preds = %0
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.19, i64 0, i64 0))
br label %38
13: ; preds = %0
switch i32 %8, label %38 [
i32 1, label %14
i32 2, label %16
i32 3, label %18
i32 4, label %20
i32 5, label %22
i32 6, label %24
i32 7, label %26
i32 8, label %28
i32 9, label %30
i32 10, label %32
i32 11, label %34
i32 12, label %36
]
14: ; preds = %13
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 1)
br label %38
16: ; preds = %13
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i32 2)
br label %38
18: ; preds = %13
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i32 3)
br label %38
20: ; preds = %13
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i32 4)
br label %38
22: ; preds = %13
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), i32 5)
br label %38
24: ; preds = %13
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), i32 6)
br label %38
26: ; preds = %13
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0), i32 7)
br label %38
28: ; preds = %13
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0), i32 8)
br label %38
30: ; preds = %13
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0), i32 9)
br label %38
32: ; preds = %13
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i32 10)
br label %38
34: ; preds = %13
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.15, i64 0, i64 0), i32 11)
br label %38
36: ; preds = %13
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.16, i64 0, i64 0), i32 12)
br label %38
38: ; preds = %14, %16, %18, %20, %22, %24, %26, %28, %30, %32, %34, %36, %13, %11
%39 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.18, i64 0, i64 0))
ret i32 0
}