// File: /workspace/github_cpp_makefile_star2_O2/jswaff[P]prophet3/test/mvvlva__test.cpp
// Function: test_mvvlva2()
void test_mvvlva2() {
    position pos;
    set_pos(&pos,"8/4Pk1p/6p1/1r6/8/5N2/2B2PPP/b5K1 w - - ");

    move moves[50],*endp;
    endp = gen_legal_moves(moves,&pos,true,true); // 24 moves

    move e7e8q = to_move(PAWN,E7,E8);
    set_promopiece(&e7e8q,QUEEN);

    move e7e8r = to_move(PAWN,E7,E8);
    set_promopiece(&e7e8r,ROOK);

    move e7e8b = to_move(PAWN,E7,E8);
    set_promopiece(&e7e8b,BISHOP);

    move e7e8n = to_move(PAWN,E7,E8);
    set_promopiece(&e7e8n,KNIGHT);

    move c2g6 = to_capture(BISHOP,C2,G6,PAWN);

    assert(is_in_move_list(e7e8q,moves,endp));
    assert(is_in_move_list(e7e8r,moves,endp));
    assert(is_in_move_list(e7e8b,moves,endp));
    assert(is_in_move_list(e7e8n,moves,endp));
    assert(is_in_move_list(c2g6,moves,endp));

    assert(get_highest_scoring(&pos,moves,endp)==e7e8q);
    assert(get_highest_scoring(&pos,moves,endp)==e7e8r);
    assert(get_highest_scoring(&pos,moves,endp)==e7e8b);
    assert(get_highest_scoring(&pos,moves,endp)==e7e8n);
    assert(get_highest_scoring(&pos,moves,endp)==c2g6);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x378, %rsp            # imm = 0x378
leaq 0x1085f(%rip), %rsi     # 0x2cddb
leaq 0x1b0(%rsp), %rbx
movq %rbx, %rdi
callq 0xa1b8
leaq 0x20(%rsp), %rdi
pushq $0x1
popq %rbp
movq %rbx, %rsi
movl %ebp, %edx
movl %ebp, %ecx
callq 0x73f8
movq %rax, %rbx
pushq $0xc
popq %r14
pushq $0x4
popq %r13
movl %ebp, %edi
movl %r14d, %esi
movl %r13d, %edx
callq 0x7284
leaq 0x18(%rsp), %r12
movq %rax, (%r12)
pushq $0x5
popq %rsi
movq %r12, %rdi
callq 0x733b
movl %ebp, %edi
movl %r14d, %esi
movl %r13d, %edx
callq 0x7284
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
movl %r13d, %esi
callq 0x733b
movl %ebp, %edi
movl %r14d, %esi
movl %r13d, %edx
callq 0x7284
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
pushq $0x3
popq %r15
movl %r15d, %esi
callq 0x733b
movl %ebp, %edi
movl %r14d, %esi
movl %r13d, %edx
callq 0x7284
movq %rsp, %rdi
movq %rax, (%rdi)
pushq $0x2
popq %rsi
callq 0x733b
pushq $0x32
popq %rsi
pushq $0x16
popq %rdx
movl %r15d, %edi
movl %ebp, %ecx
callq 0x72a3
movq %rax, %r14
movq (%r12), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0xdacb
testb %al, %al
je 0x1c765
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0xdacb
testb %al, %al
je 0x1c781
movq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0xdacb
testb %al, %al
je 0x1c79d
movq (%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0xdacb
testb %al, %al
je 0x1c7b9
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0xdacb
testb %al, %al
je 0x1c7d5
leaq 0x1b0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0x1c3a4
cmpq 0x18(%rsp), %rax
jne 0x1c7ee
leaq 0x1b0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0x1c3a4
cmpq 0x10(%rsp), %rax
jne 0x1c807
leaq 0x1b0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0x1c3a4
cmpq 0x8(%rsp), %rax
jne 0x1c820
leaq 0x1b0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0x1c3a4
cmpq (%rsp), %rax
jne 0x1c839
leaq 0x1b0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0x1c3a4
cmpq %r14, %rax
jne 0x1c852
addq $0x378, %rsp            # imm = 0x378
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x15d90(%rip), %rdi     # 0x324fc
leaq 0x15d0e(%rip), %rsi     # 0x32481
leaq 0x15da4(%rip), %rcx     # 0x3251e
pushq $0x49
jmp 0x1c869
leaq 0x15daa(%rip), %rdi     # 0x32532
leaq 0x15cf2(%rip), %rsi     # 0x32481
leaq 0x15d88(%rip), %rcx     # 0x3251e
pushq $0x4a
jmp 0x1c869
leaq 0x15db0(%rip), %rdi     # 0x32554
leaq 0x15cd6(%rip), %rsi     # 0x32481
leaq 0x15d6c(%rip), %rcx     # 0x3251e
pushq $0x4b
jmp 0x1c869
leaq 0x15db6(%rip), %rdi     # 0x32576
leaq 0x15cba(%rip), %rsi     # 0x32481
leaq 0x15d50(%rip), %rcx     # 0x3251e
pushq $0x4c
jmp 0x1c869
leaq 0x15dbc(%rip), %rdi     # 0x32598
leaq 0x15c9e(%rip), %rsi     # 0x32481
leaq 0x15d34(%rip), %rcx     # 0x3251e
pushq $0x4d
jmp 0x1c869
leaq 0x15dc4(%rip), %rdi     # 0x325b9
leaq 0x15c85(%rip), %rsi     # 0x32481
leaq 0x15d1b(%rip), %rcx     # 0x3251e
pushq $0x4f
jmp 0x1c869
leaq 0x15dd7(%rip), %rdi     # 0x325e5
leaq 0x15c6c(%rip), %rsi     # 0x32481
leaq 0x15d02(%rip), %rcx     # 0x3251e
pushq $0x50
jmp 0x1c869
leaq 0x15dea(%rip), %rdi     # 0x32611
leaq 0x15c53(%rip), %rsi     # 0x32481
leaq 0x15ce9(%rip), %rcx     # 0x3251e
pushq $0x51
jmp 0x1c869
leaq 0x15dfd(%rip), %rdi     # 0x3263d
leaq 0x15c3a(%rip), %rsi     # 0x32481
leaq 0x15cd0(%rip), %rcx     # 0x3251e
pushq $0x52
jmp 0x1c869
leaq 0x15e10(%rip), %rdi     # 0x32669
leaq 0x15c21(%rip), %rsi     # 0x32481
leaq 0x15cb7(%rip), %rcx     # 0x3251e
pushq $0x53
popq %rdx
callq 0x20c0