#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 EXIT_SUCCESS;
int /*<<< orphan*/ calculo();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main(void) {
  char peg;
  do {
    calculo();
    printf("Deseja Continuar?\n");
    printf("y-sim\n");
    printf("n-não\n");
    do {
      scanf("%c", &peg);
    } while (peg == '\n' || (peg != 'y' && peg != 'n'));
  } while (peg == 'y');
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <calculo@plt>
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb1(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1050 <scanf@plt>
movsbl -0x5(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x6(%rbp)
je     11b1 <main+0x81>
movsbl -0x5(%rbp),%ecx
xor    %eax,%eax
cmp    $0x79,%ecx
mov    %al,-0x7(%rbp)
je     11ab <main+0x7b>
movsbl -0x5(%rbp),%eax
cmp    $0x6e,%eax
setne  %al
mov    %al,-0x7(%rbp)
mov    -0x7(%rbp),%al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
test   $0x1,%al
jne    116a <main+0x3a>
jmp    11c1 <main+0x91>
movsbl -0x5(%rbp),%eax
cmp    $0x79,%eax
je     113f <main+0xf>
mov    0x2e0b(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xebf(%rip),%r14
lea    0xeca(%rip),%r15
lea    0xec9(%rip),%r12
lea    0xea7(%rip),%r13
lea    0xf(%rsp),%rbx
xor    %eax,%eax
call   1040 <calculo@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %r12,%rdi
call   1030 <puts@plt>
nopl   (%rax)
mov    %r13,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
movzbl 0xf(%rsp),%eax
cmp    $0x79,%al
je     115e <main+0x2e>
cmp    $0x6e,%al
jne    1180 <main+0x50>
mov    0x2e41(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Deseja Continuar?\0A\00"
@.str.1 = [7 x i8] c"y-sim\0A\00"
@.str.2 = [8 x i8] c"n-n\C3\A3o\0A\00"
@.str.3 = [3 x i8] c"%c\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
br label %3
3: ; preds = %27, %0
%4 = call i32 (...) @calculo()
%5 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %8
8: ; preds = %24, %3
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %2)
br label %10
10: ; preds = %8
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 10
br i1 %13, label %24, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 121
br i1 %17, label %18, label %22
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp ne i32 %20, 110
br label %22
22: ; preds = %18, %14
%23 = phi i1 [ false, %14 ], [ %21, %18 ]
br label %24
24: ; preds = %22, %10
%25 = phi i1 [ true, %10 ], [ %23, %22 ]
br i1 %25, label %8, label %26
26: ; preds = %24
br label %27
27: ; preds = %26
%28 = load i8, i8* %2
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 121
br i1 %30, label %3, label %31
31: ; preds = %27
%32 = load i32, i32* @EXIT_SUCCESS
ret i32 %32
}

LLVM IR (-O2):
@.str.3 = [3 x i8] c"%c\00"
@EXIT_SUCCESS = global i32 0
@str = [18 x i8] c"Deseja Continuar?\00"
@str.4 = [6 x i8] c"y-sim\00"
@str.5 = [7 x i8] c"n-n\C3\A3o\00"
define i32 @main() {
%1 = alloca i8
br label %2
2: ; preds = %7, %0
%3 = call i32 (...) @calculo()
%4 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.4, i64 0, i64 0))
%6 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.5, i64 0, i64 0))
br label %7
7: ; preds = %7, %2
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %1)
%9 = load i8, i8* %1
switch i8 %9, label %7 [
i8 110, label %10
i8 121, label %2
]
10: ; preds = %7
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}