// File: jswaff[P]prophet3/test/movegen__test.cpp
// Function: test_gen_knight_noncaptures()
void test_gen_knight_noncaptures() {
    position pos;
    set_pos(&pos,"4k3/8/3P1p2/8/4N3/8/8/4K3 w - - 0 1");

    move moves[10];
    move *mp = gen_knight_moves(moves,&pos,E4,false,true);

    assert((mp-moves)==6);
    assert(is_in_move_list(to_move(KNIGHT,E4,G5),moves,mp));
    assert(is_in_move_list(to_move(KNIGHT,E4,G3),moves,mp));
    assert(is_in_move_list(to_move(KNIGHT,E4,F2),moves,mp));
    assert(is_in_move_list(to_move(KNIGHT,E4,D2),moves,mp));
    assert(is_in_move_list(to_move(KNIGHT,E4,C3),moves,mp));
    assert(is_in_move_list(to_move(KNIGHT,E4,C5),moves,mp));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
leaq -0x1c8(%rbp), %rdi
leaq 0x1bddb(%rip), %rsi     # 0x3f6e4
callq 0xf3e0
leaq -0x220(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
movl $0x24, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0xbf00
movq %rax, -0x228(%rbp)
movq -0x228(%rbp), %rax
leaq -0x220(%rbp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
cmpq $0x6, %rax
jne 0x23952
jmp 0x23971
leaq 0x1be15(%rip), %rdi     # 0x3f76e
leaq 0x1bc90(%rip), %rsi     # 0x3f5f0
movl $0x2e, %edx
leaq 0x1be10(%rip), %rcx     # 0x3f77c
callq 0x20c0
movl $0x2, %edi
movl $0x24, %esi
movl $0x1e, %edx
callq 0xa830
movq %rax, %rdi
leaq -0x220(%rbp), %rsi
movq -0x228(%rbp), %rdx
callq 0x14c10
testb $0x1, %al
jne 0x239a1
jmp 0x239a3
jmp 0x239c2
leaq 0x1bdf5(%rip), %rdi     # 0x3f79f
leaq 0x1bc3f(%rip), %rsi     # 0x3f5f0
movl $0x2f, %edx
leaq 0x1bdbf(%rip), %rcx     # 0x3f77c
callq 0x20c0
movl $0x2, %edi
movl $0x24, %esi
movl $0x2e, %edx
callq 0xa830
movq %rax, %rdi
leaq -0x220(%rbp), %rsi
movq -0x228(%rbp), %rdx
callq 0x14c10
testb $0x1, %al
jne 0x239f2
jmp 0x239f4
jmp 0x23a13
leaq 0x1bdd4(%rip), %rdi     # 0x3f7cf
leaq 0x1bbee(%rip), %rsi     # 0x3f5f0
movl $0x30, %edx
leaq 0x1bd6e(%rip), %rcx     # 0x3f77c
callq 0x20c0
movl $0x2, %edi
movl $0x24, %esi
movl $0x35, %edx
callq 0xa830
movq %rax, %rdi
leaq -0x220(%rbp), %rsi
movq -0x228(%rbp), %rdx
callq 0x14c10
testb $0x1, %al
jne 0x23a43
jmp 0x23a45
jmp 0x23a64
leaq 0x1bdb3(%rip), %rdi     # 0x3f7ff
leaq 0x1bb9d(%rip), %rsi     # 0x3f5f0
movl $0x31, %edx
leaq 0x1bd1d(%rip), %rcx     # 0x3f77c
callq 0x20c0
movl $0x2, %edi
movl $0x24, %esi
movl $0x33, %edx
callq 0xa830
movq %rax, %rdi
leaq -0x220(%rbp), %rsi
movq -0x228(%rbp), %rdx
callq 0x14c10
testb $0x1, %al
jne 0x23a94
jmp 0x23a96
jmp 0x23ab5
leaq 0x1bd92(%rip), %rdi     # 0x3f82f
leaq 0x1bb4c(%rip), %rsi     # 0x3f5f0
movl $0x32, %edx
leaq 0x1bccc(%rip), %rcx     # 0x3f77c
callq 0x20c0
movl $0x2, %edi
movl $0x24, %esi
movl $0x2a, %edx
callq 0xa830
movq %rax, %rdi
leaq -0x220(%rbp), %rsi
movq -0x228(%rbp), %rdx
callq 0x14c10
testb $0x1, %al
jne 0x23ae5
jmp 0x23ae7
jmp 0x23b06
leaq 0x1bd71(%rip), %rdi     # 0x3f85f
leaq 0x1bafb(%rip), %rsi     # 0x3f5f0
movl $0x33, %edx
leaq 0x1bc7b(%rip), %rcx     # 0x3f77c
callq 0x20c0
movl $0x2, %edi
movl $0x24, %esi
movl $0x1a, %edx
callq 0xa830
movq %rax, %rdi
leaq -0x220(%rbp), %rsi
movq -0x228(%rbp), %rdx
callq 0x14c10
testb $0x1, %al
jne 0x23b36
jmp 0x23b38
jmp 0x23b57
leaq 0x1bd50(%rip), %rdi     # 0x3f88f
leaq 0x1baaa(%rip), %rsi     # 0x3f5f0
movl $0x34, %edx
leaq 0x1bc2a(%rip), %rcx     # 0x3f77c
callq 0x20c0
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq