LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/actives.cpp
// Function: render_occent_at(Coords const&, char*, bool)
bool render_occent_at(const Coords &c, char *target, const bool lit)
{
	for(list<OccEnt>::const_iterator b_it = boulders.begin();
		b_it != boulders.end(); ++b_it)
	{
		if(b_it->getpos() == c)
		{
			b_it->draw(target, lit);
			return true;
		}
	}
	for(list<Arrow>::const_iterator a_it = arrows.begin();
		a_it != arrows.end(); ++a_it)
	{
		if(a_it->getpos() == c)
		{
			a_it->draw(target, lit);
			return true;
		}
	}
	// NOTE: passing false to mms and zaps since they are self-lighting and
	// thus have no separate "lit colour"
	for(list<MM>::const_iterator m_it = MMs.begin(); m_it != MMs.end(); ++m_it)
	{
		if(m_it->getpos() == c)
		{
			m_it->draw(target, false);
			return true;
		}
	}
	for(list<Zap>::const_iterator z_it = zaps.begin(); z_it != zaps.end(); ++z_it)
	{
		if(z_it->getpos() == c)
		{
			z_it->draw(target, false);
			return true;
		}
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdi, %r15
leaq 0x25025(%rip), %r12     # 0x45e80
leaq -0x2c(%rbp), %r13
movq %r12, %r14
movq (%r14), %r14
cmpq %r12, %r14
je 0x20e8c
movl 0x18(%r14), %eax
movl %eax, -0x2c(%rbp)
movq %r13, %rdi
movq %r15, %rsi
callq 0x2b962
movl %eax, %ebx
movq %r13, %rdi
callq 0x2b7a6
testb %bl, %bl
je 0x20e62
jmp 0x20ec2
leaq 0x25005(%rip), %r12     # 0x45e98
leaq -0x2c(%rbp), %r13
movq %r12, %r14
movq (%r14), %r14
cmpq %r12, %r14
je 0x20ec7
movl 0x18(%r14), %eax
movl %eax, -0x2c(%rbp)
movq %r13, %rdi
movq %r15, %rsi
callq 0x2b962
movl %eax, %ebx
movq %r13, %rdi
callq 0x2b7a6
testb %bl, %bl
je 0x20e9a
movl -0x30(%rbp), %eax
jmp 0x20f37
leaq 0x24fe2(%rip), %r13     # 0x45eb0
leaq -0x2c(%rbp), %r12
movq %r13, %r14
movq (%r14), %r14
cmpq %r13, %r14
je 0x20eff
movl 0x18(%r14), %eax
movl %eax, -0x2c(%rbp)
movq %r12, %rdi
movq %r15, %rsi
callq 0x2b962
movl %eax, %ebx
movq %r12, %rdi
callq 0x2b7a6
testb %bl, %bl
je 0x20ed5
jmp 0x20f35
leaq 0x24fc2(%rip), %r13     # 0x45ec8
leaq -0x2c(%rbp), %r12
movq %r13, %r14
movq (%r14), %r14
cmpq %r13, %r14
je 0x20f5b
movl 0x18(%r14), %eax
movl %eax, -0x2c(%rbp)
movq %r12, %rdi
movq %r15, %rsi
callq 0x2b962
movl %eax, %ebx
movq %r12, %rdi
callq 0x2b7a6
testb %bl, %bl
je 0x20f0d
xorl %eax, %eax
addq $0x10, %r14
movzbl %al, %edx
movq %r14, %rdi
movq -0x38(%rbp), %rsi
callq 0x21d1a
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x20f4c
jmp 0x20f65
jmp 0x20f65
jmp 0x20f65
movq %rax, %rbx
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
movq %rbx, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/actives.cpp
// Function: render_noccent_at(Coords const&, char*, bool)
void render_noccent_at(const Coords &c, char *target, const bool lit)
{
	list<NOccEnt>::const_iterator it;
	// NOTE: do not draw traps here.
	for(char i = NOE_CORPSE; i < NOE_TORCH; ++i)
	{
		for(it = noccents[i].begin(); it != noccents[i].end(); ++it)
		{
			if(it->getpos() == c)
			{
				it->draw(target, lit);
				return;
			}
		}
	}
	// NOTE: passing false to torches always since they are self-lighting and
	// thus have no separate "lit colour"
	for(it = noccents[NOE_TORCH].begin(); it != noccents[NOE_TORCH].end(); ++it)
	{
		if(it->getpos() == c)
		{
			it->draw(target, false);
			return;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, -0x34(%rbp)
movq %rsi, -0x40(%rbp)
movq %rdi, %r14
xorl %eax, %eax
leaq 0x24e23(%rip), %rcx     # 0x45dc0
leaq -0x30(%rbp), %r13
movq %rax, -0x48(%rbp)
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %r12
movq %r12, %r15
movq (%r15), %r15
cmpq %r12, %r15
je 0x20fda
movl 0x18(%r15), %eax
movl %eax, -0x30(%rbp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x2b962
movl %eax, %ebx
movq %r13, %rdi
callq 0x2b7a6
testb %bl, %bl
je 0x20fb0
jmp 0x2102a
movq -0x48(%rbp), %rax
incq %rax
cmpq $0x6, %rax
leaq 0x24dd4(%rip), %rcx     # 0x45dc0
jne 0x20fa1
leaq 0x24e5b(%rip), %rbx     # 0x45e50
leaq -0x2c(%rbp), %r12
movq %rbx, %r15
movq (%r15), %r15
cmpq %rbx, %r15
je 0x21040
movl 0x18(%r15), %eax
movl %eax, -0x2c(%rbp)
movq %r12, %rdi
movq %r14, %rsi
callq 0x2b962
movl %eax, %r13d
movq %r12, %rdi
callq 0x2b7a6
xorl %eax, %eax
testb %r13b, %r13b
je 0x20ffc
jmp 0x2102d
movl -0x34(%rbp), %eax
addq $0x10, %r15
movzbl %al, %edx
movq %r15, %rdi
movq -0x40(%rbp), %rsi
callq 0x21d1a
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x2c(%rbp), %rdi
jmp 0x2105f
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x2b7a6
movq %rbx, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/actives.cpp
// Function: any_pc_at(Coords const&)
list<PCEnt>::iterator any_pc_at(const Coords &c)
{
	list<PCEnt>::iterator it;
	for(it = PCs.begin(); it != PCs.end(); ++it)
	{
		if(it->getpos() == c && !it->isvoid())
			break;
	}
	return it;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x24ca1(%rip), %r12     # 0x45ee0
leaq 0x24c9a(%rip), %rbx     # 0x45ee0
cmpq %rbx, %r12
je 0x2129a
movq %rdi, %r14
leaq -0x2c(%rbp), %r15
leaq 0x24c87(%rip), %rbx     # 0x45ee0
movl 0x18(%r12), %eax
movl %eax, -0x2c(%rbp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x2b962
testb %al, %al
je 0x21284
movb 0x1e(%r12), %r13b
movq %r15, %rdi
callq 0x2b7a6
testb %r13b, %r13b
jne 0x2128c
jmp 0x21297
movq %r15, %rdi
callq 0x2b7a6
movq (%r12), %r12
cmpq %rbx, %r12
jne 0x21259
jmp 0x2129a
movq %r12, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
movq %rbx, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/actives.cpp
// Function: any_noccent_at(Coords const&, e_Noccent)
list<NOccEnt>::iterator any_noccent_at(const Coords &c, const e_Noccent type)
{
	list<NOccEnt>::iterator it;
	for(it = noccents[type].begin(); it != noccents[type].end(); ++it)
	{
		// actually, most noccents are never voided, but we make the check for all
		if(it->getpos() == c && !it->isvoid())
			break;
	}
	return it;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %eax
leaq (%rax,%rax,2), %rax
leaq 0x24ae5(%rip), %rcx     # 0x45dc0
leaq (%rcx,%rax,8), %r12
movq (%r12), %rbx
cmpq %r12, %rbx
je 0x21327
movq %rdi, %r14
leaq -0x2c(%rbp), %r15
movl 0x18(%rbx), %eax
movl %eax, -0x2c(%rbp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x2b962
testb %al, %al
je 0x21317
movb 0x1e(%rbx), %r13b
movq %r15, %rdi
callq 0x2b7a6
testb %r13b, %r13b
jne 0x2131f
jmp 0x21327
movq %r15, %rdi
callq 0x2b7a6
movq (%rbx), %rbx
cmpq %r12, %rbx
jne 0x212ef
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
movq %rbx, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/actives.cpp
// Function: any_trap_at(Coords const&)
list<Trap>::iterator any_trap_at(const Coords &c)
{
	list<Trap>::iterator it;
	for(it = traps.begin(); it != traps.end(); ++it)
	{
		if(it->getpos() == c && !it->isvoid())
			break;
	}
	return it;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x24b06(%rip), %r12     # 0x45e68
leaq 0x24aff(%rip), %rbx     # 0x45e68
cmpq %rbx, %r12
je 0x213bd
movq %rdi, %r14
leaq -0x2c(%rbp), %r15
leaq 0x24aec(%rip), %rbx     # 0x45e68
movl 0x18(%r12), %eax
movl %eax, -0x2c(%rbp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x2b962
testb %al, %al
je 0x213a7
movb 0x1e(%r12), %r13b
movq %r15, %rdi
callq 0x2b7a6
testb %r13b, %r13b
jne 0x213af
jmp 0x213ba
movq %r15, %rdi
callq 0x2b7a6
movq (%r12), %r12
cmpq %rbx, %r12
jne 0x2137c
jmp 0x213bd
movq %r12, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
movq %rbx, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/actives.cpp
// Function: any_boulder_at(Coords const&)
list<OccEnt>::iterator any_boulder_at(const Coords &c)
{
	list<OccEnt>::iterator it;
	for(it = boulders.begin(); it != boulders.end(); ++it)
	{
		if(it->getpos() == c && !it->isvoid())
			break;
	}
	return it;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x24a88(%rip), %r12     # 0x45e80
leaq 0x24a81(%rip), %rbx     # 0x45e80
cmpq %rbx, %r12
je 0x21453
movq %rdi, %r14
leaq -0x2c(%rbp), %r15
leaq 0x24a6e(%rip), %rbx     # 0x45e80
movl 0x18(%r12), %eax
movl %eax, -0x2c(%rbp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x2b962
testb %al, %al
je 0x2143d
movb 0x1e(%r12), %r13b
movq %r15, %rdi
callq 0x2b7a6
testb %r13b, %r13b
jne 0x21445
jmp 0x21450
movq %r15, %rdi
callq 0x2b7a6
movq (%r12), %r12
cmpq %rbx, %r12
jne 0x21412
jmp 0x21453
movq %r12, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
movq %rbx, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/actives.cpp
// Function: any_missile_at(Coords const&)
OwnedEnt* any_missile_at(const Coords &c)
{
	for(list<Arrow>::iterator a_it = arrows.begin(); a_it != arrows.end(); ++a_it)
	{
		if(!a_it->isvoid() && a_it->getpos() == c)
			return &(*a_it);
	}
	for(list<MM>::iterator m_it = MMs.begin(); m_it != MMs.end(); ++m_it)
	{
		if(!m_it->isvoid() && m_it->getpos() == c)
			return &(*m_it);
	}
	for(list<Zap>::iterator z_it = zaps.begin(); z_it != zaps.end(); ++z_it)
	{
		if(!z_it->isvoid() && z_it->getpos() == c)
			return &(*z_it);
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movq 0x24a04(%rip), %rbx     # 0x45e98
leaq 0x249fd(%rip), %r13     # 0x45e98
cmpq %r13, %rbx
je 0x214d7
leaq -0x34(%rbp), %r15
cmpb $0x0, 0x1e(%rbx)
jne 0x214cf
movl 0x18(%rbx), %eax
movl %eax, -0x34(%rbp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x2b962
movl %eax, %r12d
movq %r15, %rdi
callq 0x2b7a6
testb %r12b, %r12b
jne 0x2156f
movq (%rbx), %rbx
cmpq %r13, %rbx
jne 0x214a4
movq 0x249d2(%rip), %rbx     # 0x45eb0
leaq 0x249cb(%rip), %r13     # 0x45eb0
cmpq %r13, %rbx
je 0x2151d
leaq -0x30(%rbp), %r15
cmpb $0x0, 0x1e(%rbx)
jne 0x21515
movl 0x18(%rbx), %eax
movl %eax, -0x30(%rbp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x2b962
movl %eax, %r12d
movq %r15, %rdi
callq 0x2b7a6
testb %r12b, %r12b
jne 0x2156f
movq (%rbx), %rbx
cmpq %r13, %rbx
jne 0x214ee
movq 0x249a4(%rip), %r13     # 0x45ec8
leaq 0x2499d(%rip), %r15     # 0x45ec8
cmpq %r15, %r13
je 0x21575
movq %r14, -0x40(%rbp)
xorl %ebx, %ebx
leaq -0x2c(%rbp), %r14
cmpb $0x0, 0x1e(%r13)
jne 0x21564
movl 0x18(%r13), %eax
movl %eax, -0x2c(%rbp)
movq %r14, %rdi
movq -0x40(%rbp), %rsi
callq 0x2b962
movl %eax, %r12d
movq %r14, %rdi
callq 0x2b7a6
testb %r12b, %r12b
jne 0x21579
movq (%r13), %r13
cmpq %r15, %r13
jne 0x2153a
jmp 0x21580
addq $0x10, %rbx
jmp 0x21580
xorl %ebx, %ebx
jmp 0x21580
addq $0x10, %r13
movq %r13, %rbx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x2c(%rbp), %rdi
jmp 0x215ab
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
jmp 0x215ab
movq %rax, %rbx
leaq -0x34(%rbp), %rdi
callq 0x2b7a6
movq %rbx, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/noccent.cpp
// Function: NOccEnt::update()
void NOccEnt::update()
{
	// At the moment this gets called only for corpses!
	if(!(--misc))
	{
		makevoid();
		Game::curmap->mod_tile(pos)->flags &= ~(TF_NOCCENT);
	}
}

// Assembly:
decb 0xf(%rdi)
je 0x21d64
retq
pushq %rbp
movq %rsp, %rbp
movb $0x1, 0xe(%rdi)
leaq 0x22ef5(%rip), %rax     # 0x44c68
movq (%rax), %rax
movswq 0xa(%rdi), %rcx
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
movswq 0x8(%rdi), %rdx
movq (%rax,%rcx,8), %rax
andw $-0x21, (%rax,%rdx,4)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/occent.cpp
// Function: Arrow::update()
void Arrow::update()
{
	if(madevoid)
		return;
	event_set.insert(pos); // in any event, arrow moves away
	Game::curmap->mod_tile(pos)->flags &= ~(TF_OCCUPIED);

	for(char ch = 0; ch < ARROW_TILES_PER_TURN; ++ch)
	{
		if(missile_coll(this, path.front()))
			return; // missile_coll should have voided *this
		// else
		pos = path.front();
		path.pop_front();
		if(path.empty()) // this is where the arrow falls
		{
			arrow_fall(this, pos);
			makevoid(); // occupied flag has been unset
			return;
		}
	}
	// Flew all the way without hitting anything; update for drawing:
	Game::curmap->mod_tile(pos)->flags |= TF_OCCUPIED;
	event_set.insert(pos);
	symbol = arrowpath_sym[pos.dir_of(path.front())];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpb $0x0, 0xe(%rdi)
jne 0x2222b
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
leaq 0x23e84(%rip), %rdi     # 0x45fd8
movq %r14, %rsi
callq 0x21934
leaq 0x22b05(%rip), %r12     # 0x44c68
movq (%r12), %rax
movswq 0xa(%rbx), %rcx
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
movswq 0x8(%rbx), %rdx
movq (%rax,%rcx,8), %rax
andw $-0x41, (%rax,%rdx,4)
leaq 0x18(%rbx), %r15
movq 0x18(%rbx), %rsi
movb $0x3, %r13b
addq $0x10, %rsi
movq %rbx, %rdi
callq 0x26713
testb %al, %al
jne 0x2222b
movq (%r15), %rsi
movl 0x10(%rsi), %eax
movl %eax, (%r14)
movq %r15, %rdi
callq 0x1f3ea
movq (%r15), %rsi
cmpq %r15, %rsi
je 0x2221c
decb %r13b
jne 0x2218d
movq (%r12), %rax
movswq 0xa(%rbx), %rcx
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
movswq 0x8(%rbx), %rdx
movq (%rax,%rcx,8), %rax
orw $0x40, (%rax,%rdx,4)
leaq 0x23df3(%rip), %rdi     # 0x45fd8
movq %r14, %rsi
callq 0x21934
movq 0x18(%rbx), %rax
movl 0x10(%rax), %eax
leaq -0x2c(%rbp), %rsi
movl %eax, (%rsi)
movq %r14, %rdi
callq 0x2b8b6
movl %eax, %eax
leaq 0x10f01(%rip), %rcx     # 0x3310c
movb (%rax,%rcx), %al
movb %al, 0xc(%rbx)
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
jmp 0x2222b
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2725c
movb $0x1, 0xe(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
movq %rbx, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/occent.cpp
// Function: Zap::update()
void Zap::update()
{
	if(madevoid)
		return;
	if(bounces == -1) // indicates the first call to update()
		++bounces;
	else // not the first move; should vacate position:
	{
		event_set.insert(pos);
		Game::curmap->mod_tile(pos)->flags &= ~(TF_OCCUPIED);
	}

	for(char ch = 0; ch < ZAP_TILES_PER_TURN; ++ch)
	{
		if(missile_coll(this, pos.in(dir)))
		{
			// For zaps, missile_coll returns true if we (A) have been voided
			// by hitting something, or (B) hit a PC and _should_ void ourselves
			// if that was the final tile for this round.
			if(isvoid())
				return; // *this voided, possibly via a returning bounce() call
			//else
			if(ch == ZAP_TILES_PER_TURN-1) // hit something and are at the last tile
			{
				makevoid(); // occupied flag has been unset
				return;
			}
			// else we hit a PC and will pass right through her
		}
		pos = pos.in(dir);
	}
	// Travelled all the way without hitting anything.
	if(++travelled > ZAP_TRAVEL_DIST)
		makevoid();
	else
	{
		// Update for drawing:
		Game::curmap->mod_tile(pos)->flags |= TF_OCCUPIED;
		event_set.insert(pos);
		symbol = zappath_sym[dir];
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpb $0x0, 0xe(%rdi)
jne 0x22798
movq %rdi, %rbx
cmpb $-0x1, 0x1c(%rdi)
je 0x226c4
leaq 0x8(%rbx), %rsi
leaq 0x23940(%rip), %rdi     # 0x45fd8
callq 0x21934
leaq 0x225c4(%rip), %rax     # 0x44c68
movq (%rax), %rax
movswq 0xa(%rbx), %rcx
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
movswq 0x8(%rbx), %rdx
movq (%rax,%rcx,8), %rax
andw $-0x41, (%rax,%rdx,4)
jmp 0x226c8
movb $0x0, 0x1c(%rbx)
leaq 0x8(%rbx), %rsi
movb $0x1, %r12b
xorl %r15d, %r15d
leaq -0x2c(%rbp), %r13
movl 0x18(%rbx), %edx
movq %r13, %rdi
movq %rsi, %r14
callq 0x2b818
movq %rbx, %rdi
movq %r13, %rsi
callq 0x26713
movq %r13, %rdi
movl %eax, %r13d
callq 0x2b7a6
testb %r13b, %r13b
je 0x2270f
cmpb $0x0, 0xe(%rbx)
jne 0x22798
testb $0x1, %r15b
jne 0x22751
movl 0x18(%rbx), %edx
leaq -0x30(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x2b818
movl -0x30(%rbp), %eax
movl %eax, 0x8(%rbx)
movq %r15, %rdi
callq 0x2b7a6
movb $0x1, %r15b
testb $0x1, %r12b
movl $0x0, %r12d
leaq -0x2c(%rbp), %r13
movq %r14, %rsi
jne 0x226d6
movb 0x1d(%rbx), %al
incb %al
movb %al, 0x1d(%rbx)
cmpb $0x7, %al
jl 0x22757
movb $0x1, 0xe(%rbx)
jmp 0x22798
leaq 0x2250a(%rip), %rax     # 0x44c68
movq (%rax), %rax
movswq 0xa(%rbx), %rcx
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
movswq 0x8(%rbx), %rdx
movq (%rax,%rcx,8), %rax
orw $0x40, (%rax,%rdx,4)
leaq 0x23855(%rip), %rdi     # 0x45fd8
callq 0x21934
movl 0x18(%rbx), %eax
leaq 0x10983(%rip), %rcx     # 0x33115
movb (%rax,%rcx), %al
movb %al, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
movq %rbx, %rdi
callq 0x4740
nop
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/occent.cpp
// Function: Zap::hit_tree()
bool Zap::hit_tree()
{
	/* Chance to hit trees depends on distance travelled and whether has
	 * bounced: */
	char chance;
	if(bounces > 0)
		chance = 70;
	else
	{
		chance = 10;
		if(travelled > 2)
			chance += (travelled - 2)*20;
	}
	/* Chance when hasn't bounced yet is 10% when travelled <= 2 tiles, 70% when
	 * has travelled >= 5 tiles, and linearly in between. */
	return random()%100 < chance;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x46, %ebx
cmpb $0x0, 0x1c(%rdi)
jg 0x227e8
movb 0x1d(%rdi), %al
movl $0xa, %ebx
cmpb $0x3, %al
jl 0x227e8
movzbl %al, %eax
shll $0x2, %eax
leal (%rax,%rax,4), %eax
addb $-0x1e, %al
movsbq %al, %rbx
callq 0x41d0
movq %rax, %rcx
movabsq $-0x5c28f5c28f5c28f5, %rdx # imm = 0xA3D70A3D70A3D70B
imulq %rdx
addq %rcx, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x6, %rdx
addq %rax, %rdx
imulq $0x64, %rdx, %rax
subq %rax, %rcx
cmpq %rbx, %rcx
setl %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/occent.cpp
// Function: Zap::bounce(e_Dir)
bool Zap::bounce(const e_Dir nd)
{
	if(++bounces == MAX_ZAP_BOUNCES)
	{
		makevoid();
		// This is called only via missile_coll, which is called only via this->update(),
		// occupied flag has been unset.
		return true;
	}
	travelled = 0;
	dir = nd;
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb 0x1c(%rdi), %al
incb %al
movb %al, 0x1c(%rdi)
cmpb $0x7, %al
jne 0x22838
movb $0x1, 0xe(%rdi)
jmp 0x2283f
movb $0x0, 0x1d(%rdi)
movl %esi, 0x18(%rdi)
cmpb $0x7, %al
sete %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/spiral.cpp
// Function: next_nearby()
Coords next_nearby()
{
	do {
		pnt.x += coord_adds[eind % 4];
		pnt.y += coord_adds[(eind-1)%4];
		if(++lenidx == elen)
		{
			if((++eind)%2)
				++elen;
			lenidx = 0;
		}
	}
	while(pnt.x < 1 || pnt.y < 1 || pnt.x >= maxdim
		|| pnt.y >= maxdim);
	return pnt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rax
movzwl 0x23fa4(%rip), %r10d    # 0x46906
movzwl 0x23f97(%rip), %ecx     # 0x46900
movzwl 0x23f92(%rip), %edx     # 0x46902
movzwl 0x23f92(%rip), %r9d     # 0x4690a
movzwl 0x23f89(%rip), %esi     # 0x46908
movzwl 0x23f7e(%rip), %edi     # 0x46904
leaq 0x1276d(%rip), %r8      # 0x350fa
movswl %r10w, %r11d
leal 0x3(%r11), %r14d
testw %r11w, %r11w
cmovnsl %r11d, %r14d
leal -0x1(%r11), %r15d
leal 0x2(%r11), %ebx
testl %r15d, %r15d
cmovnsl %r15d, %ebx
incl %r9d
cmpw %si, %r9w
jne 0x229d6
leal 0x1(%r10), %r15d
movw %r15w, 0x23f45(%rip)    # 0x46906
testb $0x1, %r10b
jne 0x229d0
incl %esi
movw %si, 0x23f38(%rip)      # 0x46908
xorl %r9d, %r9d
movl %r15d, %r10d
andl $-0x4, %r14d
movl %r11d, %r15d
subl %r14d, %r15d
movswq %r15w, %r14
movsbl (%r14,%r8), %r14d
addl %r14d, %ecx
andl $-0x4, %ebx
negl %ebx
addl %ebx, %r11d
decl %r11d
movslq %r11d, %r11
movsbl (%r11,%r8), %r11d
addl %r11d, %edx
testw %cx, %cx
jle 0x2298d
testw %dx, %dx
jle 0x2298d
cmpw %di, %cx
jge 0x2298d
cmpw %di, %dx
jae 0x2298d
movw %cx, 0x23edb(%rip)      # 0x46900
movw %dx, 0x23ed6(%rip)      # 0x46902
movw %r9w, 0x23ed6(%rip)     # 0x4690a
movl 0x23ec6(%rip), %ecx     # 0x46900
movl %ecx, (%rax)
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/chores.cpp
// Function: (anonymous namespace)::update_lights_around(Coords const&)
void update_lights_around(const Coords &c)
{
	for(list<NOccEnt>::const_iterator it = noccents[NOE_TORCH].begin();
		it != noccents[NOE_TORCH].end(); ++it)
	{
		if(c.dist_walk(it->getpos()) <= TORCH_LIGHT_RADIUS)
			update_static_light(it->getpos());
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, -0x38(%rbp)
leaq 0x219bc(%rip), %rax     # 0x45dc0
movq 0x90(%rax), %r13
addq $0x90, %rax
cmpq %rax, %r13
je 0x24470
leaq -0x30(%rbp), %r14
leaq -0x2c(%rbp), %rbx
movl $0x90, %r15d
addq 0x1bb95(%rip), %r15     # 0x3ffc0
movl 0x18(%r13), %eax
movl %eax, -0x30(%rbp)
movq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x2b7e4
movl %eax, %r12d
movq %r14, %rdi
callq 0x2b7a6
cmpw $0x8, %r12w
jg 0x24467
movl 0x18(%r13), %eax
movl %eax, -0x2c(%rbp)
movq %rbx, %rdi
callq 0x20b88
movq %rbx, %rdi
callq 0x2b7a6
movq (%r13), %r13
cmpq %r15, %r13
jne 0x2442b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x2c(%rbp), %rdi
jmp 0x2448f
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x2b7a6
movq %rbx, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/chores.cpp
// Function: (anonymous namespace)::record_kill(std::_List_iterator<Player>, char)
void record_kill(const list<Player>::iterator pit, const char method)
{
	++(pit->stats_i->kills[method]);
	if(gamemode == GM_TDM)
	{
		int cmp = int(tdm_kills[T_GREEN]) - tdm_kills[T_PURPLE];
		++tdm_kills[pit->team];
		// First cmp = A-B, then either A or B is incremented by one, and
		// we want to know whether their relative order has changed. This
		// test suffices:
		if((int(tdm_kills[T_GREEN]) - tdm_kills[T_PURPLE])*cmp == 0)
			Game::send_team_upds(cur_players.end());
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x90(%rdi), %rax
movzbl %sil, %ecx
incq 0x48(%rax,%rcx,8)
leaq 0x1f602(%rip), %rax     # 0x44224
cmpl $0x4, (%rax)
jne 0x24c54
leaq 0x1f5fa(%rip), %rax     # 0x44228
movzwl (%rax), %ecx
movzwl 0x2(%rax), %edx
movl 0xbc(%rdi), %esi
incw (%rax,%rsi,2)
movzwl (%rax), %esi
movzwl 0x2(%rax), %eax
cmpl %edx, %ecx
setne %cl
cmpl %eax, %esi
setne %al
testb %cl, %al
je 0x24c56
popq %rbp
retq
leaq 0x1e463(%rip), %rdi     # 0x430c0
popq %rbp
jmp 0x19e31
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/chores.cpp
// Function: (anonymous namespace)::flash_at(Coords const&)
void flash_at(const Coords &pos)
{
	// Every non-assassin within LOS is blinded (note that
	// the radius is the same as for trap detection).
	char line, ind;
	Coords c;
	unsigned short f;
	list<PCEnt>::iterator pc_it;
	for(line = 0; line < DETECT_TRAPS_RAD*8; ++line)
	{
		for(ind = 0; ind < 2*DETECT_TRAPS_RAD; ind += 2)
		{
			c.x = loslookup[DETECT_TRAPS_RAD-2][line*2*DETECT_TRAPS_RAD+ind] + pos.x;
			c.y = loslookup[DETECT_TRAPS_RAD-2][line*2*DETECT_TRAPS_RAD+ind+1] + pos.y;
			if((f = Game::curmap->get_tile(c).flags) & TF_OCCUPIED)
				conditional_blind(c);
			else if(!(f & TF_SEETHRU))
				break;
		}
	}
	// At pos itself, too:
	conditional_blind(pos);
	add_sound(pos, S_ZAP);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0x2c(%rbp), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
xorl %edx, %edx
callq 0x2b798
leaq 0x10487(%rip), %r12     # 0x35230
leaq 0x1feb8(%rip), %r13     # 0x44c68
movl %r14d, -0x30(%rbp)
movslq %r14d, %rax
addq %rax, %rax
leaq (%rax,%rax,2), %r14
xorl %r15d, %r15d
movslq %r15d, %rax
addq %r14, %rax
movsbl (%r12,%rax), %ecx
addw (%rbx), %cx
movw %cx, -0x2c(%rbp)
movsbl 0x1(%r12,%rax), %eax
addw 0x2(%rbx), %ax
movw %ax, -0x2a(%rbp)
movq (%r13), %rdx
movswq %ax, %rax
movq 0x8(%rdx), %rdx
leaq (%rax,%rax,2), %rax
movswq %cx, %rcx
movq (%rdx,%rax,8), %rax
movl (%rax,%rcx,4), %eax
testb $0x40, %al
jne 0x24e06
testb $0x4, %al
jne 0x24e0f
jmp 0x24e1d
leaq -0x2c(%rbp), %rdi
callq 0x27a8d
addb $0x2, %r15b
movsbl %r15b, %r15d
cmpl $0x6, %r15d
jl 0x24dc1
movl -0x30(%rbp), %r14d
incl %r14d
cmpl $0x18, %r14d
jne 0x24db0
movq %rbx, %rdi
callq 0x27a8d
movq %rbx, %rdi
movl $0x3, %esi
callq 0x209ed
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x24e59
movq %rax, %rbx
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
movq %rbx, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/chores.cpp
// Function: (anonymous namespace)::heal_PC(std::_List_iterator<Player>)
void heal_PC(const list<Player>::iterator pit)
{
	if(pit->cl_props.hp < classes[pit->cl].hp)
	{
		/* always heal at least once, but sometimes more */
		while(++(pit->stats_i->healing_recvd) && // this first one is of course always true
			++(pit->cl_props.hp) < classes[pit->cl].hp && !(random()%4));
		pit->poisoner = cur_players.end();
		pit->needs_state_upd = true;
		add_action_ind(pit->own_pc->getpos(), A_HEAL);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movb 0x153(%rdi), %al
movl 0xc0(%rdi), %ecx
leaq (%rcx,%rcx,2), %rdx
leaq (%rcx,%rdx,4), %rcx
leaq 0x102fd(%rip), %r14     # 0x35190
cmpb 0x3(%r14,%rcx), %al
jge 0x24f0e
movq %rdi, %rbx
movq 0x90(%rbx), %rax
incq 0xa8(%rax)
je 0x24ed9
movb 0x153(%rbx), %al
incb %al
movb %al, 0x153(%rbx)
movl 0xc0(%rbx), %ecx
leaq (%rcx,%rcx,2), %rdx
leaq (%rcx,%rdx,4), %rcx
cmpb 0x3(%r14,%rcx), %al
jge 0x24ed9
callq 0x41d0
testb $0x3, %al
je 0x24e9d
leaq 0x1e1e0(%rip), %rax     # 0x430c0
movq %rax, 0x160(%rbx)
movb $0x1, 0x15d(%rbx)
movq 0x148(%rbx), %rax
movl 0x8(%rax), %eax
leaq -0x14(%rbp), %rdi
movl %eax, (%rdi)
xorl %esi, %esi
callq 0x208ed
leaq -0x14(%rbp), %rdi
callq 0x2b7a6
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x14(%rbp), %rdi
callq 0x2b7a6
movq %rbx, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/chores.cpp
// Function: (anonymous namespace)::cant_dig_in(Coords const&, e_Dir)
char cant_dig_in(const Coords &c, const e_Dir d)
{
	// Mining requires one of: (A) there is a wall/window/door, (B) there is a blocked
	// boulder, (C) there is a boulder source.
	Tile* tp = Game::curmap->mod_tile(c);
	if(tp->symbol == '#' && tp->flags & TF_WALKTHRU)
		return -1;
	if(tp->symbol == '#' || tp->symbol == '|' || tp->symbol == '-' || tp->symbol == '+'
		|| ((tp->flags & TF_NOCCENT) && any_noccent_at(c, NOE_BLOCK_SOURCE)
			!= noccents[NOE_BLOCK_SOURCE].end()))
		return 0;
	// that was (A) and (C); (B) is more complicated:
	if(tp->flags & TF_OCCUPIED && any_boulder_at(c) != boulders.end())
	{
		Coords pushtarpos = c.in(d);
		Tile *pushtar = Game::curmap->mod_tile(pushtarpos);
		if((tp->flags & TF_SLOWWALK) || (pushtar->flags & TF_OCCUPIED)
			|| !(pushtar->flags & TF_WALKTHRU) || pushtar->symbol == '\\'
			|| ((pushtar->flags & TF_NOCCENT)
			&& any_noccent_at(pushtarpos, NOE_FLAG) != noccents[NOE_FLAG].end()))
			return 0; // cannot push; hence can dig
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %r15
leaq 0x1f77e(%rip), %rax     # 0x44c68
movq (%rax), %rax
movswq 0x2(%rdi), %rcx
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
movswq (%rdi), %r13
movq (%rax,%rcx,8), %r12
movzbl 0x2(%r12,%r13,4), %eax
xorl %ebx, %ebx
cmpl $0x2c, %eax
jg 0x25523
cmpl $0x23, %eax
je 0x255fd
cmpl $0x2b, %eax
je 0x25606
jmp 0x25535
cmpl $0x2d, %eax
je 0x25606
cmpl $0x7c, %eax
je 0x25606
movzwl (%r12,%r13,4), %eax
testb $0x20, %al
je 0x25564
movq %r15, %rdi
movl $0x1, %esi
callq 0x212c0
leaq 0x2086e(%rip), %rcx     # 0x45dc0
addq $0x18, %rcx
cmpq %rcx, %rax
jne 0x255f9
movzwl (%r12,%r13,4), %eax
movb $0x1, %bl
testb $0x40, %al
je 0x25606
movq %r15, %rdi
callq 0x213e3
cmpq 0x1aa53(%rip), %rax     # 0x3ffd0
je 0x25606
leaq -0x2c(%rbp), %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x2b818
testb $0x2, (%r12,%r13,4)
jne 0x255f0
leaq 0x1f6c8(%rip), %rax     # 0x44c68
movq (%rax), %rax
movswq -0x2a(%rbp), %rcx
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,2), %rdx
movswq -0x2c(%rbp), %rcx
movq (%rax,%rdx,8), %rdx
movzwl (%rdx,%rcx,4), %eax
movl %eax, %esi
andl $0x41, %esi
cmpl $0x1, %esi
jne 0x255f0
cmpb $0x5c, 0x2(%rdx,%rcx,4)
je 0x255f0
testb $0x20, %al
je 0x25617
leaq -0x2c(%rbp), %rdi
movl $0x5, %esi
callq 0x212c0
leaq 0x207d9(%rip), %rcx     # 0x45dc0
addq $0x78, %rcx
cmpq %rcx, %rax
je 0x25617
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
xorl %ebx, %ebx
jmp 0x25606
movb (%r12,%r13,4), %bl
andb $0x1, %bl
negb %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
jmp 0x25606
movq %rax, %rbx
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
movq %rbx, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/chores.cpp
// Function: process_swaps()
void process_swaps()
{
	for(list<Player>::iterator it = cur_players.begin();
		it != cur_players.end(); ++it)
	{
		if(it->is_alive() && it->wants_to_move_to != MAX_D)
		{
			Coords tarpos = it->own_pc->getpos().in(it->wants_to_move_to);
			if(Game::curmap->get_tile(tarpos).flags & TF_OCCUPIED)
			{
				// Check if there is teammate willing to swap:
				list<PCEnt>::iterator pc_it = any_pc_at(tarpos);
				if(pc_it != PCs.end())
				{
					list<Player>::iterator pp = pc_it->get_owner();
					if(pp->team == it->team
						&& (pp->wants_to_move_to == !(it->wants_to_move_to)
						|| pp->turns_without_axn >= IDLE_TURNS_TO_AUTOSWAP))
						swap_places(pp, it);
				}
			}
			else // not occupied; can move there!
			{
				move_player_to(it, tarpos, true);
				it->wants_to_move_to = MAX_D;
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x1d805(%rip), %r13     # 0x430c0
movq (%r13), %rbx
cmpq %r13, %rbx
je 0x259be
leaq -0x30(%rbp), %r14
leaq -0x2c(%rbp), %r15
leaq 0x10(%rbx), %rdi
callq 0x12496
testb %al, %al
je 0x259b2
movl 0x13c(%rbx), %edx
cmpl $0x8, %edx
je 0x259b2
movq 0x148(%rbx), %rax
movl 0x8(%rax), %eax
movl %eax, -0x2c(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x2b818
movq %r15, %rdi
callq 0x2b7a6
leaq 0x1f351(%rip), %rax     # 0x44c68
movq (%rax), %rax
movswq -0x2e(%rbp), %rcx
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
movswq -0x30(%rbp), %rdx
movq (%rax,%rcx,8), %rax
testb $0x40, (%rax,%rdx,4)
jne 0x25952
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x24f2b
movl $0x8, 0x13c(%rbx)
jmp 0x259a6
movq %r14, %rdi
callq 0x2122a
cmpq 0x1a647(%rip), %rax     # 0x3ffa8
je 0x259a6
movq 0x20(%rax), %r12
movl 0xbc(%r12), %eax
cmpl 0xbc(%rbx), %eax
jne 0x259a6
movl 0x13c(%r12), %r15d
movl 0x13c(%rbx), %edi
callq 0x2b77c
cmpl %eax, %r15d
je 0x2599b
cmpw $0x8, 0x13a(%r12)
jb 0x259a6
movq %r12, %rdi
movq %rbx, %rsi
callq 0x259ee
movq %r14, %rdi
callq 0x2b7a6
leaq -0x2c(%rbp), %r15
movq (%rbx), %rbx
cmpq %r13, %rbx
jne 0x258d0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x259d1
jmp 0x259d1
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
jmp 0x259e1
movq %rax, %rbx
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
movq %rbx, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/chores.cpp
// Function: (anonymous namespace)::swap_places(std::_List_iterator<Player>, std::_List_iterator<Player>)
void swap_places(const list<Player>::iterator pit1, const list<Player>::iterator pit2)
{
	Coords pos1 = pit1->own_pc->getpos();
	Coords pos2 = pit2->own_pc->getpos();
	move_player_to(pit1, pos2, false);
	move_player_to(pit2, pos1, false);
	pit1->wants_to_move_to = pit2->wants_to_move_to = MAX_D;
	// A very rare possibility is that one of the players dies due to a
	// trap; we must check this:
	if(!pit1->is_alive())
		Game::curmap->mod_tile(pos1)->flags &= ~(TF_OCCUPIED);
	if(!pit2->is_alive())
		Game::curmap->mod_tile(pos2)->flags &= ~(TF_OCCUPIED);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x148(%rdi), %rax
movl 0x8(%rax), %eax
movl %eax, -0x14(%rbp)
movq 0x148(%rsi), %rax
movl 0x8(%rax), %eax
leaq -0x18(%rbp), %rsi
movl %eax, (%rsi)
xorl %edx, %edx
callq 0x24f2b
leaq -0x14(%rbp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x24f2b
movl $0x8, %eax
movl %eax, 0x13c(%rbx)
movl %eax, 0x13c(%r14)
addq $0x10, %r14
movq %r14, %rdi
callq 0x12496
addq $0x10, %rbx
testb %al, %al
jne 0x25a7c
leaq 0x1f20a(%rip), %rax     # 0x44c68
movq (%rax), %rax
movswq -0x12(%rbp), %rcx
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
movswq -0x14(%rbp), %rdx
movq (%rax,%rcx,8), %rax
andw $-0x41, (%rax,%rdx,4)
movq %rbx, %rdi
callq 0x12496
testb %al, %al
jne 0x25aad
leaq 0x1f1d9(%rip), %rax     # 0x44c68
movq (%rax), %rax
movswq -0x16(%rbp), %rcx
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
movswq -0x18(%rbp), %rdx
movq (%rax,%rcx,8), %rax
andw $-0x41, (%rax,%rdx,4)
leaq -0x18(%rbp), %rdi
callq 0x2b7a6
leaq -0x14(%rbp), %rdi
callq 0x2b7a6
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x18(%rbp), %rdi
callq 0x2b7a6
leaq -0x14(%rbp), %rdi
callq 0x2b7a6
movq %rbx, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/chores.cpp
// Function: (anonymous namespace)::test_hit(std::_List_iterator<Player>, char, char, char, char)
bool test_hit(const list<Player>::iterator def, const char tohit,
	char numdies, const char ddie, const char dadd)
{
	Coords loc = def->own_pc->getpos();
	char P = def->cl_props.dv - tohit;
	char R = random()%20;
	if(R >= P || R == 19) // hit
	{
		char dam = dadd;
		while(numdies--)
			dam += 1 + random()%ddie;
		if(R != 19 && R/P < 2) // not critical hit; apply PV
			dam -= def->cl_props.pv;
		def->cl_props.hp -= max(0, int(dam));
		def->needs_state_upd = true;
		add_action_ind(loc, A_HIT);
		return true;
	}
	add_action_ind(loc, A_MISS);
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %r12d
movl %ecx, -0x40(%rbp)
movl %edx, %r15d
movq 0x148(%rdi), %rax
movl 0x8(%rax), %eax
movl %eax, -0x2c(%rbp)
movq %rdi, -0x38(%rbp)
movb 0x158(%rdi), %bl
subb %sil, %bl
callq 0x41d0
movq %rax, %r13
movabsq $0x6666666666666667, %rcx # imm = 0x6666666666666667
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x3, %rdx
addq %rax, %rdx
shlq $0x2, %rdx
leaq (%rdx,%rdx,4), %rax
subq %rax, %r13
movsbl %bl, %ecx
cmpl %ecx, %r13d
setge %al
cmpq $0x13, %r13
sete %r14b
orb %al, %r14b
cmpb $0x1, %r14b
jne 0x265d5
movl %ecx, -0x3c(%rbp)
testb %r15b, %r15b
je 0x265e5
movsbq -0x40(%rbp), %rbx
callq 0x41d0
cqto
idivq %rbx
movq %rdx, %rcx
addb %r12b, %cl
incb %cl
movl %ecx, %r12d
decb %r15b
jne 0x265b9
jmp 0x265e8
leaq -0x2c(%rbp), %rdi
movl $0x5, %esi
callq 0x208ed
jmp 0x2662f
movl %r12d, %ecx
cmpq $0x13, %r13
je 0x26606
movl %r13d, %eax
cltd
idivl -0x3c(%rbp)
cmpl $0x1, %eax
jg 0x26606
movq -0x38(%rbp), %rdx
subb 0x159(%rdx), %cl
jmp 0x2660a
movq -0x38(%rbp), %rdx
movzbl %cl, %eax
xorl %ecx, %ecx
testb %al, %al
cmovgl %eax, %ecx
subb %cl, 0x153(%rdx)
movb $0x1, 0x15d(%rdx)
leaq -0x2c(%rbp), %rdi
movl $0x4, %esi
callq 0x208ed
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2664c
movq %rax, %rbx
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
movq %rbx, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/chores.cpp
// Function: (anonymous namespace)::finish_wall_dig(Coords const&)
void finish_wall_dig(const Coords &c)
{
	update_lights_around(c);
	// Need to update BYWALL for neighbours:
	e_Dir dir = D_N;
	Coords cn;
	do {
		cn = c.in(dir);
		Game::curmap->upd_by_wall_flag(cn);
	} while(++dir != D_N);
	event_set.insert(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x243e8
leaq -0x34(%rbp), %r14
movl $0x0, (%r14)
leaq -0x2c(%rbp), %r15
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2b798
leaq -0x30(%rbp), %r12
leaq 0x1e5c9(%rip), %r13     # 0x44c68
movl -0x34(%rbp), %edx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2b818
movl -0x30(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq %r12, %rdi
callq 0x2b7a6
movq (%r13), %rdi
movq %r15, %rsi
callq 0x16dfe
movq %r14, %rdi
callq 0x2b74c
cmpl $0x0, (%rax)
jne 0x2669f
leaq 0x1f8fd(%rip), %rdi     # 0x45fd8
movq %rbx, %rsi
callq 0x21934
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x266ff
jmp 0x266ff
movq %rax, %rbx
leaq -0x2c(%rbp), %rdi
callq 0x2b7a6
movq %rbx, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/chores.cpp
// Function: arrow_fall(OwnedEnt const*, Coords const&)
void arrow_fall(const OwnedEnt* arr, const Coords &c)
{
	Tile* tar = Game::curmap->mod_tile(c);
	// Arrow falling on a trap might trigger the trap:
	if((tar->flags & TF_TRAP) && random()%100 < CHANCE_ARROW_TRIG_TRAP)
	{
		list<Trap>::iterator tr_it = any_trap_at(c);
		// Functionality is somewhat different from trigger_trap(...), but we
		// also repeat some functionality here...
		switch(tr_it->get_m())
		{
		case TRAP_WATER:
		case TRAP_ACID:
			add_sound(c, S_SPLASH);
			break;
		case TRAP_LIGHT:
			flash_at(c);
			break;
		case TRAP_BOOBY:
			add_sound(c, S_CREAK);
			// Boobytraps are always destroyed:
			traps.erase(tr_it);
			tar->flags &= ~(TF_TRAP);
			break;
		//case TRAP_TELE: // (detected by nothing happening!)
		case TRAP_FIREB:
			fireball_trigger(c, arr->get_owner(), tr_it->is_seen_by(arr->get_owner()->team));
			break;
		}
	} // trap found there
	else
		add_action_ind(c, A_MISS);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0x1d9f4(%rip), %rax     # 0x44c68
movq (%rax), %rax
movswq 0x2(%rsi), %rcx
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
movswq (%rsi), %r12
movq (%rax,%rcx,8), %r13
testb $0x8, 0x1(%r13,%r12,4)
je 0x27307
movq %rdi, %r14
callq 0x41d0
movq %rax, %rcx
movabsq $-0x5c28f5c28f5c28f5, %rdx # imm = 0xA3D70A3D70A3D70B
imulq %rdx
addq %rcx, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x6, %rdx
addq %rax, %rdx
imulq $0x64, %rdx, %rax
subq %rax, %rcx
cmpq $0x3b, %rcx
jg 0x27307
movq %rbx, %rdi
callq 0x2134d
movq %rax, %r15
movzbl 0x1f(%rax), %eax
cmpq $0x5, %rax
ja 0x2735a
leaq 0xde8a(%rip), %rcx      # 0x35170
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x209ed
movq %rbx, %rdi
movl $0x5, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x208ed
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x24d81
movq %rbx, %rdi
movl $0x1, %esi
callq 0x209ed
leaq 0x1eb1c(%rip), %rdi     # 0x45e68
movq %r15, %rsi
callq 0x1d762
andb $-0x9, 0x1(%r13,%r12,4)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x10, %r15
movq 0x10(%r14), %r14
movzbl 0xbc(%r14), %esi
movq %r15, %rdi
callq 0x21df0
movzbl %al, %edx
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2739a
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/chores.cpp
// Function: (anonymous namespace)::conditional_blind(Coords const&)
void conditional_blind(const Coords &c)
{
	list<PCEnt>::iterator pc_it = any_pc_at(c);
	// Must be valid PC, not assassin, and not a mind's eye using planewalker:
	if(pc_it != PCs.end() && pc_it->get_owner()->cl != C_ASSASSIN
		&& (pc_it->get_owner()->cl != C_PLANEWALKER || !pc_it->get_owner()->limiter))
	{
		pc_it->get_owner()->turns_without_axn = 0; // being blinded stops "idling"
		pc_it->get_owner()->own_vp->blind();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x2122a
cmpq 0x1850b(%rip), %rax     # 0x3ffa8
je 0x27abc
movq 0x20(%rax), %rax
movl 0xc0(%rax), %ecx
cmpl $0x1, %ecx
je 0x27abc
cmpl $0xa, %ecx
jne 0x27abe
cmpb $0x0, 0x140(%rax)
je 0x27abe
popq %rbp
retq
movw $0x0, 0x13a(%rax)
movq 0xd0(%rax), %rdi
popq %rbp
jmp 0x1eb92
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/cmds.cpp
// Function: (anonymous namespace)::id_pl_by_nick_part(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
list<Player>::iterator id_pl_by_nick_part(const string &s)
{
	list<Player>::iterator foundit = cur_players.end();
	bool found_several = false;
	for(list<Player>::iterator pit = cur_players.begin();
		pit != cur_players.end(); ++pit)
	{
		if(pit->nick == s) // exact match overrules any partial
			return pit;
		// else check for a partial match:
		if(pit->nick.find(s) != string::npos)
		{
			if(foundit != cur_players.end()) // already found one!
				found_several = true;
			foundit = pit;
		}
	}
	if(found_several) // could not match uniquely
		return cur_players.end();
	return foundit;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x18da9(%rip), %r14     # 0x430c0
movq (%r14), %rbx
cmpq %r14, %rbx
je 0x2a3bd
leaq 0x18d96(%rip), %r14     # 0x430c0
xorl %r12d, %r12d
movq %rdi, -0x38(%rbp)
leaq 0x98(%rbx), %rax
movq 0xa0(%rbx), %rdx
movq 0x8(%rdi), %r15
cmpq %r15, %rdx
jne 0x2a369
testq %rdx, %rdx
je 0x2a3ba
movq (%rdi), %r13
movq (%rax), %rdi
movq %r13, %rsi
movq %rax, -0x30(%rbp)
callq 0x4400
testl %eax, %eax
movq -0x30(%rbp), %rax
jne 0x2a36c
jmp 0x2a3ba
movq (%rdi), %r13
movq %rax, %rdi
movq %r13, %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0x4720
leaq 0x18d3d(%rip), %rdx     # 0x430c0
cmpq %rdx, %r14
setne %cl
orb %r12b, %cl
cmpq $-0x1, %rax
cmovneq %rbx, %r14
movzbl %cl, %eax
movzbl %r12b, %r12d
cmovnel %eax, %r12d
movq (%rbx), %rbx
cmpq %rdx, %rbx
movq -0x38(%rbp), %rdi
jne 0x2a331
testb $0x1, %r12b
je 0x2a3bd
leaq 0x18d08(%rip), %r14     # 0x430c0
jmp 0x2a3bd
movq %rbx, %r14
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/cmds.cpp
// Function: spawn_bot()
bool spawn_bot()
{
	using namespace Config;
	pid_t pid;
	int i;
	if((pid = vfork()) < 0)
	{
		timed_log("!spawnbot -- error in fork!");
		return true;
	}
	if(!pid)
	{
		// This is the forked bot.
		execl(get_botexe().c_str(), get_botexe().c_str(), NULL);
		_exit(0);
	}
	// Server code continues:
	// It might be that the bot executable doesn't exists, in which
	// case the forked child just exited; check:
	if(waitpid(pid, &i, WNOHANG) == pid && WIFEXITED(i))
	{
		timed_log("!spawnbot -- could not find/run \'mrbrown\' executable!");
		Network::to_chat("Cannot spawn bots! Check configuration.");
		return true;
	}
	// else bot is running and network will handle its connection attempt
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
callq 0x45a0
testl %eax, %eax
js 0x2a6f1
je 0x2a79b
movl %eax, %ebx
movl %eax, %edi
leaq -0x34(%rbp), %rsi
movl $0x1, %edx
callq 0x42f0
cmpl %ebx, %eax
jne 0x2a6ea
testb $0x7f, -0x34(%rbp)
je 0x2a71b
xorl %eax, %eax
jmp 0x2a792
leaq -0x20(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0xb3af(%rip), %rsi      # 0x35aaf
leaq 0xb3c3(%rip), %rdx      # 0x35aca
leaq -0x30(%rbp), %rdi
callq 0xe01c
leaq -0x30(%rbp), %rdi
callq 0x15128
jmp 0x2a77b
leaq -0x20(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0xb3a1(%rip), %rsi      # 0x35acb
leaq 0xb3cf(%rip), %rdx      # 0x35b00
leaq -0x30(%rbp), %rdi
callq 0xe01c
leaq -0x30(%rbp), %rdi
callq 0x15128
movq -0x30(%rbp), %rdi
cmpq %rbx, %rdi
je 0x2a758
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq -0x30(%rbp), %rdi
movq %rbx, (%rdi)
leaq 0xb39b(%rip), %rsi      # 0x35b01
leaq 0xb3bb(%rip), %rdx      # 0x35b28
callq 0xe01c
leaq -0x30(%rbp), %rdi
callq 0xf579
movq -0x30(%rbp), %rdi
cmpq %rbx, %rdi
je 0x2a790
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x43f0
movb $0x1, %al
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x119e4
movq (%rax), %rbx
callq 0x119e4
movq (%rax), %rsi
xorl %r14d, %r14d
movl %r14d, %edx
movl %r14d, %eax
movq %rbx, %rdi
callq 0x44d0
movl %r14d, %edi
callq 0x46b0
jmp 0x2a7cc
jmp 0x2a7e6
jmp 0x2a7cc
jmp 0x2a7e6
movq %rax, %r14
movq -0x30(%rbp), %rdi
cmpq %rbx, %rdi
je 0x2a7e9
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x2a7e9
movq %rax, %r14
movq %r14, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/cmds.cpp
// Function: drop_a_bot()
bool drop_a_bot()
{
	list<Player>::iterator bit = cur_players.begin();
	if(next_bot(bit))
	{
		Game::remove_player(bit, " dropped.");
		return true;
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
leaq 0x188b9(%rip), %rax     # 0x430c0
movq (%rax), %rax
leaq -0x28(%rbp), %rdi
movq %rax, (%rdi)
callq 0x14638
movl %eax, %ebx
testb %al, %al
je 0x2a863
movq -0x28(%rbp), %r14
leaq -0x38(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x476c(%rip), %rsi      # 0x2ef9c
leaq 0x476e(%rip), %rdx      # 0x2efa5
leaq -0x48(%rbp), %r15
movq %r15, %rdi
callq 0xe01c
movq %r14, %rdi
movq %r15, %rsi
callq 0x1bea2
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x2a863
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43f0
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x2a88a
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4740