// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/actives.cpp
// Function: is_dynlit(Coords const&)
bool is_dynlit(const Coords &c)
{
	// A tile is dynamically lit <=> there is a lighting OccEnt close to it,
	// in LOS. (There is no such thing as a "dynamic light" entity.)
	for(list<PCEnt>::const_iterator pc_it = PCs.begin(); pc_it != PCs.end(); ++pc_it)
	{
		/* NOTE! This works as long as CARRIED_TORCH_RAD <= 6. If it becomes 7
		 * or more, we need to worry about "blind spots" the same way as with
		 * the LOS considerations in update_static_light. */
		if(!pc_it->isvoid() && pc_it->torch_is_lit()
			&& Game::curmap->LOS_between(c, pc_it->getpos(), CARRIED_TORCH_RAD))
			return true;
	}
	for(list<MM>::const_iterator m_it = MMs.begin(); m_it != MMs.end(); ++m_it)
	{
		if(!m_it->isvoid()
			&& Game::curmap->LOS_between(c, m_it->getpos(), 1))
			return true;
	}
	for(list<Zap>::const_iterator z_it = zaps.begin(); z_it != zaps.end(); ++z_it)
	{
		if(!z_it->isvoid()
			&& Game::curmap->LOS_between(c, z_it->getpos(), 1))
			return true;
	}
	for(list<Coords>::const_iterator fb_it = fball_centers.begin(); 
		fb_it != fball_centers.end(); ++fb_it)
	{
		// fireballs light a rad 4
		if(Game::curmap->LOS_between(c, *fb_it, 4))
			return true;
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x24e59(%rip), %r12     # 0x45ee0
leaq 0x24e52(%rip), %r13     # 0x45ee0
cmpq %r13, %r12
je 0x210ec
leaq -0x34(%rbp), %r14
cmpb $0x0, 0x1e(%r12)
jne 0x210e3
cmpb $0x1, 0x30(%r12)
jne 0x210e3
leaq 0x23bba(%rip), %rax     # 0x44c68
movq (%rax), %rdi
movl 0x18(%r12), %eax
movl %eax, -0x34(%rbp)
movq %rbx, %rsi
movq %r14, %rdx
movl $0x6, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
callq 0x1736e
movl %eax, %r15d
movq %r14, %rdi
callq 0x2b7a6
testb %r15b, %r15b
jne 0x211ef
movq (%r12), %r12
cmpq %r13, %r12
jne 0x21097
movq 0x24dbd(%rip), %r12     # 0x45eb0
leaq 0x24db6(%rip), %r13     # 0x45eb0
cmpq %r13, %r12
je 0x21150
leaq -0x30(%rbp), %r14
cmpb $0x0, 0x1e(%r12)
jne 0x21147
leaq 0x23b56(%rip), %rax     # 0x44c68
movq (%rax), %rdi
movl 0x18(%r12), %eax
movl %eax, -0x30(%rbp)
movq %rbx, %rsi
movq %r14, %rdx
movl $0x1, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
callq 0x1736e
movl %eax, %r15d
movq %r14, %rdi
callq 0x2b7a6
testb %r15b, %r15b
jne 0x211ef
movq (%r12), %r12
cmpq %r13, %r12
jne 0x21103
movq 0x24d71(%rip), %r12     # 0x45ec8
leaq 0x24d6a(%rip), %r13     # 0x45ec8
cmpq %r13, %r12
je 0x211b0
leaq -0x2c(%rbp), %r14
cmpb $0x0, 0x1e(%r12)
jne 0x211a7
leaq 0x23af2(%rip), %rax     # 0x44c68
movq (%rax), %rdi
movl 0x18(%r12), %eax
movl %eax, -0x2c(%rbp)
movq %rbx, %rsi
movq %r14, %rdx
movl $0x1, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
callq 0x1736e
movl %eax, %r15d
movq %r14, %rdi
callq 0x2b7a6
testb %r15b, %r15b
jne 0x211ef
movq (%r12), %r12
cmpq %r13, %r12
jne 0x21167
leaq 0x24e09(%rip), %r15     # 0x45fc0
leaq 0x23aaa(%rip), %r12     # 0x44c68
movq %r15, %r13
movq (%r13), %r13
cmpq %r15, %r13
setne %r14b
je 0x211f2
movq (%r12), %rdi
leaq 0x10(%r13), %rdx
movq %rbx, %rsi
movl $0x4, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
callq 0x1736e
testb %al, %al
je 0x211c1
jmp 0x211f2
movb $0x1, %r14b
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x34(%rbp), %rdi
jmp 0x2121d
movq %rax, %rbx
leaq -0x2c(%rbp), %rdi
jmp 0x2121d
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x2b7a6
movq %rbx, %rdi
callq 0x4740