// File: /workspace/github_cpp_makefile_star2_O1/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 0xe98ea(%rip), %r15     # 0xfa8b0
movq 0x120(%r15), %rdi
callq 0x3b08
cmpl $0x8, %eax
jne 0x1110e
movq 0x120(%r15), %rbx
movq %rbx, %rdi
callq 0x3b5b
cmpl $0x1b, %eax
jne 0x1112d
leaq 0xe94b6(%rip), %r14     # 0xfa4b0
xorq 0xd8(%r14), %rbx
movq %rbx, %rdi
callq 0x3b5b
cmpl $0x1c, %eax
jne 0x1114c
xorq 0xe0(%r14), %rbx
movq %rbx, %rdi
callq 0x3b5b
cmpl $0x1d, %eax
jne 0x1116b
xorq 0xe8(%r14), %rbx
movq %rbx, %rdi
callq 0x3b5b
cmpl $0x23, %eax
jne 0x1118a
xorq 0x118(%r14), %rbx
movq %rbx, %rdi
callq 0x3b5b
cmpl $0x25, %eax
jne 0x111a9
xorq 0x128(%r14), %rbx
movq %rbx, %rdi
callq 0x3b5b
cmpl $0x2b, %eax
jne 0x111c8
xorq 0x158(%r14), %rbx
movq %rbx, %rdi
callq 0x3b5b
cmpl $0x2c, %eax
jne 0x111e7
xorq 0x160(%r14), %rbx
movq %rbx, %rdi
callq 0x3b5b
cmpl $0x2d, %eax
jne 0x11206
cmpq 0x168(%r14), %rbx
jne 0x11225
movq (%r15), %rdi
callq 0x3b08
cmpl $0x3, %eax
jne 0x11244
movq (%r15), %rbx
movq %rbx, %rdi
callq 0x3b5b
cmpl $0x1, %eax
jne 0x11263
xorq 0x8(%r14), %rbx
movq %rbx, %rdi
callq 0x3b5b
cmpl $0x8, %eax
jne 0x11282
xorq 0x40(%r14), %rbx
movq %rbx, %rdi
callq 0x3b5b
cmpl $0x9, %eax
jne 0x112a1
cmpq 0x48(%r14), %rbx
jne 0x112c0
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1d738(%rip), %rdi     # 0x2e84d
leaq 0x1d450(%rip), %rsi     # 0x2e56c
leaq 0x1d74d(%rip), %rcx     # 0x2e870
movl $0x4f, %edx
callq 0x20d0
leaq 0x1d753(%rip), %rdi     # 0x2e887
leaq 0x1d431(%rip), %rsi     # 0x2e56c
leaq 0x1d72e(%rip), %rcx     # 0x2e870
movl $0x52, %edx
callq 0x20d0
leaq 0x1d748(%rip), %rdi     # 0x2e89b
leaq 0x1d412(%rip), %rsi     # 0x2e56c
leaq 0x1d70f(%rip), %rcx     # 0x2e870
movl $0x55, %edx
callq 0x20d0
leaq 0x1d73d(%rip), %rdi     # 0x2e8af
leaq 0x1d3f3(%rip), %rsi     # 0x2e56c
leaq 0x1d6f0(%rip), %rcx     # 0x2e870
movl $0x58, %edx
callq 0x20d0
leaq 0x1d732(%rip), %rdi     # 0x2e8c3
leaq 0x1d3d4(%rip), %rsi     # 0x2e56c
leaq 0x1d6d1(%rip), %rcx     # 0x2e870
movl $0x5b, %edx
callq 0x20d0
leaq 0x1d727(%rip), %rdi     # 0x2e8d7
leaq 0x1d3b5(%rip), %rsi     # 0x2e56c
leaq 0x1d6b2(%rip), %rcx     # 0x2e870
movl $0x5e, %edx
callq 0x20d0
leaq 0x1d71c(%rip), %rdi     # 0x2e8eb
leaq 0x1d396(%rip), %rsi     # 0x2e56c
leaq 0x1d693(%rip), %rcx     # 0x2e870
movl $0x61, %edx
callq 0x20d0
leaq 0x1d711(%rip), %rdi     # 0x2e8ff
leaq 0x1d377(%rip), %rsi     # 0x2e56c
leaq 0x1d674(%rip), %rcx     # 0x2e870
movl $0x64, %edx
callq 0x20d0
leaq 0x1d706(%rip), %rdi     # 0x2e913
leaq 0x1d358(%rip), %rsi     # 0x2e56c
leaq 0x1d655(%rip), %rcx     # 0x2e870
movl $0x67, %edx
callq 0x20d0
leaq 0x1d5ca(%rip), %rdi     # 0x2e7f6
leaq 0x1d339(%rip), %rsi     # 0x2e56c
leaq 0x1d636(%rip), %rcx     # 0x2e870
movl $0x6a, %edx
callq 0x20d0
leaq 0x1d6dc(%rip), %rdi     # 0x2e927
leaq 0x1d31a(%rip), %rsi     # 0x2e56c
leaq 0x1d617(%rip), %rcx     # 0x2e870
movl $0x6c, %edx
callq 0x20d0
leaq 0x1d6e0(%rip), %rdi     # 0x2e94a
leaq 0x1d2fb(%rip), %rsi     # 0x2e56c
leaq 0x1d5f8(%rip), %rcx     # 0x2e870
movl $0x6e, %edx
callq 0x20d0
leaq 0x1d6d5(%rip), %rdi     # 0x2e95e
leaq 0x1d2dc(%rip), %rsi     # 0x2e56c
leaq 0x1d5d9(%rip), %rcx     # 0x2e870
movl $0x71, %edx
callq 0x20d0
leaq 0x1d6ca(%rip), %rdi     # 0x2e972
leaq 0x1d2bd(%rip), %rsi     # 0x2e56c
leaq 0x1d5ba(%rip), %rcx     # 0x2e870
movl $0x74, %edx
callq 0x20d0
leaq 0x1d52f(%rip), %rdi     # 0x2e7f6
leaq 0x1d29e(%rip), %rsi     # 0x2e56c
leaq 0x1d59b(%rip), %rcx     # 0x2e870
movl $0x77, %edx
callq 0x20d0