#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 main1() {
  int b[8] = {0, 3, 6, 9, 12, 15, 18, 21};
  int a[8];
  int i;
  for (i = 0; i < 8; i++) {
    a[i] = b[i];
  }
  for (i = 0; i < 8; i++) {
    if (a[i] != b[i])
      abort();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed8(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0x8,-0x44(%rbp)
jge    1173 <main1+0x63>
movslq -0x44(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%ecx
movslq -0x44(%rbp),%rax
mov    %ecx,-0x40(%rbp,%rax,4)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    114b <main1+0x3b>
movl   $0x0,-0x44(%rbp)
cmpl   $0x8,-0x44(%rbp)
jge    11b4 <main1+0xa4>
movslq -0x44(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%eax
movslq -0x44(%rbp),%rcx
cmp    -0x20(%rbp,%rcx,4),%eax
je     11a1 <main1+0x91>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    11a6 <main1+0x96>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    117a <main1+0x6a>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

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

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

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