// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x4b938
jmp 0x4bbeb
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x4b950
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x470c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x4b9aa
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x4b99d
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
cmpl 0x20(%rcx), %eax
jge 0x4b99b
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x470c0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x4b96c
jmp 0x4b99d
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x46a0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x4b9c2
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x46a0
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x4b9d8
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4f680
movq -0x8(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0x4b9f0
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0x470c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0x4ba08
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x470c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x4ba20
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x470c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x88(%rax)
je 0x4ba3e
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rdi
callq 0x470c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x90(%rax)
je 0x4ba5c
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rdi
callq 0x470c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x98(%rax)
je 0x4ba7a
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rdi
callq 0x470c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0xb0(%rax)
je 0x4ba98
movq -0x8(%rbp), %rax
movq 0xb0(%rax), %rdi
callq 0x470c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0xb8(%rax)
je 0x4bab6
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rdi
callq 0x470c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0xc0(%rax)
je 0x4bad4
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rdi
callq 0x470c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0xc8(%rax)
je 0x4baf2
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rdi
callq 0x470c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0x4bb0a
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rdi
callq 0x470c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x80(%rax)
je 0x4bb28
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdi
callq 0x470c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x4bb40
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x46a0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x4bb58
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x46a0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x4bb70
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x46a0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x4bb88
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x46a0
movq -0x8(%rbp), %rax
cmpq $0x0, 0xd0(%rax)
je 0x4bba6
movq -0x8(%rbp), %rax
movq 0xd0(%rax), %rdi
callq 0x5ff50
movq -0x8(%rbp), %rax
cmpq $0x0, 0xd8(%rax)
je 0x4bbc4
movq -0x8(%rbp), %rax
movq 0xd8(%rax), %rdi
callq 0x4f5e0
movq -0x8(%rbp), %rax
cmpq $0x0, 0xe0(%rax)
je 0x4bbe2
movq -0x8(%rbp), %rax
movq 0xe0(%rax), %rdi
callq 0x4f5e0
movq -0x8(%rbp), %rdi
callq 0x46a0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)