// File: jswaff[P]prophet3/test/pos__test.cpp
// Function: test_pos_consistency(position*)
bool test_pos_consistency(position *pos) {

    assert(pos);

    // king placement
    square_t wkingsq=NO_SQUARE;
    for (int32 sq=0;sq<64;sq++) {
        if (pos->piece[sq]==KING) {
            wkingsq=(square_t)sq;
            break;
        }
    }
    if (wkingsq != pos->white_king) {
        print("wkingsq: %d, %d\n",wkingsq,pos->white_king);
        return false;
    }

    square_t bkingsq=NO_SQUARE;
    for (int32 sq=0;sq<64;sq++) {
        if (pos->piece[sq]==-KING) {
            bkingsq=(square_t)sq;
            break;
        }
    }
    if (bkingsq != pos->black_king) {
        print("bkingsq: %d, %d\n",bkingsq,pos->black_king);
        return false;
    }

    // ep square
    if (pos->ep_sq!=NO_SQUARE) {
        if (pos->player==BLACK) {
            assert(get_rank(pos->ep_sq)==RANK_3);
            assert(pos->piece[pos->ep_sq-8]==PAWN);
        } else {
            assert(get_rank(pos->ep_sq)==RANK_6);
            assert(pos->piece[pos->ep_sq+8]==-PAWN);
        }
    }

    // piece counts and bitmaps
    uint32 num_wpawns=0,num_wrooks=0,num_wknights=0,num_wbishops=0,num_wqueens=0;
    uint32 num_bpawns=0,num_brooks=0,num_bknights=0,num_bbishops=0,num_bqueens=0;

    uint64 bb_wpawns=0,bb_wrooks=0,bb_wknights=0,bb_wbishops=0,bb_wqueens=0,bb_wpieces=0;
    uint64 bb_bpawns=0,bb_brooks=0,bb_bknights=0,bb_bbishops=0,bb_bqueens=0,bb_bpieces=0;

    for (int32 sq=0;sq<64;sq++) {
        if (pos->piece[sq] > NO_PIECE) {
            bb_wpieces |= bb_squares[sq];
        } else if (pos->piece[sq] < NO_PIECE) {
            bb_bpieces |= bb_squares[sq];
        }

        if (pos->piece[sq]==PAWN) {
            num_wpawns++;
            bb_wpawns |= bb_squares[sq];
        } else if (pos->piece[sq]==-PAWN) {
            num_bpawns++;
            bb_bpawns |= bb_squares[sq];
        } else if (pos->piece[sq]==ROOK) {
            num_wrooks++;
            bb_wrooks |= bb_squares[sq];
        } else if (pos->piece[sq]==-ROOK) {
            num_brooks++;
            bb_brooks |= bb_squares[sq];
        } else if (pos->piece[sq]==KNIGHT) {
            num_wknights++;
            bb_wknights |= bb_squares[sq];
        } else if (pos->piece[sq]==-KNIGHT) {
            num_bknights++;
            bb_bknights |= bb_squares[sq];
        } else if (pos->piece[sq]==BISHOP) {
            num_wbishops++;
            bb_wbishops |= bb_squares[sq];
        } else if (pos->piece[sq]==-BISHOP) {
            num_bbishops++;
            bb_bbishops |= bb_squares[sq];
        } else if (pos->piece[sq]==QUEEN) {
            num_wqueens++;
            bb_wqueens |= bb_squares[sq];
        } else if (pos->piece[sq]==-QUEEN) {
            num_bqueens++;
            bb_bqueens |= bb_squares[sq];
        }
    }

    assert(bb_wpawns==pos->white_pawns);
    assert(get_num_bits(bb_wpawns)==num_wpawns);
    assert(num_wpawns==pos->piece_counts[WHITE][PAWN]);

    assert(bb_bpawns==pos->black_pawns);
    assert(get_num_bits(bb_bpawns)==num_bpawns);
    assert(num_bpawns==pos->piece_counts[BLACK][PAWN]);

    assert(bb_wknights==pos->white_knights);
    assert(get_num_bits(bb_wknights)==num_wknights);
    assert(num_wknights==pos->piece_counts[WHITE][KNIGHT]);

    assert(bb_bknights==pos->black_knights);
    assert(get_num_bits(bb_bknights)==num_bknights);
    assert(num_bknights==pos->piece_counts[BLACK][KNIGHT]);

    assert(bb_wbishops==pos->white_bishops);
    assert(get_num_bits(bb_wbishops)==num_wbishops);
    assert(num_wbishops==pos->piece_counts[WHITE][BISHOP]);

    assert(bb_bbishops==pos->black_bishops);
    assert(get_num_bits(bb_bbishops)==num_bbishops);
    assert(num_bbishops==pos->piece_counts[BLACK][BISHOP]);

    assert(bb_wrooks==pos->white_rooks);
    assert(get_num_bits(bb_wrooks)==num_wrooks);
    assert(num_wrooks==pos->piece_counts[WHITE][ROOK]);

    assert(bb_brooks==pos->black_rooks);
    assert(get_num_bits(bb_brooks)==num_brooks);
    assert(num_brooks==pos->piece_counts[BLACK][ROOK]);

    assert(bb_wqueens==pos->white_queens);
    assert(get_num_bits(bb_wqueens)==num_wqueens);
    assert(num_wqueens==pos->piece_counts[WHITE][QUEEN]);

    assert(bb_bqueens==pos->black_queens);
    assert(get_num_bits(bb_bqueens)==num_bqueens);
    assert(num_bqueens==pos->piece_counts[BLACK][QUEEN]);

    assert(bb_wpieces==pos->white_pieces);
    assert(bb_bpieces==pos->black_pieces);

    // assert casting rights make sense
    if (can_castle_bq(pos)) {
        assert(pos->piece[E8]==-KING);
        assert(pos->piece[A8]==-ROOK);
    }
    if (can_castle_bk(pos)) {
        assert(pos->piece[E8]==-KING);
        assert(pos->piece[H8]==-ROOK);
    }
    if (can_castle_wq(pos)) {
        assert(pos->piece[E1]==KING);
        assert(pos->piece[A1]==ROOK);
    }
    if (can_castle_wk(pos)) {
        assert(pos->piece[E1]==KING);
        assert(pos->piece[H1]==ROOK);
    }

    assert(pos->hash_key==build_hash_key(pos));
    assert(pos->pawn_key==build_pawn_key(pos));

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2e0d8
jmp 0x2e0f7
leaq 0x746a(%rip), %rdi      # 0x35549
leaq 0x13e77(%rip), %rsi     # 0x41f5d
movl $0x11a, %edx            # imm = 0x11A
leaq 0x1473c(%rip), %rcx     # 0x4282e
callq 0x20c0
movl $0x40, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
cmpl $0x40, -0x18(%rbp)
jge 0x2e12e
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
cmpl $0x6, (%rax,%rcx,4)
jne 0x2e121
movl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x2e12e
jmp 0x2e123
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x2e105
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x14c(%rcx), %eax
je 0x2e161
movl -0x14(%rbp), %esi
movq -0x10(%rbp), %rax
movl 0x14c(%rax), %edx
leaq 0x14703(%rip), %rdi     # 0x42854
movb $0x0, %al
callq 0x8c60
movb $0x0, -0x1(%rbp)
jmp 0x2eed4
movl $0x40, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
cmpl $0x40, -0x20(%rbp)
jge 0x2e198
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
cmpl $-0x6, (%rax,%rcx,4)
jne 0x2e18b
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x2e198
jmp 0x2e18d
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x2e16f
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x150(%rcx), %eax
je 0x2e1cb
movl -0x1c(%rbp), %esi
movq -0x10(%rbp), %rax
movl 0x150(%rax), %edx
leaq 0x146aa(%rip), %rdi     # 0x42865
movb $0x0, %al
callq 0x8c60
movb $0x0, -0x1(%rbp)
jmp 0x2eed4
movq -0x10(%rbp), %rax
cmpl $0x40, 0x13c(%rax)
je 0x2e2cf
movq -0x10(%rbp), %rax
cmpl $0x0, 0x138(%rax)
jne 0x2e25b
movq -0x10(%rbp), %rax
movl 0x13c(%rax), %edi
callq 0x120d0
cmpl $0x5, %eax
jne 0x2e1ff
jmp 0x2e21e
leaq 0x14670(%rip), %rdi     # 0x42876
leaq 0x13d50(%rip), %rsi     # 0x41f5d
movl $0x138, %edx            # imm = 0x138
leaq 0x14615(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x13c(%rcx), %ecx
subl $0x8, %ecx
movslq %ecx, %rcx
cmpl $0x1, (%rax,%rcx,4)
jne 0x2e23a
jmp 0x2e259
leaq 0x14652(%rip), %rdi     # 0x42893
leaq 0x13d15(%rip), %rsi     # 0x41f5d
movl $0x139, %edx            # imm = 0x139
leaq 0x145da(%rip), %rcx     # 0x4282e
callq 0x20c0
jmp 0x2e2cd
movq -0x10(%rbp), %rax
movl 0x13c(%rax), %edi
callq 0x120d0
cmpl $0x2, %eax
jne 0x2e271
jmp 0x2e290
leaq 0x1463a(%rip), %rdi     # 0x428b2
leaq 0x13cde(%rip), %rsi     # 0x41f5d
movl $0x13b, %edx            # imm = 0x13B
leaq 0x145a3(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x13c(%rcx), %ecx
addl $0x8, %ecx
movslq %ecx, %rcx
cmpl $-0x1, (%rax,%rcx,4)
jne 0x2e2ac
jmp 0x2e2cb
leaq 0x1461c(%rip), %rdi     # 0x428cf
leaq 0x13ca3(%rip), %rsi     # 0x41f5d
movl $0x13c, %edx            # imm = 0x13C
leaq 0x14568(%rip), %rcx     # 0x4282e
callq 0x20c0
jmp 0x2e2cd
jmp 0x2e2cf
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
movq $0x0, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
movq $0x0, -0x70(%rbp)
movq $0x0, -0x78(%rbp)
movq $0x0, -0x80(%rbp)
movq $0x0, -0x88(%rbp)
movq $0x0, -0x90(%rbp)
movq $0x0, -0x98(%rbp)
movq $0x0, -0xa0(%rbp)
movq $0x0, -0xa8(%rbp)
movl $0x0, -0xac(%rbp)
cmpl $0x40, -0xac(%rbp)
jge 0x2e66a
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jle 0x2e3c8
movslq -0xac(%rbp), %rcx
leaq 0xd72b6(%rip), %rax     # 0x105670
movq (%rax,%rcx,8), %rax
orq -0x78(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0x2e3fb
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jge 0x2e3f9
movslq -0xac(%rbp), %rcx
leaq 0xd7289(%rip), %rax     # 0x105670
movq (%rax,%rcx,8), %rax
orq -0xa8(%rbp), %rax
movq %rax, -0xa8(%rbp)
jmp 0x2e3fb
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
cmpl $0x1, (%rax,%rcx,4)
jne 0x2e434
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movslq -0xac(%rbp), %rcx
leaq 0xd724d(%rip), %rax     # 0x105670
movq (%rax,%rcx,8), %rax
orq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x2e654
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
jne 0x2e46d
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movslq -0xac(%rbp), %rcx
leaq 0xd7214(%rip), %rax     # 0x105670
movq (%rax,%rcx,8), %rax
orq -0x80(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x2e652
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
cmpl $0x4, (%rax,%rcx,4)
jne 0x2e4a6
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movslq -0xac(%rbp), %rcx
leaq 0xd71db(%rip), %rax     # 0x105670
movq (%rax,%rcx,8), %rax
orq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x2e650
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
cmpl $-0x4, (%rax,%rcx,4)
jne 0x2e4e5
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movslq -0xac(%rbp), %rcx
leaq 0xd71a2(%rip), %rax     # 0x105670
movq (%rax,%rcx,8), %rax
orq -0x88(%rbp), %rax
movq %rax, -0x88(%rbp)
jmp 0x2e64e
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
cmpl $0x2, (%rax,%rcx,4)
jne 0x2e51e
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movslq -0xac(%rbp), %rcx
leaq 0xd7163(%rip), %rax     # 0x105670
movq (%rax,%rcx,8), %rax
orq -0x60(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x2e64c
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
cmpl $-0x2, (%rax,%rcx,4)
jne 0x2e55d
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
movslq -0xac(%rbp), %rcx
leaq 0xd712a(%rip), %rax     # 0x105670
movq (%rax,%rcx,8), %rax
orq -0x90(%rbp), %rax
movq %rax, -0x90(%rbp)
jmp 0x2e64a
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
cmpl $0x3, (%rax,%rcx,4)
jne 0x2e596
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movslq -0xac(%rbp), %rcx
leaq 0xd70eb(%rip), %rax     # 0x105670
movq (%rax,%rcx,8), %rax
orq -0x68(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x2e648
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
cmpl $-0x3, (%rax,%rcx,4)
jne 0x2e5d2
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movslq -0xac(%rbp), %rcx
leaq 0xd70b2(%rip), %rax     # 0x105670
movq (%rax,%rcx,8), %rax
orq -0x98(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0x2e646
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
cmpl $0x5, (%rax,%rcx,4)
jne 0x2e608
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movslq -0xac(%rbp), %rcx
leaq 0xd7076(%rip), %rax     # 0x105670
movq (%rax,%rcx,8), %rax
orq -0x70(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x2e644
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
cmpl $-0x5, (%rax,%rcx,4)
jne 0x2e642
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
movslq -0xac(%rbp), %rcx
leaq 0xd7040(%rip), %rax     # 0x105670
movq (%rax,%rcx,8), %rax
orq -0xa0(%rbp), %rax
movq %rax, -0xa0(%rbp)
jmp 0x2e644
jmp 0x2e646
jmp 0x2e648
jmp 0x2e64a
jmp 0x2e64c
jmp 0x2e64e
jmp 0x2e650
jmp 0x2e652
jmp 0x2e654
jmp 0x2e656
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
jmp 0x2e38e
movq -0x50(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x158(%rcx), %rax
jne 0x2e67d
jmp 0x2e69c
leaq 0x1426b(%rip), %rdi     # 0x428ef
leaq 0x138d2(%rip), %rsi     # 0x41f5d
movl $0x16f, %edx            # imm = 0x16F
leaq 0x14197(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x50(%rbp), %rdi
callq 0x47b0
cmpl -0x24(%rbp), %eax
jne 0x2e6ac
jmp 0x2e6cb
leaq 0x14258(%rip), %rdi     # 0x4290b
leaq 0x138a3(%rip), %rsi     # 0x41f5d
movl $0x170, %edx            # imm = 0x170
leaq 0x14168(%rip), %rcx     # 0x4282e
callq 0x20c0
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x120(%rcx), %eax
jne 0x2e6dc
jmp 0x2e6fb
leaq 0x1424c(%rip), %rdi     # 0x4292f
leaq 0x13873(%rip), %rsi     # 0x41f5d
movl $0x171, %edx            # imm = 0x171
leaq 0x14138(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x80(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x160(%rcx), %rax
jne 0x2e70e
jmp 0x2e72d
leaq 0x14245(%rip), %rdi     # 0x4295a
leaq 0x13841(%rip), %rsi     # 0x41f5d
movl $0x173, %edx            # imm = 0x173
leaq 0x14106(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x80(%rbp), %rdi
callq 0x47b0
cmpl -0x38(%rbp), %eax
jne 0x2e73d
jmp 0x2e75c
leaq 0x14232(%rip), %rdi     # 0x42976
leaq 0x13812(%rip), %rsi     # 0x41f5d
movl $0x174, %edx            # imm = 0x174
leaq 0x140d7(%rip), %rcx     # 0x4282e
callq 0x20c0
movl -0x38(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x104(%rcx), %eax
jne 0x2e76d
jmp 0x2e78c
leaq 0x14226(%rip), %rdi     # 0x4299a
leaq 0x137e2(%rip), %rsi     # 0x41f5d
movl $0x175, %edx            # imm = 0x175
leaq 0x140a7(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x60(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x168(%rcx), %rax
jne 0x2e79f
jmp 0x2e7be
leaq 0x1421f(%rip), %rdi     # 0x429c5
leaq 0x137b0(%rip), %rsi     # 0x41f5d
movl $0x177, %edx            # imm = 0x177
leaq 0x14075(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x60(%rbp), %rdi
callq 0x47b0
cmpl -0x2c(%rbp), %eax
jne 0x2e7ce
jmp 0x2e7ed
leaq 0x14210(%rip), %rdi     # 0x429e5
leaq 0x13781(%rip), %rsi     # 0x41f5d
movl $0x178, %edx            # imm = 0x178
leaq 0x14046(%rip), %rcx     # 0x4282e
callq 0x20c0
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x124(%rcx), %eax
jne 0x2e7fe
jmp 0x2e81d
leaq 0x14208(%rip), %rdi     # 0x42a0d
leaq 0x13751(%rip), %rsi     # 0x41f5d
movl $0x179, %edx            # imm = 0x179
leaq 0x14016(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x90(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x170(%rcx), %rax
jne 0x2e833
jmp 0x2e852
leaq 0x14202(%rip), %rdi     # 0x42a3c
leaq 0x1371c(%rip), %rsi     # 0x41f5d
movl $0x17b, %edx            # imm = 0x17B
leaq 0x13fe1(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x90(%rbp), %rdi
callq 0x47b0
cmpl -0x40(%rbp), %eax
jne 0x2e865
jmp 0x2e884
leaq 0x141f0(%rip), %rdi     # 0x42a5c
leaq 0x136ea(%rip), %rsi     # 0x41f5d
movl $0x17c, %edx            # imm = 0x17C
leaq 0x13faf(%rip), %rcx     # 0x4282e
callq 0x20c0
movl -0x40(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x108(%rcx), %eax
jne 0x2e895
jmp 0x2e8b4
leaq 0x141e8(%rip), %rdi     # 0x42a84
leaq 0x136ba(%rip), %rsi     # 0x41f5d
movl $0x17d, %edx            # imm = 0x17D
leaq 0x13f7f(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x68(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x178(%rcx), %rax
jne 0x2e8c7
jmp 0x2e8e6
leaq 0x141e5(%rip), %rdi     # 0x42ab3
leaq 0x13688(%rip), %rsi     # 0x41f5d
movl $0x17f, %edx            # imm = 0x17F
leaq 0x13f4d(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x68(%rbp), %rdi
callq 0x47b0
cmpl -0x30(%rbp), %eax
jne 0x2e8f6
jmp 0x2e915
leaq 0x141d6(%rip), %rdi     # 0x42ad3
leaq 0x13659(%rip), %rsi     # 0x41f5d
movl $0x180, %edx            # imm = 0x180
leaq 0x13f1e(%rip), %rcx     # 0x4282e
callq 0x20c0
movl -0x30(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x128(%rcx), %eax
jne 0x2e926
jmp 0x2e945
leaq 0x141ce(%rip), %rdi     # 0x42afb
leaq 0x13629(%rip), %rsi     # 0x41f5d
movl $0x181, %edx            # imm = 0x181
leaq 0x13eee(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x98(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x180(%rcx), %rax
jne 0x2e95b
jmp 0x2e97a
leaq 0x141c8(%rip), %rdi     # 0x42b2a
leaq 0x135f4(%rip), %rsi     # 0x41f5d
movl $0x183, %edx            # imm = 0x183
leaq 0x13eb9(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x98(%rbp), %rdi
callq 0x47b0
cmpl -0x44(%rbp), %eax
jne 0x2e98d
jmp 0x2e9ac
leaq 0x141b6(%rip), %rdi     # 0x42b4a
leaq 0x135c2(%rip), %rsi     # 0x41f5d
movl $0x184, %edx            # imm = 0x184
leaq 0x13e87(%rip), %rcx     # 0x4282e
callq 0x20c0
movl -0x44(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x10c(%rcx), %eax
jne 0x2e9bd
jmp 0x2e9dc
leaq 0x141ae(%rip), %rdi     # 0x42b72
leaq 0x13592(%rip), %rsi     # 0x41f5d
movl $0x185, %edx            # imm = 0x185
leaq 0x13e57(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x188(%rcx), %rax
jne 0x2e9ef
jmp 0x2ea0e
leaq 0x141ab(%rip), %rdi     # 0x42ba1
leaq 0x13560(%rip), %rsi     # 0x41f5d
movl $0x187, %edx            # imm = 0x187
leaq 0x13e25(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x58(%rbp), %rdi
callq 0x47b0
cmpl -0x28(%rbp), %eax
jne 0x2ea1e
jmp 0x2ea3d
leaq 0x14198(%rip), %rdi     # 0x42bbd
leaq 0x13531(%rip), %rsi     # 0x41f5d
movl $0x188, %edx            # imm = 0x188
leaq 0x13df6(%rip), %rcx     # 0x4282e
callq 0x20c0
movl -0x28(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x12c(%rcx), %eax
jne 0x2ea4e
jmp 0x2ea6d
leaq 0x1418c(%rip), %rdi     # 0x42be1
leaq 0x13501(%rip), %rsi     # 0x41f5d
movl $0x189, %edx            # imm = 0x189
leaq 0x13dc6(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x88(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x190(%rcx), %rax
jne 0x2ea83
jmp 0x2eaa2
leaq 0x14182(%rip), %rdi     # 0x42c0c
leaq 0x134cc(%rip), %rsi     # 0x41f5d
movl $0x18b, %edx            # imm = 0x18B
leaq 0x13d91(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x88(%rbp), %rdi
callq 0x47b0
cmpl -0x3c(%rbp), %eax
jne 0x2eab5
jmp 0x2ead4
leaq 0x1416c(%rip), %rdi     # 0x42c28
leaq 0x1349a(%rip), %rsi     # 0x41f5d
movl $0x18c, %edx            # imm = 0x18C
leaq 0x13d5f(%rip), %rcx     # 0x4282e
callq 0x20c0
movl -0x3c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x110(%rcx), %eax
jne 0x2eae5
jmp 0x2eb04
leaq 0x14160(%rip), %rdi     # 0x42c4c
leaq 0x1346a(%rip), %rsi     # 0x41f5d
movl $0x18d, %edx            # imm = 0x18D
leaq 0x13d2f(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x70(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x198(%rcx), %rax
jne 0x2eb17
jmp 0x2eb36
leaq 0x14159(%rip), %rdi     # 0x42c77
leaq 0x13438(%rip), %rsi     # 0x41f5d
movl $0x18f, %edx            # imm = 0x18F
leaq 0x13cfd(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x70(%rbp), %rdi
callq 0x47b0
cmpl -0x34(%rbp), %eax
jne 0x2eb46
jmp 0x2eb65
leaq 0x14148(%rip), %rdi     # 0x42c95
leaq 0x13409(%rip), %rsi     # 0x41f5d
movl $0x190, %edx            # imm = 0x190
leaq 0x13cce(%rip), %rcx     # 0x4282e
callq 0x20c0
movl -0x34(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x130(%rcx), %eax
jne 0x2eb76
jmp 0x2eb95
leaq 0x1413e(%rip), %rdi     # 0x42cbb
leaq 0x133d9(%rip), %rsi     # 0x41f5d
movl $0x191, %edx            # imm = 0x191
leaq 0x13c9e(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0xa0(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x1a0(%rcx), %rax
jne 0x2ebab
jmp 0x2ebca
leaq 0x14136(%rip), %rdi     # 0x42ce8
leaq 0x133a4(%rip), %rsi     # 0x41f5d
movl $0x193, %edx            # imm = 0x193
leaq 0x13c69(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0xa0(%rbp), %rdi
callq 0x47b0
cmpl -0x48(%rbp), %eax
jne 0x2ebdd
jmp 0x2ebfc
leaq 0x14122(%rip), %rdi     # 0x42d06
leaq 0x13372(%rip), %rsi     # 0x41f5d
movl $0x194, %edx            # imm = 0x194
leaq 0x13c37(%rip), %rcx     # 0x4282e
callq 0x20c0
movl -0x48(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x114(%rcx), %eax
jne 0x2ec0d
jmp 0x2ec2c
leaq 0x14118(%rip), %rdi     # 0x42d2c
leaq 0x13342(%rip), %rsi     # 0x41f5d
movl $0x195, %edx            # imm = 0x195
leaq 0x13c07(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x78(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x1a8(%rcx), %rax
jne 0x2ec3f
jmp 0x2ec5e
leaq 0x14113(%rip), %rdi     # 0x42d59
leaq 0x13310(%rip), %rsi     # 0x41f5d
movl $0x197, %edx            # imm = 0x197
leaq 0x13bd5(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0xa8(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x1b0(%rcx), %rax
jne 0x2ec74
jmp 0x2ec93
leaq 0x140fc(%rip), %rdi     # 0x42d77
leaq 0x132db(%rip), %rsi     # 0x41f5d
movl $0x198, %edx            # imm = 0x198
leaq 0x13ba0(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x10(%rbp), %rdi
callq 0xf240
testb $0x1, %al
jne 0x2eca2
jmp 0x2ecf9
movq -0x10(%rbp), %rax
cmpl $-0x6, 0x10(%rax)
jne 0x2ecae
jmp 0x2eccd
leaq 0x140e0(%rip), %rdi     # 0x42d95
leaq 0x132a1(%rip), %rsi     # 0x41f5d
movl $0x19c, %edx            # imm = 0x19C
leaq 0x13b66(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x10(%rbp), %rax
cmpl $-0x4, (%rax)
jne 0x2ecd8
jmp 0x2ecf7
leaq 0x140cc(%rip), %rdi     # 0x42dab
leaq 0x13277(%rip), %rsi     # 0x41f5d
movl $0x19d, %edx            # imm = 0x19D
leaq 0x13b3c(%rip), %rcx     # 0x4282e
callq 0x20c0
jmp 0x2ecf9
movq -0x10(%rbp), %rdi
callq 0xf220
testb $0x1, %al
jne 0x2ed08
jmp 0x2ed60
movq -0x10(%rbp), %rax
cmpl $-0x6, 0x10(%rax)
jne 0x2ed14
jmp 0x2ed33
leaq 0x1407a(%rip), %rdi     # 0x42d95
leaq 0x1323b(%rip), %rsi     # 0x41f5d
movl $0x1a0, %edx            # imm = 0x1A0
leaq 0x13b00(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x10(%rbp), %rax
cmpl $-0x4, 0x1c(%rax)
jne 0x2ed3f
jmp 0x2ed5e
leaq 0x1407b(%rip), %rdi     # 0x42dc1
leaq 0x13210(%rip), %rsi     # 0x41f5d
movl $0x1a1, %edx            # imm = 0x1A1
leaq 0x13ad5(%rip), %rcx     # 0x4282e
callq 0x20c0
jmp 0x2ed60
movq -0x10(%rbp), %rdi
callq 0xf200
testb $0x1, %al
jne 0x2ed6f
jmp 0x2edcd
movq -0x10(%rbp), %rax
cmpl $0x6, 0xf0(%rax)
jne 0x2ed7e
jmp 0x2ed9d
leaq 0x14052(%rip), %rdi     # 0x42dd7
leaq 0x131d1(%rip), %rsi     # 0x41f5d
movl $0x1a4, %edx            # imm = 0x1A4
leaq 0x13a96(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x10(%rbp), %rax
cmpl $0x4, 0xe0(%rax)
jne 0x2edac
jmp 0x2edcb
leaq 0x14039(%rip), %rdi     # 0x42dec
leaq 0x131a3(%rip), %rsi     # 0x41f5d
movl $0x1a5, %edx            # imm = 0x1A5
leaq 0x13a68(%rip), %rcx     # 0x4282e
callq 0x20c0
jmp 0x2edcd
movq -0x10(%rbp), %rdi
callq 0xf1e0
testb $0x1, %al
jne 0x2eddc
jmp 0x2ee3a
movq -0x10(%rbp), %rax
cmpl $0x6, 0xf0(%rax)
jne 0x2edeb
jmp 0x2ee0a
leaq 0x13fe5(%rip), %rdi     # 0x42dd7
leaq 0x13164(%rip), %rsi     # 0x41f5d
movl $0x1a8, %edx            # imm = 0x1A8
leaq 0x13a29(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x10(%rbp), %rax
cmpl $0x4, 0xfc(%rax)
jne 0x2ee19
jmp 0x2ee38
leaq 0x13fe1(%rip), %rdi     # 0x42e01
leaq 0x13136(%rip), %rsi     # 0x41f5d
movl $0x1a9, %edx            # imm = 0x1A9
leaq 0x139fb(%rip), %rcx     # 0x4282e
callq 0x20c0
jmp 0x2ee3a
movq -0x10(%rbp), %rax
movq 0x1b8(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x81f0
movq %rax, %rcx
movq -0xb8(%rbp), %rax
cmpq %rcx, %rax
jne 0x2ee66
jmp 0x2ee85
leaq 0x67c5(%rip), %rdi      # 0x35632
leaq 0x130e9(%rip), %rsi     # 0x41f5d
movl $0x1ac, %edx            # imm = 0x1AC
leaq 0x139ae(%rip), %rcx     # 0x4282e
callq 0x20c0
movq -0x10(%rbp), %rax
movq 0x1c0(%rax), %rax
movq %rax, -0xc0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x83a0
movq %rax, %rcx
movq -0xc0(%rbp), %rax
cmpq %rcx, %rax
jne 0x2eeb1
jmp 0x2eed0
leaq 0x13f5e(%rip), %rdi     # 0x42e16
leaq 0x1309e(%rip), %rsi     # 0x41f5d
movl $0x1ad, %edx            # imm = 0x1AD
leaq 0x13963(%rip), %rcx     # 0x4282e
callq 0x20c0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)