// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x38, %rsp
movl %edx, %r14d
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x98(%rdi), %rsi
leaq -0x50(%rbp), %r15
movq %r15, %rdi
callq 0xfe1f
pushq $0xf
popq %rsi
movq %r15, %rdi
callq 0xc0f2
leaq 0x1ed4a(%rip), %rsi     # 0x3e118
movl $0xffff, %edi           # imm = 0xFFFF
callq 0xb61b
movq 0x90(%rbx), %rax
incq 0x40(%rax)
movb $0x1, 0x15d(%rbx)
leaq -0x1c(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x24d90
testb %r14b, %r14b
je 0x1f4e9
leaq 0x23bf1(%rip), %rax     # 0x42ff8
cmpq %rbx, (%rax)
je 0x1f4e9
leaq 0x22841(%rip), %r14     # 0x41c58
movq (%r14), %rax
movq 0x148(%rbx), %rcx
movl 0x8(%rcx), %ecx
leaq -0x30(%rbp), %rdi
movl %ecx, (%rdi)
movl %ecx, -0x1c(%rbp)
movswq %cx, %rdx
shrl $0x10, %ecx
movswq %cx, %rcx
movq 0x8(%rax), %rax
imulq $0x18, %rcx, %rcx
movq (%rax,%rcx), %rax
movzwl (%rax,%rdx,4), %r15d
callq 0x24d9e
btl $0xa, %r15d
jb 0x1f4e9
leaq -0x1c(%rbp), %rdi
xorl %esi, %esi
callq 0x1ba5b
cmpq 0x1db5d(%rip), %rax     # 0x3cfc8
je 0x1f486
movl 0xbc(%rbx), %ecx
leaq 0xfd5e(%rip), %rdx      # 0x2f1d8
movb (%rcx,%rdx), %cl
movb %cl, 0x1d(%rax)
movb $0x3c, 0x1f(%rax)
jmp 0x1f4e9
movq (%r14), %rax
movswq -0x1a(%rbp), %rcx
movq 0x8(%rax), %rax
imulq $0x18, %rcx, %rcx
movswq -0x1c(%rbp), %r14
movq (%rax,%rcx), %r15
testb $0x20, (%r15,%r14,4)
jne 0x1f4e9
movl 0xbc(%rbx), %eax
leaq 0xfd25(%rip), %rcx      # 0x2f1d8
movsbl (%rax,%rcx), %ecx
leaq -0x30(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
pushq $0x25
popq %rdx
pushq $0x3c
popq %r8
callq 0x1ca04
leaq 0x238de(%rip), %rdi     # 0x42db0
leaq -0x30(%rbp), %rsi
callq 0x1c222
leaq -0x30(%rbp), %rdi
callq 0x1c9c8
orb $0x20, (%r15,%r14,4)
movq %rbx, %rdi
callq 0x1fe5c
leaq -0x1c(%rbp), %rdi
callq 0x24d9e
leaq -0x50(%rbp), %rdi
callq 0x47e8
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x1c9c8
jmp 0x1f523
jmp 0x1f520
jmp 0x1f520
movq %rax, %rbx
leaq -0x1c(%rbp), %rdi
callq 0x24d9e
jmp 0x1f533
jmp 0x1f530
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x47e8
movq %rbx, %rdi
callq 0x4710