#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*/ fflush(int /*<<< orphan*/);
char getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
char tolower(char);
main() {
  char car;
  do {
    printf("¿Desea continuar? s/n ");
    car = getchar();
    fflush(stdin);
  } while (tolower(car) != 'n' && tolower(car) != 's');
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x5(%rbp)
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
movsbl -0x5(%rbp),%edi
call   1050 <tolower@plt>
movsbl %al,%ecx
xor    %eax,%eax
cmp    $0x6e,%ecx
mov    %al,-0x6(%rbp)
je     11a2 <main+0x62>
movsbl -0x5(%rbp),%edi
call   1050 <tolower@plt>
movsbl %al,%eax
cmp    $0x73,%eax
setne  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
test   $0x1,%al
jne    114f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xeb2(%rip),%r14
mov    0x2e93(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebx
mov    (%r15),%edi
call   1060 <fflush@plt>
movsbl %bl,%ebp
mov    %ebp,%edi
call   1050 <tolower@plt>
cmp    $0x6e,%al
je     1192 <main+0x52>
mov    %ebp,%edi
call   1050 <tolower@plt>
cmp    $0x73,%al
jne    1160 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [24 x i8] c"\C2\BFDesea continuar? s/n \00"
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
br label %3
3: ; preds = %18, %0
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%5 = call signext i8 (...) @getchar()
store i8 %5, i8* %2
%6 = load i32, i32* @stdin
%7 = call i32 @fflush(i32 %6)
br label %8
8: ; preds = %3
%9 = load i8, i8* %2
%10 = call signext i8 @tolower(i8 signext %9)
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 110
br i1 %12, label %13, label %18
13: ; preds = %8
%14 = load i8, i8* %2
%15 = call signext i8 @tolower(i8 signext %14)
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 115
br label %18
18: ; preds = %13, %8
%19 = phi i1 [ false, %8 ], [ %17, %13 ]
br i1 %19, label %3, label %20
20: ; preds = %18
%21 = load i32, i32* %1
ret i32 %21
}

LLVM IR (-O2):
@.str = [24 x i8] c"\C2\BFDesea continuar? s/n \00"
@stdin = global i32 0
define i32 @main() {
br label %1
1: ; preds = %8, %0
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call signext i8 (...) @getchar()
%4 = load i32, i32* @stdin
%5 = tail call i32 @fflush(i32 %4)
%6 = tail call signext i8 @tolower(i8 signext %3)
%7 = icmp eq i8 %6, 110
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = tail call signext i8 @tolower(i8 signext %3)
%10 = icmp eq i8 %9, 115
br i1 %10, label %11, label %1
11: ; preds = %1, %8
ret i32 0
}