// File: FakePsyho[P]halite2/hlt/hlt_in.hpp
// Function: hlt::in::parse_planet(std::istream&)
static std::pair<EntityId, Planet> parse_planet(std::istream& iss) {
            Planet planet;

            iss >> planet.entity_id;
            iss >> planet.location.pos_x;
            iss >> planet.location.pos_y;
            iss >> planet.health;
            iss >> planet.radius;
            iss >> planet.docking_spots;
            iss >> planet.current_production;
            iss >> planet.remaining_production;

            int owned;
            iss >> owned;
            if (owned == 1) {
                planet.owned = true;
                int owner;
                iss >> owner;
                planet.owner_id = static_cast<PlayerId>(owner);
            } else {
                planet.owned = false;
                int false_owner;
                iss >> false_owner;
                planet.owner_id = -1;
            }

            unsigned int num_docked_ships;
            iss >> num_docked_ships;

            planet.docked_ships.reserve(num_docked_ships);
            for (unsigned int i = 0; i < num_docked_ships; ++i) {
                EntityId ship_id;
                iss >> ship_id;
                planet.docked_ships.push_back(ship_id);
            }

            return std::make_pair(planet.entity_id, planet);
        }

// Assembly:
subq $0xf8, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0xf0(%rsp)
movq %rsi, 0xe8(%rsp)
leaq 0x48(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x39fe0
movq 0x18(%rsp), %rsi
movq 0xe8(%rsp), %rdi
callq 0x3060
jmp 0x39687
movq 0xe8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x3210
jmp 0x3969b
movq 0xe8(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x3210
jmp 0x396af
movq 0xe8(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x3170
jmp 0x396c6
movq 0xe8(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x3210
jmp 0x396dd
movq 0xe8(%rsp), %rdi
leaq 0xcc(%rsp), %rsi
callq 0x3060
jmp 0x396f4
movq 0xe8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x3170
jmp 0x3970b
movq 0xe8(%rsp), %rdi
leaq 0xc4(%rsp), %rsi
callq 0x3170
jmp 0x39722
movq 0xe8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x3170
jmp 0x39736
cmpl $0x1, 0x38(%rsp)
jne 0x39780
movb $0x1, 0xc0(%rsp)
movq 0xe8(%rsp), %rdi
leaq 0x34(%rsp), %rsi
callq 0x3170
jmp 0x39759
movl 0x34(%rsp), %eax
movl %eax, 0x4c(%rsp)
jmp 0x397a4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x1ea10
jmp 0x39841
movb $0x0, 0xc0(%rsp)
movq 0xe8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x3170
jmp 0x3979c
movl $0xffffffff, 0x4c(%rsp) # imm = 0xFFFFFFFF
movq 0xe8(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
callq 0x3060
jmp 0x397b8
leaq 0xd0(%rsp), %rdi
movl 0x2c(%rsp), %eax
movl %eax, %esi
callq 0x3a010
jmp 0x397cd
movl $0x0, 0x28(%rsp)
movl 0x28(%rsp), %eax
cmpl 0x2c(%rsp), %eax
jae 0x39816
movq 0xe8(%rsp), %rdi
leaq 0x24(%rsp), %rsi
callq 0x3060
jmp 0x397f3
leaq 0xd0(%rsp), %rdi
leaq 0x24(%rsp), %rsi
callq 0x15be0
jmp 0x39807
jmp 0x39809
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x397d5
movq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
movq %rdx, %rsi
callq 0x3a120
jmp 0x3982a
leaq 0x48(%rsp), %rdi
callq 0x1ea10
movq 0x10(%rsp), %rax
addq $0xf8, %rsp
retq
movq 0x40(%rsp), %rdi
callq 0x3440
nopl (%rax,%rax)