#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 *, long, long);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  if (n >= 5) {
    long int i;
    for (i = 2; i <= n; i++) {
      if (i % 2 == 0) {
        printf("%ld^2 = %ld\n", i, i * i);
      }
    }
  }
  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>
cmpl   $0x5,-0x8(%rbp)
jl     11ae <main+0x8e>
movq   $0x2,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
cmp    %rcx,%rax
jg     11a9 <main+0x89>
mov    -0x10(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
jne    1193 <main+0x73>
mov    -0x10(%rbp),%rsi
mov    -0x10(%rbp),%rdx
imul   -0x10(%rbp),%rdx
lea    0xe75(%rip),%rdi
call   1030 <printf@plt>
jmp    1198 <main+0x78>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1151 <main+0x31>
jmp    11ae <main+0x8e>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0x5,%eax
jge    1148 <main+0x28>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    $0x1,%ebx
lea    0xeaf(%rip),%r14
jmp    1168 <main+0x48>
cs nopw 0x0(%rax,%rax,1)
movslq %eax,%rcx
cmp    %rcx,%rbx
jge    113e <main+0x1e>
add    $0x1,%rbx
test   $0x1,%bl
jne    1160 <main+0x40>
mov    %rbx,%rdx
imul   %rbx,%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
jmp    1160 <main+0x40>

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

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