#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*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ test1();
int /*<<< orphan*/ test10();
int /*<<< orphan*/ test11();
int /*<<< orphan*/ test12();
int /*<<< orphan*/ test2();
int /*<<< orphan*/ test3();
int /*<<< orphan*/ test4();
int /*<<< orphan*/ test5();
int /*<<< orphan*/ test6();
int /*<<< orphan*/ test7();
int /*<<< orphan*/ test8();
int /*<<< orphan*/ test9();
int main(int argc, char **argv) {
  char *test;
  if (argc < 2) {
    printf("Usage: test_linked_list test1|test2|...test12\n");
    exit(1);
  }
  test = argv[1];
  printf("Running %s\n", test);
  if (strcmp(test, "test1") == 0) {
    test1();
  } else if (strcmp(test, "test2") == 0) {
    test2();
  } else if (strcmp(test, "test3") == 0) {
    test3();
  } else if (strcmp(test, "test4") == 0) {
    test4();
  } else if (strcmp(test, "test5") == 0) {
    test5();
  } else if (strcmp(test, "test6") == 0) {
    test6();
  } else if (strcmp(test, "test7") == 0) {
    test7();
  } else if (strcmp(test, "test8") == 0) {
    test8();
  } else if (strcmp(test, "test9") == 0) {
    test9();
  } else if (strcmp(test, "test10") == 0) {
    test10();
  } else if (strcmp(test, "test11") == 0) {
    test11();
  } else if (strcmp(test, "test12") == 0) {
    test12();
  } else {
    printf("Test not found!!n");
    exit(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1228 <main+0x38>
lea    0xde9(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
mov    $0x1,%edi
call   1110 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xdf0(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
mov    -0x18(%rbp),%rdi
lea    0xdea(%rip),%rsi
call   10b0 <strcmp@plt>
cmp    $0x0,%rax
jne    126c <main+0x7c>
mov    $0x0,%al
call   1070 <test1@plt>
jmp    145d <main+0x26d>
mov    -0x18(%rbp),%rdi
lea    0xdca(%rip),%rsi
call   10b0 <strcmp@plt>
cmp    $0x0,%rax
jne    1292 <main+0xa2>
mov    $0x0,%al
call   10e0 <test2@plt>
jmp    1458 <main+0x268>
mov    -0x18(%rbp),%rdi
lea    0xdaa(%rip),%rsi
call   10b0 <strcmp@plt>
cmp    $0x0,%rax
jne    12b8 <main+0xc8>
mov    $0x0,%al
call   1050 <test3@plt>
jmp    1453 <main+0x263>
mov    -0x18(%rbp),%rdi
lea    0xd8a(%rip),%rsi
call   10b0 <strcmp@plt>
cmp    $0x0,%rax
jne    12de <main+0xee>
mov    $0x0,%al
call   10d0 <test4@plt>
jmp    144e <main+0x25e>
mov    -0x18(%rbp),%rdi
lea    0xd6a(%rip),%rsi
call   10b0 <strcmp@plt>
cmp    $0x0,%rax
jne    1304 <main+0x114>
mov    $0x0,%al
call   1040 <test5@plt>
jmp    1449 <main+0x259>
mov    -0x18(%rbp),%rdi
lea    0xd4a(%rip),%rsi
call   10b0 <strcmp@plt>
cmp    $0x0,%rax
jne    132a <main+0x13a>
mov    $0x0,%al
call   10c0 <test6@plt>
jmp    1444 <main+0x254>
mov    -0x18(%rbp),%rdi
lea    0xd2a(%rip),%rsi
call   10b0 <strcmp@plt>
cmp    $0x0,%rax
jne    1350 <main+0x160>
mov    $0x0,%al
call   1030 <test7@plt>
jmp    143f <main+0x24f>
mov    -0x18(%rbp),%rdi
lea    0xd0a(%rip),%rsi
call   10b0 <strcmp@plt>
cmp    $0x0,%rax
jne    1376 <main+0x186>
mov    $0x0,%al
call   1100 <test8@plt>
jmp    143a <main+0x24a>
mov    -0x18(%rbp),%rdi
lea    0xcea(%rip),%rsi
call   10b0 <strcmp@plt>
cmp    $0x0,%rax
jne    139c <main+0x1ac>
mov    $0x0,%al
call   10a0 <test9@plt>
jmp    1435 <main+0x245>
mov    -0x18(%rbp),%rdi
lea    0xcca(%rip),%rsi
call   10b0 <strcmp@plt>
cmp    $0x0,%rax
jne    13c2 <main+0x1d2>
mov    $0x0,%al
call   1060 <test10@plt>
jmp    1430 <main+0x240>
mov    -0x18(%rbp),%rdi
lea    0xcab(%rip),%rsi
call   10b0 <strcmp@plt>
cmp    $0x0,%rax
jne    13e8 <main+0x1f8>
mov    $0x0,%al
call   10f0 <test11@plt>
jmp    142b <main+0x23b>
mov    -0x18(%rbp),%rdi
lea    0xc8c(%rip),%rsi
call   10b0 <strcmp@plt>
cmp    $0x0,%rax
jne    140e <main+0x21e>
mov    $0x0,%al
call   1080 <test12@plt>
jmp    1426 <main+0x236>
lea    0xc71(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
mov    $0x1,%edi
call   1110 <exit@plt>
jmp    142b <main+0x23b>
jmp    1430 <main+0x240>
jmp    1435 <main+0x245>
jmp    143a <main+0x24a>
jmp    143f <main+0x24f>
jmp    1444 <main+0x254>
jmp    1449 <main+0x259>
jmp    144e <main+0x25e>
jmp    1453 <main+0x263>
jmp    1458 <main+0x268>
jmp    145d <main+0x26d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x1,%edi
jle    13a9 <main+0x1a9>
mov    0x8(%rsi),%rbx
lea    0xdeb(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   10a0 <printf@plt>
lea    0xde6(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <strcmp@plt>
test   %rax,%rax
je     1344 <main+0x144>
lea    0xdd4(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <strcmp@plt>
test   %rax,%rax
je     134d <main+0x14d>
lea    0xdc2(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <strcmp@plt>
test   %rax,%rax
je     1356 <main+0x156>
lea    0xdb0(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <strcmp@plt>
test   %rax,%rax
je     135f <main+0x15f>
lea    0xd9e(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <strcmp@plt>
test   %rax,%rax
je     1368 <main+0x168>
lea    0xd8c(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <strcmp@plt>
test   %rax,%rax
je     1371 <main+0x171>
lea    0xd7a(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <strcmp@plt>
test   %rax,%rax
je     137a <main+0x17a>
lea    0xd68(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <strcmp@plt>
test   %rax,%rax
je     1383 <main+0x183>
lea    0xd56(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <strcmp@plt>
test   %rax,%rax
je     138c <main+0x18c>
lea    0xd44(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <strcmp@plt>
test   %rax,%rax
je     1395 <main+0x195>
lea    0xd33(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <strcmp@plt>
test   %rax,%rax
je     139e <main+0x19e>
lea    0xd5f(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <strcmp@plt>
test   %rax,%rax
jne    13bf <main+0x1bf>
xor    %eax,%eax
call   1090 <test12@plt>
jmp    13a5 <main+0x1a5>
xor    %eax,%eax
call   1080 <test1@plt>
jmp    13a5 <main+0x1a5>
xor    %eax,%eax
call   10f0 <test2@plt>
jmp    13a5 <main+0x1a5>
xor    %eax,%eax
call   1060 <test3@plt>
jmp    13a5 <main+0x1a5>
xor    %eax,%eax
call   10e0 <test4@plt>
jmp    13a5 <main+0x1a5>
xor    %eax,%eax
call   1050 <test5@plt>
jmp    13a5 <main+0x1a5>
xor    %eax,%eax
call   10d0 <test6@plt>
jmp    13a5 <main+0x1a5>
xor    %eax,%eax
call   1040 <test7@plt>
jmp    13a5 <main+0x1a5>
xor    %eax,%eax
call   1110 <test8@plt>
jmp    13a5 <main+0x1a5>
xor    %eax,%eax
call   10b0 <test9@plt>
jmp    13a5 <main+0x1a5>
xor    %eax,%eax
call   1070 <test10@plt>
jmp    13a5 <main+0x1a5>
xor    %eax,%eax
call   1100 <test11@plt>
xor    %eax,%eax
pop    %rbx
ret
lea    0xcb2(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1120 <exit@plt>
lea    0xc8a(%rip),%rdi
xor    %eax,%eax
call   10a0 <printf@plt>
mov    $0x1,%edi
call   1120 <exit@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"Usage: test_linked_list test1|test2|...test12\0A\00"
@.str.1 = [12 x i8] c"Running %s\0A\00"
@.str.2 = [6 x i8] c"test1\00"
@.str.3 = [6 x i8] c"test2\00"
@.str.4 = [6 x i8] c"test3\00"
@.str.5 = [6 x i8] c"test4\00"
@.str.6 = [6 x i8] c"test5\00"
@.str.7 = [6 x i8] c"test6\00"
@.str.8 = [6 x i8] c"test7\00"
@.str.9 = [6 x i8] c"test8\00"
@.str.10 = [6 x i8] c"test9\00"
@.str.11 = [7 x i8] c"test10\00"
@.str.12 = [7 x i8] c"test11\00"
@.str.13 = [7 x i8] c"test12\00"
@.str.14 = [18 x i8] c"Test not found!!n\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
store i8* %15, i8** %6
%16 = load i8*, i8** %6
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* %16)
%18 = load i8*, i8** %6
%19 = call i64 @strcmp(i8* %18, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %12
%22 = call i32 (...) @test1()
br label %103
23: ; preds = %12
%24 = load i8*, i8** %6
%25 = call i64 @strcmp(i8* %24, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %23
%28 = call i32 (...) @test2()
br label %102
29: ; preds = %23
%30 = load i8*, i8** %6
%31 = call i64 @strcmp(i8* %30, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %29
%34 = call i32 (...) @test3()
br label %101
35: ; preds = %29
%36 = load i8*, i8** %6
%37 = call i64 @strcmp(i8* %36, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %35
%40 = call i32 (...) @test4()
br label %100
41: ; preds = %35
%42 = load i8*, i8** %6
%43 = call i64 @strcmp(i8* %42, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %47
45: ; preds = %41
%46 = call i32 (...) @test5()
br label %99
47: ; preds = %41
%48 = load i8*, i8** %6
%49 = call i64 @strcmp(i8* %48, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %53
51: ; preds = %47
%52 = call i32 (...) @test6()
br label %98
53: ; preds = %47
%54 = load i8*, i8** %6
%55 = call i64 @strcmp(i8* %54, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%56 = icmp eq i64 %55, 0
br i1 %56, label %57, label %59
57: ; preds = %53
%58 = call i32 (...) @test7()
br label %97
59: ; preds = %53
%60 = load i8*, i8** %6
%61 = call i64 @strcmp(i8* %60, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
%62 = icmp eq i64 %61, 0
br i1 %62, label %63, label %65
63: ; preds = %59
%64 = call i32 (...) @test8()
br label %96
65: ; preds = %59
%66 = load i8*, i8** %6
%67 = call i64 @strcmp(i8* %66, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%68 = icmp eq i64 %67, 0
br i1 %68, label %69, label %71
69: ; preds = %65
%70 = call i32 (...) @test9()
br label %95
71: ; preds = %65
%72 = load i8*, i8** %6
%73 = call i64 @strcmp(i8* %72, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
%74 = icmp eq i64 %73, 0
br i1 %74, label %75, label %77
75: ; preds = %71
%76 = call i32 (...) @test10()
br label %94
77: ; preds = %71
%78 = load i8*, i8** %6
%79 = call i64 @strcmp(i8* %78, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%80 = icmp eq i64 %79, 0
br i1 %80, label %81, label %83
81: ; preds = %77
%82 = call i32 (...) @test11()
br label %93
83: ; preds = %77
%84 = load i8*, i8** %6
%85 = call i64 @strcmp(i8* %84, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0))
%86 = icmp eq i64 %85, 0
br i1 %86, label %87, label %89
87: ; preds = %83
%88 = call i32 (...) @test12()
br label %92
89: ; preds = %83
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.14, i64 0, i64 0))
%91 = call i32 @exit(i32 1)
unreachable
92: ; preds = %87
br label %93
93: ; preds = %92, %81
br label %94
94: ; preds = %93, %75
br label %95
95: ; preds = %94, %69
br label %96
96: ; preds = %95, %63
br label %97
97: ; preds = %96, %57
br label %98
98: ; preds = %97, %51
br label %99
99: ; preds = %98, %45
br label %100
100: ; preds = %99, %39
br label %101
101: ; preds = %100, %33
br label %102
102: ; preds = %101, %27
br label %103
103: ; preds = %102, %21
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [12 x i8] c"Running %s\0A\00"
@.str.2 = [6 x i8] c"test1\00"
@.str.3 = [6 x i8] c"test2\00"
@.str.4 = [6 x i8] c"test3\00"
@.str.5 = [6 x i8] c"test4\00"
@.str.6 = [6 x i8] c"test5\00"
@.str.7 = [6 x i8] c"test6\00"
@.str.8 = [6 x i8] c"test7\00"
@.str.9 = [6 x i8] c"test8\00"
@.str.10 = [6 x i8] c"test9\00"
@.str.11 = [7 x i8] c"test10\00"
@.str.12 = [7 x i8] c"test11\00"
@.str.13 = [7 x i8] c"test12\00"
@.str.14 = [18 x i8] c"Test not found!!n\00"
@str = [46 x i8] c"Usage: test_linked_list test1|test2|...test12\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = tail call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %7
%14 = tail call i32 (...) @test1()
br label %73
15: ; preds = %7
%16 = tail call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = tail call i32 (...) @test2()
br label %73
20: ; preds = %15
%21 = tail call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = tail call i32 (...) @test3()
br label %73
25: ; preds = %20
%26 = tail call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = tail call i32 (...) @test4()
br label %73
30: ; preds = %25
%31 = tail call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %30
%34 = tail call i32 (...) @test5()
br label %73
35: ; preds = %30
%36 = tail call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = tail call i32 (...) @test6()
br label %73
40: ; preds = %35
%41 = tail call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %45
43: ; preds = %40
%44 = tail call i32 (...) @test7()
br label %73
45: ; preds = %40
%46 = tail call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
%47 = icmp eq i64 %46, 0
br i1 %47, label %48, label %50
48: ; preds = %45
%49 = tail call i32 (...) @test8()
br label %73
50: ; preds = %45
%51 = tail call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%52 = icmp eq i64 %51, 0
br i1 %52, label %53, label %55
53: ; preds = %50
%54 = tail call i32 (...) @test9()
br label %73
55: ; preds = %50
%56 = tail call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
%57 = icmp eq i64 %56, 0
br i1 %57, label %58, label %60
58: ; preds = %55
%59 = tail call i32 (...) @test10()
br label %73
60: ; preds = %55
%61 = tail call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%62 = icmp eq i64 %61, 0
br i1 %62, label %63, label %65
63: ; preds = %60
%64 = tail call i32 (...) @test11()
br label %73
65: ; preds = %60
%66 = tail call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0))
%67 = icmp eq i64 %66, 0
br i1 %67, label %68, label %70
68: ; preds = %65
%69 = tail call i32 (...) @test12()
br label %73
70: ; preds = %65
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.14, i64 0, i64 0))
%72 = tail call i32 @exit(i32 1)
unreachable
73: ; preds = %18, %28, %38, %48, %58, %68, %63, %53, %43, %33, %23, %13
ret i32 0
}