// File: davidjosepha[P]slitherlink/src/solver/solver.cpp
// Function: Solver::updateEPQ()
void Solver::updateEPQ() {
    epq_.empty();

    int m = grid_->getHeight();
    int n = grid_->getWidth();
    for (int i = 1; i < m ; i++) {
        for (int j = 1; j < n-1; j++) {
            if (grid_->getHLine(i,j) != EMPTY) {
                continue;
            }
            float prio = grid_->getHLine(i,j-1) != EMPTY + grid_->getHLine(i,j+1) != EMPTY +
            grid_->getHLine(i+1,j) != EMPTY + grid_->getHLine(i-1,j) != EMPTY + grid_->getVLine(i-1,j+1) != EMPTY +
            grid_->getVLine(i-1,j) != EMPTY + grid_->getVLine(i,j) != EMPTY + grid_->getVLine(i,j+1) != EMPTY;

            if (prio > 0) {
                epq_.emplace(prio, i, j, true);
            }
        }
    }

    for (int i = 1; i < m-1; i++) {
        for (int j = 1; j < n; j++) {
            if (grid_->getVLine(i,j) != EMPTY) {
                continue;
            }
            float prio = grid_->getVLine(i-1,j) != EMPTY + grid_->getVLine(i+1,j) != EMPTY +
            grid_->getVLine(i,j-1) != EMPTY + grid_->getVLine(i,j+1) != EMPTY + grid_->getHLine(i,j-1) != EMPTY +
            grid_->getHLine(i+1,j-1) != EMPTY + grid_->getHLine(i,j) != EMPTY + grid_->getHLine(i+1,j) != EMPTY;

            if (prio > 0) {
                epq_.emplace(prio, i, j, false);
            }
        }
    }
    epqSize_ = epq_.size();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
addq $0x38, %rdi
callq 0x8750
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2ad0
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, -0xc(%rbp)
movq 0x8(%rax), %rdi
callq 0x2af0
movl %eax, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0xdc67
movl $0x1, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl -0x10(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0xdc57
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
callq 0x5bf0
cmpl $0x0, %eax
je 0xdada
jmp 0xdc49
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
decl %edx
callq 0x5bf0
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, -0x54(%rbp)
movq 0x8(%rax), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
incl %edx
callq 0x5bf0
movl -0x54(%rbp), %ecx
movl %eax, %edx
movq -0x30(%rbp), %rax
subl %edx, %ecx
setne %cl
movzbl %cl, %ecx
movl %ecx, -0x50(%rbp)
movq 0x8(%rax), %rdi
movl -0x14(%rbp), %esi
incl %esi
movl -0x18(%rbp), %edx
callq 0x5bf0
movl -0x50(%rbp), %ecx
movl %eax, %edx
movq -0x30(%rbp), %rax
subl %edx, %ecx
setne %cl
movzbl %cl, %ecx
movl %ecx, -0x4c(%rbp)
movq 0x8(%rax), %rdi
movl -0x14(%rbp), %esi
decl %esi
movl -0x18(%rbp), %edx
callq 0x5bf0
movl -0x4c(%rbp), %ecx
movl %eax, %edx
movq -0x30(%rbp), %rax
subl %edx, %ecx
setne %cl
movzbl %cl, %ecx
movl %ecx, -0x48(%rbp)
movq 0x8(%rax), %rdi
movl -0x14(%rbp), %esi
decl %esi
movl -0x18(%rbp), %edx
incl %edx
callq 0x5c90
movl -0x48(%rbp), %ecx
movl %eax, %edx
movq -0x30(%rbp), %rax
subl %edx, %ecx
setne %cl
movzbl %cl, %ecx
movl %ecx, -0x44(%rbp)
movq 0x8(%rax), %rdi
movl -0x14(%rbp), %esi
decl %esi
movl -0x18(%rbp), %edx
callq 0x5c90
movl -0x44(%rbp), %ecx
movl %eax, %edx
movq -0x30(%rbp), %rax
subl %edx, %ecx
setne %cl
movzbl %cl, %ecx
movl %ecx, -0x40(%rbp)
movq 0x8(%rax), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
callq 0x5c90
movl -0x40(%rbp), %ecx
movl %eax, %edx
movq -0x30(%rbp), %rax
subl %edx, %ecx
setne %cl
movzbl %cl, %ecx
movl %ecx, -0x3c(%rbp)
movq 0x8(%rax), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
incl %edx
callq 0x5c90
movl %eax, %ecx
movl -0x3c(%rbp), %eax
subl %ecx, %eax
movss 0x782a(%rip), %xmm0     # 0x15420
xorps %xmm1, %xmm1
movss %xmm1, -0x38(%rbp)
movss %xmm0, -0x34(%rbp)
jne 0xdc0f
movss -0x38(%rbp), %xmm0
movss %xmm0, -0x34(%rbp)
movss -0x34(%rbp), %xmm0
movss %xmm0, -0x1c(%rbp)
movss -0x1c(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0xdc47
movq -0x30(%rbp), %rdi
addq $0x38, %rdi
movss -0x1c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movl $0x1, %ecx
callq 0x8840
jmp 0xdc49
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xdaac
jmp 0xdc59
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xda99
movl $0x1, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0xde39
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0xde29
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0x20(%rbp), %esi
movl -0x24(%rbp), %edx
callq 0x5c90
cmpl $0x0, %eax
je 0xdcaf
jmp 0xde1b
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0x20(%rbp), %esi
decl %esi
movl -0x24(%rbp), %edx
callq 0x5c90
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, -0x78(%rbp)
movq 0x8(%rax), %rdi
movl -0x20(%rbp), %esi
incl %esi
movl -0x24(%rbp), %edx
callq 0x5c90
movl -0x78(%rbp), %ecx
movl %eax, %edx
movq -0x30(%rbp), %rax
subl %edx, %ecx
setne %cl
movzbl %cl, %ecx
movl %ecx, -0x74(%rbp)
movq 0x8(%rax), %rdi
movl -0x20(%rbp), %esi
movl -0x24(%rbp), %edx
decl %edx
callq 0x5c90
movl -0x74(%rbp), %ecx
movl %eax, %edx
movq -0x30(%rbp), %rax
subl %edx, %ecx
setne %cl
movzbl %cl, %ecx
movl %ecx, -0x70(%rbp)
movq 0x8(%rax), %rdi
movl -0x20(%rbp), %esi
movl -0x24(%rbp), %edx
incl %edx
callq 0x5c90
movl -0x70(%rbp), %ecx
movl %eax, %edx
movq -0x30(%rbp), %rax
subl %edx, %ecx
setne %cl
movzbl %cl, %ecx
movl %ecx, -0x6c(%rbp)
movq 0x8(%rax), %rdi
movl -0x20(%rbp), %esi
movl -0x24(%rbp), %edx
decl %edx
callq 0x5bf0
movl -0x6c(%rbp), %ecx
movl %eax, %edx
movq -0x30(%rbp), %rax
subl %edx, %ecx
setne %cl
movzbl %cl, %ecx
movl %ecx, -0x68(%rbp)
movq 0x8(%rax), %rdi
movl -0x20(%rbp), %esi
incl %esi
movl -0x24(%rbp), %edx
decl %edx
callq 0x5bf0
movl -0x68(%rbp), %ecx
movl %eax, %edx
movq -0x30(%rbp), %rax
subl %edx, %ecx
setne %cl
movzbl %cl, %ecx
movl %ecx, -0x64(%rbp)
movq 0x8(%rax), %rdi
movl -0x20(%rbp), %esi
movl -0x24(%rbp), %edx
callq 0x5bf0
movl -0x64(%rbp), %ecx
movl %eax, %edx
movq -0x30(%rbp), %rax
subl %edx, %ecx
setne %cl
movzbl %cl, %ecx
movl %ecx, -0x60(%rbp)
movq 0x8(%rax), %rdi
movl -0x20(%rbp), %esi
incl %esi
movl -0x24(%rbp), %edx
callq 0x5bf0
movl %eax, %ecx
movl -0x60(%rbp), %eax
subl %ecx, %eax
movss 0x7655(%rip), %xmm0     # 0x15420
xorps %xmm1, %xmm1
movss %xmm1, -0x5c(%rbp)
movss %xmm0, -0x58(%rbp)
jne 0xdde4
movss -0x5c(%rbp), %xmm0
movss %xmm0, -0x58(%rbp)
movss -0x58(%rbp), %xmm0
movss %xmm0, -0x28(%rbp)
movss -0x28(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0xde19
movq -0x30(%rbp), %rdi
addq $0x38, %rdi
movss -0x28(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movl -0x20(%rbp), %esi
movl -0x24(%rbp), %edx
xorl %ecx, %ecx
callq 0x8840
jmp 0xde1b
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xdc86
jmp 0xde2b
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xdc6e
movq -0x30(%rbp), %rdi
addq $0x38, %rdi
callq 0x8780
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x60(%rax)
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)