LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_io.c
// Function: cram_new_compression_header
cram_block_compression_hdr *cram_new_compression_header(void) {
    cram_block_compression_hdr *hdr = calloc(1, sizeof(*hdr));
    if (!hdr)
	return NULL;

    if (!(hdr->TD_blk = cram_new_block(CORE, 0))) {
	free(hdr);
	return NULL;
    }

    if (!(hdr->TD_hash = kh_init(m_s2i))) {
	cram_free_block(hdr->TD_blk);
	free(hdr);
	return NULL;
    }

    if (!(hdr->TD_keys = string_pool_create(8192))) {
	kh_destroy(m_s2i, hdr->TD_hash);
	cram_free_block(hdr->TD_blk);
	free(hdr);
	return NULL;
    }

    return hdr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x1, %edi
movl $0x418, %esi            # imm = 0x418
callq 0x6460
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x83a8f
movq $0x0, -0x8(%rbp)
jmp 0x83b3f
movl $0x5, %edi
xorl %esi, %esi
callq 0x7e1a0
movq -0x10(%rbp), %rcx
movq %rax, 0x50(%rcx)
cmpq $0x0, %rax
jne 0x83abf
movq -0x10(%rbp), %rdi
callq 0x6880
movq $0x0, -0x8(%rbp)
jmp 0x83b3f
callq 0x87b50
movq -0x10(%rbp), %rcx
movq %rax, 0x68(%rcx)
cmpq $0x0, %rax
jne 0x83af2
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x7f750
movq -0x10(%rbp), %rdi
callq 0x6880
movq $0x0, -0x8(%rbp)
jmp 0x83b3f
movl $0x2000, %edi           # imm = 0x2000
callq 0x97f10
movq -0x10(%rbp), %rcx
movq %rax, 0x70(%rcx)
cmpq $0x0, %rax
jne 0x83b37
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0x87b70
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x7f750
movq -0x10(%rbp), %rdi
callq 0x6880
movq $0x0, -0x8(%rbp)
jmp 0x83b3f
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_io.c
// Function: cram_free_container
void cram_free_container(cram_container *c) {
    enum cram_DS_ID id;
    int i;

    if (!c)
	return;

    if (c->refs_used)
	free(c->refs_used);

    if (c->landmark)
	free(c->landmark);

    if (c->comp_hdr)
	cram_free_compression_header(c->comp_hdr);

    if (c->comp_hdr_block)
	cram_free_block(c->comp_hdr_block);

    if (c->slices) {
	for (i = 0; i < c->max_slice; i++)
	    if (c->slices[i])
		cram_free_slice(c->slices[i]);
	free(c->slices);
    }

    for (id = DS_RN; id < DS_TN; id++)
	if (c->stats[id]) cram_stats_free(c->stats[id]);

    //if (c->aux_B_stats) cram_stats_free(c->aux_B_stats);
    
    if (c->tags_used) kh_destroy(s_i2i, c->tags_used);

    free(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x83b88
jmp 0x83cb5
movq -0x8(%rbp), %rax
cmpq $0x0, 0x240(%rax)
je 0x83ba6
movq -0x8(%rbp), %rax
movq 0x240(%rax), %rdi
callq 0x6880
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x83bbe
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x6880
movq -0x8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x83bd6
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x83cc0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x83bee
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x7f750
movq -0x8(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0x83c4e
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x50(%rcx), %eax
jge 0x83c41
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movslq -0x10(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x83c34
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x83eb0
jmp 0x83c36
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x83c00
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rdi
callq 0x6880
movl $0xb, -0xc(%rbp)
cmpl $0x27, -0xc(%rbp)
jae 0x83c8e
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
cmpq $0x0, 0xc0(%rax,%rcx,8)
je 0x83c81
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movq 0xc0(%rax,%rcx,8), %rdi
callq 0x8d4b0
jmp 0x83c83
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x83c55
movq -0x8(%rbp), %rax
cmpq $0x0, 0x238(%rax)
je 0x83cac
movq -0x8(%rbp), %rax
movq 0x238(%rax), %rdi
callq 0x84190
movq -0x8(%rbp), %rdi
callq 0x6880
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_io.c
// Function: cram_flush_container2
static int cram_flush_container2(cram_fd *fd, cram_container *c) {
    int i, j;

    if (c->curr_slice > 0 && !c->slices)
	return -1;

    //fprintf(stderr, "Writing container %d, sum %u\n", c->record_counter, sum);

    /* Write the container struct itself */
    if (0 != cram_write_container(fd, c))
	return -1;

    /* And the compression header */
    if (0 != cram_write_block(fd, c->comp_hdr_block))
	return -1;

    /* Followed by the slice blocks */
    for (i = 0; i < c->curr_slice; i++) {
	cram_slice *s = c->slices[i];

	if (0 != cram_write_block(fd, s->hdr_block))
	    return -1;

	for (j = 0; j < s->hdr->num_blocks; j++) {
	    if (0 != cram_write_block(fd, s->block[j]))
		return -1;
	}
    }

    return hflush(fd->fp) == 0 ? 0 : -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x54(%rax)
jle 0x877e1
movq -0x18(%rbp), %rax
cmpq $0x0, 0x78(%rax)
jne 0x877e1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x878ef
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x85e60
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x87802
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x878ef
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rsi
callq 0x7ed00
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x87827
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x878ef
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x54(%rcx), %eax
jge 0x878d1
movq -0x18(%rbp), %rax
movq 0x78(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x7ed00
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x87874
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x878ef
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x28(%rbp), %rcx
movq (%rcx), %rcx
cmpl 0x20(%rcx), %eax
jge 0x878c1
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x7ed00
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x878b4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x878ef
jmp 0x878b6
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x8787b
jmp 0x878c3
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x8782e
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0xa1f60
movl %eax, %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_io.c
// Function: cram_flush_thread
void *cram_flush_thread(void *arg) {
    cram_job *j = (cram_job *)arg;

    /* Encode the container blocks and generate compression header */
    if (0 != cram_encode_container(j->fd, j->c)) {
	fprintf(stderr, "cram_encode_container failed\n");
	return NULL;
    }

    return arg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0xbf560
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x87952
movq 0x7d699(%rip), %rax     # 0x104fd0
movq (%rax), %rdi
leaq 0x5b5c2(%rip), %rsi     # 0xe2f03
movb $0x0, %al
callq 0x6a80
movq $0x0, -0x8(%rbp)
jmp 0x8795a
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_io.c
// Function: cram_flush_container_mt
int cram_flush_container_mt(cram_fd *fd, cram_container *c) {
    cram_job *j;

    if (!fd->pool)
	return cram_flush_container(fd, c);

    if (!(j = malloc(sizeof(*j))))
	return -1;
    j->fd = fd;
    j->c = c;
    
    t_pool_dispatch(fd->pool, fd->rqueue, cram_flush_thread, j);

    return cram_flush_result(fd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8860(%rax)
jne 0x879a0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x87760
movl %eax, -0x4(%rbp)
jmp 0x87a06
movl $0x10, %edi
callq 0x69c0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x879bd
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x87a06
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8860(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8868(%rax), %rsi
movq -0x20(%rbp), %rcx
leaq -0xf5(%rip), %rdx       # 0x87900
callq 0x98a40
movq -0x10(%rbp), %rdi
callq 0x87a10
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_io.c
// Function: cram_flush_result
static int cram_flush_result(cram_fd *fd) {
    int i, ret = 0;
    t_pool_result *r;

    while ((r = t_pool_next_result(fd->rqueue))) {
	cram_job *j = (cram_job *)r->data;
	cram_container *c;

	if (!j) {
	    t_pool_delete_result(r, 0);
	    return -1;
	}

	fd = j->fd;
	c = j->c;

	if (0 != cram_flush_container2(fd, c))
	    return -1;

	/* Free the container */
	for (i = 0; i < c->max_slice; i++) {
	    cram_free_slice(c->slices[i]);
	    c->slices[i] = NULL;
	}

	c->slice = NULL;
	c->curr_slice = 0;

	cram_free_container(c);

	ret |= hflush(fd->fp) == 0 ? 0 : -1;

	t_pool_delete_result(r, 1);
    }

    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8868(%rax), %rdi
callq 0x98260
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x87b41
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x87a6b
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x984e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x87b47
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x877b0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x87aa3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x87b47
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl 0x50(%rcx), %eax
jge 0x87aea
movq -0x30(%rbp), %rax
movq 0x78(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x83eb0
movq -0x30(%rbp), %rax
movq 0x78(%rax), %rax
movslq -0x14(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x87aaa
movq -0x30(%rbp), %rax
movq $0x0, 0x80(%rax)
movq -0x30(%rbp), %rax
movl $0x0, 0x54(%rax)
movq -0x30(%rbp), %rdi
callq 0x83b70
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0xa1f60
movl %eax, %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
orl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0x984e0
jmp 0x87a23
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_io.c
// Function: cram_free_slice_header
void cram_free_slice_header(cram_block_slice_hdr *hdr) {
    if (!hdr)
	return;

    if (hdr->block_content_ids)
	free(hdr->block_content_ids);

    free(hdr);

    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x87c25
jmp 0x87c46
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x87c3d
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x6880
movq -0x8(%rbp), %rdi
callq 0x6880
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_io.c
// Function: cram_read_file_def
cram_file_def *cram_read_file_def(cram_fd *fd) {
    cram_file_def *def = malloc(sizeof(*def));
    if (!def)
	return NULL;

    if (26 != hread(fd->fp, &def->magic[0], 26)) {
	free(def);
	return NULL;
    }

    if (memcmp(def->magic, "CRAM", 4) != 0) {
	free(def);
	return NULL;
    }

    if (def->major_version > 3) {
	fprintf(stderr, "CRAM version number mismatch\n"
		"Expected 1.x, 2.x or 3.x, got %d.%d\n",
		def->major_version, def->minor_version);
	free(def);
	return NULL;
    }

    fd->first_container += 26;
    fd->last_slice = 0;

    return def;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x1a, %edi
callq 0x69c0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x882ae
movq $0x0, -0x8(%rbp)
jmp 0x88383
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movl $0x1a, %edx
callq 0x7dbd0
movq %rax, %rcx
movl $0x1a, %eax
cmpq %rcx, %rax
je 0x882e6
movq -0x18(%rbp), %rdi
callq 0x6880
movq $0x0, -0x8(%rbp)
jmp 0x88383
movq -0x18(%rbp), %rax
movl (%rax), %eax
subl $0x4d415243, %eax       # imm = 0x4D415243
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x8830f
movq -0x18(%rbp), %rdi
callq 0x6880
movq $0x0, -0x8(%rbp)
jmp 0x88383
movq -0x18(%rbp), %rax
movzbl 0x4(%rax), %eax
cmpl $0x3, %eax
jle 0x88357
movq 0x7ccad(%rip), %rax     # 0x104fd0
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movzbl 0x4(%rax), %edx
movq -0x18(%rbp), %rax
movzbl 0x5(%rax), %ecx
leaq 0x5ac2a(%rip), %rsi     # 0xe2f67
movb $0x0, %al
callq 0x6a80
movq -0x18(%rbp), %rdi
callq 0x6880
movq $0x0, -0x8(%rbp)
jmp 0x88383
movq -0x10(%rbp), %rax
movq 0x8840(%rax), %rcx
addq $0x1a, %rcx
movq %rcx, 0x8840(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x884c(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_io.c
// Function: full_path
static void full_path(char *out, char *in) {
    if (*in == '/') {
	strncpy(out, in, PATH_MAX);
	out[PATH_MAX-1] = 0;
    } else {
	int len;

	// unable to get dir or out+in is too long
	if (!getcwd(out, PATH_MAX) ||
	    (len = strlen(out))+1+strlen(in) >= PATH_MAX) {
	    strncpy(out, in, PATH_MAX);
	    out[PATH_MAX-1] = 0;
	    return;
	}

	sprintf(out+len, "/%.*s", PATH_MAX - len, in);

	// FIXME: cope with `pwd`/../../../foo.fa ?
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x89e3e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x6370
movq -0x8(%rbp), %rax
movb $0x0, 0xfff(%rax)
jmp 0x89ec6
movq -0x8(%rbp), %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0x6360
cmpq $0x0, %rax
je 0x89e82
movq -0x8(%rbp), %rdi
callq 0x62c0
movl %eax, -0x14(%rbp)
addl $0x1, %eax
cltq
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x62c0
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq %rcx, %rax
cmpq $0x1000, %rax           # imm = 0x1000
jb 0x89ea1
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x6370
movq -0x8(%rbp), %rax
movb $0x0, 0xfff(%rax)
jmp 0x89ec6
movq -0x8(%rbp), %rdi
movslq -0x14(%rbp), %rax
addq %rax, %rdi
movl $0x1000, %edx           # imm = 0x1000
subl -0x14(%rbp), %edx
movq -0x10(%rbp), %rcx
leaq 0x5941c(%rip), %rsi     # 0xe32db
movb $0x0, %al
callq 0x6160
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_io.c
// Function: cram_seek
int cram_seek(cram_fd *fd, off_t offset, int whence) {
    char buf[65536];

    fd->ooc = 0;

    if (hseek(fd->fp, offset, whence) >= 0)
	return 0;

    if (!(whence == SEEK_CUR && offset >= 0))
	return -1;

    /* Couldn't fseek, but we're in SEEK_CUR mode so read instead */
    while (offset > 0) {
	int len = MIN(65536, offset);
	if (len != hread(fd->fp, buf, len))
	    return -1;
	offset -= len;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10040, %rsp          # imm = 0x10040
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, 0x88f8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0xa2250
cmpq $0x0, %rax
jl 0x8aaa9
movl $0x0, -0x4(%rbp)
jmp 0x8ab5e
cmpl $0x1, -0x1c(%rbp)
jne 0x8aab6
cmpq $0x0, -0x18(%rbp)
jge 0x8aac2
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8ab5e
jmp 0x8aac4
cmpq $0x0, -0x18(%rbp)
jle 0x8ab57
movl $0x10000, %eax          # imm = 0x10000
cmpq -0x18(%rbp), %rax
jge 0x8aae8
movl $0x10000, %eax          # imm = 0x10000
movq %rax, -0x10030(%rbp)
jmp 0x8aaf3
movq -0x18(%rbp), %rax
movq %rax, -0x10030(%rbp)
movq -0x10030(%rbp), %rax
movl %eax, -0x10024(%rbp)
movslq -0x10024(%rbp), %rax
movq %rax, -0x10038(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq -0x10020(%rbp), %rsi
movslq -0x10024(%rbp), %rdx
callq 0x7dbd0
movq %rax, %rcx
movq -0x10038(%rbp), %rax
cmpq %rcx, %rax
je 0x8ab40
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8ab5e
movslq -0x10024(%rbp), %rcx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x8aac4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10040, %rsp          # imm = 0x10040
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_io.c
// Function: cram_flush
int cram_flush(cram_fd *fd) {
    if (!fd)
	return -1;

    if (fd->mode == 'w' && fd->ctr) {
	if(fd->ctr->slice)
	    fd->ctr->curr_slice++;
	if (-1 == cram_flush_container_mt(fd, fd->ctr))
	    return -1;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x8ab8c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8abf2
movq -0x10(%rbp), %rax
cmpl $0x77, 0x8(%rax)
jne 0x8abeb
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x8abeb
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
cmpq $0x0, 0x80(%rax)
je 0x8abc4
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x54(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x54(%rax)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
callq 0x87970
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x8abe9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8abf2
jmp 0x8abeb
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_io.c
// Function: get_cache_basedir
static const char *get_cache_basedir(const char **extra) {
    char *base;

    *extra = "";

    base = getenv("XDG_CACHE_HOME");
    if (base && *base) return base;

    base = getenv("HOME");
    if (base && *base) { *extra = "/.cache"; return base; }

    base = getenv("TMPDIR");
    if (base && *base) return base;

    base = getenv("TEMP");
    if (base && *base) return base;

    return "/tmp";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x58cbf(%rip), %rcx     # 0xe5406
movq %rcx, (%rax)
leaq 0x56adb(%rip), %rdi     # 0xe322c
callq 0x68d0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x8c77a
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x8c77a
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8c81a
leaq 0x56ab5(%rip), %rdi     # 0xe3236
callq 0x68d0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x8c7b5
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x8c7b5
movq -0x10(%rbp), %rax
leaq 0x56a93(%rip), %rcx     # 0xe323b
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8c81a
leaq 0x50b10(%rip), %rdi     # 0xdd2cc
callq 0x68d0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x8c7e2
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x8c7e2
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8c81a
leaq 0x56a5a(%rip), %rdi     # 0xe3243
callq 0x68d0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x8c80f
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x8c80f
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8c81a
leaq 0x50a9b(%rip), %rax     # 0xdd2b1
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_stats.c
// Function: cram_stats_add
void cram_stats_add(cram_stats *st, int32_t val) {
    st->nsamp++;

    //assert(val >= 0);

    if (val < MAX_STAT_VAL && val >= 0) {
	st->freqs[val]++;
    } else {
	khint_t k;
	int r;

	if (!st->h) {
	    st->h = kh_init(m_i2i);
	}

	k = kh_put(m_i2i, st->h, val, &r);
	if (r == 0)
	    kh_val(st->h, k)++;
	else if (r != -1)
	    kh_val(st->h, k) = 1;
	//else
	    //; // FIXME: handle error
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x1008(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1008(%rax)
cmpl $0x400, -0xc(%rbp)      # imm = 0x400
jge 0x8c8b7
cmpl $0x0, -0xc(%rbp)
jl 0x8c8b7
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
jmp 0x8c938
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1000(%rax)
jne 0x8c8d8
callq 0x8c940
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x1000(%rax)
movq -0x8(%rbp), %rax
movq 0x1000(%rax), %rdi
movl -0xc(%rbp), %esi
leaq -0x14(%rbp), %rdx
callq 0x8c960
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x8c915
movq -0x8(%rbp), %rax
movq 0x1000(%rax), %rax
movq 0x20(%rax), %rax
movl -0x10(%rbp), %ecx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
jmp 0x8c936
cmpl $-0x1, -0x14(%rbp)
je 0x8c934
movq -0x8(%rbp), %rax
movq 0x1000(%rax), %rax
movq 0x20(%rax), %rax
movl -0x10(%rbp), %ecx
movl $0x1, (%rax,%rcx,4)
jmp 0x8c936
jmp 0x8c938
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_stats.c
// Function: cram_stats_del
void cram_stats_del(cram_stats *st, int32_t val) {
    st->nsamp--;

    //assert(val >= 0);

    if (val < MAX_STAT_VAL && val >= 0) {
	st->freqs[val]--;
	assert(st->freqs[val] >= 0);
    } else if (st->h) {
	khint_t k = kh_get(m_i2i, st->h, val);

	if (k != kh_end(st->h)) {
	    if (--kh_val(st->h, k) == 0)
		kh_del(m_i2i, st->h, k);
	} else {
	    fprintf(stderr, "Failed to remove val %d from cram_stats\n", val);
	    st->nsamp++;
	}
    } else {
	fprintf(stderr, "Failed to remove val %d from cram_stats\n", val);
	st->nsamp++;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x1008(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x1008(%rax)
cmpl $0x400, -0xc(%rbp)      # imm = 0x400
jge 0x8cd26
cmpl $0x0, -0xc(%rbp)
jl 0x8cd26
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $-0x1, %edx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jl 0x8cd02
jmp 0x8cd21
leaq 0x565f3(%rip), %rdi     # 0xe32fc
leaq 0x56600(%rip), %rsi     # 0xe3310
movl $0x53, %edx
leaq 0x56606(%rip), %rcx     # 0xe3322
callq 0x6450
jmp 0x8cdf7
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1000(%rax)
je 0x8cdc7
movq -0x8(%rbp), %rax
movq 0x1000(%rax), %rdi
movl -0xc(%rbp), %esi
callq 0x8ce00
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x1000(%rcx), %rcx
cmpl (%rcx), %eax
je 0x8cd97
movq -0x8(%rbp), %rax
movq 0x1000(%rax), %rax
movq 0x20(%rax), %rcx
movl -0x10(%rbp), %eax
movl %eax, %edx
movl (%rcx,%rdx,4), %eax
addl $-0x1, %eax
movl %eax, (%rcx,%rdx,4)
cmpl $0x0, %eax
jne 0x8cd95
movq -0x8(%rbp), %rax
movq 0x1000(%rax), %rdi
movl -0x10(%rbp), %esi
callq 0x8cf40
jmp 0x8cdc5
movq 0x78232(%rip), %rax     # 0x104fd0
movq (%rax), %rdi
movl -0xc(%rbp), %edx
leaq 0x565a2(%rip), %rsi     # 0xe334d
movb $0x0, %al
callq 0x6a80
movq -0x8(%rbp), %rax
movl 0x1008(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1008(%rax)
jmp 0x8cdf5
movq 0x78202(%rip), %rax     # 0x104fd0
movq (%rax), %rdi
movl -0xc(%rbp), %edx
leaq 0x56572(%rip), %rsi     # 0xe334d
movb $0x0, %al
callq 0x6a80
movq -0x8(%rbp), %rax
movl 0x1008(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1008(%rax)
jmp 0x8cdf7
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_stats.c
// Function: cram_stats_dump
void cram_stats_dump(cram_stats *st) {
    int i;
    fprintf(stderr, "cram_stats:\n");
    for (i = 0; i < MAX_STAT_VAL; i++) {
	if (!st->freqs[i])
	    continue;
	fprintf(stderr, "\t%d\t%d\n", i, st->freqs[i]);
    }
    if (st->h) {
	khint_t k;
	for (k = kh_begin(st->h); k != kh_end(st->h); k++) {
	    if (!kh_exist(st->h, k))
		continue;

	    fprintf(stderr, "\t%d\t%d\n", kh_key(st->h, k), kh_val(st->h, k));
	}
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq 0x77ffd(%rip), %rax     # 0x104fd0
movq (%rax), %rdi
leaq 0x56399(%rip), %rsi     # 0xe3376
movb $0x0, %al
callq 0x6a80
movl $0x0, -0xc(%rbp)
cmpl $0x400, -0xc(%rbp)      # imm = 0x400
jge 0x8d035
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x8d004
jmp 0x8d02a
movq 0x77fc5(%rip), %rax     # 0x104fd0
movq (%rax), %rdi
movl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
leaq 0x4cb8b(%rip), %rsi     # 0xd9bae
movb $0x0, %al
callq 0x6a80
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x8cfeb
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1000(%rax)
je 0x8d0e0
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x1000(%rcx), %rcx
cmpl (%rcx), %eax
je 0x8d0de
movq -0x8(%rbp), %rax
movq 0x1000(%rax), %rax
movq 0x10(%rax), %rax
movl -0x10(%rbp), %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x10(%rbp), %ecx
andl $0xf, %ecx
shll %ecx
shrl %cl, %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x8d08e
jmp 0x8d0d0
movq 0x77f3b(%rip), %rax     # 0x104fd0
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x1000(%rax), %rax
movq 0x18(%rax), %rax
movl -0x10(%rbp), %ecx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movq 0x1000(%rax), %rax
movq 0x20(%rax), %rax
movl -0x10(%rbp), %ecx
movl (%rax,%rcx,4), %ecx
leaq 0x4cae5(%rip), %rsi     # 0xd9bae
movb $0x0, %al
callq 0x6a80
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x8d04e
jmp 0x8d0e0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/mFILE.c
// Function: mfmmap
int mfmmap(mFILE *mf, FILE *fp, const char *fn) {
    struct stat sb;

    if (stat(fn, &sb) != 0)
	return -1;

    mf->size = sb.st_size;
    mf->data = mmap(NULL, mf->size, PROT_READ, MAP_SHARED,
		    fileno(fp), 0);

    if (!mf->data)
	return -1;

    mf->alloced = 0;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x6630
cmpl $0x0, %eax
je 0x8db45
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8dbb9
movq -0x80(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6740
movq -0xb8(%rbp), %rsi
movl %eax, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl $0x1, %ecx
movq %r9, %rdi
movl %ecx, %edx
callq 0x6d70
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x8dba6
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8dbb9
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/mFILE.c
// Function: mfload
static char *mfload(FILE *fp, const char *fn, size_t *size, int binary) {
    struct stat sb;
    char *data = NULL;
    size_t allocated = 0, used = 0;
    int bufsize = 8192;

#ifdef _WIN32
    if (binary)
	_setmode(_fileno(fp), _O_BINARY);
    else 
	_setmode(_fileno(fp), _O_TEXT);
#endif

    if (fn && -1 != stat(fn, &sb)) {
	data = malloc(allocated = sb.st_size);
	bufsize = sb.st_size;
    } else {
	fn = NULL;
    }

    do {
	size_t len;
	if (used + bufsize > allocated) {
	    allocated += bufsize;
	    data = realloc(data, allocated);
	}
	len = fread(data + used, 1, allocated - used, fp);
	if (len > 0)
	    used += len;
    } while (!feof(fp) && (fn == NULL || used < sb.st_size));

    *size = used;

    return data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq $0x0, -0xb8(%rbp)
movq $0x0, -0xc0(%rbp)
movq $0x0, -0xc8(%rbp)
movl $0x2000, -0xcc(%rbp)    # imm = 0x2000
cmpq $0x0, -0x10(%rbp)
je 0x8e21a
movq -0x10(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x6630
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
je 0x8e21a
movq -0x80(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x69c0
movq %rax, -0xb8(%rbp)
movq -0x80(%rbp), %rax
movl %eax, -0xcc(%rbp)
jmp 0x8e222
movq $0x0, -0x10(%rbp)
jmp 0x8e224
movq -0xc8(%rbp), %rax
movslq -0xcc(%rbp), %rcx
addq %rcx, %rax
cmpq -0xc0(%rbp), %rax
jbe 0x8e26d
movslq -0xcc(%rbp), %rax
addq -0xc0(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rdi
movq -0xc0(%rbp), %rsi
callq 0x6c80
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdi
addq -0xc8(%rbp), %rdi
movq -0xc0(%rbp), %rdx
subq -0xc8(%rbp), %rdx
movq -0x8(%rbp), %rcx
movl $0x1, %esi
callq 0x6b20
movq %rax, -0xd8(%rbp)
cmpq $0x0, -0xd8(%rbp)
jbe 0x8e2bd
movq -0xd8(%rbp), %rax
addq -0xc8(%rbp), %rax
movq %rax, -0xc8(%rbp)
jmp 0x8e2bf
movq -0x8(%rbp), %rdi
callq 0x6bc0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xd9(%rbp)
jne 0x8e306
movb $0x1, %al
cmpq $0x0, -0x10(%rbp)
movb %al, -0xda(%rbp)
je 0x8e2fa
movq -0xc8(%rbp), %rax
cmpq -0x80(%rbp), %rax
setb %al
movb %al, -0xda(%rbp)
movb -0xda(%rbp), %al
movb %al, -0xd9(%rbp)
movb -0xd9(%rbp), %al
testb $0x1, %al
jne 0x8e224
movq -0xc8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0xb8(%rbp), %rax
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/mFILE.c
// Function: mfdestroy
int mfdestroy(mFILE *mf) {
    if (!mf)
	return -1;

    if (mf->data)
	free(mf->data);
    free(mf);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x8e64c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8e674
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x8e664
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x6880
movq -0x10(%rbp), %rdi
callq 0x6880
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/mFILE.c
// Function: mfdetach
int mfdetach(mFILE *mf) {
    if (!mf)
	return -1;

    mfflush(mf);
    if (mf->mode & MF_MMAP)
	return -1;

    if (mf->fp) {
	fclose(mf->fp);
	mf->fp = NULL;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x8e69c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8e6e5
movq -0x10(%rbp), %rdi
callq 0x8e430
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x8e6bd
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8e6e5
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x8e6de
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x66e0
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/mFILE.c
// Function: mfseek
int mfseek(mFILE *mf, long offset, int whence) {
    switch (whence) {
    case SEEK_SET:
	mf->offset = offset;
	break;
    case SEEK_CUR:
	mf->offset += offset;
	break;
    case SEEK_END:
	mf->offset = mf->size + offset;
	break;
    default:
	errno = EINVAL;
	return -1;
    }

    mf->eof = 0;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
testl %eax, %eax
je 0x8e7b3
jmp 0x8e79f
movl -0x20(%rbp), %eax
subl $0x1, %eax
je 0x8e7c1
jmp 0x8e7a9
movl -0x20(%rbp), %eax
subl $0x2, %eax
je 0x8e7d3
jmp 0x8e7e9
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
jmp 0x8e7fd
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x28(%rax), %rcx
movq %rcx, 0x28(%rax)
jmp 0x8e7fd
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
addq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
jmp 0x8e7fd
callq 0x6060
movl $0x16, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8e80f
movq -0x10(%rbp), %rax
movl $0x0, 0x18(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/open_trace_file.c
// Function: find_file_dir
static mFILE *find_file_dir(char *file, char *dirname) {
    char *path;
    mFILE *mf = NULL;

    path = expand_path(file, dirname);

    if (is_file(path))
	mf = mfopen(path, "rbm");

    free(path);
    return mf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x8fb40
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x8da30
cmpl $0x0, %eax
je 0x8f9cb
movq -0x18(%rbp), %rdi
leaq 0x53a8b(%rip), %rsi     # 0xe344d
callq 0x8e340
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6880
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/open_trace_file.c
// Function: find_path
char *find_path(char *file, char *path) {
    char *newsearch;
    char *ele;
    char *outpath = NULL;

    /* Use path first */
    if (!path)
	path = getenv("RAWDATA");
    if (NULL == (newsearch = tokenise_search_path(path)))
	return NULL;
    
    for (ele = newsearch; *ele; ele += strlen(ele)+1) {
	char *ele2 = (*ele == '|') ? ele+1 : ele;

	if (!strncmp(ele2, "URL=", 4) ||
	    !strncmp(ele2, "http:", 5) ||
	    !strncmp(ele2, "ftp:", 4)) {
	    continue;
	} else {
	    outpath = expand_path(file, ele2);
	    if (is_file(outpath)) {
		free(newsearch);
		return outpath;
	    } else {
		free(outpath);
	    }
	} 
    }

    free(newsearch);

    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x30(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x8fa0f
leaq 0x53a3a(%rip), %rdi     # 0xe3440
callq 0x68d0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x8f050
movq %rax, %rcx
movq %rcx, -0x20(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x8fa33
movq $0x0, -0x8(%rbp)
jmp 0x8fb2c
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpb $0x0, (%rax)
je 0x8fb1b
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7c, %eax
jne 0x8fa62
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x8fa6a
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
leaq 0x539cb(%rip), %rsi     # 0xe3448
movl $0x4, %edx
callq 0x6320
cmpl $0x0, %eax
je 0x8fac0
movq -0x38(%rbp), %rdi
leaq 0x5399a(%rip), %rsi     # 0xe3431
movl $0x5, %edx
callq 0x6320
cmpl $0x0, %eax
je 0x8fac0
movq -0x38(%rbp), %rdi
leaq 0x5398a(%rip), %rsi     # 0xe343b
movl $0x4, %edx
callq 0x6320
cmpl $0x0, %eax
jne 0x8fac2
jmp 0x8fb01
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x8fb40
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x8da30
cmpl $0x0, %eax
je 0x8faf4
movq -0x20(%rbp), %rdi
callq 0x6880
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8fb2c
movq -0x30(%rbp), %rdi
callq 0x6880
jmp 0x8faff
jmp 0x8fb01
movq -0x28(%rbp), %rdi
callq 0x62c0
addq $0x1, %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x8fa3b
movq -0x20(%rbp), %rdi
callq 0x6880
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/./cram/rANS_byte.h
// Function: RansEncPutSymbol
static inline void RansEncPutSymbol(RansState* r, uint8_t** pptr, RansEncSymbol const* sym)
{
    RansAssert(sym->x_max != 0); // can't encode symbol with freq=0

    // renormalize
    uint32_t x = *r;
    uint32_t x_max = sym->x_max;

    if (x >= x_max) {
	uint8_t* ptr = *pptr;
	do {
	    *--ptr = (uint8_t) (x & 0xff);
	    x >>= 8;
	} while (x >= x_max);
	*pptr = ptr;
    }

    // x = C(s,x)
    // NOTE: written this way so we get a 32-bit "multiply high" when
    // available. If you're on a 64-bit platform with cheap multiplies
    // (e.g. x64), just bake the +32 into rcp_shift.
    //uint32_t q = (uint32_t) (((uint64_t)x * sym->rcp_freq) >> 32) >> sym->rcp_shift;

    // The extra >>32 has already been added to RansEncSymbolInit
    uint32_t q = (uint32_t) (((uint64_t)x * sym->rcp_freq) >> sym->rcp_shift);
    *r = x + sym->bias + q * sym->cmpl_freq;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0x9094f
jmp 0x9096e
leaq 0x52d6b(%rip), %rdi     # 0xe36c1
leaq 0x52ccc(%rip), %rsi     # 0xe3629
movl $0x10f, %edx            # imm = 0x10F
leaq 0x52d68(%rip), %rcx     # 0xe36d1
callq 0x6450
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jb 0x909cb
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, -0x1(%rax)
movl -0x1c(%rbp), %eax
shrl $0x8, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jae 0x90993
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
movl 0x4(%rcx), %ecx
imulq %rcx, %rax
movq -0x18(%rbp), %rcx
movzwl 0xe(%rcx), %ecx
movl %ecx, %ecx
shrq %cl, %rax
movl %eax, -0x2c(%rbp)
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
addl 0x8(%rax), %ecx
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rdx
movzwl 0xc(%rdx), %edx
imull %edx, %eax
addl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/./cram/rANS_byte.h
// Function: RansDecSymbolInit
static inline void RansDecSymbolInit(RansDecSymbol* s, uint32_t start, uint32_t freq)
{
    RansAssert(start <= (1 << 16));
    RansAssert(freq <= (1 << 16) - start);
    s->start = (uint16_t) start;
    s->freq = (uint16_t) freq;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
cmpl $0x10000, -0xc(%rbp)    # imm = 0x10000
ja 0x913cd
jmp 0x913ec
leaq 0x52343(%rip), %rdi     # 0xe3717
leaq 0x5224e(%rip), %rsi     # 0xe3629
movl $0x103, %edx            # imm = 0x103
leaq 0x52343(%rip), %rcx     # 0xe372a
callq 0x6450
movl -0x10(%rbp), %eax
movl $0x10000, %ecx          # imm = 0x10000
subl -0xc(%rbp), %ecx
cmpl %ecx, %eax
ja 0x913fd
jmp 0x9141c
leaq 0x52362(%rip), %rdi     # 0xe3766
leaq 0x5221e(%rip), %rsi     # 0xe3629
movl $0x104, %edx            # imm = 0x104
leaq 0x52313(%rip), %rcx     # 0xe372a
callq 0x6450
movl -0xc(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, (%rax)
movl -0x10(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x2(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/./cram/rANS_byte.h
// Function: RansDecRenorm
static inline void RansDecRenorm(RansState* r, uint8_t** pptr)
{
    // renormalize
    uint32_t x = *r;

    if (x < RANS_BYTE_L) {
        uint8_t* ptr = *pptr;
        do x = (x << 8) | *ptr++; while (x < RANS_BYTE_L);
        *pptr = ptr;
    }

    *r = x;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
cmpl $0x800000, -0x14(%rbp)  # imm = 0x800000
jae 0x9151a
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
shll $0x8, %eax
movq -0x20(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movzbl (%rcx), %ecx
orl %ecx, %eax
movl %eax, -0x14(%rbp)
cmpl $0x800000, -0x14(%rbp)  # imm = 0x800000
jb 0x914e9
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/./cram/rANS_byte.h
// Function: RansDecAdvance
static inline void RansDecAdvance(RansState* r, uint8_t** pptr, uint32_t start, uint32_t freq, uint32_t scale_bits)
{
    uint32_t mask = (1u << scale_bits) - 1;

    // s, x = D(x)
    uint32_t x = *r;
    x = freq * (x >> scale_bits) + (x & mask) - start;

    // renormalize
    if (x < RANS_BYTE_L) {
        uint8_t* ptr = *pptr;
        do x = (x << 8) | *ptr++; while (x < RANS_BYTE_L);
        *pptr = ptr;
    }

    *r = x;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl -0x1c(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x18(%rbp), %eax
movl -0x24(%rbp), %edx
movl -0x1c(%rbp), %ecx
shrl %cl, %edx
movl %edx, %ecx
imull %ecx, %eax
movl -0x24(%rbp), %ecx
andl -0x20(%rbp), %ecx
addl %ecx, %eax
subl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x800000, -0x24(%rbp)  # imm = 0x800000
jae 0x92df2
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %eax
shll $0x8, %eax
movq -0x30(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x30(%rbp)
movzbl (%rcx), %ecx
orl %ecx, %eax
movl %eax, -0x24(%rbp)
cmpl $0x800000, -0x24(%rbp)  # imm = 0x800000
jb 0x92dc1
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/./htslib/kstring.h
// Function: kputc_
static inline int kputc_(int c, kstring_t *s)
{
	if (s->l + 1 > s->m) {
		char *tmp;
		s->m = s->l + 1;
		kroundup32(s->m);
		if ((tmp = (char*)realloc(s->s, s->m)))
			s->s = tmp;
		else
			return EOF;
	}
	s->s[s->l++] = c;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
addq $0x1, %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x9505a
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
shrq %rcx
movq -0x10(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x2, %rcx
movq -0x10(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x4, %rcx
movq -0x10(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x8, %rcx
movq -0x10(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x10, %rcx
movq -0x10(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x6c80
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x9504f
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x95058
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x95082
jmp 0x9505a
movl -0x8(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movb %dl, (%rax,%rcx)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/sam_header.c
// Function: sam_hdr_find_line
char *sam_hdr_find_line(SAM_hdr *hdr, char *type,
			char *ID_key, char *ID_value) {
    SAM_hdr_type *ty = sam_hdr_find(hdr, type, ID_key, ID_value);
    kstring_t ks = KS_INITIALIZER;
    SAM_hdr_tag *tag;
    int r = 0;

    if (!ty)
	return NULL;

    // Paste together the line from the hashed copy
    r |= (kputc_('@', &ks) == EOF);
    r |= (kputs(type, &ks) == EOF);
    for (tag = ty->tag; tag; tag = tag->next) {
	r |= (kputc_('\t', &ks) == EOF);
	r |= (kputsn(tag->str, tag->len, &ks) == EOF);
    }

    if (r) {
	KS_FREE(&ks);
	return NULL;
    }

    return ks_str(&ks);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x95220
movq %rax, -0x30(%rbp)
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x63a0
movl $0x0, -0x54(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x958ac
movq $0x0, -0x8(%rbp)
jmp 0x95982
movl $0x40, %edi
leaq -0x48(%rbp), %rsi
callq 0x94f50
cmpl $-0x1, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
orl -0x54(%rbp), %eax
movl %eax, -0x54(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x95090
cmpl $-0x1, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
orl -0x54(%rbp), %eax
movl %eax, -0x54(%rbp)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x95951
movl $0x9, %edi
leaq -0x48(%rbp), %rsi
callq 0x94f50
cmpl $-0x1, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
orl -0x54(%rbp), %eax
movl %eax, -0x54(%rbp)
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x50(%rbp), %rax
movl 0x10(%rax), %esi
leaq -0x48(%rbp), %rdx
callq 0x93750
cmpl $-0x1, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
orl -0x54(%rbp), %eax
movl %eax, -0x54(%rbp)
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x958f5
cmpl $0x0, -0x54(%rbp)
je 0x95975
jmp 0x95959
cmpq $0x0, -0x38(%rbp)
je 0x95969
movq -0x38(%rbp), %rdi
callq 0x6880
jmp 0x9596b
movq $0x0, -0x8(%rbp)
jmp 0x95982
leaq -0x48(%rbp), %rdi
callq 0x938c0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/sam_header.c
// Function: sam_hdr_find_key
SAM_hdr_tag *sam_hdr_find_key(SAM_hdr *sh,
			      SAM_hdr_type *type,
			      char *key,
			      SAM_hdr_tag **prev) {
    SAM_hdr_tag *tag, *p = NULL;

    for (tag = type->tag; tag; p = tag, tag = tag->next) {
	if (tag->str[0] == key[0] && tag->str[1] == key[1]) {
	    if (prev)
		*prev = p;
	    return tag;
	}
    }

    if (prev)
	*prev = p;

    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x95a20
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
movq -0x20(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x95a09
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movsbl 0x1(%rax), %eax
movq -0x20(%rbp), %rcx
movsbl 0x1(%rcx), %ecx
cmpl %ecx, %eax
jne 0x95a09
cmpq $0x0, -0x28(%rbp)
je 0x959ff
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x95a3a
jmp 0x95a0b
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x959b8
cmpq $0x0, -0x28(%rbp)
je 0x95a32
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq