int main(void) {
  int a[97];
  int b[97];
  int i;
  check_vect();
  for (i = 0; i < 97; i++) {
    __asm__ volatile("");
    b[i] = i;
  }
  int ret = liveloop(13, 97, a, b);
  if (ret != 97 - 1)
    abort();
  for (i = 0; i < 97; i++) {
    __asm__ volatile("");
    if (a[i] != i + 13 + 1)
      abort();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x330,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <check_vect@plt>
movl   $0x0,-0x324(%rbp)
cmpl   $0x61,-0x324(%rbp)
jge    1188 <main+0x58>
mov    -0x324(%rbp),%ecx
movslq -0x324(%rbp),%rax
mov    %ecx,-0x320(%rbp,%rax,4)
mov    -0x324(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x324(%rbp)
jmp    1153 <main+0x23>
lea    -0x190(%rbp),%rdx
lea    -0x320(%rbp),%rcx
mov    $0xd,%edi
mov    $0x61,%esi
mov    $0x0,%al
call   1050 <liveloop@plt>
mov    %eax,-0x328(%rbp)
cmpl   $0x60,-0x328(%rbp)
je     11bf <main+0x8f>
call   1030 <abort@plt>
movl   $0x0,-0x324(%rbp)
cmpl   $0x61,-0x324(%rbp)
jge    1216 <main+0xe6>
movslq -0x324(%rbp),%rax
mov    -0x190(%rbp,%rax,4),%eax
mov    -0x324(%rbp),%ecx
add    $0xd,%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
je     11fd <main+0xcd>
call   1030 <abort@plt>
jmp    1202 <main+0xd2>
mov    -0x324(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x324(%rbp)
jmp    11c9 <main+0x99>
mov    -0x4(%rbp),%eax
add    $0x330,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x320,%rsp
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <check_vect@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %ebx,(%rsp,%rbx,4)
add    $0x1,%rbx
cmp    $0x61,%rbx
jne    1150 <main+0x20>
lea    0x190(%rsp),%rdx
mov    %rsp,%rcx
mov    $0xd,%edi
mov    $0x61,%esi
xor    %eax,%eax
call   1050 <liveloop@plt>
cmp    $0x60,%eax
jne    11b1 <main+0x81>
mov    $0xe,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x158(%rsp,%rax,4),%ecx
cmp    %rcx,%rax
jne    11b1 <main+0x81>
add    $0x1,%rax
cmp    $0x6f,%rax
jne    1190 <main+0x60>
xor    %eax,%eax
add    $0x320,%rsp
pop    %rbx
ret
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [97 x i32]
%2 = alloca [97 x i32]
%3 = bitcast [97 x i32]* %1 to i8*
%4 = bitcast [97 x i32]* %2 to i8*
%5 = tail call i32 (...) @check_vect()
br label %6
6: ; preds = %0, %6
%7 = phi i64 [ 0, %0 ], [ %10, %6 ]
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
%8 = getelementptr inbounds [97 x i32], [97 x i32]* %2, i64 0, i64 %7
%9 = trunc i64 %7 to i32
store i32 %9, i32* %8
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, 97
br i1 %11, label %12, label %6
12: ; preds = %6
%13 = getelementptr inbounds [97 x i32], [97 x i32]* %1, i64 0, i64 0
%14 = getelementptr inbounds [97 x i32], [97 x i32]* %2, i64 0, i64 0
%15 = call i32 (i32, i32, i32*, i32*, ...) bitcast (i32 (...)* @liveloop to i32 (i32, i32, i32*, i32*, ...)*)(i32 13, i32 97, i32* %13, i32* %14)
%16 = icmp eq i32 %15, 96
br i1 %16, label %21, label %17
17: ; preds = %12
unreachable
18: ; preds = %21
%19 = add nuw nsw i64 %22, 1
%20 = icmp eq i64 %19, 97
br i1 %20, label %29, label %21
21: ; preds = %12, %18
%22 = phi i64 [ %19, %18 ], [ 0, %12 ]
%23 = getelementptr inbounds [97 x i32], [97 x i32]* %1, i64 0, i64 %22
%24 = load i32, i32* %23
%25 = add nuw nsw i64 %22, 14
%26 = zext i32 %24 to i64
%27 = icmp eq i64 %25, %26
br i1 %27, label %18, label %28
28: ; preds = %21
unreachable
29: ; preds = %18
ret i32 0
}