// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf_hdr_parse_sample_line
int HTS_RESULT_USED bcf_hdr_parse_sample_line(bcf_hdr_t *hdr, const char *str)
{
    const char *mandatory = "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO";
    if ( strncmp(str,mandatory,strlen(mandatory)) )
    {
        hts_log_error("Could not parse the \"#CHROM..\" line, either the fields are incorrect or spaces are present instead of tabs:\n\t%s",str);
        return -1;
    }

    const char *beg = str + strlen(mandatory), *end;
    if ( !*beg || *beg=='\n' ) return 0;
    if ( strncmp(beg,"\tFORMAT\t",8) )
    {
        hts_log_error("Could not parse the \"#CHROM..\" line, either FORMAT is missing or spaces are present instead of tabs:\n\t%s",str);
        return -1;
    }
    beg += 8;

    int ret = 0;
    while ( *beg )
    {
        end = beg;
        while ( *end && *end!='\t' && *end!='\n' ) end++;
        if ( bcf_hdr_add_sample_len(hdr, beg, end-beg) < 0 ) ret = -1;
        if ( !*end || *end=='\n' || ret<0 ) break;
        beg = end + 1;
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq 0xcc849(%rip), %rax     # 0x1074e0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
callq 0x41a0
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq %rax, %rdx
callq 0x41f0
cmpl $0x0, %eax
je 0x3acf3
movq -0x18(%rbp), %rcx
movl $0x1, %edi
leaq 0xcc82e(%rip), %rsi     # 0x107507
leaq 0xcc841(%rip), %rdx     # 0x107521
movb $0x0, %al
callq 0x9d90
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3ae40
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rdi
callq 0x41a0
movq %rax, %rcx
movq -0x50(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpb $0x0, (%rax)
je 0x3ad27
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0x3ad33
movl $0x0, -0x4(%rbp)
jmp 0x3ae40
movq -0x28(%rbp), %rdi
leaq 0xcc853(%rip), %rsi     # 0x107591
movl $0x8, %edx
callq 0x41f0
cmpl $0x0, %eax
je 0x3ad77
movq -0x18(%rbp), %rcx
movl $0x1, %edi
leaq 0xcc7aa(%rip), %rsi     # 0x107507
leaq 0xcc836(%rip), %rdx     # 0x10759a
movb $0x0, %al
callq 0x9d90
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3ae40
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x28(%rbp), %rax
cmpb $0x0, (%rax)
je 0x3ae3a
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x51(%rbp)
je 0x3add1
movq -0x30(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x9, %ecx
movb %al, -0x51(%rbp)
je 0x3add1
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
setne %al
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0x3adda
jmp 0x3ade8
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x3ad9f
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %rax
subq %rax, %rdx
callq 0x3aa50
cmpl $0x0, %eax
jge 0x3ae0c
movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF
movq -0x30(%rbp), %rax
cmpb $0x0, (%rax)
je 0x3ae27
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
je 0x3ae27
cmpl $0x0, -0x34(%rbp)
jge 0x3ae29
jmp 0x3ae3a
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x3ad8a
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)