// File: /workspace/github_cpp_makefile_star2_O2/lotuskip[P]yuxtapa/server/game.cpp
// Function: Game::next_map(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void Game::next_map(const string &loadmap)
{
	// "fast-kill" all players and record playing times:
	for(list<Player>::iterator it = cur_players.begin();
		it != cur_players.end(); ++it)
	{
		if(it->is_alive())
		{
			it->cl_props.hp = it->doing_a_chore = 0;
			it->poisoner = cur_players.end();
			it->stats_i->time_played[it->cl] += time(NULL)
				- it->last_switched_cl;
		}
		else if(it->team == T_SPEC)
			it->stats_i->time_specced += time(NULL) - it->last_switched_cl;
		time(&(it->last_switched_cl));
		send_full_state_refresh(it);
	}
	// Clear EVERYTHING: (the rest of EVERYTHING is cleared in do_placement)
	axn_indicators.clear();
	event_set.clear();
	reg_sounds.clear();
	voices.clear();
	fball_centers.clear();

	construct_team_msgs(cur_players.end());
	send_team_upds(cur_players.end());

	write_player_stats();

	// ready for next map generation:
	if(loadmap.empty())
		init_phase = IPH_GEN_MAP;
	else if(!curmap->load_from_file(loadmap))
	{
		Network::to_chat("Could not load map by name \'" + loadmap + "\'!");
		init_phase = IPH_GEN_MAP;
	}
	else // no need to generate map!
	{
		Network::to_chat("Loaded map \'" + loadmap + "\'.");
		init_phase = IPH_GENERALS;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, -0x30(%rbp)
leaq 0x2b204(%rip), %r15     # 0x400b0
xorl %r12d, %r12d
movl $0xc0, %r13d
movl $0xb8, %ebx
movq %r15, %r14
movq (%r14), %r14
cmpq %r15, %r14
je 0x14f4e
leaq 0x10(%r14), %rdi
callq 0xe68e
testb %al, %al
je 0x14f10
movb %r12b, 0x142(%r14)
movb %r12b, 0x153(%r14)
movq %r15, 0x160(%r14)
xorl %edi, %edi
callq 0x43c0
subq 0xc8(%r14), %rax
movl 0xc0(%r14), %ecx
shlq $0x3, %rcx
addq 0x90(%r14), %rcx
addq %r13, %rcx
jmp 0x14f32
cmpl $0x2, 0xbc(%r14)
jne 0x14f35
xorl %edi, %edi
callq 0x43c0
subq 0xc8(%r14), %rax
movq 0x90(%r14), %rcx
addq %rbx, %rcx
addq %rax, (%rcx)
leaq 0xc8(%r14), %rdi
callq 0x43c0
movq %r14, %rdi
callq 0x15092
jmp 0x14ebd
leaq 0x2dfcb(%rip), %rdi     # 0x42f20
callq 0x18132
leaq 0x2e067(%rip), %rdi     # 0x42fc8
callq 0x181ce
leaq 0x2dfe3(%rip), %rdi     # 0x42f50
callq 0x1826a
leaq 0x2e007(%rip), %rdi     # 0x42f80
callq 0x18306
leaq 0x2e02b(%rip), %rdi     # 0x42fb0
callq 0x17d6a
leaq 0x2b11f(%rip), %r14     # 0x400b0
movq %r14, %rdi
callq 0x150cc
movq %r14, %rdi
callq 0x152e9
callq 0xed63
xorl %ebx, %ebx
movq -0x30(%rbp), %r15
cmpq $0x0, 0x8(%r15)
je 0x15057
movq 0x2cc9a(%rip), %rdi     # 0x41c58
movq %r15, %rsi
callq 0x12aec
testb %al, %al
je 0x15013
leaq 0x13f9b(%rip), %rsi     # 0x28f6c
leaq -0x70(%rbp), %r14
movq %r14, %rdi
movq %r15, %rdx
callq 0xde6a
leaq 0x1166c(%rip), %rdx     # 0x26653
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0xb309
leaq -0x50(%rbp), %rdi
callq 0xc248
leaq -0x50(%rbp), %rdi
callq 0x47e8
leaq -0x70(%rbp), %rdi
callq 0x47e8
pushq $0x1
popq %rbx
jmp 0x15057
leaq 0x13f35(%rip), %rsi     # 0x28f4f
leaq -0x70(%rbp), %r14
movq %r14, %rdi
movq %r15, %rdx
callq 0xde6a
leaq 0x1a800(%rip), %rdx     # 0x2f830
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0xb309
leaq -0x50(%rbp), %rdi
callq 0xc248
leaq -0x50(%rbp), %rdi
callq 0x47e8
leaq -0x70(%rbp), %rdi
callq 0x47e8
movl %ebx, 0x2cc03(%rip)     # 0x41c60
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1506e
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x47e8
jmp 0x15081
jmp 0x1507e
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x47e8
movq %rbx, %rdi
callq 0x4710