// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movl $0x1, -0x8(%rbp)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
movzbl 0x10f80(%rip), %ecx     # 0x155d0
cmpl %ecx, %eax
jg 0x47a5
movslq -0x4(%rbp), %rcx
leaq 0x1131d(%rip), %rax     # 0x15980
cmpq $0x0, (%rax,%rcx,8)
je 0x4795
movq 0x10f6b(%rip), %rax     # 0x155e0
movsd 0x10(%rax), %xmm0
movsd %xmm0, -0x38(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x10f56(%rip), %rax     # 0x155e0
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movsd (%rax), %xmm0
movq -0x40(%rbp), %rax
movsd 0x10(%rax), %xmm1
leaq 0x10df6(%rip), %rdi     # 0x154a0
leaq 0xb95b(%rip), %rsi      # 0x1000c
movb $0x2, %al
callq 0x2190
movq 0x11319(%rip), %rdi     # 0x159d8
movl -0x8(%rbp), %esi
movl $0xd, %edx
callq 0x21d0
cmpl $-0x1, %eax
jne 0x46d3
jmp 0x46eb
movq 0x112fe(%rip), %rdi     # 0x159d8
leaq 0x10dbf(%rip), %rsi     # 0x154a0
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x4(%rbp)
je 0x4793
movl -0x4(%rbp), %esi
xorl %edi, %edi
callq 0x4430
movsd %xmm0, -0x18(%rbp)
movl -0x4(%rbp), %esi
xorl %edi, %edi
callq 0x4540
movsd %xmm0, -0x20(%rbp)
movsd -0x18(%rbp), %xmm0
subsd -0x38(%rbp), %xmm0
callq 0x4380
movsd %xmm0, -0x18(%rbp)
movsd 0xa950(%rip), %xmm0     # 0xf088
addsd -0x18(%rbp), %xmm0
callq 0x22c0
cvttsd2si %xmm0, %rax
movq %rax, -0x48(%rbp)
movsd 0xa935(%rip), %xmm0     # 0xf088
addsd -0x20(%rbp), %xmm0
callq 0x22c0
movq -0x48(%rbp), %rdx
cvttsd2si %xmm0, %rcx
leaq 0x10d33(%rip), %rdi     # 0x154a0
leaq 0xb8a3(%rip), %rsi      # 0x10017
movb $0x0, %al
callq 0x2190
movq 0x11256(%rip), %rdi     # 0x159d8
leaq 0x10d17(%rip), %rsi     # 0x154a0
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
jmp 0x4795
jmp 0x4797
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x4646
movq 0x1122c(%rip), %rdi     # 0x159d8
movl $0x1, %esi
movl $0x1a, %edx
callq 0x21d0
movq 0x11216(%rip), %rdi     # 0x159d8
callq 0x2210
cmpq $0x0, 0x111b1(%rip)     # 0x15980
je 0x4870
movq 0x10e04(%rip), %rax     # 0x155e0
movswl 0x48(%rax), %eax
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
je 0x486e
cmpl $0x0, -0x4(%rbp)
jge 0x4815
movq 0x111de(%rip), %rdi     # 0x159d8
leaq 0xb81f(%rip), %rsi      # 0x10020
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
xorl %eax, %eax
subl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x482d
movq 0x111bc(%rip), %rdi     # 0x159d8
leaq 0xb802(%rip), %rsi      # 0x10025
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
movl -0x4(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x110e3(%rip), %rax     # 0x15920
movq (%rax,%rcx,8), %rdx
leaq 0x10c58(%rip), %rdi     # 0x154a0
leaq 0xb7dc(%rip), %rsi      # 0x1002b
movb $0x0, %al
callq 0x2190
movq 0x1117b(%rip), %rdi     # 0x159d8
leaq 0x10c3c(%rip), %rsi     # 0x154a0
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
jmp 0x4870
movq 0x11161(%rip), %rdi     # 0x159d8
callq 0x21a0
movq 0x11175(%rip), %rdi     # 0x159f8
callq 0x2090
cmpq $0x0, 0x110f0(%rip)     # 0x15980
je 0x4a63
movq 0x110e3(%rip), %rax     # 0x15980
cmpb $0x0, 0xc1(%rax)
jne 0x4a63
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
movzbl 0x10d17(%rip), %ecx     # 0x155d2
cmpl %ecx, %eax
jge 0x4a61
movslq -0x4(%rbp), %rcx
leaq 0x10d12(%rip), %rax     # 0x155e0
cmpq $0x0, (%rax,%rcx,8)
je 0x4a51
movslq -0x4(%rbp), %rcx
leaq 0x10cfc(%rip), %rax     # 0x155e0
movq (%rax,%rcx,8), %rax
movsd 0x38(%rax), %xmm0
movq 0x10cec(%rip), %rax     # 0x155e0
subsd 0x38(%rax), %xmm0
cvtsi2sdl 0x110ef(%rip), %xmm1 # 0x159f0
mulsd %xmm1, %xmm0
cvtsi2sdl 0x1110b(%rip), %xmm1 # 0x15a18
divsd %xmm1, %xmm0
cvtsi2sdl 0x110d7(%rip), %xmm1 # 0x159f0
addsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x10cb3(%rip), %rax     # 0x155e0
movq (%rax,%rcx,8), %rax
movsd 0x40(%rax), %xmm0
movq 0x10ca3(%rip), %rax     # 0x155e0
subsd 0x40(%rax), %xmm0
cvtsi2sdl 0x110aa(%rip), %xmm1 # 0x159f4
mulsd %xmm1, %xmm0
cvtsi2sdl 0x110c2(%rip), %xmm1 # 0x15a18
divsd %xmm1, %xmm0
cvtsi2sdl 0x11092(%rip), %xmm1 # 0x159f4
addsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movsd 0xa715(%rip), %xmm0     # 0xf088
addsd -0x28(%rbp), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x8(%rbp)
movsd 0xa701(%rip), %xmm0     # 0xf088
addsd -0x30(%rbp), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0x8(%rbp)
jl 0x4a4f
movl -0x8(%rbp), %eax
movl 0x10af6(%rip), %ecx     # 0x1549c
subl $0x2, %ecx
cmpl %ecx, %eax
jg 0x4a4f
cmpl $0x0, -0xc(%rbp)
jl 0x4a4f
movl -0xc(%rbp), %eax
movl 0x10ad0(%rip), %ecx     # 0x15494
subl $0x2, %ecx
cmpl %ecx, %eax
jg 0x4a4f
movq 0x11022(%rip), %rdi     # 0x159f8
movl -0xc(%rbp), %esi
movl -0x8(%rbp), %edx
callq 0x21d0
movslq -0x4(%rbp), %rcx
leaq 0x10bf4(%rip), %rax     # 0x155e0
movq (%rax,%rcx,8), %rax
movswl 0x4a(%rax), %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
je 0x4a4d
cmpl $0xa, -0x8(%rbp)
jge 0x4a23
movq 0x10fee(%rip), %rdi     # 0x159f8
movslq -0x4(%rbp), %rcx
leaq 0x10f0b(%rip), %rax     # 0x15920
movq (%rax,%rcx,8), %rax
movsbl (%rax), %esi
callq 0x2150
jmp 0x4a4b
movq 0x10fce(%rip), %rdi     # 0x159f8
movl -0x8(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x10a36(%rip), %rax     # 0x15478
movsbl (%rax,%rcx), %esi
callq 0x2150
jmp 0x4a4d
jmp 0x4a4f
jmp 0x4a51
jmp 0x4a53
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x48b1
jmp 0x4a63
movq 0x10f8e(%rip), %rdi     # 0x159f8
movl 0x10f84(%rip), %esi     # 0x159f4
movl 0x10f7a(%rip), %edx     # 0x159f0
callq 0x21d0
cmpl $-0x1, %eax
jne 0x4a82
jmp 0x4a93
movq 0x10f6f(%rip), %rdi     # 0x159f8
movl $0x2b, %esi
callq 0x2150
movq 0x10f5e(%rip), %rdi     # 0x159f8
callq 0x21a0
movq 0x10f3a(%rip), %rdi     # 0x159e0
xorl %edx, %edx
movl %edx, %esi
callq 0x21d0
cmpq $0x0, 0x10ec9(%rip)     # 0x15980
je 0x4acc
movq 0x10ec0(%rip), %rax     # 0x15980
movsbl 0xc1(%rax), %eax
cmpl $0x0, %eax
je 0x4ae6
movq 0x10f0d(%rip), %rdi     # 0x159e0
leaq 0xb558(%rip), %rsi      # 0x10032
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
jmp 0x4b19
movl 0x10f2c(%rip), %edx     # 0x15a18
leaq 0x109ad(%rip), %rdi     # 0x154a0
leaq 0xbb8f(%rip), %rsi      # 0x10689
movb $0x0, %al
callq 0x2190
movq 0x10ed8(%rip), %rdi     # 0x159e0
leaq 0x10991(%rip), %rsi     # 0x154a0
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
movq 0x10ec0(%rip), %rdi     # 0x159e0
callq 0x21a0
callq 0x2070
addq $0x50, %rsp
popq %rbp
retq