// File: /workspace/github_cpp_makefile_star2_O3/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 0xaa51
leaq 0xb6ebb(%rip), %rsi     # 0xc8af0
movq %rbx, %rdi
callq 0x4a6d
testb %al, %al
jne 0x11f05
movl $0x1, %edi
movl $0x34, %esi
movl $0x24, %edx
callq 0x775c
leaq 0xb6e90(%rip), %rbx     # 0xc8af0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30e1
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a6d
testb %al, %al
jne 0x11f24
movl $0x2, %edi
movl $0x6, %esi
movl $0x15, %edx
callq 0x775c
leaq 0xb6e51(%rip), %rbx     # 0xc8af0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30e1
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a6d
testb %al, %al
jne 0x11f43
movl $0x2, %edi
movl $0x3e, %esi
movl $0x2d, %edx
callq 0x775c
leaq 0xb6e12(%rip), %rbx     # 0xc8af0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30e1
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a6d
testb %al, %al
jne 0x11f62
movl $0x2, %edi
movl $0x15, %esi
movl $0x6, %edx
callq 0x775c
leaq 0xb6dd3(%rip), %rbx     # 0xc8af0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30e1
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a6d
testb %al, %al
jne 0x11f81
movl $0x2, %edi
movl $0x2d, %esi
movl $0x3e, %edx
callq 0x775c
leaq 0xb6d94(%rip), %rbx     # 0xc8af0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30e1
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a6d
testb %al, %al
jne 0x11fa0
movl $0x2, %edi
movl $0x6, %esi
movl $0x15, %edx
callq 0x775c
leaq 0xb6d55(%rip), %rbx     # 0xc8af0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30e1
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a6d
testb %al, %al
jne 0x11fbf
movl $0x2, %edi
movl $0x3e, %esi
movl $0x2d, %edx
callq 0x775c
leaq 0xb6d16(%rip), %rbx     # 0xc8af0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30e1
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a6d
testb %al, %al
jne 0x11fde
movl $0x2, %edi
movl $0x15, %esi
movl $0x6, %edx
callq 0x775c
leaq 0xb6cd7(%rip), %rbx     # 0xc8af0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30e1
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a6d
testb %al, %al
jne 0x11ffd
movl $0x2, %edi
movl $0x2d, %esi
movl $0x3e, %edx
callq 0x775c
leaq 0xb6c98(%rip), %rbx     # 0xc8af0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30e1
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a6d
testb %al, %al
jne 0x1201c
movl $0x2, %edi
movl $0x6, %esi
movl $0x15, %edx
callq 0x775c
leaq 0xb6c59(%rip), %rbx     # 0xc8af0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30e1
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a6d
testb %al, %al
je 0x1203b
movl $0x1, %edi
movl $0x33, %esi
movl $0x23, %edx
callq 0x775c
leaq 0xb6c1a(%rip), %rbx     # 0xc8af0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30e1
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a6d
testb %al, %al
jne 0x1205a
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r14
retq
leaq 0x1d1bc(%rip), %rdi     # 0x2f0c8
leaq 0x1d00f(%rip), %rsi     # 0x2ef22
leaq 0x1d1cb(%rip), %rcx     # 0x2f0e5
movl $0x59, %edx
callq 0x20d0
leaq 0x1d19d(%rip), %rdi     # 0x2f0c8
leaq 0x1cff0(%rip), %rsi     # 0x2ef22
leaq 0x1d1ac(%rip), %rcx     # 0x2f0e5
movl $0x5c, %edx
callq 0x20d0
leaq 0x1d17e(%rip), %rdi     # 0x2f0c8
leaq 0x1cfd1(%rip), %rsi     # 0x2ef22
leaq 0x1d18d(%rip), %rcx     # 0x2f0e5
movl $0x5f, %edx
callq 0x20d0
leaq 0x1d15f(%rip), %rdi     # 0x2f0c8
leaq 0x1cfb2(%rip), %rsi     # 0x2ef22
leaq 0x1d16e(%rip), %rcx     # 0x2f0e5
movl $0x62, %edx
callq 0x20d0
leaq 0x1d140(%rip), %rdi     # 0x2f0c8
leaq 0x1cf93(%rip), %rsi     # 0x2ef22
leaq 0x1d14f(%rip), %rcx     # 0x2f0e5
movl $0x65, %edx
callq 0x20d0
leaq 0x1d121(%rip), %rdi     # 0x2f0c8
leaq 0x1cf74(%rip), %rsi     # 0x2ef22
leaq 0x1d130(%rip), %rcx     # 0x2f0e5
movl $0x68, %edx
callq 0x20d0
leaq 0x1d102(%rip), %rdi     # 0x2f0c8
leaq 0x1cf55(%rip), %rsi     # 0x2ef22
leaq 0x1d111(%rip), %rcx     # 0x2f0e5
movl $0x6b, %edx
callq 0x20d0
leaq 0x1d0e3(%rip), %rdi     # 0x2f0c8
leaq 0x1cf36(%rip), %rsi     # 0x2ef22
leaq 0x1d0f2(%rip), %rcx     # 0x2f0e5
movl $0x6e, %edx
callq 0x20d0
leaq 0x1d0c4(%rip), %rdi     # 0x2f0c8
leaq 0x1cf17(%rip), %rsi     # 0x2ef22
leaq 0x1d0d3(%rip), %rcx     # 0x2f0e5
movl $0x71, %edx
callq 0x20d0
leaq 0x1d0a5(%rip), %rdi     # 0x2f0c8
leaq 0x1cef8(%rip), %rsi     # 0x2ef22
leaq 0x1d0b4(%rip), %rcx     # 0x2f0e5
movl $0x74, %edx
callq 0x20d0
leaq 0x1d087(%rip), %rdi     # 0x2f0c9
leaq 0x1ced9(%rip), %rsi     # 0x2ef22
leaq 0x1d095(%rip), %rcx     # 0x2f0e5
movl $0x77, %edx
callq 0x20d0
leaq 0x1d067(%rip), %rdi     # 0x2f0c8
leaq 0x1ceba(%rip), %rsi     # 0x2ef22
leaq 0x1d076(%rip), %rcx     # 0x2f0e5
movl $0x7a, %edx
callq 0x20d0