// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/movegen__test.cpp
// Function: test_gen_bishop_moves()
void test_gen_bishop_moves() {
    position pos;
    set_pos(&pos,"4k3/2p3P1/8/4B3/4B3/3p1P2/8/4K3 w - - 0 1");

    move moves[20];
    move *mp = gen_bishop_moves(moves,&pos,E5,true,true);
    mp = gen_bishop_moves(mp,&pos,E4,true,true);

    assert((mp - moves) == 18);
    assert(is_in_move_list(to_move(BISHOP,E5,F6),moves,mp));
    assert(is_in_move_list(to_move(BISHOP,E5,F4),moves,mp));
    assert(is_in_move_list(to_move(BISHOP,E5,G3),moves,mp));
    assert(is_in_move_list(to_move(BISHOP,E5,H2),moves,mp));
    assert(is_in_move_list(to_move(BISHOP,E5,D4),moves,mp));
    assert(is_in_move_list(to_move(BISHOP,E5,C3),moves,mp));
    assert(is_in_move_list(to_move(BISHOP,E5,B2),moves,mp));
    assert(is_in_move_list(to_move(BISHOP,E5,A1),moves,mp));
    assert(is_in_move_list(to_move(BISHOP,E5,D6),moves,mp));
    assert(is_in_move_list(to_capture(BISHOP,E5,C7,PAWN),moves,mp));
    assert(is_in_move_list(to_move(BISHOP,E4,F5),moves,mp));
    assert(is_in_move_list(to_move(BISHOP,E4,G6),moves,mp));
    assert(is_in_move_list(to_move(BISHOP,E4,H7),moves,mp));
    assert(is_in_move_list(to_capture(BISHOP,E4,D3,PAWN),moves,mp));
    assert(is_in_move_list(to_move(BISHOP,E4,D5),moves,mp));
    assert(is_in_move_list(to_move(BISHOP,E4,C6),moves,mp));
    assert(is_in_move_list(to_move(BISHOP,E4,B7),moves,mp));
    assert(is_in_move_list(to_move(BISHOP,E4,A8),moves,mp));
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
leaq 0x18f6c(%rip), %rsi     # 0x3301d
leaq 0xa0(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1c, %edx
movl $0x1, %ecx
movl $0x1, %r8d
callq 0x86f1
movq %rax, %rdi
movq %rbx, %rsi
movl $0x24, %edx
movl $0x1, %ecx
movl $0x1, %r8d
callq 0x86f1
movq %rax, %rbx
subq %r14, %rax
cmpq $0x90, %rax
jne 0x1a412
movl $0x3, %edi
movl $0x1c, %esi
movl $0x15, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1a431
movl $0x3, %edi
movl $0x1c, %esi
movl $0x25, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1a450
movl $0x3, %edi
movl $0x1c, %esi
movl $0x2e, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1a46f
movl $0x3, %edi
movl $0x1c, %esi
movl $0x37, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1a48e
movl $0x3, %edi
movl $0x1c, %esi
movl $0x23, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1a4ad
movl $0x3, %edi
movl $0x1c, %esi
movl $0x2a, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1a4cc
movl $0x3, %edi
movl $0x1c, %esi
movl $0x31, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1a4eb
movl $0x3, %edi
movl $0x1c, %esi
movl $0x38, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1a50a
movl $0x3, %edi
movl $0x1c, %esi
movl $0x13, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1a529
movl $0x3, %edi
movl $0x1c, %esi
movl $0xa, %edx
movl $0x1, %ecx
callq 0x777b
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1a548
movl $0x3, %edi
movl $0x24, %esi
movl $0x1d, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1a567
movl $0x3, %edi
movl $0x24, %esi
movl $0x16, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1a586
movl $0x3, %edi
movl $0x24, %esi
movl $0xf, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1a5a5
movl $0x3, %edi
movl $0x24, %esi
movl $0x2b, %edx
movl $0x1, %ecx
callq 0x777b
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1a5c4
movl $0x3, %edi
movl $0x24, %esi
movl $0x1b, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1a5e3
movl $0x3, %edi
movl $0x24, %esi
movl $0x12, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1a602
movl $0x3, %edi
movl $0x24, %esi
movl $0x9, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1a621
movl $0x3, %edi
movl $0x24, %esi
xorl %edx, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1a640
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r14
retq
leaq 0x18c2e(%rip), %rdi     # 0x33047
leaq 0x1892e(%rip), %rsi     # 0x32d4e
leaq 0x18c33(%rip), %rcx     # 0x3305a
movl $0x3f, %edx
callq 0x20d0
leaq 0x18c3f(%rip), %rdi     # 0x33077
leaq 0x1890f(%rip), %rsi     # 0x32d4e
leaq 0x18c14(%rip), %rcx     # 0x3305a
movl $0x40, %edx
callq 0x20d0
leaq 0x18c50(%rip), %rdi     # 0x330a7
leaq 0x188f0(%rip), %rsi     # 0x32d4e
leaq 0x18bf5(%rip), %rcx     # 0x3305a
movl $0x41, %edx
callq 0x20d0
leaq 0x18c61(%rip), %rdi     # 0x330d7
leaq 0x188d1(%rip), %rsi     # 0x32d4e
leaq 0x18bd6(%rip), %rcx     # 0x3305a
movl $0x42, %edx
callq 0x20d0
leaq 0x18c72(%rip), %rdi     # 0x33107
leaq 0x188b2(%rip), %rsi     # 0x32d4e
leaq 0x18bb7(%rip), %rcx     # 0x3305a
movl $0x43, %edx
callq 0x20d0
leaq 0x18c83(%rip), %rdi     # 0x33137
leaq 0x18893(%rip), %rsi     # 0x32d4e
leaq 0x18b98(%rip), %rcx     # 0x3305a
movl $0x44, %edx
callq 0x20d0
leaq 0x18c94(%rip), %rdi     # 0x33167
leaq 0x18874(%rip), %rsi     # 0x32d4e
leaq 0x18b79(%rip), %rcx     # 0x3305a
movl $0x45, %edx
callq 0x20d0
leaq 0x18ca5(%rip), %rdi     # 0x33197
leaq 0x18855(%rip), %rsi     # 0x32d4e
leaq 0x18b5a(%rip), %rcx     # 0x3305a
movl $0x46, %edx
callq 0x20d0
leaq 0x18cb6(%rip), %rdi     # 0x331c7
leaq 0x18836(%rip), %rsi     # 0x32d4e
leaq 0x18b3b(%rip), %rcx     # 0x3305a
movl $0x47, %edx
callq 0x20d0
leaq 0x18cc7(%rip), %rdi     # 0x331f7
leaq 0x18817(%rip), %rsi     # 0x32d4e
leaq 0x18b1c(%rip), %rcx     # 0x3305a
movl $0x48, %edx
callq 0x20d0
leaq 0x18cd8(%rip), %rdi     # 0x33227
leaq 0x187f8(%rip), %rsi     # 0x32d4e
leaq 0x18afd(%rip), %rcx     # 0x3305a
movl $0x49, %edx
callq 0x20d0
leaq 0x18cf1(%rip), %rdi     # 0x3325f
leaq 0x187d9(%rip), %rsi     # 0x32d4e
leaq 0x18ade(%rip), %rcx     # 0x3305a
movl $0x4a, %edx
callq 0x20d0
leaq 0x18d02(%rip), %rdi     # 0x3328f
leaq 0x187ba(%rip), %rsi     # 0x32d4e
leaq 0x18abf(%rip), %rcx     # 0x3305a
movl $0x4b, %edx
callq 0x20d0
leaq 0x18d13(%rip), %rdi     # 0x332bf
leaq 0x1879b(%rip), %rsi     # 0x32d4e
leaq 0x18aa0(%rip), %rcx     # 0x3305a
movl $0x4c, %edx
callq 0x20d0
leaq 0x18d24(%rip), %rdi     # 0x332ef
leaq 0x1877c(%rip), %rsi     # 0x32d4e
leaq 0x18a81(%rip), %rcx     # 0x3305a
movl $0x4d, %edx
callq 0x20d0
leaq 0x18d3d(%rip), %rdi     # 0x33327
leaq 0x1875d(%rip), %rsi     # 0x32d4e
leaq 0x18a62(%rip), %rcx     # 0x3305a
movl $0x4e, %edx
callq 0x20d0
leaq 0x18d4e(%rip), %rdi     # 0x33357
leaq 0x1873e(%rip), %rsi     # 0x32d4e
leaq 0x18a43(%rip), %rcx     # 0x3305a
movl $0x4f, %edx
callq 0x20d0
leaq 0x18d5f(%rip), %rdi     # 0x33387
leaq 0x1871f(%rip), %rsi     # 0x32d4e
leaq 0x18a24(%rip), %rcx     # 0x3305a
movl $0x50, %edx
callq 0x20d0
leaq 0x18d70(%rip), %rdi     # 0x333b7
leaq 0x18700(%rip), %rsi     # 0x32d4e
leaq 0x18a05(%rip), %rcx     # 0x3305a
movl $0x51, %edx
callq 0x20d0