// File: /workspace/github_c_makefile_star2_O3/hyc[P]trek73c/trekx.c
// Function: ChPrm
void ChPrm()
{
  int i;
  boolean Bad;

  Endln();
  sprintf(scrstr,"Chekov:  Reset tubes, %s", Title);
  waddstr(Cmdwin,scrstr);
  if (Yes()) {
    Bad = true;
    do {
    sprintf(scrstr,"   Set launch speed to (0-12, currently %0d) ",
      Ships[0]->Tstat[Tubes]);
    waddstr(Cmdwin,scrstr);
    mygetstr(Cmdwin,scrstr,true);
    i=atoi(scrstr);
    if (i>=0 && i<=12)
      Bad = false;
    } while (Bad);
    Ships[0]->Tstat[Tubes] = i;
    Bad = true;
    do {
      sprintf(scrstr,"   . . . time delay to (0-10, currently %0d) ",
	Ships[0]->Tstat[Tubes+1]);
      waddstr(Cmdwin,scrstr);
      mygetstr(Cmdwin,scrstr,true);
      i=atoi(scrstr);
      if (i>=0 && i<=10)
	Bad = false;
    } while (Bad);
    Ships[0]->Tstat[Tubes+1] = i;
    Bad = true;
    do {
      sprintf(scrstr,"   . . . proximity delay to (0-500, currently %0d) ",
	Ships[0]->Tstat[Tubes+2]);
      waddstr(Cmdwin,scrstr);
      mygetstr(Cmdwin,scrstr,true);
      i=atoi(scrstr);
      if (i>=0 && i<=500)
	Bad = false;
    } while (Bad);
    Ships[0]->Tstat[Tubes+2] = i;
  }
  sprintf(scrstr,"Chekov:  Reset phasers, %s", Title);
  waddstr(Cmdwin,scrstr);
  if (Yes()) {
    Bad = true;
    do {
      sprintf(scrstr,"   Reset firing percentage to (0-100, currently %0d) ",
        Ships[0]->Pstat[Phasers+1]);
      waddstr(Cmdwin,scrstr);
      mygetstr(Cmdwin,scrstr,true);
      i=atoi(scrstr);
      if (i>=0 && i<=100)
	Bad = false;
    } while (Bad);
    Ships[0]->Pstat[Phasers+1] = i;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x3d76
movq 0x8bd4(%rip), %rdx      # 0x135d8
leaq 0x8aa5(%rip), %rbx      # 0x134b0
leaq 0x4bfd(%rip), %rsi      # 0xf60f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21a0
movq 0x8fd5(%rip), %rdi      # 0x139f8
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
callq 0x7ad7
testb %al, %al
je 0xabb3
leaq 0x8a6c(%rip), %rbx      # 0x134b0
leaq 0x4bdd(%rip), %r14      # 0xf628
movq 0x8f3e(%rip), %rax      # 0x13990
movzbl 0x8768(%rip), %ecx      # 0x131c1
movswl 0x110(%rax,%rcx,2), %edx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x21a0
movq 0x8f83(%rip), %rdi      # 0x139f8
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq 0x8f6f(%rip), %rdi      # 0x139f8
movq %rbx, %rsi
movl $0x1, %edx
callq 0x249f
movq %rbx, %rdi
callq 0x21d0
cmpl $0xc, %eax
ja 0xaa4b
movq 0x8ee6(%rip), %rcx      # 0x13990
movzbl 0x8710(%rip), %edx      # 0x131c1
movw %ax, 0x110(%rcx,%rdx,2)
leaq 0x89f0(%rip), %rbx      # 0x134b0
leaq 0x4b8f(%rip), %r14      # 0xf656
movq 0x8ec2(%rip), %rax      # 0x13990
movzbl 0x86ec(%rip), %ecx      # 0x131c1
movswl 0x112(%rax,%rcx,2), %edx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x21a0
movq 0x8f07(%rip), %rdi      # 0x139f8
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq 0x8ef3(%rip), %rdi      # 0x139f8
movq %rbx, %rsi
movl $0x1, %edx
callq 0x249f
movq %rbx, %rdi
callq 0x21d0
cmpl $0xa, %eax
ja 0xaac7
movq 0x8e6a(%rip), %rcx      # 0x13990
movzbl 0x8694(%rip), %edx      # 0x131c1
movw %ax, 0x112(%rcx,%rdx,2)
leaq 0x8974(%rip), %rbx      # 0x134b0
leaq 0x4b41(%rip), %r14      # 0xf684
movq 0x8e46(%rip), %rax      # 0x13990
movzbl 0x8670(%rip), %ecx      # 0x131c1
movswl 0x114(%rax,%rcx,2), %edx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x21a0
movq 0x8e8b(%rip), %rdi      # 0x139f8
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq 0x8e77(%rip), %rdi      # 0x139f8
movq %rbx, %rsi
movl $0x1, %edx
callq 0x249f
movq %rbx, %rdi
callq 0x21d0
cmpl $0x1f4, %eax            # imm = 0x1F4
ja 0xab43
movq 0x8dec(%rip), %rcx      # 0x13990
movzbl 0x8616(%rip), %edx      # 0x131c1
movw %ax, 0x114(%rcx,%rdx,2)
movq 0x8a1e(%rip), %rdx      # 0x135d8
leaq 0x88ef(%rip), %rbx      # 0x134b0
leaq 0x4af0(%rip), %rsi      # 0xf6b8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21a0
movq 0x8e1f(%rip), %rdi      # 0x139f8
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
callq 0x7ad7
testb %al, %al
je 0xac6b
leaq 0x88ba(%rip), %rbx      # 0x134b0
leaq 0x4ad6(%rip), %r14      # 0xf6d3
movq 0x8d8c(%rip), %rax      # 0x13990
movzbl 0x85b5(%rip), %ecx      # 0x131c0
movswl 0xd4(%rax,%rcx,2), %edx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x21a0
movq 0x8dd1(%rip), %rdi      # 0x139f8
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq 0x8dbd(%rip), %rdi      # 0x139f8
movq %rbx, %rsi
movl $0x1, %edx
callq 0x249f
movq %rbx, %rdi
callq 0x21d0
cmpl $0x64, %eax
ja 0xabfd
movq 0x8d34(%rip), %rcx      # 0x13990
movzbl 0x855d(%rip), %edx      # 0x131c0
movw %ax, 0xd4(%rcx,%rdx,2)
addq $0x8, %rsp
popq %rbx
popq %r14
retq