#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*/ foo(int /*<<< orphan*/);
int main() {
  int x;
  x = 0;
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  foo(x++);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <foo@plt>
mov    $0x1,%edi
call   1030 <foo@plt>
mov    $0x2,%edi
call   1030 <foo@plt>
mov    $0x3,%edi
call   1030 <foo@plt>
mov    $0x4,%edi
call   1030 <foo@plt>
mov    $0x5,%edi
call   1030 <foo@plt>
mov    $0x6,%edi
call   1030 <foo@plt>
mov    $0x7,%edi
call   1030 <foo@plt>
mov    $0x8,%edi
call   1030 <foo@plt>
mov    $0x9,%edi
call   1030 <foo@plt>
mov    $0xa,%edi
call   1030 <foo@plt>
mov    $0xb,%edi
call   1030 <foo@plt>
mov    $0xc,%edi
call   1030 <foo@plt>
mov    $0xd,%edi
call   1030 <foo@plt>
mov    $0xe,%edi
call   1030 <foo@plt>
mov    $0xf,%edi
call   1030 <foo@plt>
mov    $0x10,%edi
call   1030 <foo@plt>
mov    $0x11,%edi
call   1030 <foo@plt>
mov    $0x12,%edi
call   1030 <foo@plt>
mov    $0x13,%edi
call   1030 <foo@plt>
mov    $0x14,%edi
call   1030 <foo@plt>
mov    $0x15,%edi
call   1030 <foo@plt>
mov    $0x16,%edi
call   1030 <foo@plt>
mov    $0x17,%edi
call   1030 <foo@plt>
mov    $0x18,%edi
call   1030 <foo@plt>
mov    $0x19,%edi
call   1030 <foo@plt>
mov    $0x1a,%edi
call   1030 <foo@plt>
mov    $0x1b,%edi
call   1030 <foo@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
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
store i32 %4, i32* %2
%5 = call i32 @foo(i32 %3)
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 1
store i32 %7, i32* %2
%8 = call i32 @foo(i32 %6)
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
%11 = call i32 @foo(i32 %9)
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
%14 = call i32 @foo(i32 %12)
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
%17 = call i32 @foo(i32 %15)
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
%20 = call i32 @foo(i32 %18)
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 1
store i32 %22, i32* %2
%23 = call i32 @foo(i32 %21)
%24 = load i32, i32* %2
%25 = add nsw i32 %24, 1
store i32 %25, i32* %2
%26 = call i32 @foo(i32 %24)
%27 = load i32, i32* %2
%28 = add nsw i32 %27, 1
store i32 %28, i32* %2
%29 = call i32 @foo(i32 %27)
%30 = load i32, i32* %2
%31 = add nsw i32 %30, 1
store i32 %31, i32* %2
%32 = call i32 @foo(i32 %30)
%33 = load i32, i32* %2
%34 = add nsw i32 %33, 1
store i32 %34, i32* %2
%35 = call i32 @foo(i32 %33)
%36 = load i32, i32* %2
%37 = add nsw i32 %36, 1
store i32 %37, i32* %2
%38 = call i32 @foo(i32 %36)
%39 = load i32, i32* %2
%40 = add nsw i32 %39, 1
store i32 %40, i32* %2
%41 = call i32 @foo(i32 %39)
%42 = load i32, i32* %2
%43 = add nsw i32 %42, 1
store i32 %43, i32* %2
%44 = call i32 @foo(i32 %42)
%45 = load i32, i32* %2
%46 = add nsw i32 %45, 1
store i32 %46, i32* %2
%47 = call i32 @foo(i32 %45)
%48 = load i32, i32* %2
%49 = add nsw i32 %48, 1
store i32 %49, i32* %2
%50 = call i32 @foo(i32 %48)
%51 = load i32, i32* %2
%52 = add nsw i32 %51, 1
store i32 %52, i32* %2
%53 = call i32 @foo(i32 %51)
%54 = load i32, i32* %2
%55 = add nsw i32 %54, 1
store i32 %55, i32* %2
%56 = call i32 @foo(i32 %54)
%57 = load i32, i32* %2
%58 = add nsw i32 %57, 1
store i32 %58, i32* %2
%59 = call i32 @foo(i32 %57)
%60 = load i32, i32* %2
%61 = add nsw i32 %60, 1
store i32 %61, i32* %2
%62 = call i32 @foo(i32 %60)
%63 = load i32, i32* %2
%64 = add nsw i32 %63, 1
store i32 %64, i32* %2
%65 = call i32 @foo(i32 %63)
%66 = load i32, i32* %2
%67 = add nsw i32 %66, 1
store i32 %67, i32* %2
%68 = call i32 @foo(i32 %66)
%69 = load i32, i32* %2
%70 = add nsw i32 %69, 1
store i32 %70, i32* %2
%71 = call i32 @foo(i32 %69)
%72 = load i32, i32* %2
%73 = add nsw i32 %72, 1
store i32 %73, i32* %2
%74 = call i32 @foo(i32 %72)
%75 = load i32, i32* %2
%76 = add nsw i32 %75, 1
store i32 %76, i32* %2
%77 = call i32 @foo(i32 %75)
%78 = load i32, i32* %2
%79 = add nsw i32 %78, 1
store i32 %79, i32* %2
%80 = call i32 @foo(i32 %78)
%81 = load i32, i32* %2
%82 = add nsw i32 %81, 1
store i32 %82, i32* %2
%83 = call i32 @foo(i32 %81)
%84 = load i32, i32* %2
%85 = add nsw i32 %84, 1
store i32 %85, i32* %2
%86 = call i32 @foo(i32 %84)
ret i32 0
}

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