LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/test/movegen__test.cpp
// Function: test_gen_legal_moves()
void test_gen_legal_moves() {
    position pos;
    set_pos(&pos,"7k/4Bp1p/8/8/8/8/8/1K4R1 b - - 0 1");
    move moves[50],*mp;
    mp = gen_legal_moves(moves,&pos,true,true);
    assert(num_moves(moves,mp,true,true)==4);

    set_pos(&pos,"rnb1k2r/ppq1n3/2pppp2/6pp/2PP3N/P2BP3/2PB1PPP/R2Q1RK1 w kq - -");
    assert(is_legal_move(to_move(KNIGHT,H4,G6),&pos));

    set_pos(&pos,"r2r2k1/1p2p1b1/1pp1b1pp/4P2n/PP3p1p/2P2N2/5PP1/R3KBNR b KQ b3 -");
    assert(is_legal_move(to_move(BISHOP,E6,B3),&pos));
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x368, %rsp            # imm = 0x368
leaq 0x161f3(%rip), %rsi     # 0x341c6
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
leaq 0x1d0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x7840
movq %r14, %rdi
movq %rax, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0xe7c9
cmpl $0x4, %eax
jne 0x1e090
leaq 0x16208(%rip), %rsi     # 0x34226
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movl $0x2, %edi
movl $0x27, %esi
movl $0x16, %edx
callq 0x76b8
movq %rax, %rdi
movq %rbx, %rsi
callq 0xe5c8
testb %al, %al
je 0x1e0af
leaq 0x1623a(%rip), %rsi     # 0x3428f
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movl $0x3, %edi
movl $0x14, %esi
movl $0x29, %edx
callq 0x76b8
movq %rax, %rdi
movq %rbx, %rsi
callq 0xe5c8
testb %al, %al
je 0x1e0ce
addq $0x368, %rsp            # imm = 0x368
popq %rbx
popq %r14
retq
leaq 0x16152(%rip), %rdi     # 0x341e9
leaq 0x14c30(%rip), %rsi     # 0x32cce
leaq 0x16165(%rip), %rcx     # 0x3420a
movl $0x200, %edx            # imm = 0x200
callq 0x20d0
leaq 0x161af(%rip), %rdi     # 0x34265
leaq 0x14c11(%rip), %rsi     # 0x32cce
leaq 0x16146(%rip), %rcx     # 0x3420a
movl $0x203, %edx            # imm = 0x203
callq 0x20d0
leaq 0x161fa(%rip), %rdi     # 0x342cf
leaq 0x14bf2(%rip), %rsi     # 0x32cce
leaq 0x16127(%rip), %rcx     # 0x3420a
movl $0x206, %edx            # imm = 0x206
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/test/movegen__test.cpp
// Function: test_movegen()
void test_movegen() {
    test_gen_knight_moves();
    test_gen_knight_captures();
    test_gen_knight_noncaptures();
    test_gen_bishop_moves();
    test_gen_bishop_captures();
    test_gen_bishop_noncaptures();
    test_gen_rook_moves();
    test_gen_rook_captures();
    test_gen_rook_noncaptures();
    test_gen_queen_moves();
    test_gen_queen_captures();
    test_gen_queen_noncaptures();
    test_gen_king_moves();
    test_gen_king_captures();
    test_gen_king_noncaptures();
    test_gen_pawn_moves();
    test_gen_pawn_captures();
    test_gen_pawn_noncaps();
    test_gen_moves();
    test_gen_legal_moves();
}

// Assembly:
pushq %rax
callq 0x19d84
callq 0x19f32
callq 0x19feb
callq 0x1a214
callq 0x1a7d3
callq 0x1a8f1
callq 0x1ae0e
callq 0x1b1b9
callq 0x1b2c1
callq 0x1b618
callq 0x1bbba
callq 0x1bc76
callq 0x1c1c7
callq 0x1cc67
callq 0x1ce26
callq 0x1d1f1
callq 0x1d8a2
callq 0x1ddcb
callq 0x1df06
popq %rax
jmp 0x1dfc2
nop
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/test/mvvlva__test.cpp
// Function: get_highest_scoring(position*, unsigned long long*, unsigned long long*)
move get_highest_scoring(position *pos,move *startp,move *endp) {
    move* bestp = 0;
    int32 bestscore = 0;

    for (move *mp=startp;mp<endp;mp++) {
        if (*mp != 0) {
            int32 score = mvvlva(pos,*mp);
            if (bestp==0 || score > bestscore) {
                bestp = mp;
                bestscore = score;
            }
        }
    }

    move bestmv = *bestp;
    *bestp = 0;
    return bestmv;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
xorl %ebp, %ebp
movq (%r14), %rsi
testq %rsi, %rsi
je 0x1e196
movq %r15, %rdi
callq 0x8a95
testq %r12, %r12
sete %cl
cmpl %ebp, %eax
setg %dl
orb %cl, %dl
movq %r14, %rcx
jne 0x1e191
movl %ebp, %eax
movq %r12, %rcx
movl %eax, %ebp
movq %rcx, %r12
addq $0x8, %r14
cmpq %rbx, %r14
jb 0x1e16a
movq (%r12), %rax
movq $0x0, (%r12)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/test/mvvlva__test.cpp
// Function: test_mvvlva1()
void test_mvvlva1() {
    position pos;
    set_pos(&pos,"3r1rk1/p3qp1p/2bb2p1/2p5/3P4/1P6/PBQN1PPP/2R2RK1 b - - ");
    move moves[50],*endp;
    endp = gen_legal_moves(moves,&pos,true,true); // 46 moves

    move c5d4 = to_capture(PAWN,C5,D4,PAWN);
    move c6g2 = to_capture(BISHOP,C6,G2,PAWN);
    move d6h2 = to_capture(BISHOP,D6,H2,PAWN);

    move bestmv = get_highest_scoring(&pos,moves,endp);
    move bestmv2 = get_highest_scoring(&pos,moves,endp);
    move bestmv3 = get_highest_scoring(&pos,moves,endp);

    assert(bestmv==c5d4);
    assert(bestmv2 != bestmv3);
    assert(bestmv2==c6g2 || bestmv2==d6h2);
    assert(bestmv3==c6g2 || bestmv3==d6h2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x368, %rsp            # imm = 0x368
leaq 0x1612d(%rip), %rsi     # 0x342f9
leaq 0x1a0(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq %rbx, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x7840
movq %rax, %r12
movl $0x1, %edi
movl $0x1a, %esi
movl $0x23, %edx
movl $0x1, %ecx
callq 0x76d7
movq %rax, 0x8(%rsp)
movl $0x3, %edi
movl $0x12, %esi
movl $0x36, %edx
movl $0x1, %ecx
callq 0x76d7
movq %rax, %r15
movl $0x3, %edi
movl $0x13, %esi
movl $0x37, %edx
movl $0x1, %ecx
callq 0x76d7
movq %rax, %r13
movq %rbx, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x1e154
movq %rax, %r14
movq %rbx, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x1e154
movq %rax, %rbp
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
movq %r12, %rdx
callq 0x1e154
cmpq 0x8(%rsp), %r14
jne 0x1e2bf
cmpq %rax, %rbp
je 0x1e2de
cmpq %r15, %rbp
sete %cl
cmpq %r13, %rbp
sete %dl
orb %cl, %dl
je 0x1e2fd
cmpq %r15, %rax
sete %cl
cmpq %r13, %rax
sete %al
orb %cl, %al
je 0x1e31c
addq $0x368, %rsp            # imm = 0x368
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1606b(%rip), %rdi     # 0x34331
leaq 0x16071(%rip), %rsi     # 0x3433e
leaq 0x16080(%rip), %rcx     # 0x34354
movl $0x2e, %edx
callq 0x20d0
leaq 0x16083(%rip), %rdi     # 0x34368
leaq 0x16052(%rip), %rsi     # 0x3433e
leaq 0x16061(%rip), %rcx     # 0x34354
movl $0x2f, %edx
callq 0x20d0
leaq 0x16077(%rip), %rdi     # 0x3437b
leaq 0x16033(%rip), %rsi     # 0x3433e
leaq 0x16042(%rip), %rcx     # 0x34354
movl $0x30, %edx
callq 0x20d0
leaq 0x16077(%rip), %rdi     # 0x3439a
leaq 0x16014(%rip), %rsi     # 0x3433e
leaq 0x16023(%rip), %rcx     # 0x34354
movl $0x31, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/test/mvvlva__test.cpp
// Function: test_mvvlva4()
void test_mvvlva4() {
    position pos;
    set_pos(&pos,"6R1/kp6/8/1KpP4/8/8/8/6B1 w - c6");

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

    move d5c6 = to_capture(PAWN,D5,C6,PAWN);
    set_epcapture(&d5c6);

    move b5c5 = to_capture(KING,B5,C5,PAWN);
    move g1c5 = to_capture(BISHOP,G1,C5,PAWN);

    assert(is_in_move_list(d5c6,moves,endp));
    assert(is_in_move_list(b5c5,moves,endp));
    assert(is_in_move_list(g1c5,moves,endp));

    assert(get_highest_scoring(&pos,moves,endp)==d5c6);
    assert(get_highest_scoring(&pos,moves,endp)==g1c5);
    assert(get_highest_scoring(&pos,moves,endp)==b5c5);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x370, %rsp            # imm = 0x370
leaq 0x15c0c(%rip), %rsi     # 0x34800
leaq 0x1a8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x7840
movq %rax, %rbx
movl $0x1, %edi
movl $0x1b, %esi
movl $0x12, %edx
movl $0x1, %ecx
callq 0x76d7
leaq 0x8(%rsp), %r13
movq %rax, (%r13)
movq %r13, %rdi
callq 0x7797
movl $0x6, %edi
movl $0x19, %esi
movl $0x1a, %edx
movl $0x1, %ecx
callq 0x76d7
movq %rax, %r14
movl $0x3, %edi
movl $0x3e, %esi
movl $0x1a, %edx
movl $0x1, %ecx
callq 0x76d7
movq %rax, %r15
movq (%r13), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1ed37
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1ed56
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0xe727
testb %al, %al
je 0x1ed75
leaq 0x1a8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movq %rbx, %rdx
callq 0x1e154
cmpq 0x8(%rsp), %rax
jne 0x1ed94
leaq 0x1a8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movq %rbx, %rdx
callq 0x1e154
cmpq %r15, %rax
jne 0x1edb3
leaq 0x1a8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movq %rbx, %rdx
callq 0x1e154
cmpq %r14, %rax
jne 0x1edd2
addq $0x370, %rsp            # imm = 0x370
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x15ae3(%rip), %rdi     # 0x34821
leaq 0x155f9(%rip), %rsi     # 0x3433e
leaq 0x15af6(%rip), %rcx     # 0x34842
movl $0x95, %edx
callq 0x20d0
leaq 0x15af9(%rip), %rdi     # 0x34856
leaq 0x155da(%rip), %rsi     # 0x3433e
leaq 0x15ad7(%rip), %rcx     # 0x34842
movl $0x96, %edx
callq 0x20d0
leaq 0x15afb(%rip), %rdi     # 0x34877
leaq 0x155bb(%rip), %rsi     # 0x3433e
leaq 0x15ab8(%rip), %rcx     # 0x34842
movl $0x97, %edx
callq 0x20d0
leaq 0x15afd(%rip), %rdi     # 0x34898
leaq 0x1559c(%rip), %rsi     # 0x3433e
leaq 0x15a99(%rip), %rcx     # 0x34842
movl $0x99, %edx
callq 0x20d0
leaq 0x15b09(%rip), %rdi     # 0x348c3
leaq 0x1557d(%rip), %rsi     # 0x3433e
leaq 0x15a7a(%rip), %rcx     # 0x34842
movl $0x9a, %edx
callq 0x20d0
leaq 0x15b15(%rip), %rdi     # 0x348ee
leaq 0x1555e(%rip), %rsi     # 0x3433e
leaq 0x15a5b(%rip), %rcx     # 0x34842
movl $0x9b, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/test/mvvlva__test.cpp
// Function: test_mvvlva()
void test_mvvlva() {
    test_mvvlva1();
    test_mvvlva2();
    test_mvvlva3();
    test_mvvlva4();
}

// Assembly:
pushq %rax
callq 0x1e1b4
callq 0x1e33b
callq 0x1e691
popq %rax
jmp 0x1ebdd
nop
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/test/next__test.cpp
// Function: test_best_at_top()
void test_best_at_top() {
    position pos;
    reset_pos(&pos);

    move moves[20];
    move *endp = gen_legal_moves(moves,&pos,true,true);
    assert(endp-moves==20);

    set_move_score(moves+4,1000);
    set_move_score(moves+11,900);
    set_move_score(moves+7,-1500);
    move mv1 = moves[4];
    move mv2 = moves[11];
    move mv3 = moves[7];

    int i=0;
    for (move *mp=moves;mp<endp;mp++) {
        if (*mp != mv1 && *mp != mv2 && *mp != mv3) {
            assert(get_move_score(mp)==0);
        }
        best_at_top(mp,endp);

        if (i==0) {
            assert(*mp==mv1);
        } else if (i==1) {
            assert(*mp==mv2);
        } else if (i==19) {
            assert(*mp==mv3);
        }
        i++;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
leaq 0xa0(%rsp), %r14
movq %r14, %rdi
callq 0xaa43
movq %rsp, %rbx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x7840
movq %rax, %r14
subq %rbx, %rax
cmpq $0xa0, %rax
jne 0x1ef82
leaq 0x20(%rsp), %rdi
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x7818
leaq 0x58(%rsp), %rdi
movl $0x384, %esi            # imm = 0x384
callq 0x7818
leaq 0x38(%rsp), %rdi
movl $0xfffffa24, %esi       # imm = 0xFFFFFA24
callq 0x7818
cmpq %r14, %rbx
jae 0x1eef4
movq 0x20(%rsp), %r15
movq 0x38(%rsp), %r12
movq 0x58(%rsp), %r13
xorl %ebp, %ebp
movq (%rbx), %rax
cmpq %r15, %rax
sete %cl
cmpq %r13, %rax
sete %dl
orb %cl, %dl
cmpq %r12, %rax
sete %al
orb %dl, %al
jne 0x1eebd
movq %rbx, %rdi
callq 0x77fd
testl %eax, %eax
jne 0x1ef06
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9496
cmpl $0x13, %ebp
je 0x1eee4
cmpl $0x1, %ebp
je 0x1eedd
testl %ebp, %ebp
jne 0x1eee9
cmpq %r15, (%rbx)
je 0x1eee9
jmp 0x1ef25
cmpq %r13, (%rbx)
je 0x1eee9
jmp 0x1ef44
cmpq %r12, (%rbx)
jne 0x1ef63
incl %ebp
addq $0x8, %rbx
cmpq %r14, %rbx
jb 0x1ee96
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd1c5(%rip), %rdi      # 0x2c0d2
leaq 0x15a14(%rip), %rsi     # 0x34928
leaq 0x15a21(%rip), %rcx     # 0x3493c
movl $0x1e, %edx
callq 0x20d0
leaq 0x15a28(%rip), %rdi     # 0x34954
leaq 0x159f5(%rip), %rsi     # 0x34928
leaq 0x15a02(%rip), %rcx     # 0x3493c
movl $0x23, %edx
callq 0x20d0
leaq 0x15a12(%rip), %rdi     # 0x3495d
leaq 0x159d6(%rip), %rsi     # 0x34928
leaq 0x159e3(%rip), %rcx     # 0x3493c
movl $0x25, %edx
callq 0x20d0
leaq 0x159fc(%rip), %rdi     # 0x34966
leaq 0x159b7(%rip), %rsi     # 0x34928
leaq 0x159c4(%rip), %rcx     # 0x3493c
movl $0x27, %edx
callq 0x20d0
leaq 0x15990(%rip), %rdi     # 0x34919
leaq 0x15998(%rip), %rsi     # 0x34928
leaq 0x159a5(%rip), %rcx     # 0x3493c
movl $0x12, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x76b8
movq %rax, %r15
leaq 0x28(%rsp), %r14
movq %rax, -0x28(%r14)
movl $0x1, %edi
movl $0x34, %esi
movl $0x24, %edx
callq 0x76b8
movq %rax, %rbx
movq %rax, -0x20(%r14)
movq $0x0, -0x18(%r14)
movl $0x1, %edi
movl $0x30, %esi
movl $0x28, %edx
callq 0x76b8
movq %rax, %r13
movq %rax, -0x10(%r14)
movl $0x2, %edi
movl $0x3e, %esi
movl $0x2d, %edx
callq 0x76b8
movq %rax, %r12
movq %rax, -0x8(%r14)
movq %rsp, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x9511
testb %al, %al
jne 0x1f0cd
movl $0x1, %edi
movl $0x39, %esi
movl $0x31, %edx
callq 0x76b8
movq %rsp, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x9511
testb %al, %al
jne 0x1f0ec
movq %rsp, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x9511
testb %al, %al
je 0x1f10b
cmpq %r13, (%rsp)
jne 0x1f12a
cmpq %r15, 0x18(%rsp)
jne 0x1f149
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x9511
testb %al, %al
je 0x1f168
cmpq %r12, 0x8(%rsp)
jne 0x1f187
cmpq %rbx, 0x20(%rsp)
jne 0x1f1a6
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x1589b(%rip), %rdi     # 0x3496f
leaq 0x1584d(%rip), %rsi     # 0x34928
leaq 0x158b7(%rip), %rcx     # 0x34999
movl $0x35, %edx
callq 0x20d0
leaq 0x158c4(%rip), %rdi     # 0x349b7
leaq 0x1582e(%rip), %rsi     # 0x34928
leaq 0x15898(%rip), %rcx     # 0x34999
movl $0x36, %edx
callq 0x20d0
leaq 0x158db(%rip), %rdi     # 0x349ed
leaq 0x1580f(%rip), %rsi     # 0x34928
leaq 0x15879(%rip), %rcx     # 0x34999
movl $0x37, %edx
callq 0x20d0
leaq 0x158e2(%rip), %rdi     # 0x34a13
leaq 0x157f0(%rip), %rsi     # 0x34928
leaq 0x1585a(%rip), %rcx     # 0x34999
movl $0x38, %edx
callq 0x20d0
leaq 0x158d2(%rip), %rdi     # 0x34a22
leaq 0x157d1(%rip), %rsi     # 0x34928
leaq 0x1583b(%rip), %rcx     # 0x34999
movl $0x39, %edx
callq 0x20d0
leaq 0x158c2(%rip), %rdi     # 0x34a31
leaq 0x157b2(%rip), %rsi     # 0x34928
leaq 0x1581c(%rip), %rcx     # 0x34999
movl $0x3b, %edx
callq 0x20d0
leaq 0x158cb(%rip), %rdi     # 0x34a59
leaq 0x15793(%rip), %rsi     # 0x34928
leaq 0x157fd(%rip), %rcx     # 0x34999
movl $0x3c, %edx
callq 0x20d0
leaq 0x158bb(%rip), %rdi     # 0x34a68
leaq 0x15774(%rip), %rsi     # 0x34928
leaq 0x157de(%rip), %rcx     # 0x34999
movl $0x3d, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x158a1(%rip), %rsi     # 0x34a77
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
leaq 0x210(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x7840
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 0x8adc
testb %al, %al
je 0x1f256
movq (%rsp), %rax
movq (%rax), %rax
cmpq 0x10(%rsp), %rax
jne 0x1f275
addq $0xb78, %rsp            # imm = 0xB78
popq %rbx
popq %r14
retq
leaq 0x15959(%rip), %rdi     # 0x34bb6
leaq 0x156c4(%rip), %rsi     # 0x34928
leaq 0x1583d(%rip), %rcx     # 0x34aa8
movl $0x50, %edx
callq 0x20d0
leaq 0x1583b(%rip), %rdi     # 0x34ab7
leaq 0x156a5(%rip), %rsi     # 0x34928
leaq 0x1581e(%rip), %rcx     # 0x34aa8
movl $0x51, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x15829(%rip), %rsi     # 0x34ace
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
leaq 0x210(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x7840
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 0x8adc
testb %al, %al
je 0x1f325
movq (%rsp), %rax
movq (%rax), %rax
cmpq 0x18(%rsp), %rax
jne 0x1f344
addq $0xb78, %rsp            # imm = 0xB78
popq %rbx
popq %r14
retq
leaq 0x1588a(%rip), %rdi     # 0x34bb6
leaq 0x155f5(%rip), %rsi     # 0x34928
leaq 0x157c7(%rip), %rcx     # 0x34b01
movl $0x65, %edx
callq 0x20d0
leaq 0x157cc(%rip), %rdi     # 0x34b17
leaq 0x155d6(%rip), %rsi     # 0x34928
leaq 0x157a8(%rip), %rcx     # 0x34b01
movl $0x66, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x157bc(%rip), %rsi     # 0x34b30
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
leaq 0x210(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x7840
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 0x8adc
testb %al, %al
je 0x1f418
movq (%rsp), %rax
movq (%rax), %rax
cmpq 0x10(%rsp), %rax
jne 0x1f437
leaq 0x48(%rsp), %rdi
movq %rsp, %rsi
leaq 0x8(%rsp), %rdx
callq 0x8adc
testb %al, %al
je 0x1f456
movq (%rsp), %rax
movq (%rax), %rax
cmpq 0x18(%rsp), %rax
jne 0x1f475
addq $0xb78, %rsp            # imm = 0xB78
popq %rbx
popq %r14
retq
leaq 0x15797(%rip), %rdi     # 0x34bb6
leaq 0x15502(%rip), %rsi     # 0x34928
leaq 0x15736(%rip), %rcx     # 0x34b63
movl $0x7a, %edx
callq 0x20d0
leaq 0x15679(%rip), %rdi     # 0x34ab7
leaq 0x154e3(%rip), %rsi     # 0x34928
leaq 0x15717(%rip), %rcx     # 0x34b63
movl $0x7b, %edx
callq 0x20d0
leaq 0x15759(%rip), %rdi     # 0x34bb6
leaq 0x154c4(%rip), %rsi     # 0x34928
leaq 0x156f8(%rip), %rcx     # 0x34b63
movl $0x7d, %edx
callq 0x20d0
leaq 0x1569b(%rip), %rdi     # 0x34b17
leaq 0x154a5(%rip), %rsi     # 0x34928
leaq 0x156d9(%rip), %rcx     # 0x34b63
movl $0x7e, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0xaa43
leaq 0x210(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x7840
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 0x8adc
testb %al, %al
je 0x1f5ba
movq (%rsp), %rax
movq (%rax), %rax
cmpq 0x10(%rsp), %rax
jne 0x1f5d9
movl $0x13, %ebp
leaq 0x48(%rsp), %rbx
movq %rsp, %r14
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x8adc
testb %al, %al
je 0x1f59b
movq (%rsp), %rax
movq (%rax), %rax
cmpq 0x10(%rsp), %rax
je 0x1f57c
decl %ebp
jne 0x1f530
leaq 0x48(%rsp), %rdi
movq %rsp, %rsi
leaq 0x8(%rsp), %rdx
callq 0x8adc
testb %al, %al
jne 0x1f5f8
addq $0xb78, %rsp            # imm = 0xB78
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1561b(%rip), %rdi     # 0x34b9e
leaq 0x1539e(%rip), %rsi     # 0x34928
leaq 0x155eb(%rip), %rcx     # 0x34b7c
movl $0x98, %edx
callq 0x20d0
leaq 0x15614(%rip), %rdi     # 0x34bb6
leaq 0x1537f(%rip), %rsi     # 0x34928
leaq 0x155cc(%rip), %rcx     # 0x34b7c
movl $0x97, %edx
callq 0x20d0
leaq 0x155f5(%rip), %rdi     # 0x34bb6
leaq 0x15360(%rip), %rsi     # 0x34928
leaq 0x155ad(%rip), %rcx     # 0x34b7c
movl $0x93, %edx
callq 0x20d0
leaq 0x154d7(%rip), %rdi     # 0x34ab7
leaq 0x15341(%rip), %rsi     # 0x34928
leaq 0x1558e(%rip), %rcx     # 0x34b7c
movl $0x94, %edx
callq 0x20d0
leaq 0x155b6(%rip), %rdi     # 0x34bb5
leaq 0x15322(%rip), %rsi     # 0x34928
leaq 0x1556f(%rip), %rcx     # 0x34b7c
movl $0x9c, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x14318(%rip), %rsi     # 0x35205
leaq 0x58(%rsp), %r14
movq %r14, %rdi
callq 0xaa74
movl $0x1, %edi
movl $0xb, %esi
movl $0x1b, %edx
callq 0x76b8
leaq 0xa7bdb(%rip), %rdx     # 0xc8af0
movq %r14, %rdi
movq %rax, %rsi
callq 0x30e3
leaq 0x220(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x7840
movq %rax, %r14
movl $0x1, %edi
movl $0x1c, %esi
movl $0x13, %edx
movl $0x1, %ecx
callq 0x76d7
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
movq %r15, %rdi
callq 0x7797
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xe727
testb %al, %al
je 0x20fcb
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 0x8adc
movq (%rbx), %rax
movq (%rax), %rdi
callq 0x783c
cmpq 0x8(%rsp), %rax
jne 0x20fea
addq $0x3b0, %rsp            # imm = 0x3B0
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1424f(%rip), %rdi     # 0x35221
leaq 0x1394f(%rip), %rsi     # 0x34928
leaq 0x14263(%rip), %rcx     # 0x35243
movl $0x1c9, %edx            # imm = 0x1C9
callq 0x20d0
leaq 0x14274(%rip), %rdi     # 0x35265
leaq 0x13930(%rip), %rsi     # 0x34928
leaq 0x14244(%rip), %rcx     # 0x35243
movl $0x1d5, %edx            # imm = 0x1D5
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0xaa43
leaq 0x210(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x7840
movq %rax, %r15
movl $0x1, %edi
movl $0x37, %esi
movl $0x2f, %edx
callq 0x76b8
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xe727
testb %al, %al
je 0x21120
movl $0x1, %edi
movl $0x36, %esi
movl $0x26, %edx
callq 0x76b8
movq %rax, %rbx
leaq 0x210(%rsp), %r12
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xe727
testb %al, %al
je 0x2113f
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 0x8adc
movq (%r15), %rax
movq (%rax), %rdi
callq 0x783c
cmpq %r14, %rax
jne 0x2115e
leaq 0x48(%rsp), %rdi
movq %rsp, %r14
leaq 0x8(%rsp), %rdx
movq %r14, %rsi
callq 0x8adc
movq (%r14), %rax
movq (%rax), %rdi
callq 0x783c
cmpq %rbx, %rax
jne 0x2117d
addq $0x3a8, %rsp            # imm = 0x3A8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x14157(%rip), %rdi     # 0x3527e
leaq 0x137fa(%rip), %rsi     # 0x34928
leaq 0x1416a(%rip), %rcx     # 0x3529f
movl $0x1e0, %edx            # imm = 0x1E0
callq 0x20d0
leaq 0x1416d(%rip), %rdi     # 0x352b3
leaq 0x137db(%rip), %rsi     # 0x34928
leaq 0x1414b(%rip), %rcx     # 0x3529f
movl $0x1e3, %edx            # imm = 0x1E3
callq 0x20d0
leaq 0x1416f(%rip), %rdi     # 0x352d4
leaq 0x137bc(%rip), %rsi     # 0x34928
leaq 0x1412c(%rip), %rcx     # 0x3529f
movl $0x1ef, %edx            # imm = 0x1EF
callq 0x20d0
leaq 0x14168(%rip), %rdi     # 0x352ec
leaq 0x1379d(%rip), %rsi     # 0x34928
leaq 0x1410d(%rip), %rcx     # 0x3529f
movl $0x1f1, %edx            # imm = 0x1F1
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x7840
cmpq %rax, %r14
jae 0x211ea
movq %rax, %r15
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x9052
cmpq $0x0, (%r14)
sete %cl
xorb %al, %cl
je 0x211f7
addq $0x8, %r14
cmpq %r15, %r14
jb 0x211cb
addq $0x640, %rsp            # imm = 0x640
popq %rbx
popq %r14
popq %r15
retq
leaq 0x14106(%rip), %rdi     # 0x35304
leaq 0x13723(%rip), %rsi     # 0x34928
leaq 0x1411d(%rip), %rcx     # 0x35329
movl $0x1f8, %edx            # imm = 0x1F8
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1ee08
callq 0x1efa1
callq 0x1f1c5
callq 0x1f294
callq 0x1f363
callq 0x1f494
callq 0x1f617
callq 0x1fa8d
callq 0x1fe50
callq 0x2090a
callq 0x20bf2
callq 0x20eda
callq 0x21009
popq %rax
jmp 0x21216
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0xaa43
movq %rbx, %rdi
movl $0x1, %esi
movl $0x24, %edx
callq 0xa63d
cmpl $0x1, 0x90(%rbx)
jne 0x21c8d
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x1c, %edx
callq 0xa63d
cmpl $-0x1, 0x70(%rbx)
jne 0x21cac
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x2, %esi
movl $0x2d, %edx
callq 0xa63d
cmpl $0x2, 0xb4(%rbx)
jne 0x21ccb
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x13bf6(%rip), %rdi     # 0x3588a
leaq 0x139ed(%rip), %rsi     # 0x35688
leaq 0x13bfc(%rip), %rcx     # 0x3589e
movl $0x47, %edx
callq 0x20d0
leaq 0x13c01(%rip), %rdi     # 0x358b4
leaq 0x139ce(%rip), %rsi     # 0x35688
leaq 0x13bdd(%rip), %rcx     # 0x3589e
movl $0x4a, %edx
callq 0x20d0
leaq 0x13bf7(%rip), %rdi     # 0x358c9
leaq 0x139af(%rip), %rsi     # 0x35688
leaq 0x13bbe(%rip), %rcx     # 0x3589e
movl $0x4d, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0xaa43
movq %rbx, %rdi
movl $0x34, %esi
callq 0xa7d2
cmpl $0x0, 0xd0(%rbx)
jne 0x21d51
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x3f, %esi
callq 0xa7d2
cmpl $0x0, 0xfc(%rbx)
jne 0x21d70
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x4, %esi
callq 0xa7d2
cmpl $0x0, 0x10(%rbx)
jne 0x21d8f
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x13b87(%rip), %rdi     # 0x358df
leaq 0x13929(%rip), %rsi     # 0x35688
leaq 0x13b91(%rip), %rcx     # 0x358f7
movl $0x55, %edx
callq 0x20d0
leaq 0x13b99(%rip), %rdi     # 0x35910
leaq 0x1390a(%rip), %rsi     # 0x35688
leaq 0x13b72(%rip), %rcx     # 0x358f7
movl $0x58, %edx
callq 0x20d0
leaq 0x13b92(%rip), %rdi     # 0x35928
leaq 0x138eb(%rip), %rsi     # 0x35688
leaq 0x13b53(%rip), %rcx     # 0x358f7
movl $0x5b, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0xaa43
movq %rbx, %rdi
movl $0x23, %esi
callq 0xae04
testb %al, %al
je 0x23e2c
leaq 0x8(%rsp), %rdi
movl $0x3, %esi
callq 0xae04
testb %al, %al
jne 0x23e4b
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x12731(%rip), %rdi     # 0x36564
leaq 0x1184e(%rip), %rsi     # 0x35688
leaq 0x12738(%rip), %rcx     # 0x36579
movl $0x1b5, %edx            # imm = 0x1B5
callq 0x20d0
leaq 0x1273f(%rip), %rdi     # 0x36591
leaq 0x1182f(%rip), %rsi     # 0x35688
leaq 0x12719(%rip), %rcx     # 0x36579
movl $0x1b6, %edx            # imm = 0x1B6
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0xaa43
leaq 0x8(%rsp), %r14
movl $0x1c8, %edx            # imm = 0x1C8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2100
movq %rbx, %rdi
callq 0xaf67
movq %rbx, %rdi
callq 0xaf67
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0xa0e0
testb %al, %al
je 0x24150
leaq 0xc43e(%rip), %rsi      # 0x3053a
leaq 0x1d0(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
leaq 0x8(%rsp), %r14
movl $0x1c8, %edx            # imm = 0x1C8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2100
movq %rbx, %rdi
callq 0xaf67
movq %rbx, %rdi
callq 0xaf67
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0xa0e0
testb %al, %al
je 0x2416f
addq $0x398, %rsp            # imm = 0x398
popq %rbx
popq %r14
retq
leaq 0x9741(%rip), %rdi      # 0x2d898
leaq 0x1152a(%rip), %rsi     # 0x35688
leaq 0x12523(%rip), %rcx     # 0x36688
movl $0x1de, %edx            # imm = 0x1DE
callq 0x20d0
leaq 0x9722(%rip), %rdi      # 0x2d898
leaq 0x1150b(%rip), %rsi     # 0x35688
leaq 0x12504(%rip), %rcx     # 0x36688
movl $0x1e5, %edx            # imm = 0x1E5
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x12505(%rip), %rsi     # 0x366a2
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0xb08f
testb %al, %al
je 0x2424c
leaq 0x12534(%rip), %rsi     # 0x366f5
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0xb08f
testb %al, %al
je 0x2426b
leaq 0x12540(%rip), %rsi     # 0x36725
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0xb08f
testb %al, %al
je 0x2428a
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa43
movq %rbx, %rdi
callq 0xb08f
testb %al, %al
jne 0x242a9
leaq 0x1252f(%rip), %rsi     # 0x36755
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0xb08f
testb %al, %al
jne 0x242c8
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x124ef(%rip), %rdi     # 0x36742
leaq 0x1142e(%rip), %rsi     # 0x35688
leaq 0x1247b(%rip), %rcx     # 0x366dc
movl $0x1ed, %edx            # imm = 0x1ED
callq 0x20d0
leaq 0x124d0(%rip), %rdi     # 0x36742
leaq 0x1140f(%rip), %rsi     # 0x35688
leaq 0x1245c(%rip), %rcx     # 0x366dc
movl $0x1f1, %edx            # imm = 0x1F1
callq 0x20d0
leaq 0x124b1(%rip), %rdi     # 0x36742
leaq 0x113f0(%rip), %rsi     # 0x35688
leaq 0x1243d(%rip), %rcx     # 0x366dc
movl $0x1f5, %edx            # imm = 0x1F5
callq 0x20d0
leaq 0x12491(%rip), %rdi     # 0x36741
leaq 0x113d1(%rip), %rsi     # 0x35688
leaq 0x1241e(%rip), %rcx     # 0x366dc
movl $0x1f9, %edx            # imm = 0x1F9
callq 0x20d0
leaq 0x12472(%rip), %rdi     # 0x36741
leaq 0x113b2(%rip), %rsi     # 0x35688
leaq 0x123ff(%rip), %rcx     # 0x366dc
movl $0x1fc, %edx            # imm = 0x1FC
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1247b(%rip), %rsi     # 0x36771
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0xb105
testb %al, %al
je 0x243d0
leaq 0x1248c(%rip), %rsi     # 0x367a6
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0xb105
testb %al, %al
jne 0x243ef
leaq 0x12497(%rip), %rsi     # 0x367d5
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0xb105
testb %al, %al
je 0x2440e
leaq 0x1248f(%rip), %rsi     # 0x367f1
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0xb105
testb %al, %al
je 0x2442d
leaq 0x123cf(%rip), %rsi     # 0x36755
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0xb105
testb %al, %al
je 0x2444c
leaq 0x122f8(%rip), %rsi     # 0x366a2
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0xb105
testb %al, %al
jne 0x2446b
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x123eb(%rip), %rdi     # 0x367c2
leaq 0x112aa(%rip), %rsi     # 0x35688
leaq 0x123a8(%rip), %rcx     # 0x3678d
movl $0x204, %edx            # imm = 0x204
callq 0x20d0
leaq 0x123cb(%rip), %rdi     # 0x367c1
leaq 0x1128b(%rip), %rsi     # 0x35688
leaq 0x12389(%rip), %rcx     # 0x3678d
movl $0x207, %edx            # imm = 0x207
callq 0x20d0
leaq 0x123ad(%rip), %rdi     # 0x367c2
leaq 0x1126c(%rip), %rsi     # 0x35688
leaq 0x1236a(%rip), %rcx     # 0x3678d
movl $0x209, %edx            # imm = 0x209
callq 0x20d0
leaq 0x1238e(%rip), %rdi     # 0x367c2
leaq 0x1124d(%rip), %rsi     # 0x35688
leaq 0x1234b(%rip), %rcx     # 0x3678d
movl $0x20c, %edx            # imm = 0x20C
callq 0x20d0
leaq 0x1236f(%rip), %rdi     # 0x367c2
leaq 0x1122e(%rip), %rsi     # 0x35688
leaq 0x1232c(%rip), %rcx     # 0x3678d
movl $0x20f, %edx            # imm = 0x20F
callq 0x20d0
leaq 0x1234f(%rip), %rdi     # 0x367c1
leaq 0x1120f(%rip), %rsi     # 0x35688
leaq 0x1230d(%rip), %rcx     # 0x3678d
movl $0x212, %edx            # imm = 0x212
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0xaa43
movq %rbx, %rdi
callq 0xb17b
testb %al, %al
jne 0x24548
leaq 0x12381(%rip), %rsi     # 0x36837
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0xb17b
testb %al, %al
je 0x24567
leaq 0x12376(%rip), %rsi     # 0x36850
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0xb17b
testb %al, %al
je 0x24586
leaq 0x1236c(%rip), %rsi     # 0x3686a
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0xb17b
testb %al, %al
je 0x245a5
leaq 0x12363(%rip), %rsi     # 0x36885
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
movq %rbx, %rdi
callq 0xb17b
testb %al, %al
jne 0x245c4
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x122bd(%rip), %rdi     # 0x3680c
leaq 0x11132(%rip), %rsi     # 0x35688
leaq 0x122c2(%rip), %rcx     # 0x3681f
movl $0x218, %edx            # imm = 0x218
callq 0x20d0
leaq 0x1229f(%rip), %rdi     # 0x3680d
leaq 0x11113(%rip), %rsi     # 0x35688
leaq 0x122a3(%rip), %rcx     # 0x3681f
movl $0x21c, %edx            # imm = 0x21C
callq 0x20d0
leaq 0x12280(%rip), %rdi     # 0x3680d
leaq 0x110f4(%rip), %rsi     # 0x35688
leaq 0x12284(%rip), %rcx     # 0x3681f
movl $0x220, %edx            # imm = 0x220
callq 0x20d0
leaq 0x12261(%rip), %rdi     # 0x3680d
leaq 0x110d5(%rip), %rsi     # 0x35688
leaq 0x12265(%rip), %rcx     # 0x3681f
movl $0x224, %edx            # imm = 0x224
callq 0x20d0
leaq 0x12241(%rip), %rdi     # 0x3680c
leaq 0x110b6(%rip), %rsi     # 0x35688
leaq 0x12246(%rip), %rcx     # 0x3681f
movl $0x228, %edx            # imm = 0x228
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0xaa43
movq %rbx, %rdi
callq 0x23354
callq 0x21dae
callq 0x216a4
callq 0x21c17
callq 0x21cea
callq 0x2221c
callq 0x22ec3
callq 0x22bbe
callq 0x23dea
callq 0x23e6a
callq 0x240a2
callq 0x2418e
callq 0x242e7
callq 0x2448a
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1221d(%rip), %rsi     # 0x368a0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
leaq 0xd3859(%rip), %rdi     # 0xf7ef0
callq 0x6207
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 0x24650
subq $0x8, %rsp
leaq 0xa441d(%rip), %rax     # 0xc8af0
leaq 0x8916e6(%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 0xb398
addq $0x20, %rsp
cmpl $0xfffe, %eax           # imm = 0xFFFE
jne 0x24717
addq $0xb78, %rsp            # imm = 0xB78
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x121a0(%rip), %rdi     # 0x368be
leaq 0x121ac(%rip), %rsi     # 0x368d1
leaq 0x121bb(%rip), %rcx     # 0x368e7
movl $0x1f, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x121b0(%rip), %rsi     # 0x368fb
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
leaq 0xd3791(%rip), %rdi     # 0xf7ef0
callq 0x6207
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 0x24650
subq $0x8, %rsp
leaq 0xa4355(%rip), %rax     # 0xc8af0
leaq 0x89161e(%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 0xb398
addq $0x20, %rsp
cmpl $0xfffe, %eax           # imm = 0xFFFE
jne 0x247df
addq $0xb78, %rsp            # imm = 0xB78
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x120d8(%rip), %rdi     # 0x368be
leaq 0x120e4(%rip), %rsi     # 0x368d1
leaq 0x12125(%rip), %rcx     # 0x36919
movl $0x2b, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1211b(%rip), %rsi     # 0x3692e
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
leaq 0xd36c9(%rip), %rdi     # 0xf7ef0
callq 0x6207
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 0x24650
subq $0x8, %rsp
leaq 0xa428d(%rip), %rax     # 0xc8af0
leaq 0x891556(%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 0xb398
addq $0x20, %rsp
cmpl $0xfffc, %eax           # imm = 0xFFFC
jne 0x248a7
addq $0xb78, %rsp            # imm = 0xB78
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x120bd(%rip), %rdi     # 0x3696b
leaq 0x1201c(%rip), %rsi     # 0x368d1
leaq 0x120c2(%rip), %rcx     # 0x3697e
movl $0x37, %edx
callq 0x20d0