// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf_hdr_destroy
void bcf_hdr_destroy(bcf_hdr_t *h)
{
    int i;
    khint_t k;
    if (!h) return;
    for (i = 0; i < 3; ++i) {
        vdict_t *d = (vdict_t*)h->dict[i];
        if (d == 0) continue;
        for (k = kh_begin(d); k != kh_end(d); ++k)
            if (kh_exist(d, k)) free((char*)kh_key(d, k));
        if ( i==0 )
        {
            bcf_hdr_aux_t *aux = get_hdr_aux(h);
            for (k=kh_begin(aux->gen); k<kh_end(aux->gen); k++)
                if ( kh_exist(aux->gen,k) ) free((char*)kh_key(aux->gen,k));
            kh_destroy(hdict, aux->gen);
            free(aux->key_len); // may exist for dict[0] only
        }
        kh_destroy(vdict, d);
        free(h->id[i]);
    }
    for (i=0; i<h->nhrec; i++)
        bcf_hrec_destroy(h->hrec[i]);
    if (h->nhrec) free(h->hrec);
    if (h->samples) free(h->samples);
    free(h->keep_samples);
    free(h->transl[0]); free(h->transl[1]);
    free(h->mem.s);
    free(h);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x3fd68
jmp 0x3ff4e
movl $0x0, -0xc(%rbp)
cmpl $0x3, -0xc(%rbp)
jge 0x3feac
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x28(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x3fd96
jmp 0x3fe9e
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
je 0x3fdee
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x10(%rbp), %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x10(%rbp), %ecx
andl $0xf, %ecx
shll %ecx
shrl %cl, %eax
andl $0x3, %eax
cmpl $0x0, %eax
jne 0x3fde1
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x10(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x45a0
jmp 0x3fde3
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x3fd9d
cmpl $0x0, -0xc(%rbp)
jne 0x3fe83
movq -0x8(%rbp), %rdi
callq 0x3b020
movq %rax, -0x20(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x20(%rbp), %rcx
movq 0x28(%rcx), %rcx
cmpl (%rcx), %eax
jae 0x3fe69
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x10(%rax), %rax
movl -0x10(%rbp), %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x10(%rbp), %ecx
andl $0xf, %ecx
shll %ecx
shrl %cl, %eax
andl $0x3, %eax
cmpl $0x0, %eax
jne 0x3fe5c
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x18(%rax), %rax
movl -0x10(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x45a0
jmp 0x3fe5e
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x3fe0c
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x3ff60
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x45a0
movq -0x18(%rbp), %rdi
callq 0x3fd00
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x10(%rax,%rcx,8), %rdi
callq 0x45a0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3fd6f
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x50(%rcx), %eax
jge 0x3fedf
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x3b040
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3feb3
movq -0x8(%rbp), %rax
cmpl $0x0, 0x50(%rax)
je 0x3fef6
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x3ff0e
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rdi
callq 0x45a0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)