// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: help_exit(int, int)
int help_exit(int c, int reason)
{
int help_c, help_first;
   // There was an error in the keyboard command.
   // Exit the keystroke processor with a help message
   reason = 0;       // shut up compiler warning
   script_err = c;
   help_first = first_key;
   help_c = c;
   prot_menu = 0;

   // if reading from a script file,  CR, LF, SPACE, TAB do not bring up help menu
   if(script_file) {   // script file is active
      if((c == 0x0D) || (c == 0x0A)) {  // end-of line reached
         script_pause = 0;
         return sure_exit();
      }
      else if(c == ' ') return sure_exit();
      else if(c == '\t') return sure_exit();
      else c = '?';
   }
   else c = '?';

   if(are_you_sure(c) != c) return 0;
   else if(script_file) return 0;

   if(help_first == '?') ;            // invalid command
   else if(help_first && help_c) {
      BEEP(310);
      erase_screen();

      if((help_first >= 0x0100) || (help_c >= 0x0100)) {
         sprintf(out, "Unknown command");
      }
      else if((help_first < ' ') || (help_c < ' ')) {
         sprintf(out, "Unknown command");
      }
      else if(help_c == ' ') {
         sprintf(out, "Unknown command: %c <sp>", toupper(help_first));
      }
      else {
         sprintf(out, "Unknown command: %c %c", toupper(help_first), toupper(help_c));
      }
      vidstr(0,0, YELLOW, out);
      refresh_page();
      need_redraw = 3586;
      Sleep(1000);
   }

   return sure_exit();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0x1f28ff(%rip), %rax    # 0x228ec8
movl %edi, (%rax)
leaq 0x1f2986(%rip), %rax    # 0x228f58
movl (%rax), %r14d
leaq 0x1ceb7c(%rip), %rax    # 0x205158
movb $0x0, (%rax)
leaq 0x1f28d2(%rip), %r15    # 0x228eb8
cmpq $0x0, (%r15)
je 0x36617
cmpl $0x9, %ebx
je 0x366bf
cmpl $0xa, %ebx
je 0x36608
cmpl $0x20, %ebx
je 0x366bf
cmpl $0xd, %ebx
jne 0x36617
leaq 0x1f28c1(%rip), %rax    # 0x228ed0
movb $0x0, (%rax)
jmp 0x366bf
pushq $0x3f
popq %rdi
callq 0x25ab0
cmpl $0x3f, %eax
jne 0x366c4
cmpq $0x0, (%r15)
jne 0x366c4
cmpl $0x3f, %r14d
je 0x366bf
testl %r14d, %r14d
sete %al
testl %ebx, %ebx
sete %cl
orb %al, %cl
jne 0x366bf
movl $0x136, %edi            # imm = 0x136
callq 0x9d23
callq 0xe7d9
movl $0x100, %eax            # imm = 0x100
cmpl %eax, %r14d
setl %cl
cmpl %eax, %ebx
setl %al
testb %cl, %al
je 0x3667f
cmpl $0x20, %r14d
setge %al
cmpl $0x20, %ebx
setge %cl
testb %al, %cl
jne 0x366d1
movups 0xca272(%rip), %xmm0    # 0x1008f8
leaq 0x2efb93(%rip), %rax    # 0x326220
movaps %xmm0, (%rax)
leaq 0x2efb89(%rip), %rcx    # 0x326220
pushq $0xe
popq %rdx
xorl %edi, %edi
xorl %esi, %esi
callq 0xe2d2
callq 0xaa05
leaq 0x1cc195(%rip), %rax    # 0x202844
movl $0xe02, (%rax)          # imm = 0xE02
movl $0x3e8, %edi            # imm = 0x3E8
callq 0xae83
callq 0x258cd
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %r14d, %edi
callq 0x9700
movl %eax, %r14d
cmpl $0x20, %ebx
jne 0x366fb
leaq 0x2efb38(%rip), %rdi    # 0x326220
leaq 0xca219(%rip), %rsi     # 0x100908
movl %r14d, %edx
xorl %eax, %eax
callq 0x9060
jmp 0x36690
movl %ebx, %edi
callq 0x9700
leaq 0x2efb17(%rip), %rdi    # 0x326220
leaq 0xca211(%rip), %rsi     # 0x100921
movl %r14d, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0x9060
jmp 0x36690