#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 base1();
int base10();
int base11();
int base12();
int base13();
int base2();
int base3();
int base4();
int base5();
int base6();
int base7();
int base8();
int base9();
int overloaded1();
int overloaded2();
int test() {
  return base1() + base2() + base3() + base4() + base5() + base6() + base7() +
         base8() + base9() + base10() + base11() + base12() + base13() +
         overloaded1() + overloaded2();
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    $0x0,%al
call   10a0 <base1@plt>
mov    %eax,-0x38(%rbp)
mov    $0x0,%al
call   1110 <base2@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x34(%rbp)
mov    $0x0,%al
call   1080 <base3@plt>
mov    %eax,%ecx
mov    -0x34(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x30(%rbp)
mov    $0x0,%al
call   1100 <base4@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x2c(%rbp)
mov    $0x0,%al
call   1090 <base5@plt>
mov    %eax,%ecx
mov    -0x2c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x28(%rbp)
mov    $0x0,%al
call   1030 <base6@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   10b0 <base7@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   1040 <base8@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   10c0 <base9@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   10d0 <base10@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <base11@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   10e0 <base12@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1060 <base13@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1070 <overloaded1@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   10f0 <overloaded2@plt>
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
add    %ecx,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   10a0 <base1@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1110 <base2@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1080 <base3@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1100 <base4@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1090 <base5@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1030 <base6@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   10b0 <base7@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1040 <base8@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   10c0 <base9@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   10d0 <base10@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1050 <base11@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   10e0 <base12@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1060 <base13@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1070 <overloaded1@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   10f0 <overloaded2@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @test() {
%1 = call i32 (...) @base1()
%2 = call i32 (...) @base2()
%3 = add nsw i32 %1, %2
%4 = call i32 (...) @base3()
%5 = add nsw i32 %3, %4
%6 = call i32 (...) @base4()
%7 = add nsw i32 %5, %6
%8 = call i32 (...) @base5()
%9 = add nsw i32 %7, %8
%10 = call i32 (...) @base6()
%11 = add nsw i32 %9, %10
%12 = call i32 (...) @base7()
%13 = add nsw i32 %11, %12
%14 = call i32 (...) @base8()
%15 = add nsw i32 %13, %14
%16 = call i32 (...) @base9()
%17 = add nsw i32 %15, %16
%18 = call i32 (...) @base10()
%19 = add nsw i32 %17, %18
%20 = call i32 (...) @base11()
%21 = add nsw i32 %19, %20
%22 = call i32 (...) @base12()
%23 = add nsw i32 %21, %22
%24 = call i32 (...) @base13()
%25 = add nsw i32 %23, %24
%26 = call i32 (...) @overloaded1()
%27 = add nsw i32 %25, %26
%28 = call i32 (...) @overloaded2()
%29 = add nsw i32 %27, %28
ret i32 %29
}

LLVM IR (-O2):
define i32 @test() {
%1 = tail call i32 (...) @base1()
%2 = tail call i32 (...) @base2()
%3 = add nsw i32 %2, %1
%4 = tail call i32 (...) @base3()
%5 = add nsw i32 %3, %4
%6 = tail call i32 (...) @base4()
%7 = add nsw i32 %5, %6
%8 = tail call i32 (...) @base5()
%9 = add nsw i32 %7, %8
%10 = tail call i32 (...) @base6()
%11 = add nsw i32 %9, %10
%12 = tail call i32 (...) @base7()
%13 = add nsw i32 %11, %12
%14 = tail call i32 (...) @base8()
%15 = add nsw i32 %13, %14
%16 = tail call i32 (...) @base9()
%17 = add nsw i32 %15, %16
%18 = tail call i32 (...) @base10()
%19 = add nsw i32 %17, %18
%20 = tail call i32 (...) @base11()
%21 = add nsw i32 %19, %20
%22 = tail call i32 (...) @base12()
%23 = add nsw i32 %21, %22
%24 = tail call i32 (...) @base13()
%25 = add nsw i32 %23, %24
%26 = tail call i32 (...) @overloaded1()
%27 = add nsw i32 %25, %26
%28 = tail call i32 (...) @overloaded2()
%29 = add nsw i32 %27, %28
ret i32 %29
}