// File: /workspace/github_c_makefile_star2_O0/hyc[P]trek73c/trekx.c
// Function: TFire
void TFire()
{
  int I, Bad;
  Digs Temp;
  boolean Stat[6];
  boolean Ok;
  reg Srec *WITH;

  waddstr(Cmdwin,"   Fire Tubes [1-6] ");
  Indigits(Temp);
  Ok = true;
  Bad = 0;
  for (I = 0; I <= 5; I++)
    Stat[I] = true;
  WITH = Ships[0];
  for (I = 0; I <= 5; I++) {
    if (Temp[I] > 0 && Temp[I] < 7) {
      if (WITH->Tstat[Temp[I] - 1] < 0 ||
	  WITH->TDepl[Temp[I] - 1] > 135 && WITH->TDepl[Temp[I] - 1] < 225 ||
	  WITH->Tengy[Temp[I] - 1] <= 0) {
	Bad++;
	Stat[Temp[I] - 1] = false;
      } else
	WITH->Tstat[Temp[I] - 1] += 100;
    } else if (Temp[I] > 6)
      Ok = false;
  }
  if (!Ok) {
    BParam();
    return;
  }
  if (Bad <= 0)
    return;
  waddstr(Cmdwin," Computer: Tube");
  if (Bad > 1)
    waddch(Cmdwin,'s');
  for (I = 1; I <= 6; I++) {
    if (!Stat[I - 1]) {
      sprintf(scrstr,"%2d", I);
      waddstr(Cmdwin,scrstr);
    }
  }
  waddstr(Cmdwin," unable to fire.");
  Endln();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq 0xbed9(%rip), %rdi      # 0x159e8
leaq 0x6e2d(%rip), %rsi      # 0x10943
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
leaq -0x30(%rbp), %rdi
callq 0x8f30
movb $0x1, -0x37(%rbp)
movl $0x0, -0x8(%rbp)
movl $0x0, -0x4(%rbp)
cmpl $0x5, -0x4(%rbp)
jg 0x9b55
movslq -0x4(%rbp), %rax
movb $0x1, -0x36(%rbp,%rax)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x9b3b
movq 0xbe24(%rip), %rax      # 0x15980
movq %rax, -0x40(%rbp)
movl $0x0, -0x4(%rbp)
cmpl $0x5, -0x4(%rbp)
jg 0x9c80
movslq -0x4(%rbp), %rax
cmpl $0x0, -0x30(%rbp,%rax,4)
jle 0x9c5f
movslq -0x4(%rbp), %rax
cmpl $0x7, -0x30(%rbp,%rax,4)
jge 0x9c5f
movq -0x40(%rbp), %rax
movslq -0x4(%rbp), %rcx
movl -0x30(%rbp,%rcx,4), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movswl 0x110(%rax,%rcx,2), %eax
cmpl $0x0, %eax
jl 0x9c1b
movq -0x40(%rbp), %rax
movslq -0x4(%rbp), %rcx
movl -0x30(%rbp,%rcx,4), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd 0xe0(%rax,%rcx,8), %xmm0
movsd 0x5507(%rip), %xmm1     # 0xf0d8
ucomisd %xmm1, %xmm0
jbe 0x9bfc
movq -0x40(%rbp), %rax
movslq -0x4(%rbp), %rcx
movl -0x30(%rbp,%rcx,4), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd 0x549f(%rip), %xmm0     # 0xf090
ucomisd 0xe0(%rax,%rcx,8), %xmm0
ja 0x9c1b
movq -0x40(%rbp), %rax
movslq -0x4(%rbp), %rcx
movl -0x30(%rbp,%rcx,4), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movswl 0xc6(%rax,%rcx,2), %eax
cmpl $0x0, %eax
jg 0x9c38
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
movslq -0x4(%rbp), %rax
movl -0x30(%rbp,%rax,4), %eax
subl $0x1, %eax
cltq
movb $0x0, -0x36(%rbp,%rax)
jmp 0x9c5d
movq -0x40(%rbp), %rax
movslq -0x4(%rbp), %rcx
movl -0x30(%rbp,%rcx,4), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movswl 0x110(%rax,%rcx,2), %edx
addl $0x64, %edx
movw %dx, 0x110(%rax,%rcx,2)
jmp 0x9c70
movslq -0x4(%rbp), %rax
cmpl $0x6, -0x30(%rbp,%rax,4)
jle 0x9c6e
movb $0x0, -0x37(%rbp)
jmp 0x9c70
jmp 0x9c72
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x9b67
cmpb $0x0, -0x37(%rbp)
jne 0x9c90
callq 0x8cd0
jmp 0x9d40
cmpl $0x0, -0x8(%rbp)
jg 0x9c9b
jmp 0x9d40
movq 0xbd46(%rip), %rdi      # 0x159e8
leaq 0x6caf(%rip), %rsi      # 0x10958
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
cmpl $0x1, -0x8(%rbp)
jle 0x9cca
movq 0xbd28(%rip), %rdi      # 0x159e8
movl $0x73, %esi
callq 0x2150
movl $0x1, -0x4(%rbp)
cmpl $0x6, -0x4(%rbp)
jg 0x9d23
movl -0x4(%rbp), %eax
subl $0x1, %eax
cltq
cmpb $0x0, -0x36(%rbp,%rax)
jne 0x9d16
movl -0x4(%rbp), %edx
leaq 0xb7b0(%rip), %rdi      # 0x154a0
leaq 0x6c37(%rip), %rsi      # 0x1092e
movb $0x0, %al
callq 0x2190
movq 0xbce3(%rip), %rdi      # 0x159e8
leaq 0xb794(%rip), %rsi      # 0x154a0
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
jmp 0x9d18
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x9cd1
movq 0xbcbe(%rip), %rdi      # 0x159e8
leaq 0x6c01(%rip), %rsi      # 0x10932
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
callq 0x42a0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)