// File: /workspace/github_cpp_makefile_star2_O3/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 0x146ff
movq %r15, %rdi
movl $0xf, %esi
callq 0xf3f0
leaq 0x1c6fb(%rip), %rsi     # 0x41128
movl $0xffff, %edi           # imm = 0xFFFF
callq 0xe3b3
movq 0x90(%rbx), %rax
incq 0x40(%rax)
movb $0x1, 0x15d(%rbx)
leaq -0x2c(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2b798
testb %r14b, %r14b
je 0x24b88
leaq 0x215a2(%rip), %rax     # 0x46008
cmpq %rbx, (%rax)
je 0x24b88
leaq 0x201f2(%rip), %r14     # 0x44c68
movq (%r14), %rax
movq 0x148(%rbx), %rcx
movl 0x8(%rcx), %ecx
leaq -0x40(%rbp), %rdi
movl %ecx, (%rdi)
movl %ecx, -0x2c(%rbp)
movswq %cx, %rdx
shrl $0x10, %ecx
movswq %cx, %rcx
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
movq (%rax,%rcx,8), %rax
movzwl (%rax,%rdx,4), %r15d
callq 0x2b7a6
btl $0xa, %r15d
jb 0x24b88
leaq -0x2c(%rbp), %rdi
xorl %esi, %esi
callq 0x212c0
cmpq 0x1b4f6(%rip), %rax     # 0x3ffc0
je 0x24ae8
movl 0xbc(%rbx), %ecx
leaq 0x106af(%rip), %rdx     # 0x35188
movb (%rcx,%rdx), %cl
movb %cl, 0x1d(%rax)
movb $0x3c, 0x1f(%rax)
jmp 0x24b88
movq (%r14), %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 0x24b88
movl 0xbc(%rbx), %eax
leaq 0x10672(%rip), %rcx     # 0x35188
movsbl (%rax,%rcx), %ecx
leaq -0x40(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
movl $0x25, %edx
movl $0x3c, %r8d
callq 0x21d38
movl $0x20, %edi
callq 0x43e0
leaq -0x40(%rbp), %r14
movl 0x8(%r14), %ecx
movl 0xb(%r14), %edx
movl %edx, 0x1b(%rax)
movl %ecx, 0x18(%rax)
leaq 0x1b063(%rip), %rcx     # 0x3fbb8
addq $0x10, %rcx
movq %rcx, 0x10(%rax)
movb 0xf(%r14), %cl
movb %cl, 0x1f(%rax)
leaq 0x21255(%rip), %r15     # 0x45dc0
movq %rax, %rdi
movq %r15, %rsi
callq 0x4060
incq 0x10(%r15)
movq %r14, %rdi
callq 0x21cfc
orb $0x20, (%r13,%r12,4)
movq %rbx, %rdi
callq 0x25636
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24bb2
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 0x21cfc
jmp 0x24bd6
jmp 0x24bd3
jmp 0x24bd3
movq %rax, %rbx
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
jmp 0x24be6
jmp 0x24be3
movq %rax, %rbx
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24bff
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4740