#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 displayMenu() {
  printf("---------------------------------------------------------------\n");
  printf("Choose option (enter the part in brackets)\n");
  printf("(S)ym \t\t - symmetrization\n");
  printf("(D)ijkstra \t - shortest path between node & other nodes\n");
  printf("(F)loyd-Warshall - shortest path between every 2 nodes\n");
  printf("tar(J)an \t - strongly connected components\n");
  printf("(T)sort \t - topological ordering\n");
  printf("(C)losure \t - transitive closure\n");
  printf("(R)eduction \t - transitive reduction\n");
  printf("l(I)st-convert \t - from adjacency matrix to list of successors\n");
  printf("(M)atrix-convert - from list of successors to adjacency matrix\n");
  printf("Displa(Y) \t - display the graph \n");
  printf("c(L)ear \t - clear screen (only for in *nix like OS) \n");
  printf("(H)elp \t\t - display this menu:) \n");
  printf("(Q)uit \t\t - quit the program \n");
  printf("---------------------------------------------------------------\n");
}


x86 assembly (clang, -O0):
<displayMenu>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf1a(%rip),%rdi
call   1030 <printf@plt>
lea    0xf3a(%rip),%rdi
call   1030 <printf@plt>
lea    0xf49(%rip),%rdi
call   1030 <printf@plt>
lea    0xf76(%rip),%rdi
call   1030 <printf@plt>
lea    0xfa2(%rip),%rdi
call   1030 <printf@plt>
lea    0xfc2(%rip),%rdi
call   1030 <printf@plt>
lea    0xfd8(%rip),%rdi
call   1030 <printf@plt>
lea    0xfee(%rip),%rdi
call   1030 <printf@plt>
lea    0x1008(%rip),%rdi
call   1030 <printf@plt>
lea    0x103c(%rip),%rdi
call   1030 <printf@plt>
lea    0x1070(%rip),%rdi
call   1030 <printf@plt>
lea    0x1086(%rip),%rdi
call   1030 <printf@plt>
lea    0x10b0(%rip),%rdi
call   1030 <printf@plt>
lea    0x10c6(%rip),%rdi
call   1030 <printf@plt>
lea    0xe31(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<displayMenu>:
push   %rbx
lea    0x1141(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
lea    0xef8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf06(%rip),%rdi
call   1030 <puts@plt>
lea    0xf32(%rip),%rdi
call   1030 <puts@plt>
lea    0xf5d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf91(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa6(%rip),%rdi
call   1030 <puts@plt>
lea    0xfbf(%rip),%rdi
call   1030 <puts@plt>
lea    0xff2(%rip),%rdi
call   1030 <puts@plt>
lea    0x1025(%rip),%rdi
call   1030 <puts@plt>
lea    0x103a(%rip),%rdi
call   1030 <puts@plt>
lea    0x1063(%rip),%rdi
call   1030 <puts@plt>
lea    0x1078(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [65 x i8] c"---------------------------------------------------------------\0A\00"
@.str.1 = [44 x i8] c"Choose option (enter the part in brackets)\0A\00"
@.str.2 = [27 x i8] c"(S)ym \09\09 - symmetrization\0A\00"
@.str.3 = [57 x i8] c"(D)ijkstra \09 - shortest path between node & other nodes\0A\00"
@.str.4 = [56 x i8] c"(F)loyd-Warshall - shortest path between every 2 nodes\0A\00"
@.str.5 = [44 x i8] c"tar(J)an \09 - strongly connected components\0A\00"
@.str.6 = [34 x i8] c"(T)sort \09 - topological ordering\0A\00"
@.str.7 = [34 x i8] c"(C)losure \09 - transitive closure\0A\00"
@.str.8 = [38 x i8] c"(R)eduction \09 - transitive reduction\0A\00"
@.str.9 = [64 x i8] c"l(I)st-convert \09 - from adjacency matrix to list of successors\0A\00"
@.str.10 = [64 x i8] c"(M)atrix-convert - from list of successors to adjacency matrix\0A\00"
@.str.11 = [34 x i8] c"Displa(Y) \09 - display the graph \0A\00"
@.str.12 = [54 x i8] c"c(L)ear \09 - clear screen (only for in *nix like OS) \0A\00"
@.str.13 = [34 x i8] c"(H)elp \09\09 - display this menu:) \0A\00"
@.str.14 = [31 x i8] c"(Q)uit \09\09 - quit the program \0A\00"
define void @displayMenu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.12, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.13, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str.15 = [43 x i8] c"Choose option (enter the part in brackets)\00"
@str.16 = [26 x i8] c"(S)ym \09\09 - symmetrization\00"
@str.17 = [56 x i8] c"(D)ijkstra \09 - shortest path between node & other nodes\00"
@str.18 = [55 x i8] c"(F)loyd-Warshall - shortest path between every 2 nodes\00"
@str.19 = [43 x i8] c"tar(J)an \09 - strongly connected components\00"
@str.20 = [33 x i8] c"(T)sort \09 - topological ordering\00"
@str.21 = [33 x i8] c"(C)losure \09 - transitive closure\00"
@str.22 = [37 x i8] c"(R)eduction \09 - transitive reduction\00"
@str.23 = [63 x i8] c"l(I)st-convert \09 - from adjacency matrix to list of successors\00"
@str.24 = [63 x i8] c"(M)atrix-convert - from list of successors to adjacency matrix\00"
@str.25 = [33 x i8] c"Displa(Y) \09 - display the graph \00"
@str.26 = [53 x i8] c"c(L)ear \09 - clear screen (only for in *nix like OS) \00"
@str.27 = [33 x i8] c"(H)elp \09\09 - display this menu:) \00"
@str.28 = [30 x i8] c"(Q)uit \09\09 - quit the program \00"
@str.29 = [64 x i8] c"---------------------------------------------------------------\00"
define void @displayMenu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.29, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.15, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.16, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.17, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.18, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.19, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.20, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.21, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.22, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.23, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.24, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.25, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.26, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.27, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.28, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.29, i64 0, i64 0))
ret void
}