LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: cpirc[P]Monochrome/src/tt.h
// Function: tt_depth(unsigned long)
inline int tt_depth(const std::uint64_t data) {
    int depth = (data >> TT_DEPTH_SHIFT) & TT_DEPTH_MASK;
    assert(depth >= 0);
    assert(depth < MAX_PLY);
    return depth;

    // return (data >> TT_DEPTH_SHIFT) & TT_DEPTH_MASK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
shrq $0x0, %rax
andq $0x7f, %rax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0x97f3
jmp 0x9812
leaq 0xa433(%rip), %rdi      # 0x13c2d
leaq 0xa437(%rip), %rsi      # 0x13c38
movl $0x63, %edx
leaq 0xa434(%rip), %rcx      # 0x13c41
callq 0x3150
cmpl $0x40, -0xc(%rbp)
jge 0x981a
jmp 0x9839
leaq 0xa442(%rip), %rdi      # 0x13c63
leaq 0xa410(%rip), %rsi      # 0x13c38
movl $0x64, %edx
leaq 0xa40d(%rip), %rcx      # 0x13c41
callq 0x3150
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: cpirc[P]Monochrome/src/position.cpp
// Function: init_keys()
void init_keys() {
    int i, j;
    for (i = 0; i < 16; ++i) {
        castle_keys[i] = get_rand64();
    }
    for (i = 0; i < 6; ++i) {
        for (j = 0; j < 64; ++j) {
            piece_sq_keys[i][j] = get_rand64();
        }
    }
    for (i = 0; i < 8; i++) {
        ep_keys[i] = get_rand64();
    }
    flip_key = get_rand64();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
cmpl $0x10, -0x4(%rbp)
jge 0x9967
callq 0xa760
movq %rax, %rdx
movslq -0x4(%rbp), %rcx
leaq 0x25a3e8(%rip), %rax    # 0x263d40
movq %rdx, (%rax,%rcx,8)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x993f
movl $0x0, -0x4(%rbp)
cmpl $0x6, -0x4(%rbp)
jge 0x99bb
movl $0x0, -0x8(%rbp)
cmpl $0x40, -0x8(%rbp)
jge 0x99ae
callq 0xa760
movq %rax, %rdx
movslq -0x4(%rbp), %rcx
leaq 0x2597ac(%rip), %rax    # 0x263140
shlq $0x9, %rcx
addq %rcx, %rax
movslq -0x8(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x997b
jmp 0x99b0
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x996e
movl $0x0, -0x4(%rbp)
cmpl $0x8, -0x4(%rbp)
jge 0x99ea
callq 0xa760
movq %rax, %rdx
movslq -0x4(%rbp), %rcx
leaq 0x25a3e5(%rip), %rax    # 0x263dc0
movq %rdx, (%rax,%rcx,8)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x99c2
callq 0xa760
movq %rax, 0x25a40a(%rip)    # 0x263e00
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: cpirc[P]Monochrome/src/position.cpp
// Function: calculate_key(Position&)
void calculate_key(Position &pos) {
    std::uint64_t pieces;

    pos.hash_key = 0;
    pieces = get_colour(pos, US);

    while (pieces) {
        Square sq = lsb(pieces);
        Piece pc = get_piece_on_square(pos, sq);

        pos.hash_key ^= piece_sq_keys[pc][sq];

        pieces &= pieces - 1;
    }

    pieces = get_colour(pos, THEM);

    while (pieces) {
        Square sq = lsb(pieces);
        Piece pc = get_piece_on_square(pos, sq);

        pos.hash_key ^= bswap(piece_sq_keys[pc][sq]);

        pieces &= pieces - 1;
    }

    pos.hash_key ^= castle_keys[pos.castle];

    if (pos.epsq != INVALID_SQUARE) {
        pos.hash_key ^= ep_keys[pos.epsq & 7];
    }

    if (pos.flipped) pos.hash_key ^= flip_key;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x4420
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x9a84
movq -0x10(%rbp), %rdi
callq 0x3e50
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x11(%rbp), %esi
callq 0x67b0
movb %al, -0x12(%rbp)
movzbl -0x12(%rbp), %eax
movl %eax, %ecx
leaq 0x2596e9(%rip), %rax    # 0x263140
shlq $0x9, %rcx
addq %rcx, %rax
movzbl -0x11(%rbp), %ecx
movq (%rax,%rcx,8), %rcx
movq -0x8(%rbp), %rax
xorq 0x48(%rax), %rcx
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
subq $0x1, %rax
andq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x9a27
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x4420
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x9afb
movq -0x10(%rbp), %rdi
callq 0x3e50
movb %al, -0x13(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x13(%rbp), %esi
callq 0x67b0
movb %al, -0x14(%rbp)
movzbl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x25967a(%rip), %rax    # 0x263140
shlq $0x9, %rcx
addq %rcx, %rax
movzbl -0x13(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x4470
movq %rax, %rcx
movq -0x8(%rbp), %rax
xorq 0x48(%rax), %rcx
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
subq $0x1, %rax
andq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x9a96
movq -0x8(%rbp), %rax
movzbl 0x40(%rax), %eax
movl %eax, %ecx
leaq 0x25a234(%rip), %rax    # 0x263d40
movq (%rax,%rcx,8), %rcx
movq -0x8(%rbp), %rax
xorq 0x48(%rax), %rcx
movq %rcx, 0x48(%rax)
movq -0x8(%rbp), %rax
movzbl 0x42(%rax), %eax
cmpl $0x40, %eax
je 0x9b4e
movq -0x8(%rbp), %rax
movzbl 0x42(%rax), %eax
andl $0x7, %eax
movslq %eax, %rcx
leaq 0x25a282(%rip), %rax    # 0x263dc0
movq (%rax,%rcx,8), %rcx
movq -0x8(%rbp), %rax
xorq 0x48(%rax), %rcx
movq %rcx, 0x48(%rax)
movq -0x8(%rbp), %rax
testb $0x1, 0x41(%rax)
je 0x9b6b
movq 0x25a2a1(%rip), %rcx    # 0x263e00
movq -0x8(%rbp), %rax
xorq 0x48(%rax), %rcx
movq %rcx, 0x48(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: cpirc[P]Monochrome/src/position.cpp
// Function: run_fen_parser_tests()
void run_fen_parser_tests() {
    Position tmp;

    init_keys();
    parse_fen_to_position((const char*)"rnbqkbnr//pppppppp//8//8//8//8//PPPPPPPP//RNBQKBNR w KQkq - 0 1", tmp);
    print_position_struct(tmp);
    parse_fen_to_position((const char*)"rnbqkbnr//pppppppp//8///8//4P3//8//PPPP1PPP//RNBQKBNR b KQkq e3 0 1", tmp);
    print_position_struct(tmp);
    parse_fen_to_position((const char*)"rnbqkbnr//pp1ppppp//8//2p5//4P3//8//PPPP1PPP//RNBQKBNR w KQkq c6 0 2", tmp);
    print_position_struct(tmp);
    parse_fen_to_position((const char*)"rnbqkbnr//pp1ppppp//8//2p5//4P3//5N2//PPPP1PPP//RNBQKB1R b Qkq - 1 2", tmp);
    print_position_struct(tmp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
leaq -0x68(%rbp), %rdi
callq 0x9870
callq 0x9930
jmp 0xa32b
leaq 0x9bc8(%rip), %rdi      # 0x13efa
leaq -0x68(%rbp), %rsi
callq 0x9b80
jmp 0xa33d
leaq -0x68(%rbp), %rdi
callq 0xa070
jmp 0xa348
leaq 0x9beb(%rip), %rdi      # 0x13f3a
leaq -0x68(%rbp), %rsi
callq 0x9b80
jmp 0xa35a
leaq -0x68(%rbp), %rdi
callq 0xa070
jmp 0xa365
leaq 0x9c12(%rip), %rdi      # 0x13f7e
leaq -0x68(%rbp), %rsi
callq 0x9b80
jmp 0xa377
leaq -0x68(%rbp), %rdi
callq 0xa070
jmp 0xa382
leaq 0x9c3a(%rip), %rdi      # 0x13fc3
leaq -0x68(%rbp), %rsi
callq 0x9b80
jmp 0xa394
leaq -0x68(%rbp), %rdi
callq 0xa070
jmp 0xa39f
leaq -0x68(%rbp), %rdi
callq 0x6b60
addq $0x80, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x6b60
movq -0x70(%rbp), %rdi
callq 0x3350
nop
// File: cpirc[P]Monochrome/src/position.cpp
// Function: repetitions(Position const&)
int repetitions(const Position &pos) {
    int count = 0;
    for (int i = pos.history.size() - 3; i >= 0; --i) {
        if (pos.history[i] == pos.history.back()) {
            count++;
        }
    }
    return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rdi
addq $0x50, %rdi
callq 0x6d10
subq $0x3, %rax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jl 0xa6e4
movq -0x8(%rbp), %rdi
addq $0x50, %rdi
movslq -0x10(%rbp), %rsi
callq 0xa970
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
addq $0x50, %rdi
callq 0xa990
movq %rax, %rcx
movq -0x18(%rbp), %rax
cmpq (%rcx), %rax
jne 0xa6d7
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xa6d9
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xa697
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: cpirc[P]Monochrome/src/misc.h
// Function: get_rand64()
inline std::uint64_t get_rand64() {
    static std::uniform_int_distribution<std::uint64_t> dist;
    std::uint64_t r;
    do {
        r = dist(rng);
    } while (!r);
    return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
cmpb $0x0, 0x2596a9(%rip)    # 0x263e18
jne 0xa79c
leaq 0x2596a0(%rip), %rdi    # 0x263e18
callq 0x3370
cmpl $0x0, %eax
je 0xa79c
leaq 0x25967f(%rip), %rdi    # 0x263e08
callq 0xa9d0
jmp 0xa790
leaq 0x259681(%rip), %rdi    # 0x263e18
callq 0x3140
jmp 0xa79e
leaq 0x259663(%rip), %rdi    # 0x263e08
leaq 0x257604(%rip), %rsi    # 0x261db0
callq 0xaa00
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xa79e
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x8(%rbp)
movl %eax, -0xc(%rbp)
leaq 0x259638(%rip), %rdi    # 0x263e18
callq 0x3130
movq -0x8(%rbp), %rdi
callq 0x3350
nop
// File: cpirc[P]Monochrome/src/search.cpp
// Function: next_move(SearchStack*, int&)
Move next_move(SearchStack* ss, int& size) {
    assert(ss);

    if (!size) return 0;

    // Find best move index
    int best_index = 0;
    for (int i = 1; i < size; ++i) {
        if (ss->score[i] > ss->score[best_index]) {
            best_index = i;
        }
    }

    // Store the best move to return
    Move best_move = ss->ml[best_index];

    // Reduce ml/score size
    --size;

    // Bring the last move to current index
    ss->ml[best_index] = ss->ml[size];
    ss->score[best_index] = ss->score[size];

    return best_move;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xb1d9
jmp 0xb1f8
leaq 0x8e81(%rip), %rdi      # 0x14061
leaq 0x8e7d(%rip), %rsi      # 0x14064
movl $0x4d, %edx
leaq 0x8ebd(%rip), %rcx      # 0x140b0
callq 0x3150
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jne 0xb20d
movl $0x0, -0x4(%rbp)
jmp 0xb2b5
movl $0x0, -0x1c(%rbp)
movl $0x1, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jge 0xb259
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl 0x404(%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
cmpl 0x404(%rcx,%rdx,4), %eax
jle 0xb24c
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0xb24e
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xb21b
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl 0x4(%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq (%rcx), %rcx
movl 0x4(%rax,%rcx,4), %edx
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl %edx, 0x4(%rax,%rcx,4)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq (%rcx), %rcx
movl 0x404(%rax,%rcx,4), %edx
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl %edx, 0x404(%rax,%rcx,4)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: cpirc[P]Monochrome/src/search.cpp
// Function: clear_ss(SearchStack*, int)
void clear_ss(SearchStack* ss, int size) {
    assert(ss);
    assert(size >= 0);

    for (std::uint8_t i = 0; i < size; ++i, ++ss) {
        ss->ply = i;
        ss->killers[0] = ss->killers[1] = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xb558
jmp 0xb577
leaq 0x8b02(%rip), %rdi      # 0x14061
leaq 0x8afe(%rip), %rsi      # 0x14064
movl $0x133, %edx            # imm = 0x133
leaq 0x8ba8(%rip), %rcx      # 0x1411a
callq 0x3150
cmpl $0x0, -0xc(%rbp)
jl 0xb57f
jmp 0xb59e
leaq 0x8bb6(%rip), %rdi      # 0x1413c
leaq 0x8ad7(%rip), %rsi      # 0x14064
movl $0x134, %edx            # imm = 0x134
leaq 0x8b81(%rip), %rcx      # 0x1411a
callq 0x3150
movb $0x0, -0xd(%rbp)
movzbl -0xd(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0xb5e8
movb -0xd(%rbp), %cl
movq -0x8(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x808(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x804(%rax)
movb -0xd(%rbp), %al
addb $0x1, %al
movb %al, -0xd(%rbp)
movq -0x8(%rbp), %rax
addq $0x818, %rax            # imm = 0x818
movq %rax, -0x8(%rbp)
jmp 0xb5a2
addq $0x10, %rsp
popq %rbp
retq
nop
// File: cpirc[P]Monochrome/src/search.cpp
// Function: set_stats(SearchStack*, Stats&)
void set_stats(SearchStack* ss, Stats& stats) {
    assert(ss);

    SearchStack* end = ss - ss->ply + MAX_PLY;
    for (; ss < end; ++ss) {
        ss->stats = &stats;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xb609
jmp 0xb628
leaq 0x8a51(%rip), %rdi      # 0x14061
leaq 0x8a4d(%rip), %rsi      # 0x14064
movl $0x13e, %edx            # imm = 0x13E
leaq 0x8b23(%rip), %rcx      # 0x14146
callq 0x3150
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
imulq $0x818, %rcx, %rcx      # imm = 0x818
addq %rcx, %rax
addq $0x20600, %rax          # imm = 0x20600
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0xb678
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x810(%rax)
movq -0x8(%rbp), %rax
addq $0x818, %rax            # imm = 0x818
movq %rax, -0x8(%rbp)
jmp 0xb64f
addq $0x20, %rsp
popq %rbp
retq
nop
// File: cpirc[P]Monochrome/src/tt.h
// Function: eval_to_tt(int, int)
inline int eval_to_tt(const int eval, const int ply) {
    assert(ply >= 0);

    if (eval >= INF - MAX_PLY) {
        return eval + ply;
    }
    if (eval <= -INF + MAX_PLY) {
        return eval - ply;
    }
    return eval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0xd286
jmp 0xd2a5
leaq 0x707d(%rip), %rdi      # 0x1430a
leaq 0x69a4(%rip), %rsi      # 0x13c38
movl $0x49, %edx
leaq 0x715a(%rip), %rcx      # 0x143fa
callq 0x3150
cmpl $0x74f0, -0x8(%rbp)     # imm = 0x74F0
jl 0xd2b9
movl -0x8(%rbp), %eax
addl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xd2d3
cmpl $0xffff8b10, -0x8(%rbp) # imm = 0xFFFF8B10
jg 0xd2cd
movl -0x8(%rbp), %eax
subl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xd2d3
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: cpirc[P]Monochrome/src/tt.h
// Function: eval_from_tt(int, int)
inline int eval_from_tt(const int eval, const int ply) {
    assert(ply >= 0);

    if (eval >= INF - MAX_PLY) {
        return eval - ply;
    }
    if (eval <= -INF + MAX_PLY) {
        return eval + ply;
    }
    return eval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0xd376
jmp 0xd395
leaq 0x6f8d(%rip), %rdi      # 0x1430a
leaq 0x68b4(%rip), %rsi      # 0x13c38
movl $0x55, %edx
leaq 0x6f83(%rip), %rcx      # 0x14313
callq 0x3150
cmpl $0x74f0, -0x8(%rbp)     # imm = 0x74F0
jl 0xd3a9
movl -0x8(%rbp), %eax
subl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xd3c3
cmpl $0xffff8b10, -0x8(%rbp) # imm = 0xFFFF8B10
jg 0xd3bd
movl -0x8(%rbp), %eax
addl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xd3c3
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: cpirc[P]Monochrome/src/tt.h
// Function: tt_eval(unsigned long)
inline int tt_eval(const std::uint64_t data) {
    int eval = (data >> TT_EVAL_SHIFT) & TT_EVAL_MASK;
    assert(eval <= INF + MAX_PLY);
    assert(eval >= -INF - MAX_PLY);
    // assert(eval <= INF);
    // assert(eval >= -INF);
    return eval;

    // return (data >> TT_EVAL_SHIFT) & TT_EVAL_MASK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
shrq $0x7, %rax
movabsq $0xffffffff, %rcx       # imm = 0xFFFFFFFF
andq %rcx, %rax
movl %eax, -0xc(%rbp)
cmpl $0x7570, -0xc(%rbp)     # imm = 0x7570
jg 0xd3ff
jmp 0xd41e
leaq 0x6f34(%rip), %rdi      # 0x1433a
leaq 0x682b(%rip), %rsi      # 0x13c38
movl $0x6d, %edx
leaq 0x6f37(%rip), %rcx      # 0x14350
callq 0x3150
cmpl $0xffff8a90, -0xc(%rbp) # imm = 0xFFFF8A90
jl 0xd429
jmp 0xd448
leaq 0x6f41(%rip), %rdi      # 0x14371
leaq 0x6801(%rip), %rsi      # 0x13c38
movl $0x6e, %edx
leaq 0x6f0d(%rip), %rcx      # 0x14350
callq 0x3150
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: cpirc[P]Monochrome/src/tt.h
// Function: tt_flag(unsigned long)
inline int tt_flag(const std::uint64_t data) {
    int flag = (data >> TT_FLAG_SHIFT) & TT_FLAG_MASK;
    assert(flag == TT_EXACT || flag == TT_LOWER || flag == TT_UPPER);
    return flag;

    // return (data >> TT_FLAG_SHIFT) & TT_FLAG_MASK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
shrq $0x27, %rax
andq $0x3, %rax
movl %eax, -0xc(%rbp)
movb $0x1, %al
cmpl $0x2, -0xc(%rbp)
movb %al, -0xd(%rbp)
je 0xd49b
movb $0x1, %al
cmpl $0x0, -0xc(%rbp)
movb %al, -0xd(%rbp)
je 0xd49b
cmpl $0x1, -0xc(%rbp)
sete %al
movb %al, -0xd(%rbp)
movb -0xd(%rbp), %al
testb $0x1, %al
jne 0xd4a4
jmp 0xd4a6
jmp 0xd4c5
leaq 0x6edb(%rip), %rdi      # 0x14388
leaq 0x6784(%rip), %rsi      # 0x13c38
movl $0x79, %edx
leaq 0x6f01(%rip), %rcx      # 0x143c1
callq 0x3150
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: cpirc[P]Monochrome/src/tt.cpp
// Function: tt_create(TT*, unsigned int)
bool tt_create(TT* tt, const std::uint32_t megabytes) {
    assert(tt);

    if (megabytes <= 0) {
        return false;
    } else if (megabytes > 512) {
        return false;
    }

    int num_entries = 1024 * 1024 * megabytes / sizeof(TTEntry);

    assert(num_entries * sizeof(TTEntry) <= 1024 * 1024 * megabytes);

    tt->data = (TTEntry*)malloc(num_entries * sizeof(TTEntry));

    if (tt->data) {
        tt->size = num_entries;
        return true;
    }

    tt->size = 0;
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xf228
jmp 0xf247
leaq 0x4961(%rip), %rdi      # 0x13b90
leaq 0x51e9(%rip), %rsi      # 0x1441f
movl $0x21, %edx
leaq 0x51e8(%rip), %rcx      # 0x1442a
callq 0x3150
cmpl $0x0, -0x14(%rbp)
ja 0xf256
movb $0x0, -0x1(%rbp)
jmp 0xf2ef
cmpl $0x200, -0x14(%rbp)     # imm = 0x200
jbe 0xf268
movb $0x0, -0x1(%rbp)
jmp 0xf2ef
jmp 0xf26a
movl -0x14(%rbp), %eax
shll $0x14, %eax
movl %eax, %eax
shrq $0x4, %rax
movl %eax, -0x18(%rbp)
movslq -0x18(%rbp), %rax
shlq $0x4, %rax
movl -0x14(%rbp), %ecx
shll $0x14, %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
ja 0xf290
jmp 0xf2af
leaq 0x51bd(%rip), %rdi      # 0x14454
leaq 0x5181(%rip), %rsi      # 0x1441f
movl $0x2b, %edx
leaq 0x5180(%rip), %rcx      # 0x1442a
callq 0x3150
movslq -0x18(%rbp), %rdi
shlq $0x4, %rdi
callq 0x3260
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xf2e1
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0xf2ef
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: cpirc[P]Monochrome/src/tt.cpp
// Function: tt_poll(TT*, unsigned long)
TTEntry tt_poll(TT* tt, const std::uint64_t key) {
    assert(tt);
    assert(tt->size);
    assert(tt->data);

    int index = key % tt->size;

    assert(index < tt->size);

    return tt->data[index];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xf319
jmp 0xf338
leaq 0x4870(%rip), %rdi      # 0x13b90
leaq 0x50f8(%rip), %rsi      # 0x1441f
movl $0x39, %edx
leaq 0x515a(%rip), %rcx      # 0x1448d
callq 0x3150
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0xf343
jmp 0xf362
leaq 0x517f(%rip), %rdi      # 0x144c9
leaq 0x50ce(%rip), %rsi      # 0x1441f
movl $0x3a, %edx
leaq 0x5130(%rip), %rcx      # 0x1448d
callq 0x3150
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xf36f
jmp 0xf38e
leaq 0x5142(%rip), %rdi      # 0x144b8
leaq 0x50a2(%rip), %rsi      # 0x1441f
movl $0x3b, %edx
leaq 0x5104(%rip), %rcx      # 0x1448d
callq 0x3150
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq (%rcx), %rcx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jge 0xf3b0
jmp 0xf3cf
leaq 0x510a(%rip), %rdi      # 0x144c1
leaq 0x5061(%rip), %rsi      # 0x1441f
movl $0x3f, %edx
leaq 0x50c3(%rip), %rcx      # 0x1448d
callq 0x3150
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x24(%rbp), %rcx
shlq $0x4, %rcx
movups (%rax,%rcx), %xmm0
movaps %xmm0, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: cpirc[P]Monochrome/src/tt.cpp
// Function: tt_clear(TT*)
bool tt_clear(TT* tt) {
    assert(tt);

    if (!tt->data) {
        return false;
    }

    memset(tt->data, 0, tt->size * sizeof(TTEntry));
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xf415
jmp 0xf434
leaq 0x4774(%rip), %rdi      # 0x13b90
leaq 0x4ffc(%rip), %rsi      # 0x1441f
movl $0x45, %edx
leaq 0x50a3(%rip), %rcx      # 0x144d2
callq 0x3150
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0xf445
movb $0x0, -0x1(%rbp)
jmp 0xf463
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movslq (%rax), %rdx
shlq $0x4, %rdx
xorl %esi, %esi
callq 0x30f0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nop
// File: cpirc[P]Monochrome/src/tt.cpp
// Function: tt_free(TT*)
bool tt_free(TT* tt) {
    assert(tt);

    if (!tt->data) {
        return false;
    }

    tt->size = 0;
    free(tt->data);
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xf485
jmp 0xf4a4
leaq 0x4704(%rip), %rdi      # 0x13b90
leaq 0x4f8c(%rip), %rsi      # 0x1441f
movl $0x50, %edx
leaq 0x5047(%rip), %rcx      # 0x144e6
callq 0x3150
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0xf4b5
movb $0x0, -0x1(%rbp)
jmp 0xf4d0
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3220
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: cpirc[P]Monochrome/src/tt.cpp
// Function: tt_add(TT*, unsigned long, int, int, int, int)
bool tt_add(TT* tt, const std::uint64_t hash_key, const int move,
            const int depth, const int flag, const int eval) {
    assert(tt);
    assert(move != 0);
    assert(depth >= 0);
    assert(flag == TT_EXACT || flag == TT_LOWER || flag == TT_UPPER);

    if (!tt->data) {
        return false;
    }

    int index = hash_key % tt->size;

    TTEntry entry;
    entry.data = 0ULL;
    entry.hash_key = hash_key;

    entry.data = ((std::uint64_t)(move & TT_MOVE_MASK) << TT_MOVE_SHIFT) |
                 ((std::uint64_t)(depth & TT_DEPTH_MASK) << TT_DEPTH_SHIFT) |
                 ((std::uint64_t)(flag & TT_FLAG_MASK) << TT_FLAG_SHIFT) |
                 ((std::uint64_t)(eval & TT_EVAL_MASK) << TT_EVAL_SHIFT);

    tt->data[index] = entry;

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xf507
jmp 0xf526
leaq 0x4682(%rip), %rdi      # 0x13b90
leaq 0x4f0a(%rip), %rsi      # 0x1441f
movl $0x5d, %edx
leaq 0x4fd8(%rip), %rcx      # 0x144f9
callq 0x3150
cmpl $0x0, -0x1c(%rbp)
je 0xf52e
jmp 0xf54d
leaq 0x5017(%rip), %rdi      # 0x1454c
leaq 0x4ee3(%rip), %rsi      # 0x1441f
movl $0x5e, %edx
leaq 0x4fb1(%rip), %rcx      # 0x144f9
callq 0x3150
cmpl $0x0, -0x20(%rbp)
jl 0xf555
jmp 0xf574
leaq 0x46d1(%rip), %rdi      # 0x13c2d
leaq 0x4ebc(%rip), %rsi      # 0x1441f
movl $0x5f, %edx
leaq 0x4f8a(%rip), %rcx      # 0x144f9
callq 0x3150
movb $0x1, %al
cmpl $0x2, -0x24(%rbp)
movb %al, -0x41(%rbp)
je 0xf594
movb $0x1, %al
cmpl $0x0, -0x24(%rbp)
movb %al, -0x41(%rbp)
je 0xf594
cmpl $0x1, -0x24(%rbp)
sete %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0xf59d
jmp 0xf59f
jmp 0xf5be
leaq 0x4de2(%rip), %rdi      # 0x14388
leaq 0x4e72(%rip), %rsi      # 0x1441f
movl $0x60, %edx
leaq 0x4f40(%rip), %rcx      # 0x144f9
callq 0x3150
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0xf5d2
movb $0x0, -0x1(%rbp)
jmp 0xf65e
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq (%rcx), %rcx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x2c(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x1c(%rbp), %eax
andl $0x3ffff, %eax          # imm = 0x3FFFF
cltq
shlq $0x29, %rax
movl -0x20(%rbp), %ecx
andl $0x7f, %ecx
movslq %ecx, %rcx
shlq $0x0, %rcx
orq %rcx, %rax
movl -0x24(%rbp), %ecx
andl $0x3, %ecx
movslq %ecx, %rcx
shlq $0x27, %rcx
orq %rcx, %rax
movl -0x28(%rbp), %ecx
andl $-0x1, %ecx
movl %ecx, %ecx
shlq $0x7, %rcx
orq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x40(%rbp), %rcx
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x8(%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: cpirc[P]Monochrome/src/tt.cpp
// Function: tt_add_perft(TT*, unsigned long, int, unsigned long)
bool tt_add_perft(TT* tt, const std::uint64_t hash_key, const int depth,
                  const uint64_t nodes) {
    assert(tt);
    assert(depth != 0);

    if (!tt->data) {
        return false;
    }

    int index = hash_key % tt->size;

    TTEntry entry;
    entry.data = 0ULL;
    entry.hash_key = hash_key;

    entry.data = ((std::uint64_t)(depth & TT_DEPTH_MASK) << TT_DEPTH_SHIFT) |
                 ((std::uint64_t)(nodes & TT_NODES_MASK) << TT_NODES_SHIFT);

    tt->data[index] = entry;

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xf690
jmp 0xf6af
leaq 0x44f9(%rip), %rdi      # 0x13b90
leaq 0x4d81(%rip), %rsi      # 0x1441f
movl $0x78, %edx
leaq 0x4eac(%rip), %rcx      # 0x14556
callq 0x3150
cmpl $0x0, -0x1c(%rbp)
je 0xf6b7
jmp 0xf6d6
leaq 0x4ee0(%rip), %rdi      # 0x1459e
leaq 0x4d5a(%rip), %rsi      # 0x1441f
movl $0x79, %edx
leaq 0x4e85(%rip), %rcx      # 0x14556
callq 0x3150
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0xf6e7
movb $0x0, -0x1(%rbp)
jmp 0xf757
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq (%rcx), %rcx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x2c(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x1c(%rbp), %eax
andl $0x7f, %eax
cltq
shlq $0x0, %rax
movabsq $0x1ffffffffffffff, %rcx # imm = 0x1FFFFFFFFFFFFFF
andq -0x28(%rbp), %rcx
shlq $0x7, %rcx
orq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x40(%rbp), %rcx
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x8(%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: cpirc[P]Monochrome/src/uci.cpp
// Function: UCI::Extension::perft(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>&)
void perft(std::stringstream& ss) {
    int depth = 0;
    ss >> depth;
    if (depth < 1) {
        depth = 1;
    }

    std::uint64_t nodes = 0ULL;
    for (int i = 1; i <= depth; ++i) {
        auto start = std::chrono::high_resolution_clock::now();
        nodes = perft(sc.pos, i);
        auto finish = std::chrono::high_resolution_clock::now();
        std::chrono::duration<double> elapsed = finish - start;

        std::cout << "info"
                  << " depth " << i << " nodes " << nodes << " time "
                  << static_cast<int>(elapsed.count() * 1000) << " nps "
                  << static_cast<int>(nodes / elapsed.count()) << std::endl;
    }

    std::cout << "nodes " << nodes << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rdi
leaq -0xc(%rbp), %rsi
callq 0x3110
cmpl $0x1, -0xc(%rbp)
jge 0xf7bd
movl $0x1, -0xc(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jg 0xf91a
callq 0x3040
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %esi
leaq 0x2580d5(%rip), %rdi    # 0x2678c0
callq 0x93b0
movq %rax, -0x18(%rbp)
callq 0x3040
movq %rax, -0x30(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x10970
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
movq %rdi, -0x60(%rbp)
leaq -0x40(%rbp), %rsi
callq 0x109c0
movq 0xb7aa(%rip), %rdi      # 0x1afd0
leaq 0x4db3(%rip), %rsi      # 0x145e0
callq 0x31e0
movq %rax, %rdi
leaq 0x4da9(%rip), %rsi      # 0x145e5
callq 0x31e0
movq %rax, %rdi
movl -0x1c(%rbp), %esi
callq 0x3330
movq %rax, %rdi
leaq 0x4d97(%rip), %rsi      # 0x145ed
callq 0x31e0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x3070
movq %rax, %rdi
leaq 0x4d84(%rip), %rsi      # 0x145f5
callq 0x31e0
movq -0x60(%rbp), %rdi
movq %rax, -0x58(%rbp)
callq 0x10a00
movq -0x58(%rbp), %rdi
movsd 0x4d21(%rip), %xmm1     # 0x145b0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %esi
callq 0x3330
movq %rax, %rdi
leaq 0x4d56(%rip), %rsi      # 0x145fc
callq 0x31e0
movq %rax, -0x50(%rbp)
movaps 0x4d0a(%rip), %xmm1     # 0x145c0
movq -0x18(%rbp), %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x4d09(%rip), %xmm1     # 0x145d0
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x10a00
movq -0x50(%rbp), %rdi
movaps %xmm0, %xmm1
movsd -0x48(%rbp), %xmm0
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %esi
callq 0x3330
movq %rax, %rdi
movq 0xb6a9(%rip), %rsi      # 0x1afb0
callq 0x3200
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xf7cc
movq 0xb6af(%rip), %rdi      # 0x1afd0
leaq 0x4cc6(%rip), %rsi      # 0x145ee
callq 0x31e0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x3070
movq %rax, %rdi
movq 0xb66d(%rip), %rsi      # 0x1afb0
callq 0x3200
addq $0x60, %rsp
popq %rbp
retq
nop
// File: cpirc[P]Monochrome/src/uci.cpp
// Function: UCI::moves(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>&)
void moves(std::stringstream& ss) {
    std::string word;
    while (ss >> word) {
        Move move;
        if (!lan_to_move(sc.pos, word.c_str(), move)) {
            return;
        }

        char move_str[5];
        move_to_lan(move_str, move);

        if (sc.pos.flipped) {
            move = flip_move(move);
        }

        make_move(sc.pos, move);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3290
movq -0x8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x3240
movq %rax, -0x50(%rbp)
jmp 0x101b8
movq -0x50(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3230
movb %al, -0x51(%rbp)
jmp 0x101d0
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0x101dc
jmp 0x10266
leaq -0x28(%rbp), %rdi
callq 0x30c0
movq %rax, %rsi
leaq 0x2576d1(%rip), %rdi    # 0x2678c0
leaq -0x38(%rbp), %rdx
callq 0x5f10
movb %al, -0x52(%rbp)
jmp 0x101fd
movb -0x52(%rbp), %al
testb $0x1, %al
jne 0x10226
jmp 0x10206
movl $0x1, -0x3c(%rbp)
jmp 0x1026d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3120
jmp 0x1027c
movl -0x38(%rbp), %esi
leaq -0x41(%rbp), %rdi
callq 0x5ca0
jmp 0x10234
testb $0x1, 0x2576c6(%rip)    # 0x267901
je 0x10250
movl -0x38(%rbp), %edi
callq 0x69d0
movl %eax, -0x58(%rbp)
jmp 0x1024a
movl -0x58(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %esi
leaq 0x257666(%rip), %rdi    # 0x2678c0
callq 0x5900
jmp 0x10261
jmp 0x101a5
movl $0x0, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3120
addq $0x60, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x3350
nopw %cs:(%rax,%rax)
// File: cpirc[P]Monochrome/src/uci.cpp
// Function: UCI::position(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>&)
void position(std::stringstream& ss) {
    std::string fen = "";

    std::string word;
    while (ss >> word && word != "moves") {
        if (word == "startpos") {
            fen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
        } else if (word != "fen") {
            if (fen != "") {
                fen += " ";
            }
            fen += word;
        }
    }

    if (fen != "") {
        parse_fen_to_position(fen.c_str(), sc.pos);
    }

    moves(ss);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x3360
movq -0x68(%rbp), %rdx
leaq 0x370b(%rip), %rsi      # 0x139c2
leaq -0x28(%rbp), %rdi
callq 0x3280
jmp 0x102c2
leaq -0x29(%rbp), %rdi
callq 0x3210
leaq -0x60(%rbp), %rdi
callq 0x3290
movq -0x8(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3240
movq %rax, -0x70(%rbp)
jmp 0x102e7
movq -0x70(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3230
movb %al, -0x71(%rbp)
jmp 0x102ff
movb -0x71(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x72(%rbp)
jne 0x1030e
jmp 0x1032b
leaq 0x4368(%rip), %rsi      # 0x1467d
leaq -0x60(%rbp), %rdi
callq 0x10a20
movb %al, -0x73(%rbp)
jmp 0x10323
movb -0x73(%rbp), %al
movb %al, -0x72(%rbp)
jmp 0x1032b
movb -0x72(%rbp), %al
testb $0x1, %al
jne 0x10337
jmp 0x10411
leaq 0x4345(%rip), %rsi      # 0x14683
leaq -0x60(%rbp), %rdi
callq 0x58d0
movb %al, -0x74(%rbp)
jmp 0x1034c
movb -0x74(%rbp), %al
testb $0x1, %al
jne 0x10355
jmp 0x103a9
leaq 0x42a6(%rip), %rsi      # 0x14602
leaq -0x28(%rbp), %rdi
callq 0x3270
jmp 0x10367
jmp 0x1040c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x29(%rbp), %rdi
callq 0x3210
jmp 0x10471
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x3120
leaq -0x28(%rbp), %rdi
callq 0x3120
jmp 0x10471
leaq 0x42dc(%rip), %rsi      # 0x1468c
leaq -0x60(%rbp), %rdi
callq 0x10a20
movb %al, -0x75(%rbp)
jmp 0x103be
movb -0x75(%rbp), %al
testb $0x1, %al
jne 0x103c7
jmp 0x1040a
leaq 0x35f4(%rip), %rsi      # 0x139c2
leaq -0x28(%rbp), %rdi
callq 0x10a20
movb %al, -0x76(%rbp)
jmp 0x103dc
movb -0x76(%rbp), %al
testb $0x1, %al
jne 0x103e5
jmp 0x103f9
leaq 0x3a1f(%rip), %rsi      # 0x13e0b
leaq -0x28(%rbp), %rdi
callq 0x31d0
jmp 0x103f7
jmp 0x103f9
leaq -0x28(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3250
jmp 0x10408
jmp 0x1040a
jmp 0x1040c
jmp 0x102d4
leaq 0x35aa(%rip), %rsi      # 0x139c2
leaq -0x28(%rbp), %rdi
callq 0x10a20
movb %al, -0x77(%rbp)
jmp 0x10426
movb -0x77(%rbp), %al
testb $0x1, %al
jne 0x1042f
jmp 0x1044b
leaq -0x28(%rbp), %rdi
callq 0x30c0
movq %rax, %rdi
leaq 0x25747e(%rip), %rsi    # 0x2678c0
callq 0x9b80
jmp 0x10449
jmp 0x1044b
movq -0x8(%rbp), %rdi
callq 0x10190
jmp 0x10456
leaq -0x60(%rbp), %rdi
callq 0x3120
leaq -0x28(%rbp), %rdi
callq 0x3120
addq $0x80, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x3350
nopw (%rax,%rax)
// File: olly-larkin[P]mips-parser/src/main.cpp
// Function: formatName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string formatName(std::string str) {
	std::size_t dotIndex = str.size();
	std::size_t slashIndex = -1;
	for(int i = str.size()-1; i >= 0; --i) {
		if (str[i] == '.' && dotIndex == str.size())
			dotIndex = i;
		if (str[i] == '/' && slashIndex == -1)
			slashIndex = i;
	}
	return str.substr(slashIndex+1, (dotIndex - slashIndex - 1)) + ".bin";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rsi, -0x60(%rbp)
movq %rdi, %rax
movq -0x60(%rbp), %rdi
movq %rax, -0x70(%rbp)
movq %rax, %rcx
movq %rcx, -0x68(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
callq 0x31e0
movq -0x60(%rbp), %rdi
movq %rax, -0x18(%rbp)
movq $-0x1, -0x20(%rbp)
callq 0x31e0
subq $0x1, %rax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jl 0x58bb
movq -0x60(%rbp), %rdi
movslq -0x24(%rbp), %rsi
callq 0x3470
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x588a
movq -0x60(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x78(%rbp)
callq 0x31e0
movq %rax, %rcx
movq -0x78(%rbp), %rax
cmpq %rcx, %rax
jne 0x588a
movslq -0x24(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x60(%rbp), %rdi
movslq -0x24(%rbp), %rsi
callq 0x3470
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x58ae
cmpq $-0x1, -0x20(%rbp)
jne 0x58ae
movslq -0x24(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x58b0
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x584a
movq -0x60(%rbp), %rsi
movq -0x20(%rbp), %rcx
movq %rcx, %rdx
incq %rdx
movq -0x18(%rbp), %rax
notq %rcx
addq %rax, %rcx
leaq -0x48(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x3270
movq -0x70(%rbp), %rdi
movq -0x80(%rbp), %rsi
leaq 0xd7f1(%rip), %rdx      # 0x130e0
callq 0x5a30
jmp 0x58f6
leaq -0x48(%rbp), %rdi
callq 0x31a0
movq -0x68(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x31a0
movq -0x50(%rbp), %rdi
callq 0x3420
nopw (%rax,%rax)
// File: olly-larkin[P]mips-parser/src/parser.cpp
// Function: validIntStr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int&)
bool validIntStr(std::string arg, int32_t& returnVal){
    std::size_t pos;
    returnVal = std::stoi(arg, &pos,0);
    if(pos != arg.length()){
        return false;
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x30(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0x20(%rbp), %rsi
xorl %edx, %edx
callq 0x7450
movq -0x30(%rbp), %rdi
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x3390
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
je 0x5ffa
movb $0x0, -0x1(%rbp)
jmp 0x5ffe
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: olly-larkin[P]mips-parser/src/parser.cpp
// Function: vecParser(std::istream&, std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>&)
void vecParser(std::istream& inStream, std::vector< std::vector<std::string> >& commVector) {
    std::string inComm;
    unsigned int count = 0x10000000;

    while(1) {
        if (!(inStream >> inComm) || !(addVec(inStream, commVector, count, inComm)))
            break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3340
movl $0x10000000, -0x34(%rbp) # imm = 0x10000000
jmp 0x6035
movq -0x8(%rbp), %rdi
movb $0x0, -0x69(%rbp)
leaq -0x30(%rbp), %rsi
callq 0x32f0
movq %rax, -0x78(%rbp)
jmp 0x604c
movq -0x78(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3140
movb %al, -0x79(%rbp)
jmp 0x6064
movb -0x79(%rbp), %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x7a(%rbp)
jne 0x60ca
jmp 0x6073
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3120
jmp 0x6098
movq -0x88(%rbp), %rsi
movq -0x90(%rbp), %rdi
movb $0x1, -0x69(%rbp)
leaq -0x34(%rbp), %rdx
leaq -0x68(%rbp), %rcx
callq 0x6150
movb %al, -0x91(%rbp)
jmp 0x60bf
movb -0x91(%rbp), %al
xorb $-0x1, %al
movb %al, -0x7a(%rbp)
movb -0x7a(%rbp), %al
movb %al, -0x92(%rbp)
testb $0x1, -0x69(%rbp)
jne 0x60db
jmp 0x60e4
leaq -0x68(%rbp), %rdi
callq 0x31a0
movb -0x92(%rbp), %al
testb $0x1, %al
jne 0x60f0
jmp 0x611f
jmp 0x6124
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x6136
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
testb $0x1, -0x69(%rbp)
jne 0x6114
jmp 0x611d
leaq -0x68(%rbp), %rdi
callq 0x31a0
jmp 0x6136
jmp 0x6033
leaq -0x30(%rbp), %rdi
callq 0x31a0
addq $0xa0, %rsp
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x31a0
movq -0x40(%rbp), %rdi
callq 0x3420
nopl (%rax,%rax)
// File: olly-larkin[P]mips-parser/src/parser.cpp
// Function: binGen(std::basic_ofstream<char, std::char_traits<char>>&, std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>&)
void binGen(std::ofstream& outStream, std::vector< std::vector<std::string> >& commVector) {
    for(int i = 0; i < commVector.size(); ++i) {
        char memBlock[4];
        uint32_t val = commMap[commVector[i][0]].fn(commVector[i], i);
        fillMem(memBlock, val);
        outStream.write(memBlock, 4);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7bd0
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jae 0x6e6c
movq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rsi
callq 0x7c00
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x7c20
movq %rax, %rsi
leaq 0x14451(%rip), %rdi     # 0x1b268
callq 0x7af0
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rsi
callq 0x7c00
movq %rax, %rdi
movq -0x30(%rbp), %rax
movl -0x14(%rbp), %esi
callq *%rax
movl %eax, -0x1c(%rbp)
leaq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x6e80
movq -0x8(%rbp), %rdi
leaq -0x18(%rbp), %rsi
movl $0x4, %edx
callq 0x3310
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6dd7
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: olly-larkin[P]mips-parser/src/parser.cpp
// Function: labelReturn(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int&)
bool labelReturn(std::string str, int32_t& addr) {
    if (labelMap.find(str) == labelMap.end())
        return false;
    addr = labelMap[str];
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rsi, %rax
movq %rdi, %rsi
movq %rsi, -0x30(%rbp)
movq %rsi, -0x10(%rbp)
movq %rax, -0x18(%rbp)
leaq 0x14397(%rip), %rdi     # 0x1b298
callq 0x7c70
movq %rax, -0x20(%rbp)
leaq 0x14387(%rip), %rdi     # 0x1b298
callq 0x7ca0
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x7c40
testb $0x1, %al
jne 0x6f2d
jmp 0x6f33
movb $0x0, -0x1(%rbp)
jmp 0x6f4f
movq -0x30(%rbp), %rsi
leaq 0x1435a(%rip), %rdi     # 0x1b298
callq 0x74c0
movl (%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: olly-larkin[P]mips-parser/src/instructionList.cpp
// Function: giveStr(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
std::string giveStr(std::vector<std::string> strVec) {
    std::string returnStr;
    for(int i = 0; i < strVec.size(); ++i) {
        returnStr += strVec[i] + ' ';
    }
    return returnStr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rsi, -0x60(%rbp)
movq %rdi, -0x58(%rbp)
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x3340
movl $0x0, -0x18(%rbp)
movq -0x60(%rbp), %rdi
movslq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
callq 0xb9b0
movq %rax, %rcx
movq -0x68(%rbp), %rax
cmpq %rcx, %rax
jae 0xcae4
movq -0x60(%rbp), %rdi
movslq -0x18(%rbp), %rsi
callq 0x7c20
movq %rax, %rsi
leaq -0x38(%rbp), %rdi
movl $0x20, %edx
callq 0x10df0
jmp 0xca9c
movq -0x58(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3300
jmp 0xcaab
leaq -0x38(%rbp), %rdi
callq 0x31a0
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xca5f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xcb01
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x31a0
jmp 0xcb01
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0xcaf7
movq -0x58(%rbp), %rdi
callq 0x31a0
movq -0x50(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x31a0
movq -0x40(%rbp), %rdi
callq 0x3420
nopw %cs:(%rax,%rax)
// File: olly-larkin[P]mips-parser/src/instructionList.cpp
// Function: regCheck(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, std::vector<int, std::allocator<int>> const&)
bool regCheck(std::vector<std::string>& argVec, const std::vector<int>& index) {
    for(int i = 0; i < index.size(); ++i) {
        if (argVec[index[i]].back() == ',')
            argVec[index[i]].pop_back();
        if (regMap.find(argVec[index[i]]) == regMap.end())
            return false;
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movslq -0x1c(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0x10e70
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
jae 0xcc1f
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x10e90
movq -0x40(%rbp), %rdi
movslq (%rax), %rsi
callq 0x7c20
movq %rax, %rdi
callq 0x31f0
movsbl (%rax), %eax
cmpl $0x2c, %eax
jne 0xcbb2
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x10e90
movq -0x48(%rbp), %rdi
movslq (%rax), %rsi
callq 0x7c20
movq %rax, %rdi
callq 0x32d0
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x10e90
movq -0x50(%rbp), %rdi
movslq (%rax), %rsi
callq 0x7c20
movq %rax, %rsi
leaq 0xe6f3(%rip), %rdi      # 0x1b2d0
callq 0x7c70
movq %rax, -0x28(%rbp)
leaq 0xe6e3(%rip), %rdi      # 0x1b2d0
callq 0x7ca0
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x7c40
testb $0x1, %al
jne 0xcc09
jmp 0xcc0f
movb $0x0, -0x1(%rbp)
jmp 0xcc23
jmp 0xcc11
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xcb37
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nop