#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*/ exibeMenu();
int /*<<< orphan*/ igualComposta();
int /*<<< orphan*/ maiorQueComposta();
int /*<<< orphan*/ menorQueComposta();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ serQuadradoComposta();
int /*<<< orphan*/ serRaizComposta();
void exibeMenu2() {
  int controleMenu = 0;
  int var = 0;
  puts("\n\n=====MENU 2=====");
  printf("\n **Relacao S de B->C (Composição)**");
  printf("\n   1. Igual Que Composta ");
  printf("\n   2. Maior Que Composta ");
  printf("\n   3. Menor que Composta ");
  printf("\n   4. Ser Quadrado Composta ");
  printf("\n   5. Ser Raiz Composta ");
  printf("\n   6. Criar Relaçao \"R\" de A ->B (MENU INICIAL)");
  printf("\n   9. Sair ");
  printf("\n   Selecione uma operação com base no número correspondente:");
  do {
    scanf("%d", &controleMenu);
    switch (controleMenu) {
    case 1:
      igualComposta();
      break;
    case 2:
      maiorQueComposta();
      break;
    case 3:
      menorQueComposta();
      break;
    case 4:
      serQuadradoComposta();
      break;
    case 5:
      serRaizComposta();
      break;
    case 6:
      exibeMenu();
      break;
    case 9:
      puts("\nAdeus\n");
      break;
    default:
      puts("\nDigite uma opção válida!\n");
    }
  } while (controleMenu != 9);
}


x86 assembly (clang, -O0):
<exibeMenu2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xe77(%rip),%rdi
call   1030 <puts@plt>
lea    0xe7e(%rip),%rdi
call   1050 <printf@plt>
lea    0xe99(%rip),%rdi
call   1050 <printf@plt>
lea    0xea8(%rip),%rdi
call   1050 <printf@plt>
lea    0xeb7(%rip),%rdi
call   1050 <printf@plt>
lea    0xec6(%rip),%rdi
call   1050 <printf@plt>
lea    0xed8(%rip),%rdi
call   1050 <printf@plt>
lea    0xee6(%rip),%rdi
call   1050 <printf@plt>
lea    0xf0c(%rip),%rdi
call   1050 <printf@plt>
lea    0xf0d(%rip),%rdi
call   1050 <printf@plt>
lea    0xf42(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   10a0 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x8,%eax
ja     12b0 <exibeMenu2+0x120>
mov    -0x10(%rbp),%rax
lea    0xdb2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   1040 <igualComposta@plt>
jmp    12bc <exibeMenu2+0x12c>
mov    $0x0,%al
call   1060 <maiorQueComposta@plt>
jmp    12bc <exibeMenu2+0x12c>
mov    $0x0,%al
call   1080 <menorQueComposta@plt>
jmp    12bc <exibeMenu2+0x12c>
mov    $0x0,%al
call   10b0 <serQuadradoComposta@plt>
jmp    12bc <exibeMenu2+0x12c>
mov    $0x0,%al
call   1070 <serRaizComposta@plt>
jmp    12bc <exibeMenu2+0x12c>
mov    $0x0,%al
call   1090 <exibeMenu@plt>
jmp    12bc <exibeMenu2+0x12c>
lea    0xec4(%rip),%rdi
call   1030 <puts@plt>
jmp    12bc <exibeMenu2+0x12c>
lea    0xebb(%rip),%rdi
call   1030 <puts@plt>
jmp    12c1 <exibeMenu2+0x131>
cmpl   $0x9,-0x4(%rbp)
jne    121e <exibeMenu2+0x8e>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exibeMenu2>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
lea    0xe78(%rip),%rdi
call   1030 <puts@plt>
lea    0xe7f(%rip),%rdi
call   1050 <printf@plt>
lea    0xe9a(%rip),%rdi
call   1050 <printf@plt>
lea    0xea9(%rip),%rdi
call   1050 <printf@plt>
lea    0xeb8(%rip),%rdi
call   1050 <printf@plt>
lea    0xec7(%rip),%rdi
call   1050 <printf@plt>
lea    0xed9(%rip),%rdi
call   1050 <printf@plt>
lea    0xee7(%rip),%rdi
call   1050 <printf@plt>
lea    0xf0d(%rip),%rdi
call   1050 <printf@plt>
lea    0xf0e(%rip),%rdi
call   1050 <printf@plt>
lea    0xf43(%rip),%r14
lea    0xc(%rsp),%r13
lea    0xf42(%rip),%r15
lea    0xdc9(%rip),%rbx
lea    0xf2c(%rip),%r12
jmp    124f <exibeMenu2+0xbf>
mov    %r15,%rdi
call   1030 <puts@plt>
cmpl   $0x9,0xc(%rsp)
je     12aa <exibeMenu2+0x11a>
mov    %r14,%rdi
mov    %r13,%rsi
call   10a0 <scanf@plt>
mov    0xc(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x8,%eax
ja     1240 <exibeMenu2+0xb0>
movslq (%rbx,%rax,4),%rax
add    %rbx,%rax
jmp    *%rax
xor    %eax,%eax
call   1040 <igualComposta@plt>
jmp    1248 <exibeMenu2+0xb8>
xor    %eax,%eax
call   1060 <maiorQueComposta@plt>
jmp    1248 <exibeMenu2+0xb8>
xor    %eax,%eax
call   1090 <exibeMenu@plt>
jmp    1248 <exibeMenu2+0xb8>
xor    %eax,%eax
call   1080 <menorQueComposta@plt>
jmp    1248 <exibeMenu2+0xb8>
xor    %eax,%eax
call   10b0 <serQuadradoComposta@plt>
jmp    1248 <exibeMenu2+0xb8>
xor    %eax,%eax
call   1070 <serRaizComposta@plt>
jmp    1248 <exibeMenu2+0xb8>
mov    %r12,%rdi
jmp    1243 <exibeMenu2+0xb3>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [19 x i8] c"\0A\0A=====MENU 2=====\00"
@.str.1 = [39 x i8] c"\0A **Relacao S de B->C (Composi\C3\A7\C3\A3o)**\00"
@.str.2 = [27 x i8] c"\0A 1. Igual Que Composta \00"
@.str.3 = [27 x i8] c"\0A 2. Maior Que Composta \00"
@.str.4 = [27 x i8] c"\0A 3. Menor que Composta \00"
@.str.5 = [30 x i8] c"\0A 4. Ser Quadrado Composta \00"
@.str.6 = [26 x i8] c"\0A 5. Ser Raiz Composta \00"
@.str.7 = [50 x i8] c"\0A 6. Criar Rela\C3\A7ao \22R\22 de A ->B (MENU INICIAL)\00"
@.str.8 = [13 x i8] c"\0A 9. Sair \00"
@.str.9 = [65 x i8] c"\0A Selecione uma opera\C3\A7\C3\A3o com base no n\C3\BAmero correspondente:\00"
@.str.10 = [3 x i8] c"%d\00"
@.str.11 = [8 x i8] c"\0AAdeus\0A\00"
@.str.12 = [30 x i8] c"\0ADigite uma op\C3\A7\C3\A3o v\C3\A1lida!\0A\00"
define void @exibeMenu2() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 @puts(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.7, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.9, i64 0, i64 0))
br label %13
13: ; preds = %33, %0
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %1)
%15 = load i32, i32* %1
switch i32 %15, label %30 [
i32 1, label %16
i32 2, label %18
i32 3, label %20
i32 4, label %22
i32 5, label %24
i32 6, label %26
i32 9, label %28
]
16: ; preds = %13
%17 = call i32 (...) @igualComposta()
br label %32
18: ; preds = %13
%19 = call i32 (...) @maiorQueComposta()
br label %32
20: ; preds = %13
%21 = call i32 (...) @menorQueComposta()
br label %32
22: ; preds = %13
%23 = call i32 (...) @serQuadradoComposta()
br label %32
24: ; preds = %13
%25 = call i32 (...) @serRaizComposta()
br label %32
26: ; preds = %13
%27 = call i32 (...) @exibeMenu()
br label %32
28: ; preds = %13
%29 = call i32 @puts(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0))
br label %32
30: ; preds = %13
%31 = call i32 @puts(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0))
br label %32
32: ; preds = %30, %28, %26, %24, %22, %20, %18, %16
br label %33
33: ; preds = %32
%34 = load i32, i32* %1
%35 = icmp ne i32 %34, 9
br i1 %35, label %13, label %36
36: ; preds = %33
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"\0A\0A=====MENU 2=====\00"
@.str.1 = [39 x i8] c"\0A **Relacao S de B->C (Composi\C3\A7\C3\A3o)**\00"
@.str.2 = [27 x i8] c"\0A 1. Igual Que Composta \00"
@.str.3 = [27 x i8] c"\0A 2. Maior Que Composta \00"
@.str.4 = [27 x i8] c"\0A 3. Menor que Composta \00"
@.str.5 = [30 x i8] c"\0A 4. Ser Quadrado Composta \00"
@.str.6 = [26 x i8] c"\0A 5. Ser Raiz Composta \00"
@.str.7 = [50 x i8] c"\0A 6. Criar Rela\C3\A7ao \22R\22 de A ->B (MENU INICIAL)\00"
@.str.8 = [13 x i8] c"\0A 9. Sair \00"
@.str.9 = [65 x i8] c"\0A Selecione uma opera\C3\A7\C3\A3o com base no n\C3\BAmero correspondente:\00"
@.str.10 = [3 x i8] c"%d\00"
@.str.11 = [8 x i8] c"\0AAdeus\0A\00"
@.str.12 = [30 x i8] c"\0ADigite uma op\C3\A7\C3\A3o v\C3\A1lida!\0A\00"
define void @exibeMenu2() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%8 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0))
%9 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
%10 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.7, i64 0, i64 0))
%11 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%12 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str.9, i64 0, i64 0))
br label %13
13: ; preds = %32, %0
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %1)
%15 = load i32, i32* %1
switch i32 %15, label %30 [
i32 1, label %16
i32 2, label %18
i32 3, label %20
i32 4, label %22
i32 5, label %24
i32 6, label %26
i32 9, label %28
]
16: ; preds = %13
%17 = call i32 (...) @igualComposta()
br label %32
18: ; preds = %13
%19 = call i32 (...) @maiorQueComposta()
br label %32
20: ; preds = %13
%21 = call i32 (...) @menorQueComposta()
br label %32
22: ; preds = %13
%23 = call i32 (...) @serQuadradoComposta()
br label %32
24: ; preds = %13
%25 = call i32 (...) @serRaizComposta()
br label %32
26: ; preds = %13
%27 = call i32 (...) @exibeMenu()
br label %32
28: ; preds = %13
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0))
br label %32
30: ; preds = %13
%31 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0))
br label %32
32: ; preds = %16, %18, %20, %22, %24, %26, %28, %30
%33 = load i32, i32* %1
%34 = icmp eq i32 %33, 9
br i1 %34, label %35, label %13
35: ; preds = %32
ret void
}