// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x1
popq %rdi
pushq $0x31
popq %rsi
pushq $0x39
popq %rdx
callq 0x7284
movq %rax, %rbx
movq %rax, 0x8(%rsp)
movq %rax, %rdi
callq 0x737c
cmpl $0x1, %eax
jne 0x179fa
movq %rbx, %rdi
callq 0x736b
cmpl $0x31, %eax
jne 0x17a16
movq %rbx, %rdi
callq 0x7372
cmpl $0x39, %eax
jne 0x17a32
movq %rbx, %rdi
callq 0x73a4
testb %al, %al
jne 0x17a4e
movq %rbx, %rdi
callq 0x739a
testb %al, %al
jne 0x17a6a
movq %rbx, %rdi
callq 0x73ae
testb %al, %al
jne 0x17a86
movq %rbx, %rdi
callq 0x7386
testl %eax, %eax
jne 0x17aa2
leaq 0x8(%rsp), %rbx
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x733b
movq (%rbx), %rdi
callq 0x737c
cmpl $0x1, %eax
jne 0x17abe
movq 0x8(%rsp), %rdi
callq 0x736b
cmpl $0x31, %eax
jne 0x17ada
movq 0x8(%rsp), %rdi
callq 0x7372
cmpl $0x39, %eax
jne 0x17af6
movq 0x8(%rsp), %rdi
callq 0x73a4
testb %al, %al
jne 0x17b12
movq 0x8(%rsp), %rdi
callq 0x739a
testb %al, %al
jne 0x17b2e
movq 0x8(%rsp), %rdi
callq 0x73ae
testb %al, %al
jne 0x17b4a
movq 0x8(%rsp), %rdi
callq 0x7386
cmpl $0x4, %eax
jne 0x17b66
leaq 0x8(%rsp), %rbx
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x733b
movq (%rbx), %rdi
callq 0x7386
cmpl $0x3, %eax
jne 0x17b82
leaq 0x8(%rsp), %rbx
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x733b
movq (%rbx), %rdi
callq 0x7386
cmpl $0x5, %eax
jne 0x17b9e
leaq 0x8(%rsp), %rbx
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x733b
movq (%rbx), %rdi
callq 0x7386
cmpl $0x2, %eax
jne 0x17bba
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x733b
movq (%rbx), %rdi
callq 0x737c
cmpl $0x1, %eax
jne 0x17bd6
movq 0x8(%rsp), %rdi
callq 0x736b
cmpl $0x31, %eax
jne 0x17bf2
movq 0x8(%rsp), %rdi
callq 0x7372
cmpl $0x39, %eax
jne 0x17c0e
movq 0x8(%rsp), %rdi
callq 0x73a4
testb %al, %al
jne 0x17c2a
movq 0x8(%rsp), %rdi
callq 0x739a
testb %al, %al
jne 0x17c46
movq 0x8(%rsp), %rdi
callq 0x73ae
testb %al, %al
jne 0x17c62
movq 0x8(%rsp), %rdi
callq 0x7386
testl %eax, %eax
jne 0x17c7e
pushq $0x1
popq %rdi
pushq $0x31
popq %rsi
pushq $0x38
popq %rdx
pushq $0x4
popq %rcx
callq 0x72a3
leaq 0x8(%rsp), %rbx
movq %rax, (%rbx)
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x733b
movq (%rbx), %rdi
callq 0x737c
cmpl $0x1, %eax
jne 0x17c9a
movq 0x8(%rsp), %rdi
callq 0x736b
cmpl $0x31, %eax
jne 0x17cb6
movq 0x8(%rsp), %rdi
callq 0x7372
cmpl $0x38, %eax
jne 0x17ccf
movq 0x8(%rsp), %rdi
callq 0x73a4
testb %al, %al
jne 0x17ce8
movq 0x8(%rsp), %rdi
callq 0x739a
testb %al, %al
je 0x17d01
movq 0x8(%rsp), %rdi
callq 0x73ae
testb %al, %al
jne 0x17d1a
movq 0x8(%rsp), %rdi
callq 0x7386
cmpl $0x5, %eax
jne 0x17d33
addq $0x10, %rsp
popq %rbx
retq
leaq 0x18464(%rip), %rdi     # 0x2fe65
leaq 0x190bb(%rip), %rsi     # 0x30ac3
leaq 0x19150(%rip), %rcx     # 0x30b5f
pushq $0x1a
jmp 0x17d4a
leaq 0x1915d(%rip), %rdi     # 0x30b7a
leaq 0x1909f(%rip), %rsi     # 0x30ac3
leaq 0x19134(%rip), %rcx     # 0x30b5f
pushq $0x1b
jmp 0x17d4a
leaq 0x19155(%rip), %rdi     # 0x30b8e
leaq 0x19083(%rip), %rsi     # 0x30ac3
leaq 0x19118(%rip), %rcx     # 0x30b5f
pushq $0x1c
jmp 0x17d4a
leaq 0x190bc(%rip), %rdi     # 0x30b11
leaq 0x19067(%rip), %rsi     # 0x30ac3
leaq 0x190fc(%rip), %rcx     # 0x30b5f
pushq $0x1d
jmp 0x17d4a
leaq 0x190b2(%rip), %rdi     # 0x30b23
leaq 0x1904b(%rip), %rsi     # 0x30ac3
leaq 0x190e0(%rip), %rcx     # 0x30b5f
pushq $0x1e
jmp 0x17d4a
leaq 0x190a6(%rip), %rdi     # 0x30b33
leaq 0x1902f(%rip), %rsi     # 0x30ac3
leaq 0x190c4(%rip), %rcx     # 0x30b5f
pushq $0x1f
jmp 0x17d4a
leaq 0x19099(%rip), %rdi     # 0x30b42
leaq 0x19013(%rip), %rsi     # 0x30ac3
leaq 0x190a8(%rip), %rcx     # 0x30b5f
pushq $0x20
jmp 0x17d4a
leaq 0x183a0(%rip), %rdi     # 0x2fe65
leaq 0x18ff7(%rip), %rsi     # 0x30ac3
leaq 0x1908c(%rip), %rcx     # 0x30b5f
pushq $0x23
jmp 0x17d4a
leaq 0x19099(%rip), %rdi     # 0x30b7a
leaq 0x18fdb(%rip), %rsi     # 0x30ac3
leaq 0x19070(%rip), %rcx     # 0x30b5f
pushq $0x24
jmp 0x17d4a
leaq 0x19091(%rip), %rdi     # 0x30b8e
leaq 0x18fbf(%rip), %rsi     # 0x30ac3
leaq 0x19054(%rip), %rcx     # 0x30b5f
pushq $0x25
jmp 0x17d4a
leaq 0x18ff8(%rip), %rdi     # 0x30b11
leaq 0x18fa3(%rip), %rsi     # 0x30ac3
leaq 0x19038(%rip), %rcx     # 0x30b5f
pushq $0x26
jmp 0x17d4a
leaq 0x18fee(%rip), %rdi     # 0x30b23
leaq 0x18f87(%rip), %rsi     # 0x30ac3
leaq 0x1901c(%rip), %rcx     # 0x30b5f
pushq $0x27
jmp 0x17d4a
leaq 0x18fe2(%rip), %rdi     # 0x30b33
leaq 0x18f6b(%rip), %rsi     # 0x30ac3
leaq 0x19000(%rip), %rcx     # 0x30b5f
pushq $0x28
jmp 0x17d4a
leaq 0x19033(%rip), %rdi     # 0x30ba0
leaq 0x18f4f(%rip), %rsi     # 0x30ac3
leaq 0x18fe4(%rip), %rcx     # 0x30b5f
pushq $0x29
jmp 0x17d4a
leaq 0x19030(%rip), %rdi     # 0x30bb9
leaq 0x18f33(%rip), %rsi     # 0x30ac3
leaq 0x18fc8(%rip), %rcx     # 0x30b5f
pushq $0x2c
jmp 0x17d4a
leaq 0x1902f(%rip), %rdi     # 0x30bd4
leaq 0x18f17(%rip), %rsi     # 0x30ac3
leaq 0x18fac(%rip), %rcx     # 0x30b5f
pushq $0x2f
jmp 0x17d4a
leaq 0x1902d(%rip), %rdi     # 0x30bee
leaq 0x18efb(%rip), %rsi     # 0x30ac3
leaq 0x18f90(%rip), %rcx     # 0x30b5f
pushq $0x32
jmp 0x17d4a
leaq 0x18288(%rip), %rdi     # 0x2fe65
leaq 0x18edf(%rip), %rsi     # 0x30ac3
leaq 0x18f74(%rip), %rcx     # 0x30b5f
pushq $0x35
jmp 0x17d4a
leaq 0x18f81(%rip), %rdi     # 0x30b7a
leaq 0x18ec3(%rip), %rsi     # 0x30ac3
leaq 0x18f58(%rip), %rcx     # 0x30b5f
pushq $0x36
jmp 0x17d4a
leaq 0x18f79(%rip), %rdi     # 0x30b8e
leaq 0x18ea7(%rip), %rsi     # 0x30ac3
leaq 0x18f3c(%rip), %rcx     # 0x30b5f
pushq $0x37
jmp 0x17d4a
leaq 0x18ee0(%rip), %rdi     # 0x30b11
leaq 0x18e8b(%rip), %rsi     # 0x30ac3
leaq 0x18f20(%rip), %rcx     # 0x30b5f
pushq $0x38
jmp 0x17d4a
leaq 0x18ed6(%rip), %rdi     # 0x30b23
leaq 0x18e6f(%rip), %rsi     # 0x30ac3
leaq 0x18f04(%rip), %rcx     # 0x30b5f
pushq $0x39
jmp 0x17d4a
leaq 0x18eca(%rip), %rdi     # 0x30b33
leaq 0x18e53(%rip), %rsi     # 0x30ac3
leaq 0x18ee8(%rip), %rcx     # 0x30b5f
pushq $0x3a
jmp 0x17d4a
leaq 0x18ebd(%rip), %rdi     # 0x30b42
leaq 0x18e37(%rip), %rsi     # 0x30ac3
leaq 0x18ecc(%rip), %rcx     # 0x30b5f
pushq $0x3b
jmp 0x17d4a
leaq 0x181c4(%rip), %rdi     # 0x2fe65
leaq 0x18e1b(%rip), %rsi     # 0x30ac3
leaq 0x18eb0(%rip), %rcx     # 0x30b5f
pushq $0x40
jmp 0x17d4a
leaq 0x18ebd(%rip), %rdi     # 0x30b7a
leaq 0x18dff(%rip), %rsi     # 0x30ac3
leaq 0x18e94(%rip), %rcx     # 0x30b5f
pushq $0x41
jmp 0x17d4a
leaq 0x18f33(%rip), %rdi     # 0x30c09
leaq 0x18de6(%rip), %rsi     # 0x30ac3
leaq 0x18e7b(%rip), %rcx     # 0x30b5f
pushq $0x42
jmp 0x17d4a
leaq 0x18e22(%rip), %rdi     # 0x30b11
leaq 0x18dcd(%rip), %rsi     # 0x30ac3
leaq 0x18e62(%rip), %rcx     # 0x30b5f
pushq $0x43
jmp 0x17d4a
leaq 0x18e1c(%rip), %rdi     # 0x30b24
leaq 0x18db4(%rip), %rsi     # 0x30ac3
leaq 0x18e49(%rip), %rcx     # 0x30b5f
pushq $0x44
jmp 0x17d4a
leaq 0x18e12(%rip), %rdi     # 0x30b33
leaq 0x18d9b(%rip), %rsi     # 0x30ac3
leaq 0x18e30(%rip), %rcx     # 0x30b5f
pushq $0x45
jmp 0x17d4a
leaq 0x18e9a(%rip), %rdi     # 0x30bd4
leaq 0x18d82(%rip), %rsi     # 0x30ac3
leaq 0x18e17(%rip), %rcx     # 0x30b5f
pushq $0x46
popq %rdx
callq 0x20c0