#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*/ check();
int /*<<< orphan*/ stack();
int /*<<< orphan*/ tst();
int main(void) {
  int i;
  for (i = 0; i < 10; i++) {
    tst();
    stack();
    check();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1173 <main+0x43>
mov    $0x0,%al
call   1030 <tst@plt>
mov    $0x0,%al
call   1040 <stack@plt>
mov    $0x0,%al
call   1050 <check@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <tst@plt>
xor    %eax,%eax
call   1040 <stack@plt>
xor    %eax,%eax
call   1050 <check@plt>
xor    %eax,%eax
call   1030 <tst@plt>
xor    %eax,%eax
call   1040 <stack@plt>
xor    %eax,%eax
call   1050 <check@plt>
xor    %eax,%eax
call   1030 <tst@plt>
xor    %eax,%eax
call   1040 <stack@plt>
xor    %eax,%eax
call   1050 <check@plt>
xor    %eax,%eax
call   1030 <tst@plt>
xor    %eax,%eax
call   1040 <stack@plt>
xor    %eax,%eax
call   1050 <check@plt>
xor    %eax,%eax
call   1030 <tst@plt>
xor    %eax,%eax
call   1040 <stack@plt>
xor    %eax,%eax
call   1050 <check@plt>
xor    %eax,%eax
call   1030 <tst@plt>
xor    %eax,%eax
call   1040 <stack@plt>
xor    %eax,%eax
call   1050 <check@plt>
xor    %eax,%eax
call   1030 <tst@plt>
xor    %eax,%eax
call   1040 <stack@plt>
xor    %eax,%eax
call   1050 <check@plt>
xor    %eax,%eax
call   1030 <tst@plt>
xor    %eax,%eax
call   1040 <stack@plt>
xor    %eax,%eax
call   1050 <check@plt>
xor    %eax,%eax
call   1030 <tst@plt>
xor    %eax,%eax
call   1040 <stack@plt>
xor    %eax,%eax
call   1050 <check@plt>
xor    %eax,%eax
call   1030 <tst@plt>
xor    %eax,%eax
call   1040 <stack@plt>
xor    %eax,%eax
call   1050 <check@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %10, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 10
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = call i32 (...) @tst()
%8 = call i32 (...) @stack()
%9 = call i32 (...) @check()
br label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %3
13: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @tst()
%2 = tail call i32 (...) @stack()
%3 = tail call i32 (...) @check()
%4 = tail call i32 (...) @tst()
%5 = tail call i32 (...) @stack()
%6 = tail call i32 (...) @check()
%7 = tail call i32 (...) @tst()
%8 = tail call i32 (...) @stack()
%9 = tail call i32 (...) @check()
%10 = tail call i32 (...) @tst()
%11 = tail call i32 (...) @stack()
%12 = tail call i32 (...) @check()
%13 = tail call i32 (...) @tst()
%14 = tail call i32 (...) @stack()
%15 = tail call i32 (...) @check()
%16 = tail call i32 (...) @tst()
%17 = tail call i32 (...) @stack()
%18 = tail call i32 (...) @check()
%19 = tail call i32 (...) @tst()
%20 = tail call i32 (...) @stack()
%21 = tail call i32 (...) @check()
%22 = tail call i32 (...) @tst()
%23 = tail call i32 (...) @stack()
%24 = tail call i32 (...) @check()
%25 = tail call i32 (...) @tst()
%26 = tail call i32 (...) @stack()
%27 = tail call i32 (...) @check()
%28 = tail call i32 (...) @tst()
%29 = tail call i32 (...) @stack()
%30 = tail call i32 (...) @check()
ret i32 0
}