#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*/ printf(char *);
int /*<<< orphan*/ relacao_01();
int /*<<< orphan*/ relacao_02();
int /*<<< orphan*/ relacao_03();
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ system(char *);
int main() {
  int opcao;
  while (opcao >= 1) {
    printf("\n=======================================================\n");
    printf("=============== VERIFICANDO RELACOES ==================\n");
    printf("=======================================================\n");
    printf("1 - TESTAR RELACOES\n");
    printf("0 - SAIR DO PROGRAMA\n");
    printf("=======================================================\n");
    printf("INFORME A OPCAO PARA SER VERIFICADA:\n");
    scanf("%d", &opcao);
    printf("=======================================================\n");
    switch (opcao) {
    case 0:
      opcao = -5;
      system("cls");
      printf("=======================================================\n");
      printf("PROGRAMA FINALIZADO COM SUCESSO!\n");
      printf("=======================================================\n");
      break;
    case 1:
      system("cls");
      relacao_01();
      relacao_02();
      relacao_03();
      break;
    default:
      opcao = -5;
      system("cls");
      printf("=======================================================\n");
      printf("OPCAO INVALIDA, PROGRAMA FINALIZADO!\n");
      printf("=======================================================\n");
      break;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x1,-0x8(%rbp)
jl     12a9 <main+0x149>
lea    0xe80(%rip),%rdi
call   1050 <printf@plt>
lea    0xeae(%rip),%rdi
call   1050 <printf@plt>
lea    0xe69(%rip),%rdi
mov    %rdi,-0x18(%rbp)
call   1050 <printf@plt>
lea    0xecb(%rip),%rdi
call   1050 <printf@plt>
lea    0xed4(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1050 <printf@plt>
lea    0xed5(%rip),%rdi
call   1050 <printf@plt>
lea    0xeef(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1080 <scanf@plt>
mov    -0x18(%rbp),%rdi
call   1050 <printf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     120b <main+0xab>
jmp    11fa <main+0x9a>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
je     1247 <main+0xe7>
jmp    126d <main+0x10d>
movl   $0xfffffffb,-0x8(%rbp)
lea    0xeae(%rip),%rdi
call   1040 <system@plt>
lea    0xddc(%rip),%rdi
call   1050 <printf@plt>
lea    0xe9a(%rip),%rdi
call   1050 <printf@plt>
lea    0xdc4(%rip),%rdi
call   1050 <printf@plt>
jmp    12a4 <main+0x144>
lea    0xe79(%rip),%rdi
call   1040 <system@plt>
mov    $0x0,%al
call   1060 <relacao_01@plt>
mov    $0x0,%al
call   1030 <relacao_02@plt>
mov    $0x0,%al
call   1070 <relacao_03@plt>
jmp    12a4 <main+0x144>
movl   $0xfffffffb,-0x8(%rbp)
lea    0xe4c(%rip),%rdi
call   1040 <system@plt>
lea    0xd7a(%rip),%rdi
call   1050 <printf@plt>
lea    0xe5a(%rip),%rdi
call   1050 <printf@plt>
lea    0xd62(%rip),%rdi
call   1050 <printf@plt>
jmp    116f <main+0xf>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [58 x i8] c"\0A=======================================================\0A\00"
@.str.1 = [57 x i8] c"=============== VERIFICANDO RELACOES ==================\0A\00"
@.str.2 = [57 x i8] c"=======================================================\0A\00"
@.str.3 = [21 x i8] c"1 - TESTAR RELACOES\0A\00"
@.str.4 = [22 x i8] c"0 - SAIR DO PROGRAMA\0A\00"
@.str.5 = [38 x i8] c"INFORME A OPCAO PARA SER VERIFICADA:\0A\00"
@.str.6 = [3 x i8] c"%d\00"
@.str.7 = [4 x i8] c"cls\00"
@.str.8 = [34 x i8] c"PROGRAMA FINALIZADO COM SUCESSO!\0A\00"
@.str.9 = [38 x i8] c"OPCAO INVALIDA, PROGRAMA FINALIZADO!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %32, %0
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 1
br i1 %5, label %6, label %33
6: ; preds = %3
%7 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %2)
%15 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%16 = load i32, i32* %2
switch i32 %16, label %27 [
i32 0, label %17
i32 1, label %22
]
17: ; preds = %6
store i32 -5, i32* %2
%18 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.8, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
br label %32
22: ; preds = %6
%23 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%24 = call i32 (...) @relacao_01()
%25 = call i32 (...) @relacao_02()
%26 = call i32 (...) @relacao_03()
br label %32
27: ; preds = %6
store i32 -5, i32* %2
%28 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%29 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%30 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.9, i64 0, i64 0))
%31 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
br label %32
32: ; preds = %27, %22, %17
br label %3
33: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}