// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/ext/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++) {
		cram_free_block(s->block[i]);
	    }
	}
	free(s->block);
    }

    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->aux_OQ_blk)
	cram_free_block(s->aux_OQ_blk);

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

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

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

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

    if (s->aux_oz_blk)
	cram_free_block(s->aux_oz_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]);

    free(s);
}

// Assembly:
testq %rdi, %rdi
je 0x360e4
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x35f15
callq 0x32ea8
cmpq $0x0, 0x10(%rbx)
je 0x35f53
cmpq $0x0, (%rbx)
je 0x35f4a
movq (%rbx), %rax
cmpl $0x0, 0x20(%rax)
jle 0x35f4a
xorl %r14d, %r14d
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x32ea8
incq %r14
movq (%rbx), %rax
movslq 0x20(%rax), %rax
cmpq %rax, %r14
jl 0x35f2e
movq 0x10(%rbx), %rdi
callq 0x4610
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x35f61
callq 0x4610
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x35f6e
callq 0x3772f
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x35f7c
callq 0x32ea8
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x35f8a
callq 0x32ea8
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x35f98
callq 0x32ea8
movq 0x88(%rbx), %rdi
testq %rdi, %rdi
je 0x35fa9
callq 0x32ea8
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x35fba
callq 0x32ea8
movq 0x98(%rbx), %rdi
testq %rdi, %rdi
je 0x35fcb
callq 0x32ea8
movq 0xb0(%rbx), %rdi
testq %rdi, %rdi
je 0x35fdc
callq 0x32ea8
movq 0xb8(%rbx), %rdi
testq %rdi, %rdi
je 0x35fed
callq 0x32ea8
movq 0xc0(%rbx), %rdi
testq %rdi, %rdi
je 0x35ffe
callq 0x32ea8
movq 0xc8(%rbx), %rdi
testq %rdi, %rdi
je 0x3600f
callq 0x32ea8
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x3601d
callq 0x32ea8
movq 0x80(%rbx), %rdi
testq %rdi, %rdi
je 0x3602e
callq 0x32ea8
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x3603c
callq 0x4610
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x3604a
callq 0x4610
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x36058
callq 0x4610
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x36066
callq 0x4610
movq 0xd0(%rbx), %rdi
testq %rdi, %rdi
je 0x36077
callq 0x41e2f
movq 0xd8(%rbx), %r14
testq %r14, %r14
je 0x360a6
movq 0x18(%r14), %rdi
callq 0x4610
movq 0x10(%r14), %rdi
callq 0x4610
movq 0x20(%r14), %rdi
callq 0x4610
movq %r14, %rdi
callq 0x4610
movq 0xe0(%rbx), %r14
testq %r14, %r14
je 0x360d5
movq 0x18(%r14), %rdi
callq 0x4610
movq 0x10(%r14), %rdi
callq 0x4610
movq 0x20(%r14), %rdi
callq 0x4610
movq %r14, %rdi
callq 0x4610
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4610
retq