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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%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
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    11ba <main+0x9a>
cmpl   $0x0,-0x10(%rbp)
jne    11a9 <main+0x89>
cmpl   $0x0,-0x14(%rbp)
jne    1198 <main+0x78>
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
jmp    11a4 <main+0x84>
lea    0xe64(%rip),%rdi
call   1030 <printf@plt>
jmp    11b5 <main+0x95>
lea    0xe57(%rip),%rdi
call   1030 <printf@plt>
jmp    11c6 <main+0xa6>
lea    0xe42(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movslq 0x4(%rsp),%rax
test   $0x3,%al
je     1144 <main+0x24>
lea    0xec1(%rip),%rdi
jmp    1192 <main+0x72>
imul   $0xc28f5c29,%eax,%ecx
add    $0x51eb850,%ecx
ror    $0x2,%ecx
cmp    $0x28f5c28,%ecx
jbe    1164 <main+0x44>
lea    0xea5(%rip),%rdi
jmp    1192 <main+0x72>
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x27,%rcx
add    %edx,%ecx
imul   $0x190,%ecx,%ecx
sub    %ecx,%eax
lea    0xe80(%rip),%rax
lea    0xe75(%rip),%rdi
cmove  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
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
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %2
%8 = srem i32 %7, 4
store i32 %8, i32* %3
%9 = load i32, i32* %2
%10 = srem i32 %9, 100
store i32 %10, i32* %4
%11 = load i32, i32* %2
%12 = srem i32 %11, 400
store i32 %12, i32* %5
%13 = load i32, i32* %3
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %29
15: ; preds = %0
%16 = load i32, i32* %4
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %26
18: ; preds = %15
%19 = load i32, i32* %5
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %25
23: ; preds = %18
%24 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %25
25: ; preds = %23, %21
br label %28
26: ; preds = %15
%27 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %28
28: ; preds = %26, %25
br label %31
29: ; preds = %0
%30 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %31
31: ; preds = %29, %28
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 = srem i32 %4, 400
%6 = and i32 %4, 3
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %0
%9 = srem i32 %4, 100
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = icmp eq i32 %5, 0
%13 = select i1 %12, 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)
br label %14
14: ; preds = %0, %8, %11
%15 = phi i8* [ %13, %11 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), %8 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), %0 ]
%16 = call i32 @printf(i8* dereferenceable(1) %15)
ret i32 0
}