// File: /workspace/github_c_makefile_star2_O3/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, 0x10(%rsp)
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
orb %al, %cl
jne 0x195c3
testb $0x10, (%rsi)
je 0x195c3
movl $0xffffffff, 0xc(%rsi)  # imm = 0xFFFFFFFF
movl 0x10(%rsi), %ebp
testl %ebp, %ebp
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
jle 0x19564
xorl %ecx, %ecx
movq 0x28(%rsi), %rax
leaq (%rcx,%rcx,4), %rdx
movslq 0x10(%rax,%rdx,8), %r14
testq %r14, %r14
js 0x18bb3
cmpl 0x14(%rdi), %r14d
jge 0x19555
movq %rcx, 0x50(%rsp)
movq 0x28(%rdi), %rcx
movq %r14, 0x70(%rsp)
movq (%rcx,%r14,8), %rdi
testq %rdi, %rdi
je 0x1954b
cmpl $0x0, 0x4(%rdi)
je 0x1954b
movl (%rdi), %esi
testl %esi, %esi
movq 0x10(%rsp), %rcx
movq %rdi, 0x18(%rsp)
je 0x18c1a
movl 0xc(%rcx), %r8d
incl %r8d
leal -0x1(%rsi), %r9d
movl %r9d, %r10d
andl %r8d, %r10d
movq 0x10(%rdi), %r11
movl $0x1, %ebx
movl %r10d, %edi
movl %edi, %ecx
shrl $0x4, %ecx
movl (%r11,%rcx,4), %r14d
leal (%rdi,%rdi), %ecx
andl $0x1e, %ecx
movl %r14d, %r15d
shrl %cl, %r15d
testb $0x2, %r15b
jne 0x18c0e
testb $0x1, %r15b
jne 0x18ba5
movq 0x18(%rsp), %r15
movq 0x18(%r15), %r15
movl %edi, %r12d
cmpl %r8d, (%r15,%r12,4)
je 0x18c0e
addl %ebx, %edi
andl %r9d, %edi
incl %ebx
cmpl %r10d, %edi
jne 0x18b6e
jmp 0x18c20
movq %rcx, %rbx
movl %r14d, %esi
callq 0x17777
cmpq $-0x1, %rax
je 0x18bf3
cmpl $-0x2, %r14d
movq 0x8(%rsp), %rsi
je 0x18bfa
leal 0x4(%r14), %ecx
cmpl $0x2, %ecx
jb 0x1959f
cmpl $-0x5, %r14d
movq 0x10(%rsp), %rdi
movq %rbx, %rcx
jne 0x19555
jmp 0x195a3
movq 0x8(%rsp), %rsi
jmp 0x18c01
orb $0x8, (%rsi)
movq %rax, 0x58(%rsi)
movq 0x10(%rsp), %rdi
movq %rbx, %rcx
jmp 0x19555
shrl %cl, %r14d
testb $0x3, %r14b
cmovnel %esi, %edi
jmp 0x18c1c
xorl %edi, %edi
cmpl %esi, %edi
jne 0x18c2a
movl $0x0, 0x24(%rsp)
jmp 0x18c49
movq 0x18(%rsp), %rcx
movq 0x20(%rcx), %rcx
movl %edi, %esi
leaq (%rsi,%rsi,2), %rsi
movq 0x10(%rcx,%rsi,8), %rcx
cmpl $0x0, 0x18(%rcx)
sete %cl
movl %ecx, 0x24(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rcx
movl 0x8(%rcx), %ecx
leal (%rcx,%rcx,2), %ecx
movq 0x10(%rsp), %rdi
addl 0x4(%rdi), %ecx
movl $0x1, %edi
shlq %cl, %rdi
movq %rdi, 0x90(%rsp)
movq 0x10(%rsp), %rdi
leaq (%rax,%rdx,8), %rax
movq %rax, 0x98(%rsp)
movl 0x14(%rax), %eax
testl %eax, %eax
movq 0x50(%rsp), %rcx
je 0x19555
movq 0x70(%rsp), %rcx
shlq $0x20, %rcx
movq %rcx, 0x88(%rsp)
xorl %edx, %edx
movq 0x18(%rsp), %rbp
movq 0x98(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq %rdx, 0x78(%rsp)
shlq $0x4, %rdx
movq (%rcx,%rdx), %r9
movq 0x8(%rcx,%rdx), %rdx
cmpq %r9, %rdx
jl 0x19535
cmpq 0x90(%rsp), %r9
jge 0x19535
movq 0x10(%rsp), %rsi
movl 0x4(%rsi), %eax
movq %r9, 0x28(%rsp)
movl %eax, %ecx
sarq %cl, %r9
movl 0x8(%rsi), %ecx
movq %rcx, 0x30(%rsp)
leal (%rcx,%rcx,2), %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl %ecx, 0x3c(%rsp)
shll %cl, %r8d
notl %r8d
movl $0x92492493, %ecx       # imm = 0x92492493
imulq %rcx, %r8
shrq $0x22, %r8
leal (%r8,%r9), %r11d
movl (%rbp), %esi
leal -0x1(%rsi), %edi
testl %esi, %esi
je 0x18d8a
movl %edi, %ebx
andl %r11d, %ebx
movq 0x10(%rbp), %r14
movl $0x1, %ebp
movl %ebx, %r10d
movl %r10d, %ecx
shrl $0x4, %ecx
movl (%r14,%rcx,4), %r15d
leal (%r10,%r10), %ecx
andl $0x1e, %ecx
movl %r15d, %r12d
shrl %cl, %r12d
testb $0x2, %r12b
jne 0x18d7d
testb $0x1, %r12b
jne 0x18d6e
movq 0x18(%rsp), %r12
movq 0x18(%r12), %r12
movl %r10d, %r13d
cmpl %r11d, (%r12,%r13,4)
je 0x18d7d
addl %ebp, %r10d
andl %edi, %r10d
incl %ebp
cmpl %ebx, %r10d
jne 0x18d38
jmp 0x18d92
shrl %cl, %r15d
testb $0x3, %r15b
cmovnel %esi, %r10d
jmp 0x18d8d
xorl %r10d, %r10d
cmpl %esi, %r10d
jne 0x18dc4
leal -0x1(%r11), %ecx
movl %ecx, %r10d
andl $-0x8, %r10d
incl %r10d
movl %ecx, %ebx
sarl $0x3, %ebx
cmpl %r10d, %r11d
cmovgl %ecx, %ebx
movl %ebx, %r11d
testl %ebx, %ebx
movq 0x18(%rsp), %rbp
jne 0x18d23
testl %esi, %esi
jne 0x18dd6
xorl %r10d, %r10d
jmp 0x18e40
testl %r11d, %r11d
cmovel %r11d, %r10d
jne 0x18e3b
testl %esi, %esi
movq 0x18(%rsp), %rbp
je 0x18e40
movq 0x10(%rbp), %r11
xorl %r10d, %r10d
movl $0x1, %ebx
movl %r10d, %ecx
shrl $0x4, %ecx
movl (%r11,%rcx,4), %ebp
leal (%r10,%r10), %ecx
andl $0x1e, %ecx
movl %ebp, %r14d
shrl %cl, %r14d
testb $0x2, %r14b
jne 0x18e31
testb $0x1, %r14b
jne 0x18e18
movq 0x18(%rsp), %r14
movq 0x18(%r14), %r14
movl %r10d, %r15d
cmpl $0x0, (%r14,%r15,4)
je 0x18e31
addl %ebx, %r10d
incl %ebx
andl %edi, %r10d
jne 0x18de2
movb $0x1, %cl
movl %esi, %r10d
xorl %r13d, %r13d
movq 0x18(%rsp), %rbp
jmp 0x18e61
shrl %cl, %ebp
testb $0x3, %bpl
cmovnel %esi, %r10d
movq 0x18(%rsp), %rbp
cmpl %esi, %r10d
jne 0x18e4f
movb $0x1, %cl
movl %esi, %r10d
xorl %r13d, %r13d
jmp 0x18e61
movq 0x20(%rbp), %rcx
movl %r10d, %r11d
leaq (%r11,%r11,2), %r11
movq 0x8(%rcx,%r11,8), %r13
xorl %ecx, %ecx
movq 0x10(%rsp), %r11
movq 0x30(%r11), %rbx
movq 0x70(%rsp), %r11
leaq (%r11,%r11,2), %r14
movq 0x10(%rbx,%r14,8), %r11
testq %r11, %r11
je 0x18ebe
leaq (%rbx,%r14,8), %rbx
movl %r9d, %r14d
cmpq (%rbx), %r14
jge 0x18ebe
movq (%r11,%r14,8), %r9
cmpq %r9, %r13
cmovbeq %r9, %r13
cmpb $0x0, 0x24(%rsp)
jne 0x18efe
decq %r14
movq %r14, %r9
testl %r9d, %r9d
js 0x18ed6
movl %r9d, %ebx
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
movq (%r11,%rbx,8), %rbx
leaq -0x1(%r9), %r14
cmpq %r13, %rbx
jae 0x18e9e
jmp 0x18ed9
orb 0x24(%rsp), %cl
jne 0x18efe
movq 0x20(%rbp), %rcx
movl %r10d, %r9d
leaq (%r9,%r9,2), %r9
movq 0x8(%rcx,%r9,8), %r13
jmp 0x18efe
movq %r13, %rbx
testb %cl, %cl
jne 0x18efb
movq 0x20(%rbp), %rcx
movl %r10d, %r10d
leaq (%r10,%r10,2), %r10
movq 0x8(%rcx,%r10,8), %rcx
cmpq %rcx, %rbx
cmovbeq %rcx, %rbx
testl %r9d, %r9d
cmovsq %rcx, %rbx
movq %rbx, %r13
movq $-0x1, 0x40(%rsp)
cmpq 0x90(%rsp), %rdx
jg 0x1901c
leaq -0x1(%rdx), %r9
movl %eax, %ecx
sarq %cl, %r9
leal (%r9,%r8), %ecx
incl %ecx
movq 0x10(%rsp), %r8
cmpl 0xc(%r8), %ecx
movl $0x0, %r8d
cmovgel %r8d, %ecx
movl %ecx, %r8d
andl $0x80000007, %r8d       # imm = 0x80000007
cmpl $0x1, %r8d
jne 0x18f67
movq 0x28(%rsp), %r10
movq 0x30(%rsp), %r11
decl %ecx
movl %ecx, %r8d
shrl $0x3, %r8d
andl $0x38, %ecx
cmpl $0x8, %ecx
movl %r8d, %ecx
je 0x18f51
jmp 0x18f74
movl %ecx, %r8d
movq 0x28(%rsp), %r10
movq 0x30(%rsp), %r11
testl %r8d, %r8d
je 0x19005
testl %esi, %esi
je 0x18fdf
movl %r8d, %r10d
andl %edi, %r10d
movq 0x10(%rbp), %r11
movl $0x1, %ebx
movl %r10d, %r9d
movl %r9d, %ecx
shrl $0x4, %ecx
movl (%r11,%rcx,4), %r14d
leal (%r9,%r9), %ecx
andl $0x1e, %ecx
movl %r14d, %r15d
shrl %cl, %r15d
testb $0x2, %r15b
jne 0x18fd2
testb $0x1, %r15b
jne 0x18fc3
movq 0x18(%rbp), %r15
movl %r9d, %r12d
cmpl %r8d, (%r15,%r12,4)
je 0x18fd2
addl %ebx, %r9d
andl %edi, %r9d
incl %ebx
cmpl %r10d, %r9d
jne 0x18f93
jmp 0x18ffa
shrl %cl, %r14d
testb $0x3, %r14b
cmovnel %esi, %r9d
jmp 0x18fe2
xorl %r9d, %r9d
cmpl %esi, %r9d
je 0x18ffa
movq 0x20(%rbp), %rcx
movl %r9d, %r9d
leaq (%r9,%r9,2), %r9
cmpl $0x0, 0x4(%rcx,%r9,8)
jg 0x1900c
incl %r8d
movl %r8d, %ecx
jmp 0x18f37
movq 0x10(%rsp), %rcx
jmp 0x1902b
leaq (%rcx,%r9,8), %rcx
movq 0x10(%rcx), %rcx
movq (%rcx), %rcx
movq %rcx, 0x40(%rsp)
movq 0x10(%rsp), %rcx
movq 0x28(%rsp), %r10
movq 0x30(%rsp), %r11
movq 0x28(%rcx), %rcx
movq 0x70(%rsp), %rsi
movq (%rcx,%rsi,8), %r12
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testq %r12, %r12
movq 0x8(%rsp), %rsi
je 0x195c3
leal (%r11,%rax), %ecx
leal (%rcx,%r11,2), %ecx
movl $0x1, %ebx
shlq %cl, %rbx
cmpq %rdx, %rbx
cmovgeq %rdx, %rbx
testl %r11d, %r11d
js 0x19284
movl (%r12), %edx
decq %rbx
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
xorl %esi, %esi
movq %rbx, %r8
sarq %cl, %r8
movq %r10, %r9
sarq %cl, %r9
subq %r9, %rsi
addq %r8, %rsi
incq %rsi
addl $-0x3, %ecx
incl %edi
cmpl %edi, %r11d
jne 0x1907a
movq 0x8(%rsp), %rcx
movl 0x8(%rcx), %r15d
movl 0x3c(%rsp), %edi
addl %eax, %edi
cmpq %rdx, %rsi
jae 0x1928d
movq %rbx, 0x68(%rsp)
movq %r15, 0x60(%rsp)
movq 0x88(%rsp), %rax
orq 0x78(%rsp), %rax
movq %rax, 0x80(%rsp)
xorl %eax, %eax
movl $0x0, 0x4c(%rsp)
movq %rax, 0xa0(%rsp)
movq %r10, %rbx
movl %edi, %ecx
sarq %cl, %rbx
movq 0x68(%rsp), %rax
movl %edi, 0x3c(%rsp)
sarq %cl, %rax
movq %rax, 0x58(%rsp)
cmpq %rax, %rbx
jg 0x19250
movslq 0x4c(%rsp), %rax
addq %rax, 0x58(%rsp)
addq %rax, %rbx
movl (%r12), %eax
testl %eax, %eax
je 0x19179
leal -0x1(%rax), %esi
movl %esi, %edi
andl %ebx, %edi
movq 0x10(%r12), %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 0x1916d
testb $0x1, %r11b
jne 0x1915c
movq 0x18(%r12), %r11
movl %edx, %r14d
cmpl %ebx, (%r11,%r14,4)
je 0x1916d
addl %r9d, %edx
andl %esi, %edx
incl %r9d
cmpl %edi, %edx
jne 0x1912d
jmp 0x1923e
shrl %cl, %r10d
testb $0x3, %r10b
cmovnel %eax, %edx
jmp 0x1917b
xorl %edx, %edx
cmpl %eax, %edx
je 0x1923e
movq 0x20(%r12), %r15
movl %edx, %eax
leaq (%rax,%rax,2), %r14
movslq 0x4(%r15,%r14,8), %rax
testq %rax, %rax
je 0x1923e
movq 0x8(%rsp), %rbp
movq 0x60(%rbp), %rdi
movslq 0x8(%rbp), %rcx
addq %rax, %rcx
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x4840
testq %rax, %rax
je 0x19597
leaq (%r15,%r14,8), %rdx
movq %rax, 0x60(%rbp)
movslq 0x4(%rdx), %rcx
testq %rcx, %rcx
movq 0x18(%rsp), %rbp
jle 0x1923e
movq 0x10(%rdx), %rdx
shlq $0x4, %rcx
xorl %esi, %esi
movq 0x8(%rdx,%rsi), %rdi
cmpq %r13, %rdi
jbe 0x19235
movq (%rdx,%rsi), %r8
cmpq 0x40(%rsp), %r8
jae 0x19235
cmpq %r13, %r8
cmovbeq %r13, %r8
movq 0x8(%rsp), %r11
movslq 0x8(%r11), %r9
leaq (%r9,%r9,2), %r10
movq %r8, (%rax,%r10,8)
movq 0x40(%rsp), %r8
cmpq %r8, %rdi
cmovaeq %r8, %rdi
movq %rdi, 0x8(%rax,%r10,8)
movq 0x80(%rsp), %rdi
movq %rdi, 0x10(%rax,%r10,8)
leal 0x1(%r9), %edi
movl %edi, 0x8(%r11)
addq $0x10, %rsi
cmpq %rsi, %rcx
jne 0x191e2
leaq 0x1(%rbx), %rax
cmpq 0x58(%rsp), %rbx
movq %rax, %rbx
jl 0x19111
movl 0x3c(%rsp), %edi
addl $-0x3, %edi
movq 0xa0(%rsp), %rdx
leal (%rdx,%rdx,2), %ecx
movl $0x1, %eax
shll %cl, %eax
addl %eax, 0x4c(%rsp)
leal 0x1(%rdx), %eax
cmpl 0x30(%rsp), %edx
movq 0x28(%rsp), %r10
jne 0x190da
jmp 0x19443
movl 0x8(%rsi), %r15d
jmp 0x1945a
testq %r10, %r10
movl $0x0, %eax
cmovleq %rax, %r10
testq %rdx, %rdx
je 0x19455
movq %rbx, 0x68(%rsp)
movq %r15, 0x60(%rsp)
movslq %edi, %rax
movq %rax, 0x80(%rsp)
movq 0x88(%rsp), %rax
orq 0x78(%rsp), %rax
movq %rax, 0x58(%rsp)
xorl %r15d, %r15d
movq 0x10(%r12), %rax
movl %r15d, %ecx
shrl $0x4, %ecx
movl (%rax,%rcx,4), %eax
leal (%r15,%r15), %ecx
shrl %cl, %eax
testb $0x3, %al
jne 0x19436
movq 0x18(%r12), %rcx
movl %r15d, %eax
movl (%rcx,%rax,4), %edx
xorl %ecx, %ecx
testq %rdx, %rdx
je 0x1930c
movl %edx, %esi
incl %ecx
decl %esi
movl %esi, %edi
sarl $0x3, %edi
cmpl $0x7, %esi
movl %edi, %esi
ja 0x192fc
cmpl %r11d, %ecx
jg 0x19436
leal (%rcx,%rcx,2), %ecx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
shll %cl, %esi
notl %esi
movslq %ecx, %rdi
movq 0x80(%rsp), %rcx
subq %rdi, %rcx
movq %r10, %rdi
shrq %cl, %rdi
movl $0x92492493, %r8d       # imm = 0x92492493
imulq %r8, %rsi
shrq $0x22, %rsi
addq %rsi, %rdi
cmpq %rdx, %rdi
ja 0x19436
movq 0x68(%rsp), %rdi
sarq %cl, %rdi
addq %rsi, %rdi
cmpq %rdx, %rdi
jl 0x19436
movq 0x20(%r12), %r14
leaq (%rax,%rax,2), %rcx
movslq 0x4(%r14,%rcx,8), %rax
testq %rax, %rax
je 0x19436
movq %rcx, 0x28(%rsp)
movq %r10, %rbx
movq 0x8(%rsp), %rbp
movq 0x60(%rbp), %rdi
movslq 0x8(%rbp), %rcx
addq %rax, %rcx
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x4840
testq %rax, %rax
je 0x19597
movq 0x28(%rsp), %rcx
leaq (%r14,%rcx,8), %rdx
movq %rax, 0x60(%rbp)
movslq 0x4(%rdx), %rcx
testq %rcx, %rcx
movq 0x18(%rsp), %rbp
movq %rbx, %r10
movq 0x30(%rsp), %r11
jle 0x19436
movq 0x10(%rdx), %rdx
shlq $0x4, %rcx
xorl %esi, %esi
movq 0x8(%rdx,%rsi), %rdi
cmpq %r13, %rdi
jbe 0x1942d
movq (%rdx,%rsi), %r8
cmpq 0x40(%rsp), %r8
jae 0x1942d
cmpq %r13, %r8
cmovbeq %r13, %r8
movq 0x8(%rsp), %r11
movslq 0x8(%r11), %r9
leaq (%r9,%r9,2), %r10
movq %r8, (%rax,%r10,8)
movq 0x40(%rsp), %r8
cmpq %r8, %rdi
cmovaeq %r8, %rdi
movq %rdi, 0x8(%rax,%r10,8)
movq 0x58(%rsp), %rdi
movq %rdi, 0x10(%rax,%r10,8)
movq %rbx, %r10
leal 0x1(%r9), %edi
movl %edi, 0x8(%r11)
movq 0x30(%rsp), %r11
addq $0x10, %rsi
cmpq %rsi, %rcx
jne 0x193d5
incl %r15d
cmpl (%r12), %r15d
jne 0x192cc
movq 0x8(%rsp), %rsi
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movq 0x60(%rsp), %r15
jmp 0x1945a
movq 0x8(%rsp), %rsi
movl 0x8(%rsi), %eax
movl %eax, %ecx
subl %r15d, %ecx
cmpl $0x2, %ecx
jl 0x19522
movl %ecx, %edi
movslq %r15d, %rax
movq %rsi, %rbx
leaq (%rax,%rax,2), %rsi
shlq $0x3, %rsi
addq 0x60(%rbx), %rsi
callq 0x18565
leal 0x1(%r15), %eax
movl 0x8(%rbx), %esi
cmpl %esi, %eax
jge 0x1951a
movslq %eax, %rcx
leaq (,%rcx,8), %rax
leaq (%rax,%rax,2), %rdx
movl %r15d, %eax
movq 0x8(%rsp), %rdi
movq 0x60(%rdi), %rdi
movslq %eax, %r8
leaq (%r8,%r8,2), %r8
movq 0x8(%rdi,%r8,8), %r9
cmpq (%rdi,%rdx), %r9
jae 0x194f1
leal 0x1(%rax), %r8d
cmpl %r15d, %eax
jge 0x194ec
leaq (%rdi,%rdx), %rax
movslq %r8d, %rsi
leaq (%rsi,%rsi,2), %rsi
movq 0x10(%rax), %r9
movq %r9, 0x10(%rdi,%rsi,8)
movups (%rax), %xmm0
movups %xmm0, (%rdi,%rsi,8)
movq 0x8(%rsp), %rax
movl 0x8(%rax), %esi
movl %r8d, %eax
jmp 0x19506
movq 0x8(%rdi,%rdx), %r10
cmpq %r10, %r9
jae 0x19506
leaq (%rdi,%r8,8), %rdi
addq $0x8, %rdi
movq %r10, (%rdi)
incq %rcx
movslq %esi, %rdi
incl %r15d
addq $0x18, %rdx
cmpq %rdi, %rcx
jl 0x194a5
incl %eax
movq 0x8(%rsp), %rsi
movl %eax, 0x8(%rsi)
testl %eax, %eax
js 0x195c3
movq 0x98(%rsp), %rax
movl 0x14(%rax), %eax
movq 0x78(%rsp), %rdx
incq %rdx
movl %eax, %ecx
cmpq %rcx, %rdx
jb 0x18caa
movl 0x10(%rsi), %ebp
movq 0x10(%rsp), %rdi
movq 0x50(%rsp), %rcx
incq %rcx
movslq %ebp, %rax
cmpq %rax, %rcx
jl 0x18af8
movslq 0x8(%rsi), %rdi
cmpq $0x2, %rdi
jl 0x19584
movq 0x8(%rsp), %rax
movq 0x60(%rax), %rsi
callq 0x18565
movq 0x8(%rsp), %rsi
movl 0x8(%rsi), %edi
xorl %r14d, %r14d
testl %edi, %edi
jne 0x195c3
movl (%rsi), %ecx
testb $0x8, %cl
jne 0x195c3
orl $0x2, %ecx
jmp 0x195be
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0x195c3
movl (%rsi), %ecx
jmp 0x195a8
movl (%rsi), %ecx
orl $0x2, %ecx
movq %rax, 0x50(%rsi)
movl $0x0, 0x10(%rsi)
movq $0x0, 0x28(%rsi)
orl $0x1, %ecx
movl %ecx, (%rsi)
xorl %r14d, %r14d
movl %r14d, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq