#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 Y;
  scanf("%d", &Y);
  if (Y % 4 == 0) {
    if (Y % 100 == 0 && Y % 400 == 0)
      printf("Leap Year");
    else
      printf("Not Leap Year");
    if (Y % 100 != 0)
      printf("Leap Year");
  } else
    printf("Not Leap Year");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11bd <main+0x9d>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    118c <main+0x6c>
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    118c <main+0x6c>
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
jmp    1198 <main+0x78>
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11b8 <main+0x98>
lea    0xe54(%rip),%rdi
call   1030 <printf@plt>
jmp    11c9 <main+0xa9>
lea    0xe3f(%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
lea    0xed4(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
test   $0x3,%al
je     1147 <main+0x27>
lea    0xebe(%rip),%rbx
jmp    11a6 <main+0x86>
movslq %eax,%rcx
imul   $0x51eb851f,%rcx,%rcx
mov    %rcx,%rdx
sar    $0x25,%rdx
mov    %rcx,%rsi
shr    $0x3f,%rsi
add    %esi,%edx
imul   $0x64,%edx,%edx
mov    %eax,%edi
sub    %edx,%edi
sar    $0x27,%rcx
add    %esi,%ecx
imul   $0x190,%ecx,%ecx
sub    %ecx,%eax
or     %edi,%eax
lea    0xe88(%rip),%rbx
lea    0xe7d(%rip),%rdi
cmove  %rbx,%rdi
call   1030 <printf@plt>
imul   $0xc28f5c29,0xc(%rsp),%eax
c2
add    $0x51eb850,%eax
ror    $0x2,%eax
cmp    $0x28f5c29,%eax
jb     11ae <main+0x8e>
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [10 x i8] c"Leap Year\00"
@.str.2 = [14 x i8] c"Not Leap Year\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = srem i32 %4, 4
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %26
7: ; preds = %0
%8 = load i32, i32* %2
%9 = srem i32 %8, 100
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i32, i32* %2
%13 = srem i32 %12, 400
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %19
17: ; preds = %11, %7
%18 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %19
19: ; preds = %17, %15
%20 = load i32, i32* %2
%21 = srem i32 %20, 100
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %19
%24 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %25
25: ; preds = %23, %19
br label %28
26: ; preds = %0
%27 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %28
28: ; preds = %26, %25
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [10 x i8] c"Leap Year\00"
@.str.2 = [14 x i8] c"Not Leap Year\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = and i32 %4, 3
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %17
7: ; preds = %0
%8 = srem i32 %4, 100
%9 = srem i32 %4, 400
%10 = or i32 %8, %9
%11 = icmp eq i32 %10, 0
%12 = select i1 %11, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0)
%13 = call i32 @printf(i8* dereferenceable(1) %12)
%14 = load i32, i32* %1
%15 = srem i32 %14, 100
%16 = icmp eq i32 %15, 0
br i1 %16, label %20, label %17
17: ; preds = %0, %7
%18 = phi i8* [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), %7 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), %0 ]
%19 = call i32 @printf(i8* dereferenceable(1) %18)
br label %20
20: ; preds = %17, %7
ret i32 0
}