// File: /workspace/github_cpp_makefile_star2_O3/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, %r12d
callq 0x11983
leaq 0x3087c(%rip), %rdx     # 0x42ee8
leaq -0x1d8(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x146ff
movq (%rbx), %rsi
leaq -0x3e0(%rbp), %rdi
movl $0x4, %edx
callq 0x4770
movq -0x3e0(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x3c0(%rbp,%rax)
je 0x126dd
leaq -0x1a8(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x1a16b(%rip), %rsi     # 0x2c824
leaq 0x1a19d(%rip), %rdx     # 0x2c85d
leaq -0x1b8(%rbp), %rdi
callq 0xe01c
leaq -0x1b8(%rbp), %rdi
callq 0x14f24
jmp 0x12782
leaq -0x3e0(%rbp), %rdi
leaq -0x2a(%rbp), %rsi
movl $0x2, %edx
callq 0x4510
cmpw $-0x1, -0x2a(%rbp)
je 0x1272c
leaq -0x1a8(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x1a153(%rip), %rsi     # 0x2c85e
leaq 0x1a194(%rip), %rdx     # 0x2c8a6
leaq -0x1b8(%rbp), %rdi
callq 0xe01c
leaq -0x1b8(%rbp), %rdi
callq 0x14f24
jmp 0x12782
leaq -0x3e0(%rbp), %rdi
leaq -0x2a(%rbp), %rsi
movl $0x2, %edx
callq 0x4510
movzwl -0x2a(%rbp), %ebx
cmpl $0x2711, %ebx           # imm = 0x2711
jb 0x127da
leaq -0x1a8(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x1a144(%rip), %rsi     # 0x2c8a7
leaq 0x1a16b(%rip), %rdx     # 0x2c8d5
leaq -0x1b8(%rbp), %rdi
callq 0xe01c
leaq -0x1b8(%rbp), %rdi
callq 0x14f24
movq -0x1b8(%rbp), %rdi
cmpq %r14, %rdi
je 0x1279d
movq -0x1a8(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq -0x3e0(%rbp), %rdi
callq 0x40f0
leaq -0x1c8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x127c8
movq -0x1c8(%rbp), %rsi
incq %rsi
callq 0x43f0
addq $0x3b8, %rsp            # imm = 0x3B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb %r12b, %r12b
jne 0x128fe
leaq -0x78(%rbp), %rdi
movl %ebx, %esi
callq 0x2ba03
leaq 0x1a0e1(%rip), %rcx     # 0x2c8d6
leaq -0x78(%rbp), %rdi
movl $0x15, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x4440
leaq -0x48(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1282c
movq %rdx, -0x58(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x48(%rbp)
jmp 0x12833
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq -0x58(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1a097(%rip), %rsi     # 0x2c8ec
callq 0x47b0
leaq -0x1a8(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x12887
movq %rdx, -0x1b8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x1a8(%rbp)
jmp 0x1288e
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq -0x1b8(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x14f24
movq -0x1b8(%rbp), %rdi
cmpq %r15, %rdi
je 0x128cc
movq -0x1a8(%rbp), %rsi
incq %rsi
callq 0x43f0
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x128e1
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x128fa
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x43f0
movzwl -0x2a(%rbp), %ebx
movl %r12d, -0x34(%rbp)
leaq -0x198(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
xorl %r14d, %r14d
movb %r14b, (%rax)
leaq -0x188(%rbp), %r15
movl $0x0, 0x100(%r15)
movl $0xf8, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x4200
movb %r14b, -0x26(%r15)
leaq 0x2ff59(%rip), %rax     # 0x428a0
movl 0x24(%rax), %eax
subw $0x1, %bx
movw %bx, -0x2a(%rbp)
jb 0x12b57
leaq -0x1a8(%rbp), %r15
imull $0xe10, %eax, %ebx      # imm = 0xE10
cmpb $0x0, -0x34(%rbp)
cmovnel %r14d, %ebx
movslq %ebx, %rax
movq %rax, -0x80(%rbp)
leaq -0x3e0(%rbp), %r13
leaq -0x1b8(%rbp), %r12
leaq -0x2d(%rbp), %r14
movl $0x2, %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x4510
movl $0x8, %edx
movq %r13, %rdi
leaq -0x1b6(%rbp), %rsi
callq 0x4510
movl $0x58, %edx
movq %r13, %rdi
leaq -0x180(%rbp), %rsi
callq 0x4510
movl $0x8, %edx
movq %r13, %rdi
leaq -0x188(%rbp), %rsi
callq 0x4510
movl $0x8, %edx
movq %r13, %rdi
leaq -0x128(%rbp), %rsi
callq 0x4510
movl $0x8, %edx
movq %r13, %rdi
leaq -0x120(%rbp), %rsi
callq 0x4510
movl $0x8, %edx
movq %r13, %rdi
leaq -0x118(%rbp), %rsi
callq 0x4510
movl $0x8, %edx
movq %r13, %rdi
leaq -0x110(%rbp), %rsi
callq 0x4510
movl $0x58, %edx
movq %r13, %rdi
leaq -0x108(%rbp), %rsi
callq 0x4510
movl $0x8, %edx
movq %r13, %rdi
leaq -0xb0(%rbp), %rsi
callq 0x4510
movl $0x8, %edx
movq %r13, %rdi
leaq -0xa8(%rbp), %rsi
callq 0x4510
movl $0x8, %edx
movq %r13, %rdi
leaq -0xa0(%rbp), %rsi
callq 0x4510
movl $0x8, %edx
movq %r13, %rdi
leaq -0x98(%rbp), %rsi
callq 0x4510
movl $0x4, %edx
movq %r13, %rdi
leaq -0x88(%rbp), %rsi
callq 0x4510
movl $0x8, %edx
movq %r13, %rdi
leaq -0x90(%rbp), %rsi
callq 0x4510
movq $0x0, -0x1a0(%rbp)
movq -0x1a8(%rbp), %rax
movb $0x0, (%rax)
movl $0x2, %edx
movq %r13, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x4510
cmpw $0x0, -0x2c(%rbp)
jle 0x12b06
movl $0x1, %edx
movq %r13, %rdi
movq %r14, %rsi
callq 0x4510
movsbl -0x2d(%rbp), %esi
movq %r15, %rdi
callq 0x4340
movzwl -0x2c(%rbp), %eax
decl %eax
movw %ax, -0x2c(%rbp)
testw %ax, %ax
jg 0x12adb
testl %ebx, %ebx
je 0x12b27
cmpl $0x1, -0x88(%rbp)
jg 0x12b27
xorl %edi, %edi
callq 0x43b0
subq -0x90(%rbp), %rax
cmpq -0x80(%rbp), %rax
jge 0x12b4c
leaq 0x3057a(%rip), %rdi     # 0x430a8
movq %r12, %rsi
callq 0x14858
movq %rax, %rdi
leaq 0x30568(%rip), %rsi     # 0x430a8
callq 0x4060
incq 0x3056c(%rip)           # 0x430b8
subw $0x1, -0x2a(%rbp)
jae 0x12986
cmpb $0x0, -0x34(%rbp)
jne 0x12bf9
movl 0x30551(%rip), %esi     # 0x430b8
leaq -0x78(%rbp), %rdi
callq 0x2ba03
leaq 0x19d7f(%rip), %rsi     # 0x2c8f6
leaq -0x78(%rbp), %rdi
callq 0x47b0
leaq -0x48(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x12ba4
movq %rdx, -0x58(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x48(%rbp)
jmp 0x12bab
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq -0x58(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x14f24
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x12be0
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12bf9
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x43f0
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
je 0x1279d
movq -0x198(%rbp), %rsi
jmp 0x12795
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x12c39
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x12c39
movq %rax, %rbx
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12ce3
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x12ce3
jmp 0x12ce0
movq %rax, %rbx
movq -0x1b8(%rbp), %rdi
cmpq %r15, %rdi
je 0x12c83
movq -0x1a8(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x12c83
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x12c9d
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x12c9d
movq %rax, %rbx
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12d05
movq -0x68(%rbp), %rsi
jmp 0x12cfd
jmp 0x12cd4
jmp 0x12cbc
jmp 0x12cd4
jmp 0x12cbc
jmp 0x12cd4
jmp 0x12cd4
movq %rax, %rbx
movq -0x1b8(%rbp), %rdi
cmpq %r14, %rdi
je 0x12d05
movq -0x1a8(%rbp), %rsi
jmp 0x12cfd
movq %rax, %rbx
jmp 0x12d05
movq %rax, %rbx
jmp 0x12d11
jmp 0x12ce0
movq %rax, %rbx
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
je 0x12d05
movq -0x198(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq -0x3e0(%rbp), %rdi
callq 0x40f0
leaq -0x1c8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12d30
movq -0x1c8(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4740