// File: /workspace/github_cpp_makefile_star2_O2/lotuskip[P]yuxtapa/server/players.cpp
// Function: init_known_players(bool)
void init_known_players(const bool nopurge)
{
	string fname = Config::get_config_dir() + playerfilename;
	ifstream file(fname.c_str(), ios_base::binary);
	if(!file)
	{
		to_log("Could not read player data; file missing or not readable.");
		return;
	}

	short numpl;
	file.read(reinterpret_cast<char*>(&numpl), sizeof(short));
	if(numpl != STAT_VERSION)
	{
		to_log("Wrong statistics version in player data! All statistics will be cleared!");
		return;
	}

	file.read(reinterpret_cast<char*>(&numpl), sizeof(short));
	if(numpl < 0 || numpl > MAX_STORED_PLAYERS)
	{
		to_log("Player datafile is corrupt! Ignoring the data!");
		return;
	}
	if(!nopurge)
		to_log("Player data contains " + lex_cast(numpl)
			+ " entries;");
	PlayerStats tmpstats;
	short sh; char ch;
	tmpstats.password[PASSW_LEN] = '\0';
	int tooold;
	if(nopurge)
		tooold = 0;
	else // statpurge is hours, tooold seconds:
		tooold = 60*60*Config::int_settings[Config::IS_STATPURGE];
	while(numpl--)
	{
		file.read(reinterpret_cast<char*>(&tmpstats.ID), sizeof(short));
		file.read(tmpstats.password, PASSW_LEN);
		file.read(reinterpret_cast<char*>(tmpstats.kills), MAX_WAY_TO_KILL*sizeof(long));
		file.read(reinterpret_cast<char*>(&tmpstats.deaths), sizeof(long));
		file.read(reinterpret_cast<char*>(&tmpstats.tks), sizeof(long));
		file.read(reinterpret_cast<char*>(&tmpstats.healing_recvd), sizeof(long));
		file.read(reinterpret_cast<char*>(&tmpstats.total_time), sizeof(long));
		file.read(reinterpret_cast<char*>(&tmpstats.time_specced), sizeof(long));
		file.read(reinterpret_cast<char*>(tmpstats.time_played), NO_CLASS*sizeof(long));
		file.read(reinterpret_cast<char*>(&tmpstats.arch_hits), sizeof(long));
		file.read(reinterpret_cast<char*>(&tmpstats.arch_shots), sizeof(long));
		file.read(reinterpret_cast<char*>(&tmpstats.cm_hits), sizeof(long));
		file.read(reinterpret_cast<char*>(&tmpstats.cm_shots), sizeof(long));
		file.read(reinterpret_cast<char*>(&tmpstats.ad_lvl), sizeof(e_AdminLvl));
		file.read(reinterpret_cast<char*>(&tmpstats.last_seen), sizeof(time_t));
		tmpstats.last_known_as.clear();
		for(file.read(reinterpret_cast<char *>(&sh), sizeof(short)); sh > 0; --sh)
		{
			file.read(reinterpret_cast<char *>(&ch), sizeof(char));
			tmpstats.last_known_as += ch;
		}
		if(!tooold || tmpstats.ad_lvl > AL_REG || (time(NULL) - tmpstats.last_seen) < tooold)
			known_players.push_back(tmpstats);
	}
	if(!nopurge)
		to_log(lex_cast(known_players.size()) + " entries accepted.");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3b8, %rsp            # imm = 0x3B8
movl %edi, %r14d
callq 0xdc2d
leaq 0x316cc(%rip), %rdx     # 0x3fed8
leaq -0x1d8(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xfe1f
movq (%rbx), %rsi
leaq -0x3e0(%rbp), %rdi
pushq $0x4
popq %rdx
callq 0x4740
movq -0x3e0(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x3c0(%rbp,%rax)
je 0xe86d
leaq 0x1800d(%rip), %rsi     # 0x26859
leaq -0x1b8(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0xb292
leaq -0x1b8(%rbp), %rdi
callq 0x10b68
jmp 0xe8ee
leaq -0x3e0(%rbp), %rdi
leaq -0x2a(%rbp), %rsi
pushq $0x2
popq %rdx
callq 0x4510
cmpw $-0x1, -0x2a(%rbp)
je 0xe8ac
leaq 0x18005(%rip), %rsi     # 0x26893
leaq -0x1b8(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0xb292
leaq -0x1b8(%rbp), %rdi
callq 0x10b68
jmp 0xe8ee
leaq -0x3e0(%rbp), %rdi
leaq -0x2a(%rbp), %rsi
pushq $0x2
popq %rdx
callq 0x4510
movzwl -0x2a(%rbp), %esi
cmpl $0x2711, %esi           # imm = 0x2711
jb 0xe924
leaq 0x1800a(%rip), %rsi     # 0x268dc
leaq -0x1b8(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0xb292
leaq -0x1b8(%rbp), %rdi
callq 0x10b68
leaq -0x1b8(%rbp), %rdi
callq 0x47e8
leaq -0x3e0(%rbp), %rdi
callq 0x4110
leaq -0x1d8(%rbp), %rdi
callq 0x47e8
addq $0x3b8, %rsp            # imm = 0x3B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb %r14b, %r14b
jne 0xe987
leaq -0x80(%rbp), %rdi
callq 0x24fde
leaq 0x17fd2(%rip), %rsi     # 0x2690b
leaq -0x58(%rbp), %rdi
leaq -0x80(%rbp), %rdx
callq 0xb332
leaq 0x17fd4(%rip), %rdx     # 0x26921
leaq -0x1b8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0xb309
leaq -0x1b8(%rbp), %rdi
callq 0x10b68
leaq -0x1b8(%rbp), %rdi
callq 0x47e8
leaq -0x58(%rbp), %rdi
callq 0x47e8
leaq -0x80(%rbp), %rdi
callq 0x47e8
leaq -0x1b8(%rbp), %rdi
callq 0xe5a4
leaq -0x1b6(%rbp), %rax
movb $0x0, 0x8(%rax)
leaq 0x30eeb(%rip), %rax     # 0x3f890
imull $0xe10, 0x24(%rax), %ecx # imm = 0xE10
xorl %eax, %eax
movl %r14d, -0x34(%rbp)
testb %r14b, %r14b
cmovnel %eax, %ecx
leaq -0x1a8(%rbp), %r14
movl %ecx, -0x38(%rbp)
movslq %ecx, %rax
movq %rax, -0x60(%rbp)
leaq -0x3e0(%rbp), %r13
pushq $0x8
popq %r15
leaq -0x2d(%rbp), %r12
pushq $0x1
popq %rbx
subw $0x1, -0x2a(%rbp)
jb 0xeb83
movq %r13, %rdi
leaq -0x1b8(%rbp), %rsi
pushq $0x2
popq %rdx
callq 0x4510
movq %r13, %rdi
leaq -0x1b6(%rbp), %rsi
movq %r15, %rdx
callq 0x4510
movq %r13, %rdi
leaq -0x180(%rbp), %rsi
pushq $0x58
popq %rdx
callq 0x4510
movq %r13, %rdi
leaq -0x188(%rbp), %rsi
movq %r15, %rdx
callq 0x4510
movq %r13, %rdi
leaq -0x128(%rbp), %rsi
movq %r15, %rdx
callq 0x4510
movq %r13, %rdi
leaq -0x120(%rbp), %rsi
movq %r15, %rdx
callq 0x4510
movq %r13, %rdi
leaq -0x118(%rbp), %rsi
movq %r15, %rdx
callq 0x4510
movq %r13, %rdi
leaq -0x110(%rbp), %rsi
movq %r15, %rdx
callq 0x4510
movq %r13, %rdi
leaq -0x108(%rbp), %rsi
pushq $0x58
popq %rdx
callq 0x4510
movq %r13, %rdi
leaq -0xb0(%rbp), %rsi
movq %r15, %rdx
callq 0x4510
movq %r13, %rdi
leaq -0xa8(%rbp), %rsi
movq %r15, %rdx
callq 0x4510
movq %r13, %rdi
leaq -0xa0(%rbp), %rsi
movq %r15, %rdx
callq 0x4510
movq %r13, %rdi
leaq -0x98(%rbp), %rsi
movq %r15, %rdx
callq 0x4510
movq %r13, %rdi
leaq -0x88(%rbp), %rsi
pushq $0x4
popq %rdx
callq 0x4510
movq %r13, %rdi
leaq -0x90(%rbp), %rsi
movq %r15, %rdx
callq 0x4510
andq $0x0, -0x1a0(%rbp)
movq -0x1a8(%rbp), %rax
movb $0x0, (%rax)
movq %r13, %rdi
leaq -0x2c(%rbp), %rsi
pushq $0x2
popq %rdx
callq 0x4510
movzwl -0x2c(%rbp), %eax
testw %ax, %ax
jle 0xeb44
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x4510
movsbl -0x2d(%rbp), %esi
movq %r14, %rdi
callq 0x4340
movzwl -0x2c(%rbp), %eax
decl %eax
movw %ax, -0x2c(%rbp)
jmp 0xeb19
cmpl $0x0, -0x38(%rbp)
je 0xeb6b
cmpl $0x1, -0x88(%rbp)
jg 0xeb6b
xorl %edi, %edi
callq 0x43c0
subq -0x90(%rbp), %rax
cmpq -0x60(%rbp), %rax
jge 0xe9db
leaq 0x31526(%rip), %rdi     # 0x40098
leaq -0x1b8(%rbp), %rsi
callq 0xfe58
jmp 0xe9db
cmpb $0x0, -0x34(%rbp)
jne 0xebc7
movl 0x31519(%rip), %esi     # 0x400a8
leaq -0x80(%rbp), %rdi
callq 0x24fde
leaq 0x17d8c(%rip), %rdx     # 0x2692b
leaq -0x58(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0xb309
leaq -0x58(%rbp), %rdi
callq 0x10b68
leaq -0x58(%rbp), %rdi
callq 0x47e8
leaq -0x80(%rbp), %rdi
callq 0x47e8
movq %r14, %rdi
jmp 0xe8f5
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x47e8
jmp 0xebe0
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x47e8
jmp 0xec3e
jmp 0xec3b
movq %rax, %rbx
leaq -0x1b8(%rbp), %rdi
callq 0x47e8
jmp 0xec01
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x47e8
jmp 0xec0f
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
jmp 0xec41
jmp 0xec2f
jmp 0xec2f
jmp 0xec23
jmp 0xec2f
jmp 0xec23
jmp 0xec2f
jmp 0xec2f
movq %rax, %rbx
leaq -0x1b8(%rbp), %rdi
jmp 0xec41
movq %rax, %rbx
jmp 0xec46
movq %rax, %rbx
jmp 0xec52
jmp 0xec3b
movq %rax, %rbx
movq %r14, %rdi
callq 0x47e8
leaq -0x3e0(%rbp), %rdi
callq 0x4110
leaq -0x1d8(%rbp), %rdi
callq 0x47e8
movq %rbx, %rdi
callq 0x4710