#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 % 100 == 0 && y % 400 == 0)
    printf("Leap Year");
  else if (y % 4 == 0 && 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    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1178 <main+0x58>
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1178 <main+0x58>
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
jmp    11c2 <main+0xa2>
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11b1 <main+0x91>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11b1 <main+0x91>
lea    0xe60(%rip),%rdi
call   1030 <printf@plt>
jmp    11bd <main+0x9d>
lea    0xe4b(%rip),%rdi
call   1030 <printf@plt>
jmp    11c2 <main+0xa2>
xor    %eax,%eax
add    $0x10,%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
imul   $0x51eb851f,%rax,%rdx
mov    %rdx,%rcx
sar    $0x25,%rcx
mov    %rdx,%rsi
shr    $0x3f,%rsi
add    %esi,%ecx
imul   $0x64,%ecx,%edi
mov    %eax,%ecx
sub    %edi,%ecx
sar    $0x27,%rdx
add    %esi,%edx
imul   $0x190,%edx,%edx
mov    %eax,%esi
sub    %edx,%esi
or     %ecx,%esi
je     1185 <main+0x65>
test   %ecx,%ecx
lea    0xe91(%rip),%rcx
lea    0xe8e(%rip),%rdi
cmove  %rcx,%rdi
test   $0x3,%al
cmovne %rcx,%rdi
jmp    118c <main+0x6c>
lea    0xe7b(%rip),%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
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, 100
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %0
%8 = load i32, i32* %2
%9 = srem i32 %8, 400
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %26
13: ; preds = %7, %0
%14 = load i32, i32* %2
%15 = srem i32 %14, 4
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %23
17: ; preds = %13
%18 = load i32, i32* %2
%19 = srem i32 %18, 100
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %25
23: ; preds = %17, %13
%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 %26
26: ; preds = %25, %11
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, 100
%6 = srem i32 %4, 400
%7 = or i32 %5, %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %15, label %9
9: ; preds = %0
%10 = icmp eq i32 %5, 0
%11 = and i32 %4, 3
%12 = icmp ne i32 %11, 0
%13 = or i1 %12, %10
%14 = select i1 %13, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0)
br label %15
15: ; preds = %9, %0
%16 = phi i8* [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), %0 ], [ %14, %9 ]
%17 = call i32 @printf(i8* dereferenceable(1) %16)
ret i32 0
}