#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*/ mysqrt(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i = 12;
  int normtest[] = {10, 30, 80};
  int normalized[3];
  int crosstest[] = {0, 0, 6};
  int crossed[3];
  int j;
  for (j = 0; j < 20; j++) {
    printf("sqrt(%d) = ", j);
    mysqrt(j);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xc,-0x8(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x14(%rbp)
mov    0xec1(%rip),%eax
mov    %eax,-0xc(%rbp)
mov    0xebb(%rip),%rax
mov    %rax,-0x2c(%rbp)
mov    0xeb9(%rip),%eax
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0x14,-0x3c(%rbp)
jge    1194 <main+0x74>
mov    -0x3c(%rbp),%esi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x3c(%rbp),%edi
call   1040 <mysqrt@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1165 <main+0x45>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <mysqrt@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <mysqrt@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <mysqrt@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    $0x3,%edi
call   1040 <mysqrt@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    $0x4,%edi
call   1040 <mysqrt@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    $0x5,%edi
call   1040 <mysqrt@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
mov    $0x6,%edi
call   1040 <mysqrt@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
mov    $0x7,%edi
call   1040 <mysqrt@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
mov    $0x8,%edi
call   1040 <mysqrt@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
call   1030 <printf@plt>
mov    $0x9,%edi
call   1040 <mysqrt@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
mov    $0xa,%edi
call   1040 <mysqrt@plt>
mov    %rbx,%rdi
mov    $0xb,%esi
call   1030 <printf@plt>
mov    $0xb,%edi
call   1040 <mysqrt@plt>
mov    %rbx,%rdi
mov    $0xc,%esi
call   1030 <printf@plt>
mov    $0xc,%edi
call   1040 <mysqrt@plt>
mov    %rbx,%rdi
mov    $0xd,%esi
call   1030 <printf@plt>
mov    $0xd,%edi
call   1040 <mysqrt@plt>
mov    %rbx,%rdi
mov    $0xe,%esi
call   1030 <printf@plt>
mov    $0xe,%edi
call   1040 <mysqrt@plt>
mov    %rbx,%rdi
mov    $0xf,%esi
call   1030 <printf@plt>
mov    $0xf,%edi
call   1040 <mysqrt@plt>
mov    %rbx,%rdi
mov    $0x10,%esi
call   1030 <printf@plt>
mov    $0x10,%edi
call   1040 <mysqrt@plt>
mov    %rbx,%rdi
mov    $0x11,%esi
call   1030 <printf@plt>
mov    $0x11,%edi
call   1040 <mysqrt@plt>
mov    %rbx,%rdi
mov    $0x12,%esi
call   1030 <printf@plt>
mov    $0x12,%edi
call   1040 <mysqrt@plt>
mov    %rbx,%rdi
mov    $0x13,%esi
call   1030 <printf@plt>
mov    $0x13,%edi
call   1040 <mysqrt@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.normtest = [3 x i32] [i32 10, i32 30, i32 80]
@__const.main.crosstest = [3 x i32] [i32 0, i32 0, i32 6]
@.str = [12 x i8] c"sqrt(%d) = \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [3 x i32]
%4 = alloca [3 x i32]
%5 = alloca [3 x i32]
%6 = alloca [3 x i32]
%7 = alloca i32
store i32 0, i32* %1
store i32 12, i32* %2
%8 = bitcast [3 x i32]* %3 to i8*
%9 = bitcast [3 x i32]* %5 to i8*
store i32 0, i32* %7
br label %10
10: ; preds = %18, %0
%11 = load i32, i32* %7
%12 = icmp slt i32 %11, 20
br i1 %12, label %13, label %21
13: ; preds = %10
%14 = load i32, i32* %7
%15 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %7
%17 = call i32 @mysqrt(i32 %16)
br label %18
18: ; preds = %13
%19 = load i32, i32* %7
%20 = add nsw i32 %19, 1
store i32 %20, i32* %7
br label %10
21: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"sqrt(%d) = \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @mysqrt(i32 0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = tail call i32 @mysqrt(i32 1)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 2)
%6 = tail call i32 @mysqrt(i32 2)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 3)
%8 = tail call i32 @mysqrt(i32 3)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 4)
%10 = tail call i32 @mysqrt(i32 4)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 5)
%12 = tail call i32 @mysqrt(i32 5)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 6)
%14 = tail call i32 @mysqrt(i32 6)
%15 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 7)
%16 = tail call i32 @mysqrt(i32 7)
%17 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 8)
%18 = tail call i32 @mysqrt(i32 8)
%19 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 9)
%20 = tail call i32 @mysqrt(i32 9)
%21 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 10)
%22 = tail call i32 @mysqrt(i32 10)
%23 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 11)
%24 = tail call i32 @mysqrt(i32 11)
%25 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 12)
%26 = tail call i32 @mysqrt(i32 12)
%27 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 13)
%28 = tail call i32 @mysqrt(i32 13)
%29 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 14)
%30 = tail call i32 @mysqrt(i32 14)
%31 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 15)
%32 = tail call i32 @mysqrt(i32 15)
%33 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 16)
%34 = tail call i32 @mysqrt(i32 16)
%35 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 17)
%36 = tail call i32 @mysqrt(i32 17)
%37 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 18)
%38 = tail call i32 @mysqrt(i32 18)
%39 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 19)
%40 = tail call i32 @mysqrt(i32 19)
ret i32 0
}