#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 callee0(int);
int callee1(int);
int callee2(int);
int callee3(int);
int callee4(int);
int callee5(int);
int increment(int);
int caller3(void) {
  register int l1 = increment(0xfeeb);
  register int l2 = increment(l1);
  register int l3 = increment(l2);
  register int n;
  n = callee0(l3);
  n = callee1(n + l3);
  n = callee2(n + l3);
  n = callee3(n + l3);
  n = callee4(n + l3);
  n = callee5(n + l3);
  return n + l1 + l2 + l3;
}


x86 assembly (clang, -O0):
<caller3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xfeeb,%edi
call   1030 <increment@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <increment@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <increment@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1070 <callee0@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
add    -0xc(%rbp),%edi
call   1060 <callee1@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
add    -0xc(%rbp),%edi
call   1080 <callee2@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
add    -0xc(%rbp),%edi
call   1040 <callee3@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
add    -0xc(%rbp),%edi
call   1090 <callee4@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
add    -0xc(%rbp),%edi
call   1050 <callee5@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<caller3>:
push   %rbp
push   %r14
push   %rbx
mov    $0xfeeb,%edi
call   1030 <increment@plt>
mov    %eax,%r14d
mov    %eax,%edi
call   1030 <increment@plt>
mov    %eax,%ebp
mov    %eax,%edi
call   1030 <increment@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1070 <callee0@plt>
lea    (%rax,%rbx,1),%edi
call   1060 <callee1@plt>
lea    (%rax,%rbx,1),%edi
call   1080 <callee2@plt>
lea    (%rax,%rbx,1),%edi
call   1040 <callee3@plt>
lea    (%rax,%rbx,1),%edi
call   1090 <callee4@plt>
lea    (%rax,%rbx,1),%edi
call   1050 <callee5@plt>
add    %r14d,%ebp
add    %ebx,%ebp
add    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @caller3() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 @increment(i32 65259)
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = call i32 @increment(i32 %6)
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = call i32 @increment(i32 %8)
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = call i32 @callee0(i32 %10)
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = load i32, i32* %3
%14 = add nsw i32 %12, %13
%15 = call i32 @callee1(i32 %14)
store i32 %15, i32* %4
%16 = load i32, i32* %4
%17 = load i32, i32* %3
%18 = add nsw i32 %16, %17
%19 = call i32 @callee2(i32 %18)
store i32 %19, i32* %4
%20 = load i32, i32* %4
%21 = load i32, i32* %3
%22 = add nsw i32 %20, %21
%23 = call i32 @callee3(i32 %22)
store i32 %23, i32* %4
%24 = load i32, i32* %4
%25 = load i32, i32* %3
%26 = add nsw i32 %24, %25
%27 = call i32 @callee4(i32 %26)
store i32 %27, i32* %4
%28 = load i32, i32* %4
%29 = load i32, i32* %3
%30 = add nsw i32 %28, %29
%31 = call i32 @callee5(i32 %30)
store i32 %31, i32* %4
%32 = load i32, i32* %4
%33 = load i32, i32* %1
%34 = add nsw i32 %32, %33
%35 = load i32, i32* %2
%36 = add nsw i32 %34, %35
%37 = load i32, i32* %3
%38 = add nsw i32 %36, %37
ret i32 %38
}

LLVM IR (-O2):
define i32 @caller3() {
%1 = tail call i32 @increment(i32 65259)
%2 = tail call i32 @increment(i32 %1)
%3 = tail call i32 @increment(i32 %2)
%4 = tail call i32 @callee0(i32 %3)
%5 = add nsw i32 %4, %3
%6 = tail call i32 @callee1(i32 %5)
%7 = add nsw i32 %6, %3
%8 = tail call i32 @callee2(i32 %7)
%9 = add nsw i32 %8, %3
%10 = tail call i32 @callee3(i32 %9)
%11 = add nsw i32 %10, %3
%12 = tail call i32 @callee4(i32 %11)
%13 = add nsw i32 %12, %3
%14 = tail call i32 @callee5(i32 %13)
%15 = add i32 %2, %1
%16 = add i32 %15, %3
%17 = add i32 %16, %14
ret i32 %17
}