// File: /workspace/github_cpp_makefile_star2_O1/czinn[P]homeworlds/game_io.cc
// Function: print_action(std::ostream&, Action const&, std::map<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<int>, std::allocator<std::pair<int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&, __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)
void print_action(std::ostream& os, const Action& action,
                  const std::map<int, std::string>& system_names,
                  std::vector<std::string>::iterator& new_names) {
  switch (action.type) {
    case PASS:
      os << "PASS";
      break;

    case ATTACK:
      os << "ATTACK " << action.ship << " " << system_names.at(action.system);
      break;

    case DISCOVER:
      os << "DISCOVER " << action.ship << " " << system_names.at(action.system);
      os << " " << action.target << " " << *new_names++;
      break;

    case TRAVEL:
      os << "MOVE " << action.ship << " " << system_names.at(action.system) << " ";
      os << system_names.at(action.system_target);
      break;

    case BUILD:
      os << "BUILD " << action.ship << " " << system_names.at(action.system);
      break;

    case TRADE:
      os << "TRADE " << action.ship << " " << action.target;
      os << " " << system_names.at(action.system);
      break;

    case SACRIFICE:
      os << "SACRIFICE " << action.ship << " " << system_names.at(action.system);
      break;

    case CATASTROPHE:
      os << "CATASTROPHE " << system_names.at(action.system);
      os << " " << "rygb"[action.ship.colour];
      break;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl 0x4(%rsi), %eax
cmpq $0x7, %rax
ja 0x89f0
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x2af1(%rip), %rcx      # 0xb1a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2b0b(%rip), %rsi      # 0xb1ca
movl $0x4, %edx
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21f0
leaq 0x2b06(%rip), %rsi      # 0xb1e7
movl $0x6, %edx
movq %rbx, %rdi
callq 0x21f0
movl 0x10(%r14), %eax
leaq 0x2ac7(%rip), %rcx      # 0xb1c0
movb (%rax,%rcx), %al
leaq 0x13(%rsp), %rsi
jmp 0x89a3
leaq 0x2aca(%rip), %rsi      # 0xb1d7
movl $0x9, %edx
movq %rbx, %rdi
callq 0x21f0
movl 0x10(%r14), %eax
leaq 0x2a9b(%rip), %rbp      # 0xb1c0
movb (%rax,%rbp), %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 0x2a79(%rip), %r13      # 0xb1c8
movl $0x1, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x21f0
leaq 0x8(%r14), %rsi
movq %r15, %rdi
callq 0x95ec
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x21f0
movl $0x1, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x21f0
movl 0x1c(%r14), %eax
movb (%rax,%rbp), %al
leaq 0x11(%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 %r13, %rsi
callq 0x21f0
movq (%r12), %rax
leaq 0x20(%rax), %rcx
movq %rcx, (%r12)
jmp 0x89e1
leaq 0x2a08(%rip), %rsi      # 0xb1e1
movl $0x5, %edx
movq %rbx, %rdi
callq 0x21f0
movl 0x10(%r14), %eax
leaq 0x29cf(%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 0x29ad(%rip), %r12      # 0xb1c8
movl $0x1, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x21f0
leaq 0x8(%r14), %rsi
movq %r15, %rdi
callq 0x95ec
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x21f0
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x21f0
addq $0x14, %r14
jmp 0x89d6
leaq 0x299a(%rip), %rsi      # 0xb200
movl $0xc, %edx
movq %rbx, %rdi
callq 0x21f0
leaq 0x8(%r14), %rsi
movq %r15, %rdi
callq 0x95ec
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x21f0
leaq 0x2933(%rip), %rsi      # 0xb1c8
movl $0x1, %edx
movq %rbx, %rdi
callq 0x21f0
movl 0x10(%r14), %eax
leaq 0x2913(%rip), %rcx      # 0xb1c0
movb (%rax,%rcx), %al
leaq 0x17(%rsp), %rsi
movb %al, (%rsi)
movl $0x1, %edx
jmp 0x89e8
leaq 0x2907(%rip), %rsi      # 0xb1cf
movl $0x7, %edx
movq %rbx, %rdi
callq 0x21f0
movl 0x10(%r14), %eax
leaq 0x28e0(%rip), %rcx      # 0xb1c0
movb (%rax,%rcx), %al
leaq 0xf(%rsp), %rsi
jmp 0x89a3
leaq 0x28fa(%rip), %rsi      # 0xb1ee
movl $0x6, %edx
movq %rbx, %rdi
callq 0x21f0
movl 0x10(%r14), %eax
leaq 0x28b4(%rip), %r13      # 0xb1c0
movb (%rax,%r13), %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 0x2891(%rip), %r12      # 0xb1c8
movl $0x1, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x21f0
movl 0x1c(%r14), %eax
movb (%rax,%r13), %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 %r12, %rsi
jmp 0x89cd
leaq 0x2872(%rip), %rsi      # 0xb1f5
movl $0xa, %edx
movq %rbx, %rdi
callq 0x21f0
movl 0x10(%r14), %eax
leaq 0x2825(%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 0x2803(%rip), %rsi      # 0xb1c8
movl $0x1, %edx
movq %rbx, %rdi
callq 0x21f0
addq $0x8, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x95ec
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x21f0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq