LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/next__test.cpp
// Function: test_place_move_on_top()
void test_place_move_on_top() {
    move moves[5];
    move e2e3 = moves[0] = to_move(PAWN,E2,E3);
    move e2e4 = moves[1] = to_move(PAWN,E2,E4);
    moves[2] = BADMOVE;
    move a2a3 = moves[3] = to_move(PAWN,A2,A3);
    move g1f3 = moves[4] = to_move(KNIGHT,G1,F3);

    assert(!place_move_on_top(moves,moves+5,BADMOVE));
    assert(!place_move_on_top(moves,moves+5,to_move(PAWN,B1,B2)));
    assert(place_move_on_top(moves,moves+5,a2a3));
    assert(moves[0]==a2a3);
    assert(moves[3]==e2e3);

    assert(place_move_on_top(moves+1,moves+5,g1f3));
    assert(moves[1]==g1f3);
    assert(moves[4]==e2e4);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl $0x1, %edi
movl $0x34, %esi
movl $0x2c, %edx
callq 0x775c
movq %rax, %r15
leaq 0x28(%rsp), %r14
movq %rax, -0x28(%r14)
movl $0x1, %edi
movl $0x34, %esi
movl $0x24, %edx
callq 0x775c
movq %rax, %rbx
movq %rax, -0x20(%r14)
movq $0x0, -0x18(%r14)
movl $0x1, %edi
movl $0x30, %esi
movl $0x28, %edx
callq 0x775c
movq %rax, %r13
movq %rax, -0x10(%r14)
movl $0x2, %edi
movl $0x3e, %esi
movl $0x2d, %edx
callq 0x775c
movq %rax, %r12
movq %rax, -0x8(%r14)
movq %rsp, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x95c7
testb %al, %al
jne 0x1ef59
movl $0x1, %edi
movl $0x39, %esi
movl $0x31, %edx
callq 0x775c
movq %rsp, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x95c7
testb %al, %al
jne 0x1ef78
movq %rsp, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x95c7
testb %al, %al
je 0x1ef97
cmpq %r13, (%rsp)
jne 0x1efb6
cmpq %r15, 0x18(%rsp)
jne 0x1efd5
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x95c7
testb %al, %al
je 0x1eff4
cmpq %r12, 0x8(%rsp)
jne 0x1f013
cmpq %rbx, 0x20(%rsp)
jne 0x1f032
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x15a8f(%rip), %rdi     # 0x349ef
leaq 0x15a41(%rip), %rsi     # 0x349a8
leaq 0x15aab(%rip), %rcx     # 0x34a19
movl $0x35, %edx
callq 0x20d0
leaq 0x15ab8(%rip), %rdi     # 0x34a37
leaq 0x15a22(%rip), %rsi     # 0x349a8
leaq 0x15a8c(%rip), %rcx     # 0x34a19
movl $0x36, %edx
callq 0x20d0
leaq 0x15acf(%rip), %rdi     # 0x34a6d
leaq 0x15a03(%rip), %rsi     # 0x349a8
leaq 0x15a6d(%rip), %rcx     # 0x34a19
movl $0x37, %edx
callq 0x20d0
leaq 0x15ad6(%rip), %rdi     # 0x34a93
leaq 0x159e4(%rip), %rsi     # 0x349a8
leaq 0x15a4e(%rip), %rcx     # 0x34a19
movl $0x38, %edx
callq 0x20d0
leaq 0x15ac6(%rip), %rdi     # 0x34aa2
leaq 0x159c5(%rip), %rsi     # 0x349a8
leaq 0x15a2f(%rip), %rcx     # 0x34a19
movl $0x39, %edx
callq 0x20d0
leaq 0x15ab6(%rip), %rdi     # 0x34ab1
leaq 0x159a6(%rip), %rsi     # 0x349a8
leaq 0x15a10(%rip), %rcx     # 0x34a19
movl $0x3b, %edx
callq 0x20d0
leaq 0x15abf(%rip), %rdi     # 0x34ad9
leaq 0x15987(%rip), %rsi     # 0x349a8
leaq 0x159f1(%rip), %rcx     # 0x34a19
movl $0x3c, %edx
callq 0x20d0
leaq 0x15aaf(%rip), %rdi     # 0x34ae8
leaq 0x15968(%rip), %rsi     # 0x349a8
leaq 0x159d2(%rip), %rcx     # 0x34a19
movl $0x3d, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/next__test.cpp
// Function: test_pv()
void test_pv() {
    position pos;
    set_pos(&pos,"b2b1r1k/3R1ppp/4qP2/4p1PQ/4P3/5B2/4N1K1/8 w - - ");

    move moves[MAX_MOVES_PER_PLY];
    gen_legal_moves(moves,&pos,true,true);

    move_order_dto mo_dto;
    mo_dto.startp = mo_dto.currentp = mo_dto.endp = moves;
    mo_dto.pv_move = moves[5];
    mo_dto.hash_move = 0;
    mo_dto.killer1 = 0;
    mo_dto.killer2 = 0;
    mo_dto.next_stage = PVMOVE;

    move *nextp;
    assert(next(&pos,&nextp,&mo_dto));
    assert(*nextp==mo_dto.pv_move);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xb78, %rsp            # imm = 0xB78
leaq 0x15a95(%rip), %rsi     # 0x34af7
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
leaq 0x210(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x78e0
leaq 0x8(%rsp), %rdx
movq %r14, 0x30(%rdx)
movq %r14, 0x38(%rdx)
movq %r14, 0x28(%rdx)
movq 0x28(%r14), %rax
movq %rax, 0x8(%rdx)
movl $0x0, (%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdx)
movq $0x0, 0x20(%rdx)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x8b70
testb %al, %al
je 0x1f0e2
movq (%rsp), %rax
movq (%rax), %rax
cmpq 0x10(%rsp), %rax
jne 0x1f101
addq $0xb78, %rsp            # imm = 0xB78
popq %rbx
popq %r14
retq
leaq 0x15b4d(%rip), %rdi     # 0x34c36
leaq 0x158b8(%rip), %rsi     # 0x349a8
leaq 0x15a31(%rip), %rcx     # 0x34b28
movl $0x50, %edx
callq 0x20d0
leaq 0x15a2f(%rip), %rdi     # 0x34b37
leaq 0x15899(%rip), %rsi     # 0x349a8
leaq 0x15a12(%rip), %rcx     # 0x34b28
movl $0x51, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/next__test.cpp
// Function: test_hash_next()
void test_hash_next() {
    position pos;
    set_pos(&pos,"1R6/1brk2p1/4p2p/p1P1Pp2/P7/6P1/1P4P1/2R3K1 w - - ");

    move moves[MAX_MOVES_PER_PLY];
    gen_legal_moves(moves,&pos,true,true);

    // randomly make the 5th move the hash move
    move_order_dto mo_dto;
    mo_dto.startp = mo_dto.currentp = mo_dto.endp = moves;
    mo_dto.pv_move = 0;
    mo_dto.hash_move = moves[5];
    mo_dto.killer1 = 0;
    mo_dto.killer2 = 0;
    mo_dto.next_stage = PVMOVE;

    move *nextp;
    assert(next(&pos,&nextp,&mo_dto));
    assert(*nextp==mo_dto.hash_move);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xb78, %rsp            # imm = 0xB78
leaq 0x15a1d(%rip), %rsi     # 0x34b4e
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
leaq 0x210(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x78e0
leaq 0x8(%rsp), %rdx
movq %r14, 0x30(%rdx)
movq %r14, 0x38(%rdx)
movq %r14, 0x28(%rdx)
movq $0x0, 0x8(%rdx)
movq 0x28(%r14), %rax
movq %rax, 0x10(%rdx)
movl $0x0, (%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdx)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x8b70
testb %al, %al
je 0x1f1b1
movq (%rsp), %rax
movq (%rax), %rax
cmpq 0x18(%rsp), %rax
jne 0x1f1d0
addq $0xb78, %rsp            # imm = 0xB78
popq %rbx
popq %r14
retq
leaq 0x15a7e(%rip), %rdi     # 0x34c36
leaq 0x157e9(%rip), %rsi     # 0x349a8
leaq 0x159bb(%rip), %rcx     # 0x34b81
movl $0x65, %edx
callq 0x20d0
leaq 0x159c0(%rip), %rdi     # 0x34b97
leaq 0x157ca(%rip), %rsi     # 0x349a8
leaq 0x1599c(%rip), %rcx     # 0x34b81
movl $0x66, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/next__test.cpp
// Function: test_pv_then_hash()
void test_pv_then_hash() {
    position pos;
    set_pos(&pos,"6k1/p4p1p/1p3np1/2q5/4p3/4P1N1/PP3PPP/3Q2K1 w - - ");

    move moves[MAX_MOVES_PER_PLY];
    gen_legal_moves(moves,&pos,true,true);

    // make move 4 the PV move and move 2 the hash move
    move_order_dto mo_dto;
    mo_dto.startp = mo_dto.currentp = mo_dto.endp = moves;
    mo_dto.pv_move = moves[4];
    mo_dto.hash_move = moves[2];
    mo_dto.killer1 = 0;
    mo_dto.killer2 = 0;
    mo_dto.next_stage = PVMOVE;

    move *nextp;
    assert(next(&pos,&nextp,&mo_dto));
    assert(*nextp==mo_dto.pv_move);

    assert(next(&pos,&nextp,&mo_dto));
    assert(*nextp==mo_dto.hash_move);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xb78, %rsp            # imm = 0xB78
leaq 0x159b0(%rip), %rsi     # 0x34bb0
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
leaq 0x210(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x78e0
leaq 0x8(%rsp), %rdx
movq %r14, 0x30(%rdx)
movq %r14, 0x38(%rdx)
movq %r14, 0x28(%rdx)
movq 0x10(%r14), %rax
movq 0x20(%r14), %rcx
movq %rcx, 0x8(%rdx)
movq %rax, 0x10(%rdx)
movl $0x0, (%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdx)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x8b70
testb %al, %al
je 0x1f2a4
movq (%rsp), %rax
movq (%rax), %rax
cmpq 0x10(%rsp), %rax
jne 0x1f2c3
leaq 0x48(%rsp), %rdi
movq %rsp, %rsi
leaq 0x8(%rsp), %rdx
callq 0x8b70
testb %al, %al
je 0x1f2e2
movq (%rsp), %rax
movq (%rax), %rax
cmpq 0x18(%rsp), %rax
jne 0x1f301
addq $0xb78, %rsp            # imm = 0xB78
popq %rbx
popq %r14
retq
leaq 0x1598b(%rip), %rdi     # 0x34c36
leaq 0x156f6(%rip), %rsi     # 0x349a8
leaq 0x1592a(%rip), %rcx     # 0x34be3
movl $0x7a, %edx
callq 0x20d0
leaq 0x1586d(%rip), %rdi     # 0x34b37
leaq 0x156d7(%rip), %rsi     # 0x349a8
leaq 0x1590b(%rip), %rcx     # 0x34be3
movl $0x7b, %edx
callq 0x20d0
leaq 0x1594d(%rip), %rdi     # 0x34c36
leaq 0x156b8(%rip), %rsi     # 0x349a8
leaq 0x158ec(%rip), %rcx     # 0x34be3
movl $0x7d, %edx
callq 0x20d0
leaq 0x1588f(%rip), %rdi     # 0x34b97
leaq 0x15699(%rip), %rsi     # 0x349a8
leaq 0x158cd(%rip), %rcx     # 0x34be3
movl $0x7e, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/next__test.cpp
// Function: test_pv_and_hash_same_move()
void test_pv_and_hash_same_move() {
    position pos;
    reset_pos(&pos);

    move moves[MAX_MOVES_PER_PLY];
    gen_legal_moves(moves,&pos,true,true);

    // make move 4 the PV move and move 2 the hash move
    move_order_dto mo_dto;
    mo_dto.startp = mo_dto.currentp = mo_dto.endp = moves;
    mo_dto.pv_move = moves[7];
    mo_dto.hash_move = mo_dto.pv_move;
    mo_dto.killer1 = 0;
    mo_dto.killer2 = 0;
    mo_dto.caps_only = false;
    mo_dto.next_stage = PVMOVE;

    move *nextp;
    assert(next(&pos,&nextp,&mo_dto));
    assert(*nextp==mo_dto.pv_move);

    for (int i=1;i<20;i++) {
        assert(next(&pos,&nextp,&mo_dto));
        assert(*nextp!=mo_dto.pv_move);
    }

    // 21st call should return false
    assert(!next(&pos,&nextp,&mo_dto));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xb78, %rsp            # imm = 0xB78
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa51
leaq 0x210(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x78e0
leaq 0x8(%rsp), %rdx
movq %r14, 0x30(%rdx)
movq %r14, 0x38(%rdx)
movq %r14, 0x28(%rdx)
movq 0x38(%r14), %rax
movq %rax, 0x8(%rdx)
movq %rax, 0x10(%rdx)
movb $0x0, 0x4(%rdx)
movl $0x0, (%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdx)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x8b70
testb %al, %al
je 0x1f446
movq (%rsp), %rax
movq (%rax), %rax
cmpq 0x10(%rsp), %rax
jne 0x1f465
movl $0x13, %ebp
leaq 0x48(%rsp), %rbx
movq %rsp, %r14
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x8b70
testb %al, %al
je 0x1f427
movq (%rsp), %rax
movq (%rax), %rax
cmpq 0x10(%rsp), %rax
je 0x1f408
decl %ebp
jne 0x1f3bc
leaq 0x48(%rsp), %rdi
movq %rsp, %rsi
leaq 0x8(%rsp), %rdx
callq 0x8b70
testb %al, %al
jne 0x1f484
addq $0xb78, %rsp            # imm = 0xB78
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1580f(%rip), %rdi     # 0x34c1e
leaq 0x15592(%rip), %rsi     # 0x349a8
leaq 0x157df(%rip), %rcx     # 0x34bfc
movl $0x98, %edx
callq 0x20d0
leaq 0x15808(%rip), %rdi     # 0x34c36
leaq 0x15573(%rip), %rsi     # 0x349a8
leaq 0x157c0(%rip), %rcx     # 0x34bfc
movl $0x97, %edx
callq 0x20d0
leaq 0x157e9(%rip), %rdi     # 0x34c36
leaq 0x15554(%rip), %rsi     # 0x349a8
leaq 0x157a1(%rip), %rcx     # 0x34bfc
movl $0x93, %edx
callq 0x20d0
leaq 0x156cb(%rip), %rdi     # 0x34b37
leaq 0x15535(%rip), %rsi     # 0x349a8
leaq 0x15782(%rip), %rcx     # 0x34bfc
movl $0x94, %edx
callq 0x20d0
leaq 0x157aa(%rip), %rdi     # 0x34c35
leaq 0x15516(%rip), %rsi     # 0x349a8
leaq 0x15763(%rip), %rcx     # 0x34bfc
movl $0x9c, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/next__test.cpp
// Function: test_ep_ordered_as_capture()
void test_ep_ordered_as_capture() {
    position pos;
    set_pos(&pos,"8/3p4/8/4P3/8/8/K6k/8 b - -");

    apply_move(&pos,to_move(PAWN,D7,D5),gundos);

    move moves[50];
    move *endp = gen_legal_moves(moves,&pos,true,false);

    move epcap = to_capture(PAWN,E5,D6,PAWN);
    set_epcapture(&epcap);
    assert(is_in_move_list(epcap,moves,endp));

    move_order_dto mo_dto;
    mo_dto.startp = mo_dto.currentp = mo_dto.endp = moves;
    mo_dto.pv_move = 0;
    mo_dto.hash_move = 0;
    mo_dto.killer1 = 0;
    mo_dto.killer2 = 0;
    mo_dto.next_stage = PVMOVE;

    move *m;
    next(&pos,&m,&mo_dto);
    assert(clear_score(*m) == epcap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x3b0, %rsp            # imm = 0x3B0
leaq 0x1450c(%rip), %rsi     # 0x35285
leaq 0x58(%rsp), %r14
movq %r14, %rdi
callq 0xaa82
movl $0x1, %edi
movl $0xb, %esi
movl $0x1b, %edx
callq 0x775c
leaq 0xa7d4f(%rip), %rdx     # 0xc8af0
movq %r14, %rdi
movq %rax, %rsi
callq 0x30e1
leaq 0x220(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x78e0
movq %rax, %r14
movl $0x1, %edi
movl $0x1c, %esi
movl $0x13, %edx
movl $0x1, %ecx
callq 0x777b
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
movq %r15, %rdi
callq 0x783b
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xe682
testb %al, %al
je 0x20e57
leaq 0x18(%rsp), %rdx
movq %rbx, 0x30(%rdx)
movq %rbx, 0x38(%rdx)
movq %rbx, 0x28(%rdx)
movl $0x0, (%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdx)
movups %xmm0, 0x18(%rdx)
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rbx
movq %rbx, %rsi
callq 0x8b70
movq (%rbx), %rax
movq (%rax), %rdi
callq 0x78dd
cmpq 0x8(%rsp), %rax
jne 0x20e76
addq $0x3b0, %rsp            # imm = 0x3B0
popq %rbx
popq %r14
popq %r15
retq
leaq 0x14443(%rip), %rdi     # 0x352a1
leaq 0x13b43(%rip), %rsi     # 0x349a8
leaq 0x14457(%rip), %rcx     # 0x352c3
movl $0x1c9, %edx            # imm = 0x1C9
callq 0x20d0
leaq 0x14468(%rip), %rdi     # 0x352e5
leaq 0x13b24(%rip), %rsi     # 0x349a8
leaq 0x14438(%rip), %rcx     # 0x352c3
movl $0x1d5, %edx            # imm = 0x1D5
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/next__test.cpp
// Function: test_killers()
void test_killers() {
    position pos;
    reset_pos(&pos);

    move moves[50];
    move *endp = gen_legal_moves(moves,&pos,true,true);

    move h2h3 = to_move(PAWN,H2,H3);
    assert(is_in_move_list(h2h3,moves,endp));

    move g2g4 = to_move(PAWN,G2,G4);
    assert(is_in_move_list(g2g4,moves,endp));

    move_order_dto mo_dto;
    mo_dto.startp = mo_dto.currentp = mo_dto.endp = moves;
    mo_dto.pv_move = 0;
    mo_dto.hash_move = 0;
    mo_dto.killer1 = h2h3;
    mo_dto.killer2 = g2g4;
    mo_dto.next_stage = PVMOVE;

    move *m;
    next(&pos,&m,&mo_dto);
    assert(clear_score(*m) == h2h3);
    next(&pos,&m,&mo_dto);
    assert(clear_score(*m) == g2g4);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x3a8, %rsp            # imm = 0x3A8
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa51
leaq 0x210(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x78e0
movq %rax, %r15
movl $0x1, %edi
movl $0x37, %esi
movl $0x2f, %edx
callq 0x775c
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xe682
testb %al, %al
je 0x20fac
movl $0x1, %edi
movl $0x36, %esi
movl $0x26, %edx
callq 0x775c
movq %rax, %rbx
leaq 0x210(%rsp), %r12
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xe682
testb %al, %al
je 0x20fcb
leaq 0x8(%rsp), %rdx
movq %r12, 0x30(%rdx)
movq %r12, 0x38(%rdx)
movq %r12, 0x28(%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdx)
movq %r14, 0x18(%rdx)
movq %rbx, 0x20(%rdx)
movl $0x0, (%rdx)
leaq 0x48(%rsp), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x8b70
movq (%r15), %rax
movq (%rax), %rdi
callq 0x78dd
cmpq %r14, %rax
jne 0x20fea
leaq 0x48(%rsp), %rdi
movq %rsp, %r14
leaq 0x8(%rsp), %rdx
movq %r14, %rsi
callq 0x8b70
movq (%r14), %rax
movq (%rax), %rdi
callq 0x78dd
cmpq %rbx, %rax
jne 0x21009
addq $0x3a8, %rsp            # imm = 0x3A8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1434b(%rip), %rdi     # 0x352fe
leaq 0x139ee(%rip), %rsi     # 0x349a8
leaq 0x1435e(%rip), %rcx     # 0x3531f
movl $0x1e0, %edx            # imm = 0x1E0
callq 0x20d0
leaq 0x14361(%rip), %rdi     # 0x35333
leaq 0x139cf(%rip), %rsi     # 0x349a8
leaq 0x1433f(%rip), %rcx     # 0x3531f
movl $0x1e3, %edx            # imm = 0x1E3
callq 0x20d0
leaq 0x14363(%rip), %rdi     # 0x35354
leaq 0x139b0(%rip), %rsi     # 0x349a8
leaq 0x14320(%rip), %rcx     # 0x3531f
movl $0x1ef, %edx            # imm = 0x1EF
callq 0x20d0
leaq 0x1435c(%rip), %rdi     # 0x3536c
leaq 0x13991(%rip), %rsi     # 0x349a8
leaq 0x14301(%rip), %rcx     # 0x3531f
movl $0x1f1, %edx            # imm = 0x1F1
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/next__test.cpp
// Function: assert_all_moves_good(position*)
void assert_all_moves_good(position *pos) {
    move moves[200];
    move *endp = gen_legal_moves(&moves[0],pos,true,true);
    for (move* mp=moves;mp<endp;mp++) {
        assert(good_move(pos,*mp)==(*mp != BADMOVE));
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x640, %rsp            # imm = 0x640
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x78e0
cmpq %rax, %r14
jae 0x21076
movq %rax, %r15
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x910b
cmpq $0x0, (%r14)
sete %cl
xorb %al, %cl
je 0x21083
addq $0x8, %r14
cmpq %r15, %r14
jb 0x21057
addq $0x640, %rsp            # imm = 0x640
popq %rbx
popq %r14
popq %r15
retq
leaq 0x142fa(%rip), %rdi     # 0x35384
leaq 0x13917(%rip), %rsi     # 0x349a8
leaq 0x14311(%rip), %rcx     # 0x353a9
movl $0x1f8, %edx            # imm = 0x1F8
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/next__test.cpp
// Function: test_next()
void test_next() {
    test_best_at_top();
    test_place_move_on_top();
    test_pv();
    test_hash_next();
    test_pv_then_hash();
    test_pv_and_hash_same_move();
    test_promotions();
    test_pv_then_hash_then_captures();
    test_winning_caps_before_noncaps();
    test_caps_in_order_white();
    test_caps_in_order_black();
    test_ep_ordered_as_capture();
    test_killers();
    test_good_move();
}

// Assembly:
pushq %rax
callq 0x1ec94
callq 0x1ee2d
callq 0x1f051
callq 0x1f120
callq 0x1f1ef
callq 0x1f320
callq 0x1f4a3
callq 0x1f919
callq 0x1fcdc
callq 0x20796
callq 0x20a7e
callq 0x20d66
callq 0x20e95
popq %rax
jmp 0x210a2
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/pos__test.cpp
// Function: test_add_piece()
void test_add_piece() {
    position pos;
    reset_pos(&pos);

    add_piece(&pos,PAWN,E4);
    assert(pos.piece[E4]==PAWN);

    add_piece(&pos,-PAWN,E5);
    assert(pos.piece[E5]==-PAWN);

    add_piece(&pos,KNIGHT,F3);
    assert(pos.piece[F3]==KNIGHT);
}

// Assembly:
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa51
movq %rbx, %rdi
movl $0x1, %esi
movl $0x24, %edx
callq 0xa5f8
cmpl $0x1, 0x90(%rbx)
jne 0x21b0d
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x1c, %edx
callq 0xa5f8
cmpl $-0x1, 0x70(%rbx)
jne 0x21b2c
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x2, %esi
movl $0x2d, %edx
callq 0xa5f8
cmpl $0x2, 0xb4(%rbx)
jne 0x21b4b
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x13df6(%rip), %rdi     # 0x3590a
leaq 0x13bed(%rip), %rsi     # 0x35708
leaq 0x13dfc(%rip), %rcx     # 0x3591e
movl $0x47, %edx
callq 0x20d0
leaq 0x13e01(%rip), %rdi     # 0x35934
leaq 0x13bce(%rip), %rsi     # 0x35708
leaq 0x13ddd(%rip), %rcx     # 0x3591e
movl $0x4a, %edx
callq 0x20d0
leaq 0x13df7(%rip), %rdi     # 0x35949
leaq 0x13baf(%rip), %rsi     # 0x35708
leaq 0x13dbe(%rip), %rcx     # 0x3591e
movl $0x4d, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/pos__test.cpp
// Function: test_remove_piece()
void test_remove_piece() {
    position pos;
    reset_pos(&pos);

    remove_piece(&pos,E2);
    assert(pos.piece[E2]==NO_PIECE);

    remove_piece(&pos,H1);
    assert(pos.piece[H1]==NO_PIECE);

    remove_piece(&pos,E8);
    assert(pos.piece[E8]==NO_PIECE);
}

// Assembly:
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa51
movq %rbx, %rdi
movl $0x34, %esi
callq 0xa78d
cmpl $0x0, 0xd0(%rbx)
jne 0x21bd1
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x3f, %esi
callq 0xa78d
cmpl $0x0, 0xfc(%rbx)
jne 0x21bf0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x4, %esi
callq 0xa78d
cmpl $0x0, 0x10(%rbx)
jne 0x21c0f
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x13d87(%rip), %rdi     # 0x3595f
leaq 0x13b29(%rip), %rsi     # 0x35708
leaq 0x13d91(%rip), %rcx     # 0x35977
movl $0x55, %edx
callq 0x20d0
leaq 0x13d99(%rip), %rdi     # 0x35990
leaq 0x13b0a(%rip), %rsi     # 0x35708
leaq 0x13d72(%rip), %rcx     # 0x35977
movl $0x58, %edx
callq 0x20d0
leaq 0x13d92(%rip), %rdi     # 0x359a8
leaq 0x13aeb(%rip), %rsi     # 0x35708
leaq 0x13d53(%rip), %rcx     # 0x35977
movl $0x5b, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/pos__test.cpp
// Function: test_is_empty_sq()
void test_is_empty_sq() {
    position pos;
    reset_pos(&pos);
    assert(is_empty_sq(&pos,D4));
    assert(!is_empty_sq(&pos,D8));
}

// Assembly:
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa51
movq %rbx, %rdi
movl $0x23, %esi
callq 0xae0c
testb %al, %al
je 0x23c81
leaq 0x8(%rsp), %rdi
movl $0x3, %esi
callq 0xae0c
testb %al, %al
jne 0x23ca0
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x1295c(%rip), %rdi     # 0x365e4
leaq 0x11a79(%rip), %rsi     # 0x35708
leaq 0x12963(%rip), %rcx     # 0x365f9
movl $0x1b5, %edx            # imm = 0x1B5
callq 0x20d0
leaq 0x1296a(%rip), %rdi     # 0x36611
leaq 0x11a5a(%rip), %rsi     # 0x35708
leaq 0x12944(%rip), %rcx     # 0x365f9
movl $0x1b6, %edx            # imm = 0x1B6
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/pos__test.cpp
// Function: test_flip_vertical()
void test_flip_vertical() {
    position pos;
    position save_pos;

    reset_pos(&pos);
    memcpy(&save_pos,&pos,sizeof(position));
    flip_board(&pos);
    flip_board(&pos);
    assert(equal_pos(&pos,&save_pos,true));

    ///
    set_pos(&pos,"7r/R6p/2K4P/5k1P/2p4n/5p2/8/8 w - - 0 1");
    memcpy(&save_pos,&pos,sizeof(position));
    flip_board(&pos);
    flip_board(&pos);
    assert(equal_pos(&pos,&save_pos,true));
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x398, %rsp            # imm = 0x398
leaq 0x1d0(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa51
leaq 0x8(%rsp), %r14
movl $0x1c8, %edx            # imm = 0x1C8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2100
movq %rbx, %rdi
callq 0xaf6f
movq %rbx, %rdi
callq 0xaf6f
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0xa0b8
testb %al, %al
je 0x23fa5
leaq 0xc669(%rip), %rsi      # 0x305ba
leaq 0x1d0(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
leaq 0x8(%rsp), %r14
movl $0x1c8, %edx            # imm = 0x1C8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2100
movq %rbx, %rdi
callq 0xaf6f
movq %rbx, %rdi
callq 0xaf6f
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0xa0b8
testb %al, %al
je 0x23fc4
addq $0x398, %rsp            # imm = 0x398
popq %rbx
popq %r14
retq
leaq 0x996c(%rip), %rdi      # 0x2d918
leaq 0x11755(%rip), %rsi     # 0x35708
leaq 0x1274e(%rip), %rcx     # 0x36708
movl $0x1de, %edx            # imm = 0x1DE
callq 0x20d0
leaq 0x994d(%rip), %rdi      # 0x2d918
leaq 0x11736(%rip), %rsi     # 0x35708
leaq 0x1272f(%rip), %rcx     # 0x36708
movl $0x1e5, %edx            # imm = 0x1E5
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/pos__test.cpp
// Function: test_is_checkmate()
void test_is_checkmate() {
    position pos;

    // Fool's mate!
    set_pos(&pos,"rnb1kbnr/pppp1ppp/8/4p3/6Pq/5P2/PPPPP2P/RNBQKBNR w KQkq -");
    assert(is_checkmate(&pos));

    // Byrne vs Fischer
    set_pos(&pos,"1Q6/5pk1/2p3p1/1p2N2p/1b5P/1bn5/2r3P1/2K5 w - -");
    assert(is_checkmate(&pos));

    // Simple mate with rook
    set_pos(&pos,"3k2R1/8/3K4/8/8/8/8/8 b - -");
    assert(is_checkmate(&pos));

    // Starting position
    reset_pos(&pos);
    assert(!is_checkmate(&pos));

    set_pos(&pos,"8/8/8/6K1/8/1Q6/p7/k7 b - -");
    assert(!is_checkmate(&pos));
}

// Assembly:
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x12730(%rip), %rsi     # 0x36722
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0xb08c
testb %al, %al
je 0x240a1
leaq 0x1275f(%rip), %rsi     # 0x36775
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0xb08c
testb %al, %al
je 0x240c0
leaq 0x1276b(%rip), %rsi     # 0x367a5
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0xb08c
testb %al, %al
je 0x240df
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa51
movq %rbx, %rdi
callq 0xb08c
testb %al, %al
jne 0x240fe
leaq 0x1275a(%rip), %rsi     # 0x367d5
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0xb08c
testb %al, %al
jne 0x2411d
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x1271a(%rip), %rdi     # 0x367c2
leaq 0x11659(%rip), %rsi     # 0x35708
leaq 0x126a6(%rip), %rcx     # 0x3675c
movl $0x1ed, %edx            # imm = 0x1ED
callq 0x20d0
leaq 0x126fb(%rip), %rdi     # 0x367c2
leaq 0x1163a(%rip), %rsi     # 0x35708
leaq 0x12687(%rip), %rcx     # 0x3675c
movl $0x1f1, %edx            # imm = 0x1F1
callq 0x20d0
leaq 0x126dc(%rip), %rdi     # 0x367c2
leaq 0x1161b(%rip), %rsi     # 0x35708
leaq 0x12668(%rip), %rcx     # 0x3675c
movl $0x1f5, %edx            # imm = 0x1F5
callq 0x20d0
leaq 0x126bc(%rip), %rdi     # 0x367c1
leaq 0x115fc(%rip), %rsi     # 0x35708
leaq 0x12649(%rip), %rcx     # 0x3675c
movl $0x1f9, %edx            # imm = 0x1F9
callq 0x20d0
leaq 0x1269d(%rip), %rdi     # 0x367c1
leaq 0x115dd(%rip), %rsi     # 0x35708
leaq 0x1262a(%rip), %rcx     # 0x3675c
movl $0x1fc, %edx            # imm = 0x1FC
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/pos__test.cpp
// Function: test_is_stalemate()
void test_is_stalemate() {
    position pos;

    // Burn vs Pilsbury, 1898
    set_pos(&pos,"5k2/5P2/5K2/8/8/8/8/8 b - -");
    assert(is_stalemate(&pos));

    set_pos(&pos,"kb6/8/1K6/8/8/8/8/8 b - - ");
    assert(!is_stalemate(&pos));
    set_pos(&pos,"kb5R/8/1K6/8/8/8/8/8 b - - ");
    assert(is_stalemate(&pos));

    set_pos(&pos,"8/8/8/8/8/2K5/1R6/k7 b - -");
    assert(is_stalemate(&pos));

    set_pos(&pos,"8/8/8/6K1/8/1Q6/p7/k7 b - -");
    assert(is_stalemate(&pos));

    set_pos(&pos,"rnb1kbnr/pppp1ppp/8/4p3/6Pq/5P2/PPPPP2P/RNBQKBNR w KQkq -");
    assert(!is_stalemate(&pos));
}

// Assembly:
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x126a6(%rip), %rsi     # 0x367f1
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0xb102
testb %al, %al
je 0x24225
leaq 0x126b7(%rip), %rsi     # 0x36826
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0xb102
testb %al, %al
jne 0x24244
leaq 0x126c2(%rip), %rsi     # 0x36855
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0xb102
testb %al, %al
je 0x24263
leaq 0x126ba(%rip), %rsi     # 0x36871
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0xb102
testb %al, %al
je 0x24282
leaq 0x125fa(%rip), %rsi     # 0x367d5
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0xb102
testb %al, %al
je 0x242a1
leaq 0x12523(%rip), %rsi     # 0x36722
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0xb102
testb %al, %al
jne 0x242c0
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x12616(%rip), %rdi     # 0x36842
leaq 0x114d5(%rip), %rsi     # 0x35708
leaq 0x125d3(%rip), %rcx     # 0x3680d
movl $0x204, %edx            # imm = 0x204
callq 0x20d0
leaq 0x125f6(%rip), %rdi     # 0x36841
leaq 0x114b6(%rip), %rsi     # 0x35708
leaq 0x125b4(%rip), %rcx     # 0x3680d
movl $0x207, %edx            # imm = 0x207
callq 0x20d0
leaq 0x125d8(%rip), %rdi     # 0x36842
leaq 0x11497(%rip), %rsi     # 0x35708
leaq 0x12595(%rip), %rcx     # 0x3680d
movl $0x209, %edx            # imm = 0x209
callq 0x20d0
leaq 0x125b9(%rip), %rdi     # 0x36842
leaq 0x11478(%rip), %rsi     # 0x35708
leaq 0x12576(%rip), %rcx     # 0x3680d
movl $0x20c, %edx            # imm = 0x20C
callq 0x20d0
leaq 0x1259a(%rip), %rdi     # 0x36842
leaq 0x11459(%rip), %rsi     # 0x35708
leaq 0x12557(%rip), %rcx     # 0x3680d
movl $0x20f, %edx            # imm = 0x20F
callq 0x20d0
leaq 0x1257a(%rip), %rdi     # 0x36841
leaq 0x1143a(%rip), %rsi     # 0x35708
leaq 0x12538(%rip), %rcx     # 0x3680d
movl $0x212, %edx            # imm = 0x212
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/pos__test.cpp
// Function: test_is_zugzwang()
void test_is_zugzwang() {
    position pos;
    reset_pos(&pos);
    assert(!is_zugzwang(&pos));

    // just kings
    set_pos(&pos,"7k/8/8/8/8/8/8/7K w - - ");
    assert(is_zugzwang(&pos));

    // single white bishop
    set_pos(&pos,"7k/8/8/B7/8/8/8/7K b - - ");
    assert(is_zugzwang(&pos));

    // white pawn black knight
    set_pos(&pos,"7k/8/8/n7/P7/8/8/7K b - - ");
    assert(is_zugzwang(&pos));

    // white rook black knight
    set_pos(&pos,"7k/8/8/n7/R7/8/8/7K b - - ");
    assert(!is_zugzwang(&pos));

}

// Assembly:
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa51
movq %rbx, %rdi
callq 0xb178
testb %al, %al
jne 0x2439d
leaq 0x125ac(%rip), %rsi     # 0x368b7
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0xb178
testb %al, %al
je 0x243bc
leaq 0x125a1(%rip), %rsi     # 0x368d0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0xb178
testb %al, %al
je 0x243db
leaq 0x12597(%rip), %rsi     # 0x368ea
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0xb178
testb %al, %al
je 0x243fa
leaq 0x1258e(%rip), %rsi     # 0x36905
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
movq %rbx, %rdi
callq 0xb178
testb %al, %al
jne 0x24419
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x124e8(%rip), %rdi     # 0x3688c
leaq 0x1135d(%rip), %rsi     # 0x35708
leaq 0x124ed(%rip), %rcx     # 0x3689f
movl $0x218, %edx            # imm = 0x218
callq 0x20d0
leaq 0x124ca(%rip), %rdi     # 0x3688d
leaq 0x1133e(%rip), %rsi     # 0x35708
leaq 0x124ce(%rip), %rcx     # 0x3689f
movl $0x21c, %edx            # imm = 0x21C
callq 0x20d0
leaq 0x124ab(%rip), %rdi     # 0x3688d
leaq 0x1131f(%rip), %rsi     # 0x35708
leaq 0x124af(%rip), %rcx     # 0x3689f
movl $0x220, %edx            # imm = 0x220
callq 0x20d0
leaq 0x1248c(%rip), %rdi     # 0x3688d
leaq 0x11300(%rip), %rsi     # 0x35708
leaq 0x12490(%rip), %rcx     # 0x3689f
movl $0x224, %edx            # imm = 0x224
callq 0x20d0
leaq 0x1246c(%rip), %rdi     # 0x3688c
leaq 0x112e1(%rip), %rsi     # 0x35708
leaq 0x12471(%rip), %rcx     # 0x3689f
movl $0x228, %edx            # imm = 0x228
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/pos__test.cpp
// Function: test_pos()
void test_pos() {
    test_pos_consistency();
    test_equal_pos();
    test_reset_pos();
    test_add_piece();
    test_remove_piece();
    test_set_pos();
    test_remove_rook_castling_availability();
    test_remove_castling_availability();
    test_is_empty_sq();
    test_is_enemy_and_friendly_occupied();
    test_flip_vertical();
    test_is_checkmate();
    test_is_stalemate();
    test_is_zugzwang();
}

// Assembly:
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa51
movq %rbx, %rdi
callq 0x231d4
callq 0x21c2e
callq 0x21524
callq 0x21a97
callq 0x21b6a
callq 0x2209c
callq 0x22d43
callq 0x22a3e
callq 0x23c3f
callq 0x23cbf
callq 0x23ef7
callq 0x23fe3
callq 0x2413c
callq 0x242df
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/search__test.cpp
// Function: test_matein1()
void test_matein1() {
    position pos;
    set_pos(&pos,"4k3/8/3Q4/2B5/8/8/1K6/8 w - -");
    clear_hash_table(&htbl);

    move_line pv; pv.n=0;
    search_stats stats; stats.nodes=0; stats.last_pv.n=0;
    start_timer(10000);
    int32 score=search(&pos,&pv,-INF,INF,2,&stats,move_stack,gundos,false);
    assert(score==CHECKMATE-1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb78, %rsp            # imm = 0xB78
leaq 0x12449(%rip), %rsi     # 0x36920
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
leaq 0xd3a05(%rip), %rdi     # 0xf7ef0
callq 0x62b6
xorl %r12d, %r12d
leaq 0x1d0(%rsp), %r14
movl %r12d, (%r14)
leaq 0x4f8(%rsp), %r15
movq $0x0, 0x18(%r15)
movl %r12d, 0x28(%r15)
movl $0x2710, %edi           # imm = 0x2710
callq 0x244a4
subq $0x8, %rsp
leaq 0xa45c9(%rip), %rax     # 0xc8af0
leaq 0x891892(%rip), %r10    # 0x8b5dc0
movq %rbx, %rdi
movq %r14, %rsi
movl $0xfffcf2c0, %edx       # imm = 0xFFFCF2C0
movl $0x30d40, %ecx          # imm = 0x30D40
movl $0x2, %r8d
movq %r15, %r9
pushq %r12
pushq %rax
pushq %r10
callq 0xb394
addq $0x20, %rsp
cmpl $0xfffe, %eax           # imm = 0xFFFE
jne 0x2456b
addq $0xb78, %rsp            # imm = 0xB78
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x123cc(%rip), %rdi     # 0x3693e
leaq 0x123d8(%rip), %rsi     # 0x36951
leaq 0x123e7(%rip), %rcx     # 0x36967
movl $0x1f, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/search__test.cpp
// Function: test_matein1b()
void test_matein1b() {
    position pos;
    set_pos(&pos,"4K3/8/8/3n2q1/8/8/3k4/8 b - -");
    clear_hash_table(&htbl);

    move_line pv; pv.n=0;
    search_stats stats; stats.nodes=0; stats.last_pv.n=0;
    start_timer(10000);
    int32 score=search(&pos,&pv,-INF,INF,2,&stats,move_stack,gundos,false);
    assert(score==CHECKMATE-1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb78, %rsp            # imm = 0xB78
leaq 0x123dc(%rip), %rsi     # 0x3697b
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
leaq 0xd393d(%rip), %rdi     # 0xf7ef0
callq 0x62b6
xorl %r12d, %r12d
leaq 0x1d0(%rsp), %r14
movl %r12d, (%r14)
leaq 0x4f8(%rsp), %r15
movq $0x0, 0x18(%r15)
movl %r12d, 0x28(%r15)
movl $0x2710, %edi           # imm = 0x2710
callq 0x244a4
subq $0x8, %rsp
leaq 0xa4501(%rip), %rax     # 0xc8af0
leaq 0x8917ca(%rip), %r10    # 0x8b5dc0
movq %rbx, %rdi
movq %r14, %rsi
movl $0xfffcf2c0, %edx       # imm = 0xFFFCF2C0
movl $0x30d40, %ecx          # imm = 0x30D40
movl $0x2, %r8d
movq %r15, %r9
pushq %r12
pushq %rax
pushq %r10
callq 0xb394
addq $0x20, %rsp
cmpl $0xfffe, %eax           # imm = 0xFFFE
jne 0x24633
addq $0xb78, %rsp            # imm = 0xB78
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x12304(%rip), %rdi     # 0x3693e
leaq 0x12310(%rip), %rsi     # 0x36951
leaq 0x12351(%rip), %rcx     # 0x36999
movl $0x2b, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/search__test.cpp
// Function: test_matein2()
void test_matein2() {
    position pos;
    set_pos(&pos,"r1bq2r1/b4pk1/p1pp1p2/1p2pP2/1P2P1PB/3P4/1PPQ2P1/R3K2R w - -");
    clear_hash_table(&htbl);

    move_line pv; pv.n=0;
    search_stats stats; stats.nodes=0; stats.last_pv.n=0;
    start_timer(10000);
    int32 score=search(&pos,&pv,-INF,INF,4,&stats,move_stack,gundos,false);
    assert(score==CHECKMATE-3);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb78, %rsp            # imm = 0xB78
leaq 0x12347(%rip), %rsi     # 0x369ae
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
leaq 0xd3875(%rip), %rdi     # 0xf7ef0
callq 0x62b6
xorl %r12d, %r12d
leaq 0x1d0(%rsp), %r14
movl %r12d, (%r14)
leaq 0x4f8(%rsp), %r15
movq $0x0, 0x18(%r15)
movl %r12d, 0x28(%r15)
movl $0x2710, %edi           # imm = 0x2710
callq 0x244a4
subq $0x8, %rsp
leaq 0xa4439(%rip), %rax     # 0xc8af0
leaq 0x891702(%rip), %r10    # 0x8b5dc0
movq %rbx, %rdi
movq %r14, %rsi
movl $0xfffcf2c0, %edx       # imm = 0xFFFCF2C0
movl $0x30d40, %ecx          # imm = 0x30D40
movl $0x4, %r8d
movq %r15, %r9
pushq %r12
pushq %rax
pushq %r10
callq 0xb394
addq $0x20, %rsp
cmpl $0xfffc, %eax           # imm = 0xFFFC
jne 0x246fb
addq $0xb78, %rsp            # imm = 0xB78
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x122e9(%rip), %rdi     # 0x369eb
leaq 0x12248(%rip), %rsi     # 0x36951
leaq 0x122ee(%rip), %rcx     # 0x369fe
movl $0x37, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/search__test.cpp
// Function: test_matein3()
void test_matein3() {
    position pos;
    set_pos(&pos,"r5rk/5p1p/5R2/4B3/8/8/7P/7K w - -");
    clear_hash_table(&htbl);

    move_line pv; pv.n=0;
    search_stats stats; stats.nodes=0; stats.last_pv.n=0;
    start_timer(10000);
    int32 score=search(&pos,&pv,-INF,INF,6,&stats,move_stack,gundos,false);
    assert(score==CHECKMATE-5);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb78, %rsp            # imm = 0xB78
leaq 0x122e3(%rip), %rsi     # 0x36a12
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
leaq 0xd37ad(%rip), %rdi     # 0xf7ef0
callq 0x62b6
xorl %r12d, %r12d
leaq 0x1d0(%rsp), %r14
movl %r12d, (%r14)
leaq 0x4f8(%rsp), %r15
movq $0x0, 0x18(%r15)
movl %r12d, 0x28(%r15)
movl $0x2710, %edi           # imm = 0x2710
callq 0x244a4
subq $0x8, %rsp
leaq 0xa4371(%rip), %rax     # 0xc8af0
leaq 0x89163a(%rip), %r10    # 0x8b5dc0
movq %rbx, %rdi
movq %r14, %rsi
movl $0xfffcf2c0, %edx       # imm = 0xFFFCF2C0
movl $0x30d40, %ecx          # imm = 0x30D40
movl $0x6, %r8d
movq %r15, %r9
pushq %r12
pushq %rax
pushq %r10
callq 0xb394
addq $0x20, %rsp
cmpl $0xfffa, %eax           # imm = 0xFFFA
jne 0x247c3
addq $0xb78, %rsp            # imm = 0xB78
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1226a(%rip), %rdi     # 0x36a34
leaq 0x12180(%rip), %rsi     # 0x36951
leaq 0x1226f(%rip), %rcx     # 0x36a47
movl $0x43, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/search__test.cpp
// Function: test_stalemate()
void test_stalemate() {
    position pos;
    set_pos(&pos,"8/6p1/5p2/5k1K/7P/8/8/8 w - -");
    clear_hash_table(&htbl);

    move_line pv; pv.n=0;
    search_stats stats; stats.nodes=0; stats.last_pv.n=0;
    start_timer(10000);
    int32 score=search(&pos,&pv,-INF,INF,1,&stats,move_stack,gundos,false);
    assert(score==DRAWSCORE);
    assert(pv.n==0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb78, %rsp            # imm = 0xB78
leaq 0x12264(%rip), %rsi     # 0x36a5b
leaq 0x330(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
leaq 0xd36e2(%rip), %rdi     # 0xf7ef0
callq 0x62b6
xorl %r12d, %r12d
leaq 0x8(%rsp), %r14
movl %r12d, (%r14)
leaq 0x4f8(%rsp), %r15
movq $0x0, 0x18(%r15)
movl %r12d, 0x28(%r15)
movl $0x2710, %edi           # imm = 0x2710
callq 0x244a4
subq $0x8, %rsp
leaq 0xa42a9(%rip), %rax     # 0xc8af0
leaq 0x891572(%rip), %r10    # 0x8b5dc0
movq %rbx, %rdi
movq %r14, %rsi
movl $0xfffcf2c0, %edx       # imm = 0xFFFCF2C0
movl $0x30d40, %ecx          # imm = 0x30D40
movl $0x1, %r8d
movq %r15, %r9
pushq %r12
pushq %rax
pushq %r10
callq 0xb394
addq $0x20, %rsp
testl %eax, %eax
jne 0x2488f
cmpl $0x0, 0x8(%rsp)
jne 0x248ae
addq $0xb78, %rsp            # imm = 0xB78
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x121e3(%rip), %rdi     # 0x36a79
leaq 0x120b4(%rip), %rsi     # 0x36951
leaq 0x121e6(%rip), %rcx     # 0x36a8a
movl $0x4f, %edx
callq 0x20d0
leaq 0x121eb(%rip), %rdi     # 0x36aa0
leaq 0x12095(%rip), %rsi     # 0x36951
leaq 0x121c7(%rip), %rcx     # 0x36a8a
movl $0x50, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/search__test.cpp
// Function: test_abort_search()
void test_abort_search() {
    position pos;
    reset_pos(&pos);
    clear_hash_table(&htbl);

    move_line pv; pv.n=0;
    search_stats stats; stats.nodes=0; stats.last_pv.n=0;
    start_timer(10000);

    set_abort_search(true);
    search(&pos,&pv,-INF,INF,1,&stats,move_stack,gundos,false);
    //assert(stats.nodes==21); // 1 + 20


    pv.n=0;
    stats.nodes=0;
    search(&pos,&pv,-INF,INF,3,&stats,move_stack,gundos,false);
    assert(stats.nodes==4); // 1 + 3 (down the left side of the tree)

    set_abort_search(false);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb78, %rsp            # imm = 0xB78
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xaa51
leaq 0xd35fe(%rip), %rdi     # 0xf7ef0
callq 0x62b6
xorl %r12d, %r12d
leaq 0x1d0(%rsp), %r15
movl %r12d, (%r15)
leaq 0x4f8(%rsp), %rbx
movq %r12, 0x18(%rbx)
movl %r12d, 0x28(%rbx)
movl $0x2710, %edi           # imm = 0x2710
callq 0x244a4
movl $0x1, %edi
callq 0xb2ba
subq $0x8, %rsp
leaq 0xa41bc(%rip), %rbp     # 0xc8af0
leaq 0x891485(%rip), %r13    # 0x8b5dc0
movq %r14, %rdi
movq %r15, %rsi
movl $0xfffcf2c0, %edx       # imm = 0xFFFCF2C0
movl $0x30d40, %ecx          # imm = 0x30D40
movl $0x1, %r8d
movq %rbx, %r9
pushq %r12
pushq %rbp
pushq %r13
callq 0xb394
addq $0x20, %rsp
movl %r12d, (%r15)
movq %r12, 0x18(%rbx)
subq $0x8, %rsp
movq %r14, %rdi
movq %r15, %rsi
movl $0xfffcf2c0, %edx       # imm = 0xFFFCF2C0
movl $0x30d40, %ecx          # imm = 0x30D40
movl $0x3, %r8d
movq %rbx, %r9
pushq %r12
pushq %rbp
pushq %r13
callq 0xb394
addq $0x20, %rsp
cmpq $0x4, 0x18(%rbx)
jne 0x249b4
xorl %edi, %edi
callq 0xb2ba
addq $0xb78, %rsp            # imm = 0xB78
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x120ed(%rip), %rdi     # 0x36aa8
leaq 0x11f8f(%rip), %rsi     # 0x36951
leaq 0x120ee(%rip), %rcx     # 0x36ab7
movl $0x6c, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/search__test.cpp
// Function: test_qsearch_does_not_expand_initial_position()
void test_qsearch_does_not_expand_initial_position() {
    position pos;
    reset_pos(&pos);

    clear_hash_table(&htbl);

    search_stats stats; stats.nodes=0; stats.qnodes=0; stats.last_pv.n=0;
    start_timer(10000);
    move moves[50];

    set_abort_search(false);
    qsearch(&pos,-INF,INF,0,0,false,&stats,moves,gundos);

    assert(stats.nodes==0);
    assert(stats.qnodes==0);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x9d8, %rsp            # imm = 0x9D8
leaq 0x190(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa51
leaq 0xd2e8b(%rip), %rdi     # 0xf7ef0
callq 0x62b6
xorps %xmm0, %xmm0
leaq 0x358(%rsp), %r14
movups %xmm0, 0x18(%r14)
movl $0x0, 0x28(%r14)
movl $0x2710, %edi           # imm = 0x2710
callq 0x244a4
xorl %edi, %edi
callq 0xb2ba
subq $0x8, %rsp
leaq 0xa3a52(%rip), %rax     # 0xc8af0
leaq 0x8(%rsp), %r10
movq %rbx, %rdi
movl $0xfffcf2c0, %esi       # imm = 0xFFFCF2C0
movl $0x30d40, %edx          # imm = 0x30D40
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq %r10
pushq %r14
callq 0xc1b8
addq $0x20, %rsp
cmpq $0x0, 0x18(%r14)
jne 0x250e3
cmpq $0x0, 0x378(%rsp)
jne 0x25102
addq $0x9d8, %rsp            # imm = 0x9D8
popq %rbx
popq %r14
retq
leaq 0x11b6f(%rip), %rdi     # 0x36c59
leaq 0x11860(%rip), %rsi     # 0x36951
leaq 0x11b70(%rip), %rcx     # 0x36c68
movl $0xf0, %edx
callq 0x20d0
leaq 0x11b94(%rip), %rdi     # 0x36c9d
leaq 0x11841(%rip), %rsi     # 0x36951
leaq 0x11b51(%rip), %rcx     # 0x36c68
movl $0xf1, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/search__test.cpp
// Function: test_qsearch_standpat_raises_alpha()
void test_qsearch_standpat_raises_alpha() {
    position pos;
    reset_pos(&pos);

    clear_hash_table(&htbl);
    search_stats stats; stats.nodes=0; stats.qnodes=0; stats.last_pv.n=0;
    start_timer(10000);

    int32 score = eval(&pos,false);

    move moves[50];

    set_abort_search(false);
    int32 qscore = qsearch(&pos,-INF,INF,0,0,false,&stats,moves,gundos);
    assert(score==qscore);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x9e0, %rsp            # imm = 0x9E0
leaq 0x198(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa51
leaq 0xd2dad(%rip), %rdi     # 0xf7ef0
callq 0x62b6
xorps %xmm0, %xmm0
leaq 0x360(%rsp), %r14
movups %xmm0, 0x18(%r14)
movl $0x0, 0x28(%r14)
movl $0x2710, %edi           # imm = 0x2710
callq 0x244a4
movq %rbx, %rdi
xorl %esi, %esi
callq 0x58f7
movl %eax, %ebp
xorl %edi, %edi
callq 0xb2ba
subq $0x8, %rsp
leaq 0xa3968(%rip), %rax     # 0xc8af0
leaq 0x8(%rsp), %r10
movq %rbx, %rdi
movl $0xfffcf2c0, %esi       # imm = 0xFFFCF2C0
movl $0x30d40, %edx          # imm = 0x30D40
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq %r10
pushq %r14
callq 0xc1b8
addq $0x20, %rsp
cmpl %eax, %ebp
jne 0x251c0
addq $0x9e0, %rsp            # imm = 0x9E0
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x11ae6(%rip), %rdi     # 0x36cad
leaq 0x11783(%rip), %rsi     # 0x36951
leaq 0x11ae6(%rip), %rcx     # 0x36cbb
movl $0x102, %edx            # imm = 0x102
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/search__test.cpp
// Function: test_qsearch_standpat_does_not_raise_alpha()
void test_qsearch_standpat_does_not_raise_alpha() {
    position pos;
    reset_pos(&pos);

    clear_hash_table(&htbl);

    search_stats stats; stats.nodes=0; stats.qnodes=0; stats.last_pv.n=0;
    start_timer(10000);
    move moves[50];

    set_abort_search(false);
    int32 qscore = qsearch(&pos,queen_val,INF,0,0,false,&stats,moves,gundos);
    assert(queen_val==qscore);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x9d8, %rsp            # imm = 0x9D8
leaq 0x190(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa51
leaq 0xd2cf0(%rip), %rdi     # 0xf7ef0
callq 0x62b6
xorps %xmm0, %xmm0
leaq 0x358(%rsp), %r14
movups %xmm0, 0x18(%r14)
movl $0x0, 0x28(%r14)
movl $0x2710, %edi           # imm = 0x2710
callq 0x244a4
xorl %edi, %edi
callq 0xb2ba
subq $0x8, %rsp
leaq 0xa38b7(%rip), %rax     # 0xc8af0
leaq 0x8(%rsp), %r10
movq %rbx, %rdi
movl $0x384, %esi            # imm = 0x384
movl $0x30d40, %edx          # imm = 0x30D40
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq %r10
pushq %r14
callq 0xc1b8
addq $0x20, %rsp
cmpl $0x384, %eax            # imm = 0x384
jne 0x25273
addq $0x9d8, %rsp            # imm = 0x9D8
popq %rbx
popq %r14
retq
leaq 0x11a6b(%rip), %rdi     # 0x36ce5
leaq 0x116d0(%rip), %rsi     # 0x36951
leaq 0x11a6f(%rip), %rcx     # 0x36cf7
movl $0x111, %edx            # imm = 0x111
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/search__test.cpp
// Function: test_qsearch_expands_just_captures()
void test_qsearch_expands_just_captures() {
    position pos;
    set_pos(&pos,"7k/8/8/3b4/8/8/6P1/K7 b - -");

    clear_hash_table(&htbl);

    search_stats stats; stats.nodes=0; stats.qnodes=0; stats.last_pv.n=0;
    start_timer(10000);
    move moves[50];

    set_abort_search(false);
    qsearch(&pos,-INF,INF,0,0,false,&stats,moves,gundos);

    assert(stats.nodes==0);
    assert(stats.qnodes==1);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x9d8, %rsp            # imm = 0x9D8
leaq 0x11a86(%rip), %rsi     # 0x36d29
leaq 0x190(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
leaq 0xd2c36(%rip), %rdi     # 0xf7ef0
callq 0x62b6
xorps %xmm0, %xmm0
leaq 0x358(%rsp), %r14
movups %xmm0, 0x18(%r14)
movl $0x0, 0x28(%r14)
movl $0x2710, %edi           # imm = 0x2710
callq 0x244a4
xorl %edi, %edi
callq 0xb2ba
subq $0x8, %rsp
leaq 0xa37fd(%rip), %rax     # 0xc8af0
leaq 0x8(%rsp), %r10
movq %rbx, %rdi
movl $0xfffcf2c0, %esi       # imm = 0xFFFCF2C0
movl $0x30d40, %edx          # imm = 0x30D40
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq %r10
pushq %r14
callq 0xc1b8
addq $0x20, %rsp
cmpq $0x0, 0x18(%r14)
jne 0x25338
cmpq $0x1, 0x378(%rsp)
jne 0x25357
addq $0x9d8, %rsp            # imm = 0x9D8
popq %rbx
popq %r14
retq
leaq 0x1191a(%rip), %rdi     # 0x36c59
leaq 0x1160b(%rip), %rsi     # 0x36951
leaq 0x119f8(%rip), %rcx     # 0x36d45
movl $0x121, %edx            # imm = 0x121
callq 0x20d0
leaq 0x11a11(%rip), %rdi     # 0x36d6f
leaq 0x115ec(%rip), %rsi     # 0x36951
leaq 0x119d9(%rip), %rcx     # 0x36d45
movl $0x122, %edx            # imm = 0x122
callq 0x20d0