// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/move__test.cpp
// Function: test_set_promopiece()
void test_set_promopiece() {
    move mv = to_move(PAWN,B2,B1);
    assert(get_piece(mv)==PAWN);
    assert(get_from_sq(mv)==B2);
    assert(get_to_sq(mv)==B1);
    assert(!is_epcapture(mv));
    assert(!is_capture(mv));
    assert(!is_castle(mv));
    assert(get_promopiece(mv)==NO_PIECE);

    set_promopiece(&mv,ROOK);
    assert(get_piece(mv)==PAWN);
    assert(get_from_sq(mv)==B2);
    assert(get_to_sq(mv)==B1);
    assert(!is_epcapture(mv));
    assert(!is_capture(mv));
    assert(!is_castle(mv));
    assert(get_promopiece(mv)==ROOK);

    set_promopiece(&mv,BISHOP);
    assert(get_promopiece(mv)==BISHOP);

    set_promopiece(&mv,QUEEN);
    assert(get_promopiece(mv)==QUEEN);

    set_promopiece(&mv,KNIGHT);
    assert(get_promopiece(mv)==KNIGHT);

    set_promopiece(&mv,NO_PIECE);
    assert(get_piece(mv)==PAWN);
    assert(get_from_sq(mv)==B2);
    assert(get_to_sq(mv)==B1);
    assert(!is_epcapture(mv));
    assert(!is_capture(mv));
    assert(!is_castle(mv));
    assert(get_promopiece(mv)==NO_PIECE);

    ///////
    mv = to_capture(PAWN,B2,A1,ROOK);
    set_promopiece(&mv,QUEEN);
    assert(get_piece(mv)==PAWN);
    assert(get_from_sq(mv)==B2);
    assert(get_to_sq(mv)==A1);
    assert(!is_epcapture(mv));
    assert(is_capture(mv));
    assert(!is_castle(mv));
    assert(get_promopiece(mv)==QUEEN);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl $0x1, %edi
movl $0x31, %esi
movl $0x39, %edx
callq 0x775c
movq %rax, %rbx
movq %rax, 0x8(%rsp)
movq %rax, %rdi
callq 0x7865
cmpl $0x1, %eax
jne 0x18f7b
movq %rbx, %rdi
callq 0x7854
cmpl $0x31, %eax
jne 0x18f9a
movq %rbx, %rdi
callq 0x785b
cmpl $0x39, %eax
jne 0x18fb9
movq %rbx, %rdi
callq 0x788d
testb %al, %al
jne 0x18fd8
movq %rbx, %rdi
callq 0x7883
testb %al, %al
jne 0x18ff7
movq %rbx, %rdi
callq 0x7897
testb %al, %al
jne 0x19016
movq %rbx, %rdi
callq 0x786f
testl %eax, %eax
jne 0x19035
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x4, %esi
callq 0x7824
movq (%rbx), %rdi
callq 0x7865
cmpl $0x1, %eax
jne 0x19054
movq 0x8(%rsp), %rdi
callq 0x7854
cmpl $0x31, %eax
jne 0x19073
movq 0x8(%rsp), %rdi
callq 0x785b
cmpl $0x39, %eax
jne 0x19092
movq 0x8(%rsp), %rdi
callq 0x788d
testb %al, %al
jne 0x190b1
movq 0x8(%rsp), %rdi
callq 0x7883
testb %al, %al
jne 0x190d0
movq 0x8(%rsp), %rdi
callq 0x7897
testb %al, %al
jne 0x190ef
movq 0x8(%rsp), %rdi
callq 0x786f
cmpl $0x4, %eax
jne 0x1910e
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x3, %esi
callq 0x7824
movq (%rbx), %rdi
callq 0x786f
cmpl $0x3, %eax
jne 0x1912d
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x5, %esi
callq 0x7824
movq (%rbx), %rdi
callq 0x786f
cmpl $0x5, %eax
jne 0x1914c
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x7824
movq (%rbx), %rdi
callq 0x786f
cmpl $0x2, %eax
jne 0x1916b
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x7824
movq (%rbx), %rdi
callq 0x7865
cmpl $0x1, %eax
jne 0x1918a
movq 0x8(%rsp), %rdi
callq 0x7854
cmpl $0x31, %eax
jne 0x191a9
movq 0x8(%rsp), %rdi
callq 0x785b
cmpl $0x39, %eax
jne 0x191c8
movq 0x8(%rsp), %rdi
callq 0x788d
testb %al, %al
jne 0x191e7
movq 0x8(%rsp), %rdi
callq 0x7883
testb %al, %al
jne 0x19206
movq 0x8(%rsp), %rdi
callq 0x7897
testb %al, %al
jne 0x19225
movq 0x8(%rsp), %rdi
callq 0x786f
testl %eax, %eax
jne 0x19244
movl $0x1, %edi
movl $0x31, %esi
movl $0x38, %edx
movl $0x4, %ecx
callq 0x777b
leaq 0x8(%rsp), %rbx
movq %rax, (%rbx)
movq %rbx, %rdi
movl $0x5, %esi
callq 0x7824
movq (%rbx), %rdi
callq 0x7865
cmpl $0x1, %eax
jne 0x19263
movq 0x8(%rsp), %rdi
callq 0x7854
cmpl $0x31, %eax
jne 0x19282
movq 0x8(%rsp), %rdi
callq 0x785b
cmpl $0x38, %eax
jne 0x192a1
movq 0x8(%rsp), %rdi
callq 0x788d
testb %al, %al
jne 0x192c0
movq 0x8(%rsp), %rdi
callq 0x7883
testb %al, %al
je 0x192df
movq 0x8(%rsp), %rdi
callq 0x7897
testb %al, %al
jne 0x192fe
movq 0x8(%rsp), %rdi
callq 0x786f
cmpl $0x5, %eax
jne 0x1931d
addq $0x10, %rsp
popq %rbx
retq
leaq 0x18f33(%rip), %rdi     # 0x31eb5
leaq 0x19a77(%rip), %rsi     # 0x32a00
leaq 0x19b0c(%rip), %rcx     # 0x32a9c
movl $0x1a, %edx
callq 0x20d0
leaq 0x19b16(%rip), %rdi     # 0x32ab7
leaq 0x19a58(%rip), %rsi     # 0x32a00
leaq 0x19aed(%rip), %rcx     # 0x32a9c
movl $0x1b, %edx
callq 0x20d0
leaq 0x19b0b(%rip), %rdi     # 0x32acb
leaq 0x19a39(%rip), %rsi     # 0x32a00
leaq 0x19ace(%rip), %rcx     # 0x32a9c
movl $0x1c, %edx
callq 0x20d0
leaq 0x19a6f(%rip), %rdi     # 0x32a4e
leaq 0x19a1a(%rip), %rsi     # 0x32a00
leaq 0x19aaf(%rip), %rcx     # 0x32a9c
movl $0x1d, %edx
callq 0x20d0
leaq 0x19a62(%rip), %rdi     # 0x32a60
leaq 0x199fb(%rip), %rsi     # 0x32a00
leaq 0x19a90(%rip), %rcx     # 0x32a9c
movl $0x1e, %edx
callq 0x20d0
leaq 0x19a53(%rip), %rdi     # 0x32a70
leaq 0x199dc(%rip), %rsi     # 0x32a00
leaq 0x19a71(%rip), %rcx     # 0x32a9c
movl $0x1f, %edx
callq 0x20d0
leaq 0x19a43(%rip), %rdi     # 0x32a7f
leaq 0x199bd(%rip), %rsi     # 0x32a00
leaq 0x19a52(%rip), %rcx     # 0x32a9c
movl $0x20, %edx
callq 0x20d0
leaq 0x18e5a(%rip), %rdi     # 0x31eb5
leaq 0x1999e(%rip), %rsi     # 0x32a00
leaq 0x19a33(%rip), %rcx     # 0x32a9c
movl $0x23, %edx
callq 0x20d0
leaq 0x19a3d(%rip), %rdi     # 0x32ab7
leaq 0x1997f(%rip), %rsi     # 0x32a00
leaq 0x19a14(%rip), %rcx     # 0x32a9c
movl $0x24, %edx
callq 0x20d0
leaq 0x19a32(%rip), %rdi     # 0x32acb
leaq 0x19960(%rip), %rsi     # 0x32a00
leaq 0x199f5(%rip), %rcx     # 0x32a9c
movl $0x25, %edx
callq 0x20d0
leaq 0x19996(%rip), %rdi     # 0x32a4e
leaq 0x19941(%rip), %rsi     # 0x32a00
leaq 0x199d6(%rip), %rcx     # 0x32a9c
movl $0x26, %edx
callq 0x20d0
leaq 0x19989(%rip), %rdi     # 0x32a60
leaq 0x19922(%rip), %rsi     # 0x32a00
leaq 0x199b7(%rip), %rcx     # 0x32a9c
movl $0x27, %edx
callq 0x20d0
leaq 0x1997a(%rip), %rdi     # 0x32a70
leaq 0x19903(%rip), %rsi     # 0x32a00
leaq 0x19998(%rip), %rcx     # 0x32a9c
movl $0x28, %edx
callq 0x20d0
leaq 0x199c8(%rip), %rdi     # 0x32add
leaq 0x198e4(%rip), %rsi     # 0x32a00
leaq 0x19979(%rip), %rcx     # 0x32a9c
movl $0x29, %edx
callq 0x20d0
leaq 0x199c2(%rip), %rdi     # 0x32af6
leaq 0x198c5(%rip), %rsi     # 0x32a00
leaq 0x1995a(%rip), %rcx     # 0x32a9c
movl $0x2c, %edx
callq 0x20d0
leaq 0x199be(%rip), %rdi     # 0x32b11
leaq 0x198a6(%rip), %rsi     # 0x32a00
leaq 0x1993b(%rip), %rcx     # 0x32a9c
movl $0x2f, %edx
callq 0x20d0
leaq 0x199b9(%rip), %rdi     # 0x32b2b
leaq 0x19887(%rip), %rsi     # 0x32a00
leaq 0x1991c(%rip), %rcx     # 0x32a9c
movl $0x32, %edx
callq 0x20d0
leaq 0x18d24(%rip), %rdi     # 0x31eb5
leaq 0x19868(%rip), %rsi     # 0x32a00
leaq 0x198fd(%rip), %rcx     # 0x32a9c
movl $0x35, %edx
callq 0x20d0
leaq 0x19907(%rip), %rdi     # 0x32ab7
leaq 0x19849(%rip), %rsi     # 0x32a00
leaq 0x198de(%rip), %rcx     # 0x32a9c
movl $0x36, %edx
callq 0x20d0
leaq 0x198fc(%rip), %rdi     # 0x32acb
leaq 0x1982a(%rip), %rsi     # 0x32a00
leaq 0x198bf(%rip), %rcx     # 0x32a9c
movl $0x37, %edx
callq 0x20d0
leaq 0x19860(%rip), %rdi     # 0x32a4e
leaq 0x1980b(%rip), %rsi     # 0x32a00
leaq 0x198a0(%rip), %rcx     # 0x32a9c
movl $0x38, %edx
callq 0x20d0
leaq 0x19853(%rip), %rdi     # 0x32a60
leaq 0x197ec(%rip), %rsi     # 0x32a00
leaq 0x19881(%rip), %rcx     # 0x32a9c
movl $0x39, %edx
callq 0x20d0
leaq 0x19844(%rip), %rdi     # 0x32a70
leaq 0x197cd(%rip), %rsi     # 0x32a00
leaq 0x19862(%rip), %rcx     # 0x32a9c
movl $0x3a, %edx
callq 0x20d0
leaq 0x19834(%rip), %rdi     # 0x32a7f
leaq 0x197ae(%rip), %rsi     # 0x32a00
leaq 0x19843(%rip), %rcx     # 0x32a9c
movl $0x3b, %edx
callq 0x20d0
leaq 0x18c4b(%rip), %rdi     # 0x31eb5
leaq 0x1978f(%rip), %rsi     # 0x32a00
leaq 0x19824(%rip), %rcx     # 0x32a9c
movl $0x40, %edx
callq 0x20d0
leaq 0x1982e(%rip), %rdi     # 0x32ab7
leaq 0x19770(%rip), %rsi     # 0x32a00
leaq 0x19805(%rip), %rcx     # 0x32a9c
movl $0x41, %edx
callq 0x20d0
leaq 0x1989e(%rip), %rdi     # 0x32b46
leaq 0x19751(%rip), %rsi     # 0x32a00
leaq 0x197e6(%rip), %rcx     # 0x32a9c
movl $0x42, %edx
callq 0x20d0
leaq 0x19787(%rip), %rdi     # 0x32a4e
leaq 0x19732(%rip), %rsi     # 0x32a00
leaq 0x197c7(%rip), %rcx     # 0x32a9c
movl $0x43, %edx
callq 0x20d0
leaq 0x1977b(%rip), %rdi     # 0x32a61
leaq 0x19713(%rip), %rsi     # 0x32a00
leaq 0x197a8(%rip), %rcx     # 0x32a9c
movl $0x44, %edx
callq 0x20d0
leaq 0x1976b(%rip), %rdi     # 0x32a70
leaq 0x196f4(%rip), %rsi     # 0x32a00
leaq 0x19789(%rip), %rcx     # 0x32a9c
movl $0x45, %edx
callq 0x20d0
leaq 0x197ed(%rip), %rdi     # 0x32b11
leaq 0x196d5(%rip), %rsi     # 0x32a00
leaq 0x1976a(%rip), %rcx     # 0x32a9c
movl $0x46, %edx
callq 0x20d0