// File: /workspace/github_c_makefile_star2_O3/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 $0x18, %rsp
movl $0x1, %ebp
leaq 0xf9ed(%rip), %r14      # 0x13990
leaq 0xf506(%rip), %rbx      # 0x134b0
xorl %r12d, %r12d
xorl %r13d, %r13d
cmpq $0x0, (%r12,%r14)
je 0x4159
movq 0xf62e(%rip), %rax      # 0x135f0
movsd 0x10(%rax), %xmm0
movsd %xmm0, (%rsp)
leaq 0xf61d(%rip), %rax      # 0x135f0
movq (%r12,%rax), %rax
movsd (%rax), %xmm0
movsd 0x10(%rax), %xmm1
movq %rbx, %rdi
leaq 0x9fdc(%rip), %rsi      # 0xdfc6
movb $0x2, %al
callq 0x21a0
movq 0xf9f0(%rip), %rdi      # 0x139e8
movl %ebp, %esi
movl $0xd, %edx
callq 0x21e0
cmpl $-0x1, %eax
je 0x401d
movq 0xf9d8(%rip), %rdi      # 0x139e8
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
incl %ebp
testq %r13, %r13
je 0x4159
xorl %edi, %edi
movl %r13d, %esi
callq 0x3e93
movapd %xmm0, %xmm3
leaq 0xf5b3(%rip), %rax      # 0x135f0
movq (%r12,%rax), %rax
movsd 0x9127(%rip), %xmm1     # 0xd170
testq %rax, %rax
movsd 0x9124(%rip), %xmm2     # 0xd178
je 0x4088
movsd 0x38(%rax), %xmm0
movq 0xf58e(%rip), %rcx      # 0x135f0
subsd 0x38(%rcx), %xmm0
movsd 0x40(%rcx), %xmm1
subsd 0x40(%rax), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorps %xmm1, %xmm1
sqrtsd %xmm0, %xmm1
addsd %xmm2, %xmm1
movsd %xmm1, 0x8(%rsp)
subsd (%rsp), %xmm3
movsd %xmm3, (%rsp)
movsd 0x90b0(%rip), %xmm1     # 0xd150
divsd %xmm1, %xmm3
movapd %xmm3, %xmm0
leaq 0x10(%rsp), %rdi
callq 0x22b0
movsd 0x10(%rsp), %xmm0
movsd 0x9098(%rip), %xmm2     # 0xd158
mulsd %xmm2, %xmm0
addsd (%rsp), %xmm0
movapd %xmm0, %xmm1
addsd %xmm2, %xmm1
movsd 0x9077(%rip), %xmm3     # 0xd150
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 0x907d(%rip), %xmm0     # 0xd180
andpd %xmm0, %xmm1
andnpd %xmm2, %xmm0
orpd %xmm1, %xmm0
addsd 0x9061(%rip), %xmm0     # 0xd178
callq 0x22d0
cvttsd2si %xmm0, %r15
movsd 0x8(%rsp), %xmm0
callq 0x22d0
cvttsd2si %xmm0, %rcx
movq %rbx, %rdi
leaq 0x9e96(%rip), %rsi      # 0xdfd1
movq %r15, %rdx
xorl %eax, %eax
callq 0x21a0
movq 0xf89c(%rip), %rdi      # 0x139e8
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
leaq 0x1(%r13), %rax
movzbl 0xf47c(%rip), %ecx      # 0x135e0
addq $0x8, %r12
cmpq %rcx, %r13
movq %rax, %r13
jb 0x3fb0
movq 0xf86d(%rip), %rdi      # 0x139e8
movl $0x1, %esi
movl $0x1a, %edx
callq 0x21e0
movq 0xf857(%rip), %rdi      # 0x139e8
callq 0x2220
cmpq $0x0, 0xf7f2(%rip)      # 0x13990
je 0x421c
movq 0xf449(%rip), %rax      # 0x135f0
movswl 0x48(%rax), %ebp
testl %ebp, %ebp
je 0x421c
movq 0xf832(%rip), %rdi      # 0x139e8
testw %bp, %bp
js 0x41ce
leaq 0x9e1d(%rip), %rsi      # 0xdfdf
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
jmp 0x41e1
leaq 0x9e05(%rip), %rsi      # 0xdfda
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
negl %ebp
movslq %ebp, %rax
leaq 0xf745(%rip), %rcx      # 0x13930
movq -0x8(%rcx,%rax,8), %rdx
leaq 0xf2b9(%rip), %r14      # 0x134b0
leaq 0x9de7(%rip), %rsi      # 0xdfe5
movq %r14, %rdi
xorl %eax, %eax
callq 0x21a0
movq 0xf7d9(%rip), %rdi      # 0x139e8
movq %r14, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq 0xf7c5(%rip), %rdi      # 0x139e8
callq 0x21b0
movq 0xf7d9(%rip), %rdi      # 0x13a08
callq 0x2090
movq 0xf755(%rip), %rax      # 0x13990
testq %rax, %rax
movsd 0x8f32(%rip), %xmm3     # 0xd178
je 0x438f
cmpb $0x0, 0xc1(%rax)
jne 0x438f
cmpb $0x0, 0xf382(%rip)      # 0x135e2
je 0x438f
xorl %r14d, %r14d
leaq 0xf6c0(%rip), %r15      # 0x13930
leaq 0x9d4b(%rip), %r12      # 0xdfc2
xorl %r13d, %r13d
leaq 0xf36f(%rip), %rax      # 0x135f0
movq (%r14,%rax), %rax
testq %rax, %rax
je 0x4378
movq 0xf35b(%rip), %rcx      # 0x135f0
movsd 0x38(%rax), %xmm1
subsd 0x38(%rcx), %xmm1
xorps %xmm2, %xmm2
cvtsi2sdl 0xf756(%rip), %xmm2 # 0x13a00
mulsd %xmm2, %xmm1
xorps %xmm0, %xmm0
cvtsi2sdl 0xf76f(%rip), %xmm0 # 0x13a28
divsd %xmm0, %xmm1
addsd %xmm2, %xmm1
addsd %xmm3, %xmm1
cvttsd2si %xmm1, %edx
testl %edx, %edx
js 0x4378
movl 0xf1d5(%rip), %esi      # 0x134ac
addl $-0x2, %esi
cmpl %edx, %esi
jl 0x4378
movsd 0x40(%rax), %xmm1
subsd 0x40(%rcx), %xmm1
xorps %xmm2, %xmm2
cvtsi2sdl 0xf70d(%rip), %xmm2 # 0x13a04
mulsd %xmm2, %xmm1
divsd %xmm0, %xmm1
addsd %xmm2, %xmm1
addsd %xmm3, %xmm1
cvttsd2si %xmm1, %esi
testl %esi, %esi
js 0x4378
movl 0xf18f(%rip), %eax      # 0x134a4
addl $-0x2, %eax
cmpl %esi, %eax
jl 0x4378
movq 0xf6e5(%rip), %rdi      # 0x13a08
callq 0x21e0
movsd 0x8e48(%rip), %xmm3     # 0xd178
leaq 0xf2b9(%rip), %rax      # 0x135f0
movq (%r14,%rax), %rax
movzwl 0x4a(%rax), %eax
testw %ax, %ax
je 0x4378
cmpw $0x9, %ax
jg 0x4350
movq (%r14,%r15), %rax
jmp 0x4361
movzwl %ax, %eax
imull $0xcccd, %eax, %eax     # imm = 0xCCCD
shrl $0x13, %eax
decl %eax
addq %r12, %rax
movq 0xf6a0(%rip), %rdi      # 0x13a08
movsbl (%rax), %esi
callq 0x2160
movsd 0x8e00(%rip), %xmm3     # 0xd178
incq %r13
movzbl 0xf260(%rip), %eax      # 0x135e2
addq $0x8, %r14
cmpq %rax, %r13
jb 0x427a
movq 0xf672(%rip), %rdi      # 0x13a08
movl 0xf668(%rip), %esi      # 0x13a04
movl 0xf65e(%rip), %edx      # 0x13a00
callq 0x21e0
cmpl $-0x1, %eax
je 0x43bd
movq 0xf655(%rip), %rdi      # 0x13a08
movl $0x2b, %esi
callq 0x2160
movq 0xf644(%rip), %rdi      # 0x13a08
callq 0x21b0
movq 0xf620(%rip), %rdi      # 0x139f0
xorl %esi, %esi
xorl %edx, %edx
callq 0x21e0
movq 0xf5b0(%rip), %rax      # 0x13990
leaq 0x9c05(%rip), %rsi      # 0xdfec
testq %rax, %rax
je 0x440f
cmpb $0x0, 0xc1(%rax)
jne 0x440f
movl 0xf62d(%rip), %edx      # 0x13a28
leaq 0xa203(%rip), %rsi      # 0xe605
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21a0
movq %rbx, %rsi
movq 0xf5da(%rip), %rdi      # 0x139f0
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq 0xf5c9(%rip), %rdi      # 0x139f0
callq 0x21b0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2070