// File: jswaff[P]prophet3/test/move__test.cpp
// Function: test_set_capture()
void test_set_capture() {
    move mv = to_move(BISHOP,F3,C6);
    assert(get_piece(mv)==BISHOP);
    assert(get_from_sq(mv)==F3);
    assert(get_to_sq(mv)==C6);
    assert(!is_epcapture(mv));
    assert(!is_capture(mv));
    assert(get_captured_piece(mv)==NO_PIECE);
    assert(!is_castle(mv));
    assert(get_promopiece(mv)==NO_PIECE);

    set_capture(&mv,PAWN);
    assert(get_piece(mv)==BISHOP);
    assert(get_from_sq(mv)==F3);
    assert(get_to_sq(mv)==C6);
    assert(!is_epcapture(mv));
    assert(is_capture(mv));
    assert(get_captured_piece(mv)==PAWN);
    assert(!is_castle(mv));
    assert(get_promopiece(mv)==NO_PIECE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x3, %edi
movl $0x2d, %esi
movl $0x12, %edx
callq 0xa830
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0xaac0
cmpl $0x3, %eax
jne 0x22d90
jmp 0x22daf
leaq 0x1c663(%rip), %rdi     # 0x3f3fa
leaq 0x1c504(%rip), %rsi     # 0x3f2a2
movl $0x4b, %edx
leaq 0x1c666(%rip), %rcx     # 0x3f410
callq 0x20c0
movq -0x8(%rbp), %rdi
callq 0xaa80
cmpl $0x2d, %eax
jne 0x22dbf
jmp 0x22dde
leaq 0x1c662(%rip), %rdi     # 0x3f428
leaq 0x1c4d5(%rip), %rsi     # 0x3f2a2
movl $0x4c, %edx
leaq 0x1c637(%rip), %rcx     # 0x3f410
callq 0x20c0
movq -0x8(%rbp), %rdi
callq 0xaaa0
cmpl $0x12, %eax
jne 0x22dee
jmp 0x22e0d
leaq 0x1c647(%rip), %rdi     # 0x3f43c
leaq 0x1c4a6(%rip), %rsi     # 0x3f2a2
movl $0x4d, %edx
leaq 0x1c608(%rip), %rcx     # 0x3f410
callq 0x20c0
movq -0x8(%rbp), %rdi
callq 0xab50
xorb $-0x1, %al
testb $0x1, %al
jne 0x22e1e
jmp 0x22e20
jmp 0x22e3f
leaq 0x1c4c9(%rip), %rdi     # 0x3f2f0
leaq 0x1c474(%rip), %rsi     # 0x3f2a2
movl $0x4e, %edx
leaq 0x1c5d6(%rip), %rcx     # 0x3f410
callq 0x20c0
movq -0x8(%rbp), %rdi
callq 0xab20
xorb $-0x1, %al
testb $0x1, %al
jne 0x22e50
jmp 0x22e52
jmp 0x22e71
leaq 0x1c4a9(%rip), %rdi     # 0x3f302
leaq 0x1c442(%rip), %rsi     # 0x3f2a2
movl $0x4f, %edx
leaq 0x1c5a4(%rip), %rcx     # 0x3f410
callq 0x20c0
movq -0x8(%rbp), %rdi
callq 0xab00
cmpl $0x0, %eax
jne 0x22e81
jmp 0x22ea0
leaq 0x1c5c6(%rip), %rdi     # 0x3f44e
leaq 0x1c413(%rip), %rsi     # 0x3f2a2
movl $0x50, %edx
leaq 0x1c575(%rip), %rcx     # 0x3f410
callq 0x20c0
movq -0x8(%rbp), %rdi
callq 0xab70
xorb $-0x1, %al
testb $0x1, %al
jne 0x22eb1
jmp 0x22eb3
jmp 0x22ed2
leaq 0x1c458(%rip), %rdi     # 0x3f312
leaq 0x1c3e1(%rip), %rsi     # 0x3f2a2
movl $0x51, %edx
leaq 0x1c543(%rip), %rcx     # 0x3f410
callq 0x20c0
movq -0x8(%rbp), %rdi
callq 0xaae0
cmpl $0x0, %eax
jne 0x22ee2
jmp 0x22f01
leaq 0x1c438(%rip), %rdi     # 0x3f321
leaq 0x1c3b2(%rip), %rsi     # 0x3f2a2
movl $0x52, %edx
leaq 0x1c514(%rip), %rcx     # 0x3f410
callq 0x20c0
leaq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0xa920
movq -0x8(%rbp), %rdi
callq 0xaac0
cmpl $0x3, %eax
jne 0x22f1f
jmp 0x22f3e
leaq 0x1c4d4(%rip), %rdi     # 0x3f3fa
leaq 0x1c375(%rip), %rsi     # 0x3f2a2
movl $0x55, %edx
leaq 0x1c4d7(%rip), %rcx     # 0x3f410
callq 0x20c0
movq -0x8(%rbp), %rdi
callq 0xaa80
cmpl $0x2d, %eax
jne 0x22f4e
jmp 0x22f6d
leaq 0x1c4d3(%rip), %rdi     # 0x3f428
leaq 0x1c346(%rip), %rsi     # 0x3f2a2
movl $0x56, %edx
leaq 0x1c4a8(%rip), %rcx     # 0x3f410
callq 0x20c0
movq -0x8(%rbp), %rdi
callq 0xaaa0
cmpl $0x12, %eax
jne 0x22f7d
jmp 0x22f9c
leaq 0x1c4b8(%rip), %rdi     # 0x3f43c
leaq 0x1c317(%rip), %rsi     # 0x3f2a2
movl $0x57, %edx
leaq 0x1c479(%rip), %rcx     # 0x3f410
callq 0x20c0
movq -0x8(%rbp), %rdi
callq 0xab50
xorb $-0x1, %al
testb $0x1, %al
jne 0x22fad
jmp 0x22faf
jmp 0x22fce
leaq 0x1c33a(%rip), %rdi     # 0x3f2f0
leaq 0x1c2e5(%rip), %rsi     # 0x3f2a2
movl $0x58, %edx
leaq 0x1c447(%rip), %rcx     # 0x3f410
callq 0x20c0
movq -0x8(%rbp), %rdi
callq 0xab20
testb $0x1, %al
jne 0x22fdd
jmp 0x22fdf
jmp 0x22ffe
leaq 0x1c31d(%rip), %rdi     # 0x3f303
leaq 0x1c2b5(%rip), %rsi     # 0x3f2a2
movl $0x59, %edx
leaq 0x1c417(%rip), %rcx     # 0x3f410
callq 0x20c0
movq -0x8(%rbp), %rdi
callq 0xab00
cmpl $0x1, %eax
jne 0x2300e
jmp 0x2302d
leaq 0x1c45a(%rip), %rdi     # 0x3f46f
leaq 0x1c286(%rip), %rsi     # 0x3f2a2
movl $0x5a, %edx
leaq 0x1c3e8(%rip), %rcx     # 0x3f410
callq 0x20c0
movq -0x8(%rbp), %rdi
callq 0xab70
xorb $-0x1, %al
testb $0x1, %al
jne 0x2303e
jmp 0x23040
jmp 0x2305f
leaq 0x1c2cb(%rip), %rdi     # 0x3f312
leaq 0x1c254(%rip), %rsi     # 0x3f2a2
movl $0x5b, %edx
leaq 0x1c3b6(%rip), %rcx     # 0x3f410
callq 0x20c0
movq -0x8(%rbp), %rdi
callq 0xaae0
cmpl $0x0, %eax
jne 0x2306f
jmp 0x2308e
leaq 0x1c2ab(%rip), %rdi     # 0x3f321
leaq 0x1c225(%rip), %rsi     # 0x3f2a2
movl $0x5c, %edx
leaq 0x1c387(%rip), %rcx     # 0x3f410
callq 0x20c0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)