// File: 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 %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
leaq -0x1c8(%rbp), %rdi
callq 0xf390
leaq -0x1c8(%rbp), %rdi
leaq 0xba92b(%rip), %rsi     # 0xd3cb0
callq 0x62d0
xorb $-0x1, %al
testb $0x1, %al
jne 0x19392
jmp 0x19394
jmp 0x193b3
leaq 0x21c74(%rip), %rdi     # 0x3b00f
leaq 0x21ac7(%rip), %rsi     # 0x3ae69
movl $0x59, %edx
leaq 0x21c7e(%rip), %rcx     # 0x3b02c
callq 0x20c0
movl $0x1, %edi
movl $0x34, %esi
movl $0x24, %edx
callq 0xa830
movq %rax, %rsi
leaq -0x1c8(%rbp), %rdi
leaq 0xba8d8(%rip), %rdx     # 0xd3cb0
callq 0x3620
leaq -0x1c8(%rbp), %rdi
leaq 0xba8c5(%rip), %rsi     # 0xd3cb0
callq 0x62d0
xorb $-0x1, %al
testb $0x1, %al
jne 0x193f8
jmp 0x193fa
jmp 0x19419
leaq 0x21c0e(%rip), %rdi     # 0x3b00f
leaq 0x21a61(%rip), %rsi     # 0x3ae69
movl $0x5c, %edx
leaq 0x21c18(%rip), %rcx     # 0x3b02c
callq 0x20c0
movl $0x2, %edi
movl $0x6, %esi
movl $0x15, %edx
callq 0xa830
movq %rax, %rsi
leaq -0x1c8(%rbp), %rdi
leaq 0xba872(%rip), %rdx     # 0xd3cb0
callq 0x3620
leaq -0x1c8(%rbp), %rdi
leaq 0xba85f(%rip), %rsi     # 0xd3cb0
callq 0x62d0
xorb $-0x1, %al
testb $0x1, %al
jne 0x1945e
jmp 0x19460
jmp 0x1947f
leaq 0x21ba8(%rip), %rdi     # 0x3b00f
leaq 0x219fb(%rip), %rsi     # 0x3ae69
movl $0x5f, %edx
leaq 0x21bb2(%rip), %rcx     # 0x3b02c
callq 0x20c0
movl $0x2, %edi
movl $0x3e, %esi
movl $0x2d, %edx
callq 0xa830
movq %rax, %rsi
leaq -0x1c8(%rbp), %rdi
leaq 0xba80c(%rip), %rdx     # 0xd3cb0
callq 0x3620
leaq -0x1c8(%rbp), %rdi
leaq 0xba7f9(%rip), %rsi     # 0xd3cb0
callq 0x62d0
xorb $-0x1, %al
testb $0x1, %al
jne 0x194c4
jmp 0x194c6
jmp 0x194e5
leaq 0x21b42(%rip), %rdi     # 0x3b00f
leaq 0x21995(%rip), %rsi     # 0x3ae69
movl $0x62, %edx
leaq 0x21b4c(%rip), %rcx     # 0x3b02c
callq 0x20c0
movl $0x2, %edi
movl $0x15, %esi
movl $0x6, %edx
callq 0xa830
movq %rax, %rsi
leaq -0x1c8(%rbp), %rdi
leaq 0xba7a6(%rip), %rdx     # 0xd3cb0
callq 0x3620
leaq -0x1c8(%rbp), %rdi
leaq 0xba793(%rip), %rsi     # 0xd3cb0
callq 0x62d0
xorb $-0x1, %al
testb $0x1, %al
jne 0x1952a
jmp 0x1952c
jmp 0x1954b
leaq 0x21adc(%rip), %rdi     # 0x3b00f
leaq 0x2192f(%rip), %rsi     # 0x3ae69
movl $0x65, %edx
leaq 0x21ae6(%rip), %rcx     # 0x3b02c
callq 0x20c0
movl $0x2, %edi
movl $0x2d, %esi
movl $0x3e, %edx
callq 0xa830
movq %rax, %rsi
leaq -0x1c8(%rbp), %rdi
leaq 0xba740(%rip), %rdx     # 0xd3cb0
callq 0x3620
leaq -0x1c8(%rbp), %rdi
leaq 0xba72d(%rip), %rsi     # 0xd3cb0
callq 0x62d0
xorb $-0x1, %al
testb $0x1, %al
jne 0x19590
jmp 0x19592
jmp 0x195b1
leaq 0x21a76(%rip), %rdi     # 0x3b00f
leaq 0x218c9(%rip), %rsi     # 0x3ae69
movl $0x68, %edx
leaq 0x21a80(%rip), %rcx     # 0x3b02c
callq 0x20c0
movl $0x2, %edi
movl $0x6, %esi
movl $0x15, %edx
callq 0xa830
movq %rax, %rsi
leaq -0x1c8(%rbp), %rdi
leaq 0xba6da(%rip), %rdx     # 0xd3cb0
callq 0x3620
leaq -0x1c8(%rbp), %rdi
leaq 0xba6c7(%rip), %rsi     # 0xd3cb0
callq 0x62d0
xorb $-0x1, %al
testb $0x1, %al
jne 0x195f6
jmp 0x195f8
jmp 0x19617
leaq 0x21a10(%rip), %rdi     # 0x3b00f
leaq 0x21863(%rip), %rsi     # 0x3ae69
movl $0x6b, %edx
leaq 0x21a1a(%rip), %rcx     # 0x3b02c
callq 0x20c0
movl $0x2, %edi
movl $0x3e, %esi
movl $0x2d, %edx
callq 0xa830
movq %rax, %rsi
leaq -0x1c8(%rbp), %rdi
leaq 0xba674(%rip), %rdx     # 0xd3cb0
callq 0x3620
leaq -0x1c8(%rbp), %rdi
leaq 0xba661(%rip), %rsi     # 0xd3cb0
callq 0x62d0
xorb $-0x1, %al
testb $0x1, %al
jne 0x1965c
jmp 0x1965e
jmp 0x1967d
leaq 0x219aa(%rip), %rdi     # 0x3b00f
leaq 0x217fd(%rip), %rsi     # 0x3ae69
movl $0x6e, %edx
leaq 0x219b4(%rip), %rcx     # 0x3b02c
callq 0x20c0
movl $0x2, %edi
movl $0x15, %esi
movl $0x6, %edx
callq 0xa830
movq %rax, %rsi
leaq -0x1c8(%rbp), %rdi
leaq 0xba60e(%rip), %rdx     # 0xd3cb0
callq 0x3620
leaq -0x1c8(%rbp), %rdi
leaq 0xba5fb(%rip), %rsi     # 0xd3cb0
callq 0x62d0
xorb $-0x1, %al
testb $0x1, %al
jne 0x196c2
jmp 0x196c4
jmp 0x196e3
leaq 0x21944(%rip), %rdi     # 0x3b00f
leaq 0x21797(%rip), %rsi     # 0x3ae69
movl $0x71, %edx
leaq 0x2194e(%rip), %rcx     # 0x3b02c
callq 0x20c0
movl $0x2, %edi
movl $0x2d, %esi
movl $0x3e, %edx
callq 0xa830
movq %rax, %rsi
leaq -0x1c8(%rbp), %rdi
leaq 0xba5a8(%rip), %rdx     # 0xd3cb0
callq 0x3620
leaq -0x1c8(%rbp), %rdi
leaq 0xba595(%rip), %rsi     # 0xd3cb0
callq 0x62d0
xorb $-0x1, %al
testb $0x1, %al
jne 0x19728
jmp 0x1972a
jmp 0x19749
leaq 0x218de(%rip), %rdi     # 0x3b00f
leaq 0x21731(%rip), %rsi     # 0x3ae69
movl $0x74, %edx
leaq 0x218e8(%rip), %rcx     # 0x3b02c
callq 0x20c0
movl $0x2, %edi
movl $0x6, %esi
movl $0x15, %edx
callq 0xa830
movq %rax, %rsi
leaq -0x1c8(%rbp), %rdi
leaq 0xba542(%rip), %rdx     # 0xd3cb0
callq 0x3620
leaq -0x1c8(%rbp), %rdi
leaq 0xba52f(%rip), %rsi     # 0xd3cb0
callq 0x62d0
testb $0x1, %al
jne 0x1978c
jmp 0x1978e
jmp 0x197ad
leaq 0x2187b(%rip), %rdi     # 0x3b010
leaq 0x216cd(%rip), %rsi     # 0x3ae69
movl $0x77, %edx
leaq 0x21884(%rip), %rcx     # 0x3b02c
callq 0x20c0
movl $0x1, %edi
movl $0x33, %esi
movl $0x23, %edx
callq 0xa830
movq %rax, %rsi
leaq -0x1c8(%rbp), %rdi
leaq 0xba4de(%rip), %rdx     # 0xd3cb0
callq 0x3620
leaq -0x1c8(%rbp), %rdi
leaq 0xba4cb(%rip), %rsi     # 0xd3cb0
callq 0x62d0
xorb $-0x1, %al
testb $0x1, %al
jne 0x197f2
jmp 0x197f4
jmp 0x19813
leaq 0x21814(%rip), %rdi     # 0x3b00f
leaq 0x21667(%rip), %rsi     # 0x3ae69
movl $0x7a, %edx
leaq 0x2181e(%rip), %rcx     # 0x3b02c
callq 0x20c0
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopl (%rax)