#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 */
scalar_t__ test_linked_list();
scalar_t__ test_random();
scalar_t__ test_sort();
scalar_t__ test_vqueue();
scalar_t__ test_vstack();
int test_all() {
  int result = 0;
  result += test_random();
  result += test_linked_list();
  result += test_vstack();
  result += test_vqueue();
  result += test_sort();
  return result;
}


x86 assembly (clang, -O0):
<test_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_random@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <test_linked_list@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1070 <test_vstack@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1060 <test_vqueue@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <test_sort@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_all>:
push   %r15
push   %r14
push   %rbx
xor    %eax,%eax
call   1030 <test_random@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1040 <test_linked_list@plt>
mov    %rax,%r15
add    %r14d,%r15d
xor    %eax,%eax
call   1070 <test_vstack@plt>
mov    %rax,%rbx
add    %r15d,%ebx
xor    %eax,%eax
call   1060 <test_vqueue@plt>
mov    %rax,%r14
add    %ebx,%r14d
xor    %eax,%eax
call   1050 <test_sort@plt>
add    %r14d,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @test_all() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @test_random()
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
%5 = add nsw i64 %4, %2
%6 = trunc i64 %5 to i32
store i32 %6, i32* %1
%7 = call i64 (...) @test_linked_list()
%8 = load i32, i32* %1
%9 = sext i32 %8 to i64
%10 = add nsw i64 %9, %7
%11 = trunc i64 %10 to i32
store i32 %11, i32* %1
%12 = call i64 (...) @test_vstack()
%13 = load i32, i32* %1
%14 = sext i32 %13 to i64
%15 = add nsw i64 %14, %12
%16 = trunc i64 %15 to i32
store i32 %16, i32* %1
%17 = call i64 (...) @test_vqueue()
%18 = load i32, i32* %1
%19 = sext i32 %18 to i64
%20 = add nsw i64 %19, %17
%21 = trunc i64 %20 to i32
store i32 %21, i32* %1
%22 = call i64 (...) @test_sort()
%23 = load i32, i32* %1
%24 = sext i32 %23 to i64
%25 = add nsw i64 %24, %22
%26 = trunc i64 %25 to i32
store i32 %26, i32* %1
%27 = load i32, i32* %1
ret i32 %27
}

LLVM IR (-O2):
define i32 @test_all() {
%1 = tail call i64 (...) @test_random()
%2 = tail call i64 (...) @test_linked_list()
%3 = add i64 %2, %1
%4 = tail call i64 (...) @test_vstack()
%5 = add i64 %3, %4
%6 = tail call i64 (...) @test_vqueue()
%7 = add i64 %5, %6
%8 = tail call i64 (...) @test_sort()
%9 = add i64 %7, %8
%10 = trunc i64 %9 to i32
ret i32 %10
}