#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 *, int *);
int main() {
  int x;
  printf("Digite o número do mês: ");
  scanf("%d", &x);
  if (x = 1) {
    printf("Este mês é janeiro");
  } else if (x = 2) {
    printf("Este mês é fevereiro");
  } else if (x = 3) {
    printf("Este mês é março");
  } else if (x = 4) {
    printf("Este mês é abril");
  } else if (x = 5)
    printf("Este mês é maio");
  else if (x = 6)
    printf("Este mês é junho");
  else if (x = 7)
    printf("Este mês é julho");
  else if (x = 8)
    printf("Este mês é agosto");
  else if (x = 9)
    printf("Este mês é setembro");
  else if (x = 10)
    printf("Este mês é outubro");
  else if (x = 11)
    printf("Este mês é novembro");
  else if (x = 12)
    printf("Este mês é dezembro");
  else {
    while (x > 12 || x < 1)
      printf("Digite o número do mês: ");
    scanf("%d", &x);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x1,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1161 <main+0x41>
jmp    1172 <main+0x52>
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
jmp    13a5 <main+0x285>
movl   $0x2,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1188 <main+0x68>
jmp    1199 <main+0x79>
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
jmp    13a0 <main+0x280>
movl   $0x3,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    11af <main+0x8f>
jmp    11c0 <main+0xa0>
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
jmp    139b <main+0x27b>
movl   $0x4,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    11d6 <main+0xb6>
jmp    11e7 <main+0xc7>
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
jmp    1396 <main+0x276>
movl   $0x5,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    11fd <main+0xdd>
jmp    120e <main+0xee>
lea    0xe6d(%rip),%rdi
call   1030 <printf@plt>
jmp    1391 <main+0x271>
movl   $0x6,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1224 <main+0x104>
jmp    1235 <main+0x115>
lea    0xe58(%rip),%rdi
call   1030 <printf@plt>
jmp    138c <main+0x26c>
movl   $0x7,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    124b <main+0x12b>
jmp    125c <main+0x13c>
lea    0xe44(%rip),%rdi
call   1030 <printf@plt>
jmp    1387 <main+0x267>
movl   $0x8,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1272 <main+0x152>
jmp    1283 <main+0x163>
lea    0xe30(%rip),%rdi
call   1030 <printf@plt>
jmp    1382 <main+0x262>
movl   $0x9,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1299 <main+0x179>
jmp    12aa <main+0x18a>
lea    0xe1d(%rip),%rdi
call   1030 <printf@plt>
jmp    137d <main+0x25d>
movl   $0xa,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    12c0 <main+0x1a0>
jmp    12d1 <main+0x1b1>
lea    0xe0c(%rip),%rdi
call   1030 <printf@plt>
jmp    1378 <main+0x258>
movl   $0xb,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    12e7 <main+0x1c7>
jmp    12f8 <main+0x1d8>
lea    0xdfa(%rip),%rdi
call   1030 <printf@plt>
jmp    1373 <main+0x253>
movl   $0xc,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    130e <main+0x1ee>
jmp    131f <main+0x1ff>
lea    0xde9(%rip),%rdi
call   1030 <printf@plt>
jmp    136e <main+0x24e>
jmp    1324 <main+0x204>
mov    $0x1,%al
cmpl   $0xc,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jg     133d <main+0x21d>
cmpl   $0x1,-0x8(%rbp)
setl   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    134d <main+0x22d>
jmp    135e <main+0x23e>
lea    0xcac(%rip),%rdi
call   1030 <printf@plt>
jmp    1324 <main+0x204>
lea    0xcb6(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
jmp    1373 <main+0x253>
jmp    1378 <main+0x258>
jmp    137d <main+0x25d>
jmp    1382 <main+0x262>
jmp    1387 <main+0x267>
jmp    138c <main+0x26c>
jmp    1391 <main+0x271>
jmp    1396 <main+0x276>
jmp    139b <main+0x27b>
jmp    13a0 <main+0x280>
jmp    13a5 <main+0x285>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movl   $0x1,0x4(%rsp)
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Digite o n\C3\BAmero do m\C3\AAs: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [21 x i8] c"Este m\C3\AAs \C3\A9 janeiro\00"
@.str.3 = [23 x i8] c"Este m\C3\AAs \C3\A9 fevereiro\00"
@.str.4 = [20 x i8] c"Este m\C3\AAs \C3\A9 mar\C3\A7o\00"
@.str.5 = [19 x i8] c"Este m\C3\AAs \C3\A9 abril\00"
@.str.6 = [18 x i8] c"Este m\C3\AAs \C3\A9 maio\00"
@.str.7 = [19 x i8] c"Este m\C3\AAs \C3\A9 junho\00"
@.str.8 = [19 x i8] c"Este m\C3\AAs \C3\A9 julho\00"
@.str.9 = [20 x i8] c"Este m\C3\AAs \C3\A9 agosto\00"
@.str.10 = [22 x i8] c"Este m\C3\AAs \C3\A9 setembro\00"
@.str.11 = [21 x i8] c"Este m\C3\AAs \C3\A9 outubro\00"
@.str.12 = [22 x i8] c"Este m\C3\AAs \C3\A9 novembro\00"
@.str.13 = [22 x i8] c"Este m\C3\AAs \C3\A9 dezembro\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
store i32 1, i32* %2
br i1 true, label %5, label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %64
7: ; preds = %0
store i32 2, i32* %2
br i1 true, label %8, label %10
8: ; preds = %7
%9 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
br label %63
10: ; preds = %7
store i32 3, i32* %2
br i1 true, label %11, label %13
11: ; preds = %10
%12 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
br label %62
13: ; preds = %10
store i32 4, i32* %2
br i1 true, label %14, label %16
14: ; preds = %13
%15 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
br label %61
16: ; preds = %13
store i32 5, i32* %2
br i1 true, label %17, label %19
17: ; preds = %16
%18 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
br label %60
19: ; preds = %16
store i32 6, i32* %2
br i1 true, label %20, label %22
20: ; preds = %19
%21 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0))
br label %59
22: ; preds = %19
store i32 7, i32* %2
br i1 true, label %23, label %25
23: ; preds = %22
%24 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
br label %58
25: ; preds = %22
store i32 8, i32* %2
br i1 true, label %26, label %28
26: ; preds = %25
%27 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
br label %57
28: ; preds = %25
store i32 9, i32* %2
br i1 true, label %29, label %31
29: ; preds = %28
%30 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0))
br label %56
31: ; preds = %28
store i32 10, i32* %2
br i1 true, label %32, label %34
32: ; preds = %31
%33 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0))
br label %55
34: ; preds = %31
store i32 11, i32* %2
br i1 true, label %35, label %37
35: ; preds = %34
%36 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i64 0, i64 0))
br label %54
37: ; preds = %34
store i32 12, i32* %2
br i1 true, label %38, label %40
38: ; preds = %37
%39 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
br label %53
40: ; preds = %37
br label %41
41: ; preds = %49, %40
%42 = load i32, i32* %2
%43 = icmp sgt i32 %42, 12
br i1 %43, label %47, label %44
44: ; preds = %41
%45 = load i32, i32* %2
%46 = icmp slt i32 %45, 1
br label %47
47: ; preds = %44, %41
%48 = phi i1 [ true, %41 ], [ %46, %44 ]
br i1 %48, label %49, label %51
49: ; preds = %47
%50 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %41
51: ; preds = %47
%52 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
br label %53
53: ; preds = %51, %38
br label %54
54: ; preds = %53, %35
br label %55
55: ; preds = %54, %32
br label %56
56: ; preds = %55, %29
br label %57
57: ; preds = %56, %26
br label %58
58: ; preds = %57, %23
br label %59
59: ; preds = %58, %20
br label %60
60: ; preds = %59, %17
br label %61
61: ; preds = %60, %14
br label %62
62: ; preds = %61, %11
br label %63
63: ; preds = %62, %8
br label %64
64: ; preds = %63, %5
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Digite o n\C3\BAmero do m\C3\AAs: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [21 x i8] c"Este m\C3\AAs \C3\A9 janeiro\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
store i32 1, i32* %1
%5 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}