#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 menu() {
  printf("\n");
  printf("---------------------------------------------------------------------"
         "-----------\n");
  printf("| To Do List -- Main Menu                                            "
         "          |\n");
  printf("---------------------------------------------------------------------"
         "-----------\n");
  printf("| # | Description                                                    "
         "          |\n");
  printf("---------------------------------------------------------------------"
         "-----------\n");
  printf("  0   Display this menu.                                             "
         "           \n");
  printf("  1   Display a single task.                                         "
         "           \n");
  printf("  2   Display all tasks.                                             "
         "           \n");
  printf("  3   Add a new task.                                                "
         "           \n");
  printf("  4   Remove a task.                                                 "
         "           \n");
  printf("  5   Replace a task.                                                "
         "           \n");
  printf("  6   Move a task to another location.                               "
         "           \n");
  printf("  7   Quit.                                                          "
         "           \n");
  printf("---------------------------------------------------------------------"
         "-----------\n");
}


x86 assembly (clang, -O0):
<menu>:
push   %rbp
mov    %rsp,%rbp
lea    0x1269(%rip),%rdi
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
lea    0xf1f(%rip),%rdi
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
lea    0xf59(%rip),%rdi
call   1030 <printf@plt>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
lea    0xf93(%rip),%rdi
call   1030 <printf@plt>
lea    0xfd9(%rip),%rdi
call   1030 <printf@plt>
lea    0x101f(%rip),%rdi
call   1030 <printf@plt>
lea    0x1065(%rip),%rdi
call   1030 <printf@plt>
lea    0x10ab(%rip),%rdi
call   1030 <printf@plt>
lea    0x10f1(%rip),%rdi
call   1030 <printf@plt>
lea    0x1137(%rip),%rdi
call   1030 <printf@plt>
lea    0x117d(%rip),%rdi
call   1030 <printf@plt>
lea    0xe3d(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu>:
push   %rbx
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x11f8(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xebf(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xefc(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xf39(%rip),%rdi
call   1040 <puts@plt>
lea    0xf7e(%rip),%rdi
call   1040 <puts@plt>
lea    0xfc3(%rip),%rdi
call   1040 <puts@plt>
lea    0x1008(%rip),%rdi
call   1040 <puts@plt>
lea    0x104d(%rip),%rdi
call   1040 <puts@plt>
lea    0x1092(%rip),%rdi
call   1040 <puts@plt>
lea    0x10d7(%rip),%rdi
call   1040 <puts@plt>
lea    0x111c(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [82 x i8] c"--------------------------------------------------------------------------------\0A\00"
@.str.2 = [82 x i8] c"| To Do List -- Main Menu |\0A\00"
@.str.3 = [82 x i8] c"| # | Description |\0A\00"
@.str.4 = [82 x i8] c" 0 Display this menu. \0A\00"
@.str.5 = [82 x i8] c" 1 Display a single task. \0A\00"
@.str.6 = [82 x i8] c" 2 Display all tasks. \0A\00"
@.str.7 = [82 x i8] c" 3 Add a new task. \0A\00"
@.str.8 = [82 x i8] c" 4 Remove a task. \0A\00"
@.str.9 = [82 x i8] c" 5 Replace a task. \0A\00"
@.str.10 = [82 x i8] c" 6 Move a task to another location. \0A\00"
@.str.11 = [82 x i8] c" 7 Quit. \0A\00"
define void @menu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.5, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.6, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.7, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.8, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.9, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.10, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.11, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str.12 = [81 x i8] c"| To Do List -- Main Menu |\00"
@str.14 = [81 x i8] c"| # | Description |\00"
@str.16 = [81 x i8] c" 0 Display this menu. \00"
@str.17 = [81 x i8] c" 1 Display a single task. \00"
@str.18 = [81 x i8] c" 2 Display all tasks. \00"
@str.19 = [81 x i8] c" 3 Add a new task. \00"
@str.20 = [81 x i8] c" 4 Remove a task. \00"
@str.21 = [81 x i8] c" 5 Replace a task. \00"
@str.22 = [81 x i8] c" 6 Move a task to another location. \00"
@str.23 = [81 x i8] c" 7 Quit. \00"
@str.24 = [81 x i8] c"--------------------------------------------------------------------------------\00"
define void @menu() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.24, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.12, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.24, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.14, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.24, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.16, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.17, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.18, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.19, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.20, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.21, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.22, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.23, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.24, i64 0, i64 0))
ret void
}