#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 */
typedef int /*<<< orphan*/ array;

/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int main(int argc, char **argv) {
  static char array[1024 * 1024] = {1};
  unsigned int a = 1, i, j, k;
  for (i = 0; i < sizeof(array); i++)
    for (j = 0; j < sizeof(array); j++)
      for (k = 0; k < sizeof(array); k++)
        array[i] = array[j] + array[k];
  if (a != 1)
    goto ERROR;
  return array[100];
ERROR:
  __VERIFIER_error();
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    $0x100000,%rax
jae    11d6 <main+0xc6>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    $0x100000,%rax
jae    11c3 <main+0xb3>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    $0x100000,%rax
jae    11b0 <main+0xa0>
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
lea    0x2eb5(%rip),%rax
movsbl (%rax,%rcx,1),%eax
mov    -0x20(%rbp),%ecx
mov    %ecx,%edx
lea    0x2ea5(%rip),%rcx
movsbl (%rcx,%rdx,1),%ecx
add    %ecx,%eax
mov    %al,%dl
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
lea    0x2e91(%rip),%rax
mov    %dl,(%rax,%rcx,1)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1160 <main+0x50>
jmp    11b5 <main+0xa5>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    114a <main+0x3a>
jmp    11c8 <main+0xb8>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1134 <main+0x24>
cmpl   $0x1,-0x14(%rbp)
je     11e5 <main+0xd5>
jmp    11f4 <main+0xe4>
movsbl 0x2ea8(%rip),%eax
mov    %eax,-0x4(%rbp)
jmp    1202 <main+0xf2>
mov    $0x0,%al
call   1030 <__VERIFIER_error@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %edi,%edi
lea    0x2f27(%rip),%rcx
nopl   0x0(%rax)
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rcx,1),%eax
add    (%rdx,%rcx,1),%al
mov    %al,(%rdi,%rcx,1)
movzbl 0x1(%rsi,%rcx,1),%eax
add    (%rdx,%rcx,1),%al
mov    %al,(%rdi,%rcx,1)
movzbl 0x2(%rsi,%rcx,1),%eax
add    (%rdx,%rcx,1),%al
mov    %al,(%rdi,%rcx,1)
movzbl 0x3(%rsi,%rcx,1),%eax
add    (%rdx,%rcx,1),%al
mov    %al,(%rdi,%rcx,1)
add    $0x4,%rsi
cmp    $0x100000,%rsi
jne    1130 <main+0x30>
add    $0x1,%rdx
cmp    $0x100000,%rdx
jne    1120 <main+0x20>
add    $0x1,%rdi
cmp    $0x100000,%rdi
jne    1110 <main+0x10>
movsbl 0x2f0b(%rip),%eax
ret

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

LLVM IR (-O2):
@main.array = internal unnamed_addr global <{ i8, [1048575 x i8] }> <{ i8 1, [1048575 x i8] zeroinitializer }>
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %35
%4 = phi i64 [ 0, %2 ], [ %36, %35 ]
%5 = getelementptr inbounds [1048576 x i8], [1048576 x i8]* bitcast (<{ i8, [1048575 x i8] }>* @main.array to [1048576 x i8]*), i64 0, i64 %4
br label %6
6: ; preds = %3, %32
%7 = phi i64 [ 0, %3 ], [ %33, %32 ]
%8 = getelementptr inbounds [1048576 x i8], [1048576 x i8]* bitcast (<{ i8, [1048575 x i8] }>* @main.array to [1048576 x i8]*), i64 0, i64 %7
br label %9
9: ; preds = %9, %6
%10 = phi i64 [ 0, %6 ], [ %30, %9 ]
%11 = load i8, i8* %8
%12 = getelementptr inbounds [1048576 x i8], [1048576 x i8]* bitcast (<{ i8, [1048575 x i8] }>* @main.array to [1048576 x i8]*), i64 0, i64 %10
%13 = load i8, i8* %12
%14 = add i8 %13, %11
store i8 %14, i8* %5
%15 = or i64 %10, 1
%16 = load i8, i8* %8
%17 = getelementptr inbounds [1048576 x i8], [1048576 x i8]* bitcast (<{ i8, [1048575 x i8] }>* @main.array to [1048576 x i8]*), i64 0, i64 %15
%18 = load i8, i8* %17
%19 = add i8 %18, %16
store i8 %19, i8* %5
%20 = or i64 %10, 2
%21 = load i8, i8* %8
%22 = getelementptr inbounds [1048576 x i8], [1048576 x i8]* bitcast (<{ i8, [1048575 x i8] }>* @main.array to [1048576 x i8]*), i64 0, i64 %20
%23 = load i8, i8* %22
%24 = add i8 %23, %21
store i8 %24, i8* %5
%25 = or i64 %10, 3
%26 = load i8, i8* %8
%27 = getelementptr inbounds [1048576 x i8], [1048576 x i8]* bitcast (<{ i8, [1048575 x i8] }>* @main.array to [1048576 x i8]*), i64 0, i64 %25
%28 = load i8, i8* %27
%29 = add i8 %28, %26
store i8 %29, i8* %5
%30 = add nuw nsw i64 %10, 4
%31 = icmp eq i64 %30, 1048576
br i1 %31, label %32, label %9
32: ; preds = %9
%33 = add nuw nsw i64 %7, 1
%34 = icmp eq i64 %33, 1048576
br i1 %34, label %35, label %6
35: ; preds = %32
%36 = add nuw nsw i64 %4, 1
%37 = icmp eq i64 %36, 1048576
br i1 %37, label %38, label %3
38: ; preds = %35
%39 = load i8, i8* getelementptr inbounds (<{ i8, [1048575 x i8] }>, <{ i8, [1048575 x i8] }>* @main.array, i64 0, i32 1, i64 99)
%40 = sext i8 %39 to i32
ret i32 %40
}