#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*/ atoi(char *);
int /*<<< orphan*/ test_list_add_head();
int /*<<< orphan*/ test_list_add_tail();
int /*<<< orphan*/ test_list_delete_first();
int /*<<< orphan*/ test_list_delete_last();
int /*<<< orphan*/ test_list_delete_middle();
int /*<<< orphan*/ test_list_find_first();
int /*<<< orphan*/ test_list_find_last();
int /*<<< orphan*/ test_list_find_middle();
int /*<<< orphan*/ test_list_insert_at_first();
int /*<<< orphan*/ test_list_insert_at_last();
int /*<<< orphan*/ test_list_insert_at_middle();
int /*<<< orphan*/ test_list_move_first_to_first();
int /*<<< orphan*/ test_list_move_first_to_last();
int /*<<< orphan*/ test_list_move_first_to_middle();
int /*<<< orphan*/ test_list_speed(int /*<<< orphan*/, int /*<<< orphan*/);
int main(int argc, char **argv) {
  if (argc == 3) {
    test_list_speed(atoi(argv[1]), atoi(argv[2]));
    return 0;
  }
  test_list_add_head();
  test_list_add_tail();
  test_list_delete_first();
  test_list_delete_last();
  test_list_delete_middle();
  test_list_find_first();
  test_list_find_middle();
  test_list_find_last();
  test_list_insert_at_first();
  test_list_insert_at_last();
  test_list_insert_at_middle();
  test_list_move_first_to_first();
  test_list_move_first_to_middle();
  test_list_move_first_to_last();
  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   $0x3,-0x8(%rbp)
jne    1253 <main+0x53>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1110 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1110 <atoi@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1060 <test_list_speed@plt>
movl   $0x0,-0x4(%rbp)
jmp    12bc <main+0xbc>
mov    $0x0,%al
call   1080 <test_list_add_head@plt>
mov    $0x0,%al
call   1090 <test_list_add_tail@plt>
mov    $0x0,%al
call   1120 <test_list_delete_first@plt>
mov    $0x0,%al
call   10d0 <test_list_delete_last@plt>
mov    $0x0,%al
call   10b0 <test_list_delete_middle@plt>
mov    $0x0,%al
call   10f0 <test_list_find_first@plt>
mov    $0x0,%al
call   1050 <test_list_find_middle@plt>
mov    $0x0,%al
call   10e0 <test_list_find_last@plt>
mov    $0x0,%al
call   1070 <test_list_insert_at_first@plt>
mov    $0x0,%al
call   10a0 <test_list_insert_at_last@plt>
mov    $0x0,%al
call   10c0 <test_list_insert_at_middle@plt>
mov    $0x0,%al
call   1040 <test_list_move_first_to_first@plt>
mov    $0x0,%al
call   1100 <test_list_move_first_to_middle@plt>
mov    $0x0,%al
call   1030 <test_list_move_first_to_last@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
cmp    $0x3,%edi
jne    122a <main+0x2a>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1110 <atoi@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
call   1110 <atoi@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1060 <test_list_speed@plt>
jmp    128c <main+0x8c>
xor    %eax,%eax
call   1080 <test_list_add_head@plt>
xor    %eax,%eax
call   1090 <test_list_add_tail@plt>
xor    %eax,%eax
call   1120 <test_list_delete_first@plt>
xor    %eax,%eax
call   10d0 <test_list_delete_last@plt>
xor    %eax,%eax
call   10b0 <test_list_delete_middle@plt>
xor    %eax,%eax
call   10f0 <test_list_find_first@plt>
xor    %eax,%eax
call   1050 <test_list_find_middle@plt>
xor    %eax,%eax
call   10e0 <test_list_find_last@plt>
xor    %eax,%eax
call   1070 <test_list_insert_at_first@plt>
xor    %eax,%eax
call   10a0 <test_list_insert_at_last@plt>
xor    %eax,%eax
call   10c0 <test_list_insert_at_middle@plt>
xor    %eax,%eax
call   1040 <test_list_move_first_to_first@plt>
xor    %eax,%eax
call   1100 <test_list_move_first_to_middle@plt>
xor    %eax,%eax
call   1030 <test_list_move_first_to_last@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
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 = icmp eq i32 %6, 3
br i1 %7, label %8, label %18
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @atoi(i8* %11)
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 2
%15 = load i8*, i8** %14
%16 = call i32 @atoi(i8* %15)
%17 = call i32 @test_list_speed(i32 %12, i32 %16)
store i32 0, i32* %3
br label %33
18: ; preds = %2
%19 = call i32 (...) @test_list_add_head()
%20 = call i32 (...) @test_list_add_tail()
%21 = call i32 (...) @test_list_delete_first()
%22 = call i32 (...) @test_list_delete_last()
%23 = call i32 (...) @test_list_delete_middle()
%24 = call i32 (...) @test_list_find_first()
%25 = call i32 (...) @test_list_find_middle()
%26 = call i32 (...) @test_list_find_last()
%27 = call i32 (...) @test_list_insert_at_first()
%28 = call i32 (...) @test_list_insert_at_last()
%29 = call i32 (...) @test_list_insert_at_middle()
%30 = call i32 (...) @test_list_move_first_to_first()
%31 = call i32 (...) @test_list_move_first_to_middle()
%32 = call i32 (...) @test_list_move_first_to_last()
store i32 0, i32* %3
br label %33
33: ; preds = %18, %8
%34 = load i32, i32* %3
ret i32 %34
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = getelementptr inbounds i8*, i8** %1, i64 2
%9 = load i8*, i8** %8
%10 = tail call i32 @atoi(i8* %9)
%11 = tail call i32 @test_list_speed(i32 %7, i32 %10)
br label %27
12: ; preds = %2
%13 = tail call i32 (...) @test_list_add_head()
%14 = tail call i32 (...) @test_list_add_tail()
%15 = tail call i32 (...) @test_list_delete_first()
%16 = tail call i32 (...) @test_list_delete_last()
%17 = tail call i32 (...) @test_list_delete_middle()
%18 = tail call i32 (...) @test_list_find_first()
%19 = tail call i32 (...) @test_list_find_middle()
%20 = tail call i32 (...) @test_list_find_last()
%21 = tail call i32 (...) @test_list_insert_at_first()
%22 = tail call i32 (...) @test_list_insert_at_last()
%23 = tail call i32 (...) @test_list_insert_at_middle()
%24 = tail call i32 (...) @test_list_move_first_to_first()
%25 = tail call i32 (...) @test_list_move_first_to_middle()
%26 = tail call i32 (...) @test_list_move_first_to_last()
br label %27
27: ; preds = %12, %4
ret i32 0
}