// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/tbx.c
// Function: get_intv
static inline int get_intv(tbx_t *tbx, kstring_t *str, tbx_intv_t *intv, int is_add)
{
    if (tbx_parse1(&tbx->conf, str->l, str->s, intv) == 0) {
        int c = *intv->se;
        *intv->se = '\0';
        if ((tbx->conf.preset&0xffff) == TBX_GAF){
            intv->tid = 0;
        } else {
            intv->tid = get_tid(tbx, intv->ss, is_add);
        }
        *intv->se = c;
        if (intv->tid < 0) return -2;  // get_tid out of memory
        return (intv->beg >= 0 && intv->end >= 0)? 0 : -1;
    } else {
        char *type = NULL;
        switch (tbx->conf.preset&0xffff)
        {
            case TBX_SAM: type = "TBX_SAM"; break;
            case TBX_VCF: type = "TBX_VCF"; break;
            case TBX_GAF: type = "TBX_GAF"; break;
            case TBX_UCSC: type = "TBX_UCSC"; break;
            default: type = "TBX_GENERIC"; break;
        }
        if (hts_is_utf16_text(str))
            hts_log_error("Failed to parse %s: offending line appears to be encoded as UTF-16", type);
        else
            hts_log_error("Failed to parse %s: was wrong -p [type] used?\nThe offending line was: \"%s\"",
                type, str->s);
        return -1;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
movq (%rsi), %rsi
movq 0x10(%r14), %rdx
movq %rbx, %rcx
callq 0x9ac3a
testl %eax, %eax
je 0x9b5dc
movl (%r12), %eax
decl %eax
cmpw $0x2, %ax
ja 0x9b671
movzwl %ax, %eax
leaq 0x1be50(%rip), %rcx     # 0xb7420
movslq (%rcx,%rax,4), %rbx
addq %rcx, %rbx
jmp 0x9b678
movq 0x18(%rbx), %rax
movb (%rax), %r13b
movb $0x0, (%rax)
xorl %eax, %eax
cmpw $0x3, (%r12)
je 0x9b6f7
movq 0x10(%rbx), %r15
movq 0x20(%r12), %r14
testq %r14, %r14
jne 0x9b618
callq 0x6408
movq %rax, %r14
movq %rax, 0x20(%r12)
testq %rax, %rax
je 0x9b6f2
testl %ebp, %ebp
je 0x9b6c6
leaq 0x4(%rsp), %r12
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x680c
cmpl $0x0, (%r12)
js 0x9b6f2
movl %eax, %ebp
je 0x9b6d3
movq %r15, %rdi
callq 0x4930
testq %rax, %rax
je 0x9b6e8
movq 0x18(%r14), %rcx
movl %ebp, %edx
movq %rax, (%rcx,%rdx,8)
movl 0x4(%r14), %eax
decl %eax
movq 0x20(%r14), %rcx
movq %rax, (%rcx,%rdx,8)
jmp 0x9b6d3
leaq 0x1bee2(%rip), %rbx     # 0xb755a
movq %r14, %rdi
callq 0xac97
testl %eax, %eax
je 0x9b6a3
leaq 0x1bedb(%rip), %rsi     # 0xb7566
leaq 0x1bedd(%rip), %rdx     # 0xb756f
movl $0x1, %edi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x942d
jmp 0x9b717
movq 0x10(%r14), %r8
leaq 0x1beb8(%rip), %rsi     # 0xb7566
leaq 0x1befd(%rip), %rdx     # 0xb75b2
movl $0x1, %edi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x942d
jmp 0x9b717
movq %r14, %rdi
movq %r15, %rsi
callq 0x6480
movl %eax, %ebp
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl (%r14), %ebp
je 0x9b6f7
movq 0x20(%r14), %rax
movl %ebp, %ecx
movl (%rax,%rcx,8), %eax
jmp 0x9b6f7
movq %r14, %rdi
movl %ebp, %esi
callq 0x6a1e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x20(%rbx)
movq 0x18(%rbx), %rax
movb %r13b, (%rax)
cmpl $0x0, 0x20(%rbx)
js 0x9b72b
cmpq $0x0, (%rbx)
js 0x9b717
movq 0x8(%rbx), %rax
sarq $0x3f, %rax
jmp 0x9b71c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0x9b71c