#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*/ engine();
int main(void) {
  int i = 0, fail = 0;
  engine();
  for (i = 0; i < 50; i++)
    engine();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1030 <engine@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x32,-0x8(%rbp)
jge    115a <main+0x4a>
mov    $0x0,%al
call   1030 <engine@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113b <main+0x2b>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @engine()
%2 = tail call i32 (...) @engine()
%3 = tail call i32 (...) @engine()
%4 = tail call i32 (...) @engine()
%5 = tail call i32 (...) @engine()
%6 = tail call i32 (...) @engine()
%7 = tail call i32 (...) @engine()
%8 = tail call i32 (...) @engine()
%9 = tail call i32 (...) @engine()
%10 = tail call i32 (...) @engine()
%11 = tail call i32 (...) @engine()
%12 = tail call i32 (...) @engine()
%13 = tail call i32 (...) @engine()
%14 = tail call i32 (...) @engine()
%15 = tail call i32 (...) @engine()
%16 = tail call i32 (...) @engine()
%17 = tail call i32 (...) @engine()
%18 = tail call i32 (...) @engine()
%19 = tail call i32 (...) @engine()
%20 = tail call i32 (...) @engine()
%21 = tail call i32 (...) @engine()
%22 = tail call i32 (...) @engine()
%23 = tail call i32 (...) @engine()
%24 = tail call i32 (...) @engine()
%25 = tail call i32 (...) @engine()
%26 = tail call i32 (...) @engine()
%27 = tail call i32 (...) @engine()
%28 = tail call i32 (...) @engine()
%29 = tail call i32 (...) @engine()
%30 = tail call i32 (...) @engine()
%31 = tail call i32 (...) @engine()
%32 = tail call i32 (...) @engine()
%33 = tail call i32 (...) @engine()
%34 = tail call i32 (...) @engine()
%35 = tail call i32 (...) @engine()
%36 = tail call i32 (...) @engine()
%37 = tail call i32 (...) @engine()
%38 = tail call i32 (...) @engine()
%39 = tail call i32 (...) @engine()
%40 = tail call i32 (...) @engine()
%41 = tail call i32 (...) @engine()
%42 = tail call i32 (...) @engine()
%43 = tail call i32 (...) @engine()
%44 = tail call i32 (...) @engine()
%45 = tail call i32 (...) @engine()
%46 = tail call i32 (...) @engine()
%47 = tail call i32 (...) @engine()
%48 = tail call i32 (...) @engine()
%49 = tail call i32 (...) @engine()
%50 = tail call i32 (...) @engine()
%51 = tail call i32 (...) @engine()
ret i32 0
}