// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/chores.cpp
// Function: (anonymous namespace)::capt_flag(std::_List_iterator<NOccEnt>, e_Team)
void capt_flag(const list<NOccEnt>::iterator fit, const e_Team t)
{
	/* A special situation in which capturing cannot be allowed: game mode is
	 * steal, and green team has secured the treasure: */
	if(gamemode == GM_STEAL && t == T_PURPLE && team_flags[t].empty())
		return;
	// Otherwise okay (various checks already made prior to calling this):
	fit->set_col(team_colour[t]);
	fit->set_misc(t);
	team_flags[t].push_back(fit);
	string msg = str_team[t] + " team captured the "
		+ long_sector_name[Game::curmap->coords_in_sector(fit->getpos())]
		+ " flag!";
	Network::construct_msg(msg, team_colour[t]);
	Network::broadcast();
	// In dominion&conquest this always changes objective status:
	if(gamemode == GM_DOM || gamemode == GM_CONQ)
		Game::send_team_upds(cur_players.end());
	Game::send_flag_upds(cur_players.end());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
leaq 0x1ca69(%rip), %r15     # 0x44224
leaq 0x1e73e(%rip), %rax     # 0x45f00
cmpl $0x1, %esi
jne 0x277db
cmpl $0x2, (%r15)
jne 0x277db
leaq 0x18(%rax), %rcx
cmpq %rcx, 0x18(%rax)
je 0x279ab
movl %esi, %r12d
leaq 0xd9a3(%rip), %rcx      # 0x35188
movb (%r12,%rcx), %r13b
movb %r13b, 0x1d(%rbx)
movb %sil, 0x1f(%rbx)
leaq (%r12,%r12,2), %rcx
leaq (%rax,%rcx,8), %r14
movl $0x18, %edi
callq 0x43e0
movq %rbx, 0x10(%rax)
movq %rax, %rdi
movq %r14, %rsi
callq 0x4060
incq 0x10(%r14)
shlq $0x5, %r12
leaq 0x1f2af(%rip), %rax     # 0x46ad0
leaq -0x40(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq (%r12,%rax), %rsi
movq 0x8(%r12,%rax), %rdx
addq %rsi, %rdx
leaq -0x50(%rbp), %r14
movq %r14, %rdi
callq 0xf988
leaq 0xddd2(%rip), %rsi      # 0x3561a
movq %r14, %rdi
callq 0x47b0
leaq 0x1d411(%rip), %rax     # 0x44c68
movq (%rax), %rdi
movl 0x18(%rbx), %eax
leaq -0x2c(%rbp), %rsi
movl %eax, (%rsi)
callq 0x172ce
movl %eax, %eax
shlq $0x5, %rax
leaq 0x1f2fb(%rip), %rcx     # 0x46b70
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
leaq -0x50(%rbp), %rdi
callq 0x4130
leaq -0x80(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x278ae
movq %rdx, -0x90(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x80(%rbp)
jmp 0x278b4
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
leaq -0x90(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xdd55(%rip), %rsi      # 0x3562e
callq 0x47b0
leaq -0x60(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x27902
movq %rdx, -0x70(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x60(%rbp)
jmp 0x27909
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, -0x68(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
je 0x27938
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x2795a
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x43f0
movzbl %r13b, %esi
leaq -0x70(%rbp), %rdi
callq 0xf3f0
leaq 0x197ba(%rip), %rsi     # 0x41128
movl $0xffff, %edi           # imm = 0xFFFF
callq 0xe3b3
cmpl $0x1, (%r15)
ja 0x2798a
leaq 0x1b73b(%rip), %rdi     # 0x430c0
callq 0x19e31
leaq 0x1b72f(%rip), %rdi     # 0x430c0
callq 0x1b1ac
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0x279ab
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x43f0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x279e0
jmp 0x279e0
movq %rax, %r15
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
je 0x279f5
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x279f5
movq %rax, %r15
jmp 0x279fe
movq %rax, %r15
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0x27a17
movq -0x60(%rbp), %rsi
jmp 0x27a0f
movq %rax, %r15
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x27a17
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %r15, %rdi
callq 0x4740