// File: /workspace/github_cpp_makefile_star2_O1/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 0xaa43
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xaa43
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0xa0e0
testb %al, %al
je 0x2204b
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x1, %esi
movl $0x24, %edx
callq 0xa63d
leaq 0x1d0(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0xa0e0
testb %al, %al
jne 0x2206a
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x24, %esi
callq 0xa7d2
leaq 0x1d0(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0xa0e0
testb %al, %al
je 0x22089
leaq 0x8(%rsp), %rsi
movl $0x0, 0x138(%rsi)
leaq 0x1d0(%rsp), %rdi
movl $0x1, %edx
callq 0xa0e0
testb %al, %al
jne 0x220a8
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa43
leaq 0x1d0(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0xa0e0
testb %al, %al
je 0x220c7
leaq 0x8(%rsp), %rsi
movl $0x24, 0x13c(%rsi)
leaq 0x1d0(%rsp), %rdi
movl $0x1, %edx
callq 0xa0e0
testb %al, %al
jne 0x220e6
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa43
leaq 0x1d0(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0xa0e0
testb %al, %al
je 0x22105
leaq 0x8(%rsp), %rsi
movl $0x1, 0x144(%rsi)
leaq 0x1d0(%rsp), %rdi
movl $0x1, %edx
callq 0xa0e0
testb %al, %al
jne 0x22124
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa43
leaq 0x1d0(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0xa0e0
testb %al, %al
je 0x22143
leaq 0x8(%rsp), %rsi
movl $0x1, 0x148(%rsi)
leaq 0x1d0(%rsp), %rdi
movl $0x1, %edx
callq 0xa0e0
testb %al, %al
jne 0x22162
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa43
leaq 0x1d0(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0xa0e0
testb %al, %al
je 0x22181
leaq 0x8(%rsp), %rsi
movl $0x24, 0x14c(%rsi)
leaq 0x1d0(%rsp), %rdi
movl $0x1, %edx
callq 0xa0e0
testb %al, %al
jne 0x221a0
leaq 0x8(%rsp), %rsi
movl $0x3c, 0x14c(%rsi)
leaq 0x1d0(%rsp), %rdi
movl $0x1, %edx
callq 0xa0e0
testb %al, %al
je 0x221bf
leaq 0x8(%rsp), %rsi
movl $0x24, 0x150(%rsi)
leaq 0x1d0(%rsp), %rdi
movl $0x1, %edx
callq 0xa0e0
testb %al, %al
jne 0x221de
leaq 0x8(%rsp), %rsi
movl $0x4, 0x150(%rsi)
leaq 0x1d0(%rsp), %rdi
movl $0x1, %edx
callq 0xa0e0
testb %al, %al
je 0x221fd
addq $0x398, %rsp            # imm = 0x398
popq %rbx
popq %r14
retq
leaq 0x13905(%rip), %rdi     # 0x35957
leaq 0x1362f(%rip), %rsi     # 0x35688
leaq 0x138e0(%rip), %rcx     # 0x35940
movl $0x65, %edx
callq 0x20d0
leaq 0x138e5(%rip), %rdi     # 0x35956
leaq 0x13610(%rip), %rsi     # 0x35688
leaq 0x138c1(%rip), %rcx     # 0x35940
movl $0x68, %edx
callq 0x20d0
leaq 0x138c7(%rip), %rdi     # 0x35957
leaq 0x135f1(%rip), %rsi     # 0x35688
leaq 0x138a2(%rip), %rcx     # 0x35940
movl $0x6a, %edx
callq 0x20d0
leaq 0x138a7(%rip), %rdi     # 0x35956
leaq 0x135d2(%rip), %rsi     # 0x35688
leaq 0x13883(%rip), %rcx     # 0x35940
movl $0x6d, %edx
callq 0x20d0
leaq 0x13889(%rip), %rdi     # 0x35957
leaq 0x135b3(%rip), %rsi     # 0x35688
leaq 0x13864(%rip), %rcx     # 0x35940
movl $0x6f, %edx
callq 0x20d0
leaq 0x13869(%rip), %rdi     # 0x35956
leaq 0x13594(%rip), %rsi     # 0x35688
leaq 0x13845(%rip), %rcx     # 0x35940
movl $0x72, %edx
callq 0x20d0
leaq 0x1384b(%rip), %rdi     # 0x35957
leaq 0x13575(%rip), %rsi     # 0x35688
leaq 0x13826(%rip), %rcx     # 0x35940
movl $0x74, %edx
callq 0x20d0
leaq 0x1382b(%rip), %rdi     # 0x35956
leaq 0x13556(%rip), %rsi     # 0x35688
leaq 0x13807(%rip), %rcx     # 0x35940
movl $0x77, %edx
callq 0x20d0
leaq 0x1380d(%rip), %rdi     # 0x35957
leaq 0x13537(%rip), %rsi     # 0x35688
leaq 0x137e8(%rip), %rcx     # 0x35940
movl $0x79, %edx
callq 0x20d0
leaq 0x137ed(%rip), %rdi     # 0x35956
leaq 0x13518(%rip), %rsi     # 0x35688
leaq 0x137c9(%rip), %rcx     # 0x35940
movl $0x7c, %edx
callq 0x20d0
leaq 0x137cf(%rip), %rdi     # 0x35957
leaq 0x134f9(%rip), %rsi     # 0x35688
leaq 0x137aa(%rip), %rcx     # 0x35940
movl $0x7e, %edx
callq 0x20d0
leaq 0x137af(%rip), %rdi     # 0x35956
leaq 0x134da(%rip), %rsi     # 0x35688
leaq 0x1378b(%rip), %rcx     # 0x35940
movl $0x81, %edx
callq 0x20d0
leaq 0x13791(%rip), %rdi     # 0x35957
leaq 0x134bb(%rip), %rsi     # 0x35688
leaq 0x1376c(%rip), %rcx     # 0x35940
movl $0x83, %edx
callq 0x20d0
leaq 0x13771(%rip), %rdi     # 0x35956
leaq 0x1349c(%rip), %rsi     # 0x35688
leaq 0x1374d(%rip), %rcx     # 0x35940
movl $0x86, %edx
callq 0x20d0
leaq 0x13753(%rip), %rdi     # 0x35957
leaq 0x1347d(%rip), %rsi     # 0x35688
leaq 0x1372e(%rip), %rcx     # 0x35940
movl $0x88, %edx
callq 0x20d0