// File: /workspace/github_cpp_makefile_star2_O2/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 0xa187
movq %rbx, %rdi
callq 0x4710
testb %al, %al
jne 0x10bbd
leaq 0x1c51a(%rip), %rsi     # 0x2cf49
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xa1b8
movq %rbx, %rdi
callq 0x4710
testb %al, %al
jne 0x10bd9
leaq 0x1c511(%rip), %rsi     # 0x2cf64
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xa1b8
movq %rbx, %rdi
callq 0x4710
testb %al, %al
je 0x10bf5
leaq 0x1c508(%rip), %rsi     # 0x2cf7f
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xa1b8
movq %rbx, %rdi
callq 0x4710
testb %al, %al
je 0x10c11
leaq 0x1c4ff(%rip), %rsi     # 0x2cf9a
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xa1b8
movq %rbx, %rdi
callq 0x4710
testb %al, %al
jne 0x10c2d
leaq 0x1c4f6(%rip), %rsi     # 0x2cfb5
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xa1b8
movq %rbx, %rdi
callq 0x4710
testb %al, %al
jne 0x10c49
leaq 0x1c4ed(%rip), %rsi     # 0x2cfd0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xa1b8
movq %rbx, %rdi
callq 0x4710
testb %al, %al
je 0x10c65
leaq 0x1c4e3(%rip), %rsi     # 0x2cfea
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xa1b8
movq %rbx, %rdi
callq 0x4710
testb %al, %al
jne 0x10c7e
leaq 0x1c4db(%rip), %rsi     # 0x2d006
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xa1b8
movq %rbx, %rdi
callq 0x4710
testb %al, %al
jne 0x10c97
leaq 0x1c4d3(%rip), %rsi     # 0x2d022
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xa1b8
movq %rbx, %rdi
callq 0x4710
testb %al, %al
jne 0x10cb0
leaq 0x1c4cb(%rip), %rsi     # 0x2d03e
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xa1b8
movq %rbx, %rdi
callq 0x4710
testb %al, %al
je 0x10cc9
leaq 0x1c4c4(%rip), %rsi     # 0x2d05b
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xa1b8
movq %rbx, %rdi
callq 0x4710
testb %al, %al
jne 0x10ce2
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x1c33c(%rip), %rdi     # 0x2cf00
leaq 0x1c307(%rip), %rsi     # 0x2ced2
leaq 0x1c350(%rip), %rcx     # 0x2cf22
pushq $0x26
jmp 0x10cf9
leaq 0x1c320(%rip), %rdi     # 0x2cf00
leaq 0x1c2eb(%rip), %rsi     # 0x2ced2
leaq 0x1c334(%rip), %rcx     # 0x2cf22
pushq $0x2a
jmp 0x10cf9
leaq 0x1c305(%rip), %rdi     # 0x2cf01
leaq 0x1c2cf(%rip), %rsi     # 0x2ced2
leaq 0x1c318(%rip), %rcx     # 0x2cf22
pushq $0x2e
jmp 0x10cf9
leaq 0x1c2e9(%rip), %rdi     # 0x2cf01
leaq 0x1c2b3(%rip), %rsi     # 0x2ced2
leaq 0x1c2fc(%rip), %rcx     # 0x2cf22
pushq $0x32
jmp 0x10cf9
leaq 0x1c2cc(%rip), %rdi     # 0x2cf00
leaq 0x1c297(%rip), %rsi     # 0x2ced2
leaq 0x1c2e0(%rip), %rcx     # 0x2cf22
pushq $0x36
jmp 0x10cf9
leaq 0x1c2b0(%rip), %rdi     # 0x2cf00
leaq 0x1c27b(%rip), %rsi     # 0x2ced2
leaq 0x1c2c4(%rip), %rcx     # 0x2cf22
pushq $0x3a
jmp 0x10cf9
leaq 0x1c295(%rip), %rdi     # 0x2cf01
leaq 0x1c25f(%rip), %rsi     # 0x2ced2
leaq 0x1c2a8(%rip), %rcx     # 0x2cf22
pushq $0x3e
jmp 0x10cf9
leaq 0x1c27b(%rip), %rdi     # 0x2cf00
leaq 0x1c246(%rip), %rsi     # 0x2ced2
leaq 0x1c28f(%rip), %rcx     # 0x2cf22
pushq $0x42
jmp 0x10cf9
leaq 0x1c262(%rip), %rdi     # 0x2cf00
leaq 0x1c22d(%rip), %rsi     # 0x2ced2
leaq 0x1c276(%rip), %rcx     # 0x2cf22
pushq $0x46
jmp 0x10cf9
leaq 0x1c249(%rip), %rdi     # 0x2cf00
leaq 0x1c214(%rip), %rsi     # 0x2ced2
leaq 0x1c25d(%rip), %rcx     # 0x2cf22
pushq $0x4a
jmp 0x10cf9
leaq 0x1c231(%rip), %rdi     # 0x2cf01
leaq 0x1c1fb(%rip), %rsi     # 0x2ced2
leaq 0x1c244(%rip), %rcx     # 0x2cf22
pushq $0x4e
jmp 0x10cf9
leaq 0x1c217(%rip), %rdi     # 0x2cf00
leaq 0x1c1e2(%rip), %rsi     # 0x2ced2
leaq 0x1c22b(%rip), %rcx     # 0x2cf22
pushq $0x52
popq %rdx
callq 0x20c0