LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/game.cpp
// Function: baduk::GameStateImpl::CheckViolatesKo::operator()(baduk::Play const&)
bool operator()(Play const& play) {
            const auto point = play.point();
            const auto player = game_state->next_player_;
            if (!game_state->board_.isEmpty(point)) {
                return false;
            }

            if (game_state->board_.willCapture(point, player)) {
                return game_state->willViolateKo(point);
            }
            return false;
        }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movq (%rsi), %rbx
movq (%rdi), %rdi
movl 0x5b48(%rdi), %ebp
addq $0x18, %rdi
movq %rbx, %rsi
callq 0xfa38
testb %al, %al
je 0x4949
movq (%r14), %rdi
addq $0x18, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0xfff0
testb %al, %al
je 0x4949
movq (%r14), %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x4850
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/gostring.cpp
// Function: baduk::GoString::GoString(baduk::Stone, baduk::Point, baduk::PointSet const&, std::vector<baduk::GoString const*, std::allocator<baduk::GoString const*>>)
GoString::GoString(
        Stone c, Point p,
        PointSet const& liberties,
        std::vector<GoString const*> neighbors) :
    color_(c) {
    stones_.add(p);
    liberties_.add(liberties);
    for (auto neighbor : neighbors) {
        stones_.add(neighbor->stones());
        liberties_.add(neighbor->liberties_);
    }
    liberties_.remove(p);
    for (auto neighbor : neighbors) {
        liberties_.remove(neighbor->stones());
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r14
movq %rcx, %r12
leaq 0x8(%rsp), %rax
movq %rdx, (%rax)
movl %esi, (%rdi)
leaq 0x8(%rdi), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movl $0x168, 0x38(%rdi)      # imm = 0x168
leaq 0x40(%rdi), %rbx
movups %xmm0, 0x3c(%rdi)
movups %xmm0, 0x4c(%rdi)
movups %xmm0, 0x5c(%rdi)
andl $0x0, 0x6c(%rdi)
movq $0x168, 0x70(%rdi)      # imm = 0x168
movq %r15, %rdi
movq %rax, %rsi
callq 0x4e88
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4ebe
movq (%r14), %rbp
movq %r14, (%rsp)
movq 0x8(%r14), %r14
leaq 0x10(%rsp), %r12
cmpq %r14, %rbp
je 0x4c26
movq (%rbp), %r13
movq 0x38(%r13), %rax
movq %rax, 0x40(%rsp)
movups 0x8(%r13), %xmm0
movups 0x18(%r13), %xmm1
movups 0x28(%r13), %xmm2
movaps %xmm2, 0x30(%rsp)
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x4ebe
addq $0x40, %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4ebe
addq $0x8, %rbp
jmp 0x4bd6
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4ef6
movq (%rsp), %rax
movq (%rax), %r15
movq 0x8(%rax), %r12
leaq 0x10(%rsp), %r14
cmpq %r12, %r15
je 0x4c80
movq (%r15), %rax
movq 0x38(%rax), %rcx
movq %rcx, 0x40(%rsp)
movups 0x8(%rax), %xmm0
movups 0x18(%rax), %xmm1
movups 0x28(%rax), %xmm2
movaps %xmm2, 0x30(%rsp)
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4f04
addq $0x8, %r15
jmp 0x4c43
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/gostring.cpp
// Function: baduk::GoString::mergedWith(baduk::GoString const&) const
GoString GoString::mergedWith(GoString const& other) const {
    auto new_liberties = liberties_.unionWith(other.liberties_);
    new_liberties.remove(stones_);
    new_liberties.remove(other.stones_);
    return GoString(color_, stones_.unionWith(other.stones_), new_liberties);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
addq $0x40, %rsi
addq $0x40, %rdx
movq %rsp, %r14
movq %r14, %rdi
callq 0x4fa6
leaq 0x8(%r12), %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0x4f04
addq $0x8, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x4f04
movl (%r12), %ebp
leaq 0x8(%rbx), %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x4fa6
movl %ebp, (%rbx)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm0, 0x40(%rbx)
movups %xmm1, 0x50(%rbx)
movups %xmm2, 0x60(%rbx)
movq 0x30(%r14), %rax
movq %rax, 0x70(%rbx)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/pointset.cpp
// Function: baduk::PointIter::operator++()
PointIter& PointIter::operator++() {
    ++i_;
    while (i_ < MAX_POINTS &&
            i_ <= pointset_->max_ &&
            !pointset_->points_[i_]) {
        ++i_;
    }
    return *this;
}

// Assembly:
movq %rdi, %rax
movl 0x8(%rdi), %esi
movq (%rdi), %rcx
incl %esi
movl %esi, %edx
cmpl $0x168, %esi            # imm = 0x168
ja 0x4e68
cmpl 0x34(%rcx), %edx
ja 0x4e68
movl %edx, %esi
shrl $0x6, %esi
movq (%rcx,%rsi,8), %rdi
leal 0x1(%rdx), %esi
btq %rdx, %rdi
jae 0x4e47
movl %edx, 0x8(%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/pointset.cpp
// Function: baduk::PointSet::add(baduk::Point const&)
void PointSet::add(Point const& p) {
    const auto pindex = index(p);
    points_.set(pindex);
    if (pindex < min_) {
        min_ = pindex;
    }
    if (pindex > max_) {
        max_ = pindex;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
imull $0x13, (%rsi), %r14d
addl 0x4(%rsi), %r14d
pushq $0x1
popq %rdx
movq %r14, %rsi
callq 0x5008
cmpl 0x30(%rbx), %r14d
jae 0x4eac
movl %r14d, 0x30(%rbx)
cmpl 0x34(%rbx), %r14d
jbe 0x4eb6
movl %r14d, 0x34(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/scoring.cpp
// Function: baduk::TerritoryMap::at(baduk::Point) const
PointStatus TerritoryMap::at(Point p) const {
    // TODO Should bounds-check p;
    const auto ptr = map_.find(p);
    if (ptr != map_.end()) {
        return ptr->second;
    }
    return PointStatus::neutral;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
movq %rax, %rsi
callq 0x5a84
addq $0x8, %rbx
cmpq %rbx, %rax
je 0x5176
movl 0x28(%rax), %eax
jmp 0x5179
pushq $0x2
popq %rax
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/scoring.cpp
// Function: baduk::evaluateTerritory(baduk::Board const&)
TerritoryMap evaluateTerritory(Board const& board) {
    TerritoryMap tmap;

    for (unsigned int r = 0; r < board.numRows(); ++r) {
        for (unsigned int c = 0; c < board.numCols(); ++c) {
            const Point p(r, c);
            if (board.isEmpty(p)) {
                // If it is empty, figure out the surrounding stones. If
                // they are exclusively one color, it's territory. Otherwise
                // it's dame.
                const auto boundary = collectBoundary(board, p);
                if (boundary.isOnlyBlack()) {
                    tmap.set(p, PointStatus::black);
                } else if (boundary.isOnlyWhite()) {
                    tmap.set(p, PointStatus::white);
                } else {
                    tmap.set(p, PointStatus::neutral);
                }
            } else {
                // If it contains a stone, count it for that color (chinese
                // style)
                const auto stone = board.at(p);
                if (stone == Stone::black) {
                    tmap.set(p, PointStatus::black);
                } else {
                    // not empty, not black, must be white
                    tmap.set(p, PointStatus::white);
                }
            }
        }
    }

    return tmap;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x5b38, %rsp           # imm = 0x5B38
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
andl $0x0, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
pushq $0x2
popq %rbp
movabsq $0x100000000, %r13      # imm = 0x100000000
xorl %r15d, %r15d
movl 0x8(%r14), %eax
cmpq %rax, %r15
jae 0x54bd
movq %r15, 0x5b30(%rsp)
xorl %r12d, %r12d
movl 0xc(%r14), %eax
cmpq %rax, %r12
jae 0x54ad
movq %r14, %rdi
movq %r15, %rsi
callq 0xfa38
testb %al, %al
je 0x5485
movl $0xb66, %ecx            # imm = 0xB66
movq %rsp, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %r15, %rdi
callq 0x519f
movl %eax, %ecx
shrl $0x8, %ecx
andl $0x1, %ecx
movl %eax, %edx
xorb $0x1, %dl
andb %cl, %dl
movzbl %dl, %edx
movl %ebp, %esi
subl %edx, %esi
testb $0x1, %al
movl %esi, %edx
movl $0x0, %eax
cmovnel %eax, %edx
testl %ecx, %ecx
cmovnel %esi, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5180
jmp 0x54a2
movq %r14, %rdi
movq %r15, %rsi
callq 0x10118
xorl %edx, %edx
testl %eax, %eax
setne %dl
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5180
incq %r12
addq %r13, %r15
jmp 0x541f
movq 0x5b30(%rsp), %r15
incq %r15
jmp 0x5407
movq %rbx, %rax
addq $0x5b38, %rsp           # imm = 0x5B38
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x54d6
jmp 0x54d6
movq %rax, %r14
movq %rbx, %rdi
callq 0x59c0
movq %r14, %rdi
callq 0x32b0
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/scoring.cpp
// Function: baduk::completeGame(std::shared_ptr<baduk::GameState const>)
std::shared_ptr<const GameState> completeGame(
        std::shared_ptr<const GameState> start) {
    RandomBot bot;

    auto game = start;
    while (!game->isOver()) {
        const auto next_move = bot.selectMove(*game);
        game = game->applyMove(next_move);
    }
    return game;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x58cc
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5a18
leaq 0x18(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %rsp, %r13
movq (%rbx), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
testb %al, %al
jne 0x5565
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x671a
movq %rax, (%rsp)
movb %dl, 0x8(%rsp)
movq (%rbx), %rsi
movq (%rsi), %rax
movq %r12, %rdi
movq %r13, %rdx
callq *0x28(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x650a
movq %r15, %rdi
callq 0x3c58
jmp 0x5521
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x557a
jmp 0x557a
movq %rax, %r14
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x3c58
movq %r14, %rdi
callq 0x32b0
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/agent.cpp
// Function: baduk::RandomBot::selectMove(baduk::GameState const&)
Move RandomBot::selectMove(GameState const& game_state) {
    thread_local static std::vector<Point> candidates;
    Board const& board = game_state.board();

    candidates.reserve(board.numRows() * board.numCols());
    candidates.clear();

    for (unsigned int r = 0; r < board.numRows(); ++r) {
        for (unsigned int c = 0; c < board.numCols(); ++c) {
            const Point candidate(r, c);
            if (game_state.isMoveLegal(Play(candidate)) &&
                    !isPointAnEye(
                        board, candidate, game_state.nextPlayer())) {
                assert(board.isEmpty(candidate));
                candidates.push_back(candidate);
            }
        }
    }

    if (candidates.empty()) {
        return Pass();
    }
    std::uniform_int_distribution<unsigned int> dist(0, candidates.size() - 1);
    return candidates[dist(rng_)];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, 0x18(%rsp)
cmpb $0x0, %fs:-0x8
je 0x686b
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movq %rax, %r15
movq %fs:0x0, %rax
leaq -0x20(%rax), %rdi
movl 0xc(%r15), %esi
imull 0x8(%r15), %esi
movq %rdi, 0x20(%rsp)
callq 0x68d6
movq %fs:-0x20, %rax
cmpq %rax, %fs:-0x18
je 0x678b
movq %rax, %fs:-0x18
xorl %ebx, %ebx
leaq 0x8(%rsp), %r13
movq %rsp, %rbp
cmpl 0x8(%r15), %ebx
jae 0x680e
xorl %r12d, %r12d
cmpl 0xc(%r15), %r12d
jae 0x680a
movl %ebx, (%rsp)
movl %r12d, 0x4(%rsp)
movq (%rsp), %rax
movq %rax, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq (%r14), %rax
movq %r14, %rdi
movq %r13, %rsi
callq *0x30(%rax)
testb %al, %al
je 0x6805
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
movq %r15, %rdi
movq %rbp, %rsi
movl %eax, %edx
callq 0x6538
testb %al, %al
jne 0x6805
movq (%rsp), %rsi
movq %r15, %rdi
callq 0xfa38
testb %al, %al
je 0x68b2
movq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0x6974
incl %r12d
jmp 0x679e
incl %ebx
jmp 0x6795
movq %fs:-0x20, %rcx
movq %fs:-0x18, %rax
cmpq %rax, %rcx
je 0x685a
subq %rcx, %rax
leaq 0x8(%rsp), %rdi
andl $0x0, (%rdi)
shrq $0x3, %rax
decl %eax
movl %eax, 0x4(%rdi)
movq 0x18(%rsp), %rsi
addq $0x8, %rsi
callq 0x6992
movl %eax, %eax
movq %fs:-0x20, %rcx
movq (%rcx,%rax,8), %rax
xorl %edx, %edx
jmp 0x685c
movb $0x1, %dl
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
andq $0x0, %fs:-0x10
xorps %xmm0, %xmm0
movups %xmm0, %fs:-0x20
movq %fs:0x0, %rax
leaq -0x20(%rax), %rsi
leaq 0x38(%rip), %rdi        # 0x68d0
leaq 0x138f1(%rip), %rdx     # 0x1a190
callq 0x32a0
movb $0x1, %fs:-0x8
jmp 0x673f
leaq 0xdb30(%rip), %rdi      # 0x143e9
leaq 0xdb42(%rip), %rsi      # 0x14402
leaq 0xdb52(%rip), %rcx      # 0x14419
pushq $0x4a
popq %rdx
callq 0x3100
nop
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/counter.cpp
// Function: baduk::BoardCounter::increment(baduk::Point)
void BoardCounter::increment(Point p) {
    const auto ptr = map_.find(p);
    if (ptr == map_.end()) {
        map_[p] = 1;
    } else {
        ptr->second += 1;
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
movq %rax, %rsi
callq 0x6dd8
leaq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x6d32
incl 0x28(%rax)
jmp 0x6d45
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6d7a
movl $0x1, (%rax)
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/counter.cpp
// Function: baduk::BoardCounter::get(baduk::Point) const
unsigned int BoardCounter::get(Point p) const {
    const auto ptr = map_.find(p);
    if (ptr == map_.end()) {
        return 0;
    }
    return ptr->second;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
movq %rax, %rsi
callq 0x717e
addq $0x8, %rbx
cmpq %rbx, %rax
je 0x6d72
movl 0x28(%rax), %eax
jmp 0x6d74
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/neighbor.cpp
// Function: baduk::NeighborTable::NeighborTable(unsigned int, unsigned int)
NeighborTable::NeighborTable(unsigned int num_rows, unsigned int num_cols) :
    num_cols_(num_cols),
    neighbors_([num_rows, num_cols]() {
        std::vector<std::vector<Point>> table;
        for (unsigned int r = 0; r < num_rows; ++r) {
            for (unsigned int c = 0; c < num_cols; ++c) {
                std::vector<Point> neighbors;
                if (r > 0) {
                    neighbors.push_back(Point(r - 1, c));
                }
                if (r < num_rows - 1) {
                    neighbors.push_back(Point(r + 1, c));
                }
                if (c > 0) {
                    neighbors.push_back(Point(r, c - 1));
                }
                if (c < num_cols - 1) {
                    neighbors.push_back(Point(r, c + 1));
                }
                table.push_back(neighbors);
            }
        }
        return table;
    }()) {
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, (%rdi)
leaq 0x8(%rdi), %rax
movq %rax, 0x20(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
andq $0x0, 0x18(%rdi)
movq %rsi, 0x28(%rsp)
leal -0x1(%rsi), %eax
movl %eax, 0x1c(%rsp)
movq %rdx, %rbp
leal -0x1(%rdx), %r15d
xorl %ebx, %ebx
leaq 0x30(%rsp), %r12
leaq 0xc(%rsp), %r13
cmpl 0x28(%rsp), %ebx
je 0x731c
leal -0x1(%rbx), %eax
movl %eax, 0x18(%rsp)
leal 0x1(%rbx), %eax
movl %eax, 0x14(%rsp)
xorl %r14d, %r14d
cmpl %r14d, %ebp
je 0x7311
andq $0x0, 0x40(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
testl %ebx, %ebx
je 0x729e
movl 0x18(%rsp), %eax
movl %eax, 0xc(%rsp)
movl %r14d, 0x10(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x69ce
cmpl 0x1c(%rsp), %ebx
jae 0x72bc
movl 0x14(%rsp), %eax
movl %eax, 0xc(%rsp)
movl %r14d, 0x10(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x69ce
testl %r14d, %r14d
je 0x72d8
leal -0x1(%r14), %eax
movl %ebx, 0xc(%rsp)
movl %eax, 0x10(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x69ce
cmpl %r15d, %r14d
jae 0x72f4
leal 0x1(%r14), %eax
movl %ebx, 0xc(%rsp)
movl %eax, 0x10(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x69ce
movq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x754e
movq %r12, %rdi
callq 0x699a
incl %r14d
jmp 0x726b
movl 0x14(%rsp), %eax
movl %eax, %ebx
jmp 0x7250
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7333
jmp 0x7333
jmp 0x7333
jmp 0x7333
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x699a
movq 0x20(%rsp), %rdi
callq 0x757a
movq %r14, %rdi
callq 0x32b0
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/neighbor.cpp
// Function: baduk::getNeighborTable(unsigned int, unsigned int)
NeighborTable const* getNeighborTable(
        unsigned int num_rows, unsigned int num_cols) {
    // Max supported board size is 25x25.
    static std::vector<std::unique_ptr<NeighborTable>> tables(25 * 25 + 1);

    const auto index = num_rows * 25 + num_cols;
    NeighborTable const* rv = tables[index].get();
    if (rv == nullptr) {
        tables[index] = std::make_unique<NeighborTable>(num_rows, num_cols);
        rv = tables[index].get();
    }

    return rv;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edi, 0xc(%rsp)
movl %esi, 0x8(%rsp)
movb 0x12e7d(%rip), %al      # 0x1a1f8
testb %al, %al
je 0x73e7
imull $0x19, 0xc(%rsp), %r14d
addl 0x8(%rsp), %r14d
movq 0x12e4f(%rip), %rax     # 0x1a1e0
movq (%rax,%r14,8), %rax
testq %rax, %rax
jne 0x73df
leaq 0x10(%rsp), %rbx
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x74e1
leaq (,%r14,8), %rdi
addq 0x12e20(%rip), %rdi     # 0x1a1e0
movq (%rbx), %rsi
andq $0x0, (%rbx)
callq 0x787e
movq %rbx, %rdi
callq 0x7534
movq 0x12e05(%rip), %rax     # 0x1a1e0
movq (%rax,%r14,8), %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x12e0a(%rip), %rdi     # 0x1a1f8
callq 0x32d0
testl %eax, %eax
je 0x737f
leaq 0x12de2(%rip), %rdi     # 0x1a1e0
leaq 0x10(%rsp), %rdx
movl $0x272, %esi            # imm = 0x272
callq 0x746e
leaq 0xac(%rip), %rdi        # 0x74c0
leaq 0x12dc5(%rip), %rsi     # 0x1a1e0
leaq 0x12d6e(%rip), %rdx     # 0x1a190
callq 0x3150
leaq 0x12dca(%rip), %rdi     # 0x1a1f8
callq 0x30f0
jmp 0x737f
movq %rax, %rbx
leaq 0x12db6(%rip), %rdi     # 0x1a1f8
callq 0x30e0
movq %rbx, %rdi
callq 0x32b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/board.cpp
// Function: baduk::Board::getUnusedString()
StringIdx Board::getUnusedString() {
    for (unsigned int i = 0; i < strings_.size(); ++i) {
        if (!used_[i]) {
            used_.set(i);
            strings_[i].clear();
            return static_cast<StringIdx>(i);
        }
    }
    throw StringPoolEmpty();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x5b18, %rdi           # imm = 0x5B18
addq $0x5c8, %rbx            # imm = 0x5C8
xorl %r14d, %r14d
cmpq $0xb6, %r14
je 0xfcd9
movq %r14, %rax
shrq $0x6, %rax
movq (%rdi,%rax,8), %rax
btq %r14, %rax
jae 0xfcbb
incq %r14
addq $0x78, %rbx
jmp 0xfc98
pushq $0x1
popq %rdx
movq %r14, %rsi
callq 0x108ea
movq %rbx, %rdi
callq 0x4cec
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x8
popq %rdi
callq 0x30a0
leaq 0xa088(%rip), %rcx      # 0x19d70
movq %rcx, (%rax)
leaq 0xa056(%rip), %rsi      # 0x19d48
movq 0xa2df(%rip), %rdx      # 0x19fd8
movq %rax, %rdi
callq 0x3280
nop
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/board.cpp
// Function: baduk::Board::replace(int)
void Board::replace(StringIdx new_string_idx) {
    const GoString& new_string = strings_[new_string_idx];
    for (auto point : new_string.stones()) {
        if (grid_[index(point)] != EMPTY) {
            recycle(grid_[index(point)]);
        }
        grid_[index(point)] = new_string_idx;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %esi, %ebx
movq %rdi, %r14
movslq %esi, %rax
imulq $0x78, %rax, %rax
movq 0x600(%rdi,%rax), %rcx
leaq 0x20(%rsp), %r12
movq %rcx, 0x30(%r12)
movups 0x5d0(%rdi,%rax), %xmm0
movups 0x5e0(%rdi,%rax), %xmm1
movups 0x5f0(%rdi,%rax), %xmm2
movaps %xmm2, 0x20(%r12)
movaps %xmm1, 0x10(%r12)
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x4fd6
leaq 0x10(%rsp), %r15
movq %rax, (%r15)
movl %edx, 0x8(%r15)
movq %r12, %rdi
callq 0x4ffe
movq %rsp, %r12
movq %rax, (%r12)
movl %edx, 0x8(%r12)
movq %r15, %rdi
movq %r12, %rsi
callq 0x4e7e
testb %al, %al
je 0xfdd5
movq %r15, %rdi
callq 0x4e6c
movq %rax, %r13
movq %rax, %rbp
shrq $0x20, %rbp
movl 0xc(%r14), %eax
imull %r13d, %eax
addl %ebp, %eax
movl 0x20(%r14,%rax,4), %esi
cmpl $-0x1, %esi
je 0xfdc6
movq %r14, %rdi
callq 0x10108
movl 0xc(%r14), %eax
imull %r13d, %eax
addl %ebp, %eax
movl %ebx, 0x20(%r14,%rax,4)
movq %r15, %rdi
callq 0x4e3c
jmp 0xfd7f
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/board.cpp
// Function: baduk::Board::willCapture(baduk::Point, baduk::Stone) const
bool Board::willCapture(Point point, Stone player) const {
    for (Point neighbor : neighbors_->get(point)) {
        const auto neighbor_string_idx = grid_[index(neighbor)];
        if (neighbor_string_idx == EMPTY) {
            continue;
        }
        const auto& neighbor_string = strings_[neighbor_string_idx];
        if (neighbor_string.color() == player) {
            continue;
        }
        if (neighbor_string.numLiberties() == 1) {
            return true;
        }
    }
    return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movq %rdi, %r14
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
movq 0x10(%rdi), %rdi
movq %rax, %rsi
callq 0x7352
movq (%rax), %r15
movq 0x8(%rax), %r12
leaq 0x5c8(%r14), %r13
cmpq %r12, %r15
je 0x10067
movq (%r15), %rax
movl 0xc(%r14), %ecx
imull %eax, %ecx
shrq $0x20, %rax
addl %eax, %ecx
movslq 0x20(%r14,%rcx,4), %rax
cmpq $-0x1, %rax
je 0x10061
imulq $0x78, %rax, %rdi
cmpl %ebx, (%r13,%rdi)
je 0x10061
addq %r13, %rdi
addq $0x40, %rdi
callq 0x10968
cmpq $0x1, %rax
je 0x10067
addq $0x8, %r15
jmp 0x10024
cmpq %r12, %r15
setne %al
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/board.cpp
// Function: baduk::Board::willHaveNoLiberties(baduk::Point, baduk::Stone) const
bool Board::willHaveNoLiberties(Point point, Stone player) const {
    // Does NOT check if it is a capture! Call willCapture first.
    for (Point neighbor : neighbors_->get(point)) {
        const auto neighbor_string_idx = grid_[index(neighbor)];
        if (neighbor_string_idx == EMPTY) {
            // This point will be a liberty.
            return false;
        } else {
            const auto& neighbor_string = strings_[neighbor_string_idx];
            if (neighbor_string.color() == player) {
                if (neighbor_string.numLiberties() > 1) {
                    // This string will still have a liberty after placing the
                    // stone.
                    return false;
                }
            }
        }
    }
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movq %rdi, %r14
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
movq 0x10(%rdi), %rdi
movq %rax, %rsi
callq 0x7352
movq (%rax), %r15
movq 0x8(%rax), %r12
leaq 0x5c8(%r14), %r13
cmpq %r12, %r15
je 0x100f3
movq (%r15), %rax
movl 0xc(%r14), %ecx
imull %eax, %ecx
shrq $0x20, %rax
addl %eax, %ecx
movslq 0x20(%r14,%rcx,4), %rax
cmpq $-0x1, %rax
je 0x100f3
imulq $0x78, %rax, %rdi
cmpl %ebx, (%r13,%rdi)
jne 0x100ed
addq %r13, %rdi
addq $0x40, %rdi
callq 0x10968
cmpq $0x1, %rax
ja 0x100f3
addq $0x8, %r15
jmp 0x100b0
cmpq %r12, %r15
sete %al
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/board.cpp
// Function: baduk::Board::validate() const
void Board::validate() const {
    for (const auto& go_string_idx : grid_) {
        if (go_string_idx == EMPTY) {
            continue;
        }
        const GoString& go_string = strings_[go_string_idx];
        for (const auto point : go_string.stones()) {
            assert(!isEmpty(point));
            assert(at(point) == go_string.color());
        }
        for (const auto point : go_string.liberties()) {
            assert(isEmpty(point));
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
leaq 0x5c8(%rdi), %r13
pushq $0x20
popq %rcx
leaq 0x18(%rsp), %r15
leaq 0x8(%rsp), %r12
cmpq $0x5c4, %rcx            # imm = 0x5C4
je 0x102f3
movslq (%rbx,%rcx), %rax
cmpq $-0x1, %rax
je 0x102ea
movq %rcx, 0x28(%rsp)
imulq $0x78, %rax, %rax
leaq (%rax,%r13), %r14
movq 0x38(%r13,%rax), %rcx
movq %rcx, 0x60(%rsp)
movups 0x8(%r13,%rax), %xmm0
movups 0x18(%r13,%rax), %xmm1
movups 0x28(%r13,%rax), %xmm2
movaps %xmm2, 0x50(%rsp)
movaps %xmm1, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
leaq 0x30(%rsp), %rbp
movq %rbp, %rdi
callq 0x4fd6
movq %rax, 0x18(%rsp)
movl %edx, 0x20(%rsp)
movq %rbp, %rdi
callq 0x4ffe
movq %rax, 0x8(%rsp)
movl %edx, 0x10(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x4e7e
testb %al, %al
je 0x10263
movq %r15, %rdi
callq 0x4e6c
movl 0xc(%rbx), %ecx
imull %eax, %ecx
shrq $0x20, %rax
addl %eax, %ecx
movslq 0x20(%rbx,%rcx,4), %rax
cmpq $-0x1, %rax
je 0x10321
imulq $0x78, %rax, %rax
movl (%r13,%rax), %eax
cmpl (%r14), %eax
jne 0x10302
movq %r15, %rdi
callq 0x4e3c
jmp 0x10215
movq 0x70(%r14), %rax
movq %rax, 0x60(%rsp)
movups 0x40(%r14), %xmm0
movups 0x50(%r14), %xmm1
movups 0x60(%r14), %xmm2
movaps %xmm2, 0x50(%rsp)
movaps %xmm1, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
leaq 0x30(%rsp), %r14
movq %r14, %rdi
callq 0x4fd6
movq %rax, 0x18(%rsp)
movl %edx, 0x20(%rsp)
movq %r14, %rdi
callq 0x4ffe
movq %rax, 0x8(%rsp)
movl %edx, 0x10(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x4e7e
testb %al, %al
je 0x102e5
movq %r15, %rdi
callq 0x4e6c
movl 0xc(%rbx), %ecx
imull %eax, %ecx
shrq $0x20, %rax
addl %eax, %ecx
cmpl $-0x1, 0x20(%rbx,%rcx,4)
jne 0x10340
movq %r15, %rdi
callq 0x4e3c
jmp 0x102b1
movq 0x28(%rsp), %rcx
addq $0x4, %rcx
jmp 0x1019b
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x42a0(%rip), %rdi      # 0x145a9
leaq 0x4227(%rip), %rsi      # 0x14537
leaq 0x426e(%rip), %rcx      # 0x14585
movl $0xb1, %edx
callq 0x3100
leaq 0x424d(%rip), %rdi      # 0x14575
leaq 0x4208(%rip), %rsi      # 0x14537
leaq 0x424f(%rip), %rcx      # 0x14585
movl $0xb0, %edx
callq 0x3100
leaq 0x422f(%rip), %rdi      # 0x14576
leaq 0x41e9(%rip), %rsi      # 0x14537
leaq 0x4230(%rip), %rcx      # 0x14585
movl $0xb4, %edx
callq 0x3100
nop
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/board.cpp
// Function: baduk::Board::operator==(baduk::Board const&) const
bool Board::operator==(Board const& b) const {
    if (num_rows_ != b.num_rows_ || num_cols_ != b.num_cols_) {
        return false;
    }
    for (unsigned int r = 0; r < num_rows_; ++r) {
        for (unsigned int c = 0; c < num_cols_; ++c) {
            Point p(r, c);
            if (isEmpty(p) != b.isEmpty(p)) {
                return false;
            }
            if (!isEmpty(p)) {
                if (at(p) != b.at(p)) {
                    return false;
                }
            }
        }
    }
    return true;
}

// Assembly:
movl 0x8(%rdi), %ecx
cmpl 0x8(%rsi), %ecx
jne 0x103e1
movl 0xc(%rdi), %edx
xorl %eax, %eax
cmpl 0xc(%rsi), %edx
jne 0x103e3
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl $0x5c8, %r8d            # imm = 0x5C8
leaq (%rdi,%r8), %r9
addq %rsi, %r8
xorl %r10d, %r10d
cmpl %ecx, %r10d
je 0x103ef
movl %eax, %r11d
movq %rdx, %rbx
subq $0x1, %rbx
jb 0x103da
movl %r11d, %r15d
movslq 0x20(%rdi,%r15,4), %r14
cmpq $-0x1, %r14
sete %bpl
movslq 0x20(%rsi,%r15,4), %r15
cmpq $-0x1, %r15
sete %r12b
xorb %bpl, %r12b
jne 0x103e4
cmpl $-0x1, %r14d
je 0x103d5
imulq $0x78, %r14, %r14
movl (%r9,%r14), %ebp
imulq $0x78, %r15, %r14
cmpl (%r8,%r14), %ebp
jne 0x103e4
incl %r11d
jmp 0x10395
incl %r10d
addl %edx, %eax
jmp 0x1038a
xorl %eax, %eax
retq
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %al
jmp 0x103e6
nop
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/board.cpp
// Function: baduk::Board::hashAfter(baduk::Point, baduk::Stone) const
zobrist::hashcode Board::hashAfter(Point point, Stone stone) const {
    auto hashcode = hash();
    const auto opponent = other(stone);

    // Place the new stone.
    hashcode ^= zobrist_.getEmpty(point);
    hashcode ^= zobrist_.getStone(stone, point);

    for (Point neighbor : neighbors_->get(point)) {
        const auto neighbor_string_idx = grid_[index(neighbor)];
        if (neighbor_string_idx == EMPTY) {
            continue;
        }
        const GoString& neighbor_string = strings_[neighbor_string_idx];
        if (neighbor_string.color() == stone) {
            continue;
        }
        if (neighbor_string.numLiberties() == 1) {
            for (const auto& p : neighbor_string.stones()) {
                hashcode ^= zobrist_.getStone(opponent, p);
                hashcode ^= zobrist_.getEmpty(p);
            }
        }
    }

    return hashcode;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %edx, %r13d
movq %rdi, %r14
leaq 0x48(%rsp), %rbx
movq %rsi, (%rbx)
movq 0x18(%rdi), %r15
movl %edx, %edi
callq 0x366c
movl %eax, %ebp
movq (%r14), %rdi
movq %rbx, %rsi
callq 0xf8d2
movq %rax, %r12
xorq %r15, %r12
movq (%r14), %rdi
movl %r13d, 0x4(%rsp)
movl %r13d, %esi
movq %rbx, %rdx
callq 0xf8ea
movq %rax, %r15
xorq %r12, %r15
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x7352
movq (%rax), %rdx
movq 0x8(%rax), %rsi
leaq 0x5c8(%r14), %rdi
leaq 0x38(%rsp), %r13
leaq 0x20(%rsp), %rbx
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
cmpq %rsi, %rdx
je 0x1058a
movq (%rdx), %rax
movl 0xc(%r14), %ecx
imull %eax, %ecx
shrq $0x20, %rax
addl %eax, %ecx
movslq 0x20(%r14,%rcx,4), %rax
cmpq $-0x1, %rax
je 0x10581
imulq $0x78, %rax, %r12
movl 0x4(%rsp), %eax
cmpl %eax, (%rdi,%r12)
je 0x10581
movq %rdx, 0x18(%rsp)
addq %rdi, %r12
leaq 0x40(%r12), %rdi
callq 0x10968
cmpq $0x1, %rax
jne 0x10572
movq 0x38(%r12), %rax
movq %rax, 0x80(%rsp)
movups 0x8(%r12), %xmm0
movups 0x18(%r12), %xmm1
movups 0x28(%r12), %xmm2
movaps %xmm2, 0x70(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
leaq 0x50(%rsp), %r12
movq %r12, %rdi
callq 0x4fd6
movq %rax, 0x38(%rsp)
movl %edx, 0x40(%rsp)
movq %r12, %rdi
callq 0x4ffe
movq %rax, 0x28(%rsp)
movl %edx, 0x30(%rsp)
movq %r13, %rdi
leaq 0x28(%rsp), %rsi
callq 0x4e7e
testb %al, %al
je 0x10572
movq %r13, %rdi
callq 0x4e6c
movq %rax, 0x20(%rsp)
movq (%r14), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0xf8ea
movq %rax, %r12
movq (%r14), %rdi
movq %rbx, %rsi
callq 0xf8d2
xorq %r12, %rax
xorq %rax, %r15
movq %r13, %rdi
callq 0x4e3c
jmp 0x10529
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdi
addq $0x8, %rdx
jmp 0x1047e
movq %r15, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/board.cpp
// Function: baduk::operator<<(std::ostream&, baduk::Board const&)
std::ostream& operator<<(std::ostream& out, Board const& board) {
    for (int r = board.numRows() - 1; r >= 0; --r) {
        if (r + 1 < 10) {
            out << " ";
        }
        out << r + 1 << " ";
        for (unsigned int c = 0; c < board.numCols(); ++c) {
            baduk::Point p(static_cast<unsigned int>(r), c);
            if (board.isEmpty(p)) {
                out << ".";
            } else {
                const auto stone = board.at(p);
                out << (stone == baduk::Stone::black ? "x" : "o");
            }
        }
        out << "\n";
    }
    out << "   ";
    for (unsigned int c = 0; c < board.numCols(); ++c) {
        out << COLS.at(c);
    }
    out << "\n";

    return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x8(%rsi), %r13d
leaq 0x5c8(%rsi), %rbp
leal -0x1(%r13), %r12d
leaq 0x4002(%rip), %r15      # 0x145c8
movl %r13d, %eax
decl %eax
js 0x10669
movl %eax, 0x4(%rsp)
cmpl $0x9, %r13d
jg 0x105ea
movq %rbx, %rdi
leaq 0x3fed(%rip), %rsi      # 0x145d2
callq 0x3160
movq %rbx, %rdi
movl %r13d, %esi
callq 0x3290
movq %rax, %rdi
leaq 0x3fd3(%rip), %rsi      # 0x145d2
callq 0x3160
xorl %r13d, %r13d
movl 0xc(%r14), %eax
cmpl %eax, %r13d
jae 0x1064b
imull %r12d, %eax
addl %r13d, %eax
movslq 0x20(%r14,%rax,4), %rax
movq %r15, %rsi
cmpq $-0x1, %rax
je 0x1063e
imulq $0x78, %rax, %rax
cmpl $0x0, (%rbp,%rax)
leaq 0x3f95(%rip), %rsi      # 0x145ca
je 0x1063e
leaq 0x3f8e(%rip), %rsi      # 0x145cc
movq %rbx, %rdi
callq 0x3160
incl %r13d
jmp 0x10607
movq %rbx, %rdi
leaq 0x3f79(%rip), %rsi      # 0x145ce
callq 0x3160
decl %r12d
movl 0x4(%rsp), %eax
movl %eax, %r13d
jmp 0x105c9
leaq 0x3f60(%rip), %rsi      # 0x145d0
movq %rbx, %rdi
callq 0x3160
xorl %r15d, %r15d
leaq 0x9b8e(%rip), %r12      # 0x1a210
movl 0xc(%r14), %eax
cmpq %rax, %r15
jae 0x106a6
movq %r12, %rdi
movq %r15, %rsi
callq 0x31e0
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x31d0
incq %r15
jmp 0x10682
leaq 0x3f21(%rip), %rsi      # 0x145ce
movq %rbx, %rdi
callq 0x3160
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/board.cpp
// Function: baduk::Board::stringsBegin() const
StringIter Board::stringsBegin() const {
    // Find the first used string.
    unsigned int first = 0;
    for (; first < strings_.size(); ++first) {
        if (used_[first]) {
            break;
        }
    }
    return StringIter(this, first);
}

// Assembly:
movq %rdi, %rax
xorl %edx, %edx
cmpq $0xb6, %rdx
je 0x106f0
movq %rdx, %rcx
shrq $0x6, %rcx
movq 0x5b18(%rax,%rcx,8), %rcx
btq %rdx, %rcx
jb 0x106f5
incq %rdx
jmp 0x106cd
movl $0xb6, %edx
retq
// File: /workspace/github_cpp_makefile_star2_O2/macfergus[P]baduk/cppsrc/baduk/board.cpp
// Function: baduk::StringIter::operator++()
StringIter& StringIter::operator++() {
    ++i_;
    while (i_ < board_->strings_.size() && !board_->used_[i_]) {
        ++i_;
    }
    return *this;
}

// Assembly:
movq %rdi, %rax
movl 0x8(%rdi), %esi
movq (%rdi), %rcx
incl %esi
movl %esi, %edx
cmpl $0xb5, %esi
ja 0x10733
movl %edx, %esi
shrl $0x6, %esi
movq 0x5b18(%rcx,%rsi,8), %rdi
leal 0x1(%rdx), %esi
btq %rdx, %rdi
jae 0x10713
movl %edx, 0x8(%rax)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/superblocks[P]superblocks/set-grw.cpp
// Function: Superblocks::init()
void Superblocks::init() {

  coin = "GRW"; 
	coin_name = "Growthcoin";

	hash_length = 64;

	// normal (step 0)
	reward[0] = 100;

	// superblocks

	seed_type[1] = SEED_WITH_PREVIOUS_BLOCK_HASH;
	cutout_start[1] = 7;
	cutout_length[1] = 7;
	rnd_range_low[1] = 1;
	rnd_range_high[1] = 8000;
	luck_type[1] = LUCK_WITH_MORE_THAN_X_AND_LESS_THAN_Y;
	luck_x[1] = 5000;
	luck_y[1] = 5101;
		secondary_rand[1] = 1;
		secondary_rand_type[1] = SECONDARY_REWARD_PLUS_RAND_MINUS_X;
		secondary_cutout_start[1] = 10;
		secondary_cutout_length[1] = 7; 
		secondary_rand_low[1] = 1;
		secondary_rand_high[1] = 501;
		secondary_rand_x[1] = 0;
	reward[1] = 499;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x18, %rdi
leaq 0x1c14(%rip), %rsi      # 0x3e80
callq 0x1140
leaq 0x38(%rbx), %rdi
leaq 0x1c08(%rip), %rsi      # 0x3e84
callq 0x1140
movl $0x40, 0x58(%rbx)
movl $0x2, 0x60(%rbx)
pushq $0x7
popq %rax
movl %eax, 0x68(%rbx)
movl %eax, 0x70(%rbx)
pushq $0x1
popq %rcx
movl %ecx, 0x78(%rbx)
movl $0x1f40, 0x80(%rbx)     # imm = 0x1F40
movl $0x3, 0xc0(%rbx)
movl $0x1388, 0xc8(%rbx)     # imm = 0x1388
movabsq $0x64000013ed, %rdx     # imm = 0x64000013ED
movq %rdx, 0xd0(%rbx)
movl %ecx, 0x88(%rbx)
movl %ecx, 0x90(%rbx)
movl $0xa, 0xb0(%rbx)
movl %eax, 0xb8(%rbx)
movl %ecx, 0x98(%rbx)
movl $0x1f5, 0xa0(%rbx)      # imm = 0x1F5
andl $0x0, 0xa8(%rbx)
movl $0x1f3, 0xd8(%rbx)      # imm = 0x1F3
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/miguelmartin75[P]StringUtils/tests/lest.hpp
// Function: int lest::run<6ul>(lest::test const (&) [6ul], std::ostream&)
int run( test const (&specification)[N], std::ostream & os = std::cout )
{
    int failures = 0;

    for ( auto & testing : specification )
    {
		os << "testing: " << testing.name << '\n';
        try
        {
            testing.behaviour();
        }
        catch( message const & e )
        {
            ++failures;
            report( os, e, testing.name );
        }
    }

    if ( failures > 0 )
    {
        os << failures << " out of " << N << " " << pluralise(N, "test") << " failed." << std::endl;
    }

    return failures;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r14
movq %rdi, %r15
movl $0x0, -0x38(%rbp)
movl $0x180, %ebx            # imm = 0x180
leaq 0x14fa(%rip), %r12      # 0x62d4
pushq $0xa
popq %r13
testq %rbx, %rbx
je 0x4e6d
movq %r14, %rdi
movq %r12, %rsi
callq 0x2170
movq %rax, %rdi
movq %r15, %rsi
callq 0x2150
movq %rax, %rdi
movl %r13d, %esi
callq 0x21b0
leaq 0x20(%r15), %rdi
callq 0x583a
addq $-0x40, %rbx
addq $0x40, %r15
jmp 0x4dde
movq %rax, -0x30(%rbp)
cmpl $0x1, %edx
jne 0x4f63
movq -0x30(%rbp), %rdi
callq 0x2090
movq %rax, -0x30(%rbp)
leaq -0x98(%rbp), %rdi
movq %r15, %rsi
callq 0x2200
movq %r14, %rdi
movq -0x30(%rbp), %rsi
leaq -0x98(%rbp), %rdx
callq 0x584d
incl -0x38(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x22e8
callq 0x2260
jmp 0x4e11
movl -0x38(%rbp), %ebx
testl %ebx, %ebx
jle 0x4f0b
movq %r14, %rdi
movl %ebx, %esi
callq 0x2290
leaq 0x1455(%rip), %rsi      # 0x62de
movq %rax, %rdi
callq 0x2170
pushq $0x6
popq %rsi
movq %rax, %rdi
callq 0x2120
leaq 0x1439(%rip), %rsi      # 0x62dc
movq %rax, %rdi
callq 0x2170
movq %rax, %r14
leaq 0x12a2(%rip), %rsi      # 0x6157
leaq -0x58(%rbp), %rdi
leaq -0x31(%rbp), %rdx
callq 0x2080
leaq 0x1429(%rip), %rdx      # 0x62f2
leaq -0x78(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x59f1
leaq -0x78(%rbp), %rsi
movq %r14, %rdi
callq 0x2150
leaq 0x13fe(%rip), %rsi      # 0x62e7
movq %rax, %rdi
callq 0x2170
movq %rax, %rdi
callq 0x20c0
leaq -0x78(%rbp), %rdi
callq 0x22e8
leaq -0x58(%rbp), %rdi
callq 0x22e8
movl %ebx, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, -0x30(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x22e8
jmp 0x4f32
movq %rax, -0x30(%rbp)
callq 0x2260
jmp 0x4f63
movq %rax, %rdi
callq 0x4f8b
movq %rax, -0x30(%rbp)
jmp 0x4f5a
movq %rax, -0x30(%rbp)
jmp 0x4f63
movq %rax, -0x30(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x22e8
leaq -0x58(%rbp), %rdi
callq 0x22e8
movq -0x30(%rbp), %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/miguelmartin75[P]StringUtils/tests/../include/util/string_utils.hpp
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::center_string<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, char)
Str center_string(const Str& str, int amountOfCharactersInLine, char fillChar= ' ')
    {
        std::size_t halfStringSize = str.length() / 2;
        std::size_t amountOfFillCharactersRequired = (amountOfCharactersInLine / 2) - halfStringSize;

        Str fillCharacter(amountOfFillCharactersRequired, fillChar);

        return fillCharacter + str + fillCharacter;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %edx, %eax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %rdi
shrq %rdi
pushq $0x2
popq %rsi
cltd
idivl %esi
movslq %eax, %rsi
subq %rdi, %rsi
leaq -0x28(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x38(%rbp), %r15
movq %r15, %rdi
movl %ecx, %edx
callq 0x21a0
leaq -0x58(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x5306
leaq -0x58(%rbp), %rsi
leaq -0x38(%rbp), %rdx
movq %rbx, %rdi
callq 0x52dd
leaq -0x58(%rbp), %rdi
callq 0x22e8
leaq -0x38(%rbp), %rdi
callq 0x22e8
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x22e8
jmp 0x5037
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x22e8
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/miguelmartin75[P]StringUtils/tests/../include/util/string_utils.hpp
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::get_extension<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Str get_extension(const Str& str)
    {
        Str extension; // Holds the extension

        size_t sizeOfStringUntilExtension = 0;
        size_t sizeOfExtension = 0; // How many characters are in the extension

        for(size_t i = 0; i < str.size(); ++i)
        {
            if(str[i] == '.')
            {
                sizeOfStringUntilExtension = i + 1;
            }
        }

        sizeOfExtension = static_cast<int>(str.size() - sizeOfStringUntilExtension);

        extension = str.substr(str.size() - sizeOfExtension);
        return extension;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
movq %rdx, %rdi
negq %rdi
pushq $0x1
popq %r8
xorl %ecx, %ecx
leaq (%rdi,%r8), %r9
cmpq $0x1, %r9
je 0x57ef
cmpb $0x2e, -0x1(%rax,%r8)
cmoveq %r8, %rcx
incq %r8
jmp 0x57d6
movl %edx, %eax
subl %ecx, %eax
cltq
subq %rax, %rdx
leaq -0x30(%rbp), %rdi
pushq $-0x1
popq %rcx
callq 0x2180
leaq -0x30(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21c0
movq %r14, %rdi
callq 0x22e8
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x22e8
movq %r14, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/f18m[P]boost-intrusive-pool/include/boost_intrusive_pool.hpp
// Function: boost::intrusive_ptr<DummyInt> memorypool::boost_intrusive_pool<DummyInt>::allocate_through_init<unsigned int&>(unsigned int&)
item_ptr allocate_through_init(Args&&... args)
    {
        assert(m_pool); // pool must be initialized
        Item* recycled_item = m_pool->allocate_safe_get_recycled_item();
        if (!recycled_item)
            return nullptr;

        // Construct the object in the obtained storage
        // using the init() method of the item itself:
        recycled_item->init(std::forward<Args>(args)...);

        // AFTER the init() call, run the check() function
        item_ptr ret_ptr(recycled_item);
#if BOOST_INTRUSIVE_POOL_DEBUG_CHECKS
        ret_ptr->check();
#endif
        return ret_ptr;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpq $0x0, 0x8(%rsi)
je 0x32456
movq %rdx, %r14
movq %rdi, %rbx
addq $0x8, %rsi
movq %rsi, %rdi
callq 0x4ce88
movq %rax, %rdi
callq 0x4d896
testq %rax, %rax
je 0x3244a
movl (%r14), %ecx
movl %ecx, 0x20(%rax)
movq %rax, (%rbx)
movq %rax, %rdi
callq 0x4dac4
movq %rbx, %rdi
callq 0x4da68
movq %rax, %rdi
callq 0x4d346
jmp 0x3244e
andq $0x0, (%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x2593c(%rip), %rdi     # 0x57d99
leaq 0x2510d(%rip), %rsi     # 0x57571
leaq 0x25935(%rip), %rcx     # 0x57da0
movl $0x1a0, %edx            # imm = 0x1A0
callq 0xf340
movq %rax, %r14
movq %rbx, %rdi
callq 0x32584
movq %r14, %rdi
callq 0xf8a0
// File: /workspace/github_cpp_makefile_star2_O2/f18m[P]boost-intrusive-pool/include/boost_intrusive_pool.hpp
// Function: memorypool::boost_intrusive_pool<DummyInt>::clear()
void clear()
    {
        if (!m_pool)
            return; // nothing to do

        // VERY IMPORTANT: this function is very tricky: to do this correctly we cannot
        // simply call m_pool->clear(): that would remove all arenas that are the memory
        // support of memory pool items.
        // At this point we don't know yet if there are boost::intrusive_ptr<> out there
        // still alive... so we must play safe:
        size_t init_size = m_pool->m_enlarge_step;
        size_t enlarge_size = m_pool->m_enlarge_step;
        size_t max_size = m_pool->m_max_size;
        recycle_method_e method = m_pool->m_recycle_method;
        recycle_function recycle = m_pool->m_recycle_fn;
        m_pool->trigger_self_destruction();
        m_pool = nullptr; // release old pool
        m_pool = boost::intrusive_ptr<impl>(new impl(enlarge_size, max_size, method, recycle));
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
cmpq $0x0, 0x8(%rdi)
je 0x3282b
movq %rdi, %rbx
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x4ce88
movq %rbx, %rdi
callq 0x4ce88
movq 0x30(%rax), %r14
movq %rbx, %rdi
callq 0x4ce88
movq 0x38(%rax), %r15
movq %rbx, %rdi
callq 0x4ce88
movl 0xc(%rax), %r12d
movq %rbx, %rdi
callq 0x4ce88
leaq 0x10(%rax), %rsi
leaq -0x70(%rbp), %rdi
callq 0x4cd58
movq %rbx, %rdi
callq 0x4ce88
movq %rax, %rdi
callq 0x4d632
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4e0e6
movl $0x88, %edi
callq 0xf530
movq %rax, %r13
leaq -0x48(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4cd58
leaq -0x48(%rbp), %r8
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %r12d, %ecx
callq 0x4cdda
leaq -0x50(%rbp), %r14
movq %r13, (%r14)
incl 0x8(%r13)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4ce5c
movq %r14, %rdi
callq 0x4cda6
leaq -0x48(%rbp), %rdi
callq 0x332be
leaq -0x70(%rbp), %rdi
callq 0x332be
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x332be
jmp 0x3284b
movq %rax, %rbx
movq %r13, %rdi
callq 0xf4d0
jmp 0x3285a
jmp 0x32857
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x332be
movq %rbx, %rdi
callq 0xf8a0