#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();
int main(int argc, char *argv[]) {
  int i = -1;
  int c[1000];
#pragma omp parallel for
  for (i = 0; i < 1000; i++) {
    c[i] = i;
  }
  if (i != -1)
    abort();
  for (i = 0; i < 1000; i++) {
    if (c[i] != i)
      abort();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xfc0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3e8,-0x14(%rbp)
jge    1160 <main+0x50>
mov    -0x14(%rbp),%ecx
movslq -0x14(%rbp),%rax
mov    %ecx,-0xfc0(%rbp,%rax,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1137 <main+0x27>
cmpl   $0xffffffff,-0x14(%rbp)
je     1171 <main+0x61>
mov    $0x0,%al
call   1030 <abort@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x3e8,-0x14(%rbp)
jge    11b3 <main+0xa3>
movslq -0x14(%rbp),%rax
mov    -0xfc0(%rbp,%rax,4),%eax
cmp    -0x14(%rbp),%eax
je     11a0 <main+0x90>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    11a5 <main+0x95>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1178 <main+0x68>
xor    %eax,%eax
add    $0xfc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @abort()
unreachable
}