#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*/ SET_ERR(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ test_case_dfs();
int /*<<< orphan*/ test_case_loop();
int /*<<< orphan*/ test_case_topo_sort();
int main(int argc, char *argv[]) {
  (void)argc;
  (void)argv;
  SET_ERR(stdout);
  printf("\n=== Test case 1\n");
  test_case_loop();
  printf("\n=== Test case 2\n");
  test_case_topo_sort();
  printf("\n=== Test case 3\n");
  test_case_dfs();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
call   1060 <SET_ERR@plt>
lea    0xe85(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <test_case_loop@plt>
lea    0xe84(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <test_case_topo_sort@plt>
lea    0xe83(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1070 <test_case_dfs@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
call   1060 <SET_ERR@plt>
lea    0xe9a(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1050 <test_case_loop@plt>
lea    0xe98(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <test_case_topo_sort@plt>
lea    0xe96(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1070 <test_case_dfs@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [18 x i8] c"\0A=== Test case 1\0A\00"
@.str.1 = [18 x i8] c"\0A=== Test case 2\0A\00"
@.str.2 = [18 x i8] c"\0A=== Test case 3\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = load i32, i32* @stdout
%9 = call i32 @SET_ERR(i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%11 = call i32 (...) @test_case_loop()
%12 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 (...) @test_case_topo_sort()
%14 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%15 = call i32 (...) @test_case_dfs()
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@str = [17 x i8] c"\0A=== Test case 1\00"
@str.3 = [17 x i8] c"\0A=== Test case 2\00"
@str.4 = [17 x i8] c"\0A=== Test case 3\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @SET_ERR(i32 %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 (...) @test_case_loop()
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.3, i64 0, i64 0))
%8 = tail call i32 (...) @test_case_topo_sort()
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.4, i64 0, i64 0))
%10 = tail call i32 (...) @test_case_dfs()
ret i32 0
}