#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 control_digit(char *);
int is_correct_input(char *);
int is_correct_length(char *);
int month_no_longer_than_fifty_two(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char egn[12] = {0};
  scanf("%s", egn);
  if (is_correct_input(egn) == 1 || is_correct_length(egn) == 1 ||
      control_digit(egn) == 1 || month_no_longer_than_fifty_two(egn) == 1) {
    printf("0 \n");
  } else {
    printf("1 \n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1050 <memset@plt>
lea    -0x10(%rbp),%rsi
lea    0xe66(%rip),%rdi
call   1070 <scanf@plt>
lea    -0x10(%rbp),%rdi
call   1040 <is_correct_input@plt>
cmp    $0x1,%eax
je     11e7 <main+0x77>
lea    -0x10(%rbp),%rdi
call   1080 <is_correct_length@plt>
cmp    $0x1,%eax
je     11e7 <main+0x77>
lea    -0x10(%rbp),%rdi
call   1090 <control_digit@plt>
cmp    $0x1,%eax
je     11e7 <main+0x77>
lea    -0x10(%rbp),%rdi
call   1060 <month_no_longer_than_fifty_two@plt>
cmp    $0x1,%eax
jne    11f8 <main+0x88>
lea    0xe15(%rip),%rdi
call   1030 <printf@plt>
jmp    1204 <main+0x94>
lea    0xe08(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0x8(%rsp)
movq   $0x0,(%rsp)
lea    0xe84(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
call   1040 <is_correct_input@plt>
lea    0xe70(%rip),%rbx
cmp    $0x1,%eax
je     11d2 <main+0x72>
mov    %rsp,%rdi
call   1070 <is_correct_length@plt>
cmp    $0x1,%eax
je     11d2 <main+0x72>
mov    %rsp,%rdi
call   1080 <control_digit@plt>
cmp    $0x1,%eax
je     11d2 <main+0x72>
mov    %rsp,%rdi
call   1050 <month_no_longer_than_fifty_two@plt>
cmp    $0x1,%eax
lea    0xe3f(%rip),%rax
lea    0xe35(%rip),%rbx
cmove  %rax,%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"0 \0A\00"
@.str.2 = [4 x i8] c"1 \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [12 x i8]
store i32 0, i32* %1
%3 = bitcast [12 x i8]* %2 to i8*
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%7 = call i32 @is_correct_input(i8* %6)
%8 = icmp eq i32 %7, 1
br i1 %8, label %21, label %9
9: ; preds = %0
%10 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%11 = call i32 @is_correct_length(i8* %10)
%12 = icmp eq i32 %11, 1
br i1 %12, label %21, label %13
13: ; preds = %9
%14 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%15 = call i32 @control_digit(i8* %14)
%16 = icmp eq i32 %15, 1
br i1 %16, label %21, label %17
17: ; preds = %13
%18 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%19 = call i32 @month_no_longer_than_fifty_two(i8* %18)
%20 = icmp eq i32 %19, 1
br i1 %20, label %21, label %23
21: ; preds = %17, %13, %9, %0
%22 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %25
23: ; preds = %17
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %25
25: ; preds = %23, %21
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@str = [3 x i8] c"1 \00"
@str.3 = [3 x i8] c"0 \00"
define i32 @main() {
%1 = alloca [12 x i8]
%2 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @is_correct_input(i8* %2)
%5 = icmp eq i32 %4, 1
br i1 %5, label %16, label %6
6: ; preds = %0
%7 = call i32 @is_correct_length(i8* %2)
%8 = icmp eq i32 %7, 1
br i1 %8, label %16, label %9
9: ; preds = %6
%10 = call i32 @control_digit(i8* %2)
%11 = icmp eq i32 %10, 1
br i1 %11, label %16, label %12
12: ; preds = %9
%13 = call i32 @month_no_longer_than_fifty_two(i8* %2)
%14 = icmp eq i32 %13, 1
%15 = select i1 %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0)
br label %16
16: ; preds = %12, %0, %6, %9
%17 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @str.3, i64 0, i64 0), %9 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @str.3, i64 0, i64 0), %6 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @str.3, i64 0, i64 0), %0 ], [ %15, %12 ]
%18 = call i32 @puts(i8* dereferenceable(1) %17)
ret i32 0
}