// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/movegen__test.cpp
// Function: test_gen_rook_noncaptures()
void test_gen_rook_noncaptures() {
    position pos;
    reset_pos(&pos);

    move moves[20];
    move *mp = gen_rook_moves(moves,&pos,H1,false,true);
    assert((mp - moves) == 0);

    set_pos(&pos,"8/8/3k1p2/8/3K4/8/1R3r2/8 b - - 0 1");

    mp = gen_rook_moves(moves,&pos,F2,false,true);
    assert((mp - moves) == 9);

    assert(is_in_move_list(to_move(ROOK,F2,F3),moves,mp));
    assert(is_in_move_list(to_move(ROOK,F2,F4),moves,mp));
    assert(is_in_move_list(to_move(ROOK,F2,F5),moves,mp));
    assert(is_in_move_list(to_move(ROOK,F2,F1),moves,mp));
    assert(is_in_move_list(to_move(ROOK,F2,G2),moves,mp));
    assert(is_in_move_list(to_move(ROOK,F2,H2),moves,mp));
    assert(is_in_move_list(to_move(ROOK,F2,E2),moves,mp));
    assert(is_in_move_list(to_move(ROOK,F2,D2),moves,mp));
    assert(is_in_move_list(to_move(ROOK,F2,C2),moves,mp));
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
leaq 0xa0(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa51
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
movl $0x3f, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x8814
cmpq %r14, %rax
jne 0x1b34f
leaq 0x182ea(%rip), %rsi     # 0x3347c
leaq 0xa0(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %r14, %rdi
movq %rbx, %rsi
movl $0x35, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x8814
movq %rax, %rbx
subq %r14, %rax
cmpq $0x48, %rax
jne 0x1b36e
movl $0x4, %edi
movl $0x35, %esi
movl $0x2d, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1b38d
movl $0x4, %edi
movl $0x35, %esi
movl $0x25, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1b3ac
movl $0x4, %edi
movl $0x35, %esi
movl $0x1d, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1b3cb
movl $0x4, %edi
movl $0x35, %esi
movl $0x3d, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1b3ea
movl $0x4, %edi
movl $0x35, %esi
movl $0x36, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1b409
movl $0x4, %edi
movl $0x35, %esi
movl $0x37, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1b428
movl $0x4, %edi
movl $0x35, %esi
movl $0x34, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1b447
movl $0x4, %edi
movl $0x35, %esi
movl $0x33, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1b466
movl $0x4, %edi
movl $0x35, %esi
movl $0x32, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1b485
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r14
retq
leaq 0x180f9(%rip), %rdi     # 0x3344f
leaq 0x179f1(%rip), %rsi     # 0x32d4e
leaq 0x18353(%rip), %rcx     # 0x336b7
movl $0xab, %edx
callq 0x20d0
leaq 0x18363(%rip), %rdi     # 0x336d8
leaq 0x179d2(%rip), %rsi     # 0x32d4e
leaq 0x18334(%rip), %rcx     # 0x336b7
movl $0xb0, %edx
callq 0x20d0
leaq 0x1811f(%rip), %rdi     # 0x334b3
leaq 0x179b3(%rip), %rsi     # 0x32d4e
leaq 0x18315(%rip), %rcx     # 0x336b7
movl $0xb2, %edx
callq 0x20d0
leaq 0x1812e(%rip), %rdi     # 0x334e1
leaq 0x17994(%rip), %rsi     # 0x32d4e
leaq 0x182f6(%rip), %rcx     # 0x336b7
movl $0xb3, %edx
callq 0x20d0
leaq 0x1813d(%rip), %rdi     # 0x3350f
leaq 0x17975(%rip), %rsi     # 0x32d4e
leaq 0x182d7(%rip), %rcx     # 0x336b7
movl $0xb4, %edx
callq 0x20d0
leaq 0x1814c(%rip), %rdi     # 0x3353d
leaq 0x17956(%rip), %rsi     # 0x32d4e
leaq 0x182b8(%rip), %rcx     # 0x336b7
movl $0xb5, %edx
callq 0x20d0
leaq 0x1815b(%rip), %rdi     # 0x3356b
leaq 0x17937(%rip), %rsi     # 0x32d4e
leaq 0x18299(%rip), %rcx     # 0x336b7
movl $0xb6, %edx
callq 0x20d0
leaq 0x1816a(%rip), %rdi     # 0x33599
leaq 0x17918(%rip), %rsi     # 0x32d4e
leaq 0x1827a(%rip), %rcx     # 0x336b7
movl $0xb7, %edx
callq 0x20d0
leaq 0x18179(%rip), %rdi     # 0x335c7
leaq 0x178f9(%rip), %rsi     # 0x32d4e
leaq 0x1825b(%rip), %rcx     # 0x336b7
movl $0xb8, %edx
callq 0x20d0
leaq 0x18188(%rip), %rdi     # 0x335f5
leaq 0x178da(%rip), %rsi     # 0x32d4e
leaq 0x1823c(%rip), %rcx     # 0x336b7
movl $0xb9, %edx
callq 0x20d0
leaq 0x18197(%rip), %rdi     # 0x33623
leaq 0x178bb(%rip), %rsi     # 0x32d4e
leaq 0x1821d(%rip), %rcx     # 0x336b7
movl $0xba, %edx
callq 0x20d0