// File: /workspace/github_c_makefile_star2_O1/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 0xbd15(%rip), %rdi      # 0x13a10
callq 0x2090
movslq %ebx, %r15
leaq 0xbc26(%rip), %rax      # 0x13930
movq (%rax,%r15,8), %rdx
leaq 0xb79b(%rip), %rbx      # 0x134b0
leaq 0x69a9(%rip), %rsi      # 0xe6c5
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21a0
movq 0xbce3(%rip), %rdi      # 0x13a10
xorl %esi, %esi
xorl %edx, %edx
callq 0x21e0
cmpl $-0x1, %eax
je 0x7d53
movq 0xbcce(%rip), %rdi      # 0x13a10
leaq 0xb767(%rip), %rsi      # 0x134b0
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
leaq 0xbc36(%rip), %rax      # 0x13990
movq (%rax,%r15,8), %r12
leaq 0xc0(%r12), %r14
xorl %r13d, %r13d
leaq 0xb460(%rip), %rbp      # 0x131d0
cmpb $0x0, (%r14)
je 0x7d9d
movq 0xbc93(%rip), %rdi      # 0x13a10
movq (%r13,%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq 0xbc7d(%rip), %rdi      # 0x13a10
movl $0xa, %esi
callq 0x2160
incq %r14
addq $0x8, %r13
cmpq $0x20, %r13
jne 0x7d70
movswl 0x1a(%r12), %edx
leaq 0x691e(%rip), %rsi      # 0xe6d5
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21a0
movq 0xbc48(%rip), %rdi      # 0x13a10
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq 0xbc34(%rip), %rdi      # 0x13a10
leaq 0x6901(%rip), %rsi      # 0xe6e4
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq $-0x8, %r13
leaq 0x742a(%rip), %rbp      # 0xf225
leaq 0x6990(%rip), %r14      # 0xe792
cmpw $0x0, 0xda(%r12,%r13)
movq %rbp, %rsi
js 0x7e28
movsd 0x40(%r12,%r13,4), %xmm0
movq %rbx, %rdi
movq %r14, %rsi
movb $0x1, %al
callq 0x21a0
movq %rbx, %rsi
movq 0xbbe1(%rip), %rdi      # 0x13a10
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
addq $0x2, %r13
jne 0x7e02
movq 0xbbca(%rip), %rdi      # 0x13a10
leaq 0x68a0(%rip), %rsi      # 0xe6ed
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movl $0x63, %r13d
leaq 0x73c1(%rip), %rbp      # 0xf225
leaq 0xb645(%rip), %rbx      # 0x134b0
leaq 0x6885(%rip), %r14      # 0xe6f7
cmpw $0x0, 0x4a(%r12,%r13,2)
movq %rbp, %rsi
js 0x7e93
movswl (%r12,%r13,2), %edx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x21a0
movq %rbx, %rsi
movq 0xbb76(%rip), %rdi      # 0x13a10
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
incq %r13
cmpq $0x69, %r13
jne 0x7e72
movq 0xbb5c(%rip), %rdi      # 0x13a10
leaq 0x6840(%rip), %rsi      # 0xe6fb
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movl $0x14, %r13d
leaq 0xb5de(%rip), %rbx      # 0x134b0
leaq 0x682c(%rip), %r14      # 0xe705
movsd (%r12,%r13,8), %xmm0
movq %rbx, %rdi
movq %r14, %rsi
movb $0x1, %al
callq 0x21a0
movq 0xbb1d(%rip), %rdi      # 0x13a10
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
incq %r13
cmpq $0x18, %r13
jne 0x7ed9
movsd 0x8(%r12), %xmm0
leaq 0xb599(%rip), %rbx      # 0x134b0
leaq 0x67ed(%rip), %rsi      # 0xe70b
movq %rbx, %rdi
movb $0x1, %al
callq 0x21a0
movq 0xbae1(%rip), %rdi      # 0x13a10
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movsd (%r12), %xmm0
leaq 0x67d8(%rip), %rsi      # 0xe721
movq %rbx, %rdi
movb $0x1, %al
callq 0x21a0
movq 0xbab6(%rip), %rdi      # 0x13a10
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
leaq 0xb682(%rip), %rax      # 0x135f0
movq (%rax,%r15,8), %rax
movsd 0x20(%rax), %xmm0
movzbl 0x18(%r12), %edx
leaq 0x67b2(%rip), %rsi      # 0xe736
movq %rbx, %rdi
movb $0x1, %al
callq 0x21a0
movq 0xba7b(%rip), %rdi      # 0x13a10
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq 0xba67(%rip), %rdi      # 0x13a10
leaq 0x679e(%rip), %rsi      # 0xe74e
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
movq 0xba4f(%rip), %rdi      # 0x13a10
callq 0x2190
movq 0xba43(%rip), %rdi      # 0x13a10
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2300