// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/hts.c
// Function: hts_itr_query
hts_itr_t *hts_itr_query(const hts_idx_t *idx, int tid, hts_pos_t beg, hts_pos_t end, hts_readrec_func *readrec)
{
    int i, n_off, l, bin;
    hts_pair64_max_t *off;
    khint_t k;
    bidx_t *bidx;
    uint64_t min_off, max_off;
    hts_pos_t idx_maxpos;
    hts_itr_t *iter;
    uint32_t unmapped = 0, rel_off;

    // It's possible to call this function with NULL idx iff
    // tid is one of the special values HTS_IDX_REST or HTS_IDX_NONE
    if (!idx && !(tid == HTS_IDX_REST || tid == HTS_IDX_NONE)) {
        errno = EINVAL;
        return NULL;
    }

    iter = (hts_itr_t*)calloc(1, sizeof(hts_itr_t));
    if (iter) {
        if (tid < 0) {
            uint64_t off = hts_itr_off(idx, tid);
            if (off != (uint64_t) -1) {
                iter->read_rest = 1;
                iter->curr_off = off;
                iter->readrec = readrec;
                if (tid == HTS_IDX_NONE)
                    iter->finished = 1;
            } else {
                free(iter);
                iter = NULL;
            }
        } else if (tid >= idx->n || (bidx = idx->bidx[tid]) == NULL) {
            iter->finished = 1;
        } else {
            if (beg < 0) beg = 0;
            if (end < beg) {
              free(iter);
              return NULL;
            }

            k = kh_get(bin, bidx, META_BIN(idx));
            if (k != kh_end(bidx))
                unmapped = kh_val(bidx, k).list[1].v;
            else
                unmapped = 1;

            iter->tid = tid, iter->beg = beg, iter->end = end; iter->i = -1;
            iter->readrec = readrec;

            if ( !kh_size(bidx) ) { iter->finished = 1; return iter; }

            idx_maxpos = hts_idx_maxpos(idx);
            if (beg >= idx_maxpos) { iter->finished = 1; return iter; }

            rel_off = beg>>idx->min_shift;
            // compute min_off
            bin = hts_bin_first(idx->n_lvls) + rel_off;
            do {
                int first;
                k = kh_get(bin, bidx, bin);
                if (k != kh_end(bidx)) break;
                first = (hts_bin_parent(bin)<<3) + 1;
                if (bin > first) --bin;
                else bin = hts_bin_parent(bin);
            } while (bin);
            if (bin == 0) k = kh_get(bin, bidx, bin);
            min_off = k != kh_end(bidx)? kh_val(bidx, k).loff : 0;
            // min_off can be calculated more accurately if the
            // linear index is available
            if (idx->lidx[tid].offset
                && rel_off < idx->lidx[tid].n) {
                if (min_off < idx->lidx[tid].offset[rel_off])
                    min_off = idx->lidx[tid].offset[rel_off];
                if (unmapped) {
                    // unmapped reads are not covered by the linear index,
                    // so search backwards for a smaller offset
                    int tmp_off;
                    for (tmp_off = rel_off-1; tmp_off >= 0; tmp_off--) {
                        if (idx->lidx[tid].offset[tmp_off] < min_off) {
                            min_off = idx->lidx[tid].offset[tmp_off];
                            break;
                        }
                    }
                    // if the search went too far back or no satisfactory entry
                    // was found, revert to the bin index loff value
                    if (k != kh_end(bidx) && (min_off < kh_val(bidx, k).loff || tmp_off < 0))
                        min_off = kh_val(bidx, k).loff;
                }
            } else if (unmapped) { //CSI index
                if (k != kh_end(bidx))
                    min_off = kh_val(bidx, k).loff;
            }

            // compute max_off: a virtual offset from a bin to the right of end
            // First check if end lies within the range of the index (it won't
            // if it's HTS_POS_MAX)
            if (end <= idx_maxpos) {
                bin = hts_bin_first(idx->n_lvls) + ((end-1) >> idx->min_shift) + 1;
                if (bin >= idx->n_bins) bin = 0;
                while (1) {
                    // search for an extant bin by moving right, but moving up to the
                    // parent whenever we get to a first child (which also covers falling
                    // off the RHS, which wraps around and immediately goes up to bin 0)
                    while (bin % 8 == 1) bin = hts_bin_parent(bin);
                    if (bin == 0) { max_off = UINT64_MAX; break; }
                    k = kh_get(bin, bidx, bin);
                    if (k != kh_end(bidx) && kh_val(bidx, k).n > 0) { max_off = kh_val(bidx, k).list[0].u; break; }
                    bin++;
                }
            } else {
                // Searching to end of reference
                max_off = UINT64_MAX;
            }

            // retrieve bins
            if (reg2bins(beg, end, iter, idx->min_shift, idx->n_lvls, bidx) < 0) {
                hts_itr_destroy(iter);
                return NULL;
            }

            for (i = n_off = 0; i < iter->bins.n; ++i)
                if ((k = kh_get(bin, bidx, iter->bins.a[i])) != kh_end(bidx))
                    n_off += kh_value(bidx, k).n;
            if (n_off == 0) {
                // No overlapping bins means the iterator has already finished.
                iter->finished = 1;
                return iter;
            }
            off = calloc(n_off, sizeof(*off));
            for (i = n_off = 0; i < iter->bins.n; ++i) {
                if ((k = kh_get(bin, bidx, iter->bins.a[i])) != kh_end(bidx)) {
                    int j;
                    bins_t *p = &kh_value(bidx, k);
                    for (j = 0; j < p->n; ++j)
                        if (p->list[j].v > min_off && p->list[j].u < max_off) {
                            off[n_off].u = min_off > p->list[j].u
                                ? min_off : p->list[j].u;
                            off[n_off].v = max_off < p->list[j].v
                                ? max_off : p->list[j].v;
                            // hts_pair64_max_t::max is now used to link
                            // file offsets to region list entries.
                            // The iterator can use this to decide if it
                            // can skip some file regions.
                            off[n_off].max = ((uint64_t) tid << 32) | j;
                            n_off++;
                        }
                }
            }

            if (n_off == 0) {
                free(off);
                iter->finished = 1;
                return iter;
            }
            ks_introsort(_off_max, n_off, off);
            // resolve completely contained adjacent blocks
            for (i = 1, l = 0; i < n_off; ++i)
                if (off[l].v < off[i].v) off[++l] = off[i];
            n_off = l + 1;
            // resolve overlaps between adjacent blocks; this may happen due to the merge in indexing
            for (i = 1; i < n_off; ++i)
                if (off[i-1].v >= off[i].u) off[i-1].v = off[i].u;
            // merge adjacent blocks
            for (i = 1, l = 0; i < n_off; ++i) {
                if (off[l].v>>16 == off[i].u>>16) off[l].v = off[i].v;
                else off[++l] = off[i];
            }
            n_off = l + 1;
            iter->n_off = n_off; iter->off = off;
        }
    }

    return iter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl $0x0, -0x7c(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x20e50
cmpl $-0x4, -0x14(%rbp)
je 0x20e50
cmpl $-0x5, -0x14(%rbp)
je 0x20e50
callq 0x4050
movl $0x16, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x21890
movl $0x1, %edi
movl $0x90, %esi
callq 0x42f0
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x78(%rbp)
je 0x21888
cmpl $0x0, -0x14(%rbp)
jge 0x20ee6
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x20c20
movq %rax, -0x88(%rbp)
cmpq $-0x1, -0x88(%rbp)
je 0x20ed0
movq -0x78(%rbp), %rax
movl (%rax), %ecx
andl $-0x2, %ecx
orl $0x1, %ecx
movl %ecx, (%rax)
movq -0x88(%rbp), %rcx
movq -0x78(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x30(%rbp), %rcx
movq -0x78(%rbp), %rax
movq %rcx, 0x68(%rax)
cmpl $-0x5, -0x14(%rbp)
jne 0x20ece
movq -0x78(%rbp), %rax
movl (%rax), %ecx
andl $-0x3, %ecx
orl $0x2, %ecx
movl %ecx, (%rax)
jmp 0x20ee1
movq -0x78(%rbp), %rdi
callq 0x45a0
movq $0x0, -0x78(%rbp)
jmp 0x21886
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jge 0x20f0c
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
jne 0x20f1f
movq -0x78(%rbp), %rax
movl (%rax), %ecx
andl $-0x3, %ecx
orl $0x2, %ecx
movl %ecx, (%rax)
jmp 0x21884
cmpq $0x0, -0x20(%rbp)
jge 0x20f2e
movq $0x0, -0x20(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x20f4e
movq -0x78(%rbp), %rdi
callq 0x45a0
movq $0x0, -0x8(%rbp)
jmp 0x21890
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
addl $0x1, %esi
callq 0x20ab0
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x58(%rbp), %rcx
cmpl (%rcx), %eax
je 0x20f8e
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq 0x18(%rax), %rax
movl %eax, -0x7c(%rbp)
jmp 0x20f95
movl $0x1, -0x7c(%rbp)
movl -0x14(%rbp), %ecx
movq -0x78(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rcx
movq -0x78(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rcx
movq -0x78(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x78(%rbp), %rax
movl $0xffffffff, 0xc(%rax)  # imm = 0xFFFFFFFF
movq -0x30(%rbp), %rcx
movq -0x78(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x58(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x20ff3
movq -0x78(%rbp), %rax
movl (%rax), %ecx
andl $-0x3, %ecx
orl $0x2, %ecx
movl %ecx, (%rax)
movq -0x78(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x21890
movq -0x10(%rbp), %rdi
callq 0x1f8f0
movq %rax, -0x70(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x70(%rbp), %rax
jl 0x21025
movq -0x78(%rbp), %rax
movl (%rax), %ecx
andl $-0x3, %ecx
orl $0x2, %ecx
movl %ecx, (%rax)
movq -0x78(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x21890
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x4(%rcx), %ecx
sarq %cl, %rax
movl %eax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
shll %ecx
movq -0x10(%rbp), %rax
addl 0x8(%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl $0x7, %ecx
cltd
idivl %ecx
addl -0x80(%rbp), %eax
movl %eax, -0x40(%rbp)
movq -0x58(%rbp), %rdi
movl -0x40(%rbp), %esi
callq 0x20ab0
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x58(%rbp), %rcx
cmpl (%rcx), %eax
je 0x2107a
jmp 0x210b9
movl -0x40(%rbp), %eax
subl $0x1, %eax
sarl $0x3, %eax
shll $0x3, %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x8c(%rbp), %eax
jle 0x210a5
movl -0x40(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x210b1
movl -0x40(%rbp), %eax
subl $0x1, %eax
sarl $0x3, %eax
movl %eax, -0x40(%rbp)
jmp 0x210b3
cmpl $0x0, -0x40(%rbp)
jne 0x2105e
cmpl $0x0, -0x40(%rbp)
jne 0x210ce
movq -0x58(%rbp), %rdi
movl -0x40(%rbp), %esi
callq 0x20ab0
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x58(%rbp), %rcx
cmpl (%rcx), %eax
je 0x210f8
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0xa8(%rbp)
jmp 0x21103
xorl %eax, %eax
movq %rax, -0xa8(%rbp)
jmp 0x21103
movq -0xa8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
je 0x21261
movl -0x80(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movslq -0x14(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jge 0x21261
movq -0x60(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movslq -0x14(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq 0x10(%rcx), %rcx
movl -0x80(%rbp), %edx
cmpq (%rcx,%rdx,8), %rax
jae 0x21191
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x80(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
cmpl $0x0, -0x7c(%rbp)
je 0x2125f
movl -0x80(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x90(%rbp)
cmpl $0x0, -0x90(%rbp)
jl 0x21213
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movslq -0x90(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq -0x60(%rbp), %rax
jae 0x21200
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movslq -0x90(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
jmp 0x21213
jmp 0x21202
movl -0x90(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x90(%rbp)
jmp 0x211a7
movl -0x4c(%rbp), %eax
movq -0x58(%rbp), %rcx
cmpl (%rcx), %eax
je 0x2125d
movq -0x60(%rbp), %rax
movq -0x58(%rbp), %rcx
movq 0x20(%rcx), %rcx
movl -0x4c(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jb 0x21243
cmpl $0x0, -0x90(%rbp)
jge 0x2125d
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x2125f
jmp 0x21290
cmpl $0x0, -0x7c(%rbp)
je 0x2128e
movl -0x4c(%rbp), %eax
movq -0x58(%rbp), %rcx
cmpl (%rcx), %eax
je 0x2128c
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x2128e
jmp 0x21290
movq -0x28(%rbp), %rax
cmpq -0x70(%rbp), %rax
jg 0x21387
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
shll %ecx
movq -0x10(%rbp), %rax
addl 0x8(%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl $0x7, %ecx
cltd
idivl %ecx
cltq
movq -0x28(%rbp), %rdx
subq $0x1, %rdx
movq -0x10(%rbp), %rcx
movl 0x4(%rcx), %ecx
sarq %cl, %rdx
movq %rdx, %rcx
addq %rcx, %rax
addq $0x1, %rax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jl 0x212f4
movl $0x0, -0x40(%rbp)
jmp 0x212f6
jmp 0x212f8
movl -0x40(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
cmpl $0x1, %edx
jne 0x21316
movl -0x40(%rbp), %eax
subl $0x1, %eax
sarl $0x3, %eax
movl %eax, -0x40(%rbp)
jmp 0x212f8
cmpl $0x0, -0x40(%rbp)
jne 0x21326
movq $-0x1, -0x68(%rbp)
jmp 0x21385
movq -0x58(%rbp), %rdi
movl -0x40(%rbp), %esi
callq 0x20ab0
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x58(%rbp), %rcx
cmpl (%rcx), %eax
je 0x21377
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x4(%rax)
jle 0x21377
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
jmp 0x21385
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x212f6
jmp 0x2138f
movq $-0x1, -0x68(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x78(%rbp), %rdx
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x10(%rbp), %rax
movl 0x8(%rax), %r8d
movq -0x58(%rbp), %r9
callq 0x218a0
cmpl $0x0, %eax
jge 0x213ce
movq -0x78(%rbp), %rdi
callq 0x21ad0
movq $0x0, -0x8(%rbp)
jmp 0x21890
movl $0x0, -0x38(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x78(%rbp), %rcx
cmpl 0x80(%rcx), %eax
jge 0x21439
movq -0x58(%rbp), %rdi
movq -0x78(%rbp), %rax
movq 0x88(%rax), %rax
movslq -0x34(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x20ab0
movl %eax, -0x4c(%rbp)
movq -0x58(%rbp), %rcx
cmpl (%rcx), %eax
je 0x2142c
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x2142e
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x213dc
cmpl $0x0, -0x38(%rbp)
jne 0x2145a
movq -0x78(%rbp), %rax
movl (%rax), %ecx
andl $-0x3, %ecx
orl $0x2, %ecx
movl %ecx, (%rax)
movq -0x78(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x21890
movslq -0x38(%rbp), %rdi
movl $0x18, %esi
callq 0x42f0
movq %rax, -0x48(%rbp)
movl $0x0, -0x38(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x78(%rbp), %rcx
cmpl 0x80(%rcx), %eax
jge 0x2166c
movq -0x58(%rbp), %rdi
movq -0x78(%rbp), %rax
movq 0x88(%rax), %rax
movslq -0x34(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x20ab0
movl %eax, -0x4c(%rbp)
movq -0x58(%rbp), %rcx
cmpl (%rcx), %eax
je 0x2165c
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xa0(%rbp)
movl $0x0, -0x94(%rbp)
movl -0x94(%rbp), %eax
movq -0xa0(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x2165a
movq -0xa0(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x94(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
cmpq -0x60(%rbp), %rax
jbe 0x21644
movq -0xa0(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x94(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
cmpq -0x68(%rbp), %rax
jae 0x21644
movq -0x60(%rbp), %rax
movq -0xa0(%rbp), %rcx
movq 0x10(%rcx), %rcx
movslq -0x94(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jbe 0x2156c
movq -0x60(%rbp), %rax
movq %rax, -0xb0(%rbp)
jmp 0x2158f
movq -0xa0(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x94(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rcx
movq -0x48(%rbp), %rax
movslq -0x38(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x68(%rbp), %rax
movq -0xa0(%rbp), %rcx
movq 0x10(%rcx), %rcx
movslq -0x94(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jae 0x215d8
movq -0x68(%rbp), %rax
movq %rax, -0xb8(%rbp)
jmp 0x215fc
movq -0xa0(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x94(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rcx
movq -0x48(%rbp), %rax
movslq -0x38(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movslq -0x14(%rbp), %rcx
shlq $0x20, %rcx
movslq -0x94(%rbp), %rax
orq %rax, %rcx
movq -0x48(%rbp), %rax
movslq -0x38(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x21646
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
jmp 0x214da
jmp 0x2165c
jmp 0x2165e
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x2147a
cmpl $0x0, -0x38(%rbp)
jne 0x21696
movq -0x48(%rbp), %rdi
callq 0x45a0
movq -0x78(%rbp), %rax
movl (%rax), %ecx
andl $-0x3, %ecx
orl $0x2, %ecx
movl %ecx, (%rax)
movq -0x78(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x21890
movslq -0x38(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x21b50
movl $0x1, -0x34(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0x2172a
movq -0x48(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq -0x48(%rbp), %rcx
movslq -0x34(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jae 0x2171d
movq -0x48(%rbp), %rax
movl -0x3c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x3c(%rbp)
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq -0x48(%rbp), %rcx
movslq -0x34(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
jmp 0x2171f
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x216b1
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl $0x1, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0x217a5
movq -0x48(%rbp), %rax
movl -0x34(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq -0x48(%rbp), %rcx
movslq -0x34(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jb 0x21798
movq -0x48(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq -0x48(%rbp), %rax
movl -0x34(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
jmp 0x2179a
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x2173a
movl $0x1, -0x34(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0x21865
movq -0x48(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shrq $0x10, %rax
movq -0x48(%rbp), %rcx
movslq -0x34(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
shrq $0x10, %rcx
cmpq %rcx, %rax
jne 0x21819
movq -0x48(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
movq -0x48(%rbp), %rax
movslq -0x3c(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
jmp 0x21855
movq -0x48(%rbp), %rax
movl -0x3c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x3c(%rbp)
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq -0x48(%rbp), %rcx
movslq -0x34(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
jmp 0x21857
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x217b3
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %ecx
movq -0x78(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x48(%rbp), %rcx
movq -0x78(%rbp), %rax
movq %rcx, 0x60(%rax)
jmp 0x21886
jmp 0x21888
movq -0x78(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
nopl (%rax)