// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/pos__test.cpp
// Function: test_equal_pos()
void test_equal_pos() {
    position pos1;
    reset_pos(&pos1);

    position pos2;
    reset_pos(&pos2);

    assert(equal_pos(&pos1,&pos2,true));

    add_piece(&pos2,PAWN,E4);
    assert(!equal_pos(&pos1,&pos2,true));
    remove_piece(&pos2,E4);
    assert(equal_pos(&pos1,&pos2,true));

    pos2.player=BLACK;
    assert(!equal_pos(&pos1,&pos2,true));
    reset_pos(&pos2);
    assert(equal_pos(&pos1,&pos2,true));

    pos2.ep_sq=E4;
    assert(!equal_pos(&pos1,&pos2,true));
    reset_pos(&pos2);
    assert(equal_pos(&pos1,&pos2,true));

    pos2.move_counter=1;
    assert(!equal_pos(&pos1,&pos2,true));
    reset_pos(&pos2);
    assert(equal_pos(&pos1,&pos2,true));

    pos2.fifty_counter=1;
    assert(!equal_pos(&pos1,&pos2,true));
    reset_pos(&pos2);
    assert(equal_pos(&pos1,&pos2,true));

    pos2.white_king=E4;
    assert(!equal_pos(&pos1,&pos2,true));
    pos2.white_king=E1;
    assert(equal_pos(&pos1,&pos2,true));

    pos2.black_king=E4;
    assert(!equal_pos(&pos1,&pos2,true));
    pos2.black_king=E8;
    assert(equal_pos(&pos1,&pos2,true));
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x398, %rsp            # imm = 0x398
leaq 0x1d0(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa51
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xaa51
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0xa0b8
testb %al, %al
je 0x21ecb
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x1, %esi
movl $0x24, %edx
callq 0xa5f8
leaq 0x1d0(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0xa0b8
testb %al, %al
jne 0x21eea
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x24, %esi
callq 0xa78d
leaq 0x1d0(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0xa0b8
testb %al, %al
je 0x21f09
leaq 0x8(%rsp), %rsi
movl $0x0, 0x138(%rsi)
leaq 0x1d0(%rsp), %rdi
movl $0x1, %edx
callq 0xa0b8
testb %al, %al
jne 0x21f28
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa51
leaq 0x1d0(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0xa0b8
testb %al, %al
je 0x21f47
leaq 0x8(%rsp), %rsi
movl $0x24, 0x13c(%rsi)
leaq 0x1d0(%rsp), %rdi
movl $0x1, %edx
callq 0xa0b8
testb %al, %al
jne 0x21f66
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa51
leaq 0x1d0(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0xa0b8
testb %al, %al
je 0x21f85
leaq 0x8(%rsp), %rsi
movl $0x1, 0x144(%rsi)
leaq 0x1d0(%rsp), %rdi
movl $0x1, %edx
callq 0xa0b8
testb %al, %al
jne 0x21fa4
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa51
leaq 0x1d0(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0xa0b8
testb %al, %al
je 0x21fc3
leaq 0x8(%rsp), %rsi
movl $0x1, 0x148(%rsi)
leaq 0x1d0(%rsp), %rdi
movl $0x1, %edx
callq 0xa0b8
testb %al, %al
jne 0x21fe2
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa51
leaq 0x1d0(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0xa0b8
testb %al, %al
je 0x22001
leaq 0x8(%rsp), %rsi
movl $0x24, 0x14c(%rsi)
leaq 0x1d0(%rsp), %rdi
movl $0x1, %edx
callq 0xa0b8
testb %al, %al
jne 0x22020
leaq 0x8(%rsp), %rsi
movl $0x3c, 0x14c(%rsi)
leaq 0x1d0(%rsp), %rdi
movl $0x1, %edx
callq 0xa0b8
testb %al, %al
je 0x2203f
leaq 0x8(%rsp), %rsi
movl $0x24, 0x150(%rsi)
leaq 0x1d0(%rsp), %rdi
movl $0x1, %edx
callq 0xa0b8
testb %al, %al
jne 0x2205e
leaq 0x8(%rsp), %rsi
movl $0x4, 0x150(%rsi)
leaq 0x1d0(%rsp), %rdi
movl $0x1, %edx
callq 0xa0b8
testb %al, %al
je 0x2207d
addq $0x398, %rsp            # imm = 0x398
popq %rbx
popq %r14
retq
leaq 0x13b05(%rip), %rdi     # 0x359d7
leaq 0x1382f(%rip), %rsi     # 0x35708
leaq 0x13ae0(%rip), %rcx     # 0x359c0
movl $0x65, %edx
callq 0x20d0
leaq 0x13ae5(%rip), %rdi     # 0x359d6
leaq 0x13810(%rip), %rsi     # 0x35708
leaq 0x13ac1(%rip), %rcx     # 0x359c0
movl $0x68, %edx
callq 0x20d0
leaq 0x13ac7(%rip), %rdi     # 0x359d7
leaq 0x137f1(%rip), %rsi     # 0x35708
leaq 0x13aa2(%rip), %rcx     # 0x359c0
movl $0x6a, %edx
callq 0x20d0
leaq 0x13aa7(%rip), %rdi     # 0x359d6
leaq 0x137d2(%rip), %rsi     # 0x35708
leaq 0x13a83(%rip), %rcx     # 0x359c0
movl $0x6d, %edx
callq 0x20d0
leaq 0x13a89(%rip), %rdi     # 0x359d7
leaq 0x137b3(%rip), %rsi     # 0x35708
leaq 0x13a64(%rip), %rcx     # 0x359c0
movl $0x6f, %edx
callq 0x20d0
leaq 0x13a69(%rip), %rdi     # 0x359d6
leaq 0x13794(%rip), %rsi     # 0x35708
leaq 0x13a45(%rip), %rcx     # 0x359c0
movl $0x72, %edx
callq 0x20d0
leaq 0x13a4b(%rip), %rdi     # 0x359d7
leaq 0x13775(%rip), %rsi     # 0x35708
leaq 0x13a26(%rip), %rcx     # 0x359c0
movl $0x74, %edx
callq 0x20d0
leaq 0x13a2b(%rip), %rdi     # 0x359d6
leaq 0x13756(%rip), %rsi     # 0x35708
leaq 0x13a07(%rip), %rcx     # 0x359c0
movl $0x77, %edx
callq 0x20d0
leaq 0x13a0d(%rip), %rdi     # 0x359d7
leaq 0x13737(%rip), %rsi     # 0x35708
leaq 0x139e8(%rip), %rcx     # 0x359c0
movl $0x79, %edx
callq 0x20d0
leaq 0x139ed(%rip), %rdi     # 0x359d6
leaq 0x13718(%rip), %rsi     # 0x35708
leaq 0x139c9(%rip), %rcx     # 0x359c0
movl $0x7c, %edx
callq 0x20d0
leaq 0x139cf(%rip), %rdi     # 0x359d7
leaq 0x136f9(%rip), %rsi     # 0x35708
leaq 0x139aa(%rip), %rcx     # 0x359c0
movl $0x7e, %edx
callq 0x20d0
leaq 0x139af(%rip), %rdi     # 0x359d6
leaq 0x136da(%rip), %rsi     # 0x35708
leaq 0x1398b(%rip), %rcx     # 0x359c0
movl $0x81, %edx
callq 0x20d0
leaq 0x13991(%rip), %rdi     # 0x359d7
leaq 0x136bb(%rip), %rsi     # 0x35708
leaq 0x1396c(%rip), %rcx     # 0x359c0
movl $0x83, %edx
callq 0x20d0
leaq 0x13971(%rip), %rdi     # 0x359d6
leaq 0x1369c(%rip), %rsi     # 0x35708
leaq 0x1394d(%rip), %rcx     # 0x359c0
movl $0x86, %edx
callq 0x20d0
leaq 0x13953(%rip), %rdi     # 0x359d7
leaq 0x1367d(%rip), %rsi     # 0x35708
leaq 0x1392e(%rip), %rcx     # 0x359c0
movl $0x88, %edx
callq 0x20d0