// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x398, %rsp            # imm = 0x398
leaq 0x15e0d(%rip), %rsi     # 0x32694
leaq 0x1d0(%rsp), %rbx
movq %rbx, %rdi
callq 0xa1b8
leaq 0x40(%rsp), %rdi
pushq $0x1
popq %rbp
movq %rbx, %rsi
movl %ebp, %edx
movl %ebp, %ecx
callq 0x73f8
movq %rax, %rbx
pushq $0xd
popq %r12
pushq $0x5
popq %r14
movl %ebp, %edi
movl %r12d, %esi
movl %r14d, %edx
callq 0x7284
leaq 0x38(%rsp), %rdi
movq %rax, (%rdi)
movl %r14d, %esi
callq 0x733b
movl %ebp, %edi
movl %r12d, %esi
movl %r14d, %edx
callq 0x7284
leaq 0x30(%rsp), %rdi
movq %rax, (%rdi)
pushq $0x4
popq %r13
movl %r13d, %esi
callq 0x733b
movl %ebp, %edi
movl %r12d, %esi
movl %r14d, %edx
callq 0x7284
leaq 0x28(%rsp), %rdi
movq %rax, (%rdi)
pushq $0x3
popq %rsi
callq 0x733b
movl %ebp, %edi
movl %r12d, %esi
movl %r14d, %edx
callq 0x7284
leaq 0x20(%rsp), %rdi
movq %rax, (%rdi)
pushq $0x2
popq %rsi
callq 0x733b
pushq $0x6
popq %r15
movl %ebp, %edi
movl %r12d, %esi
movl %r15d, %edx
movl %r13d, %ecx
callq 0x72a3
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
movl %r14d, %esi
callq 0x733b
movl %ebp, %edi
movl %r12d, %esi
movl %r15d, %edx
movl %r13d, %ecx
callq 0x72a3
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
movl %r13d, %esi
callq 0x733b
movl %ebp, %edi
movl %r12d, %esi
movl %r15d, %edx
movl %r13d, %ecx
callq 0x72a3
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
pushq $0x3
popq %rsi
callq 0x733b
movl %ebp, %edi
movl %r12d, %esi
movl %r15d, %edx
movl %r13d, %ecx
callq 0x72a3
movq %rsp, %rdi
movq %rax, (%rdi)
pushq $0x2
popq %rsi
callq 0x733b
leaq 0x38(%rsp), %rax
movq (%rax), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0xdacb
testb %al, %al
je 0x1cb93
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0xdacb
testb %al, %al
je 0x1cbaf
movq 0x28(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0xdacb
testb %al, %al
je 0x1cbcb
movq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0xdacb
testb %al, %al
je 0x1cbe7
movq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0xdacb
testb %al, %al
je 0x1cc03
movq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0xdacb
testb %al, %al
je 0x1cc1c
movq 0x8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0xdacb
testb %al, %al
je 0x1cc35
movq (%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0xdacb
testb %al, %al
je 0x1cc4e
leaq 0x1d0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0x1c3a4
cmpq 0x18(%rsp), %rax
jne 0x1cc67
leaq 0x1d0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0x1c3a4
cmpq 0x10(%rsp), %rax
jne 0x1cc80
leaq 0x1d0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0x1c3a4
cmpq 0x8(%rsp), %rax
jne 0x1cc9d
leaq 0x1d0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0x1c3a4
cmpq (%rsp), %rax
jne 0x1ccbc
leaq 0x1d0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0x1c3a4
cmpq 0x38(%rsp), %rax
jne 0x1ccdb
leaq 0x1d0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0x1c3a4
cmpq 0x30(%rsp), %rax
jne 0x1ccfa
leaq 0x1d0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0x1c3a4
cmpq 0x28(%rsp), %rax
jne 0x1cd19
leaq 0x1d0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0x1c3a4
cmpq 0x20(%rsp), %rax
jne 0x1cd38
addq $0x398, %rsp            # imm = 0x398
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x15b25(%rip), %rdi     # 0x326bf
leaq 0x158e0(%rip), %rsi     # 0x32481
leaq 0x15b39(%rip), %rcx     # 0x326e1
pushq $0x75
jmp 0x1cc97
leaq 0x15b3f(%rip), %rdi     # 0x326f5
leaq 0x158c4(%rip), %rsi     # 0x32481
leaq 0x15b1d(%rip), %rcx     # 0x326e1
pushq $0x76
jmp 0x1cc97
leaq 0x15b45(%rip), %rdi     # 0x32717
leaq 0x158a8(%rip), %rsi     # 0x32481
leaq 0x15b01(%rip), %rcx     # 0x326e1
pushq $0x77
jmp 0x1cc97
leaq 0x15b4b(%rip), %rdi     # 0x32739
leaq 0x1588c(%rip), %rsi     # 0x32481
leaq 0x15ae5(%rip), %rcx     # 0x326e1
pushq $0x78
jmp 0x1cc97
leaq 0x15b51(%rip), %rdi     # 0x3275b
leaq 0x15870(%rip), %rsi     # 0x32481
leaq 0x15ac9(%rip), %rcx     # 0x326e1
pushq $0x79
jmp 0x1cc97
leaq 0x15b5a(%rip), %rdi     # 0x3277d
leaq 0x15857(%rip), %rsi     # 0x32481
leaq 0x15ab0(%rip), %rcx     # 0x326e1
pushq $0x7a
jmp 0x1cc97
leaq 0x15b63(%rip), %rdi     # 0x3279f
leaq 0x1583e(%rip), %rsi     # 0x32481
leaq 0x15a97(%rip), %rcx     # 0x326e1
pushq $0x7b
jmp 0x1cc97
leaq 0x15b6c(%rip), %rdi     # 0x327c1
leaq 0x15825(%rip), %rsi     # 0x32481
leaq 0x15a7e(%rip), %rcx     # 0x326e1
pushq $0x7c
jmp 0x1cc97
leaq 0x15b75(%rip), %rdi     # 0x327e3
leaq 0x1580c(%rip), %rsi     # 0x32481
leaq 0x15a65(%rip), %rcx     # 0x326e1
pushq $0x7e
jmp 0x1cc97
leaq 0x15b88(%rip), %rdi     # 0x3280f
leaq 0x157f3(%rip), %rsi     # 0x32481
leaq 0x15a4c(%rip), %rcx     # 0x326e1
pushq $0x7f
popq %rdx
callq 0x20c0
leaq 0x15b97(%rip), %rdi     # 0x3283b
leaq 0x157d6(%rip), %rsi     # 0x32481
leaq 0x15a2f(%rip), %rcx     # 0x326e1
movl $0x80, %edx
callq 0x20c0
leaq 0x15ba4(%rip), %rdi     # 0x32867
leaq 0x157b7(%rip), %rsi     # 0x32481
leaq 0x15a10(%rip), %rcx     # 0x326e1
movl $0x81, %edx
callq 0x20c0
leaq 0x15bb1(%rip), %rdi     # 0x32893
leaq 0x15798(%rip), %rsi     # 0x32481
leaq 0x159f1(%rip), %rcx     # 0x326e1
movl $0x82, %edx
callq 0x20c0
leaq 0x15bbe(%rip), %rdi     # 0x328bf
leaq 0x15779(%rip), %rsi     # 0x32481
leaq 0x159d2(%rip), %rcx     # 0x326e1
movl $0x83, %edx
callq 0x20c0
leaq 0x15bcb(%rip), %rdi     # 0x328eb
leaq 0x1575a(%rip), %rsi     # 0x32481
leaq 0x159b3(%rip), %rcx     # 0x326e1
movl $0x84, %edx
callq 0x20c0
leaq 0x15bd8(%rip), %rdi     # 0x32917
leaq 0x1573b(%rip), %rsi     # 0x32481
leaq 0x15994(%rip), %rcx     # 0x326e1
movl $0x85, %edx
callq 0x20c0