#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*/ puts(char *);
void usage(void) {
  puts("doublyLinkedList usage:");
  puts("");
  puts("head\t\tprint the head");
  puts("tail\t\tprint the tail");
  puts("curr\t\tprint the current node");
  puts("size\t\tprint the size");
  puts("next\t\tprint the next node");
  puts("prev\t\tprint the previous node");
  puts("print (p)\tprint the list");
  puts("info (i)\tprint list info");
  puts("hasNext\t\tprint if list has a next node");
  puts("hasPrev\t\tprint if list has a previous node");
  puts("reverse\t\treverse the list");
  puts("sort\t\tsort the list in ascending order");
  puts("popHead (poh)\t\tpop the first node");
  puts("popTail(pot)\t\tpop the last node");
  puts("clear\t\tclear the whole list");
  puts("");
  puts("get 1 \t\tget the node at the index");
  puts("pushHead 1 (puh)\tpush an integer to the head of the list");
  puts("pushTail 1 (put)\tpush an integer to the tail of the list");
  puts("find 1\t\tsearch for an integer in the list");
  puts("del 1\t\tdelete an integer in the list");
  puts("sad 1\t\tsearch and delete an integer in the list");
  puts("perform 10\tdo some performance testing with a number of elements");
  puts("");
  puts("set 1 2 \tset the node at the index 1 to 2");
  puts("before 1 2\tadd integer 2 before integer 1 in the list");
  puts("after 1 2\tadd integer 2 after integer 1 in the list");
  puts("fill 10 20\tfill the list with integers from 10 to 20");
  puts("find 10 1|2|3\tsearch for an integer in the list with a specific "
       "search mode");
  puts("\t\t(modes: 1=head to tail, 2=tail to head, 3=head and tail)");
  puts("sad 10 1|2|3\tsearch and delete an integer in the list with a specific "
       "search");
  puts("\t\tmode (modes: 1=head to tail, 2=tail to head, 3=head and tail)");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0x134b(%rip),%rdi
call   1030 <puts@plt>
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xeee(%rip),%rdi
call   1030 <puts@plt>
lea    0xef7(%rip),%rdi
call   1030 <puts@plt>
lea    0xf08(%rip),%rdi
call   1030 <puts@plt>
lea    0xf11(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf31(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf66(%rip),%rdi
call   1030 <puts@plt>
lea    0xf85(%rip),%rdi
call   1030 <puts@plt>
lea    0xf93(%rip),%rdi
call   1030 <puts@plt>
lea    0xfae(%rip),%rdi
call   1030 <puts@plt>
lea    0xfc4(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd8(%rip),%rdi
call   1030 <puts@plt>
lea    0x128b(%rip),%rdi
call   1030 <puts@plt>
lea    0xfdc(%rip),%rdi
call   1030 <puts@plt>
lea    0xff2(%rip),%rdi
call   1030 <puts@plt>
lea    0x101f(%rip),%rdi
call   1030 <puts@plt>
lea    0x104c(%rip),%rdi
call   1030 <puts@plt>
lea    0x106a(%rip),%rdi
call   1030 <puts@plt>
lea    0x1083(%rip),%rdi
call   1030 <puts@plt>
lea    0x10a7(%rip),%rdi
call   1030 <puts@plt>
lea    0x122b(%rip),%rdi
call   1030 <puts@plt>
lea    0x10d0(%rip),%rdi
call   1030 <puts@plt>
lea    0x10ee(%rip),%rdi
call   1030 <puts@plt>
lea    0x1118(%rip),%rdi
call   1030 <puts@plt>
lea    0x1140(%rip),%rdi
call   1030 <puts@plt>
lea    0x1169(%rip),%rdi
call   1030 <puts@plt>
lea    0x11a9(%rip),%rdi
call   1030 <puts@plt>
lea    0x11d8(%rip),%rdi
call   1030 <puts@plt>
lea    0x1219(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeda(%rip),%rdi
call   1040 <puts@plt>
lea    0xee3(%rip),%rdi
call   1040 <puts@plt>
lea    0xeec(%rip),%rdi
call   1040 <puts@plt>
lea    0xefd(%rip),%rdi
call   1040 <puts@plt>
lea    0xf06(%rip),%rdi
call   1040 <puts@plt>
lea    0xf14(%rip),%rdi
call   1040 <puts@plt>
lea    0xf26(%rip),%rdi
call   1040 <puts@plt>
lea    0xf33(%rip),%rdi
call   1040 <puts@plt>
lea    0xf40(%rip),%rdi
call   1040 <puts@plt>
lea    0xf5b(%rip),%rdi
call   1040 <puts@plt>
lea    0xf7a(%rip),%rdi
call   1040 <puts@plt>
lea    0xf88(%rip),%rdi
call   1040 <puts@plt>
lea    0xfa3(%rip),%rdi
call   1040 <puts@plt>
lea    0xfb9(%rip),%rdi
call   1040 <puts@plt>
lea    0xfcd(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xfd3(%rip),%rdi
call   1040 <puts@plt>
lea    0xfe9(%rip),%rdi
call   1040 <puts@plt>
lea    0x1016(%rip),%rdi
call   1040 <puts@plt>
lea    0x1043(%rip),%rdi
call   1040 <puts@plt>
lea    0x1061(%rip),%rdi
call   1040 <puts@plt>
lea    0x107a(%rip),%rdi
call   1040 <puts@plt>
lea    0x109e(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x10c9(%rip),%rdi
call   1040 <puts@plt>
lea    0x10e7(%rip),%rdi
call   1040 <puts@plt>
lea    0x1111(%rip),%rdi
call   1040 <puts@plt>
lea    0x1139(%rip),%rdi
call   1040 <puts@plt>
lea    0x1162(%rip),%rdi
call   1040 <puts@plt>
lea    0x11a2(%rip),%rdi
call   1040 <puts@plt>
lea    0x11d1(%rip),%rdi
call   1040 <puts@plt>
lea    0x1212(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"doublyLinkedList usage:\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [21 x i8] c"head\09\09print the head\00"
@.str.3 = [21 x i8] c"tail\09\09print the tail\00"
@.str.4 = [29 x i8] c"curr\09\09print the current node\00"
@.str.5 = [21 x i8] c"size\09\09print the size\00"
@.str.6 = [26 x i8] c"next\09\09print the next node\00"
@.str.7 = [30 x i8] c"prev\09\09print the previous node\00"
@.str.8 = [25 x i8] c"print (p)\09print the list\00"
@.str.9 = [25 x i8] c"info (i)\09print list info\00"
@.str.10 = [39 x i8] c"hasNext\09\09print if list has a next node\00"
@.str.11 = [43 x i8] c"hasPrev\09\09print if list has a previous node\00"
@.str.12 = [26 x i8] c"reverse\09\09reverse the list\00"
@.str.13 = [39 x i8] c"sort\09\09sort the list in ascending order\00"
@.str.14 = [34 x i8] c"popHead (poh)\09\09pop the first node\00"
@.str.15 = [32 x i8] c"popTail(pot)\09\09pop the last node\00"
@.str.16 = [28 x i8] c"clear\09\09clear the whole list\00"
@.str.17 = [34 x i8] c"get 1 \09\09get the node at the index\00"
@.str.18 = [57 x i8] c"pushHead 1 (puh)\09push an integer to the head of the list\00"
@.str.19 = [57 x i8] c"pushTail 1 (put)\09push an integer to the tail of the list\00"
@.str.20 = [42 x i8] c"find 1\09\09search for an integer in the list\00"
@.str.21 = [37 x i8] c"del 1\09\09delete an integer in the list\00"
@.str.22 = [48 x i8] c"sad 1\09\09search and delete an integer in the list\00"
@.str.23 = [65 x i8] c"perform 10\09do some performance testing with a number of elements\00"
@.str.24 = [42 x i8] c"set 1 2 \09set the node at the index 1 to 2\00"
@.str.25 = [54 x i8] c"before 1 2\09add integer 2 before integer 1 in the list\00"
@.str.26 = [52 x i8] c"after 1 2\09add integer 2 after integer 1 in the list\00"
@.str.27 = [53 x i8] c"fill 10 20\09fill the list with integers from 10 to 20\00"
@.str.28 = [76 x i8] c"find 10 1|2|3\09search for an integer in the list with a specific search mode\00"
@.str.29 = [59 x i8] c"\09\09(modes: 1=head to tail, 2=tail to head, 3=head and tail)\00"
@.str.30 = [77 x i8] c"sad 10 1|2|3\09search and delete an integer in the list with a specific search\00"
@.str.31 = [64 x i8] c"\09\09mode (modes: 1=head to tail, 2=tail to head, 3=head and tail)\00"
define void @usage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @puts(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @puts(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @puts(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @puts(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @puts(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @puts(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @puts(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @puts(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @puts(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @puts(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0))
%14 = call i32 @puts(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.13, i64 0, i64 0))
%15 = call i32 @puts(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.14, i64 0, i64 0))
%16 = call i32 @puts(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0))
%17 = call i32 @puts(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.16, i64 0, i64 0))
%18 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%19 = call i32 @puts(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.17, i64 0, i64 0))
%20 = call i32 @puts(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.18, i64 0, i64 0))
%21 = call i32 @puts(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.19, i64 0, i64 0))
%22 = call i32 @puts(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.20, i64 0, i64 0))
%23 = call i32 @puts(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.21, i64 0, i64 0))
%24 = call i32 @puts(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.22, i64 0, i64 0))
%25 = call i32 @puts(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.23, i64 0, i64 0))
%26 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%27 = call i32 @puts(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.24, i64 0, i64 0))
%28 = call i32 @puts(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.25, i64 0, i64 0))
%29 = call i32 @puts(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.26, i64 0, i64 0))
%30 = call i32 @puts(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.27, i64 0, i64 0))
%31 = call i32 @puts(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.28, i64 0, i64 0))
%32 = call i32 @puts(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.29, i64 0, i64 0))
%33 = call i32 @puts(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.30, i64 0, i64 0))
%34 = call i32 @puts(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.31, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"doublyLinkedList usage:\00"
@.str.2 = [21 x i8] c"head\09\09print the head\00"
@.str.3 = [21 x i8] c"tail\09\09print the tail\00"
@.str.4 = [29 x i8] c"curr\09\09print the current node\00"
@.str.5 = [21 x i8] c"size\09\09print the size\00"
@.str.6 = [26 x i8] c"next\09\09print the next node\00"
@.str.7 = [30 x i8] c"prev\09\09print the previous node\00"
@.str.8 = [25 x i8] c"print (p)\09print the list\00"
@.str.9 = [25 x i8] c"info (i)\09print list info\00"
@.str.10 = [39 x i8] c"hasNext\09\09print if list has a next node\00"
@.str.11 = [43 x i8] c"hasPrev\09\09print if list has a previous node\00"
@.str.12 = [26 x i8] c"reverse\09\09reverse the list\00"
@.str.13 = [39 x i8] c"sort\09\09sort the list in ascending order\00"
@.str.14 = [34 x i8] c"popHead (poh)\09\09pop the first node\00"
@.str.15 = [32 x i8] c"popTail(pot)\09\09pop the last node\00"
@.str.16 = [28 x i8] c"clear\09\09clear the whole list\00"
@.str.17 = [34 x i8] c"get 1 \09\09get the node at the index\00"
@.str.18 = [57 x i8] c"pushHead 1 (puh)\09push an integer to the head of the list\00"
@.str.19 = [57 x i8] c"pushTail 1 (put)\09push an integer to the tail of the list\00"
@.str.20 = [42 x i8] c"find 1\09\09search for an integer in the list\00"
@.str.21 = [37 x i8] c"del 1\09\09delete an integer in the list\00"
@.str.22 = [48 x i8] c"sad 1\09\09search and delete an integer in the list\00"
@.str.23 = [65 x i8] c"perform 10\09do some performance testing with a number of elements\00"
@.str.24 = [42 x i8] c"set 1 2 \09set the node at the index 1 to 2\00"
@.str.25 = [54 x i8] c"before 1 2\09add integer 2 before integer 1 in the list\00"
@.str.26 = [52 x i8] c"after 1 2\09add integer 2 after integer 1 in the list\00"
@.str.27 = [53 x i8] c"fill 10 20\09fill the list with integers from 10 to 20\00"
@.str.28 = [76 x i8] c"find 10 1|2|3\09search for an integer in the list with a specific search mode\00"
@.str.29 = [59 x i8] c"\09\09(modes: 1=head to tail, 2=tail to head, 3=head and tail)\00"
@.str.30 = [77 x i8] c"sad 10 1|2|3\09search and delete an integer in the list with a specific search\00"
@.str.31 = [64 x i8] c"\09\09mode (modes: 1=head to tail, 2=tail to head, 3=head and tail)\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.10, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.11, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.13, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.14, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.16, i64 0, i64 0))
%18 = tail call i32 @putchar(i32 10)
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.17, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.18, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.19, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.20, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.21, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.22, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str.23, i64 0, i64 0))
%26 = tail call i32 @putchar(i32 10)
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.24, i64 0, i64 0))
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.25, i64 0, i64 0))
%29 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.26, i64 0, i64 0))
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.27, i64 0, i64 0))
%31 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @.str.28, i64 0, i64 0))
%32 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.29, i64 0, i64 0))
%33 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @.str.30, i64 0, i64 0))
%34 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.31, i64 0, i64 0))
ret void
}