#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*/ build_full_file_path(char const *, char *, char *, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ run_tests_with_file(int /*<<< orphan*/, int);
void small_test_suite(const char *root_dir) {
  char file_name_buffer[128];
  printf("File Name,Propagation Type,Number of Nodes,Number of "
         "Edges,Diameter,Number of Iterations,BP Run Time(s)\n");
  run_tests_with_file(
      build_full_file_path(root_dir, "asia.bif", file_name_buffer, 128), 1);
  run_tests_with_file(
      build_full_file_path(root_dir, "cancer.bif", file_name_buffer, 128), 1);
  run_tests_with_file(
      build_full_file_path(root_dir, "earthquake.bif", file_name_buffer, 128),
      1);
  run_tests_with_file(
      build_full_file_path(root_dir, "sachs.bif", file_name_buffer, 128), 1);
  run_tests_with_file(
      build_full_file_path(root_dir, "survey.bif", file_name_buffer, 128), 1);
}


x86 assembly (clang, -O0):
<small_test_suite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x90(%rbp),%rdx
lea    0xf0c(%rip),%rsi
mov    $0x80,%ecx
call   1030 <build_full_file_path@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1050 <run_tests_with_file@plt>
mov    -0x8(%rbp),%rdi
lea    -0x90(%rbp),%rdx
lea    0xeed(%rip),%rsi
mov    $0x80,%ecx
call   1030 <build_full_file_path@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1050 <run_tests_with_file@plt>
mov    -0x8(%rbp),%rdi
lea    -0x90(%rbp),%rdx
lea    0xed0(%rip),%rsi
mov    $0x80,%ecx
call   1030 <build_full_file_path@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1050 <run_tests_with_file@plt>
mov    -0x8(%rbp),%rdi
lea    -0x90(%rbp),%rdx
lea    0xeb7(%rip),%rsi
mov    $0x80,%ecx
call   1030 <build_full_file_path@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1050 <run_tests_with_file@plt>
mov    -0x8(%rbp),%rdi
lea    -0x90(%rbp),%rdx
lea    0xe99(%rip),%rsi
mov    $0x80,%ecx
call   1030 <build_full_file_path@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1050 <run_tests_with_file@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<small_test_suite>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %rdi,%rbx
lea    0xef4(%rip),%rdi
call   1040 <puts@plt>
lea    0xeb0(%rip),%rsi
mov    %rsp,%r14
mov    %rbx,%rdi
mov    %r14,%rdx
mov    $0x80,%ecx
call   1030 <build_full_file_path@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1050 <run_tests_with_file@plt>
lea    0xe93(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
mov    $0x80,%ecx
call   1030 <build_full_file_path@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1050 <run_tests_with_file@plt>
lea    0xe7b(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
mov    $0x80,%ecx
call   1030 <build_full_file_path@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1050 <run_tests_with_file@plt>
lea    0xe67(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
mov    $0x80,%ecx
call   1030 <build_full_file_path@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1050 <run_tests_with_file@plt>
lea    0xe4e(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
mov    $0x80,%ecx
call   1030 <build_full_file_path@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1050 <run_tests_with_file@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [105 x i8] c"File Name,Propagation Type,Number of Nodes,Number of Edges,Diameter,Number of Iterations,BP Run Time(s)\0A\00"
@.str.1 = [9 x i8] c"asia.bif\00"
@.str.2 = [11 x i8] c"cancer.bif\00"
@.str.3 = [15 x i8] c"earthquake.bif\00"
@.str.4 = [10 x i8] c"sachs.bif\00"
@.str.5 = [11 x i8] c"survey.bif\00"
define void @small_test_suite(i8* %0) {
%2 = alloca i8*
%3 = alloca [128 x i8]
store i8* %0, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%7 = call i32 @build_full_file_path(i8* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %6, i32 128)
%8 = call i32 @run_tests_with_file(i32 %7, i32 1)
%9 = load i8*, i8** %2
%10 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%11 = call i32 @build_full_file_path(i8* %9, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %10, i32 128)
%12 = call i32 @run_tests_with_file(i32 %11, i32 1)
%13 = load i8*, i8** %2
%14 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%15 = call i32 @build_full_file_path(i8* %13, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8* %14, i32 128)
%16 = call i32 @run_tests_with_file(i32 %15, i32 1)
%17 = load i8*, i8** %2
%18 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%19 = call i32 @build_full_file_path(i8* %17, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* %18, i32 128)
%20 = call i32 @run_tests_with_file(i32 %19, i32 1)
%21 = load i8*, i8** %2
%22 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%23 = call i32 @build_full_file_path(i8* %21, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* %22, i32 128)
%24 = call i32 @run_tests_with_file(i32 %23, i32 1)
ret void
}

LLVM IR (-O2):
@.str.1 = [9 x i8] c"asia.bif\00"
@.str.2 = [11 x i8] c"cancer.bif\00"
@.str.3 = [15 x i8] c"earthquake.bif\00"
@.str.4 = [10 x i8] c"sachs.bif\00"
@.str.5 = [11 x i8] c"survey.bif\00"
@str = [104 x i8] c"File Name,Propagation Type,Number of Nodes,Number of Edges,Diameter,Number of Iterations,BP Run Time(s)\00"
define void @small_test_suite(i8* %0) {
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([104 x i8], [104 x i8]* @str, i64 0, i64 0))
%5 = call i32 @build_full_file_path(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %3, i32 128)
%6 = call i32 @run_tests_with_file(i32 %5, i32 1)
%7 = call i32 @build_full_file_path(i8* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %3, i32 128)
%8 = call i32 @run_tests_with_file(i32 %7, i32 1)
%9 = call i32 @build_full_file_path(i8* %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8* %3, i32 128)
%10 = call i32 @run_tests_with_file(i32 %9, i32 1)
%11 = call i32 @build_full_file_path(i8* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* %3, i32 128)
%12 = call i32 @run_tests_with_file(i32 %11, i32 1)
%13 = call i32 @build_full_file_path(i8* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* %3, i32 128)
%14 = call i32 @run_tests_with_file(i32 %13, i32 1)
ret void
}