#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 */
double floor(double);
int /*<<< orphan*/ printf(char *, int);
double sqrt(int);
int main() {
  int a, b, n;
  double m;
  for (a = 1; a <= 9; a++)
    for (b = 0; b <= 9; b++) {
      n = a * 1100 + b * 11;
      m = sqrt(n);
      if (floor(m + 0.5) == m)
        printf("%d\n", n);
    }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
jg     11d6 <main+0xa6>
movl   $0x0,-0xc(%rbp)
cmpl   $0x9,-0xc(%rbp)
jg     11c3 <main+0x93>
imul   $0x44c,-0x8(%rbp),%eax
imul   $0xb,-0xc(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1040 <sqrt@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  0xe7a(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
call   1050 <floor@plt>
ucomisd -0x18(%rbp),%xmm0
jne    11b0 <main+0x80>
jp     11b0 <main+0x80>
mov    -0x10(%rbp),%esi
lea    0xe5d(%rip),%rdi
call   1030 <printf@plt>
jmp    11b5 <main+0x85>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1157 <main+0x27>
jmp    11c8 <main+0x98>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    $0x4af,%ebx
lea    0xec4(%rip),%r14
jmp    1162 <main+0x32>
cs nopw 0x0(%rax,%rax,1)
add    $0x44c,%ebx
cmp    $0x2b5b,%ebx
je     1356 <main+0x226>
lea    -0x63(%rbx),%ebp
mov    %ebp,%edi
call   1040 <sqrt@plt>
movsd  %xmm0,0x8(%rsp)
addsd  0xe86(%rip),%xmm0
call   1050 <floor@plt>
ucomisd 0x8(%rsp),%xmm0
jne    1193 <main+0x63>
jp     1193 <main+0x63>
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
lea    -0x58(%rbx),%ebp
mov    %ebp,%edi
call   1040 <sqrt@plt>
movsd  %xmm0,0x8(%rsp)
addsd  0xe55(%rip),%xmm0
call   1050 <floor@plt>
ucomisd 0x8(%rsp),%xmm0
jne    11c4 <main+0x94>
jp     11c4 <main+0x94>
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
lea    -0x4d(%rbx),%ebp
mov    %ebp,%edi
call   1040 <sqrt@plt>
movsd  %xmm0,0x8(%rsp)
addsd  0xe24(%rip),%xmm0
call   1050 <floor@plt>
ucomisd 0x8(%rsp),%xmm0
jne    11f5 <main+0xc5>
jp     11f5 <main+0xc5>
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
lea    -0x42(%rbx),%ebp
mov    %ebp,%edi
call   1040 <sqrt@plt>
movsd  %xmm0,0x8(%rsp)
addsd  0xdf3(%rip),%xmm0
call   1050 <floor@plt>
ucomisd 0x8(%rsp),%xmm0
jne    1226 <main+0xf6>
jp     1226 <main+0xf6>
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
lea    -0x37(%rbx),%ebp
mov    %ebp,%edi
call   1040 <sqrt@plt>
movsd  %xmm0,0x8(%rsp)
addsd  0xdc2(%rip),%xmm0
call   1050 <floor@plt>
ucomisd 0x8(%rsp),%xmm0
jne    1257 <main+0x127>
jp     1257 <main+0x127>
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
lea    -0x2c(%rbx),%ebp
mov    %ebp,%edi
call   1040 <sqrt@plt>
movsd  %xmm0,0x8(%rsp)
addsd  0xd91(%rip),%xmm0
call   1050 <floor@plt>
ucomisd 0x8(%rsp),%xmm0
jne    1288 <main+0x158>
jp     1288 <main+0x158>
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
lea    -0x21(%rbx),%ebp
mov    %ebp,%edi
call   1040 <sqrt@plt>
movsd  %xmm0,0x8(%rsp)
addsd  0xd60(%rip),%xmm0
call   1050 <floor@plt>
ucomisd 0x8(%rsp),%xmm0
jne    12b9 <main+0x189>
jp     12b9 <main+0x189>
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
lea    -0x16(%rbx),%ebp
mov    %ebp,%edi
call   1040 <sqrt@plt>
movsd  %xmm0,0x8(%rsp)
addsd  0xd2f(%rip),%xmm0
call   1050 <floor@plt>
ucomisd 0x8(%rsp),%xmm0
jne    12ea <main+0x1ba>
jp     12ea <main+0x1ba>
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
lea    -0xb(%rbx),%ebp
mov    %ebp,%edi
call   1040 <sqrt@plt>
movsd  %xmm0,0x8(%rsp)
addsd  0xcfe(%rip),%xmm0
call   1050 <floor@plt>
ucomisd 0x8(%rsp),%xmm0
jne    131b <main+0x1eb>
jp     131b <main+0x1eb>
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <sqrt@plt>
movsd  %xmm0,0x8(%rsp)
addsd  0xcd0(%rip),%xmm0
call   1050 <floor@plt>
ucomisd 0x8(%rsp),%xmm0
jne    1150 <main+0x20>
jp     1150 <main+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1150 <main+0x20>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %82
%2 = phi i32 [ 1, %0 ], [ %83, %82 ]
%3 = mul nuw nsw i32 %2, 1100
%4 = tail call double @sqrt(i32 %3)
%5 = fadd double %4, 5.000000e-01
%6 = tail call double @llvm.floor.f64(double %5)
%7 = fcmp oeq double %6, %4
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
br label %10
10: ; preds = %1, %8
%11 = add nuw nsw i32 %3, 11
%12 = tail call double @sqrt(i32 %11)
%13 = fadd double %12, 5.000000e-01
%14 = tail call double @llvm.floor.f64(double %13)
%15 = fcmp oeq double %14, %12
br i1 %15, label %16, label %18
16: ; preds = %10
%17 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
br label %18
18: ; preds = %16, %10
%19 = add nuw nsw i32 %3, 22
%20 = tail call double @sqrt(i32 %19)
%21 = fadd double %20, 5.000000e-01
%22 = tail call double @llvm.floor.f64(double %21)
%23 = fcmp oeq double %22, %20
br i1 %23, label %24, label %26
24: ; preds = %18
%25 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %19)
br label %26
26: ; preds = %24, %18
%27 = add nuw nsw i32 %3, 33
%28 = tail call double @sqrt(i32 %27)
%29 = fadd double %28, 5.000000e-01
%30 = tail call double @llvm.floor.f64(double %29)
%31 = fcmp oeq double %30, %28
br i1 %31, label %32, label %34
32: ; preds = %26
%33 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %27)
br label %34
34: ; preds = %32, %26
%35 = add nuw nsw i32 %3, 44
%36 = tail call double @sqrt(i32 %35)
%37 = fadd double %36, 5.000000e-01
%38 = tail call double @llvm.floor.f64(double %37)
%39 = fcmp oeq double %38, %36
br i1 %39, label %40, label %42
40: ; preds = %34
%41 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %35)
br label %42
42: ; preds = %40, %34
%43 = add nuw nsw i32 %3, 55
%44 = tail call double @sqrt(i32 %43)
%45 = fadd double %44, 5.000000e-01
%46 = tail call double @llvm.floor.f64(double %45)
%47 = fcmp oeq double %46, %44
br i1 %47, label %48, label %50
48: ; preds = %42
%49 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %43)
br label %50
50: ; preds = %48, %42
%51 = add nuw nsw i32 %3, 66
%52 = tail call double @sqrt(i32 %51)
%53 = fadd double %52, 5.000000e-01
%54 = tail call double @llvm.floor.f64(double %53)
%55 = fcmp oeq double %54, %52
br i1 %55, label %56, label %58
56: ; preds = %50
%57 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %51)
br label %58
58: ; preds = %56, %50
%59 = add nuw nsw i32 %3, 77
%60 = tail call double @sqrt(i32 %59)
%61 = fadd double %60, 5.000000e-01
%62 = tail call double @llvm.floor.f64(double %61)
%63 = fcmp oeq double %62, %60
br i1 %63, label %64, label %66
64: ; preds = %58
%65 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %59)
br label %66
66: ; preds = %64, %58
%67 = add nuw nsw i32 %3, 88
%68 = tail call double @sqrt(i32 %67)
%69 = fadd double %68, 5.000000e-01
%70 = tail call double @llvm.floor.f64(double %69)
%71 = fcmp oeq double %70, %68
br i1 %71, label %72, label %74
72: ; preds = %66
%73 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %67)
br label %74
74: ; preds = %72, %66
%75 = add nuw nsw i32 %3, 99
%76 = tail call double @sqrt(i32 %75)
%77 = fadd double %76, 5.000000e-01
%78 = tail call double @llvm.floor.f64(double %77)
%79 = fcmp oeq double %78, %76
br i1 %79, label %80, label %82
80: ; preds = %74
%81 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %75)
br label %82
82: ; preds = %80, %74
%83 = add nuw nsw i32 %2, 1
%84 = icmp eq i32 %83, 10
br i1 %84, label %85, label %1
85: ; preds = %82
ret i32 0
}