#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("arrayList usage:");
  puts("");
  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("pop\t\tpop the last element");
  puts("clear\t\tclear the whole list");
  puts("");
  puts("get 1 \t\tget the node at the index");
  puts("push 1 \tpush an integer to the end 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("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    0x1228(%rip),%rdi
call   1030 <puts@plt>
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
lea    0xee7(%rip),%rdi
call   1030 <puts@plt>
lea    0xef5(%rip),%rdi
call   1030 <puts@plt>
lea    0xf07(%rip),%rdi
call   1030 <puts@plt>
lea    0xf14(%rip),%rdi
call   1030 <puts@plt>
lea    0xf21(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf5b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf69(%rip),%rdi
call   1030 <puts@plt>
lea    0xf84(%rip),%rdi
call   1030 <puts@plt>
lea    0xf92(%rip),%rdi
call   1030 <puts@plt>
lea    0x1198(%rip),%rdi
call   1030 <puts@plt>
lea    0xf96(%rip),%rdi
call   1030 <puts@plt>
lea    0xfac(%rip),%rdi
call   1030 <puts@plt>
lea    0xfcf(%rip),%rdi
call   1030 <puts@plt>
lea    0xfed(%rip),%rdi
call   1030 <puts@plt>
lea    0x1006(%rip),%rdi
call   1030 <puts@plt>
lea    0x102a(%rip),%rdi
call   1030 <puts@plt>
lea    0x1144(%rip),%rdi
call   1030 <puts@plt>
lea    0x1053(%rip),%rdi
call   1030 <puts@plt>
lea    0x1071(%rip),%rdi
call   1030 <puts@plt>
lea    0x109a(%rip),%rdi
call   1030 <puts@plt>
lea    0x10da(%rip),%rdi
call   1030 <puts@plt>
lea    0x1109(%rip),%rdi
call   1030 <puts@plt>
lea    0x114a(%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    0xed3(%rip),%rdi
call   1040 <puts@plt>
lea    0xedc(%rip),%rdi
call   1040 <puts@plt>
lea    0xeea(%rip),%rdi
call   1040 <puts@plt>
lea    0xefc(%rip),%rdi
call   1040 <puts@plt>
lea    0xf09(%rip),%rdi
call   1040 <puts@plt>
lea    0xf16(%rip),%rdi
call   1040 <puts@plt>
lea    0xf31(%rip),%rdi
call   1040 <puts@plt>
lea    0xf50(%rip),%rdi
call   1040 <puts@plt>
lea    0xf5e(%rip),%rdi
call   1040 <puts@plt>
lea    0xf79(%rip),%rdi
call   1040 <puts@plt>
lea    0xf87(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf8d(%rip),%rdi
call   1040 <puts@plt>
lea    0xfa3(%rip),%rdi
call   1040 <puts@plt>
lea    0xfc6(%rip),%rdi
call   1040 <puts@plt>
lea    0xfe4(%rip),%rdi
call   1040 <puts@plt>
lea    0xffd(%rip),%rdi
call   1040 <puts@plt>
lea    0x1021(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x104c(%rip),%rdi
call   1040 <puts@plt>
lea    0x106a(%rip),%rdi
call   1040 <puts@plt>
lea    0x1093(%rip),%rdi
call   1040 <puts@plt>
lea    0x10d3(%rip),%rdi
call   1040 <puts@plt>
lea    0x1102(%rip),%rdi
call   1040 <puts@plt>
lea    0x1143(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

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

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