// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/solver/solver.cpp
// Function: Solver::intersectGrids(Grid const&, Grid const&)
void Solver::intersectGrids(Grid const & lineGuess, Grid const & nLineGuess) {
    assert(lineGuess.getHeight() == nLineGuess.getHeight() &&
           lineGuess.getWidth() == nLineGuess.getWidth());

    for (int i = 0; i < grid_->getHeight()+1; i++) {
        for (int j = 0; j < grid_->getWidth(); j++) {
            if (lineGuess.getHLine(i, j) == nLineGuess.getHLine(i, j) &&
                  lineGuess.getHLine(i, j) != grid_->getHLine(i, j)) {
                grid_->setHLine(i, j, lineGuess.getHLine(i, j));
                grid_->setUpdated(true);
            }
        }
    }

    for (int i = 0; i < grid_->getHeight(); i++) {
        for (int j = 0; j < grid_->getWidth()+1; j++) {
            if (lineGuess.getVLine(i, j) == nLineGuess.getVLine(i, j) &&
                  lineGuess.getVLine(i, j) != grid_->getVLine(i, j)) {
                grid_->setVLine(i, j, lineGuess.getVLine(i, j));
                grid_->setUpdated(true);
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl 0xc(%rsi), %eax
cmpl 0xc(%rdx), %eax
jne 0xc512
movl 0x10(%rsi), %eax
cmpl 0x10(%rdx), %eax
jne 0xc512
movq %rsi, -0x48(%rbp)
movq %rdx, -0x38(%rbp)
movq %rdi, -0x40(%rbp)
movq 0x8(%rdi), %r12
cmpl $0x0, 0xc(%r12)
js 0xc503
xorl %r13d, %r13d
movq -0x38(%rbp), %r14
movq -0x48(%rbp), %r15
cmpl $0x0, 0x10(%r12)
jle 0xc432
xorl %ebx, %ebx
movq %r15, %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x4322
movl %eax, %r12d
movq %r14, %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x4322
cmpl %eax, %r12d
jne 0xc41d
movq %r15, %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x4322
movl %eax, -0x2c(%rbp)
movq -0x40(%rbp), %r14
movq 0x8(%r14), %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x4322
movq 0x8(%r14), %r12
cmpl %eax, -0x2c(%rbp)
je 0xc417
movq %r15, %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x4322
movq (%r12), %r8
movq %r12, %rdi
movl %r13d, %esi
movl %ebx, %edx
movl %eax, %ecx
callq *(%r8)
movq 0x8(%r14), %r12
movb $0x1, 0x9(%r12)
movq -0x38(%rbp), %r14
jmp 0xc425
movq -0x40(%rbp), %rax
movq 0x8(%rax), %r12
incl %ebx
cmpl 0x10(%r12), %ebx
jl 0xc3a2
leal 0x1(%r13), %ecx
movl 0xc(%r12), %eax
cmpl %eax, %r13d
movl %ecx, %r13d
jl 0xc394
testl %eax, %eax
jle 0xc503
xorl %r13d, %r13d
movq -0x48(%rbp), %r15
cmpl $0x0, 0x10(%r12)
js 0xc4f5
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
incl %ebx
movq %r15, %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x4368
movl %eax, %r14d
movq -0x38(%rbp), %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x4368
cmpl %eax, %r14d
jne 0xc4e2
movq %r15, %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x4368
movl %eax, -0x2c(%rbp)
movq -0x40(%rbp), %r14
movq 0x8(%r14), %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x4368
movq 0x8(%r14), %r12
cmpl %eax, -0x2c(%rbp)
je 0xc4ea
movq %r15, %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x4368
movq (%r12), %r8
movq %r12, %rdi
movl %r13d, %esi
movl %ebx, %edx
movl %eax, %ecx
callq *0x8(%r8)
movq 0x8(%r14), %r12
movb $0x1, 0x9(%r12)
jmp 0xc4ea
movq -0x40(%rbp), %rax
movq 0x8(%rax), %r12
cmpl 0x10(%r12), %ebx
jl 0xc467
incl %r13d
cmpl 0xc(%r12), %r13d
jl 0xc456
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x303a(%rip), %rdi      # 0xf553
leaq 0x2f76(%rip), %rsi      # 0xf496
leaq 0x308d(%rip), %rcx      # 0xf5b4
movl $0x19e, %edx            # imm = 0x19E
callq 0x2100
nop