LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: jswaff[P]prophet3/src/eval.cpp
// Function: eval_rook_open_file(position*, square_t, bool)
int32 eval_rook_open_file(position *p,square_t sq,bool wtm) {
    int32 score = 0;

    uint64 friends,enemies;
    if (wtm) {
        friends = p->white_pawns;
        enemies = p->black_pawns;
    } else {
        friends = p->black_pawns;
        enemies = p->white_pawns;
    }

    uint64 file_mask = bb_files[get_file(sq)] ^ bb_squares[sq];
    if (!(file_mask & friends)) {
        if (file_mask & enemies) {
            score += rook_half_open_file;
        } else {
            score += rook_open_file;
        }
    }

    return score;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
andb $0x1, %al
movb %al, -0xd(%rbp)
movl $0x0, -0x14(%rbp)
testb $0x1, -0xd(%rbp)
je 0x6d23
movq -0x8(%rbp), %rax
movq 0x158(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x6d41
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x158(%rax), %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %edi
callq 0x12070
movl %eax, %eax
movl %eax, %ecx
leaq 0xfe89c(%rip), %rax     # 0x1055f0
movq (%rax,%rcx,8), %rax
movl -0xc(%rbp), %ecx
movl %ecx, %edx
leaq 0xfe90c(%rip), %rcx     # 0x105670
xorq (%rcx,%rdx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
andq -0x20(%rbp), %rax
cmpq $0x0, %rax
jne 0x6d9e
movq -0x30(%rbp), %rax
andq -0x28(%rbp), %rax
cmpq $0x0, %rax
je 0x6d93
movl -0x14(%rbp), %eax
addl $0xf, %eax
movl %eax, -0x14(%rbp)
jmp 0x6d9c
movl -0x14(%rbp), %eax
addl $0x19, %eax
movl %eax, -0x14(%rbp)
jmp 0x6d9e
movl -0x14(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: jswaff[P]prophet3/src/eval.cpp
// Function: eval_rooks(position*)
int32 eval_rooks(position *p) {
    int32 score = 0;

    uint64 pmap = p->white_rooks;
    while (pmap) {
        square_t sq = (square_t)get_msb(pmap);
        score += eval_rook(p,sq,true);
        pmap ^= bb_squares[sq];
    }

    pmap = p->black_rooks;
    while (pmap) {
        square_t sq = (square_t)get_lsb(pmap);
        score -= eval_rook(p,sq,false);
        pmap ^= bb_squares[sq];
    }

    return score;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x188(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x6e16
movq -0x18(%rbp), %rdi
callq 0x4a00
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl $0x1, %edx
callq 0x6e80
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0xfe868(%rip), %rax     # 0x105670
movq (%rax,%rcx,8), %rax
xorq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x6dd2
movq -0x8(%rbp), %rax
movq 0x190(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x6e6a
movq -0x18(%rbp), %rdi
callq 0x4870
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl -0x20(%rbp), %esi
xorl %edx, %edx
callq 0x6e80
movl %eax, %ecx
movl -0xc(%rbp), %eax
subl %ecx, %eax
movl %eax, -0xc(%rbp)
movl -0x20(%rbp), %eax
movl %eax, %ecx
leaq 0xfe814(%rip), %rax     # 0x105670
movq (%rax,%rcx,8), %rax
xorq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x6e25
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jswaff[P]prophet3/src/eval.cpp
// Function: eval_rook(position*, square_t, bool)
int32 eval_rook(position *p,square_t sq,bool wtm) {
    int32 score = wtm ? rook_pst[sq] : rook_pst[fliprank[sq]];
    score += eval_major_on_7th(p,sq,wtm);
    score += eval_rook_open_file(p,sq,wtm);
    return score;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
andb $0x1, %al
movb %al, -0xd(%rbp)
testb $0x1, -0xd(%rbp)
je 0x6eb0
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x2edf8(%rip), %rax     # 0x35ca0
movl (%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
jmp 0x6ecd
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x2e9e4(%rip), %rax     # 0x358a0
movslq (%rax,%rcx,4), %rcx
leaq 0x2edd9(%rip), %rax     # 0x35ca0
movl (%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movb -0xd(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x6990
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movb -0xd(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x6ce0
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: jswaff[P]prophet3/src/eval.cpp
// Function: eval_queens(position*)
int32 eval_queens(position *p) {
    int32 score = 0;

    uint64 pmap = p->white_queens;
    while (pmap) {
        square_t sq = (square_t)get_msb(pmap);
        score += eval_queen(p,sq,true);
        pmap ^= bb_squares[sq];
    }

    pmap = p->black_queens;
    while (pmap) {
        square_t sq = (square_t)get_lsb(pmap);
        score -= eval_queen(p,sq,false);
        pmap ^= bb_squares[sq];
    }

    return score;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x198(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x6f76
movq -0x18(%rbp), %rdi
callq 0x4a00
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl $0x1, %edx
callq 0x6fe0
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0xfe708(%rip), %rax     # 0x105670
movq (%rax,%rcx,8), %rax
xorq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x6f32
movq -0x8(%rbp), %rax
movq 0x1a0(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x6fca
movq -0x18(%rbp), %rdi
callq 0x4870
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl -0x20(%rbp), %esi
xorl %edx, %edx
callq 0x6fe0
movl %eax, %ecx
movl -0xc(%rbp), %eax
subl %ecx, %eax
movl %eax, -0xc(%rbp)
movl -0x20(%rbp), %eax
movl %eax, %ecx
leaq 0xfe6b4(%rip), %rax     # 0x105670
movq (%rax,%rcx,8), %rax
xorq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x6f85
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jswaff[P]prophet3/src/eval.cpp
// Function: eval_kings(position*, int32_pair)
int32 eval_kings(position *p,int32_pair npmat) {
    int32 score = 0;

    const int endgame_threshold = knight_val*2 + rook_val;

    // if black has a lot of material then eval white in the middle game
    if (npmat.val2 >= endgame_threshold) {
        score += king_pst[p->white_king];
        score += eval_scale(eval_king_safety(p,true),npmat.val2);
    } else {
        score += king_endgame_pst[p->white_king];
    }

    if (npmat.val1 >= endgame_threshold) {
        score -= king_pst[fliprank[p->black_king]];
        score -= eval_scale(eval_king_safety(p,false),npmat.val1);
    } else {
        score -= king_endgame_pst[fliprank[p->black_king]];
    }

    return score;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rsi, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x44c, -0x18(%rbp)     # imm = 0x44C
cmpl $0x44c, -0x4(%rbp)      # imm = 0x44C
jl 0x70c3
movq -0x10(%rbp), %rax
movl 0x14c(%rax), %eax
movl %eax, %ecx
leaq 0x2ea06(%rip), %rax     # 0x35aa0
movl (%rax,%rcx,4), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x7710
movl %eax, %edi
movl -0x4(%rbp), %esi
callq 0x7170
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x70df
movq -0x10(%rbp), %rax
movl 0x14c(%rax), %eax
movl %eax, %ecx
leaq 0x2ecca(%rip), %rax     # 0x35da0
movl (%rax,%rcx,4), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
cmpl $0x44c, -0x8(%rbp)      # imm = 0x44C
jl 0x7132
movq -0x10(%rbp), %rax
movl 0x150(%rax), %eax
movl %eax, %ecx
leaq 0x2e7a5(%rip), %rax     # 0x358a0
movslq (%rax,%rcx,4), %rcx
leaq 0x2e99a(%rip), %rax     # 0x35aa0
movl (%rax,%rcx,4), %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x7710
movl %eax, %edi
movl -0x8(%rbp), %esi
callq 0x7170
movl %eax, %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
jmp 0x715b
movq -0x10(%rbp), %rax
movl 0x150(%rax), %eax
movl %eax, %ecx
leaq 0x2e75b(%rip), %rax     # 0x358a0
movslq (%rax,%rcx,4), %rcx
leaq 0x2ec50(%rip), %rax     # 0x35da0
movl (%rax,%rcx,4), %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jswaff[P]prophet3/src/eval.cpp
// Function: eval_pawns_no_hash(position*)
int32 eval_pawns_no_hash(position *p) {
    int32 score = 0;

    uint64 pmap = p->white_pawns;
    while (pmap) {
        square_t sq = (square_t)get_msb(pmap);
        score += eval_pawn(p,sq,true);
        pmap ^= bb_squares[sq];
    }

    pmap = p->black_pawns;
    while (pmap) {
        square_t sq = (square_t)get_lsb(pmap);
        score -= eval_pawn(p,sq,false);
        pmap ^= bb_squares[sq];
    }

    return score;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x158(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x71f6
movq -0x18(%rbp), %rdi
callq 0x4a00
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl $0x1, %edx
callq 0x7ba0
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0xfe488(%rip), %rax     # 0x105670
movq (%rax,%rcx,8), %rax
xorq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x71b2
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x724a
movq -0x18(%rbp), %rdi
callq 0x4870
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl -0x20(%rbp), %esi
xorl %edx, %edx
callq 0x7ba0
movl %eax, %ecx
movl -0xc(%rbp), %eax
subl %ecx, %eax
movl %eax, -0xc(%rbp)
movl -0x20(%rbp), %eax
movl %eax, %ecx
leaq 0xfe434(%rip), %rax     # 0x105670
movq (%rax,%rcx,8), %rax
xorq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x7205
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jswaff[P]prophet3/src/eval.cpp
// Function: eval_pawns(position*)
int32 eval_pawns(position *p) {

    int32 score;

    // try the pawn hash
    uint64 val = get_hash_entry(&phtbl,p->pawn_key);
    if (val != 0) {
        score = get_pawn_hash_entry_score(val);
        assert(score==eval_pawns_no_hash(p));
    } else {
        score = eval_pawns_no_hash(p);
        // store (always replace)
        store_hash_entry(&phtbl,p->pawn_key,build_pawn_hash_val(score));
    }

    return score;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x1c0(%rax), %rsi
leaq 0xfbe62(%rip), %rdi     # 0x1030e0
callq 0x8980
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x72d5
movq -0x18(%rbp), %rdi
callq 0x8790
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7190
movl %eax, %ecx
movl -0x1c(%rbp), %eax
cmpl %ecx, %eax
jne 0x72b4
jmp 0x72d3
leaq 0x2ebe5(%rip), %rdi     # 0x35ea0
leaq 0x2ebfb(%rip), %rsi     # 0x35ebd
movl $0xed, %edx
leaq 0x2ebfc(%rip), %rcx     # 0x35eca
callq 0x20c0
jmp 0x730b
movq -0x8(%rbp), %rdi
callq 0x7190
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x1c0(%rax), %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %edi
callq 0x8650
movq -0x28(%rbp), %rsi
movq %rax, %rdx
leaq 0xfbdda(%rip), %rdi     # 0x1030e0
callq 0x8a50
movl -0xc(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jswaff[P]prophet3/src/eval.cpp
// Function: eval_nonpawn_material_slow(position*)
int32_pair eval_nonpawn_material_slow(position *p) {
    int32_pair score;
    score.val1 = 0;
    score.val2 = 0;

    for (int sq=0;sq<64;sq++) {
        switch(p->piece[sq]) {
        case KNIGHT:
            score.val1 += knight_val;
            break;
        case -KNIGHT:
            score.val2 += knight_val;
            break;
        case BISHOP:
            score.val1 += bishop_val;
            break;
        case -BISHOP:
            score.val2 += bishop_val;
            break;
        case ROOK:
            score.val1 += rook_val;
            break;
        case -ROOK:
            score.val2 += rook_val;
            break;
        case QUEEN:
            score.val1 += queen_val;
            break;
        case -QUEEN:
            score.val2 += queen_val;
            break;
        }
    }

    return score;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x8(%rbp)
movl $0x0, -0x4(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x40, -0x14(%rbp)
jge 0x73ea
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %eax
addl $0x5, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0xa, %eax
ja 0x73da
movq -0x20(%rbp), %rax
leaq 0x2e3c5(%rip), %rcx     # 0x35730
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x8(%rbp), %eax
addl $0x12c, %eax            # imm = 0x12C
movl %eax, -0x8(%rbp)
jmp 0x73da
movl -0x4(%rbp), %eax
addl $0x12c, %eax            # imm = 0x12C
movl %eax, -0x4(%rbp)
jmp 0x73da
movl -0x8(%rbp), %eax
addl $0x140, %eax            # imm = 0x140
movl %eax, -0x8(%rbp)
jmp 0x73da
movl -0x4(%rbp), %eax
addl $0x140, %eax            # imm = 0x140
movl %eax, -0x4(%rbp)
jmp 0x73da
movl -0x8(%rbp), %eax
addl $0x1f4, %eax            # imm = 0x1F4
movl %eax, -0x8(%rbp)
jmp 0x73da
movl -0x4(%rbp), %eax
addl $0x1f4, %eax            # imm = 0x1F4
movl %eax, -0x4(%rbp)
jmp 0x73da
movl -0x8(%rbp), %eax
addl $0x384, %eax            # imm = 0x384
movl %eax, -0x8(%rbp)
jmp 0x73da
movl -0x4(%rbp), %eax
addl $0x384, %eax            # imm = 0x384
movl %eax, -0x4(%rbp)
jmp 0x73dc
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x733d
movq -0x8(%rbp), %rax
popq %rbp
retq
// File: jswaff[P]prophet3/src/eval.cpp
// Function: eval_nonpawn_material(position*)
int32_pair eval_nonpawn_material(position *p) {
    int32_pair score;

    score.val1 = p->piece_counts[WHITE][ROOK] * rook_val
            + p->piece_counts[WHITE][KNIGHT] * knight_val
            + p->piece_counts[WHITE][BISHOP] * bishop_val
            + p->piece_counts[WHITE][QUEEN] * queen_val;

    score.val2 = p->piece_counts[BLACK][ROOK] * rook_val
            + p->piece_counts[BLACK][KNIGHT] * knight_val
            + p->piece_counts[BLACK][BISHOP] * bishop_val
            + p->piece_counts[BLACK][QUEEN] * queen_val;

    assert(score.val1==eval_nonpawn_material_slow(p).val1);
    assert(score.val2==eval_nonpawn_material_slow(p).val2);


    return score;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
imull $0x1f4, 0x12c(%rax), %eax # imm = 0x1F4
movq -0x10(%rbp), %rcx
imull $0x12c, 0x124(%rcx), %ecx # imm = 0x12C
addl %ecx, %eax
movq -0x10(%rbp), %rcx
imull $0x140, 0x128(%rcx), %ecx # imm = 0x140
addl %ecx, %eax
movq -0x10(%rbp), %rcx
imull $0x384, 0x130(%rcx), %ecx # imm = 0x384
addl %ecx, %eax
movl %eax, -0x8(%rbp)
movq -0x10(%rbp), %rax
imull $0x1f4, 0x110(%rax), %eax # imm = 0x1F4
movq -0x10(%rbp), %rcx
imull $0x12c, 0x108(%rcx), %ecx # imm = 0x12C
addl %ecx, %eax
movq -0x10(%rbp), %rcx
imull $0x140, 0x10c(%rcx), %ecx # imm = 0x140
addl %ecx, %eax
movq -0x10(%rbp), %rcx
imull $0x384, 0x114(%rcx), %ecx # imm = 0x384
addl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7320
movq %rax, %rcx
movl -0x24(%rbp), %eax
movq %rcx, -0x18(%rbp)
cmpl -0x18(%rbp), %eax
jne 0x749e
jmp 0x74bd
leaq 0x2ea42(%rip), %rdi     # 0x35ee7
leaq 0x2ea11(%rip), %rsi     # 0x35ebd
movl $0x12a, %edx            # imm = 0x12A
leaq 0x2ea5e(%rip), %rcx     # 0x35f16
callq 0x20c0
movl -0x4(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7320
movq %rax, %rcx
movl -0x28(%rbp), %eax
movq %rcx, -0x20(%rbp)
cmpl -0x1c(%rbp), %eax
jne 0x74dd
jmp 0x74fc
leaq 0x2ea5f(%rip), %rdi     # 0x35f43
leaq 0x2e9d2(%rip), %rsi     # 0x35ebd
movl $0x12b, %edx            # imm = 0x12B
leaq 0x2ea1f(%rip), %rcx     # 0x35f16
callq 0x20c0
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jswaff[P]prophet3/src/eval.cpp
// Function: eval_pawn_material_slow(position*)
int32_pair eval_pawn_material_slow(position *p) {
    int32_pair score;
    score.val1 = 0;
    score.val2 = 0;

    for (int sq=0;sq<64;sq++) {
        switch(p->piece[sq]) {
        case PAWN:
            score.val1 += pawn_val;
            break;
        case -PAWN:
            score.val2 += pawn_val;
            break;
        }
    }

    return score;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x8(%rbp)
movl $0x0, -0x4(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x40, -0x14(%rbp)
jge 0x7573
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
subl $-0x1, %eax
je 0x755d
jmp 0x7548
movl -0x18(%rbp), %eax
subl $0x1, %eax
jne 0x7566
jmp 0x7552
movl -0x8(%rbp), %eax
addl $0x64, %eax
movl %eax, -0x8(%rbp)
jmp 0x7566
movl -0x4(%rbp), %eax
addl $0x64, %eax
movl %eax, -0x4(%rbp)
jmp 0x7568
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x752d
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: jswaff[P]prophet3/src/eval.cpp
// Function: eval_pawn_material(position*)
int32_pair eval_pawn_material(position *p) {
    int32_pair score;
    score.val1 = p->piece_counts[WHITE][PAWN] * pawn_val;
    score.val2 = p->piece_counts[BLACK][PAWN] * pawn_val;

    assert(score.val1==eval_pawn_material_slow(p).val1);
    assert(score.val2==eval_pawn_material_slow(p).val2);

    return score;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
imull $0x64, 0x120(%rax), %eax
movl %eax, -0x8(%rbp)
movq -0x10(%rbp), %rax
imull $0x64, 0x104(%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7510
movq %rax, %rcx
movl -0x24(%rbp), %eax
movq %rcx, -0x18(%rbp)
cmpl -0x18(%rbp), %eax
jne 0x75c8
jmp 0x75e7
leaq 0x2e9a3(%rip), %rdi     # 0x35f72
leaq 0x2e8e7(%rip), %rsi     # 0x35ebd
movl $0x149, %edx            # imm = 0x149
leaq 0x2e9bc(%rip), %rcx     # 0x35f9e
callq 0x20c0
movl -0x4(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7510
movq %rax, %rcx
movl -0x28(%rbp), %eax
movq %rcx, -0x20(%rbp)
cmpl -0x1c(%rbp), %eax
jne 0x7607
jmp 0x7626
leaq 0x2e9ba(%rip), %rdi     # 0x35fc8
leaq 0x2e8a8(%rip), %rsi     # 0x35ebd
movl $0x14a, %edx            # imm = 0x14A
leaq 0x2e97d(%rip), %rcx     # 0x35f9e
callq 0x20c0
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
// File: jswaff[P]prophet3/src/eval.cpp
// Function: eval(position*, bool)
int32 eval(position *p,bool mat_only) {
    int32 score = 0;

    int32_pair npmat = eval_nonpawn_material(p);
    score += npmat.val1 - npmat.val2;

    int32_pair pmat = eval_pawn_material(p);
    score += pmat.val1 - pmat.val2;

    if (!mat_only) {
        score += eval_pawns(p);
        score += eval_knights(p);
        score += eval_bishops(p);
        score += eval_rooks(p);
        score += eval_queens(p);
        score += eval_kings(p,npmat);
    }

    return p->player==WHITE ? score : -score;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x73f0
movq %rax, -0x18(%rbp)
movl -0x18(%rbp), %eax
subl -0x14(%rbp), %eax
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7580
movq %rax, -0x20(%rbp)
movl -0x20(%rbp), %eax
subl -0x1c(%rbp), %eax
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
testb $0x1, -0x9(%rbp)
jne 0x76e9
movq -0x8(%rbp), %rdi
callq 0x7260
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6a50
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6bc0
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6db0
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6f10
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rsi
callq 0x7060
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1, 0x138(%rax)
jne 0x76fe
movl -0x10(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0x7706
xorl %eax, %eax
subl -0x10(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: jswaff[P]prophet3/src/evalp.cpp
// Function: eval_pawn(position*, square_t, bool)
int32 eval_pawn(position *p,square_t sq,bool wtm) {
    int32 score = wtm ? pawn_pst[sq] : pawn_pst[fliprank[sq]];

    if (is_passed(p,sq,wtm)) {
        score += passed_pawn;
    }
    if (is_doubled(p,sq,wtm)) {
        score += doubled_pawn;
    }
    if (is_isolated(p,sq,wtm)) {
        score += isolated_pawn;
    }

    return score;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
andb $0x1, %al
movb %al, -0xd(%rbp)
testb $0x1, -0xd(%rbp)
je 0x7bd0
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x2e538(%rip), %rax     # 0x36100
movl (%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
jmp 0x7bed
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x2e424(%rip), %rax     # 0x36000
movslq (%rax,%rcx,4), %rcx
leaq 0x2e519(%rip), %rax     # 0x36100
movl (%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movb -0xd(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x7c70
testb $0x1, %al
jne 0x7c0d
jmp 0x7c16
movl -0x14(%rbp), %eax
addl $0x14, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movb -0xd(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x7d60
testb $0x1, %al
jne 0x7c30
jmp 0x7c39
movl -0x14(%rbp), %eax
addl $-0xa, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movb -0xd(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x7e60
testb $0x1, %al
jne 0x7c53
jmp 0x7c5c
movl -0x14(%rbp), %eax
addl $-0x14, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jswaff[P]prophet3/src/evalp.cpp
// Function: is_doubled(position*, square_t, bool)
bool is_doubled(position *pos,square_t pawn_sq,bool wtm) {
    assert( (wtm && pos->piece[pawn_sq]==PAWN) || (!wtm && pos->piece[pawn_sq]==-PAWN));

    uint64 file_mask = bb_files[get_file(pawn_sq)] ^ bb_squares[pawn_sq];

    if (wtm){
        if (file_mask & pos->white_pawns) return true;
    } else {
        if (file_mask & pos->black_pawns) return true;
    }

    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
andb $0x1, %al
movb %al, -0x15(%rbp)
testb $0x1, -0x15(%rbp)
je 0x7d90
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %eax
movl %eax, %edx
movb $0x1, %al
cmpl $0x1, (%rcx,%rdx,4)
movb %al, -0x21(%rbp)
je 0x7db2
xorl %eax, %eax
testb $0x1, -0x15(%rbp)
movb %al, -0x22(%rbp)
jne 0x7dac
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
cmpl $-0x1, (%rax,%rcx,4)
sete %al
movb %al, -0x22(%rbp)
movb -0x22(%rbp), %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x7dbb
jmp 0x7dbd
jmp 0x7ddc
leaq 0x2e43c(%rip), %rdi     # 0x36200
leaq 0x2e480(%rip), %rsi     # 0x3624b
movl $0x22, %edx
leaq 0x2e482(%rip), %rcx     # 0x36259
callq 0x20c0
movl -0x14(%rbp), %edi
callq 0x12070
movl %eax, %eax
movl %eax, %ecx
leaq 0xfd801(%rip), %rax     # 0x1055f0
movq (%rax,%rcx,8), %rax
movl -0x14(%rbp), %ecx
movl %ecx, %edx
leaq 0xfd871(%rip), %rcx     # 0x105670
xorq (%rcx,%rdx,8), %rax
movq %rax, -0x20(%rbp)
testb $0x1, -0x15(%rbp)
je 0x7e2a
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
andq 0x158(%rcx), %rax
cmpq $0x0, %rax
je 0x7e28
movb $0x1, -0x1(%rbp)
jmp 0x7e4b
jmp 0x7e47
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
andq 0x160(%rcx), %rax
cmpq $0x0, %rax
je 0x7e45
movb $0x1, -0x1(%rbp)
jmp 0x7e4b
jmp 0x7e47
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jswaff[P]prophet3/src/extend.cpp
// Function: extend(position*, unsigned long long, bool)
int32 extend(position *pos,move last_move,bool incheck) {

    assert(incheck==in_check(pos,pos->player));

    if (incheck) return 1;
    if (get_promopiece(last_move)) return 1;

    // pawn to 7th
    /*square_t to_sq = get_to_sq(last_move);
    if (pos->player==WHITE) { // black was on move
        if (pos->piece[to_sq]==-PAWN && get_rank(to_sq)==RANK_2) {
            return 1;
        }
    } else {
        if (pos->piece[to_sq]==PAWN && get_rank(to_sq)==RANK_7) {
            return 1;
        }
    }*/

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x138(%rax), %esi
callq 0xfc10
movb %al, %cl
movl -0x20(%rbp), %eax
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x8196
jmp 0x81b5
leaq 0x2e152(%rip), %rdi     # 0x362ef
leaq 0x2e16e(%rip), %rsi     # 0x36312
movl $0x10, %edx
leaq 0x2e171(%rip), %rcx     # 0x36321
callq 0x20c0
testb $0x1, -0x19(%rbp)
je 0x81c4
movl $0x1, -0x4(%rbp)
jmp 0x81e2
movq -0x18(%rbp), %rdi
callq 0xaae0
cmpl $0x0, %eax
je 0x81db
movl $0x1, -0x4(%rbp)
jmp 0x81e2
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
nopl (%rax)
// File: jswaff[P]prophet3/src/hash.cpp
// Function: build_hash_key(position*)
uint64 build_hash_key(position *pos) {
    uint64 hkey = 0;

    // fold in pieces
    for (int i=0;i<64;i++) {
        int piece = pos->piece[i];
        if (piece > NO_PIECE) {
            hkey ^= zkeys.pieces[piece][WHITE][i];
        } else if (piece < NO_PIECE) {
            hkey ^= zkeys.pieces[-piece][BLACK][i];
        }
    }

    // fold in player to move
    hkey ^= zkeys.ptm[pos->player];

    // castling rights
    assert(pos->castling_rights >= 0 && pos->castling_rights < 16);
    hkey ^= zkeys.casting_rights[pos->castling_rights];

    // ep square (including NO_SQUARE)
    assert(pos->ep_sq >= 0 && pos->ep_sq < 65);
    hkey ^= zkeys.ep[pos->ep_sq];

    return hkey;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x40, -0x14(%rbp)
jge 0x8288
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jle 0x824d
movslq -0x18(%rbp), %rcx
leaq 0xfb528(%rip), %rax     # 0x103758
shlq $0xa, %rcx
addq %rcx, %rax
movslq -0x14(%rbp), %rcx
movq 0x200(%rax,%rcx,8), %rax
xorq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x827b
cmpl $0x0, -0x18(%rbp)
jge 0x8279
xorl %eax, %eax
subl -0x18(%rbp), %eax
movslq %eax, %rcx
leaq 0xfb4f6(%rip), %rax     # 0x103758
shlq $0xa, %rcx
addq %rcx, %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
xorq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x827b
jmp 0x827d
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x820b
movq -0x8(%rbp), %rax
movl 0x138(%rax), %eax
movl %eax, %ecx
leaq 0xfb4bd(%rip), %rax     # 0x103758
movq 0x1c00(%rax,%rcx,8), %rax
xorq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x140(%rcx)
movb %al, -0x19(%rbp)
jb 0x82ce
movq -0x8(%rbp), %rax
cmpl $0x10, 0x140(%rax)
setb %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x82d7
jmp 0x82d9
jmp 0x82f8
leaq 0x2e066(%rip), %rdi     # 0x36346
leaq 0x2e096(%rip), %rsi     # 0x3637d
movl $0x1e, %edx
leaq 0x2e097(%rip), %rcx     # 0x3638a
callq 0x20c0
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
movl %eax, %ecx
leaq 0xfb44d(%rip), %rax     # 0x103758
movq 0x1c10(%rax,%rcx,8), %rax
xorq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x13c(%rcx)
movb %al, -0x1a(%rbp)
jl 0x833e
movq -0x8(%rbp), %rax
cmpl $0x41, 0x13c(%rax)
setl %al
movb %al, -0x1a(%rbp)
movb -0x1a(%rbp), %al
testb $0x1, %al
jne 0x8347
jmp 0x8349
jmp 0x8368
leaq 0x2e05c(%rip), %rdi     # 0x363ac
leaq 0x2e026(%rip), %rsi     # 0x3637d
movl $0x22, %edx
leaq 0x2e027(%rip), %rcx     # 0x3638a
callq 0x20c0
movq -0x8(%rbp), %rax
movl 0x13c(%rax), %eax
movl %eax, %ecx
leaq 0xfb3dd(%rip), %rax     # 0x103758
movq 0x1c90(%rax,%rcx,8), %rax
xorq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jswaff[P]prophet3/src/hash.cpp
// Function: build_pawn_key(position*)
uint64 build_pawn_key(position *pos) {
    uint64 pkey = 0;

    uint64 pmap = pos->white_pawns;
    while (pmap) {
        square_t sq = (square_t)get_msb(pmap);
        pkey ^= zkeys.pieces[PAWN][WHITE][sq];
        pmap ^= bb_squares[sq];
    }

    pmap = pos->black_pawns;
    while (pmap) {
        square_t sq = (square_t)get_lsb(pmap);
        pkey ^= zkeys.pieces[PAWN][BLACK][sq];
        pmap ^= bb_squares[sq];
    }

    return pkey;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x158(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x840c
movq -0x18(%rbp), %rdi
callq 0x4a00
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0xfb376(%rip), %rax     # 0x103758
movq 0x600(%rax,%rcx,8), %rax
xorq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0xfd272(%rip), %rax     # 0x105670
movq (%rax,%rcx,8), %rax
xorq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x83c3
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x8464
movq -0x18(%rbp), %rdi
callq 0x4870
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, %ecx
leaq 0xfb31e(%rip), %rax     # 0x103758
movq 0x400(%rax,%rcx,8), %rax
xorq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x20(%rbp), %eax
movl %eax, %ecx
leaq 0xfd21a(%rip), %rax     # 0x105670
movq (%rax,%rcx,8), %rax
xorq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x841b
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: jswaff[P]prophet3/src/hash.cpp
// Function: build_pawn_hash_val(int)
uint64 build_pawn_hash_val(int32 score) {
    assert(abs(score) <= CHECKMATE);
    assert(abs(score) <= 0xFFFF);

    uint64 val = 1; // just so it's non-zero. this way we know there IS an entry in case
                    // the score is 0

    if (score >= 0) {
        val |= ((uint64)score) << 1;
    } else {
        val |= ((uint64)-score) << 1;
        val |= ((uint64)1) << 17;
    }

    return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jg 0x866e
jmp 0x868d
leaq 0x2dde4(%rip), %rdi     # 0x36459
leaq 0x2dd01(%rip), %rsi     # 0x3637d
movl $0x67, %edx
leaq 0x2ddfe(%rip), %rcx     # 0x36486
callq 0x20c0
movl -0x4(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jg 0x86a0
jmp 0x86bf
leaq 0x2ddca(%rip), %rdi     # 0x36471
leaq 0x2dccf(%rip), %rsi     # 0x3637d
movl $0x68, %edx
leaq 0x2ddcc(%rip), %rcx     # 0x36486
callq 0x20c0
movq $0x1, -0x10(%rbp)
cmpl $0x0, -0x4(%rbp)
jl 0x86de
movslq -0x4(%rbp), %rax
shlq %rax
orq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x86fe
xorl %eax, %eax
subl -0x4(%rbp), %eax
cltq
shlq %rax
orq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
orq $0x20000, %rax          # imm = 0x20000
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jswaff[P]prophet3/src/hash.cpp
// Function: get_hash_entry_score(unsigned long long)
int32 get_hash_entry_score(uint64 val) {
    int32 score = ((val >> 18) & 0xFFFF);
    if ((val >> 34) & 1) {
        return -score;
    } else {
        return score;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
shrq $0x12, %rax
andq $0xffff, %rax           # imm = 0xFFFF
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
shrq $0x22, %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x8785
xorl %eax, %eax
subl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x878b
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: jswaff[P]prophet3/src/hash.cpp
// Function: get_pawn_hash_entry_score(unsigned long long)
int32 get_pawn_hash_entry_score(uint64 val) {
    int32 score = ((val >> 1) & 0xFFFF);
    if ((val >> 17) & 1) {
        return -score;
    } else {
        return score;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
shrq %rax
andq $0xffff, %rax           # imm = 0xFFFF
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
shrq $0x11, %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x87c4
xorl %eax, %eax
subl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x87ca
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: jswaff[P]prophet3/src/hash.cpp
// Function: init_hash_table(hash_table*, unsigned int)
void init_hash_table(hash_table *tbl,uint32 tblsize) {
    assert(tblsize > 0);

    int max_entries = tblsize / sizeof(hash_entry);
    printd("# max hash entries: %d\n",max_entries);

    // this loop will set # entries to a power of 2 > max_entries
    int actual_entries = 2;
    while (actual_entries <= max_entries) {
        actual_entries *= 2;
    }
    actual_entries /= 2;

    // set the mask and allocate memory
    tbl->tblmask = actual_entries - 1;
    printd("# effective hash entries: %d\n",actual_entries);

    tbl->tblptr = (hash_entry*)malloc(actual_entries * sizeof(hash_entry));
    printd("# effective table size: %d bytes\n\n",actual_entries * sizeof(hash_entry));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jbe 0x8807
jmp 0x8826
leaq 0x2dc9a(%rip), %rdi     # 0x364a8
leaq 0x2db68(%rip), %rsi     # 0x3637d
movl $0x99, %edx
leaq 0x2dc93(%rip), %rcx     # 0x364b4
callq 0x20c0
movl -0xc(%rbp), %eax
shrq $0x4, %rax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %esi
leaq 0x2dca5(%rip), %rdi     # 0x364df
movb $0x0, %al
callq 0x8db0
movl $0x2, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x10(%rbp), %eax
jg 0x885a
movl -0x14(%rbp), %eax
shll %eax
movl %eax, -0x14(%rbp)
jmp 0x8848
movl -0x14(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x14(%rbp), %esi
leaq 0x2dc74(%rip), %rdi     # 0x364f7
movb $0x0, %al
callq 0x8db0
movslq -0x14(%rbp), %rdi
shlq $0x4, %rdi
callq 0x2220
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movslq -0x14(%rbp), %rsi
shlq $0x4, %rsi
leaq 0x2dc65(%rip), %rdi     # 0x36515
movb $0x0, %al
callq 0x8db0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: jswaff[P]prophet3/src/hash.cpp
// Function: clear_hash_table(hash_table*)
void clear_hash_table(hash_table *tbl) {
    assert(tbl->tblptr);
    hash_entry *he = tbl->tblptr;
    for (uint32 i=0;i<=tbl->tblmask;i++) {
        (he+i)->key = 0;
        (he+i)->val = 0;
    }
    tbl->probes = 0;
    tbl->hits = 0;
    tbl->collisions = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x88d8
jmp 0x88f7
leaq 0x2dc59(%rip), %rdi     # 0x36538
leaq 0x2da97(%rip), %rsi     # 0x3637d
movl $0xae, %edx
leaq 0x2dc52(%rip), %rcx     # 0x36544
callq 0x20c0
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
ja 0x894c
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq $0x0, 0x8(%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x8909
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x28(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jswaff[P]prophet3/src/hash.cpp
// Function: get_hash_entry(hash_table*, unsigned long long)
uint64 get_hash_entry(hash_table *tbl,uint64 key) {
    assert(tbl->tblptr);
    tbl->probes++;
    hash_entry *he = tbl->tblptr + (key & tbl->tblmask);
    if (he->val != 0) {
        if (he->key == key) { // do full signature match
            tbl->hits++;
            return he->val;
        } else {
            tbl->collisions++;
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x899c
jmp 0x89bb
leaq 0x2db95(%rip), %rdi     # 0x36538
leaq 0x2d9d3(%rip), %rsi     # 0x3637d
movl $0xba, %edx
leaq 0x2dbb2(%rip), %rcx     # 0x36568
callq 0x20c0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rdx
andq 0x10(%rdx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x8a31
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0x8a1f
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x8a39
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x28(%rax)
jmp 0x8a31
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jswaff[P]prophet3/src/hash.cpp
// Function: store_hash_entry(hash_table*, unsigned long long, unsigned long long)
void store_hash_entry(hash_table *tbl,uint64 key,uint64 val) {
    assert(tbl->tblptr);
    hash_entry *he = tbl->tblptr + (key & tbl->tblmask);
    he->key = key;
    he->val = val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x8a70
jmp 0x8a8f
leaq 0x2dac1(%rip), %rdi     # 0x36538
leaq 0x2d8ff(%rip), %rsi     # 0x3637d
movl $0xca, %edx
leaq 0x2db0a(%rip), %rcx     # 0x36594
callq 0x20c0
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rdx
andq 0x10(%rdx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: jswaff[P]prophet3/src/init.cpp
// Function: init_zkeys()
void init_zkeys() {

    for (int i=0;i<2;i++) { // color
        for (int j=0;j<64;j++) { // squares
            for (int k=1;k<=6;k++) {
                zkeys.pieces[k][i][j] = random64();
            }
        }

        zkeys.ptm[i] = random64();
    }

    for (int i=0;i<16;i++) { // castling rights
        zkeys.casting_rights[i] = random64();
    }

    for (int i=0;i<65;i++) { // ep square
        zkeys.ep[i] = random64();
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
cmpl $0x2, -0x4(%rbp)
jge 0x8b81
movl $0x0, -0x8(%rbp)
cmpl $0x40, -0x8(%rbp)
jge 0x8b58
movl $0x1, -0xc(%rbp)
cmpl $0x6, -0xc(%rbp)
jg 0x8b4b
callq 0x14ff0
movq %rax, %rdx
movslq -0xc(%rbp), %rcx
leaq 0xfac32(%rip), %rax     # 0x103758
shlq $0xa, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rcx
shlq $0x9, %rcx
addq %rcx, %rax
movslq -0x8(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x8b0d
jmp 0x8b4d
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x8b00
callq 0x14ff0
movq %rax, %rdx
movslq -0x4(%rbp), %rcx
leaq 0xfabed(%rip), %rax     # 0x103758
movq %rdx, 0x1c00(%rax,%rcx,8)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x8aef
movl $0x0, -0x10(%rbp)
cmpl $0x10, -0x10(%rbp)
jge 0x8bb4
callq 0x14ff0
movq %rax, %rdx
movslq -0x10(%rbp), %rcx
leaq 0xfabb7(%rip), %rax     # 0x103758
movq %rdx, 0x1c10(%rax,%rcx,8)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x8b88
movl $0x0, -0x14(%rbp)
cmpl $0x41, -0x14(%rbp)
jge 0x8be7
callq 0x14ff0
movq %rax, %rdx
movslq -0x14(%rbp), %rcx
leaq 0xfab84(%rip), %rax     # 0x103758
movq %rdx, 0x1c90(%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x8bbb
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: jswaff[P]prophet3/src/init.cpp
// Function: init()
void init() {
    init_directions();
    init_zkeys();
    init_bitboards();
    init_magics();
    init_evalp_bitboards();
    reset_pos(&gpos);
    pthread_create(&think_thread,NULL,init_helper,NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x12980
callq 0x8ae0
callq 0x5430
callq 0xa350
callq 0x7f30
leaq 0xcaecc(%rip), %rdi     # 0xd3ae0
callq 0xf390
leaq 0xfab30(%rip), %rdi     # 0x103750
xorl %eax, %eax
movl %eax, %ecx
leaq -0x15b(%rip), %rdx      # 0x8ad0
movq %rcx, %rsi
callq 0x2300
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: jswaff[P]prophet3/src/log.cpp
// Function: print(char const*, ...)
void print(const char* format, ...) {
    pthread_mutex_lock(&logfile_mutex);

    va_list stdout_args;
    va_start(stdout_args,format);
    vprintf(format,stdout_args);
    fflush(stdout);
    va_end(stdout_args);

    va_list log_args;
    va_start(log_args,format);
    fprintf(logfile,"%d ",milli_timer());
    vfprintf(logfile,format,log_args);
    fflush(logfile);
    va_end(log_args);

    pthread_mutex_unlock(&logfile_mutex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
testb %al, %al
je 0x8c9b
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdx, -0xe0(%rbp)
movq %rsi, -0xe8(%rbp)
movq %rdi, -0x8(%rbp)
leaq 0xfe3bf(%rip), %rdi     # 0x107088
movq %rdi, -0xf8(%rbp)
callq 0x2290
leaq -0xf0(%rbp), %rax
movq %rax, -0x110(%rbp)
movq %rax, -0x10(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x108(%rbp)
movq %rax, -0x18(%rbp)
movl $0x30, -0x1c(%rbp)
movl $0x8, -0x20(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x2180
movq 0x442a0(%rip), %rax     # 0x4cfb8
movq (%rax), %rdi
callq 0x21c0
movq -0x110(%rbp), %rcx
movq -0x108(%rbp), %rax
movq %rcx, -0x30(%rbp)
movq %rax, -0x38(%rbp)
movl $0x30, -0x3c(%rbp)
movl $0x8, -0x40(%rbp)
movq 0xfe335(%rip), %rax     # 0x107080
movq %rax, -0x100(%rbp)
callq 0x14080
movq -0x100(%rbp), %rdi
movl %eax, %edx
leaq 0x2d86d(%rip), %rsi     # 0x365d4
xorl %eax, %eax
callq 0x2280
movq 0xfe30b(%rip), %rdi     # 0x107080
movq -0x8(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x2230
movq 0xfe2f7(%rip), %rdi     # 0x107080
callq 0x21c0
movq -0xf8(%rbp), %rdi
callq 0x20d0
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jswaff[P]prophet3/src/log.cpp
// Function: printd(char const*, ...)
void printd(const char* format, ...) {
    if (debug) {
        pthread_mutex_lock(&logfile_mutex);

        va_list stdout_args;
        va_start(stdout_args,format);
        vprintf(format,stdout_args);
        fflush(stdout);
        va_end(stdout_args);

        va_list log_args;
        va_start(log_args,format);
        fprintf(logfile,"%d ",milli_timer());
        vfprintf(logfile,format,log_args);
        fflush(logfile);
        va_end(log_args);

        pthread_mutex_unlock(&logfile_mutex);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
testb %al, %al
je 0x8deb
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdx, -0xe0(%rbp)
movq %rsi, -0xe8(%rbp)
movq %rdi, -0x8(%rbp)
testb $0x1, 0xfe260(%rip)     # 0x107079
je 0x8eed
leaq 0xfe262(%rip), %rdi     # 0x107088
callq 0x2290
leaq -0x20(%rbp), %rax
leaq -0xf0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq -0x8(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x2180
movq 0x44155(%rip), %rax     # 0x4cfb8
movq (%rax), %rdi
callq 0x21c0
leaq -0x20(%rbp), %rax
leaq -0x40(%rbp), %rax
leaq -0xf0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq 0xfe1e6(%rip), %rax     # 0x107080
movq %rax, -0xf8(%rbp)
callq 0x14080
movq -0xf8(%rbp), %rdi
movl %eax, %edx
leaq 0x2d71e(%rip), %rsi     # 0x365d4
movb $0x0, %al
callq 0x2280
movq 0xfe1bc(%rip), %rdi     # 0x107080
movq -0x8(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x2230
movq 0xfe1a8(%rip), %rdi     # 0x107080
callq 0x21c0
leaq -0x40(%rbp), %rax
leaq 0xfe1a0(%rip), %rdi     # 0x107088
callq 0x20d0
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jswaff[P]prophet3/src/log.cpp
// Function: error(char const*, ...)
void error(const char* format, ...) {
    pthread_mutex_lock(&logfile_mutex);
    va_list args;
    va_start(args,format);
    vfprintf(stderr,format,args);
    va_end(args);
    pthread_mutex_unlock(&logfile_mutex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0x8f35
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq 0xfe125(%rip), %rdi     # 0x107088
movq %rdi, -0xd8(%rbp)
callq 0x2290
leaq -0xd0(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x30, -0x1c(%rbp)
movl $0x8, -0x20(%rbp)
movq 0x44041(%rip), %rax     # 0x4cfd8
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x2230
movq -0xd8(%rbp), %rdi
callq 0x20d0
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax)
// File: jswaff[P]prophet3/src/magic.cpp
// Function: get_bishop_moves(position*, square_t, unsigned long long)
uint64 get_bishop_moves(position* p,square_t from,uint64 targets) {
    assert(p);
    assert(from >= A8 && from <= H1);
    assert(magic_numbers_bishops[from]);
    assert(magic_numbers_shift_bishops[from]);

    uint64 blockers = (p->black_pieces | p->white_pieces) & bb_bishop_masks[from];
    int magic_ind = (int)((blockers * magic_numbers_bishops[from]) >> magic_numbers_shift_bishops[from]);

    return bb_magic_bishop_moves[from][magic_ind] & targets;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x8fdc
jmp 0x8ffb
leaq 0x38bbb(%rip), %rdi     # 0x41b9e
leaq 0x2d5ee(%rip), %rsi     # 0x365d8
movl $0x1d, %edx
leaq 0x2d5f0(%rip), %rcx     # 0x365e6
callq 0x20c0
xorl %eax, %eax
cmpl $0x0, -0xc(%rbp)
movb %al, -0x25(%rbp)
jl 0x9010
cmpl $0x3f, -0xc(%rbp)
setle %al
movb %al, -0x25(%rbp)
movb -0x25(%rbp), %al
testb $0x1, %al
jne 0x9019
jmp 0x901b
jmp 0x903a
leaq 0x2d5fa(%rip), %rdi     # 0x3661c
leaq 0x2d5af(%rip), %rsi     # 0x365d8
movl $0x1e, %edx
leaq 0x2d5b1(%rip), %rcx     # 0x365e6
callq 0x20c0
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x87e77a(%rip), %rax    # 0x8877c0
cmpq $0x0, (%rax,%rcx,8)
je 0x904f
jmp 0x906e
leaq 0x2d5df(%rip), %rdi     # 0x36635
leaq 0x2d57b(%rip), %rsi     # 0x365d8
movl $0x1f, %edx
leaq 0x2d57d(%rip), %rcx     # 0x365e6
callq 0x20c0
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x87e946(%rip), %rax    # 0x8879c0
cmpl $0x0, (%rax,%rcx,4)
je 0x9082
jmp 0x90a1
leaq 0x2d5c8(%rip), %rdi     # 0x36651
leaq 0x2d548(%rip), %rsi     # 0x365d8
movl $0x20, %edx
leaq 0x2d54a(%rip), %rcx     # 0x365e6
callq 0x20c0
movq -0x8(%rbp), %rax
movq 0x1b0(%rax), %rax
movq -0x8(%rbp), %rcx
orq 0x1a8(%rcx), %rax
movl -0xc(%rbp), %ecx
movl %ecx, %edx
leaq 0x6fe4fd(%rip), %rcx    # 0x7075c0
andq (%rcx,%rdx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, %edx
leaq 0x87e6e5(%rip), %rcx    # 0x8877c0
imulq (%rcx,%rdx,8), %rax
movl -0xc(%rbp), %ecx
movl %ecx, %edx
leaq 0x87e8d4(%rip), %rcx    # 0x8879c0
movl (%rcx,%rdx,4), %ecx
shrq %cl, %rax
movl %eax, -0x24(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x6fe6bf(%rip), %rax    # 0x7077c0
shlq $0xd, %rcx
addq %rcx, %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
andq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)