// File: /workspace/github_cpp_makefile_star2_O1/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 0x29700(%rip), %r15     # 0x430c0
movq (%r15), %r14
cmpq %r15, %r14
je 0x19a66
xorl %r12d, %r12d
movl $0xc0, %r13d
movl $0xb8, %ebx
leaq 0x10(%r14), %rdi
callq 0x125e6
testb %al, %al
je 0x19a21
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 0x19a43
cmpl $0x2, 0xbc(%r14)
jne 0x19a46
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 0x19c91
movq (%r14), %r14
cmpq %r15, %r14
jne 0x199da
leaq 0x2c4c3(%rip), %rdi     # 0x45f30
callq 0x1d986
leaq 0x2c55f(%rip), %rdi     # 0x45fd8
callq 0x1da0c
leaq 0x2c4db(%rip), %rdi     # 0x45f60
callq 0x1da92
leaq 0x2c4ff(%rip), %rdi     # 0x45f90
callq 0x1db18
leaq 0x2c523(%rip), %r14     # 0x45fc0
movq %r14, %rdi
callq 0x1dbd2
movq %r14, 0x8(%r14)
movq %r14, (%r14)
movq $0x0, 0x10(%r14)
leaq 0x29605(%rip), %r14     # 0x430c0
movq %r14, %rdi
callq 0x19ccb
movq %r14, %rdi
callq 0x19f7b
callq 0x12f71
xorl %r15d, %r15d
movq -0x70(%rbp), %rbx
cmpq $0x0, 0x8(%rbx)
je 0x19c39
movq 0x2b17f(%rip), %rdi     # 0x44c68
movq %rbx, %rsi
callq 0x17664
testb %al, %al
je 0x19b3e
leaq 0x15437(%rip), %rsi     # 0x2ef33
leaq -0x68(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rdx
callq 0x11dd6
leaq 0x12adc(%rip), %rsi     # 0x2c5ee
movq %r14, %rdi
callq 0x47c0
leaq -0x38(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x19b87
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x19b8e
leaq 0x153d1(%rip), %rsi     # 0x2ef16
leaq -0x68(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rdx
callq 0x11dd6
leaq 0x1bc92(%rip), %rsi     # 0x357ed
movq %r14, %rdi
callq 0x47c0
leaq -0x38(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x19be4
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x19beb
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 0xf676
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x19bc3
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x19bdc
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x43f0
movl $0x1, %r15d
jmp 0x19c39
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 0xf676
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x19c20
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x19c39
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x43f0
movl %r15d, 0x2b030(%rip)    # 0x44c70
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x19c51
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x19c70
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x19c70
jmp 0x19c6d
movq %rax, %rbx
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x19c89
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4750