main() {
  const int i = 5;
  const int x[] = {1, 2, 3};
  const struct {
    int i, j;
    char *s;
  } y[] = {1, 2, {"hi"}, {2}, {5, 6, "yo"}};
  if (i != 5 || x[0] != 1 || x[1] != 2 || x[2] != 3)
    abort();
  if (y[0].i != 1 || y[0].j != 2 || strcmp(y[0].s, "hi"))
    abort();
  if (y[1].i != 2 || y[1].j != 0 || y[1].s != 0)
    abort();
  if (y[2].i != 5 || y[2].j != 6 || strcmp(y[2].s, "yo"))
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    0xeb3(%rip),%rax
mov    %rax,-0x14(%rbp)
mov    0xeb1(%rip),%eax
mov    %eax,-0xc(%rbp)
lea    -0x50(%rbp),%rdi
lea    0x2c8b(%rip),%rsi
mov    $0x30,%edx
call   1050 <memcpy@plt>
cmpl   $0x1,-0x14(%rbp)
jne    118d <main+0x5d>
cmpl   $0x2,-0x10(%rbp)
jne    118d <main+0x5d>
cmpl   $0x3,-0xc(%rbp)
je     1192 <main+0x62>
call   1030 <abort@plt>
cmpl   $0x1,-0x50(%rbp)
jne    11bf <main+0x8f>
cmpl   $0x2,-0x4c(%rbp)
jne    11bf <main+0x8f>
mov    -0x48(%rbp),%rdi
lea    0xe5b(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     11c4 <main+0x94>
call   1030 <abort@plt>
cmpl   $0x2,-0x40(%rbp)
jne    11e3 <main+0xb3>
cmpl   $0x0,-0x3c(%rbp)
jne    11e3 <main+0xb3>
cmpq   $0x0,-0x38(%rbp)
je     11e8 <main+0xb8>
call   1030 <abort@plt>
cmpl   $0x5,-0x30(%rbp)
jne    1215 <main+0xe5>
cmpl   $0x6,-0x2c(%rbp)
jne    1215 <main+0xe5>
mov    -0x28(%rbp),%rdi
lea    0xe08(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     121a <main+0xea>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.anon = type { i32, i32, i8* }
@__const.main.x = [3 x i32] [i32 1, i32 2, i32 3]
@.str = [3 x i8] c"hi\00"
@.str.1 = [3 x i8] c"yo\00"
@__const.main.y = [3 x %struct.anon] [%struct.anon { i32 1, i32 2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0) }, %struct.anon { i32 2, i32 0, i8* null }, %struct.anon { i32 5, i32 6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i32 0, i32 0) }]
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [3 x i32]
%4 = alloca [3 x %struct.anon]
store i32 0, i32* %1
store i32 5, i32* %2
%5 = bitcast [3 x i32]* %3 to i8*
%6 = bitcast [3 x %struct.anon]* %4 to i8*
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%8 = load i32, i32* %7
%9 = icmp ne i32 %8, 1
br i1 %9, label %18, label %10
10: ; preds = %0
%11 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
%12 = load i32, i32* %11
%13 = icmp ne i32 %12, 2
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
%16 = load i32, i32* %15
%17 = icmp ne i32 %16, 3
br i1 %17, label %18, label %19
18: ; preds = %14, %10, %0
unreachable
19: ; preds = %14
%20 = getelementptr inbounds [3 x %struct.anon], [3 x %struct.anon]* %4, i64 0, i64 0
%21 = getelementptr inbounds %struct.anon, %struct.anon* %20, i32 0, i32 0
%22 = load i32, i32* %21
%23 = icmp ne i32 %22, 1
br i1 %23, label %35, label %24
24: ; preds = %19
%25 = getelementptr inbounds [3 x %struct.anon], [3 x %struct.anon]* %4, i64 0, i64 0
%26 = getelementptr inbounds %struct.anon, %struct.anon* %25, i32 0, i32 1
%27 = load i32, i32* %26
%28 = icmp ne i32 %27, 2
br i1 %28, label %35, label %29
29: ; preds = %24
%30 = getelementptr inbounds [3 x %struct.anon], [3 x %struct.anon]* %4, i64 0, i64 0
%31 = getelementptr inbounds %struct.anon, %struct.anon* %30, i32 0, i32 2
%32 = load i8*, i8** %31
%33 = call i32 @strcmp(i8* %32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%34 = icmp ne i32 %33, 0
br i1 %34, label %35, label %36
35: ; preds = %29, %24, %19
unreachable
36: ; preds = %29
%37 = getelementptr inbounds [3 x %struct.anon], [3 x %struct.anon]* %4, i64 0, i64 1
%38 = getelementptr inbounds %struct.anon, %struct.anon* %37, i32 0, i32 0
%39 = load i32, i32* %38
%40 = icmp ne i32 %39, 2
br i1 %40, label %51, label %41
41: ; preds = %36
%42 = getelementptr inbounds [3 x %struct.anon], [3 x %struct.anon]* %4, i64 0, i64 1
%43 = getelementptr inbounds %struct.anon, %struct.anon* %42, i32 0, i32 1
%44 = load i32, i32* %43
%45 = icmp ne i32 %44, 0
br i1 %45, label %51, label %46
46: ; preds = %41
%47 = getelementptr inbounds [3 x %struct.anon], [3 x %struct.anon]* %4, i64 0, i64 1
%48 = getelementptr inbounds %struct.anon, %struct.anon* %47, i32 0, i32 2
%49 = load i8*, i8** %48
%50 = icmp ne i8* %49, null
br i1 %50, label %51, label %52
51: ; preds = %46, %41, %36
unreachable
52: ; preds = %46
%53 = getelementptr inbounds [3 x %struct.anon], [3 x %struct.anon]* %4, i64 0, i64 2
%54 = getelementptr inbounds %struct.anon, %struct.anon* %53, i32 0, i32 0
%55 = load i32, i32* %54
%56 = icmp ne i32 %55, 5
br i1 %56, label %68, label %57
57: ; preds = %52
%58 = getelementptr inbounds [3 x %struct.anon], [3 x %struct.anon]* %4, i64 0, i64 2
%59 = getelementptr inbounds %struct.anon, %struct.anon* %58, i32 0, i32 1
%60 = load i32, i32* %59
%61 = icmp ne i32 %60, 6
br i1 %61, label %68, label %62
62: ; preds = %57
%63 = getelementptr inbounds [3 x %struct.anon], [3 x %struct.anon]* %4, i64 0, i64 2
%64 = getelementptr inbounds %struct.anon, %struct.anon* %63, i32 0, i32 2
%65 = load i8*, i8** %64
%66 = call i32 @strcmp(i8* %65, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%67 = icmp ne i32 %66, 0
br i1 %67, label %68, label %69
68: ; preds = %62, %57, %52
unreachable
69: ; preds = %62
ret i32 0
}

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