#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*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int f(int);
int main(void) {
  int a = 0;
  while ((f(f(f(f(f(f(f(f(f(f(1))))))))))) + a < 12) {
    a++;
    exit(0);
  }
  if (a != 1)
    abort();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1040 <f@plt>
mov    %eax,%edi
call   1040 <f@plt>
mov    %eax,%edi
call   1040 <f@plt>
mov    %eax,%edi
call   1040 <f@plt>
mov    %eax,%edi
call   1040 <f@plt>
mov    %eax,%edi
call   1040 <f@plt>
mov    %eax,%edi
call   1040 <f@plt>
mov    %eax,%edi
call   1040 <f@plt>
mov    %eax,%edi
call   1040 <f@plt>
mov    %eax,%edi
call   1040 <f@plt>
add    -0x4(%rbp),%eax
cmp    $0xc,%eax
jge    11a4 <main+0x74>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
xor    %edi,%edi
call   1050 <exit@plt>
cmpl   $0x1,-0x4(%rbp)
je     11b5 <main+0x85>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <f@plt>
mov    %eax,%edi
call   1040 <f@plt>
mov    %eax,%edi
call   1040 <f@plt>
mov    %eax,%edi
call   1040 <f@plt>
mov    %eax,%edi
call   1040 <f@plt>
mov    %eax,%edi
call   1040 <f@plt>
mov    %eax,%edi
call   1040 <f@plt>
mov    %eax,%edi
call   1040 <f@plt>
mov    %eax,%edi
call   1040 <f@plt>
mov    %eax,%edi
call   1040 <f@plt>
cmp    $0xb,%eax
jg     1186 <main+0x56>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0
%3 = call i32 @f(i32 1)
%4 = call i32 @f(i32 %3)
%5 = call i32 @f(i32 %4)
%6 = call i32 @f(i32 %5)
%7 = call i32 @f(i32 %6)
%8 = call i32 @f(i32 %7)
%9 = call i32 @f(i32 %8)
%10 = call i32 @f(i32 %9)
%11 = call i32 @f(i32 %10)
%12 = call i32 @f(i32 %11)
%13 = load i32, i32* %1
%14 = add nsw i32 %12, %13
%15 = icmp slt i32 %14, 12
br i1 %15, label %16, label %20
16: ; preds = %2
%17 = load i32, i32* %1
%18 = add nsw i32 %17, 1
store i32 %18, i32* %1
%19 = call i32 @exit(i32 0)
unreachable
20: ; preds = %2
%21 = load i32, i32* %1
%22 = icmp ne i32 %21, 1
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = call i32 (...) @abort()
unreachable
25: ; preds = %20
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 1)
%2 = tail call i32 @f(i32 %1)
%3 = tail call i32 @f(i32 %2)
%4 = tail call i32 @f(i32 %3)
%5 = tail call i32 @f(i32 %4)
%6 = tail call i32 @f(i32 %5)
%7 = tail call i32 @f(i32 %6)
%8 = tail call i32 @f(i32 %7)
%9 = tail call i32 @f(i32 %8)
%10 = tail call i32 @f(i32 %9)
%11 = icmp slt i32 %10, 12
br i1 %11, label %12, label %14
12: ; preds = %0
%13 = tail call i32 @exit(i32 0)
unreachable
14: ; preds = %0
%15 = tail call i32 (...) @abort()
unreachable
}