// File: /workspace/github_cpp_makefile_star2_O1/czinn[P]homeworlds/game_io.cc
// Function: operator<<(std::ostream&, Action const&)
std::ostream& operator<<(std::ostream& os, const Action& action) {
  switch(action.type) {
    case PASS:
      os << "PASS";
      break;

    case ATTACK:
      os << "ATTACK " << action.ship << " " << action.system;
      break;

    case DISCOVER:
      os << "DISCOVER " << action.ship << " " << action.system;
      os << " " << action.target;
      break;

    case TRAVEL:
      os << "MOVE " << action.ship << " " << action.system << " ";
      os << action.system_target;
      break;

    case BUILD:
      os << "BUILD " << action.ship << " " << action.system;
      break;

    case TRADE:
      os << "TRADE " << action.ship << " " << action.target;
      os << " " << action.system;
      break;

    case SACRIFICE:
      os << "SACRIFICE " << action.ship << " " << action.system;
      break;

    case CATASTROPHE:
      os << "CATASTROPHE " << action.system;
      os << " " << "rygb"[action.ship.colour];
      break;
  }
  return os;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl 0x4(%rsi), %eax
cmpq $0x7, %rax
ja 0x8672
movq %rsi, %r14
leaq 0x2de8(%rip), %rcx      # 0xb180
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2e22(%rip), %rsi      # 0xb1ca
movl $0x4, %edx
jmp 0x8548
leaq 0x2e2e(%rip), %rsi      # 0xb1e7
movl $0x6, %edx
movq %rbx, %rdi
callq 0x21f0
movl 0x10(%r14), %eax
leaq 0x2def(%rip), %rcx      # 0xb1c0
movb (%rax,%rcx), %al
leaq 0x13(%rsp), %rsi
jmp 0x8637
leaq 0x2df2(%rip), %rsi      # 0xb1d7
movl $0x9, %edx
movq %rbx, %rdi
callq 0x21f0
movl 0x10(%r14), %eax
leaq 0x2dc3(%rip), %r12      # 0xb1c0
movb (%rax,%r12), %al
leaq 0x10(%rsp), %rsi
movb %al, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x21f0
movl 0xc(%r14), %esi
movq %rax, %rdi
callq 0x22c0
leaq 0x2da0(%rip), %r15      # 0xb1c8
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21f0
movl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0x22c0
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21f0
movl 0x1c(%r14), %eax
movb (%rax,%r12), %al
leaq 0x11(%rsp), %rsi
movb %al, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x21f0
movl 0x18(%r14), %esi
movq %rax, %rdi
jmp 0x866d
leaq 0x2d5e(%rip), %rsi      # 0xb1e1
movl $0x5, %edx
movq %rbx, %rdi
callq 0x21f0
movl 0x10(%r14), %eax
leaq 0x2d25(%rip), %rcx      # 0xb1c0
movb (%rax,%rcx), %al
leaq 0x12(%rsp), %rsi
movb %al, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x21f0
movl 0xc(%r14), %esi
movq %rax, %rdi
callq 0x22c0
leaq 0x2d03(%rip), %r15      # 0xb1c8
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21f0
movl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0x22c0
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x21f0
movl 0x14(%r14), %esi
jmp 0x866a
leaq 0x2cff(%rip), %rsi      # 0xb200
movl $0xc, %edx
movq %rbx, %rdi
callq 0x21f0
movl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0x22c0
leaq 0x2ca7(%rip), %rsi      # 0xb1c8
movl $0x1, %edx
movq %rbx, %rdi
callq 0x21f0
movl 0x10(%r14), %eax
leaq 0x2c87(%rip), %rcx      # 0xb1c0
movb (%rax,%rcx), %al
leaq 0x17(%rsp), %rsi
movb %al, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x21f0
jmp 0x8672
leaq 0x2c73(%rip), %rsi      # 0xb1cf
movl $0x7, %edx
movq %rbx, %rdi
callq 0x21f0
movl 0x10(%r14), %eax
leaq 0x2c4c(%rip), %rcx      # 0xb1c0
movb (%rax,%rcx), %al
leaq 0xf(%rsp), %rsi
jmp 0x8637
leaq 0x2c66(%rip), %rsi      # 0xb1ee
movl $0x6, %edx
movq %rbx, %rdi
callq 0x21f0
movl 0x10(%r14), %eax
leaq 0x2c20(%rip), %r12      # 0xb1c0
movb (%rax,%r12), %al
leaq 0x14(%rsp), %rsi
movb %al, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x21f0
movl 0xc(%r14), %esi
movq %rax, %rdi
callq 0x22c0
leaq 0x2bfd(%rip), %r15      # 0xb1c8
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21f0
movl 0x1c(%r14), %eax
movb (%rax,%r12), %al
leaq 0x15(%rsp), %rsi
movb %al, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x21f0
movl 0x18(%r14), %esi
movq %rax, %rdi
callq 0x22c0
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
jmp 0x8661
leaq 0x2bde(%rip), %rsi      # 0xb1f5
movl $0xa, %edx
movq %rbx, %rdi
callq 0x21f0
movl 0x10(%r14), %eax
leaq 0x2b91(%rip), %rcx      # 0xb1c0
movb (%rax,%rcx), %al
leaq 0x16(%rsp), %rsi
movb %al, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x21f0
movl 0xc(%r14), %esi
movq %rax, %rdi
callq 0x22c0
leaq 0x2b6f(%rip), %rsi      # 0xb1c8
movl $0x1, %edx
movq %rbx, %rdi
callq 0x21f0
movl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0x22c0
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq