// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/hts.c
// Function: hts_itr_multi_bam
int hts_itr_multi_bam(const hts_idx_t *idx, hts_itr_t *iter)
{
    int i, j, bin;
    khint_t k;
    bidx_t *bidx;
    uint64_t min_off, max_off, t_off = (uint64_t)-1;
    int tid;
    hts_pos_t beg, end, idx_maxpos;
    hts_reglist_t *curr_reg;
    uint32_t unmapped = 0, rel_off;

    if (!idx || !iter || !iter->multi)
        return -1;

    iter->i = -1;
    for (i=0; i<iter->n_reg; i++) {

        curr_reg = &iter->reg_list[i];
        tid = curr_reg->tid;

        if (tid < 0) {
            t_off = hts_itr_off(idx, tid);
            if (t_off != (uint64_t)-1) {
                switch (tid) {
                case HTS_IDX_NONE:
                    iter->finished = 1;
                    // fall through
                case HTS_IDX_START:
                case HTS_IDX_REST:
                    iter->curr_off = t_off;
                    iter->n_reg = 0;
                    iter->reg_list = NULL;
                    iter->read_rest = 1;
                    return 0;
                case HTS_IDX_NOCOOR:
                    iter->nocoor = 1;
                    iter->nocoor_off = t_off;
                }
            }
        } else {
            if (tid >= idx->n || (bidx = idx->bidx[tid]) == NULL || !kh_size(bidx))
                continue;

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

            idx_maxpos = hts_idx_maxpos(idx);

            for(j=0; j<curr_reg->count; j++) {
                hts_pair32_t *curr_intv = &curr_reg->intervals[j];
                if (curr_intv->end < curr_intv->beg)
                    continue;

                beg = curr_intv->beg;
                end = curr_intv->end;
                if (beg >= idx_maxpos)
                    continue;
                rel_off = beg>>idx->min_shift;

                /* Compute 'min_off' by searching the lowest level bin containing 'beg'.
                       If the computed bin is not in the index, try the next bin to the
                       left, belonging to the same parent. If it is the first sibling bin,
                       try the parent bin. */
                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) {
                        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 (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;
                }

                //convert coordinates to file offsets
                if (reg2intervals(iter, idx, tid, beg, end, j,
                                  min_off, max_off,
                                  idx->min_shift, idx->n_lvls) < 0) {
                    return -1;
                }
            }
        }
    }

    if (iter->n_off > 1)
        ks_introsort(_off_max, iter->n_off, iter->off);

    if(!iter->n_off && !iter->nocoor)
        iter->finished = 1;

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, 0x18(%rsp)
testq %rdi, %rdi
sete %cl
testq %rsi, %rsi
sete %dl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
orb %cl, %dl
jne 0x19b16
movq %rsi, %r11
testb $0x10, (%rsi)
je 0x19b16
movl $0xffffffff, 0xc(%r11)  # imm = 0xFFFFFFFF
cmpl $0x0, 0x10(%r11)
movq %r11, 0x10(%rsp)
jle 0x19abe
xorl %ecx, %ecx
movq 0x28(%r11), %rax
movq %rcx, 0xa0(%rsp)
leaq (%rcx,%rcx,4), %rdx
movslq 0x10(%rax,%rdx,8), %rsi
testq %rsi, %rsi
js 0x190ca
movq 0x18(%rsp), %rcx
movq %rsi, 0x48(%rsp)
cmpl 0x14(%rcx), %esi
jge 0x19aa6
movq 0x18(%rsp), %rcx
movq 0x28(%rcx), %rcx
movq 0x48(%rsp), %rsi
movq (%rcx,%rsi,8), %r13
testq %r13, %r13
je 0x19aa6
cmpl $0x0, 0x4(%r13)
je 0x19aa6
movl (%r13), %esi
testl %esi, %esi
je 0x19125
movq 0x18(%rsp), %rcx
movl 0xc(%rcx), %r8d
incl %r8d
leal -0x1(%rsi), %r9d
movl %r9d, %r10d
andl %r8d, %r10d
movq 0x10(%r13), %r11
movl $0x1, %ebx
movl %r10d, %edi
movl %edi, %ecx
shrl $0x4, %ecx
movl (%r11,%rcx,4), %ebp
leal (%rdi,%rdi), %ecx
andl $0x1e, %ecx
movl %ebp, %r14d
shrl %cl, %r14d
testb $0x2, %r14b
jne 0x19115
testb $0x1, %r14b
jne 0x190ba
movq 0x18(%r13), %r14
movl %edi, %r15d
cmpl %r8d, (%r14,%r15,4)
je 0x19115
addl %ebx, %edi
andl %r9d, %edi
incl %ebx
cmpl %r10d, %edi
jne 0x1908c
movl %esi, %edi
jmp 0x1911e
movq 0x18(%rsp), %rdi
movq %rsi, %rbx
callq 0x17c89
movq 0x10(%rsp), %r11
cmpq $-0x1, %rax
je 0x19aa6
movq %rbx, %rdx
cmpl $-0x2, %edx
je 0x19108
leal 0x4(%rdx), %ecx
cmpl $0x2, %ecx
jb 0x19af7
cmpl $-0x5, %edx
jne 0x19aa6
jmp 0x19af3
orb $0x8, (%r11)
movq %rax, 0x58(%r11)
jmp 0x19aa6
shrl %cl, %ebp
testb $0x3, %bpl
cmovnel %esi, %edi
movq 0x10(%rsp), %r11
jmp 0x19127
xorl %edi, %edi
cmpl %esi, %edi
jne 0x19135
movl $0x0, 0x40(%rsp)
jmp 0x1914f
movq 0x20(%r13), %rcx
movl %edi, %esi
leaq (%rsi,%rsi,2), %rsi
movq 0x10(%rcx,%rsi,8), %rcx
cmpl $0x0, 0x18(%rcx)
sete %cl
movl %ecx, 0x40(%rsp)
movq 0x18(%rsp), %rsi
movl 0x8(%rsi), %ecx
leal (%rcx,%rcx,2), %ecx
addl 0x4(%rsi), %ecx
movl $0x1, %esi
shlq %cl, %rsi
movq %rsi, 0x80(%rsp)
leaq (%rax,%rdx,8), %rcx
cmpl $0x0, 0x14(%rcx)
je 0x19aa6
movq 0x48(%rsp), %rax
shlq $0x20, %rax
movq %rax, 0x78(%rsp)
xorl %r8d, %r8d
movq %rcx, 0x98(%rsp)
movq 0x8(%rcx), %rax
movq %r8, %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %r10
movq 0x8(%rax,%rcx), %rdx
movl $0x8, %esi
cmpq %r10, %rdx
jl 0x19a89
cmpq 0x80(%rsp), %r10
jge 0x19a89
movq %r8, (%rsp)
movq 0x18(%rsp), %rax
movl 0x4(%rax), %ecx
movq %r10, 0x28(%rsp)
movq %rcx, 0x8(%rsp)
sarq %cl, %r10
movl 0x8(%rax), %eax
movq %rax, 0x50(%rsp)
leal (%rax,%rax,2), %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl %ecx, 0x24(%rsp)
shll %cl, %r8d
notl %r8d
movl $0x92492493, %eax       # imm = 0x92492493
imulq %rax, %r8
shrq $0x22, %r8
leal (%r8,%r10), %r11d
movl (%r13), %esi
leal -0x1(%rsi), %edi
testl %esi, %esi
je 0x19274
movl %edi, %ebx
andl %r11d, %ebx
movq 0x10(%r13), %r14
movl $0x1, %ebp
movl %ebx, %r9d
movl %r9d, %ecx
shrl $0x4, %ecx
movl (%r14,%rcx,4), %r15d
leal (%r9,%r9), %ecx
andl $0x1e, %ecx
movl %r15d, %r12d
shrl %cl, %r12d
testb $0x2, %r12b
jne 0x19267
testb $0x1, %r12b
jne 0x19255
movq 0x18(%r13), %r12
movl %r9d, %eax
cmpl %r11d, (%r12,%rax,4)
je 0x19267
addl %ebp, %r9d
andl %edi, %r9d
incl %ebp
cmpl %ebx, %r9d
jne 0x19225
movl %esi, %r9d
jmp 0x19277
shrl %cl, %r15d
testb $0x3, %r15b
cmovnel %esi, %r9d
jmp 0x19277
xorl %r9d, %r9d
cmpl %esi, %r9d
jne 0x19295
leal -0x1(%r11), %eax
movl %eax, %ecx
andl $-0x8, %ecx
incl %ecx
movl %eax, %ebx
sarl $0x3, %ebx
cmpl %ecx, %r11d
cmovgl %eax, %ebx
movl %ebx, %r11d
cmpl %esi, %r9d
jne 0x192a3
testl %r11d, %r11d
jne 0x19210
testl %r11d, %r11d
cmovel %r11d, %r9d
testl %esi, %esi
je 0x19309
testl %r11d, %r11d
jne 0x19309
movq 0x10(%r13), %r11
xorl %r9d, %r9d
movl $0x1, %ebx
movl %r9d, %eax
shrl $0x4, %eax
movl (%r11,%rax,4), %ebp
leal (%r9,%r9), %ecx
andl $0x1e, %ecx
movl %ebp, %r14d
shrl %cl, %r14d
testb $0x2, %r14b
jne 0x192ff
testb $0x1, %r14b
jne 0x192f0
movq 0x18(%r13), %rax
movl %r9d, %r14d
cmpl $0x0, (%rax,%r14,4)
je 0x192ff
addl %ebx, %r9d
incl %ebx
andl %edi, %r9d
jne 0x192bf
movl %esi, %r9d
jmp 0x19309
shrl %cl, %ebp
testb $0x3, %bpl
cmovnel %esi, %r9d
cmpl %esi, %r9d
jne 0x19313
xorl %r15d, %r15d
jmp 0x19323
movq 0x20(%r13), %rax
movl %r9d, %ecx
leaq (%rcx,%rcx,2), %rcx
movq 0x8(%rax,%rcx,8), %r15
movq 0x18(%rsp), %rax
movq 0x30(%rax), %rcx
movq 0x48(%rsp), %rax
leaq (%rax,%rax,2), %rbx
movq 0x10(%rcx,%rbx,8), %r14
testq %r14, %r14
je 0x19364
leaq (%rcx,%rbx,8), %rax
movl %r10d, %r11d
cmpq (%rax), %r11
jge 0x19364
movq (%r14,%r11,8), %rax
cmpq %rax, %r15
cmovbeq %rax, %r15
cmpb $0x0, 0x40(%rsp)
je 0x19387
movq 0x10(%rsp), %r11
jmp 0x193e2
cmpl %esi, %r9d
sete %al
orb 0x40(%rsp), %al
movq 0x10(%rsp), %r11
jne 0x193e2
movq 0x20(%r13), %rax
movl %r9d, %ecx
leaq (%rcx,%rcx,2), %rcx
movq 0x8(%rax,%rcx,8), %r15
jmp 0x193e2
leaq (%rcx,%rbx,8), %rbx
addq $0x10, %rbx
decq %r11
movq %r11, %rcx
testl %ecx, %ecx
js 0x193b5
movq (%rbx), %rax
movl %ecx, %r10d
andl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
movq (%rax,%r10,8), %r10
leaq -0x1(%rcx), %r11
cmpq %r15, %r10
jae 0x19392
jmp 0x193b8
movq %r15, %r10
cmpl %esi, %r9d
movq 0x10(%rsp), %r11
je 0x193df
movq 0x20(%r13), %rax
movl %r9d, %r9d
leaq (%r9,%r9,2), %r9
movq 0x8(%rax,%r9,8), %rax
cmpq %rax, %r10
cmovbeq %rax, %r10
testl %ecx, %ecx
cmovsq %rax, %r10
movq %r10, %r15
movq $-0x1, %r12
cmpq 0x80(%rsp), %rdx
jg 0x194e1
leaq -0x1(%rdx), %rax
movq 0x8(%rsp), %rcx
sarq %cl, %rax
leal (%rax,%r8), %ecx
incl %ecx
movq 0x18(%rsp), %rax
cmpl 0xc(%rax), %ecx
movl $0x0, %eax
cmovgel %eax, %ecx
movl %ecx, %eax
andl $0x80000007, %eax       # imm = 0x80000007
cmpl $0x1, %eax
jne 0x1943b
decl %ecx
movl %ecx, %r8d
shrl $0x3, %r8d
andl $0x38, %ecx
cmpl $0x8, %ecx
movl %r8d, %ecx
je 0x19425
jmp 0x1943e
movl %ecx, %r8d
testl %r8d, %r8d
je 0x194e1
testl %esi, %esi
je 0x194b0
movl %r8d, %r10d
andl %edi, %r10d
movq 0x10(%r13), %r11
movl $0x1, %ebx
movl %r10d, %r9d
movl %r9d, %eax
shrl $0x4, %eax
movl (%r11,%rax,4), %ebp
leal (%r9,%r9), %ecx
andl $0x1e, %ecx
movl %ebp, %r14d
shrl %cl, %r14d
testb $0x2, %r14b
jne 0x1949f
testb $0x1, %r14b
jne 0x1948d
movq 0x18(%r13), %rax
movl %r9d, %r14d
cmpl %r8d, (%rax,%r14,4)
je 0x1949f
addl %ebx, %r9d
andl %edi, %r9d
incl %ebx
cmpl %r10d, %r9d
jne 0x1945d
movl %esi, %r9d
jmp 0x194a9
shrl %cl, %ebp
testb $0x3, %bpl
cmovnel %esi, %r9d
movq 0x10(%rsp), %r11
jmp 0x194b3
xorl %r9d, %r9d
cmpl %esi, %r9d
je 0x194cb
movq 0x20(%r13), %rcx
movl %r9d, %eax
leaq (%rax,%rax,2), %r9
cmpl $0x0, 0x4(%rcx,%r9,8)
jg 0x194d6
incl %r8d
movl %r8d, %ecx
jmp 0x19419
leaq (%rcx,%r9,8), %rax
movq 0x10(%rax), %rax
movq (%rax), %r12
movq 0x28(%rsp), %rax
movl $0x1, %esi
cmpq %rdx, %rax
movq (%rsp), %r8
jg 0x19a89
movq 0x18(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x48(%rsp), %rcx
movq (%rax,%rcx,8), %rbx
testq %rbx, %rbx
je 0x19a89
movq 0x50(%rsp), %rsi
movq 0x8(%rsp), %rax
addl %esi, %eax
leal (%rax,%rsi,2), %ecx
movq %rsi, %rax
movl $0x1, %r10d
shlq %cl, %r10
cmpq %rdx, %r10
cmovgeq %rdx, %r10
decq %r10
testl %eax, %eax
js 0x19564
leal 0x1(%rax), %esi
xorl %edx, %edx
movq 0x28(%rsp), %r9
movq %r10, %rax
sarq %cl, %rax
movq %r9, %rdi
sarq %cl, %rdi
subq %rdi, %rdx
addq %rax, %rdx
incq %rdx
addl $-0x3, %ecx
decl %esi
jne 0x19546
jmp 0x19566
xorl %edx, %edx
movl (%rbx), %ecx
movl 0x8(%r11), %eax
cmpq %rcx, %rdx
movq %r15, 0x68(%rsp)
movq %r12, 0x60(%rsp)
movq %rbx, 0x30(%rsp)
movl %eax, 0x74(%rsp)
jae 0x197a8
cmpl $0x0, 0x50(%rsp)
movl 0x24(%rsp), %ecx
js 0x199a8
movq %r10, 0x58(%rsp)
addl 0x8(%rsp), %ecx
movq 0x78(%rsp), %r12
orq %r8, %r12
xorl %esi, %esi
movq %rax, 0x8(%rsp)
movl $0x0, 0x44(%rsp)
movq %r12, 0x88(%rsp)
movq %rsi, 0x90(%rsp)
movq 0x28(%rsp), %r14
sarq %cl, %r14
movq 0x58(%rsp), %rsi
movl %ecx, 0x24(%rsp)
sarq %cl, %rsi
cmpq %rsi, %r14
jg 0x19775
movslq 0x44(%rsp), %rax
addq %rax, %rsi
addq %rax, %r14
movq %rsi, 0x38(%rsp)
movl (%rbx), %eax
testl %eax, %eax
je 0x19666
leal -0x1(%rax), %esi
movl %esi, %edi
andl %r14d, %edi
movq 0x10(%rbx), %r8
movl $0x1, %r9d
movl %edi, %edx
movl %edx, %ecx
shrl $0x4, %ecx
movl (%r8,%rcx,4), %r10d
leal (%rdx,%rdx), %ecx
andl $0x1e, %ecx
movl %r10d, %r11d
shrl %cl, %r11d
testb $0x2, %r11b
jne 0x1964c
testb $0x1, %r11b
jne 0x1963c
movq 0x18(%rbx), %r11
movl %edx, %r15d
cmpl %r14d, (%r11,%r15,4)
je 0x1964c
addl %r9d, %edx
andl %esi, %edx
incl %r9d
cmpl %edi, %edx
jne 0x1960e
movl %eax, %edx
jmp 0x19656
shrl %cl, %r10d
testb $0x3, %r10b
cmovnel %eax, %edx
movq 0x10(%rsp), %r11
movq (%rsp), %r8
movq 0x38(%rsp), %rsi
jmp 0x19668
xorl %edx, %edx
movb $0x1, %bpl
cmpl %eax, %edx
je 0x1975c
movq 0x20(%rbx), %r15
movl %edx, %eax
leaq (%rax,%rax,2), %r12
movslq 0x4(%r15,%r12,8), %rax
movb $0x1, %bpl
testq %rax, %rax
je 0x19730
movq 0x60(%r11), %rdi
movslq 0x8(%r11), %rcx
addq %rax, %rcx
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
movq %r11, %rbx
callq 0x4840
xorl %ecx, %ecx
testq %rax, %rax
je 0x19734
leaq (%r15,%r12,8), %rsi
movq %rax, 0x60(%rbx)
movslq 0x4(%rsi), %rdx
testq %rdx, %rdx
movq %rbx, %r11
jle 0x1973e
movq 0x10(%rsi), %rsi
shlq $0x4, %rdx
xorl %edi, %edi
movq 0x68(%rsp), %rbx
movq 0x60(%rsp), %r15
movq 0x88(%rsp), %r12
cmpq %rbx, 0x8(%rsi,%rdi)
jbe 0x19725
movq (%rsi,%rdi), %r8
cmpq %r15, %r8
jae 0x19725
cmpq %rbx, %r8
cmovbeq %rbx, %r8
movslq 0x8(%r11), %r9
leaq (%r9,%r9,2), %r10
movq %r8, (%rax,%r10,8)
movq 0x8(%rsi,%rdi), %r8
cmpq %r15, %r8
cmovaeq %r15, %r8
movq %r8, 0x8(%rax,%r10,8)
movq %r12, 0x10(%rax,%r10,8)
leal 0x1(%r9), %r8d
movl %r8d, 0x8(%r11)
addq $0x10, %rdi
cmpq %rdi, %rdx
jne 0x196e4
jmp 0x1973e
xorl %ecx, %ecx
jmp 0x1974c
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
xorl %ebp, %ebp
movq %rbx, %r11
movq (%rsp), %r8
movq 0x30(%rsp), %rbx
movq 0x38(%rsp), %rsi
testb %bpl, %bpl
movq 0x8(%rsp), %rax
cmovel %ecx, %eax
movq %rax, 0x8(%rsp)
testb %bpl, %bpl
je 0x199ad
leaq 0x1(%r14), %rax
cmpq %rsi, %r14
movq %rax, %r14
jl 0x195f4
movl 0x24(%rsp), %edx
addl $-0x3, %edx
movq 0x90(%rsp), %rsi
leal (%rsi,%rsi,2), %ecx
movl $0x1, %eax
shll %cl, %eax
addl %eax, 0x44(%rsp)
leal 0x1(%rsi), %eax
cmpl 0x50(%rsp), %esi
movl %eax, %esi
movl %edx, %ecx
jne 0x195bf
jmp 0x199a8
movq %r10, 0x58(%rsp)
xorl %r15d, %r15d
movq 0x28(%rsp), %rax
testq %rax, %rax
cmovleq %r15, %rax
movq %rax, 0x28(%rsp)
testq %rcx, %rcx
movl 0x24(%rsp), %eax
je 0x199b2
addl 0x8(%rsp), %eax
movslq %eax, %r12
movq 0x78(%rsp), %rbp
orq %r8, %rbp
xorl %r14d, %r14d
movq %r12, 0x8(%rsp)
movq %rbp, 0x38(%rsp)
movq 0x10(%rbx), %rax
movl %r14d, %ecx
shrl $0x4, %ecx
movl (%rax,%rcx,4), %eax
leal (%r14,%r14), %ecx
shrl %cl, %eax
testb $0x3, %al
jne 0x1999c
movq 0x18(%rbx), %rcx
movl %r14d, %eax
movl (%rcx,%rax,4), %edx
xorl %ecx, %ecx
testq %rdx, %rdx
je 0x19828
movl %edx, %esi
incl %ecx
decl %esi
movl %esi, %edi
sarl $0x3, %edi
cmpl $0x7, %esi
movl %edi, %esi
ja 0x19818
movl $0x4, %esi
cmpl 0x50(%rsp), %ecx
jg 0x19996
leal (%rcx,%rcx,2), %ecx
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
shll %cl, %edi
notl %edi
movl $0x92492493, %esi       # imm = 0x92492493
imulq %rsi, %rdi
movslq %ecx, %rsi
movq %r12, %rcx
subq %rsi, %rcx
movq 0x28(%rsp), %r8
shrq %cl, %r8
shrq $0x22, %rdi
addq %rdi, %r8
xorl %esi, %esi
cmpq %rdx, %r8
ja 0x19992
movq 0x58(%rsp), %r8
sarq %cl, %r8
addq %rdi, %r8
cmpq %rdx, %r8
jl 0x19992
movq %r15, %r12
movq 0x20(%rbx), %r15
leaq (%rax,%rax,2), %rbp
movslq 0x4(%r15,%rbp,8), %rax
movb $0x1, %dl
testq %rax, %rax
je 0x1995a
movq 0x60(%r11), %rdi
movslq 0x8(%r11), %rcx
addq %rax, %rcx
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
movq %r11, %rbx
callq 0x4840
xorl %ecx, %ecx
testq %rax, %rax
je 0x1995e
leaq (%r15,%rbp,8), %rsi
movq %rax, 0x60(%rbx)
movslq 0x4(%rsi), %rdx
testq %rdx, %rdx
movq %rbx, %r11
jle 0x19977
movq 0x10(%rsi), %rsi
shlq $0x4, %rdx
xorl %edi, %edi
movq 0x30(%rsp), %rbx
movq %r12, %r15
movq 0x8(%rsp), %r12
movq 0x38(%rsp), %rbp
movq 0x68(%rsp), %r8
cmpq %r8, 0x8(%rsi,%rdi)
jbe 0x1994f
movq (%rsi,%rdi), %r8
cmpq 0x60(%rsp), %r8
jae 0x1994f
movq 0x68(%rsp), %r9
cmpq %r9, %r8
cmovbeq %r9, %r8
movslq 0x8(%r11), %r9
leaq (%r9,%r9,2), %r10
movq %r8, (%rax,%r10,8)
movq 0x8(%rsi,%rdi), %r8
movq 0x60(%rsp), %rbx
cmpq %rbx, %r8
cmovaeq %rbx, %r8
movq 0x30(%rsp), %rbx
movq %r8, 0x8(%rax,%r10,8)
movq %rbp, 0x10(%rax,%r10,8)
leal 0x1(%r9), %r8d
movl %r8d, 0x8(%r11)
addq $0x10, %rdi
cmpq %rdi, %rdx
jne 0x198f8
jmp 0x19984
xorl %ecx, %ecx
jmp 0x1996d
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
xorl %edx, %edx
movq %rbx, %r11
movq 0x30(%rsp), %rbx
movq %r12, %r15
movq 0x8(%rsp), %r12
jmp 0x19986
movq 0x30(%rsp), %rbx
movq %r12, %r15
movq 0x8(%rsp), %r12
movb $0x1, %dl
testb %dl, %dl
cmovel %ecx, %r15d
xorb $0x1, %dl
movzbl %dl, %esi
movq (%rsp), %r8
testb $0x3, %sil
jne 0x199b2
incl %r14d
cmpl (%rbx), %r14d
jne 0x197ea
xorl %r15d, %r15d
jmp 0x199b2
movq 0x8(%rsp), %r15
testl %r15d, %r15d
movl $0x1, %esi
js 0x19a89
movl 0x8(%r11), %eax
movl 0x74(%rsp), %ebp
subl %ebp, %eax
cmpl $0x2, %eax
jl 0x19a82
movslq %ebp, %rbx
movl %eax, %edi
leaq (%rbx,%rbx,2), %rsi
shlq $0x3, %rsi
addq 0x60(%r11), %rsi
callq 0x18a93
movq 0x10(%rsp), %r11
incq %rbx
cmpl 0x8(%r11), %ebx
jge 0x19a76
leaq (,%rbx,8), %rax
leaq (%rax,%rax,2), %rax
movl %ebp, %ecx
movq (%rsp), %r8
movq 0x60(%r11), %rdx
movslq %ecx, %rsi
leaq (%rsi,%rsi,2), %rsi
movq 0x8(%rdx,%rsi,8), %rdi
cmpq (%rdx,%rax), %rdi
jae 0x19a49
leal 0x1(%rcx), %esi
cmpl %ebp, %ecx
jge 0x19a45
leaq (%rdx,%rax), %rcx
movslq %esi, %rdi
leaq (%rdi,%rdi,2), %rdi
movq 0x10(%rcx), %r8
movq %r8, 0x10(%rdx,%rdi,8)
movq (%rsp), %r8
movups (%rcx), %xmm0
movups %xmm0, (%rdx,%rdi,8)
movl %esi, %ecx
jmp 0x19a62
movq 0x8(%rdx,%rax), %r8
cmpq %r8, %rdi
jae 0x19a5e
leaq (%rdx,%rsi,8), %rdx
addq $0x8, %rdx
movq %r8, (%rdx)
movq (%rsp), %r8
incq %rbx
movslq 0x8(%r11), %rdx
incl %ebp
addq $0x18, %rax
cmpq %rdx, %rbx
jl 0x19a09
jmp 0x19a7c
movl %ebp, %ecx
movq (%rsp), %r8
incl %ecx
movl %ecx, 0x8(%r11)
movl 0x8(%r11), %esi
shrl $0x1f, %esi
testb $0x7, %sil
jne 0x19aec
incq %r8
movq 0x98(%rsp), %rcx
movl 0x14(%rcx), %eax
cmpq %rax, %r8
jb 0x19194
movq 0xa0(%rsp), %rcx
incq %rcx
movslq 0x10(%r11), %rax
cmpq %rax, %rcx
jl 0x19007
movslq 0x8(%r11), %rdi
cmpq $0x2, %rdi
jl 0x19ad6
movq 0x60(%r11), %rsi
callq 0x18a93
movq 0x10(%rsp), %r11
xorl %eax, %eax
cmpl $0x0, 0x8(%r11)
jne 0x19b16
movl (%r11), %ecx
testb $0x8, %cl
jne 0x19b16
orl $0x2, %ecx
jmp 0x19b11
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x19b16
orb $0x2, (%r11)
movq %rax, 0x50(%r11)
movl $0x0, 0x10(%r11)
movq $0x0, 0x28(%r11)
movl (%r11), %ecx
orl $0x1, %ecx
movl %ecx, (%r11)
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq