#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 ResultadoFordFulkerson();
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ limpa();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int opcao = -1, ford = -1;
  while (1) {
    limpa();
    printf("Digite 1 para realizar nova busca\nDigite 0 para encerrar o "
           "programa\n::>");
    scanf("%i", &opcao);
    if (opcao == 1) {
      ford = ResultadoFordFulkerson();
      printf("Fluxo Maximo: %d\n ", ford);
      puts("Digite algo para continuar...");
      getchar();
    } else if (opcao == 0)
      return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    $0x0,%al
call   1070 <limpa@plt>
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeaf(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1080 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jne    11df <main+0x7f>
mov    $0x0,%al
call   1050 <ResultadoFordFulkerson@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe90(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
jmp    11f6 <main+0x96>
cmpl   $0x0,-0x8(%rbp)
jne    11f1 <main+0x91>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret
jmp    11f6 <main+0x96>
jmp    117d <main+0x1d>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
movl   $0xffffffff,0xc(%rsp)
ff
lea    0xe84(%rip),%r14
lea    0xec5(%rip),%r15
lea    0xc(%rsp),%rbx
lea    0xebc(%rip),%r12
lea    0xec8(%rip),%r13
jmp    11c2 <main+0x62>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <ResultadoFordFulkerson@plt>
mov    %r12,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
xor    %eax,%eax
call   1070 <limpa@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1080 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x1,%eax
je     11a0 <main+0x40>
test   %eax,%eax
jne    11c2 <main+0x62>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [72 x i8] c"Digite 1 para realizar nova busca\0ADigite 0 para encerrar o programa\0A::>\00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [19 x i8] c"Fluxo Maximo: %d\0A \00"
@.str.3 = [30 x i8] c"Digite algo para continuar...\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 -1, i32* %2
store i32 -1, i32* %3
br label %4
4: ; preds = %0, %21
%5 = call i32 (...) @limpa()
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %16
10: ; preds = %4
%11 = call i32 (...) @ResultadoFordFulkerson()
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %12)
%14 = call i32 @puts(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 (...) @getchar()
br label %21
16: ; preds = %4
%17 = load i32, i32* %2
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %16
ret i32 0
20: ; preds = %16
br label %21
21: ; preds = %20, %10
br label %4
}

LLVM IR (-O2):
@.str = [72 x i8] c"Digite 1 para realizar nova busca\0ADigite 0 para encerrar o programa\0A::>\00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [19 x i8] c"Fluxo Maximo: %d\0A \00"
@.str.3 = [30 x i8] c"Digite algo para continuar...\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 -1, i32* %1
br label %3
3: ; preds = %8, %0
%4 = call i32 (...) @limpa()
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
switch i32 %7, label %8 [
i32 1, label %9
i32 0, label %14
]
8: ; preds = %3, %9
br label %3
9: ; preds = %3
%10 = call i32 (...) @ResultadoFordFulkerson()
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %10)
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%13 = call i32 (...) @getchar()
br label %8
14: ; preds = %3
ret i32 0
}