#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*/ printf(char *);
void help() {
  printf("COMMANDS:\n\n");
  printf("exit ================== Close application\n");
  printf("delete_all ============ Delete all elements from list\n");
  printf("delete_first (int)arg = Delete first element with given value\n");
  printf(
      "pop_back ============== Return last element and delete it from list\n");
  printf(
      "pop_front ============= Return first element and delete it from list\n");
  printf("print ================= Print all elements of list\n");
  printf("push_back (int)arg ==== Create new element with given value at the "
         "end of list\n");
  printf("push_front (int)arg === Create new element with given value at the "
         "head of list\n");
  printf("size ================== Return size of list\n\n");
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf04(%rip),%rdi
call   1030 <printf@plt>
lea    0xf2f(%rip),%rdi
call   1030 <printf@plt>
lea    0xf62(%rip),%rdi
call   1030 <printf@plt>
lea    0xf9b(%rip),%rdi
call   1030 <printf@plt>
lea    0xfd5(%rip),%rdi
call   1030 <printf@plt>
lea    0xffd(%rip),%rdi
call   1030 <printf@plt>
lea    0x1041(%rip),%rdi
call   1030 <printf@plt>
lea    0x1086(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee7(%rip),%rdi
call   1030 <puts@plt>
lea    0xf05(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf61(%rip),%rdi
call   1030 <puts@plt>
lea    0xf99(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd2(%rip),%rdi
call   1030 <puts@plt>
lea    0xff9(%rip),%rdi
call   1030 <puts@plt>
lea    0x103c(%rip),%rdi
call   1030 <puts@plt>
lea    0x1080(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"COMMANDS:\0A\0A\00"
@.str.1 = [43 x i8] c"exit ================== Close application\0A\00"
@.str.2 = [55 x i8] c"delete_all ============ Delete all elements from list\0A\00"
@.str.3 = [63 x i8] c"delete_first (int)arg = Delete first element with given value\0A\00"
@.str.4 = [69 x i8] c"pop_back ============== Return last element and delete it from list\0A\00"
@.str.5 = [70 x i8] c"pop_front ============= Return first element and delete it from list\0A\00"
@.str.6 = [52 x i8] c"print ================= Print all elements of list\0A\00"
@.str.7 = [80 x i8] c"push_back (int)arg ==== Create new element with given value at the end of list\0A\00"
@.str.8 = [81 x i8] c"push_front (int)arg === Create new element with given value at the head of list\0A\00"
@.str.9 = [46 x i8] c"size ================== Return size of list\0A\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.9, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [11 x i8] c"COMMANDS:\0A\00"
@str.10 = [42 x i8] c"exit ================== Close application\00"
@str.11 = [54 x i8] c"delete_all ============ Delete all elements from list\00"
@str.12 = [62 x i8] c"delete_first (int)arg = Delete first element with given value\00"
@str.13 = [68 x i8] c"pop_back ============== Return last element and delete it from list\00"
@str.14 = [69 x i8] c"pop_front ============= Return first element and delete it from list\00"
@str.15 = [51 x i8] c"print ================= Print all elements of list\00"
@str.16 = [79 x i8] c"push_back (int)arg ==== Create new element with given value at the end of list\00"
@str.17 = [80 x i8] c"push_front (int)arg === Create new element with given value at the head of list\00"
@str.18 = [45 x i8] c"size ================== Return size of list\0A\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.10, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.11, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.12, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str.13, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str.14, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.15, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str.16, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.17, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.18, i64 0, i64 0))
ret void
}