// File: jswaff[P]prophet3/test/hash__test.cpp
// Function: test_hash_val_exact_score()
void test_hash_val_exact_score() {
    int32 depth = 1;
    int32 score = -54;
    move mv = to_capture(PAWN,E7,F8,BISHOP);
    set_promopiece(&mv,QUEEN);
    uint64 val = build_hash_val(EXACT_SCORE,depth,score,mv);

    assert(get_hash_entry_type(val)==EXACT_SCORE);
    assert(get_hash_entry_depth(val)==depth);
    assert(get_hash_entry_score(val)==score);
    move found = get_hash_entry_move(val);
    assert(found==mv);
    assert(get_from_sq(mv)==E7);
    assert(get_to_sq(mv)==F8);
    assert(get_piece(mv)==PAWN);
    assert(is_capture(mv));
    assert(get_promopiece(found)==QUEEN);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x1, -0x4(%rbp)
movl $0xffffffca, -0x8(%rbp) # imm = 0xFFFFFFCA
movl $0x1, %edi
movl $0xc, %esi
movl $0x5, %edx
movl $0x3, %ecx
callq 0xa890
movq %rax, -0x10(%rbp)
leaq -0x10(%rbp), %rdi
movl $0x5, %esi
callq 0xa9e0
movl -0x4(%rbp), %esi
movl -0x8(%rbp), %edx
movq -0x10(%rbp), %rcx
movl $0x3, %edi
callq 0x8470
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x8710
cmpl $0x3, %eax
jne 0x1fcc9
jmp 0x1fce8
leaq 0x1e8c4(%rip), %rdi     # 0x3e594
leaq 0x1e624(%rip), %rsi     # 0x3e2fb
movl $0x146, %edx            # imm = 0x146
leaq 0x1e8d7(%rip), %rcx     # 0x3e5ba
callq 0x20c0
movq -0x18(%rbp), %rdi
callq 0x8730
cmpl -0x4(%rbp), %eax
jne 0x1fcf8
jmp 0x1fd17
leaq 0x1e7c5(%rip), %rdi     # 0x3e4c4
leaq 0x1e5f5(%rip), %rsi     # 0x3e2fb
movl $0x147, %edx            # imm = 0x147
leaq 0x1e8a8(%rip), %rcx     # 0x3e5ba
callq 0x20c0
movq -0x18(%rbp), %rdi
callq 0x8750
cmpl -0x8(%rbp), %eax
jne 0x1fd27
jmp 0x1fd46
leaq 0x1e7b7(%rip), %rdi     # 0x3e4e5
leaq 0x1e5c6(%rip), %rsi     # 0x3e2fb
movl $0x148, %edx            # imm = 0x148
leaq 0x1e879(%rip), %rcx     # 0x3e5ba
callq 0x20c0
movq -0x18(%rbp), %rdi
callq 0x87d0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0x1fd5f
jmp 0x1fd7e
leaq 0x1e875(%rip), %rdi     # 0x3e5db
leaq 0x1e58e(%rip), %rsi     # 0x3e2fb
movl $0x14a, %edx            # imm = 0x14A
leaq 0x1e841(%rip), %rcx     # 0x3e5ba
callq 0x20c0
movq -0x10(%rbp), %rdi
callq 0xaa80
cmpl $0xc, %eax
jne 0x1fd8e
jmp 0x1fdad
leaq 0x1e850(%rip), %rdi     # 0x3e5e5
leaq 0x1e55f(%rip), %rsi     # 0x3e2fb
movl $0x14b, %edx            # imm = 0x14B
leaq 0x1e812(%rip), %rcx     # 0x3e5ba
callq 0x20c0
movq -0x10(%rbp), %rdi
callq 0xaaa0
cmpl $0x5, %eax
jne 0x1fdbd
jmp 0x1fddc
leaq 0x1e835(%rip), %rdi     # 0x3e5f9
leaq 0x1e530(%rip), %rsi     # 0x3e2fb
movl $0x14c, %edx            # imm = 0x14C
leaq 0x1e7e3(%rip), %rcx     # 0x3e5ba
callq 0x20c0
movq -0x10(%rbp), %rdi
callq 0xaac0
cmpl $0x1, %eax
jne 0x1fdec
jmp 0x1fe0b
leaq 0x1e818(%rip), %rdi     # 0x3e60b
leaq 0x1e501(%rip), %rsi     # 0x3e2fb
movl $0x14d, %edx            # imm = 0x14D
leaq 0x1e7b4(%rip), %rcx     # 0x3e5ba
callq 0x20c0
movq -0x10(%rbp), %rdi
callq 0xab20
testb $0x1, %al
jne 0x1fe1a
jmp 0x1fe1c
jmp 0x1fe3b
leaq 0x1f4e0(%rip), %rdi     # 0x3f303
leaq 0x1e4d1(%rip), %rsi     # 0x3e2fb
movl $0x14e, %edx            # imm = 0x14E
leaq 0x1e784(%rip), %rcx     # 0x3e5ba
callq 0x20c0
movq -0x20(%rbp), %rdi
callq 0xaae0
cmpl $0x5, %eax
jne 0x1fe4b
jmp 0x1fe6a
leaq 0x1e7cd(%rip), %rdi     # 0x3e61f
leaq 0x1e4a2(%rip), %rsi     # 0x3e2fb
movl $0x14f, %edx            # imm = 0x14F
leaq 0x1e755(%rip), %rcx     # 0x3e5ba
callq 0x20c0
addq $0x20, %rsp
popq %rbp
retq