// File: /workspace/github_c_makefile_star2_O1/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 0x3c58
movq 0x8ca9(%rip), %rdx      # 0x135d8
leaq 0x8b7a(%rip), %rbx      # 0x134b0
leaq 0x4c1a(%rip), %rsi      # 0xf557
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21a0
movq 0x90aa(%rip), %rdi      # 0x139f8
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
callq 0x7a1d
testb %al, %al
je 0xaade
leaq 0x8b41(%rip), %rbx      # 0x134b0
leaq 0x4bfa(%rip), %r14      # 0xf570
movq 0x9013(%rip), %rax      # 0x13990
movzbl 0x883d(%rip), %ecx      # 0x131c1
movswl 0x110(%rax,%rcx,2), %edx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x21a0
movq 0x9058(%rip), %rdi      # 0x139f8
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq 0x9044(%rip), %rdi      # 0x139f8
movq %rbx, %rsi
movl $0x1, %edx
callq 0x249f
movq %rbx, %rdi
callq 0x21d0
cmpl $0xc, %eax
ja 0xa976
movq 0x8fbb(%rip), %rcx      # 0x13990
movzbl 0x87e5(%rip), %edx      # 0x131c1
movw %ax, 0x110(%rcx,%rdx,2)
leaq 0x8ac5(%rip), %rbx      # 0x134b0
leaq 0x4bac(%rip), %r14      # 0xf59e
movq 0x8f97(%rip), %rax      # 0x13990
movzbl 0x87c1(%rip), %ecx      # 0x131c1
movswl 0x112(%rax,%rcx,2), %edx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x21a0
movq 0x8fdc(%rip), %rdi      # 0x139f8
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq 0x8fc8(%rip), %rdi      # 0x139f8
movq %rbx, %rsi
movl $0x1, %edx
callq 0x249f
movq %rbx, %rdi
callq 0x21d0
cmpl $0xa, %eax
ja 0xa9f2
movq 0x8f3f(%rip), %rcx      # 0x13990
movzbl 0x8769(%rip), %edx      # 0x131c1
movw %ax, 0x112(%rcx,%rdx,2)
leaq 0x8a49(%rip), %rbx      # 0x134b0
leaq 0x4b5e(%rip), %r14      # 0xf5cc
movq 0x8f1b(%rip), %rax      # 0x13990
movzbl 0x8745(%rip), %ecx      # 0x131c1
movswl 0x114(%rax,%rcx,2), %edx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x21a0
movq 0x8f60(%rip), %rdi      # 0x139f8
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq 0x8f4c(%rip), %rdi      # 0x139f8
movq %rbx, %rsi
movl $0x1, %edx
callq 0x249f
movq %rbx, %rdi
callq 0x21d0
cmpl $0x1f4, %eax            # imm = 0x1F4
ja 0xaa6e
movq 0x8ec1(%rip), %rcx      # 0x13990
movzbl 0x86eb(%rip), %edx      # 0x131c1
movw %ax, 0x114(%rcx,%rdx,2)
movq 0x8af3(%rip), %rdx      # 0x135d8
leaq 0x89c4(%rip), %rbx      # 0x134b0
leaq 0x4b0d(%rip), %rsi      # 0xf600
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21a0
movq 0x8ef4(%rip), %rdi      # 0x139f8
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
callq 0x7a1d
testb %al, %al
je 0xab96
leaq 0x898f(%rip), %rbx      # 0x134b0
leaq 0x4af3(%rip), %r14      # 0xf61b
movq 0x8e61(%rip), %rax      # 0x13990
movzbl 0x868a(%rip), %ecx      # 0x131c0
movswl 0xd4(%rax,%rcx,2), %edx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x21a0
movq 0x8ea6(%rip), %rdi      # 0x139f8
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq 0x8e92(%rip), %rdi      # 0x139f8
movq %rbx, %rsi
movl $0x1, %edx
callq 0x249f
movq %rbx, %rdi
callq 0x21d0
cmpl $0x64, %eax
ja 0xab28
movq 0x8e09(%rip), %rcx      # 0x13990
movzbl 0x8632(%rip), %edx      # 0x131c0
movw %ax, 0xd4(%rcx,%rdx,2)
addq $0x8, %rsp
popq %rbx
popq %r14
retq