// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r12
movl %esi, %r15d
testq %rdi, %rdi
setne %al
leal 0x5(%r15), %ecx
cmpl $0x2, %ecx
setb %cl
orb %al, %cl
je 0x17fdd
movq %r8, %rbp
movq %rdx, %r14
movq %rdi, %r13
movl $0x1, %edi
movl $0x90, %esi
callq 0x4300
testq %rax, %rax
je 0x17fe8
movq %rax, %rbx
testl %r15d, %r15d
js 0x17ffc
cmpl %r15d, 0x14(%r13)
jle 0x186ce
movq %r14, %rdx
movq 0x28(%r13), %rax
movl %r15d, %ecx
movq %rcx, 0x28(%rsp)
movq (%rax,%rcx,8), %r14
testq %r14, %r14
je 0x186ce
xorl %eax, %eax
testq %rdx, %rdx
cmovleq %rax, %rdx
movq %rdx, (%rsp)
cmpq %r12, %rdx
jg 0x1802b
movq %r12, 0x10(%rsp)
movl 0xc(%r13), %ecx
movq %rcx, 0x18(%rsp)
movl (%r14), %r12d
testl %r12d, %r12d
je 0x18040
movq 0x18(%rsp), %rax
incl %eax
leal -0x1(%r12), %r8d
movl %r8d, %edi
movl %eax, 0x8(%rsp)
andl %eax, %edi
movq 0x10(%r14), %rsi
movl $0x1, %r9d
movl %edi, %eax
movq %r13, 0x20(%rsp)
movl %eax, %ecx
shrl $0x4, %ecx
movl (%rsi,%rcx,4), %r10d
leal (%rax,%rax), %ecx
andl $0x1e, %ecx
movl %r10d, %r11d
shrl %cl, %r11d
testb $0x2, %r11b
jne 0x18035
testb $0x1, %r11b
jne 0x17fcb
movq 0x18(%r14), %r11
movl %eax, %edx
movq %rbp, %r13
movl %edi, %ebp
movq %r14, %rdi
movq %rsi, %r14
movq %rbx, %rsi
movq %r12, %rbx
movl 0x8(%rsp), %r12d
cmpl %r12d, (%r11,%rdx,4)
movq %rbx, %r12
movq %rsi, %rbx
movq %r14, %rsi
movq %rdi, %r14
movl %ebp, %edi
movq %r13, %rbp
movq 0x20(%rsp), %r13
je 0x18035
addl %r9d, %eax
andl %r8d, %eax
incl %r9d
cmpl %edi, %eax
jne 0x17f6e
movl %r12d, %eax
jmp 0x18040
callq 0x4050
movl $0x16, (%rax)
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
movl %r15d, %esi
callq 0x17c89
cmpq $-0x1, %rax
je 0x1802b
movl (%rbx), %ecx
movl %ecx, %edx
orl $0x1, %edx
movl %edx, (%rbx)
movq %rax, 0x50(%rbx)
movq %rbp, 0x68(%rbx)
cmpl $-0x5, %r15d
jne 0x17fea
orl $0x3, %ecx
movl %ecx, (%rbx)
jmp 0x17fea
movq %rbx, %rdi
callq 0x45c0
jmp 0x17fe8
shrl %cl, %r10d
testb $0x3, %r10b
cmovnel %r12d, %eax
cmpl %r12d, %eax
jne 0x18049
xorl %ecx, %ecx
jmp 0x1805f
movq 0x20(%r14), %rcx
movl %eax, %eax
leaq (%rax,%rax,2), %rax
movq 0x10(%rcx,%rax,8), %rax
cmpl $0x0, 0x18(%rax)
sete %cl
movl %r15d, 0x4(%rbx)
movq (%rsp), %rdx
movq %rdx, 0x18(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rbx)
movl $0xffffffff, 0xc(%rbx)  # imm = 0xFFFFFFFF
movq %rbp, 0x68(%rbx)
cmpl $0x0, 0x4(%r14)
je 0x186ce
movl %ecx, 0x8(%rsp)
movl 0x4(%r13), %edi
movl 0x8(%r13), %esi
leal (%rsi,%rsi,2), %eax
leal (%rax,%rdi), %ecx
movl $0x1, %r8d
shlq %cl, %r8
cmpq %r8, %rdx
jge 0x186ce
movq %r8, 0x48(%rsp)
movq %rsi, 0x50(%rsp)
movq %rdx, %rsi
movq %rdi, 0x30(%rsp)
movl %edi, %ecx
shrq %cl, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %edx
notl %edx
movl $0x92492493, %ecx       # imm = 0x92492493
imulq %rdx, %rcx
shrq $0x22, %rcx
movq %rcx, 0x38(%rsp)
movq %rsi, 0x40(%rsp)
leal (%rcx,%rsi), %edx
leal -0x1(%r12), %r15d
testl %r12d, %r12d
je 0x18152
movl %edx, %esi
andl %r15d, %esi
movq 0x10(%r14), %rdi
movl $0x1, %r8d
movl %esi, %eax
movl %eax, %ecx
shrl $0x4, %ecx
movl (%rdi,%rcx,4), %r9d
leal (%rax,%rax), %ecx
andl $0x1e, %ecx
movl %r9d, %r10d
shrl %cl, %r10d
testb $0x2, %r10b
jne 0x18145
testb $0x1, %r10b
jne 0x18133
movq 0x18(%r14), %r10
movl %eax, %r11d
cmpl %edx, (%r10,%r11,4)
je 0x18145
addl %r8d, %eax
andl %r15d, %eax
incl %r8d
cmpl %esi, %eax
jne 0x18105
movl %r12d, %eax
jmp 0x18154
shrl %cl, %r9d
testb $0x3, %r9b
cmovnel %r12d, %eax
jmp 0x18154
xorl %eax, %eax
cmpl %r12d, %eax
jne 0x1816f
leal -0x1(%rdx), %ecx
movl %ecx, %esi
andl $-0x8, %esi
incl %esi
movl %ecx, %edi
sarl $0x3, %edi
cmpl %esi, %edx
cmovgl %ecx, %edi
movl %edi, %edx
cmpl %r12d, %eax
jne 0x1817c
testl %edx, %edx
jne 0x180ef
testl %edx, %edx
jne 0x1818a
movq %r14, %rdi
xorl %esi, %esi
callq 0x17c0b
cmpl %r12d, %eax
jne 0x18193
xorl %ebp, %ebp
jmp 0x181a2
movq 0x20(%r14), %rcx
movl %eax, %edx
leaq (%rdx,%rdx,2), %rdx
movq 0x8(%rcx,%rdx,8), %rbp
movq 0x30(%r13), %rcx
movq 0x28(%rsp), %rdx
leaq (%rdx,%rdx,2), %rdx
movq 0x10(%rcx,%rdx,8), %rdi
testq %rdi, %rdi
je 0x18204
leaq (%rcx,%rdx,8), %r8
movl 0x40(%rsp), %esi
cmpq (%r8), %rsi
jge 0x18204
movq (%rdi,%rsi,8), %rdi
cmpq %rdi, %rbp
cmovbeq %rdi, %rbp
cmpb $0x0, 0x8(%rsp)
jne 0x1824a
leaq (%rcx,%rdx,8), %rdi
addq $0x10, %rdi
decq %rsi
movq %rsi, %rcx
testl %ecx, %ecx
js 0x18223
movq (%rdi), %rdx
movl %ecx, %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq (%rdx,%rsi,8), %rdx
leaq -0x1(%rcx), %rsi
cmpq %rbp, %rdx
jae 0x181e3
jmp 0x18226
cmpl %r12d, %eax
sete %cl
movl 0x8(%rsp), %edx
orb %cl, %dl
jne 0x1824a
movq 0x20(%r14), %rcx
movl %eax, %eax
leaq (%rax,%rax,2), %rax
movq 0x8(%rcx,%rax,8), %rbp
jmp 0x1824a
movq %rbp, %rdx
cmpl %r12d, %eax
je 0x18247
movq 0x20(%r14), %rsi
movl %eax, %eax
leaq (%rax,%rax,2), %rax
movq 0x8(%rsi,%rax,8), %rax
cmpq %rax, %rdx
cmovbeq %rax, %rdx
testl %ecx, %ecx
cmovsq %rax, %rdx
movq %rdx, %rbp
movq 0x10(%rsp), %rax
cmpq %rax, 0x48(%rsp)
jge 0x1835c
movq $-0x1, %r15
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rbx, %rdx
movq 0x30(%rsp), %rcx
movq 0x50(%rsp), %r8
movq %r14, %r9
callq 0x186e7
testl %eax, %eax
js 0x1842a
movslq 0x80(%rbx), %rcx
movq %rcx, 0x20(%rsp)
testq %rcx, %rcx
movq %r15, 0x8(%rsp)
jle 0x18437
movq 0x88(%rbx), %rax
movq %rax, 0x10(%rsp)
movl (%r14), %esi
leal -0x1(%rsi), %edi
xorl %r8d, %r8d
movl $0x0, (%rsp)
movl $0x0, %r9d
testl %esi, %esi
je 0x1832f
movq 0x10(%rsp), %rax
movl (%rax,%r8,4), %r10d
movl %edi, %r11d
andl %r10d, %r11d
movq 0x10(%r14), %r15
movl $0x1, %r12d
movl %r11d, %r9d
movl %r9d, %eax
shrl $0x4, %eax
movl (%r15,%rax,4), %eax
leal (%r9,%r9), %ecx
andl $0x1e, %ecx
movl %eax, %edx
shrl %cl, %edx
testb $0x2, %dl
jne 0x18322
testb $0x1, %dl
jne 0x1830f
movq 0x18(%r14), %rdx
movl %r9d, %r13d
cmpl %r10d, (%rdx,%r13,4)
je 0x18322
addl %r12d, %r9d
andl %edi, %r9d
incl %r12d
cmpl %r11d, %r9d
jne 0x182e3
movl %esi, %r9d
jmp 0x1832a
shrl %cl, %eax
testb $0x3, %al
cmovnel %esi, %r9d
movq 0x8(%rsp), %r15
cmpl %esi, %r9d
je 0x18349
movq 0x20(%r14), %rax
movl %r9d, %ecx
leaq (%rcx,%rcx,2), %rcx
movl (%rsp), %edx
addl 0x4(%rax,%rcx,8), %edx
movl %edx, (%rsp)
incq %r8
cmpq 0x20(%rsp), %r8
jne 0x182bd
jmp 0x1843e
decq %rax
movq 0x30(%rsp), %rcx
sarq %cl, %rax
movq 0x38(%rsp), %rcx
addl %ecx, %eax
incl %eax
xorl %ecx, %ecx
cmpl 0x18(%rsp), %eax
cmovll %eax, %ecx
movl %ecx, %eax
andl $0x80000007, %eax       # imm = 0x80000007
cmpl $0x1, %eax
jne 0x18398
decl %ecx
movl %ecx, %eax
shrl $0x3, %eax
andl $0x38, %ecx
cmpl $0x8, %ecx
movl %eax, %ecx
je 0x18385
jmp 0x1839a
movl %ecx, %eax
testl %eax, %eax
je 0x1825a
testl %r12d, %r12d
je 0x18405
movl %eax, %esi
andl %r15d, %esi
movq 0x10(%r14), %rdi
movl $0x1, %r8d
movl %esi, %edx
movl %edx, %ecx
shrl $0x4, %ecx
movl (%rdi,%rcx,4), %r9d
leal (%rdx,%rdx), %ecx
andl $0x1e, %ecx
movl %r9d, %r10d
shrl %cl, %r10d
testb $0x2, %r10b
jne 0x183f8
testb $0x1, %r10b
jne 0x183e6
movq 0x18(%r14), %r10
movl %edx, %r11d
cmpl %eax, (%r10,%r11,4)
je 0x183f8
addl %r8d, %edx
andl %r15d, %edx
incl %r8d
cmpl %esi, %edx
jne 0x183b8
movl %r12d, %edx
jmp 0x18407
shrl %cl, %r9d
testb $0x3, %r9b
cmovnel %r12d, %edx
jmp 0x18407
xorl %edx, %edx
cmpl %r12d, %edx
je 0x18421
movq 0x20(%r14), %rcx
movl %edx, %edx
leaq (%rdx,%rdx,2), %rdx
cmpl $0x0, 0x4(%rcx,%rdx,8)
jg 0x1859a
incl %eax
movl %eax, %ecx
jmp 0x18379
movq %rbx, %rdi
callq 0x18a53
jmp 0x17fe8
movl $0x0, (%rsp)
movl (%rsp), %eax
testl %eax, %eax
je 0x186ce
movslq %eax, %rdi
movl $0x18, %esi
callq 0x4300
movq %rax, %r13
cmpl $0x0, 0x20(%rsp)
jle 0x185aa
movq 0x88(%rbx), %rax
movq %rax, 0x10(%rsp)
movl (%r14), %r11d
leal -0x1(%r11), %esi
shlq $0x20, 0x28(%rsp)
xorl %edi, %edi
xorl %r12d, %r12d
movq %r13, (%rsp)
movq %r11, 0x18(%rsp)
movl $0x0, %r8d
testl %r11d, %r11d
je 0x18514
movq 0x10(%rsp), %rax
movl (%rax,%rdi,4), %r9d
movl %esi, %r10d
andl %r9d, %r10d
movq 0x10(%r14), %r11
movl $0x1, %eax
movl %r10d, %r8d
movl %r8d, %ecx
shrl $0x4, %ecx
movl (%r11,%rcx,4), %r13d
leal (%r8,%r8), %ecx
andl $0x1e, %ecx
movl %r13d, %edx
shrl %cl, %edx
testb $0x2, %dl
jne 0x18500
testb $0x1, %dl
jne 0x184e9
movq 0x18(%r14), %rdx
movq %rbp, %r15
movl %r8d, %ebp
cmpl %r9d, (%rdx,%rbp,4)
movq %r15, %rbp
movq 0x8(%rsp), %r15
je 0x18500
addl %eax, %r8d
andl %esi, %r8d
incl %eax
cmpl %r10d, %r8d
jne 0x184b1
movq 0x18(%rsp), %r11
movl %r11d, %r8d
jmp 0x18510
shrl %cl, %r13d
testb $0x3, %r13b
movq 0x18(%rsp), %r11
cmovnel %r11d, %r8d
movq (%rsp), %r13
cmpl %r11d, %r8d
je 0x1858a
movq 0x20(%r14), %rax
movl %r8d, %ecx
leaq (%rcx,%rcx,2), %rdx
movslq 0x4(%rax,%rdx,8), %rcx
testq %rcx, %rcx
jle 0x1858a
leaq (%rax,%rdx,8), %rax
movq 0x10(%rax), %r8
shlq $0x4, %rcx
movq 0x28(%rsp), %r9
xorl %r10d, %r10d
cmpq %rbp, 0x8(%r8,%r10)
jbe 0x1857e
movq (%r8,%r10), %rax
cmpq %r15, %rax
jae 0x1857e
cmpq %rax, %rbp
cmovaq %rbp, %rax
movslq %r12d, %r12
leaq (%r12,%r12,2), %rdx
movq %rax, (%r13,%rdx,8)
movq 0x8(%r8,%r10), %rax
cmpq %rax, %r15
cmovbq %r15, %rax
movq %rax, 0x8(%r13,%rdx,8)
movq %r9, 0x10(%r13,%rdx,8)
incl %r12d
addq $0x10, %r10
incq %r9
cmpq %r10, %rcx
jne 0x18542
incq %rdi
cmpq 0x20(%rsp), %rdi
jne 0x1848b
jmp 0x185ad
leaq (%rcx,%rdx,8), %rax
movq 0x10(%rax), %rax
movq (%rax), %r15
jmp 0x18261
xorl %r12d, %r12d
testl %r12d, %r12d
je 0x186c6
movslq %r12d, %rdi
movq %r13, %rsi
callq 0x18a93
xorl %eax, %eax
cmpl $0x2, %r12d
jl 0x1861f
movl %r12d, %eax
leaq 0x20(%r13), %rcx
leaq (%rax,%rax,2), %rax
leaq -0x18(,%rax,8), %rdx
xorl %esi, %esi
xorl %eax, %eax
movslq %eax, %rdi
leaq (%rdi,%rdi,2), %rdi
movq 0x8(%r13,%rdi,8), %rdi
cmpq 0x20(%r13,%rsi), %rdi
jae 0x18616
leaq (%rcx,%rsi), %rdi
addq $-0x8, %rdi
incl %eax
movslq %eax, %r8
leaq (%r8,%r8,2), %r8
movq 0x10(%rdi), %r9
movq %r9, 0x10(%r13,%r8,8)
movups (%rdi), %xmm0
movups %xmm0, (%r13,%r8,8)
addq $0x18, %rsi
cmpq %rsi, %rdx
jne 0x185e0
testl %eax, %eax
jle 0x1864e
leal 0x1(%rax), %ecx
leaq (%rcx,%rcx,2), %rcx
leaq -0x18(,%rcx,8), %rcx
xorl %edx, %edx
movq 0x18(%r13,%rdx), %rsi
cmpq %rsi, 0x8(%r13,%rdx)
jb 0x18645
movq %rsi, 0x8(%r13,%rdx)
addq $0x18, %rdx
cmpq %rdx, %rcx
jne 0x18634
testl %eax, %eax
jle 0x186d6
movl %eax, %eax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rcx
addq $0x18, %rcx
xorl %eax, %eax
movl $0x18, %edx
movslq %eax, %rsi
leaq (%rsi,%rsi,2), %rsi
movq (%r13,%rdx), %rdi
xorq 0x8(%r13,%rsi,8), %rdi
cmpq $0xffff, %rdi           # imm = 0xFFFF
ja 0x1869a
leaq 0x8(,%rsi,8), %rsi
addq %r13, %rsi
movq 0x8(%r13,%rdx), %rdi
movq %rdi, (%rsi)
jmp 0x186b9
leaq (%rdx,%r13), %rsi
incl %eax
movslq %eax, %rdi
leaq (%rdi,%rdi,2), %rdi
movq 0x10(%rsi), %r8
movq %r8, 0x10(%r13,%rdi,8)
movups (%rsi), %xmm0
movups %xmm0, (%r13,%rdi,8)
addq $0x18, %rdx
cmpq %rdx, %rcx
jne 0x1866b
incl %eax
jmp 0x186db
movq %r13, %rdi
callq 0x45c0
orb $0x2, (%rbx)
jmp 0x17fea
movl $0x1, %eax
movl %eax, 0x8(%rbx)
movq %r13, 0x60(%rbx)
jmp 0x17fea