// File: /workspace/github_cpp_makefile_star2_O2/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 0xa187
leaq 0xbadd5(%rip), %rsi     # 0xcbaf0
movq %rbx, %rdi
callq 0x47e8
testb %al, %al
jne 0x10fa9
pushq $0x1
popq %rdi
pushq $0x34
popq %rsi
pushq $0x24
popq %rdx
callq 0x7284
leaq 0xbadb0(%rip), %rbx     # 0xcbaf0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x2fa5
movq %r14, %rdi
movq %rbx, %rsi
callq 0x47e8
testb %al, %al
jne 0x10fc5
pushq $0x2
popq %rdi
pushq $0x6
popq %rsi
pushq $0x15
popq %rdx
callq 0x7284
leaq 0xbad77(%rip), %rbx     # 0xcbaf0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x2fa5
movq %r14, %rdi
movq %rbx, %rsi
callq 0x47e8
testb %al, %al
jne 0x10fe1
pushq $0x2
popq %rdi
pushq $0x3e
popq %rsi
pushq $0x2d
popq %rdx
callq 0x7284
leaq 0xbad3e(%rip), %rbx     # 0xcbaf0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x2fa5
movq %r14, %rdi
movq %rbx, %rsi
callq 0x47e8
testb %al, %al
jne 0x10ffd
pushq $0x2
popq %rdi
pushq $0x15
popq %rsi
pushq $0x6
popq %rdx
callq 0x7284
leaq 0xbad05(%rip), %rbx     # 0xcbaf0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x2fa5
movq %r14, %rdi
movq %rbx, %rsi
callq 0x47e8
testb %al, %al
jne 0x11019
pushq $0x2
popq %rdi
pushq $0x2d
popq %rsi
pushq $0x3e
popq %rdx
callq 0x7284
leaq 0xbaccc(%rip), %rbx     # 0xcbaf0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x2fa5
movq %r14, %rdi
movq %rbx, %rsi
callq 0x47e8
testb %al, %al
jne 0x11035
pushq $0x2
popq %rdi
pushq $0x6
popq %rsi
pushq $0x15
popq %rdx
callq 0x7284
leaq 0xbac93(%rip), %rbx     # 0xcbaf0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x2fa5
movq %r14, %rdi
movq %rbx, %rsi
callq 0x47e8
testb %al, %al
jne 0x11051
pushq $0x2
popq %rdi
pushq $0x3e
popq %rsi
pushq $0x2d
popq %rdx
callq 0x7284
leaq 0xbac5a(%rip), %rbx     # 0xcbaf0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x2fa5
movq %r14, %rdi
movq %rbx, %rsi
callq 0x47e8
testb %al, %al
jne 0x1106a
pushq $0x2
popq %rdi
pushq $0x15
popq %rsi
pushq $0x6
popq %rdx
callq 0x7284
leaq 0xbac21(%rip), %rbx     # 0xcbaf0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x2fa5
movq %r14, %rdi
movq %rbx, %rsi
callq 0x47e8
testb %al, %al
jne 0x11083
pushq $0x2
popq %rdi
pushq $0x2d
popq %rsi
pushq $0x3e
popq %rdx
callq 0x7284
leaq 0xbabe8(%rip), %rbx     # 0xcbaf0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x2fa5
movq %r14, %rdi
movq %rbx, %rsi
callq 0x47e8
testb %al, %al
jne 0x1109c
pushq $0x2
popq %rdi
pushq $0x6
popq %rsi
pushq $0x15
popq %rdx
callq 0x7284
leaq 0xbabaf(%rip), %rbx     # 0xcbaf0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x2fa5
movq %r14, %rdi
movq %rbx, %rsi
callq 0x47e8
testb %al, %al
je 0x110b5
pushq $0x1
popq %rdi
pushq $0x33
popq %rsi
pushq $0x23
popq %rdx
callq 0x7284
leaq 0xbab76(%rip), %rbx     # 0xcbaf0
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x2fa5
movq %r14, %rdi
movq %rbx, %rsi
callq 0x47e8
testb %al, %al
jne 0x110ce
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r14
retq
leaq 0x1c0c8(%rip), %rdi     # 0x2d078
leaq 0x1bf1b(%rip), %rsi     # 0x2ced2
leaq 0x1c0d7(%rip), %rcx     # 0x2d095
pushq $0x59
jmp 0x110e5
leaq 0x1c0ac(%rip), %rdi     # 0x2d078
leaq 0x1beff(%rip), %rsi     # 0x2ced2
leaq 0x1c0bb(%rip), %rcx     # 0x2d095
pushq $0x5c
jmp 0x110e5
leaq 0x1c090(%rip), %rdi     # 0x2d078
leaq 0x1bee3(%rip), %rsi     # 0x2ced2
leaq 0x1c09f(%rip), %rcx     # 0x2d095
pushq $0x5f
jmp 0x110e5
leaq 0x1c074(%rip), %rdi     # 0x2d078
leaq 0x1bec7(%rip), %rsi     # 0x2ced2
leaq 0x1c083(%rip), %rcx     # 0x2d095
pushq $0x62
jmp 0x110e5
leaq 0x1c058(%rip), %rdi     # 0x2d078
leaq 0x1beab(%rip), %rsi     # 0x2ced2
leaq 0x1c067(%rip), %rcx     # 0x2d095
pushq $0x65
jmp 0x110e5
leaq 0x1c03c(%rip), %rdi     # 0x2d078
leaq 0x1be8f(%rip), %rsi     # 0x2ced2
leaq 0x1c04b(%rip), %rcx     # 0x2d095
pushq $0x68
jmp 0x110e5
leaq 0x1c020(%rip), %rdi     # 0x2d078
leaq 0x1be73(%rip), %rsi     # 0x2ced2
leaq 0x1c02f(%rip), %rcx     # 0x2d095
pushq $0x6b
jmp 0x110e5
leaq 0x1c007(%rip), %rdi     # 0x2d078
leaq 0x1be5a(%rip), %rsi     # 0x2ced2
leaq 0x1c016(%rip), %rcx     # 0x2d095
pushq $0x6e
jmp 0x110e5
leaq 0x1bfee(%rip), %rdi     # 0x2d078
leaq 0x1be41(%rip), %rsi     # 0x2ced2
leaq 0x1bffd(%rip), %rcx     # 0x2d095
pushq $0x71
jmp 0x110e5
leaq 0x1bfd5(%rip), %rdi     # 0x2d078
leaq 0x1be28(%rip), %rsi     # 0x2ced2
leaq 0x1bfe4(%rip), %rcx     # 0x2d095
pushq $0x74
jmp 0x110e5
leaq 0x1bfbd(%rip), %rdi     # 0x2d079
leaq 0x1be0f(%rip), %rsi     # 0x2ced2
leaq 0x1bfcb(%rip), %rcx     # 0x2d095
pushq $0x77
jmp 0x110e5
leaq 0x1bfa3(%rip), %rdi     # 0x2d078
leaq 0x1bdf6(%rip), %rsi     # 0x2ced2
leaq 0x1bfb2(%rip), %rcx     # 0x2d095
pushq $0x7a
popq %rdx
callq 0x20c0