// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x378, %rsp            # imm = 0x378
leaq 0x10a5b(%rip), %rsi     # 0x2edab
leaq 0x1b0(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x7840
movq %rax, %rbx
movl $0x1, %edi
movl $0xc, %esi
movl $0x4, %edx
callq 0x76b8
leaq 0x18(%rsp), %r12
movq %rax, (%r12)
movq %r12, %rdi
movl $0x5, %esi
callq 0x7780
movl $0x1, %edi
movl $0xc, %esi
movl $0x4, %edx
callq 0x76b8
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
movl $0x4, %esi
callq 0x7780
movl $0x1, %edi
movl $0xc, %esi
movl $0x4, %edx
callq 0x76b8
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
movl $0x3, %esi
callq 0x7780
movl $0x1, %edi
movl $0xc, %esi
movl $0x4, %edx
callq 0x76b8
movq %rsp, %rdi
movq %rax, (%rdi)
movl $0x2, %esi
callq 0x7780
movl $0x3, %edi
movl $0x32, %esi
movl $0x16, %edx
movl $0x1, %ecx
callq 0x76d7
movq %rax, %r14
movq (%r12), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1e55b
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1e57a
movq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1e599
movq (%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1e5b8
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1e5d7
leaq 0x1b0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0x1e154
cmpq 0x18(%rsp), %rax
jne 0x1e5f6
leaq 0x1b0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0x1e154
cmpq 0x10(%rsp), %rax
jne 0x1e615
leaq 0x1b0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0x1e154
cmpq 0x8(%rsp), %rax
jne 0x1e634
leaq 0x1b0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0x1e154
cmpq (%rsp), %rax
jne 0x1e653
leaq 0x1b0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0x1e154
cmpq %r14, %rax
jne 0x1e672
addq $0x378, %rsp            # imm = 0x378
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x15e57(%rip), %rdi     # 0x343b9
leaq 0x15dd5(%rip), %rsi     # 0x3433e
leaq 0x15e6b(%rip), %rcx     # 0x343db
movl $0x49, %edx
callq 0x20d0
leaq 0x15e6e(%rip), %rdi     # 0x343ef
leaq 0x15db6(%rip), %rsi     # 0x3433e
leaq 0x15e4c(%rip), %rcx     # 0x343db
movl $0x4a, %edx
callq 0x20d0
leaq 0x15e71(%rip), %rdi     # 0x34411
leaq 0x15d97(%rip), %rsi     # 0x3433e
leaq 0x15e2d(%rip), %rcx     # 0x343db
movl $0x4b, %edx
callq 0x20d0
leaq 0x15e74(%rip), %rdi     # 0x34433
leaq 0x15d78(%rip), %rsi     # 0x3433e
leaq 0x15e0e(%rip), %rcx     # 0x343db
movl $0x4c, %edx
callq 0x20d0
leaq 0x15e77(%rip), %rdi     # 0x34455
leaq 0x15d59(%rip), %rsi     # 0x3433e
leaq 0x15def(%rip), %rcx     # 0x343db
movl $0x4d, %edx
callq 0x20d0
leaq 0x15e79(%rip), %rdi     # 0x34476
leaq 0x15d3a(%rip), %rsi     # 0x3433e
leaq 0x15dd0(%rip), %rcx     # 0x343db
movl $0x4f, %edx
callq 0x20d0
leaq 0x15e86(%rip), %rdi     # 0x344a2
leaq 0x15d1b(%rip), %rsi     # 0x3433e
leaq 0x15db1(%rip), %rcx     # 0x343db
movl $0x50, %edx
callq 0x20d0
leaq 0x15e93(%rip), %rdi     # 0x344ce
leaq 0x15cfc(%rip), %rsi     # 0x3433e
leaq 0x15d92(%rip), %rcx     # 0x343db
movl $0x51, %edx
callq 0x20d0
leaq 0x15ea0(%rip), %rdi     # 0x344fa
leaq 0x15cdd(%rip), %rsi     # 0x3433e
leaq 0x15d73(%rip), %rcx     # 0x343db
movl $0x52, %edx
callq 0x20d0
leaq 0x15ead(%rip), %rdi     # 0x34526
leaq 0x15cbe(%rip), %rsi     # 0x3433e
leaq 0x15d54(%rip), %rcx     # 0x343db
movl $0x53, %edx
callq 0x20d0