// File: /workspace/github_c_makefile_star2_O0/hyc[P]trek73c/trekx.c
// Function: Ender
void Ender()
{
  int I;
  boolean Debris;
  Char *X1, *X2;
  char *plur;

  Debris = false;
  if (Win < 6) {		/* Check for flying antimatter */
    for (I = 1; I < ObjCount; I++) {
      if (Objects[I] && (Objects[I]->ObTyp >= 10)) {
        Debris = true;
        break;
      }
    }
  }
  Endln();
  if (Debris) {
    if (Win == Win2)
      return;

    Win2 = Win;
    switch (Win) {

    case 1:
      sprintf(scrstr,"%s:  Message to the Federation:  This is commander %s of",
	Capt, Capt);
      SEndln();
      sprintf(scrstr,"   the %s empire.  We have defeated the %s and are",
	Enemy, Snams[0]);
      SEndln();
      waddstr(Cmdwin,"   departing the quadrant.");
      break;

    case 2:
      sprintf(scrstr,"Spock:  All %s vessels have been either crippled or",
	Enemy);
      SEndln();
      waddstr(Cmdwin,"   destroyed.  We still, however, have antimatter devices to");
      Endln();
      waddstr(Cmdwin,"   avoid.");
      break;

    case 3:
      sprintf(scrstr,"Sulu:  The %ss are falling behind, and seem to be",
	Enemy);
      SEndln();
      waddstr(Cmdwin,"   breaking off their attack.");
      break;

    case 4:
      waddstr(Cmdwin,"Uhura:  I'm informing Starfleet Command of our disposition.");
      break;

    case 5:
      sprintf(scrstr,"Spock:  Although the %ss have surrendered, there are",
	Enemy);
      SEndln();
      waddstr(Cmdwin,"   still anti-matter devices floating around us.");
      break;
    }
    Endln();
    return;
  }
  X1 = "he";
  X2 = "his";
  if (Title == Female) {
    X1 = "she";
    X2 = "her";
  } else if (Title != Male) {
    X1 = "it";
    X2 = "its";
  }
  waddstr(Cmdwin,"Starfleet Command:   ");
  switch (Win) {

  case 1:
    waddstr(Cmdwin,"We have received confirmation that the");
    Endln();
    sprintf(scrstr,"   U.S.S. %s, Captained by %s, was destroyed",
      Snams[0], Name);
    SEndln();
    sprintf(scrstr,"   by %s battle cruisers.  May future Federation",
      Enemy);
    SEndln();
    waddstr(Cmdwin,"   officers perform better in their duties.");
    break;

  case 2:
    sprintf(scrstr,"We commend Captain %s and the crew of the", Name);
    SEndln();
    sprintf(scrstr,"   %s on their fine performance against the %ss.",
      Snams[0], Enemy);
    SEndln();
    sprintf(scrstr,"   May %s be an inspiration to future starship captains.",
      X1); 
    waddstr(Cmdwin,scrstr);
    break;

  case 3:
    sprintf(scrstr,"Captain %s of the U.S.S. %s has", Name, Snams[0]);
    SEndln();
    sprintf(scrstr,"   out-maneuvered %s foes. We commend %s",
      Enemy, X2);
    SEndln();
    waddstr(Cmdwin,"   tactical ability.");
    break;

  case 4:
    sprintf(scrstr,"Captain %s of the U.S.S. %s has", Name, Snams[0]);
    SEndln();
    sprintf(scrstr,"   surrendered %s vessel to the %ss.  May Captain",
      X2, Enemy);
    SEndln();
    waddstr(Cmdwin,"   Dunsell be remembered.");
    break;

  case 5:
    sprintf(scrstr,"We have received confirmation from the %s that",
      Snams[0]);
    SEndln();
    sprintf(scrstr,"   the %ss have surrendered.", Enemy);
    waddstr(Cmdwin,scrstr);
    break;

  case 6:
    if (Enemies != 1)
      plur = "s";
    else
      plur = "";
    waddstr(Cmdwin,"One of our vessels has reported the wreckage");
    Endln();
    sprintf(scrstr,"   of the %s and %d %s vessel%s.", Snams[0],
      Enemies, Enemy, plur);
    waddstr(Cmdwin,scrstr);
  }
  Endln();
  Endln();
  Debris = false;
  for (I = 0; I <= Enemies; I++) {
    if (Ships[I] != NULL) {
      if (!Debris) {
	Debris = true;
	waddstr(Cmdwin,"Survivors reported:");
	Endln();
      }
      sprintf(scrstr,"%s - %d", Snams[I], Ships[I]->Crew);
      SEndln();
    }
  }
  if (!Debris) {
    waddstr(Cmdwin,"*** No survivors reported ***");
    Endln();
  }
  Stop = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb $0x0, -0x5(%rbp)
movzbl 0xe9e4(%rip), %eax      # 0x155d7
cmpl $0x6, %eax
jge 0x6c4c
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
movzbl 0xe9c9(%rip), %ecx      # 0x155d2
cmpl %ecx, %eax
jge 0x6c4a
movslq -0x4(%rbp), %rcx
leaq 0xe9c8(%rip), %rax      # 0x155e0
cmpq $0x0, (%rax,%rcx,8)
je 0x6c3d
movslq -0x4(%rbp), %rcx
leaq 0xe9b6(%rip), %rax      # 0x155e0
movq (%rax,%rcx,8), %rax
movswl 0x4a(%rax), %eax
cmpl $0xa, %eax
jl 0x6c3d
movb $0x1, -0x5(%rbp)
jmp 0x6c4a
jmp 0x6c3f
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x6bff
jmp 0x6c4c
callq 0x42a0
cmpb $0x0, -0x5(%rbp)
je 0x6e08
movzbl 0xe975(%rip), %eax      # 0x155d7
cmpl 0xedb8(%rip), %eax      # 0x15a20
jne 0x6c6f
jmp 0x723f
movzbl 0xe961(%rip), %eax      # 0x155d7
movl %eax, 0xeda4(%rip)      # 0x15a20
movzbl 0xe954(%rip), %eax      # 0x155d7
decl %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x4, %eax
ja 0x6dfe
movq -0x28(%rbp), %rax
leaq 0x8541(%rip), %rcx      # 0xf1e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0xecc9(%rip), %rdx      # 0x15978
movq 0xecc2(%rip), %rcx      # 0x15978
leaq 0xe7e3(%rip), %rdi      # 0x154a0
leaq 0x9509(%rip), %rsi      # 0x101cd
movb $0x0, %al
callq 0x2190
callq 0x4320
movq 0xec99(%rip), %rdx      # 0x15970
movq 0xec42(%rip), %rcx      # 0x15920
leaq 0xe7bb(%rip), %rdi      # 0x154a0
leaq 0x951a(%rip), %rsi      # 0x10206
movb $0x0, %al
callq 0x2190
callq 0x4320
movq 0xece9(%rip), %rdi      # 0x159e8
leaq 0x9533(%rip), %rsi      # 0x10239
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
jmp 0x6dfe
movq 0xec54(%rip), %rdx      # 0x15970
leaq 0xe77d(%rip), %rdi      # 0x154a0
leaq 0x952a(%rip), %rsi      # 0x10254
movb $0x0, %al
callq 0x2190
callq 0x4320
movq 0xecab(%rip), %rdi      # 0x159e8
leaq 0x9544(%rip), %rsi      # 0x10288
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
callq 0x42a0
movq 0xec8e(%rip), %rdi      # 0x159e8
leaq 0x9564(%rip), %rsi      # 0x102c5
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
jmp 0x6dfe
movq 0xebf9(%rip), %rdx      # 0x15970
leaq 0xe722(%rip), %rdi      # 0x154a0
leaq 0x954a(%rip), %rsi      # 0x102cf
movb $0x0, %al
callq 0x2190
callq 0x4320
movq 0xec50(%rip), %rdi      # 0x159e8
leaq 0x9562(%rip), %rsi      # 0x10301
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
jmp 0x6dfe
movq 0xec36(%rip), %rdi      # 0x159e8
leaq 0x9566(%rip), %rsi      # 0x1031f
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
jmp 0x6dfe
movq 0xeba4(%rip), %rdx      # 0x15970
leaq 0xe6cd(%rip), %rdi      # 0x154a0
leaq 0x9581(%rip), %rsi      # 0x1035b
movb $0x0, %al
callq 0x2190
callq 0x4320
movq 0xebfb(%rip), %rdi      # 0x159e8
leaq 0x959c(%rip), %rsi      # 0x10390
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
callq 0x42a0
jmp 0x723f
leaq 0x95b7(%rip), %rax      # 0x103c6
movq %rax, -0x10(%rbp)
leaq 0x95a7(%rip), %rax      # 0x103c1
movq %rax, -0x18(%rbp)
movq 0xe7a3(%rip), %rax      # 0x155c8
cmpq 0xe3bc(%rip), %rax      # 0x151e8
jne 0x6e46
leaq 0x9590(%rip), %rax      # 0x103c5
movq %rax, -0x10(%rbp)
leaq 0x9589(%rip), %rax      # 0x103c9
movq %rax, -0x18(%rbp)
jmp 0x6e6e
movq 0xe77b(%rip), %rax      # 0x155c8
cmpq 0xe38c(%rip), %rax      # 0x151e0
je 0x6e6c
leaq 0x9c01(%rip), %rax      # 0x10a5e
movq %rax, -0x10(%rbp)
leaq 0x9565(%rip), %rax      # 0x103cd
movq %rax, -0x18(%rbp)
jmp 0x6e6e
movq 0xeb73(%rip), %rdi      # 0x159e8
leaq 0x9555(%rip), %rsi      # 0x103d1
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
movzbl 0xe74a(%rip), %eax      # 0x155d7
decl %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x5, %eax
ja 0x7169
movq -0x30(%rbp), %rax
leaq 0x831f(%rip), %rcx      # 0xf1c8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0xeb2f(%rip), %rdi      # 0x159e8
leaq 0x9527(%rip), %rsi      # 0x103e7
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
callq 0x42a0
movq 0xea4a(%rip), %rdx      # 0x15920
movq 0xe6db(%rip), %rcx      # 0x155b8
leaq 0xe5bc(%rip), %rdi      # 0x154a0
leaq 0x9523(%rip), %rsi      # 0x1040e
movb $0x0, %al
callq 0x2190
callq 0x4320
movq 0xea72(%rip), %rdx      # 0x15970
leaq 0xe59b(%rip), %rdi      # 0x154a0
leaq 0x952f(%rip), %rsi      # 0x1043b
movb $0x0, %al
callq 0x2190
callq 0x4320
movq 0xeac9(%rip), %rdi      # 0x159e8
leaq 0x9546(%rip), %rsi      # 0x1046c
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
jmp 0x7169
movq 0xe67c(%rip), %rdx      # 0x155b8
leaq 0xe55d(%rip), %rdi      # 0x154a0
leaq 0x954e(%rip), %rsi      # 0x10498
movb $0x0, %al
callq 0x2190
callq 0x4320
movq 0xe9c3(%rip), %rdx      # 0x15920
movq 0xea0c(%rip), %rcx      # 0x15970
leaq 0xe535(%rip), %rdi      # 0x154a0
leaq 0x9550(%rip), %rsi      # 0x104c2
movb $0x0, %al
callq 0x2190
callq 0x4320
movq -0x10(%rbp), %rdx
leaq 0xe517(%rip), %rdi      # 0x154a0
leaq 0x9563(%rip), %rsi      # 0x104f3
movb $0x0, %al
callq 0x2190
movq 0xea4a(%rip), %rdi      # 0x159e8
leaq 0xe4fb(%rip), %rsi      # 0x154a0
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
jmp 0x7169
movq 0xe5fd(%rip), %rdx      # 0x155b8
movq 0xe95e(%rip), %rcx      # 0x15920
leaq 0xe4d7(%rip), %rdi      # 0x154a0
leaq 0x955c(%rip), %rsi      # 0x1052c
movb $0x0, %al
callq 0x2190
callq 0x4320
movq 0xe98d(%rip), %rdx      # 0x15970
movq -0x18(%rbp), %rcx
leaq 0xe4b2(%rip), %rdi      # 0x154a0
leaq 0x9557(%rip), %rsi      # 0x1054c
movb $0x0, %al
callq 0x2190
callq 0x4320
movq 0xe9e0(%rip), %rdi      # 0x159e8
leaq 0x9566(%rip), %rsi      # 0x10575
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
jmp 0x7169
movq 0xe593(%rip), %rdx      # 0x155b8
movq 0xe8f4(%rip), %rcx      # 0x15920
leaq 0xe46d(%rip), %rdi      # 0x154a0
leaq 0x94f2(%rip), %rsi      # 0x1052c
movb $0x0, %al
callq 0x2190
callq 0x4320
movq -0x18(%rbp), %rdx
movq 0xe91f(%rip), %rcx      # 0x15970
leaq 0xe448(%rip), %rdi      # 0x154a0
leaq 0x952b(%rip), %rsi      # 0x1058a
movb $0x0, %al
callq 0x2190
callq 0x4320
movq 0xe976(%rip), %rdi      # 0x159e8
leaq 0x9543(%rip), %rsi      # 0x105bc
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
jmp 0x7169
movq 0xe891(%rip), %rdx      # 0x15920
leaq 0xe40a(%rip), %rdi      # 0x154a0
leaq 0x9539(%rip), %rsi      # 0x105d6
movb $0x0, %al
callq 0x2190
callq 0x4320
movq 0xe8c0(%rip), %rdx      # 0x15970
leaq 0xe3e9(%rip), %rdi      # 0x154a0
leaq 0x9547(%rip), %rsi      # 0x10605
movb $0x0, %al
callq 0x2190
movq 0xe91c(%rip), %rdi      # 0x159e8
leaq 0xe3cd(%rip), %rsi      # 0x154a0
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
jmp 0x7169
movzbl 0xe4e7(%rip), %eax      # 0x155d0
cmpl $0x1, %eax
je 0x70fb
leaq 0x8f86(%rip), %rax      # 0x1007b
movq %rax, -0x20(%rbp)
jmp 0x7106
leaq 0x8c32(%rip), %rax      # 0xfd34
movq %rax, -0x20(%rbp)
movq 0xe8db(%rip), %rdi      # 0x159e8
leaq 0x950e(%rip), %rsi      # 0x10622
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
callq 0x42a0
movq 0xe7f6(%rip), %rdx      # 0x15920
movzbl 0xe49f(%rip), %ecx      # 0x155d0
movq 0xe838(%rip), %r8       # 0x15970
movq -0x20(%rbp), %r9
leaq 0xe35d(%rip), %rdi      # 0x154a0
leaq 0x9505(%rip), %rsi      # 0x1064f
movb $0x0, %al
callq 0x2190
movq 0xe890(%rip), %rdi      # 0x159e8
leaq 0xe341(%rip), %rsi      # 0x154a0
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
callq 0x42a0
callq 0x42a0
movb $0x0, -0x5(%rbp)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
movzbl 0xe448(%rip), %ecx      # 0x155d0
cmpl %ecx, %eax
jg 0x7215
movslq -0x4(%rbp), %rcx
leaq 0xe7e5(%rip), %rax      # 0x15980
cmpq $0x0, (%rax,%rcx,8)
je 0x7205
cmpb $0x0, -0x5(%rbp)
jne 0x71c9
movb $0x1, -0x5(%rbp)
movq 0xe835(%rip), %rdi      # 0x159e8
leaq 0x94b6(%rip), %rsi      # 0x10670
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
callq 0x42a0
movslq -0x4(%rbp), %rcx
leaq 0xe74c(%rip), %rax      # 0x15920
movq (%rax,%rcx,8), %rdx
movslq -0x4(%rbp), %rcx
leaq 0xe79d(%rip), %rax      # 0x15980
movq (%rax,%rcx,8), %rax
movswl 0x1a(%rax), %ecx
leaq 0xe2ae(%rip), %rdi      # 0x154a0
leaq 0x948b(%rip), %rsi      # 0x10684
movb $0x0, %al
callq 0x2190
callq 0x4320
jmp 0x7207
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x717e
cmpb $0x0, -0x5(%rbp)
jne 0x7238
movq 0xe7c6(%rip), %rdi      # 0x159e8
leaq 0x9463(%rip), %rsi      # 0x1068c
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
callq 0x42a0
movb $0x1, 0xe7e5(%rip)      # 0x15a24
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)