#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 N;
  scanf("%d", &N);
  if (N % 2 != 0)
    printf("Weird\n");
  else if (N <= 5)
    printf("Not Weird\n");
  else if (N <= 20)
    printf("Weird\n");
  else
    printf("Not Weird\n");
  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    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1164 <main+0x44>
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
jmp    11b0 <main+0x90>
cmpl   $0x5,-0x8(%rbp)
jg     117f <main+0x5f>
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
jmp    11ab <main+0x8b>
cmpl   $0x14,-0x8(%rbp)
jg     119a <main+0x7a>
lea    0xe77(%rip),%rdi
call   1030 <printf@plt>
jmp    11a6 <main+0x86>
lea    0xe62(%rip),%rdi
call   1030 <printf@plt>
jmp    11ab <main+0x8b>
jmp    11b0 <main+0x90>
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>
mov    0x4(%rsp),%eax
test   $0x1,%al
jne    1148 <main+0x28>
cmp    $0x6,%eax
jge    1151 <main+0x31>
lea    0xebd(%rip),%rdi
jmp    1166 <main+0x46>
lea    0xeb8(%rip),%rdi
jmp    1166 <main+0x46>
cmp    $0x15,%eax
lea    0xeac(%rip),%rax
lea    0xea1(%rip),%rdi
cmovb  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"Weird\0A\00"
@.str.2 = [11 x i8] c"Not Weird\0A\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, 2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %23
9: ; preds = %0
%10 = load i32, i32* %2
%11 = icmp sle i32 %10, 5
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %22
14: ; preds = %9
%15 = load i32, i32* %2
%16 = icmp sle i32 %15, 20
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %21
19: ; preds = %14
%20 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %21
21: ; preds = %19, %17
br label %22
22: ; preds = %21, %12
br label %23
23: ; preds = %22, %7
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str.4 = [10 x i8] c"Not Weird\00"
@str.5 = [6 x i8] c"Weird\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, 1
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %0
%8 = icmp slt i32 %4, 6
br i1 %8, label %12, label %9
9: ; preds = %7
%10 = icmp ult i32 %4, 21
%11 = select i1 %10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.5, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.4, i64 0, i64 0)
br label %12
12: ; preds = %9, %7, %0
%13 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @str.5, i64 0, i64 0), %0 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @str.4, i64 0, i64 0), %7 ], [ %11, %9 ]
%14 = call i32 @puts(i8* dereferenceable(1) %13)
ret i32 0
}