LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: jswaff[P]prophet3/test/eval__test.cpp
// Function: test_start_pos_is_0()
void test_start_pos_is_0() {
    position pos;
    reset_pos(&pos);
    int32 score=eval(&pos,false);
    assert(score==0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
leaq -0x1c8(%rbp), %rdi
callq 0xf390
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
movl %eax, -0x1cc(%rbp)
cmpl $0x0, -0x1cc(%rbp)
jne 0x19876
jmp 0x19895
leaq 0x217ca(%rip), %rdi     # 0x3b047
leaq 0x217cc(%rip), %rsi     # 0x3b050
movl $0x12, %edx
leaq 0x217d4(%rip), %rcx     # 0x3b064
callq 0x20c0
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nop
// File: jswaff[P]prophet3/test/eval__test.cpp
// Function: test_eval_pawn()
void test_eval_pawn() {
    position pos;
    reset_pos(&pos);
    assert(eval_pawn(&pos,E2,true)==pawn_pst[E2]);
    assert(eval_pawn(&pos,B7,false)==pawn_pst[B2]);
    assert(eval_pawn(&pos,B7,false)==eval_pawn(&pos,B2,true));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
leaq -0x1c8(%rbp), %rdi
callq 0xf390
leaq -0x1c8(%rbp), %rdi
movl $0x34, %esi
movl $0x1, %edx
callq 0x7ba0
cmpl 0x238ad(%rip), %eax     # 0x3d180
jne 0x198d7
jmp 0x198f6
leaq 0x217a1(%rip), %rdi     # 0x3b07f
leaq 0x2176b(%rip), %rsi     # 0x3b050
movl $0x18, %edx
leaq 0x217b4(%rip), %rcx     # 0x3b0a5
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x9, %esi
xorl %edx, %edx
callq 0x7ba0
cmpl 0x23865(%rip), %eax     # 0x3d174
jne 0x19913
jmp 0x19932
leaq 0x217a1(%rip), %rdi     # 0x3b0bb
leaq 0x2172f(%rip), %rsi     # 0x3b050
movl $0x19, %edx
leaq 0x21778(%rip), %rcx     # 0x3b0a5
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x9, %esi
xorl %edx, %edx
callq 0x7ba0
movl %eax, -0x1cc(%rbp)
leaq -0x1c8(%rbp), %rdi
movl $0x31, %esi
movl $0x1, %edx
callq 0x7ba0
movl %eax, %ecx
movl -0x1cc(%rbp), %eax
cmpl %ecx, %eax
jne 0x1996f
jmp 0x1998e
leaq 0x2176c(%rip), %rdi     # 0x3b0e2
leaq 0x216d3(%rip), %rsi     # 0x3b050
movl $0x1a, %edx
leaq 0x2171c(%rip), %rcx     # 0x3b0a5
callq 0x20c0
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopw (%rax,%rax)
// File: jswaff[P]prophet3/test/eval__test.cpp
// Function: test_eval_knight()
void test_eval_knight() {
    position pos;
    reset_pos(&pos);
    assert(eval_knight(&pos,F3,true)==knight_pst[F3] + knight_tropism * distance(F3,E8));
    assert(eval_knight(&pos,D6,true)==knight_pst[D6] + knight_tropism * distance(D6,E8));
    assert(eval_knight(&pos,H3,false)==knight_pst[H6] + knight_tropism * distance(H6,E8));
    assert(eval_knight(&pos,F7,false)==knight_pst[F2] + knight_tropism * distance(F2,E8));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
leaq -0x1c8(%rbp), %rdi
callq 0xf390
leaq -0x1c8(%rbp), %rdi
movl $0x2d, %esi
movl $0x1, %edx
callq 0x6b20
movl %eax, -0x1cc(%rbp)
movl 0x2338b(%rip), %eax     # 0x3cd64
movl %eax, -0x1d0(%rbp)
movl $0x2d, %edi
movl $0x4, %esi
callq 0x12350
movl -0x1d0(%rbp), %ecx
movl %eax, %edx
movl -0x1cc(%rbp), %eax
imull $0xfffffffe, %edx, %edx # imm = 0xFFFFFFFE
addl %edx, %ecx
cmpl %ecx, %eax
jne 0x19a0a
jmp 0x19a29
leaq 0x21703(%rip), %rdi     # 0x3b114
leaq 0x21638(%rip), %rsi     # 0x3b050
movl $0x20, %edx
leaq 0x2173d(%rip), %rcx     # 0x3b161
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x13, %esi
movl $0x1, %edx
callq 0x6b20
movl %eax, -0x1d4(%rbp)
movl 0x232b1(%rip), %eax     # 0x3ccfc
movl %eax, -0x1d8(%rbp)
movl $0x13, %edi
movl $0x4, %esi
callq 0x12350
movl -0x1d8(%rbp), %ecx
movl %eax, %edx
movl -0x1d4(%rbp), %eax
imull $0xfffffffe, %edx, %edx # imm = 0xFFFFFFFE
addl %edx, %ecx
cmpl %ecx, %eax
jne 0x19a7c
jmp 0x19a9b
leaq 0x216f6(%rip), %rdi     # 0x3b179
leaq 0x215c6(%rip), %rsi     # 0x3b050
movl $0x21, %edx
leaq 0x216cb(%rip), %rcx     # 0x3b161
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x2f, %esi
xorl %edx, %edx
callq 0x6b20
movl %eax, -0x1dc(%rbp)
movl 0x23252(%rip), %eax     # 0x3cd0c
movl %eax, -0x1e0(%rbp)
movl $0x17, %edi
movl $0x4, %esi
callq 0x12350
movl -0x1e0(%rbp), %ecx
movl %eax, %edx
movl -0x1dc(%rbp), %eax
imull $0xfffffffe, %edx, %edx # imm = 0xFFFFFFFE
addl %edx, %ecx
cmpl %ecx, %eax
jne 0x19aeb
jmp 0x19b0a
leaq 0x216d4(%rip), %rdi     # 0x3b1c6
leaq 0x21557(%rip), %rsi     # 0x3b050
movl $0x22, %edx
leaq 0x2165c(%rip), %rcx     # 0x3b161
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0xd, %esi
xorl %edx, %edx
callq 0x6b20
movl %eax, -0x1e4(%rbp)
movl 0x2325b(%rip), %eax     # 0x3cd84
movl %eax, -0x1e8(%rbp)
movl $0x35, %edi
movl $0x4, %esi
callq 0x12350
movl -0x1e8(%rbp), %ecx
movl %eax, %edx
movl -0x1e4(%rbp), %eax
imull $0xfffffffe, %edx, %edx # imm = 0xFFFFFFFE
addl %edx, %ecx
cmpl %ecx, %eax
jne 0x19b5a
jmp 0x19b79
leaq 0x216b3(%rip), %rdi     # 0x3b214
leaq 0x214e8(%rip), %rsi     # 0x3b050
movl $0x23, %edx
leaq 0x215ed(%rip), %rcx     # 0x3b161
callq 0x20c0
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jswaff[P]prophet3/test/eval__test.cpp
// Function: test_eval_bishop()
void test_eval_bishop() {
    position pos;

    set_pos(&pos,"6k1/3B4/8/8/8/8/8/K7 w - - 0 1");
    assert(eval(&pos,false)==bishop_val + bishop_pst[D7]);

    set_pos(&pos,"6k1/8/8/3B4/8/8/8/K7 w - - 0 1");
    assert(eval(&pos,false)==bishop_val + bishop_pst[D5]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
leaq -0x1c8(%rbp), %rdi
leaq 0x216b9(%rip), %rsi     # 0x3b262
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
movl 0x2361a(%rip), %ecx     # 0x3d1dc
addl $0x140, %ecx            # imm = 0x140
cmpl %ecx, %eax
jne 0x19bce
jmp 0x19bed
leaq 0x216ac(%rip), %rdi     # 0x3b281
leaq 0x21474(%rip), %rsi     # 0x3b050
movl $0x2a, %edx
leaq 0x216c7(%rip), %rcx     # 0x3b2af
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
leaq 0x216cc(%rip), %rsi     # 0x3b2c7
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
movl 0x23608(%rip), %ecx     # 0x3d21c
addl $0x140, %ecx            # imm = 0x140
cmpl %ecx, %eax
jne 0x19c20
jmp 0x19c3f
leaq 0x216bf(%rip), %rdi     # 0x3b2e6
leaq 0x21422(%rip), %rsi     # 0x3b050
movl $0x2d, %edx
leaq 0x21675(%rip), %rcx     # 0x3b2af
callq 0x20c0
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopl (%rax,%rax)
// File: jswaff[P]prophet3/test/eval__test.cpp
// Function: test_eval_rook_on_7th()
void test_eval_rook_on_7th() {
    position pos;
    set_pos(&pos,"7k/8/8/8/8/8/r7/7K w - - 0 1");
    int32_pair npmat = eval_nonpawn_material(&pos);
    assert(npmat.val1==0);
    assert(npmat.val2==rook_val);

    assert(eval(&pos,false)==-rook_val - rook_on_7th - rook_open_file);

    // move king out
    set_pos(&pos,"7k/8/8/8/8/7K/r7/8 w - - 0 1");
    assert(eval(&pos,false)==-rook_val - rook_open_file);

    // flipped
    set_pos(&pos,"7k/8/8/8/8/7K/r7/8 b - - 0 1");
    assert(eval(&pos,false)==rook_val  + rook_open_file);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
leaq -0x1c8(%rbp), %rdi
leaq 0x21727(%rip), %rsi     # 0x3b5f0
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
callq 0x73f0
movq %rax, -0x1d0(%rbp)
cmpl $0x0, -0x1d0(%rbp)
jne 0x19eec
jmp 0x19f0b
leaq 0x2171a(%rip), %rdi     # 0x3b60d
leaq 0x21156(%rip), %rsi     # 0x3b050
movl $0x55, %edx
leaq 0x21715(%rip), %rcx     # 0x3b61b
callq 0x20c0
cmpl $0x1f4, -0x1cc(%rbp)    # imm = 0x1F4
jne 0x19f19
jmp 0x19f38
leaq 0x21718(%rip), %rdi     # 0x3b638
leaq 0x21129(%rip), %rsi     # 0x3b050
movl $0x56, %edx
leaq 0x216e8(%rip), %rcx     # 0x3b61b
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
cmpl $0xfffffdc1, %eax       # imm = 0xFFFFFDC1
jne 0x19f4f
jmp 0x19f6e
leaq 0x216f7(%rip), %rdi     # 0x3b64d
leaq 0x210f3(%rip), %rsi     # 0x3b050
movl $0x58, %edx
leaq 0x216b2(%rip), %rcx     # 0x3b61b
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
leaq 0x2170c(%rip), %rsi     # 0x3b688
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
cmpl $0xfffffdf3, %eax       # imm = 0xFFFFFDF3
jne 0x19f98
jmp 0x19fb7
leaq 0x21706(%rip), %rdi     # 0x3b6a5
leaq 0x210aa(%rip), %rsi     # 0x3b050
movl $0x5c, %edx
leaq 0x21669(%rip), %rcx     # 0x3b61b
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
leaq 0x2170d(%rip), %rsi     # 0x3b6d2
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
cmpl $0x20d, %eax            # imm = 0x20D
jne 0x19fe1
jmp 0x1a000
leaq 0x21707(%rip), %rdi     # 0x3b6ef
leaq 0x21061(%rip), %rsi     # 0x3b050
movl $0x60, %edx
leaq 0x21620(%rip), %rcx     # 0x3b61b
callq 0x20c0
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopl (%rax)
// File: jswaff[P]prophet3/test/eval__test.cpp
// Function: test_eval_connected_majors_7th()
void test_eval_connected_majors_7th() {
    position pos;
    set_pos(&pos,"7k/R2R4/8/8/8/8/8/7K w - - 0 1");
    assert(eval(&pos,false)==rook_val*2 + rook_on_7th*2 + connected_majors_on_7th
            + rook_open_file*2);

    set_pos(&pos,"7k/R2RQ3/8/8/8/8/8/7K w - - 0 1");
    int32 expected = rook_val*2 + queen_val
            + rook_on_7th*3
            + connected_majors_on_7th*2
            + rook_open_file*2
            - eval_scale(king_safety_pawn_far_away // f file
                       + king_safety_pawn_far_away // g file
                       + (king_safety_pawn_far_away/2), // h file
                       rook_val*2+queen_val);
    assert(eval(&pos,false)==expected);

    // flip it
    set_pos(&pos,"7k/R2QR3/8/8/8/8/8/7K b - - 0 1");
    assert(eval(&pos,false)==-expected);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
leaq -0x1c8(%rbp), %rdi
leaq 0x216f2(%rip), %rsi     # 0x3b71b
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
cmpl $0x4ce, %eax            # imm = 0x4CE
jne 0x1a045
jmp 0x1a064
leaq 0x216ee(%rip), %rdi     # 0x3b73a
leaq 0x20ffd(%rip), %rsi     # 0x3b050
movl $0x67, %edx
leaq 0x21735(%rip), %rcx     # 0x3b794
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
leaq 0x21748(%rip), %rsi     # 0x3b7ba
callq 0xf3e0
movl $0xffffffb5, %edi       # imm = 0xFFFFFFB5
movl $0x76c, %esi            # imm = 0x76C
callq 0x7170
movl %eax, %ecx
movl $0x8d4, %eax            # imm = 0x8D4
subl %ecx, %eax
movl %eax, -0x1cc(%rbp)
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
cmpl -0x1cc(%rbp), %eax
jne 0x1a0ad
jmp 0x1a0cc
leaq 0x21726(%rip), %rdi     # 0x3b7da
leaq 0x20f95(%rip), %rsi     # 0x3b050
movl $0x72, %edx
leaq 0x216cd(%rip), %rcx     # 0x3b794
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
leaq 0x2171b(%rip), %rsi     # 0x3b7f5
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
xorl %ecx, %ecx
subl -0x1cc(%rbp), %ecx
cmpl %ecx, %eax
jne 0x1a0fb
jmp 0x1a11a
leaq 0x21713(%rip), %rdi     # 0x3b815
leaq 0x20f47(%rip), %rsi     # 0x3b050
movl $0x76, %edx
leaq 0x2167f(%rip), %rcx     # 0x3b794
callq 0x20c0
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jswaff[P]prophet3/test/eval__test.cpp
// Function: test_eval_rook_open_file()
void test_eval_rook_open_file() {
    position pos;

    set_pos(&pos,"3r3k/8/8/8/8/8/8/7K b - - 0 1");
    assert(eval(&pos,false)==rook_val + rook_open_file);

    set_pos(&pos,"3r3k/3r4/8/8/8/8/8/7K b - - 0 1");
    assert(eval(&pos,false)==rook_val*2 + rook_open_file*2);

    set_pos(&pos,"3r3k/8/3p4/8/8/8/8/7K b - - 0 1");
    assert(eval(&pos,false)==rook_val+pawn_val +passed_pawn+isolated_pawn
            + pawn_pst[fliprank[D6]]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
leaq -0x1c8(%rbp), %rdi
leaq 0x216e8(%rip), %rsi     # 0x3b831
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
cmpl $0x20d, %eax            # imm = 0x20D
jne 0x1a165
jmp 0x1a184
leaq 0x21583(%rip), %rdi     # 0x3b6ef
leaq 0x20edd(%rip), %rsi     # 0x3b050
movl $0x7d, %edx
leaq 0x216d0(%rip), %rcx     # 0x3b84f
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
leaq 0x216dd(%rip), %rsi     # 0x3b86f
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
cmpl $0x41a, %eax            # imm = 0x41A
jne 0x1a1ae
jmp 0x1a1cd
leaq 0x216da(%rip), %rdi     # 0x3b88f
leaq 0x20e94(%rip), %rsi     # 0x3b050
movl $0x80, %edx
leaq 0x21687(%rip), %rcx     # 0x3b84f
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
leaq 0x216e4(%rip), %rsi     # 0x3b8bf
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
movslq 0x22c07(%rip), %rdx     # 0x3cdfc
leaq 0x22eb4(%rip), %rcx     # 0x3d0b0
movl (%rcx,%rdx,4), %ecx
addl $0x258, %ecx            # imm = 0x258
cmpl %ecx, %eax
jne 0x1a20b
jmp 0x1a22a
leaq 0x216cd(%rip), %rdi     # 0x3b8df
leaq 0x20e37(%rip), %rsi     # 0x3b050
movl $0x84, %edx
leaq 0x2162a(%rip), %rcx     # 0x3b84f
callq 0x20c0
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jswaff[P]prophet3/test/eval__test.cpp
// Function: test_eval_rook_half_open_file()
void test_eval_rook_half_open_file() {
    position pos;

    set_pos(&pos,"8/2P5/8/2R5/K7/8/7k/8 w - - 0 1");
    assert(eval(&pos,false)==rook_val + pawn_val  + passed_pawn + isolated_pawn
            + pawn_pst[C7]);

    set_pos(&pos,"8/2p5/8/2R5/K7/8/7k/8 w - - 0 1");
    assert(eval(&pos,false)==rook_val-pawn_val -passed_pawn-isolated_pawn
            + pawn_pst[fliprank[C7]]
            + rook_half_open_file);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
leaq -0x1c8(%rbp), %rdi
leaq 0x216de(%rip), %rsi     # 0x3b937
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
movl 0x22e66(%rip), %ecx     # 0x3d0d8
addl $0x258, %ecx            # imm = 0x258
cmpl %ecx, %eax
jne 0x1a27e
jmp 0x1a29d
leaq 0x216d2(%rip), %rdi     # 0x3b957
leaq 0x20dc4(%rip), %rsi     # 0x3b050
movl $0x8c, %edx
leaq 0x21712(%rip), %rcx     # 0x3b9aa
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
leaq 0x21724(%rip), %rsi     # 0x3b9cf
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
movslq 0x22b13(%rip), %rdx     # 0x3cdd8
leaq 0x22de4(%rip), %rcx     # 0x3d0b0
movl (%rcx,%rdx,4), %ecx
addl $0x190, %ecx            # imm = 0x190
addl $0xf, %ecx
cmpl %ecx, %eax
jne 0x1a2de
jmp 0x1a2fd
leaq 0x2170a(%rip), %rdi     # 0x3b9ef
leaq 0x20d64(%rip), %rsi     # 0x3b050
movl $0x91, %edx
leaq 0x216b2(%rip), %rcx     # 0x3b9aa
callq 0x20c0
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jswaff[P]prophet3/test/eval__test.cpp
// Function: test_eval_queen()
void test_eval_queen() {
    position pos;

    set_pos(&pos,"3kq3/8/8/8/8/8/8/3K4 b - - 0 1");
    assert(eval(&pos,false)==queen_val + queen_pst[fliprank[E8]]);
    int32_pair npmat = eval_nonpawn_material(&pos);
    assert(npmat.val1==0);
    assert(npmat.val2==queen_val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
leaq -0x1c8(%rbp), %rdi
leaq 0x21734(%rip), %rsi     # 0x3ba5d
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
movslq 0x22a7d(%rip), %rdx     # 0x3cdc0
leaq 0x22b66(%rip), %rcx     # 0x3ceb0
movl (%rcx,%rdx,4), %ecx
addl $0x384, %ecx            # imm = 0x384
cmpl %ecx, %eax
jne 0x1a359
jmp 0x1a378
leaq 0x2171c(%rip), %rdi     # 0x3ba7c
leaq 0x20ce9(%rip), %rsi     # 0x3b050
movl $0x98, %edx
leaq 0x2173f(%rip), %rcx     # 0x3bab2
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
callq 0x73f0
movq %rax, -0x1d0(%rbp)
cmpl $0x0, -0x1d0(%rbp)
jne 0x1a396
jmp 0x1a3b5
leaq 0x21270(%rip), %rdi     # 0x3b60d
leaq 0x20cac(%rip), %rsi     # 0x3b050
movl $0x9a, %edx
leaq 0x21702(%rip), %rcx     # 0x3bab2
callq 0x20c0
cmpl $0x384, -0x1cc(%rbp)    # imm = 0x384
jne 0x1a3c3
jmp 0x1a3e2
leaq 0x216ff(%rip), %rdi     # 0x3bac9
leaq 0x20c7f(%rip), %rsi     # 0x3b050
movl $0x9b, %edx
leaq 0x216d5(%rip), %rcx     # 0x3bab2
callq 0x20c0
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopl (%rax,%rax)
// File: jswaff[P]prophet3/test/eval__test.cpp
// Function: test_king_pst()
void test_king_pst() {
    position pos;

    set_pos(&pos,"rnbqkbnr/pppppppp/8/8/3P4/3BPN2/PPP2PPP/RNBQR1K1 w - - 0 1");
    int32_pair npmat = eval_nonpawn_material(&pos);
    assert(0==npmat.val1-npmat.val2);

    int32_pair pmat = eval_pawn_material(&pos);
    assert(0==pmat.val1-pmat.val2);

    int32 score = eval(&pos,false);

    int32 tropism_delta = knight_tropism * distance(F3,pos.black_king)
        - knight_tropism * distance(G1,pos.black_king);

    assert(score==pawn_pst[D4] -pawn_pst[D2] + pawn_pst[E3] -pawn_pst[E2]
                 + bishop_pst[D3] - bishop_pst[F1]
                 + knight_pst[F3] - knight_pst[G1]
                 + rook_pst[E1] - rook_pst[H1]
                 + king_pst[G1] - king_pst[E1]
                 + tropism_delta);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
leaq -0x1c8(%rbp), %rdi
leaq 0x216d6(%rip), %rsi     # 0x3badf
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
callq 0x73f0
movq %rax, -0x1d0(%rbp)
movl -0x1d0(%rbp), %ecx
subl -0x1cc(%rbp), %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x1a435
jmp 0x1a454
leaq 0x216de(%rip), %rdi     # 0x3bb1a
leaq 0x20c0d(%rip), %rsi     # 0x3b050
movl $0xa3, %edx
leaq 0x216e4(%rip), %rcx     # 0x3bb33
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
callq 0x7580
movq %rax, -0x1d8(%rbp)
movl -0x1d8(%rbp), %ecx
subl -0x1d4(%rbp), %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x1a47b
jmp 0x1a49a
leaq 0x216c6(%rip), %rdi     # 0x3bb48
leaq 0x20bc7(%rip), %rsi     # 0x3b050
movl $0xa6, %edx
leaq 0x2169e(%rip), %rcx     # 0x3bb33
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
movl %eax, -0x1dc(%rbp)
movl -0x78(%rbp), %esi
movl $0x2d, %edi
callq 0x12350
imull $0xfffffffe, %eax, %eax # imm = 0xFFFFFFFE
movl %eax, -0x1e4(%rbp)
movl -0x78(%rbp), %esi
movl $0x3e, %edi
callq 0x12350
movl %eax, %ecx
movl -0x1e4(%rbp), %eax
imull $0xfffffffe, %ecx, %ecx # imm = 0xFFFFFFFE
subl %ecx, %eax
movl %eax, -0x1e0(%rbp)
movl -0x1dc(%rbp), %eax
movl 0x22c46(%rip), %ecx     # 0x3d13c
subl 0x22c80(%rip), %ecx     # 0x3d17c
addl 0x22c5e(%rip), %ecx     # 0x3d160
subl 0x22c78(%rip), %ecx     # 0x3d180
addl 0x22d4e(%rip), %ecx     # 0x3d25c
subl 0x22d90(%rip), %ecx     # 0x3d2a4
addl 0x2284a(%rip), %ecx     # 0x3cd64
subl 0x22888(%rip), %ecx     # 0x3cda8
addl 0x22e7a(%rip), %ecx     # 0x3d3a0
subl 0x22e80(%rip), %ecx     # 0x3d3ac
addl 0x22b76(%rip), %ecx     # 0x3d0a8
subl 0x22b68(%rip), %ecx     # 0x3d0a0
addl -0x1e0(%rbp), %ecx
cmpl %ecx, %eax
jne 0x1a544
jmp 0x1a563
leaq 0x21614(%rip), %rdi     # 0x3bb5f
leaq 0x20afe(%rip), %rsi     # 0x3b050
movl $0xb2, %edx
leaq 0x215d5(%rip), %rcx     # 0x3bb33
callq 0x20c0
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
nopl (%rax)
// File: jswaff[P]prophet3/test/eval__test.cpp
// Function: test_king_safety_middle_files()
void test_king_safety_middle_files() {
    position pos;

    // initial position then e3... no penalty
    set_pos(&pos,"rnbqkbnr/pppppppp/8/8/8/4P3/PPPP1PPP/RNBQKBNR w KQkq - 0 1");
    int32 score = eval(&pos,false);
    assert(score==pawn_pst[E3]-pawn_pst[E2]);

    // open file for both, so still no penalty
    set_pos(&pos,"rnbqkbnr/pppp1ppp/8/8/8/8/PPPP1PPP/RNBQKBNR w KQkq - 0 1");
    score = eval(&pos,false);
    assert(score==0);

    // remove both queens.  open e file.  put black king on d8
    set_pos(&pos,"rnbk1bnr/pppp1ppp/8/8/8/8/PPPP1PPP/RNB1KBNR b KQ - 0 1");
    score = eval(&pos,false);
    assert(score== -eval_scale(king_safety_middle_open_file,
            rook_val*2 + knight_val*2 + bishop_val*2) + king_pst[fliprank[D8]]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
leaq -0x1c8(%rbp), %rdi
leaq 0x21551(%rip), %rsi     # 0x3bcca
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
movl %eax, -0x1cc(%rbp)
movl -0x1cc(%rbp), %eax
movl 0x229c2(%rip), %ecx     # 0x3d160
subl 0x229dc(%rip), %ecx     # 0x3d180
cmpl %ecx, %eax
jne 0x1a7aa
jmp 0x1a7c9
leaq 0x21554(%rip), %rdi     # 0x3bd05
leaq 0x20898(%rip), %rsi     # 0x3b050
movl $0xd7, %edx
leaq 0x21562(%rip), %rcx     # 0x3bd26
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
leaq 0x21574(%rip), %rsi     # 0x3bd4b
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
movl %eax, -0x1cc(%rbp)
cmpl $0x0, -0x1cc(%rbp)
jne 0x1a7fb
jmp 0x1a81a
leaq 0x20845(%rip), %rdi     # 0x3b047
leaq 0x20847(%rip), %rsi     # 0x3b050
movl $0xdc, %edx
leaq 0x21511(%rip), %rcx     # 0x3bd26
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
leaq 0x2155c(%rip), %rsi     # 0x3bd84
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
movl %eax, -0x1cc(%rbp)
movl -0x1cc(%rbp), %eax
movl %eax, -0x1d0(%rbp)
movl $0xffffffce, %edi       # imm = 0xFFFFFFCE
movl $0x8c0, %esi            # imm = 0x8C0
callq 0x7170
movl %eax, %edx
movl -0x1d0(%rbp), %eax
xorl %ecx, %ecx
subl %edx, %ecx
movslq 0x2254d(%rip), %rsi     # 0x3cdbc
leaq 0x2273a(%rip), %rdx     # 0x3cfb0
addl (%rdx,%rsi,4), %ecx
cmpl %ecx, %eax
jne 0x1a87f
jmp 0x1a89e
leaq 0x21535(%rip), %rdi     # 0x3bdbb
leaq 0x207c3(%rip), %rsi     # 0x3b050
movl $0xe2, %edx
leaq 0x2148d(%rip), %rcx     # 0x3bd26
callq 0x20c0
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopw (%rax,%rax)
// File: jswaff[P]prophet3/test/eval__test.cpp
// Function: test_king_safety_queenside()
void test_king_safety_queenside() {
    position pos;

    // white pawn on c3
    set_pos(&pos,"1krq1bnr/pppppppp/8/8/8/2P5/PP1PPPPP/1KRQ1BNR w kq - 0 1");
    assert(eval(&pos,false)==pawn_pst[C3]-pawn_pst[C2]+eval_scale(king_safety_pawn_one_away,rook_val*2+queen_val+bishop_val+knight_val));

    // white pawn on b4
    set_pos(&pos,"1krq1bnr/pppppppp/8/8/1P6/8/P1PPPPPP/1KRQ1BNR w kq - 0 1");
    assert(eval(&pos,false)==pawn_pst[B4]-pawn_pst[B2]+eval_scale(king_safety_pawn_two_away,rook_val*2+queen_val+bishop_val+knight_val));

    // black pawn on a4
    set_pos(&pos,"1krq1bnr/1ppppppp/8/8/p7/8/PPPPPPPP/1KRQ1BNR b kq - 0 1");
    assert(eval(&pos,false)==pawn_pst[fliprank[A4]]-pawn_pst[fliprank[A7]]
       +eval_scale(king_safety_pawn_far_away/2,rook_val*2+queen_val+bishop_val+knight_val));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
leaq -0x1c8(%rbp), %rdi
leaq 0x2161f(%rip), %rsi     # 0x3c0d8
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
movl %eax, -0x1cc(%rbp)
movl 0x22680(%rip), %eax     # 0x3d158
subl 0x2269a(%rip), %eax     # 0x3d178
movl %eax, -0x1d0(%rbp)
movl $0xfffffff6, %edi       # imm = 0xFFFFFFF6
movl $0x9d8, %esi            # imm = 0x9D8
callq 0x7170
movl -0x1d0(%rbp), %ecx
movl %eax, %edx
movl -0x1cc(%rbp), %eax
addl %edx, %ecx
cmpl %ecx, %eax
jne 0x1ab09
jmp 0x1ab28
leaq 0x21601(%rip), %rdi     # 0x3c111
leaq 0x20539(%rip), %rsi     # 0x3b050
movl $0x100, %edx            # imm = 0x100
leaq 0x2166b(%rip), %rcx     # 0x3c18e
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
leaq 0x2167a(%rip), %rsi     # 0x3c1b0
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
movl %eax, -0x1d4(%rbp)
movl 0x225df(%rip), %eax     # 0x3d134
subl 0x22619(%rip), %eax     # 0x3d174
movl %eax, -0x1d8(%rbp)
movl $0xffffffec, %edi       # imm = 0xFFFFFFEC
movl $0x9d8, %esi            # imm = 0x9D8
callq 0x7170
movl -0x1d8(%rbp), %ecx
movl %eax, %edx
movl -0x1d4(%rbp), %eax
addl %edx, %ecx
cmpl %ecx, %eax
jne 0x1ab86
jmp 0x1aba5
leaq 0x2165c(%rip), %rdi     # 0x3c1e9
leaq 0x204bc(%rip), %rsi     # 0x3b050
movl $0x104, %edx            # imm = 0x104
leaq 0x215ee(%rip), %rcx     # 0x3c18e
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
leaq 0x216b3(%rip), %rsi     # 0x3c266
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
movl %eax, -0x1dc(%rbp)
movslq 0x2225d(%rip), %rcx     # 0x3ce30
leaq 0x224d6(%rip), %rax     # 0x3d0b0
movl (%rax,%rcx,4), %eax
movslq 0x221ec(%rip), %rdx     # 0x3cdd0
leaq 0x224c5(%rip), %rcx     # 0x3d0b0
subl (%rcx,%rdx,4), %eax
movl %eax, -0x1e0(%rbp)
movl $0xfffffff1, %edi       # imm = 0xFFFFFFF1
movl $0x9d8, %esi            # imm = 0x9D8
callq 0x7170
movl -0x1e0(%rbp), %ecx
movl %eax, %edx
movl -0x1dc(%rbp), %eax
addl %edx, %ecx
cmpl %ecx, %eax
jne 0x1ac19
jmp 0x1ac38
leaq 0x2167e(%rip), %rdi     # 0x3c29e
leaq 0x20429(%rip), %rsi     # 0x3b050
movl $0x109, %edx            # imm = 0x109
leaq 0x2155b(%rip), %rcx     # 0x3c18e
callq 0x20c0
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jswaff[P]prophet3/test/eval__test.cpp
// Function: test_eval_symmetry(int, position*)
bool test_eval_symmetry(int32 score,position *pos) {
    position flip_pos;

    memcpy(&flip_pos,pos,sizeof(position));
    flip_board(&flip_pos);

    int32 score2=eval(&flip_pos,false);
    assert(score==score2);

    flip_board(&flip_pos);
    assert(equal_pos(pos,&flip_pos,true));

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x1d8(%rbp), %rdi
movl $0x1c8, %edx            # imm = 0x1C8
callq 0x20f0
leaq -0x1d8(%rbp), %rdi
callq 0xfc80
leaq -0x1d8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
movl %eax, -0x1dc(%rbp)
movl -0x4(%rbp), %eax
cmpl -0x1dc(%rbp), %eax
jne 0x1afb4
jmp 0x1afd3
leaq 0x214ef(%rip), %rdi     # 0x3c4aa
leaq 0x2008e(%rip), %rsi     # 0x3b050
movl $0x13e, %edx            # imm = 0x13E
leaq 0x214ea(%rip), %rcx     # 0x3c4b8
callq 0x20c0
leaq -0x1d8(%rbp), %rdi
callq 0xfc80
movq -0x10(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
movl $0x1, %edx
callq 0xe490
testb $0x1, %al
jne 0x1affa
jmp 0x1affc
jmp 0x1b01b
leaq 0x214e0(%rip), %rdi     # 0x3c4e3
leaq 0x20046(%rip), %rsi     # 0x3b050
movl $0x141, %edx            # imm = 0x141
leaq 0x214a2(%rip), %rcx     # 0x3c4b8
callq 0x20c0
movb $0x1, %al
andb $0x1, %al
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
nopl (%rax,%rax)
// File: jswaff[P]prophet3/test/eval__test.cpp
// Function: test_eval_material()
void test_eval_material() {
    position pos;

    set_pos(&pos,"8/k7/prb5/K7/QN6/8/8/8 b - - 0 1");
    int32_pair np = eval_nonpawn_material(&pos);
    assert(np.val1==queen_val+knight_val);
    assert(np.val2==rook_val+bishop_val);

    int32_pair p = eval_pawn_material(&pos);
    assert(p.val1==0);
    assert(p.val2==pawn_val);

    assert(eval(&pos,true)==pawn_val+rook_val+bishop_val-queen_val-knight_val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
leaq -0x1c8(%rbp), %rdi
leaq 0x2187e(%rip), %rsi     # 0x3cb57
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
callq 0x73f0
movq %rax, -0x1d0(%rbp)
cmpl $0x4b0, -0x1d0(%rbp)    # imm = 0x4B0
jne 0x1b2ff
jmp 0x1b31e
leaq 0x21872(%rip), %rdi     # 0x3cb78
leaq 0x1fd43(%rip), %rsi     # 0x3b050
movl $0x170, %edx            # imm = 0x170
leaq 0x2187d(%rip), %rcx     # 0x3cb96
callq 0x20c0
cmpl $0x334, -0x1cc(%rbp)    # imm = 0x334
jne 0x1b32c
jmp 0x1b34b
leaq 0x2187d(%rip), %rdi     # 0x3cbb0
leaq 0x1fd16(%rip), %rsi     # 0x3b050
movl $0x171, %edx            # imm = 0x171
leaq 0x21850(%rip), %rcx     # 0x3cb96
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
callq 0x7580
movq %rax, -0x1d8(%rbp)
cmpl $0x0, -0x1d8(%rbp)
jne 0x1b369
jmp 0x1b388
leaq 0x2185d(%rip), %rdi     # 0x3cbcd
leaq 0x1fcd9(%rip), %rsi     # 0x3b050
movl $0x174, %edx            # imm = 0x174
leaq 0x21813(%rip), %rcx     # 0x3cb96
callq 0x20c0
cmpl $0x64, -0x1d4(%rbp)
jne 0x1b393
jmp 0x1b3b2
leaq 0x2183d(%rip), %rdi     # 0x3cbd7
leaq 0x1fcaf(%rip), %rsi     # 0x3b050
movl $0x175, %edx            # imm = 0x175
leaq 0x217e9(%rip), %rcx     # 0x3cb96
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x1, %esi
callq 0x7630
cmpl $0xfffffee8, %eax       # imm = 0xFFFFFEE8
jne 0x1b3cc
jmp 0x1b3eb
leaq 0x21815(%rip), %rdi     # 0x3cbe8
leaq 0x1fc76(%rip), %rsi     # 0x3b050
movl $0x177, %edx            # imm = 0x177
leaq 0x217b0(%rip), %rcx     # 0x3cb96
callq 0x20c0
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jswaff[P]prophet3/test/eval__test.cpp
// Function: test_evalfunc()
void test_evalfunc() {
    position pos;

    reset_pos(&pos);
    assert(eval(&pos,false)==0);

    // ensure the score is from the player POV
    set_pos(&pos,"rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1");
    int32 score=eval(&pos,false);
    pos.player=WHITE;
    int32 score2=eval(&pos,false);
    assert(score==-score2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
leaq -0x1c8(%rbp), %rdi
callq 0xf390
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
cmpl $0x0, %eax
jne 0x1b4bc
jmp 0x1b4db
leaq 0x209a4(%rip), %rdi     # 0x3be67
leaq 0x1fb86(%rip), %rsi     # 0x3b050
movl $0x185, %edx            # imm = 0x185
leaq 0x217a7(%rip), %rcx     # 0x3cc7d
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
leaq 0x1de02(%rip), %rsi     # 0x392eb
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
movl %eax, -0x1cc(%rbp)
movl $0x1, -0x90(%rbp)
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x7630
movl %eax, -0x1d0(%rbp)
movl -0x1cc(%rbp), %eax
xorl %ecx, %ecx
subl -0x1d0(%rbp), %ecx
cmpl %ecx, %eax
jne 0x1b534
jmp 0x1b553
leaq 0x21757(%rip), %rdi     # 0x3cc92
leaq 0x1fb0e(%rip), %rsi     # 0x3b050
movl $0x18c, %edx            # imm = 0x18C
leaq 0x2172f(%rip), %rcx     # 0x3cc7d
callq 0x20c0
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopl (%rax)
// File: jswaff[P]prophet3/test/eval__test.cpp
// Function: test_eval()
void test_eval() {
    test_start_pos_is_0();
    test_eval_pawn();
    test_eval_knight();
    test_eval_bishop();
    test_eval_rook();
    test_eval_rook_on_7th();
    test_eval_connected_majors_7th();
    test_eval_rook_open_file();
    test_eval_rook_half_open_file();
    test_eval_queen();
    test_king_pst();
    test_king_endgame_pst();
    test_king_safety_middle_files();
    test_king_safety_kingside();
    test_king_safety_queenside();
    test_double_and_isolated_pawns();
    test_score1();
    test_score2();
    test_vertical_symmetry();
    test_eval_material();
    test_eval_scale();
    test_evalfunc();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x19840
callq 0x198a0
callq 0x199a0
callq 0x19b90
callq 0x19c50
callq 0x19eb0
callq 0x1a010
callq 0x1a130
callq 0x1a240
callq 0x1a310
callq 0x1a3f0
callq 0x1a570
callq 0x1a760
callq 0x1a8b0
callq 0x1aaa0
callq 0x1ac50
callq 0x1ae20
callq 0x1ae90
callq 0x1b030
callq 0x1b2c0
callq 0x1b400
callq 0x1b490
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: jswaff[P]prophet3/test/evalp__test.cpp
// Function: test_passed_pawn_initial_pos()
void test_passed_pawn_initial_pos() {
    position pos;
    reset_pos(&pos);

    for (int i=0;i<64;i++) {
        if (pos.piece[i]==PAWN || pos.piece[i]==-PAWN) {
            assert(!is_passed(&pos,(square_t)i,pos.piece[i]==PAWN));
            assert(!is_doubled(&pos,(square_t)i,pos.piece[i]==PAWN));
            assert(!is_isolated(&pos,(square_t)i,pos.piece[i]==PAWN));
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
leaq -0x1c8(%rbp), %rdi
callq 0xf390
movl $0x0, -0x1cc(%rbp)
cmpl $0x40, -0x1cc(%rbp)
jge 0x1b745
movslq -0x1cc(%rbp), %rax
cmpl $0x1, -0x1c8(%rbp,%rax,4)
je 0x1b634
movslq -0x1cc(%rbp), %rax
cmpl $-0x1, -0x1c8(%rbp,%rax,4)
jne 0x1b72f
movl -0x1cc(%rbp), %esi
movslq -0x1cc(%rbp), %rax
cmpl $0x1, -0x1c8(%rbp,%rax,4)
sete %al
movzbl %al, %edx
andl $0x1, %edx
leaq -0x1c8(%rbp), %rdi
callq 0x7c70
xorb $-0x1, %al
testb $0x1, %al
jne 0x1b666
jmp 0x1b668
jmp 0x1b687
leaq 0x21e41(%rip), %rdi     # 0x3d4b0
leaq 0x21e6a(%rip), %rsi     # 0x3d4e0
movl $0x13, %edx
leaq 0x21e73(%rip), %rcx     # 0x3d4f5
callq 0x20c0
movl -0x1cc(%rbp), %esi
movslq -0x1cc(%rbp), %rax
cmpl $0x1, -0x1c8(%rbp,%rax,4)
sete %al
movzbl %al, %edx
andl $0x1, %edx
leaq -0x1c8(%rbp), %rdi
callq 0x7d60
xorb $-0x1, %al
testb $0x1, %al
jne 0x1b6b9
jmp 0x1b6bb
jmp 0x1b6da
leaq 0x21e57(%rip), %rdi     # 0x3d519
leaq 0x21e17(%rip), %rsi     # 0x3d4e0
movl $0x14, %edx
leaq 0x21e20(%rip), %rcx     # 0x3d4f5
callq 0x20c0
movl -0x1cc(%rbp), %esi
movslq -0x1cc(%rbp), %rax
cmpl $0x1, -0x1c8(%rbp,%rax,4)
sete %al
movzbl %al, %edx
andl $0x1, %edx
leaq -0x1c8(%rbp), %rdi
callq 0x7e60
xorb $-0x1, %al
testb $0x1, %al
jne 0x1b70c
jmp 0x1b70e
jmp 0x1b72d
leaq 0x21e35(%rip), %rdi     # 0x3d54a
leaq 0x21dc4(%rip), %rsi     # 0x3d4e0
movl $0x15, %edx
leaq 0x21dcd(%rip), %rcx     # 0x3d4f5
callq 0x20c0
jmp 0x1b72f
jmp 0x1b731
movl -0x1cc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1cc(%rbp)
jmp 0x1b601
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nop
// File: jswaff[P]prophet3/test/evalp__test.cpp
// Function: test_passed_pawn_wiki_pos2()
void test_passed_pawn_wiki_pos2() {
    position pos;
    set_pos(&pos,"8/5ppp/8/5PPP/8/6k1/8/6K1 w - -");

    assert(!is_passed(&pos,F7,false));
    assert(!is_passed(&pos,G7,false));
    assert(!is_passed(&pos,H7,false));
    assert(!is_passed(&pos,F5,true));
    assert(!is_passed(&pos,G5,true));
    assert(!is_passed(&pos,H5,true));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
leaq -0x1c8(%rbp), %rdi
leaq 0x21cd1(%rip), %rsi     # 0x3d68a
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
movl $0xd, %esi
xorl %edx, %edx
callq 0x7c70
xorb $-0x1, %al
testb $0x1, %al
jne 0x1b9d9
jmp 0x1b9db
jmp 0x1b9fa
leaq 0x21cc8(%rip), %rdi     # 0x3d6aa
leaq 0x21af7(%rip), %rsi     # 0x3d4e0
movl $0x2e, %edx
leaq 0x21ccf(%rip), %rcx     # 0x3d6c4
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0xe, %esi
xorl %edx, %edx
callq 0x7c70
xorb $-0x1, %al
testb $0x1, %al
jne 0x1ba15
jmp 0x1ba17
jmp 0x1ba36
leaq 0x21cc8(%rip), %rdi     # 0x3d6e6
leaq 0x21abb(%rip), %rsi     # 0x3d4e0
movl $0x2f, %edx
leaq 0x21c93(%rip), %rcx     # 0x3d6c4
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0xf, %esi
xorl %edx, %edx
callq 0x7c70
xorb $-0x1, %al
testb $0x1, %al
jne 0x1ba51
jmp 0x1ba53
jmp 0x1ba72
leaq 0x21ca6(%rip), %rdi     # 0x3d700
leaq 0x21a7f(%rip), %rsi     # 0x3d4e0
movl $0x30, %edx
leaq 0x21c57(%rip), %rcx     # 0x3d6c4
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x1d, %esi
movl $0x1, %edx
callq 0x7c70
xorb $-0x1, %al
testb $0x1, %al
jne 0x1ba90
jmp 0x1ba92
jmp 0x1bab1
leaq 0x21c81(%rip), %rdi     # 0x3d71a
leaq 0x21a40(%rip), %rsi     # 0x3d4e0
movl $0x31, %edx
leaq 0x21c18(%rip), %rcx     # 0x3d6c4
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x1e, %esi
movl $0x1, %edx
callq 0x7c70
xorb $-0x1, %al
testb $0x1, %al
jne 0x1bacf
jmp 0x1bad1
jmp 0x1baf0
leaq 0x21c5b(%rip), %rdi     # 0x3d733
leaq 0x21a01(%rip), %rsi     # 0x3d4e0
movl $0x32, %edx
leaq 0x21bd9(%rip), %rcx     # 0x3d6c4
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x1f, %esi
movl $0x1, %edx
callq 0x7c70
xorb $-0x1, %al
testb $0x1, %al
jne 0x1bb0e
jmp 0x1bb10
jmp 0x1bb2f
leaq 0x21b40(%rip), %rdi     # 0x3d657
leaq 0x219c2(%rip), %rsi     # 0x3d4e0
movl $0x33, %edx
leaq 0x21b9a(%rip), %rcx     # 0x3d6c4
callq 0x20c0
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopl (%rax,%rax)
// File: jswaff[P]prophet3/test/evalp__test.cpp
// Function: test_passed_pawn_wiki_pos3()
void test_passed_pawn_wiki_pos3() {
    position pos;
    set_pos(&pos,"8/8/1PP2PbP/3r4/8/1Q5p/p5N1/k3K3 b - -");

    assert(is_passed(&pos,B6,true));
    assert(is_passed(&pos,C6,true));
    assert(is_passed(&pos,F6,true));
    assert(is_passed(&pos,H6,true));
    assert(is_passed(&pos,A2,false));
    assert(is_passed(&pos,H3,false));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
leaq -0x1c8(%rbp), %rdi
leaq 0x21bf3(%rip), %rsi     # 0x3d74c
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
movl $0x11, %esi
movl $0x1, %edx
callq 0x7c70
testb $0x1, %al
jne 0x1bb7a
jmp 0x1bb7c
jmp 0x1bb9b
leaq 0x21bf0(%rip), %rdi     # 0x3d773
leaq 0x21956(%rip), %rsi     # 0x3d4e0
movl $0x3a, %edx
leaq 0x21bf5(%rip), %rcx     # 0x3d78b
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x12, %esi
movl $0x1, %edx
callq 0x7c70
testb $0x1, %al
jne 0x1bbb7
jmp 0x1bbb9
jmp 0x1bbd8
leaq 0x21bed(%rip), %rdi     # 0x3d7ad
leaq 0x21919(%rip), %rsi     # 0x3d4e0
movl $0x3b, %edx
leaq 0x21bb8(%rip), %rcx     # 0x3d78b
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x15, %esi
movl $0x1, %edx
callq 0x7c70
testb $0x1, %al
jne 0x1bbf4
jmp 0x1bbf6
jmp 0x1bc15
leaq 0x21bc8(%rip), %rdi     # 0x3d7c5
leaq 0x218dc(%rip), %rsi     # 0x3d4e0
movl $0x3c, %edx
leaq 0x21b7b(%rip), %rcx     # 0x3d78b
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x17, %esi
movl $0x1, %edx
callq 0x7c70
testb $0x1, %al
jne 0x1bc31
jmp 0x1bc33
jmp 0x1bc52
leaq 0x21ba3(%rip), %rdi     # 0x3d7dd
leaq 0x2189f(%rip), %rsi     # 0x3d4e0
movl $0x3d, %edx
leaq 0x21b3e(%rip), %rcx     # 0x3d78b
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x30, %esi
xorl %edx, %edx
callq 0x7c70
testb $0x1, %al
jne 0x1bc6b
jmp 0x1bc6d
jmp 0x1bc8c
leaq 0x21b81(%rip), %rdi     # 0x3d7f5
leaq 0x21865(%rip), %rsi     # 0x3d4e0
movl $0x3e, %edx
leaq 0x21b04(%rip), %rcx     # 0x3d78b
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x2f, %esi
xorl %edx, %edx
callq 0x7c70
testb $0x1, %al
jne 0x1bca5
jmp 0x1bca7
jmp 0x1bcc6
leaq 0x21b60(%rip), %rdi     # 0x3d80e
leaq 0x2182b(%rip), %rsi     # 0x3d4e0
movl $0x3f, %edx
leaq 0x21aca(%rip), %rcx     # 0x3d78b
callq 0x20c0
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nop
// File: jswaff[P]prophet3/test/evalp__test.cpp
// Function: test_passed_pawn_wiki_pos4()
void test_passed_pawn_wiki_pos4() {
    position pos;
    set_pos(&pos,"k7/b1P5/KP6/6q1/8/8/8/4n3 b - -");

    assert(is_passed(&pos,B6,true));
    assert(is_passed(&pos,C7,true));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
leaq -0x1c8(%rbp), %rdi
leaq 0x21b3e(%rip), %rsi     # 0x3d827
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
movl $0x11, %esi
movl $0x1, %edx
callq 0x7c70
testb $0x1, %al
jne 0x1bd0a
jmp 0x1bd0c
jmp 0x1bd2b
leaq 0x21a60(%rip), %rdi     # 0x3d773
leaq 0x217c6(%rip), %rsi     # 0x3d4e0
movl $0x46, %edx
leaq 0x21b21(%rip), %rcx     # 0x3d847
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0xa, %esi
movl $0x1, %edx
callq 0x7c70
testb $0x1, %al
jne 0x1bd47
jmp 0x1bd49
jmp 0x1bd68
leaq 0x21b19(%rip), %rdi     # 0x3d869
leaq 0x21789(%rip), %rsi     # 0x3d4e0
movl $0x47, %edx
leaq 0x21ae4(%rip), %rcx     # 0x3d847
callq 0x20c0
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jswaff[P]prophet3/test/evalp__test.cpp
// Function: test_levinfish_smyslov57()
void test_levinfish_smyslov57() {
    position pos;
    set_pos(&pos,"R7/6k1/P5p1/5p1p/5P1P/r5P1/5K2/8 w - -");

    assert(is_passed(&pos,A6,true));
    assert(!is_passed(&pos,G6,false));
    assert(!is_passed(&pos,F5,false));
    assert(!is_passed(&pos,H5,false));
    assert(!is_passed(&pos,F4,true));
    assert(!is_passed(&pos,H4,true));
    assert(!is_passed(&pos,G3,true));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
leaq -0x1c8(%rbp), %rdi
leaq 0x21ae8(%rip), %rsi     # 0x3d881
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
movl $0x10, %esi
movl $0x1, %edx
callq 0x7c70
testb $0x1, %al
jne 0x1bdba
jmp 0x1bdbc
jmp 0x1bddb
leaq 0x21ae5(%rip), %rdi     # 0x3d8a8
leaq 0x21716(%rip), %rsi     # 0x3d4e0
movl $0x4e, %edx
leaq 0x21aea(%rip), %rcx     # 0x3d8c0
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x16, %esi
xorl %edx, %edx
callq 0x7c70
xorb $-0x1, %al
testb $0x1, %al
jne 0x1bdf6
jmp 0x1bdf8
jmp 0x1be17
leaq 0x21ae1(%rip), %rdi     # 0x3d8e0
leaq 0x216da(%rip), %rsi     # 0x3d4e0
movl $0x4f, %edx
leaq 0x21aae(%rip), %rcx     # 0x3d8c0
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x1d, %esi
xorl %edx, %edx
callq 0x7c70
xorb $-0x1, %al
testb $0x1, %al
jne 0x1be32
jmp 0x1be34
jmp 0x1be53
leaq 0x217d0(%rip), %rdi     # 0x3d60b
leaq 0x2169e(%rip), %rsi     # 0x3d4e0
movl $0x50, %edx
leaq 0x21a72(%rip), %rcx     # 0x3d8c0
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x1f, %esi
xorl %edx, %edx
callq 0x7c70
xorb $-0x1, %al
testb $0x1, %al
jne 0x1be6e
jmp 0x1be70
jmp 0x1be8f
leaq 0x21a83(%rip), %rdi     # 0x3d8fa
leaq 0x21662(%rip), %rsi     # 0x3d4e0
movl $0x51, %edx
leaq 0x21a36(%rip), %rcx     # 0x3d8c0
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x25, %esi
movl $0x1, %edx
callq 0x7c70
xorb $-0x1, %al
testb $0x1, %al
jne 0x1bead
jmp 0x1beaf
jmp 0x1bece
leaq 0x2176f(%rip), %rdi     # 0x3d625
leaq 0x21623(%rip), %rsi     # 0x3d4e0
movl $0x52, %edx
leaq 0x219f7(%rip), %rcx     # 0x3d8c0
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x27, %esi
movl $0x1, %edx
callq 0x7c70
xorb $-0x1, %al
testb $0x1, %al
jne 0x1beec
jmp 0x1beee
jmp 0x1bf0d
leaq 0x21a1f(%rip), %rdi     # 0x3d914
leaq 0x215e4(%rip), %rsi     # 0x3d4e0
movl $0x53, %edx
leaq 0x219b8(%rip), %rcx     # 0x3d8c0
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x2e, %esi
movl $0x1, %edx
callq 0x7c70
xorb $-0x1, %al
testb $0x1, %al
jne 0x1bf2b
jmp 0x1bf2d
jmp 0x1bf4c
leaq 0x219f9(%rip), %rdi     # 0x3d92d
leaq 0x215a5(%rip), %rsi     # 0x3d4e0
movl $0x54, %edx
leaq 0x21979(%rip), %rcx     # 0x3d8c0
callq 0x20c0
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jswaff[P]prophet3/test/evalp__test.cpp
// Function: test_fischer_larsen71()
void test_fischer_larsen71() {
    position pos;
    set_pos(&pos,"8/4kp2/6p1/7p/P7/2K3P1/7P/8 b - -");

    assert(!is_passed(&pos,F7,false));
    assert(!is_passed(&pos,G6,false));
    assert(!is_passed(&pos,H5,false));
    assert(is_passed(&pos,A4,true));
    assert(!is_passed(&pos,G3,true));
    assert(!is_passed(&pos,H2,true));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
leaq -0x1c8(%rbp), %rdi
leaq 0x219cd(%rip), %rsi     # 0x3d946
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
movl $0xd, %esi
xorl %edx, %edx
callq 0x7c70
xorb $-0x1, %al
testb $0x1, %al
jne 0x1bf99
jmp 0x1bf9b
jmp 0x1bfba
leaq 0x21708(%rip), %rdi     # 0x3d6aa
leaq 0x21537(%rip), %rsi     # 0x3d4e0
movl $0x5b, %edx
leaq 0x219b3(%rip), %rcx     # 0x3d968
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x16, %esi
xorl %edx, %edx
callq 0x7c70
xorb $-0x1, %al
testb $0x1, %al
jne 0x1bfd5
jmp 0x1bfd7
jmp 0x1bff6
leaq 0x21902(%rip), %rdi     # 0x3d8e0
leaq 0x214fb(%rip), %rsi     # 0x3d4e0
movl $0x5c, %edx
leaq 0x21977(%rip), %rcx     # 0x3d968
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x1f, %esi
xorl %edx, %edx
callq 0x7c70
xorb $-0x1, %al
testb $0x1, %al
jne 0x1c011
jmp 0x1c013
jmp 0x1c032
leaq 0x218e0(%rip), %rdi     # 0x3d8fa
leaq 0x214bf(%rip), %rsi     # 0x3d4e0
movl $0x5d, %edx
leaq 0x2193b(%rip), %rcx     # 0x3d968
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
callq 0x7c70
testb $0x1, %al
jne 0x1c04e
jmp 0x1c050
jmp 0x1c06f
leaq 0x2192e(%rip), %rdi     # 0x3d985
leaq 0x21482(%rip), %rsi     # 0x3d4e0
movl $0x5e, %edx
leaq 0x218fe(%rip), %rcx     # 0x3d968
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x2e, %esi
movl $0x1, %edx
callq 0x7c70
xorb $-0x1, %al
testb $0x1, %al
jne 0x1c08d
jmp 0x1c08f
jmp 0x1c0ae
leaq 0x21897(%rip), %rdi     # 0x3d92d
leaq 0x21443(%rip), %rsi     # 0x3d4e0
movl $0x5f, %edx
leaq 0x218bf(%rip), %rcx     # 0x3d968
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x37, %esi
movl $0x1, %edx
callq 0x7c70
xorb $-0x1, %al
testb $0x1, %al
jne 0x1c0cc
jmp 0x1c0ce
jmp 0x1c0ed
leaq 0x218c8(%rip), %rdi     # 0x3d99d
leaq 0x21404(%rip), %rsi     # 0x3d4e0
movl $0x60, %edx
leaq 0x21880(%rip), %rcx     # 0x3d968
callq 0x20c0
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jswaff[P]prophet3/test/evalp__test.cpp
// Function: test_doubled()
void test_doubled() {
    position pos;
    set_pos(&pos,"k7/p1p3p1/3p3p/1P5P/1PP1P1P1/8/8/K7 w - - 0 1");

    assert(!is_passed(&pos,B5,true));
    assert(is_doubled(&pos,B5,true));
    assert(!is_isolated(&pos,B5,true));

    assert(!is_passed(&pos,B4,true));
    assert(is_doubled(&pos,B4,true));
    assert(!is_isolated(&pos,B4,true));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
leaq -0x1c8(%rbp), %rdi
leaq 0x21571(%rip), %rsi     # 0x3dc2a
callq 0xf3e0
leaq -0x1c8(%rbp), %rdi
movl $0x19, %esi
movl $0x1, %edx
callq 0x7c70
xorb $-0x1, %al
testb $0x1, %al
jne 0x1c6dc
jmp 0x1c6de
jmp 0x1c6fd
leaq 0x21573(%rip), %rdi     # 0x3dc58
leaq 0x20df4(%rip), %rsi     # 0x3d4e0
movl $0x8d, %edx
leaq 0x21579(%rip), %rcx     # 0x3dc71
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x19, %esi
movl $0x1, %edx
callq 0x7d60
testb $0x1, %al
jne 0x1c719
jmp 0x1c71b
jmp 0x1c73a
leaq 0x21563(%rip), %rdi     # 0x3dc85
leaq 0x20db7(%rip), %rsi     # 0x3d4e0
movl $0x8e, %edx
leaq 0x2153c(%rip), %rcx     # 0x3dc71
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x19, %esi
movl $0x1, %edx
callq 0x7e60
xorb $-0x1, %al
testb $0x1, %al
jne 0x1c758
jmp 0x1c75a
jmp 0x1c779
leaq 0x2153d(%rip), %rdi     # 0x3dc9e
leaq 0x20d78(%rip), %rsi     # 0x3d4e0
movl $0x8f, %edx
leaq 0x214fd(%rip), %rcx     # 0x3dc71
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x21, %esi
movl $0x1, %edx
callq 0x7c70
xorb $-0x1, %al
testb $0x1, %al
jne 0x1c797
jmp 0x1c799
jmp 0x1c7b8
leaq 0x21519(%rip), %rdi     # 0x3dcb9
leaq 0x20d39(%rip), %rsi     # 0x3d4e0
movl $0x91, %edx
leaq 0x214be(%rip), %rcx     # 0x3dc71
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x21, %esi
movl $0x1, %edx
callq 0x7d60
testb $0x1, %al
jne 0x1c7d4
jmp 0x1c7d6
jmp 0x1c7f5
leaq 0x214f5(%rip), %rdi     # 0x3dcd2
leaq 0x20cfc(%rip), %rsi     # 0x3d4e0
movl $0x92, %edx
leaq 0x21481(%rip), %rcx     # 0x3dc71
callq 0x20c0
leaq -0x1c8(%rbp), %rdi
movl $0x21, %esi
movl $0x1, %edx
callq 0x7e60
xorb $-0x1, %al
testb $0x1, %al
jne 0x1c813
jmp 0x1c815
jmp 0x1c834
leaq 0x214cf(%rip), %rdi     # 0x3dceb
leaq 0x20cbd(%rip), %rsi     # 0x3d4e0
movl $0x93, %edx
leaq 0x21442(%rip), %rcx     # 0x3dc71
callq 0x20c0
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopl (%rax)
// File: jswaff[P]prophet3/test/evalp__test.cpp
// Function: test_evalp()
void test_evalp() {
    test_passed_pawn_initial_pos();
    test_passed_pawn_wiki_pos();
    test_passed_pawn_wiki_pos2();
    test_passed_pawn_wiki_pos3();
    test_passed_pawn_wiki_pos4();
    test_levinfish_smyslov57();
    test_fischer_larsen71();
    test_botvinnik_capablanca38();
    test_isolated_pawn();
    test_doubled();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x1b5e0
callq 0x1b750
callq 0x1b9a0
callq 0x1bb40
callq 0x1bcd0
callq 0x1bd80
callq 0x1bf60
callq 0x1c100
callq 0x1c390
callq 0x1c6a0
popq %rbp
retq
nopl (%rax,%rax)
// File: jswaff[P]prophet3/test/extend__test.cpp
// Function: test_no_extension()
void test_no_extension() {
    position pos;
    reset_pos(&pos);

    move e2e4 = to_move(PAWN,E2,E4);
    apply_move(&pos,e2e4,gundos);

    assert(0==extend(&pos,e2e4,false));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
leaq -0x1c8(%rbp), %rdi
callq 0xf390
movl $0x1, %edi
movl $0x34, %esi
movl $0x24, %edx
callq 0xa830
movq %rax, -0x1d0(%rbp)
movq -0x1d0(%rbp), %rsi
leaq -0x1c8(%rbp), %rdi
leaq 0xb73e9(%rip), %rdx     # 0xd3cb0
callq 0x3620
movq -0x1d0(%rbp), %rsi
leaq -0x1c8(%rbp), %rdi
xorl %edx, %edx
callq 0x8150
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x1c8eb
jmp 0x1c90a
leaq 0x21414(%rip), %rdi     # 0x3dd06
leaq 0x21428(%rip), %rsi     # 0x3dd21
movl $0x15, %edx
leaq 0x21432(%rip), %rcx     # 0x3dd37
callq 0x20c0
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jswaff[P]prophet3/test/extend__test.cpp
// Function: test_extend_promotion()
void test_extend_promotion() {
    position pos;
    set_pos(&pos,"k7/b1P5/KP6/6q1/8/8/8/4n3 w - -");

    move moves[MAX_MOVES_PER_PLY];
    move *endp = gen_legal_moves(moves,&pos,true,true);

    move c7c8q = to_move(PAWN,C7,C8);
    set_promopiece(&c7c8q,QUEEN);

    assert(is_in_move_list(c7c8q,moves,endp));

    apply_move(&pos,c7c8q,gundos);

    assert(1==extend(&pos,c7c8q,true));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb40, %rsp            # imm = 0xB40
leaq -0x1c8(%rbp), %rdi
leaq 0x21417(%rip), %rsi     # 0x3dd50
callq 0xf3e0
leaq -0xb30(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
movl $0x1, %ecx
movl %ecx, %edx
callq 0xac70
movq %rax, -0xb38(%rbp)
movl $0x1, %edi
movl $0xa, %esi
movl $0x2, %edx
callq 0xa830
movq %rax, -0xb40(%rbp)
leaq -0xb40(%rbp), %rdi
movl $0x5, %esi
callq 0xa9e0
movq -0xb40(%rbp), %rdi
leaq -0xb30(%rbp), %rsi
movq -0xb38(%rbp), %rdx
callq 0x14c10
testb $0x1, %al
jne 0x1c9ab
jmp 0x1c9ad
jmp 0x1c9cc
leaq 0x213bc(%rip), %rdi     # 0x3dd70
leaq 0x21366(%rip), %rsi     # 0x3dd21
movl $0x22, %edx
leaq 0x213cb(%rip), %rcx     # 0x3dd92
callq 0x20c0
movq -0xb40(%rbp), %rsi
leaq -0x1c8(%rbp), %rdi
leaq 0xb72cf(%rip), %rdx     # 0xd3cb0
callq 0x3620
movq -0xb40(%rbp), %rsi
leaq -0x1c8(%rbp), %rdi
movl $0x1, %edx
callq 0x8150
movl %eax, %ecx
movl $0x1, %eax
cmpl %ecx, %eax
jne 0x1ca0b
jmp 0x1ca2a
leaq 0x2139d(%rip), %rdi     # 0x3ddaf
leaq 0x21308(%rip), %rsi     # 0x3dd21
movl $0x26, %edx
leaq 0x2136d(%rip), %rcx     # 0x3dd92
callq 0x20c0
addq $0xb40, %rsp            # imm = 0xB40
popq %rbp
retq
nopw %cs:(%rax,%rax)