// File: davidjosepha[P]slitherlink/src/generator/generator.cpp
// Function: Generator::checkIfSolved()
bool Generator::checkIfSolved() {
    Rule rules_[NUM_RULES];
    initRules(rules_);
    Contradiction contradictions_[NUM_CONTRADICTIONS];
    initContradictions(contradictions_);
    grid_.resetGrid();

    Solver solver = Solver(grid_, rules_, contradictions_, selectedRules_, numberOfRules_, guessDepth_);
    if (grid_.isSolved()) {
        return true;
    } else {
        return false;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1560, %rsp           # imm = 0x1560
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x14a0(%rbp)
leaq -0x1090(%rbp), %rax
movq %rax, -0x1498(%rbp)
movq %rax, %rcx
addq $0x1080, %rcx           # imm = 0x1080
movq %rcx, -0x1490(%rbp)
movq %rax, -0x1488(%rbp)
movq -0x1488(%rbp), %rdi
movq %rdi, -0x14a8(%rbp)
callq 0x12050
jmp 0x10de5
movq -0x1490(%rbp), %rcx
movq -0x14a8(%rbp), %rax
addq $0x80, %rax
cmpq %rcx, %rax
movq %rax, -0x1488(%rbp)
jne 0x10dd0
leaq -0x1090(%rbp), %rdi
callq 0xac30
jmp 0x10e13
leaq -0x1410(%rbp), %rax
movq %rax, -0x14c0(%rbp)
movq %rax, %rcx
addq $0x370, %rcx            # imm = 0x370
movq %rcx, -0x14b8(%rbp)
movq %rax, -0x14b0(%rbp)
movq -0x14b0(%rbp), %rdi
movq %rdi, -0x14c8(%rbp)
callq 0x120b0
jmp 0x10e4e
movq -0x14b8(%rbp), %rcx
movq -0x14c8(%rbp), %rax
addq $0x50, %rax
cmpq %rcx, %rax
movq %rax, -0x14b0(%rbp)
jne 0x10e39
leaq -0x1410(%rbp), %rdi
callq 0x6280
jmp 0x10e7a
movq -0x14a0(%rbp), %rdi
addq $0x48, %rdi
callq 0x2c70
jmp 0x10e8c
movq -0x14a0(%rbp), %rax
movq %rax, %rsi
addq $0x48, %rsi
movq 0x38(%rax), %r8
movl 0x40(%rax), %r9d
movl 0x8(%rax), %ecx
movq %rsp, %rax
movl %ecx, (%rax)
leaq -0x1478(%rbp), %rdi
leaq -0x1090(%rbp), %rdx
leaq -0x1410(%rbp), %rcx
callq 0xcbe0
jmp 0x10ec6
movq -0x14a0(%rbp), %rdi
addq $0x48, %rdi
callq 0x4830
movb %al, -0x14c9(%rbp)
jmp 0x10ede
movb -0x14c9(%rbp), %al
testb $0x1, %al
jne 0x10eed
jmp 0x11011
movb $0x1, -0x1(%rbp)
movl $0x1, -0x147c(%rbp)
jmp 0x1101f
movq -0x1498(%rbp), %rcx
movq %rax, %rsi
movq -0x14a8(%rbp), %rax
movq %rsi, -0x1098(%rbp)
movl %edx, -0x109c(%rbp)
cmpq %rax, %rcx
movq %rax, -0x14d8(%rbp)
je 0x10f5b
movq -0x14d8(%rbp), %rdi
addq $-0x80, %rdi
movq %rdi, -0x14e0(%rbp)
callq 0xca40
movq -0x1498(%rbp), %rcx
movq -0x14e0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x14d8(%rbp)
jne 0x10f2a
jmp 0x1116f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1098(%rbp)
movl %eax, -0x109c(%rbp)
jmp 0x11121
movq -0x14c0(%rbp), %rcx
movq %rax, %rsi
movq -0x14c8(%rbp), %rax
movq %rsi, -0x1098(%rbp)
movl %edx, -0x109c(%rbp)
cmpq %rax, %rcx
movq %rax, -0x14e8(%rbp)
je 0x10fd2
movq -0x14e8(%rbp), %rdi
addq $-0x50, %rdi
movq %rdi, -0x14f0(%rbp)
callq 0x6a50
movq -0x14c0(%rbp), %rcx
movq -0x14f0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x14e8(%rbp)
jne 0x10fa1
jmp 0x11121
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1098(%rbp)
movl %eax, -0x109c(%rbp)
jmp 0x11094
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1098(%rbp)
movl %eax, -0x109c(%rbp)
leaq -0x1478(%rbp), %rdi
callq 0xfcf0
jmp 0x11094
movb $0x0, -0x1(%rbp)
movl $0x1, -0x147c(%rbp)
leaq -0x1478(%rbp), %rdi
callq 0xfcf0
leaq -0x1410(%rbp), %rax
movq %rax, -0x1500(%rbp)
addq $0x370, %rax            # imm = 0x370
movq %rax, -0x14f8(%rbp)
movq -0x14f8(%rbp), %rdi
addq $-0x50, %rdi
movq %rdi, -0x1508(%rbp)
callq 0x6a50
movq -0x1500(%rbp), %rcx
movq -0x1508(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x14f8(%rbp)
jne 0x11046
leaq -0x1090(%rbp), %rax
movq %rax, -0x1518(%rbp)
addq $0x1080, %rax           # imm = 0x1080
movq %rax, -0x1510(%rbp)
jmp 0x110e2
leaq -0x1410(%rbp), %rax
movq %rax, -0x1528(%rbp)
addq $0x370, %rax            # imm = 0x370
movq %rax, -0x1520(%rbp)
movq -0x1520(%rbp), %rdi
addq $-0x50, %rdi
movq %rdi, -0x1530(%rbp)
callq 0x6a50
movq -0x1528(%rbp), %rcx
movq -0x1530(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1520(%rbp)
jne 0x110af
jmp 0x11121
movq -0x1510(%rbp), %rdi
addq $-0x80, %rdi
movq %rdi, -0x1538(%rbp)
callq 0xca40
movq -0x1518(%rbp), %rcx
movq -0x1538(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1510(%rbp)
jne 0x110e2
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x1560, %rsp           # imm = 0x1560
popq %rbp
retq
leaq -0x1090(%rbp), %rax
movq %rax, -0x1548(%rbp)
addq $0x1080, %rax           # imm = 0x1080
movq %rax, -0x1540(%rbp)
movq -0x1540(%rbp), %rdi
addq $-0x80, %rdi
movq %rdi, -0x1550(%rbp)
callq 0xca40
movq -0x1548(%rbp), %rcx
movq -0x1550(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1540(%rbp)
jne 0x1113c
jmp 0x1116f
movq -0x1098(%rbp), %rdi
callq 0x22c0
nopl (%rax,%rax)