// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/test/draw__test.cpp
// Function: test_is_draw_by_rep()
void test_is_draw_by_rep() {
    position pos;

    reset_pos(&pos);
    assert(!is_draw_by_rep(&pos,gundos));

    apply_move(&pos,to_move(PAWN,E2,E4),gundos);
    assert(!is_draw_by_rep(&pos,gundos));

    apply_move(&pos,to_move(KNIGHT,G8,F6),gundos);
    assert(!is_draw_by_rep(&pos,gundos));

    apply_move(&pos,to_move(KNIGHT,G1,F3),gundos);
    assert(!is_draw_by_rep(&pos,gundos));

    apply_move(&pos,to_move(KNIGHT,F6,G8),gundos);
    assert(!is_draw_by_rep(&pos,gundos));

    apply_move(&pos,to_move(KNIGHT,F3,G1),gundos); // still 1 (first has ep square)
    assert(!is_draw_by_rep(&pos,gundos));

    apply_move(&pos,to_move(KNIGHT,G8,F6),gundos); // 2
    assert(!is_draw_by_rep(&pos,gundos));

    apply_move(&pos,to_move(KNIGHT,G1,F3),gundos); // 2
    assert(!is_draw_by_rep(&pos,gundos));

    apply_move(&pos,to_move(KNIGHT,F6,G8),gundos); // 2
    assert(!is_draw_by_rep(&pos,gundos));

    apply_move(&pos,to_move(KNIGHT,F3,G1),gundos); //2
    assert(!is_draw_by_rep(&pos,gundos));

    apply_move(&pos,to_move(KNIGHT,G8,F6),gundos); // 3
    assert(is_draw_by_rep(&pos,gundos));

    apply_move(&pos,to_move(PAWN,D2,D4),gundos);
    assert(!is_draw_by_rep(&pos,gundos));
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rsp, %rbx
movq %rbx, %rdi
callq 0xaa43
leaq 0xb6e07(%rip), %rsi     # 0xc8af0
movq %rbx, %rdi
callq 0x4a11
testb %al, %al
jne 0x11fb9
movl $0x1, %edi
movl $0x34, %esi
movl $0x24, %edx
callq 0x76b8
leaq 0xb6ddc(%rip), %rbx     # 0xc8af0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30e3
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a11
testb %al, %al
jne 0x11fd8
movl $0x2, %edi
movl $0x6, %esi
movl $0x15, %edx
callq 0x76b8
leaq 0xb6d9d(%rip), %rbx     # 0xc8af0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30e3
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a11
testb %al, %al
jne 0x11ff7
movl $0x2, %edi
movl $0x3e, %esi
movl $0x2d, %edx
callq 0x76b8
leaq 0xb6d5e(%rip), %rbx     # 0xc8af0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30e3
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a11
testb %al, %al
jne 0x12016
movl $0x2, %edi
movl $0x15, %esi
movl $0x6, %edx
callq 0x76b8
leaq 0xb6d1f(%rip), %rbx     # 0xc8af0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30e3
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a11
testb %al, %al
jne 0x12035
movl $0x2, %edi
movl $0x2d, %esi
movl $0x3e, %edx
callq 0x76b8
leaq 0xb6ce0(%rip), %rbx     # 0xc8af0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30e3
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a11
testb %al, %al
jne 0x12054
movl $0x2, %edi
movl $0x6, %esi
movl $0x15, %edx
callq 0x76b8
leaq 0xb6ca1(%rip), %rbx     # 0xc8af0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30e3
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a11
testb %al, %al
jne 0x12073
movl $0x2, %edi
movl $0x3e, %esi
movl $0x2d, %edx
callq 0x76b8
leaq 0xb6c62(%rip), %rbx     # 0xc8af0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30e3
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a11
testb %al, %al
jne 0x12092
movl $0x2, %edi
movl $0x15, %esi
movl $0x6, %edx
callq 0x76b8
leaq 0xb6c23(%rip), %rbx     # 0xc8af0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30e3
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a11
testb %al, %al
jne 0x120b1
movl $0x2, %edi
movl $0x2d, %esi
movl $0x3e, %edx
callq 0x76b8
leaq 0xb6be4(%rip), %rbx     # 0xc8af0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30e3
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a11
testb %al, %al
jne 0x120d0
movl $0x2, %edi
movl $0x6, %esi
movl $0x15, %edx
callq 0x76b8
leaq 0xb6ba5(%rip), %rbx     # 0xc8af0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30e3
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a11
testb %al, %al
je 0x120ef
movl $0x1, %edi
movl $0x33, %esi
movl $0x23, %edx
callq 0x76b8
leaq 0xb6b66(%rip), %rbx     # 0xc8af0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30e3
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a11
testb %al, %al
jne 0x1210e
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r14
retq
leaq 0x1d088(%rip), %rdi     # 0x2f048
leaq 0x1cedb(%rip), %rsi     # 0x2eea2
leaq 0x1d097(%rip), %rcx     # 0x2f065
movl $0x59, %edx
callq 0x20d0
leaq 0x1d069(%rip), %rdi     # 0x2f048
leaq 0x1cebc(%rip), %rsi     # 0x2eea2
leaq 0x1d078(%rip), %rcx     # 0x2f065
movl $0x5c, %edx
callq 0x20d0
leaq 0x1d04a(%rip), %rdi     # 0x2f048
leaq 0x1ce9d(%rip), %rsi     # 0x2eea2
leaq 0x1d059(%rip), %rcx     # 0x2f065
movl $0x5f, %edx
callq 0x20d0
leaq 0x1d02b(%rip), %rdi     # 0x2f048
leaq 0x1ce7e(%rip), %rsi     # 0x2eea2
leaq 0x1d03a(%rip), %rcx     # 0x2f065
movl $0x62, %edx
callq 0x20d0
leaq 0x1d00c(%rip), %rdi     # 0x2f048
leaq 0x1ce5f(%rip), %rsi     # 0x2eea2
leaq 0x1d01b(%rip), %rcx     # 0x2f065
movl $0x65, %edx
callq 0x20d0
leaq 0x1cfed(%rip), %rdi     # 0x2f048
leaq 0x1ce40(%rip), %rsi     # 0x2eea2
leaq 0x1cffc(%rip), %rcx     # 0x2f065
movl $0x68, %edx
callq 0x20d0
leaq 0x1cfce(%rip), %rdi     # 0x2f048
leaq 0x1ce21(%rip), %rsi     # 0x2eea2
leaq 0x1cfdd(%rip), %rcx     # 0x2f065
movl $0x6b, %edx
callq 0x20d0
leaq 0x1cfaf(%rip), %rdi     # 0x2f048
leaq 0x1ce02(%rip), %rsi     # 0x2eea2
leaq 0x1cfbe(%rip), %rcx     # 0x2f065
movl $0x6e, %edx
callq 0x20d0
leaq 0x1cf90(%rip), %rdi     # 0x2f048
leaq 0x1cde3(%rip), %rsi     # 0x2eea2
leaq 0x1cf9f(%rip), %rcx     # 0x2f065
movl $0x71, %edx
callq 0x20d0
leaq 0x1cf71(%rip), %rdi     # 0x2f048
leaq 0x1cdc4(%rip), %rsi     # 0x2eea2
leaq 0x1cf80(%rip), %rcx     # 0x2f065
movl $0x74, %edx
callq 0x20d0
leaq 0x1cf53(%rip), %rdi     # 0x2f049
leaq 0x1cda5(%rip), %rsi     # 0x2eea2
leaq 0x1cf61(%rip), %rcx     # 0x2f065
movl $0x77, %edx
callq 0x20d0
leaq 0x1cf33(%rip), %rdi     # 0x2f048
leaq 0x1cd86(%rip), %rsi     # 0x2eea2
leaq 0x1cf42(%rip), %rcx     # 0x2f065
movl $0x7a, %edx
callq 0x20d0