// File: /workspace/github_cpp_makefile_star2_O3/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 0xe9a92(%rip), %r14     # 0xfa6b0
movq 0x120(%r14), %rdi
callq 0x3b14
cmpl $0x8, %eax
jne 0x10d54
movq 0x120(%r14), %rbx
movq %rbx, %rdi
callq 0x3b67
cmpl $0x13, %eax
jne 0x10d73
leaq 0xe985e(%rip), %r15     # 0xfa4b0
xorq 0x98(%r15), %rbx
movq %rbx, %rdi
callq 0x3b67
cmpl $0x15, %eax
jne 0x10d92
xorq 0xa8(%r15), %rbx
movq %rbx, %rdi
callq 0x3b67
cmpl $0x1a, %eax
jne 0x10db1
xorq 0xd0(%r15), %rbx
movq %rbx, %rdi
callq 0x3b67
cmpl $0x1e, %eax
jne 0x10dd0
xorq 0xf0(%r15), %rbx
movq %rbx, %rdi
callq 0x3b67
cmpl $0x2a, %eax
jne 0x10def
xorq 0x150(%r15), %rbx
movq %rbx, %rdi
callq 0x3b67
cmpl $0x2e, %eax
jne 0x10e0e
xorq 0x170(%r15), %rbx
movq %rbx, %rdi
callq 0x3b67
cmpl $0x33, %eax
jne 0x10e2d
xorq 0x198(%r15), %rbx
movq %rbx, %rdi
callq 0x3b67
cmpl $0x35, %eax
jne 0x10e4c
cmpq 0x1a8(%r15), %rbx
jne 0x10e6b
movq (%r14), %rdi
callq 0x3b14
cmpl $0x2, %eax
jne 0x10e8a
movq (%r14), %rbx
movq %rbx, %rdi
callq 0x3b67
cmpl $0xa, %eax
jne 0x10ea9
xorq 0x50(%r15), %rbx
movq %rbx, %rdi
callq 0x3b67
cmpl $0x11, %eax
jne 0x10ec8
cmpq 0x88(%r15), %rbx
jne 0x10ee7
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1da3d(%rip), %rdi     # 0x2e798
leaq 0x1d88a(%rip), %rsi     # 0x2e5ec
leaq 0x1da54(%rip), %rcx     # 0x2e7bd
movl $0x26, %edx
callq 0x20d0
leaq 0x1da5c(%rip), %rdi     # 0x2e7d6
leaq 0x1d86b(%rip), %rsi     # 0x2e5ec
leaq 0x1da35(%rip), %rcx     # 0x2e7bd
movl $0x29, %edx
callq 0x20d0
leaq 0x1da51(%rip), %rdi     # 0x2e7ea
leaq 0x1d84c(%rip), %rsi     # 0x2e5ec
leaq 0x1da16(%rip), %rcx     # 0x2e7bd
movl $0x2c, %edx
callq 0x20d0
leaq 0x1da46(%rip), %rdi     # 0x2e7fe
leaq 0x1d82d(%rip), %rsi     # 0x2e5ec
leaq 0x1d9f7(%rip), %rcx     # 0x2e7bd
movl $0x2f, %edx
callq 0x20d0
leaq 0x1da3b(%rip), %rdi     # 0x2e812
leaq 0x1d80e(%rip), %rsi     # 0x2e5ec
leaq 0x1d9d8(%rip), %rcx     # 0x2e7bd
movl $0x32, %edx
callq 0x20d0
leaq 0x1da30(%rip), %rdi     # 0x2e826
leaq 0x1d7ef(%rip), %rsi     # 0x2e5ec
leaq 0x1d9b9(%rip), %rcx     # 0x2e7bd
movl $0x35, %edx
callq 0x20d0
leaq 0x1da25(%rip), %rdi     # 0x2e83a
leaq 0x1d7d0(%rip), %rsi     # 0x2e5ec
leaq 0x1d99a(%rip), %rcx     # 0x2e7bd
movl $0x38, %edx
callq 0x20d0
leaq 0x1da1a(%rip), %rdi     # 0x2e84e
leaq 0x1d7b1(%rip), %rsi     # 0x2e5ec
leaq 0x1d97b(%rip), %rcx     # 0x2e7bd
movl $0x3b, %edx
callq 0x20d0
leaq 0x1da0f(%rip), %rdi     # 0x2e862
leaq 0x1d792(%rip), %rsi     # 0x2e5ec
leaq 0x1d95c(%rip), %rcx     # 0x2e7bd
movl $0x3e, %edx
callq 0x20d0
leaq 0x1da04(%rip), %rdi     # 0x2e876
leaq 0x1d773(%rip), %rsi     # 0x2e5ec
leaq 0x1d93d(%rip), %rcx     # 0x2e7bd
movl $0x41, %edx
callq 0x20d0
leaq 0x1d9ef(%rip), %rdi     # 0x2e880
leaq 0x1d754(%rip), %rsi     # 0x2e5ec
leaq 0x1d91e(%rip), %rcx     # 0x2e7bd
movl $0x43, %edx
callq 0x20d0
leaq 0x1d9f5(%rip), %rdi     # 0x2e8a5
leaq 0x1d735(%rip), %rsi     # 0x2e5ec
leaq 0x1d8ff(%rip), %rcx     # 0x2e7bd
movl $0x45, %edx
callq 0x20d0
leaq 0x1d9ea(%rip), %rdi     # 0x2e8b9
leaq 0x1d716(%rip), %rsi     # 0x2e5ec
leaq 0x1d8e0(%rip), %rcx     # 0x2e7bd
movl $0x48, %edx
callq 0x20d0
leaq 0x1d988(%rip), %rdi     # 0x2e876
leaq 0x1d6f7(%rip), %rsi     # 0x2e5ec
leaq 0x1d8c1(%rip), %rcx     # 0x2e7bd
movl $0x4b, %edx
callq 0x20d0