// File: /workspace/github_cpp_makefile_star2_O3/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 0x10c4f(%rip), %rsi     # 0x2ee2b
leaq 0x1b0(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x78e0
movq %rax, %rbx
movl $0x1, %edi
movl $0xc, %esi
movl $0x4, %edx
callq 0x775c
leaq 0x18(%rsp), %r12
movq %rax, (%r12)
movq %r12, %rdi
movl $0x5, %esi
callq 0x7824
movl $0x1, %edi
movl $0xc, %esi
movl $0x4, %edx
callq 0x775c
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
movl $0x4, %esi
callq 0x7824
movl $0x1, %edi
movl $0xc, %esi
movl $0x4, %edx
callq 0x775c
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
movl $0x3, %esi
callq 0x7824
movl $0x1, %edi
movl $0xc, %esi
movl $0x4, %edx
callq 0x775c
movq %rsp, %rdi
movq %rax, (%rdi)
movl $0x2, %esi
callq 0x7824
movl $0x3, %edi
movl $0x32, %esi
movl $0x16, %edx
movl $0x1, %ecx
callq 0x777b
movq %rax, %r14
movq (%r12), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1e3e7
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1e406
movq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1e425
movq (%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1e444
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x1e463
leaq 0x1b0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0x1dfe0
cmpq 0x18(%rsp), %rax
jne 0x1e482
leaq 0x1b0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0x1dfe0
cmpq 0x10(%rsp), %rax
jne 0x1e4a1
leaq 0x1b0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0x1dfe0
cmpq 0x8(%rsp), %rax
jne 0x1e4c0
leaq 0x1b0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0x1dfe0
cmpq (%rsp), %rax
jne 0x1e4df
leaq 0x1b0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0x1dfe0
cmpq %r14, %rax
jne 0x1e4fe
addq $0x378, %rsp            # imm = 0x378
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1604b(%rip), %rdi     # 0x34439
leaq 0x15fc9(%rip), %rsi     # 0x343be
leaq 0x1605f(%rip), %rcx     # 0x3445b
movl $0x49, %edx
callq 0x20d0
leaq 0x16062(%rip), %rdi     # 0x3446f
leaq 0x15faa(%rip), %rsi     # 0x343be
leaq 0x16040(%rip), %rcx     # 0x3445b
movl $0x4a, %edx
callq 0x20d0
leaq 0x16065(%rip), %rdi     # 0x34491
leaq 0x15f8b(%rip), %rsi     # 0x343be
leaq 0x16021(%rip), %rcx     # 0x3445b
movl $0x4b, %edx
callq 0x20d0
leaq 0x16068(%rip), %rdi     # 0x344b3
leaq 0x15f6c(%rip), %rsi     # 0x343be
leaq 0x16002(%rip), %rcx     # 0x3445b
movl $0x4c, %edx
callq 0x20d0
leaq 0x1606b(%rip), %rdi     # 0x344d5
leaq 0x15f4d(%rip), %rsi     # 0x343be
leaq 0x15fe3(%rip), %rcx     # 0x3445b
movl $0x4d, %edx
callq 0x20d0
leaq 0x1606d(%rip), %rdi     # 0x344f6
leaq 0x15f2e(%rip), %rsi     # 0x343be
leaq 0x15fc4(%rip), %rcx     # 0x3445b
movl $0x4f, %edx
callq 0x20d0
leaq 0x1607a(%rip), %rdi     # 0x34522
leaq 0x15f0f(%rip), %rsi     # 0x343be
leaq 0x15fa5(%rip), %rcx     # 0x3445b
movl $0x50, %edx
callq 0x20d0
leaq 0x16087(%rip), %rdi     # 0x3454e
leaq 0x15ef0(%rip), %rsi     # 0x343be
leaq 0x15f86(%rip), %rcx     # 0x3445b
movl $0x51, %edx
callq 0x20d0
leaq 0x16094(%rip), %rdi     # 0x3457a
leaq 0x15ed1(%rip), %rsi     # 0x343be
leaq 0x15f67(%rip), %rcx     # 0x3445b
movl $0x52, %edx
callq 0x20d0
leaq 0x160a1(%rip), %rdi     # 0x345a6
leaq 0x15eb2(%rip), %rsi     # 0x343be
leaq 0x15f48(%rip), %rcx     # 0x3445b
movl $0x53, %edx
callq 0x20d0