// File: /workspace/github_c_makefile_star2_O3/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, 0x8244(%rip)      # 0x13a2c
jne 0xb7f6
callq 0x36f5
movb $0x0, 0x8236(%rip)      # 0x13a2c
callq 0x3f89
movl $0x0, 0x821f(%rip)      # 0x13a24
movq 0x81ec(%rip), %rdi      # 0x139f8
movq 0x7db5(%rip), %rsi      # 0x135c8
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq 0x81d4(%rip), %rdi      # 0x139f8
leaq 0x48b5(%rip), %rsi      # 0x100e0
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq 0x81bc(%rip), %rdi      # 0x139f8
callq 0x2190
xorps %xmm0, %xmm0
leaq 0x18(%rsp), %rsi
movups %xmm0, 0x8(%rsi)
movups %xmm0, 0x18(%rsi)
movups %xmm0, 0x28(%rsi)
movups %xmm0, 0x38(%rsi)
movups %xmm0, 0x48(%rsi)
movups %xmm0, 0x58(%rsi)
movups %xmm0, 0x68(%rsi)
xorl %eax, %eax
movq %rax, 0x78(%rsi)
movq $0x1, (%rsi)
movzbl 0x7d58(%rip), %ecx      # 0x135d1
leaq 0x8(%rsp), %r8
movq %rcx, (%r8)
movq %rax, 0x8(%r8)
movl $0x1, %edi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x20c0
movq 0x815e(%rip), %rdi      # 0x139f8
testl %eax, %eax
jle 0xb9e0
leaq 0x20(%rsp), %r13
leaq 0x243b(%rip), %rbx      # 0xdce9
xorl %ebp, %ebp
leaq 0x8(%rsp), %r15
callq 0x2300
movl %eax, %r12d
movq 0x8134(%rip), %rdi      # 0x139f8
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq 0x8120(%rip), %rdi      # 0x139f8
callq 0x2220
movq 0x8114(%rip), %rdi      # 0x139f8
callq 0x2190
callq 0x2170
movq (%rax), %rax
movsbq %r12b, %r14
testb $0x1, 0x1(%rax,%r14,2)
je 0xb909
callq 0x2260
movq (%rax), %rax
movl (%rax,%r14,4), %r12d
shll $0x18, %r12d
sarl $0x18, %r12d
cmpl $0x2c, %r12d
jg 0xb99b
cmpl $0xc, %r12d
jne 0xb930
movq 0x7688(%rip), %rax      # 0x12fb0
movq (%rax), %rdi
callq 0x2190
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%r13)
movups %xmm0, 0x50(%r13)
movups %xmm0, 0x40(%r13)
movups %xmm0, 0x30(%r13)
movups %xmm0, 0x20(%r13)
movups %xmm0, 0x10(%r13)
movups %xmm0, (%r13)
movq %rbp, 0x70(%r13)
movq $0x1, 0x18(%rsp)
movzbl 0x7c67(%rip), %eax      # 0x135d1
movq %rax, 0x8(%rsp)
movq %rbp, 0x10(%rsp)
movl $0x1, %edi
leaq 0x18(%rsp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
callq 0x20c0
movq 0x8067(%rip), %rdi      # 0x139f8
testl %eax, %eax
jg 0xb8b5
jmp 0xb9e0
leal -0x2d(%r12), %eax
cmpl $0xc, %eax
jbe 0xb9bf
leal -0x65(%r12), %eax
cmpl $0x14, %eax
ja 0xb9cf
leaq 0x19c6(%rip), %rcx      # 0xd37c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1982(%rip), %rcx      # 0xd348
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x5b, %r12d
jne 0xb930
callq 0xb79b
jmp 0xb9e5
callq 0x2090
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x963a
jmp 0xb9e5
callq 0x977f
jmp 0xb9e5
callq 0x8fcb
jmp 0xb9e5
callq 0x8d1e
jmp 0xb9e5
callq 0x87b4
jmp 0xb9e5
callq 0x843b
jmp 0xb9e5
callq 0x9961
jmp 0xb9e5
callq 0x9196
jmp 0xb9e5
movl $0xffffffff, 0x7fff(%rip) # imm = 0xFFFFFFFF
xorl %edi, %edi
callq 0x7da1
jmp 0xb9e5
callq 0x908a
jmp 0xb9e5
callq 0x862e
jmp 0xb9e5
callq 0xad5e
jmp 0xb9e5
callq 0xa9f4
jmp 0xb9e5
callq 0x9c51
jmp 0xb9e5
callq 0xaee4
jmp 0xb9e5
callq 0xb214
jmp 0xb9e5
callq 0xac73
jmp 0xb9e5
callq 0xa153
jmp 0xb9e5
callq 0xaf54
jmp 0xb9e5
callq 0xa68d
jmp 0xb9e5
callq 0xb09d
jmp 0xb9e5