// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/draw__test.cpp
// Function: test_is_lack_of_mating_material()
void test_is_lack_of_mating_material() {
    position pos;

    // any position with a pawn is not drawn
    reset_pos(&pos);
    assert(!is_lack_of_mating_material(&pos));

    // one pawn
    set_pos(&pos,"4k3/8/8/8/8/8/P7/4K3 w - -");
    assert(!is_lack_of_mating_material(&pos));

    // one bishop
    set_pos(&pos,"4k3/8/8/8/8/8/B7/4K3 w - -");
    assert(is_lack_of_mating_material(&pos));

    // one knight
    set_pos(&pos,"4k3/8/8/8/8/8/n7/4K3 w - -");
    assert(is_lack_of_mating_material(&pos));

    // one rook
    set_pos(&pos,"4k3/8/8/8/8/8/r7/4K3 b - -");
    assert(!is_lack_of_mating_material(&pos));

    // one queen
    set_pos(&pos,"4k3/8/8/8/8/8/Q7/4K3 w - -");
    assert(!is_lack_of_mating_material(&pos));

    // just kings
    set_pos(&pos,"4k3/8/8/8/8/8/8/4K3 w - -");
    assert(is_lack_of_mating_material(&pos));

    // two knights, both white's
    set_pos(&pos,"4k3/8/8/8/8/8/NN6/4K3 w - -");
    assert(!is_lack_of_mating_material(&pos));

    // two knights, one white's one black's
    set_pos(&pos,"4k3/8/8/8/8/8/Nn6/4K3 b - -");
    assert(!is_lack_of_mating_material(&pos));

    // two bishops, one white one black opposite colors
    set_pos(&pos,"4k3/8/8/8/8/8/Bb6/4K3 w - -");
    assert(!is_lack_of_mating_material(&pos));

    // two bishops, one white one black same color
    set_pos(&pos,"4k3/8/8/8/8/8/B1b5/4K3 b - -");
    assert(is_lack_of_mating_material(&pos));

    // knight vs bishop
    set_pos(&pos,"4k3/8/8/8/8/8/B1n5/4K3 b - -");
    assert(!is_lack_of_mating_material(&pos));
}

// Assembly:
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa51
movq %rbx, %rdi
callq 0x4980
testb %al, %al
jne 0x11aa5
leaq 0x1d682(%rip), %rsi     # 0x2ef99
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0x4980
testb %al, %al
jne 0x11ac4
leaq 0x1d679(%rip), %rsi     # 0x2efb4
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0x4980
testb %al, %al
je 0x11ae3
leaq 0x1d670(%rip), %rsi     # 0x2efcf
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0x4980
testb %al, %al
je 0x11b02
leaq 0x1d667(%rip), %rsi     # 0x2efea
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0x4980
testb %al, %al
jne 0x11b21
leaq 0x1d65e(%rip), %rsi     # 0x2f005
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0x4980
testb %al, %al
jne 0x11b40
leaq 0x1d655(%rip), %rsi     # 0x2f020
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0x4980
testb %al, %al
je 0x11b5f
leaq 0x1d64b(%rip), %rsi     # 0x2f03a
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0x4980
testb %al, %al
jne 0x11b7e
leaq 0x1d643(%rip), %rsi     # 0x2f056
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0x4980
testb %al, %al
jne 0x11b9d
leaq 0x1d63b(%rip), %rsi     # 0x2f072
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0x4980
testb %al, %al
jne 0x11bbc
leaq 0x1d633(%rip), %rsi     # 0x2f08e
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0x4980
testb %al, %al
je 0x11bdb
leaq 0x1d62c(%rip), %rsi     # 0x2f0ab
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0x4980
testb %al, %al
jne 0x11bfa
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x1d4a4(%rip), %rdi     # 0x2ef50
leaq 0x1d46f(%rip), %rsi     # 0x2ef22
leaq 0x1d4b8(%rip), %rcx     # 0x2ef72
movl $0x26, %edx
callq 0x20d0
leaq 0x1d485(%rip), %rdi     # 0x2ef50
leaq 0x1d450(%rip), %rsi     # 0x2ef22
leaq 0x1d499(%rip), %rcx     # 0x2ef72
movl $0x2a, %edx
callq 0x20d0
leaq 0x1d467(%rip), %rdi     # 0x2ef51
leaq 0x1d431(%rip), %rsi     # 0x2ef22
leaq 0x1d47a(%rip), %rcx     # 0x2ef72
movl $0x2e, %edx
callq 0x20d0
leaq 0x1d448(%rip), %rdi     # 0x2ef51
leaq 0x1d412(%rip), %rsi     # 0x2ef22
leaq 0x1d45b(%rip), %rcx     # 0x2ef72
movl $0x32, %edx
callq 0x20d0
leaq 0x1d428(%rip), %rdi     # 0x2ef50
leaq 0x1d3f3(%rip), %rsi     # 0x2ef22
leaq 0x1d43c(%rip), %rcx     # 0x2ef72
movl $0x36, %edx
callq 0x20d0
leaq 0x1d409(%rip), %rdi     # 0x2ef50
leaq 0x1d3d4(%rip), %rsi     # 0x2ef22
leaq 0x1d41d(%rip), %rcx     # 0x2ef72
movl $0x3a, %edx
callq 0x20d0
leaq 0x1d3eb(%rip), %rdi     # 0x2ef51
leaq 0x1d3b5(%rip), %rsi     # 0x2ef22
leaq 0x1d3fe(%rip), %rcx     # 0x2ef72
movl $0x3e, %edx
callq 0x20d0
leaq 0x1d3cb(%rip), %rdi     # 0x2ef50
leaq 0x1d396(%rip), %rsi     # 0x2ef22
leaq 0x1d3df(%rip), %rcx     # 0x2ef72
movl $0x42, %edx
callq 0x20d0
leaq 0x1d3ac(%rip), %rdi     # 0x2ef50
leaq 0x1d377(%rip), %rsi     # 0x2ef22
leaq 0x1d3c0(%rip), %rcx     # 0x2ef72
movl $0x46, %edx
callq 0x20d0
leaq 0x1d38d(%rip), %rdi     # 0x2ef50
leaq 0x1d358(%rip), %rsi     # 0x2ef22
leaq 0x1d3a1(%rip), %rcx     # 0x2ef72
movl $0x4a, %edx
callq 0x20d0
leaq 0x1d36f(%rip), %rdi     # 0x2ef51
leaq 0x1d339(%rip), %rsi     # 0x2ef22
leaq 0x1d382(%rip), %rcx     # 0x2ef72
movl $0x4e, %edx
callq 0x20d0
leaq 0x1d34f(%rip), %rdi     # 0x2ef50
leaq 0x1d31a(%rip), %rsi     # 0x2ef22
leaq 0x1d363(%rip), %rcx     # 0x2ef72
movl $0x52, %edx
callq 0x20d0