#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);
int main() {
  int i, j, k, l, x;
  for (i = 10; 1; i += 10) {
    x = 0;
    for (j = 0; j < i; j++)
      for (k = 0; k < i; k++)
        for (l = 0; l < i; l++)
          x++;
    printf("%d ^ 3 = %d\n", i, x);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1135 <main+0x25>
jmp    11d2 <main+0xc2>
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11b2 <main+0xa2>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    119f <main+0x8f>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    118c <main+0x7c>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1169 <main+0x59>
jmp    1191 <main+0x81>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1156 <main+0x46>
jmp    11a4 <main+0x94>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1143 <main+0x33>
mov    -0x8(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xe41(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    $0xa,%r15d
mov    $0x2ee0,%r12d
mov    $0x1b58,%ebx
mov    $0x3e8,%ebp
lea    0xecb(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %r15d,%esi
mov    %ebp,%edx
call   1030 <printf@plt>
add    $0xa,%r15d
add    %ebx,%ebp
lea    (%rbx,%r12,1),%eax
add    $0x1770,%r12d
mov    %eax,%ebx
jmp    1140 <main+0x30>

LLVM IR (-O0):
@.str = [13 x i8] c"%d ^ 3 = %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 10, i32* %2
br label %7
7: ; preds = %41, %0
br i1 true, label %8, label %44
8: ; preds = %7
store i32 0, i32* %6
store i32 0, i32* %3
br label %9
9: ; preds = %34, %8
%10 = load i32, i32* %3
%11 = load i32, i32* %2
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %37
13: ; preds = %9
store i32 0, i32* %4
br label %14
14: ; preds = %30, %13
%15 = load i32, i32* %4
%16 = load i32, i32* %2
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %33
18: ; preds = %14
store i32 0, i32* %5
br label %19
19: ; preds = %26, %18
%20 = load i32, i32* %5
%21 = load i32, i32* %2
%22 = icmp slt i32 %20, %21
br i1 %22, label %23, label %29
23: ; preds = %19
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 1
store i32 %25, i32* %6
br label %26
26: ; preds = %23
%27 = load i32, i32* %5
%28 = add nsw i32 %27, 1
store i32 %28, i32* %5
br label %19
29: ; preds = %19
br label %30
30: ; preds = %29
%31 = load i32, i32* %4
%32 = add nsw i32 %31, 1
store i32 %32, i32* %4
br label %14
33: ; preds = %14
br label %34
34: ; preds = %33
%35 = load i32, i32* %3
%36 = add nsw i32 %35, 1
store i32 %36, i32* %3
br label %9
37: ; preds = %9
%38 = load i32, i32* %2
%39 = load i32, i32* %6
%40 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %38, i32 %39)
br label %41
41: ; preds = %37
%42 = load i32, i32* %2
%43 = add nsw i32 %42, 10
store i32 %43, i32* %2
br label %7
44: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"%d ^ 3 = %d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ %10, %1 ], [ 1000, %0 ]
%3 = phi i32 [ %9, %1 ], [ 7000, %0 ]
%4 = phi i32 [ %8, %1 ], [ 12000, %0 ]
%5 = phi i32 [ %7, %1 ], [ 10, %0 ]
%6 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %2)
%7 = add nuw nsw i32 %5, 10
%8 = add i32 %4, 6000
%9 = add i32 %3, %4
%10 = add i32 %2, %3
br label %1
}