#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);
int reverse(int);
int main() {
  int num = 0, first_reverse = 0, second_reverse = 0, first_square = 0,
      second_square = 0;
  for (num = 10; num <= 100; num++) {
    first_square = num * num;
    first_reverse = reverse(num);
    second_square = first_reverse * first_reverse;
    if (reverse(first_square) == second_square && num % 10 != 0) {
      printf("%d \n", num);
    } else
      continue;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0xa,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     11d3 <main+0xb3>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <reverse@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <reverse@plt>
cmp    -0x18(%rbp),%eax
jne    11bb <main+0x9b>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11bb <main+0x9b>
mov    -0x8(%rbp),%esi
lea    0xe4f(%rip),%rdi
call   1040 <printf@plt>
jmp    11c0 <main+0xa0>
jmp    11c5 <main+0xa5>
jmp    11c5 <main+0xa5>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1159 <main+0x39>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0xa,%ebx
lea    0xecd(%rip),%r14
jmp    1148 <main+0x28>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%ebx
cmp    $0x65,%ebx
je     118d <main+0x6d>
mov    %ebx,%r15d
imul   %ebx,%r15d
mov    %ebx,%edi
call   1030 <reverse@plt>
mov    %eax,%ebp
imul   %eax,%ebp
mov    %r15d,%edi
call   1030 <reverse@plt>
cmp    %ebp,%eax
jne    1140 <main+0x20>
movzbl %bl,%eax
imul   $0xcd,%eax,%eax
shr    $0xa,%eax
and    $0xfffffffe,%eax
lea    (%rax,%rax,4),%eax
mov    %ebx,%ecx
sub    %eax,%ecx
test   %cl,%cl
je     1140 <main+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
jmp    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d \0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %14
%2 = phi i32 [ 10, %0 ], [ %15, %14 ]
%3 = mul nuw nsw i32 %2, %2
%4 = tail call i32 @reverse(i32 %2)
%5 = mul nsw i32 %4, %4
%6 = tail call i32 @reverse(i32 %3)
%7 = icmp ne i32 %6, %5
%8 = trunc i32 %2 to i8
%9 = urem i8 %8, 10
%10 = icmp eq i8 %9, 0
%11 = or i1 %7, %10
br i1 %11, label %14, label %12
12: ; preds = %1
%13 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %14
14: ; preds = %1, %12
%15 = add nuw nsw i32 %2, 1
%16 = icmp eq i32 %15, 101
br i1 %16, label %17, label %1
17: ; preds = %14
ret i32 0
}