#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 *, ...);
double sqrt(int);
int main() {
  int n;
  printf("NO.\tSQR. ROOT\tSQR.\n");
  for (n = 0; n < 101; n += 10) {
    printf("%d\t%.2f\t\t%d \n", n, sqrt(n), n * n);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x65,-0x8(%rbp)
jge    1182 <main+0x62>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <sqrt@plt>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
imul   -0x8(%rbp),%edx
lea    0xea7(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x8(%rbp)
jmp    1144 <main+0x24>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <sqrt@plt>
lea    0xeb5(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xa,%edi
call   1050 <sqrt@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0x64,%edx
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x14,%edi
call   1050 <sqrt@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
mov    $0x190,%edx
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x1e,%edi
call   1050 <sqrt@plt>
mov    %rbx,%rdi
mov    $0x1e,%esi
mov    $0x384,%edx
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x28,%edi
call   1050 <sqrt@plt>
mov    %rbx,%rdi
mov    $0x28,%esi
mov    $0x640,%edx
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x32,%edi
call   1050 <sqrt@plt>
mov    %rbx,%rdi
mov    $0x32,%esi
mov    $0x9c4,%edx
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x3c,%edi
call   1050 <sqrt@plt>
mov    %rbx,%rdi
mov    $0x3c,%esi
mov    $0xe10,%edx
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x46,%edi
call   1050 <sqrt@plt>
mov    %rbx,%rdi
mov    $0x46,%esi
mov    $0x1324,%edx
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x50,%edi
call   1050 <sqrt@plt>
mov    %rbx,%rdi
mov    $0x50,%esi
mov    $0x1900,%edx
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x5a,%edi
call   1050 <sqrt@plt>
mov    %rbx,%rdi
mov    $0x5a,%esi
mov    $0x1fa4,%edx
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x64,%edi
call   1050 <sqrt@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
mov    $0x2710,%edx
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"NO.\09SQR. ROOT\09SQR.\0A\00"
@.str.1 = [14 x i8] c"%d\09%.2f\09\09%d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %4
4: ; preds = %15, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 101
br i1 %6, label %7, label %18
7: ; preds = %4
%8 = load i32, i32* %2
%9 = load i32, i32* %2
%10 = call double @sqrt(i32 %9)
%11 = load i32, i32* %2
%12 = load i32, i32* %2
%13 = mul nsw i32 %11, %12
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %8, double %10, i32 %13)
br label %15
15: ; preds = %7
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 10
store i32 %17, i32* %2
br label %4
18: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"%d\09%.2f\09\09%d \0A\00"
@str = [19 x i8] c"NO.\09SQR. ROOT\09SQR.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%2 = tail call double @sqrt(i32 0)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 0, double %2, i32 0)
%4 = tail call double @sqrt(i32 10)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 10, double %4, i32 100)
%6 = tail call double @sqrt(i32 20)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 20, double %6, i32 400)
%8 = tail call double @sqrt(i32 30)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 30, double %8, i32 900)
%10 = tail call double @sqrt(i32 40)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 40, double %10, i32 1600)
%12 = tail call double @sqrt(i32 50)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 50, double %12, i32 2500)
%14 = tail call double @sqrt(i32 60)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 60, double %14, i32 3600)
%16 = tail call double @sqrt(i32 70)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 70, double %16, i32 4900)
%18 = tail call double @sqrt(i32 80)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 80, double %18, i32 6400)
%20 = tail call double @sqrt(i32 90)
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 90, double %20, i32 8100)
%22 = tail call double @sqrt(i32 100)
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 100, double %22, i32 10000)
ret i32 0
}