#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 data(int dia, int mes, int ano) {
  if (dia > 31 || dia < 1) {
    printf("Data invalida");
    return 1;
  }
  if (mes > 12 || mes < 1) {
    printf("Mes invalido");
    return 1;
  }
  if (ano < 0) {
    printf("Ano inválido");
    return 1;
  }
  switch (mes) {
  case 1:
    printf("%d de Janeiro de %d", dia, ano);
    break;
  case 2:
    printf("%d de Fevereiro de %d", dia, ano);
    break;
  case 3:
    printf("%d de Marco de %d", dia, ano);
    break;
  case 4:
    printf("%d de Abril de %d", dia, ano);
    break;
  case 5:
    printf("%d de Maio de %d", dia, ano);
    break;
  case 6:
    printf("%d de Junho de %d", dia, ano);
    break;
  case 7:
    printf("%d de Julho de %d", dia, ano);
    break;
  case 8:
    printf("%d de Agosto de %d", dia, ano);
    break;
  case 9:
    printf("%d de Setembro de %d", dia, ano);
    break;
  case 10:
    printf("%d de Outubro de %d", dia, ano);
    break;
  case 11:
    printf("%d de Novembro de %d", dia, ano);
    break;
  case 12:
    printf("%d de Dezembro de %d", dia, ano);
    break;
  default:
    printf("Numero de mes inserido invalido");
  }
  return 0;
}


x86 assembly (clang, -O0):
<data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x1f,-0x8(%rbp)
jg     1135 <data+0x25>
cmpl   $0x1,-0x8(%rbp)
jge    114f <data+0x3f>
lea    0xef4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    130b <data+0x1fb>
cmpl   $0xc,-0xc(%rbp)
jg     1163 <data+0x53>
cmpl   $0x1,-0xc(%rbp)
jge    117d <data+0x6d>
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    130b <data+0x1fb>
cmpl   $0x0,-0x10(%rbp)
jge    11a1 <data+0x91>
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    130b <data+0x1fb>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0xb,%eax
ja     12f6 <data+0x1e6>
mov    -0x18(%rbp),%rax
lea    0xe3f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe82(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1304 <data+0x1f4>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1304 <data+0x1f4>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1304 <data+0x1f4>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1304 <data+0x1f4>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe6c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1304 <data+0x1f4>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe64(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1304 <data+0x1f4>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe5d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1304 <data+0x1f4>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe56(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1304 <data+0x1f4>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe50(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1304 <data+0x1f4>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1304 <data+0x1f4>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe47(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1304 <data+0x1f4>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe43(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1304 <data+0x1f4>
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<data>:
push   %rbx
mov    %edi,%eax
lea    -0x20(%rax),%ecx
cmp    $0xffffffe0,%ecx
ja     1124 <data+0x14>
lea    0xf0e(%rip),%rdi
jmp    1164 <data+0x54>
lea    -0xd(%rsi),%ecx
cmp    $0xfffffff3,%ecx
ja     1135 <data+0x25>
lea    0xf0b(%rip),%rdi
jmp    1164 <data+0x54>
test   %edx,%edx
js     115d <data+0x4d>
add    $0xffffffff,%esi
cmp    $0xb,%esi
ja     1174 <data+0x64>
lea    0xeb8(%rip),%rcx
movslq (%rcx,%rsi,4),%rsi
add    %rcx,%rsi
jmp    *%rsi
lea    0xf01(%rip),%rdi
jmp    11e7 <data+0xd7>
lea    0xee7(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret
lea    0xfc7(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <printf@plt>
jmp    1170 <data+0x60>
lea    0xee0(%rip),%rdi
jmp    11e7 <data+0xd7>
lea    0xeed(%rip),%rdi
jmp    11e7 <data+0xd7>
lea    0xef6(%rip),%rdi
jmp    11e7 <data+0xd7>
lea    0xeff(%rip),%rdi
jmp    11e7 <data+0xd7>
lea    0xf07(%rip),%rdi
jmp    11e7 <data+0xd7>
lea    0xf10(%rip),%rdi
jmp    11e7 <data+0xd7>
lea    0xf19(%rip),%rdi
jmp    11e7 <data+0xd7>
lea    0xf23(%rip),%rdi
jmp    11e7 <data+0xd7>
lea    0xf2f(%rip),%rdi
jmp    11e7 <data+0xd7>
lea    0xf3a(%rip),%rdi
jmp    11e7 <data+0xd7>
lea    0xf46(%rip),%rdi
xor    %ebx,%ebx
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    1170 <data+0x60>

LLVM IR (-O0):
@.str = [14 x i8] c"Data invalida\00"
@.str.1 = [13 x i8] c"Mes invalido\00"
@.str.2 = [14 x i8] c"Ano inv\C3\A1lido\00"
@.str.3 = [20 x i8] c"%d de Janeiro de %d\00"
@.str.4 = [22 x i8] c"%d de Fevereiro de %d\00"
@.str.5 = [18 x i8] c"%d de Marco de %d\00"
@.str.6 = [18 x i8] c"%d de Abril de %d\00"
@.str.7 = [17 x i8] c"%d de Maio de %d\00"
@.str.8 = [18 x i8] c"%d de Junho de %d\00"
@.str.9 = [18 x i8] c"%d de Julho de %d\00"
@.str.10 = [19 x i8] c"%d de Agosto de %d\00"
@.str.11 = [21 x i8] c"%d de Setembro de %d\00"
@.str.12 = [20 x i8] c"%d de Outubro de %d\00"
@.str.13 = [21 x i8] c"%d de Novembro de %d\00"
@.str.14 = [21 x i8] c"%d de Dezembro de %d\00"
@.str.15 = [32 x i8] c"Numero de mes inserido invalido\00"
define i32 @data(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
%9 = icmp sgt i32 %8, 31
br i1 %9, label %13, label %10
10: ; preds = %3
%11 = load i32, i32* %5
%12 = icmp slt i32 %11, 1
br i1 %12, label %13, label %15
13: ; preds = %10, %3
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %4
br label %81
15: ; preds = %10
%16 = load i32, i32* %6
%17 = icmp sgt i32 %16, 12
br i1 %17, label %21, label %18
18: ; preds = %15
%19 = load i32, i32* %6
%20 = icmp slt i32 %19, 1
br i1 %20, label %21, label %23
21: ; preds = %18, %15
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %4
br label %81
23: ; preds = %18
%24 = load i32, i32* %7
%25 = icmp slt i32 %24, 0
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %4
br label %81
28: ; preds = %23
%29 = load i32, i32* %6
switch i32 %29, label %78 [
i32 1, label %30
i32 2, label %34
i32 3, label %38
i32 4, label %42
i32 5, label %46
i32 6, label %50
i32 7, label %54
i32 8, label %58
i32 9, label %62
i32 10, label %66
i32 11, label %70
i32 12, label %74
]
30: ; preds = %28
%31 = load i32, i32* %5
%32 = load i32, i32* %7
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %31, i32 %32)
br label %80
34: ; preds = %28
%35 = load i32, i32* %5
%36 = load i32, i32* %7
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i32 %35, i32 %36)
br label %80
38: ; preds = %28
%39 = load i32, i32* %5
%40 = load i32, i32* %7
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 %39, i32 %40)
br label %80
42: ; preds = %28
%43 = load i32, i32* %5
%44 = load i32, i32* %7
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i32 %43, i32 %44)
br label %80
46: ; preds = %28
%47 = load i32, i32* %5
%48 = load i32, i32* %7
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i32 %47, i32 %48)
br label %80
50: ; preds = %28
%51 = load i32, i32* %5
%52 = load i32, i32* %7
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %51, i32 %52)
br label %80
54: ; preds = %28
%55 = load i32, i32* %5
%56 = load i32, i32* %7
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), i32 %55, i32 %56)
br label %80
58: ; preds = %28
%59 = load i32, i32* %5
%60 = load i32, i32* %7
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), i32 %59, i32 %60)
br label %80
62: ; preds = %28
%63 = load i32, i32* %5
%64 = load i32, i32* %7
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0), i32 %63, i32 %64)
br label %80
66: ; preds = %28
%67 = load i32, i32* %5
%68 = load i32, i32* %7
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 %67, i32 %68)
br label %80
70: ; preds = %28
%71 = load i32, i32* %5
%72 = load i32, i32* %7
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0), i32 %71, i32 %72)
br label %80
74: ; preds = %28
%75 = load i32, i32* %5
%76 = load i32, i32* %7
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.14, i64 0, i64 0), i32 %75, i32 %76)
br label %80
78: ; preds = %28
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0))
br label %80
80: ; preds = %78, %74, %70, %66, %62, %58, %54, %50, %46, %42, %38, %34, %30
store i32 0, i32* %4
br label %81
81: ; preds = %80, %26, %21, %13
%82 = load i32, i32* %4
ret i32 %82
}

LLVM IR (-O2):
@.str = [14 x i8] c"Data invalida\00"
@.str.1 = [13 x i8] c"Mes invalido\00"
@.str.2 = [14 x i8] c"Ano inv\C3\A1lido\00"
@.str.3 = [20 x i8] c"%d de Janeiro de %d\00"
@.str.4 = [22 x i8] c"%d de Fevereiro de %d\00"
@.str.5 = [18 x i8] c"%d de Marco de %d\00"
@.str.6 = [18 x i8] c"%d de Abril de %d\00"
@.str.7 = [17 x i8] c"%d de Maio de %d\00"
@.str.8 = [18 x i8] c"%d de Junho de %d\00"
@.str.9 = [18 x i8] c"%d de Julho de %d\00"
@.str.10 = [19 x i8] c"%d de Agosto de %d\00"
@.str.11 = [21 x i8] c"%d de Setembro de %d\00"
@.str.12 = [20 x i8] c"%d de Outubro de %d\00"
@.str.13 = [21 x i8] c"%d de Novembro de %d\00"
@.str.14 = [21 x i8] c"%d de Dezembro de %d\00"
@.str.15 = [32 x i8] c"Numero de mes inserido invalido\00"
define i32 @data(i32 %0, i32 %1, i32 %2) {
%4 = add i32 %0, -32
%5 = icmp ult i32 %4, -31
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %44
8: ; preds = %3
%9 = add i32 %1, -13
%10 = icmp ult i32 %9, -12
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %44
13: ; preds = %8
%14 = icmp slt i32 %2, 0
br i1 %14, label %15, label %17
15: ; preds = %13
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %44
17: ; preds = %13
switch i32 %1, label %42 [
i32 1, label %18
i32 2, label %20
i32 3, label %22
i32 4, label %24
i32 5, label %26
i32 6, label %28
i32 7, label %30
i32 8, label %32
i32 9, label %34
i32 10, label %36
i32 11, label %38
i32 12, label %40
]
18: ; preds = %17
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %0, i32 %2)
br label %44
20: ; preds = %17
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i32 %0, i32 %2)
br label %44
22: ; preds = %17
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 %0, i32 %2)
br label %44
24: ; preds = %17
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i32 %0, i32 %2)
br label %44
26: ; preds = %17
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i32 %0, i32 %2)
br label %44
28: ; preds = %17
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %0, i32 %2)
br label %44
30: ; preds = %17
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), i32 %0, i32 %2)
br label %44
32: ; preds = %17
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), i32 %0, i32 %2)
br label %44
34: ; preds = %17
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0), i32 %0, i32 %2)
br label %44
36: ; preds = %17
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 %0, i32 %2)
br label %44
38: ; preds = %17
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0), i32 %0, i32 %2)
br label %44
40: ; preds = %17
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.14, i64 0, i64 0), i32 %0, i32 %2)
br label %44
42: ; preds = %17
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0))
br label %44
44: ; preds = %18, %20, %22, %24, %26, %28, %30, %32, %34, %36, %38, %40, %42, %15, %11, %6
%45 = phi i32 [ 1, %6 ], [ 1, %11 ], [ 1, %15 ], [ 0, %42 ], [ 0, %40 ], [ 0, %38 ], [ 0, %36 ], [ 0, %34 ], [ 0, %32 ], [ 0, %30 ], [ 0, %28 ], [ 0, %26 ], [ 0, %24 ], [ 0, %22 ], [ 0, %20 ], [ 0, %18 ]
ret i32 %45
}