#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 f0();
int f1();
int f2();
int f3();
int f4();
int f5();
int f6();
int f7();
int f8();
int f9();
int fA();
int fB();
int test_all() {
  return f0() + f1() + f2() + f3() + f4() + f5() + f6() + f7() + f8() + f9() +
         fA() + fB();
}


x86 assembly (clang, -O0):
<test_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    $0x0,%al
call   1030 <f0@plt>
mov    %eax,-0x2c(%rbp)
mov    $0x0,%al
call   1090 <f1@plt>
mov    %eax,%ecx
mov    -0x2c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x28(%rbp)
mov    $0x0,%al
call   1040 <f2@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1080 <f3@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   10e0 <f4@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   10b0 <f5@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1060 <f6@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   10a0 <f7@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <f8@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   10c0 <f9@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   10d0 <fA@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1070 <fB@plt>
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
add    %ecx,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_all>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <f0@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1090 <f1@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1040 <f2@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1080 <f3@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   10e0 <f4@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   10b0 <f5@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1060 <f6@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   10a0 <f7@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1050 <f8@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   10c0 <f9@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   10d0 <fA@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1070 <fB@plt>
add    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @test_all() {
%1 = call i32 (...) @f0()
%2 = call i32 (...) @f1()
%3 = add nsw i32 %1, %2
%4 = call i32 (...) @f2()
%5 = add nsw i32 %3, %4
%6 = call i32 (...) @f3()
%7 = add nsw i32 %5, %6
%8 = call i32 (...) @f4()
%9 = add nsw i32 %7, %8
%10 = call i32 (...) @f5()
%11 = add nsw i32 %9, %10
%12 = call i32 (...) @f6()
%13 = add nsw i32 %11, %12
%14 = call i32 (...) @f7()
%15 = add nsw i32 %13, %14
%16 = call i32 (...) @f8()
%17 = add nsw i32 %15, %16
%18 = call i32 (...) @f9()
%19 = add nsw i32 %17, %18
%20 = call i32 (...) @fA()
%21 = add nsw i32 %19, %20
%22 = call i32 (...) @fB()
%23 = add nsw i32 %21, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @test_all() {
%1 = tail call i32 (...) @f0()
%2 = tail call i32 (...) @f1()
%3 = add nsw i32 %2, %1
%4 = tail call i32 (...) @f2()
%5 = add nsw i32 %3, %4
%6 = tail call i32 (...) @f3()
%7 = add nsw i32 %5, %6
%8 = tail call i32 (...) @f4()
%9 = add nsw i32 %7, %8
%10 = tail call i32 (...) @f5()
%11 = add nsw i32 %9, %10
%12 = tail call i32 (...) @f6()
%13 = add nsw i32 %11, %12
%14 = tail call i32 (...) @f7()
%15 = add nsw i32 %13, %14
%16 = tail call i32 (...) @f8()
%17 = add nsw i32 %15, %16
%18 = tail call i32 (...) @f9()
%19 = add nsw i32 %17, %18
%20 = tail call i32 (...) @fA()
%21 = add nsw i32 %19, %20
%22 = tail call i32 (...) @fB()
%23 = add nsw i32 %21, %22
ret i32 %23
}