// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/chores.cpp
// Function: player_death(std::_List_iterator<Player>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
void player_death(const list<Player>::iterator pit, const string &way,
	const bool corpse)
{
	string msg = pit->nick + way;
	Network::construct_msg(msg, DEF_MSG_COL);
	Network::broadcast();
	pit->stats_i->deaths++;
	pit->needs_state_upd = true;
	Coords pos;
	// Item carrier leaves no corpse! Also, if the place is a water square,
	// do not generate a corpse:
	if(corpse && pit != pl_with_item &&
		!(Game::curmap->mod_tile((pos = pit->own_pc->getpos()))->flags & TF_DROWNS))
	{
		// If there is already a corpse there, this corpse "overrules" the
		// older one. But if there is some other noccent there, do not cover
		// it with a corpse.
		list<NOccEnt>::iterator enoe = any_noccent_at(pos, NOE_CORPSE);
		if(enoe != noccents[NOE_CORPSE].end())
		{
			enoe->set_col(team_colour[pit->team]);
			enoe->set_misc(CORPSE_DECAY_TURNS);
		}
		else
		{
			Tile* tp = Game::curmap->mod_tile(pos);
			if(!(tp->flags & TF_NOCCENT))
			{
				noccents[NOE_CORPSE].push_back(NOccEnt(pos, '%',
					team_colour[pit->team], CORPSE_DECAY_TURNS)); 
				tp->flags |= TF_NOCCENT;
			}
		}
	}
	kill_player(pit);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %r14d
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x98(%rdi), %rsi
leaq -0x60(%rbp), %r15
movq %r15, %rdi
callq 0x1483d
movq %r15, %rdi
movl $0xf, %esi
callq 0xf4ed
leaq 0x1c4a4(%rip), %rsi     # 0x41128
movl $0xffff, %edi           # imm = 0xFFFF
callq 0xe383
movq 0x90(%rbx), %rax
incq 0x40(%rax)
movb $0x1, 0x15d(%rbx)
leaq -0x2c(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2bbe8
leaq 0x21354(%rip), %rax     # 0x46008
cmpq %rbx, (%rax)
setne %al
andb %r14b, %al
cmpb $0x1, %al
jne 0x24cfb
leaq 0x1ffa0(%rip), %rcx     # 0x44c68
movq (%rcx), %rcx
movq 0x148(%rbx), %rdx
movl 0x8(%rdx), %edx
movl %edx, -0x30(%rbp)
movl %edx, -0x2c(%rbp)
movswq -0x2a(%rbp), %rsi
movq 0x8(%rcx), %rcx
leaq (%rsi,%rsi,2), %rsi
movswq %dx, %rdx
movq (%rcx,%rsi,8), %rcx
testb $0x4, 0x1(%rcx,%rdx,4)
sete %r14b
jmp 0x24cfe
xorl %r14d, %r14d
testb %al, %al
je 0x24d0b
leaq -0x30(%rbp), %rdi
callq 0x2bbf6
testb %r14b, %r14b
je 0x24dfe
leaq -0x2c(%rbp), %rdi
xorl %esi, %esi
callq 0x2149b
cmpq 0x1b2a2(%rip), %rax     # 0x3ffc8
je 0x24d44
movl 0xbc(%rbx), %ecx
leaq 0x10463(%rip), %rdx     # 0x35198
movb (%rcx,%rdx), %cl
movb %cl, 0x1d(%rax)
movb $0x3c, 0x1f(%rax)
jmp 0x24dfe
leaq 0x1ff1d(%rip), %rax     # 0x44c68
movq (%rax), %rax
movswq -0x2a(%rbp), %rcx
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
movswq -0x2c(%rbp), %r12
movq (%rax,%rcx,8), %r13
testb $0x20, (%r13,%r12,4)
jne 0x24dfe
movl 0xbc(%rbx), %eax
leaq 0x1041b(%rip), %rcx     # 0x35198
movsbl (%rax,%rcx), %ecx
leaq -0x40(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
movl $0x25, %edx
movl $0x3c, %r8d
callq 0x21fa8
movl $0x20, %edi
callq 0x43e0
leaq 0x1ae26(%rip), %rcx     # 0x3fbd0
addq $0x10, %rcx
movq %rcx, 0x10(%rax)
leaq -0x40(%rbp), %r14
movl 0x8(%r14), %ecx
movl 0xb(%r14), %edx
movl %ecx, 0x18(%rax)
movl %edx, 0x1b(%rax)
leaq 0x1ae3d(%rip), %rcx     # 0x3fc08
addq $0x10, %rcx
movq %rcx, 0x10(%rax)
movb 0xf(%r14), %cl
movb %cl, 0x1f(%rax)
leaq 0x20fdf(%rip), %r15     # 0x45dc0
movq %rax, %rdi
movq %r15, %rsi
callq 0x4060
incq 0x10(%r15)
movq %r14, %rdi
callq 0x21f6c
orb $0x20, (%r13,%r12,4)
movq %rbx, %rdi
callq 0x2589b
leaq -0x2c(%rbp), %rdi
callq 0x2bbf6
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24e28
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x43f0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x21f6c
jmp 0x24e4c
jmp 0x24e49
jmp 0x24e49
movq %rax, %rbx
leaq -0x2c(%rbp), %rdi
callq 0x2bbf6
jmp 0x24e5c
jmp 0x24e59
movq %rax, %rbx
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24e75
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4750