LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/line_manager.cpp
// Function: LineManager::checkPv(State&)
void LineManager::checkPv(State& pState)
{
    State c;
    Move nextMove;
    std::memmove(&c, &pState, sizeof(pState));
    for (int i = 0; i < Max_ply; ++i)
    {
        nextMove = mPv[i].first;
        if (nextMove == nullMove)
        {
            mSize = i;
            break;
        }
        // Push moves to the move list.
        MoveList moveList(c);

        // If the next pv move is in the move list, make the move.
        if (moveList.contains(nextMove))
            c.make_t(nextMove);
        // If the next pv move is not found, break the loop.
        else
        {
            mSize = i;
            break;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd68, %rsp            # imm = 0xD68
movq %rdi, %r13
leaq 0x860(%rsp), %r14
movl $0x508, %edx            # imm = 0x508
movq %r14, %rdi
callq 0x41c0
xorl %ebx, %ebx
leaq 0x8(%rsp), %r15
movq %r13, (%rsp)
movzwl (%r13), %ebp
testw %bp, %bp
je 0xfa8b
movq %r15, %rdi
movq %r14, %rsi
callq 0x10b54
movzwl %bp, %r12d
movq %r15, %rdi
movl %r12d, %esi
callq 0xfe32
movl %eax, %ebp
testb %al, %al
je 0xfa4d
movq %r14, %rdi
movl %r12d, %esi
callq 0x17b1c
jmp 0xfa58
movq (%rsp), %rax
movq %rbx, 0x4fb8(%rax)
movq 0x838(%rsp), %rdi
testq %rdi, %rdi
je 0xfa75
movq 0x848(%rsp), %rsi
subq %rdi, %rsi
callq 0x4250
cmpq $0x31, %rbx
leaq 0x1(%rbx), %rbx
setne %al
addq $0x10, %r13
testb %al, %bpl
jne 0xfa16
jmp 0xfa96
movq (%rsp), %rax
movq %rbx, 0x4fb8(%rax)
addq $0xd68, %rsp            # imm = 0xD68
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x838(%rsp), %rdi
testq %rdi, %rdi
je 0xfac8
movq 0x848(%rsp), %rsi
subq %rdi, %rsi
callq 0x4250
movq %rbx, %rdi
callq 0x43b0
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/move.h
// Function: toString[abi:cxx11](unsigned short)
inline std::string toString(Move m)
{
	std::string ret;
	Square src, dst;

	src = getSrc(m);
	dst = getDst(m);

	ret = SQ[src] + SQ[dst];

	switch (getPiecePromo(m))
	{
		case knight:
			ret += "n";
			break;
		case bishop:
			ret += "b";
			break;
		case rook:
			ret += "r";
			break;
		case queen:
			ret += "q";
			break;
		default:
			break;
	}

	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl %esi, %edx
shrl $0x6, %edx
andl $0x3f, %edx
andl $0x3f, %esi
shll $0x5, %esi
leaq 0x13b6be(%rip), %rax    # 0x14b2a0
addq %rax, %rsi
shll $0x5, %edx
addq %rax, %rdx
leaq 0x8(%rsp), %rdi
callq 0xfc74
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x42a0
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xfc1f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4250
shrl $0xc, %ebp
andl $0x7, %ebp
decl %ebp
cmpw $0x4, %bp
jae 0xfc46
movzwl %bp, %eax
leaq 0xcb69(%rip), %rcx      # 0x1c7a0
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
movq %rbx, %rdi
callq 0x43e0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0xfc56
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0xfc6c
movq (%r15), %rsi
incq %rsi
callq 0x4250
movq %r14, %rdi
callq 0x43b0
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/move_generator.cpp
// Function: MoveList::MoveList(State const&, unsigned short, History*, int, bool)
MoveList::MoveList(const State& pState, Move pBest, History* pHistory, int pPly, bool pQSearch)
: mState(pState), mValid(Full), mBest(pBest), mQSearch(pQSearch), mKiller1(nullMove), mKiller2(nullMove)
, mSize(0), mHistory(pHistory), mPly(pPly)
{
    if (pHistory)
    {
        mKiller1 = mHistory->getKiller(pPly).first;
        mKiller2 = mHistory->getKiller(pPly).second;
    }

    if (mState.inCheck())
    {
        Square k = mState.getKingSquare(mState.getOurColor());
        Square c = get_lsb(mState.getCheckersBB());
        mValid = between[k][c] | mState.getCheckersBB();
        mStage = nEvadeBestMove;
    }
    else
        mStage = mQSearch ? qBestMove : nBestMove;
}

// Assembly:
movb %r9b, (%rdi)
movq $-0x1, 0x8(%rdi)
movq %rsi, 0x18(%rdi)
movq %rcx, 0x20(%rdi)
movl %r8d, 0x28(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x830(%rdi)
movups %xmm0, 0x840(%rdi)
movw %dx, 0x850(%rdi)
movl $0x0, 0x852(%rdi)
testq %rcx, %rcx
je 0xfdb1
movslq %r8d, %rax
movl 0x18(%rcx,%rax,4), %eax
movl %eax, 0x852(%rdi)
movq 0x28(%rsi), %rax
testq %rax, %rax
je 0xfde8
movl (%rsi), %ecx
imulq $0xf0, %rcx, %rcx
movl 0x3f0(%rsi,%rcx), %ecx
bsfq %rax, %rdx
shlq $0x9, %rcx
addq 0x151ef(%rip), %rcx     # 0x24fc8
orq (%rcx,%rdx,8), %rax
movq %rax, 0x8(%rdi)
movl $0xc, %eax
jmp 0xfdf5
xorl %ecx, %ecx
testb %r9b, %r9b
movl $0x7, %eax
cmovel %ecx, %eax
movl %eax, 0x2c(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/move_generator.cpp
// Function: void MoveList::generateMoves<(MoveType)2>()
void MoveList::generateMoves<MoveType::Evasions>()
{
    assert(mState.inCheck());

    Square k, c;

    mValid = mState.getOccupancyBB(mState.getTheirColor()) | mState.getEmptyBB();
    pushMoves<MoveType::Evasions, king>();

    if (mState.inDoubleCheck())
        return;

    k = mState.getKingSquare(mState.getOurColor());
    c = get_lsb(mState.getCheckersBB());
    mValid = between[k][c] | mState.getCheckersBB();

    mState.getOurColor() == white ? pushPawnMoves<MoveType::Evasions, white>() 
                                  : pushPawnMoves<MoveType::Evasions, black>();
    pushMoves<MoveType::Evasions, knight>();
    pushMoves<MoveType::Evasions, bishop>();
    pushMoves<MoveType::Evasions, rook>();
    pushMoves<MoveType::Evasions, queen>();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movl 0x4(%rax), %ecx
movq 0x80(%rax), %rdx
orq 0x78(%rax), %rdx
notq %rdx
orq 0x78(%rax,%rcx,8), %rdx
movq %rdx, 0x8(%rdi)
callq 0x10bd8
movq 0x18(%rbx), %rcx
movq 0x28(%rcx), %rax
movq %rax, %rdx
shrq %rdx
movabsq $0x5555555555555555, %rsi # imm = 0x5555555555555555
andq %rdx, %rsi
movq %rax, %rdx
subq %rsi, %rdx
movabsq $0x3333333333333333, %rsi # imm = 0x3333333333333333
movq %rdx, %rdi
andq %rsi, %rdi
shrq $0x2, %rdx
andq %rsi, %rdx
addq %rdi, %rdx
movq %rdx, %rsi
shrq $0x4, %rsi
addq %rdx, %rsi
movabsq $0xf0f0f0f0f0f0f0f, %rdx # imm = 0xF0F0F0F0F0F0F0F
andq %rsi, %rdx
movabsq $0x101010101010101, %rsi # imm = 0x101010101010101
imulq %rdx, %rsi
shrq $0x38, %rsi
cmpl $0x2, %esi
jne 0xff62
popq %rbx
retq
movl (%rcx), %edx
imulq $0xf0, %rdx, %rsi
movl 0x3f0(%rcx,%rsi), %ecx
bsfq %rax, %rsi
shlq $0x9, %rcx
addq 0x15047(%rip), %rcx     # 0x24fc8
orq (%rcx,%rsi,8), %rax
movq %rax, 0x8(%rbx)
movq %rbx, %rdi
testq %rdx, %rdx
je 0xff98
callq 0x10dda
jmp 0xff9d
callq 0x10c46
movq %rbx, %rdi
callq 0x10f5c
movq %rbx, %rdi
callq 0x10fca
movq %rbx, %rdi
callq 0x11080
movq %rbx, %rdi
popq %rbx
jmp 0x11136
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/move_generator.cpp
// Function: void MoveList::generateMoves<(MoveType)4>()
void MoveList::generateMoves<MoveType::All>()
{
    if (mState.inCheck())
    {
        generateMoves<MoveType::Evasions>();
        return;
    }

    mValid = mState.getOccupancyBB(mState.getTheirColor()) | mState.getEmptyBB();

    mState.getOurColor() == white ? pushPawnMoves<MoveType::All, white>() 
                                  : pushPawnMoves<MoveType::All, black>();
    pushMoves<MoveType::All, knight>();
    pushMoves<MoveType::All, bishop>();
    pushMoves<MoveType::All, rook>();
    pushMoves<MoveType::All, queen>();
    pushMoves<MoveType::All, king>();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rax
cmpq $0x0, 0x28(%rax)
je 0xffd6
movq %rbx, %rdi
popq %rbx
jmp 0xfed0
movq 0x80(%rax), %rcx
orq 0x78(%rax), %rcx
movl 0x4(%rax), %edx
notq %rcx
orq 0x78(%rax,%rdx,8), %rcx
movq %rcx, 0x8(%rbx)
cmpl $0x0, (%rax)
je 0xffff
movq %rbx, %rdi
callq 0x113b2
jmp 0x10007
movq %rbx, %rdi
callq 0x1122e
movq %rbx, %rdi
callq 0x1152a
movq %rbx, %rdi
callq 0x11598
movq %rbx, %rdi
callq 0x1164e
movq %rbx, %rdi
callq 0x11704
movq %rbx, %rdi
popq %rbx
jmp 0x117fc
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/move_generator.cpp
// Function: void MoveList::pushMoves<(MoveType)2, (PieceType)4>()
void MoveList::pushMoves()
{
    U64 m;
    Square dst;
    Color c = mState.getOurColor();

    for (Square src : mState.getPieceList<P>(c))
    {
        if (src == no_sq)
            break;

        m = mState.getAttackBB<P>(src) & mValid;

        if (T == MoveType::QuietChecks)
        {
            if (square_bb[src] & mDiscover)
            {
                if (P == king)
                    m &= ~coplanar[src][mState.getKingSquare(!c)];
            }
            else
                m &= mState.getCheckSquaresBB(P);
        }

        while (m)
            push(makeMove(src, pop_lsb(m)));

        if (P == king && T != MoveType::Attacks && T != MoveType::Evasions)
            pushCastle<T>();
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x8(%rdi), %rax
movq 0x18(%rdi), %rdx
movl (%rdx), %ecx
imulq $0xf0, %rcx, %rcx
leaq (%rdx,%rcx), %rsi
addq $0x3c8, %rsi            # imm = 0x3C8
movq 0x848(%rdi), %rbp
xorl %r8d, %r8d
leaq 0x142a3(%rip), %r14     # 0x25410
leaq 0xa1cc(%rip), %r15      # 0x1b340
leaq 0x9fc5(%rip), %r12      # 0x1b140
leaq 0x9ebe(%rip), %r13      # 0x1b040
movl (%rsi,%r8), %r9d
cmpq $0x40, %r9
je 0x11222
movq 0x80(%rdx), %r10
orq 0x78(%rdx), %r10
leaq 0xa69e(%rip), %rcx      # 0x1b840
movq (%rcx,%r9,8), %r11
andq %r10, %r11
leaq 0xa490(%rip), %rcx      # 0x1b640
imulq (%rcx,%r9,8), %r11
leaq 0xa384(%rip), %rcx      # 0x1b540
movb (%rcx,%r9,4), %cl
shrq %cl, %r11
movq (%r14,%r9,8), %rbx
andq (%r15,%r9,8), %r10
imulq (%r12,%r9,8), %r10
movb (%r13,%r9,4), %cl
shrq %cl, %r10
movq (%rbx,%r10,8), %rcx
leaq 0x1402d(%rip), %r10     # 0x25210
movq (%r10,%r9,8), %r10
orq (%r10,%r11,8), %rcx
andq %rax, %rcx
je 0x11214
leaq -0x1(%rcx), %r10
bsfq %rcx, %r11
shll $0x6, %r11d
orl %r9d, %r11d
movw %r11w, 0x30(%rdi,%rbp,8)
incq %rbp
andq %r10, %rcx
jne 0x111f0
movq %rbp, 0x848(%rdi)
addq $0x4, %r8
cmpq $0x28, %r8
jne 0x11182
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/move_generator.cpp
// Function: void MoveList::generateMoves<(MoveType)0>()
void MoveList::generateMoves()
{
    assert(!mState.inCheck());

    if (T == MoveType::QuietChecks)
        mDiscover = mState.getDiscoveredChecks(mState.getOurColor());

    mValid = T == MoveType::Attacks 
                ? mState.getOccupancyBB(mState.getTheirColor())
                : mState.getEmptyBB();

    mState.getOurColor() == white ? pushPawnMoves<T, white>() 
                                  : pushPawnMoves<T, black>();
    pushMoves<T, knight>();
    pushMoves<T, bishop>();
    pushMoves<T, rook>();
    pushMoves<T, queen>();
    pushMoves<T, king>();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movl 0x4(%rax), %ecx
movq 0x78(%rax,%rcx,8), %rcx
movq %rcx, 0x8(%rdi)
cmpl $0x0, (%rax)
je 0x118a7
movq %rbx, %rdi
callq 0x12260
jmp 0x118af
movq %rbx, %rdi
callq 0x12170
movq %rbx, %rdi
callq 0x1233c
movq %rbx, %rdi
callq 0x123aa
movq %rbx, %rdi
callq 0x12460
movq %rbx, %rdi
callq 0x12516
movq %rbx, %rdi
popq %rbx
jmp 0x1260e
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/perft.cpp
// Function: perft(State&, int)
int perft(State & s, int depth)
{
	int nodes = 0;

	if (s.getFiftyMoveRule() > 99)
		return nodes;

	MoveList mlist(s);

	if (depth == 1)
		return mlist.size();

	Move m;

	while (m = mlist.getBestMove())
	{
		State c(s);
		c.make_t(m);
		nodes += perft(c, depth-1);
	}

	return nodes;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd68, %rsp            # imm = 0xD68
xorl %ebx, %ebx
cmpl $0x63, 0x8(%rdi)
jg 0x13e72
movl %esi, %ebp
movq %rdi, %r14
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x10b54
cmpl $0x1, %ebp
jne 0x13e86
leaq 0x8(%rsp), %rdi
callq 0xfdfa
movq %rax, %rbx
movq 0x838(%rsp), %rdi
testq %rdi, %rdi
je 0x13e72
movq 0x848(%rsp), %rsi
subq %rdi, %rsi
callq 0x4250
movl %ebx, %eax
addq $0xd68, %rsp            # imm = 0xD68
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
decl %ebp
xorl %ebx, %ebx
leaq 0x8(%rsp), %r15
leaq 0x860(%rsp), %r12
movq %r15, %rdi
callq 0x10030
movl %eax, %r13d
testw %ax, %ax
je 0x13e55
movq %r12, %rdi
movq %r14, %rsi
callq 0x16460
movzwl %r13w, %esi
movq %r12, %rdi
callq 0x17b1c
movq %r12, %rdi
movl %ebp, %esi
callq 0x13e18
addl %eax, %ebx
jmp 0x13e97
jmp 0x13ed0
jmp 0x13ed0
movq %rax, %rbx
movq 0x838(%rsp), %rdi
testq %rdi, %rdi
je 0x13ef0
movq 0x848(%rsp), %rsi
subq %rdi, %rsi
callq 0x4250
movq %rbx, %rdi
callq 0x43b0
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/perft.cpp
// Function: test(State, MoveList*, int, int)
void test(State s, MoveList* mList, int depth, int id)
{
	{
		std::unique_lock<std::mutex> lk(qMutex);
		cv.wait(lk, [] { return ready; });
	}

	Move m;

	{
		std::lock_guard<std::mutex> lk(qMutex);
		m = mList->getBestMove();
	}

	while (m != nullMove)
	{
		State c(s);
		c.make_t(m);
		int nodes = perft(c, depth - 1);
		
		{
			std::lock_guard<std::mutex> lk(qMutex);
			nodeCount.push_back(nodes);
			m = mList->getBestMove();
		} 
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x518, %rsp            # imm = 0x518
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x140f20(%rip), %rax    # 0x154e38
leaq 0x10(%rsp), %r12
movq %rax, (%r12)
movb $0x0, 0x8(%r12)
movq %r12, %rdi
callq 0x14caa
movb $0x1, 0x8(%r12)
cmpb $0x0, 0x140ec4(%rip)    # 0x154e00
jne 0x13f5e
leaq 0x140ec3(%rip), %r12    # 0x154e08
leaq 0x10(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x40a0
cmpb $0x1, 0x140ea4(%rip)    # 0x154e00
jne 0x13f4a
leaq 0x10(%rsp), %rdi
callq 0x14920
leaq 0x140ec9(%rip), %rdi    # 0x154e38
callq 0x4320
testl %eax, %eax
jne 0x14036
movq %r14, %rdi
callq 0x10030
movl %eax, %ebp
leaq 0x140eab(%rip), %rdi    # 0x154e38
callq 0x41a0
testw %bp, %bp
je 0x14024
decl %ebx
leaq 0x10(%rsp), %r12
leaq 0x140e8f(%rip), %r13    # 0x154e38
movq %r12, %rdi
movq %r15, %rsi
callq 0x16460
movzwl %bp, %esi
movq %r12, %rdi
callq 0x17b1c
movq %r12, %rdi
movl %ebx, %esi
callq 0x13e18
movl %eax, 0xc(%rsp)
movq %r13, %rdi
callq 0x4320
testl %eax, %eax
jne 0x14036
movq 0x140ed8(%rip), %rsi    # 0x154eb8
cmpq 0x140ed9(%rip), %rsi    # 0x154ec0
je 0x13ffc
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x140ebe(%rip)    # 0x154eb8
jmp 0x1400d
leaq 0x140ead(%rip), %rdi    # 0x154eb0
leaq 0xc(%rsp), %rdx
callq 0x14d0e
movq %r14, %rdi
callq 0x10030
movl %eax, %ebp
movq %r13, %rdi
callq 0x41a0
testw %bp, %bp
jne 0x13fa9
addq $0x518, %rsp            # imm = 0x518
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x4150
jmp 0x1403f
movq %rax, %rbx
leaq 0x140def(%rip), %rdi    # 0x154e38
callq 0x41a0
movq %rbx, %rdi
callq 0x43b0
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/perft.cpp
// Function: MTperft(State&, int)
int MTperft(State& s, int depth)
{
	unsigned int nThreads = std::thread::hardware_concurrency();
	std::vector<std::thread> threads;
	nodeCount.clear();
	MoveList mlist(s);

	for (unsigned int i = 0; i < nThreads; ++i)
		threads.push_back(std::thread(test, s, &mlist, depth, i));

	{
		std::lock_guard<std::mutex> lk(qMutex);
		ready = true;
		cv.notify_all();
	}

	for (std::thread& thread : threads)
		thread.join();

	return std::accumulate(nodeCount.begin(), nodeCount.end(), 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x888, %rsp            # imm = 0x888
movq %rdi, %rbx
movl %esi, 0x4(%rsp)
callq 0x42c0
movl %eax, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x140e23(%rip), %rax    # 0x154eb0
cmpq %rax, 0x140e24(%rip)    # 0x154eb8
je 0x1409d
movq %rax, 0x140e1b(%rip)    # 0x154eb8
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0x10b54
movl $0x0, (%rsp)
testl %ebp, %ebp
je 0x14111
leaq 0x8(%rsp), %r12
leaq 0x4(%rsp), %r14
movq %rsp, %r15
leaq 0x10(%rsp), %r13
leaq 0x30(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %r12, %rdi
leaq -0x1e3(%rip), %rsi      # 0x13ef8
movq %rbx, %rdx
leaq 0x28(%rsp), %rcx
movq %r14, %r8
movq %r15, %r9
callq 0x14936
movq %r13, %rdi
movq %r12, %rsi
callq 0x14efc
cmpq $0x0, 0x8(%rsp)
jne 0x141d1
movl (%rsp), %eax
incl %eax
movl %eax, (%rsp)
cmpl %ebp, %eax
jb 0x140c7
leaq 0x140d20(%rip), %rdi    # 0x154e38
callq 0x4320
testl %eax, %eax
jne 0x141b9
movb $0x1, 0x140cd4(%rip)    # 0x154e00
leaq 0x140cd5(%rip), %rdi    # 0x154e08
callq 0x4380
leaq 0x140cf9(%rip), %rdi    # 0x154e38
callq 0x41a0
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r14
cmpq %r14, %rbx
je 0x14161
movq %rbx, %rdi
callq 0x4390
addq $0x8, %rbx
jmp 0x1414e
movq 0x140d48(%rip), %rax    # 0x154eb0
movq 0x140d49(%rip), %rcx    # 0x154eb8
xorl %ebx, %ebx
cmpq %rcx, %rax
je 0x1417e
addl (%rax), %ebx
addq $0x4, %rax
jmp 0x14171
movq 0x860(%rsp), %rdi
testq %rdi, %rdi
je 0x1419b
movq 0x870(%rsp), %rsi
subq %rdi, %rsi
callq 0x4250
leaq 0x10(%rsp), %rdi
callq 0x149f6
movl %ebx, %eax
addq $0x888, %rsp            # imm = 0x888
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x4150
jmp 0x141d6
movq %rax, %rbx
jmp 0x141f6
jmp 0x141d6
cmpq $0x0, 0x8(%rsp)
je 0x141d6
callq 0x4080
movq %rax, %rbx
movq 0x860(%rsp), %rdi
testq %rdi, %rdi
je 0x141f6
movq 0x870(%rsp), %rsi
subq %rdi, %rsi
callq 0x4250
leaq 0x10(%rsp), %rdi
callq 0x149f6
movq %rbx, %rdi
callq 0x43b0
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/perft.cpp
// Function: perftTestDebug()
void perftTestDebug()
{
	int nodes;
	for (int i = 0; i < totalTests; ++i)
	{
		history.clear();
		State s(perftFen[i]);
		history.push(std::make_pair(nullMove, s.getKey()));
		nodes = MTperft(s, perftDepth[i]);
		//std::cout << perftFen[i] << std::endl;
		std::cout << (nodes == perftResults[i] ? "Success " : "Fail ")
		          << nodes << " == " << perftResults[i] << std::endl;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x518, %rsp            # imm = 0x518
leaq 0x138393(%rip), %rbx    # 0x14cac0
xorl %r14d, %r14d
leaq 0x1385e9(%rip), %r12    # 0x14cd20
leaq 0x10(%rsp), %r15
movq 0x1085d(%rip), %r13     # 0x24fa0
movq %r12, %rdi
callq 0x14a32
movq %r15, %rdi
movq %rbx, %rsi
callq 0x16640
movq 0x28(%rsp), %rax
movw $0x0, (%rsp)
movq %rax, 0x8(%rsp)
movq 0x1385bb(%rip), %rsi    # 0x14cd28
cmpq 0x1385bc(%rip), %rsi    # 0x14cd30
je 0x14787
movups (%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x1385a3(%rip)   # 0x14cd28
jmp 0x14792
movq %r12, %rdi
movq %rsp, %rdx
callq 0x14b86
leaq 0x9aa7(%rip), %rax      # 0x1e240
movl (%r14,%rax), %esi
movq %r15, %rdi
callq 0x14056
movl %eax, %ebp
leaq 0x9ae2(%rip), %rax      # 0x1e290
movl (%r14,%rax), %r12d
xorl %eax, %eax
cmpl %r12d, %ebp
sete %al
leaq 0x9a56(%rip), %rsi      # 0x1e217
leaq 0x9a46(%rip), %rcx      # 0x1e20e
cmoveq %rcx, %rsi
leaq (%rax,%rax,2), %rdx
addq $0x5, %rdx
movq %r13, %rdi
callq 0x4290
movq %r13, %rdi
movl %ebp, %esi
callq 0x43a0
movq %rax, %rbp
movl $0x4, %edx
movq %rax, %rdi
leaq 0x9a25(%rip), %rsi      # 0x1e21d
callq 0x4290
movq %rbp, %rdi
movl %r12d, %esi
callq 0x43a0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x4230
movsbl %al, %esi
movq %r12, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x4170
addq $0x4, %r14
addq $0x20, %rbx
cmpq $0x4c, %r14
leaq 0x1384db(%rip), %r12    # 0x14cd20
jne 0x14743
addq $0x518, %rsp            # imm = 0x518
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/history.h
// Function: History::History()
History()
	: mKillers{}, mHistory{}
	{
		mGameHistory.reserve(1024);
		for (std::array<int, Board_size>& arr : mButterfly)
			arr.fill(1);
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xe0, %r14d
movl $0xe0, %edx
xorl %esi, %esi
callq 0x4120
leaq 0x40e0(%rbx), %rdi
movl $0x4000, %edx           # imm = 0x4000
xorl %esi, %esi
callq 0x4120
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
callq 0x14ab8
addq $0xe0, %rbx
movaps 0x977b(%rip), %xmm0     # 0x1e020
movl $0x100, %eax            # imm = 0x100
xorl %ecx, %ecx
movups %xmm0, (%rbx,%rcx,4)
addq $0x4, %rcx
cmpq $0x40, %rcx
jne 0x148ac
addq %rax, %r14
addq %rax, %rbx
cmpq $0x40e0, %r14           # imm = 0x40E0
jne 0x148aa
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x148e8
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x4250
movq %r14, %rdi
callq 0x43b0
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/history.h
// Function: History::clear()
void clear()
	{
		mKillers = {};
		mHistory = {};
		for (std::array<int, Board_size>& arr : mButterfly)
			arr.fill(1);
	}

// Assembly:
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
movq %rsp, %rdi
xorl %r14d, %r14d
movl $0xc8, %edx
xorl %esi, %esi
callq 0x4120
movl (%rsp,%r14,4), %eax
movl %eax, 0x18(%rbx,%r14,4)
incq %r14
cmpq $0x32, %r14
jne 0x14a51
leaq 0x40e0(%rbx), %rdi
movl $0x4000, %edx           # imm = 0x4000
xorl %esi, %esi
callq 0x4120
addq $0xe0, %rbx
movl $0xe0, %eax
movaps 0x9597(%rip), %xmm0     # 0x1e020
movl $0x100, %ecx            # imm = 0x100
xorl %edx, %edx
movups %xmm0, (%rbx,%rdx,4)
addq $0x4, %rdx
cmpq $0x40, %rdx
jne 0x14a90
addq %rcx, %rax
addq %rcx, %rbx
cmpq $0x40e0, %rax           # imm = 0x40E0
jne 0x14a8e
addq $0xc8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/search.cpp
// Function: interrupt(SearchInfo&)
bool interrupt(SearchInfo& si)
{
    // Check to see if we have run out of time.
    if (si.clock.elapsed<std::chrono::milliseconds>() >= si.moveTime
        && !si.infinite)
    {
        si.quit = true;
        return true;
    }

    if (input_waiting())
    {
        std::string command(get_input());
        if (command == "quit" || command == "stop")
        {
            si.quit = true;
            return true;
        }
    }

    // The GUI should be able to send quit commands as well.
    // I may need multiple threads for this.
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
callq 0x4060
subq 0x30(%rbx), %rax
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x12, %rdx
addq %rax, %rdx
cmpq 0x28(%rbx), %rdx
jl 0x150ce
cmpb $0x0, 0x38(%rbx)
je 0x1521a
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, 0x20(%r14)
movaps %xmm0, 0x30(%r14)
movaps %xmm0, 0x40(%r14)
movaps %xmm0, 0x50(%r14)
movaps %xmm0, 0x60(%r14)
movaps %xmm0, 0x70(%r14)
movq 0xfe86(%rip), %r15      # 0x24f88
movq (%r15), %rdi
callq 0x4280
leal 0x3f(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
andl $0xc0, %ecx
subl %ecx, %eax
movl $0x1, %r12d
movl %eax, %ecx
shlq %cl, %r12
movq (%r15), %rdi
callq 0x4280
leal 0x3f(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
sarl $0x6, %ecx
movslq %ecx, %rax
orq %r12, (%rsp,%rax,8)
leaq 0x80(%rsp), %r8
xorps %xmm0, %xmm0
movaps %xmm0, (%r8)
movl $0x10, %edi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4210
movq (%r15), %rdi
callq 0x4280
leal 0x3f(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
sarl $0x6, %ecx
movslq %ecx, %rax
movq (%rsp,%rax,8), %r14
movq (%r15), %rdi
callq 0x4280
btq %rax, %r14
jae 0x15216
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
movq 0xfe39(%rip), %rdi      # 0x24fe0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x4230
movsbl %al, %edx
movq 0xfe1e(%rip), %rdi      # 0x24fe0
movq %rsp, %rsi
callq 0x43d0
leaq 0x916f(%rip), %rsi      # 0x1e340
movq %rsp, %rdi
callq 0x4090
testl %eax, %eax
je 0x151f3
leaq 0x9161(%rip), %rsi      # 0x1e345
movq %rsp, %rdi
callq 0x4090
movb $0x1, %bpl
testl %eax, %eax
jne 0x151f9
movb $0x1, 0x3a(%rbx)
xorl %ebp, %ebp
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x1520f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4250
movb $0x1, %al
testb %bpl, %bpl
je 0x15220
xorl %eax, %eax
jmp 0x15220
movb $0x1, 0x3a(%rbx)
movb $0x1, %al
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x15249
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4250
movq %rbx, %rdi
callq 0x43b0
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/search.cpp
// Function: setup_search(State&, SearchInfo&)
void setup_search(State& s, SearchInfo& si)
{
    //ttable.setAncient();
    ttable.clear();
    lineManager.clearPv();
    init_eval();
    history.clear();
    iterative_deepening(s, si);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x14e2c5(%rip), %rcx    # 0x1645f0
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
cmpq %rcx, %rax
je 0x1635a
xorl %edx, %edx
movq %rdx, (%rax)
movw $0x0, 0x8(%rax)
movq %rdx, 0xc(%rax)
movl $0x0, 0x14(%rax)
movb $0x1, 0x18(%rax)
addq $0x20, %rax
cmpq %rcx, %rax
jne 0x16339
leaq 0x13f37f(%rip), %rdi    # 0x1556e0
callq 0xf9b6
leaq 0x144333(%rip), %rdi    # 0x15a6a0
callq 0x14a32
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x15f94
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/state.cpp
// Function: State::operator=(State const&)
void State::operator=(const State & s)
{
    mUs = s.mUs;
    mThem = s.mThem;
    mFiftyMoveRule = s.mFiftyMoveRule;
    mCastleRights = s.mCastleRights;
    mPhase = s.mPhase;
    mKey = s.mKey;
    mPawnKey = s.mPawnKey;
    mCheckers = s.mCheckers;
    mEnPassant = s.mEnPassant;
    mCheckSquares = s.mCheckSquares;
    mPinned = s.mPinned;
    mOccupancy = s.mOccupancy;
    mPieceIndex = s.mPieceIndex;
    mBoard = s.mBoard;
    mPieces = s.mPieces;
    mPieceCount = s.mPieceCount;
    mPstScore = s.mPstScore;
    mPieceList = s.mPieceList;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
movss 0x10(%rsi), %xmm0
movss %xmm0, 0x10(%rdi)
movups 0x18(%rsi), %xmm0
movups %xmm0, 0x18(%rdi)
movups 0x28(%rsi), %xmm0
movups %xmm0, 0x28(%rdi)
movups 0x38(%rsi), %xmm0
movups 0x48(%rsi), %xmm1
movups 0x58(%rsi), %xmm2
movups %xmm2, 0x58(%rdi)
movups %xmm1, 0x48(%rdi)
movups %xmm0, 0x38(%rdi)
movups 0x68(%rsi), %xmm0
movups %xmm0, 0x68(%rdi)
movups 0x78(%rsi), %xmm0
movups %xmm0, 0x78(%rdi)
movl $0x88, %edi
addq %rdi, %rsi
addq %r14, %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x41c0
movl $0x188, %edi            # imm = 0x188
leaq (%rbx,%rdi), %rsi
addq %r14, %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x41c0
movl $0x288, %edi            # imm = 0x288
leaq (%rbx,%rdi), %rsi
addq %r14, %rdi
movl $0xc, %ecx
rep  movsq (%rsi), %es:(%rdi)
movups 0x2e8(%rbx), %xmm0
movups 0x2f8(%rbx), %xmm1
movups 0x308(%rbx), %xmm2
movups %xmm2, 0x308(%r14)
movups %xmm1, 0x2f8(%r14)
movups %xmm0, 0x2e8(%r14)
movups 0x318(%rbx), %xmm0
movups %xmm0, 0x318(%r14)
movl $0x328, %eax            # imm = 0x328
addq %rax, %rbx
addq %rax, %r14
movl $0x1e0, %edx            # imm = 0x1E0
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x41c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/state.cpp
// Function: State::init()
void State::init()
{
    mUs = white;
    mThem = black;
    mFiftyMoveRule = 0;
    mCastleRights = 0;
    mKey = 0;
    mPawnKey = 0;
    mCheckers = 0;
    mEnPassant = 0;
    mCheckSquares.fill({});
    mPinned.fill({});
    mOccupancy.fill({});
    mPieceIndex.fill({});
    mBoard.fill(none);
    mPieces.fill({});
    mPieceCount.fill({});
    mPstScore.fill({});
    for (auto i = mPieceList.begin(); i != mPieceList.end(); ++i)
        for (auto j = i->begin(); j != i->end(); ++j)
            j->fill(no_sq);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movsd 0x78bd(%rip), %xmm0     # 0x1e3e0
movups %xmm0, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x68(%rdi)
movups %xmm0, 0x78(%rdi)
addq $0x88, %rdi
xorl %r14d, %r14d
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x4120
movaps 0x788e(%rip), %xmm0     # 0x1e3f0
movups %xmm0, 0x188(%rbx,%r14,4)
addq $0x4, %r14
cmpq $0x40, %r14
jne 0x16b62
leaq 0x288(%rbx), %rax
movq $-0x60, %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x80(%rax,%rcx)
movups %xmm0, 0x70(%rax,%rcx)
movups %xmm0, 0x60(%rax,%rcx)
addq $0x30, %rcx
jne 0x16b86
leaq 0x2e8(%rbx), %rax
movq $-0x30, %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax,%rcx)
movq $0x0, 0x40(%rax,%rcx)
addq $0x18, %rcx
jne 0x16baf
xorps %xmm0, %xmm0
movups %xmm0, 0x318(%rbx)
leaq 0x328(%rbx), %rcx
movl $0x328, %eax            # imm = 0x328
movdqa 0x781f(%rip), %xmm0     # 0x1e400
movdqa 0x7827(%rip), %xmm1     # 0x1e410
movdqa 0x782f(%rip), %xmm2     # 0x1e420
movdqa 0x7837(%rip), %xmm3     # 0x1e430
pshufd $0xf5, %xmm3, %xmm4     # xmm4 = xmm3[1,1,3,3]
leaq (%rbx,%rax), %rdx
addq $0xf0, %rdx
addq $0xf0, %rax
xorl %esi, %esi
movq %rsi, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm1, %xmm6
pxor %xmm2, %xmm6
movdqa %xmm3, %xmm7
pcmpgtd %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm6     # xmm6 = xmm6[1,1,3,3]
pcmpeqd %xmm4, %xmm6
pand %xmm7, %xmm6
movd %xmm6, %edi
testb $0x1, %dil
je 0x16c4d
movl $0x40, (%rcx,%rsi,4)
pextrw $0x4, %xmm6, %edi
testb $0x1, %dil
je 0x16c60
movl $0x40, 0x4(%rcx,%rsi,4)
por %xmm0, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm3, %xmm6
pcmpgtd %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm5     # xmm5 = xmm5[1,1,3,3]
pcmpeqd %xmm4, %xmm5
pand %xmm6, %xmm5
pextrw $0x0, %xmm5, %edi
testb $0x1, %dil
je 0x16c90
movl $0x40, 0x8(%rcx,%rsi,4)
pextrw $0x4, %xmm5, %edi
testb $0x1, %dil
je 0x16ca3
movl $0x40, 0xc(%rcx,%rsi,4)
addq $0x4, %rsi
cmpq $0xc, %rsi
jne 0x16c11
addq $0x28, %rcx
cmpq %rdx, %rcx
jne 0x16c0f
leaq (%rbx,%rax), %rcx
cmpq $0x508, %rax            # imm = 0x508
jne 0x16bfe
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/state.cpp
// Function: State::makeNull()
void State::makeNull()
{
    assert(mCheckers == 0);
    // Remove the ep file and castle rights from the zobrist key.
    if (mEnPassant)
        mKey ^= Zobrist::key(get_file(mEnPassant));

    // Reset the en-passant square.
    mEnPassant = 0;

    // Swap the turn.
    swapTurn();

    // Set check squares.
    mCheckSquares[pawn] = getAttackBB<pawn>(getKingSquare(mThem), mThem);
    mCheckSquares[knight] = getAttackBB<knight>(getKingSquare(mThem));
    mCheckSquares[bishop] = getAttackBB<bishop>(getKingSquare(mThem));
    mCheckSquares[rook] = getAttackBB<rook>(getKingSquare(mThem));
    mCheckSquares[queen] = mCheckSquares[bishop] | mCheckSquares[rook];
}

// Assembly:
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x18715
bsfq %rax, %rax
andl $0x7, %eax
leaq 0x14e743(%rip), %rcx    # 0x166e50
movq (%rcx,%rax,8), %rax
xorq %rax, 0x18(%rdi)
movq $0x0, 0x30(%rdi)
leaq 0x14e7ec(%rip), %rax    # 0x166f10
movq (%rax), %rax
xorq %rax, 0x18(%rdi)
movl (%rdi), %ecx
xorl %eax, %eax
testq %rcx, %rcx
sete %al
movl %ecx, 0x4(%rdi)
movl %eax, (%rdi)
imulq $0xf0, %rcx, %rax
movl 0x3f0(%rdi,%rax), %eax
shlq $0x9, %rcx
addq 0xc85d(%rip), %rcx      # 0x24fb0
movq (%rcx,%rax,8), %rcx
movq %rcx, 0x38(%rdi)
leaq 0x33de(%rip), %rcx      # 0x1bb40
movq (%rcx,%rax,8), %rcx
movq %rcx, 0x40(%rdi)
movq 0x80(%rdi), %rdx
orq 0x78(%rdi), %rdx
leaq 0xca94(%rip), %rcx      # 0x25210
movq (%rcx,%rax,8), %rsi
leaq 0x30b9(%rip), %rcx      # 0x1b840
movq (%rcx,%rax,8), %r8
andq %rdx, %r8
leaq 0x2eab(%rip), %rcx      # 0x1b640
imulq (%rcx,%rax,8), %r8
leaq 0x2d9f(%rip), %rcx      # 0x1b540
movb (%rcx,%rax,4), %cl
shrq %cl, %r8
movq (%rsi,%r8,8), %rsi
movq %rsi, 0x48(%rdi)
leaq 0xcc5a(%rip), %rcx      # 0x25410
movq (%rcx,%rax,8), %r8
leaq 0x2b7f(%rip), %rcx      # 0x1b340
andq (%rcx,%rax,8), %rdx
leaq 0x2974(%rip), %rcx      # 0x1b140
imulq (%rcx,%rax,8), %rdx
leaq 0x2868(%rip), %rcx      # 0x1b040
movb (%rcx,%rax,4), %cl
shrq %cl, %rdx
movq (%r8,%rdx,8), %rax
movq %rax, 0x50(%rdi)
orq %rsi, %rax
movq %rax, 0x58(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/state.h
// Function: State::attacked(Square) const
inline
bool State::attacked(Square s) const
{
    return getAttackBB< pawn >(s, mUs) &  getPieceBB< pawn >(mThem)
        || getAttackBB<knight>(s) &  getPieceBB<knight>(mThem)
        || getAttackBB<bishop>(s) & (getPieceBB<bishop>(mThem) | getPieceBB<queen>(mThem))
        || getAttackBB< rook >(s) & (getPieceBB< rook >(mThem) | getPieceBB<queen>(mThem));
}

// Assembly:
movl (%rdi), %ecx
movl 0x4(%rdi), %eax
movl %esi, %edx
shlq $0x9, %rcx
addq 0xc206(%rip), %rcx      # 0x24fb0
leaq (%rax,%rax,2), %rsi
shlq $0x4, %rsi
movq 0x288(%rdi,%rsi), %r8
movb $0x1, %al
testq %r8, (%rcx,%rdx,8)
je 0x18dc3
retq
leaq 0x288(%rdi), %r8
leaq 0x2d6f(%rip), %rcx      # 0x1bb40
movq 0x8(%r8,%rsi), %r9
testq %r9, (%rcx,%rdx,8)
jne 0x18dc2
movq 0x80(%rdi), %r9
orq 0x78(%rdi), %r9
leaq 0xc422(%rip), %rcx      # 0x25210
leaq 0x2a4b(%rip), %rdi      # 0x1b840
movq (%rdi,%rdx,8), %r10
andq %r9, %r10
leaq 0x283d(%rip), %rdi      # 0x1b640
imulq (%rdi,%rdx,8), %r10
movq (%rcx,%rdx,8), %r11
leaq 0x272d(%rip), %rcx      # 0x1b540
movb (%rcx,%rdx,4), %cl
shrq %cl, %r10
movq 0x20(%r8,%rsi), %rdi
movq 0x10(%r8,%rsi), %rcx
orq %rdi, %rcx
testq %rcx, (%r11,%r10,8)
jne 0x18dc2
leaq 0x250d(%rip), %rax      # 0x1b340
andq (%rax,%rdx,8), %r9
leaq 0x2302(%rip), %rax      # 0x1b140
imulq (%rax,%rdx,8), %r9
leaq 0x21f6(%rip), %rax      # 0x1b040
movb (%rax,%rdx,4), %cl
shrq %cl, %r9
leaq 0xc5b9(%rip), %rax      # 0x25410
orq 0x18(%r8,%rsi), %rdi
movq (%rax,%rdx,8), %rax
testq %rdi, (%rax,%r9,8)
setne %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/uci.cpp
// Function: get_uci_move(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, State&)
Move get_uci_move(std::string & token, State & s)
{
    Move m;

    token.erase(std::remove(token.begin(), token.end(), ','),
                    token.end());
    MoveList mlist(s);
    while (mlist.size() > 0)
    {
        m = mlist.pop();
        if (toString(m) == token)
            return m;
        if (mlist.size() == 0)
            return nullMove;
    }
    return nullMove;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x878, %rsp            # imm = 0x878
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x8(%rbx), %rsi
addq %rdi, %rsi
leaq 0x20(%rsp), %r14
movb $0x2c, (%r14)
movq %r14, %rdx
callq 0x1a23f
movq %rax, %rcx
subq (%rbx), %rcx
movq %rcx, 0x8(%rbx)
movb $0x0, (%rax)
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x10b54
leaq 0x10(%rsp), %r12
movq %rsp, %r15
movq %r14, %rdi
callq 0xfdfa
testq %rax, %rax
je 0x1943e
movq %r14, %rdi
callq 0xfe1a
movl %eax, %ebp
movzwl %ax, %esi
movq %r15, %rdi
callq 0xfbab
movq 0x8(%rsp), %rdx
cmpq 0x8(%rbx), %rdx
jne 0x1940e
testq %rdx, %rdx
je 0x19413
movq (%rbx), %rsi
movq (%rsp), %rdi
callq 0x4270
testl %eax, %eax
sete %r13b
jmp 0x19416
xorl %r13d, %r13d
jmp 0x19416
movb $0x1, %r13b
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1942c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4250
testb %r13b, %r13b
jne 0x19440
movq %r14, %rdi
callq 0xfdfa
testq %rax, %rax
jne 0x193c8
xorl %ebp, %ebp
movq 0x850(%rsp), %rdi
testq %rdi, %rdi
je 0x1945d
movq 0x860(%rsp), %rsi
subq %rdi, %rsi
callq 0x4250
movl %ebp, %eax
addq $0x878, %rsp            # imm = 0x878
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x19473
movq %rax, %rbx
movq 0x850(%rsp), %rdi
testq %rdi, %rdi
je 0x19493
movq 0x860(%rsp), %rsi
subq %rdi, %rsi
callq 0x4250
movq %rbx, %rdi
callq 0x43b0
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/uci.cpp
// Function: set_option(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void set_option(std::string & name, std::string & value)
{
    if (name == "Hash")
        ttable.resize(std::stoi(value));
    else if (name == "ClearHash")
        ttable.clear();

    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x699c(%rip), %rsi      # 0x20546
callq 0x4090
testl %eax, %eax
je 0x19c07
leaq 0x6987(%rip), %rsi      # 0x20541
movq %rbx, %rdi
callq 0x4090
testl %eax, %eax
jne 0x19bfc
leaq 0x14aa23(%rip), %rcx    # 0x1645f0
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
cmpq %rcx, %rax
je 0x19bfc
xorl %edx, %edx
movq %rdx, (%rax)
movw $0x0, 0x8(%rax)
movq %rdx, 0xc(%rax)
movl $0x0, 0x14(%rax)
movb $0x1, 0x18(%rax)
addq $0x20, %rax
cmpq %rcx, %rax
jne 0x19bdb
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %r14
callq 0x4050
movq %rax, %rbx
movl (%rax), %ebp
movl $0x0, (%rax)
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x42e0
cmpq %r14, (%r15)
je 0x19c5f
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x19c6b
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x19c6b
testl %ecx, %ecx
jne 0x19c47
movl %ebp, (%rbx)
leaq 0x14a9a2(%rip), %rdi    # 0x1645f0
movl %eax, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1a1e8
leaq 0x6976(%rip), %rdi      # 0x205dc
callq 0x4130
leaq 0x696a(%rip), %rdi      # 0x205dc
callq 0x4300
cmpl $0x0, (%rbx)
jne 0x19c7e
movl %ebp, (%rbx)
movq %rax, %rdi
callq 0x43b0
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/history.h
// Function: History::init()
void init()
	{
		mKillers = {};
		mHistory = {};
		mGameHistory.clear();
		for (std::array<int, Board_size>& arr : mButterfly)
			arr.fill(1);
	}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
movl $0xc8, %edx
xorl %esi, %esi
callq 0x4120
movl $0x6, %eax
movl -0x10(%rsp,%rax,4), %ecx
movl %ecx, (%rbx,%rax,4)
incq %rax
cmpq $0x38, %rax
jne 0x1a179
leaq 0x40e0(%rbx), %rdi
movl $0x4000, %edx           # imm = 0x4000
xorl %esi, %esi
callq 0x4120
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x1a1a9
movq %rax, 0x8(%rbx)
addq $0xe0, %rbx
movl $0xe0, %eax
movaps 0x3e64(%rip), %xmm0     # 0x1e020
movl $0x100, %ecx            # imm = 0x100
xorl %edx, %edx
movups %xmm0, (%rbx,%rdx,4)
addq $0x4, %rdx
cmpq $0x40, %rdx
jne 0x1a1c3
addq %rcx, %rax
addq %rcx, %rbx
cmpq $0x40e0, %rax           # imm = 0x40E0
jne 0x1a1c1
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/zobrist.cpp
// Function: Zobrist::init()
void init()
	{
		srand(6736199);
		for (PieceType p = pawn; p < none; ++p)
		{
			for (Square s = first_sq; s <= last_sq; ++s)
			{
				piece_rand[white][p][s] = rand_64();
				piece_rand[black][p][s] = rand_64();
			}
		}
		for (File f = a_file; f <= h_file; ++f)
		{
			ep_file_rand[f] = rand_64();
		}
		for (int i = 0; i < 16; ++i)
		{
			castle_rand[i] = rand_64();
		}
		side_to_move_rand = rand_64();
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl $0x66c947, %edi         # imm = 0x66C947
callq 0x4220
leaq 0x14bdd3(%rip), %r14    # 0x166250
xorl %r15d, %r15d
xorl %r12d, %r12d
callq 0x4070
movl %eax, %ebx
shlq $0x20, %rbx
callq 0x4070
cltq
orq %rbx, %rax
movq %rax, -0xc00(%r14,%r12,8)
callq 0x4070
movl %eax, %ebx
shlq $0x20, %rbx
callq 0x4070
cltq
orq %rbx, %rax
movq %rax, (%r14,%r12,8)
incq %r12
cmpq $0x40, %r12
jne 0x1a483
incq %r15
addq $0x200, %r14            # imm = 0x200
cmpq $0x6, %r15
jne 0x1a480
xorl %r14d, %r14d
leaq 0x14c974(%rip), %r15    # 0x166e50
callq 0x4070
movl %eax, %ebx
shlq $0x20, %rbx
callq 0x4070
cltq
orq %rbx, %rax
movq %rax, (%r14,%r15)
addq $0x8, %r14
cmpq $0x40, %r14
jne 0x1a4dc
xorl %r14d, %r14d
leaq 0x14c987(%rip), %r15    # 0x166e90
callq 0x4070
movl %eax, %ebx
shlq $0x20, %rbx
callq 0x4070
cltq
orq %rbx, %rax
movq %rax, (%r14,%r15)
addq $0x8, %r14
cmpq $0x80, %r14
jne 0x1a509
callq 0x4070
movl %eax, %ebx
shlq $0x20, %rbx
callq 0x4070
cltq
orq %rbx, %rax
movq %rax, 0x14c9c5(%rip)    # 0x166f10
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/WeihuaZhu[P]hpc_prog2/./io.h
// Function: std::vector<double, std::allocator<double>> read_binary_file<double>(char const*)
std::vector<T> read_binary_file(const char* filename)
{
    // get file size
    std::ifstream in(filename, std::ios::binary | std::ios::ate);
    if (!(in.good() && in.is_open()))
        throw std::runtime_error(std::string("Couldn't open file ") + filename);
    std::size_t nbytes = in.tellg();
    in.close();
    // open again, this time at the beginning
    std::ifstream infile(filename, std::ios::binary);

    // create vector of the correct size
    std::size_t n = nbytes / sizeof(T);
    std::vector<T> result(n);
    // read file into vector:
    infile.read((char*) &result[0], nbytes);
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x430, %rsp            # imm = 0x430
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x228(%rsp), %r15
movq %r15, %rdi
movl $0x6, %edx
callq 0x2430
movq (%r15), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x248(%rsp,%rax)
jne 0x367e
leaq 0x2a0(%rsp), %rdi
callq 0x2090
testb %al, %al
je 0x367e
leaq 0x228(%rsp), %rdi
callq 0x23e0
movq %rax, %r15
leaq 0x228(%rsp), %rdi
callq 0x2070
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movl $0x4, %edx
callq 0x2430
movq %r15, %rsi
shrq $0x3, %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x34ec
movq (%rbx), %rsi
leaq 0x20(%rsp), %rdi
movq %r15, %rdx
callq 0x22d0
leaq 0x20(%rsp), %rdi
callq 0x20a0
leaq 0x228(%rsp), %rdi
callq 0x20a0
movq %rbx, %rax
addq $0x430, %rsp            # imm = 0x430
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x2120
movq %rax, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1c8d(%rip), %rsi      # 0x5328
leaq 0x1c99(%rip), %rdx      # 0x533b
movq %rsp, %rdi
callq 0x3988
movq %rsp, %rdi
movq %r14, %rsi
callq 0x2450
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x36d8
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x36e5
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x23b0
xorl %ebp, %ebp
movq 0x38db(%rip), %rsi      # 0x6ff0
movq 0x38a4(%rip), %rdx      # 0x6fc0
movq %rbx, %rdi
callq 0x23d0
movq %rax, %r14
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x3746
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2260
jmp 0x3746
movq %rax, %r14
movb $0x1, %bpl
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x3795
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2260
jmp 0x3795
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x377a
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2260
jmp 0x377a
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x20a0
jmp 0x37a2
jmp 0x378a
jmp 0x378a
movq %rax, %r14
jmp 0x37a2
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x37a2
movq %rbx, %rdi
callq 0x2190
leaq 0x228(%rsp), %rdi
callq 0x20a0
movq %r14, %rdi
callq 0x23f0
// File: /workspace/github_cpp_makefile_star2_O1/WeihuaZhu[P]hpc_prog2/./io.h
// Function: void write_binary_file<double>(char const*, std::vector<double, std::allocator<double>> const&)
void write_binary_file(const char* filename, const std::vector<T>& data)
{
    // open file in binary mode
    std::ofstream out(filename, std::ios::binary);
    if (!(out.good() && out.is_open()))
        throw std::runtime_error(std::string("Couldn't open file ") + filename);
    // write data to file
    out.write(reinterpret_cast<const char*>(&data[0]), sizeof(T)*data.size());
    out.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x240, %rsp            # imm = 0x240
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x40(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl $0x4, %edx
callq 0x2270
movq (%r15), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x60(%rsp,%rax)
jne 0x3860
leaq 0xb0(%rsp), %rdi
callq 0x2090
testb %al, %al
je 0x3860
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
subq %rsi, %rdx
leaq 0x40(%rsp), %rdi
callq 0x22e0
leaq 0x40(%rsp), %rdi
callq 0x2330
movq 0x3783(%rip), %rax      # 0x6fa8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x48(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x40(%rsp,%rcx)
callq 0x2200
leaq 0x138(%rsp), %rdi
callq 0x20d0
addq $0x240, %rsp            # imm = 0x240
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x2120
movq %rax, %rbx
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1aab(%rip), %rsi      # 0x5328
leaq 0x1ab7(%rip), %rdx      # 0x533b
leaq 0x20(%rsp), %rdi
callq 0x3988
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x2450
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x38be
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x38ca
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq 0x8(%rax), %rdx
movq %rsp, %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x23b0
xorl %ebp, %ebp
movq 0x36f8(%rip), %rsi      # 0x6ff0
movq 0x36c1(%rip), %rdx      # 0x6fc0
movq %rbx, %rdi
callq 0x23d0
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x3928
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2260
jmp 0x3928
movq %rax, %r14
movb $0x1, %bpl
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x3947
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2260
jmp 0x3947
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x3959
movq %rbx, %rdi
callq 0x2190
jmp 0x3959
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x2350
movq %r14, %rdi
callq 0x23f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/j-faria[P]kima/examples/K2-24/kima_setup.cpp
// Function: main
int main(int argc, char** argv)
{
    datafile = "K2-24.rv"; // set the RV data file
    load(datafile, "ms", 1);

    /// set the sampler and run it!
    Sampler<RVmodel> sampler = setup<RVmodel>(argc, argv);
    sampler.run(50); // the optional argument to run() sets the print thining

    return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x6c0, %rsp            # imm = 0x6C0
movq %rsi, %rbx
movl %edi, %ebp
movq 0x330b2(%rip), %rdx     # 0x54548
leaq 0x330a3(%rip), %r14     # 0x54540
leaq 0x24efc(%rip), %rcx     # 0x463a0
movl $0x8, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0x6600
leaq 0x8(%rsp), %rdx
movl $0x1, (%rdx)
leaq 0x1f023(%rip), %rsi     # 0x404e9
movq %r14, %rdi
callq 0x216bd
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x217c0
movq %r14, %rdi
movl $0x32, %esi
callq 0x21892
leaq 0x8(%rsp), %rdi
callq 0x21a70
xorl %eax, %eax
addq $0x6c0, %rsp            # imm = 0x6C0
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x21a70
movq %rbx, %rdi
callq 0x6710