// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/test/mvvlva__test.cpp
// Function: test_mvvlva3()
void test_mvvlva3() {
    position pos;
    set_pos(&pos,"6r1/pp1b1P1p/5Q2/3p3k/5K2/8/2P3P1/8 w - - ");

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

    move f7f8q = to_move(PAWN,F7,F8);
    set_promopiece(&f7f8q,QUEEN);

    move f7f8r = to_move(PAWN,F7,F8);
    set_promopiece(&f7f8r,ROOK);

    move f7f8b = to_move(PAWN,F7,F8);
    set_promopiece(&f7f8b,BISHOP);

    move f7f8n = to_move(PAWN,F7,F8);
    set_promopiece(&f7f8n,KNIGHT);

    move f7g8q = to_capture(PAWN,F7,G8,ROOK);
    set_promopiece(&f7g8q,QUEEN);

    move f7g8r = to_capture(PAWN,F7,G8,ROOK);
    set_promopiece(&f7g8r,ROOK);

    move f7g8b = to_capture(PAWN,F7,G8,ROOK);
    set_promopiece(&f7g8b,BISHOP);

    move f7g8n = to_capture(PAWN,F7,G8,ROOK);
    set_promopiece(&f7g8n,KNIGHT);

    assert(is_in_move_list(f7f8q,moves,endp));
    assert(is_in_move_list(f7f8r,moves,endp));
    assert(is_in_move_list(f7f8b,moves,endp));
    assert(is_in_move_list(f7f8n,moves,endp));
    assert(is_in_move_list(f7g8q,moves,endp));
    assert(is_in_move_list(f7g8r,moves,endp));
    assert(is_in_move_list(f7g8b,moves,endp));
    assert(is_in_move_list(f7g8n,moves,endp));

    assert(get_highest_scoring(&pos,moves,endp)==f7g8q);
    assert(get_highest_scoring(&pos,moves,endp)==f7g8r);
    assert(get_highest_scoring(&pos,moves,endp)==f7g8b);
    assert(get_highest_scoring(&pos,moves,endp)==f7g8n);
    assert(get_highest_scoring(&pos,moves,endp)==f7f8q);
    assert(get_highest_scoring(&pos,moves,endp)==f7f8r);
    assert(get_highest_scoring(&pos,moves,endp)==f7f8b);
    assert(get_highest_scoring(&pos,moves,endp)==f7f8n);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x3a0, %rsp            # imm = 0x3A0
leaq 0x15ead(%rip), %rsi     # 0x34551
leaq 0x1d8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x7840
movq %rax, %rbx
movl $0x1, %edi
movl $0xd, %esi
movl $0x5, %edx
callq 0x76b8
leaq 0x38(%rsp), %r15
movq %rax, (%r15)
movq %r15, %rdi
movl $0x5, %esi
callq 0x7780
movl $0x1, %edi
movl $0xd, %esi
movl $0x5, %edx
callq 0x76b8
leaq 0x30(%rsp), %rdi
movq %rax, (%rdi)
movl $0x4, %esi
callq 0x7780
movl $0x1, %edi
movl $0xd, %esi
movl $0x5, %edx
callq 0x76b8
leaq 0x28(%rsp), %rdi
movq %rax, (%rdi)
movl $0x3, %esi
callq 0x7780
movl $0x1, %edi
movl $0xd, %esi
movl $0x5, %edx
callq 0x76b8
leaq 0x20(%rsp), %rdi
movq %rax, (%rdi)
movl $0x2, %esi
callq 0x7780
movl $0x1, %edi
movl $0xd, %esi
movl $0x6, %edx
movl $0x4, %ecx
callq 0x76d7
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
movl $0x5, %esi
callq 0x7780
movl $0x1, %edi
movl $0xd, %esi
movl $0x6, %edx
movl $0x4, %ecx
callq 0x76d7
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
movl $0x4, %esi
callq 0x7780
movl $0x1, %edi
movl $0xd, %esi
movl $0x6, %edx
movl $0x4, %ecx
callq 0x76d7
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
movl $0x3, %esi
callq 0x7780
movl $0x1, %edi
movl $0xd, %esi
movl $0x6, %edx
movl $0x4, %ecx
callq 0x76d7
movq %rsp, %rdi
movq %rax, (%rdi)
movl $0x2, %esi
callq 0x7780
movq (%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1e9ed
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1ea0c
movq 0x28(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1ea2b
movq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1ea4a
movq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1ea69
movq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1ea88
movq 0x8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1eaa7
movq (%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1eac6
leaq 0x1d8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0x1e154
cmpq 0x18(%rsp), %rax
jne 0x1eae5
leaq 0x1d8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0x1e154
cmpq 0x10(%rsp), %rax
jne 0x1eb04
leaq 0x1d8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0x1e154
cmpq 0x8(%rsp), %rax
jne 0x1eb23
leaq 0x1d8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0x1e154
cmpq (%rsp), %rax
jne 0x1eb42
leaq 0x1d8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0x1e154
cmpq 0x38(%rsp), %rax
jne 0x1eb61
leaq 0x1d8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0x1e154
cmpq 0x30(%rsp), %rax
jne 0x1eb80
leaq 0x1d8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0x1e154
cmpq 0x28(%rsp), %rax
jne 0x1eb9f
leaq 0x1d8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0x1e154
cmpq 0x20(%rsp), %rax
jne 0x1ebbe
addq $0x3a0, %rsp            # imm = 0x3A0
popq %rbx
popq %r14
popq %r15
retq
leaq 0x15b88(%rip), %rdi     # 0x3457c
leaq 0x15943(%rip), %rsi     # 0x3433e
leaq 0x15b9c(%rip), %rcx     # 0x3459e
movl $0x75, %edx
callq 0x20d0
leaq 0x15b9f(%rip), %rdi     # 0x345b2
leaq 0x15924(%rip), %rsi     # 0x3433e
leaq 0x15b7d(%rip), %rcx     # 0x3459e
movl $0x76, %edx
callq 0x20d0
leaq 0x15ba2(%rip), %rdi     # 0x345d4
leaq 0x15905(%rip), %rsi     # 0x3433e
leaq 0x15b5e(%rip), %rcx     # 0x3459e
movl $0x77, %edx
callq 0x20d0
leaq 0x15ba5(%rip), %rdi     # 0x345f6
leaq 0x158e6(%rip), %rsi     # 0x3433e
leaq 0x15b3f(%rip), %rcx     # 0x3459e
movl $0x78, %edx
callq 0x20d0
leaq 0x15ba8(%rip), %rdi     # 0x34618
leaq 0x158c7(%rip), %rsi     # 0x3433e
leaq 0x15b20(%rip), %rcx     # 0x3459e
movl $0x79, %edx
callq 0x20d0
leaq 0x15bab(%rip), %rdi     # 0x3463a
leaq 0x158a8(%rip), %rsi     # 0x3433e
leaq 0x15b01(%rip), %rcx     # 0x3459e
movl $0x7a, %edx
callq 0x20d0
leaq 0x15bae(%rip), %rdi     # 0x3465c
leaq 0x15889(%rip), %rsi     # 0x3433e
leaq 0x15ae2(%rip), %rcx     # 0x3459e
movl $0x7b, %edx
callq 0x20d0
leaq 0x15bb1(%rip), %rdi     # 0x3467e
leaq 0x1586a(%rip), %rsi     # 0x3433e
leaq 0x15ac3(%rip), %rcx     # 0x3459e
movl $0x7c, %edx
callq 0x20d0
leaq 0x15bb4(%rip), %rdi     # 0x346a0
leaq 0x1584b(%rip), %rsi     # 0x3433e
leaq 0x15aa4(%rip), %rcx     # 0x3459e
movl $0x7e, %edx
callq 0x20d0
leaq 0x15bc1(%rip), %rdi     # 0x346cc
leaq 0x1582c(%rip), %rsi     # 0x3433e
leaq 0x15a85(%rip), %rcx     # 0x3459e
movl $0x7f, %edx
callq 0x20d0
leaq 0x15bce(%rip), %rdi     # 0x346f8
leaq 0x1580d(%rip), %rsi     # 0x3433e
leaq 0x15a66(%rip), %rcx     # 0x3459e
movl $0x80, %edx
callq 0x20d0
leaq 0x15bdb(%rip), %rdi     # 0x34724
leaq 0x157ee(%rip), %rsi     # 0x3433e
leaq 0x15a47(%rip), %rcx     # 0x3459e
movl $0x81, %edx
callq 0x20d0
leaq 0x15be8(%rip), %rdi     # 0x34750
leaq 0x157cf(%rip), %rsi     # 0x3433e
leaq 0x15a28(%rip), %rcx     # 0x3459e
movl $0x82, %edx
callq 0x20d0
leaq 0x15bf5(%rip), %rdi     # 0x3477c
leaq 0x157b0(%rip), %rsi     # 0x3433e
leaq 0x15a09(%rip), %rcx     # 0x3459e
movl $0x83, %edx
callq 0x20d0
leaq 0x15c02(%rip), %rdi     # 0x347a8
leaq 0x15791(%rip), %rsi     # 0x3433e
leaq 0x159ea(%rip), %rcx     # 0x3459e
movl $0x84, %edx
callq 0x20d0
leaq 0x15c0f(%rip), %rdi     # 0x347d4
leaq 0x15772(%rip), %rsi     # 0x3433e
leaq 0x159cb(%rip), %rcx     # 0x3459e
movl $0x85, %edx
callq 0x20d0