LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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 0xad85
movslq (%rsi), %rcx
movq 0x48(%rsi), %rdi
xorl %edx, %edx
movq %rcx, %rax
subq $0x1, %rcx
jb 0xad6c
movb -0x1(%rdi,%rax), %sil
testb %sil, %sil
je 0xad4b
xorl %ecx, %ecx
cmpb $0xa, %sil
sete %cl
subl %ecx, %eax
movslq %eax, %rdx
movq 0x38(%rbx), %rcx
pushq $0x1
popq %rsi
callq 0x2410
movq 0x38(%rbx), %rsi
pushq $0xa
popq %rdi
popq %rbx
jmp 0x21f0
movq 0x38(%rbx), %rdi
popq %rbx
jmp 0xa66b
// File: /workspace/github_c_makefile_star2_O2/lh3[P]bgt/./vcf.h
// Function: bcf_enc_size
static inline void bcf_enc_size(kstring_t *s, int size, int type)
{
	if (size >= 15) {
		kputc(15<<4|type, s);
		if (size >= 128) {
			if (size >= 32768) {
				int32_t x = size;
				kputc(1<<4|BCF_BT_INT32, s);
				kputsn((char*)&x, 4, s);
			} else {
				int16_t x = size;
				kputc(1<<4|BCF_BT_INT16, s);
				kputsn((char*)&x, 2, s);
			}
		} else {
			kputc(1<<4|BCF_BT_INT8, s);
			kputc(size, s);
		}
	} else kputc(size<<4|type, s);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %rbx
cmpl $0xf, %esi
jl 0xaf6c
orl $0xf0, %edx
movl %edx, %edi
movq %rbx, %rsi
callq 0xacb6
cmpl $0x80, %ebp
jb 0xaf73
cmpl $0x8000, %ebp           # imm = 0x8000
jb 0xaf90
leaq 0xc(%rsp), %r14
movl %ebp, (%r14)
pushq $0x13
popq %rdi
movq %rbx, %rsi
callq 0xacb6
pushq $0x4
jmp 0xafa6
shll $0x4, %ebp
orl %edx, %ebp
jmp 0xaf7e
pushq $0x11
popq %rdi
movq %rbx, %rsi
callq 0xacb6
movl %ebp, %edi
movq %rbx, %rsi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0xacb6
leaq 0xa(%rsp), %r14
movw %bp, (%r14)
pushq $0x12
popq %rdi
movq %rbx, %rsi
callq 0xacb6
pushq $0x2
popq %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0xac22
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]bgt/./vcf.h
// Function: bcf_enc_int1
static inline void bcf_enc_int1(kstring_t *s, int32_t x)
{
	if (x == INT32_MIN) {
		bcf_enc_size(s, 1, BCF_BT_INT8);
		kputc(INT8_MIN, s);
	} else if (x <= INT8_MAX && x > INT8_MIN) {
		bcf_enc_size(s, 1, BCF_BT_INT8);
		kputc(x, s);
	} else if (x <= INT16_MAX && x > INT16_MIN) {
		int16_t z = x;
		bcf_enc_size(s, 1, BCF_BT_INT16);
		kputsn((char*)&z, 2, s);
	} else {
		int32_t z = x;
		bcf_enc_size(s, 1, BCF_BT_INT32);
		kputsn((char*)&z, 4, s);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %eax
negl %eax
jno 0xafdd
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl %edx, %esi
callq 0xaf23
pushq $-0x80
popq %rdi
jmp 0xaffb
movl %esi, %r14d
leal 0x7f(%r14), %eax
cmpl $0xfe, %eax
ja 0xb00d
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl %edx, %esi
callq 0xaf23
movl %r14d, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xacb6
leal 0x7fff(%r14), %eax
cmpl $0xfffe, %eax           # imm = 0xFFFE
ja 0xb03b
leaq 0x2(%rsp), %r15
movw %r14w, (%r15)
pushq $0x1
popq %rsi
pushq $0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %edx
callq 0xaf23
movq %r15, %rdi
movl %ebp, %esi
jmp 0xb057
leaq 0x4(%rsp), %r15
movl %r14d, (%r15)
pushq $0x1
popq %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0xaf23
pushq $0x4
popq %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0xac22
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]bgt/./vcf.h
// Function: bcf_dec_size
static inline int32_t bcf_dec_size(const uint8_t *p, uint8_t **q, int *type)
{
	*type = *p & 0xf;
	if (*p>>4 != 15) {
		*q = (uint8_t*)p + 1;
		return *p>>4;
	} else return bcf_dec_typed_int1(p + 1, q);
}

// Assembly:
movzbl (%rdi), %eax
andl $0xf, %eax
movl %eax, (%rdx)
leaq 0x1(%rdi), %rax
cmpb $-0x11, (%rdi)
jbe 0xb476
movq %rax, %rdi
jmp 0xc5b6
movq %rax, (%rsi)
movzbl (%rdi), %eax
shrl $0x4, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]bgt/./kstring.h
// Function: kstrtok
static inline char *kstrtok(const char *str, const char *sep, ks_tokaux_t *aux)
{
	const char *p, *start;
	if (sep) { // set up the table
		if (str == 0 && (aux->tab[0]&1)) return 0; // no need to set up if we have finished
		aux->finished = 0;
		if (sep[1]) {
			aux->sep = -1;
			aux->tab[0] = aux->tab[1] = aux->tab[2] = aux->tab[3] = 0;
			for (p = sep; *p; ++p) aux->tab[*p>>6] |= 1ull<<(*p&0x3f);
		} else aux->sep = sep[0];
	}
	if (aux->finished) return 0;
	else if (str) aux->p = str - 1, aux->finished = 0;
	if (aux->sep < 0) {
		for (p = start = aux->p + 1; *p; ++p)
			if (aux->tab[*p>>6]>>(*p&0x3f)&1) break;
	} else {
		for (p = start = aux->p + 1; *p; ++p)
			if (*p == aux->sep) break;
	}
	aux->p = p; // end of token
	if (*p == 0) aux->finished = 1; // no more tokens
	return (char*)start;
}

// Assembly:
testq %rsi, %rsi
je 0xc349
testq %rdi, %rdi
jne 0xc312
testb $0x1, (%rdx)
jne 0xc34f
andl $0x0, 0x24(%rdx)
cmpb $0x0, 0x1(%rsi)
je 0xc352
orl $-0x1, 0x20(%rdx)
xorps %xmm0, %xmm0
movups %xmm0, (%rdx)
movups %xmm0, 0x10(%rdx)
pushq $0x1
popq %rax
movsbl (%rsi), %ecx
testl %ecx, %ecx
je 0xc358
movq %rax, %r8
shlq %cl, %r8
sarl $0x6, %ecx
movslq %ecx, %rcx
orq %r8, (%rdx,%rcx,8)
incq %rsi
jmp 0xc32d
cmpl $0x0, 0x24(%rdx)
je 0xc358
xorl %eax, %eax
retq
movsbl (%rsi), %eax
movl %eax, 0x20(%rdx)
testq %rdi, %rdi
je 0xc368
decq %rdi
movq %rdi, 0x28(%rdx)
andl $0x0, 0x24(%rdx)
movl 0x20(%rdx), %esi
movq 0x28(%rdx), %rcx
leaq 0x1(%rcx), %rax
testl %esi, %esi
js 0xc390
movsbl 0x1(%rcx), %edi
incq %rcx
testl %edi, %edi
je 0xc386
cmpl %edi, %esi
jne 0xc377
movq %rcx, 0x28(%rdx)
cmpb $0x0, (%rcx)
je 0xc3b1
retq
movq %rax, %rcx
movsbl (%rcx), %esi
testl %esi, %esi
je 0xc386
movl %esi, %edi
sarl $0x6, %edi
movslq %edi, %rdi
movq (%rdx,%rdi,8), %rdi
btq %rsi, %rdi
jb 0xc386
incq %rcx
jmp 0xc393
movl $0x1, 0x24(%rdx)
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xc512
movq %rsi, %r14
leaq 0x10(%rdi), %r15
pushq $0x2
popq %rsi
movq %r15, %rdx
callq 0x6081
testl %eax, %eax
js 0xc523
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xb480
xorl %eax, %eax
jmp 0xc526
movq 0x38(%rdi), %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xa71d
pushq $-0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movl %esi, %ebp
leaq 0x8(%rsp), %r14
movq %rdi, (%r14)
xorl %r15d, %r15d
testl %edx, %edx
cmovgl %edx, %r15d
addq $0x8, %rbx
leaq 0x14e37(%rip), %r12     # 0x21390
subq $0x1, %r15
jb 0xc5a6
movq %r14, %rsi
callq 0xc5b6
movl %eax, -0x8(%rbx)
movq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xb45d
movl %eax, -0x4(%rbx)
movslq (%rbx), %rcx
movb (%rcx,%r12), %cl
shll %cl, %eax
movl %eax, 0x4(%rbx)
movq 0x8(%rsp), %rcx
movq %rcx, 0x8(%rbx)
imull %ebp, %eax
movslq %eax, %rdi
addq %rcx, %rdi
movq %rdi, 0x8(%rsp)
addq $0x18, %rbx
jmp 0xc559
movq %rdi, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsp, %r14
movq %rdi, (%r14)
xorl %r15d, %r15d
testl %esi, %esi
cmovlel %r15d, %esi
imulq $0x18, %rsi, %r12
leaq 0x4(%rdx), %r13
leaq 0x14d9d(%rip), %rbp     # 0x21390
cmpq %r15, %r12
je 0xc680
movq %r14, %rsi
callq 0xc5b6
movl %eax, (%rbx,%r15)
movq (%rsp), %rdi
leaq (%r15,%r13), %rdx
movq %r14, %rsi
callq 0xb45d
movl %eax, 0x8(%rbx,%r15)
movq (%rsp), %rdi
movq %rdi, 0x10(%rbx,%r15)
andl $0x0, 0xc(%rbx,%r15)
movslq 0x4(%rbx,%r15), %rcx
cmpl $0x1, %eax
jne 0xc65f
leal -0x1(%rcx), %edx
cmpl $0x6, %edx
ja 0xc65f
leaq 0xcb5f(%rip), %rsi      # 0x191a4
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
movsbl (%rdi), %edx
jmp 0xc65a
movswl (%rdi), %edx
jmp 0xc65a
movl (%rdi), %edx
movl %edx, 0xc(%rbx,%r15)
movb (%rcx,%rbp), %cl
shll %cl, %eax
cltq
addq %rax, %rdi
movq %rdi, (%rsp)
addq $0x18, %r15
jmp 0xc5f3
movss (%rdi), %xmm0
movss %xmm0, 0xc(%rbx,%r15)
jmp 0xc65f
movq %rdi, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]bgt/./vcf.h
// Function: bcf_dec_int1
static inline int32_t bcf_dec_int1(const uint8_t *p, int type, uint8_t **q)
{
	if (type == BCF_BT_INT8) {
		*q = (uint8_t*)p + 1;
		return *(int8_t*)p;
	} else if (type == BCF_BT_INT16) {
		*q = (uint8_t*)p + 2;
		return *(int16_t*)p;
	} else {
		*q = (uint8_t*)p + 4;
		return *(int32_t*)p;
	}
}

// Assembly:
cmpl $0x2, %esi
je 0xca0b
cmpl $0x1, %esi
jne 0xca16
leaq 0x1(%rdi), %rax
movq %rax, (%rdx)
movsbl (%rdi), %eax
retq
leaq 0x2(%rdi), %rax
movq %rax, (%rdx)
movswl (%rdi), %eax
retq
leaq 0x4(%rdi), %rax
movq %rax, (%rdx)
movl (%rdi), %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xced5
leaq 0x10(%rbx), %rax
movq %rsi, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0xca20
movq 0x10(%rbx), %rdx
movq 0x20(%rbx), %rdi
movq 0x38(%rbx), %rcx
pushq $0x1
popq %rsi
callq 0x2410
movq 0x38(%rbx), %rsi
pushq $0xa
popq %rdi
callq 0x21f0
jmp 0xcee1
movq 0x38(%rbx), %rdi
movq %rdx, %rsi
callq 0xa81b
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
movslq %esi, %rax
movq 0x30(%rdi,%rax,8), %rbx
movq %rbx, %rdi
movq %rdx, %rsi
callq 0xc3b9
cmpl (%rbx), %eax
jne 0xcf02
pushq $-0x1
popq %rax
jmp 0xcf10
movq 0x20(%rbx), %rcx
movl %eax, %eax
shlq $0x4, %rax
movl 0xc(%rcx,%rax), %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xa5ac
movq %rax, %r14
movl 0xc(%rax), %edi
xorl %ecx, %ecx
testl %edi, %edi
movl $0x0, %edx
cmovgl %edi, %edx
shlq $0x4, %rdx
xorl %eax, %eax
cmpq %rcx, %rdx
je 0xcf63
movq 0x20(%r14), %rsi
movq 0x8(%rsi,%rcx), %rsi
movl (%rsi), %esi
cmpq %rsi, %rax
cmovleq %rsi, %rax
addq $0x10, %rcx
jmp 0xcf46
pushq $0x1
popq %rdx
movl %ebp, %ecx
shll %cl, %edx
addq $0x100, %rax            # imm = 0x100
movslq %edx, %rcx
xorl %r8d, %r8d
cmpq %rcx, %rax
jle 0xcf84
incl %r8d
shlq $0x3, %rcx
jmp 0xcf76
movq 0x10(%rbx), %rax
shlq $0x10, %rax
movzwl 0xc(%rbx), %edx
orq %rax, %rdx
xorl %esi, %esi
movl %ebp, %ecx
callq 0x6663
movq %rax, %r15
movq %r14, %rdi
callq 0xa500
callq 0xa6a8
movq %rax, %r14
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa71d
testl %eax, %eax
js 0xcfed
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 %ebp, %r9d
callq 0x6d56
testl %eax, %eax
jns 0xcfb2
movq 0x10(%rbx), %rax
shlq $0x10, %rax
movzwl 0xc(%rbx), %esi
orq %rax, %rsi
movq %r15, %rdi
callq 0x6724
movq %r14, %rdi
callq 0xa6b5
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xc1cb(%rip), %rsi      # 0x191f8
callq 0x3ef4
testq %rax, %rax
je 0xd068
movq %rax, %r14
movq %rax, %rdi
movl %ebp, %esi
callq 0xcf1d
movq %rax, %r15
movq %r14, %rdi
callq 0x4ddc
xorl %ebp, %ebp
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x72a6
movq %r15, %rdi
callq 0x71c5
jmp 0xd06b
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]bgt/vcf.c
// Function: bcf_hdr_subset
bcf_hdr_t *bcf_hdr_subset(const bcf_hdr_t *h0, int n, char *const* samples, int *imap)
{
	kstring_t str;
	bcf_hdr_t *h;
	str.l = str.m = 0; str.s = 0;
	h = bcf_hdr_init();
	if (h0->n[BCF_DT_SAMPLE] > 0) {
		char *p;
		int i = 0, end = n? 8 : 7;
		while ((p = strstr(h0->text, "#CHROM\t")) != 0)
			if (p > h0->text && *(p-1) == '\n') break;
		while ((p = strchr(p, '\t')) != 0 && i < end) ++i, ++p;
		if (i != end) {
			free(h); free(str.s);
			return 0; // malformated header
		}
		kputsn(h0->text, p - h0->text, &str);
		for (i = 0; i < n; ++i) {
			imap[i] = bcf_id2int(h0, BCF_DT_SAMPLE, samples[i]);
			if (imap[i] < 0) continue;
			kputc('\t', &str);
			kputs(samples[i], &str);
		}
	} else kputsn(h0->text, h0->l_text, &str);
	h->text = str.s;
	h->l_text = str.l + 1; // including NULL
	bcf_hdr_parse(h);
	return h;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, 0x30(%rsp)
movq %rdx, %r12
movl %esi, %r13d
movq %rdi, %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
callq 0xa4b6
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x10(%r15)
jle 0xd160
cmpl $0x1, %r13d
pushq $0x8
popq %rbp
sbbl $0x0, %ebp
movq 0x48(%r15), %rdi
leaq 0xc34e(%rip), %rsi      # 0x1941a
movq %rdi, 0x28(%rsp)
callq 0x2450
xorl %r14d, %r14d
pushq $0x9
popq %rbx
movq %rax, %rdi
movl %ebx, %esi
callq 0x2180
testq %rax, %rax
je 0xd0f8
cmpl %ebp, %r14d
jae 0xd0f8
incl %r14d
incq %rax
jmp 0xd0dc
cmpl %r14d, %ebp
jne 0xd191
movq 0x28(%rsp), %rdi
subl %edi, %eax
leaq 0x10(%rsp), %rbp
movl %eax, %esi
movq %rbp, %rdx
callq 0xac22
xorl %r14d, %r14d
testl %r13d, %r13d
cmovlel %r14d, %r13d
pushq $0x2
popq %rbx
cmpq %r14, %r13
je 0xd171
movq (%r12,%r14,8), %rdx
movq %r15, %rdi
movl %ebx, %esi
callq 0xcee5
movq 0x30(%rsp), %rcx
movl %eax, (%rcx,%r14,4)
testl %eax, %eax
js 0xd15b
pushq $0x9
popq %rdi
movq %rbp, %rsi
callq 0xacb6
movq (%r12,%r14,8), %rdi
movq %rbp, %rsi
callq 0xab21
incq %r14
jmp 0xd124
movq 0x48(%r15), %rdi
movl (%r15), %esi
leaq 0x10(%rsp), %rdx
callq 0xac22
movq 0x20(%rsp), %rax
movq 0x8(%rsp), %rbx
movq %rax, 0x48(%rbx)
movl 0x10(%rsp), %eax
incl %eax
movl %eax, (%rbx)
movq %rbx, %rdi
callq 0xa30d
jmp 0xd19d
movq 0x8(%rsp), %rdi
callq 0x2050
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]bgt/vcf.c
// Function: bcf_subset
int bcf_subset(const bcf_hdr_t *h, bcf1_t *v, int n, int *imap)
{
	kstring_t ind;
	ind.s = 0; ind.l = ind.m = 0;
	if (n) {
		bcf_fmt_t *fmt;
		int i, j;
		fmt = (bcf_fmt_t*)alloca(v->n_fmt * sizeof(bcf_fmt_t));
		bcf_unpack_fmt_core((uint8_t*)v->indiv.s, v->n_sample, v->n_fmt, fmt);
		for (i = 0; i < (int)v->n_fmt; ++i) {
			bcf_fmt_t *f = &fmt[i];
			bcf_enc_int1(&ind, f->id);
			bcf_enc_size(&ind, f->n, f->type);
			for (j = 0; j < n; ++j)
				if (imap[j] >= 0) kputsn((char*)(f->p + imap[j] * f->size), f->size, &ind);
		}
		for (i = j = 0; j < n; ++j) if (imap[j] >= 0) ++i;
		v->n_sample = i;
	} else v->n_sample = 0;
	free(v->indiv.s);
	v->indiv = ind;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
andq $0x0, -0x30(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movq 0x10(%rsi), %rsi
testl %edx, %edx
je 0xd2ca
movq %rcx, %r14
movl %edx, %r15d
movq %rsi, %rax
shrq $0x20, %rax
movzbl %al, %edx
imull $0x18, %edx, %eax
movq %rsp, %rcx
addl $0xf, %eax
andl $-0x10, %eax
subq %rax, %rcx
movq %rcx, %rsp
movq 0x40(%rbx), %rdi
shrq $0x28, %rsi
movq %rcx, -0x48(%rbp)
callq 0xc52c
xorl %ecx, %ecx
testl %r15d, %r15d
cmovlel %ecx, %r15d
movq %rbx, -0x50(%rbp)
movq 0x10(%rbx), %rsi
movq %rsi, %rax
shrq $0x20, %rax
movzbl %al, %eax
cmpq %rax, %rcx
jae 0xd29b
movq %rcx, -0x58(%rbp)
imulq $0x18, %rcx, %rbx
movq -0x48(%rbp), %r13
leaq (%rbx,%r13), %r12
movl (%r13,%rbx), %esi
leaq -0x40(%rbp), %rdi
callq 0xafbb
movl 0x4(%r13,%rbx), %esi
movl 0x8(%r13,%rbx), %edx
leaq -0x40(%rbp), %r13
movq %r13, %rdi
callq 0xaf23
xorl %ebx, %ebx
cmpq %rbx, %r15
je 0xd28e
movl (%r14,%rbx,4), %eax
testl %eax, %eax
js 0xd289
movl 0xc(%r12), %esi
imull %esi, %eax
movslq %eax, %rdi
addq 0x10(%r12), %rdi
movq %r13, %rdx
callq 0xac22
incq %rbx
jmp 0xd264
movq -0x58(%rbp), %rcx
incq %rcx
movq -0x50(%rbp), %rbx
jmp 0xd21b
xorl %ecx, %ecx
xorl %eax, %eax
cmpq %rcx, %r15
je 0xd2b4
movl (%r14,%rcx,4), %edx
notl %edx
shrl $0x1f, %edx
addl %edx, %eax
incq %rcx
jmp 0xd29f
shlq $0x28, %rax
movabsq $0xffffffffff, %rcx     # imm = 0xFFFFFFFFFF
andq %rcx, %rsi
orq %rax, %rsi
jmp 0xd2d7
movabsq $0xffffffffff, %rax     # imm = 0xFFFFFFFFFF
andq %rax, %rsi
movq %rsi, 0x10(%rbx)
movq 0x40(%rbx), %rdi
callq 0x2050
movq -0x30(%rbp), %rax
movq %rax, 0x40(%rbx)
movaps -0x40(%rbp), %xmm0
movups %xmm0, 0x30(%rbx)
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_O2/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0xc692
movl 0x10(%rbx), %r14d
shrl $0x10, %r14d
xorl %r15d, %r15d
cmpq %r15, %r14
je 0xd33d
movq 0x68(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x2170
cmpq $0x1, %rax
jne 0xd340
incq %r15
jmp 0xd320
movl %r14d, %r15d
xorl %eax, %eax
cmpl %r14d, %r15d
sete %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x2
popq %rsi
callq 0xc692
movl 0x5c(%rbx), %eax
testl %eax, %eax
je 0xd372
cmpl $0x1, %eax
jne 0xd36f
movq 0x70(%rbx), %rax
cmpl $0x0, (%rax)
je 0xd374
pushq $0x1
popq %rax
popq %rbx
retq
xorl %eax, %eax
jmp 0xd372
// File: /workspace/github_c_makefile_star2_O2/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, %rbx
movq %rdi, %r12
leaq 0x18(%rdi), %r15
movups 0x20(%rdi), %xmm0
movaps %xmm0, 0x10(%rsp)
leaq 0x30(%rdi), %r14
movups 0x38(%rdi), %xmm0
movaps %xmm0, (%rsp)
movq 0x60(%rdi), %rdi
callq 0x2050
movq 0x68(%r12), %rdi
callq 0x2050
movq 0x70(%r12), %rdi
callq 0x2050
movq 0x78(%r12), %rdi
callq 0x2050
movq 0x80(%r12), %rdi
callq 0x2050
movl $0x90, %edx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2280
andq $0x0, 0x90(%r12)
andq $0x0, 0x18(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%r12)
movups %xmm0, 0x58(%r12)
movups %xmm0, 0x68(%r12)
movups %xmm0, 0x78(%r12)
andl $0x0, 0x88(%r12)
movaps 0x10(%rsp), %xmm0
movups %xmm0, 0x20(%r12)
andq $0x0, 0x30(%r12)
movaps (%rsp), %xmm0
movups %xmm0, 0x38(%r12)
movq 0x28(%rbx), %rdi
movl 0x18(%rbx), %esi
movq %r15, %rdx
callq 0xac22
movq 0x40(%rbx), %rdi
movl 0x30(%rbx), %esi
movq %r14, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xac22
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
andq $0x0, (%r8)
movq %rdx, %r13
andq $0x0, (%rdx)
movq %rcx, %r14
andl $0x0, (%rcx)
movq %rsi, %rbp
andl $0x0, (%rsi)
movq 0x28(%rdi), %rdi
leaq 0x10(%rsp), %r15
movq %rdi, (%r15)
leaq 0xc(%rsp), %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0xb45d
movslq (%r12), %rcx
leaq 0x13ee4(%rip), %rdx     # 0x21390
movb (%rcx,%rdx), %cl
shll %cl, %eax
movslq %eax, %rdi
addq (%r15), %rdi
movq %rdi, (%r15)
movq %r15, %rsi
movq %r12, %rdx
callq 0xb45d
movl %eax, (%rbp)
movq (%r15), %rdx
movq %rdx, (%r13)
movslq (%r12), %rcx
leaq 0x13eb6(%rip), %rsi     # 0x21390
movb (%rcx,%rsi), %cl
shll %cl, %eax
movslq %eax, %rdi
addq %rdx, %rdi
movq %rdi, (%r15)
movq %r15, %rsi
movq %r12, %rdx
callq 0xb45d
movl %eax, (%r14)
movq (%r15), %rax
movq %rax, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
subq $0x10, %rsp
movl (%rdi), %ebx
subl (%rsi), %ebx
jne 0xd592
movq %rsi, %r14
movl 0x4(%rdi), %ebx
subl 0x4(%rsi), %ebx
jne 0xd592
movl 0x8(%rdi), %ebx
subl 0x8(%r14), %ebx
jne 0xd592
leaq 0x8(%rsp), %rsi
callq 0xd50b
movq %rax, %r15
leaq 0xc(%rsp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd50b
movl -0x4(%rbx), %ecx
movl (%rbx), %edx
movl %ecx, %ebx
subl %edx, %ebx
cmovll %ecx, %edx
movslq %edx, %rdx
movq %r15, %rdi
movq %rax, %rsi
callq 0x2090
testl %eax, %eax
cmovnel %eax, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x4(%rsp), %rbp
leaq 0x10(%rsp), %r12
movq %rsp, %rcx
leaq 0x8(%rsp), %r13
movq %rsi, %rdi
movq %rbp, %rsi
movq %r12, %rdx
movq %r13, %r8
callq 0xd45d
movq (%r15), %rax
movq %rax, (%rbx)
movl 0x8(%r15), %eax
movl %eax, 0x8(%rbx)
andl $0x0, 0xc(%rbx)
xorl %eax, %eax
testq %r14, %r14
setne %al
shll $0x10, %eax
orq $0x20000, %rax          # imm = 0x20000
movq %rax, 0x10(%rbx)
andq $0x0, 0x30(%rbx)
leaq 0x18(%rbx), %r15
andq $0x0, 0x18(%rbx)
pushq $0x7
popq %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0xaf23
movl (%rbp), %ebp
movq (%r12), %rdx
movq %r15, %rdi
movl %ebp, %esi
callq 0xb092
movq %rsp, %rax
movl (%rax), %esi
movq (%r13), %rdx
movq %r15, %rdi
callq 0xb092
testq %r14, %r14
je 0xd655
movq %r14, %rdi
callq 0x2170
movq %r15, %rdi
movl %eax, %esi
movq %r14, %rdx
callq 0xb092
pushq $-0x1
popq %rcx
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xad8f
andl $0x0, 0x88(%rbx)
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xcee5
testl %eax, %eax
js 0xd6bd
incw 0x10(%r15)
addq $0x18, %r15
movq %r15, %rdi
movl %eax, %esi
callq 0xafbb
pushq $-0x1
popq %rcx
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0xad8f
jmp 0xd6c0
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x8401
testl %eax, %eax
jle 0xd70e
movl %eax, %ebp
callq 0xa6a8
movq %rax, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa71d
movl %eax, %r15d
cmpl $0x2, %ebp
jb 0xd704
decl %ebp
testl %r15d, %r15d
jns 0xd6ea
movq %r14, %rdi
callq 0xa6b5
jmp 0xd711
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]bgt/atomic.c
// Function: bcf_add_atom
static void bcf_add_atom(bcf_atom_v *a, int rid, int pos, int rlen, int anum, int l_ref, const char *ref, int l_alt, const char *alt)
{
	bcf_atom_t *p;
	if (a->n == a->m) {
		int oldm = a->m;
		a->m = a->m? a->m<<1 : 4;
		a->a = (bcf_atom_t*)realloc(a->a, a->m * sizeof(bcf_atom_t));
		memset(a->a + oldm, 0, (a->m - oldm) * sizeof(bcf_atom_t));
	}
	p = &a->a[a->n++];
	p->rid = rid, p->pos = pos, p->rlen = rlen, p->anum = anum;
	p->ref.l = 0;
	p->from_new = 1;
	if (l_ref < 0) l_ref = strlen(ref);
	if (l_alt < 0) l_alt = strlen(alt);
	kputsn(ref, l_ref, &p->ref); kputc('\0', &p->ref);
	kputsn(alt, l_alt, &p->ref);
	p->alt = p->ref.s + l_ref + 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movl %r8d, %r15d
movl %esi, %ebp
movq %rdi, %r12
movl (%rdi), %eax
cmpl 0x4(%rdi), %eax
jne 0xe590
movslq %eax, %r13
leal (%rax,%rax), %esi
testl %eax, %eax
pushq $0x4
popq %rax
cmovnel %esi, %eax
movl %eax, 0x4(%r12)
movq 0x8(%r12), %rdi
movslq %eax, %rsi
shlq $0x6, %rsi
movl %ecx, 0x4(%rsp)
movl %edx, (%rsp)
callq 0x2340
movq %rax, %r14
movq %rax, 0x8(%r12)
movq %r13, %rdi
shlq $0x6, %rdi
addq %rax, %rdi
movslq 0x4(%r12), %rdx
subq %r13, %rdx
shlq $0x6, %rdx
xorl %esi, %esi
callq 0x21e0
movl (%rsp), %edx
movl 0x4(%rsp), %ecx
movl (%r12), %eax
jmp 0xe595
movq 0x8(%r12), %r14
movl 0x48(%rsp), %r13d
leal 0x1(%rax), %esi
movl %esi, (%r12)
movslq %eax, %r12
shlq $0x6, %r12
movl %ebp, 0x20(%r14,%r12)
movl %edx, 0x24(%r14,%r12)
movl %ecx, 0x28(%r14,%r12)
movl $0xa0000000, %eax       # imm = 0xA0000000
andl 0x30(%r14,%r12), %eax
movq 0x40(%rsp), %rbp
andq $0x0, (%r14,%r12)
andl $0x1fffffff, %r15d      # imm = 0x1FFFFFFF
addl %r15d, %eax
addl $0x40000000, %eax       # imm = 0x40000000
movl %eax, 0x30(%r14,%r12)
testl %ebx, %ebx
jns 0xe5ee
movq %rbp, %rdi
callq 0x2170
movq %rax, %rbx
movq 0x50(%rsp), %r15
addq %r12, %r14
testl %r13d, %r13d
jns 0xe606
movq %r15, %rdi
callq 0x2170
movq %rax, %r13
movq %rbp, %rdi
movl %ebx, %esi
movq %r14, %rdx
callq 0xe64b
xorl %edi, %edi
movq %r14, %rsi
callq 0xe7ba
movq %r15, %rdi
movl %r13d, %esi
movq %r14, %rdx
callq 0xe64b
movq 0x10(%r14), %rax
movslq %ebx, %rcx
addq %rcx, %rax
incq %rax
movq %rax, 0x18(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
movq %rdi, %r14
xorl %ebp, %ebp
testl %esi, %esi
setne %bpl
pushq $0x1
popq %rdi
pushq $0x30
popq %rsi
callq 0x2220
movq %rax, %rbx
movl %ebp, %r13d
shll $0x10, %r13d
movl %r13d, 0x24(%rax)
movq %r14, (%rax)
movq %r14, %rdi
callq 0xa891
movq %rax, %r15
movq %rax, 0x28(%rbx)
xorl %eax, %eax
callq 0xa6a8
movq %rax, %r12
movq %rax, 0x18(%rbx)
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
movl %ebp, %ecx
callq 0xeca0
testl %eax, %eax
js 0xec86
movq %rbx, %rdx
addq $0x8, %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0xe056
movq 0x28(%rbx), %rsi
movq (%rbx), %rdi
movq 0x18(%rbx), %rdx
movl 0x24(%rbx), %r13d
movl %r13d, %ecx
shrl $0x10, %ecx
callq 0xeca0
testl %eax, %eax
jns 0xec8e
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_O2/lh3[P]bgt/atomic.c
// Function: flt_read1
static inline int flt_read1(htsFile *in, const bcf_hdr_t *h, bcf1_t *b, int keep_flt)
{
	int ret;
	for (;;) {
		if ((ret = vcf_read1(in, h, b)) < 0) break;
		if (keep_flt || !bcf_is_filtered(b)) break;
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xc4dd
movl %eax, %ebp
testl %ebx, %ebx
jne 0xecd7
testl %ebp, %ebp
js 0xecd7
movq %r14, %rdi
callq 0xd34e
testl %eax, %eax
jne 0xecb3
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
xorl %r14d, %r14d
xorl %r15d, %r15d
movslq 0xc(%rbx), %rax
movq 0x10(%rbx), %rdi
cmpq %rax, %r15
jge 0xed1e
movq 0x10(%rdi,%r14), %rdi
callq 0x2050
movq 0x10(%rbx), %rax
movq 0x38(%rax,%r14), %rdi
callq 0x2050
incq %r15
addq $0x40, %r14
jmp 0xecf0
callq 0x2050
movq 0x18(%rbx), %rdi
callq 0xa6b5
movq 0x28(%rbx), %rdi
callq 0xa500
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O2/lh3[P]bgt/atomic.c
// Function: bcf_atom_read
const bcf_atom_t *bcf_atom_read(bcf_atombuf_t *buf)
{
	if (buf->start == buf->a.n) {
		if (buf->no_vcf) return 0;
		buf->a.n = buf->start = 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;
	}
	assert(buf->start < buf->a.n);
	for (;;) {
		if (buf->no_vcf || buf->a.a[buf->start].rid < buf->b->rid || (buf->a.a[buf->start].rid == buf->b->rid && buf->a.a[buf->start].pos < buf->b->pos))
			return &buf->a.a[buf->start++];
		if (buf->start != 0) {
			bcf_atom_t *tmp;
			tmp = (bcf_atom_t*)malloc(buf->start * sizeof(bcf_atom_t));
			memcpy(tmp, buf->a.a, buf->start * sizeof(bcf_atom_t));
			memmove(buf->a.a, &buf->a.a[buf->start], (buf->a.n - buf->start) * sizeof(bcf_atom_t));
			buf->a.n -= buf->start;
			memcpy(buf->a.a + buf->a.n, tmp, buf->start * sizeof(bcf_atom_t));
			buf->start = 0;
			free(tmp);
		}
		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;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x20(%rdi), %eax
leaq 0x8(%rdi), %rcx
movq %rcx, (%rsp)
cmpl 0x8(%rdi), %eax
jne 0xeda6
cmpw $0x0, 0x24(%rbx)
je 0xed6f
xorl %r15d, %r15d
jmp 0xee96
andl $0x0, 0x20(%rbx)
andl $0x0, 0x8(%rbx)
movq 0x18(%rbx), %rsi
movq 0x28(%rbx), %rdi
movq (%rsp), %rdx
callq 0xe056
movq 0x28(%rbx), %rsi
movq (%rbx), %rdi
movq 0x18(%rbx), %rdx
movzwl 0x26(%rbx), %ecx
callq 0xeca0
testl %eax, %eax
jns 0xeda6
movw $0x1, 0x24(%rbx)
movl 0x20(%rbx), %eax
cmpl 0x8(%rbx), %eax
jge 0xeea8
cmpw $0x0, 0x24(%rbx)
movq 0x10(%rbx), %r15
movslq %eax, %r14
jne 0xee88
movq %r14, %rbp
shlq $0x6, %rbp
leaq (%r15,%rbp), %r12
movq 0x18(%rbx), %rsi
movl (%rsi), %ecx
cmpl %ecx, 0x20(%r15,%rbp)
jl 0xee88
jne 0xedf0
movl 0x24(%r12), %ecx
cmpl 0x4(%rsi), %ecx
jl 0xee88
testl %eax, %eax
je 0xee55
movq %rbp, %rdi
callq 0x22e0
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x2280
movslq 0x8(%rbx), %rdx
subq %r14, %rdx
shlq $0x6, %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x2370
movslq 0x20(%rbx), %rdx
movslq 0x8(%rbx), %rdi
subq %rdx, %rdi
movl %edi, 0x8(%rbx)
shlq $0x6, %rdi
addq 0x10(%rbx), %rdi
shlq $0x6, %rdx
movq %r13, %rsi
callq 0x2280
andl $0x0, 0x20(%rbx)
movq %r13, %rdi
callq 0x2050
movq 0x18(%rbx), %rsi
movq 0x28(%rbx), %rdi
movq (%rsp), %rdx
callq 0xe056
movq 0x28(%rbx), %rsi
movq (%rbx), %rdi
movq 0x18(%rbx), %rdx
movzwl 0x26(%rbx), %ecx
callq 0xeca0
testl %eax, %eax
jns 0xee80
movw $0x1, 0x24(%rbx)
movl 0x20(%rbx), %eax
jmp 0xedb2
leal 0x1(%r14), %eax
movl %eax, 0x20(%rbx)
shlq $0x6, %r14
addq %r14, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa618(%rip), %rdi      # 0x194c7
leaq 0xa582(%rip), %rsi      # 0x19438
leaq 0xa620(%rip), %rcx      # 0x194dd
movl $0xe5, %edx
callq 0x21b0
// File: /workspace/github_c_makefile_star2_O2/lh3[P]bgt/./atomic.h
// Function: bcf_atom_cmp
static inline int bcf_atom_cmp(const bcf_atom_t *a, const bcf_atom_t *b)
{
	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;
	return strcmp(a->alt, b->alt);
}

// Assembly:
movl 0x20(%rdi), %eax
subl 0x20(%rsi), %eax
jne 0xf1ca
movl 0x24(%rdi), %eax
subl 0x24(%rsi), %eax
jne 0xf1ca
movl 0x28(%rdi), %eax
subl 0x28(%rsi), %eax
jne 0xf1ca
movq 0x18(%rdi), %rdi
movq 0x18(%rsi), %rsi
jmp 0x2230
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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
andl $0x0, (%rdx)
xorl %r12d, %r12d
testl %edi, %edi
cmovlel %r12d, %edi
xorl %eax, %eax
xorl %r15d, %r15d
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, (%rsp)
cmpq %rdi, %r12
je 0xf5b3
movq (%rsi,%r12,8), %r14
movl %r14d, %r13d
shrl $0xd, %r13d
cmpl %r13d, %r15d
jg 0xf579
movl %r14d, %ecx
shrl $0xe, %ecx
orl %r13d, %ecx
movl %ecx, %edx
shrl $0x2, %edx
orl %ecx, %edx
movl %edx, %ecx
shrl $0x4, %ecx
orl %edx, %ecx
movl %ecx, %edx
shrl $0x8, %edx
orl %ecx, %edx
movl %edx, %ebx
shrl $0x10, %ebx
orl %edx, %ebx
leal 0x1(%rbx), %ebp
leaq 0x4(,%rbx,4), %rsi
movq %rax, %rdi
callq 0x2340
movl %r15d, %ecx
cmpq %rbx, %rcx
ja 0xf568
orl $-0x1, (%rax,%rcx,4)
incq %rcx
jmp 0xf55a
movl %ebp, %r15d
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rsi
movq (%rsp), %rdi
shrq $0x2d, %r14
cmpl %r14d, %r13d
jne 0xf59b
cmpl $0x0, (%rax,%r14,4)
jns 0xf58d
movl %r12d, (%rax,%r14,4)
incl %r13d
movl %r13d, (%rdx)
incq %r12
jmp 0xf506
movl %r13d, %ecx
cmpq %rcx, %r14
ja 0xf58d
cmpl $0x0, (%rax,%r14,4)
jns 0xf5ae
movl %r12d, (%rax,%r14,4)
incq %r14
jmp 0xf59e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %r15d, %r15d
pushq $0x10
popq %r12
xorl %r13d, %r13d
movl (%rbx), %eax
cmpq %rax, %r13
jae 0xf63c
movq 0x10(%rbx), %rax
movq %r13, %rcx
shrq $0x4, %rcx
movl (%rax,%rcx,4), %eax
movl %r15d, %ecx
andb $0x1e, %cl
shrl %cl, %eax
testb $0x3, %al
jne 0xf62f
movq 0x20(%rbx), %rax
leaq (%rax,%r12), %r14
addq $-0xc, %r14
movq 0xc(%r14), %rdi
callq 0x2050
movslq -0x4(%r14), %rdi
movq 0x4(%r14), %rsi
callq 0xf2d6
movl -0x4(%r14), %edi
movq 0x4(%r14), %rsi
movq %r14, %rdx
callq 0xf4d9
movq %rax, 0xc(%r14)
incq %r13
addl $0x2, %r15d
addq $0x18, %r12
jmp 0xf5d8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xf6bf
movl %esi, %r8d
sarl $0xd, %r8d
cmpl %ecx, %r8d
movq 0x10(%rdi), %r9
leaq -0x4(%r9,%rcx,4), %r10
movslq %r8d, %r11
leaq (%r9,%r11,4), %r11
cmovgeq %r10, %r11
movl (%r11), %r10d
testl %r10d, %r10d
jns 0xf694
cmpl %ecx, %r8d
cmovgel %ecx, %r8d
testl %r8d, %r8d
jle 0xf691
movl -0x4(%r9,%r8,4), %r10d
decq %r8
testl %r10d, %r10d
js 0xf67d
jmp 0xf694
xorl %r10d, %r10d
movl %r10d, %r8d
pushq $0x1
popq %r9
cmpl %r8d, %ecx
jle 0xf6bf
movq 0x8(%rdi), %r10
movq (%r10,%r8,8), %r10
movq %r10, %r11
shrq $0x20, %r11
cmpl %edx, %r11d
jge 0xf6bf
incq %r8
cmpl %esi, %r10d
jle 0xf69b
movl %r9d, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
testq %rdi, %rdi
je 0xf6da
movl %ecx, %ebx
movl %edx, %ebp
movq %rdi, %r14
callq 0xf6f8
cmpl (%r14), %eax
jne 0xf6e1
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl %eax, %eax
imulq $0x18, %rax, %rdi
addq 0x20(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0xf646
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %ebp, %ebp
xorl %r15d, %r15d
movl (%rbx), %eax
cmpq %rax, %r15
jae 0x10227
movq 0x10(%rbx), %rax
movq %r15, %rcx
shrq $0x4, %rcx
movl (%rax,%rcx,4), %eax
movl %ebp, %ecx
andb $0x1e, %cl
shrl %cl, %eax
testb $0x3, %al
jne 0x1021b
movq 0x20(%rbx), %rax
movq 0x8(%rax,%r14), %rdi
callq 0x2050
movq 0x20(%rbx), %rax
movq 0x10(%rax,%r14), %rdi
callq 0x2050
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x2050
incq %r15
addl $0x2, %ebp
addq $0x18, %r14
jmp 0x101d2
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 %r14
popq %r15
popq %rbp
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
xorl %r8d, %r8d
testl %edi, %edi
movl $0x0, %eax
cmovgl %edi, %eax
xorl %r9d, %r9d
cmpq %r8, %rax
je 0x102b1
movslq (%rsi,%r8,4), %r10
xorl %r11d, %r11d
cmpb $0x0, (%rdx,%r10)
setne (%rbx,%r8)
setne %r11b
addl %r11d, %r9d
incq %r8
jmp 0x1028f
movq %rcx, (%rsp)
movl %edi, %edx
subl %r9d, %edx
movslq %edx, %rdx
leaq (%rcx,%rdx,4), %rcx
movq %rcx, 0x8(%rsp)
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x102e9
movl (%rsi,%rcx,4), %edx
movzbl (%rbx,%rcx), %r8d
movq (%rsp,%r8,8), %r9
leaq 0x4(%r9), %r10
movq %r10, (%rsp,%r8,8)
movl %edx, (%r9)
incq %rcx
jmp 0x102c8
movb (%rbx), %al
movslq %edi, %r15
pushq $0x1
popq %rbp
pushq $0x1
popq %r12
movl %ebp, %esi
movq %rbx, %r14
movzbl %al, %edx
cmpq %r15, %r12
jge 0x10324
cmpb %al, (%rbx,%r12)
jne 0x1030c
incl %esi
jmp 0x1031f
movq %r14, %rdi
callq 0x1122f
cltq
addq %rax, %r14
movb (%rbx,%r12), %al
movl %ebp, %esi
incq %r12
jmp 0x102fa
movq %r14, %rdi
callq 0x1122f
movslq %eax, %rcx
leaq (%r14,%rcx), %rax
movb $0x0, (%r14,%rcx)
subl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rdx, %r14
movq %rsi, 0x8(%rsp)
movl %edi, %r12d
xorl %eax, %eax
leaq 0x9224(%rip), %r13      # 0x19590
movzbl (%rdx), %esi
testl %esi, %esi
je 0x10386
testb $0x1, %sil
je 0x10381
andl $-0x2, %esi
addl (%r13,%rsi,2), %eax
incq %rdx
jmp 0x1036c
testl %eax, %eax
setne %sil
movl %r12d, %edx
subl %eax, %edx
setne %dil
testb %dil, %sil
jne 0x103d6
xorl %ebp, %ebp
cmpl %eax, %r12d
sete %bpl
leal (,%r12,4), %eax
movslq %eax, %rdx
movq %rcx, %rdi
movq 0x8(%rsp), %rsi
callq 0x2280
movslq %r12d, %rdx
movq %rbx, %rdi
movl %ebp, %esi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21e0
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
movq %r14, %r15
movzbl (%r14), %r14d
testq %r14, %r14
je 0x1046f
movl %r14d, %eax
andl $-0x2, %eax
movslq (%r13,%rax,2), %r13
movslq %ebp, %rax
movq 0x8(%rsp), %rcx
leaq (%rcx,%rax,4), %rsi
andq $0x1, %r14
je 0x1043f
testl %r13d, %r13d
movl $0x0, %eax
cmovgl %r13d, %eax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x1043f
movslq (%rsi,%rcx,4), %rdx
movb $0x1, (%rbx,%rdx)
incq %rcx
jmp 0x1042d
movq 0x10(%rsp,%r14,8), %r12
leaq (,%r13,4), %rdx
movq %r12, %rdi
callq 0x2280
leaq (%r12,%r13,4), %rax
movq %rax, 0x10(%rsp,%r14,8)
addl %r13d, %ebp
movq %r15, %r14
incq %r14
leaq 0x9123(%rip), %r13      # 0x19590
jmp 0x103f6
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]bgt/pbwt.c
// Function: pbc_init
pbc_t *pbc_init(int m)
{
	int j;
	uint8_t *p;
	pbc_t *pb;
	p = (uint8_t*)calloc(sizeof(pbc_t) + 2 * m * 4 + (m + 1), 1);
	pb = (pbc_t*)p; p += sizeof(pbc_t);
	pb->S0 = (int32_t*)p; p += m * 4;
	pb->S  = (int32_t*)p; p += m * 4;
	pb->u = p; p += m + 1;
	pb->m = m;
	for (j = 0; j < pb->m; ++j) pb->S[j] = j;
	return pb;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
leal (,%rbx,8), %eax
cltq
movslq %edi, %r14
leaq 0x21(%r14,%rax), %rdi
pushq $0x1
popq %rsi
callq 0x2220
leaq 0x20(%rax), %rcx
movq %rcx, 0x8(%rax)
leal (,%r14,4), %ecx
movslq %ecx, %rdx
leaq (%rax,%rdx), %rcx
addq $0x20, %rcx
movq %rcx, 0x10(%rax)
addq %rcx, %rdx
movq %rdx, 0x18(%rax)
movl %r14d, (%rax)
xorl %edx, %edx
movslq %ebx, %rsi
cmpq %rsi, %rdx
jge 0x104da
movl %edx, (%rcx,%rdx,4)
incq %rdx
movl (%rax), %ebx
jmp 0x104c8
addq $0x8, %rsp
popq %rbx
popq %r14
retq