#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*/ print_int(int);
int main() {
  int i[3];
  int j[2][2];
  int k[2][2][2][2][2];
  int s;
  i[0] = 2;
  i[2] = i[0];
  for (s = 0; s < 3; s++) {
    print_int(i[s]);
  }
  j[0][0] = 20;
  print_int(j[0][0]);
  j[1][1] = j[0][0];
  print_int(j[1][1]);
  k[1][0][1][0][1] = 45;
  print_int(k[1][0][1][0][1]);
  k[0][0][0][0][1] = k[1][0][1][0][1];
  print_int(k[0][0][0][0][1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xa4(%rbp)
cmpl   $0x3,-0xa4(%rbp)
jge    116a <main+0x5a>
movslq -0xa4(%rbp),%rax
mov    -0x10(%rbp,%rax,4),%edi
call   1030 <print_int@plt>
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    1139 <main+0x29>
movl   $0x14,-0x20(%rbp)
mov    -0x20(%rbp),%edi
call   1030 <print_int@plt>
mov    -0x20(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <print_int@plt>
movl   $0x2d,-0x4c(%rbp)
mov    -0x4c(%rbp),%edi
call   1030 <print_int@plt>
mov    -0x4c(%rbp),%eax
mov    %eax,-0x9c(%rbp)
mov    -0x9c(%rbp),%edi
call   1030 <print_int@plt>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
call   1030 <print_int@plt>
call   1030 <print_int@plt>
mov    $0x2,%edi
call   1030 <print_int@plt>
mov    $0x14,%edi
call   1030 <print_int@plt>
mov    $0x14,%edi
call   1030 <print_int@plt>
mov    $0x2d,%edi
call   1030 <print_int@plt>
mov    $0x2d,%edi
call   1030 <print_int@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
%3 = alloca [2 x [2 x i32]]
%4 = alloca [2 x [2 x [2 x [2 x [2 x i32]]]]]
%5 = alloca i32
store i32 0, i32* %1
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
store i32 2, i32* %6
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%8 = load i32, i32* %7
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
store i32 %8, i32* %9
store i32 0, i32* %5
br label %10
10: ; preds = %19, %0
%11 = load i32, i32* %5
%12 = icmp slt i32 %11, 3
br i1 %12, label %13, label %22
13: ; preds = %10
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 %15
%17 = load i32, i32* %16
%18 = call i32 @print_int(i32 %17)
br label %19
19: ; preds = %13
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %10
22: ; preds = %10
%23 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %3, i64 0, i64 0
%24 = getelementptr inbounds [2 x i32], [2 x i32]* %23, i64 0, i64 0
store i32 20, i32* %24
%25 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %3, i64 0, i64 0
%26 = getelementptr inbounds [2 x i32], [2 x i32]* %25, i64 0, i64 0
%27 = load i32, i32* %26
%28 = call i32 @print_int(i32 %27)
%29 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %3, i64 0, i64 0
%30 = getelementptr inbounds [2 x i32], [2 x i32]* %29, i64 0, i64 0
%31 = load i32, i32* %30
%32 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %3, i64 0, i64 1
%33 = getelementptr inbounds [2 x i32], [2 x i32]* %32, i64 0, i64 1
store i32 %31, i32* %33
%34 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %3, i64 0, i64 1
%35 = getelementptr inbounds [2 x i32], [2 x i32]* %34, i64 0, i64 1
%36 = load i32, i32* %35
%37 = call i32 @print_int(i32 %36)
%38 = getelementptr inbounds [2 x [2 x [2 x [2 x [2 x i32]]]]], [2 x [2 x [2 x [2 x [2 x i32]]]]]* %4, i64 0, i64 1
%39 = getelementptr inbounds [2 x [2 x [2 x [2 x i32]]]], [2 x [2 x [2 x [2 x i32]]]]* %38, i64 0, i64 0
%40 = getelementptr inbounds [2 x [2 x [2 x i32]]], [2 x [2 x [2 x i32]]]* %39, i64 0, i64 1
%41 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %40, i64 0, i64 0
%42 = getelementptr inbounds [2 x i32], [2 x i32]* %41, i64 0, i64 1
store i32 45, i32* %42
%43 = getelementptr inbounds [2 x [2 x [2 x [2 x [2 x i32]]]]], [2 x [2 x [2 x [2 x [2 x i32]]]]]* %4, i64 0, i64 1
%44 = getelementptr inbounds [2 x [2 x [2 x [2 x i32]]]], [2 x [2 x [2 x [2 x i32]]]]* %43, i64 0, i64 0
%45 = getelementptr inbounds [2 x [2 x [2 x i32]]], [2 x [2 x [2 x i32]]]* %44, i64 0, i64 1
%46 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %45, i64 0, i64 0
%47 = getelementptr inbounds [2 x i32], [2 x i32]* %46, i64 0, i64 1
%48 = load i32, i32* %47
%49 = call i32 @print_int(i32 %48)
%50 = getelementptr inbounds [2 x [2 x [2 x [2 x [2 x i32]]]]], [2 x [2 x [2 x [2 x [2 x i32]]]]]* %4, i64 0, i64 1
%51 = getelementptr inbounds [2 x [2 x [2 x [2 x i32]]]], [2 x [2 x [2 x [2 x i32]]]]* %50, i64 0, i64 0
%52 = getelementptr inbounds [2 x [2 x [2 x i32]]], [2 x [2 x [2 x i32]]]* %51, i64 0, i64 1
%53 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %52, i64 0, i64 0
%54 = getelementptr inbounds [2 x i32], [2 x i32]* %53, i64 0, i64 1
%55 = load i32, i32* %54
%56 = getelementptr inbounds [2 x [2 x [2 x [2 x [2 x i32]]]]], [2 x [2 x [2 x [2 x [2 x i32]]]]]* %4, i64 0, i64 0
%57 = getelementptr inbounds [2 x [2 x [2 x [2 x i32]]]], [2 x [2 x [2 x [2 x i32]]]]* %56, i64 0, i64 0
%58 = getelementptr inbounds [2 x [2 x [2 x i32]]], [2 x [2 x [2 x i32]]]* %57, i64 0, i64 0
%59 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %58, i64 0, i64 0
%60 = getelementptr inbounds [2 x i32], [2 x i32]* %59, i64 0, i64 1
store i32 %55, i32* %60
%61 = getelementptr inbounds [2 x [2 x [2 x [2 x [2 x i32]]]]], [2 x [2 x [2 x [2 x [2 x i32]]]]]* %4, i64 0, i64 0
%62 = getelementptr inbounds [2 x [2 x [2 x [2 x i32]]]], [2 x [2 x [2 x [2 x i32]]]]* %61, i64 0, i64 0
%63 = getelementptr inbounds [2 x [2 x [2 x i32]]], [2 x [2 x [2 x i32]]]* %62, i64 0, i64 0
%64 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %63, i64 0, i64 0
%65 = getelementptr inbounds [2 x i32], [2 x i32]* %64, i64 0, i64 1
%66 = load i32, i32* %65
%67 = call i32 @print_int(i32 %66)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @print_int(i32 2)
%2 = tail call i32 @print_int(i32 undef)
%3 = tail call i32 @print_int(i32 2)
%4 = tail call i32 @print_int(i32 20)
%5 = tail call i32 @print_int(i32 20)
%6 = tail call i32 @print_int(i32 45)
%7 = tail call i32 @print_int(i32 45)
ret i32 0
}