// File: /workspace/github_c_makefile_star2_O2/hyc[P]trek73c/trekx.c
// Function: Command
void Command()
{
  Char Ch;
  int I, Y, X;
  boolean Looped;
#ifdef	FD_SET
  fd_set ReadFd;
#else
  int ReadFd;
#endif
  struct timeval Timeout;

  if (Redo) {
    DrawRep();
    Redo = false;
  }
  Status();
  LKnt = 0;
  waddstr(Cmdwin,Name);
  waddstr(Cmdwin,": Code ");
  wrefresh(Cmdwin);
  Looped = false;
  do {
#ifdef	FD_ZERO
    FD_ZERO(&ReadFd);
    FD_SET(0, &ReadFd);
#else
    ReadFd = 1;
#endif
    Timeout.tv_sec = Timer;
    Timeout.tv_usec = 0;
    if (select(1, &ReadFd, NULL, NULL, &Timeout)<1) {
      Looped = true;
      werase(Cmdwin);
    } else {
      Ch = wgetch(Cmdwin);
      Looped = true;
      waddstr(Cmdwin,"\n");
      wclrtoeol(Cmdwin);
      wrefresh(Cmdwin);
      if (isupper(Ch))
	Ch = tolower(Ch);
      switch (Ch) {
	  case '1':
	    PFire();
	    break;

	  case '2':
	    TFire();
	    break;

	  case '3':
	    PCtrl();
	    break;

	  case '4':
	    TLoad();
	    break;

	  case '5':
	    MNav();
	    break;

	  case '6':
	    PNav();
	    break;

	  case '7':
	    SScan();
	    break;

	  case '8':
	    SDest();
	    break;

	  case '9':
	    ASrndr();
	    break;

	  case '0':
	    Druse();
	    break;

	  case '-':
	    PCmd();
	    break;

	  case 'q':
	    Pstts();
	    break;

	  case 'w':
	    Tstts();
	    break;

	  case 'e':
	    AtPwr();
	    break;

	  case 'r':
	    ChPrm();
	    break;

	  case 't':
	    AtRad();
	    break;

	  case 'y':
	    ENav();
	    break;

	  case 'u':
	    EScan();
	    break;

	  case 'i':
	    Engin();
	    break;

	  case 'o':
	    Srndr();
	    break;

	  case 'p':
	    DoBluff();
	    break;

	  case '[':
	    EStop();
	    break;

	  case '':
	    wrefresh(curscr);

	  default:
	    Looped = false;
	    break;
      }
    }
  } while (!Looped);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
cmpb $0x1, 0x89ca(%rip)      # 0x12a1c
jne 0xa060
callq 0x3317
movb $0x0, 0x89bc(%rip)      # 0x12a1c
callq 0x3b3f
andl $0x0, 0x89a8(%rip)      # 0x12a14
movq 0x8975(%rip), %rdi      # 0x129e8
movq 0x853e(%rip), %rsi      # 0x125b8
pushq $-0x1
popq %rbx
movl %ebx, %edx
callq 0x2200
movq 0x895d(%rip), %rdi      # 0x129e8
leaq 0x3fd6(%rip), %rsi      # 0xe068
movl %ebx, %edx
callq 0x2200
movq 0x8948(%rip), %rdi      # 0x129e8
callq 0x2180
xorl %eax, %eax
pushq $0x1
popq %rbp
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %r15
cmpq $0x10, %rax
jne 0xa173
orb $0x1, 0x18(%rsp)
movzbl 0x84f7(%rip), %eax      # 0x125c1
movq %rax, 0x8(%rsp)
andq $0x0, 0x10(%rsp)
movl %ebp, %edi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
callq 0x20b0
movq 0x88fb(%rip), %rdi      # 0x129e8
testl %eax, %eax
jle 0xa1c4
callq 0x22f0
movl %eax, %r13d
movq 0x88e4(%rip), %rdi      # 0x129e8
leaq 0x1b66(%rip), %rsi      # 0xbc71
movl %ebx, %edx
callq 0x2200
movq 0x88cf(%rip), %rdi      # 0x129e8
callq 0x2210
movq 0x88c3(%rip), %rdi      # 0x129e8
callq 0x2180
callq 0x2160
movq (%rax), %rax
movsbq %r13b, %r12
testb $0x1, 0x1(%rax,%r12,2)
je 0xa14a
callq 0x2250
movq (%rax), %rax
movl (%rax,%r12,4), %r13d
shll $0x18, %r13d
sarl $0x18, %r13d
cmpl $0xc, %r13d
je 0xa181
xorl %eax, %eax
leal -0x2d(%r13), %ecx
cmpl $0xc, %ecx
ja 0xa197
leaq 0x1166(%rip), %rdx      # 0xb2d0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
andq $0x0, 0x18(%rsp,%rax,8)
incq %rax
jmp 0xa0b4
movq 0x7e28(%rip), %rax      # 0x11fb0
movq (%rax), %rdi
callq 0x2180
xorl %eax, %eax
jmp 0xa0b4
leal -0x65(%r13), %ecx
cmpl $0x14, %ecx
ja 0xa1b0
leaq 0x115d(%rip), %rdx      # 0xb304
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
cmpl $0x5b, %r13d
jne 0xa0b4
callq 0xa00a
jmp 0xa265
callq 0x2080
jmp 0xa265
callq 0x8010
jmp 0xa265
callq 0x85f6
jmp 0xa265
callq 0x7f20
jmp 0xa265
callq 0x8002
jmp 0xa265
callq 0x7357
jmp 0xa265
callq 0x7bf3
jmp 0xa265
callq 0x7e76
jmp 0xa265
callq 0x84cd
jmp 0xa265
callq 0x7548
jmp 0xa265
callq 0x76d1
jmp 0xa265
callq 0x83e0
jmp 0xa265
callq 0x97c5
jmp 0xa265
callq 0x9496
jmp 0xa265
callq 0x971f
jmp 0xa265
callq 0x98d7
jmp 0xa265
callq 0x9190
jmp 0xa265
callq 0x9a8e
jmp 0xa265
callq 0x9bad
jmp 0xa265
callq 0x88c0
jmp 0xa265
callq 0x8d11
jmp 0xa265
callq 0x9945
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq