// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rbp
leaq 0xee29(%rip), %r14      # 0x12980
leaq 0xe942(%rip), %rbx      # 0x124a0
pushq $-0x1
popq %r13
xorl %r15d, %r15d
xorl %r12d, %r12d
movzbl 0xea61(%rip), %eax      # 0x125d0
cmpq %rax, %r12
ja 0x3c87
cmpq $0x0, (%r15,%r14)
je 0x3c7b
movq 0xea56(%rip), %rax      # 0x125e0
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0xea44(%rip), %rax      # 0x125e0
movq (%r15,%rax), %rax
movsd (%rax), %xmm0
movsd 0x10(%rax), %xmm1
movq %rbx, %rdi
leaq 0x839b(%rip), %rsi      # 0xbf4e
movb $0x2, %al
callq 0x2190
movq 0xee17(%rip), %rdi      # 0x129d8
movl %ebp, %esi
pushq $0xd
popq %rdx
callq 0x21d0
cmpl $-0x1, %eax
je 0x3be2
movq 0xee01(%rip), %rdi      # 0x129d8
movq %rbx, %rsi
movl %r13d, %edx
callq 0x2200
incl %ebp
testq %r12, %r12
je 0x3c7b
xorl %edi, %edi
movl %r12d, %esi
callq 0x3a49
movsd %xmm0, (%rsp)
xorl %edi, %edi
movl %r12d, %esi
callq 0x3ae6
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
subsd 0x10(%rsp), %xmm0
callq 0x39cd
movsd 0x7424(%rip), %xmm1     # 0xb048
addsd %xmm1, %xmm0
callq 0x22c0
cvttsd2si %xmm0, %rbx
movsd 0x8(%rsp), %xmm0
addsd 0x7408(%rip), %xmm0     # 0xb048
callq 0x22c0
cvttsd2si %xmm0, %rcx
leaq 0xe84f(%rip), %rdi      # 0x124a0
leaq 0x8301(%rip), %rsi      # 0xbf59
movq %rbx, %rdx
leaq 0xe83e(%rip), %rbx      # 0x124a0
xorl %eax, %eax
callq 0x2190
movq 0xed68(%rip), %rdi      # 0x129d8
movq %rbx, %rsi
movl %r13d, %edx
callq 0x2200
incq %r12
addq $0x8, %r15
jmp 0x3b68
movq 0xed4a(%rip), %rdi      # 0x129d8
pushq $0x1
popq %rsi
pushq $0x1a
popq %rdx
callq 0x21d0
movq 0xed38(%rip), %rdi      # 0x129d8
callq 0x2210
cmpq $0x0, 0xecd3(%rip)      # 0x12980
je 0x3d25
movq 0xe92a(%rip), %rax      # 0x125e0
movswl 0x48(%rax), %ebx
testl %ebx, %ebx
je 0x3d25
movq 0xed13(%rip), %rdi      # 0x129d8
testw %bx, %bx
js 0x3cdb
leaq 0x8296(%rip), %rsi      # 0xbf67
pushq $-0x1
popq %rdx
callq 0x2200
jmp 0x3cec
leaq 0x8280(%rip), %rsi      # 0xbf62
pushq $-0x1
popq %rdx
callq 0x2200
negl %ebx
movslq %ebx, %rax
leaq 0xec2a(%rip), %rcx      # 0x12920
movq -0x8(%rcx,%rax,8), %rdx
leaq 0xe79e(%rip), %rbx      # 0x124a0
leaq 0x8264(%rip), %rsi      # 0xbf6d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2190
movq 0xecbe(%rip), %rdi      # 0x129d8
pushq $-0x1
popq %rdx
movq %rbx, %rsi
callq 0x2200
movq 0xecac(%rip), %rdi      # 0x129d8
callq 0x21a0
movq 0xecc0(%rip), %rdi      # 0x129f8
callq 0x2080
movq 0xec3c(%rip), %rax      # 0x12980
testq %rax, %rax
je 0x3d56
cmpb $0x0, 0xc1(%rax)
je 0x3e09
movq 0xec9b(%rip), %rdi      # 0x129f8
movl 0xec91(%rip), %esi      # 0x129f4
movl 0xec87(%rip), %edx      # 0x129f0
callq 0x21d0
cmpl $-0x1, %eax
leaq 0xe728(%rip), %rbx      # 0x124a0
je 0x3d89
movq 0xec77(%rip), %rdi      # 0x129f8
pushq $0x2b
popq %rsi
callq 0x2150
movq 0xec68(%rip), %rdi      # 0x129f8
callq 0x21a0
movq 0xec44(%rip), %rdi      # 0x129e0
xorl %esi, %esi
xorl %edx, %edx
callq 0x21d0
movq 0xebd4(%rip), %rax      # 0x12980
leaq 0x81c1(%rip), %rsi      # 0xbf74
testq %rax, %rax
je 0x3ddb
cmpb $0x0, 0xc1(%rax)
jne 0x3ddb
movl 0xec51(%rip), %edx      # 0x12a18
leaq 0x87bf(%rip), %rsi      # 0xc58d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2190
movq %rbx, %rsi
movq 0xebfe(%rip), %rdi      # 0x129e0
pushq $-0x1
popq %rdx
callq 0x2200
movq 0xebef(%rip), %rdi      # 0x129e0
callq 0x21a0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2060
leaq 0xeb10(%rip), %rbx      # 0x12920
movw $0xa, %bp
leaq 0x812f(%rip), %r14      # 0xbf4a
xorl %r15d, %r15d
xorl %r12d, %r12d
movzbl 0xe7aa(%rip), %eax      # 0x125d2
cmpq %rax, %r12
jae 0x3d56
leaq 0xe7a8(%rip), %rax      # 0x125e0
movq (%r15,%rax), %rax
testq %rax, %rax
je 0x3f1a
movq 0xe794(%rip), %rcx      # 0x125e0
movsd 0x38(%rax), %xmm1
subsd 0x38(%rcx), %xmm1
cvtsi2sdl 0xeb92(%rip), %xmm2 # 0x129f0
mulsd %xmm2, %xmm1
cvtsi2sdl 0xebae(%rip), %xmm0 # 0x12a18
divsd %xmm0, %xmm1
addsd %xmm2, %xmm1
addsd 0x71ce(%rip), %xmm1     # 0xb048
cvttsd2si %xmm1, %edx
testl %edx, %edx
js 0x3f1a
movl 0xe610(%rip), %esi      # 0x1249c
addl $-0x2, %esi
cmpl %edx, %esi
jl 0x3f1a
movsd 0x40(%rax), %xmm1
subsd 0x40(%rcx), %xmm1
cvtsi2sdl 0xeb4b(%rip), %xmm2 # 0x129f4
mulsd %xmm2, %xmm1
divsd %xmm0, %xmm1
addsd %xmm2, %xmm1
addsd 0x718b(%rip), %xmm1     # 0xb048
cvttsd2si %xmm1, %esi
testl %esi, %esi
js 0x3f1a
movl 0xe5c9(%rip), %eax      # 0x12494
addl $-0x2, %eax
cmpl %esi, %eax
jl 0x3f1a
movq 0xeb1f(%rip), %rdi      # 0x129f8
callq 0x21d0
leaq 0xe6fb(%rip), %rax      # 0x125e0
movq (%r15,%rax), %rax
movzwl 0x4a(%rax), %eax
testw %ax, %ax
je 0x3f1a
movq 0xeaff(%rip), %rdi      # 0x129f8
cmpw $0x9, %ax
jg 0x3f05
movq (%r15,%rbx), %rax
jmp 0x3f12
xorl %edx, %edx
divw %bp
movzwl %ax, %eax
decl %eax
addq %r14, %rax
movsbl (%rax), %esi
callq 0x2150
incq %r12
addq $0x8, %r15
jmp 0x3e21