// File: lotuskip[P]yuxtapa/server/game.cpp
// Function: Game::start()
void Game::start()
{
	// It is possible that !nextmap is forced by a player before
	// the map is ready. Hence this check:
	while(init_phase != IPH_DONE)
		init_game();

	// Base maptime is [n] minutes where n depends on gamemode:
	map_over_turn = game_mode_mins[gamemode]
		*60*1000/Config::int_settings[Config::IS_TURNMS];
	// But we enforce a lower/upper limit dependent on map size:
	if(map_over_turn < 14*curmap->get_size())
		map_over_turn = 14*curmap->get_size();
	// (The range here is roughly 2--30 minutes on normal settings.)
	else if(map_over_turn > 15*curmap->get_size() + 2900)
		map_over_turn = 15*curmap->get_size() + 2900;
	// (And here roughly 14--44 minutes)
	
	if(gamemode == GM_STEAL)
		objective_str.erase(5); /* leaving just "Steal"; from now on the
		sector is given in the status string */

	send_times(cur_players.end());
	send_team_upds(cur_players.end());
	send_flag_upds(cur_players.end());
	for(list<Player>::iterator it = cur_players.begin();
		it != cur_players.end(); ++it)
	{
		// reduce intermission time from total time spent on server:
		it->stats_i->last_seen += time(NULL) - it->last_switched_cl;
		time(&(it->last_switched_cl));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
cmpl $0x6, 0x59e91(%rip)     # 0x91de0
je 0x37f58
callq 0x37600
jmp 0x37f48
movl 0x59436(%rip), %eax     # 0x91394
movl %eax, %ecx
leaq 0x2bfbd(%rip), %rax     # 0x63f24
movsbl (%rax,%rcx), %eax
imull $0x3c, %eax, %eax
imull $0x3e8, %eax, %eax      # imm = 0x3E8
leaq 0x57a95(%rip), %rcx     # 0x8fa10
xorl %edx, %edx
divl 0x14(%rcx)
movw %ax, 0x5560d(%rip)      # 0x8d594
movzwl 0x55606(%rip), %eax     # 0x8d594
movl %eax, -0x44(%rbp)
movq 0x59e40(%rip), %rdi     # 0x91dd8
callq 0x3c930
movw %ax, %cx
movl -0x44(%rbp), %eax
movswl %cx, %ecx
imull $0xe, %ecx, %ecx
cmpl %ecx, %eax
jge 0x37fc6
movq 0x59e24(%rip), %rdi     # 0x91dd8
callq 0x3c930
cwtl
imull $0xe, %eax, %eax
movw %ax, 0x555d0(%rip)      # 0x8d594
jmp 0x38010
movzwl 0x555c7(%rip), %eax     # 0x8d594
movl %eax, -0x48(%rbp)
movq 0x59e01(%rip), %rdi     # 0x91dd8
callq 0x3c930
movw %ax, %cx
movl -0x48(%rbp), %eax
movswl %cx, %ecx
imull $0xf, %ecx, %ecx
addl $0xb54, %ecx            # imm = 0xB54
cmpl %ecx, %eax
jle 0x3800e
movq 0x59ddf(%rip), %rdi     # 0x91dd8
callq 0x3c930
cwtl
imull $0xf, %eax, %eax
addl $0xb54, %eax            # imm = 0xB54
movw %ax, 0x55586(%rip)      # 0x8d594
jmp 0x38010
cmpl $0x2, 0x5937d(%rip)     # 0x91394
jne 0x38031
leaq 0x59d90(%rip), %rdi     # 0x91db0
movl $0x5, %esi
movq $-0x1, %rdx
callq 0x5120
leaq 0x581f8(%rip), %rdi     # 0x90230
callq 0x189f0
movq %rax, -0x10(%rbp)
leaq -0x8(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x18a20
movq -0x8(%rbp), %rdi
callq 0x38160
leaq 0x581d2(%rip), %rdi     # 0x90230
callq 0x189f0
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x18a20
movq -0x18(%rbp), %rdi
callq 0x36ce0
leaq 0x581ac(%rip), %rdi     # 0x90230
callq 0x189f0
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x18a20
movq -0x28(%rbp), %rdi
callq 0x38370
leaq 0x58186(%rip), %rdi     # 0x90230
callq 0x1b360
movq %rax, -0x38(%rbp)
leaq 0x58176(%rip), %rdi     # 0x90230
callq 0x189f0
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x1b100
testb $0x1, %al
jne 0x380d6
jmp 0x3814e
xorl %eax, %eax
movl %eax, %edi
callq 0x54c0
movq %rax, -0x58(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x1b050
movq %rax, %rcx
movq -0x58(%rbp), %rax
subq 0xb8(%rcx), %rax
movq %rax, -0x50(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x1b050
movq %rax, %rdi
addq $0x80, %rdi
callq 0x1b390
movq -0x50(%rbp), %rcx
addq 0x128(%rax), %rcx
movq %rcx, 0x128(%rax)
leaq -0x38(%rbp), %rdi
callq 0x1b050
movq %rax, %rdi
addq $0xb8, %rdi
callq 0x54c0
leaq -0x38(%rbp), %rdi
callq 0x1b3c0
jmp 0x380b3
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)