#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 generated_by_testExe1();
int generated_by_testExe3();
int testLib2();
int testLib3();
int testLib4();
int testLib4lib();
int testLib4libopt();
int testLib5();
int testLib6();
int testLibCycleA1();
int main() {
  return (testLib2() + generated_by_testExe1() + testLib3() + testLib4() +
          testLib5() + testLib6() + testLibCycleA1() + generated_by_testExe3() +
          testLib4lib() + testLib4libopt());
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1090 <testLib2@plt>
mov    %eax,-0x28(%rbp)
mov    $0x0,%al
call   10c0 <generated_by_testExe1@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1040 <testLib3@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   1080 <testLib4@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1030 <testLib5@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1070 <testLib6@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   10a0 <testLibCycleA1@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <generated_by_testExe3@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <testLib4lib@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   10b0 <testLib4libopt@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1090 <testLib2@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   10c0 <generated_by_testExe1@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1040 <testLib3@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1080 <testLib4@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1030 <testLib5@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1070 <testLib6@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   10a0 <testLibCycleA1@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1060 <generated_by_testExe3@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1050 <testLib4lib@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   10b0 <testLib4libopt@plt>
add    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @testLib2()
%3 = call i32 (...) @generated_by_testExe1()
%4 = add nsw i32 %2, %3
%5 = call i32 (...) @testLib3()
%6 = add nsw i32 %4, %5
%7 = call i32 (...) @testLib4()
%8 = add nsw i32 %6, %7
%9 = call i32 (...) @testLib5()
%10 = add nsw i32 %8, %9
%11 = call i32 (...) @testLib6()
%12 = add nsw i32 %10, %11
%13 = call i32 (...) @testLibCycleA1()
%14 = add nsw i32 %12, %13
%15 = call i32 (...) @generated_by_testExe3()
%16 = add nsw i32 %14, %15
%17 = call i32 (...) @testLib4lib()
%18 = add nsw i32 %16, %17
%19 = call i32 (...) @testLib4libopt()
%20 = add nsw i32 %18, %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @testLib2()
%2 = tail call i32 (...) @generated_by_testExe1()
%3 = add nsw i32 %2, %1
%4 = tail call i32 (...) @testLib3()
%5 = add nsw i32 %3, %4
%6 = tail call i32 (...) @testLib4()
%7 = add nsw i32 %5, %6
%8 = tail call i32 (...) @testLib5()
%9 = add nsw i32 %7, %8
%10 = tail call i32 (...) @testLib6()
%11 = add nsw i32 %9, %10
%12 = tail call i32 (...) @testLibCycleA1()
%13 = add nsw i32 %11, %12
%14 = tail call i32 (...) @generated_by_testExe3()
%15 = add nsw i32 %13, %14
%16 = tail call i32 (...) @testLib4lib()
%17 = add nsw i32 %15, %16
%18 = tail call i32 (...) @testLib4libopt()
%19 = add nsw i32 %17, %18
ret i32 %19
}