// File: lotuskip[P]yuxtapa/server/game.cpp
// Function: Game::send_team_upds(std::_List_const_iterator<Player>)
void Game::send_team_upds(const list<Player>::const_iterator to)
{
	Network::send_buffer.clear();
	Network::send_buffer.add((unsigned char)MID_GAME_UPD);
	Network::send_buffer.add(num_players[T_GREEN]);
	Network::send_buffer.add(num_players[T_PURPLE]);
	Network::send_buffer.add(objective_str);

	string obj_status_str;
	if(intermission)
	{
		// Check what happened; by default we assume a tie:
		obj_status_str = ", ";
		// Conditions under which purple wins:
		if(team_flags[T_GREEN].empty()
			|| (curturn == map_over_turn && gamemode != GM_DOM && gamemode != GM_TDM)
			|| (gamemode == GM_TDM && tdm_kills[T_PURPLE] > tdm_kills[T_GREEN]))
			obj_status_str += str_team[T_PURPLE];
		// Conditions under which green wins:
		else if(team_flags[T_PURPLE].empty()
			|| (gamemode == GM_TDM && tdm_kills[T_GREEN] > tdm_kills[T_PURPLE]))
			obj_status_str += str_team[T_GREEN];
		else
			obj_status_str += "neither team";
		obj_status_str += " won";
		if(gamemode == GM_TDM)
		{
			if(tdm_kills[T_GREEN] == tdm_kills[T_PURPLE])
				obj_status_str += "; score "
					+ lex_cast(tdm_kills[T_GREEN]) + " even";
			else
				obj_status_str += " by "
					+ lex_cast(max(tdm_kills[T_PURPLE],tdm_kills[T_GREEN]))
					+ " to " + lex_cast(min(tdm_kills[T_PURPLE],tdm_kills[T_GREEN]));
		}
		obj_status_str += '!';
	}
	else // not intermission
	{
		switch(gamemode)
		{
		case GM_DOM: 
		case GM_CONQ:
			if(team_flags[T_PURPLE].size() > team_flags[T_GREEN].size())
				obj_status_str = ", Purple has "
					+ lex_cast(team_flags[T_PURPLE].size());
			else
				obj_status_str = ", Green has "
					+ lex_cast(team_flags[T_GREEN].size());
			obj_status_str += '/';
			obj_status_str += lex_cast(noccents[NOE_FLAG].size()); 
			break;
		case GM_STEAL:
			obj_status_str = " (" + long_sector_name[obj_sector] + ") item ";
			if(pl_with_item != cur_players.end())
				obj_status_str += "stolen";
			else if(item_moved)
				obj_status_str += "dropped";
			else
				obj_status_str += "secure";
			break;
		case GM_DESTR:
			obj_status_str = ", " + lex_cast(boulders_left)
				+ " left";
			break;
		case GM_TDM:
			obj_status_str = ", ";
			if(tdm_kills[T_GREEN] == tdm_kills[T_PURPLE])
				obj_status_str += "tie!";
			else
				obj_status_str += str_team[(tdm_kills[T_PURPLE] > tdm_kills[T_GREEN])] + " is in the lead";
			break;
		default: obj_status_str = ""; break;
		}
	}
	Network::send_buffer.add(obj_status_str);

	if(to == cur_players.end())
		Network::broadcast();
	else
		Network::send_to_player(*to);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2e0, %rsp            # imm = 0x2E0
movq %rdi, -0x8(%rbp)
leaq 0x575a2(%rip), %rdi     # 0x8e298
callq 0x5f370
leaq 0x57596(%rip), %rdi     # 0x8e298
movl $0xd, %esi
callq 0x5f390
leaq 0x57585(%rip), %rdi     # 0x8e298
movzbl 0x5a677(%rip), %esi     # 0x91391
callq 0x5f390
leaq 0x57572(%rip), %rdi     # 0x8e298
movzbl 0x5a665(%rip), %esi     # 0x91392
callq 0x5f390
leaq 0x5755f(%rip), %rdi     # 0x8e298
leaq 0x5b070(%rip), %rsi     # 0x91db0
callq 0x5f440
leaq -0x28(%rbp), %rdi
callq 0x5770
leaq 0x567db(%rip), %rax     # 0x8d530
testb $0x1, (%rax)
je 0x370de
leaq 0x35a57(%rip), %rsi     # 0x6c7bc
leaq -0x28(%rbp), %rdi
callq 0x5760
jmp 0x36d70
leaq 0x5c2f9(%rip), %rdi     # 0x93070
callq 0x3d7b0
testb $0x1, %al
jne 0x36dbf
movzwl 0x5b049(%rip), %eax     # 0x91dd0
movzwl 0x56806(%rip), %ecx     # 0x8d594
cmpl %ecx, %eax
jne 0x36da4
cmpl $0x0, 0x5a5fb(%rip)     # 0x91394
je 0x36da4
cmpl $0x4, 0x5a5f2(%rip)     # 0x91394
jne 0x36dbf
cmpl $0x4, 0x5a5e9(%rip)     # 0x91394
jne 0x36de4
movzwl 0x5a5e6(%rip), %eax     # 0x9139a
movzwl 0x5a5dd(%rip), %ecx     # 0x91398
cmpl %ecx, %eax
jle 0x36de4
leaq 0x5a16a(%rip), %rsi     # 0x90f30
leaq -0x28(%rbp), %rdi
callq 0x56e0
jmp 0x36dd1
jmp 0x36e3d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x375e2
leaq 0x5c285(%rip), %rdi     # 0x93070
addq $0x18, %rdi
callq 0x3d7b0
testb $0x1, %al
jne 0x36e13
cmpl $0x4, 0x5a595(%rip)     # 0x91394
jne 0x36e27
movzwl 0x5a590(%rip), %eax     # 0x91398
movzwl 0x5a58b(%rip), %ecx     # 0x9139a
cmpl %ecx, %eax
jle 0x36e27
leaq 0x5a0f6(%rip), %rsi     # 0x90f10
leaq -0x28(%rbp), %rdi
callq 0x56e0
jmp 0x36e25
jmp 0x36e3b
leaq 0x2d31a(%rip), %rsi     # 0x64148
leaq -0x28(%rbp), %rdi
callq 0x54f0
jmp 0x36e39
jmp 0x36e3b
jmp 0x36e3d
leaq 0x2d311(%rip), %rsi     # 0x64155
leaq -0x28(%rbp), %rdi
callq 0x54f0
jmp 0x36e4f
cmpl $0x4, 0x5a53e(%rip)     # 0x91394
jne 0x370c9
movzwl 0x5a535(%rip), %eax     # 0x91398
movzwl 0x5a530(%rip), %ecx     # 0x9139a
cmpl %ecx, %eax
jne 0x36f33
movzwl 0x5a51f(%rip), %esi     # 0x91398
leaq -0x98(%rbp), %rdi
callq 0x609d0
jmp 0x36e87
leaq 0x2d2cc(%rip), %rsi     # 0x6415a
leaq -0x78(%rbp), %rdi
leaq -0x98(%rbp), %rdx
callq 0x18a90
jmp 0x36ea0
leaq 0x2d2bc(%rip), %rdx     # 0x64163
leaq -0x58(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x18a40
jmp 0x36eb6
leaq -0x28(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x56e0
jmp 0x36ec5
leaq -0x58(%rbp), %rdi
callq 0x5a48
leaq -0x78(%rbp), %rdi
callq 0x5a48
leaq -0x98(%rbp), %rdi
callq 0x5a48
jmp 0x370c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x36f22
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x36f19
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x5a48
leaq -0x78(%rbp), %rdi
callq 0x5a48
leaq -0x98(%rbp), %rdi
callq 0x5a48
jmp 0x375e2
leaq 0x5a460(%rip), %rdi     # 0x9139a
leaq 0x5a457(%rip), %rsi     # 0x91398
callq 0x3d7d0
movq %rax, -0x2c0(%rbp)
jmp 0x36f4f
movq -0x2c0(%rbp), %rax
movzwl (%rax), %esi
leaq -0x118(%rbp), %rdi
callq 0x609d0
jmp 0x36f67
leaq 0x35980(%rip), %rsi     # 0x6c8ee
leaq -0xf8(%rbp), %rdi
leaq -0x118(%rbp), %rdx
callq 0x18a90
jmp 0x36f83
leaq 0x2ce95(%rip), %rdx     # 0x63e1f
leaq -0xd8(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x18a40
jmp 0x36f9f
leaq 0x5a3f4(%rip), %rdi     # 0x9139a
leaq 0x5a3eb(%rip), %rsi     # 0x91398
callq 0x3d810
movq %rax, -0x2c8(%rbp)
jmp 0x36fbb
movq -0x2c8(%rbp), %rax
movzwl (%rax), %esi
leaq -0x138(%rbp), %rdi
callq 0x609d0
jmp 0x36fd3
leaq -0xb8(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
leaq -0x138(%rbp), %rdx
callq 0x1b260
jmp 0x36fef
leaq -0x28(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x56e0
jmp 0x37001
leaq -0xb8(%rbp), %rdi
callq 0x5a48
leaq -0x138(%rbp), %rdi
callq 0x5a48
leaq -0xd8(%rbp), %rdi
callq 0x5a48
leaq -0xf8(%rbp), %rdi
callq 0x5a48
leaq -0x118(%rbp), %rdi
callq 0x5a48
jmp 0x370c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x370b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x370aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x3709e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x37092
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x5a48
leaq -0x138(%rbp), %rdi
callq 0x5a48
leaq -0xd8(%rbp), %rdi
callq 0x5a48
leaq -0xf8(%rbp), %rdi
callq 0x5a48
leaq -0x118(%rbp), %rdi
callq 0x5a48
jmp 0x375e2
jmp 0x370c9
leaq -0x28(%rbp), %rdi
movl $0x21, %esi
callq 0x5310
jmp 0x370d9
jmp 0x37551
movl 0x5a2b0(%rip), %eax     # 0x91394
movq %rax, -0x2d0(%rbp)
subq $0x4, %rax
ja 0x3753b
movq -0x2d0(%rbp), %rax
leaq 0x2cddd(%rip), %rcx     # 0x63ee0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x5bf5d(%rip), %rdi     # 0x93070
addq $0x18, %rdi
callq 0x3d850
movq %rax, -0x2d8(%rbp)
leaq 0x5bf46(%rip), %rdi     # 0x93070
callq 0x3d850
movq %rax, %rcx
movq -0x2d8(%rbp), %rax
cmpq %rcx, %rax
jbe 0x371c8
leaq 0x5bf27(%rip), %rdi     # 0x93070
addq $0x18, %rdi
callq 0x3d850
movl %eax, %esi
leaq -0x178(%rbp), %rdi
callq 0x609d0
jmp 0x37162
leaq 0x2d000(%rip), %rsi     # 0x64169
leaq -0x158(%rbp), %rdi
leaq -0x178(%rbp), %rdx
callq 0x18a90
jmp 0x3717e
leaq -0x28(%rbp), %rdi
leaq -0x158(%rbp), %rsi
callq 0x5640
leaq -0x158(%rbp), %rdi
callq 0x5a48
leaq -0x178(%rbp), %rdi
callq 0x5a48
jmp 0x37247
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x178(%rbp), %rdi
callq 0x5a48
jmp 0x375e2
leaq 0x5bea1(%rip), %rdi     # 0x93070
callq 0x3d850
movl %eax, %esi
leaq -0x1b8(%rbp), %rdi
callq 0x609d0
jmp 0x371e4
leaq 0x2cf8c(%rip), %rsi     # 0x64177
leaq -0x198(%rbp), %rdi
leaq -0x1b8(%rbp), %rdx
callq 0x18a90
jmp 0x37200
leaq -0x28(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x5640
leaq -0x198(%rbp), %rdi
callq 0x5a48
leaq -0x1b8(%rbp), %rdi
callq 0x5a48
jmp 0x37247
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x5a48
jmp 0x375e2
leaq -0x28(%rbp), %rdi
movl $0x2f, %esi
callq 0x5310
jmp 0x37257
leaq 0x5bcd2(%rip), %rdi     # 0x92f30
addq $0x78, %rdi
callq 0x3d880
movl %eax, %esi
leaq -0x1d8(%rbp), %rdi
callq 0x609d0
jmp 0x37277
leaq -0x28(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x56e0
jmp 0x37289
leaq -0x1d8(%rbp), %rdi
callq 0x5a48
jmp 0x3754f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x5a48
jmp 0x375e2
movl 0x562d3(%rip), %eax     # 0x8d590
shlq $0x5, %rax
leaq 0x59ce8(%rip), %rdx     # 0x90fb0
addq %rax, %rdx
leaq 0x2a7b6(%rip), %rsi     # 0x61a88
leaq -0x218(%rbp), %rdi
callq 0x1f390
jmp 0x372e0
leaq 0x2ce9d(%rip), %rdx     # 0x64184
leaq -0x1f8(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x18a40
jmp 0x372fc
leaq -0x28(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x5640
leaq -0x1f8(%rbp), %rdi
callq 0x5a48
leaq -0x218(%rbp), %rdi
callq 0x5a48
leaq 0x58f05(%rip), %rdi     # 0x90230
callq 0x189f0
movq %rax, -0x228(%rbp)
leaq -0x220(%rbp), %rdi
leaq -0x228(%rbp), %rsi
callq 0x18a20
leaq 0x5be27(%rip), %rdi     # 0x93178
leaq -0x220(%rbp), %rsi
callq 0x24f10
testb $0x1, %al
jne 0x37363
jmp 0x37394
leaq 0x2ce22(%rip), %rsi     # 0x6418c
leaq -0x28(%rbp), %rdi
callq 0x54f0
jmp 0x37375
jmp 0x373ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x5a48
jmp 0x375e2
leaq 0x5bde5(%rip), %rax     # 0x93180
testb $0x1, (%rax)
je 0x373b4
leaq 0x2cdec(%rip), %rsi     # 0x64193
leaq -0x28(%rbp), %rdi
callq 0x54f0
jmp 0x373b2
jmp 0x373c8
leaq 0x2cde0(%rip), %rsi     # 0x6419b
leaq -0x28(%rbp), %rdi
callq 0x54f0
jmp 0x373c6
jmp 0x373c8
jmp 0x373ca
jmp 0x3754f
movzwl 0x5b22a(%rip), %esi     # 0x92600
leaq -0x288(%rbp), %rdi
callq 0x609d0
jmp 0x373e4
leaq 0x353d1(%rip), %rsi     # 0x6c7bc
leaq -0x268(%rbp), %rdi
leaq -0x288(%rbp), %rdx
callq 0x18a90
jmp 0x37400
leaq 0x2cd9b(%rip), %rdx     # 0x641a2
leaq -0x248(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0x18a40
jmp 0x3741c
leaq -0x28(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x5640
leaq -0x248(%rbp), %rdi
callq 0x5a48
leaq -0x268(%rbp), %rdi
callq 0x5a48
leaq -0x288(%rbp), %rdi
callq 0x5a48
jmp 0x3754f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x3747b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x5a48
leaq -0x288(%rbp), %rdi
callq 0x5a48
jmp 0x375e2
leaq 0x35329(%rip), %rsi     # 0x6c7bc
leaq -0x28(%rbp), %rdi
callq 0x5760
jmp 0x3749e
movzwl 0x59ef3(%rip), %eax     # 0x91398
movzwl 0x59eee(%rip), %ecx     # 0x9139a
cmpl %ecx, %eax
jne 0x374c4
leaq 0x2ccf1(%rip), %rsi     # 0x641a8
leaq -0x28(%rbp), %rdi
callq 0x54f0
jmp 0x374c2
jmp 0x37539
movzwl 0x59ecf(%rip), %eax     # 0x9139a
movzwl 0x59ec6(%rip), %ecx     # 0x91398
subl %ecx, %eax
setg %al
movzbl %al, %eax
shll $0x5, %eax
leaq 0x59a2c(%rip), %rsi     # 0x90f10
addq %rax, %rsi
leaq 0x2ccbf(%rip), %rdx     # 0x641ad
leaq -0x2a8(%rbp), %rdi
callq 0x1b080
jmp 0x374fc
leaq -0x28(%rbp), %rdi
leaq -0x2a8(%rbp), %rsi
callq 0x56e0
jmp 0x3750e
leaq -0x2a8(%rbp), %rdi
callq 0x5a48
jmp 0x37539
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x2a8(%rbp), %rdi
callq 0x5a48
jmp 0x375e2
jmp 0x3754f
leaq 0x29dfa(%rip), %rsi     # 0x6133c
leaq -0x28(%rbp), %rdi
callq 0x5760
jmp 0x3754d
jmp 0x3754f
jmp 0x37551
leaq 0x56d40(%rip), %rdi     # 0x8e298
leaq -0x28(%rbp), %rsi
callq 0x5f440
jmp 0x37563
leaq 0x58cc6(%rip), %rdi     # 0x90230
callq 0x189f0
movq %rax, -0x2b8(%rbp)
leaq -0x2b0(%rbp), %rdi
leaq -0x2b8(%rbp), %rsi
callq 0x18a20
leaq -0x8(%rbp), %rdi
leaq -0x2b0(%rbp), %rsi
callq 0x3d5a0
testb $0x1, %al
jne 0x3759f
jmp 0x375b4
leaq 0x56cf2(%rip), %rsi     # 0x8e298
movl $0xffff, %edi           # imm = 0xFFFF
callq 0x19160
jmp 0x375b2
jmp 0x375d0
leaq -0x8(%rbp), %rdi
callq 0x3d790
movq %rax, %rdi
leaq 0x56cd1(%rip), %rsi     # 0x8e298
callq 0x1af60
jmp 0x375ce
jmp 0x375d0
leaq -0x28(%rbp), %rdi
callq 0x5a48
addq $0x2e0, %rsp            # imm = 0x2E0
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0x5a48
movq -0x30(%rbp), %rdi
callq 0x5920
nopw %cs:(%rax,%rax)