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


x86 assembly (clang, -O0):
<main1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x650,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    116d <main1+0x5d>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    115a <main1+0x4a>
movslq -0x8(%rbp),%rax
movl   $0x5,-0x3d0(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <main1+0x23>
jmp    115f <main1+0x4f>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1122 <main1+0x12>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    11ce <main1+0xbe>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    11bb <main1+0xab>
movslq -0x8(%rbp),%rax
cmpl   $0x5,-0x3d0(%rbp,%rax,4)
05
je     11a8 <main1+0x98>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    11ad <main1+0x9d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1185 <main1+0x75>
jmp    11c0 <main1+0xb0>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <main1+0x64>
add    $0x650,%rsp
pop    %rbp
ret

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

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

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