// File: /workspace/github_cpp_makefile_star2_O2/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 0xa187
movq %rsp, %r14
pushq $0x3f
popq %rdx
pushq $0x1
popq %r8
movq %r14, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x819f
cmpq %r14, %rax
jne 0x199e8
leaq 0x17cda(%rip), %rsi     # 0x3153f
leaq 0xa0(%rsp), %rbx
movq %rbx, %rdi
callq 0xa1b8
pushq $0x35
popq %rdx
pushq $0x1
popq %r8
movq %r14, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x819f
movq %rax, %rbx
subq %r14, %rax
cmpq $0x48, %rax
jne 0x19a07
pushq $0x4
popq %rdi
pushq $0x35
popq %rsi
pushq $0x2d
popq %rdx
callq 0x7284
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xdacb
testb %al, %al
je 0x19a26
pushq $0x4
popq %rdi
pushq $0x35
popq %rsi
pushq $0x25
popq %rdx
callq 0x7284
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xdacb
testb %al, %al
je 0x19a45
pushq $0x4
popq %rdi
pushq $0x35
popq %rsi
pushq $0x1d
popq %rdx
callq 0x7284
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xdacb
testb %al, %al
je 0x19a64
pushq $0x4
popq %rdi
pushq $0x35
popq %rsi
pushq $0x3d
popq %rdx
callq 0x7284
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xdacb
testb %al, %al
je 0x19a83
pushq $0x4
popq %rdi
pushq $0x35
popq %rsi
pushq $0x36
popq %rdx
callq 0x7284
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xdacb
testb %al, %al
je 0x19aa2
pushq $0x4
popq %rdi
pushq $0x35
popq %rsi
pushq $0x37
popq %rdx
callq 0x7284
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xdacb
testb %al, %al
je 0x19ac1
pushq $0x4
popq %rdi
pushq $0x35
popq %rsi
pushq $0x34
popq %rdx
callq 0x7284
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xdacb
testb %al, %al
je 0x19ae0
pushq $0x4
popq %rdi
pushq $0x35
popq %rsi
pushq $0x33
popq %rdx
callq 0x7284
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xdacb
testb %al, %al
je 0x19aff
pushq $0x4
popq %rdi
pushq $0x35
popq %rsi
pushq $0x32
popq %rdx
callq 0x7284
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xdacb
testb %al, %al
je 0x19b1e
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r14
retq
leaq 0x17b23(%rip), %rdi     # 0x31512
leaq 0x1741b(%rip), %rsi     # 0x30e11
leaq 0x17d7d(%rip), %rcx     # 0x3177a
movl $0xab, %edx
callq 0x20c0
leaq 0x17d8d(%rip), %rdi     # 0x3179b
leaq 0x173fc(%rip), %rsi     # 0x30e11
leaq 0x17d5e(%rip), %rcx     # 0x3177a
movl $0xb0, %edx
callq 0x20c0
leaq 0x17b49(%rip), %rdi     # 0x31576
leaq 0x173dd(%rip), %rsi     # 0x30e11
leaq 0x17d3f(%rip), %rcx     # 0x3177a
movl $0xb2, %edx
callq 0x20c0
leaq 0x17b58(%rip), %rdi     # 0x315a4
leaq 0x173be(%rip), %rsi     # 0x30e11
leaq 0x17d20(%rip), %rcx     # 0x3177a
movl $0xb3, %edx
callq 0x20c0
leaq 0x17b67(%rip), %rdi     # 0x315d2
leaq 0x1739f(%rip), %rsi     # 0x30e11
leaq 0x17d01(%rip), %rcx     # 0x3177a
movl $0xb4, %edx
callq 0x20c0
leaq 0x17b76(%rip), %rdi     # 0x31600
leaq 0x17380(%rip), %rsi     # 0x30e11
leaq 0x17ce2(%rip), %rcx     # 0x3177a
movl $0xb5, %edx
callq 0x20c0
leaq 0x17b85(%rip), %rdi     # 0x3162e
leaq 0x17361(%rip), %rsi     # 0x30e11
leaq 0x17cc3(%rip), %rcx     # 0x3177a
movl $0xb6, %edx
callq 0x20c0
leaq 0x17b94(%rip), %rdi     # 0x3165c
leaq 0x17342(%rip), %rsi     # 0x30e11
leaq 0x17ca4(%rip), %rcx     # 0x3177a
movl $0xb7, %edx
callq 0x20c0
leaq 0x17ba3(%rip), %rdi     # 0x3168a
leaq 0x17323(%rip), %rsi     # 0x30e11
leaq 0x17c85(%rip), %rcx     # 0x3177a
movl $0xb8, %edx
callq 0x20c0
leaq 0x17bb2(%rip), %rdi     # 0x316b8
leaq 0x17304(%rip), %rsi     # 0x30e11
leaq 0x17c66(%rip), %rcx     # 0x3177a
movl $0xb9, %edx
callq 0x20c0
leaq 0x17bc1(%rip), %rdi     # 0x316e6
leaq 0x172e5(%rip), %rsi     # 0x30e11
leaq 0x17c47(%rip), %rcx     # 0x3177a
movl $0xba, %edx
callq 0x20c0