#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*/ addstr(char *);
char getch();
int /*<<< orphan*/ move(int, int /*<<< orphan*/);
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ standend();
int /*<<< orphan*/ standout();
int inform_me(char *s, int qable) {
  int retval = 0;
  move(20, 0);
  standout();
  addstr(s);
  standend();
  addstr(" <MORE>");
  if (qable)
    addstr(" (q stops)");
  refresh();
  if (getch() == 'q')
    retval = 1;
  move(20, 0);
  addstr("                                                                     "
         "        ");
  refresh();
  return (retval);
}


x86 assembly (clang, -O0):
<inform_me>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    $0x14,%edi
xor    %esi,%esi
call   1080 <move@plt>
mov    $0x0,%al
call   1040 <standout@plt>
mov    -0x8(%rbp),%rdi
call   1070 <addstr@plt>
mov    $0x0,%al
call   1030 <standend@plt>
lea    0xe60(%rip),%rdi
call   1070 <addstr@plt>
cmpl   $0x0,-0xc(%rbp)
je     11bb <inform_me+0x5b>
lea    0xe52(%rip),%rdi
call   1070 <addstr@plt>
mov    $0x0,%al
call   1050 <refresh@plt>
mov    $0x0,%al
call   1060 <getch@plt>
movsbl %al,%eax
cmp    $0x71,%eax
jne    11dc <inform_me+0x7c>
movl   $0x1,-0x10(%rbp)
mov    $0x14,%edi
xor    %esi,%esi
call   1080 <move@plt>
lea    0xe24(%rip),%rdi
call   1070 <addstr@plt>
mov    $0x0,%al
call   1050 <refresh@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inform_me>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    $0x14,%edi
xor    %esi,%esi
call   1080 <move@plt>
xor    %eax,%eax
call   1040 <standout@plt>
mov    %rbx,%rdi
call   1070 <addstr@plt>
xor    %eax,%eax
call   1030 <standend@plt>
lea    0xe6f(%rip),%rdi
call   1070 <addstr@plt>
test   %ebp,%ebp
je     11a6 <inform_me+0x46>
lea    0xe67(%rip),%rdi
call   1070 <addstr@plt>
xor    %eax,%eax
call   1050 <refresh@plt>
xor    %eax,%eax
call   1060 <getch@plt>
xor    %ebx,%ebx
cmp    $0x71,%al
sete   %bl
mov    $0x14,%edi
xor    %esi,%esi
call   1080 <move@plt>
lea    0xe45(%rip),%rdi
call   1070 <addstr@plt>
xor    %eax,%eax
call   1050 <refresh@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c" <MORE>\00"
@.str.1 = [11 x i8] c" (q stops)\00"
@.str.2 = [78 x i8] c" \00"
define i32 @inform_me(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %5
%6 = call i32 @move(i32 20, i32 0)
%7 = call i32 (...) @standout()
%8 = load i8*, i8** %3
%9 = call i32 @addstr(i8* %8)
%10 = call i32 (...) @standend()
%11 = call i32 @addstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* %4
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %2
%15 = call i32 @addstr(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %16
16: ; preds = %14, %2
%17 = call i32 (...) @refresh()
%18 = call signext i8 (...) @getch()
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 113
br i1 %20, label %21, label %22
21: ; preds = %16
store i32 1, i32* %5
br label %22
22: ; preds = %21, %16
%23 = call i32 @move(i32 20, i32 0)
%24 = call i32 @addstr(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.2, i64 0, i64 0))
%25 = call i32 (...) @refresh()
%26 = load i32, i32* %5
ret i32 %26
}

LLVM IR (-O2):
@.str = [8 x i8] c" <MORE>\00"
@.str.1 = [11 x i8] c" (q stops)\00"
@.str.2 = [78 x i8] c" \00"
define i32 @inform_me(i8* %0, i32 %1) {
%3 = tail call i32 @move(i32 20, i32 0)
%4 = tail call i32 (...) @standout()
%5 = tail call i32 @addstr(i8* %0)
%6 = tail call i32 (...) @standend()
%7 = tail call i32 @addstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32 %1, 0
br i1 %8, label %11, label %9
9: ; preds = %2
%10 = tail call i32 @addstr(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %2
%12 = tail call i32 (...) @refresh()
%13 = tail call signext i8 (...) @getch()
%14 = icmp eq i8 %13, 113
%15 = zext i1 %14 to i32
%16 = tail call i32 @move(i32 20, i32 0)
%17 = tail call i32 @addstr(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.2, i64 0, i64 0))
%18 = tail call i32 (...) @refresh()
ret i32 %15
}