#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 /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ run_genome_tests();
int /*<<< orphan*/ run_goal_tests();
int /*<<< orphan*/ run_plot_tests();
int /*<<< orphan*/ run_population_tests();
int /*<<< orphan*/ run_program_tests();
int /*<<< orphan*/ run_shell_command(char *);
int /*<<< orphan*/ run_system_tests();
int /*<<< orphan*/ test_directory_exists();
int /*<<< orphan*/ test_file_exists();
int /*<<< orphan*/ test_get_line_number_from_string_in_file();
int /*<<< orphan*/ test_rand_num();
int /*<<< orphan*/ test_run_shell_command_with_output();
int /*<<< orphan*/ test_software_exists();
void run_tests() {
  printf("Running unit tests for %s version %s\n", (char *)"scalam",
         (char *)"0.1");
  run_shell_command("rm -rf /tmp/scalam.*");
  test_rand_num();
  test_file_exists();
  test_directory_exists();
  test_software_exists();
  test_run_shell_command_with_output();
  test_get_line_number_from_string_in_file();
  run_program_tests();
  run_system_tests();
  run_population_tests();
  run_genome_tests();
  run_goal_tests();
  run_plot_tests();
  run_shell_command("rm -rf /tmp/scalam.*");
  printf("All tests passed\n");
}


x86 assembly (clang, -O0):
<run_tests>:
push   %rbp
mov    %rsp,%rbp
lea    0xe15(%rip),%rdi
lea    0xe34(%rip),%rsi
lea    0xe34(%rip),%rdx
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xe2a(%rip),%rdi
call   1060 <run_shell_command@plt>
mov    $0x0,%al
call   10e0 <test_rand_num@plt>
mov    $0x0,%al
call   1040 <test_file_exists@plt>
mov    $0x0,%al
call   1050 <test_directory_exists@plt>
mov    $0x0,%al
call   10b0 <test_software_exists@plt>
mov    $0x0,%al
call   10d0 <test_run_shell_command_with_output@plt>
mov    $0x0,%al
call   10f0 <test_get_line_number_from_string_in_file@plt>
mov    $0x0,%al
call   10a0 <run_program_tests@plt>
mov    $0x0,%al
call   1030 <run_system_tests@plt>
mov    $0x0,%al
call   1090 <run_population_tests@plt>
mov    $0x0,%al
call   1100 <run_genome_tests@plt>
mov    $0x0,%al
call   1080 <run_goal_tests@plt>
mov    $0x0,%al
call   10c0 <run_plot_tests@plt>
lea    0xdca(%rip),%rdi
call   1060 <run_shell_command@plt>
lea    0xdd3(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_tests>:
push   %rbx
lea    0xe08(%rip),%rdi
lea    0xe27(%rip),%rsi
lea    0xe27(%rip),%rdx
xor    %eax,%eax
call   1080 <printf@plt>
lea    0xe1d(%rip),%rbx
mov    %rbx,%rdi
call   1070 <run_shell_command@plt>
xor    %eax,%eax
call   10f0 <test_rand_num@plt>
xor    %eax,%eax
call   1050 <test_file_exists@plt>
xor    %eax,%eax
call   1060 <test_directory_exists@plt>
xor    %eax,%eax
call   10c0 <test_software_exists@plt>
xor    %eax,%eax
call   10e0 <test_run_shell_command_with_output@plt>
xor    %eax,%eax
call   1100 <test_get_line_number_from_string_in_file@plt>
xor    %eax,%eax
call   10b0 <run_program_tests@plt>
xor    %eax,%eax
call   1030 <run_system_tests@plt>
xor    %eax,%eax
call   10a0 <run_population_tests@plt>
xor    %eax,%eax
call   1110 <run_genome_tests@plt>
xor    %eax,%eax
call   1090 <run_goal_tests@plt>
xor    %eax,%eax
call   10d0 <run_plot_tests@plt>
mov    %rbx,%rdi
call   1070 <run_shell_command@plt>
lea    0xdc7(%rip),%rdi
pop    %rbx
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"Running unit tests for %s version %s\0A\00"
@.str.1 = [7 x i8] c"scalam\00"
@.str.2 = [4 x i8] c"0.1\00"
@.str.3 = [21 x i8] c"rm -rf /tmp/scalam.*\00"
@.str.4 = [18 x i8] c"All tests passed\0A\00"
define void @run_tests() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%2 = call i32 @run_shell_command(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%3 = call i32 (...) @test_rand_num()
%4 = call i32 (...) @test_file_exists()
%5 = call i32 (...) @test_directory_exists()
%6 = call i32 (...) @test_software_exists()
%7 = call i32 (...) @test_run_shell_command_with_output()
%8 = call i32 (...) @test_get_line_number_from_string_in_file()
%9 = call i32 (...) @run_program_tests()
%10 = call i32 (...) @run_system_tests()
%11 = call i32 (...) @run_population_tests()
%12 = call i32 (...) @run_genome_tests()
%13 = call i32 (...) @run_goal_tests()
%14 = call i32 (...) @run_plot_tests()
%15 = call i32 @run_shell_command(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"Running unit tests for %s version %s\0A\00"
@.str.1 = [7 x i8] c"scalam\00"
@.str.2 = [4 x i8] c"0.1\00"
@.str.3 = [21 x i8] c"rm -rf /tmp/scalam.*\00"
@str = [17 x i8] c"All tests passed\00"
define void @run_tests() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 @run_shell_command(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 (...) @test_rand_num()
%4 = tail call i32 (...) @test_file_exists()
%5 = tail call i32 (...) @test_directory_exists()
%6 = tail call i32 (...) @test_software_exists()
%7 = tail call i32 (...) @test_run_shell_command_with_output()
%8 = tail call i32 (...) @test_get_line_number_from_string_in_file()
%9 = tail call i32 (...) @run_program_tests()
%10 = tail call i32 (...) @run_system_tests()
%11 = tail call i32 (...) @run_population_tests()
%12 = tail call i32 (...) @run_genome_tests()
%13 = tail call i32 (...) @run_goal_tests()
%14 = tail call i32 (...) @run_plot_tests()
%15 = tail call i32 @run_shell_command(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}