LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/bgzf.c
// Function: bgzf_close
int bgzf_close(BGZF* fp)
{
	int ret, block_length;
	if (fp == 0) return -1;
	if (fp->is_write) {
		if (bgzf_flush(fp) != 0) return -1;
		fp->compress_level = -1;
		block_length = deflate_block(fp, 0); // write an empty block
		fwrite(fp->compressed_block, 1, block_length, (FILE*)fp->fp);
		if (fflush((FILE*)fp->fp) != 0) {
			fp->errcode |= BGZF_ERR_IO;
			return -1;
		}
#ifdef BGZF_MT
		if (fp->mt) mt_destroy((mtaux_t*)fp->mt);
#endif
	}
	ret = fp->is_write? fclose((FILE*)fp->fp) : _bgzf_close(fp->fp);
	if (ret != 0) return -1;
	free(fp->uncompressed_block);
	free(fp->compressed_block);
	free_cache(fp);
	free(fp);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x45bb
movq %rdi, %rbx
testb $0x3, 0x2(%rdi)
je 0x4592
movq %rbx, %rdi
callq 0x4128
testl %eax, %eax
jne 0x45bb
orl $0xfff00000, (%rbx)     # imm = 0xFFF00000
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4283
movslq %eax, %rdx
movq 0x20(%rbx), %rdi
movq 0x30(%rbx), %rcx
movl $0x1, %esi
callq 0x23b0
movq 0x30(%rbx), %rdi
callq 0x22b0
testl %eax, %eax
je 0x44a3
orb $0x4, (%rbx)
jmp 0x45bb
movq 0x38(%rbx), %r14
testq %r14, %r14
je 0x4592
leaq 0x38(%r14), %r15
movq %r15, %rdi
callq 0x2400
movl $0x1, 0xc(%r14)
movl $0x0, 0x10(%r14)
leaq 0x60(%r14), %rdi
movq %rdi, (%rsp)
callq 0x20d0
movq %r15, %rdi
callq 0x2290
cmpl $0x2, (%r14)
jl 0x4507
movl $0x1, %r12d
movq 0x30(%r14), %rax
movq (%rax,%r12,8), %rdi
xorl %esi, %esi
callq 0x23c0
incq %r12
movslq (%r14), %rax
cmpq %rax, %r12
jl 0x44ed
cmpl $0x0, 0x4(%r14)
jle 0x452a
xorl %r12d, %r12d
movq 0x18(%r14), %rax
movq (%rax,%r12,8), %rdi
callq 0x2050
incq %r12
movslq 0x4(%r14), %rax
cmpq %rax, %r12
jl 0x4511
cmpl $0x0, (%r14)
jle 0x4555
movl $0x10, %r13d
xorl %r12d, %r12d
movq 0x28(%r14), %rax
movq (%rax,%r13), %rdi
callq 0x2050
incq %r12
movslq (%r14), %rax
addq $0x28, %r13
cmpq %rax, %r12
jl 0x4539
movq 0x18(%r14), %rdi
callq 0x2050
movq 0x20(%r14), %rdi
callq 0x2050
movq 0x28(%r14), %rdi
callq 0x2050
movq 0x30(%r14), %rdi
callq 0x2050
movq (%rsp), %rdi
callq 0x2330
movq %r15, %rdi
callq 0x2170
movq %r14, %rdi
callq 0x2050
movq 0x30(%rbx), %rdi
callq 0x2140
testl %eax, %eax
jne 0x45bb
movq 0x18(%rbx), %rdi
callq 0x2050
movq 0x20(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x2050
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/bgzf.c
// Function: bgzf_check_EOF
int bgzf_check_EOF(BGZF *fp)
{
	uint8_t buf[28];
	off_t offset;
	offset = _bgzf_tell((_bgzf_file_t)fp->fp);
	if (_bgzf_seek(fp->fp, -28, SEEK_END) < 0) return 0;
	_bgzf_read(fp->fp, buf, 28);
	_bgzf_seek(fp->fp, offset, SEEK_SET);
	return (memcmp("\037\213\010\4\0\0\0\0\0\377\6\0\102\103\2\0\033\0\3\0\0\0\0\0\0\0\0\0", buf, 28) == 0)? 1 : 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0x20b0
movq %rax, %r14
movq 0x30(%rbx), %rdi
movq $-0x1c, %rsi
movl $0x2, %edx
callq 0x2340
testl %eax, %eax
js 0x465d
movq 0x30(%rbx), %rcx
movq %rsp, %r15
movl $0x1, %esi
movl $0x1c, %edx
movq %r15, %rdi
callq 0x20e0
movq 0x30(%rbx), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2340
movdqu 0xc(%r15), %xmm0
pcmpeqb 0x9b25(%rip), %xmm0     # 0xe160
movdqa (%r15), %xmm1
pcmpeqb 0x9b28(%rip), %xmm1     # 0xe170
pand %xmm0, %xmm1
pmovmskb %xmm1, %ecx
xorl %eax, %eax
cmpl $0xffff, %ecx           # imm = 0xFFFF
sete %al
jmp 0x465f
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/hts.c
// Function: hts_close
void hts_close(htsFile *fp)
{
	free(fp->fn);
	if (!fp->is_bin) {
		free(fp->line.s);
		if (!fp->is_write) {
			gzFile gzfp = ((kstream_t*)fp->fp)->f;
			ks_destroy((kstream_t*)fp->fp);
			gzclose(gzfp);
			free(fp->fn_aux);
		} else fclose((FILE*)fp->fp);
	} else bgzf_close((BGZF*)fp->fp);
	free(fp);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
callq 0x2050
testb $0x1, (%rbx)
jne 0x56f6
movq 0x20(%rbx), %rdi
callq 0x2050
testb $0x2, (%rbx)
movq 0x38(%rbx), %rdi
jne 0x5701
movq 0x10(%rdi), %r14
callq 0x4c01
movq %r14, %rdi
callq 0x2040
movq 0x30(%rbx), %rdi
callq 0x2050
jmp 0x5706
movq 0x38(%rbx), %rdi
callq 0x4433
jmp 0x5706
callq 0x2140
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/hts.c
// Function: hts_getline
int hts_getline(htsFile *fp, int delimiter, kstring_t *str)
{
	int ret, dret;
	ret = ks_getuntil((kstream_t*)fp->fp, delimiter, str, &dret);
	++fp->lineno;
	return ret;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
leaq 0xc(%rsp), %rcx
xorl %r8d, %r8d
callq 0x4c1d
incq 0x8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/hts.c
// Function: hts_idx_init
hts_idx_t *hts_idx_init(int n, int fmt, uint64_t offset0, int min_shift, int n_lvls)
{
	hts_idx_t *idx;
	idx = (hts_idx_t*)calloc(1, sizeof(hts_idx_t));
	idx->fmt = fmt;
	idx->min_shift = min_shift;
	idx->n_lvls = n_lvls;
	idx->n_bins = ((1<<(3 * n_lvls + 3)) - 1) / 7;
	idx->z.save_bin = idx->z.save_tid = idx->z.last_tid = idx->z.last_bin = 0xffffffffu;
	idx->z.save_off = idx->z.last_off = idx->z.off_beg = idx->z.off_end = offset0;
	idx->z.last_coor = 0xffffffffu;
	if (n) {
		idx->n = idx->m = n;
		idx->bidx = (bidx_t**)calloc(n, sizeof(void*));
		idx->lidx = (lidx_t*) calloc(n, sizeof(lidx_t));
	}
	return idx;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r15d
movl %ecx, %r12d
movq %rdx, %r14
movl %esi, %r13d
movl %edi, %ebp
movl $0x1, %edi
movl $0x88, %esi
callq 0x21f0
movq %rax, %rbx
movl %r13d, (%rax)
leal (%r15,%r15,2), %ecx
addb $0x3, %cl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll %cl, %eax
movl %r12d, 0x4(%rbx)
movl %r15d, 0x8(%rbx)
notl %eax
movl $0x92492493, %ecx       # imm = 0x92492493
imulq %rax, %rcx
shrq $0x22, %rcx
movl %ecx, 0xc(%rbx)
movl $0xffffffff, 0x40(%rbx) # imm = 0xFFFFFFFF
movq $-0x1, %rax
movq %rax, 0x4c(%rbx)
movq %rax, 0x44(%rbx)
movq %r14, 0x70(%rbx)
movq %r14, 0x68(%rbx)
movq %r14, 0x58(%rbx)
movq %r14, 0x60(%rbx)
testl %ebp, %ebp
je 0x5ee5
movl %ebp, 0x18(%rbx)
movl %ebp, 0x14(%rbx)
movslq %ebp, %r14
movl $0x8, %esi
movq %r14, %rdi
callq 0x21f0
movq %rax, 0x28(%rbx)
movl $0x10, %esi
movq %r14, %rdi
callq 0x21f0
movq %rax, 0x30(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/hts.c
// Function: hts_idx_destroy
void hts_idx_destroy(hts_idx_t *idx)
{
	khint_t k;
	int i;
	if (idx == 0) return;
	for (i = 0; i < idx->m; ++i) {
		bidx_t *bidx = idx->bidx[i];
		free(idx->lidx[i].offset);
		if (bidx == 0) continue;
		for (k = kh_begin(bidx); k != kh_end(bidx); ++k)
			if (kh_exist(bidx, k))
				free(kh_value(bidx, k).list);
		kh_destroy(bin, bidx);
	}
	free(idx->bidx); free(idx->lidx); free(idx->meta);
	free(idx);
}

// Assembly:
testq %rdi, %rdi
je 0x6d70
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x18(%rdi)
jle 0x6d45
xorl %r15d, %r15d
movq 0x28(%rbx), %rax
movq 0x30(%rbx), %rcx
movq (%rax,%r15,8), %r14
movq %r15, %rax
shlq $0x4, %rax
movq 0x8(%rcx,%rax), %rdi
callq 0x2050
testq %r14, %r14
je 0x6d35
cmpl $0x0, (%r14)
je 0x6d12
xorl %ebp, %ebp
xorl %r12d, %r12d
movq 0x10(%r14), %rax
movl %r12d, %ecx
shrl $0x4, %ecx
movl (%rax,%rcx,4), %eax
movl %ebp, %ecx
andb $0x1e, %cl
shrl %cl, %eax
testb $0x3, %al
jne 0x6d07
movq 0x20(%r14), %rax
movl %r12d, %ecx
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%rax,%rcx,8), %rdi
callq 0x2050
incl %r12d
addl $0x2, %ebp
cmpl (%r14), %r12d
jne 0x6cda
movq 0x18(%r14), %rdi
callq 0x2050
movq 0x10(%r14), %rdi
callq 0x2050
movq 0x20(%r14), %rdi
callq 0x2050
movq %r14, %rdi
callq 0x2050
incq %r15
movslq 0x18(%rbx), %rax
cmpq %rax, %r15
jl 0x6cad
movq 0x28(%rbx), %rdi
callq 0x2050
movq 0x30(%rbx), %rdi
callq 0x2050
movq 0x38(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2050
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/hts.c
// Function: hts_idx_save
void hts_idx_save(const hts_idx_t *idx, const char *fn, int fmt)
{
	char *fnidx;
	fnidx = (char*)calloc(1, strlen(fn) + 5);
	strcpy(fnidx, fn);
	if (fmt == HTS_FMT_CSI) {
		BGZF *fp;
		uint32_t x[3];
		int is_be, i;
		is_be = ed_is_big();
		fp = bgzf_open(strcat(fnidx, ".csi"), "w");
		bgzf_write(fp, "CSI\1", 4);
		x[0] = idx->min_shift; x[1] = idx->n_lvls; x[2] = idx->l_meta;
		if (is_be) {
			for (i = 0; i < 3; ++i)
				bgzf_write(fp, ed_swap_4p(&x[i]), 4);
		} else bgzf_write(fp, &x, 12);
		if (idx->l_meta) bgzf_write(fp, idx->meta, idx->l_meta);
		hts_idx_save_core(idx, fp, HTS_FMT_CSI);
		bgzf_close(fp);
	} else if (fmt == HTS_FMT_TBI) {
		BGZF *fp;
		fp = bgzf_open(strcat(fnidx, ".tbi"), "w");
		bgzf_write(fp, "TBI\1", 4);
		hts_idx_save_core(idx, fp, HTS_FMT_TBI);
		bgzf_close(fp);
	} else if (fmt == HTS_FMT_BAI) {
		FILE *fp;
		fp = fopen(strcat(fnidx, ".bai"), "w");
		fwrite("BAI\1", 1, 4, fp);
		hts_idx_save_core(idx, fp, HTS_FMT_BAI);
		fclose(fp);
	} else abort();
	free(fnidx);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x2150
leaq 0x5(%rax), %rsi
movl $0x1, %edi
callq 0x21f0
movq %rax, %rbx
movq %rax, %rdi
movq %r15, %rsi
callq 0x20a0
cmpl $0x2, %ebp
je 0x6e9c
cmpl $0x1, %ebp
je 0x6e43
testl %ebp, %ebp
jne 0x6f01
movq %rbx, %rdi
callq 0x2150
movl $0x6973632e, (%rbx,%rax) # imm = 0x6973632E
movb $0x0, 0x4(%rbx,%rax)
leaq 0x7335(%rip), %rsi      # 0xe111
movq %rbx, %rdi
callq 0x3abc
movq %rax, %r15
leaq 0x75ba(%rip), %rsi      # 0xe3a8
movl $0x4, %edx
movq %rax, %rdi
callq 0x4326
movl 0x4(%r14), %eax
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
movl 0x8(%r14), %eax
movl %eax, 0x4(%rsi)
movl 0x10(%r14), %eax
movl %eax, 0x8(%rsi)
movl $0xc, %edx
movq %r15, %rdi
callq 0x4326
movl 0x10(%r14), %edx
testq %rdx, %rdx
je 0x6e36
movq 0x38(%r14), %rsi
movq %r15, %rdi
callq 0x4326
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
jmp 0x6ee1
movq %rbx, %rdi
callq 0x2150
movl $0x6961622e, (%rbx,%rax) # imm = 0x6961622E
movb $0x0, 0x4(%rbx,%rax)
leaq 0x72b3(%rip), %rsi      # 0xe111
movq %rbx, %rdi
callq 0x2350
movq %rax, %r15
leaq 0x754c(%rip), %rdi      # 0xe3bc
movl $0x1, %esi
movl $0x4, %edx
movq %rax, %rcx
callq 0x23b0
movq %r14, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x6f06
movq %r15, %rdi
callq 0x2140
jmp 0x6eee
movq %rbx, %rdi
callq 0x2150
movl $0x6962742e, (%rbx,%rax) # imm = 0x6962742E
movb $0x0, 0x4(%rbx,%rax)
leaq 0x725a(%rip), %rsi      # 0xe111
movq %rbx, %rdi
callq 0x3abc
movq %rax, %r15
leaq 0x74e9(%rip), %rsi      # 0xe3b2
movl $0x4, %edx
movq %rax, %rdi
callq 0x4326
movq %r14, %rdi
movq %r15, %rsi
movl $0x2, %edx
callq 0x6f06
movq %r15, %rdi
callq 0x4433
movq %rbx, %rdi
callq 0x2050
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x2060
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/hts.c
// Function: hts_idx_set_meta
void hts_idx_set_meta(hts_idx_t *idx, int l_meta, uint8_t *meta, int is_copy)
{
	if (idx->meta) free(idx->meta);
	idx->l_meta = l_meta;
	if (is_copy) {
		idx->meta = (uint8_t*)malloc(l_meta);
		memcpy(idx->meta, meta, l_meta);
	} else idx->meta = meta;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r15d
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x76b5
callq 0x2050
movl %ebp, 0x10(%r14)
testl %r15d, %r15d
je 0x76e5
movslq %ebp, %r15
movq %r15, %rdi
callq 0x22a0
movq %rax, 0x38(%r14)
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2240
movq %rbx, 0x38(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/hts.c
// Function: hts_itr_querys
hts_itr_t *hts_itr_querys(const hts_idx_t *idx, const char *reg, hts_name2id_f getid, void *hdr)
{
	int tid, beg, end;
	char *q, *tmp;
	if (strcmp(reg, "*")) {
		q = (char*)hts_parse_reg(reg, &beg, &end);
		tmp = (char*)alloca(q - reg + 1);
		strncpy(tmp, reg, q - reg);
		tmp[q - reg] = 0;
		if ((tid = getid(hdr, tmp)) < 0)
			tid = getid(hdr, reg);
		if (tid < 0) return 0;
		return hts_itr_query(idx, tid, beg, end);
	} else return hts_itr_query(idx, HTS_IDX_NOCOOR, 0, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x66af(%rip), %rsi      # 0xe7c8
movq %r12, %rdi
callq 0x2200
testl %eax, %eax
je 0x8191
movq %rbx, -0x38(%rbp)
leaq -0x30(%rbp), %rsi
leaq -0x2c(%rbp), %rdx
movq %r12, %rdi
callq 0x7f0d
movq %rax, %r13
subq %r12, %r13
leaq 0x10(%r13), %rax
andq $-0x10, %rax
movq %rsp, %rbx
subq %rax, %rbx
movq %rbx, %rsp
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x2080
movb $0x0, (%r13,%rbx)
movq %r15, %rdi
movq %rbx, %rsi
callq *%r14
testl %eax, %eax
jns 0x817a
movq %r15, %rdi
movq %r12, %rsi
callq *%r14
testl %eax, %eax
movq -0x38(%rbp), %rdi
js 0x81b0
movl -0x30(%rbp), %edx
movl -0x2c(%rbp), %ecx
movl %eax, %esi
callq 0x76fe
jmp 0x81b2
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
xorl %edx, %edx
xorl %ecx, %ecx
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x76fe
xorl %eax, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/hts.c
// Function: hts_idx_getfn
char *hts_idx_getfn(const char *fn, const char *ext)
{
	int i, l_fn, l_ext;
	char *fnidx, *ret;
	l_fn = strlen(fn); l_ext = strlen(ext);
	fnidx = (char*)calloc(l_fn + l_ext + 1, 1);
	strcpy(fnidx, fn); strcpy(fnidx + l_fn, ext);
	if ((ret = test_and_fetch(fnidx)) == 0) {
		for (i = l_fn - 1; i >= 0; --i)
			if (fnidx[i] == '.') break;
		strcpy(fnidx + i, ext);
		ret = test_and_fetch(fnidx);
	}
	if (ret == 0) {
		free(fnidx);
		return 0;
	}
	l_fn = strlen(ret);
	memmove(fnidx, ret, l_fn + 1);
	return fnidx;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r12
callq 0x2150
movq %rax, %r15
movq %r14, %rdi
callq 0x2150
addl %r15d, %eax
incl %eax
movslq %eax, %rdi
movl $0x1, %esi
callq 0x21f0
movq %rax, %rbx
movq %rax, %rdi
movq %r12, %rsi
callq 0x20a0
movslq %r15d, %rdi
addq %rbx, %rdi
movq %r14, %rsi
callq 0x20a0
movq %rbx, %rdi
callq 0x842c
movq %rax, %r12
testq %rax, %rax
jne 0x83db
movl %r15d, %eax
movl %r15d, %ecx
sarl $0x1f, %ecx
andl %r15d, %ecx
decl %ecx
decq %rax
testl %r15d, %r15d
jle 0x83bc
movl %eax, %edx
decl %r15d
decq %rax
cmpb $0x2e, (%rbx,%rdx)
jne 0x83a7
jmp 0x83bf
movl %ecx, %r15d
movslq %r15d, %rax
movq %rbx, %rdi
addq %rax, %rdi
movq %r14, %rsi
callq 0x20a0
movq %rbx, %rdi
callq 0x842c
movq %rax, %r12
testq %r12, %r12
je 0x8416
movabsq $0x100000000, %r14      # imm = 0x100000000
movq %r12, %rdi
callq 0x2150
shlq $0x20, %rax
addq %rax, %r14
sarq $0x20, %r14
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2310
movq %rbx, %rdi
callq 0x2050
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/hts.c
// Function: hts_idx_load
hts_idx_t *hts_idx_load(const char *fn, int fmt)
{
	char *fnidx;
	hts_idx_t *idx;
	fnidx = hts_idx_getfn(fn, ".csi");
	if (fnidx) fmt = HTS_FMT_CSI;
	else fnidx = hts_idx_getfn(fn, fmt == HTS_FMT_BAI? ".bai" : ".tbi");
	if (fnidx == 0) return 0;
	idx = hts_idx_load_direct(fnidx, fmt);
	free(fnidx);
	return idx;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r15
leaq 0x5ee0(%rip), %rsi      # 0xe3a3
callq 0x833a
testq %rax, %rax
je 0x84d4
movq %rax, %r14
xorl %ebx, %ebx
jmp 0x84f4
cmpl $0x1, %ebx
leaq 0x5ed9(%rip), %rax      # 0xe3b7
leaq 0x5ec8(%rip), %rsi      # 0xe3ad
cmoveq %rax, %rsi
movq %r15, %rdi
callq 0x833a
movq %rax, %r14
testq %r14, %r14
je 0x8513
movq %r14, %rdi
movl %ebx, %esi
callq 0x71dd
movq %rax, %rbx
movq %r14, %rdi
callq 0x2050
movq %rbx, %rax
jmp 0x8515
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/sam.c
// Function: bam_hdr_destroy
void bam_hdr_destroy(bam_hdr_t *h)
{
	int32_t i;
	if (h == 0) return;
	if (h->target_name) {
		for (i = 0; i < h->n_targets; ++i)
			free(h->target_name[i]);
		free(h->target_name);
		free(h->target_len);
	}
	free(h->text); free(h->cigar_tab);
	if (h->sdict) kh_destroy(s2i, (sdict_t*)h->sdict);
	free(h);
}

// Assembly:
testq %rdi, %rdi
je 0x899f
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x20(%rdi)
je 0x8970
cmpl $0x0, (%rbx)
jle 0x895e
xorl %r14d, %r14d
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2050
incq %r14
movslq (%rbx), %rax
cmpq %rax, %r14
jl 0x8946
movq 0x20(%rbx), %rdi
callq 0x2050
movq 0x10(%rbx), %rdi
callq 0x2050
movq 0x28(%rbx), %rdi
callq 0x2050
movq 0x18(%rbx), %rdi
callq 0x2050
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x8990
callq 0x4ed2
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2050
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/sam.c
// Function: bam_hdr_write
int bam_hdr_write(BGZF *fp, const bam_hdr_t *h)
{
	char buf[4];
	int32_t i, name_len, x;
	// write "BAM1"
	strncpy(buf, "BAM\1", 4);
	bgzf_write(fp, buf, 4);
	// write plain text and the number of reference sequences
	if (fp->is_be) {
		x = ed_swap_4(h->l_text);
		bgzf_write(fp, &x, 4);
		if (h->l_text) bgzf_write(fp, h->text, h->l_text);
		x = ed_swap_4(h->n_targets);
		bgzf_write(fp, &x, 4);
	} else {
		bgzf_write(fp, &h->l_text, 4);
		if (h->l_text) bgzf_write(fp, h->text, h->l_text);
		bgzf_write(fp, &h->n_targets, 4);
	}
	// write sequence names and lengths
	for (i = 0; i != h->n_targets; ++i) {
		char *p = h->target_name[i];
		name_len = strlen(p) + 1;
		if (fp->is_be) {
			x = ed_swap_4(name_len);
			bgzf_write(fp, &x, 4);
		} else bgzf_write(fp, &name_len, 4);
		bgzf_write(fp, p, name_len);
		if (fp->is_be) {
			x = ed_swap_4(h->target_len[i]);
			bgzf_write(fp, &x, 4);
		} else bgzf_write(fp, &h->target_len[i], 4);
	}
	bgzf_flush(fp);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x14(%rsp), %rsi
movl $0x14d4142, (%rsi)      # imm = 0x14D4142
movl $0x4, %edx
callq 0x4326
leaq 0x8(%r14), %r15
testb $0xc, 0x2(%rbx)
je 0x8bf7
movl (%r15), %eax
bswapl %eax
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
movl $0x4, %edx
movq %rbx, %rdi
callq 0x4326
movl (%r15), %edx
testq %rdx, %rdx
je 0x8be1
movq 0x28(%r14), %rsi
movq %rbx, %rdi
callq 0x4326
movl (%r14), %eax
bswapl %eax
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
movl $0x4, %edx
movq %rbx, %rdi
jmp 0x8c26
movl $0x4, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4326
movl (%r15), %edx
testq %rdx, %rdx
je 0x8c1b
movq 0x28(%r14), %rsi
movq %rbx, %rdi
callq 0x4326
movl $0x4, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4326
cmpl $0x0, (%r14)
je 0x8cce
xorl %r13d, %r13d
leaq 0xc(%rsp), %r15
xorl %ebp, %ebp
movq 0x20(%r14), %rax
movq (%rax,%r13,2), %r12
movq %r12, %rdi
callq 0x2150
incl %eax
movl %eax, 0x10(%rsp)
testb $0xc, 0x2(%rbx)
leaq 0x10(%rsp), %rsi
je 0x8c69
bswapl %eax
movl %eax, 0xc(%rsp)
movq %r15, %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x4326
movslq 0x10(%rsp), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4326
testb $0xc, 0x2(%rbx)
je 0x8ca7
movq 0x10(%r14), %rax
movl (%rax,%r13), %eax
bswapl %eax
movl %eax, 0xc(%rsp)
movl $0x4, %edx
movq %rbx, %rdi
movq %r15, %rsi
jmp 0x8cb6
movq 0x10(%r14), %rsi
addq %r13, %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x4326
incq %rbp
movl (%r14), %eax
addq $0x4, %r13
cmpq %rax, %rbp
jne 0x8c3f
movq %rbx, %rdi
callq 0x4128
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/sam.c
// Function: bam_name2id
int bam_name2id(bam_hdr_t *h, const char *ref)
{
	sdict_t *d = (sdict_t*)h->sdict;
	khint_t k;
	if (h->sdict == 0) {
		int i, absent;
		d = kh_init(s2i);
		for (i = 0; i < h->n_targets; ++i) {
			k = kh_put(s2i, d, h->target_name[i], &absent);
			kh_val(d, k) = i;
		}
		h->sdict = d;
	}
	k = kh_get(s2i, d, ref);
	return k == kh_end(d)? -1 : kh_val(d, k);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq 0x30(%rdi), %rbx
testq %rbx, %rbx
jne 0x8d47
movq %rdi, %r15
xorl %eax, %eax
callq 0x4ec3
movq %rax, %rbx
cmpl $0x0, (%r15)
jle 0x8d43
xorl %r13d, %r13d
leaq 0xc(%rsp), %r12
movq 0x20(%r15), %rax
movq (%rax,%r13,8), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x529d
movq 0x20(%rbx), %rcx
movl %eax, %eax
movq %r13, (%rcx,%rax,8)
incq %r13
movslq (%r15), %rax
cmpq %rax, %r13
jl 0x8d1b
movq %rbx, 0x30(%r15)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4f3b
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl (%rbx), %ecx
je 0x8d66
movq 0x20(%rbx), %rax
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/sam.c
// Function: bam_copy1
bam1_t *bam_copy1(bam1_t *bdst, const bam1_t *bsrc)
{
	uint8_t *data = bdst->data;
	int m_data = bdst->m_data;   // backup data and m_data
	if (m_data < bsrc->l_data) { // double the capacity
		m_data = bsrc->l_data; kroundup32(m_data);
		data = (uint8_t*)realloc(data, m_data);
	}
	memcpy(data, bsrc->data, bsrc->l_data); // copy var-len data
	*bdst = *bsrc; // copy the rest
	// restore the backup
	bdst->m_data = m_data;
	bdst->data = data;
	return bdst;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x28(%rdi), %r15
movl 0x24(%rdi), %ebp
movl 0x20(%rsi), %eax
cmpl %eax, %ebp
jge 0x8dee
decl %eax
movl %eax, %ecx
sarl %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x2, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x4, %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x8, %eax
orl %ecx, %eax
movl %eax, %ebp
sarl $0x10, %ebp
orl %eax, %ebp
incl %ebp
movslq %ebp, %rsi
movq %r15, %rdi
callq 0x22e0
movq %rax, %r15
movq 0x28(%r14), %rsi
movslq 0x20(%r14), %rdx
movq %r15, %rdi
callq 0x2240
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm0, (%rbx)
movups %xmm1, 0x10(%rbx)
movl %ebp, 0x24(%rbx)
movq %r15, 0x28(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/sam.c
// Function: bam_cigar2qlen
int bam_cigar2qlen(int n_cigar, const uint32_t *cigar)
{
	int k, l;
	for (k = l = 0; k < n_cigar; ++k)
		if (bam_cigar_type(bam_cigar_op(cigar[k]))&1)
			l += bam_cigar_oplen(cigar[k]);
	return l;
}

// Assembly:
testl %edi, %edi
jle 0x8e63
movl %edi, %ecx
xorl %edx, %edx
movl $0x3c1a7, %edi          # imm = 0x3C1A7
xorl %eax, %eax
movl (%rsi,%rdx,4), %r8d
leal (%r8,%r8), %r9d
btl %r9d, %edi
movl $0x0, %r9d
sbbl %r9d, %r9d
shrl $0x4, %r8d
andl %r9d, %r8d
addl %r8d, %eax
incq %rdx
cmpq %rdx, %rcx
jne 0x8e3b
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/sam.c
// Function: bam_cigar2rlen
int bam_cigar2rlen(int n_cigar, const uint32_t *cigar)
{
	int k, l;
	for (k = l = 0; k < n_cigar; ++k)
		if (bam_cigar_type(bam_cigar_op(cigar[k]))&2)
			l += bam_cigar_oplen(cigar[k]);
	return l;
}

// Assembly:
testl %edi, %edi
jle 0x8e9c
movl %edi, %edx
xorl %edi, %edi
xorl %eax, %eax
movl (%rsi,%rdi,4), %r8d
leal (%r8,%r8), %ecx
movl $0x3c1a7, %r9d          # imm = 0x3C1A7
shrl %cl, %r9d
shll $0x1e, %r9d
sarl $0x1f, %r9d
shrl $0x4, %r8d
andl %r9d, %r8d
addl %r8d, %eax
incq %rdi
cmpq %rdi, %rdx
jne 0x8e70
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/sam.c
// Function: bam_write1
int bam_write1(BGZF *fp, const bam1_t *b)
{
	const bam1_core_t *c = &b->core;
	uint32_t x[8], block_len = b->l_data + 32, y;
	int i;
	x[0] = c->tid;
	x[1] = c->pos;
	x[2] = (uint32_t)c->bin<<16 | c->qual<<8 | c->l_qname;
	x[3] = (uint32_t)c->flag<<16 | c->n_cigar;
	x[4] = c->l_qseq;
	x[5] = c->mtid;
	x[6] = c->mpos;
	x[7] = c->isize;
	bgzf_flush_try(fp, 4 + block_len);
	if (fp->is_be) {
		for (i = 0; i < 8; ++i) ed_swap_4p(x + i);
		y = block_len;
		bgzf_write(fp, ed_swap_4p(&y), 4);
		swap_data(c, b->l_data, b->data);
	} else bgzf_write(fp, &block_len, 4);
	bgzf_write(fp, x, 32);
	bgzf_write(fp, b->data, b->l_data);
	if (fp->is_be) swap_data(c, b->l_data, b->data);
	return 4 + block_len;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x20(%rsi), %esi
leal 0x20(%rsi), %eax
movl %eax, 0xc(%rsp)
movl (%rbx), %eax
movl %eax, 0x10(%rsp)
movl 0x4(%rbx), %eax
movl %eax, 0x14(%rsp)
movq 0x8(%rbx), %rax
movl %eax, %ecx
shll $0x10, %ecx
movl %eax, %edx
shrl $0x8, %edx
andl $0xff00, %edx           # imm = 0xFF00
orl %ecx, %edx
movl %eax, %ecx
shrl $0x18, %ecx
orl %edx, %ecx
movl %ecx, 0x18(%rsp)
movq %rax, %rcx
shrq $0x10, %rcx
andl $0xffff0000, %ecx       # imm = 0xFFFF0000
shrq $0x30, %rax
orl %ecx, %eax
movl %eax, 0x1c(%rsp)
movl 0x10(%rbx), %eax
movl %eax, 0x20(%rsp)
movl 0x14(%rbx), %eax
movl %eax, 0x24(%rsp)
movl 0x18(%rbx), %eax
movl %eax, 0x28(%rsp)
movl 0x1c(%rbx), %eax
movl %eax, 0x2c(%rsp)
addl $0x24, %esi
callq 0x42cb
testb $0xc, 0x2(%r14)
je 0x92cb
xorl %eax, %eax
movl 0x10(%rsp,%rax,4), %ecx
bswapl %ecx
movl %ecx, 0x10(%rsp,%rax,4)
incq %rax
cmpq $0x8, %rax
jne 0x928d
movl 0xc(%rsp), %eax
bswapl %eax
leaq 0x34(%rsp), %rsi
movl %eax, (%rsi)
movl $0x4, %edx
movq %r14, %rdi
callq 0x4326
movl 0x20(%rbx), %esi
movq 0x28(%rbx), %rdx
movq %rbx, %rdi
callq 0x9021
jmp 0x92dd
leaq 0xc(%rsp), %rsi
movl $0x4, %edx
movq %r14, %rdi
callq 0x4326
leaq 0x10(%rsp), %rsi
movl $0x20, %edx
movq %r14, %rdi
callq 0x4326
movq 0x28(%rbx), %rsi
movslq 0x20(%rbx), %rdx
movq %r14, %rdi
callq 0x4326
testb $0xc, 0x2(%r14)
je 0x9315
movl 0x20(%rbx), %esi
movq 0x28(%rbx), %rdx
movq %rbx, %rdi
callq 0x9021
movl 0xc(%rsp), %eax
addl $0x4, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/sam.c
// Function: bam_index
hts_idx_t *bam_index(BGZF *fp, int min_shift)
{
	int n_lvls, i, fmt;
	bam1_t *b;
	hts_idx_t *idx;
	bam_hdr_t *h;
	h = bam_hdr_read(fp);
	if (min_shift > 0) {
		int64_t max_len = 0, s;
		for (i = 0; i < h->n_targets; ++i)
			if (max_len < h->target_len[i]) max_len = h->target_len[i];
		max_len += 256;
		for (n_lvls = 0, s = 1<<min_shift; max_len > s; ++n_lvls, s <<= 3);
		fmt = HTS_FMT_CSI;
	} else min_shift = 14, n_lvls = 5, fmt = HTS_FMT_BAI;
	idx = hts_idx_init(h->n_targets, fmt, bgzf_tell(fp), min_shift, n_lvls);
	bam_hdr_destroy(h);
	b = bam_init1();
	while (bam_read1(fp, b) >= 0) {
		int l, ret;
		l = bam_cigar2rlen(b->core.n_cigar, bam_get_cigar(b));
		if (l == 0) l = 1; // no zero-length records
		ret = hts_idx_push(idx, b->core.tid, b->core.pos, b->core.pos + l, bgzf_tell(fp), !(b->core.flag&BAM_FUNMAP));
		if (ret < 0) break; // unsorted
	}
	hts_idx_finish(idx, bgzf_tell(fp));
	bam_destroy1(b);
	return idx;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x89a0
movq %rax, %r15
testl %ebp, %ebp
jle 0x9369
movslq (%r15), %rcx
testq %rcx, %rcx
jle 0x937b
movq 0x10(%r15), %rdx
xorl %esi, %esi
xorl %eax, %eax
movq %rax, %rdi
movl (%rdx,%rsi,4), %eax
cmpq %rax, %rdi
cmovgq %rdi, %rax
incq %rsi
cmpq %rsi, %rcx
jne 0x934c
addq $0x100, %rax            # imm = 0x100
jmp 0x9380
movl $0xe, %ebp
movl $0x5, %r8d
movl $0x1, %esi
jmp 0x93a9
movl $0x100, %eax            # imm = 0x100
movl $0x1, %edx
movl %ebp, %ecx
shll %cl, %edx
movslq %edx, %rcx
xorl %esi, %esi
cmpq %rcx, %rax
jle 0x93a6
xorl %esi, %esi
xorl %r8d, %r8d
incl %r8d
shlq $0x3, %rcx
cmpq %rcx, %rax
jg 0x9398
jmp 0x93a9
xorl %r8d, %r8d
movl (%r15), %edi
movq 0x10(%rbx), %rax
shlq $0x10, %rax
movzwl 0xc(%rbx), %edx
orq %rax, %rdx
movl %ebp, %ecx
callq 0x5e3a
movq %rax, %r14
movq %r15, %rdi
callq 0x892b
movl $0x1, %edi
movl $0x30, %esi
callq 0x21f0
movq %rax, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8e9f
testl %eax, %eax
js 0x9477
movq 0x8(%r15), %rdi
xorl %eax, %eax
movq %rdi, %rdx
shrq $0x30, %rdx
je 0x943a
movl %edi, %esi
shrl $0x18, %esi
addq 0x28(%r15), %rsi
xorl %r8d, %r8d
xorl %eax, %eax
movl (%rsi,%r8,4), %r9d
leal (%r9,%r9), %ecx
movl $0x3c1a7, %r10d         # imm = 0x3C1A7
shrl %cl, %r10d
shll $0x1e, %r10d
sarl $0x1f, %r10d
shrl $0x4, %r9d
andl %r10d, %r9d
addl %r9d, %eax
incq %r8
cmpq %r8, %rdx
jne 0x940f
cmpl $0x1, %eax
adcl $0x0, %eax
movl (%r15), %esi
movl 0x4(%r15), %edx
addl %edx, %eax
movq 0x10(%rbx), %rcx
shlq $0x10, %rcx
movzwl 0xc(%rbx), %r8d
orq %rcx, %r8
xorl %r9d, %r9d
btq $0x22, %rdi
setae %r9b
movq %r14, %rdi
movl %eax, %ecx
callq 0x6720
testl %eax, %eax
jns 0x93df
movq 0x10(%rbx), %rax
shlq $0x10, %rax
movzwl 0xc(%rbx), %esi
orq %rax, %rsi
movq %r14, %rdi
callq 0x5ef7
movq %r15, %rdi
callq 0x8d83
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/sam.c
// Function: bam_index_build
int bam_index_build(const char *fn, int min_shift)
{
	hts_idx_t *idx;
	BGZF *fp;
	if ((fp = bgzf_open(fn, "r")) == 0) return -1;
	idx = bam_index(fp, min_shift);
	bgzf_close(fp);
	hts_idx_save(idx, fn, min_shift > 0? HTS_FMT_CSI : HTS_FMT_BAI);
	hts_idx_destroy(idx);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x5459(%rip), %rsi      # 0xe910
callq 0x3abc
testq %rax, %rax
je 0x94f7
movq %rax, %r14
movq %rax, %rdi
movl %ebp, %esi
callq 0x9324
movq %rax, %r15
movq %r14, %rdi
callq 0x4433
xorl %edx, %edx
testl %ebp, %ebp
setle %dl
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6d71
movq %r15, %rdi
callq 0x6c8c
xorl %eax, %eax
jmp 0x94fc
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/sam.c
// Function: bam_readrec
int bam_readrec(BGZF *fp, void *null, bam1_t *b, int *tid, int *beg, int *end)
{
	int ret;
	if ((ret = bam_read1(fp, b)) >= 0) {
		*tid = b->core.tid; *beg = b->core.pos;
		*end = b->core.pos + (b->core.n_cigar? bam_cigar2rlen(b->core.n_cigar, bam_get_cigar(b)) : 1);
	}
	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r14
movq %rdx, %rsi
callq 0x8e9f
testl %eax, %eax
js 0x958a
movl (%r14), %ecx
movl %ecx, (%r12)
movl 0x4(%r14), %ecx
movl %ecx, (%r15)
movl 0x4(%r14), %edx
movq 0x8(%r14), %rsi
movq %rsi, %rdi
shrq $0x30, %rdi
movl $0x1, %r8d
je 0x9584
shrl $0x18, %esi
addq 0x28(%r14), %rsi
xorl %r9d, %r9d
xorl %r8d, %r8d
movl (%rsi,%r9,4), %r10d
leal (%r10,%r10), %ecx
movl $0x3c1a7, %r11d         # imm = 0x3C1A7
shrl %cl, %r11d
shll $0x1e, %r11d
sarl $0x1f, %r11d
shrl $0x4, %r10d
andl %r11d, %r10d
addl %r10d, %r8d
incq %r9
cmpq %r9, %rdi
jne 0x9559
addl %edx, %r8d
movl %r8d, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/sam.c
// Function: sam_hdr_read
bam_hdr_t *sam_hdr_read(htsFile *fp)
{
	if (!fp->is_bin) {
		kstring_t str;
		bam_hdr_t *h;
		str.l = str.m = 0; str.s = 0;
		while (hts_getline(fp, KS_SEP_LINE, &fp->line) >= 0) {
			if (fp->line.s[0] != '@') break;
			kputsn(fp->line.s, fp->line.l, &str);
			kputc('\n', &str);
		}
		h = sam_hdr_parse(str.l, str.s);
		h->l_text = str.l; h->text = str.s;
		return h;
	} else return bam_hdr_read((BGZF*)fp->fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testb $0x1, (%rdi)
jne 0x991e
leaq 0x10(%rbx), %r13
movq %rbx, %rdi
movl $0x2, %esi
movq %r13, %rdx
callq 0x5715
testl %eax, %eax
js 0x9935
xorl %r14d, %r14d
xorl %r12d, %r12d
xorl %r15d, %r15d
movq %rbx, (%rsp)
movq 0x20(%rbx), %rbp
cmpb $0x40, (%rbp)
jne 0x993b
movq %r13, %rbx
movslq (%r13), %r13
leaq (%r14,%r13), %rax
incq %rax
cmpq %r12, %rax
jb 0x9891
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %r12
shrq $0x10, %r12
orq %rax, %r12
incq %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x22e0
movq %rax, %r15
leaq (%r15,%r14), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x2240
leaq (%r14,%r13), %rbp
movb $0x0, (%r15,%rbp)
addq %r13, %r14
incq %r14
cmpq %r12, %r14
jb 0x98f6
movq %r14, %rax
shrq %rax
orq %r14, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %r12
shrq $0x10, %r12
orq %rcx, %r12
incq %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x22e0
movq %rax, %r15
movq %rbx, %r13
movw $0xa, (%r15,%rbp)
movq (%rsp), %rbx
movq %rbx, %rdi
movl $0x2, %esi
movq %r13, %rdx
callq 0x5715
testl %eax, %eax
jns 0x982e
jmp 0x993b
movq 0x38(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x89a0
xorl %r15d, %r15d
xorl %r14d, %r14d
movq %r15, %rsi
callq 0x9596
movl %r14d, 0x8(%rax)
movq %r15, 0x28(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/./kstring.h
// Function: kputsn_
static inline void kputsn_(const void *p, int l, kstring_t *s)
{
	if (s->l + l > s->m) {
		s->m = s->l + l;
		kroundup32(s->m);
		s->s = (char*)realloc(s->s, s->m);
	}
	memcpy(s->s + s->l, p, l);
	s->l += l;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r15
movslq %esi, %r14
movq (%rdx), %rax
addq %r14, %rax
cmpq 0x8(%rdx), %rax
jbe 0xac06
decq %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x22e0
movq %rax, 0x10(%rbx)
movq 0x10(%rbx), %rdi
addq (%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2240
addq %r14, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/./kstring.h
// Function: kputc_
static inline void kputc_(int c, kstring_t *s)
{
	if (s->l + 1 > s->m) {
		s->m = s->l + 1;
		kroundup32(s->m);
		s->s = (char*)realloc(s->s, s->m);
	}
	s->s[s->l++] = c;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebx
movq (%rsi), %rax
leaq 0x1(%rax), %rcx
cmpq 0x8(%rsi), %rcx
jbe 0xacd0
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%r14)
movq 0x10(%r14), %rdi
callq 0x22e0
movq %rax, 0x10(%r14)
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r14)
movb %bl, (%rcx,%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/sam.c
// Function: sam_read1
int sam_read1(htsFile *fp, bam_hdr_t *h, bam1_t *b)
{
	if (!fp->is_bin) {
		int ret;
err_recover:
		if (fp->line.l == 0) {
			ret = hts_getline(fp, KS_SEP_LINE, &fp->line);
			if (ret < 0) return -1;
		}
		ret = sam_parse1(&fp->line, h, b);
		fp->line.l = 0;
		if (ret < 0) {
			if (hts_verbose >= 1)
				fprintf(stderr, "[W::%s] parse error at line %lld\n", __func__, (long long)fp->lineno);
			if (h->ignore_sam_err) goto err_recover;
		}
		return ret;
	} else return bam_read1((BGZF*)fp->fp, b);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
testb $0x1, (%rdi)
jne 0xad67
movq %rsi, %r15
leaq 0x10(%r14), %r12
leaq 0x8(%r14), %rax
movq %rax, (%rsp)
leaq 0x750b(%rip), %r13      # 0x12220
cmpq $0x0, (%r12)
jne 0xad30
movq %r14, %rdi
movl $0x2, %esi
movq %r12, %rdx
callq 0x5715
testl %eax, %eax
js 0xad81
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x9d24
movl %eax, %ebp
movq $0x0, (%r12)
testl %eax, %eax
jns 0xad86
cmpl $0x0, (%r13)
jg 0xad5c
cmpl $0x0, 0x4(%r15)
jne 0xad15
jmp 0xad86
movq (%rsp), %rdi
callq 0x2696
jmp 0xad53
movq 0x38(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8e9f
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/./kstring.h
// Function: kputuw
static inline int kputuw(unsigned c, kstring_t *s)
{
	char buf[16];
	int l, i;
	unsigned x;
	if (c == 0) return kputc('0', s);
	for (l = 0, x = c; x > 0; x /= 10) buf[l++] = x%10 + '0';
	if (s->l + l + 1 >= s->m) {
		s->m = s->l + l + 2;
		kroundup32(s->m);
		s->s = (char*)realloc(s->s, s->m);
	}
	for (i = l - 1; i >= 0; --i) s->s[s->l++] = buf[i];
	s->s[s->l] = 0;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
testl %edi, %edi
je 0xc361
movl $0x1, %r14d
movl $0xcccccccd, %eax       # imm = 0xCCCCCCCD
movl %edi, %ecx
imulq %rax, %rcx
shrq $0x23, %rcx
leal (%rcx,%rcx), %edx
leal (%rdx,%rdx,4), %edx
movl %edi, %esi
subl %edx, %esi
orb $0x30, %sil
movb %sil, -0x1(%rsp,%r14)
incq %r14
cmpl $0x9, %edi
movl %ecx, %edi
ja 0xc2c0
movl %r14d, %eax
addq (%rbx), %rax
cmpq 0x8(%rbx), %rax
jb 0xc338
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x22e0
movq %rax, 0x10(%rbx)
addq $-0x2, %r14
movl %r14d, %eax
movb (%rsp,%rax), %al
movq (%rbx), %rcx
movq 0x10(%rbx), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, (%rbx)
movb %al, (%rdx,%rcx)
decq %r14
leal 0x2(%r14), %eax
cmpl $0x1, %eax
jg 0xc33c
jmp 0xc3c4
movq (%rbx), %rax
incq %rax
cmpq 0x8(%rbx), %rax
jb 0xc3b2
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x22e0
movq %rax, 0x10(%rbx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movb $0x30, (%rcx,%rax)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/sam.c
// Function: sam_write1
int sam_write1(htsFile *fp, const bam_hdr_t *h, const bam1_t *b)
{
	if (!fp->is_bin) {
		sam_format1(h, b, &fp->line);
		fwrite(fp->line.s, 1, fp->line.l, (FILE*)fp->fp);
		fputc('\n', (FILE*)fp->fp);
		return fp->line.l + 1;
	} else return bam_write1((BGZF*)fp->fp, b);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testb $0x1, (%rdi)
jne 0xc55b
leaq 0x10(%rbx), %rax
movq %rsi, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0xad97
movq 0x10(%rbx), %rdx
movq 0x20(%rbx), %rdi
movq 0x38(%rbx), %rcx
movl $0x1, %esi
callq 0x23b0
movq 0x38(%rbx), %rsi
movl $0xa, %edi
callq 0x21c0
movl 0x10(%rbx), %eax
incl %eax
popq %rbx
retq
movq 0x38(%rbx), %rdi
movq %rdx, %rsi
popq %rbx
jmp 0x9204
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/sam.c
// Function: bam_aux_append
void bam_aux_append(bam1_t *b, const char tag[2], char type, int len, uint8_t *data)
{
	int ori_len = b->l_data;
	b->l_data += 3 + len;
	if (b->m_data < b->l_data) {
		b->m_data = b->l_data;
		kroundup32(b->m_data);
		b->data = (uint8_t*)realloc(b->data, b->m_data);
	}
	b->data[ori_len] = tag[0]; b->data[ori_len + 1] = tag[1];
	b->data[ori_len + 2] = type;
	memcpy(b->data + ori_len + 3, data, len);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %r14d
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %r15
movslq 0x20(%rdi), %r13
leal (%r14,%r13), %eax
addl $0x3, %eax
movl %eax, 0x20(%rdi)
cmpl %eax, 0x24(%rdi)
jge 0xc61b
decl %eax
movl %eax, %ecx
sarl %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x2, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x4, %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x8, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x10, %ecx
orl %eax, %ecx
incl %ecx
movl %ecx, 0x24(%r15)
movq 0x28(%r15), %rdi
movslq %ecx, %rsi
callq 0x22e0
movq %rax, 0x28(%r15)
movb (%r12), %al
movq 0x28(%r15), %rcx
movb %al, (%rcx,%r13)
movb 0x1(%r12), %al
movq 0x28(%r15), %rcx
movb %al, 0x1(%rcx,%r13)
movq 0x28(%r15), %rax
movb %bpl, 0x2(%rax,%r13)
movq 0x28(%r15), %rax
leaq (%rax,%r13), %rdi
addq $0x3, %rdi
movslq %r14d, %rdx
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2240
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/sam.c
// Function: bam_aux_get
uint8_t *bam_aux_get(const bam1_t *b, const char tag[2])
{
	uint8_t *s;
	int y = tag[0]<<8 | tag[1];
	s = bam_get_aux(b);
	while (s < b->data + b->l_data) {
		int x = (int)s[0]<<8 | s[1];
		s += 2;
		if (x == y) return s;
		__skip_tag(s);
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movsbl (%rsi), %eax
shll $0x8, %eax
movsbl 0x1(%rsi), %ebp
orl %eax, %ebp
movq 0x8(%rdi), %rax
movq 0x28(%rdi), %rcx
movq %rax, %rdx
shrq $0x30, %rdx
leaq (%rcx,%rdx,4), %rdx
shrl $0x18, %eax
addq %rdx, %rax
movslq 0x10(%rdi), %rdx
leal 0x1(%rdx), %esi
sarl %esi
movslq %esi, %rbx
addq %rax, %rbx
addq %rdx, %rbx
movslq 0x20(%rdi), %r14
addq %rcx, %r14
leaq 0x1d89(%rip), %r12      # 0xe43c
cmpq %r14, %rbx
jae 0xc7c4
movzwl (%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %r15d
cmpl %ebp, %r15d
jne 0xc6db
addq $0x2, %rbx
movq %rbx, %rax
movq %rbx, %r13
jmp 0xc77d
callq 0x2030
movq (%rax), %rax
movzbl 0x2(%rbx), %ecx
movl (%rax,%rcx,4), %ecx
leaq 0x3(%rbx), %rax
movl $0x1, %edx
leal -0x41(%rcx), %esi
cmpl $0x7, %esi
ja 0xc737
movslq (%r12,%rsi,4), %rsi
addq %r12, %rsi
jmpq *%rsi
movzbl (%rax), %ecx
leal -0x41(%rcx), %esi
cmpl $0x22, %esi
ja 0xc78b
movl $0x1, %edx
movabsq $0x400000005, %rdi      # imm = 0x400000005
btq %rsi, %rdi
jae 0xc78b
movslq 0x4(%rbx), %rcx
movl %edx, %edx
imulq %rcx, %rdx
addq %rdx, %rax
addq $0x5, %rax
jmp 0xc77d
cmpl $0x63, %ecx
je 0xc77a
cmpl $0x5a, %ecx
jne 0xc74c
cmpb $0x0, (%rax)
leaq 0x1(%rax), %rax
jne 0xc741
jmp 0xc77d
movl %ecx, %esi
andl $-0x21, %esi
movl $0x2, %edx
cmpl $0x53, %esi
je 0xc77a
addl $-0x49, %ecx
cmpl $0x20, %ecx
ja 0xc778
movl $0x4, %edx
movabsq $0x120000001, %rsi      # imm = 0x120000001
btq %rcx, %rsi
jb 0xc77a
xorl %edx, %edx
addq %rdx, %rax
movq %rax, %rbx
cmpl %ebp, %r15d
jne 0xc6b3
jmp 0xc7c7
movl %ecx, %esi
andb $-0x21, %sil
movl $0x2, %edx
cmpb $0x53, %sil
je 0xc724
addl $-0x49, %ecx
cmpl $0x20, %ecx
ja 0xc7bd
movl $0x4, %edx
movabsq $0x120000001, %rsi      # imm = 0x120000001
btq %rcx, %rsi
jb 0xc724
xorl %edx, %edx
jmp 0xc724
xorl %r13d, %r13d
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/sam.c
// Function: bam_aux_del
int bam_aux_del(bam1_t *b, uint8_t *s)
{
	uint8_t *p, *aux;
	int l_aux = bam_get_l_aux(b);
	aux = bam_get_aux(b);
	p = s - 2;
	__skip_tag(s);
	memmove(p, s, l_aux - (s - aux));
	b->l_data -= s - p;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x20(%rdi), %r15d
movq 0x8(%rdi), %r12
movslq 0x10(%rdi), %r13
movq 0x28(%rdi), %rbp
callq 0x2030
movq (%rax), %rax
movzbl (%rbx), %ecx
movl (%rax,%rcx,4), %ecx
leaq 0x1(%rbx), %rax
movl $0x1, %edx
leal -0x41(%rcx), %esi
cmpl $0x7, %esi
ja 0xc868
leaq 0x1c3c(%rip), %rdi      # 0xe45c
movslq (%rdi,%rsi,4), %rsi
addq %rdi, %rsi
movl %r15d, %r8d
jmpq *%rsi
movzbl (%rax), %ecx
leal -0x41(%rcx), %esi
cmpl $0x22, %esi
ja 0xc917
movl $0x1, %edx
movabsq $0x400000005, %rdi      # imm = 0x400000005
btq %rsi, %rdi
jae 0xc917
movslq 0x2(%rbx), %rcx
movl %edx, %edx
imulq %rcx, %rdx
leaq (%rax,%rdx), %r15
addq $0x5, %r15
jmp 0xc8b7
cmpl $0x63, %ecx
movl %r15d, %r8d
je 0xc8b1
cmpl $0x5a, %ecx
jne 0xc883
leaq 0x1(%rax), %r15
cmpb $0x0, (%rax)
movq %r15, %rax
jne 0xc875
jmp 0xc8b7
movl %ecx, %esi
andl $-0x21, %esi
movl $0x2, %edx
cmpl $0x53, %esi
je 0xc8b1
addl $-0x49, %ecx
cmpl $0x20, %ecx
ja 0xc8af
movl $0x4, %edx
movabsq $0x120000001, %rsi      # imm = 0x120000001
btq %rcx, %rsi
jb 0xc8b1
xorl %edx, %edx
addq %rdx, %rax
movq %rax, %r15
addq $-0x2, %rbx
movq %r12, %rax
shrq $0x2e, %rax
andl $-0x4, %eax
addq %rax, %rbp
shrl $0x18, %r12d
leaq (%r12,%rbp), %rcx
leal 0x1(%r13), %edx
sarl %edx
movslq %edx, %rdx
addq %rdx, %rcx
addq %r13, %rcx
addl %r13d, %r12d
addl %eax, %r12d
addl %r12d, %edx
subl %edx, %r8d
movslq %r8d, %rdx
addq %rcx, %rdx
subq %r15, %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2310
subl %r15d, %ebx
addl %ebx, 0x20(%r14)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ecx, %esi
andb $-0x21, %sil
movl $0x2, %edx
cmpb $0x53, %sil
je 0xc854
addl $-0x49, %ecx
cmpl $0x20, %ecx
ja 0xc94d
movl $0x4, %edx
movabsq $0x120000001, %rsi      # imm = 0x120000001
btq %rcx, %rsi
jb 0xc854
xorl %edx, %edx
jmp 0xc854
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/sam.c
// Function: bam_aux2i
int32_t bam_aux2i(const uint8_t *s)
{
	int type;
	type = *s++;
	if (type == 'c') return (int32_t)*(int8_t*)s;
	else if (type == 'C') return (int32_t)*(uint8_t*)s;
	else if (type == 's') return (int32_t)*(int16_t*)s;
	else if (type == 'S') return (int32_t)*(uint16_t*)s;
	else if (type == 'i' || type == 'I') return *(int32_t*)s;
	else return 0;
}

// Assembly:
movb (%rdi), %cl
leal -0x43(%rcx), %eax
rolb $0x4, %al
cmpb $0x3, %al
ja 0xc987
movzbl %al, %eax
leaq 0x1b12(%rip), %rcx      # 0xe47c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl 0x1(%rdi), %eax
retq
movsbl 0x1(%rdi), %eax
retq
movswl 0x1(%rdi), %eax
retq
movzwl 0x1(%rdi), %eax
retq
andb $-0x21, %cl
xorl %eax, %eax
cmpb $0x49, %cl
jne 0xc994
movl 0x1(%rdi), %eax
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/sam.c
// Function: bam_aux2f
double bam_aux2f(const uint8_t *s)
{
	int type;
	type = *s++;
	if (type == 'd') return *(double*)s;
	else if (type == 'f') return *(float*)s;
	else return 0.0;
}

// Assembly:
movzbl (%rdi), %eax
cmpl $0x66, %eax
je 0xc9ab
xorps %xmm0, %xmm0
cmpl $0x64, %eax
jne 0xc9b0
movsd 0x1(%rdi), %xmm0
retq
cvtss2sd 0x1(%rdi), %xmm0
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/sam.c
// Function: bam_plp_init
bam_plp_t bam_plp_init(bam_plp_auto_f func, void *data)
{
	bam_plp_t iter;
	iter = (bam_plp_t)calloc(1, sizeof(struct __bam_plp_t));
	iter->mp = mp_init();
	iter->head = iter->tail = mp_alloc(iter->mp);
	iter->dummy = mp_alloc(iter->mp);
	iter->max_tid = iter->max_pos = -1;
	iter->flag_mask = BAM_PLP_MASK;
	iter->maxcnt = 8000;
	if (func) {
		iter->func = func;
		iter->data = data;
		iter->b = bam_init1();
	}
	return iter;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edi
movl $0x68, %esi
callq 0x21f0
movq %rax, %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0x21f0
movq %rax, %r12
movq %rax, (%rbx)
movl (%rax), %r13d
leal 0x1(%r13), %eax
movl %eax, (%r12)
movslq 0x4(%r12), %rax
testq %rax, %rax
je 0xca34
movq 0x10(%r12), %rcx
leaq -0x1(%rax), %rdx
movl %edx, 0x4(%r12)
movq -0x8(%rcx,%rax,8), %rax
jmp 0xca43
movl $0x1, %edi
movl $0x50, %esi
callq 0x21f0
movq %rax, 0x10(%rbx)
movq %rax, 0x8(%rbx)
addl $0x2, %r13d
movl %r13d, (%r12)
movslq 0x4(%r12), %rax
testq %rax, %rax
je 0xca72
movq 0x10(%r12), %rcx
leaq -0x1(%rax), %rdx
movl %edx, 0x4(%r12)
movq -0x8(%rcx,%rax,8), %rax
jmp 0xca81
movl $0x1, %edi
movl $0x50, %esi
callq 0x21f0
movq %rax, 0x18(%rbx)
movq $-0x1, 0x28(%rbx)
movl $0x704, 0x34(%rbx)      # imm = 0x704
movl $0x1f40, 0x40(%rbx)     # imm = 0x1F40
testq %r15, %r15
je 0xcabb
movq %r15, 0x58(%rbx)
movq %r14, 0x60(%rbx)
movl $0x1, %edi
movl $0x30, %esi
callq 0x21f0
movq %rax, 0x50(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq