// File: 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
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq %rax, -0x30(%rbp)
subq $0x7, %rax
ja 0x1e3dc
movq -0x30(%rbp), %rax
leaq 0x6171(%rip), %rcx      # 0x2422c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
leaq 0x6187(%rip), %rsi      # 0x24256
callq 0x3220
jmp 0x1e3dc
movq -0x8(%rbp), %rdi
leaq 0x6177(%rip), %rsi      # 0x2425b
callq 0x3220
movq %rax, %rdi
movq -0x10(%rbp), %rsi
addq $0xc, %rsi
callq 0x1dc20
movq %rax, %rdi
leaq 0x6151(%rip), %rsi      # 0x24254
callq 0x3220
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x1f240
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x3200
jmp 0x1e3dc
movq -0x8(%rbp), %rdi
leaq 0x612a(%rip), %rsi      # 0x24263
callq 0x3220
movq %rax, %rdi
movq -0x10(%rbp), %rsi
addq $0xc, %rsi
callq 0x1dc20
movq %rax, %rdi
leaq 0x60fc(%rip), %rsi      # 0x24254
callq 0x3220
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x1f240
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x3200
movq -0x8(%rbp), %rdi
leaq 0x60cb(%rip), %rsi      # 0x24254
callq 0x3220
movq %rax, %rdi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
callq 0x1dc20
movq %rax, %rdi
leaq 0x60ac(%rip), %rsi      # 0x24254
callq 0x3220
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x1f2e0
movq %rax, -0x28(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x1f320
movq -0x40(%rbp), %rdi
movq %rax, %rsi
callq 0x3200
jmp 0x1e3dc
movq -0x8(%rbp), %rdi
leaq 0x6088(%rip), %rsi      # 0x2426d
callq 0x3220
movq %rax, %rdi
movq -0x10(%rbp), %rsi
addq $0xc, %rsi
callq 0x1dc20
movq %rax, %rdi
leaq 0x6050(%rip), %rsi      # 0x24254
callq 0x3220
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x1f240
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0x3200
movq %rax, %rdi
leaq 0x6020(%rip), %rsi      # 0x24254
callq 0x3220
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x14, %rsi
callq 0x1f240
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x3200
jmp 0x1e3dc
movq -0x8(%rbp), %rdi
leaq 0x6005(%rip), %rsi      # 0x24273
callq 0x3220
movq %rax, %rdi
movq -0x10(%rbp), %rsi
addq $0xc, %rsi
callq 0x1dc20
movq %rax, %rdi
leaq 0x5fc7(%rip), %rsi      # 0x24254
callq 0x3220
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x1f240
movq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0x3200
jmp 0x1e3dc
movq -0x8(%rbp), %rdi
leaq 0x5fb7(%rip), %rsi      # 0x2427a
callq 0x3220
movq %rax, %rdi
movq -0x10(%rbp), %rsi
addq $0xc, %rsi
callq 0x1dc20
movq %rax, %rdi
leaq 0x5f72(%rip), %rsi      # 0x24254
callq 0x3220
movq %rax, %rdi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
callq 0x1dc20
movq -0x8(%rbp), %rdi
leaq 0x5f52(%rip), %rsi      # 0x24254
callq 0x3220
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x1f240
movq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0x3200
jmp 0x1e3dc
movq -0x8(%rbp), %rdi
leaq 0x5f49(%rip), %rsi      # 0x24281
callq 0x3220
movq %rax, %rdi
movq -0x10(%rbp), %rsi
addq $0xc, %rsi
callq 0x1dc20
movq %rax, %rdi
leaq 0x5efd(%rip), %rsi      # 0x24254
callq 0x3220
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x1f240
movq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x3200
jmp 0x1e3dc
movq -0x8(%rbp), %rdi
leaq 0x5f02(%rip), %rsi      # 0x2428c
callq 0x3220
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x1f240
movq -0x78(%rbp), %rdi
movq %rax, %rsi
callq 0x3200
movq -0x8(%rbp), %rdi
leaq 0x5e99(%rip), %rsi      # 0x24254
callq 0x3220
movq %rax, %rdi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, %ecx
leaq 0x5e79(%rip), %rax      # 0x2424c
movsbl (%rax,%rcx), %esi
callq 0x32c0
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)