LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x40e0, %rdi           # imm = 0x40E0
movl $0x4000, %edx           # imm = 0x4000
xorl %esi, %esi
callq 0x4140
movl $0xe0, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4140
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
callq 0x110c6
leaq 0xe0(%rbx), %r15
xorl %r12d, %r12d
leaq 0x4(%rsp), %r14
cmpq $0x4000, %r12           # imm = 0x4000
je 0x10ed9
leaq (%r15,%r12), %rdi
movl $0x1, 0x4(%rsp)
movq %r14, %rsi
callq 0x1116e
addq $0x100, %r12            # imm = 0x100
jmp 0x10eb3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x10ee7
movq %rax, %r14
movq %rbx, %rdi
callq 0x111d8
movq %r14, %rdi
callq 0x43d0
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
leaq 0x18(%rdi), %r15
movq %rsp, %r14
xorl %r12d, %r12d
movl $0xc8, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x4140
movq %r15, %rdi
movq %r14, %rsi
callq 0x111f6
leaq 0x40e0(%rbx), %rdi
movl $0x4000, %edx           # imm = 0x4000
xorl %esi, %esi
callq 0x4140
addq $0xe0, %rbx
cmpq $0x4000, %r12           # imm = 0x4000
je 0x110b6
leaq (%rbx,%r12), %rdi
movl $0x1, (%rsp)
movq %r14, %rsi
callq 0x1116e
addq $0x100, %r12            # imm = 0x100
jmp 0x11091
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
addq $0x30, %rdi
callq 0x12614
cmpq 0x28(%rbx), %rax
jl 0x11843
cmpb $0x0, 0x38(%rbx)
je 0x11891
callq 0x1262c
testl %eax, %eax
je 0x118a3
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x126c9
leaq 0x7a10(%rip), %rsi      # 0x19270
movq %r14, %rdi
callq 0x1270d
testb %al, %al
jne 0x11881
leaq 0x7a02(%rip), %rsi      # 0x19275
leaq 0x8(%rsp), %rdi
callq 0x1270d
testb %al, %al
je 0x11899
movb $0x1, 0x3a(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x4418
jmp 0x11895
movb $0x1, 0x3a(%rbx)
movb $0x1, %al
jmp 0x118a5
leaq 0x8(%rsp), %rdi
callq 0x4418
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x210021(%rip), %rdi    # 0x222600
callq 0x1282a
leaq 0x1d1105(%rip), %rdi    # 0x1e36f0
callq 0xcee6
callq 0x12853
leaq 0x1d60b4(%rip), %rdi    # 0x1e86b0
callq 0x11042
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x12347
nop
// File: /workspace/github_cpp_makefile_star2_O2/SethKasmann[P]clever-girl/src/misc.h
// Function: input_waiting()
inline int input_waiting()
{
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
	static int init = 0, pipe;
	static HANDLE inh;
	DWORD dw;

	if (!init)
	{
		init = 1;
		inh = GetStdHandle(STD_INPUT_HANDLE);
		pipe = !GetConsoleMode(inh, &dw);
		if (!pipe)
		{
			SetConsoleMode(inh, dw & ~(ENABLE_MOUSE_INPUT|ENABLE_WINDOW_INPUT));
			FlushConsoleInputBuffer(inh);
		}
	}
	if (pipe)
	{
		if (!PeekNamedPipe(inh, NULL, 0, NULL, &dw, NULL))
			return 1;
		return dw;
	}
	else
	{
		GetNumberOfConsoleInputEvents(inh, &dw);
		return dw <= 1 ? 0 : dw;
	}
#else
	fd_set readfds;
	timeval tv;
	FD_ZERO(&readfds);
	FD_SET(fileno(stdin), &readfds);
	tv.tv_sec = 0;
	tv.tv_usec = 0;
	select(16, &readfds, 0, 0, &tv);
	return (FD_ISSET(fileno(stdin), &readfds));
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x90, %rsp
xorl %eax, %eax
cmpq $0x10, %rax
je 0x1264b
andq $0x0, 0x10(%rsp,%rax,8)
incq %rax
jmp 0x1263a
movq 0x10936(%rip), %r14     # 0x22f88
movq (%r14), %rdi
callq 0x4280
pushq $0x40
popq %rbx
cltd
idivl %ebx
movl %edx, %ecx
pushq $0x1
popq %r15
shlq %cl, %r15
movq (%r14), %rdi
callq 0x4280
cltd
idivl %ebx
cltq
orq %r15, 0x10(%rsp,%rax,8)
xorps %xmm0, %xmm0
movq %rsp, %r8
movaps %xmm0, (%r8)
pushq $0x10
popq %rdi
leaq 0x10(%rsp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4220
movq (%r14), %rdi
callq 0x4280
cltd
idivl %ebx
cltq
movq 0x10(%rsp,%rax,8), %r15
movq (%r14), %rdi
callq 0x4280
cltd
idivl %ebx
xorl %eax, %eax
btq %rdx, %r15
setb %al
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/SethKasmann[P]clever-girl/src/history.h
// Function: History::update(unsigned short, int, int, bool)
void update(Move pBest, int pDepth, int ply, bool causedCutoff)
	{
		if (causedCutoff)
		{
			if (mKillers[ply].first != pBest)
			{
				mKillers[ply].second = mKillers[ply].first;
				mKillers[ply].first = pBest;
			}
			mHistory[getSrc(pBest)][getDst(pBest)] += pDepth * pDepth;
		}
		else
			mButterfly[getSrc(pBest)][getDst(pBest)] += pDepth;
	}

// Assembly:
movl $0xe0, %eax
testl %r8d, %r8d
je 0x127bd
movslq %ecx, %rax
movzwl 0x18(%rdi,%rax,4), %ecx
cmpw %si, %cx
je 0x127b5
movw %cx, 0x1a(%rdi,%rax,4)
movw %si, 0x18(%rdi,%rax,4)
imull %edx, %edx
movl $0x40e0, %eax           # imm = 0x40E0
addq %rax, %rdi
movl %esi, %eax
andl $0x3f, %eax
shll $0x8, %eax
addq %rdi, %rax
shrl $0x6, %esi
andl $0x3f, %esi
addl %edx, (%rax,%rsi,4)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/SethKasmann[P]clever-girl/src/transpositiontable.h
// Function: TranspositionTable::store(unsigned long long, unsigned short, NodeType, int, int)
void store(U64 key, Move best, NodeType type, int depth, int score)
    {
        int i = key % table.size();
        if (table[i].depth < depth ||
            table[i].ancient ||
            type == pv)
        {
            table[i].key     = key;
            table[i].best    = best;
            table[i].type    = type;
            table[i].depth   = depth;
            table[i].score   = score;
            table[i].ancient = false;
        }
    }

// Assembly:
movl %edx, %r10d
movq (%rdi), %r11
movq 0x8(%rdi), %rdi
subq %r11, %rdi
sarq $0x5, %rdi
movq %rsi, %rax
xorl %edx, %edx
divq %rdi
movslq %edx, %rax
shlq $0x5, %rax
cmpl %r8d, 0x10(%r11,%rax)
jge 0x1281d
movq %rsi, (%r11,%rax)
movw %r10w, 0x8(%r11,%rax)
movl %ecx, 0xc(%r11,%rax)
movl %r8d, 0x10(%r11,%rax)
movl %r9d, 0x14(%r11,%rax)
movb $0x0, 0x18(%r11,%rax)
retq
testl %ecx, %ecx
je 0x127fd
cmpb $0x0, 0x18(%r11,%rax)
jne 0x127fd
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movsd 0x6654(%rip), %xmm0     # 0x19300
movups %xmm0, (%rdi)
addq $0x38, %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
movups %xmm0, 0x28(%rbx)
movq %rsp, %r14
andq $0x0, (%r14)
movq %r14, %rsi
callq 0x13f30
leaq 0x88(%rbx), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0x68(%rbx)
andl $0x0, (%r14)
movq %rsp, %r15
movq %r15, %rsi
callq 0x1116e
leaq 0x188(%rbx), %rdi
movl $0x6, (%r15)
movq %rsp, %r15
movq %r15, %rsi
callq 0x13f46
leaq 0x288(%rbx), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
movq %rsp, %r15
movq %r15, %rsi
callq 0x13f5c
leaq 0x2e8(%rbx), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
andq $0x0, 0x10(%r15)
movq %rsp, %r15
movq %r15, %rsi
callq 0x13f84
leaq 0x318(%rbx), %rdi
andq $0x0, (%r15)
movq %rsp, %rsi
callq 0x13fa4
addq $0x328, %rbx            # imm = 0x328
movl $0x328, %r15d           # imm = 0x328
cmpq $0x508, %r15            # imm = 0x508
je 0x12da6
addq $0xf0, %r15
xorl %r12d, %r12d
cmpq $0xf0, %r12
je 0x12d9d
leaq (%rbx,%r12), %rdi
movl $0x40, (%rsp)
movq %r14, %rsi
callq 0x13fba
addq $0x28, %r12
jmp 0x12d7b
addq $0xf0, %rbx
jmp 0x12d68
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x13931
bsfq %rax, %rax
andl $0x7, %eax
leaq 0x241537(%rip), %rcx    # 0x254e60
movq (%rcx,%rax,8), %rax
xorq %rax, 0x18(%rbx)
andq $0x0, 0x30(%rbx)
movq %rbx, %rdi
callq 0x14626
movl 0x4(%rbx), %eax
imulq $0xf0, %rax, %rcx
movl 0x3f0(%rbx,%rcx), %esi
shlq $0x9, %rax
addq 0xf64e(%rip), %rax      # 0x22fa8
movq (%rax,%rsi,8), %rax
movq %rax, 0x38(%rbx)
leaq 0x3177(%rip), %rax      # 0x16ae0
movq (%rax,%rsi,8), %rax
movq %rax, 0x40(%rbx)
movq %rbx, %rdi
xorl %edx, %edx
callq 0xcd04
movq %rax, 0x48(%rbx)
movl 0x4(%rbx), %eax
imulq $0xf0, %rax, %rax
movl 0x3f0(%rbx,%rax), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xcd46
movq %rax, 0x50(%rbx)
orq 0x48(%rbx), %rax
movq %rax, 0x58(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/SethKasmann[P]clever-girl/src/state.h
// Function: State::addPiece(Color, PieceType, Square)
inline void State::addPiece(Color pColor, PieceType pPiece, Square pSquare)
{
    mPieces[pColor][pPiece] |= square_bb[pSquare];
    mOccupancy[pColor] |= square_bb[pSquare];
    mBoard[pSquare] = pPiece;
    mPieceIndex[pSquare] = mPieceCount[pColor][pPiece]++;
    mPieceList[pColor][pPiece][mPieceIndex[pSquare]] = pSquare;

    mPstScore[pColor][middle] += PieceSquareTable::getScore(pPiece, middle, pColor, pSquare);
    mPstScore[pColor][late] += PieceSquareTable::getScore(pPiece, late, pColor, pSquare);

    mKey ^= Zobrist::key(pColor, pPiece, pSquare);
}

// Assembly:
movl %ecx, %eax
leaq 0x112ced(%rip), %r9     # 0x126a80
movq (%r9,%rax,8), %r10
movl %esi, %esi
imulq $0x30, %rsi, %r11
addq %rdi, %r11
movl %edx, %r8d
orq %r10, 0x288(%r11,%r8,8)
movq (%r9,%rax,8), %r9
orq %r9, 0x78(%rdi,%rsi,8)
movl %edx, 0x188(%rdi,%rax,4)
imulq $0x18, %rsi, %rdx
addq %rdi, %rdx
movslq 0x2e8(%rdx,%r8,4), %r9
leal 0x1(%r9), %r10d
movl %r10d, 0x2e8(%rdx,%r8,4)
movl %r9d, 0x88(%rdi,%rax,4)
imulq $0xf0, %rsi, %rdx
addq %rdi, %rdx
imulq $0x28, %r8, %r10
addq %rdx, %r10
movl %ecx, 0x328(%r10,%r9,4)
movq %r8, %rcx
shlq $0xa, %rcx
leaq 0x567b(%rip), %rdx      # 0x19480
addq %rcx, %rdx
movq %rsi, %rcx
shlq $0x8, %rcx
addq %rdx, %rcx
movl (%rcx,%rax,4), %edx
movl 0x200(%rcx,%rax,4), %ecx
addl %edx, 0x318(%rdi,%rsi,8)
addl %ecx, 0x31c(%rdi,%rsi,8)
shlq $0x9, %r8
imulq $0xc00, %rsi, %rcx      # imm = 0xC00
addq 0xf154(%rip), %rcx      # 0x22f90
addq %r8, %rcx
movq (%rcx,%rax,8), %rax
xorq %rax, 0x18(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/SethKasmann[P]clever-girl/src/state.h
// Function: State::setCheckers()
inline
void State::setCheckers()
{
    mCheckers = getAttackersBB(getKingSquare(mUs), mThem);
    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:
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %eax
movl 0x4(%rdi), %edx
imulq $0xf0, %rax, %rax
movl 0x3f0(%rdi,%rax), %esi
callq 0x14644
movq %rax, 0x28(%rbx)
movl 0x4(%rbx), %eax
imulq $0xf0, %rax, %rcx
movl 0x3f0(%rbx,%rcx), %esi
shlq $0x9, %rax
addq 0xf124(%rip), %rax      # 0x22fa8
movq (%rax,%rsi,8), %rax
movq %rax, 0x38(%rbx)
leaq 0x2c4d(%rip), %rax      # 0x16ae0
movq (%rax,%rsi,8), %rax
movq %rax, 0x40(%rbx)
movq %rbx, %rdi
xorl %edx, %edx
callq 0xcd04
movq %rax, 0x48(%rbx)
movl 0x4(%rbx), %eax
imulq $0xf0, %rax, %rax
movl 0x3f0(%rbx,%rax), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xcd46
movq %rax, 0x50(%rbx)
orq 0x48(%rbx), %rax
movq %rax, 0x58(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/SethKasmann[P]clever-girl/src/state.h
// Function: State::getAttackBB(PieceType, Square, unsigned long long) const
inline
U64 State::getAttackBB(PieceType pPiece, Square pSquare, U64 pOcc) const
{
    assert(pPiece != pawn);
    assert(pPiece != king);
    return pPiece == knight ? getAttackBB<knight>(pSquare) :
           pPiece == bishop ? Bmagic(pSquare, pOcc)        :
           pPiece == rook   ? Rmagic(pSquare, pOcc)        :
                              Qmagic(pSquare, pOcc);
}

// Assembly:
movq %rcx, %rax
movl %edx, %edx
cmpl $0x3, %esi
je 0x14279
cmpl $0x2, %esi
je 0x1424e
cmpl $0x1, %esi
jne 0x142ad
leaq 0x2897(%rip), %rax      # 0x16ae0
movq (%rax,%rdx,8), %rax
retq
leaq 0x267b(%rip), %rcx      # 0x168d0
andq (%rcx,%rdx,8), %rax
leaq 0xefd0(%rip), %rcx      # 0x23230
leaq 0x2469(%rip), %rsi      # 0x166d0
imulq (%rsi,%rdx,8), %rax
movq (%rcx,%rdx,8), %rsi
leaq 0x2359(%rip), %rcx      # 0x165d0
jmp 0x142a2
leaq 0x2150(%rip), %rcx      # 0x163d0
andq (%rcx,%rdx,8), %rax
leaq 0xf1a5(%rip), %rcx      # 0x23430
leaq 0x1f3e(%rip), %rsi      # 0x161d0
imulq (%rsi,%rdx,8), %rax
movq (%rcx,%rdx,8), %rsi
leaq 0x1e2e(%rip), %rcx      # 0x160d0
movb (%rcx,%rdx,4), %cl
shrq %cl, %rax
movq (%rsi,%rax,8), %rax
retq
leaq 0xef7c(%rip), %rcx      # 0x23230
leaq 0x2615(%rip), %rsi      # 0x168d0
movq (%rsi,%rdx,8), %rsi
andq %rax, %rsi
leaq 0x2407(%rip), %rdi      # 0x166d0
imulq (%rdi,%rdx,8), %rsi
movq (%rcx,%rdx,8), %rdi
leaq 0x22f7(%rip), %rcx      # 0x165d0
movb (%rcx,%rdx,4), %cl
shrq %cl, %rsi
leaq 0xf14a(%rip), %r8       # 0x23430
leaq 0x20e3(%rip), %rcx      # 0x163d0
andq (%rcx,%rdx,8), %rax
leaq 0x1ed8(%rip), %rcx      # 0x161d0
imulq (%rcx,%rdx,8), %rax
leaq 0x1dcc(%rip), %rcx      # 0x160d0
movb (%rcx,%rdx,4), %cl
shrq %cl, %rax
movq (%r8,%rdx,8), %rcx
movq (%rcx,%rax,8), %rax
orq (%rdi,%rsi,8), %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/SethKasmann[P]clever-girl/src/state.h
// Function: State::allAttackers(Square) const
inline
U64 State::allAttackers(Square s) const
{
    return (getAttackBB<pawn>(s, mUs) & getPieceBB<pawn>(mThem))
         | (getAttackBB<pawn>(s, mThem) & getPieceBB<pawn>(mUs))
         | (getAttackBB<knight>(s) & getPieceBB<knight>())
         | (getAttackBB<bishop>(s) & (getPieceBB<bishop>() | getPieceBB<queen>()))
         | (getAttackBB<rook>(s) & (getPieceBB<rook>() | getPieceBB<queen>()))
         | (getAttackBB<king>(s) & getPieceBB<king>());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl (%rdi), %eax
movl 0x4(%rdi), %ecx
movl %esi, %r15d
imulq $0x30, %rax, %rdx
shlq $0x9, %rax
leaq 0x112d41(%rip), %rsi    # 0x127080
addq %rsi, %rax
imulq $0x30, %rcx, %rdi
movq 0x288(%rbx,%rdi), %rdi
andq (%rax,%r15,8), %rdi
shlq $0x9, %rcx
addq %rsi, %rcx
movq 0x288(%rbx,%rdx), %r12
andq (%rcx,%r15,8), %r12
orq %rdi, %r12
leaq 0x2771(%rip), %rax      # 0x16ae0
movq 0x2c0(%rbx), %r13
orq 0x290(%rbx), %r13
andq (%rax,%r15,8), %r13
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0xcd04
movq %rax, %r14
movq 0x2c8(%rbx), %rax
orq 0x298(%rbx), %rax
orq 0x2a8(%rbx), %rax
orq 0x2d8(%rbx), %rax
andq %rax, %r14
orq %r13, %r14
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0xcd46
movq 0x2d0(%rbx), %rcx
movq 0x2e0(%rbx), %rdx
orq 0x2a0(%rbx), %rcx
orq 0x2a8(%rbx), %rcx
orq 0x2d8(%rbx), %rcx
andq %rcx, %rax
leaq 0x28f5(%rip), %rcx      # 0x16ce0
orq 0x2b0(%rbx), %rdx
andq (%rcx,%r15,8), %rdx
orq %r14, %rax
orq %rdx, %rax
orq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/SethKasmann[P]clever-girl/src/state.h
// Function: State::removePiece(Color, PieceType, Square)
inline void State::removePiece(Color pColor, PieceType pPiece, Square pSquare)
{
    Square swap;
    int pieceCount;

    mPieces[pColor][pPiece] &= ~(square_bb[pSquare]);
    mOccupancy[pColor] &= ~(square_bb[pSquare]);
    mBoard[pSquare] = none;

    pieceCount = --mPieceCount[pColor][pPiece];

    swap = mPieceList[pColor][pPiece][pieceCount];
    mPieceIndex[swap] = mPieceIndex[pSquare];
    mPieceList[pColor][pPiece][mPieceIndex[swap]] = swap;
    mPieceList[pColor][pPiece][pieceCount] = no_sq;

    mPstScore[pColor][middle] -= PieceSquareTable::getScore(pPiece, middle, pColor, pSquare);
    mPstScore[pColor][late] -= PieceSquareTable::getScore(pPiece, late, pColor, pSquare);

    mKey ^= Zobrist::key(pColor, pPiece, pSquare);
}

// Assembly:
movl %ecx, %eax
leaq 0x11261d(%rip), %r8     # 0x126a80
movq (%r8,%rax,8), %r9
notq %r9
movl %esi, %ecx
imulq $0x30, %rcx, %rsi
addq %rdi, %rsi
movl %edx, %edx
andq %r9, 0x288(%rsi,%rdx,8)
movq (%r8,%rax,8), %rsi
notq %rsi
andq %rsi, 0x78(%rdi,%rcx,8)
movl $0x6, 0x188(%rdi,%rax,4)
imulq $0x18, %rcx, %rsi
addq %rdi, %rsi
movslq 0x2e8(%rsi,%rdx,4), %r8
leaq -0x1(%r8), %r9
movl %r9d, 0x2e8(%rsi,%rdx,4)
imulq $0xf0, %rcx, %rsi
addq %rdi, %rsi
imulq $0x28, %rdx, %r9
addq %rsi, %r9
movl 0x324(%r9,%r8,4), %esi
movslq 0x88(%rdi,%rax,4), %r10
movl %r10d, 0x88(%rdi,%rsi,4)
movl %esi, 0x328(%r9,%r10,4)
movl $0x40, 0x324(%r9,%r8,4)
movq %rdx, %rsi
shlq $0xa, %rsi
leaq 0x4f86(%rip), %r8       # 0x19480
addq %rsi, %r8
movq %rcx, %rsi
shlq $0x8, %rsi
addq %r8, %rsi
movl (%rsi,%rax,4), %r8d
movl 0x200(%rsi,%rax,4), %esi
subl %r8d, 0x318(%rdi,%rcx,8)
subl %esi, 0x31c(%rdi,%rcx,8)
shlq $0x9, %rdx
imulq $0xc00, %rcx, %rcx      # imm = 0xC00
addq 0xea5d(%rip), %rcx      # 0x22f90
addq %rdx, %rcx
movq (%rcx,%rax,8), %rax
xorq %rax, 0x18(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/SethKasmann[P]clever-girl/src/state.h
// Function: State::movePiece(Color, PieceType, Square, Square)
inline void State::movePiece(Color pColor, PieceType pPiece, Square pSrc, Square pDst)
{
    mPieces[pColor][pPiece] ^= square_bb[pSrc] | square_bb[pDst];
    mOccupancy[pColor] ^= square_bb[pSrc] | square_bb[pDst];
    mBoard[pDst] = pPiece;
    mBoard[pSrc] = none;
    mPieceIndex[pDst] = mPieceIndex[pSrc];
    mPieceList[pColor][pPiece][mPieceIndex[pDst]] = pDst;

    mPstScore[pColor][middle] -= PieceSquareTable::getScore(pPiece, middle, pColor, pSrc);
    mPstScore[pColor][late] -= PieceSquareTable::getScore(pPiece, late, pColor, pSrc);
    mPstScore[pColor][middle] += PieceSquareTable::getScore(pPiece, middle, pColor, pDst);
    mPstScore[pColor][late] += PieceSquareTable::getScore(pPiece, late, pColor, pDst);

    mKey ^= Zobrist::key(pColor, pPiece, pSrc, pDst);
}

// Assembly:
pushq %rbx
movl %ecx, %eax
leaq 0x112536(%rip), %r10    # 0x126a80
movl %r8d, %ecx
movq (%r10,%rcx,8), %r11
orq (%r10,%rax,8), %r11
movl %esi, %esi
imulq $0x30, %rsi, %rbx
addq %rdi, %rbx
movl %edx, %r9d
xorq %r11, 0x288(%rbx,%r9,8)
movq (%r10,%rcx,8), %r11
orq (%r10,%rax,8), %r11
xorq %r11, 0x78(%rdi,%rsi,8)
movl %edx, 0x188(%rdi,%rcx,4)
movl $0x6, 0x188(%rdi,%rax,4)
movslq 0x88(%rdi,%rax,4), %rdx
movl %edx, 0x88(%rdi,%rcx,4)
imulq $0xf0, %rsi, %r10
addq %rdi, %r10
imulq $0x28, %r9, %r11
addq %r10, %r11
movl %r8d, 0x328(%r11,%rdx,4)
movq %r9, %rdx
shlq $0xa, %rdx
leaq 0x4ec2(%rip), %r8       # 0x19480
addq %rdx, %r8
movq %rsi, %rdx
shlq $0x8, %rdx
addq %r8, %rdx
movl 0x318(%rdi,%rsi,8), %r8d
movl 0x31c(%rdi,%rsi,8), %r10d
subl (%rdx,%rax,4), %r8d
subl 0x200(%rdx,%rax,4), %r10d
addl (%rdx,%rcx,4), %r8d
movl %r8d, 0x318(%rdi,%rsi,8)
addl 0x200(%rdx,%rcx,4), %r10d
movl %r10d, 0x31c(%rdi,%rsi,8)
shlq $0x9, %r9
imulq $0xc00, %rsi, %rdx      # imm = 0xC00
addq 0xe97b(%rip), %rdx      # 0x22f90
addq %r9, %rdx
movq (%rdx,%rcx,8), %rcx
xorq (%rdx,%rax,8), %rcx
xorq %rcx, 0x18(%rdi)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/SethKasmann[P]clever-girl/src/state.h
// Function: State::getAttackersBB(Square, Color) const
inline
U64 State::getAttackersBB(Square s, Color c) const
{
    return (getAttackBB<pawn>(s, !c) &  getPieceBB< pawn >(c))
         | (getAttackBB<knight>(s)   &  getPieceBB<knight>(c))
         | (getAttackBB<bishop>(s)   & (getPieceBB<bishop>(c) | getPieceBB<queen>(c)))
         | (getAttackBB< rook >(s)   & (getPieceBB< rook >(c) | getPieceBB<queen>(c)));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
xorl %eax, %eax
testl %edx, %edx
sete %al
movl %esi, %ecx
shll $0x9, %eax
addq 0xe941(%rip), %rax      # 0x22fa8
movl %edx, %edx
imulq $0x30, %rdx, %r12
movq 0x288(%rdi,%r12), %r15
andq (%rax,%rcx,8), %r15
movq 0x290(%rdi,%r12), %r13
leaq 0x2458(%rip), %rax      # 0x16ae0
andq (%rax,%rcx,8), %r13
xorl %edx, %edx
callq 0xcd04
movq %rax, %r14
movq 0x2a8(%rbx,%r12), %rax
orq 0x298(%rbx,%r12), %rax
andq %rax, %r14
orq %r13, %r14
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0xcd46
movq 0x2a8(%rbx,%r12), %rcx
orq 0x2a0(%rbx,%r12), %rcx
andq %rcx, %rax
orq %r14, %rax
orq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/SethKasmann[P]clever-girl/src/test.cpp
// Function: ccrTest()
void ccrTest()
{
	for (int i = 0; i < ccrTotalTests; ++i)
	{
		State s(ccrFen[i]);
		history.clear();
		history.push(std::make_pair(nullMove, s.getKey()));
		SearchInfo si;
		si.moveTime = allocate_time(10000000, 0, 40);
		si.clock.set();
		// Clear the game list.
		ttable.clear();
		lineManager.clearPv();

		int score;
		for (int d = 1; d < 9; ++d)
		{
			score = scout_search(s, si, d, 0, Neg_inf, Pos_inf, true, false, true);
			if (si.quit)
				break;
		}

		Move pv = lineManager.getPvMove();

		std::cout << s;
		std::cout << "bestmove " << getSrc(pv) << toString(pv) << std::endl;
		std::cout << ccrResults[i] << '\n';
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x598, %rsp            # imm = 0x598
leaq 0x90(%rsp), %r14
leaq 0x10(%rsp), %r12
pushq $0x1
popq %rbx
xorl %ebp, %ebp
cmpq $0x19, %rbp
je 0x1489f
movq %rbp, 0x8(%rsp)
shlq $0x5, %rbp
leaq 0x20d093(%rip), %rax    # 0x2217b0
leaq (%rax,%rbp), %rsi
movq %r14, %rdi
callq 0x12a50
leaq 0x1d3f80(%rip), %r15    # 0x1e86b0
movq %r15, %rdi
callq 0x11042
movq 0xa8(%rsp), %rax
andw $0x0, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x1121a
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movabsq $0x3200000000, %rax     # imm = 0x3200000000
movq %rax, 0x20(%rsp)
andq $0x0, 0x2c(%rsp)
xorl %ecx, %ecx
movb %cl, 0x4a(%rsp)
leaq 0x50(%rsp), %rax
movups %xmm0, (%rax)
andq $0x0, 0x10(%rax)
movb %cl, -0x8(%rax)
andq $0x0, -0x10(%rax)
movq $0x7a120, 0x38(%rsp)    # imm = 0x7A120
callq 0x4050
movq %rax, 0x40(%rsp)
leaq 0x20de58(%rip), %rdi    # 0x222600
callq 0x1282a
leaq 0x1cef3c(%rip), %rdi    # 0x1e36f0
callq 0xcee6
movl %ebx, %r13d
cmpl $0x9, %r13d
je 0x147f4
subq $0x8, %rsp
movq %r14, %rdi
movq %r12, %rsi
movl %r13d, %edx
xorl %ecx, %ecx
movl $0xffff3cb0, %r8d       # imm = 0xFFFF3CB0
movl $0xc350, %r9d           # imm = 0xC350
pushq %rbx
pushq $0x0
pushq %rbx
callq 0x11aee
addq $0x20, %rsp
incl %r13d
cmpb $0x0, 0x4a(%rsp)
je 0x147bc
leaq 0x1ceef5(%rip), %rdi    # 0x1e36f0
xorl %esi, %esi
callq 0xce9a
movl %eax, %r13d
movq 0xe78c(%rip), %rdi      # 0x22f98
movq %r14, %rsi
callq 0x13a3f
movq 0xe77d(%rip), %rdi      # 0x22f98
leaq 0x4aa0(%rip), %rsi      # 0x192c2
callq 0x4240
movl %r13d, %esi
andl $0x3f, %esi
movq %rax, %rdi
callq 0x4180
movq %rax, %r15
movzwl %r13w, %esi
leaq 0x70(%rsp), %r13
movq %r13, %rdi
callq 0xd08b
movq %r15, %rdi
movq %r13, %rsi
callq 0x41e0
movq %rax, %rdi
callq 0x4120
movq %r13, %rdi
callq 0x4418
leaq 0x20d265(%rip), %rax    # 0x221ad0
addq %rax, %rbp
movq 0xe723(%rip), %rdi      # 0x22f98
movq %rbp, %rsi
callq 0x41e0
movq %rax, %rdi
pushq $0xa
popq %rsi
callq 0x4290
leaq 0x50(%rsp), %rdi
callq 0x148dc
movq 0x8(%rsp), %rbp
incq %rbp
jmp 0x14703
addq $0x598, %rsp            # imm = 0x598
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x148c6
jmp 0x148c6
movq %rax, %r14
leaq 0x70(%rsp), %rdi
callq 0x4418
jmp 0x148c9
jmp 0x148c6
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x148dc
movq %r14, %rdi
callq 0x43d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x880, %rsp            # imm = 0x880
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x8(%rbx), %rsi
addq %rdi, %rsi
leaq 0x28(%rsp), %r14
movb $0x2c, (%r14)
movq %r14, %rdx
callq 0x15780
movq (%rbx), %rdx
addq 0x8(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4070
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0xdbd4
leaq 0x8(%rsp), %r15
movq %r14, %rdi
callq 0xd260
testq %rax, %rax
je 0x14c22
movq %r14, %rdi
callq 0xd280
movl %eax, %ebp
movzwl %ax, %esi
movq %r15, %rdi
callq 0xd08b
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1550c
movl %eax, %r12d
movq %r15, %rdi
callq 0x4418
testb %r12b, %r12b
jne 0x14c24
movq %r14, %rdi
callq 0xd260
testq %rax, %rax
jne 0x14bd8
xorl %ebp, %ebp
leaq 0x858(%rsp), %rdi
callq 0xd138
movl %ebp, %eax
addq $0x880, %rsp            # imm = 0x880
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x14c45
movq %rax, %rbx
leaq 0x858(%rsp), %rdi
callq 0xd138
movq %rbx, %rdi
callq 0x43d0
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x62be(%rip), %rsi      # 0x1b466
callq 0x1270d
testb %al, %al
je 0x151d3
pushq $0xa
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x156a1
leaq 0x20d43b(%rip), %rdi    # 0x222600
movl %eax, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x15672
leaq 0x6287(%rip), %rsi      # 0x1b461
movq %r14, %rdi
callq 0x1270d
testb %al, %al
je 0x151f9
leaq 0x20d413(%rip), %rdi    # 0x222600
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1282a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/SethKasmann[P]clever-girl/src/timer.h
// Function: allocate_time(int, int, int)
inline int64_t allocate_time(int time_left, int moves, int moves_to_go)
{
    int64_t num_moves, target, time;
    float factor;

    num_moves = std::min(moves, 10);
    factor = 2 - num_moves / 10.0;
    target = time_left / (moves_to_go ? moves_to_go : 30);
    time = factor * target;
    return time > min_time ? time : min_time;
}

// Assembly:
cmpl $0xa, %esi
pushq $0xa
popq %rax
cmovll %esi, %eax
cvtsi2sd %eax, %xmm0
divsd 0x5e63(%rip), %xmm0     # 0x1b3c8
addsd 0x5e63(%rip), %xmm0     # 0x1b3d0
cvtsd2ss %xmm0, %xmm0
testl %edx, %edx
pushq $0x1e
popq %rcx
cmovnel %edx, %ecx
movl %edi, %eax
cltd
idivl %ecx
cvtsi2ss %eax, %xmm1
mulss %xmm0, %xmm1
cvttss2si %xmm1, %rcx
cmpq $0x1f5, %rcx            # imm = 0x1F5
movl $0x1f4, %eax            # imm = 0x1F4
cmovgeq %rcx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
leaq 0x8(%rsp), %r15
movl $0xc8, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x4140
movq %r14, %rdi
movq %r15, %rsi
callq 0x111f6
leaq 0x40e0(%rbx), %rdi
movl $0x4000, %edx           # imm = 0x4000
xorl %esi, %esi
callq 0x4140
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x155ee
movq %rax, 0x8(%rbx)
addq $0xe0, %rbx
xorl %r15d, %r15d
leaq 0x8(%rsp), %r14
cmpq $0x4000, %r15           # imm = 0x4000
je 0x15623
leaq (%rbx,%r15), %rdi
movl $0x1, 0x8(%rsp)
movq %r14, %rsi
callq 0x1116e
addq $0x100, %r15            # imm = 0x100
jmp 0x155fd
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movl $0x66c947, %edi         # imm = 0x66C947
callq 0x4230
leaq 0x23e89e(%rip), %rbx    # 0x254260
xorl %r14d, %r14d
cmpq $0x6, %r14
je 0x159fb
xorl %r15d, %r15d
cmpq $0x40, %r15
je 0x159ef
callq 0x15994
movq %rax, -0xc00(%rbx,%r15,8)
callq 0x15994
movq %rax, (%rbx,%r15,8)
incq %r15
jmp 0x159ce
incq %r14
addq $0x200, %rbx            # imm = 0x200
jmp 0x159c5
xorl %ebx, %ebx
leaq 0x23f45c(%rip), %r14    # 0x254e60
cmpq $0x40, %rbx
je 0x15a19
callq 0x15994
movq %rax, (%rbx,%r14)
addq $0x8, %rbx
jmp 0x15a04
xorl %ebx, %ebx
leaq 0x23f47e(%rip), %r14    # 0x254ea0
callq 0x15994
cmpq $0x80, %rbx
je 0x15a3a
movq %rax, (%rbx,%r14)
addq $0x8, %rbx
jmp 0x15a22
movq %rax, 0x23f4df(%rip)    # 0x254f20
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/WeihuaZhu[P]hpc_prog2/main.cpp
// Function: print_usage()
void print_usage()
{
    std::cerr << "Usage: ./jacobi <input_A> <input_b> <output_x>" << std::endl;
    std::cerr << "                  Reads the input A and b from the given binary files and" << std::endl;
    std::cerr << "                  writes the result to the given file in binary format." << std::endl;
    std::cerr << "       ./jacobi -n <n> [-d <difficulty>]" << std::endl;
    std::cerr << "                  Creates random input of size <n> (A has size n-by-n) of" << std::endl;
    std::cerr << "                  the given difficulty, a value between 0.0 (easiest) and 1.0" << std::endl;
    std::cerr << "                  (optional, default = 0.5)." << std::endl;
}

// Assembly:
pushq %rbx
movq 0x578d(%rip), %rbx      # 0x7fe8
leaq 0x27fe(%rip), %rsi      # 0x5060
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x2140
leaq 0x2816(%rip), %rsi      # 0x508f
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x2140
leaq 0x2849(%rip), %rsi      # 0x50d9
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x2140
leaq 0x287a(%rip), %rsi      # 0x5121
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x2140
leaq 0x288c(%rip), %rsi      # 0x514a
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x2140
leaq 0x28bf(%rip), %rsi      # 0x5194
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x2140
leaq 0x28f6(%rip), %rsi      # 0x51e2
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
popq %rbx
jmp 0x2140
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x438, %rsp            # imm = 0x438
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x230(%rsp), %r15
pushq $0x6
popq %rdx
movq %r15, %rdi
callq 0x2420
movq (%r15), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x250(%rsp,%rax)
jne 0x32f8
leaq 0x2a8(%rsp), %rdi
callq 0x2080
testb %al, %al
je 0x32f8
leaq 0x230(%rsp), %rdi
callq 0x23d0
movq %rax, %r15
leaq 0x230(%rsp), %rdi
callq 0x2060
leaq 0x28(%rsp), %rdi
pushq $0x4
popq %rdx
movq %r14, %rsi
callq 0x2420
movq %r15, %rsi
shrq $0x3, %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x3190
movq (%rbx), %rsi
leaq 0x28(%rsp), %rdi
movq %r15, %rdx
callq 0x22c0
leaq 0x28(%rsp), %rdi
callq 0x2090
leaq 0x230(%rsp), %rdi
callq 0x2090
movq %rbx, %rax
addq $0x438, %rsp            # imm = 0x438
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x2150
movq %rax, %rbx
leaq 0x201e(%rip), %rsi      # 0x5328
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x31ee
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq %r14, %rdx
callq 0x36d7
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x23a0
xorl %ebp, %ebp
movq 0x4cac(%rip), %rsi      # 0x7ff0
movq 0x4c75(%rip), %rdx      # 0x7fc0
movq %rbx, %rdi
callq 0x23c0
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x2120
jmp 0x3368
movq %rax, %r14
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x2120
testb %bpl, %bpl
jne 0x33a1
jmp 0x33a9
movq %rax, %r14
movq %rbx, %rdi
callq 0x3514
jmp 0x3389
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x2090
jmp 0x33a9
jmp 0x3399
jmp 0x3399
movq %rax, %r14
jmp 0x33a9
movq %rax, %r14
movq %rbx, %rdi
callq 0x21a0
leaq 0x230(%rsp), %rdi
callq 0x2090
movq %r14, %rdi
callq 0x23e0
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x48(%rsp), %r15
pushq $0x4
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x2270
movq (%r15), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x68(%rsp,%rax)
jne 0x3439
leaq 0xb8(%rsp), %rdi
callq 0x2080
testb %al, %al
je 0x3439
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
subq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0x22e0
leaq 0x48(%rsp), %rdi
callq 0x2330
leaq 0x48(%rsp), %rdi
callq 0x2340
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x2150
movq %rax, %rbx
leaq 0x1edd(%rip), %rsi      # 0x5328
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x31ee
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq %r14, %rdx
callq 0x36d7
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x23a0
xorl %ebp, %ebp
movq 0x4b6b(%rip), %rsi      # 0x7ff0
movq 0x4b34(%rip), %rdx      # 0x7fc0
movq %rbx, %rdi
callq 0x23c0
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x2120
jmp 0x34a9
movq %rax, %r14
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x2120
testb %bpl, %bpl
jne 0x34bd
jmp 0x34ca
movq %rax, %r14
movq %rbx, %rdi
callq 0x21a0
jmp 0x34ca
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x2340
movq %r14, %rdi
callq 0x23e0
// File: /workspace/github_cpp_makefile_star2_O2/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
leaq 0x435d9(%rip), %r14     # 0x646c0
leaq 0x25f42(%rip), %rsi     # 0x47030
movq %r14, %rdi
callq 0x6770
leaq 0x8(%rsp), %rdx
movl $0x1, (%rdx)
leaq 0x1b3d9(%rip), %rsi     # 0x3c4e1
movq %r14, %rdi
callq 0x2133b
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x213e4
pushq $0x32
popq %rsi
movq %r14, %rdi
callq 0x21430
leaq 0x8(%rsp), %rdi
callq 0x215f6
xorl %eax, %eax
addq $0x6c0, %rsp            # imm = 0x6C0
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x215f6
movq %rbx, %rdi
callq 0x66e0
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH19_SpecializedToolsAndTechniques/examples/memFN-bind.cc
// Function: main
int main()
{
    vector<string> svec = {"hi", "bye"};
    // bind each string in the range to the implicit first argument to empty
    auto it = find_if(svec.begin(), svec.end(), 
	                  bind(&string::empty, _1));
    if (it == svec.end()) 
		cout << "worked" << endl; 
	else 
		cout << "failed"  << endl;
	auto f =  bind(&string::empty, _1);
	f(*svec.begin()); // ok: argument is a string f will use .* to call empty
	f(&svec[0]); // ok: argument is a pointer to string f will use .-> to call empty
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
leaq 0xd73(%rip), %rsi       # 0x2004
leaq -0x70(%rbp), %rdi
leaq -0x13(%rbp), %rdx
callq 0x1050
leaq -0x50(%rbp), %rdi
leaq 0xd5e(%rip), %rsi       # 0x2007
leaq -0x12(%rbp), %rdx
callq 0x1050
leaq -0x30(%rbp), %rdi
leaq -0x70(%rbp), %rsi
pushq $0x2
popq %rdx
leaq -0x11(%rbp), %rcx
callq 0x138e
pushq $0x20
popq %rbx
leaq (%rbx,%rbp), %rdi
addq $-0x70, %rdi
callq 0x1070
addq $-0x20, %rbx
cmpq $-0x20, %rbx
jne 0x12c9
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq 0x2ce9(%rip), %rax      # 0x3fd8
leaq -0x88(%rbp), %rdx
movq %rax, (%rdx)
andq $0x0, 0x8(%rdx)
callq 0x13c7
cmpq -0x28(%rbp), %rax
leaq 0xcfd(%rip), %rax       # 0x200b
leaq 0xcfd(%rip), %rsi       # 0x2012
cmoveq %rax, %rsi
movq 0x2cb0(%rip), %rdi      # 0x3fd0
callq 0x10c0
movq %rax, %rdi
callq 0x1080
leaq -0x30(%rbp), %rdi
callq 0x13e4
xorl %eax, %eax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x1379
movq %rax, %rbx
pushq $0x20
popq %r14
leaq (%r14,%rbp), %rdi
addq $-0x70, %rdi
callq 0x1070
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x134d
jmp 0x1385
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x1070
jmp 0x1385
movq %rax, %rbx
jmp 0x1385
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x13e4
movq %rbx, %rdi
callq 0x1130
nop
// File: /workspace/github_cpp_makefile_star2_O2/zengfenfei[P]codility/src/MaxCounters.cpp
// Function: solution(int, std::vector<int, std::allocator<int>>&)
vector<int> solution(int N, vector<int> &A) {
	vector<int> counters(N, 0);
	int max = 0;
	int lastMax = 0;
	for (int i = 0; i < A.size(); i++) {
		int op = A[i];
		if (op >= 1 && op <= N) {
			int count = counters[op - 1];
			if (count < lastMax) {
				count = lastMax;
			}
			count++;
			if (count > max) {
				max = count;
			}
			counters[op - 1] = count;
		} else if (op == N + 1) {
			lastMax = max;
		}
	}
	for (int i = 0; i < N; i++) {
		if (counters[i] < lastMax) {
			counters[i] = lastMax;
		}
	}
	return counters;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r12
movl %esi, %r14d
movq %rdi, %rbx
movslq %esi, %r15
leaq -0x28(%rbp), %rdx
andl $0x0, (%rdx)
leaq -0x21(%rbp), %rcx
movq %r15, %rsi
callq 0x13cc
movq (%r12), %rcx
movq 0x8(%r12), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
movq (%rbx), %rsi
incl %r15d
xorl %edi, %edi
xorl %r8d, %r8d
xorl %eax, %eax
cmpq %rdi, %rdx
je 0x12bd
movl (%rcx,%rdi,4), %r9d
testl %r9d, %r9d
setle %r10b
cmpl %r14d, %r9d
setg %r11b
orb %r10b, %r11b
je 0x129c
cmpl %r15d, %r9d
cmovel %r8d, %eax
jmp 0x12b8
movl -0x4(%rsi,%r9,4), %r10d
cmpl %eax, %r10d
cmovlel %eax, %r10d
leal 0x1(%r10), %r11d
cmpl %r8d, %r10d
cmovgel %r11d, %r8d
movl %r11d, -0x4(%rsi,%r9,4)
incq %rdi
jmp 0x1277
movq (%rbx), %rcx
xorl %edx, %edx
testl %r14d, %r14d
cmovlel %edx, %r14d
cmpq %rdx, %r14
je 0x12db
cmpl %eax, (%rcx,%rdx,4)
jge 0x12d6
movl %eax, (%rcx,%rdx,4)
incq %rdx
jmp 0x12c9
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/zengfenfei[P]codility/src/MaxCounters.cpp
// Function: main
int main() {
	vector<int> A(7);
	A[0] = 3;
	A[1] = 4;
	A[2] = 4;
	A[3] = 6;
	A[4] = 1;
	A[5] = 4;
	A[6] = 4;
	vector<int> counters = solution(5, A);
	for (int i = 0; i < counters.size(); i++) {
		cout << counters[i] << ',';
	}
	cout << '\n';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
leaq -0x48(%rbp), %rbx
pushq $0x7
popq %rsi
leaq -0x30(%rbp), %rdx
movq %rbx, %rdi
callq 0x142c
movq (%rbx), %rax
movaps 0xcfb(%rip), %xmm0      # 0x2010
movups %xmm0, (%rax)
movabsq $0x400000001, %rcx      # imm = 0x400000001
movq %rcx, 0x10(%rax)
movl $0x4, 0x18(%rax)
leaq -0x30(%rbp), %rdi
pushq $0x5
popq %rsi
movq %rbx, %rdx
callq 0x122c
xorl %r15d, %r15d
movq 0x2c92(%rip), %rbx      # 0x3fd8
pushq $0x2c
popq %r14
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r15, %rcx
jbe 0x137a
movl (%rax,%r15,4), %esi
movq %rbx, %rdi
callq 0x10d0
movq %rax, %rdi
movl %r14d, %esi
callq 0x10b0
incq %r15
jmp 0x134a
movq 0x2c57(%rip), %rdi      # 0x3fd8
pushq $0xa
popq %rsi
callq 0x10b0
leaq -0x30(%rbp), %rdi
callq 0x14b8
leaq -0x48(%rbp), %rdi
callq 0x14b8
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x13af
movq %rax, %rbx
jmp 0x13bb
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x14b8
leaq -0x48(%rbp), %rdi
callq 0x14b8
movq %rbx, %rdi
callq 0x10e0
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH04_Expressions/examples/prec.cc
// Function: main
int main() 
{
	cout << 6 + 3 * 4 / 2 + 2 << endl;

	// parentheses in this expression match default precedence and associativity
	cout << ((6 + ((3 * 4) / 2)) + 2) << endl; // prints 14

	int temp = 3 * 4;         // 12
	int temp2 = temp / 2;     // 6
	int temp3 = temp2 + 6;    // 12
	int result = temp3 + 2;   // 14
	cout << result << endl;

	// parentheses result in alternative groupings
	cout << (6 + 3) * (4 / 2 + 2) << endl;     // prints 36
	cout << ((6 + 3) * 4) / 2 + 2 << endl;     // prints 20
	cout << 6 + 3 * 4 / (2 + 2) << endl;       // prints 9

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x2e1e(%rip), %rbx      # 0x3fd8
pushq $0xe
popq %r14
movq %rbx, %rdi
movl %r14d, %esi
callq 0x1060
movq %rax, %rdi
callq 0x1030
movq %rbx, %rdi
movl %r14d, %esi
callq 0x1060
movq %rax, %rdi
callq 0x1030
movq %rbx, %rdi
movl %r14d, %esi
callq 0x1060
movq %rax, %rdi
callq 0x1030
pushq $0x24
popq %rsi
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
pushq $0x14
popq %rsi
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
pushq $0x9
popq %rsi
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/minimind[P]simple-graph/unittest/catch.hpp
// Function: Catch::AutoReg::registerTestCase(Catch::ITestCase*, char const*, Catch::NameAndDesc const&, Catch::SourceLineInfo const&)
void AutoReg::registerTestCase( ITestCase* testCase,
                                    char const* classOrQualifiedMethodName,
                                    NameAndDesc const& nameAndDesc,
                                    SourceLineInfo const& lineInfo ) {

        getMutableRegistryHub().registerTest
            ( makeTestCase( testCase,
                            extractClassName( classOrQualifiedMethodName ),
                            nameAndDesc.name,
                            nameAndDesc.description,
                            lineInfo ) );
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r15
callq 0x9ef3
movq %rax, %rbx
leaq 0x70(%rsp), %rbp
leaq 0xf(%rsp), %rdx
movq %rbp, %rdi
movq %r13, %rsi
callq 0xd4fa
leaq 0x50(%rsp), %rdi
movq %rbp, %rsi
callq 0xd423
movq (%r12), %rsi
leaq 0x30(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0xd4fa
movq 0x8(%r12), %rsi
leaq 0x10(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0xd4fa
leaq 0x90(%rsp), %rdi
leaq 0x50(%rsp), %rdx
leaq 0x30(%rsp), %rcx
leaq 0x10(%rsp), %r8
movq %r15, %rsi
movq %r14, %r9
callq 0x9f06
movq (%rbx), %rax
leaq 0x90(%rsp), %rsi
movq %rbx, %rdi
callq *0x18(%rax)
leaq 0x90(%rsp), %rdi
callq 0xd536
leaq 0x10(%rsp), %rdi
callq 0x91a0
leaq 0x30(%rsp), %rdi
callq 0x91a0
leaq 0x50(%rsp), %rdi
callq 0x91a0
leaq 0x70(%rsp), %rdi
callq 0x91a0
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0xd536
jmp 0x9eb3
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x91a0
jmp 0x9ec2
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x91a0
jmp 0x9ed1
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x91a0
jmp 0x9ee0
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x91a0
movq %rbx, %rdi
callq 0x9610
// File: /workspace/github_cpp_makefile_star2_O2/minimind[P]simple-graph/unittest/catch.hpp
// Function: Catch::(anonymous namespace)::getTheRegistryHub()
inline RegistryHub*& getTheRegistryHub() {
            static RegistryHub* theRegistryHub = NULL;
            if( !theRegistryHub )
                theRegistryHub = new RegistryHub();
            return theRegistryHub;
        }

// Assembly:
cmpq $0x0, 0x4226c(%rip)     # 0x4c450
je 0xa1e7
retq
pushq %rax
movl $0xd8, %edi
callq 0x93a0
leaq 0x40fe7(%rip), %rcx     # 0x4b1e0
movq %rcx, (%rax)
leaq 0x4102d(%rip), %rcx     # 0x4b230
movq %rcx, 0x8(%rax)
leaq 0x4022a(%rip), %rcx     # 0x4a438
movq %rcx, 0x10(%rax)
leaq 0x20(%rax), %rcx
andl $0x0, 0x20(%rax)
andq $0x0, 0x28(%rax)
movq %rcx, 0x30(%rax)
movq %rcx, 0x38(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x50(%rax)
movups %xmm0, 0x60(%rax)
movups %xmm0, 0x70(%rax)
leaq 0x411df(%rip), %rcx     # 0x4b420
movq %rcx, 0x80(%rax)
leaq 0x90(%rax), %rcx
andl $0x0, 0x90(%rax)
andq $0x0, 0x98(%rax)
movq %rcx, 0xa0(%rax)
movq %rcx, 0xa8(%rax)
andq $0x0, 0xb0(%rax)
leaq 0x411ed(%rip), %rcx     # 0x4b468
movq %rcx, 0xb8(%rax)
movups %xmm0, 0xc0(%rax)
andq $0x0, 0xd0(%rax)
movq %rax, 0x421b8(%rip)     # 0x4c450
addq $0x8, %rsp
retq