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

    uint64 mv_map = bb_king_moves[E4];
    assert(get_lsb(mv_map)==D5);
    mv_map ^= bb_squares[D5];

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

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

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

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

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

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

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

    assert(mv_map==0);

    assert(get_num_bits(bb_king_moves[A8])==3);
    mv_map = bb_king_moves[A8];
    assert(get_lsb(mv_map)==B8);
    mv_map ^= bb_squares[B8];

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

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

    assert(mv_map==0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0xed7ec(%rip), %r15     # 0xfd8b0
movq 0x120(%r15), %rdi
callq 0x3928
cmpl $0x8, %eax
jne 0x1020c
movq 0x120(%r15), %rbx
movq %rbx, %rdi
callq 0x397d
cmpl $0x1b, %eax
jne 0x10228
leaq 0xed3b8(%rip), %r14     # 0xfd4b0
xorq 0xd8(%r14), %rbx
movq %rbx, %rdi
callq 0x397d
cmpl $0x1c, %eax
jne 0x10244
xorq 0xe0(%r14), %rbx
movq %rbx, %rdi
callq 0x397d
cmpl $0x1d, %eax
jne 0x10260
xorq 0xe8(%r14), %rbx
movq %rbx, %rdi
callq 0x397d
cmpl $0x23, %eax
jne 0x1027c
xorq 0x118(%r14), %rbx
movq %rbx, %rdi
callq 0x397d
cmpl $0x25, %eax
jne 0x10298
xorq 0x128(%r14), %rbx
movq %rbx, %rdi
callq 0x397d
cmpl $0x2b, %eax
jne 0x102b4
xorq 0x158(%r14), %rbx
movq %rbx, %rdi
callq 0x397d
cmpl $0x2c, %eax
jne 0x102d0
xorq 0x160(%r14), %rbx
movq %rbx, %rdi
callq 0x397d
cmpl $0x2d, %eax
jne 0x102ec
cmpq 0x168(%r14), %rbx
jne 0x10308
movq (%r15), %rdi
callq 0x3928
cmpl $0x3, %eax
jne 0x10321
movq (%r15), %rbx
movq %rbx, %rdi
callq 0x397d
cmpl $0x1, %eax
jne 0x1033a
xorq 0x8(%r14), %rbx
movq %rbx, %rdi
callq 0x397d
cmpl $0x8, %eax
jne 0x10353
xorq 0x40(%r14), %rbx
movq %rbx, %rdi
callq 0x397d
cmpl $0x9, %eax
jne 0x1036c
cmpq 0x48(%r14), %rbx
jne 0x10385
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1c66a(%rip), %rdi     # 0x2c87d
leaq 0x1c382(%rip), %rsi     # 0x2c59c
leaq 0x1c67f(%rip), %rcx     # 0x2c8a0
pushq $0x4f
jmp 0x1039c
leaq 0x1c688(%rip), %rdi     # 0x2c8b7
leaq 0x1c366(%rip), %rsi     # 0x2c59c
leaq 0x1c663(%rip), %rcx     # 0x2c8a0
pushq $0x52
jmp 0x1039c
leaq 0x1c680(%rip), %rdi     # 0x2c8cb
leaq 0x1c34a(%rip), %rsi     # 0x2c59c
leaq 0x1c647(%rip), %rcx     # 0x2c8a0
pushq $0x55
jmp 0x1039c
leaq 0x1c678(%rip), %rdi     # 0x2c8df
leaq 0x1c32e(%rip), %rsi     # 0x2c59c
leaq 0x1c62b(%rip), %rcx     # 0x2c8a0
pushq $0x58
jmp 0x1039c
leaq 0x1c670(%rip), %rdi     # 0x2c8f3
leaq 0x1c312(%rip), %rsi     # 0x2c59c
leaq 0x1c60f(%rip), %rcx     # 0x2c8a0
pushq $0x5b
jmp 0x1039c
leaq 0x1c668(%rip), %rdi     # 0x2c907
leaq 0x1c2f6(%rip), %rsi     # 0x2c59c
leaq 0x1c5f3(%rip), %rcx     # 0x2c8a0
pushq $0x5e
jmp 0x1039c
leaq 0x1c660(%rip), %rdi     # 0x2c91b
leaq 0x1c2da(%rip), %rsi     # 0x2c59c
leaq 0x1c5d7(%rip), %rcx     # 0x2c8a0
pushq $0x61
jmp 0x1039c
leaq 0x1c658(%rip), %rdi     # 0x2c92f
leaq 0x1c2be(%rip), %rsi     # 0x2c59c
leaq 0x1c5bb(%rip), %rcx     # 0x2c8a0
pushq $0x64
jmp 0x1039c
leaq 0x1c650(%rip), %rdi     # 0x2c943
leaq 0x1c2a2(%rip), %rsi     # 0x2c59c
leaq 0x1c59f(%rip), %rcx     # 0x2c8a0
pushq $0x67
jmp 0x1039c
leaq 0x1c517(%rip), %rdi     # 0x2c826
leaq 0x1c286(%rip), %rsi     # 0x2c59c
leaq 0x1c583(%rip), %rcx     # 0x2c8a0
pushq $0x6a
jmp 0x1039c
leaq 0x1c62f(%rip), %rdi     # 0x2c957
leaq 0x1c26d(%rip), %rsi     # 0x2c59c
leaq 0x1c56a(%rip), %rcx     # 0x2c8a0
pushq $0x6c
jmp 0x1039c
leaq 0x1c639(%rip), %rdi     # 0x2c97a
leaq 0x1c254(%rip), %rsi     # 0x2c59c
leaq 0x1c551(%rip), %rcx     # 0x2c8a0
pushq $0x6e
jmp 0x1039c
leaq 0x1c634(%rip), %rdi     # 0x2c98e
leaq 0x1c23b(%rip), %rsi     # 0x2c59c
leaq 0x1c538(%rip), %rcx     # 0x2c8a0
pushq $0x71
jmp 0x1039c
leaq 0x1c62f(%rip), %rdi     # 0x2c9a2
leaq 0x1c222(%rip), %rsi     # 0x2c59c
leaq 0x1c51f(%rip), %rcx     # 0x2c8a0
pushq $0x74
jmp 0x1039c
leaq 0x1c49a(%rip), %rdi     # 0x2c826
leaq 0x1c209(%rip), %rsi     # 0x2c59c
leaq 0x1c506(%rip), %rcx     # 0x2c8a0
pushq $0x77
popq %rdx
callq 0x20c0