// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/synced_bcf_reader.c
// Function: regions_parse_line
static int _regions_parse_line(char *line, int ichr, int ifrom, int ito, char **chr, char **chr_end, hts_pos_t *from, hts_pos_t *to)
{
    if (ifrom < 0 || ito < 0) return -1;
    *chr_end = NULL;

    if ( line[0]=='#' ) return 0;

    int k,l;    // index of the start and end column of the tab-delimited file
    if ( ifrom <= ito )
        k = ifrom, l = ito;
    else
        l = ifrom, k = ito;

    int i;
    char *se = line, *ss = NULL; // start and end
    char *tmp;
    for (i=0; i<=k && *se; i++)
    {
        ss = i==0 ? se++ : ++se;
        while (*se && *se!='\t') se++;
    }
    if ( i<=k ) return -1;
    if ( k==l )
    {
        *from = *to = hts_parse_decimal(ss, &tmp, 0);
        if ( tmp==ss || (*tmp && *tmp!='\t') ) return -1;
    }
    else
    {
        if ( k==ifrom )
            *from = hts_parse_decimal(ss, &tmp, 0);
        else
            *to = hts_parse_decimal(ss, &tmp, 0);
        if ( ss==tmp || (*tmp && *tmp!='\t') ) return -1;

        for (i=k; i<l && *se; i++)
        {
            ss = ++se;
            while (*se && *se!='\t') se++;
        }
        if ( i<l ) return -1;
        if ( k==ifrom )
            *to = hts_parse_decimal(ss, &tmp, 0);
        else
            *from = hts_parse_decimal(ss, &tmp, 0);
        if ( ss==tmp || (*tmp && *tmp!='\t') ) return -1;
    }

    ss = se = line;
    for (i=0; i<=ichr && *se; i++)
    {
        if ( i>0 ) ss = ++se;
        while (*se && *se!='\t') se++;
    }
    if ( i<=ichr ) return -1;
    *chr_end = se;
    *chr = ss;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
cmpl $0x0, -0x18(%rbp)
jl 0x3b231
cmpl $0x0, -0x1c(%rbp)
jge 0x3b23d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3b5db
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x3b260
movl $0x0, -0x4(%rbp)
jmp 0x3b5db
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jg 0x3b276
movl -0x18(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x3b282
movl -0x18(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %ecx
xorl %eax, %eax
cmpl -0x34(%rbp), %ecx
movb %al, -0x59(%rbp)
jg 0x3b2b6
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x3b2bf
jmp 0x3b33a
cmpl $0x0, -0x3c(%rbp)
jne 0x3b2da
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movq %rax, -0x68(%rbp)
jmp 0x3b2ea
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x69(%rbp)
je 0x3b313
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
setne %al
movb %al, -0x69(%rbp)
movb -0x69(%rbp), %al
testb $0x1, %al
jne 0x3b31c
jmp 0x3b32a
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x3b2f2
jmp 0x3b32c
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x3b299
movl -0x3c(%rbp), %eax
cmpl -0x34(%rbp), %eax
jg 0x3b34e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3b5db
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jne 0x3b3a9
movq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
xorl %edx, %edx
callq 0x127d0
movq %rax, %rcx
movq 0x18(%rbp), %rax
movq %rcx, (%rax)
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x58(%rbp), %rax
cmpq -0x50(%rbp), %rax
je 0x3b398
movq -0x58(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x3b3a4
movq -0x58(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
je 0x3b3a4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3b5db
jmp 0x3b514
movl -0x34(%rbp), %eax
cmpl -0x18(%rbp), %eax
jne 0x3b3cc
movq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
xorl %edx, %edx
callq 0x127d0
movq %rax, %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x3b3e5
movq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
xorl %edx, %edx
callq 0x127d0
movq %rax, %rcx
movq 0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
je 0x3b407
movq -0x58(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x3b413
movq -0x58(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
je 0x3b413
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3b5db
movl -0x34(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %ecx
xorl %eax, %eax
cmpl -0x38(%rbp), %ecx
movb %al, -0x6a(%rbp)
jge 0x3b436
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x6a(%rbp)
movb -0x6a(%rbp), %al
testb $0x1, %al
jne 0x3b43f
jmp 0x3b494
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x6b(%rbp)
je 0x3b470
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
setne %al
movb %al, -0x6b(%rbp)
movb -0x6b(%rbp), %al
testb $0x1, %al
jne 0x3b479
jmp 0x3b487
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x3b44f
jmp 0x3b489
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x3b419
movl -0x3c(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0x3b4a8
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3b5db
movl -0x34(%rbp), %eax
cmpl -0x18(%rbp), %eax
jne 0x3b4cb
movq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
xorl %edx, %edx
callq 0x127d0
movq %rax, %rcx
movq 0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x3b4e4
movq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
xorl %edx, %edx
callq 0x127d0
movq %rax, %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
je 0x3b506
movq -0x58(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x3b512
movq -0x58(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
je 0x3b512
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3b5db
jmp 0x3b514
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %rax, -0x50(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %ecx
xorl %eax, %eax
cmpl -0x14(%rbp), %ecx
movb %al, -0x6c(%rbp)
jg 0x3b544
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x6c(%rbp)
movb -0x6c(%rbp), %al
testb $0x1, %al
jne 0x3b54d
jmp 0x3b5ad
cmpl $0x0, -0x3c(%rbp)
jle 0x3b563
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq %rax, -0x50(%rbp)
jmp 0x3b565
movq -0x48(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x6d(%rbp)
je 0x3b586
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
setne %al
movb %al, -0x6d(%rbp)
movb -0x6d(%rbp), %al
testb $0x1, %al
jne 0x3b58f
jmp 0x3b59d
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x3b565
jmp 0x3b59f
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x3b527
movl -0x3c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jg 0x3b5be
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3b5db
movq -0x48(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x50(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)