// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x1d0(%rdi), %rdi
callq 0x45d0
movq 0x168(%rbx), %r14
testq %r14, %r14
je 0x93cba
cmpl $0x0, (%r14)
je 0x93c97
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x10(%r14), %rax
movl %r12d, %ecx
shrl $0x4, %ecx
movl (%rax,%rcx,4), %eax
movl %r15d, %ecx
andb $0x1e, %cl
shrl %cl, %eax
testb $0x3, %al
jne 0x93c88
movq 0x18(%r14), %rax
movq (%rax,%r12,8), %rdi
callq 0x45d0
incq %r12
movl (%r14), %eax
addl $0x2, %r15d
cmpq %rax, %r12
jb 0x93c62
movq 0x18(%r14), %rdi
callq 0x45d0
movq 0x10(%r14), %rdi
callq 0x45d0
movq 0x20(%r14), %rdi
callq 0x45d0
movq %r14, %rdi
callq 0x45d0
movq 0x160(%rbx), %r14
testq %r14, %r14
je 0x93d2a
cmpl $0x0, (%r14)
je 0x93d07
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x10(%r14), %rax
movl %r12d, %ecx
shrl $0x4, %ecx
movl (%rax,%rcx,4), %eax
movl %r15d, %ecx
andb $0x1e, %cl
shrl %cl, %eax
testb $0x3, %al
jne 0x93cf8
movq 0x18(%r14), %rax
movq (%rax,%r12,8), %rdi
callq 0x45d0
incq %r12
movl (%r14), %eax
addl $0x2, %r15d
cmpq %rax, %r12
jb 0x93cd2
movq 0x18(%r14), %rdi
callq 0x45d0
movq 0x10(%r14), %rdi
callq 0x45d0
movq 0x20(%r14), %rdi
callq 0x45d0
movq %r14, %rdi
callq 0x45d0
cmpl $0x0, 0x1b8(%rbx)
jle 0x93d5f
movl $0x8, %r14d
xorl %r15d, %r15d
movq 0x150(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x45d0
incq %r15
movslq 0x1b8(%rbx), %rax
addq $0x10, %r14
cmpq %rax, %r15
jl 0x93d3c
movq 0x150(%rbx), %rdi
callq 0x45d0
cmpl $0x0, 0x104(%rbx)
jle 0x93dd0
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x108(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x45d0
movq 0x108(%rbx), %rax
movq 0x18(%rax,%r14), %rdi
callq 0x45d0
movq 0x108(%rbx), %rax
movq 0x20(%rax,%r14), %rdi
callq 0x45d0
movq 0x108(%rbx), %rax
movq 0x28(%rax,%r14), %rdi
callq 0x45d0
incq %r15
movslq 0x104(%rbx), %rax
addq $0x30, %r14
cmpq %rax, %r15
jl 0x93d7a
movq 0x108(%rbx), %rdi
callq 0x45d0
cmpl $0x0, 0x12c(%rbx)
jle 0x93e11
movl $0x10, %r14d
xorl %r15d, %r15d
movq 0x140(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x45d0
incq %r15
movslq 0x12c(%rbx), %rax
addq $0x20, %r14
cmpq %rax, %r15
jl 0x93dee
movq 0x140(%rbx), %rdi
callq 0x45d0
cmpl $0x0, 0x114(%rbx)
jle 0x93e61
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x148(%rbx), %rax
movq 0x18(%rax,%r14), %rdi
callq 0x45d0
movq 0x148(%rbx), %rax
movq 0x8(%rax,%r14), %rdi
callq 0x45d0
incq %r15
movslq 0x114(%rbx), %rax
addq $0x20, %r14
cmpq %rax, %r15
jl 0x93e2c
movq 0x148(%rbx), %rdi
callq 0x45d0
movq 0x180(%rbx), %rdi
callq 0x45d0
movq 0x190(%rbx), %rdi
callq 0x45d0
movq 0x1a0(%rbx), %rdi
callq 0x45d0
movq 0x138(%rbx), %rdi
callq 0x45d0
movq 0x120(%rbx), %rdi
callq 0x45d0
movl $0x1d8, %edx            # imm = 0x1D8
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4250