// File: /workspace/github_cpp_makefile_star2_O1/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 0xaa43
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
movl $0x3f, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x8780
cmpq %r14, %rax
jne 0x1b4c3
leaq 0x180f6(%rip), %rsi     # 0x333fc
leaq 0xa0(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %r14, %rdi
movq %rbx, %rsi
movl $0x35, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x8780
movq %rax, %rbx
subq %r14, %rax
cmpq $0x48, %rax
jne 0x1b4e2
movl $0x4, %edi
movl $0x35, %esi
movl $0x2d, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1b501
movl $0x4, %edi
movl $0x35, %esi
movl $0x25, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1b520
movl $0x4, %edi
movl $0x35, %esi
movl $0x1d, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1b53f
movl $0x4, %edi
movl $0x35, %esi
movl $0x3d, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1b55e
movl $0x4, %edi
movl $0x35, %esi
movl $0x36, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1b57d
movl $0x4, %edi
movl $0x35, %esi
movl $0x37, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1b59c
movl $0x4, %edi
movl $0x35, %esi
movl $0x34, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1b5bb
movl $0x4, %edi
movl $0x35, %esi
movl $0x33, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1b5da
movl $0x4, %edi
movl $0x35, %esi
movl $0x32, %edx
callq 0x76b8
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1b5f9
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r14
retq
leaq 0x17f05(%rip), %rdi     # 0x333cf
leaq 0x177fd(%rip), %rsi     # 0x32cce
leaq 0x1815f(%rip), %rcx     # 0x33637
movl $0xab, %edx
callq 0x20d0
leaq 0x1816f(%rip), %rdi     # 0x33658
leaq 0x177de(%rip), %rsi     # 0x32cce
leaq 0x18140(%rip), %rcx     # 0x33637
movl $0xb0, %edx
callq 0x20d0
leaq 0x17f2b(%rip), %rdi     # 0x33433
leaq 0x177bf(%rip), %rsi     # 0x32cce
leaq 0x18121(%rip), %rcx     # 0x33637
movl $0xb2, %edx
callq 0x20d0
leaq 0x17f3a(%rip), %rdi     # 0x33461
leaq 0x177a0(%rip), %rsi     # 0x32cce
leaq 0x18102(%rip), %rcx     # 0x33637
movl $0xb3, %edx
callq 0x20d0
leaq 0x17f49(%rip), %rdi     # 0x3348f
leaq 0x17781(%rip), %rsi     # 0x32cce
leaq 0x180e3(%rip), %rcx     # 0x33637
movl $0xb4, %edx
callq 0x20d0
leaq 0x17f58(%rip), %rdi     # 0x334bd
leaq 0x17762(%rip), %rsi     # 0x32cce
leaq 0x180c4(%rip), %rcx     # 0x33637
movl $0xb5, %edx
callq 0x20d0
leaq 0x17f67(%rip), %rdi     # 0x334eb
leaq 0x17743(%rip), %rsi     # 0x32cce
leaq 0x180a5(%rip), %rcx     # 0x33637
movl $0xb6, %edx
callq 0x20d0
leaq 0x17f76(%rip), %rdi     # 0x33519
leaq 0x17724(%rip), %rsi     # 0x32cce
leaq 0x18086(%rip), %rcx     # 0x33637
movl $0xb7, %edx
callq 0x20d0
leaq 0x17f85(%rip), %rdi     # 0x33547
leaq 0x17705(%rip), %rsi     # 0x32cce
leaq 0x18067(%rip), %rcx     # 0x33637
movl $0xb8, %edx
callq 0x20d0
leaq 0x17f94(%rip), %rdi     # 0x33575
leaq 0x176e6(%rip), %rsi     # 0x32cce
leaq 0x18048(%rip), %rcx     # 0x33637
movl $0xb9, %edx
callq 0x20d0
leaq 0x17fa3(%rip), %rdi     # 0x335a3
leaq 0x176c7(%rip), %rsi     # 0x32cce
leaq 0x18029(%rip), %rcx     # 0x33637
movl $0xba, %edx
callq 0x20d0