#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 /*<<< orphan*/ scanf(char *, int *);
int main() {
  int square, n, user_number, counter, i;
  for (counter = 1; counter < 5; counter++) {
    printf("How far do you want to go to? \n");
    scanf("%i", &user_number);
    printf("\tYou entered %i \n\n", user_number);
    printf("TABLE OF SQUARES \n\n");
    printf("\t n \t n squared\n");
    printf("\t---\t----------\n");
    for (n = 1; n <= user_number; n++) {
      square = n * n;
      printf("\t %i \t %i \n", n, square);
    }
  }
  printf("\n\n");
  for (i = 0; i < 5; i++) {
    printf("outer i = %i \n", i);
    for (i = 6; i < 9; i++) {
      printf("inner i = %i \n", i);
    }
    printf("\n\n");
    for (i = 0; i < 5; i++) {
      printf("outer i = %i \n", i);
      i += 7;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x5,-0x14(%rbp)
jge    11eb <main+0xcb>
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%esi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     11d8 <main+0xb8>
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11a0 <main+0x80>
jmp    11dd <main+0xbd>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1136 <main+0x16>
lea    0xe55(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0x5,-0x18(%rbp)
jge    12a5 <main+0x185>
mov    -0x18(%rbp),%esi
lea    0xe64(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x6,-0x18(%rbp)
cmpl   $0x9,-0x18(%rbp)
jge    124b <main+0x12b>
mov    -0x18(%rbp),%esi
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1222 <main+0x102>
lea    0xdf5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0x5,-0x18(%rbp)
jge    1292 <main+0x172>
mov    -0x18(%rbp),%esi
lea    0xe04(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x7,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1260 <main+0x140>
jmp    1297 <main+0x177>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1200 <main+0xe0>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xf01(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb5(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%esi
lea    0xea3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef1(%rip),%rdi
call   1030 <puts@plt>
lea    0xef8(%rip),%rdi
call   1030 <puts@plt>
lea    0xefc(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,0xc(%rsp)
jle    11ba <main+0x8a>
lea    0xe7d(%rip),%rbx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebp
mov    %ebp,%edx
imul   %ebp,%edx
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    0xc(%rsp),%ebp
jl     11a0 <main+0x70>
lea    0xe7f(%rip),%rdi
call   1030 <puts@plt>
lea    0xe33(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%esi
lea    0xe21(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe6f(%rip),%rdi
call   1030 <puts@plt>
lea    0xe76(%rip),%rdi
call   1030 <puts@plt>
lea    0xe7a(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,0xc(%rsp)
jle    123a <main+0x10a>
lea    0xdfb(%rip),%rbx
xor    %ebp,%ebp
nopl   (%rax)
add    $0x1,%ebp
mov    %ebp,%edx
imul   %ebp,%edx
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    0xc(%rsp),%ebp
jl     1220 <main+0xf0>
lea    0xdff(%rip),%rdi
call   1030 <puts@plt>
lea    0xdb3(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%esi
lea    0xda1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdef(%rip),%rdi
call   1030 <puts@plt>
lea    0xdf6(%rip),%rdi
call   1030 <puts@plt>
lea    0xdfa(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,0xc(%rsp)
jle    12ba <main+0x18a>
lea    0xd7b(%rip),%rbx
xor    %ebp,%ebp
nopl   (%rax)
add    $0x1,%ebp
mov    %ebp,%edx
imul   %ebp,%edx
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    0xc(%rsp),%ebp
jl     12a0 <main+0x170>
lea    0xd7f(%rip),%rdi
call   1030 <puts@plt>
lea    0xd33(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%esi
lea    0xd21(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd6f(%rip),%rdi
call   1030 <puts@plt>
lea    0xd76(%rip),%rdi
call   1030 <puts@plt>
lea    0xd7a(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,0xc(%rsp)
jle    133a <main+0x20a>
lea    0xcfb(%rip),%rbx
xor    %ebp,%ebp
nopl   (%rax)
add    $0x1,%ebp
mov    %ebp,%edx
imul   %ebp,%edx
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    0xc(%rsp),%ebp
jl     1320 <main+0x1f0>
lea    0xcd3(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xcd2(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xcce(%rip),%rbp
mov    %rbp,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [32 x i8] c"How far do you want to go to? \0A\00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [19 x i8] c"\09You entered %i \0A\0A\00"
@.str.3 = [20 x i8] c"TABLE OF SQUARES \0A\0A\00"
@.str.4 = [17 x i8] c"\09 n \09 n squared\0A\00"
@.str.5 = [17 x i8] c"\09---\09----------\0A\00"
@.str.6 = [12 x i8] c"\09 %i \09 %i \0A\00"
@.str.7 = [3 x i8] c"\0A\0A\00"
@.str.8 = [15 x i8] c"outer i = %i \0A\00"
@.str.9 = [15 x i8] c"inner i = %i \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 1, i32* %5
br label %7
7: ; preds = %33, %0
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 5
br i1 %9, label %10, label %36
10: ; preds = %7
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%13 = load i32, i32* %4
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %13)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
store i32 1, i32* %3
br label %18
18: ; preds = %29, %10
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = icmp sle i32 %19, %20
br i1 %21, label %22, label %32
22: ; preds = %18
%23 = load i32, i32* %3
%24 = load i32, i32* %3
%25 = mul nsw i32 %23, %24
store i32 %25, i32* %2
%26 = load i32, i32* %3
%27 = load i32, i32* %2
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %26, i32 %27)
br label %29
29: ; preds = %22
%30 = load i32, i32* %3
%31 = add nsw i32 %30, 1
store i32 %31, i32* %3
br label %18
32: ; preds = %18
br label %33
33: ; preds = %32
%34 = load i32, i32* %5
%35 = add nsw i32 %34, 1
store i32 %35, i32* %5
br label %7
36: ; preds = %7
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
store i32 0, i32* %6
br label %38
38: ; preds = %67, %36
%39 = load i32, i32* %6
%40 = icmp slt i32 %39, 5
br i1 %40, label %41, label %70
41: ; preds = %38
%42 = load i32, i32* %6
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i32 %42)
store i32 6, i32* %6
br label %44
44: ; preds = %50, %41
%45 = load i32, i32* %6
%46 = icmp slt i32 %45, 9
br i1 %46, label %47, label %53
47: ; preds = %44
%48 = load i32, i32* %6
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i32 %48)
br label %50
50: ; preds = %47
%51 = load i32, i32* %6
%52 = add nsw i32 %51, 1
store i32 %52, i32* %6
br label %44
53: ; preds = %44
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
store i32 0, i32* %6
br label %55
55: ; preds = %63, %53
%56 = load i32, i32* %6
%57 = icmp slt i32 %56, 5
br i1 %57, label %58, label %66
58: ; preds = %55
%59 = load i32, i32* %6
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i32 %59)
%61 = load i32, i32* %6
%62 = add nsw i32 %61, 7
store i32 %62, i32* %6
br label %63
63: ; preds = %58
%64 = load i32, i32* %6
%65 = add nsw i32 %64, 1
store i32 %65, i32* %6
br label %55
66: ; preds = %55
br label %67
67: ; preds = %66
%68 = load i32, i32* %6
%69 = add nsw i32 %68, 1
store i32 %69, i32* %6
br label %38
70: ; preds = %38
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [19 x i8] c"\09You entered %i \0A\0A\00"
@.str.6 = [12 x i8] c"\09 %i \09 %i \0A\00"
@.str.8 = [15 x i8] c"outer i = %i \0A\00"
@.str.9 = [15 x i8] c"inner i = %i \0A\00"
@str.10 = [2 x i8] c"\0A\00"
@str.11 = [31 x i8] c"How far do you want to go to? \00"
@str.12 = [19 x i8] c"TABLE OF SQUARES \0A\00"
@str.13 = [16 x i8] c"\09 n \09 n squared\00"
@str.14 = [16 x i8] c"\09---\09----------\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.11, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.12, i64 0, i64 0))
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.13, i64 0, i64 0))
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.14, i64 0, i64 0))
%10 = load i32, i32* %1
%11 = icmp slt i32 %10, 1
br i1 %11, label %19, label %12
12: ; preds = %0, %12
%13 = phi i32 [ %16, %12 ], [ 1, %0 ]
%14 = mul nsw i32 %13, %13
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %13, i32 %14)
%16 = add nuw nsw i32 %13, 1
%17 = load i32, i32* %1
%18 = icmp slt i32 %13, %17
br i1 %18, label %12, label %19
19: ; preds = %12, %0
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.11, i64 0, i64 0))
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%22 = load i32, i32* %1
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %22)
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.12, i64 0, i64 0))
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.13, i64 0, i64 0))
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.14, i64 0, i64 0))
%27 = load i32, i32* %1
%28 = icmp slt i32 %27, 1
br i1 %28, label %36, label %29
29: ; preds = %19, %29
%30 = phi i32 [ %33, %29 ], [ 1, %19 ]
%31 = mul nsw i32 %30, %30
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %30, i32 %31)
%33 = add nuw nsw i32 %30, 1
%34 = load i32, i32* %1
%35 = icmp slt i32 %30, %34
br i1 %35, label %29, label %36
36: ; preds = %29, %19
%37 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.11, i64 0, i64 0))
%38 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%39 = load i32, i32* %1
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %39)
%41 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.12, i64 0, i64 0))
%42 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.13, i64 0, i64 0))
%43 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.14, i64 0, i64 0))
%44 = load i32, i32* %1
%45 = icmp slt i32 %44, 1
br i1 %45, label %53, label %46
46: ; preds = %36, %46
%47 = phi i32 [ %50, %46 ], [ 1, %36 ]
%48 = mul nsw i32 %47, %47
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %47, i32 %48)
%50 = add nuw nsw i32 %47, 1
%51 = load i32, i32* %1
%52 = icmp slt i32 %47, %51
br i1 %52, label %46, label %53
53: ; preds = %46, %36
%54 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.11, i64 0, i64 0))
%55 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%56 = load i32, i32* %1
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %56)
%58 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.12, i64 0, i64 0))
%59 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.13, i64 0, i64 0))
%60 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.14, i64 0, i64 0))
%61 = load i32, i32* %1
%62 = icmp slt i32 %61, 1
br i1 %62, label %70, label %63
63: ; preds = %53, %63
%64 = phi i32 [ %67, %63 ], [ 1, %53 ]
%65 = mul nsw i32 %64, %64
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %64, i32 %65)
%67 = add nuw nsw i32 %64, 1
%68 = load i32, i32* %1
%69 = icmp slt i32 %64, %68
br i1 %69, label %63, label %70
70: ; preds = %63, %53
%71 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.10, i64 0, i64 0))
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i32 0)
%73 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i32 6)
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i32 7)
%75 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i32 8)
%76 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.10, i64 0, i64 0))
%77 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i32 0)
ret i32 0
}