#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*/ printMenu();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ testAreAdjacentVertexes();
int /*<<< orphan*/ testCreationOfTheBoardsGraph();
int /*<<< orphan*/ testGettersGraph();
int /*<<< orphan*/ testGreationOfTheGraph();
int /*<<< orphan*/ testIsInGroup();
int /*<<< orphan*/ testIsInSameGroup();
int /*<<< orphan*/ testOfcalcAdjacentVertexesGraph();
int /*<<< orphan*/ testOfcalcAllAdjacentsGraph();
int /*<<< orphan*/ testOfcalcSideAdjacentsGraph();
int /*<<< orphan*/ testReplaceVertexGraph();
int /*<<< orphan*/ testVertexGraph();
int main(int argc, const char *argv[]) {
  printf("*********************************\n");
  printf("*            Unit Tests         *\n");
  printf("*********************************\n");
  int i = -1;
  while (i != 0) {
    printMenu();
    scanf("%d", &i);
    switch (i) {
    case 1:
      testGreationOfTheGraph();
      break;
    case 2:
      testCreationOfTheBoardsGraph();
      break;
    case 3:
      testOfcalcAdjacentVertexesGraph();
      break;
    case 4:
      testOfcalcAllAdjacentsGraph();
      break;
    case 5:
      testOfcalcSideAdjacentsGraph();
      break;
    case 6:
      testReplaceVertexGraph();
      break;
    case 7:
      testIsInGroup();
      break;
    case 8:
      testAreAdjacentVertexes();
      break;
    case 9:
      testIsInSameGroup();
      break;
    case 10:
      testVertexGraph();
      break;
    case 11:
      testGettersGraph();
      break;
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe2f(%rip),%rdi
call   1060 <printf@plt>
lea    0xe46(%rip),%rdi
call   1060 <printf@plt>
lea    0xe17(%rip),%rdi
call   1060 <printf@plt>
movl   $0xffffffff,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     12ef <main+0x10f>
xor    %eax,%eax
call   10d0 <printMenu@plt>
lea    0xe39(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   10f0 <scanf@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0xa,%eax
ja     12ea <main+0x10a>
mov    -0x20(%rbp),%rax
lea    0xd9e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   1070 <testGreationOfTheGraph@plt>
jmp    12ea <main+0x10a>
mov    $0x0,%al
call   10e0 <testCreationOfTheBoardsGraph@plt>
jmp    12ea <main+0x10a>
mov    $0x0,%al
call   10b0 <testOfcalcAdjacentVertexesGraph@plt>
jmp    12ea <main+0x10a>
mov    $0x0,%al
call   1100 <testOfcalcAllAdjacentsGraph@plt>
jmp    12ea <main+0x10a>
mov    $0x0,%al
call   1030 <testOfcalcSideAdjacentsGraph@plt>
jmp    12ea <main+0x10a>
mov    $0x0,%al
call   10a0 <testReplaceVertexGraph@plt>
jmp    12ea <main+0x10a>
mov    $0x0,%al
call   1050 <testIsInGroup@plt>
jmp    12ea <main+0x10a>
mov    $0x0,%al
call   1080 <testAreAdjacentVertexes@plt>
jmp    12ea <main+0x10a>
mov    $0x0,%al
call   1090 <testIsInSameGroup@plt>
jmp    12ea <main+0x10a>
mov    $0x0,%al
call   10c0 <testVertexGraph@plt>
jmp    12ea <main+0x10a>
mov    $0x0,%al
call   1040 <testGettersGraph@plt>
jmp    1221 <main+0x41>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xe61(%rip),%rbx
mov    %rbx,%rdi
call   1050 <puts@plt>
lea    0xe30(%rip),%rdi
call   1050 <puts@plt>
mov    %rbx,%rdi
call   1050 <puts@plt>
movl   $0xffffffff,0xc(%rsp)
ff
lea    0xe11(%rip),%r14
lea    0xc(%rsp),%r15
lea    0xdd9(%rip),%rbx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   10d0 <printMenu@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   10f0 <scanf@plt>
mov    0xc(%rsp),%eax
lea    -0x1(%rax),%ecx
cmp    $0xa,%ecx
ja     12c4 <main+0xe4>
movslq (%rbx,%rcx,4),%rax
add    %rbx,%rax
jmp    *%rax
xor    %eax,%eax
call   1070 <testGreationOfTheGraph@plt>
jmp    12c0 <main+0xe0>
xor    %eax,%eax
call   10e0 <testCreationOfTheBoardsGraph@plt>
jmp    12c0 <main+0xe0>
xor    %eax,%eax
call   10b0 <testOfcalcAdjacentVertexesGraph@plt>
jmp    12c0 <main+0xe0>
xor    %eax,%eax
call   1100 <testOfcalcAllAdjacentsGraph@plt>
jmp    12c0 <main+0xe0>
xor    %eax,%eax
call   1030 <testOfcalcSideAdjacentsGraph@plt>
jmp    12c0 <main+0xe0>
xor    %eax,%eax
call   10a0 <testReplaceVertexGraph@plt>
jmp    12c0 <main+0xe0>
xor    %eax,%eax
call   1060 <testIsInGroup@plt>
jmp    12c0 <main+0xe0>
xor    %eax,%eax
call   1080 <testAreAdjacentVertexes@plt>
jmp    12c0 <main+0xe0>
xor    %eax,%eax
call   1090 <testIsInSameGroup@plt>
jmp    12c0 <main+0xe0>
xor    %eax,%eax
call   10c0 <testVertexGraph@plt>
jmp    12c0 <main+0xe0>
xor    %eax,%eax
call   1040 <testGettersGraph@plt>
nopl   0x0(%rax,%rax,1)
mov    0xc(%rsp),%eax
test   %eax,%eax
jne    1230 <main+0x50>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [35 x i8] c"*********************************\0A\00"
@.str.1 = [35 x i8] c"* Unit Tests *\0A\00"
@.str.2 = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %6
br label %10
10: ; preds = %39, %2
%11 = load i32, i32* %6
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %40
13: ; preds = %10
%14 = call i32 (...) @printMenu()
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %6)
%16 = load i32, i32* %6
switch i32 %16, label %39 [
i32 1, label %17
i32 2, label %19
i32 3, label %21
i32 4, label %23
i32 5, label %25
i32 6, label %27
i32 7, label %29
i32 8, label %31
i32 9, label %33
i32 10, label %35
i32 11, label %37
]
17: ; preds = %13
%18 = call i32 (...) @testGreationOfTheGraph()
br label %39
19: ; preds = %13
%20 = call i32 (...) @testCreationOfTheBoardsGraph()
br label %39
21: ; preds = %13
%22 = call i32 (...) @testOfcalcAdjacentVertexesGraph()
br label %39
23: ; preds = %13
%24 = call i32 (...) @testOfcalcAllAdjacentsGraph()
br label %39
25: ; preds = %13
%26 = call i32 (...) @testOfcalcSideAdjacentsGraph()
br label %39
27: ; preds = %13
%28 = call i32 (...) @testReplaceVertexGraph()
br label %39
29: ; preds = %13
%30 = call i32 (...) @testIsInGroup()
br label %39
31: ; preds = %13
%32 = call i32 (...) @testAreAdjacentVertexes()
br label %39
33: ; preds = %13
%34 = call i32 (...) @testIsInSameGroup()
br label %39
35: ; preds = %13
%36 = call i32 (...) @testVertexGraph()
br label %39
37: ; preds = %13
%38 = call i32 (...) @testGettersGraph()
br label %39
39: ; preds = %13, %37, %35, %33, %31, %29, %27, %25, %23, %21, %19, %17
br label %10
40: ; preds = %10
%41 = load i32, i32* %3
ret i32 %41
}

LLVM IR (-O2):
@.str.2 = [3 x i8] c"%d\00"
@str.3 = [34 x i8] c"* Unit Tests *\00"
@str.4 = [34 x i8] c"*********************************\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.4, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.3, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.4, i64 0, i64 0))
%7 = bitcast i32* %3 to i8*
store i32 -1, i32* %3
br label %8
8: ; preds = %2, %36
%9 = call i32 (...) @printMenu()
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%11 = load i32, i32* %3
switch i32 %11, label %36 [
i32 1, label %12
i32 2, label %14
i32 3, label %16
i32 4, label %18
i32 5, label %20
i32 6, label %22
i32 7, label %24
i32 8, label %26
i32 9, label %28
i32 10, label %30
i32 11, label %32
]
12: ; preds = %8
%13 = call i32 (...) @testGreationOfTheGraph()
br label %34
14: ; preds = %8
%15 = call i32 (...) @testCreationOfTheBoardsGraph()
br label %34
16: ; preds = %8
%17 = call i32 (...) @testOfcalcAdjacentVertexesGraph()
br label %34
18: ; preds = %8
%19 = call i32 (...) @testOfcalcAllAdjacentsGraph()
br label %34
20: ; preds = %8
%21 = call i32 (...) @testOfcalcSideAdjacentsGraph()
br label %34
22: ; preds = %8
%23 = call i32 (...) @testReplaceVertexGraph()
br label %34
24: ; preds = %8
%25 = call i32 (...) @testIsInGroup()
br label %34
26: ; preds = %8
%27 = call i32 (...) @testAreAdjacentVertexes()
br label %34
28: ; preds = %8
%29 = call i32 (...) @testIsInSameGroup()
br label %34
30: ; preds = %8
%31 = call i32 (...) @testVertexGraph()
br label %34
32: ; preds = %8
%33 = call i32 (...) @testGettersGraph()
br label %34
34: ; preds = %12, %14, %16, %18, %20, %22, %24, %26, %28, %30, %32
%35 = load i32, i32* %3
br label %36
36: ; preds = %34, %8
%37 = phi i32 [ %35, %34 ], [ %11, %8 ]
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %8
39: ; preds = %36
ret i32 0
}