#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 pow(int, int);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n, i, p;
  scanf("%d", &n);
  if (n > 5 && n < 2000) {
    for (i = 1; i <= n; i++) {
      if (i % 2 == 0) {
        p = pow(i, 2);
        printf("%d^2 = %d\n", i, p);
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x5,-0x8(%rbp)
jle    11c7 <main+0x97>
cmpl   $0x7d0,-0x8(%rbp)
jge    11c7 <main+0x97>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11c2 <main+0x92>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11af <main+0x7f>
mov    -0xc(%rbp),%edi
mov    $0x2,%esi
call   1050 <pow@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe59(%rip),%rdi
call   1030 <printf@plt>
jmp    11b4 <main+0x84>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116d <main+0x3d>
jmp    11c7 <main+0x97>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
lea    -0x7d0(%rax),%ecx
cmp    $0xfffff836,%ecx
jae    1161 <main+0x31>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
xor    %ebx,%ebx
lea    0xe99(%rip),%r14
jmp    1174 <main+0x44>
nopl   0x0(%rax)
cmp    %eax,%ebx
jge    1157 <main+0x27>
add    $0x1,%ebx
test   $0x1,%bl
jne    1170 <main+0x40>
mov    %ebx,%edi
mov    $0x2,%esi
call   1050 <pow@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
jmp    1170 <main+0x40>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [11 x i8] c"%d^2 = %d\0A\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 = add i32 %4, -2000
%6 = icmp ult i32 %5, -1994
br i1 %6, label %20, label %7
7: ; preds = %0, %16
%8 = phi i32 [ %17, %16 ], [ %4, %0 ]
%9 = phi i32 [ %18, %16 ], [ 1, %0 ]
%10 = and i32 %9, 1
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %7
%13 = call i32 @pow(i32 %9, i32 2)
%14 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32 %13)
%15 = load i32, i32* %1
br label %16
16: ; preds = %7, %12
%17 = phi i32 [ %8, %7 ], [ %15, %12 ]
%18 = add nuw nsw i32 %9, 1
%19 = icmp slt i32 %9, %17
br i1 %19, label %7, label %20
20: ; preds = %16, %0
ret i32 0
}