LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/bitboard.cpp
// Function: allKnightAttacks()
void allKnightAttacks(){
    bitboard knightA = 0ULL, knightB = 0ULL, knightG = 0ULL, knightH = 0ULL;
    bitboard knightMoves = 0ULL, knight = 0ULL;
    square sq = a1;
    for(rank rk = rank_1; rk<numOfRank; rk++)
    {
        for(file f = file_a; f<numOfFile; f++)
        {
            sq = rankFile_to_sq(rk, f);
            knightA = squareBitMask[sq] & clearFile[file_a];
            knightB = squareBitMask[sq] & clearFile[file_b];
            knightG = squareBitMask[sq] & clearFile[file_g];
            knightH = squareBitMask[sq] & clearFile[file_h];
            knight  = squareBitMask[sq];
            
            knightMoves |= ((knightA & knightB) << noWeWe);
            knightMoves |= (knightA  << noNoWe);
            knightMoves |= (knightH << noNoEa);
            knightMoves |= ((knightG & knightH) << noEaEa);
            knightMoves |= ((knightG & knightH) >> -soEaEa);
            knightMoves |= (knightH  >> -soSoEa);
            knightMoves |= (knightA >> -soSoWe);
            knightMoves |= ((knightA & knightB) >> -soWeWe);
            
           // printBitboard(knightMoves);
            openBoardAttacks[p_knight][sq] = knightMoves;
            knightMoves = 0ULL;
        }
        
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x9904(%rip), %rax      # 0xc460
movq 0x9905(%rip), %rcx      # 0xc468
movq 0x9926(%rip), %rdx      # 0xc490
leaq 0x926f(%rip), %rsi      # 0xbde0
leaq 0x9b68(%rip), %rdi      # 0xc6e0
movq 0x9919(%rip), %r8       # 0xc498
xorl %r9d, %r9d
cmpq $0x8, %r9
je 0x2c15
movq %r9, -0x8(%rsp)
xorl %r10d, %r10d
cmpq $0x8, %r10
je 0x2c00
movq (%rsi,%r10,8), %r15
movq %rax, %rbx
andq %r15, %rbx
movq %r8, %r11
andq %r15, %r11
movq %rbx, %r14
andq %rcx, %r14
movq %r14, %r12
shlq $0x6, %r12
movq %rbx, %r13
shlq $0xf, %r13
movq %r11, %rbp
shlq $0x11, %rbp
andq %rdx, %r15
andq %r8, %r15
movq %r15, %r9
shlq $0xa, %r9
shrq $0x6, %r15
orq %r9, %r15
shrq $0xf, %r11
orq %r15, %r11
shrq $0x11, %rbx
orq %r13, %rbx
orq %r12, %rbx
shrq $0xa, %r14
orq %rbp, %r14
orq %rbx, %r14
orq %r11, %r14
movq %r14, (%rdi,%r10,8)
incq %r10
jmp 0x2b94
movq -0x8(%rsp), %r9
incq %r9
addq $0x40, %rsi
addq $0x40, %rdi
jmp 0x2b82
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/bitboard.cpp
// Function: allBishopAttacks()
void allBishopAttacks(){
    for(square sq= a1; sq<numOfSq; sq++){
     
        magicBishopMask[sq] = clearEdges &( squareBitMask[sq] ^(diagonalBitMask[sq] | antiDiagonalBitMask[sq]));
        openBoardAttacks[p_bishop][sq] =  squareBitMask[sq] ^(diagonalBitMask[sq] | antiDiagonalBitMask[sq]);
       // printBitboard(openBoardAttacks[p_bishop][sq]);
    }
}

// Assembly:
xorl %eax, %eax
leaq 0x91b7(%rip), %rcx      # 0xbde0
leaq 0x9430(%rip), %rdx      # 0xc060
leaq 0x9629(%rip), %rsi      # 0xc260
movabsq $0x7e7e7e7e7e7e00, %rdi # imm = 0x7E7E7E7E7E7E00
leaq 0xe2e98(%rip), %r8      # 0xe5ae0
leaq 0x9891(%rip), %r9       # 0xc4e0
cmpq $0x200, %rax            # imm = 0x200
je 0x2c78
movq (%rax,%rsi), %r10
orq (%rax,%rdx), %r10
xorq (%rax,%rcx), %r10
movq %r10, 0x400(%rax,%r9)
andq %rdi, %r10
movq %r10, (%rax,%r8)
addq $0x8, %rax
jmp 0x2c4f
retq
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/bitboard.cpp
// Function: allRookAttacks()
void allRookAttacks(){
    bitboard rookMoves = 0ULL;
    square sq = a1;
    for(rank rk = rank_1; rk<numOfRank; rk++)
    {
        for(file f = file_a; f<numOfFile; f++)
        {
            sq = rankFile_to_sq(rk, f);
            rookMoves = fileBitMask[f] | rankBitMask[rk];
            openBoardAttacks[p_rook][sq] = rookMoves ^ squareBitMask[sq];
           
            if ( (sq == a1) || (sq == a8) || (sq == h1) || (sq == h8) )
            {
                magicRookMask[sq] = (rookMoves & clearCorners);
            }
            else if(rk == rank_1)
                magicRookMask[sq] = squareBitMask[sq] ^ (rookMoves & (clearEdges | (rank1 & clearCorners)));
            else if (rk == rank_8)
                magicRookMask[sq] = squareBitMask[sq] ^ (rookMoves & (clearEdges | (rank8 & clearCorners)));
            else if (f == file_a)
                magicRookMask[sq] = squareBitMask[sq] ^ (rookMoves & (clearEdges | (fileA & clearCorners)));
            else if (f == file_h)
                magicRookMask[sq] = squareBitMask[sq] ^ (rookMoves & (clearEdges | (fileH & clearCorners)));
            else
            {
                magicRookMask[sq] = squareBitMask[sq] ^ (rookMoves & clearEdges );
            }
                
            //printBitboard( openBoardAttacks[p_rook][sq]);
            //printBitboard(magicRookMask[sq]);
            rookMoves = 0ULL;
            
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0x9156(%rip), %rax      # 0xbde0
leaq 0x9e4f(%rip), %rcx      # 0xcae0
leaq 0x1a848(%rip), %rdx     # 0x1d4e0
movabsq $0x7e7e7e7e7e7e00, %rsi # imm = 0x7E7E7E7E7E7E00
xorl %edi, %edi
movabsq $0x7e7e7e7e7e7e7e00, %r11 # imm = 0x7E7E7E7E7E7E7E00
leaq 0x7e(%rsi), %rbx
movabsq $-0x7effffffffffff7f, %r12 # imm = 0x8100000000000081
movabsq $0x7effffffffffff7e, %r13 # imm = 0x7EFFFFFFFFFFFF7E
xorl %ebp, %ebp
cmpq $0x8, %rbp
je 0x2d99
leaq 0x9347(%rip), %rsi      # 0xc020
movq (%rsi,%rbp,8), %rsi
leaq 0x92fc(%rip), %r10      # 0xbfe0
movabsq $-0x8, %r9
testq %r9, %r9
je 0x2d81
movq (%r10), %r8
orq %rsi, %r8
movq 0x40(%rax,%r9,8), %r15
movq %r8, %r14
xorq %r15, %r14
movq %r14, 0x40(%rcx,%r9,8)
leaq (%rdi,%r9), %r14
addq $0x8, %r14
cmpl $0x3f, %r14d
ja 0x2d35
movl %r14d, %r14d
btq %r14, %r12
jae 0x2d35
andq %r13, %r8
movq %r8, 0x40(%rdx,%r9,8)
incq %r9
addq $0x8, %r10
jmp 0x2cee
cmpl $0x7, %ebp
je 0x2d43
testl %ebp, %ebp
jne 0x2d48
andq %rbx, %r8
jmp 0x2d7c
andq %r11, %r8
jmp 0x2d7c
leal 0x8(%r9), %r14d
cmpl $0x7, %r14d
je 0x2d63
testl %r14d, %r14d
jne 0x2d6f
movabsq $0x7f7f7f7f7f7f00, %r14 # imm = 0x7F7F7F7F7F7F00
jmp 0x2d79
movabsq $0xfefefefefefe00, %r14 # imm = 0xFEFEFEFEFEFE00
jmp 0x2d79
movabsq $0x7e7e7e7e7e7e00, %r14 # imm = 0x7E7E7E7E7E7E00
andq %r14, %r8
xorq %r15, %r8
jmp 0x2d27
incq %rbp
addq $0x8, %rdi
addq $0x40, %rax
addq $0x40, %rcx
addq $0x40, %rdx
jmp 0x2cc8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/bitboard.cpp
// Function: vertMasks(int, unsigned long)
bitboard vertMasks (int sq, bitboard occupied){
    int iter = sq;
    bitboard bb = squareBitMask[sq];
    
    //vertical
    //north
    bitboard vert = bb;
    while( square_to_rank(square(iter)) < numOfRank-1 )
    {
        
        iter += nort;
        vert |= (vert << nort);
        if( squareBitMask[iter] & occupied) break;
    }
    
    //south
    iter = sq;
    while( square_to_rank(square(iter)) > 0)
    {
        iter +=south;
        vert |= (vert >> -south);
        if( squareBitMask[iter] & occupied) break;
    }
    
    return vert;
}

// Assembly:
movslq %edi, %rdx
leaq 0x8acc(%rip), %rcx      # 0xbde0
movq (%rcx,%rdx,8), %rax
movq %rdx, %rdi
movl %edi, %r8d
notl %r8d
testb $0x38, %r8b
je 0x3359
leaq 0x8(%rdi), %r8
movq %rax, %r9
shlq $0x8, %r9
orq %r9, %rax
testq %rsi, 0x40(%rcx,%rdi,8)
movq %r8, %rdi
je 0x331b
jmp 0x3359
leaq -0x8(%rdx), %rdi
movq %rax, %r8
shrq $0x8, %r8
orq %r8, %rax
testq %rsi, -0x40(%rcx,%rdx,8)
movq %rdi, %rdx
jne 0x335e
testb $0x38, %dl
jne 0x3341
retq
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/bitboard.cpp
// Function: printBitboard(unsigned long)
void printBitboard(bitboard board)
{
    std::cout << "---------------\n";
    for(rank r = rank_8; r>=0; r--)
    {
        for(file f = file_a; f<numOfFile; f++)
        {
            if(board & squareBitMask[rankFile_to_sq(r, f)]) std::cout << "# ";
            else std::cout << "- ";
        }
        std::cout <<"\n";
    }
    std::cout << "---------------\n";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x7b7e(%rip), %r14      # 0xafb0
leaq 0x3c03(%rip), %rsi      # 0x703c
movq %r14, %rdi
callq 0x2170
pushq $0x7
popq %rax
pushq $0x38
popq %rcx
leaq 0x8992(%rip), %r13      # 0xbde0
leaq 0x3bfb(%rip), %r15      # 0x7050
testl %eax, %eax
js 0x34ae
movl %eax, 0x4(%rsp)
movl %ecx, (%rsp)
movl %ecx, %r12d
shlq $0x3, %r12
xorl %ebp, %ebp
cmpq $0x8, %rbp
je 0x3491
leaq (%r12,%rbp,8), %rax
movq %r15, %rsi
testq %rbx, (%r13,%rax)
je 0x3484
leaq 0x3bc9(%rip), %rsi      # 0x704d
movq %r14, %rdi
callq 0x2170
incq %rbp
jmp 0x3469
movq %r14, %rdi
leaq 0x3f02(%rip), %rsi      # 0x739d
callq 0x2170
movl 0x4(%rsp), %eax
decl %eax
movl (%rsp), %ecx
addl $-0x8, %ecx
jmp 0x3455
movq 0x7afb(%rip), %rdi      # 0xafb0
leaq 0x3b80(%rip), %rsi      # 0x703c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2170
nop
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/moveGen.cpp
// Function: generateQuiet(position const&, candidate*)
candidate* generateQuiet(const position& pos, candidate* moveList){
    player us = pos.get_sideToPlay();
    player them = player(!us);
    bitboard quiets = ~(pos.get_pieces());
    bitboard clear7Rank = us == white ? clearRank[rank_8] : clearRank[rank_1];
    
    moveList = sliderMoves(pos, quiets, moveList);
    moveList = pawnPushMoves(pos, pos.get_pieces(us, p_pawn), us, quiets & clear7Rank, moveList);
    moveList = kingMoves(pos, quiets, moveList);
    moveList = knightMoves(pos.get_pieces(us, p_knight), quiets, moveList);
    
    
    return moveList;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rdx
movq %rdi, %rbx
movl 0x17c(%rdi), %ebp
leaq 0x100(%rdi), %rax
leaq 0x138(%rdi), %rcx
leaq 0x108(%rdi), %r12
testl %ebp, %ebp
cmovneq %rcx, %r12
leaq 0x130(%rdi), %r13
testl %ebp, %ebp
leaq 0x8f89(%rip), %rcx      # 0xc4a0
cmoveq %rax, %r13
leaq 0x38(%rcx), %rax
testl %ebp, %ebp
movq 0x170(%rdi), %r14
notq %r14
cmovneq %rcx, %rax
movq (%rax), %r15
andq %r14, %r15
movq %r14, %rsi
callq 0x3c8d
movq (%r13), %rsi
movq %rbx, %rdi
movl %ebp, %edx
movq %r15, %rcx
movq %rax, %r8
callq 0x3dde
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x3eaf
movq (%r12), %rdi
movq %r14, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3f1b
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/moveGen.cpp
// Function: generateCapture(position const&, candidate*)
candidate* generateCapture(const position& pos, candidate* moveList)
{
    
    player us = pos.get_sideToPlay();
    player them = player(!us);
    bitboard captures = pos.get_pieces(them);
    bitboard pawnCaptures = us == white ? captures & clearRank[rank_8] : captures & clearRank[rank_1];
    
    moveList = kingMoves(pos, captures, moveList);
    moveList = knightMoves(pos.get_pieces(us, p_knight), captures, moveList);
    moveList = pawnAttackMoves(pos.get_pieces(us, p_pawn), us, pawnCaptures , moveList);
    moveList = sliderMoves(pos, captures, moveList);
    
    
    
    return moveList;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x17c(%rdi), %ebp
leaq 0x130(%rdi), %r12
leaq 0x100(%rdi), %rax
testl %ebp, %ebp
cmoveq %rax, %r12
movq %rsi, %rdx
leaq 0x138(%rdi), %r13
leaq 0x108(%rdi), %rax
testl %ebp, %ebp
leaq 0x8edd(%rip), %rcx      # 0xc4a0
cmoveq %rax, %r13
leaq 0x38(%rcx), %rax
xorl %esi, %esi
testl %ebp, %ebp
sete %sil
movq 0x160(%rdi,%rsi,8), %r14
cmovneq %rcx, %rax
movq (%rax), %r15
andq %r14, %r15
movq %r14, %rsi
callq 0x3eaf
movq (%r13), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x3f1b
movq (%r12), %rdi
movl %ebp, %esi
movq %r15, %rdx
movq %rax, %rcx
callq 0x3f63
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3c8d
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/moveGen.cpp
// Function: generateNonEvasions(position const&, candidate*)
candidate* generateNonEvasions(const position& pos, candidate* moveList)
{
    moveList = generateCapture(pos, moveList);
    moveList = generatePromotions(pos, moveList);
    moveList = generateQuiet(pos, moveList);
    if(pos.get_castlingRights(pos.get_sideToPlay()))moveList = generateCastling(pos, moveList);
    if(pos.get_enPassent() != empty) moveList = generateEnPassent(pos, moveList);

return moveList;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x3581
movq %rbx, %rdi
movq %rax, %rsi
callq 0x38cd
movq %rbx, %rdi
movq %rax, %rsi
callq 0x34d5
xorl %edx, %edx
cmpl $0x0, 0x17c(%rbx)
setne %dl
movq 0x188(%rbx), %rcx
leal (%rdx,%rdx,8), %edx
addl $0x3, %edx
testl %edx, 0x8(%rcx)
je 0x38b9
movq %rbx, %rdi
movq %rax, %rsi
callq 0x395c
movq 0x188(%rbx), %rcx
cmpl $0x40, 0x4(%rcx)
jne 0x38c1
popq %rbx
retq
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x3b47
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/moveGen.cpp
// Function: generateAllLegal(position const&, candidate*)
candidate* generateAllLegal (const position& pos, candidate* moveList)
{
   
    if(pos.get_pieces(player(!(pos.get_sideToPlay()))) & pos.squareAttackedBy(pos.get_king_sq(pos.get_sideToPlay()))) {
       //std::cout <<"inside evasion\n";
       // printBitboard(pos.get_pieces(player(!(pos.get_sideToPlay())))&pos.squareAttackedBy(pos.get_king_sq(pos.get_sideToPlay())));
       // pos.printBoard();
        
        return generateEvasion(pos, moveList);
    }
    else{
       //  std::cout <<"inside else\n";
    
    moveList = generateCapture(pos, moveList);
    moveList = generatePromotions(pos, moveList);
    moveList = generateQuiet(pos, moveList);
    if(pos.get_castlingRights(pos.get_sideToPlay()))moveList = generateCastling(pos, moveList);
    if(pos.get_enPassent() != empty) moveList = generateEnPassent(pos, moveList);
    }
   
    
    return moveList;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
bsfq 0x128(%rdi), %rcx
bsfq 0x158(%rdi), %rax
movq %rsi, %r14
xorl %edx, %edx
cmpl $0x0, 0x17c(%rdi)
sete %dl
movq 0x160(%rdi,%rdx,8), %r15
cmovel %ecx, %eax
movl %eax, %esi
callq 0x525a
testq %r15, %rax
je 0x3c20
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x362e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3581
movq %rbx, %rdi
movq %rax, %rsi
callq 0x38cd
movq %rbx, %rdi
movq %rax, %rsi
callq 0x34d5
xorl %edx, %edx
cmpl $0x0, 0x17c(%rbx)
setne %dl
movq 0x188(%rbx), %rcx
leal (%rdx,%rdx,8), %edx
addl $0x3, %edx
testl %edx, 0x8(%rcx)
je 0x3c71
movq %rbx, %rdi
movq %rax, %rsi
callq 0x395c
movq 0x188(%rbx), %rcx
cmpl $0x40, 0x4(%rcx)
jne 0x3c7d
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x3b47
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/moveGen.cpp
// Function: pawnAttackMoves(unsigned long, player, unsigned long, candidate*)
candidate* pawnAttackMoves (bitboard pawns, player color ,bitboard target, candidate* moveList){
    
    bitboard squares = 0;
    square from = empty, to = empty;
    move mov = none;
    bitboard rank8Sq = color == white ? rankBitMask[rank_8] : rankBitMask[rank_1];
    
    while(pawns)
    {
        from = lsb_sq(pawns);
        //check now if the from square is absolute pinned
        squares = target & openBoardPawnAttacks[color][from];
        while(squares)
        {
            //could check here if the to square places their king in check
            to  = lsb_sq(squares);
            
            if (squareBitMask[to]  & rank8Sq) {
               moveList = makePromotionMoves(from, to, moveList);
            }
            else{
                mov = make_move(from, to);
                (*moveList++).mv = mov;
            }
            pop_lsb(&squares);
        }
        pop_lsb(&pawns);
        
    }
    
    return moveList;
}

// Assembly:
pushq %rbp
pushq %rbx
movq %rcx, %rax
leaq 0x80b1(%rip), %rcx      # 0xc020
leaq 0x38(%rcx), %r8
testl %esi, %esi
cmovneq %rcx, %r8
movq (%r8), %rcx
movl %esi, %esi
shlq $0x9, %rsi
addq 0x703f(%rip), %rsi      # 0xafc8
leaq 0x7e50(%rip), %r8       # 0xbde0
testq %rdi, %rdi
je 0x3fdb
bsfq %rdi, %r9
movq (%rsi,%r9,8), %r10
andq %rdx, %r10
testq %r10, %r10
je 0x3fd2
bsfq %r10, %r11
movl %r11d, %ebx
shll $0x6, %ebx
leal (%rbx,%r9), %ebp
addl $0xf000, %ebp           # imm = 0xF000
orl %r9d, %ebx
testq %rcx, (%r8,%r11,8)
cmovel %ebx, %ebp
movl %ebp, (%rax)
addq $0x8, %rax
leaq -0x1(%r10), %r11
andq %r11, %r10
jmp 0x3fa0
leaq -0x1(%rdi), %r9
andq %r9, %rdi
jmp 0x3f90
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/moveGen.cpp
// Function: printmove(move)
void printmove (move m)
{
   /* square from ,to;
    char mv [4];
    
        from = source_sq(m);
    to = destination_sq(m);
        mv[0] = square_to_file(from) + 'A';
        mv[1] = square_to_rank(from) + '1';
        mv[2] = square_to_file(to) + 'A';
        mv[3] = square_to_rank(to) + '1';
        std::cout << mv[0] << mv[1] << mv[2] << mv[3] << "\n";
    
    */
    std::string pieceletters = "_NBRQ";
    std::string flagletters = "_recp";
    square from ,to;
    char mv [7];
    
    from = source_sq(m);
    to = destination_sq(m);
    mv[0] = square_to_file(from) + 'A';
    mv[1] = square_to_rank(from) + '1';
    mv[2] = square_to_file(to) + 'A';
    mv[3] = square_to_rank(to) + '1';
    mv[4] = ' ';
    mv[5] = pieceletters[promo_pieceType(m)] ;
    mv[6] = flagletters[move_flag(m)+1]; //for non promotions, shows up at N because the offset of piece promotion
    std::cout << mv[0] << mv[1] << mv[2] << mv[3] << mv[4] << mv[5] << mv[6]  << "\n";
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movl %edi, %ebx
leaq 0x325f(%rip), %rsi      # 0x7260
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x26c4
leaq 0x324f(%rip), %rsi      # 0x7266
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x26c4
movl %ebx, %eax
andb $0x7, %al
addb $0x41, %al
movl %ebx, %ecx
shrl $0xc, %ecx
andl $0x3, %ecx
movq 0x30(%rsp), %rdx
movb 0x1(%rdx,%rcx), %r14b
movl %ebx, %ecx
shrl $0xe, %ecx
andl $0x3, %ecx
movq 0x10(%rsp), %rdx
movb 0x1(%rdx,%rcx), %bpl
movzbl %al, %esi
movq 0x6f56(%rip), %rdi      # 0xafb0
callq 0x2190
movl %ebx, %ecx
shrb $0x3, %cl
andb $0x7, %cl
addb $0x31, %cl
movzbl %cl, %esi
movq %rax, %rdi
callq 0x2190
movl %ebx, %ecx
shrl $0x6, %ecx
andb $0x7, %cl
addb $0x41, %cl
movzbl %cl, %esi
movq %rax, %rdi
callq 0x2190
shrl $0x9, %ebx
andb $0x7, %bl
addb $0x31, %bl
movzbl %bl, %esi
movq %rax, %rdi
callq 0x2190
pushq $0x20
popq %rsi
movq %rax, %rdi
callq 0x2190
movsbl %r14b, %esi
movq %rax, %rdi
callq 0x2190
movsbl %bpl, %esi
movq %rax, %rdi
callq 0x2190
leaq 0x32d4(%rip), %rsi      # 0x739d
movq %rax, %rdi
callq 0x2170
leaq 0x10(%rsp), %rdi
callq 0x2288
leaq 0x30(%rsp), %rdi
callq 0x2288
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
jmp 0x4100
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2288
leaq 0x30(%rsp), %rdi
callq 0x2288
movq %rbx, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/moveGen.cpp
// Function: printMoves(candidate*, candidate*)
void printMoves (candidate* start, candidate* end)
{
    std::string pieceletters = "_NBRQ";
    std::string flagletters = "_recp";
    square from ,to;
    char mv [7];
    
    while( start!= end)
    {
        from = source_sq(start-> mv);
        to = destination_sq(start -> mv);
        mv[0] = square_to_file(from) + 'A';
        mv[1] = square_to_rank(from) + '1';
        mv[2] = square_to_file(to) + 'A';
        mv[3] = square_to_rank(to) + '1';
        mv[4] = ' ';
        mv[5] = pieceletters[promo_pieceType(start->mv)] ;
        mv[6] = flagletters[move_flag(start->mv)+1]; //for non promotions, shows up at N because the offset of piece promotion
        std::cout << mv[0] << mv[1] << mv[2] << mv[3] << mv[4] << mv[5] << mv[6]  << "\n";
         start++;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x3133(%rip), %rsi      # 0x7260
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x26c4
leaq 0x3123(%rip), %rsi      # 0x7266
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x26c4
leaq 0x3244(%rip), %r12      # 0x739d
cmpq %rbx, %r14
je 0x4218
movl (%r14), %ebp
movl %ebp, %eax
andb $0x7, %al
addb $0x41, %al
movl %ebp, %ecx
shrl $0xc, %ecx
andl $0x3, %ecx
movq 0x28(%rsp), %rdx
movb 0x1(%rdx,%rcx), %r15b
movl %ebp, %ecx
shrl $0xe, %ecx
andl $0x3, %ecx
movq 0x8(%rsp), %rdx
movb 0x1(%rdx,%rcx), %r13b
movzbl %al, %esi
movq 0x6e17(%rip), %rdi      # 0xafb0
callq 0x2190
movl %ebp, %ecx
shrb $0x3, %cl
andb $0x7, %cl
addb $0x31, %cl
movzbl %cl, %esi
movq %rax, %rdi
callq 0x2190
movl %ebp, %ecx
shrl $0x6, %ecx
andb $0x7, %cl
addb $0x41, %cl
movzbl %cl, %esi
movq %rax, %rdi
callq 0x2190
shrl $0x9, %ebp
andb $0x7, %bpl
addb $0x31, %bpl
movzbl %bpl, %esi
movq %rax, %rdi
callq 0x2190
movq %rax, %rdi
pushq $0x20
popq %rsi
callq 0x2190
movsbl %r15b, %esi
movq %rax, %rdi
callq 0x2190
movsbl %r13b, %esi
movq %rax, %rdi
callq 0x2190
movq %rax, %rdi
movq %r12, %rsi
callq 0x2170
addq $0x8, %r14
jmp 0x4159
leaq 0x8(%rsp), %rdi
callq 0x2288
leaq 0x28(%rsp), %rdi
callq 0x2288
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x424d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2288
leaq 0x28(%rsp), %rdi
callq 0x2288
movq %rbx, %rdi
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/position.cpp
// Function: position::reset()
void position::reset(){
   
    state = new returnState();
    
    //reset return state, its ok to do it twice at start up, this is for reset by gui
    state ->captured = not_piece;
    state -> m = none;
    state -> prev = NULL;
    
    
    //these could be overwritten by the fen called in setboard
    ply = 0;
    sideToPlay = white;
    nodes = 0;
    
    //all pieces and square realted things should be handdled in setboard()
    setboard();
    update_material(state);
    update_check_boards(state);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x48
popq %rdi
callq 0x2180
xorps %xmm0, %xmm0
andq $0x0, 0x40(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
movq %rax, 0x188(%rbx)
movaps 0x2fd6(%rip), %xmm1     # 0x7270
movups %xmm1, (%rax)
andl $0x0, 0x10(%rax)
andq $0x0, 0x18(%rax)
movups %xmm0, 0x178(%rbx)
movq %rbx, %rdi
callq 0x4750
movq 0x188(%rbx), %rsi
movq %rbx, %rdi
callq 0x469a
movq 0x188(%rbx), %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x470a
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/position.cpp
// Function: position::updatePositionFen(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void position::updatePositionFen(std::string fen)
{
    returnState *newState = new returnState();
    newState ->prev = state;
    state = newState;
    
    
    //Code ripped from the setboard function below.
    for(square sq =a1; sq < numOfSq; sq++)
    {
        board[sq] = not_piece;
    }
    
    for(piece p = w_pawn; p<numOfPieces ; p++ )
    {
        pieces[p] = 0ULL;
    }
    allWhitePieces = 0ULL;
    allBlackPieces = 0ULL;
    allPieces = allWhitePieces | allBlackPieces;
    
    nodes = 0;
    
    fenParser(fen);
    update_material(state);
    update_check_boards(state);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x48
popq %rdi
callq 0x2180
movaps 0x2f83(%rip), %xmm0     # 0x7270
movups %xmm0, (%rax)
andl $0x0, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
andq $0x0, 0x40(%rax)
movq 0x188(%rbx), %rcx
movq %rcx, 0x18(%rax)
movq %rax, 0x188(%rbx)
xorl %eax, %eax
cmpq $0x40, %rax
je 0x432a
movl $0xc, (%rbx,%rax,4)
incq %rax
jmp 0x4318
pushq $0x20
popq %rax
cmpq $0x2c, %rax
je 0x433d
andq $0x0, (%rbx,%rax,8)
incq %rax
jmp 0x432d
andq $0x0, 0x180(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x160(%rbx)
andq $0x0, 0x170(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4388
movq 0x188(%rbx), %rsi
movq %rbx, %rdi
callq 0x469a
movq 0x188(%rbx), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x470a
nop
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/position.cpp
// Function: position::update_material(returnState*)
void position::update_material(returnState *state)
{
    bitboard pieces = 0;
   //white
    //have to increment pt+1 due to indexing
    for( piece pt = w_pawn ; pt < w_king; pt++)
    {
        pieces = get_pieces(pt);
        state -> material[white]  = state -> material[white] +(popcount(pieces) * pieceValue[pt+1]);
    }
    //black
    for( piece pt = b_pawn ; pt < b_king; pt++)
    {
        pieces = get_pieces(pt);
        state -> material[black]  =  state -> material[black] + (popcount(pieces) * pieceValue[pt-5]);
    }
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
leaq 0x6aae(%rip), %r15      # 0xb160
cmpq $0x5, %r12
je 0x46d8
movq 0x100(%r14,%r12,8), %rdi
movl 0x40(%rbx), %ebp
callq 0x2801
imull 0x4(%r15,%r12,4), %eax
incq %r12
addl %ebp, %eax
movl %eax, 0x40(%rbx)
jmp 0x46b2
xorl %r12d, %r12d
cmpq $0x5, %r12
je 0x4701
movq 0x130(%r14,%r12,8), %rdi
movl 0x44(%rbx), %ebp
callq 0x2801
imull 0x4(%r15,%r12,4), %eax
addl %ebp, %eax
movl %eax, 0x44(%rbx)
incq %r12
jmp 0x46db
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/position.cpp
// Function: position::update_check_boards(returnState*)
void position::update_check_boards(returnState *state)
{
   
    //these are our own pieces pinned due to blocking the attacks on the king
    //The function also passes in pinners which is the their pieces causing the pin
    state -> absolutePinned[white] = pinningBoards(get_king_sq(white), state->pinners[black], white);
   
    state -> absolutePinned[black] = pinningBoards(get_king_sq(black), state->pinners[white], black);

    
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
bsfq 0x128(%rdi), %rsi
leaq 0x30(%rbx), %r15
leaq 0x38(%rbx), %rdx
xorl %ecx, %ecx
callq 0x5108
movq %rax, 0x20(%rbx)
bsfq 0x158(%r14), %rsi
pushq $0x1
popq %rcx
movq %r14, %rdi
movq %r15, %rdx
callq 0x5108
movq %rax, 0x28(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/position.cpp
// Function: position::place_piece(square, piece)
void position::place_piece(square sq, piece pt)
{
    //do not erase data by placing empty pieces. that is reserved for remove_piece
    player color = neither;
    if(pt != not_piece){
        board[sq] = pt;
        pieces[pt] = pieces[pt] | squareBitMask[sq];
        pt < 6 ? color = white : color = black;
        color == white ? allWhitePieces |= squareBitMask[sq] : allBlackPieces |= squareBitMask[sq];
        allPieces = allWhitePieces | allBlackPieces;
    }
}

// Assembly:
cmpl $0xc, %edx
je 0x483f
movl %esi, %eax
movl %edx, (%rdi,%rax,4)
movl %edx, %ecx
leaq 0x75ef(%rip), %rsi      # 0xbde0
movq (%rsi,%rax,8), %r8
orq %r8, 0x100(%rdi,%rcx,8)
movq (%rsi,%rax,8), %rax
cmpl $0x5, %edx
jg 0x481d
orq 0x160(%rdi), %rax
movq %rax, 0x160(%rdi)
movq 0x168(%rdi), %rcx
jmp 0x4835
orq 0x168(%rdi), %rax
movq %rax, 0x168(%rdi)
movq %rax, %rcx
movq 0x160(%rdi), %rax
orq %rax, %rcx
movq %rcx, 0x170(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/position.cpp
// Function: position::printBoard() const
void position::printBoard() const{
    std::cout <<"Current Board: \n";
    std::cout << "---------------\n";
    for(rank r = rank_8; r>=0; r--)
    {
        for(file f = file_a; f<numOfFile; f++)
        {
            std::cout<< pieceChar [ board[rankFile_to_sq(r, f)] ] << " ";
        }
        std::cout <<"\n";
    }
    std::cout << "---------------\n";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, (%rsp)
movq 0x61ea(%rip), %r14      # 0xafb0
leaq 0x2608(%rip), %rsi      # 0x73d5
movq %r14, %rdi
callq 0x2170
leaq 0x2260(%rip), %rsi      # 0x703c
movq %r14, %rdi
callq 0x2170
pushq $0x7
popq %rbp
pushq $0x38
popq %r13
leaq 0x27dd(%rip), %r12      # 0x75cf
testl %ebp, %ebp
js 0x4e47
movl %r13d, %eax
movq (%rsp), %rcx
leaq (%rcx,%rax,4), %r15
xorl %ebx, %ebx
cmpq $0x8, %rbx
je 0x4e30
movl (%r15,%rbx,4), %eax
movq 0xeb6fc(%rip), %rcx     # 0xf0510
movsbl (%rcx,%rax), %esi
movq %r14, %rdi
callq 0x2190
movq %rax, %rdi
movq %r12, %rsi
callq 0x2170
incq %rbx
jmp 0x4e03
movq %r14, %rdi
leaq 0x2563(%rip), %rsi      # 0x739d
callq 0x2170
decl %ebp
addl $-0x8, %r13d
jmp 0x4df2
movq 0x6162(%rip), %rdi      # 0xafb0
leaq 0x21e7(%rip), %rsi      # 0x703c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2170
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/position.cpp
// Function: position::remove_piece(square, piece)
void position::remove_piece(square sq, piece pt)
{
        
    player color = neither;
    if(pt != not_piece){
        board[sq] = not_piece;
        pieces[pt] = pieces[pt] ^ squareBitMask[sq];
        pt < 6 ? color = white : color = black;
        color == white ? allWhitePieces ^= squareBitMask[sq] : allBlackPieces ^= squareBitMask[sq];
        allPieces = allWhitePieces | allBlackPieces;
    }
}

// Assembly:
cmpl $0xc, %edx
je 0x4ecd
movl %esi, %eax
movl $0xc, (%rdi,%rax,4)
movl %edx, %ecx
leaq 0x6f61(%rip), %rsi      # 0xbde0
movq (%rsi,%rax,8), %r8
xorq %r8, 0x100(%rdi,%rcx,8)
movq (%rsi,%rax,8), %rax
cmpl $0x5, %edx
jg 0x4eab
xorq 0x160(%rdi), %rax
movq %rax, 0x160(%rdi)
movq 0x168(%rdi), %rcx
jmp 0x4ec3
xorq 0x168(%rdi), %rax
movq %rax, 0x168(%rdi)
movq %rax, %rcx
movq 0x160(%rdi), %rax
orq %rax, %rcx
movq %rcx, 0x170(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/position.cpp
// Function: position::pinningBoards(square, unsigned long&, player)
bitboard position:: pinningBoards(square sq, bitboard &pinners, player color)
{

    player us = color;
    player them = player(!us);
    bitboard enemyRookQueen = get_pieces(p_queen, p_rook) & get_pieces(them);
    bitboard enemyBishopQueen = get_pieces(p_queen, p_bishop) & get_pieces(them);
    bitboard snipers = 0, pinned = 0, pinnedHold = 0;
    bitboard ourPieces = get_pieces(us);
    square piece = empty;
    
    snipers = xRayRook(get_pieces(), get_pieces(us), sq) & enemyRookQueen;
    while(snipers)
    {
        piece = square (lsb_sq(snipers));
        pinnedHold |= inBetweenSqBitMask[sq][piece] & ourPieces;
        if(pinnedHold != pinned) pinners |= squareBitMask[piece];
        pinned |= pinnedHold;
        pop_lsb(&snipers);
    }
    
    snipers = xRayBishop(get_pieces(), get_pieces(us), sq) & enemyBishopQueen;
    while(snipers)
    {
        piece = square (lsb_sq(snipers));
        pinnedHold |= inBetweenSqBitMask[sq][piece] & ourPieces;
        if(pinnedHold != pinned) pinners |= squareBitMask[piece];
        pinned |= pinnedHold;
        pop_lsb(&snipers);
    }
    
    return pinned;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
xorl %eax, %eax
xorl %edx, %edx
testl %ecx, %ecx
setne %al
sete %dl
movq 0x150(%rdi), %rcx
orq 0x120(%rdi), %rcx
movl %esi, %ebp
movq 0x118(%rdi), %rbx
orq 0x148(%rdi), %rbx
movq 0x110(%rdi), %r13
movq %rcx, 0x18(%rsp)
orq %rcx, %rbx
orq 0x140(%rdi), %r13
movq 0x160(%rdi,%rdx,8), %r12
leaq 0x160(,%rax,8), %rcx
movq %rcx, 0x8(%rsp)
movq 0x160(%rdi,%rax,8), %r14
movq %rdi, 0x20(%rsp)
movq 0x170(%rdi), %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x5332
movl %ebp, %ecx
movq %r15, %rsi
movq %r12, 0x10(%rsp)
andq %r12, %rbx
andq %rax, %rbx
movq (%r15), %rax
movl %ebp, %ebp
xorl %r12d, %r12d
shlq $0x9, %rbp
addq 0x5de1(%rip), %rbp      # 0xaf90
leaq 0x6c2a(%rip), %rdi      # 0xbde0
xorl %r15d, %r15d
testq %rbx, %rbx
je 0x51e5
bsfq %rbx, %r8
movq (%rbp,%r8,8), %rdx
andq %r14, %rdx
orq %rdx, %r12
cmpq %r15, %r12
je 0x51d9
orq (%rdi,%r8,8), %rax
movq %rax, (%rsi)
orq %r12, %r15
leaq -0x1(%rbx), %rdx
andq %rdx, %rbx
jmp 0x51b9
orq 0x18(%rsp), %r13
movq %rsi, %rbx
movq 0x20(%rsp), %rax
movq 0x170(%rax), %rsi
movq 0x8(%rsp), %rdx
movq (%rax,%rdx), %rdx
callq 0x5370
leaq 0x6bd2(%rip), %rdi      # 0xbde0
movq %rbx, %rsi
andq 0x10(%rsp), %r13
andq %rax, %r13
movq (%rbx), %rax
testq %r13, %r13
je 0x5248
bsfq %r13, %rcx
movq (%rbp,%rcx,8), %rdx
andq %r14, %rdx
orq %rdx, %r12
cmpq %r15, %r12
je 0x523c
orq (%rdi,%rcx,8), %rax
movq %rax, (%rsi)
orq %r12, %r15
leaq -0x1(%r13), %rcx
andq %rcx, %r13
jmp 0x521c
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/position.cpp
// Function: position::squareAttackedBy(square) const
bitboard position::squareAttackedBy (square sq) const
{
    
  //  printBitboard((attacksFromPawn(sq, black)      & get_pieces(white, p_pawn)));
   // printBitboard((attacksFromPawn(sq, white)    & get_pieces(black, p_pawn)));
    // printBitboard((attacksFrom (sq, p_knight)         & get_pieces(p_knight)));
  //   printBitboard((attacksFrom (sq, p_king)           & get_pieces(p_king)));
 //    printBitboard((attacksFrom (sq, p_rook) & get_pieces(  p_rook, p_queen)));
  //   printBitboard((attacksFrom (sq, p_bishop) & get_pieces(p_bishop, p_queen)));
    bitboard attacks =    (attacksFromPawn(sq, black)      & get_pieces(white, p_pawn))
                        | (attacksFromPawn(sq, white)    & get_pieces(black, p_pawn))
                        | (attacksFrom (sq, p_knight)         & get_pieces(p_knight))
                        | (attacksFrom (sq, p_king)           & get_pieces(p_king))
                        | (attacksFrom (sq, p_rook) & get_pieces(  p_rook, p_queen))
                        | (attacksFrom (sq, p_bishop) & get_pieces(p_bishop, p_queen));
    return attacks;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, %eax
leaq 0x7e71(%rip), %rcx      # 0xd0e0
movq 0x100(%rdi), %rdx
movq 0x130(%rdi), %rsi
andq 0x200(%rcx,%rax,8), %rdx
andq (%rcx,%rax,8), %rsi
leaq 0x7250(%rip), %rcx      # 0xc4e0
movq 0x138(%rdi), %rdi
orq 0x108(%rbx), %rdi
andq 0x200(%rcx,%rax,8), %rdi
orq %rdx, %rsi
movq 0x158(%rbx), %r15
orq 0x128(%rbx), %r15
andq 0xa00(%rcx,%rax,8), %r15
orq %rdi, %r15
orq %rsi, %r15
pushq $0x3
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5642
movq 0x148(%rbx), %rcx
orq 0x118(%rbx), %rcx
orq 0x120(%rbx), %rcx
movq %rax, %r14
orq 0x150(%rbx), %rcx
andq %rcx, %r14
pushq $0x2
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5642
movq 0x140(%rbx), %rcx
orq 0x110(%rbx), %rcx
orq 0x120(%rbx), %rcx
orq 0x150(%rbx), %rcx
andq %rcx, %rax
orq %r14, %rax
orq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/position.cpp
// Function: position::printAllBitboards() const
void position::printAllBitboards() const{
    
   
    for(piece p = w_pawn; p<numOfPieces; p++)
    {
        std::cout <<  "Piece: " << pieceChar[p] << "\n";
        printBitboard(pieces[p]);
        std::cout <<  "\n\n\n";
    }
    
    std::cout <<  "all White Pieces: \n";
    printBitboard(allWhitePieces);
    std::cout <<  "\n\n\n";
    
    std::cout <<  "all Black Pieces: \n";
    printBitboard(allBlackPieces);
    std::cout <<  "\n\n\n";
    
    std::cout <<  "ALL Pieces: \n";
    printBitboard(allPieces);
    std::cout <<  "\n\n\n";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %ebp, %ebp
movq 0x5a6b(%rip), %r14      # 0xafb0
leaq 0x1e47(%rip), %r15      # 0x7393
leaq 0x1e4a(%rip), %r12      # 0x739d
leaq 0x1e41(%rip), %r13      # 0x739b
cmpq $0xc, %rbp
je 0x55a6
movq %r14, %rdi
movq %r15, %rsi
callq 0x2170
movq 0xeaf9e(%rip), %rcx     # 0xf0510
movsbl (%rcx,%rbp), %esi
movq %rax, %rdi
callq 0x2190
movq %rax, %rdi
movq %r12, %rsi
callq 0x2170
movq 0x100(%rbx,%rbp,8), %rdi
callq 0x341d
movq %r14, %rdi
movq %r13, %rsi
callq 0x2170
incq %rbp
jmp 0x555a
movq 0x5a03(%rip), %r14      # 0xafb0
leaq 0x1deb(%rip), %rsi      # 0x739f
movq %r14, %rdi
callq 0x2170
movq 0x160(%rbx), %rdi
callq 0x341d
leaq 0x1dcc(%rip), %r15      # 0x739b
movq %r14, %rdi
movq %r15, %rsi
callq 0x2170
leaq 0x1dd2(%rip), %rsi      # 0x73b3
movq %r14, %rdi
callq 0x2170
movq 0x168(%rbx), %rdi
callq 0x341d
movq %r14, %rdi
movq %r15, %rsi
callq 0x2170
leaq 0x1dc0(%rip), %rsi      # 0x73c7
movq %r14, %rdi
callq 0x2170
movq 0x170(%rbx), %rdi
callq 0x341d
movq %r14, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2170
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/./position.hpp
// Function: position::attacksFrom(square, pieceType) const
inline bitboard position::attacksFrom (square sq, pieceType pt) const {
    
    bitboard attacks =  pt == p_pawn ? attacksFromPawn(sq, sideToPlay) :
    pt == p_rook ? sliderAttacks(sq, allPieces, p_rook) :
    pt == p_bishop ? sliderAttacks(sq, allPieces, p_bishop) :
    pt == p_queen ? sliderAttacks(sq, allPieces, p_rook) | sliderAttacks(sq, allPieces, p_bishop) :        openBoardAttacks[pt][sq];
    
    return attacks;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movl %edx, %eax
cmpl $0x4, %edx
ja 0x56c4
movq %rdi, %r14
leaq 0x1ce2(%rip), %rcx      # 0x733c
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movl 0x17c(%r14), %eax
movl %ebx, %ecx
shlq $0x9, %rax
addq 0x5951(%rip), %rax      # 0xafc8
jmp 0x56d1
movq 0x170(%r14), %rsi
pushq $0x3
jmp 0x568d
movq 0x170(%r14), %rsi
pushq $0x2
popq %rdx
movl %ebx, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x33a4
movq 0x170(%r14), %rsi
pushq $0x3
popq %rdx
movl %ebx, %edi
callq 0x33a4
movq %rax, %r15
movq 0x170(%r14), %rsi
pushq $0x2
popq %rdx
movl %ebx, %edi
callq 0x33a4
orq %r15, %rax
jmp 0x56d5
movl %ebx, %ecx
shlq $0x9, %rax
addq 0x58e7(%rip), %rax      # 0xafb8
movq (%rax,%rcx,8), %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/search.cpp
// Function: perftDivide(int, position&)
bitboard perftDivide (int depth, position& pos)
{
    
    candMoveList movs;
    
    movs.end = generateAllLegal(pos, movs.end);
    returnState state = returnState();
    bitboard nodes = 0;
    bitboard totalNodes =0;
    while( movs.start != movs.end)
    {
        if(pos.legal(movs.start -> mv))
        {
            pos.do_move(movs.start -> mv, state);
            nodes = perft(depth -1, pos);
            totalNodes += nodes;
         //   printmove(movs.start->mv);
          //  std::cout << "nodes: " << nodes << "\n\n";
            pos.undo_move(movs.start -> mv);
        }
        
        movs.start ++;
        
    }
    return totalNodes;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x860, %rsp            # imm = 0x860
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x60(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r12, -0x8(%r12)
movq %rsi, %rdi
movq %r12, %rsi
callq 0x3bd2
movaps 0x17b4(%rip), %xmm0     # 0x7270
movq %rsp, %r14
movaps %xmm0, (%r14)
andl $0x0, 0x10(%r14)
movq %rax, -0x10(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r14)
movups %xmm0, 0x28(%r14)
movups %xmm0, 0x38(%r14)
decl %ebp
xorl %r15d, %r15d
movq -0x8(%r12), %rcx
cmpq %rax, %rcx
je 0x5b3f
movl (%rcx), %esi
movq %rbx, %rdi
callq 0x53ae
testb %al, %al
je 0x5b2a
movq 0x58(%rsp), %rax
movl (%rax), %esi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x4840
movl %ebp, %edi
movq %rbx, %rsi
callq 0x56dc
addq %rax, %r15
movq 0x58(%rsp), %rax
movl (%rax), %esi
movq %rbx, %rdi
callq 0x4ece
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
addq $0x8, %rcx
movq %rcx, 0x58(%rsp)
jmp 0x5ae9
movq %r15, %rax
addq $0x860, %rsp            # imm = 0x860
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/evaluate.cpp
// Function: evaluation::init()
void evaluation::init(){
   
    for(square sq = a1; sq < numOfSq; sq++)
    {
        oppSq[sq] = square(sq ^ (black * 56));
    }
    
    int totalMaterial = (8 * pawnVal) + (2 * knightVal) + (2 * bishopVal) +  (2 * rookVal) + queenVal;
    gamePhaseCutoff = 2 * totalMaterial - 2 * (rookVal * 2);
    
}

// Assembly:
leaq 0xeabd5(%rip), %rax     # 0xf09d0
xorl %ecx, %ecx
cmpq $0x40, %rcx
je 0x5e13
movl %ecx, %edx
xorl $0x38, %edx
movl %edx, (%rax)
incq %rcx
addq $0x4, %rax
jmp 0x5dfd
movl $0x1a7c, 0xeacb3(%rip)  # imm = 0x1A7C
retq
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/UCI.cpp
// Function: UCI::moveCheck(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
move UCI::moveCheck(std::string str)
{
    candMoveList movs;
    movs.end = generateAllLegal(pos, movs.end);
    
    while(movs.start != movs.end)
    {
       // std::cout<< moveToString(movs.start -> mv) << "\n";
       // std::cout<<str << "\n";
        if(str == moveToString(movs.start -> mv))
        {
            return movs.start -> mv;
        }
        movs.start++;
    }
    
    return none;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x830, %rsp            # imm = 0x830
movq %rsi, %rbx
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
movq %r14, -0x8(%r14)
addq $0x18, %rdi
movq %r14, %rsi
callq 0x3bd2
movq %rax, -0x10(%r14)
movq -0x8(%r14), %rcx
movq %rsp, %r14
cmpq %rax, %rcx
je 0x6b20
movl (%rcx), %edx
movq %r14, %rdi
callq 0x6b32
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6cae
movl %eax, %ebp
movq %r14, %rdi
callq 0x2288
movq 0x28(%rsp), %rcx
testb %bpl, %bpl
jne 0x6b24
addq $0x8, %rcx
movq %rcx, 0x28(%rsp)
movq 0x20(%rsp), %rax
jmp 0x6ae2
xorl %eax, %eax
jmp 0x6b26
movl (%rcx), %eax
addq $0x830, %rsp            # imm = 0x830
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/UCI.cpp
// Function: UCI::moveToString[abi:cxx11](move)
std::string UCI::moveToString (move m)
{
    
    //the only internal moves different to external are castling and promotions
    //internally: castling is king to rook sq
    //externally: castling is king src to king dest
    //for promotions, just add the promo letter i.e. fromToPromo
    std::string mv = "    ";
    std::string pieceletters = " nbrq";
    square from ,to;
    from = source_sq(m);
    to = destination_sq(m);
    mv[0] = square_to_file(from) + 'a';
    mv[1] = square_to_rank(from) + '1';
    mv[2] = square_to_file(to) + 'a';
    mv[3] = square_to_rank(to) + '1';
    
    if(move_flag(m) == promoting)
        mv += pieceletters[promo_pieceType(m)];
    
    if(move_flag(m) == castling){
        if(to == a1){
            mv[2] = 'c';
            mv[3] = '1';
        }
        else if(to == h1){
            mv[2] = 'g';
            mv[3] = '1';
        }
        else if(to == a8){
            mv[2] = 'c';
            mv[3] = '8';
        }
        else if(to == h8){
            mv[2] = 'g';
            mv[3] = '8';
        }
    }
    return mv;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %edx, %r14d
movq %rdi, %rbx
leaq 0xa86(%rip), %rsi       # 0x75cc
leaq 0x8(%rsp), %rdx
callq 0x26c4
leaq 0xa7a(%rip), %rsi       # 0x75d1
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x26c4
movl %r14d, %ecx
shrl $0x6, %ecx
movl %ecx, %eax
andl $0x3f, %eax
movl %r14d, %edx
andb $0x7, %dl
addb $0x61, %dl
movq (%rbx), %rsi
movb %dl, (%rsi)
movl %r14d, %edx
shrb $0x3, %dl
andb $0x7, %dl
addb $0x31, %dl
movq (%rbx), %rsi
movb %dl, 0x1(%rsi)
andb $0x7, %cl
addb $0x61, %cl
movq (%rbx), %rdx
movb %cl, 0x2(%rdx)
movl %eax, %ecx
shrl $0x3, %ecx
addb $0x31, %cl
movq (%rbx), %rdx
movb %cl, 0x3(%rdx)
movl %r14d, %ecx
shrl $0xe, %ecx
andl $0x3, %ecx
cmpl $0x2, %ecx
je 0x6bdb
cmpl $0x3, %ecx
jne 0x6c08
shrl $0xc, %r14d
andl $0x3, %r14d
movq 0x8(%rsp), %rax
movsbl 0x1(%rax,%r14), %esi
movq %rbx, %rdi
callq 0x2140
jmp 0x6c08
movb $0x31, %cl
movb $0x63, %dl
testl %eax, %eax
je 0x6bfc
cmpl $0x3f, %eax
je 0x6bf4
cmpl $0x38, %eax
je 0x6bfa
cmpl $0x7, %eax
je 0x6bf6
jmp 0x6c08
movb $0x38, %cl
movb $0x67, %dl
jmp 0x6bfc
movb $0x38, %cl
movq (%rbx), %rax
movb %dl, 0x2(%rax)
movq (%rbx), %rax
movb %cl, 0x3(%rax)
leaq 0x8(%rsp), %rdi
callq 0x2288
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x2288
jmp 0x6c2f
movq %rax, %r14
movq %rbx, %rdi
callq 0x2288
movq %r14, %rdi
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH04_Expressions/examples/arith-ex.cc
// Function: main
int main()
{
	cout << -30 * 3 + 21 / 5 << endl;
	
	cout << -30 + 3 * 21 / 5 << endl;
	
	cout << 30 / 3 * 21 % 5 << endl;
	
	cout << 30 / 3 * 21 % 4 << endl;
	
	cout << -30 / 3 * 21 % 4 << endl;
	
	cout << 12 / 3 * 4 + 5 * 15 + 24 % 4 / 2 << endl;
	
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x2e1f(%rip), %rbx      # 0x3fd8
pushq $-0x56
popq %rsi
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
pushq $-0x12
popq %rsi
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1060
movq %rax, %rdi
callq 0x1030
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
pushq $0x5b
popq %rsi
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ef-gy[P]libefgy/include/ef.gy/vector.h
// Function: std::basic_ostream<char, std::char_traits<char>>& efgy::math::operator<<<char, float, 2u, efgy::math::format::cartesian>(std::basic_ostream<char, std::char_traits<char>>&, efgy::math::vector<float, 2u, efgy::math::format::cartesian> const&)
std::basic_ostream<C> &operator<<(std::basic_ostream<C> &stream,
                                  const vector<F, n, format> &v) {
  stream << "(" << v.tag();
  for (unsigned int i = 0; i < n; i++) {
    stream << (i > 0 ? ", " : " ") << v[i];
  }
  return stream << ")";
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xc02a(%rip), %rsi      # 0x20ca6
callq 0x4290
leaq 0xc023(%rip), %rsi      # 0x20cab
movq %rax, %rdi
callq 0x4290
xorl %r15d, %r15d
leaq 0xc00e(%rip), %r12      # 0x20ca8
leaq 0xbe78(%rip), %r13      # 0x20b19
cmpq $0x2, %r15
je 0x14ccd
cmpq $0x1, %r15
movq %r13, %rsi
cmoveq %r12, %rsi
movq %rbx, %rdi
callq 0x4290
movss (%r14,%r15,4), %xmm0
movq %rax, %rdi
callq 0x4210
incq %r15
jmp 0x14ca1
leaq 0xbdca(%rip), %rsi      # 0x20a9e
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4290
nop
// File: /workspace/github_cpp_makefile_star2_O2/ef-gy[P]libefgy/include/ef.gy/colour-space-rgb.h
// Function: efgy::math::vector<float, 3u, efgy::math::format::RGB>::vector(efgy::math::vector<float, 3u, efgy::math::format::RGB> const&)
vector(const vector &v)
      : std::array<Q, 3>({v.red, v.green, v.blue}),
        red((*this)[0]),
        green((*this)[1]),
        blue((*this)[2]) {}

// Assembly:
movq 0x10(%rsi), %rax
movq 0x18(%rsi), %rcx
movss (%rax), %xmm0
movss (%rcx), %xmm1
movq 0x20(%rsi), %rax
movss (%rax), %xmm2
movss %xmm0, (%rdi)
leaq 0x4(%rdi), %rax
movss %xmm1, 0x4(%rdi)
leaq 0x8(%rdi), %rcx
movss %xmm2, 0x8(%rdi)
movq %rdi, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rcx, 0x20(%rdi)
retq
nop