// File: /workspace/github_cpp_makefile_star2_O1/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 0xaa43
movq %rbx, %rdi
callq 0x4924
testb %al, %al
jne 0x11b59
leaq 0x1d54e(%rip), %rsi     # 0x2ef19
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0x4924
testb %al, %al
jne 0x11b78
leaq 0x1d545(%rip), %rsi     # 0x2ef34
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0x4924
testb %al, %al
je 0x11b97
leaq 0x1d53c(%rip), %rsi     # 0x2ef4f
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0x4924
testb %al, %al
je 0x11bb6
leaq 0x1d533(%rip), %rsi     # 0x2ef6a
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0x4924
testb %al, %al
jne 0x11bd5
leaq 0x1d52a(%rip), %rsi     # 0x2ef85
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0x4924
testb %al, %al
jne 0x11bf4
leaq 0x1d521(%rip), %rsi     # 0x2efa0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0x4924
testb %al, %al
je 0x11c13
leaq 0x1d517(%rip), %rsi     # 0x2efba
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0x4924
testb %al, %al
jne 0x11c32
leaq 0x1d50f(%rip), %rsi     # 0x2efd6
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0x4924
testb %al, %al
jne 0x11c51
leaq 0x1d507(%rip), %rsi     # 0x2eff2
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0x4924
testb %al, %al
jne 0x11c70
leaq 0x1d4ff(%rip), %rsi     # 0x2f00e
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0x4924
testb %al, %al
je 0x11c8f
leaq 0x1d4f8(%rip), %rsi     # 0x2f02b
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0x4924
testb %al, %al
jne 0x11cae
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x1d370(%rip), %rdi     # 0x2eed0
leaq 0x1d33b(%rip), %rsi     # 0x2eea2
leaq 0x1d384(%rip), %rcx     # 0x2eef2
movl $0x26, %edx
callq 0x20d0
leaq 0x1d351(%rip), %rdi     # 0x2eed0
leaq 0x1d31c(%rip), %rsi     # 0x2eea2
leaq 0x1d365(%rip), %rcx     # 0x2eef2
movl $0x2a, %edx
callq 0x20d0
leaq 0x1d333(%rip), %rdi     # 0x2eed1
leaq 0x1d2fd(%rip), %rsi     # 0x2eea2
leaq 0x1d346(%rip), %rcx     # 0x2eef2
movl $0x2e, %edx
callq 0x20d0
leaq 0x1d314(%rip), %rdi     # 0x2eed1
leaq 0x1d2de(%rip), %rsi     # 0x2eea2
leaq 0x1d327(%rip), %rcx     # 0x2eef2
movl $0x32, %edx
callq 0x20d0
leaq 0x1d2f4(%rip), %rdi     # 0x2eed0
leaq 0x1d2bf(%rip), %rsi     # 0x2eea2
leaq 0x1d308(%rip), %rcx     # 0x2eef2
movl $0x36, %edx
callq 0x20d0
leaq 0x1d2d5(%rip), %rdi     # 0x2eed0
leaq 0x1d2a0(%rip), %rsi     # 0x2eea2
leaq 0x1d2e9(%rip), %rcx     # 0x2eef2
movl $0x3a, %edx
callq 0x20d0
leaq 0x1d2b7(%rip), %rdi     # 0x2eed1
leaq 0x1d281(%rip), %rsi     # 0x2eea2
leaq 0x1d2ca(%rip), %rcx     # 0x2eef2
movl $0x3e, %edx
callq 0x20d0
leaq 0x1d297(%rip), %rdi     # 0x2eed0
leaq 0x1d262(%rip), %rsi     # 0x2eea2
leaq 0x1d2ab(%rip), %rcx     # 0x2eef2
movl $0x42, %edx
callq 0x20d0
leaq 0x1d278(%rip), %rdi     # 0x2eed0
leaq 0x1d243(%rip), %rsi     # 0x2eea2
leaq 0x1d28c(%rip), %rcx     # 0x2eef2
movl $0x46, %edx
callq 0x20d0
leaq 0x1d259(%rip), %rdi     # 0x2eed0
leaq 0x1d224(%rip), %rsi     # 0x2eea2
leaq 0x1d26d(%rip), %rcx     # 0x2eef2
movl $0x4a, %edx
callq 0x20d0
leaq 0x1d23b(%rip), %rdi     # 0x2eed1
leaq 0x1d205(%rip), %rsi     # 0x2eea2
leaq 0x1d24e(%rip), %rcx     # 0x2eef2
movl $0x4e, %edx
callq 0x20d0
leaq 0x1d21b(%rip), %rdi     # 0x2eed0
leaq 0x1d1e6(%rip), %rsi     # 0x2eea2
leaq 0x1d22f(%rip), %rcx     # 0x2eef2
movl $0x52, %edx
callq 0x20d0