// File: jswaff[P]prophet3/test/movegen__test.cpp
// Function: test_gen_bishop_noncaptures()
void test_gen_bishop_noncaptures() {
    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,false,true);
    mp = gen_bishop_moves(mp,&pos,E4,false,true);

    assert((mp - moves) == 16);
    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_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_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 %rbp
movq %rsp, %rbp
subq $0x280, %rsp            # imm = 0x280
leaq -0x1c8(%rbp), %rdi
leaq 0x1b576(%rip), %rsi     # 0x3f8bf
callq 0xf3e0
leaq -0x270(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
movl $0x1c, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0xc0d0
movq %rax, -0x278(%rbp)
movq -0x278(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
movl $0x24, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0xc0d0
movq %rax, -0x278(%rbp)
movq -0x278(%rbp), %rax
leaq -0x270(%rbp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
cmpq $0x10, %rax
jne 0x243b9
jmp 0x243d8
leaq 0x1b8fb(%rip), %rdi     # 0x3fcbb
leaq 0x1b229(%rip), %rsi     # 0x3f5f0
movl $0x69, %edx
leaq 0x1b8fb(%rip), %rcx     # 0x3fcce
callq 0x20c0
movl $0x3, %edi
movl $0x1c, %esi
movl $0x15, %edx
callq 0xa830
movq %rax, %rdi
leaq -0x270(%rbp), %rsi
movq -0x278(%rbp), %rdx
callq 0x14c10
testb $0x1, %al
jne 0x24408
jmp 0x2440a
jmp 0x24429
leaq 0x1b508(%rip), %rdi     # 0x3f919
leaq 0x1b1d8(%rip), %rsi     # 0x3f5f0
movl $0x6a, %edx
leaq 0x1b8aa(%rip), %rcx     # 0x3fcce
callq 0x20c0
movl $0x3, %edi
movl $0x1c, %esi
movl $0x25, %edx
callq 0xa830
movq %rax, %rdi
leaq -0x270(%rbp), %rsi
movq -0x278(%rbp), %rdx
callq 0x14c10
testb $0x1, %al
jne 0x24459
jmp 0x2445b
jmp 0x2447a
leaq 0x1b4e7(%rip), %rdi     # 0x3f949
leaq 0x1b187(%rip), %rsi     # 0x3f5f0
movl $0x6b, %edx
leaq 0x1b859(%rip), %rcx     # 0x3fcce
callq 0x20c0
movl $0x3, %edi
movl $0x1c, %esi
movl $0x2e, %edx
callq 0xa830
movq %rax, %rdi
leaq -0x270(%rbp), %rsi
movq -0x278(%rbp), %rdx
callq 0x14c10
testb $0x1, %al
jne 0x244aa
jmp 0x244ac
jmp 0x244cb
leaq 0x1b4c6(%rip), %rdi     # 0x3f979
leaq 0x1b136(%rip), %rsi     # 0x3f5f0
movl $0x6c, %edx
leaq 0x1b808(%rip), %rcx     # 0x3fcce
callq 0x20c0
movl $0x3, %edi
movl $0x1c, %esi
movl $0x37, %edx
callq 0xa830
movq %rax, %rdi
leaq -0x270(%rbp), %rsi
movq -0x278(%rbp), %rdx
callq 0x14c10
testb $0x1, %al
jne 0x244fb
jmp 0x244fd
jmp 0x2451c
leaq 0x1b4a5(%rip), %rdi     # 0x3f9a9
leaq 0x1b0e5(%rip), %rsi     # 0x3f5f0
movl $0x6d, %edx
leaq 0x1b7b7(%rip), %rcx     # 0x3fcce
callq 0x20c0
movl $0x3, %edi
movl $0x1c, %esi
movl $0x23, %edx
callq 0xa830
movq %rax, %rdi
leaq -0x270(%rbp), %rsi
movq -0x278(%rbp), %rdx
callq 0x14c10
testb $0x1, %al
jne 0x2454c
jmp 0x2454e
jmp 0x2456d
leaq 0x1b484(%rip), %rdi     # 0x3f9d9
leaq 0x1b094(%rip), %rsi     # 0x3f5f0
movl $0x6e, %edx
leaq 0x1b766(%rip), %rcx     # 0x3fcce
callq 0x20c0
movl $0x3, %edi
movl $0x1c, %esi
movl $0x2a, %edx
callq 0xa830
movq %rax, %rdi
leaq -0x270(%rbp), %rsi
movq -0x278(%rbp), %rdx
callq 0x14c10
testb $0x1, %al
jne 0x2459d
jmp 0x2459f
jmp 0x245be
leaq 0x1b463(%rip), %rdi     # 0x3fa09
leaq 0x1b043(%rip), %rsi     # 0x3f5f0
movl $0x6f, %edx
leaq 0x1b715(%rip), %rcx     # 0x3fcce
callq 0x20c0
movl $0x3, %edi
movl $0x1c, %esi
movl $0x31, %edx
callq 0xa830
movq %rax, %rdi
leaq -0x270(%rbp), %rsi
movq -0x278(%rbp), %rdx
callq 0x14c10
testb $0x1, %al
jne 0x245ee
jmp 0x245f0
jmp 0x2460f
leaq 0x1b442(%rip), %rdi     # 0x3fa39
leaq 0x1aff2(%rip), %rsi     # 0x3f5f0
movl $0x70, %edx
leaq 0x1b6c4(%rip), %rcx     # 0x3fcce
callq 0x20c0
movl $0x3, %edi
movl $0x1c, %esi
movl $0x38, %edx
callq 0xa830
movq %rax, %rdi
leaq -0x270(%rbp), %rsi
movq -0x278(%rbp), %rdx
callq 0x14c10
testb $0x1, %al
jne 0x2463f
jmp 0x24641
jmp 0x24660
leaq 0x1b421(%rip), %rdi     # 0x3fa69
leaq 0x1afa1(%rip), %rsi     # 0x3f5f0
movl $0x71, %edx
leaq 0x1b673(%rip), %rcx     # 0x3fcce
callq 0x20c0
movl $0x3, %edi
movl $0x1c, %esi
movl $0x13, %edx
callq 0xa830
movq %rax, %rdi
leaq -0x270(%rbp), %rsi
movq -0x278(%rbp), %rdx
callq 0x14c10
testb $0x1, %al
jne 0x24690
jmp 0x24692
jmp 0x246b1
leaq 0x1b400(%rip), %rdi     # 0x3fa99
leaq 0x1af50(%rip), %rsi     # 0x3f5f0
movl $0x72, %edx
leaq 0x1b622(%rip), %rcx     # 0x3fcce
callq 0x20c0
movl $0x3, %edi
movl $0x24, %esi
movl $0x1d, %edx
callq 0xa830
movq %rax, %rdi
leaq -0x270(%rbp), %rsi
movq -0x278(%rbp), %rdx
callq 0x14c10
testb $0x1, %al
jne 0x246e1
jmp 0x246e3
jmp 0x24702
leaq 0x1b417(%rip), %rdi     # 0x3fb01
leaq 0x1aeff(%rip), %rsi     # 0x3f5f0
movl $0x73, %edx
leaq 0x1b5d1(%rip), %rcx     # 0x3fcce
callq 0x20c0
movl $0x3, %edi
movl $0x24, %esi
movl $0x16, %edx
callq 0xa830
movq %rax, %rdi
leaq -0x270(%rbp), %rsi
movq -0x278(%rbp), %rdx
callq 0x14c10
testb $0x1, %al
jne 0x24732
jmp 0x24734
jmp 0x24753
leaq 0x1b3f6(%rip), %rdi     # 0x3fb31
leaq 0x1aeae(%rip), %rsi     # 0x3f5f0
movl $0x74, %edx
leaq 0x1b580(%rip), %rcx     # 0x3fcce
callq 0x20c0
movl $0x3, %edi
movl $0x24, %esi
movl $0xf, %edx
callq 0xa830
movq %rax, %rdi
leaq -0x270(%rbp), %rsi
movq -0x278(%rbp), %rdx
callq 0x14c10
testb $0x1, %al
jne 0x24783
jmp 0x24785
jmp 0x247a4
leaq 0x1b3d5(%rip), %rdi     # 0x3fb61
leaq 0x1ae5d(%rip), %rsi     # 0x3f5f0
movl $0x75, %edx
leaq 0x1b52f(%rip), %rcx     # 0x3fcce
callq 0x20c0
movl $0x3, %edi
movl $0x24, %esi
movl $0x1b, %edx
callq 0xa830
movq %rax, %rdi
leaq -0x270(%rbp), %rsi
movq -0x278(%rbp), %rdx
callq 0x14c10
testb $0x1, %al
jne 0x247d4
jmp 0x247d6
jmp 0x247f5
leaq 0x1b3ec(%rip), %rdi     # 0x3fbc9
leaq 0x1ae0c(%rip), %rsi     # 0x3f5f0
movl $0x76, %edx
leaq 0x1b4de(%rip), %rcx     # 0x3fcce
callq 0x20c0
movl $0x3, %edi
movl $0x24, %esi
movl $0x12, %edx
callq 0xa830
movq %rax, %rdi
leaq -0x270(%rbp), %rsi
movq -0x278(%rbp), %rdx
callq 0x14c10
testb $0x1, %al
jne 0x24825
jmp 0x24827
jmp 0x24846
leaq 0x1b3cb(%rip), %rdi     # 0x3fbf9
leaq 0x1adbb(%rip), %rsi     # 0x3f5f0
movl $0x77, %edx
leaq 0x1b48d(%rip), %rcx     # 0x3fcce
callq 0x20c0
movl $0x3, %edi
movl $0x24, %esi
movl $0x9, %edx
callq 0xa830
movq %rax, %rdi
leaq -0x270(%rbp), %rsi
movq -0x278(%rbp), %rdx
callq 0x14c10
testb $0x1, %al
jne 0x24876
jmp 0x24878
jmp 0x24897
leaq 0x1b3aa(%rip), %rdi     # 0x3fc29
leaq 0x1ad6a(%rip), %rsi     # 0x3f5f0
movl $0x78, %edx
leaq 0x1b43c(%rip), %rcx     # 0x3fcce
callq 0x20c0
movl $0x3, %edi
movl $0x24, %esi
xorl %edx, %edx
callq 0xa830
movq %rax, %rdi
leaq -0x270(%rbp), %rsi
movq -0x278(%rbp), %rdx
callq 0x14c10
testb $0x1, %al
jne 0x248c4
jmp 0x248c6
jmp 0x248e5
leaq 0x1b38c(%rip), %rdi     # 0x3fc59
leaq 0x1ad1c(%rip), %rsi     # 0x3f5f0
movl $0x79, %edx
leaq 0x1b3ee(%rip), %rcx     # 0x3fcce
callq 0x20c0
addq $0x280, %rsp            # imm = 0x280
popq %rbp
retq
nop