LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/test/bitboards__test.cpp
// Function: test_pawn_attacks()
void test_pawn_attacks() {
    assert(bb_pawn_attacks[E4][WHITE]==(bb_squares[D5] | bb_squares[F5]));
    assert(bb_pawn_attacks[E4][BLACK]==(bb_squares[D3] | bb_squares[F3]));

    assert(bb_pawn_attacks[A2][WHITE]==bb_squares[B3]);
    assert(bb_pawn_attacks[A2][BLACK]==bb_squares[B1]);

    assert(bb_pawn_attacks[H7][WHITE]==bb_squares[G8]);
    assert(bb_pawn_attacks[H7][BLACK]==bb_squares[G6]);
}

// Assembly:
pushq %rax
leaq 0xe97c9(%rip), %rax     # 0xfaab0
leaq 0xe91c2(%rip), %rcx     # 0xfa4b0
movq 0xe8(%rcx), %rdx
orq 0xd8(%rcx), %rdx
cmpq %rdx, 0x248(%rax)
jne 0x11367
movq 0x168(%rcx), %rdx
orq 0x158(%rcx), %rdx
cmpq %rdx, 0x240(%rax)
jne 0x11386
movq 0x308(%rax), %rdx
cmpq 0x148(%rcx), %rdx
jne 0x113a5
movq 0x300(%rax), %rdx
cmpq 0x1c8(%rcx), %rdx
jne 0x113c4
movq 0xf8(%rax), %rdx
cmpq 0x30(%rcx), %rdx
jne 0x113e3
movq 0xf0(%rax), %rax
cmpq 0xb0(%rcx), %rax
jne 0x11402
popq %rax
retq
leaq 0x1d618(%rip), %rdi     # 0x2e986
leaq 0x1d1f7(%rip), %rsi     # 0x2e56c
leaq 0x1d648(%rip), %rcx     # 0x2e9c4
movl $0x7b, %edx
callq 0x20d0
leaq 0x1d650(%rip), %rdi     # 0x2e9dd
leaq 0x1d1d8(%rip), %rsi     # 0x2e56c
leaq 0x1d629(%rip), %rcx     # 0x2e9c4
movl $0x7c, %edx
callq 0x20d0
leaq 0x1d66f(%rip), %rdi     # 0x2ea1b
leaq 0x1d1b9(%rip), %rsi     # 0x2e56c
leaq 0x1d60a(%rip), %rcx     # 0x2e9c4
movl $0x7e, %edx
callq 0x20d0
leaq 0x1d67b(%rip), %rdi     # 0x2ea46
leaq 0x1d19a(%rip), %rsi     # 0x2e56c
leaq 0x1d5eb(%rip), %rcx     # 0x2e9c4
movl $0x7f, %edx
callq 0x20d0
leaq 0x1d687(%rip), %rdi     # 0x2ea71
leaq 0x1d17b(%rip), %rsi     # 0x2e56c
leaq 0x1d5cc(%rip), %rcx     # 0x2e9c4
movl $0x81, %edx
callq 0x20d0
leaq 0x1d693(%rip), %rdi     # 0x2ea9c
leaq 0x1d15c(%rip), %rsi     # 0x2e56c
leaq 0x1d5ad(%rip), %rcx     # 0x2e9c4
movl $0x82, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/test/bitboards__test.cpp
// Function: test_rays()
void test_rays() {
    assert(bb_rays[D5][NORTH] == (bb_squares[D6] | bb_squares[D7] | bb_squares[D8]));
    assert(bb_rays[D5][SOUTH] == (bb_squares[D4] | bb_squares[D3] | bb_squares[D2] | bb_squares[D1]));
    assert(bb_rays[D5][WEST] == (bb_squares[C5] | bb_squares[B5] | bb_squares[A5]));
    assert(bb_rays[D5][EAST] == (bb_squares[E5] | bb_squares[F5] | bb_squares[G5] | bb_squares[H5]));
    assert(bb_rays[D5][NORTHEAST] == (bb_squares[E6] | bb_squares[F7] | bb_squares[G8]));
    assert(bb_rays[D5][SOUTHEAST] == (bb_squares[E4] | bb_squares[F3] | bb_squares[G2] | bb_squares[H1]));
    assert(bb_rays[D5][SOUTHWEST] == (bb_squares[C4] | bb_squares[B3] | bb_squares[A2]));
    assert(bb_rays[D5][NORTHWEST] == (bb_squares[C6] | bb_squares[B7] | bb_squares[A8]));
}

// Assembly:
pushq %rax
leaq 0xe9a87(%rip), %rax     # 0xfaeb0
leaq 0xe9080(%rip), %rcx     # 0xfa4b0
movq 0x58(%rcx), %rdx
orq 0x98(%rcx), %rdx
orq 0x18(%rcx), %rdx
cmpq %rdx, 0x6c0(%rax)
jne 0x11544
movq 0x158(%rcx), %rdx
orq 0x118(%rcx), %rdx
orq 0x198(%rcx), %rdx
orq 0x1d8(%rcx), %rdx
cmpq %rdx, 0x6e0(%rax)
jne 0x11563
movq 0xc8(%rcx), %rdx
orq 0xd0(%rcx), %rdx
orq 0xc0(%rcx), %rdx
cmpq %rdx, 0x6f0(%rax)
jne 0x11582
movq 0xe8(%rcx), %rdx
orq 0xe0(%rcx), %rdx
orq 0xf0(%rcx), %rdx
orq 0xf8(%rcx), %rdx
cmpq %rdx, 0x6d0(%rax)
jne 0x115a1
movq 0x68(%rcx), %rdx
orq 0xa0(%rcx), %rdx
orq 0x30(%rcx), %rdx
cmpq %rdx, 0x6c8(%rax)
jne 0x115c0
movq 0x168(%rcx), %rdx
orq 0x120(%rcx), %rdx
orq 0x1b0(%rcx), %rdx
orq 0x1f8(%rcx), %rdx
cmpq %rdx, 0x6d8(%rax)
jne 0x115df
movq 0x148(%rcx), %rdx
orq 0x110(%rcx), %rdx
orq 0x180(%rcx), %rdx
cmpq %rdx, 0x6e8(%rax)
jne 0x115fe
movq 0x48(%rcx), %rdx
orq 0x90(%rcx), %rdx
orq (%rcx), %rdx
cmpq %rdx, 0x6f8(%rax)
jne 0x1161d
popq %rax
retq
leaq 0x1d57c(%rip), %rdi     # 0x2eac7
leaq 0x1d01a(%rip), %rsi     # 0x2e56c
leaq 0x1d5b7(%rip), %rcx     # 0x2eb10
movl $0x86, %edx
callq 0x20d0
leaq 0x1d5b7(%rip), %rdi     # 0x2eb21
leaq 0x1cffb(%rip), %rsi     # 0x2e56c
leaq 0x1d598(%rip), %rcx     # 0x2eb10
movl $0x87, %edx
callq 0x20d0
leaq 0x1d5f2(%rip), %rdi     # 0x2eb7b
leaq 0x1cfdc(%rip), %rsi     # 0x2e56c
leaq 0x1d579(%rip), %rcx     # 0x2eb10
movl $0x88, %edx
callq 0x20d0
leaq 0x1d61b(%rip), %rdi     # 0x2ebc3
leaq 0x1cfbd(%rip), %rsi     # 0x2e56c
leaq 0x1d55a(%rip), %rcx     # 0x2eb10
movl $0x89, %edx
callq 0x20d0
leaq 0x1d655(%rip), %rdi     # 0x2ec1c
leaq 0x1cf9e(%rip), %rsi     # 0x2e56c
leaq 0x1d53b(%rip), %rcx     # 0x2eb10
movl $0x8a, %edx
callq 0x20d0
leaq 0x1d683(%rip), %rdi     # 0x2ec69
leaq 0x1cf7f(%rip), %rsi     # 0x2e56c
leaq 0x1d51c(%rip), %rcx     # 0x2eb10
movl $0x8b, %edx
callq 0x20d0
leaq 0x1d6c2(%rip), %rdi     # 0x2ecc7
leaq 0x1cf60(%rip), %rsi     # 0x2e56c
leaq 0x1d4fd(%rip), %rcx     # 0x2eb10
movl $0x8c, %edx
callq 0x20d0
leaq 0x1d6f0(%rip), %rdi     # 0x2ed14
leaq 0x1cf41(%rip), %rsi     # 0x2e56c
leaq 0x1d4de(%rip), %rcx     # 0x2eb10
movl $0x8d, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/test/bitboards__test.cpp
// Function: test_bitboards()
void test_bitboards() {
    test_get_num_bits();
    test_get_lsb();
    test_get_msb();
    test_isolate_lsb_bit();
    test_knight_moves();
    test_king_moves();
    test_pawn_attacks();
    test_rays();
}

// Assembly:
pushq %rax
callq 0x10a88
callq 0x10af2
callq 0x10b60
callq 0x10bce
callq 0x10cc6
callq 0x10fba
callq 0x112df
popq %rax
jmp 0x11421
nop
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/test/book__test.cpp
// Function: test_build_book_key()
void test_build_book_key() {
    position pos;
    reset_pos(&pos);

    int64 bkey = build_book_key(&pos);
    assert(bkey==8683256505108505948L);

    set_pos(&pos,"8/4Pk1p/6p1/1r6/8/5N2/2B2PPP/b5K1 w - - ");
    bkey = build_book_key(&pos);
    assert(bkey==5404474865777589476L);

    set_pos(&pos,"8/8/3k4/2n1P3/8/8/3rP3/RN2K2R w KQ - 0 1");
    bkey = build_book_key(&pos);
    assert(bkey==-6221215072275532145L);

    set_pos(&pos,"rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1");
    bkey = build_book_key(&pos);
    assert(bkey==8410219886346271288L);

    set_pos(&pos,"r3k2r/8/8/8/8/5Q2/8/4K3 b kq - 0 1");
    bkey = build_book_key(&pos);
    assert(bkey==-7818203441519759474);
}

// Assembly:
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa43
movq %rbx, %rdi
callq 0x4543
movabsq $0x78811fc91897a55c, %rcx # imm = 0x78811FC91897A55C
cmpq %rcx, %rax
jne 0x1175d
leaq 0x1d70c(%rip), %rsi     # 0x2edab
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0x4543
movabsq $0x4b008d419c333ce4, %rcx # imm = 0x4B008D419C333CE4
cmpq %rcx, %rax
jne 0x1177c
leaq 0x1d721(%rip), %rsi     # 0x2edef
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0x4543
movabsq $-0x56563225964a0971, %rcx # imm = 0xA9A9CDDA69B5F68F
cmpq %rcx, %rax
jne 0x1179b
leaq 0x1bd76(%rip), %rsi     # 0x2d473
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0x4543
movabsq $0x74b71a6d68987a38, %rcx # imm = 0x74B71A6D68987A38
cmpq %rcx, %rax
jne 0x117ba
leaq 0x1d723(%rip), %rsi     # 0x2ee4f
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0x4543
movabsq $-0x6c7fd69b81859072, %rcx # imm = 0x938029647E7A6F8E
cmpq %rcx, %rax
jne 0x117d9
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x1d5fd(%rip), %rdi     # 0x2ed61
leaq 0x1d611(%rip), %rsi     # 0x2ed7c
leaq 0x1d61e(%rip), %rcx     # 0x2ed90
movl $0x12, %edx
callq 0x20d0
leaq 0x1d651(%rip), %rdi     # 0x2edd4
leaq 0x1d5f2(%rip), %rsi     # 0x2ed7c
leaq 0x1d5ff(%rip), %rcx     # 0x2ed90
movl $0x16, %edx
callq 0x20d0
leaq 0x1d676(%rip), %rdi     # 0x2ee18
leaq 0x1d5d3(%rip), %rsi     # 0x2ed7c
leaq 0x1d5e0(%rip), %rcx     # 0x2ed90
movl $0x1a, %edx
callq 0x20d0
leaq 0x1d673(%rip), %rdi     # 0x2ee34
leaq 0x1d5b4(%rip), %rsi     # 0x2ed7c
leaq 0x1d5c1(%rip), %rcx     # 0x2ed90
movl $0x1e, %edx
callq 0x20d0
leaq 0x1d692(%rip), %rdi     # 0x2ee72
leaq 0x1d595(%rip), %rsi     # 0x2ed7c
leaq 0x1d5a2(%rip), %rcx     # 0x2ed90
movl $0x22, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/test/draw__test.cpp
// Function: test_is_draw_by_50()
void test_is_draw_by_50() {
    position pos;
    reset_pos(&pos);
    assert(!is_draw_by_50(&pos));

    pos.fifty_counter=pos.move_counter=49;
    assert(!is_draw_by_50(&pos));

    pos.fifty_counter=pos.move_counter=50;
    assert(!is_draw_by_50(&pos));

    pos.fifty_counter=pos.move_counter=51;
    assert(!is_draw_by_50(&pos));

    pos.fifty_counter=pos.move_counter=99;
    assert(!is_draw_by_50(&pos));

    pos.fifty_counter=pos.move_counter=100;
    assert(is_draw_by_50(&pos));
}

// Assembly:
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa43
movq %rbx, %rdi
callq 0x4b4c
testb %al, %al
jne 0x118e5
movabsq $0x3100000031, %rax     # imm = 0x3100000031
leaq 0x8(%rsp), %rdi
movq %rax, 0x144(%rdi)
callq 0x4b4c
testb %al, %al
jne 0x11904
movabsq $0x3200000032, %rax     # imm = 0x3200000032
leaq 0x8(%rsp), %rdi
movq %rax, 0x144(%rdi)
callq 0x4b4c
testb %al, %al
jne 0x11923
movabsq $0x3300000033, %rax     # imm = 0x3300000033
leaq 0x8(%rsp), %rdi
movq %rax, 0x144(%rdi)
callq 0x4b4c
testb %al, %al
jne 0x11942
movabsq $0x6300000063, %rax     # imm = 0x6300000063
leaq 0x8(%rsp), %rdi
movq %rax, 0x144(%rdi)
callq 0x4b4c
testb %al, %al
jne 0x11961
movabsq $0x6400000064, %rax     # imm = 0x6400000064
leaq 0x8(%rsp), %rdi
movq %rax, 0x144(%rdi)
callq 0x4b4c
testb %al, %al
je 0x11980
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x1d5a1(%rip), %rdi     # 0x2ee8d
leaq 0x1d5af(%rip), %rsi     # 0x2eea2
leaq 0x1d5bc(%rip), %rcx     # 0x2eeb6
movl $0xf, %edx
callq 0x20d0
leaq 0x1d582(%rip), %rdi     # 0x2ee8d
leaq 0x1d590(%rip), %rsi     # 0x2eea2
leaq 0x1d59d(%rip), %rcx     # 0x2eeb6
movl $0x12, %edx
callq 0x20d0
leaq 0x1d563(%rip), %rdi     # 0x2ee8d
leaq 0x1d571(%rip), %rsi     # 0x2eea2
leaq 0x1d57e(%rip), %rcx     # 0x2eeb6
movl $0x15, %edx
callq 0x20d0
leaq 0x1d544(%rip), %rdi     # 0x2ee8d
leaq 0x1d552(%rip), %rsi     # 0x2eea2
leaq 0x1d55f(%rip), %rcx     # 0x2eeb6
movl $0x18, %edx
callq 0x20d0
leaq 0x1d525(%rip), %rdi     # 0x2ee8d
leaq 0x1d533(%rip), %rsi     # 0x2eea2
leaq 0x1d540(%rip), %rcx     # 0x2eeb6
movl $0x1b, %edx
callq 0x20d0
leaq 0x1d507(%rip), %rdi     # 0x2ee8e
leaq 0x1d514(%rip), %rsi     # 0x2eea2
leaq 0x1d521(%rip), %rcx     # 0x2eeb6
movl $0x1e, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa43
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
testl %eax, %eax
jne 0x1216c
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x1cf0d(%rip), %rdi     # 0x2f080
leaq 0x1cf0f(%rip), %rsi     # 0x2f089
leaq 0x1cf1c(%rip), %rcx     # 0x2f09d
movl $0x12, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rsp, %rbx
movq %rbx, %rdi
callq 0xaa43
movq %rbx, %rdi
movl $0x34, %esi
movl $0x1, %edx
callq 0x5b74
cmpl $-0x3, %eax
jne 0x121fd
movq %rsp, %rdi
movl $0x9, %esi
xorl %edx, %edx
callq 0x5b74
testl %eax, %eax
jne 0x1221c
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x9, %esi
xorl %edx, %edx
callq 0x5b74
movl %eax, %ebp
movq %rbx, %rdi
movl $0x31, %esi
movl $0x1, %edx
callq 0x5b74
cmpl %eax, %ebp
jne 0x1223b
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %rbp
retq
leaq 0x1ceb4(%rip), %rdi     # 0x2f0b8
leaq 0x1ce7e(%rip), %rsi     # 0x2f089
leaq 0x1cecc(%rip), %rcx     # 0x2f0de
movl $0x18, %edx
callq 0x20d0
leaq 0x1ced1(%rip), %rdi     # 0x2f0f4
leaq 0x1ce5f(%rip), %rsi     # 0x2f089
leaq 0x1cead(%rip), %rcx     # 0x2f0de
movl $0x19, %edx
callq 0x20d0
leaq 0x1ced9(%rip), %rdi     # 0x2f11b
leaq 0x1ce40(%rip), %rsi     # 0x2f089
leaq 0x1ce8e(%rip), %rcx     # 0x2f0de
movl $0x1a, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa43
movq %rbx, %rdi
movl $0x2d, %esi
movl $0x1, %edx
callq 0x50a2
movl %eax, %ebx
movl $0x2d, %edi
movl $0x4, %esi
callq 0xcba2
addl %eax, %eax
movl $0x8, %ecx
subl %eax, %ecx
cmpl %ecx, %ebx
jne 0x12335
leaq 0x8(%rsp), %rdi
movl $0x13, %esi
movl $0x1, %edx
callq 0x50a2
movl %eax, %ebx
movl $0x13, %edi
movl $0x4, %esi
callq 0xcba2
addl %eax, %eax
movl $0x14, %ecx
subl %eax, %ecx
cmpl %ecx, %ebx
jne 0x12354
leaq 0x8(%rsp), %rdi
movl $0x2f, %esi
xorl %edx, %edx
callq 0x50a2
movl %eax, %ebx
movl $0x17, %edi
movl $0x4, %esi
callq 0xcba2
addl %eax, %eax
movl $0xfffffffb, %ecx       # imm = 0xFFFFFFFB
subl %eax, %ecx
cmpl %ecx, %ebx
jne 0x12373
leaq 0x8(%rsp), %rdi
movl $0xd, %esi
xorl %edx, %edx
callq 0x50a2
movl %eax, %ebx
movl $0x35, %edi
movl $0x4, %esi
callq 0xcba2
addl %eax, %eax
addl %ebx, %eax
jne 0x12392
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x1ce11(%rip), %rdi     # 0x2f14d
leaq 0x1cd46(%rip), %rsi     # 0x2f089
leaq 0x1ce50(%rip), %rcx     # 0x2f19a
movl $0x20, %edx
callq 0x20d0
leaq 0x1ce57(%rip), %rdi     # 0x2f1b2
leaq 0x1cd27(%rip), %rsi     # 0x2f089
leaq 0x1ce31(%rip), %rcx     # 0x2f19a
movl $0x21, %edx
callq 0x20d0
leaq 0x1ce85(%rip), %rdi     # 0x2f1ff
leaq 0x1cd08(%rip), %rsi     # 0x2f089
leaq 0x1ce12(%rip), %rcx     # 0x2f19a
movl $0x22, %edx
callq 0x20d0
leaq 0x1ceb4(%rip), %rdi     # 0x2f24d
leaq 0x1cce9(%rip), %rsi     # 0x2f089
leaq 0x1cdf3(%rip), %rcx     # 0x2f19a
movl $0x23, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x1cedb(%rip), %rsi     # 0x2f29b
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
cmpl $0x147, %eax            # imm = 0x147
jne 0x1240c
leaq 0x1cf1b(%rip), %rsi     # 0x2f300
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
cmpl $0x154, %eax            # imm = 0x154
jne 0x1242b
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x1cea7(%rip), %rdi     # 0x2f2ba
leaq 0x1cc6f(%rip), %rsi     # 0x2f089
leaq 0x1cec7(%rip), %rcx     # 0x2f2e8
movl $0x2a, %edx
callq 0x20d0
leaq 0x1ceed(%rip), %rdi     # 0x2f31f
leaq 0x1cc50(%rip), %rsi     # 0x2f089
leaq 0x1cea8(%rip), %rcx     # 0x2f2e8
movl $0x2d, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x1cffa(%rip), %rsi     # 0x2f629
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0x56ad
testl %eax, %eax
jne 0x126d1
movabsq $0x1f400000000, %rcx    # imm = 0x1F400000000
cmpq %rcx, %rax
jne 0x126f0
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x5846
cmpl $0xfffffdc1, %eax       # imm = 0xFFFFFDC1
jne 0x1270f
leaq 0x1d044(%rip), %rsi     # 0x2f6c1
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
cmpl $0xfffffdf3, %eax       # imm = 0xFFFFFDF3
jne 0x1272e
leaq 0x1d065(%rip), %rsi     # 0x2f70b
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
cmpl $0x20d, %eax            # imm = 0x20D
jne 0x1274d
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x1cf6e(%rip), %rdi     # 0x2f646
leaq 0x1c9aa(%rip), %rsi     # 0x2f089
leaq 0x1cf6e(%rip), %rcx     # 0x2f654
movl $0x55, %edx
callq 0x20d0
leaq 0x1cf7a(%rip), %rdi     # 0x2f671
leaq 0x1c98b(%rip), %rsi     # 0x2f089
leaq 0x1cf4f(%rip), %rcx     # 0x2f654
movl $0x56, %edx
callq 0x20d0
leaq 0x1cf70(%rip), %rdi     # 0x2f686
leaq 0x1c96c(%rip), %rsi     # 0x2f089
leaq 0x1cf30(%rip), %rcx     # 0x2f654
movl $0x58, %edx
callq 0x20d0
leaq 0x1cfa9(%rip), %rdi     # 0x2f6de
leaq 0x1c94d(%rip), %rsi     # 0x2f089
leaq 0x1cf11(%rip), %rcx     # 0x2f654
movl $0x5c, %edx
callq 0x20d0
leaq 0x1cfd4(%rip), %rdi     # 0x2f728
leaq 0x1c92e(%rip), %rsi     # 0x2f089
leaq 0x1cef2(%rip), %rcx     # 0x2f654
movl $0x60, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r14
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x1cfd6(%rip), %rsi     # 0x2f754
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
cmpl $0x4ce, %eax            # imm = 0x4CE
jne 0x1280a
leaq 0x1d050(%rip), %rsi     # 0x2f7f3
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xaa74
movl $0xffffffb5, %edi       # imm = 0xFFFFFFB5
movl $0x76c, %esi            # imm = 0x76C
callq 0x54f4
movl %eax, %ebx
movl $0x8d4, %ebp            # imm = 0x8D4
subl %eax, %ebp
movq %r14, %rdi
xorl %esi, %esi
callq 0x5846
cmpl %ebp, %eax
jne 0x12829
addl $0xfffff72c, %ebx       # imm = 0xFFFFF72C
leaq 0x1d04b(%rip), %rsi     # 0x2f82e
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xaa74
movq %r14, %rdi
xorl %esi, %esi
callq 0x5846
cmpl %ebx, %eax
jne 0x12848
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1cf62(%rip), %rdi     # 0x2f773
leaq 0x1c871(%rip), %rsi     # 0x2f089
leaq 0x1cfae(%rip), %rcx     # 0x2f7cd
movl $0x67, %edx
callq 0x20d0
leaq 0x1cfe3(%rip), %rdi     # 0x2f813
leaq 0x1c852(%rip), %rsi     # 0x2f089
leaq 0x1cf8f(%rip), %rcx     # 0x2f7cd
movl $0x72, %edx
callq 0x20d0
leaq 0x1cfff(%rip), %rdi     # 0x2f84e
leaq 0x1c833(%rip), %rsi     # 0x2f089
leaq 0x1cf70(%rip), %rcx     # 0x2f7cd
movl $0x76, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x1cff4(%rip), %rsi     # 0x2f86a
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
cmpl $0x20d, %eax            # imm = 0x20D
jne 0x128e7
leaq 0x1d00d(%rip), %rsi     # 0x2f8a8
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
cmpl $0x41a, %eax            # imm = 0x41A
jne 0x12906
leaq 0x1d038(%rip), %rsi     # 0x2f8f8
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
cmpl $0x25d, %eax            # imm = 0x25D
jne 0x12925
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x1ce3a(%rip), %rdi     # 0x2f728
leaq 0x1c794(%rip), %rsi     # 0x2f089
leaq 0x1cf8c(%rip), %rcx     # 0x2f888
movl $0x7d, %edx
callq 0x20d0
leaq 0x1cfbb(%rip), %rdi     # 0x2f8c8
leaq 0x1c775(%rip), %rsi     # 0x2f089
leaq 0x1cf6d(%rip), %rcx     # 0x2f888
movl $0x80, %edx
callq 0x20d0
leaq 0x1cfec(%rip), %rdi     # 0x2f918
leaq 0x1c756(%rip), %rsi     # 0x2f089
leaq 0x1cf4e(%rip), %rcx     # 0x2f888
movl $0x84, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x1d01d(%rip), %rsi     # 0x2f970
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
cmpl $0x276, %eax            # imm = 0x276
jne 0x1299f
leaq 0x1d090(%rip), %rsi     # 0x2fa08
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
cmpl $0x19f, %eax            # imm = 0x19F
jne 0x129be
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x1cfea(%rip), %rdi     # 0x2f990
leaq 0x1c6dc(%rip), %rsi     # 0x2f089
leaq 0x1d02f(%rip), %rcx     # 0x2f9e3
movl $0x8c, %edx
callq 0x20d0
leaq 0x1d063(%rip), %rdi     # 0x2fa28
leaq 0x1c6bd(%rip), %rsi     # 0x2f089
leaq 0x1d010(%rip), %rcx     # 0x2f9e3
movl $0x91, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x1d0aa(%rip), %rsi     # 0x2fa96
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
cmpl $0x383, %eax            # imm = 0x383
jne 0x12a30
leaq 0x8(%rsp), %rdi
callq 0x56ad
testl %eax, %eax
jne 0x12a4f
movabsq $0x38400000000, %rcx    # imm = 0x38400000000
cmpq %rcx, %rax
jne 0x12a6e
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x1d07e(%rip), %rdi     # 0x2fab5
leaq 0x1c64b(%rip), %rsi     # 0x2f089
leaq 0x1d0a6(%rip), %rcx     # 0x2faeb
movl $0x98, %edx
callq 0x20d0
leaq 0x1cbf0(%rip), %rdi     # 0x2f646
leaq 0x1c62c(%rip), %rsi     # 0x2f089
leaq 0x1d087(%rip), %rcx     # 0x2faeb
movl $0x9a, %edx
callq 0x20d0
leaq 0x1d08d(%rip), %rdi     # 0x2fb02
leaq 0x1c60d(%rip), %rsi     # 0x2f089
leaq 0x1d068(%rip), %rcx     # 0x2faeb
movl $0x9b, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r14
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x1d079(%rip), %rsi     # 0x2fb18
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0x56ad
movq %rax, %rcx
shrq $0x20, %rcx
cmpl %ecx, %eax
jne 0x12b22
leaq 0x8(%rsp), %rdi
callq 0x57aa
movq %rax, %rcx
shrq $0x20, %rcx
cmpl %ecx, %eax
jne 0x12b41
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
movl %eax, %ebp
movl 0x150(%rbx), %esi
movl $0x2d, %edi
callq 0xcba2
movl %eax, %r14d
movl 0x150(%rbx), %esi
movl $0x3e, %edi
callq 0xcba2
subl %r14d, %eax
leal 0x47(,%rax,2), %eax
cmpl %eax, %ebp
jne 0x12b60
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1d02a(%rip), %rdi     # 0x2fb53
leaq 0x1c559(%rip), %rsi     # 0x2f089
leaq 0x1d035(%rip), %rcx     # 0x2fb6c
movl $0xa3, %edx
callq 0x20d0
leaq 0x1d039(%rip), %rdi     # 0x2fb81
leaq 0x1c53a(%rip), %rsi     # 0x2f089
leaq 0x1d016(%rip), %rcx     # 0x2fb6c
movl $0xa6, %edx
callq 0x20d0
leaq 0x1d031(%rip), %rdi     # 0x2fb98
leaq 0x1c51b(%rip), %rsi     # 0x2f089
leaq 0x1cff7(%rip), %rcx     # 0x2fb6c
movl $0xb2, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/test/eval__test.cpp
// Function: test_king_endgame_pst()
void test_king_endgame_pst() {
    position pos;

    set_pos(&pos,"8/8/8/4k3/8/8/8/RNB2K2 w - - 0 1");

    int32_pair npmat = eval_nonpawn_material(&pos);
    int32 expected = rook_val + knight_val + bishop_val;
    assert(expected==npmat.val1);
    assert(0==npmat.val2);

    expected += rook_open_file + knight_pst[B1]
            + knight_tropism * distance(B1,pos.black_king)
            + king_endgame_pst[F1] - king_pst[E5]
            - eval_scale(king_safety_middle_open_file,rook_val+knight_val+bishop_val);
    assert(expected==eval(&pos,false));

    // by removing a bishop both sides should be evaluated as in the endgame
    set_pos(&pos,"8/8/8/4k3/8/8/8/RN3K2 b - - 0 1");

    expected = -rook_val - knight_val - rook_open_file
            - knight_pst[B1]
            - knight_tropism * distance(B1,pos.black_king)
            - king_endgame_pst[F1]
            + king_endgame_pst[E5];
    assert(expected==eval(&pos,false));
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x1d0d6(%rip), %rsi     # 0x2fc67
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0x56ad
cmpl $0x460, %eax            # imm = 0x460
jne 0x12c44
shrq $0x20, %rax
jne 0x12c63
leaq 0x8(%rsp), %rbx
movl 0x150(%rbx), %esi
movl $0x39, %edi
callq 0xcba2
movl %eax, %r14d
movl $0xffffffce, %edi       # imm = 0xFFFFFFCE
movl $0x460, %esi            # imm = 0x460
callq 0x54f4
leal (%rax,%r14,2), %eax
movl $0x48d, %ebp            # imm = 0x48D
subl %eax, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
cmpl %eax, %ebp
jne 0x12c82
leaq 0x1d0dd(%rip), %rsi     # 0x2fce3
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movl 0x150(%rbx), %esi
movl $0x39, %edi
callq 0xcba2
leal -0x316(,%rax,2), %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
cmpl %eax, %ebp
jne 0x12ca1
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1d03d(%rip), %rdi     # 0x2fc88
leaq 0x1c437(%rip), %rsi     # 0x2f089
leaq 0x1d044(%rip), %rcx     # 0x2fc9d
movl $0xbd, %edx
callq 0x20d0
leaq 0x1d050(%rip), %rdi     # 0x2fcba
leaq 0x1c418(%rip), %rsi     # 0x2f089
leaq 0x1d025(%rip), %rcx     # 0x2fc9d
movl $0xbe, %edx
callq 0x20d0
leaq 0x1d03f(%rip), %rdi     # 0x2fcc8
leaq 0x1c3f9(%rip), %rsi     # 0x2f089
leaq 0x1d006(%rip), %rcx     # 0x2fc9d
movl $0xc4, %edx
callq 0x20d0
leaq 0x1d020(%rip), %rdi     # 0x2fcc8
leaq 0x1c3da(%rip), %rsi     # 0x2f089
leaq 0x1cfe7(%rip), %rcx     # 0x2fc9d
movl $0xce, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x1d034(%rip), %rsi     # 0x2fd03
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
cmpl $0x8, %eax
jne 0x12d50
leaq 0x1d092(%rip), %rsi     # 0x2fd84
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
testl %eax, %eax
jne 0x12d6f
leaq 0x1d0a9(%rip), %rsi     # 0x2fdbd
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
movl %eax, %ebx
movl $0xffffffce, %edi       # imm = 0xFFFFFFCE
movl $0x8c0, %esi            # imm = 0x8C0
callq 0x54f4
movl $0xffffffe7, %ecx       # imm = 0xFFFFFFE7
subl %eax, %ecx
cmpl %ecx, %ebx
jne 0x12d8e
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x1cfe7(%rip), %rdi     # 0x2fd3e
leaq 0x1c32b(%rip), %rsi     # 0x2f089
leaq 0x1cffa(%rip), %rcx     # 0x2fd5f
movl $0xd7, %edx
callq 0x20d0
leaq 0x1c30a(%rip), %rdi     # 0x2f080
leaq 0x1c30c(%rip), %rsi     # 0x2f089
leaq 0x1cfdb(%rip), %rcx     # 0x2fd5f
movl $0xdc, %edx
callq 0x20d0
leaq 0x1d05f(%rip), %rdi     # 0x2fdf4
leaq 0x1c2ed(%rip), %rsi     # 0x2f089
leaq 0x1cfbc(%rip), %rcx     # 0x2fd5f
movl $0xe2, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/test/eval__test.cpp
// Function: test_king_safety_kingside()
void test_king_safety_kingside() {
    position pos;

    // no pawns advanced
    set_pos(&pos,"rnbq1rk1/pppppppp/8/8/8/8/PPPPPPPP/RNBQ1RK1 w kq - 0 1");
    assert(eval(&pos,false)==0);

    // white pawn on f4
    set_pos(&pos,"rnbq1rk1/pppppppp/8/8/8/5P2/PPPPP1PP/RNBQ1RK1 w kq - 0 1");
    assert(eval(&pos,false)==pawn_pst[F3]-pawn_pst[F2]
        + eval_scale(king_safety_pawn_one_away,rook_val*2+knight_val+bishop_val+queen_val));

    // white pawn on g4
    set_pos(&pos,"rnbq1rk1/pppppppp/8/8/6P1/8/PPPPPP1P/RNBQ1RK1 w kq - 0 1");
    assert(eval(&pos,false)==pawn_pst[G4]-pawn_pst[G2]+eval_scale(king_safety_pawn_two_away,rook_val*2+knight_val+bishop_val+queen_val));

    // black pawn on h4
    set_pos(&pos,"rnbq1rk1/ppppppp1/8/8/7p/8/PPPPPPPP/RNBQ1RK1 b KQkq - 0 1");
    assert(eval(&pos,false)==pawn_pst[fliprank[H4]]-pawn_pst[fliprank[H7]]
         +eval_scale(king_safety_pawn_far_away/2,rook_val*2+knight_val+bishop_val+queen_val));
}

// Assembly:
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x1d0ad(%rip), %rsi     # 0x2fe69
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
testl %eax, %eax
jne 0x12e8a
leaq 0x1d0f3(%rip), %rsi     # 0x2fed5
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
movl %eax, %ebx
movl $0xfffffff6, %edi       # imm = 0xFFFFFFF6
movl $0x9d8, %esi            # imm = 0x9D8
callq 0x54f4
addl $0x3, %eax
cmpl %eax, %ebx
jne 0x12ea9
leaq 0x1d171(%rip), %rsi     # 0x2ff8d
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
movl %eax, %ebx
movl $0xffffffec, %edi       # imm = 0xFFFFFFEC
movl $0x9d8, %esi            # imm = 0x9D8
callq 0x54f4
addl $0x5, %eax
cmpl %eax, %ebx
jne 0x12ec8
leaq 0x1d1f1(%rip), %rsi     # 0x30043
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
movl %eax, %ebx
movl $0xfffffff1, %edi       # imm = 0xFFFFFFF1
movl $0x9d8, %esi            # imm = 0x9D8
callq 0x54f4
addl $0x7, %eax
cmpl %eax, %ebx
jne 0x12ee7
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x1d00f(%rip), %rdi     # 0x2fea0
leaq 0x1c1f1(%rip), %rsi     # 0x2f089
leaq 0x1d015(%rip), %rcx     # 0x2feb4
movl $0xea, %edx
callq 0x20d0
leaq 0x1d05e(%rip), %rdi     # 0x2ff0e
leaq 0x1c1d2(%rip), %rsi     # 0x2f089
leaq 0x1cff6(%rip), %rcx     # 0x2feb4
movl $0xef, %edx
callq 0x20d0
leaq 0x1d0f7(%rip), %rdi     # 0x2ffc6
leaq 0x1c1b3(%rip), %rsi     # 0x2f089
leaq 0x1cfd7(%rip), %rcx     # 0x2feb4
movl $0xf3, %edx
callq 0x20d0
leaq 0x1d18f(%rip), %rdi     # 0x3007d
leaq 0x1c194(%rip), %rsi     # 0x2f089
leaq 0x1cfb8(%rip), %rcx     # 0x2feb4
movl $0xf8, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x1d1fc(%rip), %rsi     # 0x30111
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
movl %eax, %ebx
movl $0xfffffff6, %edi       # imm = 0xFFFFFFF6
movl $0x9d8, %esi            # imm = 0x9D8
callq 0x54f4
addl $0x3, %eax
cmpl %eax, %ebx
jne 0x12fb9
leaq 0x1d29e(%rip), %rsi     # 0x301e9
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
movl %eax, %ebx
movl $0xffffffec, %edi       # imm = 0xFFFFFFEC
movl $0x9d8, %esi            # imm = 0x9D8
callq 0x54f4
addl $0x5, %eax
cmpl %eax, %ebx
jne 0x12fd8
leaq 0x1d31e(%rip), %rsi     # 0x3029f
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
movl %eax, %ebx
movl $0xfffffff1, %edi       # imm = 0xFFFFFFF1
movl $0x9d8, %esi            # imm = 0x9D8
callq 0x54f4
addl $0x7, %eax
cmpl %eax, %ebx
jne 0x12ff7
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x1d18a(%rip), %rdi     # 0x3014a
leaq 0x1c0c2(%rip), %rsi     # 0x2f089
leaq 0x1d1f9(%rip), %rcx     # 0x301c7
movl $0x100, %edx            # imm = 0x100
callq 0x20d0
leaq 0x1d243(%rip), %rdi     # 0x30222
leaq 0x1c0a3(%rip), %rsi     # 0x2f089
leaq 0x1d1da(%rip), %rcx     # 0x301c7
movl $0x104, %edx            # imm = 0x104
callq 0x20d0
leaq 0x1d2d9(%rip), %rdi     # 0x302d7
leaq 0x1c084(%rip), %rsi     # 0x2f089
leaq 0x1d1bb(%rip), %rcx     # 0x301c7
movl $0x109, %edx            # imm = 0x109
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/test/eval__test.cpp
// Function: test_double_and_isolated_pawns()
void test_double_and_isolated_pawns() {
    position pos;

    set_pos(&pos,"k7/p1p3p1/3p3p/1P5P/1PP1P3/8/8/K7 b - - 0 1");
    int32_pair npmat = eval_nonpawn_material(&pos);
    assert(0==npmat.val1);
    assert(0==npmat.val2);

    int32_pair pmat = eval_pawn_material(&pos);
    assert(pawn_val*5==pmat.val1);
    assert(pawn_val*5==pmat.val2);

    int32 expected = king_endgame_pst[fliprank[A8]]
           + pawn_pst[fliprank[A7]] + pawn_pst[fliprank[C7]] + pawn_pst[fliprank[D6]]
           + pawn_pst[fliprank[G7]] + pawn_pst[fliprank[H6]]
           + isolated_pawn // black pawn on a7
           - king_endgame_pst[A1]
           - pawn_pst[B5] - pawn_pst[B4] - pawn_pst[C4] - pawn_pst[E4] - pawn_pst[H5]
           - isolated_pawn*2 // white pawns on e4 and h1
           - doubled_pawn*2;  // white pawns on b4 and b5
    assert(eval(&pos,false)==expected);
}

// Assembly:
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x1d346(%rip), %rsi     # 0x3036b
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0x56ad
testl %eax, %eax
jne 0x1307d
testq %rax, %rax
jne 0x1309c
leaq 0x8(%rsp), %rdi
callq 0x57aa
cmpl $0x1f4, %eax            # imm = 0x1F4
jne 0x130bb
shrq $0x20, %rax
cmpl $0x1f4, %eax            # imm = 0x1F4
jne 0x130da
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x5846
cmpl $0x11, %eax
jne 0x130f9
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x1d313(%rip), %rdi     # 0x30397
leaq 0x1bffe(%rip), %rsi     # 0x2f089
leaq 0x1d313(%rip), %rcx     # 0x303a5
movl $0x111, %edx            # imm = 0x111
callq 0x20d0
leaq 0x1cc17(%rip), %rdi     # 0x2fcba
leaq 0x1bfdf(%rip), %rsi     # 0x2f089
leaq 0x1d2f4(%rip), %rcx     # 0x303a5
movl $0x112, %edx            # imm = 0x112
callq 0x20d0
leaq 0x1d309(%rip), %rdi     # 0x303cb
leaq 0x1bfc0(%rip), %rsi     # 0x2f089
leaq 0x1d2d5(%rip), %rcx     # 0x303a5
movl $0x115, %edx            # imm = 0x115
callq 0x20d0
leaq 0x1d300(%rip), %rdi     # 0x303e1
leaq 0x1bfa1(%rip), %rsi     # 0x2f089
leaq 0x1d2b6(%rip), %rcx     # 0x303a5
movl $0x116, %edx            # imm = 0x116
callq 0x20d0
leaq 0x1c713(%rip), %rdi     # 0x2f813
leaq 0x1bf82(%rip), %rsi     # 0x2f089
leaq 0x1d297(%rip), %rcx     # 0x303a5
movl $0x120, %edx            # imm = 0x120
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r14
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x8(%rsp), %r14
movl $0x1c8, %edx            # imm = 0x1C8
movq %r14, %rdi
callq 0x2100
movq %r14, %rdi
callq 0xaf67
movq %r14, %rdi
xorl %esi, %esi
callq 0x5846
cmpl %ebp, %eax
jne 0x13243
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xaf67
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0xa0e0
testb %al, %al
je 0x13262
movb $0x1, %al
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1d299(%rip), %rdi     # 0x304e3
leaq 0x1be38(%rip), %rsi     # 0x2f089
leaq 0x1d299(%rip), %rcx     # 0x304f1
movl $0x13e, %edx            # imm = 0x13E
callq 0x20d0
leaq 0x1d2b3(%rip), %rdi     # 0x3051c
leaq 0x1be19(%rip), %rsi     # 0x2f089
leaq 0x1d27a(%rip), %rcx     # 0x304f1
movl $0x141, %edx            # imm = 0x141
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x1d6fb(%rip), %rsi     # 0x30b90
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0x56ad
cmpl $0x4b0, %eax            # imm = 0x4B0
jne 0x13500
shrq $0x20, %rax
cmpl $0x334, %eax            # imm = 0x334
jne 0x1351f
leaq 0x8(%rsp), %rdi
callq 0x57aa
testl %eax, %eax
jne 0x1353e
movabsq $0x6400000000, %rcx     # imm = 0x6400000000
cmpq %rcx, %rax
jne 0x1355d
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x5846
cmpl $0xfffffee8, %eax       # imm = 0xFFFFFEE8
jne 0x1357c
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x1d6aa(%rip), %rdi     # 0x30bb1
leaq 0x1bb7b(%rip), %rsi     # 0x2f089
leaq 0x1d6ba(%rip), %rcx     # 0x30bcf
movl $0x170, %edx            # imm = 0x170
callq 0x20d0
leaq 0x1d6c3(%rip), %rdi     # 0x30be9
leaq 0x1bb5c(%rip), %rsi     # 0x2f089
leaq 0x1d69b(%rip), %rcx     # 0x30bcf
movl $0x171, %edx            # imm = 0x171
callq 0x20d0
leaq 0x1d6c1(%rip), %rdi     # 0x30c06
leaq 0x1bb3d(%rip), %rsi     # 0x2f089
leaq 0x1d67c(%rip), %rcx     # 0x30bcf
movl $0x174, %edx            # imm = 0x174
callq 0x20d0
leaq 0x1d6ac(%rip), %rdi     # 0x30c10
leaq 0x1bb1e(%rip), %rsi     # 0x2f089
leaq 0x1d65d(%rip), %rcx     # 0x30bcf
movl $0x175, %edx            # imm = 0x175
callq 0x20d0
leaq 0x1d69e(%rip), %rdi     # 0x30c21
leaq 0x1baff(%rip), %rsi     # 0x2f089
leaq 0x1d63e(%rip), %rcx     # 0x30bcf
movl $0x177, %edx            # imm = 0x177
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rsp, %rbx
movq %rbx, %rdi
callq 0xaa43
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
testl %eax, %eax
jne 0x13666
leaq 0x19e46(%rip), %rsi     # 0x2d473
movq %rsp, %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
movl %eax, %ebp
movl $0x1, 0x138(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5846
addl %ebp, %eax
jne 0x13685
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %rbp
retq
leaq 0x1c833(%rip), %rdi     # 0x2fea0
leaq 0x1ba15(%rip), %rsi     # 0x2f089
leaq 0x1d63b(%rip), %rcx     # 0x30cb6
movl $0x185, %edx            # imm = 0x185
callq 0x20d0
leaq 0x1d63f(%rip), %rdi     # 0x30ccb
leaq 0x1b9f6(%rip), %rsi     # 0x2f089
leaq 0x1d61c(%rip), %rcx     # 0x30cb6
movl $0x18c, %edx            # imm = 0x18C
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 %rax
callq 0x12140
callq 0x1218b
callq 0x1225a
callq 0x123b1
callq 0x1244a
callq 0x12620
callq 0x1276c
callq 0x12867
callq 0x12944
callq 0x129dd
callq 0x12a8d
callq 0x12b7f
callq 0x12cc0
callq 0x12dad
callq 0x12f06
callq 0x13016
callq 0x13118
callq 0x1316b
callq 0x13281
callq 0x13486
callq 0x1359b
popq %rax
jmp 0x13604
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rsp, %rbx
movq %rbx, %rdi
callq 0xaa43
xorl %r14d, %r14d
movl (%rsp,%r14,4), %eax
cmpl $0x1, %eax
je 0x1373a
cmpl $-0x1, %eax
jne 0x13783
xorl %edx, %edx
cmpl $0x1, %eax
sete %dl
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5bee
testb %al, %al
jne 0x137b6
xorl %edx, %edx
cmpl $0x1, (%rsp,%r14,4)
sete %dl
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5c48
testb %al, %al
jne 0x137d5
xorl %edx, %edx
cmpl $0x1, (%rsp,%r14,4)
sete %dl
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5ccb
testb %al, %al
jne 0x13797
incq %r14
cmpq $0x40, %r14
jne 0x1372c
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r14
retq
leaq 0x1d5d6(%rip), %rdi     # 0x30d74
leaq 0x1d565(%rip), %rsi     # 0x30d0a
leaq 0x1d573(%rip), %rcx     # 0x30d1f
movl $0x15, %edx
callq 0x20d0
leaq 0x1d51d(%rip), %rdi     # 0x30cda
leaq 0x1d546(%rip), %rsi     # 0x30d0a
leaq 0x1d554(%rip), %rcx     # 0x30d1f
movl $0x13, %edx
callq 0x20d0
leaq 0x1d567(%rip), %rdi     # 0x30d43
leaq 0x1d527(%rip), %rsi     # 0x30d0a
leaq 0x1d535(%rip), %rcx     # 0x30d1f
movl $0x14, %edx
callq 0x20d0