// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/game.cpp
// Function: Game::send_team_info(std::_List_const_iterator<Player>)
void Game::send_team_info(const std::list<Player>::const_iterator to)
{
	// We will reuse renderbuffer for sending (it is vacant space when not
	// rendering).
	char *p = &(renderbuffer[1]);
	if(to->team == T_SPEC)
		renderbuffer[0] = cur_players.size() - num_players[0] - num_players[1];
	else
		renderbuffer[0] = num_players[to->team];
	if(renderbuffer[0] > VIEWSIZE) // can't print more than this
		renderbuffer[0] = VIEWSIZE;
	int count = renderbuffer[0];
	for(list<Player>::const_iterator it = cur_players.begin();
		it != cur_players.end(); ++it)
		if(it->team == to->team)
		{
			strcpy(p, it->nick.c_str());
			p += it->nick.length(); // skip '\0'
			if(it->botpid != -1)
			{
				strcpy(p, " (B)");
				p += 5; // include '\0'
			}
			else
			{
				strcpy(p, admin_lvl_str[it->stats_i->ad_lvl].c_str());
				p += admin_lvl_str[it->stats_i->ad_lvl].length()+1;
			}
			*(p++) = it->cl; // class
			if(it->is_alive()) // sector
				*(p++) = it->sector;
			else
				*(p++) = -1; // signifies dead
			if(!(--count))
				break;
		}
	Network::send_buffer.clear();
	Network::send_buffer.add((unsigned char)MID_TEAM_INFO);
	Network::send_buffer.write_compressed(renderbuffer, p - renderbuffer);
	Network::send_to_player(*to);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0xbc(%rdi), %eax
cmpq $0x2, %rax
jne 0x1cabe
leaq 0x26619(%rip), %rax     # 0x430c0
movl 0x10(%rax), %eax
movzbl 0x27770(%rip), %ecx     # 0x44221
movzbl 0x2776a(%rip), %edx     # 0x44222
addl %ecx, %edx
subl %edx, %eax
jmp 0x1cac8
leaq 0x2775c(%rip), %rcx     # 0x44221
movb (%rax,%rcx), %al
movzbl %al, %ecx
cmpb $0x17, %cl
movl $0x17, %eax
cmovll %ecx, %eax
movb %al, 0x281a4(%rip)      # 0x44c80
leaq 0x265dd(%rip), %r15     # 0x430c0
movq (%r15), %r12
cmpq %r15, %r12
je 0x1cbcb
movsbl %al, %r13d
leaq 0x28187(%rip), %r14     # 0x44c81
movl 0xbc(%r12), %eax
cmpl 0xbc(%rbx), %eax
jne 0x1cbbc
movq 0x98(%r12), %rsi
movq %r14, %rdi
callq 0x43c0
addq 0xa0(%r12), %r14
cmpl $-0x1, 0x174(%r12)
je 0x1cb43
movb $0x0, 0x4(%r14)
movl $0x29422820, (%r14)     # imm = 0x29422820
addq $0x5, %r14
jmp 0x1cb8c
movq 0x90(%r12), %rax
movl 0x140(%rax), %eax
shlq $0x5, %rax
leaq 0x271a4(%rip), %rcx     # 0x43d00
movq (%rax,%rcx), %rsi
movq %r14, %rdi
callq 0x43c0
movq 0x90(%r12), %rax
movl 0x140(%rax), %eax
shlq $0x5, %rax
leaq 0x2717f(%rip), %rcx     # 0x43d00
movq 0x8(%rax,%rcx), %rax
addq %rax, %r14
incq %r14
leaq 0x10(%r12), %rdi
movb 0xc0(%r12), %al
movb %al, (%r14)
callq 0x125e6
movb $-0x1, %cl
testb %al, %al
je 0x1cbaf
movb 0x16c(%r12), %cl
movb %cl, 0x1(%r14)
addq $0x2, %r14
decl %r13d
je 0x1cbd2
movq (%r12), %r12
cmpq %r15, %r12
jne 0x1cafa
jmp 0x1cbd2
leaq 0x280af(%rip), %r14     # 0x44c81
addq $0x10, %rbx
leaq 0x2454b(%rip), %r15     # 0x41128
movq %r15, %rdi
callq 0x2b340
movq %r15, %rdi
movl $0x5, %esi
callq 0x2b354
leaq 0x28087(%rip), %rsi     # 0x44c80
subl %esi, %r14d
movzwl %r14w, %edx
movq %r15, %rdi
callq 0x2b3dc
movq %rbx, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf816