// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/bcf_sr_sort.c
// Function: bcf_sr_sort_destroy
void bcf_sr_sort_destroy(sr_sort_t *srt)
{
    free(srt->active);
    if ( srt->var_str2int ) khash_str2int_destroy_free(srt->var_str2int);
    if ( srt->grp_str2int ) khash_str2int_destroy_free(srt->grp_str2int);
    int i;
    for (i=0; i<srt->nsr; i++) free(srt->vcf_buf[i].rec);
    free(srt->vcf_buf);
    for (i=0; i<srt->mvar; i++)
    {
        free(srt->var[i].str);
        free(srt->var[i].vcf);
        free(srt->var[i].rec);
        kbs_destroy(srt->var[i].mask);
    }
    free(srt->var);
    for (i=0; i<srt->mgrp; i++)
        free(srt->grp[i].var);
    free(srt->grp);
    for (i=0; i<srt->mvset; i++)
    {
        kbs_destroy(srt->vset[i].mask);
        free(srt->vset[i].var);
    }
    free(srt->vset);
    free(srt->str.s);
    free(srt->off);
    free(srt->charp);
    free(srt->cnt);
    free(srt->pmat);
    memset(srt,0,sizeof(*srt));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x1d0(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x168(%rax)
je 0xe122a
movq -0x8(%rbp), %rax
movq 0x168(%rax), %rdi
callq 0xe1470
movq -0x8(%rbp), %rax
cmpq $0x0, 0x160(%rax)
je 0xe1248
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rdi
callq 0xe1470
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1b8(%rcx), %eax
jge 0xe1288
movq -0x8(%rbp), %rax
movq 0x150(%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x45a0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xe124f
movq -0x8(%rbp), %rax
movq 0x150(%rax), %rdi
callq 0x45a0
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x104(%rcx), %eax
jge 0xe133b
movq -0x8(%rbp), %rax
movq 0x108(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
movq 0x108(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
movq 0x108(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
movq 0x108(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x28(%rax), %rdi
callq 0xe1500
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xe129f
movq -0x8(%rbp), %rax
movq 0x108(%rax), %rdi
callq 0x45a0
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x12c(%rcx), %eax
jge 0xe138b
movq -0x8(%rbp), %rax
movq 0x140(%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
callq 0x45a0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xe1352
movq -0x8(%rbp), %rax
movq 0x140(%rax), %rdi
callq 0x45a0
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x114(%rcx), %eax
jge 0xe13fa
movq -0x8(%rbp), %rax
movq 0x148(%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rdi
callq 0xe1500
movq -0x8(%rbp), %rax
movq 0x148(%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x45a0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xe13a2
movq -0x8(%rbp), %rax
movq 0x148(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
movq 0x180(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
movq 0x190(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
movq 0x1a0(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
movq 0x138(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
movq 0x120(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x1d8, %edx            # imm = 0x1D8
callq 0x4240
addq $0x10, %rsp
popq %rbp
retq