// File: /workspace/github_cpp_makefile_star2_O2/jswaff[P]prophet3/test/bitboards__test.cpp
// Function: test_knight_moves()
void test_knight_moves() {
    assert(get_num_bits(bb_knight_moves[E4])==8);

    uint64 mv_map = bb_knight_moves[E4];
    assert(get_lsb(mv_map)==D6);
    mv_map ^= bb_squares[D6];

    assert(get_lsb(mv_map)==F6);
    mv_map ^= bb_squares[F6];

    assert(get_lsb(mv_map)==C5);
    mv_map ^= bb_squares[C5];

    assert(get_lsb(mv_map)==G5);
    mv_map ^= bb_squares[G5];

    assert(get_lsb(mv_map)==C3);
    mv_map ^= bb_squares[C3];

    assert(get_lsb(mv_map)==G3);
    mv_map ^= bb_squares[G3];

    assert(get_lsb(mv_map)==D2);
    mv_map ^= bb_squares[D2];

    assert(get_lsb(mv_map)==F2);
    mv_map ^= bb_squares[F2];

    assert(mv_map==0);

    assert(get_num_bits(bb_knight_moves[A8])==2);
    mv_map = bb_knight_moves[A8];
    assert(get_lsb(mv_map)==C7);
    mv_map ^= bb_squares[C7];

    assert(get_lsb(mv_map)==B6);
    mv_map ^= bb_squares[B6];

    assert(mv_map==0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0xed8a8(%rip), %r14     # 0xfd6b0
movq 0x120(%r14), %rdi
callq 0x3928
cmpl $0x8, %eax
jne 0xff3e
movq 0x120(%r14), %rbx
movq %rbx, %rdi
callq 0x397d
cmpl $0x13, %eax
jne 0xff5a
leaq 0xed674(%rip), %r15     # 0xfd4b0
xorq 0x98(%r15), %rbx
movq %rbx, %rdi
callq 0x397d
cmpl $0x15, %eax
jne 0xff76
xorq 0xa8(%r15), %rbx
movq %rbx, %rdi
callq 0x397d
cmpl $0x1a, %eax
jne 0xff92
xorq 0xd0(%r15), %rbx
movq %rbx, %rdi
callq 0x397d
cmpl $0x1e, %eax
jne 0xffae
xorq 0xf0(%r15), %rbx
movq %rbx, %rdi
callq 0x397d
cmpl $0x2a, %eax
jne 0xffca
xorq 0x150(%r15), %rbx
movq %rbx, %rdi
callq 0x397d
cmpl $0x2e, %eax
jne 0xffe6
xorq 0x170(%r15), %rbx
movq %rbx, %rdi
callq 0x397d
cmpl $0x33, %eax
jne 0x10002
xorq 0x198(%r15), %rbx
movq %rbx, %rdi
callq 0x397d
cmpl $0x35, %eax
jne 0x1001e
cmpq 0x1a8(%r15), %rbx
jne 0x10037
movq (%r14), %rdi
callq 0x3928
cmpl $0x2, %eax
jne 0x10050
movq (%r14), %rbx
movq %rbx, %rdi
callq 0x397d
cmpl $0xa, %eax
jne 0x10069
xorq 0x50(%r15), %rbx
movq %rbx, %rdi
callq 0x397d
cmpl $0x11, %eax
jne 0x10082
cmpq 0x88(%r15), %rbx
jne 0x1009b
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1c803(%rip), %rdi     # 0x2c748
leaq 0x1c650(%rip), %rsi     # 0x2c59c
leaq 0x1c81a(%rip), %rcx     # 0x2c76d
pushq $0x26
jmp 0x100b2
leaq 0x1c825(%rip), %rdi     # 0x2c786
leaq 0x1c634(%rip), %rsi     # 0x2c59c
leaq 0x1c7fe(%rip), %rcx     # 0x2c76d
pushq $0x29
jmp 0x100b2
leaq 0x1c81d(%rip), %rdi     # 0x2c79a
leaq 0x1c618(%rip), %rsi     # 0x2c59c
leaq 0x1c7e2(%rip), %rcx     # 0x2c76d
pushq $0x2c
jmp 0x100b2
leaq 0x1c815(%rip), %rdi     # 0x2c7ae
leaq 0x1c5fc(%rip), %rsi     # 0x2c59c
leaq 0x1c7c6(%rip), %rcx     # 0x2c76d
pushq $0x2f
jmp 0x100b2
leaq 0x1c80d(%rip), %rdi     # 0x2c7c2
leaq 0x1c5e0(%rip), %rsi     # 0x2c59c
leaq 0x1c7aa(%rip), %rcx     # 0x2c76d
pushq $0x32
jmp 0x100b2
leaq 0x1c805(%rip), %rdi     # 0x2c7d6
leaq 0x1c5c4(%rip), %rsi     # 0x2c59c
leaq 0x1c78e(%rip), %rcx     # 0x2c76d
pushq $0x35
jmp 0x100b2
leaq 0x1c7fd(%rip), %rdi     # 0x2c7ea
leaq 0x1c5a8(%rip), %rsi     # 0x2c59c
leaq 0x1c772(%rip), %rcx     # 0x2c76d
pushq $0x38
jmp 0x100b2
leaq 0x1c7f5(%rip), %rdi     # 0x2c7fe
leaq 0x1c58c(%rip), %rsi     # 0x2c59c
leaq 0x1c756(%rip), %rcx     # 0x2c76d
pushq $0x3b
jmp 0x100b2
leaq 0x1c7ed(%rip), %rdi     # 0x2c812
leaq 0x1c570(%rip), %rsi     # 0x2c59c
leaq 0x1c73a(%rip), %rcx     # 0x2c76d
pushq $0x3e
jmp 0x100b2
leaq 0x1c7e8(%rip), %rdi     # 0x2c826
leaq 0x1c557(%rip), %rsi     # 0x2c59c
leaq 0x1c721(%rip), %rcx     # 0x2c76d
pushq $0x41
jmp 0x100b2
leaq 0x1c7d9(%rip), %rdi     # 0x2c830
leaq 0x1c53e(%rip), %rsi     # 0x2c59c
leaq 0x1c708(%rip), %rcx     # 0x2c76d
pushq $0x43
jmp 0x100b2
leaq 0x1c7e5(%rip), %rdi     # 0x2c855
leaq 0x1c525(%rip), %rsi     # 0x2c59c
leaq 0x1c6ef(%rip), %rcx     # 0x2c76d
pushq $0x45
jmp 0x100b2
leaq 0x1c7e0(%rip), %rdi     # 0x2c869
leaq 0x1c50c(%rip), %rsi     # 0x2c59c
leaq 0x1c6d6(%rip), %rcx     # 0x2c76d
pushq $0x48
jmp 0x100b2
leaq 0x1c784(%rip), %rdi     # 0x2c826
leaq 0x1c4f3(%rip), %rsi     # 0x2c59c
leaq 0x1c6bd(%rip), %rcx     # 0x2c76d
pushq $0x4b
popq %rdx
callq 0x20c0