#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(void) {
  int i;
  int x[1000];
  for (i = 0; i < 100; i++)
    x[i] = x[i + 100];
  for (i = 0; i < 100; i++) {
    if (x[i] != x[i + 100])
      abort();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xfb0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    115b <main+0x4b>
mov    -0x8(%rbp),%eax
add    $0x64,%eax
cltq
mov    -0xfb0(%rbp,%rax,4),%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0xfb0(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <main+0x19>
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    11a7 <main+0x97>
movslq -0x8(%rbp),%rax
mov    -0xfb0(%rbp,%rax,4),%eax
mov    -0x8(%rbp),%ecx
add    $0x64,%ecx
movslq %ecx,%rcx
cmp    -0xfb0(%rbp,%rcx,4),%eax
je     1194 <main+0x84>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1199 <main+0x89>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1162 <main+0x52>
xor    %eax,%eax
add    $0xfb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0xfa8,%rsp
mov    $0xffffffffffffff9c,%rax
xchg   %ax,%ax
mov    0x190(%rsp,%rax,4),%ecx
cmp    0x320(%rsp,%rax,4),%ecx
jne    1170 <main+0x60>
mov    0x194(%rsp,%rax,4),%ecx
cmp    0x324(%rsp,%rax,4),%ecx
jne    1170 <main+0x60>
mov    0x198(%rsp,%rax,4),%ecx
cmp    0x328(%rsp,%rax,4),%ecx
jne    1170 <main+0x60>
mov    0x19c(%rsp,%rax,4),%ecx
cmp    0x32c(%rsp,%rax,4),%ecx
jne    1170 <main+0x60>
add    $0x4,%rax
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0xfa8,%rsp
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

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