// File: jswaff[P]prophet3/test/move__test.cpp
// Function: test_move_score()
void test_move_score() {
    move mv = to_move(PAWN,E2,E4);
    assert(get_move_score(&mv)==0);

    set_move_score(&mv,100);
    assert(get_move_score(&mv)==100);

    set_move_score(&mv,-9);
    assert(get_move_score(&mv)==-9);

    set_move_score(&mv,CHECKMATE);
    assert(get_move_score(&mv)==CHECKMATE);

    set_move_score(&mv,-CHECKMATE);
    assert(get_move_score(&mv)==-CHECKMATE);

    set_move_score(&mv,-CHECKMATE+10);
    assert(get_move_score(&mv)==-CHECKMATE+10);

    // make sure we haven't corrupted the move itself
    assert(get_piece(mv)==PAWN);
    assert(get_from_sq(mv)==E2);
    assert(get_to_sq(mv)==E4);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x1, %edi
movl $0x34, %esi
movl $0x24, %edx
callq 0xa830
movq %rax, -0x8(%rbp)
leaq -0x8(%rbp), %rdi
callq 0xab90
cmpl $0x0, %eax
jne 0x23400
jmp 0x2341f
leaq 0x1c116(%rip), %rdi     # 0x3f51d
leaq 0x1be94(%rip), %rsi     # 0x3f2a2
movl $0x7a, %edx
leaq 0x1c11a(%rip), %rcx     # 0x3f534
callq 0x20c0
leaq -0x8(%rbp), %rdi
movl $0x64, %esi
callq 0xabe0
leaq -0x8(%rbp), %rdi
callq 0xab90
cmpl $0x64, %eax
jne 0x2343d
jmp 0x2345c
leaq 0x1c107(%rip), %rdi     # 0x3f54b
leaq 0x1be57(%rip), %rsi     # 0x3f2a2
movl $0x7d, %edx
leaq 0x1c0dd(%rip), %rcx     # 0x3f534
callq 0x20c0
leaq -0x8(%rbp), %rdi
movl $0xfffffff7, %esi       # imm = 0xFFFFFFF7
callq 0xabe0
leaq -0x8(%rbp), %rdi
callq 0xab90
cmpl $-0x9, %eax
jne 0x2347a
jmp 0x23499
leaq 0x1c0e3(%rip), %rdi     # 0x3f564
leaq 0x1be1a(%rip), %rsi     # 0x3f2a2
movl $0x80, %edx
leaq 0x1c0a0(%rip), %rcx     # 0x3f534
callq 0x20c0
leaq -0x8(%rbp), %rdi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0xabe0
leaq -0x8(%rbp), %rdi
callq 0xab90
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x234b9
jmp 0x234d8
leaq 0x1c0bc(%rip), %rdi     # 0x3f57c
leaq 0x1bddb(%rip), %rsi     # 0x3f2a2
movl $0x83, %edx
leaq 0x1c061(%rip), %rcx     # 0x3f534
callq 0x20c0
leaq -0x8(%rbp), %rdi
movl $0xffff0001, %esi       # imm = 0xFFFF0001
callq 0xabe0
leaq -0x8(%rbp), %rdi
callq 0xab90
cmpl $0xffff0001, %eax       # imm = 0xFFFF0001
jne 0x234f8
jmp 0x23517
leaq 0x1c09c(%rip), %rdi     # 0x3f59b
leaq 0x1bd9c(%rip), %rsi     # 0x3f2a2
movl $0x86, %edx
leaq 0x1c022(%rip), %rcx     # 0x3f534
callq 0x20c0
leaq -0x8(%rbp), %rdi
movl $0xffff000b, %esi       # imm = 0xFFFF000B
callq 0xabe0
leaq -0x8(%rbp), %rdi
callq 0xab90
cmpl $0xffff000b, %eax       # imm = 0xFFFF000B
jne 0x23537
jmp 0x23556
leaq 0x1c07d(%rip), %rdi     # 0x3f5bb
leaq 0x1bd5d(%rip), %rsi     # 0x3f2a2
movl $0x89, %edx
leaq 0x1bfe3(%rip), %rcx     # 0x3f534
callq 0x20c0
movq -0x8(%rbp), %rdi
callq 0xaac0
cmpl $0x1, %eax
jne 0x23566
jmp 0x23585
leaq 0x1b09e(%rip), %rdi     # 0x3e60b
leaq 0x1bd2e(%rip), %rsi     # 0x3f2a2
movl $0x8c, %edx
leaq 0x1bfb4(%rip), %rcx     # 0x3f534
callq 0x20c0
movq -0x8(%rbp), %rdi
callq 0xaa80
cmpl $0x34, %eax
jne 0x23595
jmp 0x235b4
leaq 0x1bd2e(%rip), %rdi     # 0x3f2ca
leaq 0x1bcff(%rip), %rsi     # 0x3f2a2
movl $0x8d, %edx
leaq 0x1bf85(%rip), %rcx     # 0x3f534
callq 0x20c0
movq -0x8(%rbp), %rdi
callq 0xaaa0
cmpl $0x24, %eax
jne 0x235c4
jmp 0x235e3
leaq 0x1bd13(%rip), %rdi     # 0x3f2de
leaq 0x1bcd0(%rip), %rsi     # 0x3f2a2
movl $0x8e, %edx
leaq 0x1bf56(%rip), %rcx     # 0x3f534
callq 0x20c0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)