LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/solver/solver.cpp
// Function: Solver::applyRules(int*)
void Solver::applyRules(int selectedRules[]) {
    while (grid_->getUpdated()) {
        grid_->setUpdated(false);
        for (int i = 0; i < grid_->getHeight(); i++) {
            for (int j = 0; j < grid_->getWidth(); j++) {
                if (grid_->getUpdateMatrix(i, j)) {
                    for (int x = 0; x < selectLength_; x++) {
                        for (Orientation orient : (Orientation[]){ UP, DOWN, LEFT, RIGHT, UPFLIP, DOWNFLIP, LEFTFLIP, RIGHTFLIP }) {
                            if (ruleApplies(i, j, rules_[selectedRules[x]], orient)) {
                                applyRule(i, j, rules_[selectedRules[x]], orient);
                            }
                        }
                    }
                }
                grid_->setUpdateMatrix(i, j, false);
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, -0x38(%rbp)
movq 0x8(%rdi), %rax
cmpb $0x1, 0x9(%rax)
jne 0xacae
movq %rdi, %r14
movb $0x0, 0x9(%rax)
cmpl $0x0, 0xc(%rax)
jle 0xaca4
movq $0x0, -0x30(%rbp)
cmpl $0x0, 0x10(%rax)
jle 0xac8c
movq 0x30(%rax), %rcx
movq -0x30(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
xorl %r12d, %r12d
cmpb $0x1, (%rcx,%r12)
jne 0xac77
cmpl $0x0, 0x28(%r14)
jle 0xac77
xorl %ebx, %ebx
xorl %r15d, %r15d
leaq 0x49e7(%rip), %rax      # 0xf5ec
movl (%r15,%rax), %r13d
movq -0x38(%rbp), %rax
movslq (%rax,%rbx,4), %rcx
shlq $0x7, %rcx
addq 0x18(%r14), %rcx
movq %r14, %rdi
movq -0x30(%rbp), %rsi
movl %r12d, %edx
movl %r13d, %r8d
callq 0xc532
testb %al, %al
je 0xac51
movq -0x38(%rbp), %rax
movslq (%rax,%rbx,4), %rcx
shlq $0x7, %rcx
addq 0x18(%r14), %rcx
movq %r14, %rdi
movq -0x30(%rbp), %rsi
movl %r12d, %edx
movl %r13d, %r8d
callq 0xc794
addq $0x4, %r15
cmpq $0x20, %r15
jne 0xabfe
incq %rbx
movslq 0x28(%r14), %rax
cmpq %rax, %rbx
jl 0xabfb
movq 0x8(%r14), %rax
movq 0x30(%rax), %rcx
movq -0x30(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movb $0x0, (%rcx,%r12)
incq %r12
movslq 0x10(%rax), %rdx
cmpq %rdx, %r12
jl 0xabe7
movq -0x30(%rbp), %rsi
incq %rsi
movslq 0xc(%rax), %rcx
movq %rsi, -0x30(%rbp)
cmpq %rcx, %rsi
jl 0xabce
cmpb $0x1, 0x9(%rax)
je 0xabb8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/solver/solver.cpp
// Function: Solver::solve()
void Solver::solve() {
    grid_->setUpdated(true);
    while (grid_->getUpdated() && !grid_->isSolved()) {
        applyRules(selectedRules_);

        for (int d = 0; d < depth_; d++) {
            if (!grid_->getUpdated() && !testContradictions() && !grid_->isSolved() && !multipleSolutions_) {
                solveDepth(d);
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movb $0x1, 0x9(%rdi)
callq 0x37a2
testb %al, %al
jne 0xad35
movq 0x20(%rbx), %rsi
movq %rbx, %rdi
callq 0xab92
cmpl $0x0, 0x10(%rbx)
jle 0xad2b
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
cmpb $0x0, 0x9(%rax)
jne 0xad22
movq %rbx, %rdi
callq 0xae28
testb %al, %al
jne 0xad22
movq 0x8(%rbx), %rdi
callq 0x37a2
testb %al, %al
jne 0xad22
cmpb $0x0, 0x64(%rbx)
jne 0xad22
movq %rbx, %rdi
movl %r14d, %esi
callq 0xb17a
incl %r14d
cmpl 0x10(%rbx), %r14d
jl 0xacee
movq 0x8(%rbx), %rdi
cmpb $0x1, 0x9(%rdi)
je 0xacd0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/solver/solver.cpp
// Function: Solver::Solver(Grid&, Rule*, Contradiction*, int*, int, int, EPQ)
Solver::Solver(Grid & grid, Rule rules[NUM_RULES], Contradiction contradictions[NUM_CONTRADICTIONS], int selectedRules[], int selectLength, int depth, EPQ oldEPQ) {
    grid_ = &grid;
    depth_ = depth;

    epq_.copyPQ(oldEPQ);

    multipleSolutions_ = false;

    rules_ = rules;
    contradictions_ = contradictions;
    selectedRules_ = selectedRules;
    selectLength_ = selectLength;
    ruleCounts_ = 0;

    solve();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %r14d
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, %rbx
movq 0x18(%rbp), %rax
movl 0x10(%rbp), %ecx
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movq $0x0, 0x50(%rdi)
movq %rsi, 0x8(%rdi)
movl %ecx, 0x10(%rdi)
movq (%rax), %rcx
leaq -0x48(%rbp), %rdi
movq %rcx, -0x8(%rdi)
addq $0x8, %rax
movq %rax, %rsi
callq 0xca14
leaq 0x38(%rbx), %rdi
leaq -0x50(%rbp), %rsi
callq 0x5a66
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0xada9
callq 0x2180
movb $0x0, 0x64(%rbx)
movq %r13, 0x18(%rbx)
movq %r12, 0x30(%rbx)
movq %r15, 0x20(%rbx)
movl %r14d, 0x28(%rbx)
movl $0x0, (%rbx)
movq %rbx, %rdi
callq 0xacbe
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0xadf0
callq 0x2180
jmp 0xadf0
movq %rax, %r14
addq $0x40, %rbx
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xae01
callq 0x2180
movq %r14, %rdi
callq 0x2260
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/solver/solver.cpp
// Function: Solver::testContradictions() const
bool Solver::testContradictions() const {
    if (grid_->containsClosedContours() && !grid_->isSolved()) {
        return true;
    }
    for (int i = 0; i < grid_->getHeight(); i++) {
        for (int j = 0; j < grid_->getWidth(); j++) {
            if (grid_->getContraMatrix(i,j)) {
                for (int x = 0; x < NUM_CONTRADICTIONS; x++) {
                    for (Orientation orient: (Orientation[]){ UP, DOWN, LEFT, RIGHT, UPFLIP, DOWNFLIP, LEFTFLIP, RIGHTFLIP }) {
                        if (contradictionApplies(i, j, contradictions_[x], orient)) {
                            return true;
                        }
                    }
                }
                grid_->setContraMatrix(i, j, false);
            }
        }
    }

    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x3810
testb %al, %al
je 0xae5b
movq 0x8(%rbx), %rdi
callq 0x37a2
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
je 0xaf08
movq 0x8(%rbx), %rcx
cmpl $0x0, 0xc(%rcx)
jle 0xaf06
xorl %r14d, %r14d
cmpl $0x0, 0x10(%rcx)
jle 0xaeee
xorl %r15d, %r15d
movq 0x38(%rcx), %rax
movq (%rax,%r14,8), %rax
cmpb $0x1, (%rax,%r15)
jne 0xaee2
xorl %eax, %eax
movq %rax, -0x30(%rbp)
leaq (%rax,%rax,4), %r12
shlq $0x4, %r12
xorl %r13d, %r13d
leaq 0x4750(%rip), %rax      # 0xf5ec
movl (%r13,%rax), %r8d
movq 0x30(%rbx), %rcx
addq %r12, %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
callq 0xaf18
testb %al, %al
jne 0xaf02
addq $0x4, %r13
cmpq $0x20, %r13
jne 0xae95
movq -0x30(%rbp), %rax
incq %rax
cmpq $0xb, %rax
jne 0xae86
movq 0x8(%rbx), %rcx
movq 0x38(%rcx), %rax
movq (%rax,%r14,8), %rax
movb $0x0, (%rax,%r15)
incq %r15
movslq 0x10(%rcx), %rax
cmpq %rax, %r15
jl 0xae75
incq %r14
movslq 0xc(%rcx), %rdx
xorl %eax, %eax
cmpq %rdx, %r14
jl 0xae6c
jmp 0xaf08
movb $0x1, %al
jmp 0xaf08
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/solver/solver.cpp
// Function: Solver::solveDepth(int)
void Solver::solveDepth(int depth) {
    bool usingPrioQueue = true;

    if (usingPrioQueue) {
        int initSize = epq_.size();
        int guesses = 0;

        while (!epq_.empty() && guesses++ < initSize && !multipleSolutions_) {

            PrioEdge pe = epq_.top();

            if (pe.h) {
                makeHLineGuess(pe.coords.i, pe.coords.j, depth);
                if (grid_->getHLine(pe.coords.i, pe.coords.j) == EMPTY) {
                    pe.priority = pe.priority - 1;
                    epq_.push(pe);
                }
                if (grid_->getUpdated()) {
                    break;
                }
            } else {
                makeVLineGuess(pe.coords.i, pe.coords.j, depth);
                if (grid_->getVLine(pe.coords.i, pe.coords.j) == EMPTY) {
                    pe.priority = pe.priority - 1;
                    epq_.push(pe);
                }
                if (grid_->getUpdated()) {
                    break;
                }
            }
            epq_.pop();
        }
    } else {
        for (int i = 0; i < grid_->getHeight()+1; i++) {
            for (int j = 0; j < grid_->getWidth(); j++) {
                applyRules(selectedRules_);
                makeHLineGuess(i, j, depth);
            }
        }

        for (int i = 0; i < grid_->getHeight(); i++) {
            for (int j = 0; j < grid_->getWidth()+1; j++) {
                applyRules(selectedRules_);
                makeVLineGuess(i, j, depth);
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x38(%rdi), %r15
movq %r15, %rdi
callq 0x5980
movl %eax, %r12d
movq %r15, %rdi
callq 0x596e
testb %al, %al
je 0xb1ba
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r13d, %r13d
testl %r12d, %r12d
cmovgl %r12d, %r13d
incl %r13d
leaq -0x40(%rbp), %r12
decl %r13d
je 0xb1ab
cmpb $0x0, 0x64(%r14)
jne 0xb1ab
movq %r12, %rdi
movq %r15, %rsi
callq 0x5998
movl -0x40(%rbp), %esi
movl -0x3c(%rbp), %edx
cmpb $0x1, -0x30(%rbp)
jne 0xb245
movq %r14, %rdi
movl %ebx, %ecx
callq 0xb5f6
movq 0x8(%r14), %rdi
movl -0x40(%rbp), %esi
movl -0x3c(%rbp), %edx
callq 0x4322
testl %eax, %eax
jne 0xb236
movsd -0x38(%rbp), %xmm0
addsd 0x4228(%rip), %xmm0     # 0xf440
movsd %xmm0, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq %rax, 0x10(%rsp)
movups -0x40(%rbp), %xmm0
movups %xmm0, (%rsp)
movq %r15, %rdi
callq 0x59b4
movq 0x8(%r14), %rax
cmpb $0x0, 0x9(%rax)
je 0xb29b
jmp 0xb1ab
movq %r14, %rdi
movl %ebx, %ecx
callq 0xbc9c
movq 0x8(%r14), %rdi
movl -0x40(%rbp), %esi
movl -0x3c(%rbp), %edx
callq 0x4368
testl %eax, %eax
jne 0xb28d
movsd -0x38(%rbp), %xmm0
addsd 0x41d1(%rip), %xmm0     # 0xf440
movsd %xmm0, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq %rax, 0x10(%rsp)
movups -0x40(%rbp), %xmm0
movups %xmm0, (%rsp)
movq %r15, %rdi
callq 0x59b4
movq 0x8(%r14), %rax
cmpb $0x1, 0x9(%rax)
je 0xb1ab
movq %r15, %rdi
callq 0x59c8
movq %r15, %rdi
callq 0x596e
testb %al, %al
je 0xb1cb
jmp 0xb1ab
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/generator/generator.cpp
// Function: Generator::Generator(int, int, Difficulty)
Generator::Generator(int m, int n, Difficulty difficulty) {
    m_ = m;
    n_ = n;

    numberCount_ = m_*n_;

    buffer_ = 0;

    srand(time(NULL));
    setDifficulty(difficulty);
    createPuzzle();
    displayFinalPuzzle();
    destroyArrays();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r12d
movq %rdi, %r15
leaq 0x48(%rdi), %rbx
movw $0x100, %ax             # imm = 0x100
movw %ax, 0x50(%rdi)
leaq 0x6269(%rip), %rcx      # 0x12d38
addq $0x10, %rcx
movq %rcx, 0x48(%rdi)
movw $0x1, %di
movw %di, 0x90(%r15)
leaq 0xa0(%r15), %r14
movw %ax, 0xa8(%r15)
movq %rcx, 0xa0(%r15)
movw %di, 0xe8(%r15)
leaq 0xf8(%r15), %r13
xorps %xmm0, %xmm0
movups %xmm0, 0xf8(%r15)
movups %xmm0, 0x108(%r15)
movups %xmm0, 0x118(%r15)
movl %esi, (%r15)
movl %edx, 0x4(%r15)
imull %esi, %edx
movl %edx, 0x18(%r15)
movl $0x0, 0x20(%r15)
xorl %edi, %edi
callq 0x2170
movl %eax, %edi
callq 0x2190
movq %r15, %rdi
movl %r12d, %esi
callq 0xcd94
testl %r12d, %r12d
je 0xcb67
cmpl $0x1, %r12d
jne 0xcb7d
movsd 0x2ab3(%rip), %xmm0     # 0xf618
jmp 0xcb6f
movsd 0x2aa1(%rip), %xmm0     # 0xf610
movsd %xmm0, 0x10(%r15)
movl $0x1, 0x8(%r15)
movq %r15, %rdi
callq 0xcc1e
movq %r15, %rdi
callq 0xcc90
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xcd14
movq %rax, %r12
movq 0x110(%r15), %rdi
testq %rdi, %rdi
je 0xcbb7
callq 0x2180
movq (%r13), %rdi
testq %rdi, %rdi
je 0xcbc5
callq 0x2180
movq %r14, %rdi
callq 0x2a54
movq %rbx, %rdi
callq 0x2a54
movq %r12, %rdi
callq 0x2260
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/generator/generator.cpp
// Function: Generator::createPuzzle()
void Generator::createPuzzle() {
    smallestCount_ = numberCount_;
    bufferReachCount_ = 0;
    Import importer = Import(grid_, m_, n_);
    LoopGen loopgen = LoopGen(m_, n_, grid_);

    initArrays();
    setCounts();
    grid_.copy(smallestCountGrid_);
    reduceNumbers();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movl 0x18(%rdi), %eax
movl %eax, 0x1c(%rdi)
movl $0x0, 0x24(%rdi)
leaq 0x48(%rdi), %r14
movl (%rdi), %edx
movl 0x4(%rdi), %ecx
leaq -0x20(%rbp), %rdi
movq %r14, %rsi
callq 0x3d16
movl (%rbx), %esi
movl 0x4(%rbx), %edx
leaq -0x38(%rbp), %rdi
movq %r14, %rcx
callq 0xde0c
movq %rbx, %rdi
callq 0xce06
movq %rbx, %rdi
callq 0xcf2c
leaq 0xa0(%rbx), %rsi
movq %r14, %rdi
callq 0x2c6c
movq %rbx, %rdi
callq 0xcf96
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/generator/generator.cpp
// Function: Generator::displayFinalPuzzle()
void Generator::displayFinalPuzzle() {
    checkIfSolved();
    displayPuzzle();
    std::cout << std::endl;
    grid_.resetGrid();
    displayPuzzle();

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0xd08e
addq $0x48, %rbx
leaq -0x18(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2644
movq %r14, %rdi
callq 0x264e
movq 0x6313(%rip), %r14      # 0x12fd8
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq %rbx, %rdi
callq 0x2b2c
leaq -0x18(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2644
movq %r14, %rdi
callq 0x264e
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/generator/generator.cpp
// Function: Generator::destroyArrays()
void Generator::destroyArrays() {
    for (int i = 0; i < m_; i++) {
        delete [] canEliminate_[i];
        delete [] oldNumbers_[i];
    }
    delete [] canEliminate_;
    delete [] oldNumbers_;
    delete [] selectedRules_;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jle 0xcd5b
xorl %r14d, %r14d
movq 0x138(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0xcd3b
callq 0x21e0
movq 0x140(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0xcd50
callq 0x21e0
incq %r14
movslq (%rbx), %rax
cmpq %rax, %r14
jl 0xcd26
movq 0x138(%rbx), %rdi
testq %rdi, %rdi
je 0xcd6c
callq 0x21e0
movq 0x140(%rbx), %rdi
testq %rdi, %rdi
je 0xcd7d
callq 0x21e0
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0xcd8f
popq %rbx
popq %r14
popq %rbp
jmp 0x21e0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/generator/generator.cpp
// Function: Generator::setRules(Difficulty)
void Generator::setRules(Difficulty difficulty) {
    if (difficulty == EASY) {
        numberOfRules_ = sizeof((int [])EASY_RULES) / sizeof(int);
        selectedRules_ = new int[numberOfRules_];

        for (int i = 0; i < numberOfRules_; i++) {
            selectedRules_[i] = (int [])EASY_RULES[i];
        }
    } else {
        numberOfRules_ = sizeof((int [])HARD_RULES) / sizeof(int);
        selectedRules_ = new int[numberOfRules_];

        for (int i = 0; i < numberOfRules_; i++) {
            selectedRules_[i] = (int [])HARD_RULES[i];
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
je 0xcdc9
movl $0x15, 0x40(%rbx)
movl $0x54, %edi
callq 0x2030
movq %rax, 0x38(%rbx)
leaq 0x28eb(%rip), %rsi      # 0xf6a8
movl $0x15, %ecx
movq %rax, %rdi
rep  movsl (%rsi), %es:(%rdi)
jmp 0xcdfe
movl $0xc, 0x40(%rbx)
movl $0x30, %edi
callq 0x2030
movq %rax, 0x38(%rbx)
movups 0x2893(%rip), %xmm0     # 0xf678
movups %xmm0, (%rax)
movups 0x2899(%rip), %xmm0     # 0xf688
movups %xmm0, 0x10(%rax)
movups 0x289e(%rip), %xmm0     # 0xf698
movups %xmm0, 0x20(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/generator/generator.cpp
// Function: Generator::initArrays()
void Generator::initArrays() {
    canEliminate_ = new bool*[m_];
    oldNumbers_ = new Number*[m_];
    for (int i = 0; i < m_; i++) {
        canEliminate_[i] = new bool[n_];
        oldNumbers_[i] = new Number[n_];

        for (int j = 0; j < n_; j++) {
            canEliminate_[i][j] = true;
            oldNumbers_[i][j] = grid_.getNumber(i+1, j+1);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movslq (%rdi), %r15
leaq (,%r15,8), %r14
testq %r15, %r15
movq $-0x1, %rax
cmovsq %rax, %r14
movq %r14, %rdi
callq 0x2030
movq %rax, 0x138(%rbx)
movq %r14, %rdi
callq 0x2030
movq %rax, 0x140(%rbx)
movq %r15, -0x30(%rbp)
testq %r15, %r15
jle 0xcf1c
leaq 0x48(%rbx), %rax
movq %rax, -0x38(%rbp)
movl 0x4(%rbx), %r14d
xorl %r15d, %r15d
movslq %r14d, %r12
leaq (,%r12,4), %r13
testl %r12d, %r12d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovnsl %r12d, %eax
movslq %eax, %rdi
movq $-0x1, %rax
cmovsq %rax, %r13
callq 0x2030
movq 0x138(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
movq %r13, %rdi
callq 0x2030
leaq 0x1(%r15), %rdx
movq 0x140(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
testl %r12d, %r12d
jle 0xcf0c
xorl %r12d, %r12d
movq 0x138(%rbx), %rax
movq (%rax,%r15,8), %rax
movb $0x1, (%rax,%r12)
leaq 0x1(%r12), %r13
movq -0x38(%rbp), %rdi
movq %rdx, %r14
movl %r14d, %esi
movl %r13d, %edx
callq 0x42dc
movq %r14, %rdx
movq 0x140(%rbx), %rcx
movq (%rcx,%r15,8), %rcx
movl %eax, (%rcx,%r12,4)
movslq 0x4(%rbx), %r14
movq %r13, %r12
cmpq %r14, %r13
jl 0xcec1
movl (%rbx), %eax
movq %rax, -0x30(%rbp)
movslq -0x30(%rbp), %rax
movq %rdx, %r15
cmpq %rax, %rdx
jl 0xce6d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/generator/generator.cpp
// Function: Generator::setCounts()
void Generator::setCounts() {
    zeroCount_ = 0;
    oneCount_ = 0;
    twoCount_ = 0;
    threeCount_ = 0;
    for (int i = 1; i <= m_; i++) {
        for (int j = 1; j <= n_; j++) {
            Number oldNum = grid_.getNumber(i, j);
            plusCounts(oldNum);
        }
    }
}

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movl (%rdi), %eax
testl %eax, %eax
jle 0xcf94
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x48(%rdi), %r14
movl 0x4(%rdi), %ecx
movl $0x1, %r15d
testl %ecx, %ecx
jle 0xcf80
xorl %r12d, %r12d
incl %r12d
movq %r14, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x42dc
movq %rbx, %rdi
movl %eax, %esi
callq 0xd2e4
movl 0x4(%rbx), %ecx
cmpl %ecx, %r12d
jl 0xcf5b
movl (%rbx), %eax
leal 0x1(%r15), %edx
cmpl %eax, %r15d
movl %edx, %r15d
jl 0xcf54
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/generator/generator.cpp
// Function: Generator::reduceNumbers()
void Generator::reduceNumbers() {

    // Remove numbers until this count has been reached
    while (numberCount_ > ((m_*n_)*factor_ + 3)) {

        /* Reset the smallest count and buffer incase the required amount
        of numbers cannot be removed. */
        if (smallestCount_ > numberCount_) {
            smallestCount_ = numberCount_;
            grid_.clearAndCopy(smallestCountGrid_);
            buffer_ = (numberCount_ + (m_*n_))/2 - 2;
        }

        if (numberCount_ == buffer_) {
            bufferReachCount_ ++;
        }

        /* If the count has past the buffer three times,
         * return the grid with the smallest count of
         * of numbers that is currently known. */
        if (bufferReachCount_ == 3) {
            smallestCountGrid_.clearAndCopy(grid_);
            break;
        }

        findNumberToRemove();
        eligibleCoordinates_.clear();

        grid_.resetGrid();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl 0x4(%rdi), %ecx
movl 0x18(%rdi), %eax
cvtsi2sd %eax, %xmm0
imull (%rdi), %ecx
cvtsi2sd %ecx, %xmm1
mulsd 0x10(%rdi), %xmm1
addsd 0x2662(%rip), %xmm1     # 0xf620
ucomisd %xmm1, %xmm0
jbe 0xd06e
movq %rdi, %rbx
leaq 0x48(%rdi), %r14
leaq 0xa0(%rdi), %r15
cmpl %eax, 0x1c(%rbx)
jle 0xd005
movl %eax, 0x1c(%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x2fe6
movl 0x4(%rbx), %edx
imull (%rbx), %edx
movl 0x18(%rbx), %eax
addl %eax, %edx
movl %edx, %ecx
shrl $0x1f, %ecx
addl %edx, %ecx
sarl %ecx
addl $-0x2, %ecx
movl %ecx, 0x20(%rbx)
jmp 0xd008
movl 0x20(%rbx), %ecx
movl 0x24(%rbx), %edx
cmpl %ecx, %eax
jne 0xd014
incl %edx
movl %edx, 0x24(%rbx)
cmpl $0x3, %edx
je 0xd079
movq %rbx, %rdi
callq 0xd344
movq 0xf8(%rbx), %rax
cmpq %rax, 0x100(%rbx)
je 0xd038
movq %rax, 0x100(%rbx)
movq %r14, %rdi
callq 0x2b2c
movl 0x4(%rbx), %ecx
movl 0x18(%rbx), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
imull (%rbx), %ecx
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
mulsd 0x10(%rbx), %xmm1
addsd 0x25bc(%rip), %xmm1     # 0xf620
ucomisd %xmm1, %xmm0
ja 0xcfd6
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2fe6
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r14
pushq %rbx
subq $0x1470, %rsp           # imm = 0x1470
movq %rdi, %rbx
movl $0x8, %eax
xorps %xmm0, %xmm0
movups %xmm0, -0x1410(%rbp,%rax)
movups %xmm0, -0x1420(%rbp,%rax)
movups %xmm0, -0x1430(%rbp,%rax)
movups %xmm0, -0x1440(%rbp,%rax)
movups %xmm0, -0x1450(%rbp,%rax)
movups %xmm0, -0x1460(%rbp,%rax)
movups %xmm0, -0x1470(%rbp,%rax)
movq $0x0, -0x1400(%rbp,%rax)
subq $-0x80, %rax
cmpq $0x1088, %rax           # imm = 0x1088
jne 0xd0a7
leaq -0x1470(%rbp), %rdi
callq 0x62d8
movl $0x8, %eax
xorps %xmm0, %xmm0
movups %xmm0, -0x3c0(%rbp,%rax)
movups %xmm0, -0x3d0(%rbp,%rax)
movups %xmm0, -0x3e0(%rbp,%rax)
movups %xmm0, -0x3f0(%rbp,%rax)
movq $0x0, -0x3b0(%rbp,%rax)
addq $0x50, %rax
cmpq $0x378, %rax            # imm = 0x378
jne 0xd10b
leaq -0x3f0(%rbp), %rdi
callq 0x4508
leaq 0x48(%rbx), %r14
movq %r14, %rdi
callq 0x2b2c
movq 0x38(%rbx), %r8
movl 0x40(%rbx), %r9d
movl 0x8(%rbx), %eax
movl %eax, (%rsp)
leaq -0x78(%rbp), %rdi
leaq -0x1470(%rbp), %rdx
leaq -0x3f0(%rbp), %rcx
movq %r14, %rsi
callq 0xaa98
movq %r14, %rdi
callq 0x37a2
movl %eax, %ebx
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xd19b
callq 0x2180
movl $0x328, %r14d           # imm = 0x328
movq -0x3c0(%rbp,%r14), %rdi
testq %rdi, %rdi
je 0xd1b3
callq 0x2180
movq -0x3d8(%rbp,%r14), %rdi
testq %rdi, %rdi
je 0xd1c5
callq 0x2180
movq -0x3f0(%rbp,%r14), %rdi
testq %rdi, %rdi
je 0xd1d7
callq 0x2180
addq $-0x50, %r14
cmpq $-0x48, %r14
jne 0xd1a1
movl $0x1008, %r14d          # imm = 0x1008
movq -0x1410(%rbp,%r14), %rdi
testq %rdi, %rdi
je 0xd1f9
callq 0x2180
movq -0x1428(%rbp,%r14), %rdi
testq %rdi, %rdi
je 0xd20b
callq 0x2180
movq -0x1440(%rbp,%r14), %rdi
testq %rdi, %rdi
je 0xd21d
callq 0x2180
movq -0x1458(%rbp,%r14), %rdi
testq %rdi, %rdi
je 0xd22f
callq 0x2180
movq -0x1470(%rbp,%r14), %rdi
testq %rdi, %rdi
je 0xd241
callq 0x2180
addq $-0x80, %r14
cmpq $-0x78, %r14
jne 0xd1e7
movl %ebx, %eax
addq $0x1470, %rsp           # imm = 0x1470
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xd276
callq 0x2180
jmp 0xd276
jmp 0xd273
movq %rax, %rbx
jmp 0xd296
movq %rax, %rbx
movl $0x320, %r14d           # imm = 0x320
leaq (%r14,%rbp), %rdi
addq $-0x3f0, %rdi           # imm = 0xFC10
callq 0xdc94
addq $-0x50, %r14
cmpq $-0x50, %r14
jne 0xd27c
movl $0x1000, %r14d          # imm = 0x1000
leaq (%r14,%rbp), %rdi
addq $-0x1470, %rdi          # imm = 0xEB90
callq 0xdc3c
addq $-0x80, %r14
cmpq $-0x80, %r14
jne 0xd29c
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/generator/generator.cpp
// Function: Generator::plusCounts(Number)
void Generator::plusCounts(Number num) {
    if (num == ZERO) {
        zeroCount_ ++;
    }else if (num == ONE) {
        oneCount_ ++;
    } else if (num == TWO) {
        twoCount_ ++;
    } else if (num == THREE) {
        threeCount_ ++;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
decl %esi
cmpl $0x3, %esi
ja 0xd311
leaq 0x2352(%rip), %rax      # 0xf648
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
incl 0x28(%rdi)
jmp 0xd311
incl 0x30(%rdi)
jmp 0xd311
incl 0x34(%rdi)
jmp 0xd311
incl 0x2c(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/generator/generator.cpp
// Function: Generator::fillEligibleVector()
void Generator::fillEligibleVector() {
    for (int i = 1; i < m_+1; i++) {
        for (int j = 1; j < n_+1; j++) {
            if (eligible(i, j)) {
                Coordinates coords = { i, j };
                eligibleCoordinates_.push_back(coords);
            }
        }
    }
}

// Assembly:
movl (%rdi), %ecx
testl %ecx, %ecx
jle 0xd5b3
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x48(%rdi), %r14
leaq 0xf8(%rdi), %rax
movq %rax, -0x38(%rbp)
movl 0x4(%rdi), %eax
movl $0x1, %r13d
testl %eax, %eax
jle 0xd592
xorl %r15d, %r15d
movq 0x138(%rbx), %rax
movq -0x8(%rax,%r13,8), %rax
cmpb $0x1, (%rax,%r15)
jne 0xd584
leaq 0x1(%r15), %r12
movq %r14, %rdi
movl %r13d, %esi
movl %r12d, %edx
callq 0x42dc
testl %eax, %eax
je 0xd584
movl %r13d, -0x30(%rbp)
movl %r12d, -0x2c(%rbp)
movq 0x100(%rbx), %rsi
cmpq 0x108(%rbx), %rsi
je 0xd577
movq -0x30(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x100(%rbx)
jmp 0xd584
movq -0x38(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0xdcd0
movslq 0x4(%rbx), %rax
incq %r15
cmpq %rax, %r15
jl 0xd525
movl (%rbx), %ecx
leaq 0x1(%r13), %rdx
movslq %ecx, %rsi
cmpq %rsi, %r13
movq %rdx, %r13
jl 0xd51e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/generator/generator.cpp
// Function: Generator::isBalanced(int, int) const
bool Generator::isBalanced(int i, int j) const {
    float moa = 1.1;
    Number num = grid_.getNumber(i, j);
    if (num == THREE) {
        return (threeCount_*2*moa >= 3*oneCount_ & threeCount_*5*moa >= 3*twoCount_);
    } else if (num == TWO) {
        return (twoCount_*2.1+1 >= 5*oneCount_ & twoCount_*3*moa >= 5*threeCount_);
    } else if (num == ONE) {
        return (oneCount_*3*moa >= 2*threeCount_ & oneCount_*5*moa >= 2*twoCount_);
    } else {
        return false;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x48, %rdi
callq 0x42dc
cmpl $0x2, %eax
je 0xd66b
cmpl $0x3, %eax
je 0xd61a
cmpl $0x4, %eax
jne 0xd6b2
movl 0x34(%rbx), %eax
leal (%rax,%rax), %ecx
cvtsi2ss %ecx, %xmm0
movss 0x210d(%rip), %xmm1     # 0xf6fc
mulss %xmm1, %xmm0
movl 0x2c(%rbx), %ecx
movl 0x30(%rbx), %edx
leal (%rcx,%rcx,2), %ecx
cvtsi2ss %ecx, %xmm2
cmpleps %xmm0, %xmm2
leal (%rax,%rax,4), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
leal (%rdx,%rdx,2), %eax
cvtsi2ss %eax, %xmm3
jmp 0xd6a1
movl 0x30(%rbx), %eax
cvtsi2sd %eax, %xmm0
mulsd 0x1fff(%rip), %xmm0     # 0xf628
movl 0x2c(%rbx), %ecx
addsd 0x1e14(%rip), %xmm0     # 0xf448
leal (%rcx,%rcx,4), %ecx
cvtsi2sd %ecx, %xmm1
ucomisd %xmm1, %xmm0
leal (%rax,%rax,2), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
setae %cl
mulss 0x20a8(%rip), %xmm0     # 0xf6fc
movl 0x34(%rbx), %eax
leal (%rax,%rax,4), %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
ucomiss %xmm1, %xmm0
setae %al
andb %cl, %al
jmp 0xd6b4
movl 0x2c(%rbx), %eax
movl 0x30(%rbx), %ecx
leal (%rax,%rax,2), %edx
cvtsi2ss %edx, %xmm0
movss 0x207c(%rip), %xmm1     # 0xf6fc
mulss %xmm1, %xmm0
movl 0x34(%rbx), %edx
addl %edx, %edx
cvtsi2ss %edx, %xmm2
cmpleps %xmm0, %xmm2
leal (%rax,%rax,4), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
addl %ecx, %ecx
cvtsi2ss %ecx, %xmm3
mulss %xmm1, %xmm0
cmpleps %xmm0, %xmm3
andps %xmm2, %xmm3
movd %xmm3, %eax
jmp 0xd6b4
xorl %eax, %eax
andb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/generator/generator.cpp
// Function: Generator::removeNumber(int, int)
void Generator::removeNumber(int i, int j) {
    grid_.setNumber(i, j, NONE);
    grid_.resetGrid();
    Coordinates removed{ i, j };
    ineligibleCoordinates_.push_back(removed);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x48(%rdi), %r12
movq %r12, %rdi
xorl %ecx, %ecx
callq 0x43de
movq %r12, %rdi
callq 0x2b2c
movl %r15d, -0x28(%rbp)
movl %r14d, -0x24(%rbp)
movq 0x118(%rbx), %rsi
cmpq 0x120(%rbx), %rsi
je 0xd715
movq -0x28(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x118(%rbx)
jmp 0xd728
addq $0x110, %rbx            # imm = 0x110
leaq -0x28(%rbp), %rdx
movq %rbx, %rdi
callq 0xdcd0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/generator/generator.cpp
// Function: Generator::getNecessaryCoordinate()
void Generator::getNecessaryCoordinate() {
    bool found = false;

    while (!found) {
        Coordinates popped = ineligibleCoordinates_.back();
        if (grid_.getNumber(popped.i, popped.j) == NONE) {
            markNecessary(popped.i, popped.j);
            setOldNumber(popped.i, popped.j);
            ineligibleCoordinates_.push_back(popped);
            plusCounts(grid_.getNumber(popped.i, popped.j));
            found = true;
        } else {
            ineligibleCoordinates_.pop_back();
            markEligible(popped.i, popped.j);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x48(%rdi), %r14
movq 0x118(%rdi), %rax
movq -0x8(%rax), %rsi
movq %rsi, -0x18(%rbp)
movq %rsi, %rdx
shrq $0x20, %rdx
movq %r14, %rdi
callq 0x42dc
testl %eax, %eax
je 0xd7d6
addq $-0x8, 0x118(%rbx)
movslq -0x18(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq 0x138(%rbx), %rdx
movq -0x8(%rdx,%rax,8), %rax
movb $0x1, -0x1(%rax,%rcx)
movq 0x118(%rbx), %rax
jmp 0xd791
movslq -0x18(%rbp), %rsi
movslq -0x14(%rbp), %rdx
movq 0x138(%rbx), %rax
movq -0x8(%rax,%rsi,8), %rax
movb $0x0, -0x1(%rax,%rdx)
movq 0x140(%rbx), %rax
movq -0x8(%rax,%rsi,8), %rax
movl -0x4(%rax,%rdx,4), %ecx
movq %r14, %rdi
callq 0x43de
movq 0x118(%rbx), %rsi
cmpq 0x120(%rbx), %rsi
je 0xd828
movq -0x18(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x118(%rbx)
jmp 0xd838
leaq 0x110(%rbx), %rdi
leaq -0x18(%rbp), %rdx
callq 0xdcd0
movl -0x18(%rbp), %esi
movl -0x14(%rbp), %edx
movq %r14, %rdi
callq 0x42dc
movq %rbx, %rdi
movl %eax, %esi
callq 0xd2e4
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/generator/generator.cpp
// Function: Generator::isBalanced(int, int, Number) const
bool Generator::isBalanced(int i, int j, Number num) const {
    if (eligible(i, j)) {
        if (num == ZERO) {
            return true;
        } if (num == THREE) {
            return (threeCount_*2.1+1 > 3*oneCount_ & threeCount_*5.2+1 > 3*twoCount_);
        } if (num == ONE) {
            return (oneCount_*3.2+1 > 2*threeCount_ & oneCount_*5.2+1 > 2*twoCount_);
        } if (num == TWO) {
            return (twoCount_*2.1+1 > 5*oneCount_ & twoCount_*3.1+1 > 5*threeCount_);
        }
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %ecx, %r14d
movq 0x138(%rdi), %rax
movslq %esi, %rcx
movq -0x8(%rax,%rcx,8), %rax
movslq %edx, %rcx
cmpb $0x1, -0x1(%rax,%rcx)
jne 0xdb65
movq %rdi, %rbx
addq $0x48, %rdi
callq 0x42dc
testl %eax, %eax
je 0xdb65
decl %r14d
cmpl $0x3, %r14d
ja 0xdb65
leaq 0x1b13(%rip), %rax      # 0xf668
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movb $0x1, %al
jmp 0xdc34
xorl %eax, %eax
jmp 0xdc34
cvtsi2sdl 0x30(%rbx), %xmm0
movsd 0x1aaf(%rip), %xmm1     # 0xf628
mulsd %xmm0, %xmm1
movsd 0x18c3(%rip), %xmm2     # 0xf448
addsd %xmm2, %xmm1
movl 0x2c(%rbx), %eax
movl 0x34(%rbx), %ecx
leal (%rax,%rax,4), %eax
cvtsi2sd %eax, %xmm3
mulsd 0x1a92(%rip), %xmm0     # 0xf630
cmpltpd %xmm1, %xmm3
leal (%rcx,%rcx,4), %eax
jmp 0xdc1c
cvtsi2sdl 0x34(%rbx), %xmm0
movsd 0x1a73(%rip), %xmm1     # 0xf628
mulsd %xmm0, %xmm1
movsd 0x1887(%rip), %xmm2     # 0xf448
addsd %xmm2, %xmm1
movl 0x2c(%rbx), %eax
movl 0x30(%rbx), %ecx
leal (%rax,%rax,2), %eax
cvtsi2sd %eax, %xmm3
mulsd 0x1a66(%rip), %xmm0     # 0xf640
cmpltpd %xmm1, %xmm3
leal (%rcx,%rcx,2), %eax
jmp 0xdc1c
cvtsi2sdl 0x2c(%rbx), %xmm0
movsd 0x1a47(%rip), %xmm1     # 0xf638
mulsd %xmm0, %xmm1
movsd 0x184b(%rip), %xmm2     # 0xf448
addsd %xmm2, %xmm1
movl 0x30(%rbx), %eax
movl 0x34(%rbx), %ecx
addl %ecx, %ecx
cvtsi2sd %ecx, %xmm3
mulsd 0x1a2b(%rip), %xmm0     # 0xf640
cmpltpd %xmm1, %xmm3
addl %eax, %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
addsd %xmm2, %xmm0
cmpltpd %xmm0, %xmm1
andpd %xmm3, %xmm1
movd %xmm1, %eax
andb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/generator/loopgen.cpp
// Function: LoopGen::LoopGen(int, int, Grid&)
LoopGen::LoopGen(int m, int n, Grid & grid) {
    m_ = m;
    n_ = n;
    grid_ = &grid;
    srand(time(NULL));

    initArray();
    genLoop();
    fillGrid();
    destroyArray();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, 0x10(%rdi)
movl %edx, 0x14(%rdi)
movq %rcx, 0x8(%rdi)
xorl %edi, %edi
callq 0x2170
movl %eax, %edi
callq 0x2190
movq %rbx, %rdi
callq 0xde54
movq %rbx, %rdi
callq 0xdeea
movq %rbx, %rdi
callq 0xdffc
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xe078
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/generator/loopgen.cpp
// Function: LoopGen::initArray()
void LoopGen::initArray() {
    loop_ = new LoopCell*[m_];
    for (int i = 0; i < m_; i++) {
        loop_[i] = new LoopCell[n_];

        for (int j = 0; j < n_; j++) {
            loop_[i][j] = UNKNOWN;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0x10(%rdi), %r12
leaq (,%r12,8), %rdi
testq %r12, %r12
movq $-0x1, %r15
cmovsq %r15, %rdi
callq 0x2030
movq %rax, (%rbx)
testq %r12, %r12
jle 0xdedb
movslq 0x14(%rbx), %r13
leaq (,%r13,4), %r14
testq %r13, %r13
cmovsq %r15, %r14
movl %r13d, %eax
shlq $0x2, %rax
movq %rax, -0x30(%rbp)
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x2030
movq (%rbx), %rcx
movq %rax, (%rcx,%r15,8)
testl %r13d, %r13d
jle 0xded3
movq (%rbx), %rax
movq (%rax,%r15,8), %rdi
xorl %esi, %esi
movq -0x30(%rbp), %rdx
callq 0x20e0
incq %r15
cmpq %r15, %r12
jne 0xdead
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/generator/loopgen.cpp
// Function: LoopGen::genLoop()
void LoopGen::genLoop() {
    Coordinates cur = { m_ / 2, n_ / 2 };
    Coordinates next;
    std::vector<Coordinates> avail;
    avail.push_back(cur);

    while (avail.size() > 0) {
        cur = pickCell(avail);

        if (cur.i == -1 || cur.j == -1) {
            return;
        }

        next = addCell(cur);

        if (loop_[cur.i][cur.j] == EXP) {
            addAvailable(cur, avail);
        }
        if (loop_[next.i][next.j] == EXP) {
            addAvailable(next, avail);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movl 0x10(%rdi), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
leaq -0x28(%rbp), %rdx
movl %ecx, (%rdx)
movl 0x14(%rdi), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
movl %ecx, 0x4(%rdx)
xorps %xmm0, %xmm0
leaq -0x40(%rbp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
xorl %esi, %esi
callq 0xdcd0
movq -0x40(%rbp), %rdi
cmpq %rdi, -0x38(%rbp)
je 0xdfc9
leaq -0x40(%rbp), %r14
movabsq $-0x100000000, %r12     # imm = 0xFFFFFFFF00000000
movq %r14, %rsi
callq 0xe30a
movq %rax, -0x28(%rbp)
cmpl $-0x1, %eax
je 0xdfc5
cmpq %r12, %rax
jae 0xdfc5
movq %rbx, %rdi
movq %rax, %rsi
callq 0xe37a
movq %rax, %r15
movq (%rbx), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movslq -0x24(%rbp), %rdx
cmpl $0x1, (%rcx,%rdx,4)
jne 0xdf9a
movq -0x28(%rbp), %rsi
movq %r14, %rdx
callq 0xe498
movq (%rbx), %rax
movslq %r15d, %rcx
movq (%rax,%rcx,8), %rax
movq %r15, %rcx
sarq $0x20, %rcx
cmpl $0x1, (%rax,%rcx,4)
jne 0xdfb9
movq %r15, %rsi
movq %r14, %rdx
callq 0xe498
movq -0x40(%rbp), %rdi
cmpq %rdi, -0x38(%rbp)
jne 0xdf52
jmp 0xdfc9
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0xdfd3
callq 0x2180
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xdfe2
movq %rax, %rbx
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0xdff3
callq 0x2180
movq %rbx, %rdi
callq 0x2260
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/generator/loopgen.cpp
// Function: LoopGen::fillGrid()
void LoopGen::fillGrid() {
    int lines;
    for (int i = 1; i < m_ + 1; i++) {
        for (int j = 1; j < n_ + 1; j++) {
            lines = countLines(i - 1, j - 1);

            switch (lines) {
                case 0:
                    grid_->setNumber(i, j, ZERO);
                    break;
                case 1:
                    grid_->setNumber(i, j, ONE);
                    break;
                case 2:
                    grid_->setNumber(i, j, TWO);
                    break;
                case 3:
                    grid_->setNumber(i, j, THREE);
                    break;
            }
        }
    }
}

// Assembly:
movl 0x10(%rdi), %ecx
testl %ecx, %ecx
jle 0xe077
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl 0x14(%rdi), %eax
movl $0x1, %r14d
testl %eax, %eax
jle 0xe063
leal -0x1(%r14), %r15d
movl $0x1, %r12d
leal -0x1(%r12), %edx
movq %rbx, %rdi
movl %r15d, %esi
callq 0xe0c2
cmpl $0x3, %eax
ja 0xe050
incl %eax
movq 0x8(%rbx), %rdi
movl %r14d, %esi
movl %r12d, %edx
movl %eax, %ecx
callq 0x43de
leal 0x1(%r12), %ecx
movl 0x14(%rbx), %eax
cmpl %eax, %r12d
movl %ecx, %r12d
jl 0xe028
movl 0x10(%rbx), %ecx
leal 0x1(%r14), %edx
cmpl %ecx, %r14d
movl %edx, %r14d
jl 0xe01a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/generator/loopgen.cpp
// Function: LoopGen::pickCell(std::vector<Coordinates, std::allocator<Coordinates>>&) const
Coordinates LoopGen::pickCell(std::vector<Coordinates> & avail) const {
    Coordinates guess;

    if (avail.size() > 0) {
        guess = avail.back();
        int guessindex = rand() % avail.size();
        guess = avail[guessindex];

        avail.erase(avail.begin() + guessindex);
        return guess;
    } else {
        return { -1, -1 };
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x8(%rsi), %rax
cmpq (%rsi), %rax
je 0xe36b
movq %rsi, %rbx
callq 0x2080
cltq
movq (%rbx), %rdi
movq 0x8(%rbx), %rcx
movq %rcx, %rsi
subq %rdi, %rsi
sarq $0x3, %rsi
xorl %edx, %edx
divq %rsi
movslq %edx, %rax
leaq (%rdi,%rax,8), %rsi
addq $0x8, %rsi
movq -0x8(%rsi), %r14
cmpq %rcx, %rsi
je 0xe361
leaq (%rdi,%rax,8), %rdi
subq %rsi, %rcx
movq %rcx, %rdx
callq 0x2240
movq 0x8(%rbx), %rcx
addq $-0x8, %rcx
movq %rcx, 0x8(%rbx)
jmp 0xe372
movq $-0x1, %r14
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/generator/loopgen.cpp
// Function: LoopGen::addCell(Coordinates)
Coordinates LoopGen::addCell(Coordinates cur) {
    assert(cur.i >= 0 && cur.i < m_ && cur.j >= 0 && cur.j < n_);

    /* check whether it's possible to expand in any direction */
    if (!isExpandable(cur)) {
        return cur;
    }

    /* pick some direction up/down/left/right from cur */
    Coordinates newpos = pickDirection(cur);

    /* and verify it's a valid choice */
    if (!inBounds(newpos) || loop_[newpos.i][newpos.j] != UNKNOWN) {
        return cur;
    }

    AdjacencyList adjacencyList = getAdjacent(newpos);

    if (!adjacencyList.u && !adjacencyList.d && !adjacencyList.l && !adjacencyList.r) {
        loop_[newpos.i][newpos.j] = OUT;
        return newpos;
    }

    loop_[newpos.i][newpos.j] = (validCell(newpos, cur)) ? EXP : OUT;
    return newpos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
testl %r14d, %r14d
js 0xe478
testq %r14, %r14
js 0xe478
movq %rdi, %rbx
cmpl %r14d, 0x10(%rdi)
jle 0xe478
movq %r14, %r13
shrq $0x20, %r13
cmpl %r13d, 0x14(%rbx)
jle 0xe478
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe506
testb %al, %al
je 0xe40e
movq %r14, %rsi
callq 0xe58e
movq %rax, %r15
movabsq $-0x7fffffff80000000, %rax # imm = 0x8000000080000000
testq %rax, %r15
jne 0xe40e
cmpl %r15d, 0x10(%rbx)
jle 0xe40e
movq %r15, %r12
shrq $0x20, %r12
cmpl %r12d, 0x14(%rbx)
jle 0xe40e
movq (%rbx), %rax
movl %r15d, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq (%rax,%rcx,8), %rax
cmpl $0x0, (%rax,%r12,4)
je 0xe42d
movq %r14, %r15
movq %r13, %r12
shlq $0x20, %r12
movl %r15d, %eax
orq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rcx, %r13
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe5f6
movl %eax, %ecx
xorb $0x1, %cl
testl $0x1010100, %eax        # imm = 0x1010100
sete %dl
movl $0x3, %eax
testb %cl, %dl
jne 0xe46b
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xe6a4
xorb $0x1, %al
movzbl %al, %eax
leal 0x1(,%rax,2), %eax
movq (%rbx), %rcx
movq (%rcx,%r13,8), %rcx
movl %eax, (%rcx,%r12,4)
jmp 0xe414
leaq 0x12cb(%rip), %rdi      # 0xf74a
leaq 0x12f9(%rip), %rsi      # 0xf77f
leaq 0x130c(%rip), %rcx      # 0xf799
movl $0x71, %edx
callq 0x2100
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/generator/loopgen.cpp
// Function: LoopGen::addAvailable(Coordinates, std::vector<Coordinates, std::allocator<Coordinates>>&) const
void LoopGen::addAvailable(Coordinates coords, std::vector<Coordinates> & avail) const {
    for (int i = 0; i < avail.size(); i++) {
        if (avail[i].i == coords.i && avail[i].j == coords.j) {
            return;
        }
    }

    avail.push_back(coords);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rsi, %rax
movq %rsi, -0x8(%rbp)
movq (%rdx), %rcx
movq 0x8(%rdx), %rsi
movq %rsi, %rdi
subq %rcx, %rdi
je 0xe4e1
movq %rax, %r8
shrq $0x20, %r8
sarq $0x3, %rdi
cmpq $0x1, %rdi
adcq $0x0, %rdi
xorl %r9d, %r9d
cmpl %eax, (%rcx,%r9,8)
jne 0xe4d9
cmpl %r8d, 0x4(%rcx,%r9,8)
je 0xe500
incq %r9
cmpq %r9, %rdi
jne 0xe4cc
cmpq 0x10(%rdx), %rsi
je 0xe4f1
movq %rax, (%rsi)
addq $0x8, 0x8(%rdx)
jmp 0xe500
leaq -0x8(%rbp), %rax
movq %rdx, %rdi
movq %rax, %rdx
callq 0xdcd0
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/generator/loopgen.cpp
// Function: LoopGen::isExpandable(Coordinates) const
bool LoopGen::isExpandable(Coordinates cur) const {
    assert(cur.i >= 0 && cur.i < m_ && cur.j >= 0 && cur.j < n_);

    AdjacencyList adjacencyList = getAdjacent(cur);

    if (!adjacencyList.u && !adjacencyList.d && !adjacencyList.l && !adjacencyList.r) {
        loop_[cur.i][cur.j] = NOEXP;
        return false;
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
testl %ebx, %ebx
js 0xe56e
testq %rbx, %rbx
js 0xe56e
movq %rdi, %r14
cmpl %ebx, 0x10(%rdi)
jle 0xe56e
movq %rbx, %r15
shrq $0x20, %r15
cmpl %r15d, 0x14(%r14)
jle 0xe56e
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe5f6
movl %eax, %ecx
testl $0x1010100, %eax        # imm = 0x1010100
setne %al
orb %cl, %al
testb $0x1, %al
jne 0xe561
movq (%r14), %rcx
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
movq (%rcx,%rbx,8), %rcx
movl $0x2, (%rcx,%r15,4)
andb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x11d5(%rip), %rdi      # 0xf74a
leaq 0x1203(%rip), %rsi      # 0xf77f
leaq 0x1240(%rip), %rcx      # 0xf7c3
movl $0x97, %edx
callq 0x2100
nop
// File: /workspace/github_cpp_makefile_star2_O3/eecs280staff[P]unit_test_framework/./unit_test_framework.hpp
// Function: unit_test_framework::TestSuite::TestSuite()::'lambda'()::__invoke()
TestSuite() {
      auto func = []() {
        if (TestSuite::incomplete) {
          std::cout << "ERROR: premature call to exit()" << std::endl;
          std::abort();
        }
      };
      std::atexit(func);
#ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT
      std::at_quick_exit(func);
#endif
    }

// Assembly:
cmpb $0x1, 0x4de1(%rip)      # 0x81ea
je 0x340c
retq
pushq %rax
movq 0x4bb4(%rip), %rdi      # 0x7fc8
leaq 0x1c76(%rip), %rsi      # 0x5091
callq 0x21f0
movq %rax, %rdi
callq 0x20f0
callq 0x2130
nop
// File: /workspace/github_cpp_makefile_star2_O3/eecs280staff[P]unit_test_framework/./unit_test_framework.hpp
// Function: unit_test_framework::TestCase::print(bool)
void print(bool quiet_mode) {
      if (quiet_mode) {
        std::cout << name << ": ";
      }
      else {
        std::cout << "** Test case \"" << name << "\": ";
      }

      if (not failure_msg.empty()) {
        std::cout << "FAIL" << std::endl;
        if (not quiet_mode) {
          std::cout << failure_msg << std::endl;
        }
      }
      else if (not exception_msg.empty()) {
        std::cout << "ERROR" << std::endl;
        if (not quiet_mode) {
          std::cout << exception_msg << std::endl;
        }
      }
      else {
        std::cout << "PASS" << std::endl;
      }
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
testl %esi, %esi
je 0x3cf0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x42eb(%rip), %rdi      # 0x7fc8
callq 0x2230
leaq 0x1652(%rip), %rsi      # 0x533b
movl $0x2, %edx
jmp 0x3d26
movq 0x42d1(%rip), %r14      # 0x7fc8
leaq 0x162d(%rip), %rsi      # 0x532b
movl $0xe, %edx
movq %r14, %rdi
callq 0x2230
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x2230
leaq 0x1619(%rip), %rsi      # 0x533a
movl $0x3, %edx
movq %rax, %rdi
callq 0x2230
cmpq $0x0, 0x30(%rbx)
je 0x3d86
movq 0x428c(%rip), %r14      # 0x7fc8
leaq 0x15d7(%rip), %rsi      # 0x531a
movl $0x4, %edx
movq %r14, %rdi
callq 0x2230
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
testb %bpl, %bpl
jne 0x3dd4
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
jmp 0x3dfe
cmpq $0x0, 0x50(%rbx)
je 0x3dd9
movq 0x4234(%rip), %r14      # 0x7fc8
leaq 0x1579(%rip), %rsi      # 0x5314
movl $0x5, %edx
movq %r14, %rdi
callq 0x2230
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
testb %bpl, %bpl
je 0x3df6
popq %rbx
popq %r14
popq %rbp
retq
movq 0x41e8(%rip), %rbx      # 0x7fc8
leaq 0x150e(%rip), %rsi      # 0x52f5
movl $0x4, %edx
movq %rbx, %rdi
callq 0x2230
jmp 0x3e0d
movq 0x48(%rbx), %rsi
movq 0x50(%rbx), %rdx
movq 0x41c3(%rip), %rdi      # 0x7fc8
callq 0x2230
movq %rax, %rbx
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2150