// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/test/see__test.cpp
// Function: test_see()
void test_see() {
    test_queen_takes_undefended_pawn();
    test_queen_takes_defended_pawn();
    test_rook_takes_undefended_pawn();
    test_with_xrays();
    test_rook_xrays();
    test_knight_takes_defended_pawn_as_white();
    test_knight_takes_defended_pawn_as_black();
    test_crazy_rooks();
    test_crazy_rooks2();
    test_knight_takes_defended_pawn();
    test_bishop_takes_defended_pawn();
    test_knight_takes_defended_pawn_with_crazy_bishops();

    test_case_see("4R3/2r3p1/5bk1/1p1r3p/p2PR1P1/P1BK1P2/1P6/8 b - -","hxg4",0);
    test_case_see("4R3/2r3p1/5bk1/1p1r1p1p/p2PR1P1/P1BK1P2/1P6/8 b - -","hxg4",0);
    test_case_see("4r1k1/5pp1/nbp4p/1p2p2q/1P2P1b1/1BP2N1P/1B2QPPK/3R4 b - -","Bxf3",knight_val-bishop_val);
    test_case_see("2r1r1k1/pp1bppbp/3p1np1/q3P3/2P2P2/1P2B3/P1N1B1PP/2RQ1RK1 b - -","dxe5",pawn_val);
    test_case_see("7r/5qpk/p1Qp1b1p/3r3n/BB3p2/5p2/P1P2P2/4RK1R w - -","Re8",0);
    test_case_see("7R/4bP2/8/8/1q6/3K4/5p2/4k3 w - -","f8=R",10004);
    test_case_see("8/4kp2/2npp3/1Nn5/1p2PQP1/7q/1PP1B3/4KR1r b - -","Rxf1+",0);
    test_case_see("2r2r1k/6bp/p7/2q2p1Q/3PpP2/1B6/P5PP/2RR3K b - -","Qxc1",2*rook_val-queen_val);
    test_case_see("r2qk1nr/pp2ppbp/2b3p1/2p1p3/8/2N2N2/PPPP1PPP/R1BQR1K1 w kq -","Nxe5",pawn_val);
    test_case_see("6r1/4kq2/b2p1p2/p1pPb3/p1P2B1Q/2P4P/2B1R1P1/6K1 w - -","Bxe5",0);
    test_case_see("3q2nk/pb1r1p2/np6/3P2Pp/2p1P3/2R4B/PQ3P1P/3R2K1 w - h6","gxh6",0);
    test_case_see("3q2nk/pb1r1p2/np6/3P2Pp/2p1P3/2R1B2B/PQ3P1P/3R2K1 w - h6","gxh6",pawn_val);
    test_case_see("2r4r/1P4pk/p2p1b1p/7n/BB3p2/2R2p2/P1P2P2/4RK2 w - -","Rxc8",rook_val);

    // Arasan says +rook for this, but RxR then BxR then PxB ==> Bishop Val
    // Note the last pawn capture is also a promotion so that could be added
    test_case_see("2r5/1P4pk/p2p1b1p/5b1n/BB3p2/2R2p2/P1P2P2/4RK2 w - -","Rxc8",bishop_val);

    test_case_see("2r4k/2r4p/p7/2b2p1b/4pP2/1BR5/P1R3PP/2Q4K w - -","Rxc5",bishop_val);
    test_case_see("8/pp6/2pkp3/4bp2/2R3b1/2P5/PP4B1/1K6 w - -","Bxc6",pawn_val-bishop_val);
    test_case_see("4q3/1p1pr1k1/1B2rp2/6p1/p3PP2/P3R1P1/1P2R1K1/4Q3 b - -","Rxe4",pawn_val-rook_val);
    test_case_see("4q3/1p1pr1kb/1B2rp2/6p1/p3PP2/P3R1P1/1P2R1K1/4Q3 b - -","Bxe4",pawn_val);

/*
    // not captures
    //test_case_see("6rr/6pk/p1Qp1b1p/2n5/1B3p2/5p2/P1P2P2/4RK1R w - -","Re8",-Eval.ROOK_VAL);
    //test_case_see("7r/5qpk/2Qp1b1p/1N1r3n/BB3p2/5p2/P1P2P2/4RK1R w - -","Re8",-Eval.ROOK_VAL);

    // promotion that doesn't capture
    //test_case_see("6RR/4bP2/8/8/5r2/3K4/5p2/4k3 w - -","f8=Q",Eval.BISHOP_VAL-Eval.PAWN_VAL);
    //test_case_see("6RR/4bP2/8/8/5r2/3K4/5p2/4k3 w - -","f8=N",Eval.KNIGHT_VAL-Eval.PAWN_VAL);
    //test_case_see("7R/5P2/8/8/8/3K2r1/5p2/4k3 w - -","f8=Q",Eval.QUEEN_VAL-Eval.PAWN_VAL);
    //test_case_see("7R/5P2/8/8/8/3K2r1/5p2/4k3 w - -","f8=B",Eval.BISHOP_VAL-Eval.PAWN_VAL);
*/
}

// Assembly:
pushq %rbx
callq 0x25768
callq 0x2581d
callq 0x258d4
callq 0x25989
callq 0x25a40
callq 0x25af5
callq 0x25baa
callq 0x25c5f
callq 0x25d16
callq 0x25dcb
callq 0x25e80
callq 0x25f35
leaq 0x1107e(%rip), %rdi     # 0x371ab
leaq 0x110a9(%rip), %rbx     # 0x371dd
movq %rbx, %rsi
xorl %edx, %edx
callq 0x25fec
leaq 0x1109d(%rip), %rdi     # 0x371e2
movq %rbx, %rsi
xorl %edx, %edx
callq 0x25fec
leaq 0x110c0(%rip), %rdi     # 0x37216
leaq 0x110f3(%rip), %rsi     # 0x37250
movl $0xffffffec, %edx       # imm = 0xFFFFFFEC
callq 0x25fec
leaq 0x110e7(%rip), %rdi     # 0x37255
leaq 0x11120(%rip), %rsi     # 0x37295
movl $0x64, %edx
callq 0x25fec
leaq 0x11114(%rip), %rdi     # 0x3729a
leaq 0x11140(%rip), %rsi     # 0x372cd
xorl %edx, %edx
callq 0x25fec
leaq 0x11136(%rip), %rdi     # 0x372d1
leaq 0x11151(%rip), %rsi     # 0x372f3
movl $0x2714, %edx           # imm = 0x2714
callq 0x25fec
leaq 0x11145(%rip), %rdi     # 0x372f8
leaq 0x1116e(%rip), %rsi     # 0x37328
xorl %edx, %edx
callq 0x25fec
leaq 0x11166(%rip), %rdi     # 0x3732e
leaq 0x1118f(%rip), %rsi     # 0x3735e
movl $0x64, %edx
callq 0x25fec
leaq 0x11183(%rip), %rdi     # 0x37363
leaq 0x111b9(%rip), %rsi     # 0x373a0
movl $0x64, %edx
callq 0x25fec
leaq 0x111ad(%rip), %rdi     # 0x373a5
leaq 0x111dc(%rip), %rsi     # 0x373db
xorl %edx, %edx
callq 0x25fec
leaq 0x111d3(%rip), %rdi     # 0x373e0
leaq 0x11203(%rip), %rbx     # 0x37417
movq %rbx, %rsi
xorl %edx, %edx
callq 0x25fec
leaq 0x111f7(%rip), %rdi     # 0x3741c
movq %rbx, %rsi
movl $0x64, %edx
callq 0x25fec
leaq 0x1121c(%rip), %rdi     # 0x37455
leaq 0x11249(%rip), %rbx     # 0x37489
movq %rbx, %rsi
movl $0x1f4, %edx            # imm = 0x1F4
callq 0x25fec
leaq 0x1123a(%rip), %rdi     # 0x3748e
movq %rbx, %rsi
movl $0x140, %edx            # imm = 0x140
callq 0x25fec
leaq 0x1125b(%rip), %rdi     # 0x374c3
leaq 0x11284(%rip), %rsi     # 0x374f3
movl $0x140, %edx            # imm = 0x140
callq 0x25fec
leaq 0x11278(%rip), %rdi     # 0x374f8
leaq 0x1129c(%rip), %rsi     # 0x37523
movl $0xffffff24, %edx       # imm = 0xFFFFFF24
callq 0x25fec
leaq 0x11290(%rip), %rdi     # 0x37528
leaq 0x112c0(%rip), %rsi     # 0x3755f
movl $0xfffffe70, %edx       # imm = 0xFFFFFE70
callq 0x25fec
leaq 0x112b4(%rip), %rdi     # 0x37564
leaq 0x112e4(%rip), %rsi     # 0x3759b
movl $0x64, %edx
popq %rbx
jmp 0x25fec
nop