// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xc0, %rsp
testb $0x1, 0x87ca(%rip)      # 0x15a1c
je 0xd260
callq 0x3ab0
movb $0x0, 0x87bc(%rip)      # 0x15a1c
callq 0x4630
movl $0x0, 0x87a5(%rip)      # 0x15a14
movq 0x8772(%rip), %rdi      # 0x159e8
movq 0x833b(%rip), %rsi      # 0x155b8
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
movq 0x875a(%rip), %rdi      # 0x159e8
leaq 0x4ecf(%rip), %rsi      # 0x12164
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
movq 0x8742(%rip), %rdi      # 0x159e8
callq 0x2180
movb $0x0, -0x11(%rbp)
jmp 0xd2b1
leaq -0x98(%rbp), %rax
movq %rax, -0xb8(%rbp)
movl $0x0, -0xac(%rbp)
movl -0xac(%rbp), %eax
cmpq $0x10, %rax
jae 0xd2fb
movq -0xb8(%rbp), %rax
movl -0xac(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
jmp 0xd2c9
jmp 0xd2fd
movq -0x98(%rbp), %rax
orq $0x1, %rax
movq %rax, -0x98(%rbp)
movzbl 0x82ab(%rip), %eax      # 0x155c1
movq %rax, -0xa8(%rbp)
movq $0x0, -0xa0(%rbp)
movl $0x1, %edi
leaq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %ecx
leaq -0xa8(%rbp), %r8
movq %rcx, %rdx
callq 0x20c0
cmpl $0x1, %eax
jge 0xd361
movb $0x1, -0x11(%rbp)
movq 0x8691(%rip), %rdi      # 0x159e8
callq 0x2090
jmp 0xd4be
movq 0x8680(%rip), %rdi      # 0x159e8
callq 0x22f0
movb %al, -0x1(%rbp)
movb $0x1, -0x11(%rbp)
movq 0x866d(%rip), %rdi      # 0x159e8
leaq 0x29b1(%rip), %rsi      # 0xfd33
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
movq 0x8655(%rip), %rdi      # 0x159e8
callq 0x2210
movq 0x8649(%rip), %rdi      # 0x159e8
callq 0x2180
callq 0x2160
movq (%rax), %rax
movsbl -0x1(%rbp), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0xd3cd
movsbl -0x1(%rbp), %edi
callq 0x2230
movb %al, -0x1(%rbp)
movsbl -0x1(%rbp), %eax
addl $-0xc, %eax
movl %eax, %ecx
movq %rcx, -0xc0(%rbp)
subl $0x6d, %eax
ja 0xd4b8
movq -0xc0(%rbp), %rax
leaq 0x1e24(%rip), %rcx      # 0xf218
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x9840
jmp 0xd4bc
callq 0x9b00
jmp 0xd4bc
callq 0x9d50
jmp 0xd4bc
callq 0xa380
jmp 0xd4bc
callq 0xa790
jmp 0xd4bc
callq 0xa860
jmp 0xd4bc
callq 0xa930
jmp 0xd4bc
callq 0xa950
jmp 0xd4bc
callq 0xad80
jmp 0xd4bc
callq 0xae90
jmp 0xd4bc
callq 0xb050
jmp 0xd4bc
callq 0xb3b0
jmp 0xd4bc
callq 0xb9f0
jmp 0xd4bc
callq 0xc040
jmp 0xd4bc
callq 0xc460
jmp 0xd4bc
callq 0xc7c0
jmp 0xd4bc
callq 0xc890
jmp 0xd4bc
callq 0xc9b0
jmp 0xd4bc
callq 0xca30
jmp 0xd4bc
callq 0xcbd0
jmp 0xd4bc
callq 0xcd20
jmp 0xd4bc
callq 0xd200
jmp 0xd4bc
movq 0x7b00(%rip), %rax      # 0x14fb0
movq (%rax), %rdi
callq 0x2180
movb $0x0, -0x11(%rbp)
jmp 0xd4be
jmp 0xd4c0
cmpb $0x0, -0x11(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xd2af
addq $0xc0, %rsp
popq %rbp
retq
nopw (%rax,%rax)