#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*/ abort();
__attribute__((no)) void main2() {
  int i, j;
  int ia[8][5][8 + 2];
  for (i = 0; i < 16; i++) {
    for (j = 0; j < 8; j++)
      ia[3][6][j + 2] = 5;
  }
  for (i = 0; i < 16; i++) {
    for (j = 2; j < 8 + 2; j++) {
      if (ia[3][6][j] != 5)
        abort();
    }
  }
}


x86 assembly (clang, -O0):
<main2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x650,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1171 <main2+0x61>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    115e <main2+0x4e>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
cltq
movl   $0x5,-0x308(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <main2+0x23>
jmp    1163 <main2+0x53>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1122 <main2+0x12>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    11d2 <main2+0xc2>
movl   $0x2,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    11bf <main2+0xaf>
movslq -0x8(%rbp),%rax
cmpl   $0x5,-0x308(%rbp,%rax,4)
05
je     11ac <main2+0x9c>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    11b1 <main2+0xa1>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1189 <main2+0x79>
jmp    11c4 <main2+0xb4>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1178 <main2+0x68>
add    $0x650,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main2>:
ret

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

LLVM IR (-O2):
define void @main2() {
ret void
}