// File: /workspace/github_cpp_makefile_star2_O3/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 0xe999e(%rip), %r15     # 0xfa8b0
movq 0x120(%r15), %rdi
callq 0x3b14
cmpl $0x8, %eax
jne 0x1105a
movq 0x120(%r15), %rbx
movq %rbx, %rdi
callq 0x3b67
cmpl $0x1b, %eax
jne 0x11079
leaq 0xe956a(%rip), %r14     # 0xfa4b0
xorq 0xd8(%r14), %rbx
movq %rbx, %rdi
callq 0x3b67
cmpl $0x1c, %eax
jne 0x11098
xorq 0xe0(%r14), %rbx
movq %rbx, %rdi
callq 0x3b67
cmpl $0x1d, %eax
jne 0x110b7
xorq 0xe8(%r14), %rbx
movq %rbx, %rdi
callq 0x3b67
cmpl $0x23, %eax
jne 0x110d6
xorq 0x118(%r14), %rbx
movq %rbx, %rdi
callq 0x3b67
cmpl $0x25, %eax
jne 0x110f5
xorq 0x128(%r14), %rbx
movq %rbx, %rdi
callq 0x3b67
cmpl $0x2b, %eax
jne 0x11114
xorq 0x158(%r14), %rbx
movq %rbx, %rdi
callq 0x3b67
cmpl $0x2c, %eax
jne 0x11133
xorq 0x160(%r14), %rbx
movq %rbx, %rdi
callq 0x3b67
cmpl $0x2d, %eax
jne 0x11152
cmpq 0x168(%r14), %rbx
jne 0x11171
movq (%r15), %rdi
callq 0x3b14
cmpl $0x3, %eax
jne 0x11190
movq (%r15), %rbx
movq %rbx, %rdi
callq 0x3b67
cmpl $0x1, %eax
jne 0x111af
xorq 0x8(%r14), %rbx
movq %rbx, %rdi
callq 0x3b67
cmpl $0x8, %eax
jne 0x111ce
xorq 0x40(%r14), %rbx
movq %rbx, %rdi
callq 0x3b67
cmpl $0x9, %eax
jne 0x111ed
cmpq 0x48(%r14), %rbx
jne 0x1120c
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1d86c(%rip), %rdi     # 0x2e8cd
leaq 0x1d584(%rip), %rsi     # 0x2e5ec
leaq 0x1d881(%rip), %rcx     # 0x2e8f0
movl $0x4f, %edx
callq 0x20d0
leaq 0x1d887(%rip), %rdi     # 0x2e907
leaq 0x1d565(%rip), %rsi     # 0x2e5ec
leaq 0x1d862(%rip), %rcx     # 0x2e8f0
movl $0x52, %edx
callq 0x20d0
leaq 0x1d87c(%rip), %rdi     # 0x2e91b
leaq 0x1d546(%rip), %rsi     # 0x2e5ec
leaq 0x1d843(%rip), %rcx     # 0x2e8f0
movl $0x55, %edx
callq 0x20d0
leaq 0x1d871(%rip), %rdi     # 0x2e92f
leaq 0x1d527(%rip), %rsi     # 0x2e5ec
leaq 0x1d824(%rip), %rcx     # 0x2e8f0
movl $0x58, %edx
callq 0x20d0
leaq 0x1d866(%rip), %rdi     # 0x2e943
leaq 0x1d508(%rip), %rsi     # 0x2e5ec
leaq 0x1d805(%rip), %rcx     # 0x2e8f0
movl $0x5b, %edx
callq 0x20d0
leaq 0x1d85b(%rip), %rdi     # 0x2e957
leaq 0x1d4e9(%rip), %rsi     # 0x2e5ec
leaq 0x1d7e6(%rip), %rcx     # 0x2e8f0
movl $0x5e, %edx
callq 0x20d0
leaq 0x1d850(%rip), %rdi     # 0x2e96b
leaq 0x1d4ca(%rip), %rsi     # 0x2e5ec
leaq 0x1d7c7(%rip), %rcx     # 0x2e8f0
movl $0x61, %edx
callq 0x20d0
leaq 0x1d845(%rip), %rdi     # 0x2e97f
leaq 0x1d4ab(%rip), %rsi     # 0x2e5ec
leaq 0x1d7a8(%rip), %rcx     # 0x2e8f0
movl $0x64, %edx
callq 0x20d0
leaq 0x1d83a(%rip), %rdi     # 0x2e993
leaq 0x1d48c(%rip), %rsi     # 0x2e5ec
leaq 0x1d789(%rip), %rcx     # 0x2e8f0
movl $0x67, %edx
callq 0x20d0
leaq 0x1d6fe(%rip), %rdi     # 0x2e876
leaq 0x1d46d(%rip), %rsi     # 0x2e5ec
leaq 0x1d76a(%rip), %rcx     # 0x2e8f0
movl $0x6a, %edx
callq 0x20d0
leaq 0x1d810(%rip), %rdi     # 0x2e9a7
leaq 0x1d44e(%rip), %rsi     # 0x2e5ec
leaq 0x1d74b(%rip), %rcx     # 0x2e8f0
movl $0x6c, %edx
callq 0x20d0
leaq 0x1d814(%rip), %rdi     # 0x2e9ca
leaq 0x1d42f(%rip), %rsi     # 0x2e5ec
leaq 0x1d72c(%rip), %rcx     # 0x2e8f0
movl $0x6e, %edx
callq 0x20d0
leaq 0x1d809(%rip), %rdi     # 0x2e9de
leaq 0x1d410(%rip), %rsi     # 0x2e5ec
leaq 0x1d70d(%rip), %rcx     # 0x2e8f0
movl $0x71, %edx
callq 0x20d0
leaq 0x1d7fe(%rip), %rdi     # 0x2e9f2
leaq 0x1d3f1(%rip), %rsi     # 0x2e5ec
leaq 0x1d6ee(%rip), %rcx     # 0x2e8f0
movl $0x74, %edx
callq 0x20d0
leaq 0x1d663(%rip), %rdi     # 0x2e876
leaq 0x1d3d2(%rip), %rsi     # 0x2e5ec
leaq 0x1d6cf(%rip), %rcx     # 0x2e8f0
movl $0x77, %edx
callq 0x20d0