// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/hts.c
// Function: parse_tabbed_text
static int
parse_tabbed_text(char *columns, int column_len,
                  const unsigned char *u, const unsigned char *ulim,
                  int *complete)
{
    const char *str  = (const char *) u;
    const char *slim = (const char *) ulim;
    const char *s;
    int ncolumns = 0;

    enum { digit = 1, leading_sign = 2, cigar_operator = 4, other = 8 };
    unsigned seen = 0;
    *complete = 0;

    for (s = str; s < slim; s++)
        if (*s >= ' ') {
            if (isdigit_c(*s))
                seen |= digit;
            else if ((*s == '+' || *s == '-') && s == str)
                seen |= leading_sign;
            else if (strchr(BAM_CIGAR_STR, *s) && s > str && isdigit_c(s[-1]))
                seen |= cigar_operator;
            else
                seen |= other;
        }
        else if (*s == '\t' || *s == '\r' || *s == '\n') {
            size_t len = s - str;
            char type;

            if (seen == digit || seen == (leading_sign|digit)) type = 'i';
            else if (seen == (digit|cigar_operator)) type = 'C';
            else if (len == 1)
                switch (str[0]) {
                case '*': type = 'C'; break;
                case '+': case '-': case '.': type = 's'; break;
                default: type = 'Z'; break;
                }
            else if (len >= 5 && str[2] == ':' && str[4] == ':') type = 'O';
            else type = 'Z';

            columns[ncolumns++] = type;
            if (*s != '\t' || ncolumns >= column_len - 1) {
                *complete = 1; // finished the line or more columns than needed
                break;
            }

            str = s + 1;
            seen = 0;
        }
        else return -1;

    columns[ncolumns] = '\0';
    return ncolumns;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x4c(%rbp)
movl $0x0, -0x50(%rbp)
movq -0x30(%rbp), %rax
movl $0x0, (%rax)
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x19acb
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jl 0x19994
movq -0x48(%rbp), %rax
movsbl (%rax), %edi
callq 0x23470
cmpl $0x0, %eax
je 0x19915
movl -0x50(%rbp), %eax
orl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x1998f
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
je 0x1992d
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x19942
movq -0x48(%rbp), %rax
cmpq -0x38(%rbp), %rax
jne 0x19942
movl -0x50(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x50(%rbp)
jmp 0x1998d
movq -0x48(%rbp), %rax
movsbl (%rax), %esi
leaq 0xd730e(%rip), %rdi     # 0xf0c5e
callq 0x4170
cmpq $0x0, %rax
je 0x19982
movq -0x48(%rbp), %rax
cmpq -0x38(%rbp), %rax
jbe 0x19982
movq -0x48(%rbp), %rax
movsbl -0x1(%rax), %edi
callq 0x23470
cmpl $0x0, %eax
je 0x19982
movl -0x50(%rbp), %eax
orl $0x4, %eax
movl %eax, -0x50(%rbp)
jmp 0x1998b
movl -0x50(%rbp), %eax
orl $0x8, %eax
movl %eax, -0x50(%rbp)
jmp 0x1998d
jmp 0x1998f
jmp 0x19ab8
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
je 0x199bc
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xd, %eax
je 0x199bc
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0x19aad
movq -0x48(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x58(%rbp)
cmpl $0x1, -0x50(%rbp)
je 0x199d7
cmpl $0x3, -0x50(%rbp)
jne 0x199dd
movb $0x69, -0x59(%rbp)
jmp 0x19a5b
cmpl $0x5, -0x50(%rbp)
jne 0x199e9
movb $0x43, -0x59(%rbp)
jmp 0x19a59
cmpq $0x1, -0x58(%rbp)
jne 0x19a2a
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x60(%rbp)
subl $0x2a, %eax
je 0x19a18
jmp 0x19a01
movl -0x60(%rbp), %eax
subl $0x2b, %eax
je 0x19a1e
jmp 0x19a0b
movl -0x60(%rbp), %eax
addl $-0x2d, %eax
subl $0x2, %eax
jb 0x19a1e
jmp 0x19a24
movb $0x43, -0x59(%rbp)
jmp 0x19a28
movb $0x73, -0x59(%rbp)
jmp 0x19a28
movb $0x5a, -0x59(%rbp)
jmp 0x19a57
cmpq $0x5, -0x58(%rbp)
jb 0x19a51
movq -0x38(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x3a, %eax
jne 0x19a51
movq -0x38(%rbp), %rax
movsbl 0x4(%rax), %eax
cmpl $0x3a, %eax
jne 0x19a51
movb $0x4f, -0x59(%rbp)
jmp 0x19a55
movb $0x5a, -0x59(%rbp)
jmp 0x19a57
jmp 0x19a59
jmp 0x19a5b
movb -0x59(%rbp), %dl
movq -0x10(%rbp), %rax
movl -0x4c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x4c(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
jne 0x19a8c
movl -0x4c(%rbp), %eax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jl 0x19a98
movq -0x30(%rbp), %rax
movl $0x1, (%rax)
jmp 0x19acb
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x50(%rbp)
jmp 0x19ab6
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x19add
jmp 0x19ab8
jmp 0x19aba
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x198db
movq -0x10(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x4c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)