#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 dia, mes, ano, bo;
  bo = 1;
  printf("dia\n");
  scanf("%d", &dia);
  printf("mes\n");
  scanf("%d", &mes);
  printf("ano\n");
  scanf("%d", &ano);
  if (dia < 0 || dia > 31 || mes < 0 || mes > 12 || ano < 0) {
    bo = 0;
  } else {
    if ((mes == 1 || mes == 3 || mes == 5 || mes == 7 || mes == 8 ||
         mes == 10 || mes == 12) &&
        (dia > 31)) {
      bo = 0;
    } else {
      if ((mes == 4 || mes == 6 || mes == 9 || mes == 11) && (dia > 30)) {
        bo = 0;
      } else {
        if (mes == 2) {
          if (ano == 2000 && dia > 29) {
            bo = 0;
          } else {
            if (ano % 4 == 0 && ano % 100 != 0 && dia > 29) {
              bo = 0;
            }
          }
        }
      }
    }
    if (bo == 0) {
      printf("False");
    } else {
      printf("True");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x14(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
lea    0xebc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
lea    0xea0(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
lea    0xe84(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jl     11bc <main+0x9c>
cmpl   $0x1f,-0x8(%rbp)
jg     11bc <main+0x9c>
cmpl   $0x0,-0xc(%rbp)
jl     11bc <main+0x9c>
cmpl   $0xc,-0xc(%rbp)
jg     11bc <main+0x9c>
cmpl   $0x0,-0x10(%rbp)
jge    11c8 <main+0xa8>
movl   $0x0,-0x14(%rbp)
jmp    1308 <main+0x1e8>
cmpl   $0x1,-0xc(%rbp)
je     120e <main+0xee>
cmpl   $0x3,-0xc(%rbp)
je     120e <main+0xee>
cmpl   $0x5,-0xc(%rbp)
je     120e <main+0xee>
cmpl   $0x7,-0xc(%rbp)
je     120e <main+0xee>
cmpl   $0x8,-0xc(%rbp)
je     120e <main+0xee>
cmpl   $0xa,-0xc(%rbp)
je     120e <main+0xee>
cmpl   $0xc,-0xc(%rbp)
jne    1224 <main+0x104>
cmpl   $0x1f,-0x8(%rbp)
jle    1224 <main+0x104>
movl   $0x0,-0x14(%rbp)
jmp    12dc <main+0x1bc>
cmpl   $0x4,-0xc(%rbp)
je     124c <main+0x12c>
cmpl   $0x6,-0xc(%rbp)
je     124c <main+0x12c>
cmpl   $0x9,-0xc(%rbp)
je     124c <main+0x12c>
cmpl   $0xb,-0xc(%rbp)
jne    1262 <main+0x142>
cmpl   $0x1e,-0x8(%rbp)
jle    1262 <main+0x142>
movl   $0x0,-0x14(%rbp)
jmp    12d7 <main+0x1b7>
cmpl   $0x2,-0xc(%rbp)
jne    12d2 <main+0x1b2>
cmpl   $0x7d0,-0x10(%rbp)
jne    128f <main+0x16f>
cmpl   $0x1d,-0x8(%rbp)
jle    128f <main+0x16f>
movl   $0x0,-0x14(%rbp)
jmp    12cd <main+0x1ad>
mov    -0x10(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    12c8 <main+0x1a8>
mov    -0x10(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     12c8 <main+0x1a8>
cmpl   $0x1d,-0x8(%rbp)
jle    12c8 <main+0x1a8>
movl   $0x0,-0x14(%rbp)
jmp    12cd <main+0x1ad>
jmp    12d2 <main+0x1b2>
jmp    12d7 <main+0x1b7>
jmp    12dc <main+0x1bc>
cmpl   $0x0,-0x14(%rbp)
jne    12f7 <main+0x1d7>
lea    0xd25(%rip),%rdi
call   1030 <printf@plt>
jmp    1303 <main+0x1e3>
lea    0xd1a(%rip),%rdi
call   1030 <printf@plt>
jmp    1308 <main+0x1e8>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xeb6(%rip),%rdi
call   1030 <puts@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xea1(%rip),%rdi
call   1030 <puts@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x1f,%eax
ja     11ed <main+0xbd>
mov    0x8(%rsp),%edx
test   %edx,%edx
js     11ed <main+0xbd>
cmp    $0xc,%edx
jg     11ed <main+0xbd>
mov    0x4(%rsp),%r8d
test   %r8d,%r8d
js     11ed <main+0xbd>
mov    %edx,%esi
and    $0xfffffffd,%esi
cmp    $0x4,%esi
setne  %bl
cmp    $0x9,%esi
setne  %cl
lea    0xe44(%rip),%rdi
test   %bl,%cl
jne    11c8 <main+0x98>
cmp    $0x1e,%eax
ja     11e8 <main+0xb8>
cmp    $0x2,%edx
jne    11e1 <main+0xb1>
cmp    $0x7d0,%r8d
jne    11db <main+0xab>
cmp    $0x1d,%eax
ja     11e8 <main+0xb8>
test   $0x3,%r8b
je     11f5 <main+0xc5>
lea    0xe21(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret
imul   $0xc28f5c29,%r8d,%ecx
ror    $0x2,%ecx
cmp    $0x28f5c29,%ecx
jb     11e1 <main+0xb1>
cmp    $0x1d,%eax
ja     11e8 <main+0xb8>
jmp    11e1 <main+0xb1>

LLVM IR (-O0):
@.str = [5 x i8] c"dia\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [5 x i8] c"mes\0A\00"
@.str.3 = [5 x i8] c"ano\0A\00"
@.str.4 = [6 x i8] c"False\00"
@.str.5 = [5 x i8] c"True\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %5
%6 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%8 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%10 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%12 = load i32, i32* %2
%13 = icmp slt i32 %12, 0
br i1 %13, label %26, label %14
14: ; preds = %0
%15 = load i32, i32* %2
%16 = icmp sgt i32 %15, 31
br i1 %16, label %26, label %17
17: ; preds = %14
%18 = load i32, i32* %3
%19 = icmp slt i32 %18, 0
br i1 %19, label %26, label %20
20: ; preds = %17
%21 = load i32, i32* %3
%22 = icmp sgt i32 %21, 12
br i1 %22, label %26, label %23
23: ; preds = %20
%24 = load i32, i32* %4
%25 = icmp slt i32 %24, 0
br i1 %25, label %26, label %27
26: ; preds = %23, %20, %17, %14, %0
store i32 0, i32* %5
br label %102
27: ; preds = %23
%28 = load i32, i32* %3
%29 = icmp eq i32 %28, 1
br i1 %29, label %48, label %30
30: ; preds = %27
%31 = load i32, i32* %3
%32 = icmp eq i32 %31, 3
br i1 %32, label %48, label %33
33: ; preds = %30
%34 = load i32, i32* %3
%35 = icmp eq i32 %34, 5
br i1 %35, label %48, label %36
36: ; preds = %33
%37 = load i32, i32* %3
%38 = icmp eq i32 %37, 7
br i1 %38, label %48, label %39
39: ; preds = %36
%40 = load i32, i32* %3
%41 = icmp eq i32 %40, 8
br i1 %41, label %48, label %42
42: ; preds = %39
%43 = load i32, i32* %3
%44 = icmp eq i32 %43, 10
br i1 %44, label %48, label %45
45: ; preds = %42
%46 = load i32, i32* %3
%47 = icmp eq i32 %46, 12
br i1 %47, label %48, label %52
48: ; preds = %45, %42, %39, %36, %33, %30, %27
%49 = load i32, i32* %2
%50 = icmp sgt i32 %49, 31
br i1 %50, label %51, label %52
51: ; preds = %48
store i32 0, i32* %5
br label %94
52: ; preds = %48, %45
%53 = load i32, i32* %3
%54 = icmp eq i32 %53, 4
br i1 %54, label %64, label %55
55: ; preds = %52
%56 = load i32, i32* %3
%57 = icmp eq i32 %56, 6
br i1 %57, label %64, label %58
58: ; preds = %55
%59 = load i32, i32* %3
%60 = icmp eq i32 %59, 9
br i1 %60, label %64, label %61
61: ; preds = %58
%62 = load i32, i32* %3
%63 = icmp eq i32 %62, 11
br i1 %63, label %64, label %68
64: ; preds = %61, %58, %55, %52
%65 = load i32, i32* %2
%66 = icmp sgt i32 %65, 30
br i1 %66, label %67, label %68
67: ; preds = %64
store i32 0, i32* %5
br label %93
68: ; preds = %64, %61
%69 = load i32, i32* %3
%70 = icmp eq i32 %69, 2
br i1 %70, label %71, label %92
71: ; preds = %68
%72 = load i32, i32* %4
%73 = icmp eq i32 %72, 2000
br i1 %73, label %74, label %78
74: ; preds = %71
%75 = load i32, i32* %2
%76 = icmp sgt i32 %75, 29
br i1 %76, label %77, label %78
77: ; preds = %74
store i32 0, i32* %5
br label %91
78: ; preds = %74, %71
%79 = load i32, i32* %4
%80 = srem i32 %79, 4
%81 = icmp eq i32 %80, 0
br i1 %81, label %82, label %90
82: ; preds = %78
%83 = load i32, i32* %4
%84 = srem i32 %83, 100
%85 = icmp ne i32 %84, 0
br i1 %85, label %86, label %90
86: ; preds = %82
%87 = load i32, i32* %2
%88 = icmp sgt i32 %87, 29
br i1 %88, label %89, label %90
89: ; preds = %86
store i32 0, i32* %5
br label %90
90: ; preds = %89, %86, %82, %78
br label %91
91: ; preds = %90, %77
br label %92
92: ; preds = %91, %68
br label %93
93: ; preds = %92, %67
br label %94
94: ; preds = %93, %51
%95 = load i32, i32* %5
%96 = icmp eq i32 %95, 0
br i1 %96, label %97, label %99
97: ; preds = %94
%98 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %101
99: ; preds = %94
%100 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %101
101: ; preds = %99, %97
br label %102
102: ; preds = %101, %26
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.4 = [6 x i8] c"False\00"
@.str.5 = [5 x i8] c"True\00"
@str = [4 x i8] c"dia\00"
@str.6 = [4 x i8] c"mes\00"
@str.7 = [4 x i8] c"ano\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.6, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.7, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%13 = load i32, i32* %1
%14 = icmp ugt i32 %13, 31
%15 = load i32, i32* %2
%16 = icmp slt i32 %15, 0
%17 = select i1 %14, i1 true, i1 %16
%18 = icmp sgt i32 %15, 12
%19 = select i1 %17, i1 true, i1 %18
%20 = load i32, i32* %3
%21 = icmp slt i32 %20, 0
%22 = select i1 %19, i1 true, i1 %21
br i1 %22, label %47, label %23
23: ; preds = %0
%24 = and i32 %15, -3
%25 = icmp eq i32 %24, 4
%26 = icmp eq i32 %24, 9
%27 = or i1 %26, %25
%28 = icmp ugt i32 %13, 30
%29 = select i1 %27, i1 %28, i1 false
br i1 %29, label %44, label %30
30: ; preds = %23
%31 = icmp eq i32 %15, 2
br i1 %31, label %32, label %43
32: ; preds = %30
%33 = icmp eq i32 %20, 2000
%34 = icmp ugt i32 %13, 29
%35 = select i1 %33, i1 %34, i1 false
br i1 %35, label %44, label %36
36: ; preds = %32
%37 = and i32 %20, 3
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %43
39: ; preds = %36
%40 = urem i32 %20, 100
%41 = icmp ne i32 %40, 0
%42 = select i1 %41, i1 %34, i1 false
br i1 %42, label %44, label %43
43: ; preds = %30, %36, %39
br label %44
44: ; preds = %39, %23, %32, %43
%45 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), %43 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), %32 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), %23 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), %39 ]
%46 = call i32 @printf(i8* dereferenceable(1) %45)
br label %47
47: ; preds = %44, %0
ret i32 0
}