// File: /workspace/github_cpp_makefile_star2_O1/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 0x76b8
movq %rax, 0x8(%rsp)
movq %rax, %rdi
callq 0x77c1
cmpl $0x1, %eax
jne 0x190e4
movq 0x8(%rsp), %rdi
callq 0x77b0
cmpl $0x31, %eax
jne 0x19103
movq 0x8(%rsp), %rdi
callq 0x77b7
cmpl $0x39, %eax
jne 0x19122
movq 0x8(%rsp), %rdi
callq 0x77e9
testb %al, %al
jne 0x19141
movq 0x8(%rsp), %rdi
callq 0x77df
testb %al, %al
jne 0x19160
movq 0x8(%rsp), %rdi
callq 0x77f3
testb %al, %al
jne 0x1917f
movq 0x8(%rsp), %rdi
callq 0x77cb
testl %eax, %eax
jne 0x1919e
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x4, %esi
callq 0x7780
movq (%rbx), %rdi
callq 0x77c1
cmpl $0x1, %eax
jne 0x191bd
movq 0x8(%rsp), %rdi
callq 0x77b0
cmpl $0x31, %eax
jne 0x191dc
movq 0x8(%rsp), %rdi
callq 0x77b7
cmpl $0x39, %eax
jne 0x191fb
movq 0x8(%rsp), %rdi
callq 0x77e9
testb %al, %al
jne 0x1921a
movq 0x8(%rsp), %rdi
callq 0x77df
testb %al, %al
jne 0x19239
movq 0x8(%rsp), %rdi
callq 0x77f3
testb %al, %al
jne 0x19258
movq 0x8(%rsp), %rdi
callq 0x77cb
cmpl $0x4, %eax
jne 0x19277
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x3, %esi
callq 0x7780
movq (%rbx), %rdi
callq 0x77cb
cmpl $0x3, %eax
jne 0x19296
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x5, %esi
callq 0x7780
movq (%rbx), %rdi
callq 0x77cb
cmpl $0x5, %eax
jne 0x192b5
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x7780
movq (%rbx), %rdi
callq 0x77cb
cmpl $0x2, %eax
jne 0x192d4
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x7780
movq (%rbx), %rdi
callq 0x77c1
cmpl $0x1, %eax
jne 0x192f3
movq 0x8(%rsp), %rdi
callq 0x77b0
cmpl $0x31, %eax
jne 0x19312
movq 0x8(%rsp), %rdi
callq 0x77b7
cmpl $0x39, %eax
jne 0x19331
movq 0x8(%rsp), %rdi
callq 0x77e9
testb %al, %al
jne 0x19350
movq 0x8(%rsp), %rdi
callq 0x77df
testb %al, %al
jne 0x1936f
movq 0x8(%rsp), %rdi
callq 0x77f3
testb %al, %al
jne 0x1938e
movq 0x8(%rsp), %rdi
callq 0x77cb
testl %eax, %eax
jne 0x193ad
movl $0x1, %edi
movl $0x31, %esi
movl $0x38, %edx
movl $0x4, %ecx
callq 0x76d7
leaq 0x8(%rsp), %rbx
movq %rax, (%rbx)
movq %rbx, %rdi
movl $0x5, %esi
callq 0x7780
movq (%rbx), %rdi
callq 0x77c1
cmpl $0x1, %eax
jne 0x193cc
movq 0x8(%rsp), %rdi
callq 0x77b0
cmpl $0x31, %eax
jne 0x193eb
movq 0x8(%rsp), %rdi
callq 0x77b7
cmpl $0x38, %eax
jne 0x1940a
movq 0x8(%rsp), %rdi
callq 0x77e9
testb %al, %al
jne 0x19429
movq 0x8(%rsp), %rdi
callq 0x77df
testb %al, %al
je 0x19448
movq 0x8(%rsp), %rdi
callq 0x77f3
testb %al, %al
jne 0x19467
movq 0x8(%rsp), %rdi
callq 0x77cb
cmpl $0x5, %eax
jne 0x19486
addq $0x10, %rsp
popq %rbx
retq
leaq 0x18d4a(%rip), %rdi     # 0x31e35
leaq 0x1988e(%rip), %rsi     # 0x32980
leaq 0x19923(%rip), %rcx     # 0x32a1c
movl $0x1a, %edx
callq 0x20d0
leaq 0x1992d(%rip), %rdi     # 0x32a37
leaq 0x1986f(%rip), %rsi     # 0x32980
leaq 0x19904(%rip), %rcx     # 0x32a1c
movl $0x1b, %edx
callq 0x20d0
leaq 0x19922(%rip), %rdi     # 0x32a4b
leaq 0x19850(%rip), %rsi     # 0x32980
leaq 0x198e5(%rip), %rcx     # 0x32a1c
movl $0x1c, %edx
callq 0x20d0
leaq 0x19886(%rip), %rdi     # 0x329ce
leaq 0x19831(%rip), %rsi     # 0x32980
leaq 0x198c6(%rip), %rcx     # 0x32a1c
movl $0x1d, %edx
callq 0x20d0
leaq 0x19879(%rip), %rdi     # 0x329e0
leaq 0x19812(%rip), %rsi     # 0x32980
leaq 0x198a7(%rip), %rcx     # 0x32a1c
movl $0x1e, %edx
callq 0x20d0
leaq 0x1986a(%rip), %rdi     # 0x329f0
leaq 0x197f3(%rip), %rsi     # 0x32980
leaq 0x19888(%rip), %rcx     # 0x32a1c
movl $0x1f, %edx
callq 0x20d0
leaq 0x1985a(%rip), %rdi     # 0x329ff
leaq 0x197d4(%rip), %rsi     # 0x32980
leaq 0x19869(%rip), %rcx     # 0x32a1c
movl $0x20, %edx
callq 0x20d0
leaq 0x18c71(%rip), %rdi     # 0x31e35
leaq 0x197b5(%rip), %rsi     # 0x32980
leaq 0x1984a(%rip), %rcx     # 0x32a1c
movl $0x23, %edx
callq 0x20d0
leaq 0x19854(%rip), %rdi     # 0x32a37
leaq 0x19796(%rip), %rsi     # 0x32980
leaq 0x1982b(%rip), %rcx     # 0x32a1c
movl $0x24, %edx
callq 0x20d0
leaq 0x19849(%rip), %rdi     # 0x32a4b
leaq 0x19777(%rip), %rsi     # 0x32980
leaq 0x1980c(%rip), %rcx     # 0x32a1c
movl $0x25, %edx
callq 0x20d0
leaq 0x197ad(%rip), %rdi     # 0x329ce
leaq 0x19758(%rip), %rsi     # 0x32980
leaq 0x197ed(%rip), %rcx     # 0x32a1c
movl $0x26, %edx
callq 0x20d0
leaq 0x197a0(%rip), %rdi     # 0x329e0
leaq 0x19739(%rip), %rsi     # 0x32980
leaq 0x197ce(%rip), %rcx     # 0x32a1c
movl $0x27, %edx
callq 0x20d0
leaq 0x19791(%rip), %rdi     # 0x329f0
leaq 0x1971a(%rip), %rsi     # 0x32980
leaq 0x197af(%rip), %rcx     # 0x32a1c
movl $0x28, %edx
callq 0x20d0
leaq 0x197df(%rip), %rdi     # 0x32a5d
leaq 0x196fb(%rip), %rsi     # 0x32980
leaq 0x19790(%rip), %rcx     # 0x32a1c
movl $0x29, %edx
callq 0x20d0
leaq 0x197d9(%rip), %rdi     # 0x32a76
leaq 0x196dc(%rip), %rsi     # 0x32980
leaq 0x19771(%rip), %rcx     # 0x32a1c
movl $0x2c, %edx
callq 0x20d0
leaq 0x197d5(%rip), %rdi     # 0x32a91
leaq 0x196bd(%rip), %rsi     # 0x32980
leaq 0x19752(%rip), %rcx     # 0x32a1c
movl $0x2f, %edx
callq 0x20d0
leaq 0x197d0(%rip), %rdi     # 0x32aab
leaq 0x1969e(%rip), %rsi     # 0x32980
leaq 0x19733(%rip), %rcx     # 0x32a1c
movl $0x32, %edx
callq 0x20d0
leaq 0x18b3b(%rip), %rdi     # 0x31e35
leaq 0x1967f(%rip), %rsi     # 0x32980
leaq 0x19714(%rip), %rcx     # 0x32a1c
movl $0x35, %edx
callq 0x20d0
leaq 0x1971e(%rip), %rdi     # 0x32a37
leaq 0x19660(%rip), %rsi     # 0x32980
leaq 0x196f5(%rip), %rcx     # 0x32a1c
movl $0x36, %edx
callq 0x20d0
leaq 0x19713(%rip), %rdi     # 0x32a4b
leaq 0x19641(%rip), %rsi     # 0x32980
leaq 0x196d6(%rip), %rcx     # 0x32a1c
movl $0x37, %edx
callq 0x20d0
leaq 0x19677(%rip), %rdi     # 0x329ce
leaq 0x19622(%rip), %rsi     # 0x32980
leaq 0x196b7(%rip), %rcx     # 0x32a1c
movl $0x38, %edx
callq 0x20d0
leaq 0x1966a(%rip), %rdi     # 0x329e0
leaq 0x19603(%rip), %rsi     # 0x32980
leaq 0x19698(%rip), %rcx     # 0x32a1c
movl $0x39, %edx
callq 0x20d0
leaq 0x1965b(%rip), %rdi     # 0x329f0
leaq 0x195e4(%rip), %rsi     # 0x32980
leaq 0x19679(%rip), %rcx     # 0x32a1c
movl $0x3a, %edx
callq 0x20d0
leaq 0x1964b(%rip), %rdi     # 0x329ff
leaq 0x195c5(%rip), %rsi     # 0x32980
leaq 0x1965a(%rip), %rcx     # 0x32a1c
movl $0x3b, %edx
callq 0x20d0
leaq 0x18a62(%rip), %rdi     # 0x31e35
leaq 0x195a6(%rip), %rsi     # 0x32980
leaq 0x1963b(%rip), %rcx     # 0x32a1c
movl $0x40, %edx
callq 0x20d0
leaq 0x19645(%rip), %rdi     # 0x32a37
leaq 0x19587(%rip), %rsi     # 0x32980
leaq 0x1961c(%rip), %rcx     # 0x32a1c
movl $0x41, %edx
callq 0x20d0
leaq 0x196b5(%rip), %rdi     # 0x32ac6
leaq 0x19568(%rip), %rsi     # 0x32980
leaq 0x195fd(%rip), %rcx     # 0x32a1c
movl $0x42, %edx
callq 0x20d0
leaq 0x1959e(%rip), %rdi     # 0x329ce
leaq 0x19549(%rip), %rsi     # 0x32980
leaq 0x195de(%rip), %rcx     # 0x32a1c
movl $0x43, %edx
callq 0x20d0
leaq 0x19592(%rip), %rdi     # 0x329e1
leaq 0x1952a(%rip), %rsi     # 0x32980
leaq 0x195bf(%rip), %rcx     # 0x32a1c
movl $0x44, %edx
callq 0x20d0
leaq 0x19582(%rip), %rdi     # 0x329f0
leaq 0x1950b(%rip), %rsi     # 0x32980
leaq 0x195a0(%rip), %rcx     # 0x32a1c
movl $0x45, %edx
callq 0x20d0
leaq 0x19604(%rip), %rdi     # 0x32a91
leaq 0x194ec(%rip), %rsi     # 0x32980
leaq 0x19581(%rip), %rcx     # 0x32a1c
movl $0x46, %edx
callq 0x20d0