// File: /workspace/github_cpp_makefile_star2_O1/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 0x205881(%rip), %rax    # 0x23eec8
movl %edi, (%rax)
leaq 0x205908(%rip), %rax    # 0x23ef58
movl (%rax), %r14d
leaq 0x1e1afe(%rip), %rax    # 0x21b158
movb $0x0, (%rax)
leaq 0x205854(%rip), %r15    # 0x23eeb8
cmpq $0x0, (%r15)
je 0x39685
cmpl $0xc, %ebx
jg 0x39737
cmpl $0x9, %ebx
je 0x3974f
cmpl $0xa, %ebx
je 0x39745
movl $0x3f, %edi
callq 0x27a1f
cmpl $0x3f, %eax
jne 0x39754
cmpq $0x0, (%r15)
jne 0x39754
cmpl $0x3f, %r14d
je 0x3974f
testl %r14d, %r14d
sete %al
testl %ebx, %ebx
sete %cl
orb %al, %cl
jne 0x3974f
movl $0x136, %edi            # imm = 0x136
callq 0x9d80
callq 0xed5e
movl $0x100, %eax            # imm = 0x100
cmpl %eax, %r14d
setl %cl
cmpl %eax, %ebx
setl %al
testb %cl, %al
je 0x396f3
cmpl $0x20, %r14d
setge %al
cmpl $0x20, %ebx
setge %cl
testb %al, %cl
jne 0x39761
movups 0xdd0ea(%rip), %xmm0    # 0x1167e4
leaq 0x302b1f(%rip), %rax    # 0x33c220
movaps %xmm0, (%rax)
leaq 0x302b15(%rip), %rcx    # 0x33c220
xorl %edi, %edi
xorl %esi, %esi
movl $0xe, %edx
callq 0xe7d0
callq 0xab5f
leaq 0x1df11f(%rip), %rax    # 0x218844
movl $0xe02, (%rax)          # imm = 0xE02
movl $0x3e8, %edi            # imm = 0x3E8
callq 0xaff7
jmp 0x3974f
cmpl $0x20, %ebx
je 0x3974f
cmpl $0xd, %ebx
jne 0x39685
leaq 0x205784(%rip), %rax    # 0x23eed0
movb $0x0, (%rax)
callq 0x2781b
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 0x3978e
leaq 0x302aa8(%rip), %rdi    # 0x33c220
leaq 0xdd075(%rip), %rsi     # 0x1167f4
movl %r14d, %edx
xorl %eax, %eax
callq 0x9060
jmp 0x39704
movl %ebx, %edi
callq 0x9700
leaq 0x302a84(%rip), %rdi    # 0x33c220
leaq 0xdd06a(%rip), %rsi     # 0x11680d
movl %r14d, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0x9060
jmp 0x39704