// File: /workspace/github_c_makefile_star2_O0/hyc[P]trek73c/trekx.c
// Function: GetShp
int GetShp(Ok, Shp)
boolean *Ok, *Shp;
{
  int I, J, X, Y;

  getyx(Cmdwin, Y, X);
  *Shp = true;
  mygetstr(Cmdwin,scrstr,false);
  J = 0;
  if (scrstr[0] != '\0') {
    if (islower(scrstr[0]))
      scrstr[0]=toupper(scrstr[0]);
    for (I = 1; I <= Enemies; I++) {
      if (scrstr[0] == Snams[I][0]) {
	mvwaddstr(Cmdwin, Y, X, Snams[I]);
	waddstr(Cmdwin,"\n");
	wclrtoeol(Cmdwin);
	wrefresh(Cmdwin);
	*Ok = true;
	J = I;
	if (Ships[J] == NULL)
	  *Ok = false;
	break;
      }
    }
  }
  if (J != 0)
    return J;
  I = (sscanf(scrstr, "%d", &J) == 0);
  if (I == 0)
    *Shp = false;
  return J;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
xorl %eax, %eax
cmpq 0xc61f(%rip), %rax      # 0x159e8
je 0x93da
movq 0xc616(%rip), %rax      # 0x159e8
movswl (%rax), %eax
movl %eax, -0x2c(%rbp)
jmp 0x93e4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x2c(%rbp)
jmp 0x93e4
movl -0x2c(%rbp), %eax
movl %eax, -0x28(%rbp)
xorl %eax, %eax
cmpq 0xc5f5(%rip), %rax      # 0x159e8
je 0x9405
movq 0xc5ec(%rip), %rax      # 0x159e8
movswl 0x2(%rax), %eax
movl %eax, -0x30(%rbp)
jmp 0x940f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x30(%rbp)
jmp 0x940f
movl -0x30(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
movq 0xc5c5(%rip), %rdi      # 0x159e8
leaq 0xc076(%rip), %rsi      # 0x154a0
xorl %edx, %edx
callq 0x24a0
movl $0x0, -0x20(%rbp)
movsbl 0xc061(%rip), %eax      # 0x154a0
cmpl $0x0, %eax
je 0x9557
callq 0x2160
movq (%rax), %rax
movsbl 0xc049(%rip), %ecx      # 0x154a0
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x947a
movsbl 0xc031(%rip), %edi      # 0x154a0
callq 0x20b0
movb %al, 0xc026(%rip)       # 0x154a0
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movzbl 0xc145(%rip), %ecx      # 0x155d0
cmpl %ecx, %eax
jg 0x9555
movsbl 0xc006(%rip), %eax      # 0x154a0
movslq -0x1c(%rbp), %rdx
leaq 0xc47b(%rip), %rcx      # 0x15920
movq (%rcx,%rdx,8), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x9545
movq 0xc52d(%rip), %rdi      # 0x159e8
movl -0x28(%rbp), %esi
movl -0x24(%rbp), %edx
callq 0x21d0
cmpl $-0x1, %eax
jne 0x94cd
jmp 0x94ed
movq 0xc514(%rip), %rdi      # 0x159e8
movslq -0x1c(%rbp), %rcx
leaq 0xc441(%rip), %rax      # 0x15920
movq (%rax,%rcx,8), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
movq 0xc4f4(%rip), %rdi      # 0x159e8
leaq 0x6838(%rip), %rsi      # 0xfd33
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
movq 0xc4dc(%rip), %rdi      # 0x159e8
callq 0x2210
movq 0xc4d0(%rip), %rdi      # 0x159e8
callq 0x2180
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movslq -0x20(%rbp), %rcx
leaq 0xc44b(%rip), %rax      # 0x15980
cmpq $0x0, (%rax,%rcx,8)
jne 0x9543
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
jmp 0x9555
jmp 0x9547
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x9481
jmp 0x9557
cmpl $0x0, -0x20(%rbp)
je 0x9565
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x959f
leaq 0xbf34(%rip), %rdi      # 0x154a0
leaq 0x7116(%rip), %rsi      # 0x10689
leaq -0x20(%rbp), %rdx
movb $0x0, %al
callq 0x20a0
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x9599
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)