// File: /workspace/github_cpp_makefile_star2_O1/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 0x18d78(%rip), %rsi     # 0x32f9d
leaq 0xa0(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1c, %edx
movl $0x1, %ecx
movl $0x1, %r8d
callq 0x865d
movq %rax, %rdi
movq %rbx, %rsi
movl $0x24, %edx
movl $0x1, %ecx
movl $0x1, %r8d
callq 0x865d
movq %rax, %rbx
subq %r14, %rax
cmpq $0x90, %rax
jne 0x1a586
movl $0x3, %edi
movl $0x1c, %esi
movl $0x15, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1a5a5
movl $0x3, %edi
movl $0x1c, %esi
movl $0x25, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1a5c4
movl $0x3, %edi
movl $0x1c, %esi
movl $0x2e, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1a5e3
movl $0x3, %edi
movl $0x1c, %esi
movl $0x37, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1a602
movl $0x3, %edi
movl $0x1c, %esi
movl $0x23, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1a621
movl $0x3, %edi
movl $0x1c, %esi
movl $0x2a, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1a640
movl $0x3, %edi
movl $0x1c, %esi
movl $0x31, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1a65f
movl $0x3, %edi
movl $0x1c, %esi
movl $0x38, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1a67e
movl $0x3, %edi
movl $0x1c, %esi
movl $0x13, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1a69d
movl $0x3, %edi
movl $0x1c, %esi
movl $0xa, %edx
movl $0x1, %ecx
callq 0x76d7
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1a6bc
movl $0x3, %edi
movl $0x24, %esi
movl $0x1d, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1a6db
movl $0x3, %edi
movl $0x24, %esi
movl $0x16, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1a6fa
movl $0x3, %edi
movl $0x24, %esi
movl $0xf, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1a719
movl $0x3, %edi
movl $0x24, %esi
movl $0x2b, %edx
movl $0x1, %ecx
callq 0x76d7
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1a738
movl $0x3, %edi
movl $0x24, %esi
movl $0x1b, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1a757
movl $0x3, %edi
movl $0x24, %esi
movl $0x12, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1a776
movl $0x3, %edi
movl $0x24, %esi
movl $0x9, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1a795
movl $0x3, %edi
movl $0x24, %esi
xorl %edx, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1a7b4
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r14
retq
leaq 0x18a3a(%rip), %rdi     # 0x32fc7
leaq 0x1873a(%rip), %rsi     # 0x32cce
leaq 0x18a3f(%rip), %rcx     # 0x32fda
movl $0x3f, %edx
callq 0x20d0
leaq 0x18a4b(%rip), %rdi     # 0x32ff7
leaq 0x1871b(%rip), %rsi     # 0x32cce
leaq 0x18a20(%rip), %rcx     # 0x32fda
movl $0x40, %edx
callq 0x20d0
leaq 0x18a5c(%rip), %rdi     # 0x33027
leaq 0x186fc(%rip), %rsi     # 0x32cce
leaq 0x18a01(%rip), %rcx     # 0x32fda
movl $0x41, %edx
callq 0x20d0
leaq 0x18a6d(%rip), %rdi     # 0x33057
leaq 0x186dd(%rip), %rsi     # 0x32cce
leaq 0x189e2(%rip), %rcx     # 0x32fda
movl $0x42, %edx
callq 0x20d0
leaq 0x18a7e(%rip), %rdi     # 0x33087
leaq 0x186be(%rip), %rsi     # 0x32cce
leaq 0x189c3(%rip), %rcx     # 0x32fda
movl $0x43, %edx
callq 0x20d0
leaq 0x18a8f(%rip), %rdi     # 0x330b7
leaq 0x1869f(%rip), %rsi     # 0x32cce
leaq 0x189a4(%rip), %rcx     # 0x32fda
movl $0x44, %edx
callq 0x20d0
leaq 0x18aa0(%rip), %rdi     # 0x330e7
leaq 0x18680(%rip), %rsi     # 0x32cce
leaq 0x18985(%rip), %rcx     # 0x32fda
movl $0x45, %edx
callq 0x20d0
leaq 0x18ab1(%rip), %rdi     # 0x33117
leaq 0x18661(%rip), %rsi     # 0x32cce
leaq 0x18966(%rip), %rcx     # 0x32fda
movl $0x46, %edx
callq 0x20d0
leaq 0x18ac2(%rip), %rdi     # 0x33147
leaq 0x18642(%rip), %rsi     # 0x32cce
leaq 0x18947(%rip), %rcx     # 0x32fda
movl $0x47, %edx
callq 0x20d0
leaq 0x18ad3(%rip), %rdi     # 0x33177
leaq 0x18623(%rip), %rsi     # 0x32cce
leaq 0x18928(%rip), %rcx     # 0x32fda
movl $0x48, %edx
callq 0x20d0
leaq 0x18ae4(%rip), %rdi     # 0x331a7
leaq 0x18604(%rip), %rsi     # 0x32cce
leaq 0x18909(%rip), %rcx     # 0x32fda
movl $0x49, %edx
callq 0x20d0
leaq 0x18afd(%rip), %rdi     # 0x331df
leaq 0x185e5(%rip), %rsi     # 0x32cce
leaq 0x188ea(%rip), %rcx     # 0x32fda
movl $0x4a, %edx
callq 0x20d0
leaq 0x18b0e(%rip), %rdi     # 0x3320f
leaq 0x185c6(%rip), %rsi     # 0x32cce
leaq 0x188cb(%rip), %rcx     # 0x32fda
movl $0x4b, %edx
callq 0x20d0
leaq 0x18b1f(%rip), %rdi     # 0x3323f
leaq 0x185a7(%rip), %rsi     # 0x32cce
leaq 0x188ac(%rip), %rcx     # 0x32fda
movl $0x4c, %edx
callq 0x20d0
leaq 0x18b30(%rip), %rdi     # 0x3326f
leaq 0x18588(%rip), %rsi     # 0x32cce
leaq 0x1888d(%rip), %rcx     # 0x32fda
movl $0x4d, %edx
callq 0x20d0
leaq 0x18b49(%rip), %rdi     # 0x332a7
leaq 0x18569(%rip), %rsi     # 0x32cce
leaq 0x1886e(%rip), %rcx     # 0x32fda
movl $0x4e, %edx
callq 0x20d0
leaq 0x18b5a(%rip), %rdi     # 0x332d7
leaq 0x1854a(%rip), %rsi     # 0x32cce
leaq 0x1884f(%rip), %rcx     # 0x32fda
movl $0x4f, %edx
callq 0x20d0
leaq 0x18b6b(%rip), %rdi     # 0x33307
leaq 0x1852b(%rip), %rsi     # 0x32cce
leaq 0x18830(%rip), %rcx     # 0x32fda
movl $0x50, %edx
callq 0x20d0
leaq 0x18b7c(%rip), %rdi     # 0x33337
leaq 0x1850c(%rip), %rsi     # 0x32cce
leaq 0x18811(%rip), %rcx     # 0x32fda
movl $0x51, %edx
callq 0x20d0