LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/attacks.cpp
// Function: nnchesslib::Attacks::getBishopAttacksRays(int, unsigned long long)
U64 Attacks::getBishopAttacksRays(int sq, U64 blockers)
{
    U64 combinedAttacks = (U64)0;

    // north west attacks
    U64 bishopAttacksNorthWest = Rays::getRay(NORTH_WEST, sq);
    U64 northWestBlocker = bishopAttacksNorthWest & blockers;
    if(blockers)
    {
        int index = bitScanForward(northWestBlocker);
        bishopAttacksNorthWest ^= Rays::getRay(NORTH_WEST, index);
    }
    combinedAttacks |= bishopAttacksNorthWest;

    // north east attacks
    // this is different because above method did not work properly.
    combinedAttacks |= Rays::getRay(NORTH_EAST, sq);
    if (Rays::getRay(NORTH_EAST, sq) & blockers) {
        combinedAttacks &= ~(Rays::getRay(NORTH_EAST, bitScanForward(Rays::getRay(NORTH_EAST, sq) & blockers)));
    }

    // south east attacks
    U64 bishopAttacksSouthEast = Rays::getRay(SOUTH_EAST, sq);
    U64 southEastBlocker = bishopAttacksSouthEast & blockers;
    if(blockers)
    {
        int index = bitScanReverse(southEastBlocker);
        bishopAttacksSouthEast ^= Rays::getRay(SOUTH_EAST, index);
    }
    combinedAttacks |= bishopAttacksSouthEast;

    // south west attacks
    U64 bishopAttacksSouthWest = Rays::getRay(SOUTH_WEST, sq);
    U64 southWestBlocker = bishopAttacksSouthWest & blockers;
    if(blockers)
    {
        int index = bitScanReverse(southWestBlocker);
        bishopAttacksSouthWest ^= Rays::getRay(SOUTH_WEST, index);
    }
    combinedAttacks |= bishopAttacksSouthWest;

    return combinedAttacks;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
pushq $0x5
popq %rdi
movl %r14d, %esi
callq 0x7493
movq %rax, %r12
testq %rbx, %rbx
je 0x2d1d
movq %r12, %rdi
andq %rbx, %rdi
callq 0x755c
pushq $0x5
popq %rdi
movl %eax, %esi
callq 0x7493
xorq %rax, %r12
pushq $0x4
popq %r13
movl %r13d, %edi
movl %r14d, %esi
callq 0x7493
movq %rax, %r15
orq %r12, %r15
movl %r13d, %edi
movl %r14d, %esi
callq 0x7493
testq %rbx, %rax
je 0x2d6c
pushq $0x4
popq %r12
movl %r12d, %edi
movl %r14d, %esi
callq 0x7493
andq %rbx, %rax
movq %rax, %rdi
callq 0x755c
movl %r12d, %edi
movl %eax, %esi
callq 0x7493
notq %rax
andq %rax, %r15
pushq $0x6
popq %rdi
movl %r14d, %esi
callq 0x7493
movq %rax, %r12
testq %rbx, %rbx
je 0x2d97
movq %r12, %rdi
andq %rbx, %rdi
callq 0x7570
pushq $0x6
popq %rdi
movl %eax, %esi
callq 0x7493
xorq %rax, %r12
pushq $0x7
popq %rdi
movl %r14d, %esi
callq 0x7493
movq %rax, %r14
testq %rbx, %rbx
je 0x2dc2
andq %r14, %rbx
movq %rbx, %rdi
callq 0x7570
pushq $0x7
popq %rdi
movl %eax, %esi
callq 0x7493
xorq %rax, %r14
orq %r15, %r12
orq %r14, %r12
movq %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/niekh1234[P]nnchesslib/attacks.cpp
// Function: nnchesslib::Attacks::getSlidingAttacks(int, nnchesslib::PieceType, unsigned long long)
U64 Attacks::getSlidingAttacks(int sq, PieceType p, U64 blockers)
{
    assert(p == 2 || p == 3 || p == 4);
    switch(p)
    {
        case BISHOP:
            return getBishopAttacks(sq, blockers);
            break;
        case ROOK:
            return getRookAttacks(sq, blockers);
            break;
        case QUEEN:
            return (getRookAttacks(sq, blockers) | getBishopAttacks(sq, blockers));
            break;
        default:
            return (U64)0;
            break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %edi, %r14d
cmpl $0x2, %esi
je 0x2f1d
cmpl $0x3, %esi
je 0x2f08
cmpl $0x4, %esi
jne 0x2f32
movl %r14d, %edi
movq %rbx, %rsi
callq 0x2dda
movq %rax, %r15
movl %r14d, %edi
movq %rbx, %rsi
callq 0x2e24
orq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %r14d, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2dda
movl %r14d, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2e24
leaq 0x5170(%rip), %rdi      # 0x80a9
leaq 0x5118(%rip), %rsi      # 0x8058
leaq 0x517d(%rip), %rcx      # 0x80c4
movl $0x107, %edx            # imm = 0x107
callq 0x2100
nop
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/bitboard.cpp
// Function: nnchesslib::BitBoard::set(int, bool)
void BitBoard::set(int square, bool set)
{
    assert(0 <= square && square <= 63);
    if(set)
        board |= ((U64)1 << square);
    else
        board &= ~((U64)1 << square);
}

// Assembly:
cmpl $0x40, %esi
jae 0x3082
pushq $0x1
popq %rax
movl %esi, %ecx
shlq %cl, %rax
testb %dl, %dl
je 0x3078
orq (%rdi), %rax
jmp 0x307e
notq %rax
andq (%rdi), %rax
movq %rax, (%rdi)
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x54a3(%rip), %rdi      # 0x8530
leaq 0x54b8(%rip), %rsi      # 0x854c
leaq 0x54be(%rip), %rcx      # 0x8559
pushq $0x1c
popq %rdx
callq 0x2100
nop
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/bitboard.cpp
// Function: nnchesslib::BitBoard::printDebug()
void BitBoard::printDebug()
{
    std::string boardString = getBoardString();
    std::cout<<"---------------"<<std::endl;
    for (int y = 0; y <= 7; y++)
    {
        for (int x = 0; x <= 7; x++)
        {
            // if (boardString[63 - (8*y+x)] == '1')
            if (boardString[8*y+7-x] == '1')
                std::cout << "1 ";
            else
                std::cout << ". ";
        }
        std::cout << std::endl;
    }
    std::cout<<"---------------"<<std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rsi
leaq -0x50(%rbp), %rdi
callq 0x3040
movq 0x8e4c(%rip), %rdi      # 0xbfd0
leaq 0x548d(%rip), %rsi      # 0x8618
callq 0x2180
movq %rax, %rdi
callq 0x20c0
xorl %r14d, %r14d
movq 0x8e2e(%rip), %rbx      # 0xbfd0
leaq 0x547f(%rip), %r12      # 0x8628
leaq 0x55c3(%rip), %r13      # 0x8773
xorl %eax, %eax
cmpq $0x8, %rax
je 0x31fe
movq %rax, -0x30(%rbp)
pushq $0x8
popq %rax
movq %rax, %r15
subq $0x1, %r15
jb 0x31e9
movq -0x50(%rbp), %rcx
addq %r14, %rcx
cmpb $0x31, -0x1(%rax,%rcx)
movq %r12, %rsi
je 0x31dc
movq %r13, %rsi
movq %rbx, %rdi
callq 0x2180
movq %r15, %rax
jmp 0x31c2
movq %rbx, %rdi
callq 0x20c0
movq -0x30(%rbp), %rax
incq %rax
addq $0x8, %r14
jmp 0x31b2
movq 0x8dcb(%rip), %rdi      # 0xbfd0
leaq 0x540c(%rip), %rsi      # 0x8618
callq 0x2180
movq %rax, %rdi
callq 0x20c0
leaq -0x50(%rbp), %rdi
callq 0x2308
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3235
jmp 0x3235
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x2308
movq %rbx, %rdi
callq 0x2290
nop
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/board.cpp
// Function: nnchesslib::ChessBoard::ChessBoard(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
ChessBoard::ChessBoard(std::string fen)
{
    std::string valid_fen;

    if (!isValidFen(fen))
        valid_fen = STARTING_FEN;
    else
        valid_fen = fen;

    generateBitBoards(valid_fen);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x5686
leaq 0x68(%rbx), %rdi
callq 0x5686
leaq -0x28(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x78(%rbp), %rdi
movq %r14, %rsi
callq 0x2200
leaq -0x78(%rbp), %rsi
movq %rbx, %rdi
callq 0x37c4
movl %eax, %r15d
leaq -0x78(%rbp), %rdi
callq 0x2308
leaq 0x28a6b6(%rip), %rsi    # 0x28de08
testb %r15b, %r15b
cmovneq %r14, %rsi
leaq -0x38(%rbp), %rdi
callq 0x20e0
leaq -0x58(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x2200
leaq -0x58(%rbp), %rsi
movq %rbx, %rdi
callq 0x333c
leaq -0x58(%rbp), %rdi
callq 0x2308
leaq -0x38(%rbp), %rdi
callq 0x2308
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
jmp 0x37a8
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x2308
jmp 0x37b2
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x2308
movq %rbx, %rdi
callq 0x2290
nop
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/board.cpp
// Function: nnchesslib::ChessBoard::getBoard(nnchesslib::Color, nnchesslib::PieceType)
BitBoard ChessBoard::getBoard(Color color, PieceType piece)
{
    assert(color == WHITE || color == BLACK);

    U64 boardColor = boardinfo.whitePieces.board;
    if(color == BLACK) boardColor = boardinfo.blackPieces.board;

    switch(piece){
        case PAWN:
            return (boardColor & boardinfo.pawns.board);
            break;
        case KNIGHT:
            return (boardColor & boardinfo.knights.board);
            break;
        case BISHOP:
            return (boardColor & boardinfo.bishops.board);
            break;
        case ROOK:
            return (boardColor & boardinfo.rooks.board);
            break;
        case QUEEN:
            return (boardColor & boardinfo.queens.board);
            break;
        case KING:
            return (boardColor & boardinfo.kings.board);
            break;
        default:
            return (boardinfo.whitePieces.board & boardinfo.pawns.board);
            break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpl $0x2, %esi
jae 0x43ee
xorl %ecx, %ecx
testl %esi, %esi
sete %sil
pushq $0x10
popq %rax
cmpl $0x5, %edx
ja 0x43e9
movb %sil, %cl
movq (%rdi,%rcx,8), %rsi
movl %edx, %ecx
leaq 0x42fd(%rip), %rdx      # 0x86b0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
pushq $0x18
jmp 0x43ce
pushq $0x30
jmp 0x43ce
pushq $0x20
jmp 0x43ce
pushq $0x28
jmp 0x43ce
pushq $0x38
popq %rax
andq (%rdi,%rax), %rsi
leaq -0x10(%rbp), %rbx
movq %rbx, %rdi
callq 0x3036
movq (%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq (%rdi), %rsi
jmp 0x43cf
leaq 0x43b4(%rip), %rdi      # 0x87a9
leaq 0x4153(%rip), %rsi      # 0x854f
leaq 0x43c7(%rip), %rcx      # 0x87ca
movl $0xff, %edx
callq 0x2100
nop
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/board.cpp
// Function: nnchesslib::ChessBoard::getPieceOnSquare(int)
BitBoard * ChessBoard::getPieceOnSquare(int index)
{
    if(boardinfo.pawns.get(index)) return(&boardinfo.pawns);
    if(boardinfo.knights.get(index)) return(&boardinfo.knights);
    if(boardinfo.bishops.get(index)) return(&boardinfo.bishops);
    if(boardinfo.rooks.get(index)) return(&boardinfo.rooks);
    if(boardinfo.queens.get(index)) return(&boardinfo.queens);
    if(boardinfo.kings.get(index)) return(&boardinfo.kings);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, %rdi
callq 0x30a4
testl %eax, %eax
jne 0x450c
leaq 0x18(%rbx), %r15
movq %r15, %rdi
movl %r14d, %esi
callq 0x30a4
testl %eax, %eax
jne 0x450c
leaq 0x20(%rbx), %r15
movq %r15, %rdi
movl %r14d, %esi
callq 0x30a4
testl %eax, %eax
jne 0x450c
leaq 0x28(%rbx), %r15
movq %r15, %rdi
movl %r14d, %esi
callq 0x30a4
testl %eax, %eax
jne 0x450c
leaq 0x30(%rbx), %r15
movq %r15, %rdi
movl %r14d, %esi
callq 0x30a4
testl %eax, %eax
jne 0x450c
addq $0x38, %rbx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x30a4
xorl %r15d, %r15d
testl %eax, %eax
cmovneq %rbx, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/board.cpp
// Function: nnchesslib::ChessBoard::setEnPassantPossibility(nnchesslib::BitBoard, int, int)
void ChessBoard::setEnPassantPossibility(BitBoard ourPieces, int from, int to)
{
    // There can only be one target at the time, so clearing the boards every move.
    boardinfo.whiteEnPassantTarget.board = (U64)0;
    boardinfo.blackEnPassantTarget.board = (U64)0;
    // black en passant possibility (white has double moved)
    if((from / 8 == 1 && to / 8 == 3) && ourPieces.board & boardinfo.pawns.board)
    {
        // set the square under the pawn as a target for a black pawn (in a seperate bitboard)
        boardinfo.blackEnPassantTarget.set(to - 8, true);
    }
    // white en passant possibility (black has double moved)
    else if((from / 8 == 6 && to / 8 == 4) && ourPieces.board & boardinfo.pawns.board)
    {
        boardinfo.whiteEnPassantTarget.set(to + 8, true);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andl $-0x8, %edx
movl %edx, %r8d
xorl $0x8, %r8d
movl %ecx, %eax
andl $-0x8, %eax
movl %eax, %r9d
xorl $0x18, %r9d
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rdi)
orl %r8d, %r9d
jne 0x4773
testq %rsi, 0x10(%rdi)
je 0x4797
addq $0x60, %rdi
addl $-0x8, %ecx
jmp 0x478a
xorl $0x30, %edx
xorl $0x20, %eax
orl %edx, %eax
jne 0x4797
testq %rsi, 0x10(%rdi)
je 0x4797
addq $0x58, %rdi
orl $0x8, %ecx
movl $0x1, %edx
movl %ecx, %esi
popq %rbp
jmp 0x3062
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/board.cpp
// Function: nnchesslib::ChessBoard::pushPromotionMove(unsigned int)
void ChessBoard::pushPromotionMove(Move move)
{
    int from = from_Square(move);
    int to = to_Square(move);

    BitBoard * ourPieces = getColorOnSquare(from);

    PieceType piece = movePromotionType(move);

    boardinfo.pawns.set(from, false);
    ourPieces->set(from, false);
    ourPieces->set(to, true);

    if(piece == QUEEN) boardinfo.queens.set(to, true);
    if(piece == ROOK) boardinfo.rooks.set(to, true);
    if(piece == BISHOP) boardinfo.bishops.set(to, true);
    if(piece == KNIGHT) boardinfo.knights.set(to, true);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
movl %esi, %edi
callq 0x5bd4
movl %eax, %r12d
movl %r15d, %edi
callq 0x5be2
movl %eax, %r14d
movq %rbx, %rdi
movl %r12d, %esi
callq 0x451a
movq %rax, %r13
movl %r15d, %edi
callq 0x5bed
movl %eax, %r15d
leaq 0x10(%rbx), %rdi
movl %r12d, %esi
xorl %edx, %edx
callq 0x3062
movq %r13, %rdi
movl %r12d, %esi
xorl %edx, %edx
callq 0x3062
pushq $0x1
popq %rdx
movq %r13, %rdi
movl %r14d, %esi
callq 0x3062
decl %r15d
cmpl $0x3, %r15d
ja 0x4c02
movl %r15d, %eax
leaq (%rbx,%rax,8), %rdi
addq $0x18, %rdi
pushq $0x1
popq %rdx
movl %r14d, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3062
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/board.cpp
// Function: nnchesslib::ChessBoard::pushEnPassantMove(unsigned int)
void ChessBoard::pushEnPassantMove(Move move)
{
    int from = from_Square(move);
    int to = to_Square(move);

    BitBoard * ourPieceType = getPieceOnSquare(from);

    // White double pawn move (this needs to be seperated because we need to remove the pawn above or under the targetted square)
    if(from >= A5)
    {
        BitBoard * theirPiece = getPieceOnSquare(to - 8);
        boardinfo.whitePieces.set(from, false);
        boardinfo.whitePieces.set(to, true);
        ourPieceType->set(from, false);
        ourPieceType->set(to, true);
        theirPiece->set(to - 8, false);
        boardinfo.blackPieces.set(to - 8, false);
    } 
    else if(from <= H4)
    {
        BitBoard * theirPiece = getPieceOnSquare(to + 8);
        boardinfo.blackPieces.set(from, false);
        boardinfo.blackPieces.set(to, true);
        ourPieceType->set(from, false);
        ourPieceType->set(to, true);
        theirPiece->set(to + 8, false);
        boardinfo.whitePieces.set(to + 8, false);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r14d
movq %rdi, %rbx
movl %esi, %edi
callq 0x5bd4
movl %eax, %r15d
movl %r14d, %edi
callq 0x5be2
movl %eax, %r14d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x4488
movq %rax, %r12
movl %r14d, %r13d
cmpl $0x20, %r15d
jl 0x4cb2
addl $-0x8, %r13d
movq %rbx, %rdi
movl %r13d, %esi
callq 0x4488
movq %rax, -0x30(%rbp)
movq %rbx, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x3062
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x3062
movq %r12, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x3062
movq %r12, %rdi
movl %r14d, %esi
pushq $0x1
popq %rdx
callq 0x3062
movq -0x30(%rbp), %rdi
movl %r13d, %esi
xorl %edx, %edx
callq 0x3062
addq $0x8, %rbx
jmp 0x4d15
addl $0x8, %r13d
movq %rbx, %rdi
movl %r13d, %esi
callq 0x4488
movq %rax, -0x30(%rbp)
movq %r12, -0x38(%rbp)
leaq 0x8(%rbx), %r12
movq %r12, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x3062
pushq $0x1
popq %rdx
movq %r12, %rdi
movl %r14d, %esi
callq 0x3062
movq -0x38(%rbp), %r12
movq %r12, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x3062
movq %r12, %rdi
movl %r14d, %esi
pushq $0x1
popq %rdx
callq 0x3062
movq -0x30(%rbp), %rdi
movl %r13d, %esi
xorl %edx, %edx
callq 0x3062
movq %rbx, %rdi
movl %r13d, %esi
xorl %edx, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3062
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/board.cpp
// Function: nnchesslib::ChessBoard::pushRegularMove(unsigned int)
void ChessBoard::pushRegularMove(Move move)
{
    int from = from_Square(move);
    int to = to_Square(move);

    // gets the bitboard corresponding to our piecetype, e.g. knights, pawns etc.
    BitBoard * ourPieceType = getPieceOnSquare(from);
    // gets the bitboard corresponding to the opponent piecetype (at least if it is a capture).
    BitBoard * theirPieceType = getPieceOnSquare(to);
    // if board is empty it returns 0.
    bool isCapture = theirPieceType;
    // gets the bitboard corresponding to our piece color.
    BitBoard * ourPieces = getColorOnSquare(from);

    boardinfo.fiftyMoveRule++;

    if (boardinfo.pawns.board & ourPieceType->board)    
        boardinfo.fiftyMoveRule = 0;

    if(isCapture)
    {
        theirPieceType->set(to, false);

        BitBoard * theirPieces = getColorOnSquare(to);
        theirPieces->set(to, false);
        boardinfo.fiftyMoveRule = 0;
    }
    // changing to the position of a piece on one of the piece boards: pawn, knight, rook king etc.
    ourPieceType->set(from, false);
    ourPieceType->set(to, true);
    // changing the position of the piece on the white_pieces or black_pieces board.
    ourPieces->set(from, false);
    ourPieces->set(to, true);

    setEnPassantPossibility(*ourPieces, from, to);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
movl %esi, %edi
callq 0x5bd4
movl %eax, %r14d
movl %r15d, %edi
callq 0x5be2
movl %eax, %r15d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4488
movq %rax, %r13
movq %rbx, %rdi
movl %r15d, %esi
callq 0x4488
movq %rax, %r12
movq %rbx, %rdi
movl %r14d, %esi
callq 0x451a
movq %rax, -0x30(%rbp)
movl 0x48(%rbx), %eax
incl %eax
movq (%r13), %rcx
xorl %edx, %edx
testq %rcx, 0x10(%rbx)
cmovel %eax, %edx
movl %edx, 0x48(%rbx)
testq %r12, %r12
je 0x4dc7
movq %r12, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x3062
movq %rbx, %rdi
movl %r15d, %esi
callq 0x451a
movq %rax, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x3062
andl $0x0, 0x48(%rbx)
movq %r13, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x3062
pushq $0x1
popq %r12
movq %r13, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x3062
movq -0x30(%rbp), %r13
movq %r13, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x3062
movq %r13, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x3062
movq (%r13), %rsi
movq %rbx, %rdi
movl %r14d, %edx
movl %r15d, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x473e
nop
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/board.cpp
// Function: nnchesslib::ChessBoard::pushMove(unsigned int)
void ChessBoard::pushMove(Move move)
{
    // setting previous board information the the current position when there has not been made a move.
    previousBoard = boardinfo;
    // getting the movetype
    MoveType type = moveType(move);

    if(type == CASTLING) pushCastlingMove(move);
    else if(type == PROMOTION) pushPromotionMove(move);
    else if(type == ENPASSANT) pushEnPassantMove(move);
    else if(type == NORMAL) pushRegularMove(move);

    // Update board information
    updateCastlingRights();
    boardinfo.whiteToMove = !boardinfo.whiteToMove;

    if (boardinfo.whiteToMove)
        boardinfo.plyCount++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
addq $0x68, %rdi
pushq $0xd
popq %rcx
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl %r14d, %edi
callq 0x5bfc
cmpl $0x3, %eax
ja 0x4e91
movl %eax, %eax
leaq 0x3872(%rip), %rcx      # 0x86c8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4d30
jmp 0x4e91
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4c12
jmp 0x4e91
movq %rbx, %rdi
movl %r14d, %esi
callq 0x48ec
jmp 0x4e91
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4b6a
movq %rbx, %rdi
callq 0x479a
movb 0x40(%rbx), %al
movl %eax, %ecx
xorb $0x1, %cl
movb %cl, 0x40(%rbx)
testb %al, %al
jne 0x4eab
incl 0x4c(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/main.cpp
// Function: initAll()
void initAll()
{
    time_t begin, end;
    begin = clock();
    std::cout << "Initializing..." << std::endl;

    Rays::initRays();
    Attacks::initAllAttacks();

    end = clock();

    std::cout << "Finished initializing." << std::endl;
    std::cout << "Time taken: " << (float)(end-begin)/CLOCKS_PER_SEC << " seconds." << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
callq 0x2110
movq %rax, %rbx
movq 0x64ff(%rip), %r14      # 0xbfd0
leaq 0x2ea8(%rip), %rsi      # 0x8980
movq %r14, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20c0
callq 0x7352
callq 0x273c
callq 0x2110
movq %rax, %r15
leaq 0x2e8f(%rip), %rsi      # 0x8990
movq %r14, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20c0
leaq 0x2e8f(%rip), %rsi      # 0x89a7
movq %r14, %rdi
callq 0x2180
subq %rbx, %r15
cvtsi2ss %r15, %xmm0
divss 0x2e4c(%rip), %xmm0     # 0x897c
movq %rax, %rdi
callq 0x2130
leaq 0x2e75(%rip), %rsi      # 0x89b4
movq %rax, %rdi
callq 0x2180
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x20c0
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/main.cpp
// Function: main
int main(int argc, char *argv[])
{
    initAll();

    ChessBoard myBoard = ChessBoard();

    myBoard.pushFromUci("e2e4");
    
    myBoard.print();
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
callq 0x5ab8
leaq -0x108(%rbp), %rbx
movq %rbx, %rdi
callq 0x32dc
leaq 0x2e3c(%rip), %rsi      # 0x89be
leaq -0x38(%rbp), %r14
leaq -0x11(%rbp), %rdx
movq %r14, %rdi
callq 0x2f52
movq %rbx, %rdi
movq %r14, %rsi
callq 0x55e4
leaq -0x38(%rbp), %rdi
callq 0x2308
leaq -0x108(%rbp), %rdi
callq 0x3ffe
xorl %eax, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x2308
movq %rbx, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/move.cpp
// Function: nnchesslib::toUci[abi:cxx11](unsigned int)
std::string nnchesslib::toUci(Move m)
{
    std::string from = getSquareString(from_Square(m));
    std::string to = getSquareString(to_Square(m));

    std::string output = from + to;

    if(moveType(m) == PROMOTION)
    {
        switch(movePromotionType(m))
        {
            case QUEEN:
                output+="q";
                break;
            case KNIGHT:
                output+="n";
                break;
            case BISHOP:
                output+="b";
                break;
            case ROOK:
                output+="r";
                break;
        }
    }
    return output;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %esi, %r14d
movq %rdi, %rbx
shrl $0x6, %esi
andl $0x3f, %esi
leaq -0x50(%rbp), %rdi
callq 0x75ab
movl %r14d, %esi
andl $0x3f, %esi
leaq -0x30(%rbp), %rdi
callq 0x75ab
leaq -0x50(%rbp), %rsi
leaq -0x30(%rbp), %rdx
movq %rbx, %rdi
callq 0x5d4b
movl %r14d, %eax
andl $0xc000, %eax           # imm = 0xC000
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x5ca9
shrl $0xa, %r14d
andl $0xc, %r14d
leaq 0x2d36(%rip), %rax      # 0x89d0
movslq (%r14,%rax), %rsi
addq %rax, %rsi
movq %rbx, %rdi
callq 0x22b0
leaq -0x30(%rbp), %rdi
callq 0x2308
leaq -0x50(%rbp), %rdi
callq 0x2308
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2308
jmp 0x5cd7
movq %rax, %r14
leaq -0x30(%rbp), %rdi
callq 0x2308
jmp 0x5ce5
movq %rax, %r14
leaq -0x50(%rbp), %rdi
callq 0x2308
movq %r14, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/movegen.cpp
// Function: nnchesslib::genLegalMoves(nnchesslib::ChessBoard)
MoveList nnchesslib::genLegalMoves(ChessBoard board)
{
    MoveList pseudoLegalMoves;
    MoveList legalMoves;

    genPseudoLegalMoves(board, pseudoLegalMoves);
    
    for(auto move : pseudoLegalMoves)
    {
        ChessBoard temp = board;
        temp.pushMove(move);

        Color boardTurn = BLACK;
        if(board.getWhiteToMove()) boardTurn = WHITE;

        if(!temp.kingInCheck(boardTurn)) 
        {
            legalMoves.push_back(move);
        }
    }
    return legalMoves;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
leaq 0x10(%rbp), %r14
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %rax
movaps %xmm0, (%rax)
andq $0x0, 0x10(%rax)
movups %xmm0, (%rdi)
movq %rdi, -0x30(%rbp)
andq $0x0, 0x10(%rdi)
pushq $0x1a
popq %rcx
movq %rsp, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rax, %rdi
callq 0x5e6c
movq -0x50(%rbp), %r12
movq -0x48(%rbp), %rbx
leaq -0x120(%rbp), %r15
cmpq %rbx, %r12
je 0x5e2c
movl (%r12), %r13d
movl %r13d, -0x34(%rbp)
movl $0xd0, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x2150
movq %r15, %rdi
movl %r13d, %esi
callq 0x4e26
movq %r14, %rdi
callq 0x447e
movzbl %al, %esi
movq %r15, %rdi
callq 0x4550
testb %al, %al
jne 0x5e26
movq -0x30(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x71b0
addq $0x4, %r12
jmp 0x5dda
leaq -0x50(%rbp), %rdi
callq 0x598a
movq -0x30(%rbp), %rax
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5e4f
jmp 0x5e4f
movq %rax, %r14
movq -0x30(%rbp), %rdi
callq 0x598a
leaq -0x50(%rbp), %rdi
callq 0x598a
movq %r14, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/movegen.cpp
// Function: nnchesslib::genPseudoLegalMoves(nnchesslib::ChessBoard, std::vector<unsigned int, std::allocator<unsigned int>>&)
void nnchesslib::genPseudoLegalMoves(ChessBoard board, MoveList& moveList)
{
    BitBoard blockers = board.getBlockers();
    
    if(board.getWhiteToMove())
        genWhiteMoves(board, moveList, blockers);
    else
        genBlackMoves(board, moveList, blockers);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x10(%rbp), %r15
movq %r15, %rdi
callq 0x445a
movq %rax, %r14
movq %r15, %rdi
callq 0x447e
pushq $0x1a
popq %rcx
movq %rsp, %rdi
movq %r15, %rsi
testb %al, %al
je 0x5eb3
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5ecf
jmp 0x5ec1
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5fe1
addq $0xd8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/movegen.cpp
// Function: nnchesslib::genWhiteMoves(nnchesslib::ChessBoard, std::vector<unsigned int, std::allocator<unsigned int>>&, nnchesslib::BitBoard)
void nnchesslib::genWhiteMoves(ChessBoard board, MoveList& moveList, BitBoard blockers)
{
    genWhiteSinglePawnMoves(board,moveList, blockers);
    genWhiteDoublePawnMoves(board,moveList, blockers);
    genWhitePawnCaptures(board,moveList, blockers);
    genNonSlidingMoves(board,moveList, WHITE, KNIGHT);
    genNonSlidingMoves(board,moveList, WHITE, KING);
    genSlidingMoves(board,moveList, WHITE, ROOK, blockers);
    genSlidingMoves(board,moveList, WHITE, BISHOP, blockers);
    genSlidingMoves(board,moveList, WHITE, QUEEN, blockers);
    genCastlingMoves(board,moveList, WHITE, blockers);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1a
popq %r12
leaq 0x10(%rbp), %r15
movq %r12, %rcx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x60e5
movq %r12, %rcx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6297
movq %r12, %rcx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %r14, %rdi
callq 0x639d
movq %r12, %rcx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
pushq $0x1
popq %r13
movq %r14, %rdi
movl %r13d, %esi
movl %r13d, %edx
callq 0x65dc
movq %r12, %rcx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
pushq $0x5
popq %rdx
movq %r14, %rdi
movl %r13d, %esi
callq 0x65dc
movq %r12, %rcx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
pushq $0x3
popq %rdx
movq %r14, %rdi
movl %r13d, %esi
movq %rbx, %rcx
callq 0x678f
movq %r12, %rcx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
pushq $0x2
popq %rdx
movq %r14, %rdi
movl %r13d, %esi
movq %rbx, %rcx
callq 0x678f
movq %r12, %rcx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
pushq $0x4
popq %rdx
movq %r14, %rdi
movl %r13d, %esi
movq %rbx, %rcx
callq 0x678f
movq %r14, %rdi
movl %r13d, %esi
movq %rbx, %rdx
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x693b
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/movegen.cpp
// Function: nnchesslib::genBlackMoves(nnchesslib::ChessBoard, std::vector<unsigned int, std::allocator<unsigned int>>&, nnchesslib::BitBoard)
void nnchesslib::genBlackMoves(ChessBoard board, MoveList& moveList, BitBoard blockers)
{
    genBlackSinglePawnMoves(board,moveList, blockers);
    genBlackDoublePawnMoves(board,moveList, blockers);
    genBlackPawnCaptures(board,moveList, blockers);
    genNonSlidingMoves(board,moveList, BLACK, KNIGHT);
    genNonSlidingMoves(board,moveList, BLACK, KING);
    genSlidingMoves(board,moveList, BLACK, ROOK, blockers);
    genSlidingMoves(board,moveList, BLACK, BISHOP, blockers);
    genSlidingMoves(board,moveList, BLACK, QUEEN, blockers);
    genCastlingMoves(board,moveList, BLACK, blockers);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1a
popq %r12
leaq 0x10(%rbp), %r15
movq %r12, %rcx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6b87
movq %r12, %rcx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6d34
movq %r12, %rcx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %r14, %rdi
callq 0x6e3e
movq %r12, %rcx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
pushq $0x1
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x65dc
movq %r12, %rcx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
pushq $0x5
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x65dc
movq %r12, %rcx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
pushq $0x3
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x678f
movq %r12, %rcx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
pushq $0x2
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x678f
movq %r12, %rcx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
pushq $0x4
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x678f
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x693b
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/movegen.cpp
// Function: nnchesslib::genWhiteDoublePawnMoves(nnchesslib::ChessBoard, std::vector<unsigned int, std::allocator<unsigned int>>&, nnchesslib::BitBoard)
void nnchesslib::genWhiteDoublePawnMoves(ChessBoard board, MoveList& moveList, BitBoard blockers)
{
    // targetting pawns that are on the second rank. These are the only pawns that can move twice.
    BitBoard unmovedPawns = board.getBoard(WHITE, PAWN).board & rank_bb[RANK_2];
    // moving pawns once to check if they are blocked:
    BitBoard firstMove = (unmovedPawns.board << 8) & ~blockers.board;
    // moving again:
    BitBoard secondMove = (firstMove.board << 8) & ~blockers.board;

    int validPawnCount = __builtin_popcountll(secondMove.board);

    for(int _ = 0; _ < validPawnCount; _++)
    {
        // finding current index of pawn.
        int index = popLsb(secondMove.board);

        if (index == -1)
            continue;
        // adding to pseudo legal movelist. 
        Move move = createMove(index - 16, index);
        moveList.push_back(move);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rbp), %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x4388
andl $0xff00, %eax           # imm = 0xFF00
leaq -0x38(%rbp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x3036
movq (%r15), %rsi
shlq $0x8, %rsi
notq %r14
andq %r14, %rsi
leaq -0x30(%rbp), %r15
movq %r15, %rdi
callq 0x3036
movq (%r15), %rsi
shlq $0x8, %rsi
andq %r14, %rsi
leaq -0x28(%rbp), %r14
movq %r14, %rdi
callq 0x3036
movq (%r14), %rax
movq %rax, %rcx
shrq %rcx
movabsq $0x5555555555555555, %rdx # imm = 0x5555555555555555
andq %rcx, %rdx
subq %rdx, %rax
movabsq $0x3333333333333333, %rcx # imm = 0x3333333333333333
movq %rax, %rdx
andq %rcx, %rdx
shrq $0x2, %rax
andq %rcx, %rax
addq %rdx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
addq %rax, %rcx
movabsq $0xf0f0f0f0f0f0f0f, %rax # imm = 0xF0F0F0F0F0F0F0F
andq %rcx, %rax
movabsq $0x101010101010101, %r15 # imm = 0x101010101010101
imulq %rax, %r15
shrq $0x38, %r15
leaq -0x1c(%rbp), %r14
subl $0x1, %r15d
jb 0x6392
movq -0x28(%rbp), %rax
leaq -0x1(%rax), %rcx
andq %rax, %rcx
movq %rcx, -0x28(%rbp)
cmpq $0x1, %rax
jb 0x635b
bsfq %rax, %rsi
leal -0x10(%rsi), %edi
callq 0x5c0a
movl %eax, -0x1c(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x71b0
jmp 0x635b
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/movegen.cpp
// Function: nnchesslib::genBlackDoublePawnMoves(nnchesslib::ChessBoard, std::vector<unsigned int, std::allocator<unsigned int>>&, nnchesslib::BitBoard)
void nnchesslib::genBlackDoublePawnMoves(ChessBoard board, MoveList& moveList, BitBoard blockers)
{
    // targetting pawns that are on the second rank. These are the only pawns that can move twice.
    BitBoard unmovedPawns = board.getBoard(BLACK, PAWN).board & rank_bb[RANK_7];
    // moving pawns once to check if they are blocked:
    BitBoard firstMove = (unmovedPawns.board >> 8) & ~blockers.board;
    // moving again:
    BitBoard secondMove = (firstMove.board >> 8) & ~blockers.board;

    int validPawnCount = __builtin_popcountll(secondMove.board);

    for(int _ = 0; _ < validPawnCount; _++)
    {
        // finding current index of pawn.
        int index = popLsb(secondMove.board);

        if (index == -1)
            continue;
        // adding to pseudo legal movelist. 
        Move move = createMove(index + 16, index);
        moveList.push_back(move);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4388
movabsq $0xff000000000000, %rsi # imm = 0xFF000000000000
andq %rax, %rsi
leaq -0x38(%rbp), %r15
movq %r15, %rdi
callq 0x3036
movq (%r15), %rsi
shrq $0x8, %rsi
notq %r14
andq %r14, %rsi
leaq -0x30(%rbp), %r15
movq %r15, %rdi
callq 0x3036
movq (%r15), %rsi
shrq $0x8, %rsi
andq %r14, %rsi
leaq -0x28(%rbp), %r14
movq %r14, %rdi
callq 0x3036
movq (%r14), %rax
movq %rax, %rcx
shrq %rcx
movabsq $0x5555555555555555, %rdx # imm = 0x5555555555555555
andq %rcx, %rdx
subq %rdx, %rax
movabsq $0x3333333333333333, %rcx # imm = 0x3333333333333333
movq %rax, %rdx
andq %rcx, %rdx
shrq $0x2, %rax
andq %rcx, %rax
addq %rdx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
addq %rax, %rcx
movabsq $0xf0f0f0f0f0f0f0f, %rax # imm = 0xF0F0F0F0F0F0F0F
andq %rcx, %rax
movabsq $0x101010101010101, %r15 # imm = 0x101010101010101
imulq %rax, %r15
shrq $0x38, %r15
leaq -0x1c(%rbp), %r14
subl $0x1, %r15d
jb 0x6e33
movq -0x28(%rbp), %rax
leaq -0x1(%rax), %rcx
andq %rax, %rcx
movq %rcx, -0x28(%rbp)
cmpq $0x1, %rax
jb 0x6dfc
bsfq %rax, %rsi
leal 0x10(%rsi), %edi
callq 0x5c0a
movl %eax, -0x1c(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x71b0
jmp 0x6dfc
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/movegen.cpp
// Function: nnchesslib::genPromotions(int, std::vector<unsigned int, std::allocator<unsigned int>>&, nnchesslib::Color, nnchesslib::BitBoard)
void nnchesslib::genPromotions(int pawnIndex, MoveList& moveList, Color color, BitBoard pawns)
{
    // counting the amount of attacked pawns.
    int count = __builtin_popcountll(pawns.board);

    for(int _ = 0; _ < count; _++)
    {
        int index = popLsb(pawns.board);
        
        Move queen = createMove(pawnIndex, index, QUEEN);
        Move knight = createMove(pawnIndex, index, KNIGHT);
        Move bishop = createMove(pawnIndex, index, BISHOP);
        Move rook = createMove(pawnIndex, index, ROOK);
        moveList.push_back(queen);
        moveList.push_back(knight);
        moveList.push_back(bishop);
        moveList.push_back(rook);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rsi, %r14
movl %edi, %r15d
movq %rcx, %rax
shrq %rax
movabsq $0x5555555555555555, %rcx # imm = 0x5555555555555555
andq %rax, %rcx
movq %rbx, %rax
subq %rcx, %rax
movabsq $0x3333333333333333, %rcx # imm = 0x3333333333333333
movq %rax, %rdx
andq %rcx, %rdx
shrq $0x2, %rax
andq %rcx, %rax
addq %rdx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
addq %rax, %rcx
movabsq $0xf0f0f0f0f0f0f0f, %rax # imm = 0xF0F0F0F0F0F0F0F
andq %rcx, %rax
movabsq $0x101010101010101, %r13 # imm = 0x101010101010101
imulq %rax, %r13
shrq $0x38, %r13
subl $0x1, %r13d
jb 0x71a0
bsfq %rbx, %r12
movq %rbx, %rax
subq $0x1, %rax
pushq $-0x1
popq %rcx
cmovbl %ecx, %r12d
andq %rax, %rbx
movl %r15d, %edi
movl %r12d, %esi
pushq $0x4
popq %rdx
callq 0x5c16
movl %eax, -0x38(%rbp)
movl %r15d, %edi
movl %r12d, %esi
pushq $0x1
popq %rdx
callq 0x5c16
movl %eax, -0x34(%rbp)
movl %r15d, %edi
movl %r12d, %esi
pushq $0x2
popq %rdx
callq 0x5c16
movl %eax, -0x30(%rbp)
movl %r15d, %edi
movl %r12d, %esi
pushq $0x3
popq %rdx
callq 0x5c16
movl %eax, -0x2c(%rbp)
movq %r14, %rdi
leaq -0x38(%rbp), %rsi
callq 0x71b0
movq %r14, %rdi
leaq -0x34(%rbp), %rsi
callq 0x71b0
movq %r14, %rdi
leaq -0x30(%rbp), %rsi
callq 0x71b0
movq %r14, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x71b0
jmp 0x7108
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/rays.cpp
// Function: nnchesslib::Rays::initRays()
void Rays::initRays()
{
    for(int sq = 0; sq < 64; sq++)
    {
        rays[NORTH][sq] = 0x0101010101010100ULL << sq;

        rays[EAST][sq] = 2 * (((U64)1 << (sq | 7)) - ((U64)1 << sq));

        rays[SOUTH][sq] = 0x0080808080808080ULL >> (63 - sq);

        rays[WEST][sq] = ((U64)1 << sq) - ((U64)1 << (sq & 56)) ;

        rays[NORTH_WEST][sq] = northWest(0x102040810204000ULL, 7 - file(sq)) << (rank(sq) * 8);

        rays[NORTH_EAST][sq] = northEast(0x8040201008040200ULL, file(sq)) << (rank(sq) * 8);

        rays[SOUTH_WEST][sq] = northWest(0x40201008040201ULL, 7 - file(sq)) >> ((7 - rank(sq)) * 8);

        rays[SOUTH_EAST][sq] = northEast(0x2040810204080ULL, file(sq)) >> ((7 - rank(sq)) * 8);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
pushq $0x3f
popq %rdi
xorl %r14d, %r14d
leaq 0x286b73(%rip), %rbx    # 0x28dee0
cmpq $0x40, %r14
je 0x7484
movabsq $0x101010101010100, %rax # imm = 0x101010101010100
movl %r14d, %ecx
shlq %cl, %rax
andb $-0x8, %cl
movl $0x80, %edx
shlq %cl, %rdx
pushq $0x1
popq %rsi
movl %r14d, %ecx
shlq %cl, %rsi
movq %rax, (%rbx,%r14,8)
subq %rsi, %rdx
movabsq $0x80808080808080, %rax # imm = 0x80808080808080
movl %edi, %ecx
shrq %cl, %rax
addq %rdx, %rdx
movl %r14d, %r12d
andb $0x38, %r12b
movq %rdi, -0x30(%rbp)
pushq $-0x1
popq %rdi
movl %r12d, %ecx
shlq %cl, %rdi
movq %rdx, 0x200(%rbx,%r14,8)
movq %rax, 0x400(%rbx,%r14,8)
addq %rsi, %rdi
movq %rdi, 0x600(%rbx,%r14,8)
movl %r14d, %r15d
andl $0x7, %r15d
movl %r15d, %r13d
xorl $0x7, %r13d
movabsq $0x102040810204000, %rdi # imm = 0x102040810204000
movl %r13d, %esi
callq 0x74f3
movl %r12d, %ecx
shlq %cl, %rax
movq %rax, 0xa00(%rbx,%r14,8)
movabsq $-0x7fbfdfeff7fbfe00, %rdi # imm = 0x8040201008040200
movl %r15d, %esi
callq 0x751a
movl %r12d, %ecx
shlq %cl, %rax
movq %rax, 0x800(%rbx,%r14,8)
movabsq $0x40201008040201, %rdi # imm = 0x40201008040201
movl %r13d, %esi
callq 0x74f3
xorb $0x38, %r12b
movl %r12d, %ecx
shrq %cl, %rax
movq %rax, 0xe00(%rbx,%r14,8)
movabsq $0x2040810204080, %rdi  # imm = 0x2040810204080
movl %r15d, %esi
callq 0x751a
movq -0x30(%rbp), %rdi
movl %r12d, %ecx
shrq %cl, %rax
movq %rax, 0xc00(%rbx,%r14,8)
incq %r14
decq %rdi
jmp 0x736d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/rays.cpp
// Function: nnchesslib::Rays::northWest(unsigned long long, int)
inline U64 Rays::northWest(U64 bRay, int n)
{
    U64 ray = bRay;
    for(int i = 0; i < n; i++)
    {
        ray = ((ray >> (U64)1) & ~0x8080808080808080ull);
    }
    return ray;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
xorl %ecx, %ecx
testl %esi, %esi
cmovgl %esi, %ecx
movabsq $0x7f7f7f7f7f7f7f7f, %rdx # imm = 0x7F7F7F7F7F7F7F7F
subl $0x1, %ecx
jb 0x7518
shrq %rax
andq %rdx, %rax
jmp 0x750b
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/rays.cpp
// Function: nnchesslib::Rays::northEast(unsigned long long, int)
inline U64 Rays::northEast(U64 bRay, int n)
{
    U64 ray = bRay;
    for(int i = 0; i < n; i++)
    {
        ray = (ray << ((U64)1) & ~0x0101010101010101ULL); 
    }
    return ray;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
xorl %ecx, %ecx
testl %esi, %esi
cmovgl %esi, %ecx
movabsq $-0x101010101010102, %rdx # imm = 0xFEFEFEFEFEFEFEFE
subl $0x1, %ecx
jb 0x753f
addq %rax, %rax
andq %rdx, %rax
jmp 0x7532
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/utils.cpp
// Function: nnchesslib::countBits(unsigned long long)
int nnchesslib::countBits(U64 n)
{
    int output = 0;
    while (n != 0)
    {
        n &= (n - 1);
        output++;
    }
    return output;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
testq %rdi, %rdi
je 0x755a
leaq -0x1(%rdi), %rcx
andq %rcx, %rdi
incl %eax
jmp 0x754a
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/niekh1234[P]nnchesslib/utils.cpp
// Function: nnchesslib::getSquareString[abi:cxx11](int)
std::string nnchesslib::getSquareString(int square)
{
    assert(square >= 0 && square <= 63);
    int file = square % 8;
    int rank = square / 8 + 1;

    const char* files = "abcdefgh";

    return files[file] + std::to_string(rank);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
cmpl $0x40, %esi
jae 0x7607
movq %rdi, %rbx
movl %esi, %eax
andl $0x7, %eax
shrl $0x3, %esi
incl %esi
leaq 0x14de(%rip), %rcx      # 0x8aaf
movsbl (%rax,%rcx), %r14d
leaq -0x38(%rbp), %r15
movq %r15, %rdi
callq 0x5775
movq %rbx, %rdi
movl %r14d, %esi
movq %r15, %rdx
callq 0x7638
leaq -0x38(%rbp), %rdi
callq 0x2308
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x144e(%rip), %rdi      # 0x8a5c
leaq 0x1463(%rip), %rsi      # 0x8a78
leaq 0x1466(%rip), %rcx      # 0x8a82
pushq $0x29
popq %rdx
callq 0x2100
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x2308
movq %rbx, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O2/biotomas[P]ipasir/app/ipasir-check-conflict/ipasir-check-conflict.cc
// Function: learnhook(void*, int*)
void learnhook(void * state, int * clause) {
  if(!clause) return;
  int len = 0;
  while( clause[len] != 0 ) ++len;
  std::cout << "c learned clause of size " << len << std::endl;
}

// Assembly:
testq %rsi, %rsi
je 0x2416
pushq %rbx
pushq $-0x1
popq %rbx
incl %ebx
cmpl $0x0, (%rsi)
leaq 0x4(%rsi), %rsi
jne 0x23e5
movq 0x14bd1(%rip), %rdi     # 0x16fc8
leaq 0xdc12(%rip), %rsi      # 0x10010
callq 0x2150
movq %rax, %rdi
movl %ebx, %esi
callq 0x2280
movq %rax, %rdi
popq %rbx
jmp 0x2090
retq
// File: /workspace/github_cpp_makefile_star2_O2/biotomas[P]ipasir/app/ipasir-check-conflict/./SATSolver.h
// Function: SATSolver::SATSolver()
SATSolver() : ipasirSolver(0), maxVar(0) {
    IPASIR( ipasirSolver = ipasir_init(); );
    IPASIR( std::cerr << "initialized IPASIR solver: " << std::string(ipasir_signature()) << std::endl; );
#ifndef HAVE_IPASIR
    std::cerr << "error: trying to use IPASIR solver without being compiled for ipasir, abort" << std::endl;
    exit (1);
#endif
  }

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
andq $0x0, (%rdi)
andl $0x0, 0x8(%rdi)
callq 0x2fac
movq %rax, (%rbx)
movq 0x1482d(%rip), %rdi     # 0x16ff0
leaq 0xd9d4(%rip), %rsi      # 0x1019e
callq 0x2150
movq %rax, %rbx
callq 0x2fa4
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x2af2
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2130
movq %rax, %rdi
callq 0x2090
leaq 0x8(%rsp), %rdi
callq 0x2080
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O2/biotomas[P]ipasir/app/ipasir-check-conflict/./SATSolver.h
// Function: SATSolver::addClause(std::vector<int, std::allocator<int>>&)
void addClause(std::vector<int>& lits) {
    for( int i = 0 ; i<lits.size(); ++ i ) {
      IPASIR( ipasir_add(ipasirSolver, lits[i]); );
      maxVar = lits[i] > maxVar ? lits[i] : maxVar;
      maxVar = -lits[i] > maxVar ? -lits[i] : maxVar;
    }
    IPASIR( ipasir_add(ipasirSolver, 0); );
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
xorl %r15d, %r15d
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
movq (%r14), %rdi
cmpq %r15, %rcx
jbe 0x28e3
movl (%rax,%r15,4), %esi
callq 0x301b
movq (%rbx), %rax
movl (%rax,%r15,4), %ecx
movl 0x8(%r14), %edx
cmpl %edx, %ecx
cmovgl %ecx, %edx
movl %edx, 0x8(%r14)
xorl %ecx, %ecx
subl (%rax,%r15,4), %ecx
cmpl %ecx, %edx
cmovgl %edx, %ecx
movl %ecx, 0x8(%r14)
incq %r15
jmp 0x289f
xorl %esi, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x301b