LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/macfergus[P]baduk/cppsrc/baduk/game.cpp
// Function: baduk::GameStateImpl::applyMove(std::variant<baduk::Play, baduk::Pass, baduk::Resign> const&) const
std::shared_ptr<GameState> applyMove(Move const& move) const override {
        return std::make_shared<GameStateImpl>(
            other(next_player_),
            shared_from_this(),
            move
        );
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x5b48(%rsi), %edi
callq 0x37dc
leaq 0x2c(%rsp), %r12
movl %eax, (%r12)
addq $0x8, %r15
leaq 0x30(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x467e
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %r14, %r8
callq 0x425a
movaps 0x10(%rsp), %xmm0
xorl %eax, %eax
movq %rax, 0x18(%rsp)
movups %xmm0, (%rbx)
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x3fa5
callq 0x3ce2
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x3fc8
callq 0x3ce2
movq %rbx, %rdi
callq 0x32b0
// File: /workspace/github_cpp_makefile_star2_O3/macfergus[P]baduk/cppsrc/baduk/game.cpp
// Function: baduk::GameStateImpl::isOver() const
bool isOver() const override {
        if (!last_move_) {
            // First move of game.
            return false;
        }
        const auto last_move = *last_move_;
        if (isResign(last_move)) {
            return true;
        }

        if (isPass(last_move)) {
            if (prev_state_ != nullptr) {
                if (prev_state_->last_move_) {
                    const auto prev_prev_move = *prev_state_->last_move_;
                    if (isPass(prev_prev_move)) {
                        return true;
                    }
                }
            }
        }

        return false;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
cmpb $0x1, 0x5b58(%rdi)
jne 0x40a7
movq %rdi, %r14
movl 0x5b54(%rdi), %eax
leaq 0x20(%rsp), %rsi
movl %eax, 0x8(%rsi)
movq 0x5b4c(%rdi), %rcx
movq %rcx, (%rsi)
movzbl %al, %eax
leaq 0x14a61(%rip), %rcx     # 0x18aa0
leaq 0x10(%rsp), %rdi
callq *(%rcx,%rax,8)
movb $0x1, %bl
testb %al, %al
jne 0x40a9
leaq 0x20(%rsp), %rsi
movzbl 0x8(%rsi), %eax
leaq 0x14a2b(%rip), %r15     # 0x18a88
leaq 0x10(%rsp), %rdi
callq *(%r15,%rax,8)
testb %al, %al
je 0x40a7
movq 0x5b60(%r14), %rax
testq %rax, %rax
je 0x40a7
cmpb $0x1, 0x5b58(%rax)
jne 0x40a7
movl 0x5b54(%rax), %ecx
leaq 0x10(%rsp), %rsi
movl %ecx, 0x8(%rsi)
movq 0x5b4c(%rax), %rax
movq %rax, (%rsi)
movzbl %cl, %eax
leaq 0xf(%rsp), %rdi
callq *(%r15,%rax,8)
testb %al, %al
jne 0x40a9
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/macfergus[P]baduk/cppsrc/baduk/game.cpp
// Function: baduk::GameStateImpl::GameStateImpl(baduk::Stone, std::shared_ptr<baduk::GameStateImpl const>, std::variant<baduk::Play, baduk::Pass, baduk::Resign> const&)
GameStateImpl(
            Stone next_player,
            std::shared_ptr<const GameStateImpl> parent,
            Move const& last_move) :
        board_(parent->board_),
        next_player_(next_player),
        last_move_(last_move),
        prev_state_(parent),
        komi_(parent->komi()),
        num_moves_(parent->numMoves() + 1) {

        if (std::holds_alternative<Play>(last_move)) {
            board_.place(
                std::get<Play>(last_move).point(),
                other(next_player_));
        }

        previous_states_ = parent->previous_states_;
        previous_states_.insert(prev_state_->hash());
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r13
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
leaq 0x1471a(%rip), %rax     # 0x18b40
movq %rax, (%rdi)
leaq 0x18(%rdi), %r12
movq (%rdx), %rsi
addq $0x18, %rsi
movl $0x5b30, %edx           # imm = 0x5B30
movq %r12, %rdi
callq 0x3150
movl %ebp, 0x5b48(%rbx)
movq (%r13), %rax
movq %rax, 0x5b4c(%rbx)
movl 0x8(%r13), %eax
movl %eax, 0x5b54(%rbx)
movb $0x1, 0x5b58(%rbx)
movq (%r15), %rax
movq %rax, 0x5b60(%rbx)
movq 0x8(%r15), %rax
movq %rax, 0x5b68(%rbx)
testq %rax, %rax
je 0x4492
movq 0x14b34(%rip), %rcx     # 0x18fb8
cmpb $0x0, (%rcx)
je 0x448e
incl 0x8(%rax)
jmp 0x4492
lock
incl 0x8(%rax)
leaq 0x8(%rbx), %r14
leaq 0x8a18(%rbx), %rdi
movl $0xc0, %edx
xorl %esi, %esi
callq 0x30d0
movq (%r15), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movss %xmm0, 0x8ad8(%rbx)
movq (%r15), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
incl %eax
movl %eax, 0x8adc(%rbx)
cmpb $0x0, 0x8(%r13)
jne 0x44f5
movq %r13, %rdi
callq 0x3ca1
movq (%rax), %r13
movl 0x5b48(%rbx), %edi
callq 0x37dc
movq %r12, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0xf82e
leaq 0x5b70(%rbx), %r12
movl $0x5b70, %esi           # imm = 0x5B70
addq (%r15), %rsi
movl $0x2f68, %edx           # imm = 0x2F68
movq %r12, %rdi
callq 0x3150
movq 0x5b60(%rbx), %rdi
movq (%rdi), %rax
callq *0x70(%rax)
movq %r12, %rdi
movq %rax, %rsi
callq 0x455c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq 0x5b68(%rbx), %rdi
testq %rdi, %rdi
je 0x454c
callq 0x3ce2
movq %r14, %rdi
callq 0x4224
movq %r15, %rdi
callq 0x32b0
// File: /workspace/github_cpp_makefile_star2_O3/macfergus[P]baduk/cppsrc/baduk/statichash.h
// Function: baduk::StaticHash<unsigned long long, 1493u>::insert(unsigned long long)
void insert(T value) {
        auto attempts = TABLESIZE;
        T index = value;
        while (attempts != 0) {
            if (!filled_[index % TABLESIZE]) {
                filled_.set(index % TABLESIZE);
                values_[index % TABLESIZE] = value;
                return;
            }
            ++index;
            --attempts;
        }
        throw HashTableFull();
    }

// Assembly:
pushq %rbx
leaq (%rdi,%rsi,8), %r9
movl $0xfffffa2b, %r11d      # imm = 0xFFFFFA2B
movabsq $-0x506afeccbb3de647, %r10 # imm = 0xAF95013344C219B9
movq %rsi, %r8
movq %r8, %rax
mulq %r10
shrq $0xa, %rdx
imulq $0x5d5, %rdx, %rax      # imm = 0x5D5
movq %r8, %rcx
subq %rax, %rcx
movl %ecx, %eax
shrl $0x6, %eax
movq 0x2ea8(%rdi,%rax,8), %rdx
movl $0x1, %ebx
shlq %cl, %rbx
btq %rcx, %rdx
jae 0x45dc
incq %r8
addq $0x8, %r9
incl %r11d
jne 0x4574
movl $0x8, %edi
callq 0x30b0
leaq 0x146c5(%rip), %rcx     # 0x18c88
movq %rcx, (%rax)
leaq 0x14693(%rip), %rsi     # 0x18c60
movq 0x14a04(%rip), %rdx     # 0x18fd8
movq %rax, %rdi
callq 0x3270
orq %rbx, %rdx
movq %rdx, 0x2ea8(%rdi,%rax,8)
movq %r8, %rax
mulq %r10
shrq $0xa, %rdx
imulq $-0x2ea8, %rdx, %rax    # imm = 0xD158
movq %rsi, (%r9,%rax)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/macfergus[P]baduk/cppsrc/baduk/game.cpp
// Function: baduk::GameStateImpl::CheckLegal::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;
            }

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

            return true;
        }

// 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 0xf80a
testb %al, %al
je 0x4739
movq (%r14), %rdi
addq $0x18, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0xff68
movq (%r14), %rdi
testb %al, %al
je 0x4727
movq %rbx, %rsi
callq 0x4744
jmp 0x4735
addq $0x18, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x10068
testb %al, %al
je 0x473d
xorl %eax, %eax
jmp 0x473f
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/macfergus[P]baduk/cppsrc/baduk/game.cpp
// Function: baduk::GameStateImpl::willViolateKo(baduk::Point) const
bool willViolateKo(Point point) const {
        // Find the hash of the next state, without actually computing
        // the full board position.
        const auto next_board_hash = board_.hashAfter(point, next_player_);
        const auto next_player_hash =
            next_player_ == Stone::black ?
                zobrist::WHITE_TO_PLAY :
                zobrist::BLACK_TO_PLAY;
        const auto next_state_hash = next_board_hash ^ next_player_hash;

        return previous_states_.contains(next_state_hash);
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x18, %rdi
movl 0x5b48(%rbx), %edx
callq 0x1045c
cmpl $0x0, 0x5b48(%rbx)
movabsq $0x78072ab4b31b23a7, %rcx # imm = 0x78072AB4B31B23A7
movabsq $0x3089a105e9ebf992, %rsi # imm = 0x3089A105E9EBF992
cmoveq %rcx, %rsi
xorq %rax, %rsi
leaq (%rbx,%rsi,8), %rdi
addq $0x5b70, %rdi           # imm = 0x5B70
movl $0xfffffa2b, %r8d       # imm = 0xFFFFFA2B
movabsq $-0x506afeccbb3de647, %r9 # imm = 0xAF95013344C219B9
movq %rsi, %rcx
movq %rcx, %rax
mulq %r9
shrq $0xa, %rdx
imulq $0x5d5, %rdx, %rax      # imm = 0x5D5
movq %rcx, %r10
subq %rax, %r10
movl %r10d, %eax
shrl $0x3, %eax
andl $0xf8, %eax
movq 0x8a18(%rbx,%rax), %rax
btq %r10, %rax
jae 0x47e0
imulq $-0x2ea8, %rdx, %rax    # imm = 0xD158
cmpq %rsi, (%rdi,%rax)
je 0x47e4
incq %rcx
addq $0x8, %rdi
incl %r8d
jne 0x4797
xorl %eax, %eax
jmp 0x47e6
movb $0x1, %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xf80a
testb %al, %al
je 0x483d
movq (%r14), %rdi
addq $0x18, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0xff68
testb %al, %al
je 0x483d
movq (%r14), %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x4744
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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)
movl $0x0, 0x6c(%rdi)
movq $0x168, 0x70(%rdi)      # imm = 0x168
movq %r15, %rdi
movq %rax, %rsi
callq 0x4d10
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4d62
movq (%r14), %rbp
movq %r14, (%rsp)
movq 0x8(%r14), %r14
cmpq %r14, %rbp
je 0x4a54
leaq 0x10(%rsp), %r12
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 0x4d62
addq $0x40, %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4d62
addq $0x8, %rbp
cmpq %r14, %rbp
jne 0x4a06
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4d92
movq (%rsp), %rax
movq (%rax), %r15
movq 0x8(%rax), %r12
cmpq %r12, %r15
je 0x4ab1
leaq 0x10(%rsp), %r14
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 0x4da6
addq $0x8, %r15
cmpq %r12, %r15
jne 0x4a76
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/macfergus[P]baduk/cppsrc/baduk/gostring.cpp
// Function: baduk::GoString::GoString(baduk::GoString const&, baduk::Point const&, bool)
GoString::GoString(
        GoString const& original,
        Point const& liberty_to_change,
        bool add_liberty) :
    color_(original.color_),
    stones_(original.stones_),
    liberties_(original.liberties_) {

    if (add_liberty) {
        liberties_.add(liberty_to_change);
    } else {
        liberties_.remove(liberty_to_change);
    }
}

// Assembly:
movq %rdi, %rax
movl (%rsi), %edi
movl %edi, (%rax)
movups 0x8(%rsi), %xmm0
movups 0x18(%rsi), %xmm1
movups 0x28(%rsi), %xmm2
movups %xmm0, 0x8(%rax)
movups %xmm1, 0x18(%rax)
movups %xmm2, 0x28(%rax)
movq 0x38(%rsi), %rdi
movq %rdi, 0x38(%rax)
leaq 0x40(%rax), %rdi
movups 0x40(%rsi), %xmm0
movups 0x50(%rsi), %xmm1
movups 0x60(%rsi), %xmm2
movups %xmm0, 0x40(%rax)
movups %xmm1, 0x50(%rax)
movups %xmm2, 0x60(%rax)
movq 0x70(%rsi), %rsi
movq %rsi, 0x70(%rax)
movq %rdx, %rsi
testl %ecx, %ecx
je 0x4d92
jmp 0x4d10
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4e8e
leaq 0x8(%r12), %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0x4da6
addq $0x8, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x4da6
movl (%r12), %ebp
leaq 0x8(%rbx), %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x4e8e
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_O3/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), %ecx
movq (%rdi), %rdx
leal 0x1(%rcx), %esi
cmpl $0x16a, %esi            # imm = 0x16A
movl $0x169, %edi            # imm = 0x169
cmovael %esi, %edi
cmpl $0x168, %esi            # imm = 0x168
ja 0x4ccf
cmpl 0x34(%rdx), %esi
ja 0x4cd3
movl %esi, %r8d
shrl $0x6, %r8d
movq (%rdx,%r8,8), %r8
movl %esi, %r9d
incl %r9d
incl %ecx
btq %rsi, %r8
movl %r9d, %esi
jae 0x4ca4
jmp 0x4cd5
movl %edi, %ecx
jmp 0x4cd5
movl %esi, %ecx
movl %ecx, 0x8(%rax)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x5b2c
addq $0x8, %rbx
cmpq %rbx, %rax
je 0x4f9e
movl 0x28(%rax), %eax
jmp 0x4fa3
movl $0x2, %eax
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %r12
leaq 0x13844(%rip), %rax     # 0x18d10
addq $0x10, %rax
movq %rax, 0x38(%rsp)
callq 0x3040
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
imulq %rcx
movq %rdx, %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rcx
addq %rax, %rcx
movabsq $0x200000005, %rdx      # imm = 0x200000005
movq %rcx, %rax
mulq %rdx
movq %rcx, %rax
subq %rdx, %rax
shrq %rax
addq %rdx, %rax
shrq $0x1e, %rax
movq %rax, %rdx
shlq $0x1f, %rdx
subq %rdx, %rax
leaq (%rcx,%rax), %rdx
cmpq $0x1, %rdx
adcq %rcx, %rax
movq %rax, 0x40(%rsp)
movq (%r14), %r15
movq %r15, (%r12)
movq 0x8(%r14), %rbx
movq %r12, 0x8(%rsp)
movq %rbx, 0x8(%r12)
testq %rbx, %rbx
je 0x555d
movq 0x13a65(%rip), %rax     # 0x18fb8
cmpb $0x0, (%rax)
je 0x5561
incl 0x8(%rbx)
jmp 0x5571
xorl %ebx, %ebx
jmp 0x5571
lock
incl 0x8(%rbx)
movq 0x8(%rsp), %rax
movq (%rax), %r15
movq 0x8(%rax), %rbx
leaq 0x38(%rsp), %r12
leaq 0x10(%rsp), %r13
leaq 0x28(%rsp), %rbp
movq (%r15), %rax
movq %r15, %rdi
callq *0x40(%rax)
testb %al, %al
jne 0x55e3
movq %r12, %rdi
movq %r15, %rsi
callq 0x65aa
movq %rax, 0x28(%rsp)
movb %dl, 0x30(%rsp)
movq (%r15), %rax
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq *0x28(%rax)
movq 0x10(%rsp), %r15
movq 0x18(%rsp), %r14
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
testq %rbx, %rbx
je 0x55de
movq %rbx, %rdi
callq 0x3ce2
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x55de
callq 0x3ce2
movq %r14, %rbx
jmp 0x5580
movq 0x8(%rsp), %rax
movq %r15, (%rax)
movq %rbx, 0x8(%rax)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5602
jmp 0x5602
movq %rax, %r12
movq 0x8(%rsp), %rax
movq %r15, (%rax)
movq %rbx, 0x8(%rax)
testq %rbx, %rbx
je 0x561e
movq %rbx, %rdi
callq 0x3ce2
movq %r12, %rdi
callq 0x32b0
// File: /workspace/github_cpp_makefile_star2_O3/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, %rbx
cmpb $0x0, %fs:-0x8
je 0x6755
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 0x6796
movq %fs:-0x20, %rax
cmpq %rax, %fs:-0x18
je 0x6619
movq %rax, %fs:-0x18
movl 0x8(%r15), %eax
movb $0x1, %dl
testl %eax, %eax
je 0x6742
movq %rbx, 0x18(%rsp)
movl 0xc(%r15), %ecx
xorl %ebp, %ebp
leaq 0x8(%rsp), %r13
movq %rsp, %rbx
testl %ecx, %ecx
movl $0x0, %ecx
je 0x66e6
xorl %r12d, %r12d
movl %ebp, (%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 0x66d2
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
movq %r15, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x63b0
testb %al, %al
jne 0x66d2
movq (%rsp), %rsi
movq %r15, %rdi
callq 0xf80a
testb %al, %al
je 0x675f
movq %fs:-0x18, %rsi
cmpq %fs:-0x10, %rsi
je 0x66c5
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, %fs:-0x18
jmp 0x66d2
movq 0x20(%rsp), %rdi
movq %rbx, %rdx
callq 0x69b8
incl %r12d
movl 0xc(%r15), %ecx
cmpl %ecx, %r12d
jb 0x664a
movl 0x8(%r15), %eax
incl %ebp
cmpl %eax, %ebp
jb 0x663a
movq %fs:-0x20, %rcx
movq %fs:-0x18, %rax
cmpq %rax, %rcx
je 0x6744
subq %rcx, %rax
shrq $0x3, %rax
decl %eax
leaq 0x8(%rsp), %rdi
movl $0x0, (%rdi)
movl %eax, 0x4(%rdi)
movq 0x18(%rsp), %rsi
addq $0x8, %rsi
movq %rdi, %rdx
callq 0x6a9e
movl %eax, %eax
movq %fs:-0x20, %rcx
movq (%rcx,%rax,8), %rax
xorl %edx, %edx
jmp 0x6746
jmp 0x6746
movb $0x1, %dl
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3311
jmp 0x65cd
leaq 0xdc53(%rip), %rdi      # 0x143b9
leaq 0xdc65(%rip), %rsi      # 0x143d2
leaq 0xdc75(%rip), %rcx      # 0x143e9
movl $0x4a, %edx
callq 0x3110
// File: /workspace/github_cpp_makefile_star2_O3/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 0x707c
addq $0x8, %rbx
cmpq %rbx, %rax
je 0x6ca8
movl 0x28(%rax), %eax
jmp 0x6caa
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
movq %rdx, 0x20(%rsp)
movl %edx, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq %rdi, 0x10(%rsp)
movq $0x0, 0x18(%rdi)
movq %rsi, 0x28(%rsp)
testl %esi, %esi
je 0x7230
addq $0x8, 0x10(%rsp)
movq 0x28(%rsp), %rax
decl %eax
movl %eax, 0x1c(%rsp)
movq 0x20(%rsp), %rax
leal -0x1(%rax), %r14d
cmpl $0x1, %eax
movl %eax, %r15d
adcl $0x0, %r15d
xorl %ebx, %ebx
leaq 0x30(%rsp), %r12
leaq 0x4(%rsp), %r13
testl %eax, %eax
je 0x721e
leal -0x1(%rbx), %eax
movl %eax, 0x18(%rsp)
leal 0x1(%rbx), %eax
movl %eax, 0xc(%rsp)
xorl %ebp, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
testl %ebx, %ebx
je 0x7192
movl 0x18(%rsp), %eax
movl %eax, 0x4(%rsp)
movl %ebp, 0x8(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x683a
cmpl 0x1c(%rsp), %ebx
jae 0x71af
movl 0xc(%rsp), %eax
movl %eax, 0x4(%rsp)
movl %ebp, 0x8(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x683a
testl %ebp, %ebp
je 0x71c9
leal -0x1(%rbp), %eax
movl %ebx, 0x4(%rsp)
movl %eax, 0x8(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x683a
cmpl %r14d, %ebp
jae 0x71e4
leal 0x1(%rbp), %eax
movl %ebx, 0x4(%rsp)
movl %eax, 0x8(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x683a
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x747a
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x7208
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x3180
incl %ebp
cmpl %ebp, %r15d
jne 0x7166
movq 0x20(%rsp), %rax
movl 0xc(%rsp), %ecx
jmp 0x7224
incl %ebx
xorl %eax, %eax
movl %ebx, %ecx
movl %ecx, %ebx
cmpl 0x28(%rsp), %ecx
jb 0x714e
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7247
jmp 0x7247
jmp 0x7247
jmp 0x7247
movq %rax, %r14
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x7261
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x3180
movq 0x10(%rsp), %rdi
callq 0x74a6
movq %r14, %rdi
callq 0x32b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %r14d
movb 0x11f1c(%rip), %al      # 0x191e8
testb %al, %al
je 0x7345
leal (%r14,%r14,4), %eax
leal (%rax,%rax,4), %r12d
addl %ebx, %r12d
movq 0x11eee(%rip), %rax     # 0x191d0
movq (%rax,%r12,8), %rax
testq %rax, %rax
jne 0x7339
movl $0x20, %edi
callq 0x3170
movq %rax, %r15
movq %rax, %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x70e8
leaq (,%r12,8), %rdi
addq 0x11ebc(%rip), %rdi     # 0x191d0
movq %rsp, %rbx
movq $0x0, (%rbx)
movq %r15, %rsi
callq 0x7756
movq %rbx, %rdi
callq 0x7446
movq 0x11e9b(%rip), %rax     # 0x191d0
movq (%rax,%r12,8), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x11e9c(%rip), %rdi     # 0x191e8
callq 0x32d0
testl %eax, %eax
je 0x72d0
xorps %xmm0, %xmm0
movups %xmm0, 0x11e6d(%rip)    # 0x191d0
movq $0x0, 0x11e72(%rip) # 0x191e0
movl $0x1390, %edi           # imm = 0x1390
callq 0x3170
movq %rax, 0x11e51(%rip)     # 0x191d0
leaq 0x11e4a(%rip), %r15     # 0x191d0
movq %rax, %r12
addq $0x1390, %r12           # imm = 0x1390
movl $0x1390, %edx           # imm = 0x1390
movq %rax, %rdi
xorl %esi, %esi
callq 0x30d0
movq %r12, 0x11e3a(%rip)     # 0x191e0
movq %r12, 0x11e2b(%rip)     # 0x191d8
leaq 0x4a(%rip), %rdi        # 0x73fe
leaq 0x11dc5(%rip), %rdx     # 0x19180
movq %r15, %rsi
callq 0x3160
leaq 0x11e1e(%rip), %rdi     # 0x191e8
callq 0x3100
jmp 0x72d0
movq %rax, %rbx
leaq 0x11e0a(%rip), %rdi     # 0x191e8
callq 0x30f0
jmp 0x73f5
movq %rax, %rbx
movl $0x20, %esi
movq %r15, %rdi
callq 0x3180
movq %rbx, %rdi
callq 0x32b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbx
movq %rdi, %rax
addq $0x5c8, %rdi            # imm = 0x5C8
xorl %ebx, %ebx
movq %rbx, %rdx
shrq $0x6, %rdx
movq 0x5b18(%rax,%rdx,8), %rsi
movl $0x1, %r8d
movl %ebx, %ecx
shlq %cl, %r8
btq %rbx, %rsi
jae 0xfba9
incq %rbx
addq $0x78, %rdi
cmpq $0xb6, %rbx
jne 0xfb4f
movl $0x8, %edi
callq 0x30b0
leaq 0x91e8(%rip), %rcx      # 0x18d78
movq %rcx, (%rax)
leaq 0x91b6(%rip), %rsi      # 0x18d50
movq 0x9437(%rip), %rdx      # 0x18fd8
movq %rax, %rdi
callq 0x3270
orq %r8, %rsi
movq %rsi, 0x5b18(%rax,%rdx,8)
callq 0x4b1c
movl %ebx, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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), %r15
movq %rcx, 0x30(%r15)
movups 0x5d0(%rdi,%rax), %xmm0
movups 0x5e0(%rdi,%rax), %xmm1
movups 0x5f0(%rdi,%rax), %xmm2
movaps %xmm2, 0x20(%r15)
movaps %xmm1, 0x10(%r15)
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x4ee8
leaq 0x10(%rsp), %r12
movq %rax, (%r12)
movl %edx, 0x8(%r12)
movq %r15, %rdi
callq 0x4f2e
movq %rsp, %rsi
movq %rax, (%rsi)
movl %edx, 0x8(%rsi)
movq %r12, %rdi
callq 0x4d06
testb %al, %al
je 0xfca3
leaq 0x5b18(%r14), %r15
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x4cda
movq %rax, %r13
movq %rax, %rbp
shrq $0x20, %rbp
movl 0xc(%r14), %eax
imull %r13d, %eax
addl %ebp, %eax
movslq 0x20(%r14,%rax,4), %rsi
cmpq $-0x1, %rsi
je 0xfc87
movq %r15, %rdi
callq 0x109d8
movl 0xc(%r14), %eax
imull %r13d, %eax
addl %ebp, %eax
movl %ebx, 0x20(%r14,%rax,4)
movq %r12, %rdi
callq 0x4c8a
movq %r12, %rdi
movq %rsp, %rsi
callq 0x4d06
testb %al, %al
jne 0xfc4e
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
movq %rsp, %rax
movq %rsi, (%rax)
movq 0x10(%rdi), %rdi
movq %rax, %rsi
callq 0x7274
movq (%rax), %rcx
movq 0x8(%rax), %rax
cmpq %rax, %rcx
je 0x1005a
movl 0xc(%r14), %edx
leaq 0x5c8(%r14), %rsi
movdqa 0x453a(%rip), %xmm0     # 0x144e0
movdqa 0x4542(%rip), %xmm1     # 0x144f0
movdqa 0x454a(%rip), %xmm2     # 0x14500
pxor %xmm3, %xmm3
movq (%rcx), %rdi
movl %edx, %r8d
imull %edi, %r8d
shrq $0x20, %rdi
addl %edi, %r8d
movslq 0x20(%r14,%r8,4), %rdi
cmpq $-0x1, %rdi
je 0x1004d
imulq $0x78, %rdi, %rdi
cmpl %ebx, (%rsi,%rdi)
je 0x1004d
addq %rsi, %rdi
pxor %xmm4, %xmm4
xorl %r8d, %r8d
movdqu 0x40(%rdi,%r8,8), %xmm5
movdqa %xmm5, %xmm6
psrlw $0x1, %xmm6
pand %xmm0, %xmm6
psubb %xmm6, %xmm5
movdqa %xmm5, %xmm6
pand %xmm1, %xmm6
psrlw $0x2, %xmm5
pand %xmm1, %xmm5
paddb %xmm6, %xmm5
movdqa %xmm5, %xmm6
psrlw $0x4, %xmm6
paddb %xmm5, %xmm6
pand %xmm2, %xmm6
psadbw %xmm3, %xmm6
paddq %xmm6, %xmm4
addq $0x2, %r8
cmpq $0x6, %r8
jne 0xffe9
pshufd $0xee, %xmm4, %xmm5     # xmm5 = xmm4[2,3,2,3]
paddq %xmm4, %xmm5
movq %xmm5, %rdi
cmpq $0x1, %rdi
je 0x10064
addq $0x8, %rcx
cmpq %rax, %rcx
jne 0xffba
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movb $0x1, %al
jmp 0x1005c
// File: /workspace/github_cpp_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
movq %rsp, %rax
movq %rsi, (%rax)
movq 0x10(%rdi), %rdi
movq %rax, %rsi
callq 0x7274
movq (%rax), %rcx
movq 0x8(%rax), %rdx
movb $0x1, %al
cmpq %rdx, %rcx
je 0x10165
movl 0xc(%r14), %esi
leaq 0x5c8(%r14), %rdi
movdqa 0x4438(%rip), %xmm0     # 0x144e0
movdqa 0x4440(%rip), %xmm1     # 0x144f0
movdqa 0x4448(%rip), %xmm2     # 0x14500
pxor %xmm3, %xmm3
movq (%rcx), %r8
movl %esi, %r9d
imull %r8d, %r9d
shrq $0x20, %r8
addl %r8d, %r9d
movslq 0x20(%r14,%r9,4), %r8
cmpq $-0x1, %r8
je 0x10163
imulq $0x78, %r8, %r8
cmpl %ebx, (%rdi,%r8)
jne 0x10154
addq %rdi, %r8
pxor %xmm4, %xmm4
xorl %r9d, %r9d
movdqu 0x40(%r8,%r9,8), %xmm5
movdqa %xmm5, %xmm6
psrlw $0x1, %xmm6
pand %xmm0, %xmm6
psubb %xmm6, %xmm5
movdqa %xmm5, %xmm6
pand %xmm1, %xmm6
psrlw $0x2, %xmm5
pand %xmm1, %xmm5
paddb %xmm6, %xmm5
movdqa %xmm5, %xmm6
psrlw $0x4, %xmm6
paddb %xmm5, %xmm6
pand %xmm2, %xmm6
psadbw %xmm3, %xmm6
paddq %xmm6, %xmm4
addq $0x2, %r9
cmpq $0x6, %r9
jne 0x100f0
pshufd $0xee, %xmm4, %xmm5     # xmm5 = xmm4[2,3,2,3]
paddq %xmm4, %xmm5
movq %xmm5, %r8
cmpq $0x1, %r8
ja 0x10163
addq $0x8, %rcx
cmpq %rdx, %rcx
jne 0x100bc
jmp 0x10165
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x58, %rsp
movq %rdi, %rbx
leaq 0x5c8(%rdi), %r13
movl $0x20, %ebp
leaq 0x10(%rsp), %r15
movq %rsp, %r12
movslq (%rbx,%rbp), %rax
cmpq $-0x1, %rax
je 0x10338
imulq $0x78, %rax, %rax
leaq (%rax,%r13), %r14
movq 0x38(%r13,%rax), %rcx
movq %rcx, 0x50(%rsp)
movups 0x8(%r13,%rax), %xmm0
movups 0x18(%r13,%rax), %xmm1
movups 0x28(%r13,%rax), %xmm2
movaps %xmm2, 0x40(%rsp)
movaps %xmm1, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x4ee8
movq %rax, 0x10(%rsp)
movl %edx, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x4f2e
movq %rax, (%rsp)
movl %edx, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x4d06
testb %al, %al
je 0x102b7
movq %r15, %rdi
callq 0x4cda
movl 0xc(%rbx), %ecx
imull %eax, %ecx
shrq $0x20, %rax
addl %eax, %ecx
movslq 0x20(%rbx,%rcx,4), %rax
cmpq $-0x1, %rax
je 0x10377
imulq $0x78, %rax, %rax
movl (%r13,%rax), %eax
cmpl (%r14), %eax
jne 0x10396
movq %r15, %rdi
callq 0x4c8a
jmp 0x10269
movq 0x70(%r14), %rax
movq %rax, 0x50(%rsp)
movups 0x40(%r14), %xmm0
movups 0x50(%r14), %xmm1
movups 0x60(%r14), %xmm2
movaps %xmm2, 0x40(%rsp)
movaps %xmm1, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x4ee8
movq %rax, 0x10(%rsp)
movl %edx, 0x18(%rsp)
movq %r14, %rdi
callq 0x4f2e
movq %rax, (%rsp)
movl %edx, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x4d06
testb %al, %al
je 0x10338
movq %r15, %rdi
callq 0x4cda
movl 0xc(%rbx), %ecx
imull %eax, %ecx
shrq $0x20, %rax
addl %eax, %ecx
cmpl $-0x1, 0x20(%rbx,%rcx,4)
jne 0x10358
movq %r15, %rdi
callq 0x4c8a
jmp 0x10304
addq $0x4, %rbp
cmpq $0x5c4, %rbp            # imm = 0x5C4
jne 0x10203
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x41f0(%rip), %rdi      # 0x1454f
leaq 0x41aa(%rip), %rsi      # 0x14510
leaq 0x41f1(%rip), %rcx      # 0x1455e
movl $0xb4, %edx
callq 0x3110
leaq 0x41d0(%rip), %rdi      # 0x1454e
leaq 0x418b(%rip), %rsi      # 0x14510
leaq 0x41d2(%rip), %rcx      # 0x1455e
movl $0xb0, %edx
callq 0x3110
leaq 0x41e5(%rip), %rdi      # 0x14582
leaq 0x416c(%rip), %rsi      # 0x14510
leaq 0x41b3(%rip), %rcx      # 0x1455e
movl $0xb1, %edx
callq 0x3110
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x10446
movl 0xc(%rdi), %edx
cmpl 0xc(%rsi), %edx
jne 0x10446
movb $0x1, %al
testl %ecx, %ecx
je 0x10448
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl $0x5c8, %r8d            # imm = 0x5C8
leaq (%rdi,%r8), %r9
addq %rsi, %r8
xorl %r10d, %r10d
xorl %r11d, %r11d
testq %rdx, %rdx
je 0x10439
movq %rdx, %rbx
movl %r10d, %ebp
movl %ebp, %r15d
movslq 0x20(%rdi,%r15,4), %r14
cmpq $-0x1, %r14
sete %r12b
movslq 0x20(%rsi,%r15,4), %r15
cmpq $-0x1, %r15
sete %r13b
xorb %r12b, %r13b
jne 0x10449
cmpl $-0x1, %r14d
je 0x10432
imulq $0x78, %r14, %r14
movl (%r9,%r14), %r14d
imulq $0x78, %r15, %r15
cmpl (%r8,%r15), %r14d
jne 0x10449
incl %ebp
decq %rbx
jne 0x103f8
incl %r11d
addl %edx, %r10d
cmpl %ecx, %r11d
jne 0x103ed
jmp 0x1044b
xorl %eax, %eax
retq
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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), %ebp
movl %ebp, %eax
decl %eax
js 0x1078c
leaq 0x5c8(%r14), %r13
leaq 0x3ec2(%rip), %r12      # 0x145a1
movl %eax, %r15d
cmpl $0x9, %ebp
jg 0x106fb
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x3eb5(%rip), %rsi      # 0x145ab
callq 0x31d0
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3280
movl $0x1, %edx
movq %rax, %rdi
leaq 0x3e97(%rip), %rsi      # 0x145ab
callq 0x31d0
movl 0xc(%r14), %eax
testl %eax, %eax
je 0x10768
xorl %ebp, %ebp
imull %r15d, %eax
addl %ebp, %eax
movslq 0x20(%r14,%rax,4), %rax
movq %r12, %rsi
cmpq $-0x1, %rax
je 0x10751
imulq $0x78, %rax, %rax
cmpl $0x0, (%r13,%rax)
leaq 0x3e5b(%rip), %rsi      # 0x145a3
je 0x10751
leaq 0x3e54(%rip), %rsi      # 0x145a5
movl $0x1, %edx
movq %rbx, %rdi
callq 0x31d0
incl %ebp
movl 0xc(%r14), %eax
cmpl %eax, %ebp
jb 0x10723
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x3e30(%rip), %rsi      # 0x145a7
callq 0x31d0
leal -0x1(%r15), %eax
movl %r15d, %ebp
testl %r15d, %r15d
jg 0x106df
leaq 0x3e16(%rip), %rsi      # 0x145a9
movl $0x3, %edx
movq %rbx, %rdi
callq 0x31d0
cmpl $0x0, 0xc(%r14)
je 0x107e6
xorl %r15d, %r15d
leaq 0x7(%rsp), %r12
movq 0x8a52(%rip), %rdx      # 0x19208
cmpq %r15, %rdx
jbe 0x1080c
movq 0x8a3e(%rip), %rax      # 0x19200
movb (%rax,%r15), %al
movb %al, 0x7(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x31d0
incq %r15
movl 0xc(%r14), %eax
cmpq %rax, %r15
jb 0x107af
leaq 0x3dba(%rip), %rsi      # 0x145a7
movl $0x1, %edx
movq %rbx, %rdi
callq 0x31d0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3d9a(%rip), %rdi      # 0x145ad
movq %r15, %rsi
xorl %eax, %eax
callq 0x3230
nop
// File: /workspace/github_cpp_makefile_star2_O3/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
movq %rdx, %rcx
shrq $0x6, %rcx
movq 0x5b18(%rax,%rcx,8), %rcx
btq %rdx, %rcx
jb 0x10849
incq %rdx
cmpq $0xb6, %rdx
jne 0x10823
movl $0xb6, %edx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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), %ecx
movq (%rdi), %rdx
leal 0x1(%rcx), %edi
cmpl $0xb7, %edi
movl $0xb6, %esi
cmovael %edi, %esi
incl %ecx
cmpl $0xb5, %ecx
ja 0x10895
movl %ecx, %edi
shrl $0x6, %edi
movq 0x5b18(%rdx,%rdi,8), %rdi
btq %rcx, %rdi
jae 0x10876
jmp 0x10897
movl %esi, %ecx
movl %ecx, 0x8(%rax)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %rax
shrq %rax
movl %edx, %esi
shrl $0x1f, %esi
addl %edx, %esi
sarl %esi
movslq %esi, %rsi
subq %rax, %rsi
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
leaq -0x40(%rbp), %r15
movq %r15, %rdi
movl %ecx, %edx
callq 0x21d0
leaq -0x60(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x62fc
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0x2070
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x5e88
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x5e8e
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5eb7
callq 0x2180
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x5ec5
callq 0x2180
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5eef
callq 0x2180
jmp 0x5eef
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x5efd
callq 0x2180
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x8(%rsi), %rdx
testq %rdx, %rdx
je 0x6a13
movq (%rsi), %rcx
movq %rdx, %rdi
negq %rdi
movl $0x1, %r8d
xorl %eax, %eax
cmpb $0x2e, -0x1(%rcx,%r8)
cmoveq %r8, %rax
leaq (%rdi,%r8), %r9
incq %r9
incq %r8
cmpq $0x1, %r9
jne 0x69f7
jmp 0x6a15
xorl %eax, %eax
movl %edx, %ecx
subl %eax, %ecx
movslq %ecx, %rax
subq %rax, %rdx
leaq -0x38(%rbp), %rdi
movq $-0x1, %rcx
callq 0x21a0
leaq -0x38(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21e0
movq (%r14), %rdi
leaq -0x28(%rbp), %rax
cmpq %rax, %rdi
je 0x6a4f
callq 0x2180
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x6a6d
callq 0x2180
movq %r14, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O3/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
movq %rdi, %rbx
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
je 0x3953e
movq %rdx, %r14
callq 0x55644
testq %rax, %rax
je 0x3952f
movl (%r14), %ecx
movl %ecx, 0x20(%rax)
movq %rax, (%rbx)
movq 0x8(%rax), %rcx
cmpq $0x3ff, %rcx            # imm = 0x3FF
jae 0x3955d
incq %rcx
movq %rcx, 0x8(%rax)
movq %rax, %rdi
callq 0x55076
jmp 0x39536
movq $0x0, (%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x266c6(%rip), %rdi     # 0x5fc0b
leaq 0x25e97(%rip), %rsi     # 0x5f3e3
leaq 0x266bf(%rip), %rcx     # 0x5fc12
movl $0x1a0, %edx            # imm = 0x1A0
callq 0xf2f0
leaq 0x26828(%rip), %rdi     # 0x5fd8c
leaq 0x25e78(%rip), %rsi     # 0x5f3e3
leaq 0x2686b(%rip), %rcx     # 0x5fddd
movl $0xdc, %edx
callq 0xf2f0
movq %rax, %r14
movq %rbx, %rdi
callq 0x39622
movq %r14, %rdi
callq 0xf880
nop