int main() {
  int x[64];
  int y[64] = {
      0,       1,       -2380134, -1065336, -1026376, 3264240, 3113534, 2328130,
      3632054, 3839634, 2380136,  1065339,  1026380,  1496037, 1397286, 789976,
      386408,  450984,  597112,   497464,   262008,   149184,  194768,  231519,
      173984,  87753,   60712,    82042,    87502,    60014,   30050,   25550,
      33570,   32386,   20464,    10675,    10868,    13329,   11794,   6892,
      3988,    4564,    5148,     4228,     2284,     1568,    1848,    1943,
      1472,    741,     628,      702,      714,      474,     230,     234,
      238,     242,     120,      59,       60,       61,      62,      63};
  int i;
  for (i = 0; i < 64; ++i) {
    x[i] = i;
    __asm__ volatile("");
  }
  foo(x);
  if (memcmp(x, y, sizeof(x)) != 0)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x210(%rbp),%rdi
lea    0xea0(%rip),%rsi
mov    $0x100,%edx
call   1050 <memcpy@plt>
movl   $0x0,-0x214(%rbp)
cmpl   $0x40,-0x214(%rbp)
jge    11a9 <main+0x69>
mov    -0x214(%rbp),%ecx
movslq -0x214(%rbp),%rax
mov    %ecx,-0x110(%rbp,%rax,4)
mov    -0x214(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x214(%rbp)
jmp    1174 <main+0x34>
lea    -0x110(%rbp),%rdi
mov    $0x0,%al
call   1060 <foo@plt>
lea    -0x110(%rbp),%rdi
lea    -0x210(%rbp),%rsi
mov    $0x100,%edx
call   1040 <memcmp@plt>
cmp    $0x0,%eax
je     11dd <main+0x9d>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x100,%rsp
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
mov    %eax,(%rsp,%rax,4)
add    $0x1,%rax
cmp    $0x40,%rax
jne    1140 <main+0x10>
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <foo@plt>
lea    0xe9f(%rip),%rsi
mov    $0x100,%edx
mov    %rbx,%rdi
call   1050 <bcmp@plt>
test   %eax,%eax
jne    117d <main+0x4d>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret
call   1030 <abort@plt>

LLVM IR (-O0):
@__const.main.y = [64 x i32] [i32 0, i32 1, i32 -2380134, i32 -1065336, i32 -1026376, i32 3264240, i32 3113534, i32 2328130, i32 3632054, i32 3839634, i32 2380136, i32 1065339, i32 1026380, i32 1496037, i32 1397286, i32 789976, i32 386408, i32 450984, i32 597112, i32 497464, i32 262008, i32 149184, i32 194768, i32 231519, i32 173984, i32 87753, i32 60712, i32 82042, i32 87502, i32 60014, i32 30050, i32 25550, i32 33570, i32 32386, i32 20464, i32 10675, i32 10868, i32 13329, i32 11794, i32 6892, i32 3988, i32 4564, i32 5148, i32 4228, i32 2284, i32 1568, i32 1848, i32 1943, i32 1472, i32 741, i32 628, i32 702, i32 714, i32 474, i32 230, i32 234, i32 238, i32 242, i32 120, i32 59, i32 60, i32 61, i32 62, i32 63]
define i32 @main() {
%1 = alloca i32
%2 = alloca [64 x i32]
%3 = alloca [64 x i32]
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [64 x i32]* %3 to i8*
store i32 0, i32* %4
br label %6
6: ; preds = %14, %0
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 64
br i1 %8, label %9, label %17
9: ; preds = %6
%10 = load i32, i32* %4
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 %12
store i32 %10, i32* %13
br label %14
14: ; preds = %9
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
store i32 %16, i32* %4
br label %6
17: ; preds = %6
%18 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 0
%19 = call i32 (i32*, ...) bitcast (i32 (...)* @foo to i32 (i32*, ...)*)(i32* %18)
%20 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 0
%21 = bitcast i32* %20 to i8*
%22 = getelementptr inbounds [64 x i32], [64 x i32]* %3, i64 0, i64 0
%23 = bitcast i32* %22 to i8*
%24 = call i32 @memcmp(i8* %21, i8* %23, i64 256)
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %27
26: ; preds = %17
unreachable
27: ; preds = %17
ret i32 0
}

LLVM IR (-O2):
@__const.main.y = [64 x i32] [i32 0, i32 1, i32 -2380134, i32 -1065336, i32 -1026376, i32 3264240, i32 3113534, i32 2328130, i32 3632054, i32 3839634, i32 2380136, i32 1065339, i32 1026380, i32 1496037, i32 1397286, i32 789976, i32 386408, i32 450984, i32 597112, i32 497464, i32 262008, i32 149184, i32 194768, i32 231519, i32 173984, i32 87753, i32 60712, i32 82042, i32 87502, i32 60014, i32 30050, i32 25550, i32 33570, i32 32386, i32 20464, i32 10675, i32 10868, i32 13329, i32 11794, i32 6892, i32 3988, i32 4564, i32 5148, i32 4228, i32 2284, i32 1568, i32 1848, i32 1943, i32 1472, i32 741, i32 628, i32 702, i32 714, i32 474, i32 230, i32 234, i32 238, i32 242, i32 120, i32 59, i32 60, i32 61, i32 62, i32 63]
define i32 @main() {
%1 = alloca [64 x i32]
%2 = bitcast [64 x i32]* %1 to i8*
br label %3
3: ; preds = %0, %3
%4 = phi i64 [ 0, %0 ], [ %7, %3 ]
%5 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 %4
%6 = trunc i64 %4 to i32
store i32 %6, i32* %5
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
%7 = add nuw nsw i64 %4, 1
%8 = icmp eq i64 %7, 64
br i1 %8, label %9, label %3
9: ; preds = %3
%10 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%11 = call i32 (i32*, ...) bitcast (i32 (...)* @foo to i32 (i32*, ...)*)(i32* %10)
%12 = call i32 @bcmp(i8* dereferenceable(256) %2, i8* dereferenceable(256) bitcast ([64 x i32]* @__const.main.y to i8*), i64 256)
%13 = icmp eq i32 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %9
unreachable
15: ; preds = %9
ret i32 0
}