// File: /workspace/github_c_makefile_star2_O3/hyc[P]trek73c/trekx.c
// Function: Scan_
void Scan_(I)
int I;
{
  int J;
  Damages D;
  Char Ch;
  reg Srec *WITH;

  werase(Scnwin);
  sprintf(scrstr,"Damages to %s:\n", Snams[I]);
  mvwaddstr(Scnwin, 0, 0, scrstr);
  WITH = Ships[I];
  for (D = Comp; (long)D <= (long)Warp; D = (Damages)((long)D + 1)) {
    if (WITH->Dmge[(long)D]) {
      waddstr(Scnwin,DText[(long)D - (long)Comp]);
      waddch(Scnwin,'\n');
    }
  }
  sprintf(scrstr,"Survivors: %d\n", WITH->Crew);
  waddstr(Scnwin,scrstr);
  waddstr(Scnwin,"Phasers:");
  for (J = 0; J <= 3; J++) {
    if (WITH->Pstat[J] < 0)
      waddstr(Scnwin,"  --");
    else {
      sprintf(scrstr,"%4.0f", WITH->PChrg[J]);
      waddstr(Scnwin,scrstr);
    }
  }
  waddstr(Scnwin,"\n  Tubes:");
  for (J = 0; J <= 5; J++) {
    if (WITH->Tstat[J] < 0)
      waddstr(Scnwin,"  --");
    else {
      sprintf(scrstr,"%4d", WITH->Tengy[J]);
      waddstr(Scnwin,scrstr);
    }
  }
  waddstr(Scnwin,"\nShields:");
  for (J = 0; J <= 3; J++) {
    sprintf(scrstr,"%5.0f", WITH->Seff[J]);
    waddstr(Scnwin,scrstr);
  }
  sprintf(scrstr,"\n  Efficiency: %4.2f\n", WITH->Weff);
  waddstr(Scnwin,scrstr);
  sprintf(scrstr,"Regeneration: %0.0f\n", WITH->Regen);
  waddstr(Scnwin,scrstr);
  sprintf(scrstr,"Fuel Cur/Max: %0.0f/%d\n", Objects[I]->Fuel, WITH->Fcap);
  waddstr(Scnwin,scrstr);
  waddstr(Scnwin,"Press a key...");
  wrefresh(Scnwin);
  wgetch(Scnwin);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
movq 0xbc5b(%rip), %rdi      # 0x13a10
callq 0x2090
movslq %ebx, %r15
leaq 0xbb6c(%rip), %rax      # 0x13930
movq (%rax,%r15,8), %rdx
leaq 0xb6e1(%rip), %rbx      # 0x134b0
leaq 0x69a7(%rip), %rsi      # 0xe77d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21a0
movq 0xbc29(%rip), %rdi      # 0x13a10
xorl %esi, %esi
xorl %edx, %edx
callq 0x21e0
cmpl $-0x1, %eax
je 0x7e0d
movq 0xbc14(%rip), %rdi      # 0x13a10
leaq 0xb6ad(%rip), %rsi      # 0x134b0
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
leaq 0xbb7c(%rip), %rax      # 0x13990
movq (%rax,%r15,8), %r12
leaq 0xc0(%r12), %r14
xorl %r13d, %r13d
leaq 0xb3a6(%rip), %rbp      # 0x131d0
cmpb $0x0, (%r14)
je 0x7e57
movq 0xbbd9(%rip), %rdi      # 0x13a10
movq (%r13,%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq 0xbbc3(%rip), %rdi      # 0x13a10
movl $0xa, %esi
callq 0x2160
incq %r14
addq $0x8, %r13
cmpq $0x20, %r13
jne 0x7e2a
movswl 0x1a(%r12), %edx
leaq 0x691c(%rip), %rsi      # 0xe78d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21a0
movq 0xbb8e(%rip), %rdi      # 0x13a10
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq 0xbb7a(%rip), %rdi      # 0x13a10
leaq 0x68ff(%rip), %rsi      # 0xe79c
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq $-0x8, %r13
leaq 0x7428(%rip), %rbp      # 0xf2dd
leaq 0x698e(%rip), %r14      # 0xe84a
cmpw $0x0, 0xda(%r12,%r13)
movq %rbp, %rsi
js 0x7ee2
movsd 0x40(%r12,%r13,4), %xmm0
movq %rbx, %rdi
movq %r14, %rsi
movb $0x1, %al
callq 0x21a0
movq %rbx, %rsi
movq 0xbb27(%rip), %rdi      # 0x13a10
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
addq $0x2, %r13
jne 0x7ebc
movq 0xbb10(%rip), %rdi      # 0x13a10
leaq 0x689e(%rip), %rsi      # 0xe7a5
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movl $0x63, %r13d
leaq 0x73bf(%rip), %rbp      # 0xf2dd
leaq 0xb58b(%rip), %rbx      # 0x134b0
leaq 0x6883(%rip), %r14      # 0xe7af
cmpw $0x0, 0x4a(%r12,%r13,2)
movq %rbp, %rsi
js 0x7f4d
movswl (%r12,%r13,2), %edx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x21a0
movq %rbx, %rsi
movq 0xbabc(%rip), %rdi      # 0x13a10
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
incq %r13
cmpq $0x69, %r13
jne 0x7f2c
movq 0xbaa2(%rip), %rdi      # 0x13a10
leaq 0x683e(%rip), %rsi      # 0xe7b3
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movl $0x14, %r13d
leaq 0xb524(%rip), %rbx      # 0x134b0
leaq 0x682a(%rip), %r14      # 0xe7bd
movsd (%r12,%r13,8), %xmm0
movq %rbx, %rdi
movq %r14, %rsi
movb $0x1, %al
callq 0x21a0
movq 0xba63(%rip), %rdi      # 0x13a10
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
incq %r13
cmpq $0x18, %r13
jne 0x7f93
movsd 0x8(%r12), %xmm0
leaq 0xb4df(%rip), %rbx      # 0x134b0
leaq 0x67eb(%rip), %rsi      # 0xe7c3
movq %rbx, %rdi
movb $0x1, %al
callq 0x21a0
movq 0xba27(%rip), %rdi      # 0x13a10
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movsd (%r12), %xmm0
leaq 0x67d6(%rip), %rsi      # 0xe7d9
movq %rbx, %rdi
movb $0x1, %al
callq 0x21a0
movq 0xb9fc(%rip), %rdi      # 0x13a10
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
leaq 0xb5c8(%rip), %rax      # 0x135f0
movq (%rax,%r15,8), %rax
movsd 0x20(%rax), %xmm0
movzbl 0x18(%r12), %edx
leaq 0x67b0(%rip), %rsi      # 0xe7ee
movq %rbx, %rdi
movb $0x1, %al
callq 0x21a0
movq 0xb9c1(%rip), %rdi      # 0x13a10
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq 0xb9ad(%rip), %rdi      # 0x13a10
leaq 0x679c(%rip), %rsi      # 0xe806
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq 0xb995(%rip), %rdi      # 0x13a10
callq 0x2190
movq 0xb989(%rip), %rdi      # 0x13a10
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2300