#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*/ cadastrar(int);
int /*<<< orphan*/ calendar();
int /*<<< orphan*/ consulta(int);
int /*<<< orphan*/ editarDocente();
int /*<<< orphan*/ editarReserva();
int /*<<< orphan*/ editarSala();
int /*<<< orphan*/ excluirDocente();
int /*<<< orphan*/ excluirReserva();
int /*<<< orphan*/ excluirSala();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ molde(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ relatorio();
int /*<<< orphan*/ reserva();
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ system(char *);
void menu() {
  int op, op_salas, op_doce, op_reser;
  system("cls");
  molde("SISTEMA DE CADASTRO E RESERVA DE SALAS");
  printf("[1] - Datas ja reservadas\n");
  printf("[2] - Salas\n");
  printf("[3] - Docentes\n");
  printf("[4] - Reservas\n");
  printf("[5] - Gerar Relatorio\n");
  printf("[6] - Sair\n");
  scanf("%d", &op);
  switch (op) {
  case 1:
    system("cls");
    calendar();
    break;
  case 2:
    system("cls");
    molde("MODULO DE SALAS");
    printf("[1] - Cadastrar\n");
    printf("[2] - Editar\n");
    printf("[3] - Excluir\n");
    printf("[4] - Lista de cadastros\n");
    printf("[5] - Voltar\n");
    scanf("%d", &op_salas);
    switch (op_salas) {
    case 1:
      cadastrar(op);
    case 2:
      editarSala();
      break;
    case 3:
      excluirSala();
      break;
    case 4:
      consulta(op);
      break;
    case 5:
      menu();
      break;
    default:
      printf("Opcao invalida!\n");
      system("pause && cls");
      menu();
      break;
    }
    break;
  case 3:
    system("cls");
    molde("MODULO DE DOCENTES");
    printf("[1] - Cadastrar\n");
    printf("[2] - Editar\n");
    printf("[3] - Excluir\n");
    printf("[4] - Lista de cadastros\n");
    printf("[5] - Voltar\n");
    scanf("%d", &op_doce);
    switch (op_doce) {
    case 1:
      cadastrar(op);
      break;
    case 2:
      editarDocente();
      break;
    case 3:
      excluirDocente();
      break;
    case 4:
      consulta(op);
      break;
    case 5:
      menu();
      break;
    default:
      printf("Opcao invalida!\n");
      system("pause && cls");
      menu();
      break;
    }
    break;
  case 4:
    system("cls");
    molde("MODULO DE RESERVAS");
    printf("[1] - Cadastrar\n");
    printf("[2] - Editar\n");
    printf("[3] - Excluir\n");
    printf("[4] - Lista de reservas\n");
    printf("[5] - Voltar\n");
    scanf("%d", &op_reser);
    switch (op_reser) {
    case 1:
      reserva();
      break;
    case 2:
      editarReserva();
      break;
    case 3:
      excluirReserva();
      break;
    case 4:
      consulta(op);
      break;
    case 5:
      menu();
      break;
    default:
      printf("Opcao invalida!\n");
      system("pause && cls");
      menu();
      break;
    }
    break;
  case 5:
    system("cls");
    relatorio();
    break;
  case 6:
    exit(0);
    break;
  default:
    printf("Opcao invalida!\n");
    system("pause && cls");
    menu();
    break;
  }
}


x86 assembly (clang, -O0):
<menu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xf4a(%rip),%rdi
call   1080 <system@plt>
lea    0xe29(%rip),%rdi
call   10a0 <molde@plt>
lea    0xe44(%rip),%rdi
call   1090 <printf@plt>
lea    0xe53(%rip),%rdi
call   1090 <printf@plt>
lea    0xe54(%rip),%rdi
call   1090 <printf@plt>
lea    0xe58(%rip),%rdi
call   1090 <printf@plt>
lea    0xe5c(%rip),%rdi
call   1090 <printf@plt>
lea    0xe67(%rip),%rdi
call   1090 <printf@plt>
lea    0xe67(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   10e0 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x5,%eax
ja     15a3 <menu+0x393>
mov    -0x18(%rbp),%rax
lea    0xd58(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xeb1(%rip),%rdi
call   1080 <system@plt>
mov    $0x0,%al
call   1120 <calendar@plt>
jmp    15c0 <menu+0x3b0>
lea    0xe99(%rip),%rdi
call   1080 <system@plt>
lea    0xe0d(%rip),%rdi
call   10a0 <molde@plt>
lea    0xe11(%rip),%rdi
call   1090 <printf@plt>
lea    0xe16(%rip),%rdi
call   1090 <printf@plt>
lea    0xe18(%rip),%rdi
call   1090 <printf@plt>
lea    0xe1b(%rip),%rdi
call   1090 <printf@plt>
lea    0xe29(%rip),%rdi
call   1090 <printf@plt>
lea    0xdc2(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   10e0 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x4,%eax
ja     138d <menu+0x17d>
mov    -0x20(%rbp),%rax
lea    0xcf3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x4(%rbp),%edi
call   1050 <cadastrar@plt>
mov    $0x0,%al
call   10b0 <editarSala@plt>
jmp    13aa <menu+0x19a>
mov    $0x0,%al
call   10d0 <excluirSala@plt>
jmp    13aa <menu+0x19a>
mov    -0x4(%rbp),%edi
call   1040 <consulta@plt>
jmp    13aa <menu+0x19a>
call   1070 <menu@plt>
jmp    13aa <menu+0x19a>
lea    0xdbb(%rip),%rdi
call   1090 <printf@plt>
lea    0xdc0(%rip),%rdi
call   1080 <system@plt>
call   1070 <menu@plt>
jmp    15c0 <menu+0x3b0>
lea    0xdb3(%rip),%rdi
call   1080 <system@plt>
lea    0xdab(%rip),%rdi
call   10a0 <molde@plt>
lea    0xd2b(%rip),%rdi
call   1090 <printf@plt>
lea    0xd30(%rip),%rdi
call   1090 <printf@plt>
lea    0xd32(%rip),%rdi
call   1090 <printf@plt>
lea    0xd35(%rip),%rdi
call   1090 <printf@plt>
lea    0xd43(%rip),%rdi
call   1090 <printf@plt>
lea    0xcdc(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   10e0 <scanf@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x28(%rbp)
sub    $0x4,%eax
ja     1478 <menu+0x268>
mov    -0x28(%rbp),%rax
lea    0xbf9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x4(%rbp),%edi
call   1050 <cadastrar@plt>
jmp    1495 <menu+0x285>
mov    $0x0,%al
call   1130 <editarDocente@plt>
jmp    1495 <menu+0x285>
mov    $0x0,%al
call   10c0 <excluirDocente@plt>
jmp    1495 <menu+0x285>
mov    -0x4(%rbp),%edi
call   1040 <consulta@plt>
jmp    1495 <menu+0x285>
call   1070 <menu@plt>
jmp    1495 <menu+0x285>
lea    0xcd0(%rip),%rdi
call   1090 <printf@plt>
lea    0xcd5(%rip),%rdi
call   1080 <system@plt>
call   1070 <menu@plt>
jmp    15c0 <menu+0x3b0>
lea    0xcc8(%rip),%rdi
call   1080 <system@plt>
lea    0xcd3(%rip),%rdi
call   10a0 <molde@plt>
lea    0xc40(%rip),%rdi
call   1090 <printf@plt>
lea    0xc45(%rip),%rdi
call   1090 <printf@plt>
lea    0xc47(%rip),%rdi
call   1090 <printf@plt>
lea    0xcb6(%rip),%rdi
call   1090 <printf@plt>
lea    0xc58(%rip),%rdi
call   1090 <printf@plt>
lea    0xbf1(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   10e0 <scanf@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x30(%rbp)
sub    $0x4,%eax
ja     1562 <menu+0x352>
mov    -0x30(%rbp),%rax
lea    0xafa(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   10f0 <reserva@plt>
jmp    157f <menu+0x36f>
mov    $0x0,%al
call   1030 <editarReserva@plt>
jmp    157f <menu+0x36f>
mov    $0x0,%al
call   1110 <excluirReserva@plt>
jmp    157f <menu+0x36f>
mov    -0x4(%rbp),%edi
call   1040 <consulta@plt>
jmp    157f <menu+0x36f>
call   1070 <menu@plt>
jmp    157f <menu+0x36f>
lea    0xbe6(%rip),%rdi
call   1090 <printf@plt>
lea    0xbeb(%rip),%rdi
call   1080 <system@plt>
call   1070 <menu@plt>
jmp    15c0 <menu+0x3b0>
lea    0xbde(%rip),%rdi
call   1080 <system@plt>
mov    $0x0,%al
call   1060 <relatorio@plt>
jmp    15c0 <menu+0x3b0>
xor    %edi,%edi
call   1100 <exit@plt>
lea    0xba5(%rip),%rdi
call   1090 <printf@plt>
lea    0xbaa(%rip),%rdi
call   1080 <system@plt>
call   1070 <menu@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu>:
push   %rax
lea    0xe7f(%rip),%rdi
call   1090 <system@plt>
lea    0xe30(%rip),%rdi
call   10a0 <molde@plt>
lea    0xe91(%rip),%rdi
call   1050 <puts@plt>
lea    0xe9f(%rip),%rdi
call   1050 <puts@plt>
lea    0xe9f(%rip),%rdi
call   1050 <puts@plt>
lea    0xea2(%rip),%rdi
call   1050 <puts@plt>
lea    0xea5(%rip),%rdi
call   1050 <puts@plt>
lea    0xeaf(%rip),%rdi
call   1050 <puts@plt>
lea    0xe03(%rip),%rdi
mov    %rsp,%rsi
call   10e0 <scanf@plt>
mov    (%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x5,%eax
ja     1463 <menu+0x253>
lea    0xd6a(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xdf1(%rip),%rdi
call   1090 <system@plt>
xor    %eax,%eax
call   1120 <calendar@plt>
pop    %rax
ret
lea    0xddc(%rip),%rdi
call   1090 <system@plt>
lea    0xdb7(%rip),%rdi
call   10a0 <molde@plt>
lea    0xe6b(%rip),%rdi
call   1050 <puts@plt>
lea    0xe6f(%rip),%rdi
call   1050 <puts@plt>
lea    0xe70(%rip),%rdi
call   1050 <puts@plt>
lea    0xe72(%rip),%rdi
call   1050 <puts@plt>
lea    0xe7f(%rip),%rdi
call   1050 <puts@plt>
lea    0xd6c(%rip),%rdi
lea    0x4(%rsp),%rsi
call   10e0 <scanf@plt>
mov    0x4(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x4,%eax
ja     1463 <menu+0x253>
lea    0xd10(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    (%rsp),%edi
call   1060 <cadastrar@plt>
xor    %eax,%eax
call   10b0 <editarSala@plt>
pop    %rax
ret
lea    0xd46(%rip),%rdi
call   1090 <system@plt>
lea    0xd3e(%rip),%rdi
call   10a0 <molde@plt>
lea    0xdd5(%rip),%rdi
call   1050 <puts@plt>
lea    0xdd9(%rip),%rdi
call   1050 <puts@plt>
lea    0xdda(%rip),%rdi
call   1050 <puts@plt>
lea    0xddc(%rip),%rdi
call   1050 <puts@plt>
lea    0xde9(%rip),%rdi
call   1050 <puts@plt>
lea    0xcd6(%rip),%rdi
lea    0x4(%rsp),%rsi
call   10e0 <scanf@plt>
mov    0x4(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x4,%eax
ja     1463 <menu+0x253>
lea    0xc66(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    (%rsp),%edi
call   1060 <cadastrar@plt>
pop    %rax
ret
lea    0xcb7(%rip),%rdi
call   1090 <system@plt>
lea    0xcc2(%rip),%rdi
call   10a0 <molde@plt>
lea    0xd46(%rip),%rdi
call   1050 <puts@plt>
lea    0xd4a(%rip),%rdi
call   1050 <puts@plt>
lea    0xd4b(%rip),%rdi
call   1050 <puts@plt>
lea    0xd0a(%rip),%rdi
call   1050 <puts@plt>
lea    0xd5a(%rip),%rdi
call   1050 <puts@plt>
lea    0xc47(%rip),%rdi
lea    0x4(%rsp),%rsi
call   10e0 <scanf@plt>
mov    0x4(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x4,%eax
ja     1463 <menu+0x253>
lea    0xbc7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
xor    %eax,%eax
call   10f0 <reserva@plt>
pop    %rax
ret
lea    0xd25(%rip),%rdi
call   1050 <puts@plt>
lea    0xc18(%rip),%rdi
call   1090 <system@plt>
call   1080 <menu@plt>
pop    %rax
ret
lea    0xc0e(%rip),%rdi
call   1090 <system@plt>
xor    %eax,%eax
call   1070 <relatorio@plt>
pop    %rax
ret
mov    (%rsp),%edi
call   1040 <consulta@plt>
pop    %rax
ret
xor    %eax,%eax
call   10d0 <excluirSala@plt>
pop    %rax
ret
xor    %eax,%eax
call   1130 <editarDocente@plt>
pop    %rax
ret
xor    %eax,%eax
call   10c0 <excluirDocente@plt>
pop    %rax
ret
xor    %eax,%eax
call   1030 <editarReserva@plt>
pop    %rax
ret
xor    %eax,%eax
call   1110 <excluirReserva@plt>
pop    %rax
ret
xor    %edi,%edi
call   1100 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"cls\00"
@.str.1 = [39 x i8] c"SISTEMA DE CADASTRO E RESERVA DE SALAS\00"
@.str.2 = [27 x i8] c"[1] - Datas ja reservadas\0A\00"
@.str.3 = [13 x i8] c"[2] - Salas\0A\00"
@.str.4 = [16 x i8] c"[3] - Docentes\0A\00"
@.str.5 = [16 x i8] c"[4] - Reservas\0A\00"
@.str.6 = [23 x i8] c"[5] - Gerar Relatorio\0A\00"
@.str.7 = [12 x i8] c"[6] - Sair\0A\00"
@.str.8 = [3 x i8] c"%d\00"
@.str.9 = [16 x i8] c"MODULO DE SALAS\00"
@.str.10 = [17 x i8] c"[1] - Cadastrar\0A\00"
@.str.11 = [14 x i8] c"[2] - Editar\0A\00"
@.str.12 = [15 x i8] c"[3] - Excluir\0A\00"
@.str.13 = [26 x i8] c"[4] - Lista de cadastros\0A\00"
@.str.14 = [14 x i8] c"[5] - Voltar\0A\00"
@.str.15 = [17 x i8] c"Opcao invalida!\0A\00"
@.str.16 = [13 x i8] c"pause && cls\00"
@.str.17 = [19 x i8] c"MODULO DE DOCENTES\00"
@.str.18 = [19 x i8] c"MODULO DE RESERVAS\00"
@.str.19 = [25 x i8] c"[4] - Lista de reservas\0A\00"
define void @menu() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @molde(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32* %1)
%14 = load i32, i32* %1
switch i32 %14, label %97 [
i32 1, label %15
i32 2, label %18
i32 3, label %43
i32 4, label %68
i32 5, label %92
i32 6, label %95
]
15: ; preds = %0
%16 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%17 = call i32 (...) @calendar()
br label %100
18: ; preds = %0
%19 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%20 = call i32 @molde(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0))
%23 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.12, i64 0, i64 0))
%24 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.13, i64 0, i64 0))
%25 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%26 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32* %2)
%27 = load i32, i32* %2
switch i32 %27, label %39 [
i32 1, label %28
i32 2, label %31
i32 3, label %33
i32 4, label %35
i32 5, label %38
]
28: ; preds = %18
%29 = load i32, i32* %1
%30 = call i32 @cadastrar(i32 %29)
br label %31
31: ; preds = %18, %28
%32 = call i32 (...) @editarSala()
br label %42
33: ; preds = %18
%34 = call i32 (...) @excluirSala()
br label %42
35: ; preds = %18
%36 = load i32, i32* %1
%37 = call i32 @consulta(i32 %36)
br label %42
38: ; preds = %18
br label %42
39: ; preds = %18
%40 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.15, i64 0, i64 0))
%41 = call i32 @system(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.16, i64 0, i64 0))
br label %42
42: ; preds = %39, %38, %35, %33, %31
br label %100
43: ; preds = %0
%44 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%45 = call i32 @molde(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i64 0, i64 0))
%46 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0))
%47 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0))
%48 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.12, i64 0, i64 0))
%49 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.13, i64 0, i64 0))
%50 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%51 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32* %3)
%52 = load i32, i32* %3
switch i32 %52, label %64 [
i32 1, label %53
i32 2, label %56
i32 3, label %58
i32 4, label %60
i32 5, label %63
]
53: ; preds = %43
%54 = load i32, i32* %1
%55 = call i32 @cadastrar(i32 %54)
br label %67
56: ; preds = %43
%57 = call i32 (...) @editarDocente()
br label %67
58: ; preds = %43
%59 = call i32 (...) @excluirDocente()
br label %67
60: ; preds = %43
%61 = load i32, i32* %1
%62 = call i32 @consulta(i32 %61)
br label %67
63: ; preds = %43
br label %67
64: ; preds = %43
%65 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.15, i64 0, i64 0))
%66 = call i32 @system(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.16, i64 0, i64 0))
br label %67
67: ; preds = %64, %63, %60, %58, %56, %53
br label %100
68: ; preds = %0
%69 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%70 = call i32 @molde(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.18, i64 0, i64 0))
%71 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0))
%72 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0))
%73 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.12, i64 0, i64 0))
%74 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.19, i64 0, i64 0))
%75 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%76 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32* %4)
%77 = load i32, i32* %4
switch i32 %77, label %88 [
i32 1, label %78
i32 2, label %80
i32 3, label %82
i32 4, label %84
i32 5, label %87
]
78: ; preds = %68
%79 = call i32 (...) @reserva()
br label %91
80: ; preds = %68
%81 = call i32 (...) @editarReserva()
br label %91
82: ; preds = %68
%83 = call i32 (...) @excluirReserva()
br label %91
84: ; preds = %68
%85 = load i32, i32* %1
%86 = call i32 @consulta(i32 %85)
br label %91
87: ; preds = %68
br label %91
88: ; preds = %68
%89 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.15, i64 0, i64 0))
%90 = call i32 @system(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.16, i64 0, i64 0))
br label %91
91: ; preds = %88, %87, %84, %82, %80, %78
br label %100
92: ; preds = %0
%93 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%94 = call i32 (...) @relatorio()
br label %100
95: ; preds = %0
%96 = call i32 @exit(i32 0)
unreachable
97: ; preds = %0
%98 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.15, i64 0, i64 0))
%99 = call i32 @system(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.16, i64 0, i64 0))
br label %100
100: ; preds = %97, %92, %91, %67, %42, %15
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"cls\00"
@.str.1 = [39 x i8] c"SISTEMA DE CADASTRO E RESERVA DE SALAS\00"
@.str.8 = [3 x i8] c"%d\00"
@.str.9 = [16 x i8] c"MODULO DE SALAS\00"
@.str.16 = [13 x i8] c"pause && cls\00"
@.str.17 = [19 x i8] c"MODULO DE DOCENTES\00"
@.str.18 = [19 x i8] c"MODULO DE RESERVAS\00"
@str = [26 x i8] c"[1] - Datas ja reservadas\00"
@str.20 = [12 x i8] c"[2] - Salas\00"
@str.21 = [15 x i8] c"[3] - Docentes\00"
@str.22 = [15 x i8] c"[4] - Reservas\00"
@str.23 = [22 x i8] c"[5] - Gerar Relatorio\00"
@str.24 = [11 x i8] c"[6] - Sair\00"
@str.28 = [24 x i8] c"[4] - Lista de reservas\00"
@str.37 = [16 x i8] c"[1] - Cadastrar\00"
@str.38 = [13 x i8] c"[2] - Editar\00"
@str.39 = [14 x i8] c"[3] - Excluir\00"
@str.40 = [25 x i8] c"[4] - Lista de cadastros\00"
@str.41 = [13 x i8] c"[5] - Voltar\00"
@str.43 = [16 x i8] c"Opcao invalida!\00"
define void @menu() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @molde(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.20, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.21, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.22, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.23, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.24, i64 0, i64 0))
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32* %1)
%18 = load i32, i32* %1
switch i32 %18, label %98 [
i32 1, label %19
i32 2, label %22
i32 3, label %46
i32 4, label %70
i32 5, label %93
i32 6, label %96
]
19: ; preds = %0
%20 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%21 = call i32 (...) @calendar()
br label %101
22: ; preds = %0
%23 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%24 = call i32 @molde(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0))
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.37, i64 0, i64 0))
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.38, i64 0, i64 0))
%27 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.39, i64 0, i64 0))
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.40, i64 0, i64 0))
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.41, i64 0, i64 0))
%30 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32* %2)
%31 = load i32, i32* %2
switch i32 %31, label %43 [
i32 1, label %32
i32 2, label %35
i32 3, label %37
i32 4, label %39
i32 5, label %42
]
32: ; preds = %22
%33 = load i32, i32* %1
%34 = call i32 @cadastrar(i32 %33)
br label %35
35: ; preds = %22, %32
%36 = call i32 (...) @editarSala()
br label %101
37: ; preds = %22
%38 = call i32 (...) @excluirSala()
br label %101
39: ; preds = %22
%40 = load i32, i32* %1
%41 = call i32 @consulta(i32 %40)
br label %101
42: ; preds = %22
br label %101
43: ; preds = %22
%44 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.43, i64 0, i64 0))
%45 = call i32 @system(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.16, i64 0, i64 0))
br label %101
46: ; preds = %0
%47 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%48 = call i32 @molde(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i64 0, i64 0))
%49 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.37, i64 0, i64 0))
%50 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.38, i64 0, i64 0))
%51 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.39, i64 0, i64 0))
%52 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.40, i64 0, i64 0))
%53 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.41, i64 0, i64 0))
%54 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32* %3)
%55 = load i32, i32* %3
switch i32 %55, label %67 [
i32 1, label %56
i32 2, label %59
i32 3, label %61
i32 4, label %63
i32 5, label %66
]
56: ; preds = %46
%57 = load i32, i32* %1
%58 = call i32 @cadastrar(i32 %57)
br label %101
59: ; preds = %46
%60 = call i32 (...) @editarDocente()
br label %101
61: ; preds = %46
%62 = call i32 (...) @excluirDocente()
br label %101
63: ; preds = %46
%64 = load i32, i32* %1
%65 = call i32 @consulta(i32 %64)
br label %101
66: ; preds = %46
br label %101
67: ; preds = %46
%68 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.43, i64 0, i64 0))
%69 = call i32 @system(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.16, i64 0, i64 0))
br label %101
70: ; preds = %0
%71 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%72 = call i32 @molde(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.18, i64 0, i64 0))
%73 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.37, i64 0, i64 0))
%74 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.38, i64 0, i64 0))
%75 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.39, i64 0, i64 0))
%76 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.28, i64 0, i64 0))
%77 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.41, i64 0, i64 0))
%78 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32* %4)
%79 = load i32, i32* %4
switch i32 %79, label %90 [
i32 1, label %80
i32 2, label %82
i32 3, label %84
i32 4, label %86
i32 5, label %89
]
80: ; preds = %70
%81 = call i32 (...) @reserva()
br label %101
82: ; preds = %70
%83 = call i32 (...) @editarReserva()
br label %101
84: ; preds = %70
%85 = call i32 (...) @excluirReserva()
br label %101
86: ; preds = %70
%87 = load i32, i32* %1
%88 = call i32 @consulta(i32 %87)
br label %101
89: ; preds = %70
br label %101
90: ; preds = %70
%91 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.43, i64 0, i64 0))
%92 = call i32 @system(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.16, i64 0, i64 0))
br label %101
93: ; preds = %0
%94 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%95 = call i32 (...) @relatorio()
br label %101
96: ; preds = %0
%97 = call i32 @exit(i32 0)
unreachable
98: ; preds = %0
%99 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.43, i64 0, i64 0))
%100 = call i32 @system(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.16, i64 0, i64 0))
br label %101
101: ; preds = %80, %82, %84, %86, %89, %90, %56, %59, %61, %63, %66, %67, %35, %37, %39, %42, %43, %98, %93, %19
ret void
}