// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/hts.c
// Function: reg2intervals_wide
static inline int reg2intervals_wide(hts_itr_t *iter, const bidx_t *bidx,
                                       int tid, int64_t beg, int64_t end,
                                       uint32_t interval,
                                       uint64_t min_off, uint64_t max_off,
                                       int min_shift, int n_lvls)
{
    khint_t i;
    hts_pos_t max_shift = 3 * n_lvls + min_shift;
    --end;
    if (beg < 0) beg = 0;
    for (i = kh_begin(bidx); i != kh_end(bidx); i++) {
        if (!kh_exist(bidx, i)) continue;
        hts_pos_t bin = (hts_pos_t) kh_key(bidx, i);
        int level = hts_bin_level(bin);
        if (level > n_lvls) continue; // Dodgy index?
        hts_pos_t first = hts_bin_first(level);
        hts_pos_t beg_at_level = first + (beg >> (max_shift - 3 * level));
        hts_pos_t end_at_level = first + (end >> (max_shift - 3 * level));
        if (beg_at_level <= bin && bin <= end_at_level) {
            bins_t *bin = &kh_value(bidx, i);
            int res = add_to_interval(iter, bin, tid, interval, min_off, max_off);
            if (res < 0)
                return res;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl 0x28(%rbp), %eax
movl 0x20(%rbp), %eax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
imull $0x3, 0x28(%rbp), %eax
addl 0x20(%rbp), %eax
cltq
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
jge 0x28df8
movq $0x0, -0x28(%rbp)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
je 0x28f33
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x38(%rbp), %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x38(%rbp), %ecx
andl $0xf, %ecx
shll %ecx
shrl %cl, %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x28e38
jmp 0x28f25
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x38(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movl %eax, %edi
callq 0x27950
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl 0x28(%rbp), %eax
jle 0x28e65
jmp 0x28f25
movl -0x4c(%rbp), %ecx
shll %ecx
addl -0x4c(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl $0x7, %ecx
cltd
idivl %ecx
cltq
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x28(%rbp), %rdx
movq -0x40(%rbp), %rcx
imull $0x3, -0x4c(%rbp), %esi
movslq %esi, %rsi
subq %rsi, %rcx
sarq %cl, %rdx
movq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq -0x30(%rbp), %rdx
movq -0x40(%rbp), %rcx
imull $0x3, -0x4c(%rbp), %esi
movslq %esi, %rsi
subq %rsi, %rcx
sarq %cl, %rdx
movq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x48(%rbp), %rax
jg 0x28f23
movq -0x48(%rbp), %rax
cmpq -0x68(%rbp), %rax
jg 0x28f23
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rdi
movq -0x70(%rbp), %rsi
movl -0x1c(%rbp), %edx
movl -0x34(%rbp), %ecx
movq 0x10(%rbp), %r8
movq 0x18(%rbp), %r9
callq 0x28f50
movl %eax, -0x74(%rbp)
cmpl $0x0, -0x74(%rbp)
jge 0x28f21
movl -0x74(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x28f3a
jmp 0x28f23
jmp 0x28f25
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x28dff
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)