// File: jswaff[P]prophet3/test/utils__test.cpp
// Function: test_gs_draw_by_rep()
void test_gs_draw_by_rep() {
    reset_pos(&gpos);
    assert(get_game_status()!=DRAW_REP);

    apply_move(&gpos,to_move(PAWN,E2,E4),gundos);
    assert(get_game_status()!=DRAW_REP);

    apply_move(&gpos,to_move(KNIGHT,G8,F6),gundos);
    assert(get_game_status()!=DRAW_REP);

    apply_move(&gpos,to_move(KNIGHT,G1,F3),gundos);
    assert(get_game_status()!=DRAW_REP);

    apply_move(&gpos,to_move(KNIGHT,F6,G8),gundos);
    assert(get_game_status()!=DRAW_REP);

    apply_move(&gpos,to_move(KNIGHT,F3,G1),gundos);
    assert(get_game_status()!=DRAW_REP); // still 1 (first has ep square)

    apply_move(&gpos,to_move(KNIGHT,G8,F6),gundos);
    assert(get_game_status()!=DRAW_REP); // 2

    apply_move(&gpos,to_move(KNIGHT,G1,F3),gundos);
    assert(get_game_status()!=DRAW_REP); // 2

    apply_move(&gpos,to_move(KNIGHT,F6,G8),gundos);
    assert(get_game_status()!=DRAW_REP); // 2

    apply_move(&gpos,to_move(KNIGHT,F3,G1),gundos);
    assert(get_game_status()!=DRAW_REP); // 2

    apply_move(&gpos,to_move(KNIGHT,G8,F6),gundos);
    assert(get_game_status()==DRAW_REP); // 3

    apply_move(&gpos,to_move(PAWN,D2,D4),gundos);
    assert(get_game_status()!=DRAW_REP);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x9f645(%rip), %rdi     # 0xd3ae0
callq 0xf390
callq 0x14e20
cmpl $0x5, %eax
je 0x344ac
jmp 0x344cb
leaq 0x10c3c(%rip), %rdi     # 0x450ef
leaq 0x103c2(%rip), %rsi     # 0x4487c
movl $0x11f, %edx            # imm = 0x11F
leaq 0x10c45(%rip), %rcx     # 0x4510b
callq 0x20c0
movl $0x1, %edi
movl $0x34, %esi
movl $0x24, %edx
callq 0xa830
movq %rax, %rsi
leaq 0x9f5f7(%rip), %rdi     # 0xd3ae0
leaq 0x9f7c0(%rip), %rdx     # 0xd3cb0
callq 0x3620
callq 0x14e20
cmpl $0x5, %eax
je 0x34501
jmp 0x34520
leaq 0x10be7(%rip), %rdi     # 0x450ef
leaq 0x1036d(%rip), %rsi     # 0x4487c
movl $0x122, %edx            # imm = 0x122
leaq 0x10bf0(%rip), %rcx     # 0x4510b
callq 0x20c0
movl $0x2, %edi
movl $0x6, %esi
movl $0x15, %edx
callq 0xa830
movq %rax, %rsi
leaq 0x9f5a2(%rip), %rdi     # 0xd3ae0
leaq 0x9f76b(%rip), %rdx     # 0xd3cb0
callq 0x3620
callq 0x14e20
cmpl $0x5, %eax
je 0x34556
jmp 0x34575
leaq 0x10b92(%rip), %rdi     # 0x450ef
leaq 0x10318(%rip), %rsi     # 0x4487c
movl $0x125, %edx            # imm = 0x125
leaq 0x10b9b(%rip), %rcx     # 0x4510b
callq 0x20c0
movl $0x2, %edi
movl $0x3e, %esi
movl $0x2d, %edx
callq 0xa830
movq %rax, %rsi
leaq 0x9f54d(%rip), %rdi     # 0xd3ae0
leaq 0x9f716(%rip), %rdx     # 0xd3cb0
callq 0x3620
callq 0x14e20
cmpl $0x5, %eax
je 0x345ab
jmp 0x345ca
leaq 0x10b3d(%rip), %rdi     # 0x450ef
leaq 0x102c3(%rip), %rsi     # 0x4487c
movl $0x128, %edx            # imm = 0x128
leaq 0x10b46(%rip), %rcx     # 0x4510b
callq 0x20c0
movl $0x2, %edi
movl $0x15, %esi
movl $0x6, %edx
callq 0xa830
movq %rax, %rsi
leaq 0x9f4f8(%rip), %rdi     # 0xd3ae0
leaq 0x9f6c1(%rip), %rdx     # 0xd3cb0
callq 0x3620
callq 0x14e20
cmpl $0x5, %eax
je 0x34600
jmp 0x3461f
leaq 0x10ae8(%rip), %rdi     # 0x450ef
leaq 0x1026e(%rip), %rsi     # 0x4487c
movl $0x12b, %edx            # imm = 0x12B
leaq 0x10af1(%rip), %rcx     # 0x4510b
callq 0x20c0
movl $0x2, %edi
movl $0x2d, %esi
movl $0x3e, %edx
callq 0xa830
movq %rax, %rsi
leaq 0x9f4a3(%rip), %rdi     # 0xd3ae0
leaq 0x9f66c(%rip), %rdx     # 0xd3cb0
callq 0x3620
callq 0x14e20
cmpl $0x5, %eax
je 0x34655
jmp 0x34674
leaq 0x10a93(%rip), %rdi     # 0x450ef
leaq 0x10219(%rip), %rsi     # 0x4487c
movl $0x12e, %edx            # imm = 0x12E
leaq 0x10a9c(%rip), %rcx     # 0x4510b
callq 0x20c0
movl $0x2, %edi
movl $0x6, %esi
movl $0x15, %edx
callq 0xa830
movq %rax, %rsi
leaq 0x9f44e(%rip), %rdi     # 0xd3ae0
leaq 0x9f617(%rip), %rdx     # 0xd3cb0
callq 0x3620
callq 0x14e20
cmpl $0x5, %eax
je 0x346aa
jmp 0x346c9
leaq 0x10a3e(%rip), %rdi     # 0x450ef
leaq 0x101c4(%rip), %rsi     # 0x4487c
movl $0x131, %edx            # imm = 0x131
leaq 0x10a47(%rip), %rcx     # 0x4510b
callq 0x20c0
movl $0x2, %edi
movl $0x3e, %esi
movl $0x2d, %edx
callq 0xa830
movq %rax, %rsi
leaq 0x9f3f9(%rip), %rdi     # 0xd3ae0
leaq 0x9f5c2(%rip), %rdx     # 0xd3cb0
callq 0x3620
callq 0x14e20
cmpl $0x5, %eax
je 0x346ff
jmp 0x3471e
leaq 0x109e9(%rip), %rdi     # 0x450ef
leaq 0x1016f(%rip), %rsi     # 0x4487c
movl $0x134, %edx            # imm = 0x134
leaq 0x109f2(%rip), %rcx     # 0x4510b
callq 0x20c0
movl $0x2, %edi
movl $0x15, %esi
movl $0x6, %edx
callq 0xa830
movq %rax, %rsi
leaq 0x9f3a4(%rip), %rdi     # 0xd3ae0
leaq 0x9f56d(%rip), %rdx     # 0xd3cb0
callq 0x3620
callq 0x14e20
cmpl $0x5, %eax
je 0x34754
jmp 0x34773
leaq 0x10994(%rip), %rdi     # 0x450ef
leaq 0x1011a(%rip), %rsi     # 0x4487c
movl $0x137, %edx            # imm = 0x137
leaq 0x1099d(%rip), %rcx     # 0x4510b
callq 0x20c0
movl $0x2, %edi
movl $0x2d, %esi
movl $0x3e, %edx
callq 0xa830
movq %rax, %rsi
leaq 0x9f34f(%rip), %rdi     # 0xd3ae0
leaq 0x9f518(%rip), %rdx     # 0xd3cb0
callq 0x3620
callq 0x14e20
cmpl $0x5, %eax
je 0x347a9
jmp 0x347c8
leaq 0x1093f(%rip), %rdi     # 0x450ef
leaq 0x100c5(%rip), %rsi     # 0x4487c
movl $0x13a, %edx            # imm = 0x13A
leaq 0x10948(%rip), %rcx     # 0x4510b
callq 0x20c0
movl $0x2, %edi
movl $0x6, %esi
movl $0x15, %edx
callq 0xa830
movq %rax, %rsi
leaq 0x9f2fa(%rip), %rdi     # 0xd3ae0
leaq 0x9f4c3(%rip), %rdx     # 0xd3cb0
callq 0x3620
callq 0x14e20
cmpl $0x5, %eax
jne 0x347fe
jmp 0x3481d
leaq 0x10921(%rip), %rdi     # 0x45126
leaq 0x10070(%rip), %rsi     # 0x4487c
movl $0x13d, %edx            # imm = 0x13D
leaq 0x108f3(%rip), %rcx     # 0x4510b
callq 0x20c0
movl $0x1, %edi
movl $0x33, %esi
movl $0x23, %edx
callq 0xa830
movq %rax, %rsi
leaq 0x9f2a5(%rip), %rdi     # 0xd3ae0
leaq 0x9f46e(%rip), %rdx     # 0xd3cb0
callq 0x3620
callq 0x14e20
cmpl $0x5, %eax
je 0x34853
jmp 0x34872
leaq 0x10895(%rip), %rdi     # 0x450ef
leaq 0x1001b(%rip), %rsi     # 0x4487c
movl $0x140, %edx            # imm = 0x140
leaq 0x1089e(%rip), %rcx     # 0x4510b
callq 0x20c0
popq %rbp
retq
nopw %cs:(%rax,%rax)