// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x20(%rbp), %rcx
callq 0xf08e0
cmpl $0x0, %eax
jne 0xf17fa
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movsbl (%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
cmpl $0x3, %eax
jne 0xf1782
movq -0x20(%rbp), %rax
movl $0x0, 0x20(%rax)
jmp 0xf179f
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
movl -0x24(%rbp), %edx
callq 0xf0790
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x28(%rbp), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x20(%rax)
jge 0xf17c4
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0xf18cd
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, (%rcx)
movb %al, -0x31(%rbp)
jl 0xf17e2
movq -0x20(%rbp), %rax
cmpq $0x0, 0x8(%rax)
setge %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %dl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0xf18cd
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x38(%rbp)
subl $0x1, %eax
je 0xf1833
jmp 0xf1813
movl -0x38(%rbp), %eax
subl $0x2, %eax
je 0xf1840
jmp 0xf181d
movl -0x38(%rbp), %eax
subl $0x3, %eax
je 0xf184d
jmp 0xf1827
movl -0x38(%rbp), %eax
subl $0x10000, %eax          # imm = 0x10000
je 0xf185a
jmp 0xf1867
leaq 0x1daf4(%rip), %rax     # 0x10f32e
movq %rax, -0x30(%rbp)
jmp 0xf1872
leaq 0x1daef(%rip), %rax     # 0x10f336
movq %rax, -0x30(%rbp)
jmp 0xf1872
leaq 0x1daea(%rip), %rax     # 0x10f33e
movq %rax, -0x30(%rbp)
jmp 0xf1872
leaq 0x1dae5(%rip), %rax     # 0x10f346
movq %rax, -0x30(%rbp)
jmp 0xf1872
leaq 0x1dae1(%rip), %rax     # 0x10f34f
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0xcaf0
cmpl $0x0, %eax
je 0xf18a0
movq -0x30(%rbp), %rcx
movl $0x1, %edi
leaq 0x1dacb(%rip), %rsi     # 0x10f35b
leaq 0x1dacd(%rip), %rdx     # 0x10f364
movb $0x0, %al
callq 0x9d90
jmp 0xf18c6
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %r8
movl $0x1, %edi
leaq 0x1daa3(%rip), %rsi     # 0x10f35b
leaq 0x1dae8(%rip), %rdx     # 0x10f3a7
movb $0x0, %al
callq 0x9d90
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)