// File: /workspace/github_c_makefile_star2_O1/hyc[P]trek73c/trekx.c
// Function: Status
void Status()
{
  reg int I, J, K;
  double Angle, Dist, X, Y, Temp;
  static char Symbol[4]="#*:";
  reg Object *WITH;

  J = 1;
  for (I = 0; I <= Enemies; I++) {
    if (Ships[I] != NULL) {
      Temp = Objects[0]->Act_Crs;
      WITH = Objects[I];
      sprintf(scrstr,"%5.1f%6.0f", WITH->Act_Spd, WITH->Act_Crs);
      mvwaddstr(Repwin, J, 13, scrstr);
      J++;
      if (I) {
	Angle = Bearing(0, I);
	Dist = Range(0, I);
	Angle = RMod(Angle - Temp);
	sprintf(scrstr, 
	   "%6ld%8ld", (long)floor(Angle + 0.5), (long)floor(Dist + 0.5));
	waddstr(Repwin, scrstr);
      }
    }
  }
  wmove(Repwin, 1, 26);
  wclrtoeol(Repwin);
  if (Ships[0] != NULL) {
    I = Objects[0]->Trgt;
    if (I) {
      if (I < 0) {
	waddstr(Repwin,"elud");
	I = (-I);
      } else
	waddstr(Repwin,"pursu");
      sprintf(scrstr,"ing %s", Snams[I-1]);
      waddstr(Repwin,scrstr);
    }
  }
  wnoutrefresh(Repwin);
  werase(Diswin);
  if (Ships[0] != NULL && !Ships[0]->Dmge[(int)Snsr])
  {
    for (I = 0; I < ObjCount; I++) {
      if (Objects[I] != NULL) {
        X = (Objects[I]->XPos - Objects[0]->XPos) * DisXmid / Radius + DisXmid;
        Y = (Objects[I]->YPos - Objects[0]->YPos) * DisYmid / Radius + DisYmid;
        J = (int)(X + 0.5);
        K = (int)(Y + 0.5);
        if (J >= 0 && J <= Discol-2 && K >= 0 && K <= Disrow-2) {
          wmove(Diswin, K, J);
          J = Objects[I]->ObTyp;
          if (J) {
            if (J < 10)
   	      waddch(Diswin,Snams[I][0]);
            else
	      waddch(Diswin,Symbol[J / 10 - 1]);
          }
        }
      }
    }
  }

  mvwaddch(Diswin,DisYmid,DisXmid,'+');
  wnoutrefresh(Diswin);
  wmove(Radwin,0,0);
  if (!Ships[0] || Ships[0]->Dmge[(long)Snsr])
    waddstr(Radwin,"-----");
  else {
    sprintf(scrstr,"%d", Radius);
    waddstr(Radwin,scrstr);
  }
  wnoutrefresh(Radwin);
  doupdate();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl $0x1, %ebp
leaq 0xfafd(%rip), %r14      # 0x13990
leaq 0xf616(%rip), %rbx      # 0x134b0
xorl %r12d, %r12d
xorl %r13d, %r13d
cmpq $0x0, (%r12,%r14)
je 0x4063
movq 0xf73e(%rip), %rax      # 0x135f0
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
leaq 0xf72c(%rip), %rax      # 0x135f0
movq (%r12,%rax), %rax
movsd (%rax), %xmm0
movsd 0x10(%rax), %xmm1
movq %rbx, %rdi
leaq 0xa033(%rip), %rsi      # 0xdf0e
movb $0x2, %al
callq 0x21a0
movq 0xfaff(%rip), %rdi      # 0x139e8
movl %ebp, %esi
movl $0xd, %edx
callq 0x21e0
cmpl $-0x1, %eax
je 0x3f0e
movq 0xfae7(%rip), %rdi      # 0x139e8
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
incl %ebp
testq %r13, %r13
je 0x4063
xorl %edi, %edi
movl %r13d, %esi
callq 0x3d75
movapd %xmm0, %xmm2
leaq 0xf6c2(%rip), %rax      # 0x135f0
movq (%r12,%rax), %rax
movsd 0x9106(%rip), %xmm0     # 0xd040
testq %rax, %rax
je 0x3f8f
movsd 0x38(%rax), %xmm0
movq 0xf6a5(%rip), %rcx      # 0x135f0
subsd 0x38(%rcx), %xmm0
movsd 0x40(%rcx), %xmm1
subsd 0x40(%rax), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
ucomisd 0x90e2(%rip), %xmm0     # 0xd050
jb 0x3f76
sqrtsd %xmm0, %xmm0
jmp 0x3f87
movsd %xmm2, 0x8(%rsp)
callq 0x22f0
movsd 0x8(%rsp), %xmm2
addsd 0x90b9(%rip), %xmm0     # 0xd048
movsd %xmm0, 0x10(%rsp)
subsd 0x18(%rsp), %xmm2
movsd %xmm2, 0x8(%rsp)
movsd 0x9077(%rip), %xmm1     # 0xd020
divsd %xmm1, %xmm2
movapd %xmm2, %xmm0
leaq 0x20(%rsp), %rdi
callq 0x22b0
movsd 0x20(%rsp), %xmm0
movsd 0x905f(%rip), %xmm2     # 0xd028
mulsd %xmm2, %xmm0
addsd 0x8(%rsp), %xmm0
movapd %xmm0, %xmm1
addsd %xmm2, %xmm1
movsd 0x903d(%rip), %xmm3     # 0xd020
movapd %xmm3, %xmm2
cmpnlesd %xmm0, %xmm2
andpd %xmm2, %xmm0
andnpd %xmm1, %xmm2
orpd %xmm0, %xmm2
movapd %xmm2, %xmm1
addsd %xmm3, %xmm1
movapd %xmm2, %xmm0
cmpltsd 0x9043(%rip), %xmm0     # 0xd050
andpd %xmm0, %xmm1
andnpd %xmm2, %xmm0
orpd %xmm1, %xmm0
addsd 0x9027(%rip), %xmm0     # 0xd048
callq 0x22d0
cvttsd2si %xmm0, %r15
movsd 0x10(%rsp), %xmm0
callq 0x22d0
cvttsd2si %xmm0, %rcx
movq %rbx, %rdi
leaq 0x9ed4(%rip), %rsi      # 0xdf19
movq %r15, %rdx
xorl %eax, %eax
callq 0x21a0
movq 0xf992(%rip), %rdi      # 0x139e8
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
leaq 0x1(%r13), %rax
movzbl 0xf572(%rip), %ecx      # 0x135e0
addq $0x8, %r12
cmpq %rcx, %r13
movq %rax, %r13
jb 0x3ea0
movq 0xf963(%rip), %rdi      # 0x139e8
movl $0x1, %esi
movl $0x1a, %edx
callq 0x21e0
movq 0xf94d(%rip), %rdi      # 0x139e8
callq 0x2220
cmpq $0x0, 0xf8e8(%rip)      # 0x13990
je 0x4126
movq 0xf53f(%rip), %rax      # 0x135f0
movswl 0x48(%rax), %ebp
testl %ebp, %ebp
je 0x4126
movq 0xf928(%rip), %rdi      # 0x139e8
testw %bp, %bp
js 0x40d8
leaq 0x9e5b(%rip), %rsi      # 0xdf27
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
jmp 0x40eb
leaq 0x9e43(%rip), %rsi      # 0xdf22
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
negl %ebp
movslq %ebp, %rax
leaq 0xf83b(%rip), %rcx      # 0x13930
movq -0x8(%rcx,%rax,8), %rdx
leaq 0xf3af(%rip), %r14      # 0x134b0
leaq 0x9e25(%rip), %rsi      # 0xdf2d
movq %r14, %rdi
xorl %eax, %eax
callq 0x21a0
movq 0xf8cf(%rip), %rdi      # 0x139e8
movq %r14, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq 0xf8bb(%rip), %rdi      # 0x139e8
callq 0x21b0
movq 0xf8cf(%rip), %rdi      # 0x13a08
callq 0x2090
movq 0xf84b(%rip), %rax      # 0x13990
testq %rax, %rax
je 0x4289
cmpb $0x0, 0xc1(%rax)
jne 0x4289
cmpb $0x0, 0xf480(%rip)      # 0x135e2
je 0x4289
xorl %r14d, %r14d
leaq 0xf7be(%rip), %r15      # 0x13930
leaq 0x9d91(%rip), %r12      # 0xdf0a
xorl %r13d, %r13d
leaq 0xf46d(%rip), %rax      # 0x135f0
movq (%r14,%rax), %rax
testq %rax, %rax
je 0x4272
movq 0xf459(%rip), %rcx      # 0x135f0
movsd 0x38(%rax), %xmm1
subsd 0x38(%rcx), %xmm1
xorps %xmm2, %xmm2
cvtsi2sdl 0xf854(%rip), %xmm2 # 0x13a00
mulsd %xmm2, %xmm1
xorps %xmm0, %xmm0
cvtsi2sdl 0xf86d(%rip), %xmm0 # 0x13a28
divsd %xmm0, %xmm1
addsd %xmm2, %xmm1
addsd 0x8e7d(%rip), %xmm1     # 0xd048
cvttsd2si %xmm1, %edx
testl %edx, %edx
js 0x4272
movl 0xf2cf(%rip), %esi      # 0x134ac
addl $-0x2, %esi
cmpl %edx, %esi
jl 0x4272
movsd 0x40(%rax), %xmm1
subsd 0x40(%rcx), %xmm1
xorps %xmm2, %xmm2
cvtsi2sdl 0xf807(%rip), %xmm2 # 0x13a04
mulsd %xmm2, %xmm1
divsd %xmm0, %xmm1
addsd %xmm2, %xmm1
addsd 0x8e37(%rip), %xmm1     # 0xd048
cvttsd2si %xmm1, %esi
testl %esi, %esi
js 0x4272
movl 0xf285(%rip), %eax      # 0x134a4
addl $-0x2, %eax
cmpl %esi, %eax
jl 0x4272
movq 0xf7db(%rip), %rdi      # 0x13a08
callq 0x21e0
leaq 0xf3b7(%rip), %rax      # 0x135f0
movq (%r14,%rax), %rax
movzwl 0x4a(%rax), %eax
testw %ax, %ax
je 0x4272
cmpw $0x9, %ax
jg 0x4252
movq (%r14,%r15), %rax
jmp 0x4263
movzwl %ax, %eax
imull $0xcccd, %eax, %eax     # imm = 0xCCCD
shrl $0x13, %eax
decl %eax
addq %r12, %rax
movq 0xf79e(%rip), %rdi      # 0x13a08
movsbl (%rax), %esi
callq 0x2160
incq %r13
movzbl 0xf366(%rip), %eax      # 0x135e2
addq $0x8, %r14
cmpq %rax, %r13
jb 0x417c
movq 0xf778(%rip), %rdi      # 0x13a08
movl 0xf76e(%rip), %esi      # 0x13a04
movl 0xf764(%rip), %edx      # 0x13a00
callq 0x21e0
cmpl $-0x1, %eax
je 0x42b7
movq 0xf75b(%rip), %rdi      # 0x13a08
movl $0x2b, %esi
callq 0x2160
movq 0xf74a(%rip), %rdi      # 0x13a08
callq 0x21b0
movq 0xf726(%rip), %rdi      # 0x139f0
xorl %esi, %esi
xorl %edx, %edx
callq 0x21e0
movq 0xf6b6(%rip), %rax      # 0x13990
leaq 0x9c53(%rip), %rsi      # 0xdf34
testq %rax, %rax
je 0x4309
cmpb $0x0, 0xc1(%rax)
jne 0x4309
movl 0xf733(%rip), %edx      # 0x13a28
leaq 0xa251(%rip), %rsi      # 0xe54d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21a0
movq %rbx, %rsi
movq 0xf6e0(%rip), %rdi      # 0x139f0
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq 0xf6cf(%rip), %rdi      # 0x139f0
callq 0x21b0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2070