#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 */
char captura_opcao_menu();
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ inserir_aluno();
int main(int argc, char const *argv[]) {
  char opcao;
  do {
    opcao = captura_opcao_menu();
    switch (opcao) {
    case '1':
      inserir_aluno();
      getchar();
      getchar();
      break;
    case '2':
      break;
    case '3':
      break;
    case '4':
      break;
    case '5':
      break;
    case '6':
      break;
    }
  } while (opcao != '6');
  return 0;
}


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)
xor    %eax,%eax
call   1030 <captura_opcao_menu@plt>
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%eax
add    $0xffffffcf,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x5,%eax
ja     11ad <main+0x7d>
mov    -0x20(%rbp),%rax
lea    0xe8f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   1040 <inserir_aluno@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
jmp    11ad <main+0x7d>
jmp    11ad <main+0x7d>
jmp    11ad <main+0x7d>
jmp    11ad <main+0x7d>
jmp    11ad <main+0x7d>
jmp    11ad <main+0x7d>
jmp    11b2 <main+0x82>
movsbl -0x11(%rbp),%eax
cmp    $0x36,%eax
jne    1146 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
jmp    1155 <main+0x25>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1040 <inserir_aluno@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
call   1030 <captura_opcao_menu@plt>
cmp    $0x31,%al
je     1140 <main+0x10>
cmp    $0x36,%al
jne    1155 <main+0x25>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %7
7: ; preds = %21, %2
%8 = call signext i8 (...) @captura_opcao_menu()
store i8 %8, i8* %6
%9 = load i8, i8* %6
%10 = sext i8 %9 to i32
switch i32 %10, label %20 [
i32 49, label %11
i32 50, label %15
i32 51, label %16
i32 52, label %17
i32 53, label %18
i32 54, label %19
]
11: ; preds = %7
%12 = call i32 (...) @inserir_aluno()
%13 = call i32 (...) @getchar()
%14 = call i32 (...) @getchar()
br label %20
15: ; preds = %7
br label %20
16: ; preds = %7
br label %20
17: ; preds = %7
br label %20
18: ; preds = %7
br label %20
19: ; preds = %7
br label %20
20: ; preds = %7, %19, %18, %17, %16, %15, %11
br label %21
21: ; preds = %20
%22 = load i8, i8* %6
%23 = sext i8 %22 to i32
%24 = icmp ne i32 %23, 54
br i1 %24, label %7, label %25
25: ; preds = %21
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %5, %2
%4 = tail call signext i8 (...) @captura_opcao_menu()
switch i8 %4, label %5 [
i8 49, label %6
i8 54, label %10
]
5: ; preds = %3, %6
br label %3
6: ; preds = %3
%7 = tail call i32 (...) @inserir_aluno()
%8 = tail call i32 (...) @getchar()
%9 = tail call i32 (...) @getchar()
br label %5
10: ; preds = %3
ret i32 0
}