#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 */
struct no {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ LC_ALL;
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ insertHash(struct no **, char);
int /*<<< orphan*/ printHash(struct no **);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
main() {
  setlocale(LC_ALL, "");
  struct no *vetorIndice[7];
  int i;
  for (i = 0; i < 7; i++) {
    vetorIndice[i] = NULL;
  }
  char opcao;
  int sair = 0;
  do {
    printf("\n\n\n*********************************\nO QUÊ VOCÊ DESEJA "
           "FAZER?\n---------------------------------\n");
    printf("1 - Imprimir a tabela hash\n");
    printf("2 - Inserir chave\n");
    printf("S - Sair\n---------------------------------\n>>> ");
    scanf("%c", &opcao);
    getchar();
    switch (opcao) {
    case '1':
      printHash(vetorIndice);
      break;
    case '2':
      insertHash(vetorIndice, 'N');
      insertHash(vetorIndice, 'I');
      insertHash(vetorIndice, 'V');
      insertHash(vetorIndice, 'O');
      insertHash(vetorIndice, 'Z');
      insertHash(vetorIndice, 'U');
      insertHash(vetorIndice, 'A');
      insertHash(vetorIndice, 'E');
      insertHash(vetorIndice, 'F');
      insertHash(vetorIndice, 'R');
      insertHash(vetorIndice, 'B');
      insertHash(vetorIndice, 'L');
      break;
    case 's':
    case 'S':
      sair = 1;
      printf("\nTchau! :(\n");
      break;
    default:
      printf("\nERRO: Opção Inválida");
      break;
    }
  } while (sair == 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
lea    0xf51(%rip),%rsi
call   1070 <setlocale@plt>
movl   $0x0,-0x44(%rbp)
cmpl   $0x7,-0x44(%rbp)
jge    11b0 <main+0x50>
movslq -0x44(%rbp),%rax
movq   $0x0,-0x40(%rbp,%rax,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    118b <main+0x2b>
movl   $0x0,-0x4c(%rbp)
lea    0xe42(%rip),%rdi
call   1040 <printf@plt>
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb0(%rip),%rdi
call   1040 <printf@plt>
lea    0xed4(%rip),%rdi
lea    -0x45(%rbp),%rsi
call   1080 <scanf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
movsbl -0x45(%rbp),%eax
mov    %eax,-0x50(%rbp)
sub    $0x31,%eax
je     1246 <main+0xe6>
jmp    1213 <main+0xb3>
mov    -0x50(%rbp),%eax
sub    $0x32,%eax
je     1254 <main+0xf4>
jmp    1224 <main+0xc4>
mov    -0x50(%rbp),%eax
sub    $0x53,%eax
je     1301 <main+0x1a1>
jmp    1235 <main+0xd5>
mov    -0x50(%rbp),%eax
sub    $0x73,%eax
je     1301 <main+0x1a1>
jmp    1319 <main+0x1b9>
lea    -0x40(%rbp),%rdi
call   1060 <printHash@plt>
jmp    1325 <main+0x1c5>
lea    -0x40(%rbp),%rdi
mov    $0x4e,%esi
call   1030 <insertHash@plt>
lea    -0x40(%rbp),%rdi
mov    $0x49,%esi
call   1030 <insertHash@plt>
lea    -0x40(%rbp),%rdi
mov    $0x56,%esi
call   1030 <insertHash@plt>
lea    -0x40(%rbp),%rdi
mov    $0x4f,%esi
call   1030 <insertHash@plt>
lea    -0x40(%rbp),%rdi
mov    $0x5a,%esi
call   1030 <insertHash@plt>
lea    -0x40(%rbp),%rdi
mov    $0x55,%esi
call   1030 <insertHash@plt>
lea    -0x40(%rbp),%rdi
mov    $0x41,%esi
call   1030 <insertHash@plt>
lea    -0x40(%rbp),%rdi
mov    $0x45,%esi
call   1030 <insertHash@plt>
lea    -0x40(%rbp),%rdi
mov    $0x46,%esi
call   1030 <insertHash@plt>
lea    -0x40(%rbp),%rdi
mov    $0x52,%esi
call   1030 <insertHash@plt>
lea    -0x40(%rbp),%rdi
mov    $0x42,%esi
call   1030 <insertHash@plt>
lea    -0x40(%rbp),%rdi
mov    $0x4c,%esi
call   1030 <insertHash@plt>
jmp    1325 <main+0x1c5>
movl   $0x1,-0x4c(%rbp)
lea    0xdb6(%rip),%rdi
call   1040 <printf@plt>
jmp    1325 <main+0x1c5>
lea    0xdb1(%rip),%rdi
call   1040 <printf@plt>
jmp    132a <main+0x1ca>
cmpl   $0x0,-0x4c(%rbp)
je     11b7 <main+0x57>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    0x2e5b(%rip),%rax
mov    (%rax),%edi
lea    0xea1(%rip),%rsi
call   1080 <setlocale@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movq   $0x0,0x40(%rsp)
lea    0xef9(%rip),%r15
lea    0xf0d(%rip),%r12
lea    0xe3d(%rip),%r13
lea    0xe66(%rip),%rbx
lea    0xf(%rsp),%rbp
lea    0x10(%rsp),%r14
jmp    1285 <main+0x115>
nopl   0x0(%rax)
cmp    $0x32,%eax
jne    12d5 <main+0x165>
mov    %r14,%rdi
mov    $0x4e,%esi
call   1040 <insertHash@plt>
mov    %r14,%rdi
mov    $0x49,%esi
call   1040 <insertHash@plt>
mov    %r14,%rdi
mov    $0x56,%esi
call   1040 <insertHash@plt>
mov    %r14,%rdi
mov    $0x4f,%esi
call   1040 <insertHash@plt>
mov    %r14,%rdi
mov    $0x5a,%esi
call   1040 <insertHash@plt>
mov    %r14,%rdi
mov    $0x55,%esi
call   1040 <insertHash@plt>
mov    %r14,%rdi
mov    $0x41,%esi
call   1040 <insertHash@plt>
mov    %r14,%rdi
mov    $0x45,%esi
call   1040 <insertHash@plt>
mov    %r14,%rdi
mov    $0x46,%esi
call   1040 <insertHash@plt>
mov    %r14,%rdi
mov    $0x52,%esi
call   1040 <insertHash@plt>
mov    %r14,%rdi
mov    $0x42,%esi
call   1040 <insertHash@plt>
mov    %r14,%rdi
mov    $0x4c,%esi
call   1040 <insertHash@plt>
lea    0xdc0(%rip),%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %r12,%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1090 <scanf@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
movsbl 0xf(%rsp),%eax
cmp    $0x31,%eax
jg     11e0 <main+0x70>
jne    12df <main+0x16f>
mov    %r14,%rdi
call   1070 <printHash@plt>
jmp    1285 <main+0x115>
cmp    $0x53,%eax
je     12ed <main+0x17d>
cmp    $0x73,%eax
je     12ed <main+0x17d>
lea    0xd4d(%rip),%rdi
call   1050 <printf@plt>
jmp    1285 <main+0x115>
lea    0xde7(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.no = type { i32 }
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [99 x i8] c"\0A\0A\0A*********************************\0AO QU\C3\8A VOC\C3\8A DESEJA FAZER?\0A---------------------------------\0A\00"
@.str.2 = [28 x i8] c"1 - Imprimir a tabela hash\0A\00"
@.str.3 = [19 x i8] c"2 - Inserir chave\0A\00"
@.str.4 = [48 x i8] c"S - Sair\0A---------------------------------\0A>>> \00"
@.str.5 = [3 x i8] c"%c\00"
@.str.6 = [12 x i8] c"\0ATchau! :(\0A\00"
@.str.7 = [25 x i8] c"\0AERRO: Op\C3\A7\C3\A3o Inv\C3\A1lida\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [7 x %struct.no*]
%3 = alloca i32
%4 = alloca i8
%5 = alloca i32
store i32 0, i32* %1
%6 = load i32, i32* @LC_ALL
%7 = call i32 @setlocale(i32 %6, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %8
8: ; preds = %15, %0
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 7
br i1 %10, label %11, label %18
11: ; preds = %8
%12 = load i32, i32* %3
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [7 x %struct.no*], [7 x %struct.no*]* %2, i64 0, i64 %13
store %struct.no* null, %struct.no** %14
br label %15
15: ; preds = %11
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %8
18: ; preds = %8
store i32 0, i32* %5
br label %19
19: ; preds = %61, %18
%20 = call i32 @printf(i8* getelementptr inbounds ([99 x i8], [99 x i8]* @.str.1, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%23 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0))
%24 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %4)
%25 = call i32 (...) @getchar()
%26 = load i8, i8* %4
%27 = sext i8 %26 to i32
switch i32 %27, label %58 [
i32 49, label %28
i32 50, label %31
i32 115, label %56
i32 83, label %56
]
28: ; preds = %19
%29 = getelementptr inbounds [7 x %struct.no*], [7 x %struct.no*]* %2, i64 0, i64 0
%30 = call i32 @printHash(%struct.no** %29)
br label %60
31: ; preds = %19
%32 = getelementptr inbounds [7 x %struct.no*], [7 x %struct.no*]* %2, i64 0, i64 0
%33 = call i32 @insertHash(%struct.no** %32, i8 signext 78)
%34 = getelementptr inbounds [7 x %struct.no*], [7 x %struct.no*]* %2, i64 0, i64 0
%35 = call i32 @insertHash(%struct.no** %34, i8 signext 73)
%36 = getelementptr inbounds [7 x %struct.no*], [7 x %struct.no*]* %2, i64 0, i64 0
%37 = call i32 @insertHash(%struct.no** %36, i8 signext 86)
%38 = getelementptr inbounds [7 x %struct.no*], [7 x %struct.no*]* %2, i64 0, i64 0
%39 = call i32 @insertHash(%struct.no** %38, i8 signext 79)
%40 = getelementptr inbounds [7 x %struct.no*], [7 x %struct.no*]* %2, i64 0, i64 0
%41 = call i32 @insertHash(%struct.no** %40, i8 signext 90)
%42 = getelementptr inbounds [7 x %struct.no*], [7 x %struct.no*]* %2, i64 0, i64 0
%43 = call i32 @insertHash(%struct.no** %42, i8 signext 85)
%44 = getelementptr inbounds [7 x %struct.no*], [7 x %struct.no*]* %2, i64 0, i64 0
%45 = call i32 @insertHash(%struct.no** %44, i8 signext 65)
%46 = getelementptr inbounds [7 x %struct.no*], [7 x %struct.no*]* %2, i64 0, i64 0
%47 = call i32 @insertHash(%struct.no** %46, i8 signext 69)
%48 = getelementptr inbounds [7 x %struct.no*], [7 x %struct.no*]* %2, i64 0, i64 0
%49 = call i32 @insertHash(%struct.no** %48, i8 signext 70)
%50 = getelementptr inbounds [7 x %struct.no*], [7 x %struct.no*]* %2, i64 0, i64 0
%51 = call i32 @insertHash(%struct.no** %50, i8 signext 82)
%52 = getelementptr inbounds [7 x %struct.no*], [7 x %struct.no*]* %2, i64 0, i64 0
%53 = call i32 @insertHash(%struct.no** %52, i8 signext 66)
%54 = getelementptr inbounds [7 x %struct.no*], [7 x %struct.no*]* %2, i64 0, i64 0
%55 = call i32 @insertHash(%struct.no** %54, i8 signext 76)
br label %60
56: ; preds = %19, %19
store i32 1, i32* %5
%57 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0))
br label %60
58: ; preds = %19
%59 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0))
br label %60
60: ; preds = %58, %56, %31, %28
br label %61
61: ; preds = %60
%62 = load i32, i32* %5
%63 = icmp eq i32 %62, 0
br i1 %63, label %19, label %64
64: ; preds = %61
ret i32 0
}

LLVM IR (-O2):
%struct.no = type { i32 }
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.4 = [48 x i8] c"S - Sair\0A---------------------------------\0A>>> \00"
@.str.5 = [3 x i8] c"%c\00"
@.str.7 = [25 x i8] c"\0AERRO: Op\C3\A7\C3\A3o Inv\C3\A1lida\00"
@str = [98 x i8] c"\0A\0A\0A*********************************\0AO QU\C3\8A VOC\C3\8A DESEJA FAZER?\0A---------------------------------\00"
@str.8 = [27 x i8] c"1 - Imprimir a tabela hash\00"
@str.9 = [18 x i8] c"2 - Inserir chave\00"
@str.10 = [11 x i8] c"\0ATchau! :(\00"
define i32 @main() {
%1 = alloca [7 x %struct.no*]
%2 = bitcast [7 x %struct.no*]* %1 to i8*
%3 = alloca i8
%4 = load i32, i32* @LC_ALL
%5 = tail call i32 @setlocale(i32 %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [7 x %struct.no*], [7 x %struct.no*]* %1, i64 0, i64 0
br label %7
7: ; preds = %18, %0
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([98 x i8], [98 x i8]* @str, i64 0, i64 0))
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.8, i64 0, i64 0))
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %3)
%13 = call i32 (...) @getchar()
%14 = load i8, i8* %3
%15 = sext i8 %14 to i32
switch i32 %15, label %34 [
i32 49, label %16
i32 50, label %19
i32 115, label %32
i32 83, label %32
]
16: ; preds = %7
%17 = call i32 @printHash(%struct.no** %6)
br label %18
18: ; preds = %16, %19, %34
br label %7
19: ; preds = %7
%20 = call i32 @insertHash(%struct.no** %6, i8 signext 78)
%21 = call i32 @insertHash(%struct.no** %6, i8 signext 73)
%22 = call i32 @insertHash(%struct.no** %6, i8 signext 86)
%23 = call i32 @insertHash(%struct.no** %6, i8 signext 79)
%24 = call i32 @insertHash(%struct.no** %6, i8 signext 90)
%25 = call i32 @insertHash(%struct.no** %6, i8 signext 85)
%26 = call i32 @insertHash(%struct.no** %6, i8 signext 65)
%27 = call i32 @insertHash(%struct.no** %6, i8 signext 69)
%28 = call i32 @insertHash(%struct.no** %6, i8 signext 70)
%29 = call i32 @insertHash(%struct.no** %6, i8 signext 82)
%30 = call i32 @insertHash(%struct.no** %6, i8 signext 66)
%31 = call i32 @insertHash(%struct.no** %6, i8 signext 76)
br label %18
32: ; preds = %7, %7
%33 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.10, i64 0, i64 0))
ret i32 0
34: ; preds = %7
%35 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0))
br label %18
}