#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*/ __VERIFIER_assert(int);
int main(void) {
  int A[2048];
  int i;
  for (i = 0; i < 1024; i++) {
    A[i] = i;
  }
  __VERIFIER_assert(A[1023] != 1023);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2020,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x2014(%rbp)
cmpl   $0x400,-0x2014(%rbp)
jge    1164 <main+0x54>
mov    -0x2014(%rbp),%ecx
movslq -0x2014(%rbp),%rax
mov    %ecx,-0x2010(%rbp,%rax,4)
mov    -0x2014(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2014(%rbp)
jmp    112c <main+0x1c>
cmpl   $0x3ff,-0x1014(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x2020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x2008,%rsp
movdqa 0xee1(%rip),%xmm0
xor    %eax,%eax
movdqa 0xee6(%rip),%xmm8
movdqa 0xeed(%rip),%xmm9
movdqa 0xef4(%rip),%xmm10
movdqa 0xefc(%rip),%xmm4
movdqa 0xf04(%rip),%xmm5
movdqa 0xf0c(%rip),%xmm6
movdqa 0xf14(%rip),%xmm7
movdqa 0xf1c(%rip),%xmm1
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movdqa %xmm0,%xmm2
paddd  %xmm8,%xmm2
movdqa %xmm0,(%rsp,%rax,4)
movdqa %xmm2,0x10(%rsp,%rax,4)
movdqa %xmm0,%xmm2
paddd  %xmm9,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm10,%xmm3
movdqa %xmm2,0x20(%rsp,%rax,4)
movdqa %xmm3,0x30(%rsp,%rax,4)
movdqa %xmm0,%xmm2
paddd  %xmm4,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm5,%xmm3
movdqa %xmm2,0x40(%rsp,%rax,4)
movdqa %xmm3,0x50(%rsp,%rax,4)
movdqa %xmm0,%xmm2
paddd  %xmm6,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm7,%xmm3
movdqa %xmm2,0x60(%rsp,%rax,4)
movdqa %xmm3,0x70(%rsp,%rax,4)
add    $0x20,%rax
paddd  %xmm1,%xmm0
cmp    $0x400,%rax
jne    1170 <main+0x60>
xor    %edi,%edi
cmpl   $0x3ff,0xffc(%rsp)
setne  %dil
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x2008,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [2048 x i32]
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %4
4: ; preds = %12, %0
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 1024
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i32, i32* %3
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [2048 x i32], [2048 x i32]* %2, i64 0, i64 %10
store i32 %8, i32* %11
br label %12
12: ; preds = %7
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
%16 = getelementptr inbounds [2048 x i32], [2048 x i32]* %2, i64 0, i64 1023
%17 = load i32, i32* %16
%18 = icmp ne i32 %17, 1023
%19 = zext i1 %18 to i32
%20 = call i32 @__VERIFIER_assert(i32 %19)
%21 = load i32, i32* %1
ret i32 %21
}

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