// File: /workspace/github_cpp_makefile_star2_O3/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 0x255bc
callq 0x25671
callq 0x25728
callq 0x257dd
callq 0x25894
callq 0x25949
callq 0x259fe
callq 0x25ab3
callq 0x25b6a
callq 0x25c1f
callq 0x25cd4
callq 0x25d89
leaq 0x112aa(%rip), %rdi     # 0x3722b
leaq 0x112d5(%rip), %rbx     # 0x3725d
movq %rbx, %rsi
xorl %edx, %edx
callq 0x25e40
leaq 0x112c9(%rip), %rdi     # 0x37262
movq %rbx, %rsi
xorl %edx, %edx
callq 0x25e40
leaq 0x112ec(%rip), %rdi     # 0x37296
leaq 0x1131f(%rip), %rsi     # 0x372d0
movl $0xffffffec, %edx       # imm = 0xFFFFFFEC
callq 0x25e40
leaq 0x11313(%rip), %rdi     # 0x372d5
leaq 0x1134c(%rip), %rsi     # 0x37315
movl $0x64, %edx
callq 0x25e40
leaq 0x11340(%rip), %rdi     # 0x3731a
leaq 0x1136c(%rip), %rsi     # 0x3734d
xorl %edx, %edx
callq 0x25e40
leaq 0x11362(%rip), %rdi     # 0x37351
leaq 0x1137d(%rip), %rsi     # 0x37373
movl $0x2714, %edx           # imm = 0x2714
callq 0x25e40
leaq 0x11371(%rip), %rdi     # 0x37378
leaq 0x1139a(%rip), %rsi     # 0x373a8
xorl %edx, %edx
callq 0x25e40
leaq 0x11392(%rip), %rdi     # 0x373ae
leaq 0x113bb(%rip), %rsi     # 0x373de
movl $0x64, %edx
callq 0x25e40
leaq 0x113af(%rip), %rdi     # 0x373e3
leaq 0x113e5(%rip), %rsi     # 0x37420
movl $0x64, %edx
callq 0x25e40
leaq 0x113d9(%rip), %rdi     # 0x37425
leaq 0x11408(%rip), %rsi     # 0x3745b
xorl %edx, %edx
callq 0x25e40
leaq 0x113ff(%rip), %rdi     # 0x37460
leaq 0x1142f(%rip), %rbx     # 0x37497
movq %rbx, %rsi
xorl %edx, %edx
callq 0x25e40
leaq 0x11423(%rip), %rdi     # 0x3749c
movq %rbx, %rsi
movl $0x64, %edx
callq 0x25e40
leaq 0x11448(%rip), %rdi     # 0x374d5
leaq 0x11475(%rip), %rbx     # 0x37509
movq %rbx, %rsi
movl $0x1f4, %edx            # imm = 0x1F4
callq 0x25e40
leaq 0x11466(%rip), %rdi     # 0x3750e
movq %rbx, %rsi
movl $0x140, %edx            # imm = 0x140
callq 0x25e40
leaq 0x11487(%rip), %rdi     # 0x37543
leaq 0x114b0(%rip), %rsi     # 0x37573
movl $0x140, %edx            # imm = 0x140
callq 0x25e40
leaq 0x114a4(%rip), %rdi     # 0x37578
leaq 0x114c8(%rip), %rsi     # 0x375a3
movl $0xffffff24, %edx       # imm = 0xFFFFFF24
callq 0x25e40
leaq 0x114bc(%rip), %rdi     # 0x375a8
leaq 0x114ec(%rip), %rsi     # 0x375df
movl $0xfffffe70, %edx       # imm = 0xFFFFFE70
callq 0x25e40
leaq 0x114e0(%rip), %rdi     # 0x375e4
leaq 0x11510(%rip), %rsi     # 0x3761b
movl $0x64, %edx
popq %rbx
jmp 0x25e40
nop