// File: /workspace/github_cpp_makefile_star2_O1/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 0x11ada
leaq 0x3072c(%rip), %rdx     # 0x42ee8
leaq -0x1d8(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1483d
movq (%rbx), %rsi
leaq -0x3e0(%rbp), %rdi
movl $0x4, %edx
callq 0x4780
movq -0x3e0(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x3c0(%rbp,%rax)
je 0x1282d
leaq -0x1a8(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x1a01b(%rip), %rsi     # 0x2c824
leaq 0x1a04d(%rip), %rdx     # 0x2c85d
leaq -0x1b8(%rbp), %rdi
callq 0xdfec
leaq -0x1b8(%rbp), %rdi
callq 0x15050
jmp 0x128d2
leaq -0x3e0(%rbp), %rdi
leaq -0x2a(%rbp), %rsi
movl $0x2, %edx
callq 0x4510
cmpw $-0x1, -0x2a(%rbp)
je 0x1287c
leaq -0x1a8(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x1a003(%rip), %rsi     # 0x2c85e
leaq 0x1a044(%rip), %rdx     # 0x2c8a6
leaq -0x1b8(%rbp), %rdi
callq 0xdfec
leaq -0x1b8(%rbp), %rdi
callq 0x15050
jmp 0x128d2
leaq -0x3e0(%rbp), %rdi
leaq -0x2a(%rbp), %rsi
movl $0x2, %edx
callq 0x4510
movzwl -0x2a(%rbp), %esi
cmpl $0x2711, %esi           # imm = 0x2711
jb 0x1292a
leaq -0x1a8(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x19ff4(%rip), %rsi     # 0x2c8a7
leaq 0x1a01b(%rip), %rdx     # 0x2c8d5
leaq -0x1b8(%rbp), %rdi
callq 0xdfec
leaq -0x1b8(%rbp), %rdi
callq 0x15050
movq -0x1b8(%rbp), %rdi
cmpq %r14, %rdi
je 0x128ed
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 0x12918
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 0x12a48
leaq -0x78(%rbp), %rdi
callq 0x2be77
leaq 0x19f93(%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 0x1297a
movq %rdx, -0x58(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x48(%rbp)
jmp 0x12981
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 0x19f49(%rip), %rsi     # 0x2c8ec
callq 0x47c0
leaq -0x1a8(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x129d5
movq %rdx, -0x1b8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x1a8(%rbp)
jmp 0x129dc
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 0x15050
movq -0x1b8(%rbp), %rdi
cmpq %r15, %rdi
je 0x12a1a
movq -0x1a8(%rbp), %rsi
incq %rsi
callq 0x43f0
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x12a2f
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12a48
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x43f0
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), %rbx
movl $0x0, 0x100(%rbx)
movl $0xf8, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4200
movb %r14b, -0x26(%rbx)
leaq 0x2fe10(%rip), %rax     # 0x428a0
movl 0x24(%rax), %eax
subw $0x1, -0x2a(%rbp)
jb 0x12c9d
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 0x12c4c
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 0x12c21
testl %ebx, %ebx
je 0x12c6d
cmpl $0x1, -0x88(%rbp)
jg 0x12c6d
xorl %edi, %edi
callq 0x43b0
subq -0x90(%rbp), %rax
cmpq -0x80(%rbp), %rax
jge 0x12c92
leaq 0x30434(%rip), %rdi     # 0x430a8
movq %r12, %rsi
callq 0x14990
movq %rax, %rdi
leaq 0x30422(%rip), %rsi     # 0x430a8
callq 0x4060
incq 0x30426(%rip)           # 0x430b8
subw $0x1, -0x2a(%rbp)
jae 0x12acc
cmpb $0x0, -0x34(%rbp)
jne 0x12d3f
movl 0x3040b(%rip), %esi     # 0x430b8
leaq -0x78(%rbp), %rdi
callq 0x2be77
leaq 0x19c39(%rip), %rsi     # 0x2c8f6
leaq -0x78(%rbp), %rdi
callq 0x47c0
leaq -0x48(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x12cea
movq %rdx, -0x58(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x48(%rbp)
jmp 0x12cf1
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 0x15050
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x12d26
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12d3f
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x43f0
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
je 0x128ed
movq -0x198(%rbp), %rsi
jmp 0x128e5
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x12d7f
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x12d7f
movq %rax, %rbx
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12e29
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x12e29
jmp 0x12e26
movq %rax, %rbx
movq -0x1b8(%rbp), %rdi
cmpq %r15, %rdi
je 0x12dc9
movq -0x1a8(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x12dc9
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x12de3
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x12de3
movq %rax, %rbx
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12e4b
movq -0x68(%rbp), %rsi
jmp 0x12e43
jmp 0x12e1a
jmp 0x12e02
jmp 0x12e1a
jmp 0x12e02
jmp 0x12e1a
jmp 0x12e1a
movq %rax, %rbx
movq -0x1b8(%rbp), %rdi
cmpq %r14, %rdi
je 0x12e4b
movq -0x1a8(%rbp), %rsi
jmp 0x12e43
movq %rax, %rbx
jmp 0x12e4b
movq %rax, %rbx
jmp 0x12e57
jmp 0x12e26
movq %rax, %rbx
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
je 0x12e4b
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 0x12e76
movq -0x1c8(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4750