// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf_hrec_check
static int bcf_hrec_check(bcf_hrec_t *hrec)
{
    int i;
    bcf_hrec_set_type(hrec);

    if ( hrec->type==BCF_HL_CTG )
    {
        i = bcf_hrec_find_key(hrec,"ID");
        if ( i<0 ) goto err_missing_id;
        char *val = hrec->vals[i];
        if ( val[0]=='*' || val[0]=='=' || !valid_ctg[(uint8_t)val[0]] ) goto err_invalid_ctg;
        while ( *(++val) )
            if ( !valid_ctg[(uint8_t)*val] ) goto err_invalid_ctg;
        return 0;
    }
    if ( hrec->type==BCF_HL_INFO )
    {
        i = bcf_hrec_find_key(hrec,"ID");
        if ( i<0 ) goto err_missing_id;
        char *val = hrec->vals[i];
        if ( !strcmp(val,"1000G") ) return 0;
        if ( val[0]=='.' || (val[0]>='0' && val[0]<='9') || !valid_tag[(uint8_t)val[0]] ) goto err_invalid_tag;
        while ( *(++val) )
            if ( !valid_tag[(uint8_t)*val] ) goto err_invalid_tag;
        return 0;
    }
    if ( hrec->type==BCF_HL_FMT )
    {
        i = bcf_hrec_find_key(hrec,"ID");
        if ( i<0 ) goto err_missing_id;
        char *val = hrec->vals[i];
        if ( val[0]=='.' || (val[0]>='0' && val[0]<='9') || !valid_tag[(uint8_t)val[0]] ) goto err_invalid_tag;
        while ( *(++val) )
            if ( !valid_tag[(uint8_t)*val] ) goto err_invalid_tag;
        return 0;
    }
    return 0;

  err_missing_id:
    hts_log_warning("Missing ID attribute in one or more header lines");
    return -1;

  err_invalid_ctg:
    hts_log_warning("Invalid contig name: \"%s\"", hrec->vals[i]);
    return -1;

  err_invalid_tag:
    hts_log_warning("Invalid tag name: \"%s\"", hrec->vals[i]);
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x51c30
movq -0x10(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x3d1e7
movq -0x10(%rbp), %rdi
leaq 0xc8e4b(%rip), %rsi     # 0x105f98
callq 0x3bb40
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x3d160
jmp 0x3d38d
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2a, %eax
je 0x3d1a2
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
je 0x3d1a2
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0xca054(%rip), %rax     # 0x1071f0
cmpb $0x0, (%rax,%rcx)
jne 0x3d1a7
jmp 0x3d3b0
jmp 0x3d1a9
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
cmpb $0x0, 0x1(%rax)
je 0x3d1db
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0xca022(%rip), %rax     # 0x1071f0
cmpb $0x0, (%rax,%rcx)
jne 0x3d1d9
jmp 0x3d3b0
jmp 0x3d1a9
movl $0x0, -0x4(%rbp)
jmp 0x3d414
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x3d2c6
movq -0x10(%rbp), %rdi
leaq 0xc8d99(%rip), %rsi     # 0x105f98
callq 0x3bb40
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x3d212
jmp 0x3d38d
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
leaq 0xcb38f(%rip), %rsi     # 0x1085c0
callq 0x46b0
cmpl $0x0, %eax
jne 0x3d247
movl $0x0, -0x4(%rbp)
jmp 0x3d414
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
je 0x3d281
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jl 0x3d26b
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
jle 0x3d281
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0xca075(%rip), %rax     # 0x1072f0
cmpb $0x0, (%rax,%rcx)
jne 0x3d286
jmp 0x3d3e3
jmp 0x3d288
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
cmpb $0x0, 0x1(%rax)
je 0x3d2ba
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0xca043(%rip), %rax     # 0x1072f0
cmpb $0x0, (%rax,%rcx)
jne 0x3d2b8
jmp 0x3d3e3
jmp 0x3d288
movl $0x0, -0x4(%rbp)
jmp 0x3d414
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x3d381
movq -0x10(%rbp), %rdi
leaq 0xc8cba(%rip), %rsi     # 0x105f98
callq 0x3bb40
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x3d2f1
jmp 0x3d38d
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
je 0x3d33f
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jl 0x3d329
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
jle 0x3d33f
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0xc9fb7(%rip), %rax     # 0x1072f0
cmpb $0x0, (%rax,%rcx)
jne 0x3d344
jmp 0x3d3e3
jmp 0x3d346
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
cmpb $0x0, 0x1(%rax)
je 0x3d375
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0xc9f85(%rip), %rax     # 0x1072f0
cmpb $0x0, (%rax,%rcx)
jne 0x3d373
jmp 0x3d3e3
jmp 0x3d346
movl $0x0, -0x4(%rbp)
jmp 0x3d414
movl $0x0, -0x4(%rbp)
jmp 0x3d414
movl $0x3, %edi
leaq 0xcb22d(%rip), %rsi     # 0x1085c6
leaq 0xcb235(%rip), %rdx     # 0x1085d5
movb $0x0, %al
callq 0x9d90
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3d414
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movl $0x3, %edi
leaq 0xcb1fa(%rip), %rsi     # 0x1085c6
leaq 0xcb233(%rip), %rdx     # 0x108606
movb $0x0, %al
callq 0x9d90
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3d414
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movl $0x3, %edi
leaq 0xcb1c7(%rip), %rsi     # 0x1085c6
leaq 0xcb21a(%rip), %rdx     # 0x108620
movb $0x0, %al
callq 0x9d90
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)