// File: /workspace/github_cpp_makefile_star2_O2/lotuskip[P]yuxtapa/server/players.cpp
// Function: output_stats()
void output_stats()
{
	// General stuff:
	cout << "Players: " << known_players.size() << endl << endl;

	struct tm *timeinfo;
	unsigned long l;
	short sh;
	for(list<PlayerStats>::const_iterator it = known_players.begin();
		it != known_players.end(); ++it)
	{
		cout << it->last_known_as << endl;
		cout << "AL " << short(it->ad_lvl) << endl;
 		timeinfo = localtime(&(it->last_seen));
		cout << "seen " << asctime(timeinfo); // asctime includes '\n'
		l = it->total_time;
		cout << "tot_time: " << l/(60*60) << ':';
		if((l%(60*60))/60 < 10)
			cout << '0';
		cout << (l%(60*60))/60 << ':';
		if(l%60 < 10)
			cout << '0';
		cout << l%60 << endl;
		if(l)
		{
			cout << "as_spec: " << 100*it->time_specced/l << '%' << endl;
			for(sh = 0; sh < NO_CLASS; ++sh)
			{
				if(100*it->time_played[sh]/l) // only print non-zeros here
					cout << "as_" << classes[sh].abbr << ": "
						<< 100*it->time_played[sh]/l << '%' << endl;
			}
		}
		l = 0;
		cout << "kills: ";
		for(sh = 0; sh < MAX_WAY_TO_KILL; ++sh)
		{
			if(it->kills[sh])
			{
				cout << it->kills[sh]  << ' ' << kill_way_name[sh] << ", ";
				l += it->kills[sh];
			}
		}
		cout << "TOTAL: " << l << endl;
		cout << "t-kills: " << it->tks << endl;
		cout << "deaths: " << it->deaths << endl;
		cout << "healing: " << it->healing_recvd << endl;
		cout << "arch: ";
		if(it->arch_shots)
			cout  << 100*it->arch_hits/(it->arch_shots) << '%';
		else
			cout << '-';
		cout << endl << "zaps: ";
		if(it->cm_shots)
			cout << 100*it->cm_hits/(it->cm_shots) << '%';
		else
			cout << '-';
		cout << endl << endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x2d5ee(%rip), %rbx     # 0x3cfc0
leaq 0x16fbc(%rip), %rsi     # 0x26995
movq %rbx, %rdi
callq 0x43e0
leaq 0x306b0(%rip), %r15     # 0x40098
movq 0x306b9(%rip), %rsi     # 0x400a8
movq %rax, %rdi
callq 0x4250
movq %rax, %rdi
callq 0x41c0
movq %rax, %rdi
callq 0x41c0
movq (%r15), %r15
leaq 0x30687(%rip), %rax     # 0x40098
cmpq %rax, %r15
je 0xfd81
leaq 0x20(%r15), %rsi
movq %rbx, %rdi
callq 0x4370
movq %rax, %rdi
callq 0x41c0
movq %rbx, %rdi
leaq 0x16f67(%rip), %rsi     # 0x2699f
callq 0x43e0
movswl 0x140(%r15), %esi
movq %rax, %rdi
callq 0x43b0
movq %rax, %rdi
callq 0x41c0
leaq 0x138(%r15), %rdi
callq 0x42a0
movq %rax, %r12
movq %rbx, %rdi
leaq 0x16f35(%rip), %rsi     # 0x269a3
callq 0x43e0
movq %rax, %r13
movq %r12, %rdi
callq 0x4190
movq %r13, %rdi
movq %rax, %rsi
callq 0x43e0
movq 0xb0(%r15), %r13
movq %rbx, %rdi
leaq 0x16f0f(%rip), %rsi     # 0x269a9
callq 0x43e0
movq %rax, %rdi
movq %r13, %rax
xorl %edx, %edx
movl $0xe10, %ecx            # imm = 0xE10
divq %rcx
movq %rdx, %r14
movq %rax, %rsi
callq 0x4250
movq %rax, %rdi
pushq $0x3a
popq %rsi
callq 0x4470
movl %r14d, %eax
xorl %edx, %edx
movw $0x3c, %cx
divw %cx
movl %eax, %r12d
cmpq $0x257, %r14            # imm = 0x257
ja 0xfae8
movq %rbx, %rdi
pushq $0x30
popq %rsi
callq 0x4470
movzwl %r12w, %esi
movq %rbx, %rdi
callq 0x4250
movq %rax, %rdi
pushq $0x3a
popq %rsi
callq 0x4470
movq %r13, %rax
xorl %edx, %edx
pushq $0x3c
popq %rcx
divq %rcx
movq %rdx, %r12
cmpq $0x9, %rdx
ja 0xfb1e
movq %rbx, %rdi
pushq $0x30
popq %rsi
callq 0x4470
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4250
movq %rax, %rdi
callq 0x41c0
testq %r13, %r13
je 0xfbf0
movq %rbx, %rdi
leaq 0x16e70(%rip), %rsi     # 0x269b4
callq 0x43e0
movq %rax, %rdi
imulq $0x64, 0xb8(%r15), %rax
xorl %edx, %edx
divq %r13
movq %rax, %rsi
callq 0x4250
movq %rax, %rdi
pushq $0x25
popq %rsi
callq 0x4470
movq %rax, %rdi
callq 0x41c0
leaq 0x16e85(%rip), %r12     # 0x26a00
xorl %r14d, %r14d
cmpq $0xb, %r14
je 0xfbf0
imulq $0x64, 0xc0(%r15,%r14,8), %rax
cmpq %rax, %r13
ja 0xfbe7
movq %rbx, %rdi
leaq 0x16e22(%rip), %rsi     # 0x269be
callq 0x43e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x43e0
movq %rax, %rdi
leaq 0x195de(%rip), %rsi     # 0x29194
callq 0x43e0
movq %rax, %rdi
imulq $0x64, 0xc0(%r15,%r14,8), %rax
xorl %edx, %edx
divq %r13
movq %rax, %rsi
callq 0x4250
movq %rax, %rdi
pushq $0x25
popq %rsi
callq 0x4470
movq %rax, %rdi
callq 0x41c0
incq %r14
addq $0xd, %r12
jmp 0xfb7e
movq %rbx, %rdi
leaq 0x16dd2(%rip), %rsi     # 0x269cc
callq 0x43e0
leaq 0x302fa(%rip), %r13     # 0x3ff00
pushq $0x9
popq %r14
xorl %r12d, %r12d
cmpq $0x14, %r14
je 0xfc56
movq (%r15,%r14,8), %rsi
testq %rsi, %rsi
je 0xfc4d
movq %rbx, %rdi
callq 0x4250
movq %rax, %rdi
pushq $0x20
popq %rsi
callq 0x4470
movq %rax, %rdi
movq %r13, %rsi
callq 0x4370
movq %rax, %rdi
leaq 0x1fc58(%rip), %rsi     # 0x2f89c
callq 0x43e0
addq (%r15,%r14,8), %r12
incq %r14
addq $0x20, %r13
jmp 0xfc0d
movq %rbx, %rdi
leaq 0x16d62(%rip), %rsi     # 0x269c2
callq 0x43e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x4250
movq %rax, %rdi
callq 0x41c0
movq %rbx, %rdi
leaq 0x16d48(%rip), %rsi     # 0x269ca
callq 0x43e0
movq 0xa0(%r15), %rsi
movq %rax, %rdi
callq 0x4250
movq %rax, %rdi
callq 0x41c0
movq %rbx, %rdi
leaq 0x16d2c(%rip), %rsi     # 0x269d4
callq 0x43e0
movq 0x40(%r15), %rsi
movq %rax, %rdi
callq 0x4250
movq %rax, %rdi
callq 0x41c0
movq %rbx, %rdi
leaq 0x16d12(%rip), %rsi     # 0x269dd
callq 0x43e0
movq 0xa8(%r15), %rsi
movq %rax, %rdi
callq 0x4250
movq %rax, %rdi
callq 0x41c0
movq %rbx, %rdi
leaq 0x16cf6(%rip), %rsi     # 0x269e7
callq 0x43e0
movq 0x120(%r15), %rcx
testq %rcx, %rcx
je 0xfd21
imulq $0x64, 0x118(%r15), %rax
xorl %edx, %edx
divq %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4250
movq %rax, %rdi
pushq $0x25
jmp 0xfd26
movq %rbx, %rdi
pushq $0x2d
popq %rsi
callq 0x4470
movq %rbx, %rdi
callq 0x41c0
movq %rax, %rdi
leaq 0x16cb0(%rip), %rsi     # 0x269ee
callq 0x43e0
movq 0x130(%r15), %rcx
testq %rcx, %rcx
je 0xfd6e
imulq $0x64, 0x128(%r15), %rax
xorl %edx, %edx
divq %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4250
movq %rax, %rdi
pushq $0x25
jmp 0xfd73
movq %rbx, %rdi
pushq $0x2d
popq %rsi
callq 0x4470
movq %rbx, %rdi
jmp 0xf9fa
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq