// File: /workspace/github_c_makefile_star2_O0/hyc[P]trek73c/trekx.c
// Function: PCtrl
void PCtrl()
{
  int I, Code, R, Shp;
  double TD, Pr, X;
  boolean Ok, Ship;
  Object *WITH;

  waddstr(Cmdwin,"\nSulu: Launch Probe");
  if (Yes()) {
    if (Ships[0]->Dmge[(long)Prob]) {
      NoProb();
      return;
    }
    waddstr(Cmdwin,"   Number of pods to launch: [10+] ");
    mygetstr(Cmdwin,scrstr,true);
    Code = (sscanf(scrstr, "%d", &I) == 0);
    if (Code != 0)
      return;
    if (I > Objects[0]->Fuel) {
      NoEngy();
      return;
    }
    waddstr(Cmdwin,"   Launch probe at: ");
    Shp = GetShp(&Ok, &Ship);
    waddstr(Cmdwin,"   Set time delay: [0-15] ");
    mygetstr(Cmdwin,scrstr,true);
    sscanf(scrstr,"%lg", &TD);
    waddstr(Cmdwin,"   Proximity fuse: [50-500] ");
    mygetstr(Cmdwin,scrstr,true);
    sscanf(scrstr,"%lg", &Pr);
    if (TD > 15 || Pr < 50 || Pr > 500 || I < 10) {
      BParam();
      return;
    }
    Launch(0, &R);
    sprintf(scrstr,"Sulu: Probe %d away!", R);
    SEndln();
    WITH = Objects[R];
    WITH->Act_Spd = 2.0;
    WITH->Des_Spd = WITH->Act_Spd;
    WITH->Fuel = I;
    Objects[0]->Fuel -= I;
    Ships[0]->Fcap -= I;
    WITH->ObTyp = 20;
    if (Ship && Ok) {
      WITH->Trgt = Shp+1;
      WITH->Des_Crs = Bearing(0, Shp);
    } else
      WITH->Des_Crs = Shp;
    WITH->Tim_Del = 10000 - TD * 4;
    WITH->Prx_Del = Pr;
    WITH->Act_Crs = WITH->Des_Crs;
    X = Radians(WITH->Act_Crs);
    WITH->XPos += WITH->Act_Spd * 100 * cos(X) * Iter;
    WITH->YPos -= WITH->Act_Spd * 100 * sin(X) * Iter;
    return;
  }
  PRStt();
  waddstr(Cmdwin,"   Detonate all probes");
  if (Yes()) {
    for (I = 1; I < ObjCount; I++) {
      if (Objects[I] && (Objects[I]->ObTyp == 20))
	Objects[I]->Tim_Del = 10000.0;
    }
    sprintf(scrstr,"   Aye, %s detonating all probes.", Title);
    SEndln();
    return;
  }
  sprintf(scrstr,"%s: Control probe #", Name);
  waddstr(Cmdwin,scrstr);
  mygetstr(Cmdwin,scrstr,true);
  I = atoi(scrstr);
  if (Objects[I] == NULL || Objects[I]->ObTyp != 20) {
    BParam();
    return;
  }
  waddstr(Cmdwin,"Sulu: Detonate it");
  if (Yes()) {
    sprintf(scrstr,"   Aye, %s detonating probe %d.", Title, I);
    SEndln();
    Objects[I]->Tim_Del = 10000.0;
    return;
  }
  waddstr(Cmdwin,"   Lock it onto ");
  Shp = GetShp(&Ok, &Ship);
  WITH = Objects[I];
  if (Ship && Ok) {
    WITH->Trgt = Shp+1;
    WITH->Des_Crs = Bearing(I, Shp);
  } else {
    WITH->Trgt = 0;
    WITH->Des_Crs = Shp;
  }
  waddstr(Cmdwin,"Sulu: Locking...");
  Endln();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq 0xbc89(%rip), %rdi      # 0x159e8
leaq 0x6c02(%rip), %rsi      # 0x10968
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
callq 0x8c40
cmpb $0x0, %al
je 0xa11a
movq 0xbbfc(%rip), %rax      # 0x15980
cmpb $0x0, 0xc2(%rax)
je 0x9d97
callq 0x8d90
jmp 0xa370
movq 0xbc4a(%rip), %rdi      # 0x159e8
leaq 0x6bd7(%rip), %rsi      # 0x1097c
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
movq 0xbc32(%rip), %rdi      # 0x159e8
leaq 0xb6e3(%rip), %rsi      # 0x154a0
movl $0x1, %edx
callq 0x24a0
leaq 0xb6d2(%rip), %rdi      # 0x154a0
leaq 0x68b4(%rip), %rsi      # 0x10689
leaq -0x4(%rbp), %rdx
movb $0x0, %al
callq 0x20a0
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
je 0x9df9
jmp 0xa370
cvtsi2sdl -0x4(%rbp), %xmm0
movq 0xb7db(%rip), %rax      # 0x155e0
ucomisd 0x20(%rax), %xmm0
jbe 0x9e16
callq 0x8d60
jmp 0xa370
movq 0xbbcb(%rip), %rdi      # 0x159e8
leaq 0x6b7c(%rip), %rsi      # 0x109a0
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
leaq -0x29(%rbp), %rdi
leaq -0x2a(%rbp), %rsi
callq 0x93b0
movl %eax, -0x10(%rbp)
movq 0xbba3(%rip), %rdi      # 0x159e8
leaq 0x6b69(%rip), %rsi      # 0x109b5
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
movq 0xbb8b(%rip), %rdi      # 0x159e8
leaq 0xb63c(%rip), %rsi      # 0x154a0
movl $0x1, %edx
callq 0x24a0
leaq 0xb62b(%rip), %rdi      # 0x154a0
leaq 0x7668(%rip), %rsi      # 0x114e4
leaq -0x18(%rbp), %rdx
movb $0x0, %al
callq 0x20a0
movq 0xbb5a(%rip), %rdi      # 0x159e8
leaq 0x6b3b(%rip), %rsi      # 0x109d0
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
movq 0xbb42(%rip), %rdi      # 0x159e8
leaq 0xb5f3(%rip), %rsi      # 0x154a0
movl $0x1, %edx
callq 0x24a0
leaq 0xb5e2(%rip), %rdi      # 0x154a0
leaq 0x761f(%rip), %rsi      # 0x114e4
leaq -0x20(%rbp), %rdx
movb $0x0, %al
callq 0x20a0
movsd -0x18(%rbp), %xmm0
movsd 0x5273(%rip), %xmm1     # 0xf150
ucomisd %xmm1, %xmm0
ja 0x9f0b
movsd 0x526d(%rip), %xmm0     # 0xf158
ucomisd -0x20(%rbp), %xmm0
ja 0x9f0b
movsd -0x20(%rbp), %xmm0
movsd 0x5261(%rip), %xmm1     # 0xf160
ucomisd %xmm1, %xmm0
ja 0x9f0b
cmpl $0xa, -0x4(%rbp)
jge 0x9f15
callq 0x8cd0
jmp 0xa370
xorl %edi, %edi
leaq -0xc(%rbp), %rsi
callq 0x5b30
movl -0xc(%rbp), %edx
leaq 0xb576(%rip), %rdi      # 0x154a0
leaq 0x6abc(%rip), %rsi      # 0x109ed
movb $0x0, %al
callq 0x2190
callq 0x4320
movslq -0xc(%rbp), %rcx
leaq 0xb698(%rip), %rax      # 0x155e0
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsd 0x5174(%rip), %xmm0     # 0xf0d0
movsd %xmm0, (%rax)
movq -0x38(%rbp), %rax
movsd (%rax), %xmm0
movq -0x38(%rbp), %rax
movsd %xmm0, 0x8(%rax)
cvtsi2sdl -0x4(%rbp), %xmm0
movq -0x38(%rbp), %rax
movsd %xmm0, 0x20(%rax)
cvtsi2sdl -0x4(%rbp), %xmm1
movq 0xb655(%rip), %rax      # 0x155e0
movsd 0x20(%rax), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rax)
movl -0x4(%rbp), %edx
movq 0xb9dd(%rip), %rax      # 0x15980
movzbl 0x18(%rax), %ecx
subl %edx, %ecx
movb %cl, 0x18(%rax)
movq -0x38(%rbp), %rax
movw $0x14, 0x4a(%rax)
movsbl -0x2a(%rbp), %eax
cmpl $0x0, %eax
je 0x9fee
movsbl -0x29(%rbp), %eax
cmpl $0x0, %eax
je 0x9fee
movl -0x10(%rbp), %eax
addl $0x1, %eax
movw %ax, %cx
movq -0x38(%rbp), %rax
movw %cx, 0x48(%rax)
movl -0x10(%rbp), %esi
xorl %edi, %edi
callq 0x4430
movq -0x38(%rbp), %rax
movsd %xmm0, 0x18(%rax)
jmp 0x9ffc
cvtsi2sdl -0x10(%rbp), %xmm0
movq -0x38(%rbp), %rax
movsd %xmm0, 0x18(%rax)
movsd -0x18(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x5118(%rip), %xmm1     # 0xf138
mulsd %xmm1, %xmm0
movsd 0x507c(%rip), %xmm1     # 0xf0a8
addsd %xmm1, %xmm0
movq -0x38(%rbp), %rax
movsd %xmm0, 0x30(%rax)
movsd -0x20(%rbp), %xmm0
movq -0x38(%rbp), %rax
movsd %xmm0, 0x28(%rax)
movq -0x38(%rbp), %rax
movsd 0x18(%rax), %xmm0
movq -0x38(%rbp), %rax
movsd %xmm0, 0x10(%rax)
movq -0x38(%rbp), %rax
movsd 0x10(%rax), %xmm0
callq 0x4600
movsd %xmm0, -0x28(%rbp)
movq -0x38(%rbp), %rax
movsd 0x4ff0(%rip), %xmm0     # 0xf068
mulsd (%rax), %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x28(%rbp), %xmm0
callq 0x20f0
movaps %xmm0, %xmm1
movsd -0x48(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd 0xb101(%rip), %xmm2     # 0x151a0
movq -0x38(%rbp), %rax
movsd 0x38(%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x38(%rax)
movq -0x38(%rbp), %rax
movsd 0x4fa7(%rip), %xmm0     # 0xf068
mulsd (%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x28(%rbp), %xmm0
callq 0x2300
movaps %xmm0, %xmm1
movsd -0x40(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd 0xb0b8(%rip), %xmm2     # 0x151a0
movq -0x38(%rbp), %rax
movsd 0x40(%rax), %xmm1
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x40(%rax)
jmp 0xa370
callq 0x95b0
movq 0xb8c2(%rip), %rdi      # 0x159e8
leaq 0x68d5(%rip), %rsi      # 0x10a02
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
callq 0x8c40
cmpb $0x0, %al
je 0xa1d2
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
movzbl 0xb47d(%rip), %ecx      # 0x155d2
cmpl %ecx, %eax
jge 0xa1ac
movslq -0x4(%rbp), %rcx
leaq 0xb47c(%rip), %rax      # 0x155e0
cmpq $0x0, (%rax,%rcx,8)
je 0xa19f
movslq -0x4(%rbp), %rcx
leaq 0xb46a(%rip), %rax      # 0x155e0
movq (%rax,%rcx,8), %rax
movswl 0x4a(%rax), %eax
cmpl $0x14, %eax
jne 0xa19f
movslq -0x4(%rbp), %rcx
leaq 0xb452(%rip), %rax      # 0x155e0
movq (%rax,%rcx,8), %rax
movsd 0x4f0e(%rip), %xmm0     # 0xf0a8
movsd %xmm0, 0x30(%rax)
jmp 0xa1a1
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xa14b
movq 0xb415(%rip), %rdx      # 0x155c8
leaq 0xb2e6(%rip), %rdi      # 0x154a0
leaq 0x6858(%rip), %rsi      # 0x10a19
movb $0x0, %al
callq 0x2190
callq 0x4320
jmp 0xa370
movq 0xb3df(%rip), %rdx      # 0x155b8
leaq 0xb2c0(%rip), %rdi      # 0x154a0
leaq 0x6854(%rip), %rsi      # 0x10a3b
movb $0x0, %al
callq 0x2190
movq 0xb7f3(%rip), %rdi      # 0x159e8
leaq 0xb2a4(%rip), %rsi      # 0x154a0
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
movq 0xb7db(%rip), %rdi      # 0x159e8
leaq 0xb28c(%rip), %rsi      # 0x154a0
movl $0x1, %edx
callq 0x24a0
leaq 0xb27b(%rip), %rdi      # 0x154a0
callq 0x21c0
movl %eax, -0x4(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0xb3a8(%rip), %rax      # 0x155e0
cmpq $0x0, (%rax,%rcx,8)
je 0xa257
movslq -0x4(%rbp), %rcx
leaq 0xb396(%rip), %rax      # 0x155e0
movq (%rax,%rcx,8), %rax
movswl 0x4a(%rax), %eax
cmpl $0x14, %eax
je 0xa261
callq 0x8cd0
jmp 0xa370
movq 0xb780(%rip), %rdi      # 0x159e8
leaq 0x67e0(%rip), %rsi      # 0x10a4f
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
callq 0x8c40
cmpb $0x0, %al
je 0xa2c7
movq 0xb33f(%rip), %rdx      # 0x155c8
movl -0x4(%rbp), %ecx
leaq 0xb20d(%rip), %rdi      # 0x154a0
leaq 0x67c7(%rip), %rsi      # 0x10a61
movb $0x0, %al
callq 0x2190
callq 0x4320
movslq -0x4(%rbp), %rcx
leaq 0xb32f(%rip), %rax      # 0x155e0
movq (%rax,%rcx,8), %rax
movsd 0x4deb(%rip), %xmm0     # 0xf0a8
movsd %xmm0, 0x30(%rax)
jmp 0xa370
movq 0xb71a(%rip), %rdi      # 0x159e8
leaq 0x67ac(%rip), %rsi      # 0x10a81
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
leaq -0x29(%rbp), %rdi
leaq -0x2a(%rbp), %rsi
callq 0x93b0
movl %eax, -0x10(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0xb2e6(%rip), %rax      # 0x155e0
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movsbl -0x2a(%rbp), %eax
cmpl $0x0, %eax
je 0xa33b
movsbl -0x29(%rbp), %eax
cmpl $0x0, %eax
je 0xa33b
movl -0x10(%rbp), %eax
addl $0x1, %eax
movw %ax, %cx
movq -0x38(%rbp), %rax
movw %cx, 0x48(%rax)
movl -0x4(%rbp), %edi
movl -0x10(%rbp), %esi
callq 0x4430
movq -0x38(%rbp), %rax
movsd %xmm0, 0x18(%rax)
jmp 0xa353
movq -0x38(%rbp), %rax
movw $0x0, 0x48(%rax)
cvtsi2sdl -0x10(%rbp), %xmm0
movq -0x38(%rbp), %rax
movsd %xmm0, 0x18(%rax)
movq 0xb68e(%rip), %rdi      # 0x159e8
leaq 0x6731(%rip), %rsi      # 0x10a92
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
callq 0x42a0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)