// File: /workspace/github_cpp_makefile_star2_O3/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 0x1c987
leaq 0x26750(%rip), %rax     # 0x430c0
movl 0x10(%rax), %eax
movzbl 0x278a7(%rip), %ecx     # 0x44221
movzbl 0x278a1(%rip), %edx     # 0x44222
addl %ecx, %edx
subl %edx, %eax
jmp 0x1c991
leaq 0x27893(%rip), %rcx     # 0x44221
movb (%rax,%rcx), %al
movzbl %al, %ecx
cmpb $0x17, %cl
movl $0x17, %eax
cmovll %ecx, %eax
movb %al, 0x282db(%rip)      # 0x44c80
leaq 0x26714(%rip), %r15     # 0x430c0
movq (%r15), %r12
cmpq %r15, %r12
je 0x1ca94
movsbl %al, %r13d
leaq 0x282be(%rip), %r14     # 0x44c81
movl 0xbc(%r12), %eax
cmpl 0xbc(%rbx), %eax
jne 0x1ca85
movq 0x98(%r12), %rsi
movq %r14, %rdi
callq 0x43c0
addq 0xa0(%r12), %r14
cmpl $-0x1, 0x174(%r12)
je 0x1ca0c
movb $0x0, 0x4(%r14)
movl $0x29422820, (%r14)     # imm = 0x29422820
addq $0x5, %r14
jmp 0x1ca55
movq 0x90(%r12), %rax
movl 0x140(%rax), %eax
shlq $0x5, %rax
leaq 0x272db(%rip), %rcx     # 0x43d00
movq (%rax,%rcx), %rsi
movq %r14, %rdi
callq 0x43c0
movq 0x90(%r12), %rax
movl 0x140(%rax), %eax
shlq $0x5, %rax
leaq 0x272b6(%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 0x12496
movb $-0x1, %cl
testb %al, %al
je 0x1ca78
movb 0x16c(%r12), %cl
movb %cl, 0x1(%r14)
addq $0x2, %r14
decl %r13d
je 0x1ca9b
movq (%r12), %r12
cmpq %r15, %r12
jne 0x1c9c3
jmp 0x1ca9b
leaq 0x281e6(%rip), %r14     # 0x44c81
addq $0x10, %rbx
leaq 0x24682(%rip), %r15     # 0x41128
movq %r15, %rdi
callq 0x2af20
movq %r15, %rdi
movl $0x5, %esi
callq 0x2af34
leaq 0x281be(%rip), %rsi     # 0x44c80
subl %esi, %r14d
movzwl %r14w, %edx
movq %r15, %rdi
callq 0x2afc0
movq %rbx, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf719