// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r14
pushq %rbx
subq $0x390, %rsp            # imm = 0x390
leaq 0x1c8(%rsp), %rbx
movq %rbx, %rdi
callq 0xa187
movq %rsp, %r14
movq %r14, %rdi
callq 0xa187
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x98c8
testb %al, %al
je 0x1fecb
movq %rsp, %rbx
pushq $0x1
popq %rbp
pushq $0x24
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x9db0
leaq 0x1c8(%rsp), %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x98c8
testb %al, %al
jne 0x1fee7
movq %rsp, %rbx
pushq $0x24
popq %rsi
movq %rbx, %rdi
callq 0x9f37
leaq 0x1c8(%rsp), %rdi
pushq $0x1
popq %rdx
movq %rbx, %rsi
callq 0x98c8
testb %al, %al
je 0x1ff03
movq %rsp, %rsi
andl $0x0, 0x138(%rsi)
leaq 0x1c8(%rsp), %rdi
pushq $0x1
popq %rdx
callq 0x98c8
testb %al, %al
jne 0x1ff1f
movq %rsp, %rbx
movq %rbx, %rdi
callq 0xa187
leaq 0x1c8(%rsp), %rdi
pushq $0x1
popq %rdx
movq %rbx, %rsi
callq 0x98c8
testb %al, %al
je 0x1ff3b
movq %rsp, %rsi
movl $0x24, 0x13c(%rsi)
leaq 0x1c8(%rsp), %rdi
pushq $0x1
popq %rdx
callq 0x98c8
testb %al, %al
jne 0x1ff57
movq %rsp, %rbx
movq %rbx, %rdi
callq 0xa187
leaq 0x1c8(%rsp), %rdi
pushq $0x1
popq %rdx
movq %rbx, %rsi
callq 0x98c8
testb %al, %al
je 0x1ff70
movq %rsp, %rsi
movl $0x1, 0x144(%rsi)
leaq 0x1c8(%rsp), %rdi
pushq $0x1
popq %rdx
callq 0x98c8
testb %al, %al
jne 0x1ff89
movq %rsp, %rbx
movq %rbx, %rdi
callq 0xa187
leaq 0x1c8(%rsp), %rdi
pushq $0x1
popq %rdx
movq %rbx, %rsi
callq 0x98c8
testb %al, %al
je 0x1ffa2
movq %rsp, %rsi
movl $0x1, 0x148(%rsi)
leaq 0x1c8(%rsp), %rdi
pushq $0x1
popq %rdx
callq 0x98c8
testb %al, %al
jne 0x1ffbb
movq %rsp, %rbx
movq %rbx, %rdi
callq 0xa187
leaq 0x1c8(%rsp), %rdi
pushq $0x1
popq %rdx
movq %rbx, %rsi
callq 0x98c8
testb %al, %al
je 0x1ffd4
movq %rsp, %rsi
movl $0x24, 0x14c(%rsi)
leaq 0x1c8(%rsp), %rdi
pushq $0x1
popq %rdx
callq 0x98c8
testb %al, %al
jne 0x1fff1
movq %rsp, %rsi
movl $0x3c, 0x14c(%rsi)
leaq 0x1c8(%rsp), %rdi
pushq $0x1
popq %rdx
callq 0x98c8
testb %al, %al
je 0x20010
movq %rsp, %rsi
movl $0x24, 0x150(%rsi)
leaq 0x1c8(%rsp), %rdi
pushq $0x1
popq %rdx
callq 0x98c8
testb %al, %al
jne 0x2002f
movq %rsp, %rsi
movl $0x4, 0x150(%rsi)
leaq 0x1c8(%rsp), %rdi
pushq $0x1
popq %rdx
callq 0x98c8
testb %al, %al
je 0x2004e
addq $0x390, %rsp            # imm = 0x390
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x13bc9(%rip), %rdi     # 0x33a9b
leaq 0x138f3(%rip), %rsi     # 0x337cc
leaq 0x13ba4(%rip), %rcx     # 0x33a84
pushq $0x65
jmp 0x1ffeb
leaq 0x13bac(%rip), %rdi     # 0x33a9a
leaq 0x138d7(%rip), %rsi     # 0x337cc
leaq 0x13b88(%rip), %rcx     # 0x33a84
pushq $0x68
jmp 0x1ffeb
leaq 0x13b91(%rip), %rdi     # 0x33a9b
leaq 0x138bb(%rip), %rsi     # 0x337cc
leaq 0x13b6c(%rip), %rcx     # 0x33a84
pushq $0x6a
jmp 0x1ffeb
leaq 0x13b74(%rip), %rdi     # 0x33a9a
leaq 0x1389f(%rip), %rsi     # 0x337cc
leaq 0x13b50(%rip), %rcx     # 0x33a84
pushq $0x6d
jmp 0x1ffeb
leaq 0x13b59(%rip), %rdi     # 0x33a9b
leaq 0x13883(%rip), %rsi     # 0x337cc
leaq 0x13b34(%rip), %rcx     # 0x33a84
pushq $0x6f
jmp 0x1ffeb
leaq 0x13b3c(%rip), %rdi     # 0x33a9a
leaq 0x13867(%rip), %rsi     # 0x337cc
leaq 0x13b18(%rip), %rcx     # 0x33a84
pushq $0x72
jmp 0x1ffeb
leaq 0x13b24(%rip), %rdi     # 0x33a9b
leaq 0x1384e(%rip), %rsi     # 0x337cc
leaq 0x13aff(%rip), %rcx     # 0x33a84
pushq $0x74
jmp 0x1ffeb
leaq 0x13b0a(%rip), %rdi     # 0x33a9a
leaq 0x13835(%rip), %rsi     # 0x337cc
leaq 0x13ae6(%rip), %rcx     # 0x33a84
pushq $0x77
jmp 0x1ffeb
leaq 0x13af2(%rip), %rdi     # 0x33a9b
leaq 0x1381c(%rip), %rsi     # 0x337cc
leaq 0x13acd(%rip), %rcx     # 0x33a84
pushq $0x79
jmp 0x1ffeb
leaq 0x13ad8(%rip), %rdi     # 0x33a9a
leaq 0x13803(%rip), %rsi     # 0x337cc
leaq 0x13ab4(%rip), %rcx     # 0x33a84
pushq $0x7c
jmp 0x1ffeb
leaq 0x13ac0(%rip), %rdi     # 0x33a9b
leaq 0x137ea(%rip), %rsi     # 0x337cc
leaq 0x13a9b(%rip), %rcx     # 0x33a84
pushq $0x7e
popq %rdx
callq 0x20c0
leaq 0x13aa2(%rip), %rdi     # 0x33a9a
leaq 0x137cd(%rip), %rsi     # 0x337cc
leaq 0x13a7e(%rip), %rcx     # 0x33a84
movl $0x81, %edx
callq 0x20c0
leaq 0x13a84(%rip), %rdi     # 0x33a9b
leaq 0x137ae(%rip), %rsi     # 0x337cc
leaq 0x13a5f(%rip), %rcx     # 0x33a84
movl $0x83, %edx
callq 0x20c0
leaq 0x13a64(%rip), %rdi     # 0x33a9a
leaq 0x1378f(%rip), %rsi     # 0x337cc
leaq 0x13a40(%rip), %rcx     # 0x33a84
movl $0x86, %edx
callq 0x20c0
leaq 0x13a46(%rip), %rdi     # 0x33a9b
leaq 0x13770(%rip), %rsi     # 0x337cc
leaq 0x13a21(%rip), %rcx     # 0x33a84
movl $0x88, %edx
callq 0x20c0