#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*/ scanf(char *, int *);
void main() {
  int i, j, k, n, a[1000000];
  n = 100;
  for (i = 0; i < n; ++i)
    for (j = 0; j < n; ++j)
      for (k = 0; k < n; ++k)
        a[i * n * n + j * n + k] = 2 * i * j * k + 1;
  scanf("%d", &i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3d0910,%rsp
movl   $0x64,-0x10(%rbp)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11c0 <main+0xb0>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11ad <main+0x9d>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    119a <main+0x8a>
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
imul   -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    $0x1,%ecx
mov    -0x4(%rbp),%eax
imul   -0x10(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    -0x8(%rbp),%edx
imul   -0x10(%rbp),%edx
add    %edx,%eax
add    -0xc(%rbp),%eax
cltq
mov    %ecx,-0x3d0910(%rbp,%rax,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    114f <main+0x3f>
jmp    119f <main+0x8f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113c <main+0x2c>
jmp    11b2 <main+0xa2>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1129 <main+0x19>
lea    0xe39(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1030 <scanf@plt>
add    $0x3d0910,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x64,0x4(%rsp)
lea    0xee0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <scanf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [1000000 x i32]
store i32 100, i32* %4
store i32 0, i32* %1
br label %6
6: ; preds = %49, %0
%7 = load i32, i32* %1
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %52
10: ; preds = %6
store i32 0, i32* %2
br label %11
11: ; preds = %45, %10
%12 = load i32, i32* %2
%13 = load i32, i32* %4
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %48
15: ; preds = %11
store i32 0, i32* %3
br label %16
16: ; preds = %41, %15
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %44
20: ; preds = %16
%21 = load i32, i32* %1
%22 = mul nsw i32 2, %21
%23 = load i32, i32* %2
%24 = mul nsw i32 %22, %23
%25 = load i32, i32* %3
%26 = mul nsw i32 %24, %25
%27 = add nsw i32 %26, 1
%28 = load i32, i32* %1
%29 = load i32, i32* %4
%30 = mul nsw i32 %28, %29
%31 = load i32, i32* %4
%32 = mul nsw i32 %30, %31
%33 = load i32, i32* %2
%34 = load i32, i32* %4
%35 = mul nsw i32 %33, %34
%36 = add nsw i32 %32, %35
%37 = load i32, i32* %3
%38 = add nsw i32 %36, %37
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [1000000 x i32], [1000000 x i32]* %5, i64 0, i64 %39
store i32 %27, i32* %40
br label %41
41: ; preds = %20
%42 = load i32, i32* %3
%43 = add nsw i32 %42, 1
store i32 %43, i32* %3
br label %16
44: ; preds = %16
br label %45
45: ; preds = %44
%46 = load i32, i32* %2
%47 = add nsw i32 %46, 1
store i32 %47, i32* %2
br label %11
48: ; preds = %11
br label %49
49: ; preds = %48
%50 = load i32, i32* %1
%51 = add nsw i32 %50, 1
store i32 %51, i32* %1
br label %6
52: ; preds = %6
%53 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 100, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
ret void
}