#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*/ assert(int);
int main() {
  int foo[5] = {0, 1, 2, 3, 4};
  assert(foo[0] == 0);
  assert(foo[1] == 1);
  assert(foo[2] == 2);
  assert(foo[3] == 3);
  assert(foo[4] == 4);
  int bar[5] = {5, [0] = 4, [2] = 3, 6};
  assert(bar[0] == 4);
  assert(bar[1] == 0);
  assert(bar[2] == 3);
  assert(bar[3] == 6);
  assert(bar[4] == 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed5(%rip),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x20(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x1,-0x1c(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x2,-0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x3,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x4,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0xe86(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xe83(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xe81(%rip),%eax
mov    %eax,-0x30(%rbp)
cmpl   $0x4,-0x40(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x0,-0x3c(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x3,-0x38(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x6,-0x34(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x0,-0x30(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.foo = [5 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4]
@__const.main.bar = [5 x i32] [i32 4, i32 0, i32 3, i32 6, i32 0]
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca [5 x i32]
store i32 0, i32* %1
%4 = bitcast [5 x i32]* %2 to i8*
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 1
%11 = load i32, i32* %10
%12 = icmp eq i32 %11, 1
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 2
%16 = load i32, i32* %15
%17 = icmp eq i32 %16, 2
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
%20 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 3
%21 = load i32, i32* %20
%22 = icmp eq i32 %21, 3
%23 = zext i1 %22 to i32
%24 = call i32 @assert(i32 %23)
%25 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 4
%26 = load i32, i32* %25
%27 = icmp eq i32 %26, 4
%28 = zext i1 %27 to i32
%29 = call i32 @assert(i32 %28)
%30 = bitcast [5 x i32]* %3 to i8*
%31 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%32 = load i32, i32* %31
%33 = icmp eq i32 %32, 4
%34 = zext i1 %33 to i32
%35 = call i32 @assert(i32 %34)
%36 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 1
%37 = load i32, i32* %36
%38 = icmp eq i32 %37, 0
%39 = zext i1 %38 to i32
%40 = call i32 @assert(i32 %39)
%41 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 2
%42 = load i32, i32* %41
%43 = icmp eq i32 %42, 3
%44 = zext i1 %43 to i32
%45 = call i32 @assert(i32 %44)
%46 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 3
%47 = load i32, i32* %46
%48 = icmp eq i32 %47, 6
%49 = zext i1 %48 to i32
%50 = call i32 @assert(i32 %49)
%51 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 4
%52 = load i32, i32* %51
%53 = icmp eq i32 %52, 0
%54 = zext i1 %53 to i32
%55 = call i32 @assert(i32 %54)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
%4 = tail call i32 @assert(i32 1)
%5 = tail call i32 @assert(i32 1)
%6 = tail call i32 @assert(i32 1)
%7 = tail call i32 @assert(i32 1)
%8 = tail call i32 @assert(i32 1)
%9 = tail call i32 @assert(i32 1)
%10 = tail call i32 @assert(i32 1)
ret i32 0
}