// File: FakePsyho[P]halite2/MyBot.cpp
// Function: getSpawningTimes(hlt::Planet&, int)
VI getSpawningTimes(Planet &p, int max_turns = 20) {
	VI docked;
	for (EntityId& eid : p.docked_ships) {
		const Ship& ship = m.get_ship(p.owner_id, eid);
		if (ship.docking_status == ShipDockingStatus::Docked) {
			docked.PB(0);
		} else if (ship.docking_status == ShipDockingStatus::Docking) {
			docked.PB(ship.docking_progress - 1);
		}
	}
	
	if (docked.empty()) return VI();
		
	VI rv;
	int v = p.current_production;
	FOR(t, 1, max_turns+1) {
		REP(i, docked.S) {
			if (docked[i]) {
				docked[i]--;
			} else {
				v += BASE_PRODUCTIVITY;
			}
		}
		if (v >= 72) {
			rv.PB(t);
			v -= 72;
		}
	}
	return rv;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movl %edx, 0x94(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x130a0
movq 0x98(%rsp), %rax
addq $0x88, %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rdi
callq 0x130b0
movq %rax, 0x68(%rsp)
movq 0x70(%rsp), %rdi
callq 0x130e0
movq %rax, 0x60(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x13110
testb $0x1, %al
jne 0x493e
jmp 0x49f7
leaq 0x68(%rsp), %rdi
callq 0x13150
movq %rax, 0x58(%rsp)
movq 0x98(%rsp), %rax
movl 0x4(%rax), %esi
movq 0x58(%rsp), %rax
movl (%rax), %edx
leaq 0x4d3c2(%rip), %rdi     # 0x51d28
callq 0x13160
movq %rax, 0x10(%rsp)
jmp 0x4972
movq 0x10(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
cmpl $0x2, 0x7c(%rax)
jne 0x49b5
movl $0x0, 0x40(%rsp)
leaq 0x78(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x131d0
jmp 0x49a0
jmp 0x49e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0x4b65
movq 0x50(%rsp), %rax
cmpl $0x1, 0x7c(%rax)
jne 0x49e4
movq 0x50(%rsp), %rax
movl 0x80(%rax), %eax
decl %eax
movl %eax, 0x3c(%rsp)
leaq 0x78(%rsp), %rdi
leaq 0x3c(%rsp), %rsi
callq 0x131d0
jmp 0x49e2
jmp 0x49e4
jmp 0x49e6
jmp 0x49e8
leaq 0x68(%rsp), %rdi
callq 0x13200
jmp 0x4926
leaq 0x78(%rsp), %rdi
callq 0x13220
testb $0x1, %al
jne 0x4a07
jmp 0x4a2f
movq 0x18(%rsp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x3150
movq 0x18(%rsp), %rdi
callq 0x130a0
movl $0x1, 0x38(%rsp)
jmp 0x4b4e
movq 0x18(%rsp), %rdi
movb $0x0, 0x37(%rsp)
callq 0x130a0
movq 0x98(%rsp), %rax
movl 0x80(%rax), %eax
movl %eax, 0x30(%rsp)
movl $0x1, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movl 0x94(%rsp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0x4b2e
movl $0x0, 0x28(%rsp)
movslq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x13270
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0x4add
movslq 0x28(%rsp), %rsi
leaq 0x78(%rsp), %rdi
callq 0x13290
cmpl $0x0, (%rax)
je 0x4ac3
movslq 0x28(%rsp), %rsi
leaq 0x78(%rsp), %rdi
callq 0x13290
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
jmp 0x4ace
movl 0x30(%rsp), %eax
addl $0x6, %eax
movl %eax, 0x30(%rsp)
jmp 0x4ad0
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x4a76
cmpl $0x48, 0x30(%rsp)
jl 0x4b1c
movq 0x18(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
callq 0x132b0
jmp 0x4af5
movl 0x30(%rsp), %eax
subl $0x48, %eax
movl %eax, 0x30(%rsp)
jmp 0x4b1c
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
callq 0x13320
jmp 0x4b65
jmp 0x4b1e
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x4a58
movb $0x1, 0x37(%rsp)
movl $0x1, 0x38(%rsp)
testb $0x1, 0x37(%rsp)
jne 0x4b4c
movq 0x18(%rsp), %rdi
callq 0x13320
jmp 0x4b4e
leaq 0x78(%rsp), %rdi
callq 0x13320
movq 0x20(%rsp), %rax
addq $0xa8, %rsp
retq
leaq 0x78(%rsp), %rdi
callq 0x13320
movq 0x48(%rsp), %rdi
callq 0x3440
nopl (%rax)