LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/vcf.c
// Function: bcf_hdr_destroy
void bcf_hdr_destroy(bcf_hdr_t *h)
{
	int i;
	khint_t k;
	for (i = 0; i < 3; ++i) {
		vdict_t *d = (vdict_t*)h->dict[i];
		if (d == 0) continue;
		for (k = kh_begin(d); k != kh_end(d); ++k)
			if (kh_exist(d, k)) free((char*)kh_key(d, k));
		kh_destroy(vdict, d);
		free(h->id[i]);
	}
	free(h->mem.s); free(h->text);
	free(h);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %r15d, %r15d
movq 0x30(%rbx,%r15,8), %r14
testq %r14, %r14
je 0xba08
movl (%r14), %eax
testl %eax, %eax
je 0xb9db
xorl %ebp, %ebp
xorl %r12d, %r12d
movq 0x10(%r14), %rcx
movl %r12d, %edx
shrl $0x4, %edx
movl (%rcx,%rdx,4), %edx
movl %ebp, %ecx
andb $0x1e, %cl
shrl %cl, %edx
testb $0x3, %dl
jne 0xb9d0
movq 0x18(%r14), %rax
movl %r12d, %ecx
movq (%rax,%rcx,8), %rdi
callq 0x2050
movl (%r14), %eax
incl %r12d
addl $0x2, %ebp
cmpl %eax, %r12d
jne 0xb9a4
movq 0x18(%r14), %rdi
callq 0x2050
movq 0x10(%r14), %rdi
callq 0x2050
movq 0x20(%r14), %rdi
callq 0x2050
movq %r14, %rdi
callq 0x2050
movq 0x18(%rbx,%r15,8), %rdi
callq 0x2050
incq %r15
cmpq $0x3, %r15
jne 0xb98e
movq 0x60(%rbx), %rdi
callq 0x2050
movq 0x48(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/vcf.c
// Function: bcf_hdr_read
bcf_hdr_t *bcf_hdr_read(BGZF *fp)
{
	uint8_t magic[5];
	bcf_hdr_t *h;
	h = bcf_hdr_init();
	bgzf_read(fp, magic, 5);
	if (strncmp((char*)magic, "BCF\2\2", 5) != 0) {
		if (hts_verbose >= 2)
			fprintf(stderr, "[E::%s] invalid BCF2 magic string\n", __func__);
		bcf_hdr_destroy(h);
		return 0;
	}
	bgzf_read(fp, &h->l_text, 4);
	h->m_text = h->l_text;
	h->text = (char*)malloc(h->l_text);
	bgzf_read(fp, h->text, h->l_text);
	bcf_hdr_parse(h);
	return h;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
callq 0xb93d
movq %rax, %rbx
leaq 0xb(%rsp), %r15
movl $0x5, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x4dc0
movl $0x2464342, %eax        # imm = 0x2464342
xorl (%r15), %eax
movzbl 0x4(%r15), %ecx
xorl $0x2, %ecx
orl %eax, %ecx
je 0xba8c
leaq 0x1a7d5(%rip), %rax     # 0x26250
cmpl $0x2, (%rax)
jge 0xbad2
movq %rbx, %rdi
callq 0xb980
xorl %ebx, %ebx
jmp 0xbac5
movl $0x4, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4dc0
movslq (%rbx), %r15
movl %r15d, 0x4(%rbx)
movq %r15, %rdi
callq 0x22e0
movq %rax, 0x48(%rbx)
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x4dc0
movq %rbx, %rdi
callq 0xb797
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0x2b7e
jmp 0xba80
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/vcf.c
// Function: bcf_read1_core
static inline int bcf_read1_core(BGZF *fp, bcf1_t *v)
{
	uint32_t x[8];
	int ret;
	if ((ret = bgzf_read(fp, x, 32)) != 32) {
		if (ret == 0) return -1;
		return -2;
	}
	x[0] -= 24; // to exclude six 32-bit integers
	ks_resize(&v->shared, x[0]);
	ks_resize(&v->indiv, x[1]);
	memcpy(v, x + 2, 16);
	v->n_allele = x[6]>>16; v->n_info = x[6]&0xffff;
	v->n_fmt = x[7]>>24; v->n_sample = x[7]&0xffffff;
	v->shared.l = x[0], v->indiv.l = x[1];
	v->unpacked = 0;
	v->unpack_ptr = NULL;
	bgzf_read(fp, v->shared.s, v->shared.l);
	bgzf_read(fp, v->indiv.s, v->indiv.l);
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rsi
movl $0x20, %edx
callq 0x4dc0
testl %eax, %eax
je 0xbcd8
cmpl $0x20, %eax
jne 0xbcdf
movl (%rsp), %eax
addl $-0x18, %eax
movl %eax, (%rsp)
cmpq %rax, 0x20(%r14)
jae 0xbc19
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, 0x20(%r14)
movq 0x28(%r14), %rdi
callq 0x2330
movq %rax, 0x28(%r14)
movl 0x4(%rsp), %eax
cmpq %rax, 0x38(%r14)
jae 0xbc6f
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, 0x38(%r14)
movq 0x40(%r14), %rdi
callq 0x2330
movq %rax, 0x40(%r14)
movl 0x4(%rsp), %eax
movups 0x8(%rsp), %xmm0
movups %xmm0, (%r14)
movl 0x18(%rsp), %ecx
movl 0x1c(%rsp), %edx
movl %edx, %esi
shrl $0x18, %esi
shlq $0x20, %rsi
orq %rcx, %rsi
shlq $0x28, %rdx
orq %rsi, %rdx
movq %rdx, 0x10(%r14)
movl (%rsp), %edx
movq %rdx, 0x18(%r14)
movq %rax, 0x30(%r14)
movl $0x0, 0x88(%r14)
movq $0x0, 0x90(%r14)
movq 0x28(%r14), %rsi
movq %rbx, %rdi
callq 0x4dc0
movq 0x30(%r14), %rdx
movq 0x40(%r14), %rsi
movq %rbx, %rdi
callq 0x4dc0
xorl %eax, %eax
jmp 0xbce4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xbce4
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/vcf.c
// Function: bcf_write1
int bcf_write1(BGZF *fp, const bcf1_t *v)
{
	uint32_t x[8];
	x[0] = v->shared.l + 24; // to include six 32-bit integers
	x[1] = v->indiv.l;
	memcpy(x + 2, v, 16);
	x[6] = (uint32_t)v->n_allele<<16 | v->n_info;
	x[7] = (uint32_t)v->n_fmt<<24 | v->n_sample;
	bgzf_write(fp, x, 32);
	bgzf_write(fp, v->shared.s, v->shared.l);
	bgzf_write(fp, v->indiv.s, v->indiv.l);
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x18(%rsi), %eax
addl $0x18, %eax
movq %rsp, %rsi
movl %eax, (%rsi)
movl 0x30(%r14), %eax
movl %eax, 0x4(%rsi)
movups (%r14), %xmm0
movups %xmm0, 0x8(%rsi)
movq 0x10(%r14), %rax
movl %eax, 0x18(%rsi)
movq %rax, %rcx
shrq $0x8, %rcx
andl $0xff000000, %ecx       # imm = 0xFF000000
shrq $0x28, %rax
orl %ecx, %eax
movl %eax, 0x1c(%rsi)
movl $0x20, %edx
callq 0x5320
movq 0x18(%r14), %rdx
movq 0x28(%r14), %rsi
movq %rbx, %rdi
callq 0x5320
movq 0x30(%r14), %rdx
movq 0x40(%r14), %rsi
movq %rbx, %rdi
callq 0x5320
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/vcf.c
// Function: vcf_hdr_write
void vcf_hdr_write(htsFile *fp, const bcf_hdr_t *h)
{
	if (!fp->is_bin) {
		int l = h->l_text;
		while (l && h->text[l-1] == 0) --l; // kill the trailing zeros
		if (l && h->text[l-1] == '\n') --l;
		fwrite(h->text, 1, l, (FILE*)fp->fp);
		fputc('\n', (FILE*)fp->fp);
	} else bcf_hdr_write((BGZF*)fp->fp, h);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testb $0x1, (%rdi)
jne 0xc4ba
movslq (%rsi), %rax
movq 0x48(%rsi), %rdi
xorl %edx, %edx
testq %rax, %rax
je 0xc4d1
movb -0x1(%rdi,%rax), %cl
testb %cl, %cl
jne 0xc4c4
decq %rax
jne 0xc4ab
jmp 0xc4d1
movq 0x38(%rbx), %rdi
popq %rbx
jmp 0xbad9
xorl %edx, %edx
cmpb $0xa, %cl
sete %dl
subl %edx, %eax
movslq %eax, %rdx
movq 0x38(%rbx), %rcx
movl $0x1, %esi
callq 0x2400
movq 0x38(%rbx), %rsi
movl $0xa, %edi
popq %rbx
jmp 0x21f0
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/vcf.c
// Function: bcf_fmt_sized_array
uint8_t *bcf_fmt_sized_array(kstring_t *s, uint8_t *ptr)
{
	int x, type;
	x = bcf_dec_size(ptr, &ptr, &type);
	bcf_fmt_array(s, x, type, ptr);
	return ptr + (x << bcf_type_shift[type]);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movzbl (%rsi), %r14d
cmpl $0xef, %r14d
jbe 0xd80d
movzbl 0x1(%rbx), %eax
andl $0xf, %eax
cmpl $0x2, %eax
je 0xd818
cmpl $0x1, %eax
jne 0xd822
movsbl 0x2(%rbx), %ebp
addq $0x3, %rbx
jmp 0xd829
incq %rbx
movl %r14d, %ebp
shrl $0x4, %ebp
jmp 0xd829
movswl 0x2(%rbx), %ebp
addq $0x4, %rbx
jmp 0xd829
movl 0x2(%rbx), %ebp
addq $0x6, %rbx
andl $0xf, %r14d
movl %ebp, %esi
movl %r14d, %edx
movq %rbx, %rcx
callq 0xd0a2
leaq 0x18b4f(%rip), %rax     # 0x26390
movb (%r14,%rax), %cl
shll %cl, %ebp
movslq %ebp, %rax
addq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/vcf.c
// Function: vcf_read1
int vcf_read1(htsFile *fp, const bcf_hdr_t *h, bcf1_t *v)
{
	if (!fp->is_bin) {
		int ret;
		ret = hts_getline(fp, KS_SEP_LINE, &fp->line);
		if (ret < 0) return -1;
		ret = vcf_parse1(&fp->line, h, v);
		return 0;
	} else return bcf_read1((BGZF*)fp->fp, v);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
testb $0x1, (%rdi)
jne 0xef12
movq %rsi, %r14
leaq 0x10(%rdi), %r15
movl $0x2, %esi
movq %r15, %rdx
callq 0x67e0
testl %eax, %eax
js 0xef23
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xd852
xorl %eax, %eax
jmp 0xef28
movq 0x38(%rdi), %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xbb97
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/vcf.c
// Function: bcf_unpack_fmt_core
uint8_t *bcf_unpack_fmt_core(uint8_t *ptr, int n_sample, int n_fmt, bcf_fmt_t *fmt)
{
	int i;
	for (i = 0; i < n_fmt; ++i) {
		bcf_fmt_t *f = &fmt[i];
		f->id = bcf_dec_typed_int1(ptr, &ptr);
		f->n = bcf_dec_size(ptr, &ptr, &f->type);
		f->size = f->n << bcf_type_shift[f->type];
		f->p = ptr;
		ptr += n_sample * f->size;
	}
	return ptr;
}

// Assembly:
testl %edx, %edx
jle 0xf000
movq %rcx, %rax
movl %edx, %ecx
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rdx
xorl %r8d, %r8d
leaq 0x17443(%rip), %r9      # 0x26390
movzbl (%rdi), %ecx
andl $0xf, %ecx
cmpl $0x2, %ecx
je 0xef67
cmpl $0x1, %ecx
jne 0xef71
movsbl 0x1(%rdi), %ecx
addq $0x2, %rdi
jmp 0xef78
movswl 0x1(%rdi), %ecx
addq $0x3, %rdi
jmp 0xef78
movl 0x1(%rdi), %ecx
addq $0x5, %rdi
movl %ecx, (%rax,%r8)
movzbl (%rdi), %ecx
andl $0xf, %ecx
movl %ecx, 0x8(%rax,%r8)
movzbl (%rdi), %r10d
cmpl $0xef, %r10d
jbe 0xefb4
movzbl 0x1(%rdi), %r10d
andl $0xf, %r10d
cmpl $0x2, %r10d
je 0xefbd
cmpl $0x1, %r10d
jne 0xefc8
movsbl 0x2(%rdi), %r10d
addq $0x3, %rdi
jmp 0xefd0
incq %rdi
shrl $0x4, %r10d
jmp 0xefd0
movswl 0x2(%rdi), %r10d
addq $0x4, %rdi
jmp 0xefd0
movl 0x2(%rdi), %r10d
addq $0x6, %rdi
movq %rdi, %r11
movl %r10d, 0x4(%rax,%r8)
movb (%rcx,%r9), %cl
shll %cl, %r10d
movl %r10d, 0xc(%rax,%r8)
movq %rdi, 0x10(%rax,%r8)
imull %esi, %r10d
movslq %r10d, %rdi
addq %r11, %rdi
addq $0x18, %r8
cmpq %r8, %rdx
jne 0xef4d
movq %rdi, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/vcf.c
// Function: bcf_unpack_info_core
uint8_t *bcf_unpack_info_core(uint8_t *ptr, int n_info, bcf_info_t *info)
{
	int i;
	for (i = 0; i < n_info; ++i) {
		bcf_info_t *z = &info[i];
		z->key = bcf_dec_typed_int1(ptr, &ptr);
		z->len = bcf_dec_size(ptr, &ptr, &z->type);
		z->vptr = ptr;
		z->v1.i = 0;
		if (z->len == 1) {
			if (z->type == BCF_BT_INT8 || z->type == BCF_BT_CHAR) z->v1.i = *(int8_t*)ptr;
			else if (z->type == BCF_BT_INT32) z->v1.i = *(int32_t*)ptr;
			else if (z->type == BCF_BT_FLOAT) z->v1.f = *(float*)ptr;
			else if (z->type == BCF_BT_INT16) z->v1.i = *(int16_t*)ptr;
		}
		ptr += z->len << bcf_type_shift[z->type];
	}
	return ptr;
}

// Assembly:
movq %rdi, %rax
testl %esi, %esi
jle 0xf115
movl %esi, %ecx
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
xorl %edi, %edi
leaq 0x101d2(%rip), %r8      # 0x1f1f4
leaq 0x17367(%rip), %r9      # 0x26390
movzbl (%rax), %ecx
andl $0xf, %ecx
cmpl $0x2, %ecx
je 0xf043
cmpl $0x1, %ecx
jne 0xf04d
movsbl 0x1(%rax), %ecx
addq $0x2, %rax
jmp 0xf054
movswl 0x1(%rax), %ecx
addq $0x3, %rax
jmp 0xf054
movl 0x1(%rax), %ecx
addq $0x5, %rax
movl %ecx, (%rdx,%rdi)
movzbl (%rax), %ecx
andl $0xf, %ecx
movl %ecx, 0x4(%rdx,%rdi)
movzbl (%rax), %r10d
cmpl $0xef, %r10d
jbe 0xf08e
movzbl 0x1(%rax), %r10d
andl $0xf, %r10d
cmpl $0x2, %r10d
je 0xf097
cmpl $0x1, %r10d
jne 0xf0a2
movsbl 0x2(%rax), %r10d
addq $0x3, %rax
jmp 0xf0aa
incq %rax
shrl $0x4, %r10d
jmp 0xf0aa
movswl 0x2(%rax), %r10d
addq $0x4, %rax
jmp 0xf0aa
movl 0x2(%rax), %r10d
addq $0x6, %rax
movl %r10d, 0x8(%rdx,%rdi)
movq %rax, 0x10(%rdx,%rdi)
movl $0x0, 0xc(%rdx,%rdi)
cmpl $0x1, %r10d
jne 0xf0ed
movzbl %cl, %r11d
decl %r11d
cmpl $0x6, %r11d
ja 0xf0ed
movslq (%r8,%r11,4), %r11
addq %r8, %r11
jmpq *%r11
movsbl (%rax), %r11d
jmp 0xf0e8
movswl (%rax), %r11d
jmp 0xf0e8
movl (%rax), %r11d
movl %r11d, 0xc(%rdx,%rdi)
movb (%rcx,%r9), %cl
shll %cl, %r10d
movslq %r10d, %rcx
addq %rcx, %rax
addq $0x18, %rdi
cmpq %rdi, %rsi
jne 0xf029
jmp 0xf115
movss (%rax), %xmm0
movss %xmm0, 0xc(%rdx,%rdi)
jmp 0xf0ed
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/vcf.c
// Function: vcf_write1
int vcf_write1(htsFile *fp, const bcf_hdr_t *h, const bcf1_t *v)
{
	if (!fp->is_bin) {
		vcf_format1(h, v, &fp->line);
		fwrite(fp->line.s, 1, fp->line.l, (FILE*)fp->fp);
		fputc('\n', (FILE*)fp->fp);
	} else return bcf_write1((BGZF*)fp->fp, v);
	return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testb $0x1, (%rdi)
jne 0x1087a
leaq 0x10(%rbx), %rax
movq %rsi, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0xf5b9
movq 0x10(%rbx), %rdx
movq 0x20(%rbx), %rdi
movq 0x38(%rbx), %rcx
movl $0x1, %esi
callq 0x2400
movq 0x38(%rbx), %rsi
movl $0xa, %edi
callq 0x21f0
jmp 0x10886
movq 0x38(%rbx), %rdi
movq %rdx, %rsi
callq 0xbd2c
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/vcf.c
// Function: bcf_id2int
int bcf_id2int(const bcf_hdr_t *h, int which, const char *id)
{
	khint_t k;
	vdict_t *d = (vdict_t*)h->dict[which];
	k = kh_get(vdict, d, id);
	return k == kh_end(d)? -1 : kh_val(d, k).id;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movslq %esi, %rax
movq 0x30(%rdi,%rax,8), %rax
movq %rax, 0x8(%rsp)
movl (%rax), %ecx
testl %ecx, %ecx
je 0x108e5
movq %rdx, %rbx
leal -0x1(%rcx), %esi
movsbl (%rdx), %r13d
testl %r13d, %r13d
movq %rcx, 0x18(%rsp)
je 0x108ed
movb 0x1(%rbx), %al
testb %al, %al
je 0x108f0
leaq 0x2(%rbx), %rcx
movl %r13d, %edx
shll $0x5, %edx
subl %r13d, %edx
movsbl %al, %r13d
addl %edx, %r13d
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0x108ca
jmp 0x108f0
xorl %r15d, %r15d
jmp 0x10988
xorl %r13d, %r13d
movl %r13d, %r14d
andl %esi, %r14d
movl %r13d, %eax
shrl $0x3, %eax
shll $0x3, %r13d
xorl %eax, %r13d
orl $0x1, %r13d
andl %esi, %r13d
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
movl %r14d, %r15d
movl %esi, 0x14(%rsp)
movq %rdi, 0x20(%rsp)
movl %r15d, %eax
shrl $0x4, %eax
movl (%rdi,%rax,4), %r12d
leal (%r15,%r15), %ebp
andl $0x1e, %ebp
movl %r12d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x10976
testb $0x1, %al
jne 0x10964
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movl %r15d, %ecx
movq (%rax,%rcx,8), %rdi
movq %rbx, %rsi
callq 0x2230
movq 0x20(%rsp), %rdi
movl 0x14(%rsp), %esi
testl %eax, %eax
je 0x10976
addl %r13d, %r15d
andl %esi, %r15d
cmpl %r14d, %r15d
jne 0x1091f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x109a6
movl %ebp, %ecx
shrl %cl, %r12d
testb $0x3, %r12b
movq 0x18(%rsp), %rcx
cmovnel %ecx, %r15d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %r15d
je 0x109a6
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rax
movl %r15d, %ecx
shlq $0x4, %rcx
movl 0xc(%rax,%rcx), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/vcf.c
// Function: bcf_index
hts_idx_t *bcf_index(BGZF *fp, int min_shift)
{
	int n_lvls, i;
	bcf1_t *b;
	hts_idx_t *idx;
	bcf_hdr_t *h;
	int64_t max_len = 0, s;
	h = bcf_hdr_read(fp);
	for (i = 0; i < h->n[BCF_DT_CTG]; ++i)
		if (max_len < h->id[BCF_DT_CTG][i].val->info[0])
			max_len = h->id[BCF_DT_CTG][i].val->info[0];
	max_len += 256;
	for (n_lvls = 0, s = 1<<min_shift; max_len > s; ++n_lvls, s <<= 3);
	idx = hts_idx_init(h->n[BCF_DT_CTG], HTS_FMT_CSI, bgzf_tell(fp), min_shift, n_lvls);
	bcf_hdr_destroy(h);
	b = bcf_init1();
	while (bcf_read1(fp, b) >= 0) {
		int ret;
		ret = hts_idx_push(idx, b->rid, b->pos, b->pos + b->rlen, bgzf_tell(fp), 1);
		if (ret < 0) break;
	}
	hts_idx_finish(idx, bgzf_tell(fp));
	bcf_destroy1(b);
	return idx;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0xba37
movq %rax, %r14
movslq 0xc(%rax), %rdi
testq %rdi, %rdi
jle 0x10a10
movq 0x20(%r14), %rcx
movq %rdi, %rdx
shlq $0x4, %rdx
xorl %esi, %esi
xorl %eax, %eax
movq %rax, %r8
movq 0x8(%rcx,%rsi), %rax
movl (%rax), %eax
cmpq %rax, %r8
cmovgq %r8, %rax
addq $0x10, %rsi
cmpq %rsi, %rdx
jne 0x109ee
addq $0x100, %rax            # imm = 0x100
jmp 0x10a15
movl $0x100, %eax            # imm = 0x100
movl $0x1, %edx
movl %ebp, %ecx
shll %cl, %edx
movslq %edx, %rcx
xorl %r8d, %r8d
cmpq %rcx, %rax
jle 0x10a38
xorl %r8d, %r8d
incl %r8d
shlq $0x3, %rcx
cmpq %rcx, %rax
jg 0x10a2c
movq 0x10(%rbx), %rax
shlq $0x10, %rax
movzwl 0xc(%rbx), %edx
orq %rax, %rdx
xorl %esi, %esi
movl %ebp, %ecx
callq 0x6e21
movq %rax, %r15
movq %r14, %rdi
callq 0xb980
movl $0x1, %edi
movl $0x98, %esi
callq 0x2220
movq %rax, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xbb97
testl %eax, %eax
js 0x10aab
movl (%r14), %esi
movl 0x4(%r14), %edx
movl 0x8(%r14), %ecx
addl %edx, %ecx
movq 0x10(%rbx), %rax
shlq $0x10, %rax
movzwl 0xc(%rbx), %r8d
orq %rax, %r8
movq %r15, %rdi
movl $0x1, %r9d
callq 0x780a
testl %eax, %eax
jns 0x10a6d
movq 0x10(%rbx), %rax
shlq $0x10, %rax
movzwl 0xc(%rbx), %esi
orq %rax, %rsi
movq %r15, %rdi
callq 0x6ef3
movq %r14, %rdi
callq 0xbb29
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/vcf.c
// Function: bcf_index_build
int bcf_index_build(const char *fn, int min_shift)
{
	BGZF *fp;
	hts_idx_t *idx;
	if ((fp = bgzf_open(fn, "r")) == 0) return -1;
	idx = bcf_index(fp, min_shift);
	bgzf_close(fp);
	hts_idx_save(idx, fn, HTS_FMT_CSI);
	hts_idx_destroy(idx);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
leaq 0xe75d(%rip), %rsi      # 0x1f248
callq 0x43f4
testq %rax, %rax
je 0x10b26
movq %rax, %r14
movq %rax, %rdi
movl %ebp, %esi
callq 0x109c2
movq %rax, %r15
movq %r14, %rdi
callq 0x542d
xorl %ebp, %ebp
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x7f37
movq %r15, %rdi
callq 0x7e44
jmp 0x10b2b
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/vcf.c
// Function: bcf_is_snp
int bcf_is_snp(bcf1_t *v)
{
	int i;
	bcf_unpack(v, BCF_UN_STR);
	for (i = 0; i < v->n_allele; ++i)
		if (strlen(v->d.allele[i]) != 1) break;
	return i == v->n_allele;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0xf116
movl 0x10(%rbx), %eax
movl %eax, %ebp
shrl $0x10, %ebp
xorl %r14d, %r14d
cmpl $0x10000, %eax          # imm = 0x10000
jb 0x11086
movq 0x68(%rbx), %rbx
cmpl $0x1, %ebp
movl %ebp, %r14d
adcl $0x0, %r14d
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rdi
callq 0x2170
cmpq $0x1, %rax
jne 0x11083
incq %r15
cmpq %r15, %r14
jne 0x1106a
jmp 0x11086
movl %r15d, %r14d
xorl %eax, %eax
cmpl %ebp, %r14d
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/vcf.c
// Function: bcf_is_filtered
int bcf_is_filtered(bcf1_t *b)
{
	bcf_unpack(b, BCF_UN_FLT);
	if (b->d.n_flt == 0) return 0;
	if (b->d.n_flt == 1 && b->d.flt[0] == 0) return 0;
	return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x2, %esi
callq 0xf116
movl 0x5c(%rbx), %eax
testl %eax, %eax
je 0x110c1
cmpl $0x1, %eax
jne 0x110bc
movq 0x70(%rbx), %rax
cmpl $0x0, (%rax)
je 0x110c3
movl $0x1, %eax
popq %rbx
retq
xorl %eax, %eax
jmp 0x110c1
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/vcf.c
// Function: bcfcpy
void bcfcpy(bcf1_t *dst, const bcf1_t *src)
{
	kstring_t ts = dst->shared, ti = dst->indiv;
	free(dst->d.id); free(dst->d.allele); free(dst->d.flt); free(dst->d.info); free(dst->d.fmt);
	*dst = *src;
	memset(&dst->d, 0, sizeof(bcf_dec_t));
	dst->unpacked = 0;
	dst->unpack_ptr = 0;
	ts.l = ti.l = 0;
	dst->shared = ts; dst->indiv = ti;
	kputsn(src->shared.s, src->shared.l, &dst->shared);
	kputsn(src->indiv.s, src->indiv.l, &dst->indiv);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movups 0x20(%rdi), %xmm0
movaps %xmm0, 0x10(%rsp)
movups 0x38(%rdi), %xmm0
movaps %xmm0, (%rsp)
movq 0x60(%rdi), %rdi
callq 0x2050
movq 0x68(%rbx), %rdi
callq 0x2050
movq 0x70(%rbx), %rdi
callq 0x2050
movq 0x78(%rbx), %rdi
callq 0x2050
movq 0x80(%rbx), %rdi
callq 0x2050
movl $0x90, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2280
xorl %eax, %eax
movq %rax, 0x90(%rbx)
movq %rax, 0x18(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%rbx)
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x68(%rbx)
movups %xmm0, 0x78(%rbx)
movl $0x0, 0x88(%rbx)
movaps 0x10(%rsp), %xmm0
movups %xmm0, 0x20(%rbx)
movq %rax, 0x30(%rbx)
movaps (%rsp), %xmm0
movups %xmm0, 0x38(%rbx)
movq 0x28(%r14), %r12
movslq 0x18(%r14), %r15
leaq 0x1(%r15), %rax
cmpq 0x20(%rbx), %rax
jae 0x11182
movq 0x28(%rbx), %rax
xorl %edi, %edi
jmp 0x111cb
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, 0x20(%rbx)
movq 0x28(%rbx), %rdi
callq 0x2330
movq %rax, 0x28(%rbx)
movq 0x18(%rbx), %rdi
addq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x2280
addq 0x18(%rbx), %r15
movq %r15, 0x18(%rbx)
movq 0x28(%rbx), %rax
movb $0x0, (%rax,%r15)
movq 0x40(%r14), %r15
movslq 0x30(%r14), %r14
movq 0x30(%rbx), %rdi
leaq (%rdi,%r14), %rax
incq %rax
cmpq 0x38(%rbx), %rax
jae 0x11209
movq 0x40(%rbx), %rax
jmp 0x11252
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, 0x38(%rbx)
movq 0x40(%rbx), %rdi
callq 0x2330
movq %rax, 0x40(%rbx)
movq 0x30(%rbx), %rdi
addq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2280
addq 0x30(%rbx), %r14
movq %r14, 0x30(%rbx)
movq 0x40(%rbx), %rax
movb $0x0, (%rax,%r14)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/vcf.c
// Function: bcf_get_ref_alt1
void bcf_get_ref_alt1(const bcf1_t *b, int *l_ref, char **ref, int *l_alt, char **alt)
{
	int x, type;
	uint8_t *ptr;
	*ref = *alt = 0; *l_ref = *l_alt = 0;
	ptr = (uint8_t*)b->shared.s;
	x = bcf_dec_size(ptr, &ptr, &type); // size of ID
	ptr += x << bcf_type_shift[type]; // skip ID
	x = bcf_dec_size(ptr, &ptr, &type); // size of REF
	*l_ref = x, *ref = (char*)ptr;
	ptr += x << bcf_type_shift[type]; // skip REF
	*l_alt = bcf_dec_size(ptr, &ptr, &type); // size of ALT1
	*alt = (char*)ptr;
}

// Assembly:
movq %rcx, %rax
xorl %ecx, %ecx
movq %rcx, (%r8)
movq %rcx, (%rdx)
movl %ecx, (%rax)
movl %ecx, (%rsi)
movq 0x28(%rdi), %rdi
movzbl (%rdi), %r10d
movl %r10d, %ecx
andl $0xf, %ecx
cmpb $-0x11, %r10b
jbe 0x112c0
movzbl 0x1(%rdi), %r9d
andl $0xf, %r9d
cmpl $0x2, %r9d
je 0x112c9
cmpl $0x1, %r9d
jne 0x112d4
movsbl 0x2(%rdi), %r10d
addq $0x3, %rdi
jmp 0x112dc
incq %rdi
shrl $0x4, %r10d
jmp 0x112dc
movswl 0x2(%rdi), %r10d
addq $0x4, %rdi
jmp 0x112dc
movl 0x2(%rdi), %r10d
addq $0x6, %rdi
leaq 0x150ad(%rip), %r9      # 0x26390
movb (%rcx,%r9), %cl
shll %cl, %r10d
movslq %r10d, %r11
movzbl (%rdi,%r11), %r10d
movl %r10d, %ecx
andl $0xf, %ecx
cmpb $-0x11, %r10b
jbe 0x11321
addq %r11, %rdi
movzbl 0x1(%rdi), %r10d
andl $0xf, %r10d
cmpl $0x2, %r10d
je 0x1132d
cmpl $0x1, %r10d
jne 0x11338
movsbl 0x2(%rdi), %r10d
addq $0x3, %rdi
jmp 0x11340
addq %r11, %rdi
incq %rdi
shrl $0x4, %r10d
jmp 0x11340
movswl 0x2(%rdi), %r10d
addq $0x4, %rdi
jmp 0x11340
movl 0x2(%rdi), %r10d
addq $0x6, %rdi
movl %r10d, (%rsi)
movq %rdi, (%rdx)
movb (%rcx,%r9), %cl
shll %cl, %r10d
movslq %r10d, %rdx
movzbl (%rdi,%rdx), %ecx
cmpl $0xef, %ecx
jbe 0x1137a
addq %rdx, %rdi
movzbl 0x1(%rdi), %ecx
andl $0xf, %ecx
cmpl $0x2, %ecx
je 0x11385
cmpl $0x1, %ecx
jne 0x1138f
movsbl 0x2(%rdi), %ecx
addq $0x3, %rdi
jmp 0x11396
addq %rdx, %rdi
incq %rdi
shrl $0x4, %ecx
jmp 0x11396
movswl 0x2(%rdi), %ecx
addq $0x4, %rdi
jmp 0x11396
movl 0x2(%rdi), %ecx
addq $0x6, %rdi
movl %ecx, (%rax)
movq %rdi, (%r8)
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/vcf.c
// Function: bcfcmp
int bcfcmp(const bcf1_t *a, const bcf1_t *b) // FIXME: segfault when a or b is empty; also, what happens when there are not ALT alleles?
{
	int ret, l[2];
	char *ptr[2];
	if (a->rid != b->rid) return a->rid - b->rid;
	if (a->pos != b->pos) return a->pos - b->pos;
	if (a->rlen!=b->rlen) return a->rlen-b->rlen;
	ptr[0] = bcf_get_alt1(a, &l[0]);
	ptr[1] = bcf_get_alt1(b, &l[1]);
	ret = strncmp(ptr[0], ptr[1], l[0] < l[1]? l[0] : l[1]);
	if (ret != 0) return ret;
	return l[0] - l[1];
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl (%rdi), %ebx
subl (%rsi), %ebx
jne 0x1144a
movq %rsi, %r14
movl 0x4(%rdi), %ebx
subl 0x4(%rsi), %ebx
jne 0x1144a
movl 0x8(%rdi), %ebx
subl 0x8(%r14), %ebx
jne 0x1144a
leaq 0xc(%rsp), %rsi
leaq 0x18(%rsp), %rdx
leaq 0x20(%rsp), %rcx
leaq 0x10(%rsp), %rbx
movq %rbx, %r8
callq 0x1127d
movq (%rbx), %r15
leaq 0x24(%rsp), %rbx
leaq 0xc(%rsp), %rsi
leaq 0x18(%rsp), %rdx
leaq 0x10(%rsp), %r12
movq %r14, %rdi
movq %rbx, %rcx
movq %r12, %r8
callq 0x1127d
movq (%r12), %rsi
movl -0x4(%rbx), %eax
movl (%rbx), %ecx
movl %eax, %ebx
subl %ecx, %ebx
cmovll %eax, %ecx
movslq %ecx, %rdx
movq %r15, %rdi
callq 0x2090
testl %eax, %eax
cmovnel %eax, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/vcf.c
// Function: bcfcpy_min
int bcfcpy_min(bcf1_t *b, const bcf1_t *b0, const char *alt2)
{
	int l_ref, l_alt;
	char *ref, *alt;
	bcf_get_ref_alt1(b0, &l_ref, &ref, &l_alt, &alt);
	b->rid = b0->rid, b->pos = b0->pos, b->rlen = b0->rlen;
	b->qual = 0, b->n_info = b->n_fmt = b->n_sample = 0;
	b->n_allele = alt2? 3 : 2;
	b->shared.l = b->indiv.l = 0;
	bcf_enc_size(&b->shared, 0, BCF_BT_CHAR); // empty ID
	bcf_enc_vchar(&b->shared, l_ref, ref); // copy REF
	bcf_enc_vchar(&b->shared, l_alt, alt); // copy the first ALT
	if (alt2) bcf_enc_vchar(&b->shared, strlen(alt2), alt2); // add <M> if requested
	bcf_enc_vint(&b->shared, 0, 0, -1); // empty FILTER
	b->unpacked = 0;
	return l_ref;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x4(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %rsp, %rcx
leaq 0x8(%rsp), %r8
movq %r15, %rdi
callq 0x1127d
movq (%r15), %rax
movq %rax, (%rbx)
movl 0x8(%r15), %eax
movl %eax, 0x8(%rbx)
movl $0x0, 0xc(%rbx)
xorl %eax, %eax
testq %r14, %r14
setne %al
shll $0x10, %eax
orq $0x20000, %rax          # imm = 0x20000
movq %rax, 0x10(%rbx)
xorl %eax, %eax
movq %rax, 0x30(%rbx)
leaq 0x18(%rbx), %r15
movq %rax, 0x18(%rbx)
cmpq $0x2, 0x20(%rbx)
jb 0x114d0
movq 0x28(%rbx), %rax
movl $0x1, %edx
xorl %ecx, %ecx
jmp 0x114f2
movq $0x2, 0x20(%rbx)
movq 0x28(%rbx), %rdi
movl $0x2, %esi
callq 0x2330
movq %rax, 0x28(%rbx)
movq 0x18(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x18(%rbx)
movb $0x7, (%rax,%rcx)
movq 0x18(%rbx), %rax
movq 0x28(%rbx), %rcx
movb $0x0, (%rcx,%rax)
movl 0x4(%rsp), %ebp
movq 0x10(%rsp), %rdx
movq %r15, %rdi
movl %ebp, %esi
callq 0xd000
movl (%rsp), %esi
movq 0x8(%rsp), %rdx
movq %r15, %rdi
callq 0xd000
testq %r14, %r14
je 0x11543
movq %r14, %rdi
callq 0x2170
movq %r15, %rdi
movl %eax, %esi
movq %r14, %rdx
callq 0xd000
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0xc4ee
movl $0x0, 0x88(%rbx)
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/vcf.c
// Function: bcf_append_info_ints
int bcf_append_info_ints(const bcf_hdr_t *h, bcf1_t *b, const char *key, int n, const int32_t *vals)
{
	int id;
	id = bcf_id2int(h, BCF_DT_ID, key);
	if (id < 0) return -1;
	++b->n_info;
	bcf_enc_int1(&b->shared, id);
	bcf_enc_vint(&b->shared, n, vals, -1);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %r14
movl %ecx, %ebp
movq %rsi, %r15
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x1088a
testl %eax, %eax
js 0x115ae
incw 0x10(%r15)
addq $0x18, %r15
movq %r15, %rdi
movl %eax, %esi
callq 0xcb8d
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0xc4ee
jmp 0x115b3
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/vcf.c
// Function: bcf_seekn
int bcf_seekn(BGZF *fp, const hts_idx_t *idx, int64_t r)
{
	int skip, ret = 0;
	skip = hts_idx_seekn_aux(fp, idx, r);
	if (skip > 0) {
		bcf1_t *b;
		b = bcf_init1();
		do {
			ret = bcf_read1(fp, b);
			--skip;
		} while (skip > 0 && ret >= 0);
		bcf_destroy1(b);
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x9677
testl %eax, %eax
jle 0x1160b
movl %eax, %ebp
movl $0x1, %edi
movl $0x98, %esi
callq 0x2220
movq %rax, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xbb97
movl %eax, %r15d
cmpl $0x2, %ebp
jb 0x11601
decl %ebp
testl %r15d, %r15d
jns 0x115e7
movq %r14, %rdi
callq 0xbb29
jmp 0x1160e
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/atomic.c
// Function: bcf_atombuf_init
bcf_atombuf_t *bcf_atombuf_init(htsFile *in, int keep_flt)
{
	bcf_atombuf_t *buf;
	buf = (bcf_atombuf_t*)calloc(1, sizeof(bcf_atombuf_t));
	buf->keep_flt = !!keep_flt;
	buf->in = in;
	buf->h = vcf_hdr_read(buf->in);
	buf->b = bcf_init1();
	if (flt_read1(buf->in, buf->h, buf->b, buf->keep_flt) >= 0) {
		bcf_atomize(buf->h, buf->b, &buf->a);
		if (flt_read1(buf->in, buf->h, buf->b, buf->keep_flt) < 0)
			buf->no_vcf = 1;
	} else buf->no_vcf = 1;
	return buf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %r14
movl $0x1, %edi
movl $0x30, %esi
callq 0x2220
movq %rax, %rbx
xorl %r13d, %r13d
testl %ebp, %ebp
setne %r13b
shll $0x10, %r13d
movl %r13d, 0x24(%rax)
movq %r14, (%rax)
movq %r14, %rdi
callq 0xbda4
movq %rax, %r15
movq %rax, 0x28(%rbx)
xorl %eax, %eax
callq 0xbb1a
movq %rax, %r12
movq %rax, 0x18(%rbx)
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xeedb
testl %ebp, %ebp
jne 0x133a8
testl %eax, %eax
js 0x133a8
movq %r12, %rdi
callq 0x11099
testl %eax, %eax
jne 0x13384
jmp 0x133ac
testl %eax, %eax
js 0x13401
movq %rbx, %rdx
addq $0x8, %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x121da
movq (%rbx), %r14
movq 0x18(%rbx), %r15
movq 0x28(%rbx), %r12
movl 0x24(%rbx), %r13d
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xeedb
cmpl $0xffff, %r13d          # imm = 0xFFFF
ja 0x133f6
testl %eax, %eax
js 0x133f6
movq %r15, %rdi
callq 0x11099
testl %eax, %eax
jne 0x133cd
jmp 0x13409
testl %eax, %eax
jns 0x13409
andl $0xffff0000, %r13d      # imm = 0xFFFF0000
orl $0x1, %r13d
movl %r13d, 0x24(%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_O3/lh3[P]bgt/atomic.c
// Function: bcf_atombuf_destroy
void bcf_atombuf_destroy(bcf_atombuf_t *buf)
{
	int i;
	for (i = 0; i < buf->a.m; ++i) {
		free(buf->a.a[i].ref.s);
		free(buf->a.a[i].gt);
	}
	free(buf->a.a);
	bcf_destroy1(buf->b);
	bcf_hdr_destroy(buf->h);
	free(buf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0xc(%rdi)
jle 0x1345b
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq 0x10(%rax,%r14), %rdi
callq 0x2050
movq 0x10(%rbx), %rax
movq 0x38(%rax,%r14), %rdi
callq 0x2050
incq %r15
movslq 0xc(%rbx), %rax
addq $0x40, %r14
cmpq %rax, %r15
jl 0x1342f
movq 0x10(%rbx), %rdi
callq 0x2050
movq 0x18(%rbx), %rdi
callq 0xbb29
movq 0x28(%rbx), %rdi
callq 0xb980
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/bedidx.c
// Function: bed_index_core
int *bed_index_core(int n, uint64_t *a, int *n_idx)
{
	int i, j, m, *idx;
	m = *n_idx = 0; idx = 0;
	for (i = 0; i < n; ++i) {
		int beg, end;
		beg = a[i]>>32 >> LIDX_SHIFT; end = ((uint32_t)a[i]) >> LIDX_SHIFT;
		if (m < end + 1) {
			int oldm = m;
			m = end + 1;
			kroundup32(m);
			idx = (int*)realloc(idx, m * sizeof(int));
			for (j = oldm; j < m; ++j) idx[j] = -1;
		}
		if (beg == end) {
			if (idx[beg] < 0) idx[beg] = i;
		} else {
			for (j = beg; j <= end; ++j)
				if (idx[j] < 0) idx[j] = i;
		}
		*n_idx = end + 1;
	}
	return idx;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl $0x0, (%rdx)
xorl %r8d, %r8d
testl %edi, %edi
jle 0x140a3
movl %edi, %edi
xorl %r13d, %r13d
xorl %r15d, %r15d
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, (%rsp)
movq (%rsi,%r13,8), %r14
movl %r14d, %r12d
shrl $0xd, %r12d
cmpl %r12d, %r8d
jg 0x14061
movl %r14d, %eax
shrl $0xe, %eax
orl %r12d, %eax
movl %eax, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %ebp
shrl $0x10, %ebp
orl %ecx, %ebp
leal 0x1(%rbp), %ebx
leaq 0x4(,%rbp,4), %rsi
movq %r15, %rdi
movq %r8, %r15
callq 0x2330
movq %r15, %rcx
movq %rax, %r15
subl %ecx, %ebp
jl 0x14050
movl %ecx, %eax
leaq (%r15,%rax,4), %rdi
leaq 0x4(,%rbp,4), %rdx
movl $0xff, %esi
callq 0x21e0
movl %ebx, %r8d
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rsi
movq (%rsp), %rdi
shrq $0x2d, %r14
leal 0x1(%r12), %eax
cmpl %r14d, %r12d
jne 0x1407c
cmpl $0x0, (%r15,%r14,4)
jns 0x14093
movl %r13d, (%r15,%r14,4)
jmp 0x14093
jb 0x14093
movl %eax, %ecx
cmpl $0x0, (%r15,%r14,4)
jns 0x1408b
movl %r13d, (%r15,%r14,4)
incq %r14
cmpq %r14, %rcx
jne 0x14080
movl %eax, (%rdx)
incq %r13
cmpq %rdi, %r13
jne 0x13fe3
jmp 0x140a6
xorl %r15d, %r15d
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/bedidx.c
// Function: bed_index
void bed_index(void *_h)
{
	reghash_t *h = (reghash_t*)_h;
	khint_t k;
	for (k = 0; k < kh_end(h); ++k) {
		if (kh_exist(h, k)) {
			bed_reglist_t *p = &kh_val(h, k);
			if (p->idx) free(p->idx);
			ks_introsort(uint64_t, p->n, p->a);
			p->idx = bed_index_core(p->n, p->a, &p->m);
		}
	}
}

// Assembly:
movl (%rdi), %eax
testl %eax, %eax
je 0x1414c
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x10, %r15d
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x10(%rbx), %rcx
movq %r13, %rdx
shrq $0x4, %rdx
movl (%rcx,%rdx,4), %edx
movl %r12d, %ecx
andb $0x1e, %cl
shrl %cl, %edx
testb $0x3, %dl
jne 0x14131
movq 0x20(%rbx), %r14
movq (%r14,%r15), %rdi
testq %rdi, %rdi
je 0x14107
callq 0x2050
addq %r15, %r14
addq $-0xc, %r14
movslq -0x4(%r14), %rdi
movq 0x4(%r14), %rsi
callq 0x13d98
movl -0x4(%r14), %edi
movq 0x4(%r14), %rsi
movq %r14, %rdx
callq 0x13fae
movq %rax, 0xc(%r14)
movl (%rbx), %eax
incq %r13
movl %eax, %ecx
addq $0x18, %r15
addl $0x2, %r12d
cmpq %rcx, %r13
jb 0x140da
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/bedidx.c
// Function: bed_overlap_core
int bed_overlap_core(const bed_reglist_t *p, int beg, int end)
{
	int i, min_off;
	if (p->n == 0) return 0;
	min_off = (beg>>LIDX_SHIFT >= p->n)? p->idx[p->n-1] : p->idx[beg>>LIDX_SHIFT];
	if (min_off < 0) { // TODO: this block can be improved, but speed should not matter too much here
		int n = beg>>LIDX_SHIFT;
		if (n > p->n) n = p->n;
		for (i = n - 1; i >= 0; --i)
			if (p->idx[i] >= 0) break;
		min_off = i >= 0? p->idx[i] : 0;
	}
	for (i = min_off; i < p->n; ++i) {
		if ((int)(p->a[i]>>32) >= end) break; // out of range; no need to proceed
		if ((int32_t)p->a[i] > beg && (int32_t)(p->a[i]>>32) < end)
			return 1; // find the overlap; return
	}
	return 0;
}

// Assembly:
movslq (%rdi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x141ca
movl %esi, %r9d
sarl $0xd, %r9d
cmpl %ecx, %r9d
movq 0x10(%rdi), %r10
leaq -0x4(%r10,%rcx,4), %r8
movslq %r9d, %r11
leaq (%r10,%r11,4), %r11
cmovgeq %r8, %r11
movl (%r11), %r8d
testl %r8d, %r8d
jns 0x1419b
cmpl %ecx, %r9d
cmovgel %ecx, %r9d
testl %r9d, %r9d
jle 0x14198
movl -0x4(%r10,%r9,4), %r8d
decq %r9
testl %r8d, %r8d
js 0x14184
jmp 0x1419b
xorl %r8d, %r8d
cmpl %ecx, %r8d
jge 0x141ca
movl %r8d, %r9d
shlq $0x3, %r9
addq 0x8(%rdi), %r9
movq (%r9), %rdi
movq %rdi, %r10
shrq $0x20, %r10
cmpl %edx, %r10d
jge 0x141ca
cmpl %esi, %edi
jg 0x141cb
addq $0x8, %r9
incl %r8d
cmpl %r8d, %ecx
jg 0x141ab
retq
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/bedidx.c
// Function: bed_overlap
int bed_overlap(const void *_h, const char *chr, int beg, int end)
{
	const reghash_t *h = (const reghash_t*)_h;
	khint_t k;
	if (!h) return 0;
	k = kh_get(reg, h, chr);
	if (k == kh_end(h)) return 0;
	return bed_overlap_core(&kh_val(h, k), beg, end);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, 0x14(%rsp)
movl %edx, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
testq %rdi, %rdi
je 0x142d2
movq 0x8(%rsp), %rax
movl (%rax), %eax
testl %eax, %eax
je 0x14235
movq %rsi, %r14
movq %rax, 0x20(%rsp)
leal -0x1(%rax), %edi
movsbl (%rsi), %ebp
testl %ebp, %ebp
je 0x1423d
movb 0x1(%r14), %al
testb %al, %al
je 0x1423f
leaq 0x2(%r14), %rcx
movl %ebp, %edx
shll $0x5, %edx
subl %ebp, %edx
movsbl %al, %ebp
addl %edx, %ebp
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0x1421e
jmp 0x1423f
xorl %r13d, %r13d
jmp 0x142cd
xorl %ebp, %ebp
movl %ebp, %edx
andl %edi, %edx
movl %ebp, %eax
shrl $0x3, %eax
shll $0x3, %ebp
xorl %eax, %ebp
orl $0x1, %ebp
andl %edi, %ebp
movq 0x8(%rsp), %rax
movq 0x10(%rax), %r15
movl %edx, %r13d
movl %edi, 0x1c(%rsp)
movl %edx, 0x18(%rsp)
movl %r13d, %eax
shrl $0x4, %eax
movl (%r15,%rax,4), %ebx
leal (,%r13,2), %r12d
andl $0x1e, %r12d
movl %ebx, %eax
movl %r12d, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x142bc
testb $0x1, %al
jne 0x142af
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movl %r13d, %ecx
movq (%rax,%rcx,8), %rdi
movq %r14, %rsi
callq 0x2230
movl 0x18(%rsp), %edx
movl 0x1c(%rsp), %edi
testl %eax, %eax
je 0x142bc
addl %ebp, %r13d
andl %edi, %r13d
cmpl %edx, %r13d
jne 0x14266
jmp 0x142d2
movl %r12d, %ecx
shrl %cl, %ebx
testb $0x3, %bl
movq 0x20(%rsp), %rax
cmovnel %eax, %r13d
cmpl %eax, %r13d
jne 0x142e3
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r13d, %eax
leaq (%rax,%rax,2), %rdi
shlq $0x3, %rdi
movq 0x8(%rsp), %rax
addq 0x20(%rax), %rdi
movl 0x10(%rsp), %esi
movl 0x14(%rsp), %edx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1414d
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/bedidx.c
// Function: bed_destroy
void bed_destroy(void *_h)
{
	reghash_t *h = (reghash_t*)_h;
	khint_t k;
	for (k = 0; k < kh_end(h); ++k) {
		if (kh_exist(h, k)) {
			free(kh_val(h, k).a);
			free(kh_val(h, k).idx);
			free((char*)kh_key(h, k));
		}
	}
	kh_destroy(reg, h);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %eax
testl %eax, %eax
je 0x14e61
xorl %r14d, %r14d
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x10(%rbx), %rcx
movq %r12, %rdx
shrq $0x4, %rdx
movl (%rcx,%rdx,4), %edx
movl %r14d, %ecx
andb $0x1e, %cl
shrl %cl, %edx
testb $0x3, %dl
jne 0x14e4f
movq 0x20(%rbx), %rax
movq 0x8(%rax,%r15), %rdi
callq 0x2050
movq 0x20(%rbx), %rax
movq 0x10(%rax,%r15), %rdi
callq 0x2050
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rdi
callq 0x2050
movl (%rbx), %eax
incq %r12
movl %eax, %ecx
addq $0x18, %r15
addl $0x2, %r14d
cmpq %rcx, %r12
jb 0x14e09
movq 0x18(%rbx), %rdi
callq 0x2050
movq 0x10(%rbx), %rdi
callq 0x2050
movq 0x20(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2050
nop
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/pbwt.c
// Function: pbc_enc_core
int pbc_enc_core(int m, const int32_t *S0, const uint8_t *a, int32_t *S, uint8_t *u)
{
	int32_t *p[2], j, n1;
	for (j = n1 = 0; j < m; ++j) // count the number of 1 bits
		n1 += (u[j] = !!a[S0[j]]);
	p[0] = S, p[1] = p[0] + (m - n1);
	for (j = 0; j < m; ++j)
		*p[u[j]]++ = S0[j];
	return pbr_enc(m, u, u);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testl %edi, %edi
jle 0x14fd2
movl %edi, %r9d
xorl %eax, %eax
xorl %r10d, %r10d
movslq (%rsi,%rax,4), %r11
xorl %ebx, %ebx
cmpb $0x0, (%rdx,%r11)
setne (%r8,%rax)
setne %bl
addl %ebx, %r10d
incq %rax
cmpq %rax, %r9
jne 0x14eaa
movl %edi, %eax
subl %r10d, %eax
movq %rcx, -0x18(%rsp)
cltq
leaq (%rcx,%rax,4), %rax
movq %rax, -0x10(%rsp)
testl %edi, %edi
jle 0x14fd2
xorl %eax, %eax
movl (%rsi,%rax,4), %ecx
movzbl (%r8,%rax), %edx
movq -0x18(%rsp,%rdx,8), %r10
leaq 0x4(%r10), %r11
movq %r11, -0x18(%rsp,%rdx,8)
movl %ecx, (%r10)
incq %rax
cmpq %rax, %r9
jne 0x14ee7
movb (%r8), %al
movl $0x1, %r10d
cmpl $0x1, %edi
je 0x14fdb
leal 0x1(%rdi), %ebp
movl $0x1, %r11d
movq %r8, %rdx
leaq (%r8,%r11), %rbx
movq %r9, %r15
subq %r11, %r15
movb $0x2, %cl
xorl %r14d, %r14d
cmpb %al, (%rbx,%r14)
jne 0x14f4b
incq %r14
addb $0x2, %cl
cmpq %r14, %r15
jne 0x14f35
jmp 0x15002
leaq 0x1(%r14), %r15
cmpl $0x10, %r15d
jb 0x14fa7
movl %ebp, -0x1c(%rsp)
movl $0xf0000000, %esi       # imm = 0xF0000000
movl $0x1c, %ecx
movl $0xe0, %ebp
movq %rdx, %r12
movl %esi, %r13d
andl %r15d, %r13d
je 0x14f86
shrl %cl, %r13d
addl %r13d, %r13d
orl %ebp, %r13d
orb %al, %r13b
movb %r13b, (%r12)
incq %r12
movl %esi, %r13d
shrl $0x4, %r13d
addl $-0x4, %ecx
addl $-0x20, %ebp
cmpl $0xf, %esi
movl %r13d, %esi
ja 0x14f6b
subl %edx, %r12d
movslq %r12d, %rax
movl -0x1c(%rsp), %ebp
jmp 0x14fb0
orb %al, %cl
movb %cl, (%rdx)
movl $0x1, %eax
addq %rax, %rdx
movb (%rbx,%r14), %al
leaq (%r11,%r14), %rcx
incq %rcx
notq %r11
addq %r9, %r11
cmpq %r14, %r11
movq %rcx, %r11
jne 0x14f26
jmp 0x14fde
movb (%r8), %al
movl $0x1, %r10d
movq %r8, %rdx
addb %r10b, %r10b
orb %al, %r10b
movb %r10b, (%rdx)
movl $0x1, %ecx
leaq (%rdx,%rcx), %rax
movb $0x0, (%rdx,%rcx)
subl %r8d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
subl %r11d, %ebp
subl %r11d, %edi
cmpl $0xf, %edi
jb 0x15055
movl $0xf0000000, %r10d      # imm = 0xF0000000
movl $0x1c, %ecx
movl $0xe0, %r9d
movq %rdx, %rdi
movl %r10d, %esi
andl %ebp, %esi
je 0x15038
shrl %cl, %esi
addl %esi, %esi
orl %r9d, %esi
orb %al, %sil
movb %sil, (%rdi)
incq %rdi
movl %r10d, %esi
shrl $0x4, %esi
addl $-0x4, %ecx
addl $-0x20, %r9d
cmpl $0xf, %r10d
movl %esi, %r10d
ja 0x15021
subl %edx, %edi
movslq %edi, %rcx
jmp 0x14fec
movl %ebp, %r10d
jmp 0x14fde
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/pbwt.c
// Function: pbc_dec_core
void pbc_dec_core(int m, const int32_t *S0, const uint8_t *u, int32_t *S, uint8_t *a)
{
	const uint8_t *q;
	int32_t *p[2], n1, s;
	for (q = u, n1 = 0; *q; ++q) // count the number of 1 bits
		if (*q&1) n1 += pbr_tbl[*q>>1];
	if (n1 == 0 || n1 == m) {
		memcpy(S, S0, m * 4);
		memset(a, (n1 == m), m);
	} else {
		p[0] = S, p[1] = p[0] + (m - n1);
		memset(a, 0, m);
		for (q = u, s = 0; *q; ++q) {
			int i, l = pbr_tbl[*q>>1], b = *q&1; // $l is the run length
			const int32_t *t = &S0[s];
			if (b) for (i = 0; i < l; ++i) a[t[i]] = b;
			memcpy(p[b], t, l * 4);
			p[b] += l;
			s += l;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %rbx
movq %rsi, 0x8(%rsp)
movl %edi, %r12d
movb (%rdx), %sil
testb %sil, %sil
je 0x15179
movq %rdx, %r14
incq %rdx
xorl %eax, %eax
leaq 0xa552(%rip), %r15      # 0x1f5e0
testb $0x1, %sil
je 0x1509f
movzbl %sil, %esi
andl $-0x2, %esi
addl (%r15,%rsi,2), %eax
movb (%rdx), %sil
incq %rdx
testb %sil, %sil
jne 0x1508e
testl %eax, %eax
setne %sil
movl %r12d, %edx
subl %eax, %edx
sete %bpl
setne %al
testb %al, %sil
je 0x15180
movq %rcx, 0x10(%rsp)
movslq %edx, %rax
leaq (%rcx,%rax,4), %rax
movq %rax, 0x18(%rsp)
movslq %r12d, %rdx
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x21e0
movb (%r14), %al
testb %al, %al
je 0x1516a
movq %r14, 0x20(%rsp)
movzbl %al, %ecx
movl %ecx, %eax
andl $-0x2, %eax
movl (%r15,%rax,2), %r14d
movl %r14d, %eax
movslq %ebp, %rdx
movq 0x8(%rsp), %rsi
leaq (%rsi,%rdx,4), %rsi
testl %r14d, %r14d
setg %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x1512b
xorl %edx, %edx
movslq (%rsi,%rdx,4), %rdi
movb $0x1, (%rbx,%rdi)
incq %rdx
cmpq %rdx, %rax
jne 0x1511b
movslq %r14d, %r13
andl $0x1, %ecx
movl %ecx, %r15d
movq 0x10(%rsp,%r15,8), %r12
shll $0x2, %eax
movslq %eax, %rdx
movq %r12, %rdi
callq 0x2280
leaq (%r12,%r13,4), %rax
movq %rax, 0x10(%rsp,%r15,8)
addl %r14d, %ebp
movq 0x20(%rsp), %r14
movb 0x1(%r14), %al
incq %r14
testb %al, %al
leaq 0xa478(%rip), %r15      # 0x1f5e0
jne 0x150ec
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %r12d, %r12d
sete %bpl
leal (,%r12,4), %eax
movslq %eax, %rdx
movq %rcx, %rdi
movq 0x8(%rsp), %rsi
callq 0x2280
movslq %r12d, %rdx
movzbl %bpl, %esi
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21e0
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/pbwt.c
// Function: pbf_open_w
pbf_t *pbf_open_w(const char *fn, int m, int g, int shift)
{
	FILE *fp;
	pbf_t *pb;
	int32_t i, v[3];
	if (fn && strcmp(fn, "-") != 0) {
		if ((fp = fopen(fn, "wb")) == NULL)
			return 0;
	} else fp = stdout;
	pb = (pbf_t*)calloc(1, sizeof(pbf_t));
	pb->fp = fp;
	pb->m = m, pb->g = g, pb->shift = shift;
	pb->pb = (pbc_t**)calloc(g, sizeof(void*));
	for (i = 0; i < g; ++i)
		pb->pb[i] = pbc_init(m);
	v[0] = pb->m, v[1] = pb->g, v[2] = pb->shift;
	fwrite("PBF\1", 1, 4, fp);
	fwrite(v, 4, 3, fp);
	pb->is_writing = 1;
	return pb;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r14d
testq %rdi, %rdi
je 0x156e4
cmpb $0x2d, (%rdi)
jne 0x156c8
cmpb $0x0, 0x1(%rdi)
je 0x156e4
leaq 0x8c78(%rip), %rsi      # 0x1e347
callq 0x23b0
movq %rax, %r15
testq %rax, %rax
jne 0x156ee
xorl %r12d, %r12d
jmp 0x15799
movq 0x10895(%rip), %rax     # 0x25f80
movq (%rax), %r15
movl $0x1, %edi
movl $0x70, %esi
callq 0x2220
movq %rax, %r12
movq %r15, (%rax)
movl %r14d, 0x8(%rax)
movl %ebp, 0xc(%rax)
movl %ebx, 0x8(%rsp)
movl %ebx, 0x10(%rax)
movl %ebp, 0x4(%rsp)
movslq %ebp, %rbx
movl $0x8, %esi
movq %rbx, %rdi
callq 0x2220
movq %rax, 0x20(%r12)
testl %ebx, %ebx
jle 0x1574c
movq %rax, %r13
movl 0x4(%rsp), %ebx
xorl %ebp, %ebp
movl %r14d, %edi
callq 0x151b5
movq %rax, (%r13,%rbp,8)
incq %rbp
cmpq %rbp, %rbx
jne 0x15737
leaq 0xc(%rsp), %rbx
movl %r14d, (%rbx)
movl 0x4(%rsp), %eax
movl %eax, 0x4(%rbx)
movl 0x8(%rsp), %eax
movl %eax, 0x8(%rbx)
leaq 0xa077(%rip), %rdi      # 0x1f7e0
movl $0x1, %esi
movl $0x4, %edx
movq %r15, %rcx
callq 0x2400
movl $0x4, %esi
movl $0x3, %edx
movq %rbx, %rdi
movq %r15, %rcx
callq 0x2400
movl $0x1, 0x14(%r12)
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/pbwt.c
// Function: pbf_close
int pbf_close(pbf_t *pb)
{
	int g;
	if (pb == 0) return 0;
	if (pb->is_writing) { // write the index
		uint64_t off;
		off = ftell(pb->fp);
		fputc('I', pb->fp);
		fwrite(&pb->n, 8, 1, pb->fp);
		fwrite(&pb->n_idx, 4, 1, pb->fp);
		fwrite(pb->idx, 8, pb->n_idx, pb->fp);
		fwrite(&off, 8, 1, pb->fp);
	}
	free(pb->idx); free(pb->ret); free(pb->invS); free(pb->buf); free(pb->sub_list);
	for (g = 0; g < pb->g; ++g) {
		free(pb->pb[g]);
		if (pb->sub) free(pb->sub[g]);
	}
	free(pb->sub); free(pb->pb);
	fclose(pb->fp);
	free(pb);
	return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x15ad3
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x14(%rdi)
je 0x15a49
movq (%rbx), %rdi
callq 0x2260
movq %rsp, %r14
movq %rax, (%r14)
movq (%rbx), %rsi
movl $0x49, %edi
callq 0x21f0
leaq 0x18(%rbx), %rdi
movq (%rbx), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x2400
leaq 0x30(%rbx), %rdi
movq (%rbx), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x2400
movq (%rbx), %rcx
movq 0x38(%rbx), %rdi
movslq 0x30(%rbx), %rdx
movl $0x8, %esi
callq 0x2400
movq (%rbx), %rcx
movl $0x8, %esi
movl $0x1, %edx
movq %r14, %rdi
callq 0x2400
movq 0x38(%rbx), %rdi
callq 0x2050
movq 0x28(%rbx), %rdi
callq 0x2050
movq 0x68(%rbx), %rdi
callq 0x2050
movq 0x60(%rbx), %rdi
callq 0x2050
movq 0x50(%rbx), %rdi
callq 0x2050
cmpl $0x0, 0xc(%rbx)
jle 0x15aaa
xorl %r14d, %r14d
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2050
movq 0x48(%rbx), %rax
testq %rax, %rax
je 0x15a9e
movq (%rax,%r14,8), %rdi
callq 0x2050
incq %r14
movslq 0xc(%rbx), %rax
cmpq %rax, %r14
jl 0x15a7f
movq 0x48(%rbx), %rdi
callq 0x2050
movq 0x20(%rbx), %rdi
callq 0x2050
movq (%rbx), %rdi
callq 0x2160
movq %rbx, %rdi
callq 0x2050
addq $0x8, %rsp
popq %rbx
popq %r14
xorl %eax, %eax
retq