#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 printHeader(int currentMonth, int currentYear) {
  switch (currentMonth) {
  case 1:
    printf("\n      Janeiro de %d", currentYear);
    break;
  case 2:
    printf("\n     Fevereiro de %d", currentYear);
    break;
  case 3:
    printf("\n       Marco de %d", currentYear);
    break;
  case 4:
    printf("\n       Abril de %d", currentYear);
    break;
  case 5:
    printf("\n        Maio de %d", currentYear);
    break;
  case 6:
    printf("\n       Junho de %d", currentYear);
    break;
  case 7:
    printf("\n       Julho de %d", currentYear);
    break;
  case 8:
    printf("\n       Agosto de %d", currentYear);
    break;
  case 9:
    printf("\n        Setembro de %d", currentYear);
    break;
  case 10:
    printf("\n      Outubro de %d", currentYear);
    break;
  case 11:
    printf("\n      Novembro de %d", currentYear);
    break;
  case 12:
    printf("\n      Dezembro de %d", currentYear);
    break;
  }
  printf("\n\nDOM SEG TER QUA QUI SEX SAB\n");
}


x86 assembly (clang, -O0):
<printHeader>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0xb,%eax
ja     124a <printHeader+0x13a>
mov    -0x18(%rbp),%rax
lea    0xec2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0xc(%rbp),%esi
lea    0xedf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    124a <printHeader+0x13a>
mov    -0xc(%rbp),%esi
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    124a <printHeader+0x13a>
mov    -0xc(%rbp),%esi
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    124a <printHeader+0x13a>
mov    -0xc(%rbp),%esi
lea    0xedc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    124a <printHeader+0x13a>
mov    -0xc(%rbp),%esi
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    124a <printHeader+0x13a>
mov    -0xc(%rbp),%esi
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    124a <printHeader+0x13a>
mov    -0xc(%rbp),%esi
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    124a <printHeader+0x13a>
mov    -0xc(%rbp),%esi
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    124a <printHeader+0x13a>
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    124a <printHeader+0x13a>
mov    -0xc(%rbp),%esi
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    124a <printHeader+0x13a>
mov    -0xc(%rbp),%esi
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    124a <printHeader+0x13a>
mov    -0xc(%rbp),%esi
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printHeader>:
add    $0xffffffff,%edi
cmp    $0xb,%edi
ja     1145 <printHeader+0x25>
push   %rax
movslq %edi,%rax
lea    0xfe9(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x8,%rsp
lea    0xfb1(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"\0A Janeiro de %d\00"
@.str.1 = [22 x i8] c"\0A Fevereiro de %d\00"
@.str.2 = [20 x i8] c"\0A Marco de %d\00"
@.str.3 = [20 x i8] c"\0A Abril de %d\00"
@.str.4 = [20 x i8] c"\0A Maio de %d\00"
@.str.5 = [20 x i8] c"\0A Junho de %d\00"
@.str.6 = [20 x i8] c"\0A Julho de %d\00"
@.str.7 = [21 x i8] c"\0A Agosto de %d\00"
@.str.8 = [24 x i8] c"\0A Setembro de %d\00"
@.str.9 = [21 x i8] c"\0A Outubro de %d\00"
@.str.10 = [22 x i8] c"\0A Novembro de %d\00"
@.str.11 = [22 x i8] c"\0A Dezembro de %d\00"
@.str.12 = [31 x i8] c"\0A\0ADOM SEG TER QUA QUI SEX SAB\0A\00"
define i32 @printHeader(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
switch i32 %6, label %43 [
i32 1, label %7
i32 2, label %10
i32 3, label %13
i32 4, label %16
i32 5, label %19
i32 6, label %22
i32 7, label %25
i32 8, label %28
i32 9, label %31
i32 10, label %34
i32 11, label %37
i32 12, label %40
]
7: ; preds = %2
%8 = load i32, i32* %5
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %43
10: ; preds = %2
%11 = load i32, i32* %5
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %11)
br label %43
13: ; preds = %2
%14 = load i32, i32* %5
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %14)
br label %43
16: ; preds = %2
%17 = load i32, i32* %5
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %17)
br label %43
19: ; preds = %2
%20 = load i32, i32* %5
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i32 %20)
br label %43
22: ; preds = %2
%23 = load i32, i32* %5
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i32 %23)
br label %43
25: ; preds = %2
%26 = load i32, i32* %5
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %26)
br label %43
28: ; preds = %2
%29 = load i32, i32* %5
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i32 %29)
br label %43
31: ; preds = %2
%32 = load i32, i32* %5
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i32 %32)
br label %43
34: ; preds = %2
%35 = load i32, i32* %5
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i32 %35)
br label %43
37: ; preds = %2
%38 = load i32, i32* %5
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), i32 %38)
br label %43
40: ; preds = %2
%41 = load i32, i32* %5
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0), i32 %41)
br label %43
43: ; preds = %2, %40, %37, %34, %31, %28, %25, %22, %19, %16, %13, %10, %7
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.12, i64 0, i64 0))
%45 = load i32, i32* %3
ret i32 %45
}

LLVM IR (-O2):
@.str = [21 x i8] c"\0A Janeiro de %d\00"
@.str.1 = [22 x i8] c"\0A Fevereiro de %d\00"
@.str.2 = [20 x i8] c"\0A Marco de %d\00"
@.str.3 = [20 x i8] c"\0A Abril de %d\00"
@.str.4 = [20 x i8] c"\0A Maio de %d\00"
@.str.5 = [20 x i8] c"\0A Junho de %d\00"
@.str.6 = [20 x i8] c"\0A Julho de %d\00"
@.str.7 = [21 x i8] c"\0A Agosto de %d\00"
@.str.8 = [24 x i8] c"\0A Setembro de %d\00"
@.str.9 = [21 x i8] c"\0A Outubro de %d\00"
@.str.10 = [22 x i8] c"\0A Novembro de %d\00"
@.str.11 = [22 x i8] c"\0A Dezembro de %d\00"
@str = [30 x i8] c"\0A\0ADOM SEG TER QUA QUI SEX SAB\00"
@reltable.printHeader = [12 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str to i64), i64 ptrtoint ([12 x i32]* @reltable.printHeader to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.1 to i64), i64 ptrtoint ([12 x i32]* @reltable.printHeader to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str.2 to i64), i64 ptrtoint ([12 x i32]* @reltable.printHeader to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str.3 to i64), i64 ptrtoint ([12 x i32]* @reltable.printHeader to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str.4 to i64), i64 ptrtoint ([12 x i32]* @reltable.printHeader to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str.5 to i64), i64 ptrtoint ([12 x i32]* @reltable.printHeader to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str.6 to i64), i64 ptrtoint ([12 x i32]* @reltable.printHeader to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.7 to i64), i64 ptrtoint ([12 x i32]* @reltable.printHeader to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([24 x i8]* @.str.8 to i64), i64 ptrtoint ([12 x i32]* @reltable.printHeader to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.9 to i64), i64 ptrtoint ([12 x i32]* @reltable.printHeader to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.10 to i64), i64 ptrtoint ([12 x i32]* @reltable.printHeader to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.11 to i64), i64 ptrtoint ([12 x i32]* @reltable.printHeader to i64)) to i32)]
define i32 @printHeader(i32 %0, i32 %1) {
%3 = add i32 %0, -1
%4 = icmp ult i32 %3, 12
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = sext i32 %3 to i64
%7 = shl i64 %6, 2
%8 = call i8* @llvm.load.relative.i64(i8* bitcast ([12 x i32]* @reltable.printHeader to i8*), i64 %7)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %8, i32 %1)
br label %10
10: ; preds = %2, %5
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i32 undef
}