#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*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int letmesee(int miss) {
  char trash[1];
  fflush(stdin);
  fprintf(stdout,
          "Still %d lines.\n"
          "Enter 'q' to exit, other to continue: ",
          miss);
  fscanf(stdin, "%1s", trash);
  if (trash[0] == 'q')
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<letmesee>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
lea    0xea4(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
lea    -0x9(%rbp),%rdx
lea    0xec2(%rip),%rsi
call   1030 <fscanf@plt>
movsbl -0x9(%rbp),%eax
cmp    $0x71,%eax
jne    1193 <letmesee+0x63>
movl   $0x0,-0x4(%rbp)
jmp    119a <letmesee+0x6a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<letmesee>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2eab(%rip),%r14
mov    (%r14),%edi
call   1050 <fflush@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
lea    0xeab(%rip),%rsi
mov    %ebx,%edx
call   1040 <fprintf@plt>
mov    (%r14),%edi
lea    0xed1(%rip),%rsi
lea    0x7(%rsp),%rdx
call   1030 <fscanf@plt>
xor    %eax,%eax
cmpb   $0x71,0x7(%rsp)
setne  %al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdin = global i32 0
@stdout = global i32 0
@.str = [55 x i8] c"Still %d lines.\0AEnter 'q' to exit, other to continue: \00"
@.str.1 = [4 x i8] c"%1s\00"
define i32 @letmesee(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [1 x i8]
store i32 %0, i32* %3
%5 = load i32, i32* @stdin
%6 = call i32 @fflush(i32 %5)
%7 = load i32, i32* @stdout
%8 = load i32, i32* %3
%9 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @stdin
%11 = getelementptr inbounds [1 x i8], [1 x i8]* %4, i64 0, i64 0
%12 = call i32 @fscanf(i32 %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = getelementptr inbounds [1 x i8], [1 x i8]* %4, i64 0, i64 0
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 113
br i1 %16, label %17, label %18
17: ; preds = %1
store i32 0, i32* %2
br label %19
18: ; preds = %1
store i32 1, i32* %2
br label %19
19: ; preds = %18, %17
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
@stdin = global i32 0
@stdout = global i32 0
@.str = [55 x i8] c"Still %d lines.\0AEnter 'q' to exit, other to continue: \00"
@.str.1 = [4 x i8] c"%1s\00"
define i32 @letmesee(i32 %0) {
%2 = alloca [1 x i8]
%3 = getelementptr inbounds [1 x i8], [1 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @stdin
%5 = tail call i32 @fflush(i32 %4)
%6 = load i32, i32* @stdout
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %0)
%8 = load i32, i32* @stdin
%9 = call i32 @fscanf(i32 %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%10 = load i8, i8* %3
%11 = icmp ne i8 %10, 113
%12 = zext i1 %11 to i32
ret i32 %12
}