// File: /workspace/github_cpp_makefile_star2_O2/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
leaq 0x27667(%rip), %r15     # 0x42ed0
leaq -0x34(%rbp), %r14
movq %r15, %r12
movq (%r12), %r12
cmpq %r15, %r12
je 0x1b8c2
cmpb $0x0, 0x1e(%r12)
jne 0x1b870
cmpb $0x1, 0x30(%r12)
jne 0x1b870
leaq 0x263c8(%rip), %rax     # 0x41c58
movq (%rax), %rdi
movl 0x18(%r12), %eax
movl %eax, -0x34(%rbp)
movq %rbx, %rsi
movq %r14, %rdx
pushq $0x6
popq %rcx
pushq $-0x1
popq %r8
callq 0x1293c
movl %eax, %r13d
movq %r14, %rdi
callq 0x24d9e
testb %r13b, %r13b
je 0x1b870
jmp 0x1b964
leaq 0x275d7(%rip), %r12     # 0x42ea0
leaq -0x30(%rbp), %r14
movq %r12, %r15
movq (%r15), %r15
cmpq %r12, %r15
je 0x1b914
cmpb $0x0, 0x1e(%r15)
jne 0x1b8d0
leaq 0x26372(%rip), %rax     # 0x41c58
movq (%rax), %rdi
movl 0x18(%r15), %eax
movl %eax, -0x30(%rbp)
movq %rbx, %rsi
movq %r14, %rdx
pushq $0x1
popq %rcx
pushq $-0x1
popq %r8
callq 0x1293c
movl %eax, %r13d
movq %r14, %rdi
callq 0x24d9e
testb %r13b, %r13b
je 0x1b8d0
jmp 0x1b964
leaq 0x2759d(%rip), %r12     # 0x42eb8
leaq -0x2c(%rbp), %r14
movq %r12, %r15
movq (%r15), %r15
cmpq %r12, %r15
je 0x1b969
cmpb $0x0, 0x1e(%r15)
jne 0x1b922
leaq 0x26320(%rip), %rax     # 0x41c58
movq (%rax), %rdi
movl 0x18(%r15), %eax
movl %eax, -0x2c(%rbp)
movq %rbx, %rsi
movq %r14, %rdx
pushq $0x1
popq %rcx
pushq $-0x1
popq %r8
callq 0x1293c
movl %eax, %r13d
movq %r14, %rdi
callq 0x24d9e
testb %r13b, %r13b
je 0x1b922
movb $0x1, %r14b
jmp 0x1b9a3
leaq 0x27640(%rip), %r13     # 0x42fb0
pushq $-0x1
popq %r12
movq %r13, %r15
movq (%r15), %r15
cmpq %r13, %r15
setne %r14b
je 0x1b9a3
leaq 0x262ce(%rip), %rax     # 0x41c58
movq (%rax), %rdi
leaq 0x10(%r15), %rdx
movq %rbx, %rsi
pushq $0x4
popq %rcx
movl %r12d, %r8d
callq 0x1293c
testb %al, %al
je 0x1b977
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x2c(%rbp), %rdi
jmp 0x1b9ce
movq %rax, %rbx
leaq -0x34(%rbp), %rdi
jmp 0x1b9ce
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x24d9e
movq %rbx, %rdi
callq 0x4710