// File: /workspace/github_cpp_makefile_star2_O3/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, -0x70(%rbp)
leaq 0x29834(%rip), %r15     # 0x430c0
movq (%r15), %r14
cmpq %r15, %r14
je 0x19932
xorl %r12d, %r12d
movl $0xc0, %r13d
movl $0xb8, %ebx
leaq 0x10(%r14), %rdi
callq 0x12496
testb %al, %al
je 0x198ed
movb %r12b, 0x142(%r14)
movb %r12b, 0x153(%r14)
movq %r15, 0x160(%r14)
xorl %edi, %edi
callq 0x43b0
subq 0xc8(%r14), %rax
movl 0xc0(%r14), %ecx
shlq $0x3, %rcx
addq 0x90(%r14), %rcx
addq %r13, %rcx
jmp 0x1990f
cmpl $0x2, 0xbc(%r14)
jne 0x19912
xorl %edi, %edi
callq 0x43b0
subq 0xc8(%r14), %rax
movq 0x90(%r14), %rcx
addq %rbx, %rcx
addq %rax, (%rcx)
leaq 0xc8(%r14), %rdi
callq 0x43b0
movq %r14, %rdi
callq 0x19b5d
movq (%r14), %r14
cmpq %r15, %r14
jne 0x198a6
leaq 0x2c5f7(%rip), %rdi     # 0x45f30
callq 0x1d7d6
leaq 0x2c693(%rip), %rdi     # 0x45fd8
callq 0x1d85c
leaq 0x2c60f(%rip), %rdi     # 0x45f60
callq 0x1d8e2
leaq 0x2c633(%rip), %rdi     # 0x45f90
callq 0x1d968
leaq 0x2c657(%rip), %r14     # 0x45fc0
movq %r14, %rdi
callq 0x1da22
movq %r14, 0x8(%r14)
movq %r14, (%r14)
movq $0x0, 0x10(%r14)
leaq 0x29739(%rip), %r14     # 0x430c0
movq %r14, %rdi
callq 0x19b97
movq %r14, %rdi
callq 0x19e31
callq 0x12e2b
xorl %r15d, %r15d
movq -0x70(%rbp), %rbx
cmpq $0x0, 0x8(%rbx)
je 0x19b05
movq 0x2b2b3(%rip), %rdi     # 0x44c68
movq %rbx, %rsi
callq 0x17530
testb %al, %al
je 0x19a0a
leaq 0x1556b(%rip), %rsi     # 0x2ef33
leaq -0x68(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rdx
callq 0x11c74
leaq 0x12c10(%rip), %rsi     # 0x2c5ee
movq %r14, %rdi
callq 0x47b0
leaq -0x38(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x19a53
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x19a5a
leaq 0x15505(%rip), %rsi     # 0x2ef16
leaq -0x68(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rdx
callq 0x11c74
leaq 0x1bdb6(%rip), %rsi     # 0x357dd
movq %r14, %rdi
callq 0x47b0
leaq -0x38(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x19ab0
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x19ab7
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq -0x48(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0xf579
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x19a8f
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x19aa8
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x43f0
movl $0x1, %r15d
jmp 0x19b05
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq -0x48(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0xf579
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x19aec
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x19b05
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x43f0
movl %r15d, 0x2b164(%rip)    # 0x44c70
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x19b1d
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x19b3c
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x19b3c
jmp 0x19b39
movq %rax, %rbx
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x19b55
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4740