#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*/ bar(int /*<<< orphan*/);
void foo(int x) {
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
  bar(x++);
}


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

x86 assembly (clang, -O2):
<foo>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
lea    0x1(%rbx),%ebp
call   1030 <bar@plt>
lea    0x2(%rbx),%r14d
mov    %ebp,%edi
call   1030 <bar@plt>
lea    0x3(%rbx),%ebp
mov    %r14d,%edi
call   1030 <bar@plt>
lea    0x4(%rbx),%r14d
mov    %ebp,%edi
call   1030 <bar@plt>
lea    0x5(%rbx),%ebp
mov    %r14d,%edi
call   1030 <bar@plt>
lea    0x6(%rbx),%r14d
mov    %ebp,%edi
call   1030 <bar@plt>
lea    0x7(%rbx),%ebp
mov    %r14d,%edi
call   1030 <bar@plt>
lea    0x8(%rbx),%r14d
mov    %ebp,%edi
call   1030 <bar@plt>
lea    0x9(%rbx),%ebp
mov    %r14d,%edi
call   1030 <bar@plt>
lea    0xa(%rbx),%r14d
mov    %ebp,%edi
call   1030 <bar@plt>
lea    0xb(%rbx),%ebp
mov    %r14d,%edi
call   1030 <bar@plt>
lea    0xc(%rbx),%r14d
mov    %ebp,%edi
call   1030 <bar@plt>
lea    0xd(%rbx),%ebp
mov    %r14d,%edi
call   1030 <bar@plt>
lea    0xe(%rbx),%r14d
mov    %ebp,%edi
call   1030 <bar@plt>
lea    0xf(%rbx),%ebp
mov    %r14d,%edi
call   1030 <bar@plt>
lea    0x10(%rbx),%r14d
mov    %ebp,%edi
call   1030 <bar@plt>
lea    0x11(%rbx),%ebp
mov    %r14d,%edi
call   1030 <bar@plt>
lea    0x12(%rbx),%r14d
mov    %ebp,%edi
call   1030 <bar@plt>
lea    0x13(%rbx),%ebp
mov    %r14d,%edi
call   1030 <bar@plt>
lea    0x14(%rbx),%r14d
mov    %ebp,%edi
call   1030 <bar@plt>
lea    0x15(%rbx),%ebp
mov    %r14d,%edi
call   1030 <bar@plt>
lea    0x16(%rbx),%r14d
mov    %ebp,%edi
call   1030 <bar@plt>
lea    0x17(%rbx),%ebp
mov    %r14d,%edi
call   1030 <bar@plt>
lea    0x18(%rbx),%r14d
mov    %ebp,%edi
call   1030 <bar@plt>
lea    0x19(%rbx),%ebp
mov    %r14d,%edi
call   1030 <bar@plt>
lea    0x1a(%rbx),%r14d
mov    %ebp,%edi
call   1030 <bar@plt>
add    $0x1b,%ebx
mov    %r14d,%edi
call   1030 <bar@plt>
mov    %ebx,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <bar@plt>

LLVM IR (-O0):
define void @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
store i32 %4, i32* %2
%5 = call i32 @bar(i32 %3)
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 1
store i32 %7, i32* %2
%8 = call i32 @bar(i32 %6)
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
%11 = call i32 @bar(i32 %9)
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
%14 = call i32 @bar(i32 %12)
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
%17 = call i32 @bar(i32 %15)
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
%20 = call i32 @bar(i32 %18)
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 1
store i32 %22, i32* %2
%23 = call i32 @bar(i32 %21)
%24 = load i32, i32* %2
%25 = add nsw i32 %24, 1
store i32 %25, i32* %2
%26 = call i32 @bar(i32 %24)
%27 = load i32, i32* %2
%28 = add nsw i32 %27, 1
store i32 %28, i32* %2
%29 = call i32 @bar(i32 %27)
%30 = load i32, i32* %2
%31 = add nsw i32 %30, 1
store i32 %31, i32* %2
%32 = call i32 @bar(i32 %30)
%33 = load i32, i32* %2
%34 = add nsw i32 %33, 1
store i32 %34, i32* %2
%35 = call i32 @bar(i32 %33)
%36 = load i32, i32* %2
%37 = add nsw i32 %36, 1
store i32 %37, i32* %2
%38 = call i32 @bar(i32 %36)
%39 = load i32, i32* %2
%40 = add nsw i32 %39, 1
store i32 %40, i32* %2
%41 = call i32 @bar(i32 %39)
%42 = load i32, i32* %2
%43 = add nsw i32 %42, 1
store i32 %43, i32* %2
%44 = call i32 @bar(i32 %42)
%45 = load i32, i32* %2
%46 = add nsw i32 %45, 1
store i32 %46, i32* %2
%47 = call i32 @bar(i32 %45)
%48 = load i32, i32* %2
%49 = add nsw i32 %48, 1
store i32 %49, i32* %2
%50 = call i32 @bar(i32 %48)
%51 = load i32, i32* %2
%52 = add nsw i32 %51, 1
store i32 %52, i32* %2
%53 = call i32 @bar(i32 %51)
%54 = load i32, i32* %2
%55 = add nsw i32 %54, 1
store i32 %55, i32* %2
%56 = call i32 @bar(i32 %54)
%57 = load i32, i32* %2
%58 = add nsw i32 %57, 1
store i32 %58, i32* %2
%59 = call i32 @bar(i32 %57)
%60 = load i32, i32* %2
%61 = add nsw i32 %60, 1
store i32 %61, i32* %2
%62 = call i32 @bar(i32 %60)
%63 = load i32, i32* %2
%64 = add nsw i32 %63, 1
store i32 %64, i32* %2
%65 = call i32 @bar(i32 %63)
%66 = load i32, i32* %2
%67 = add nsw i32 %66, 1
store i32 %67, i32* %2
%68 = call i32 @bar(i32 %66)
%69 = load i32, i32* %2
%70 = add nsw i32 %69, 1
store i32 %70, i32* %2
%71 = call i32 @bar(i32 %69)
%72 = load i32, i32* %2
%73 = add nsw i32 %72, 1
store i32 %73, i32* %2
%74 = call i32 @bar(i32 %72)
%75 = load i32, i32* %2
%76 = add nsw i32 %75, 1
store i32 %76, i32* %2
%77 = call i32 @bar(i32 %75)
%78 = load i32, i32* %2
%79 = add nsw i32 %78, 1
store i32 %79, i32* %2
%80 = call i32 @bar(i32 %78)
%81 = load i32, i32* %2
%82 = add nsw i32 %81, 1
store i32 %82, i32* %2
%83 = call i32 @bar(i32 %81)
%84 = load i32, i32* %2
%85 = add nsw i32 %84, 1
store i32 %85, i32* %2
%86 = call i32 @bar(i32 %84)
ret void
}

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