// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_io.c
// Function: cram_free_slice
void cram_free_slice(cram_slice *s) {
    if (!s)
        return;

    if (s->hdr_block)
        cram_free_block(s->hdr_block);

    if (s->block) {
        int i;

        if (s->hdr) {
            for (i = 0; i < s->hdr->num_blocks; i++) {
                if (i > 0 && s->block[i] == s->block[0])
                    continue;
                cram_free_block(s->block[i]);
            }
        }
        free(s->block);
    }

    {
        // Normally already copied into s->block[], but potentially still
        // here if we error part way through cram_encode_slice.
        int i;
        for (i = 0; i < s->naux_block; i++)
            cram_free_block(s->aux_block[i]);
    }

    if (s->block_by_id)
        free(s->block_by_id);

    if (s->hdr)
        cram_free_slice_header(s->hdr);

    if (s->seqs_blk)
        cram_free_block(s->seqs_blk);

    if (s->qual_blk)
        cram_free_block(s->qual_blk);

    if (s->name_blk)
        cram_free_block(s->name_blk);

    if (s->aux_blk)
        cram_free_block(s->aux_blk);

    if (s->base_blk)
        cram_free_block(s->base_blk);

    if (s->soft_blk)
        cram_free_block(s->soft_blk);

    if (s->cigar)
        free(s->cigar);

    if (s->crecs)
        free(s->crecs);

    if (s->features)
        free(s->features);

    if (s->TN)
        free(s->TN);

    if (s->pair_keys)
        string_pool_destroy(s->pair_keys);

    if (s->pair[0])
        kh_destroy(m_s2i, s->pair[0]);
    if (s->pair[1])
        kh_destroy(m_s2i, s->pair[1]);

    if (s->aux_block)
        free(s->aux_block);

    free(s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x74f38
jmp 0x751b9
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x74f50
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x6f940
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x74fcf
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x74fc2
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
cmpl 0x28(%rcx), %eax
jge 0x74fc0
cmpl $0x0, -0xc(%rbp)
jle 0x74fa0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
cmpq (%rcx), %rax
jne 0x74fa0
jmp 0x74fb5
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x6f940
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x74f6c
jmp 0x74fc2
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x45a0
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xcc(%rcx), %eax
jge 0x75008
movq -0x8(%rbp), %rax
movq 0xd0(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x6f940
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x74fd6
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x75020
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x75036
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x76f00
movq -0x8(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0x7504e
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x6f940
movq -0x8(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0x75066
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rdi
callq 0x6f940
movq -0x8(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0x7507e
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0x6f940
movq -0x8(%rbp), %rax
cmpq $0x0, 0x90(%rax)
je 0x7509c
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rdi
callq 0x6f940
movq -0x8(%rbp), %rax
cmpq $0x0, 0x80(%rax)
je 0x750ba
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdi
callq 0x6f940
movq -0x8(%rbp), %rax
cmpq $0x0, 0x88(%rax)
je 0x750d8
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rdi
callq 0x6f940
movq -0x8(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x750f0
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x75108
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x75120
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x75138
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x98(%rax)
je 0x75156
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rdi
callq 0x823b0
movq -0x8(%rbp), %rax
cmpq $0x0, 0xa0(%rax)
je 0x75174
movq -0x8(%rbp), %rax
movq 0xa0(%rax), %rdi
callq 0x76e60
movq -0x8(%rbp), %rax
cmpq $0x0, 0xa8(%rax)
je 0x75192
movq -0x8(%rbp), %rax
movq 0xa8(%rax), %rdi
callq 0x76e60
movq -0x8(%rbp), %rax
cmpq $0x0, 0xd0(%rax)
je 0x751b0
movq -0x8(%rbp), %rax
movq 0xd0(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rdi
callq 0x45a0
addq $0x10, %rsp
popq %rbp
retq
nop