// File: /workspace/github_cpp_makefile_star2_O2/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 0x79d5
movq %rsi, %r15
movl 0x10(%rsi), %eax
cmpl 0x10(%rdx), %eax
jne 0x79d5
movq %rdx, -0x48(%rbp)
movq %rdi, -0x30(%rbp)
movq 0x8(%rdi), %r12
xorl %r13d, %r13d
movq %r15, -0x40(%rbp)
movl 0xc(%r12), %eax
cmpl %eax, %r13d
jg 0x7918
xorl %ebx, %ebx
cmpl 0x10(%r12), %ebx
jge 0x7910
movq %r15, %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x3baa
movl %eax, %r12d
movq -0x48(%rbp), %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x3baa
cmpl %eax, %r12d
jne 0x78d0
movq %r15, %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x3baa
movl %eax, %r14d
movq -0x30(%rbp), %r15
movq 0x8(%r15), %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x3baa
movq 0x8(%r15), %r12
cmpl %eax, %r14d
jne 0x78da
movq -0x40(%rbp), %r15
jmp 0x7909
movq -0x30(%rbp), %rax
movq 0x8(%rax), %r12
jmp 0x7909
movq -0x40(%rbp), %r14
movq %r14, %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x3baa
movq (%r12), %r8
movq %r12, %rdi
movl %r13d, %esi
movl %ebx, %edx
movl %eax, %ecx
callq *(%r8)
movq 0x8(%r15), %r12
movb $0x1, 0x9(%r12)
movq %r14, %r15
incl %ebx
jmp 0x7871
incl %r13d
jmp 0x7861
xorl %r13d, %r13d
cmpl %eax, %r13d
jge 0x79c6
xorl %ebx, %ebx
cmpl 0x10(%r12), %ebx
jg 0x79b9
movq %r15, %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x3bee
movl %eax, %r14d
movq -0x48(%rbp), %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x3bee
cmpl %eax, %r14d
jne 0x79aa
movq %r15, %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x3bee
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %r14
movq 0x8(%r14), %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x3bee
movq 0x8(%r14), %r12
cmpl %eax, -0x34(%rbp)
je 0x79b2
movq %r15, %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x3bee
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 0x79b2
movq -0x30(%rbp), %rax
movq 0x8(%rax), %r12
incl %ebx
jmp 0x7926
incl %r13d
movl 0xc(%r12), %eax
jmp 0x791b
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2b2f(%rip), %rdi      # 0xa50b
leaq 0x2a6b(%rip), %rsi      # 0xa44e
leaq 0x2b82(%rip), %rcx      # 0xa56c
movl $0x19e, %edx            # imm = 0x19E
callq 0x2120