#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*/ fflush(int /*<<< orphan*/);
int getpid();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ test1();
int /*<<< orphan*/ test_double_graph_iter();
int /*<<< orphan*/ test_double_iter();
int /*<<< orphan*/ test_double_iter_loop_with_head();
int /*<<< orphan*/ test_double_iter_loop_with_head_insertion();
int /*<<< orphan*/ test_double_iter_with_head();
int /*<<< orphan*/ test_pointer_to_list();
int main() {
  test1();
  test_double_iter();
  test_double_iter_with_head();
  test_double_iter_loop_with_head();
  test_double_iter_loop_with_head_insertion();
  test_double_graph_iter();
  test_pointer_to_list();
  printf("pid %u\n", getpid());
  fflush(stdout);
  sleep(-1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <test1@plt>
mov    $0x0,%al
call   1070 <test_double_iter@plt>
mov    $0x0,%al
call   10b0 <test_double_iter_with_head@plt>
mov    $0x0,%al
call   10d0 <test_double_iter_loop_with_head@plt>
mov    $0x0,%al
call   1080 <test_double_iter_loop_with_head_insertion@plt>
mov    $0x0,%al
call   10a0 <test_double_graph_iter@plt>
mov    $0x0,%al
call   1030 <test_pointer_to_list@plt>
mov    $0x0,%al
call   1040 <getpid@plt>
mov    %eax,%esi
lea    0xe00(%rip),%rdi
call   1060 <printf@plt>
mov    0x2dd4(%rip),%rax
mov    (%rax),%edi
call   1090 <fflush@plt>
mov    $0xffffffff,%edi
call   10c0 <sleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <test1@plt>
xor    %eax,%eax
call   1070 <test_double_iter@plt>
xor    %eax,%eax
call   10b0 <test_double_iter_with_head@plt>
xor    %eax,%eax
call   10d0 <test_double_iter_loop_with_head@plt>
xor    %eax,%eax
call   1080 <test_double_iter_loop_with_head_insertion@plt>
xor    %eax,%eax
call   10a0 <test_double_graph_iter@plt>
xor    %eax,%eax
call   1030 <test_pointer_to_list@plt>
xor    %eax,%eax
call   1040 <getpid@plt>
lea    0xe10(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
mov    0x2de2(%rip),%rax
mov    (%rax),%edi
call   1090 <fflush@plt>
mov    $0xffffffff,%edi
call   10c0 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"pid %u\0A\00"
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test1()
%3 = call i32 (...) @test_double_iter()
%4 = call i32 (...) @test_double_iter_with_head()
%5 = call i32 (...) @test_double_iter_loop_with_head()
%6 = call i32 (...) @test_double_iter_loop_with_head_insertion()
%7 = call i32 (...) @test_double_graph_iter()
%8 = call i32 (...) @test_pointer_to_list()
%9 = call i32 (...) @getpid()
%10 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @stdout
%12 = call i32 @fflush(i32 %11)
%13 = call i32 @sleep(i32 -1)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"pid %u\0A\00"
@stdout = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @test1()
%2 = tail call i32 (...) @test_double_iter()
%3 = tail call i32 (...) @test_double_iter_with_head()
%4 = tail call i32 (...) @test_double_iter_loop_with_head()
%5 = tail call i32 (...) @test_double_iter_loop_with_head_insertion()
%6 = tail call i32 (...) @test_double_graph_iter()
%7 = tail call i32 (...) @test_pointer_to_list()
%8 = tail call i32 (...) @getpid()
%9 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @stdout
%11 = tail call i32 @fflush(i32 %10)
%12 = tail call i32 @sleep(i32 -1)
ret i32 0
}