void pause_exit(prt_line, delay) int prt_line;
int delay;
{
  char dummy;
  prt("[Press any key to continue, or Q to exit.]", prt_line, 10);
  dummy = inkey();
  if (dummy == 'Q') {
    erase_line(prt_line, 0);
    if (delay > 0)
      (void)sleep((unsigned)delay);
    exit_game();
  }
  erase_line(prt_line, 0);
}


x86 assembly (clang, -O0):
<pause_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe98(%rip),%rdi
mov    $0xa,%edx
mov    $0x0,%al
call   1030 <prt@plt>
mov    $0x0,%al
call   1060 <inkey@plt>
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x51,%eax
jne    11b2 <pause_exit+0x62>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <erase_line@plt>
cmpl   $0x0,-0x8(%rbp)
jle    11ab <pause_exit+0x5b>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1070 <sleep@plt>
mov    $0x0,%al
call   1040 <exit_game@plt>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <erase_line@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pause_exit>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
lea    0xea2(%rip),%rdi
mov    %ebx,%esi
mov    $0xa,%edx
xor    %eax,%eax
call   1030 <prt@plt>
xor    %eax,%eax
call   1060 <inkey@plt>
cmp    $0x51,%al
jne    1196 <pause_exit+0x46>
mov    %ebx,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <erase_line@plt>
test   %ebp,%ebp
jle    118f <pause_exit+0x3f>
mov    %ebp,%edi
xor    %eax,%eax
call   1070 <sleep@plt>
xor    %eax,%eax
call   1040 <exit_game@plt>
mov    %ebx,%edi
xor    %esi,%esi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <erase_line@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"[Press any key to continue, or Q to exit.]\00"
define void @pause_exit(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @prt to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %6, i32 10)
%8 = call i32 (...) @inkey()
%9 = trunc i32 %8 to i8
store i8 %9, i8* %5
%10 = load i8, i8* %5
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 81
br i1 %12, label %13, label %23
13: ; preds = %2
%14 = load i32, i32* %3
%15 = call i32 (i32, i32, ...) bitcast (i32 (...)* @erase_line to i32 (i32, i32, ...)*)(i32 %14, i32 0)
%16 = load i32, i32* %4
%17 = icmp sgt i32 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %13
%19 = load i32, i32* %4
%20 = call i32 (i32, ...) bitcast (i32 (...)* @sleep to i32 (i32, ...)*)(i32 %19)
br label %21
21: ; preds = %18, %13
%22 = call i32 (...) @exit_game()
br label %23
23: ; preds = %21, %2
%24 = load i32, i32* %3
%25 = call i32 (i32, i32, ...) bitcast (i32 (...)* @erase_line to i32 (i32, i32, ...)*)(i32 %24, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"[Press any key to continue, or Q to exit.]\00"
define void @pause_exit(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @prt to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %0, i32 10)
%4 = tail call i32 (...) @inkey()
%5 = and i32 %4, 255
%6 = icmp eq i32 %5, 81
br i1 %6, label %7, label %14
7: ; preds = %2
%8 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @erase_line to i32 (i32, i32, ...)*)(i32 %0, i32 0)
%9 = icmp sgt i32 %1, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = tail call i32 (i32, ...) bitcast (i32 (...)* @sleep to i32 (i32, ...)*)(i32 %1)
br label %12
12: ; preds = %10, %7
%13 = tail call i32 (...) @exit_game()
br label %14
14: ; preds = %12, %2
%15 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @erase_line to i32 (i32, i32, ...)*)(i32 %0, i32 0)
ret void
}