LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movl $0x0, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x18f3d
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
shrq $0xd, %rax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrl $0xd, %eax
movl %eax, -0x38(%rbp)
movl -0x24(%rbp), %eax
movl -0x38(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0x18ec4
movl -0x24(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
sarl %eax
orl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
sarl $0x2, %eax
orl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
sarl $0x4, %eax
orl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
sarl $0x8, %eax
orl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
sarl $0x10, %eax
orl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x30(%rbp), %rdi
movslq -0x24(%rbp), %rsi
shlq $0x2, %rsi
callq 0x2340
movq %rax, -0x30(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x18ec2
movq -0x30(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x18ea0
jmp 0x18ec4
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jne 0x18eea
movq -0x30(%rbp), %rax
movslq -0x34(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jge 0x18ee8
movl -0x1c(%rbp), %edx
movq -0x30(%rbp), %rax
movslq -0x34(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x18f23
movl -0x34(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x38(%rbp), %eax
jg 0x18f21
movq -0x30(%rbp), %rax
movslq -0x20(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jge 0x18f14
movl -0x1c(%rbp), %edx
movq -0x30(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x18f16
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x18ef0
jmp 0x18f23
movl -0x38(%rbp), %ecx
addl $0x1, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x18de3
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jae 0x19017
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x14(%rbp), %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x14(%rbp), %ecx
andl $0xf, %ecx
shll %ecx
shrl %cl, %eax
andl $0x3, %eax
cmpl $0x0, %eax
jne 0x19007
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x18fcd
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x2040
movq -0x20(%rbp), %rax
movslq (%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x189a0
movq -0x20(%rbp), %rax
movl (%rax), %edi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rdx
addq $0x4, %rdx
callq 0x18db0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x19009
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x18f6b
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x19043
movl $0x0, -0x4(%rbp)
jmp 0x1917b
movl -0x14(%rbp), %eax
sarl $0xd, %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jl 0x1906d
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x28(%rbp)
jmp 0x19084
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x14(%rbp), %ecx
sarl $0xd, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jge 0x19104
movl -0x14(%rbp), %eax
sarl $0xd, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jle 0x190ad
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jl 0x190dd
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x1c(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jl 0x190d0
jmp 0x190dd
jmp 0x190d2
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x190b6
cmpl $0x0, -0x1c(%rbp)
jl 0x190f7
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
jmp 0x190fe
xorl %eax, %eax
movl %eax, -0x2c(%rbp)
jmp 0x190fe
movl -0x2c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x19174
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
cmpl -0x18(%rbp), %eax
jl 0x19130
jmp 0x19174
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpl -0x14(%rbp), %eax
jle 0x19167
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
cmpl -0x18(%rbp), %eax
jge 0x19167
movl $0x1, -0x4(%rbp)
jmp 0x1917b
jmp 0x19169
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1910a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x191ae
movl $0x0, -0x4(%rbp)
jmp 0x191f2
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x19200
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x191d2
movl $0x0, -0x4(%rbp)
jmp 0x191f2
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rdi
movl -0x2c(%rbp), %eax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %edx
callq 0x19020
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jae 0x19c35
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x14(%rbp), %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x14(%rbp), %ecx
andl $0xf, %ecx
shll %ecx
shrl %cl, %eax
andl $0x3, %eax
cmpl $0x0, %eax
jne 0x19c25
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x2040
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
callq 0x2040
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x2040
jmp 0x19c27
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x19bab
movq -0x10(%rbp), %rdi
callq 0x19c50
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl $0x0, -0x48(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x1a6f0
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq -0x44(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
cmpb $0x0, (%rax,%rcx)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movq -0x28(%rbp), %rcx
movslq -0x44(%rbp), %rdx
movb %al, (%rcx,%rdx)
movzbl %al, %eax
addl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x1a6a9
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl -0x4(%rbp), %ecx
subl -0x48(%rbp), %ecx
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x1a756
movq -0x10(%rbp), %rax
movslq -0x44(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movq -0x28(%rbp), %rax
movslq -0x44(%rbp), %rdx
movzbl (%rax,%rdx), %eax
movl %eax, %edx
movq -0x40(%rbp,%rdx,8), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, -0x40(%rbp,%rdx,8)
movl %ecx, (%rax)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x1a717
movl -0x4(%rbp), %edi
movq -0x28(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x1a770
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]bgt/pbwt.c
// Function: pbr_enc
static int pbr_enc(int m, const uint8_t *u, uint8_t *rle)
{
	int j, l;
	uint8_t *p = rle, last;
	for (j = 1, l = 1, last = u[j-1]; j < m; ++j) {
		if (u[j] == last) ++l;
		else p += pbr_enc1(p, l, last), l = 1, last = u[j];
	}
	p += pbr_enc1(p, l, last);
	*p = 0;
	return p - rle;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x1, -0x1c(%rbp)
movl $0x1, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movb %al, -0x29(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x1a815
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movzbl -0x29(%rbp), %ecx
cmpl %ecx, %eax
jne 0x1a7d3
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x1a808
movq -0x28(%rbp), %rdi
movl -0x20(%rbp), %esi
movzbl -0x29(%rbp), %edx
callq 0x1c250
movl %eax, %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl $0x1, -0x20(%rbp)
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x29(%rbp)
jmp 0x1a80a
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1a7ac
movq -0x28(%rbp), %rdi
movl -0x20(%rbp), %esi
movzbl -0x29(%rbp), %edx
callq 0x1c250
movl %eax, %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
shll %eax
shll $0x2, %eax
movslq %eax, %rdi
addq $0x20, %rdi
movl -0x4(%rbp), %eax
addl $0x1, %eax
cltq
addq %rax, %rdi
movl $0x1, %esi
callq 0x2230
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x4(%rbp), %ecx
shll $0x2, %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x4(%rbp), %ecx
shll $0x2, %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movl -0x4(%rbp), %ecx
addl $0x1, %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x1aaff
movl -0x8(%rbp), %edx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x8(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x1aad7
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1b3da
movq -0x10(%rbp), %rdi
leaq 0xc10d(%rip), %rsi      # 0x274b4
callq 0x2240
cmpl $0x0, %eax
je 0x1b3da
movq -0x10(%rbp), %rdi
leaq 0xbf8b(%rip), %rsi      # 0x27347
callq 0x23c0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x1b3d8
movq $0x0, -0x8(%rbp)
jmp 0x1b4d4
jmp 0x1b3e8
movq 0x12b9f(%rip), %rax     # 0x2df80
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x1, %edi
movl $0x70, %esi
callq 0x2230
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl -0x14(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x18(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0xc(%rax)
movl -0x1c(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x10(%rax)
movslq -0x18(%rbp), %rdi
movl $0x8, %esi
callq 0x2230
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x20(%rax)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x1b472
movl -0x14(%rbp), %edi
callq 0x1aa20
movq %rax, %rdx
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x34(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1b444
movq -0x30(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x28(%rbp), %rcx
leaq 0xcfc6(%rip), %rdi      # 0x28461
movl $0x1, %esi
movl $0x4, %edx
callq 0x2420
leaq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rcx
movl $0x4, %esi
movl $0x3, %edx
callq 0x2420
movq -0x30(%rbp), %rax
movl $0x1, 0x14(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1b80f
movl $0x0, -0x4(%rbp)
jmp 0x1b981
movq -0x10(%rbp), %rax
cmpl $0x0, 0x14(%rax)
je 0x1b8b5
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x2270
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movl $0x49, %edi
callq 0x21f0
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x2420
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x2420
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rax
movslq 0x30(%rax), %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movl $0x8, %esi
callq 0x2420
movq -0x10(%rbp), %rax
movq (%rax), %rcx
leaq -0x20(%rbp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x2420
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x2040
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x2040
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0x2040
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x2040
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x2040
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x1b94b
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2040
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x1b93e
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2040
jmp 0x1b940
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1b8fd
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x2040
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x2040
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x2160
movq -0x10(%rbp), %rdi
callq 0x2040
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]bgt/pbwt.c
// Function: pbf_read
const uint8_t **pbf_read(pbf_t *pb)
{
	int g;
	uint8_t t;
	if (pb->is_writing) return 0;
	fread(&t, 1, 1, pb->fp);
	if (t == 'S') {
		for (g = 0; g < pb->g; ++g)
			fread(pb->pb[g]->S, 4, pb->m, pb->fp);
		fread(&t, 1, 1, pb->fp);
	}
	if (t == 'B') {
		for (g = 0; g < pb->g; ++g) {
			int32_t l;
			fread(&l, 4, 1, pb->fp);
			fread(pb->buf, 1, l, pb->fp);
			pb->buf[l] = 0;
			if (pb->n_sub > 0 && pb->n_sub < pb->m) // subset decoding
				pbs_dec(pb->m, pb->n_sub, pb->sub[g], pb->buf, pb->pb[g]->u);
			else pbc_dec(pb->pb[g], pb->buf); // full decoding
		}
		++pb->k;
	} else return 0;
	return pb->ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x14(%rax)
je 0x1bbb3
movq $0x0, -0x8(%rbp)
jmp 0x1bd52
movq -0x10(%rbp), %rax
movq (%rax), %rcx
leaq -0x15(%rbp), %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x20f0
movzbl -0x15(%rbp), %eax
cmpl $0x53, %eax
jne 0x1bc37
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x1bc1f
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rax
movslq 0x8(%rax), %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movl $0x4, %esi
callq 0x20f0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1bbdb
movq -0x10(%rbp), %rax
movq (%rax), %rcx
leaq -0x15(%rbp), %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x20f0
movzbl -0x15(%rbp), %eax
cmpl $0x42, %eax
jne 0x1bd3c
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x1bd2a
movq -0x10(%rbp), %rax
movq (%rax), %rcx
leaq -0x1c(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x20f0
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
movslq -0x1c(%rbp), %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movl $0x1, %esi
callq 0x20f0
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0x1c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x40(%rax)
jle 0x1bcfd
movq -0x10(%rbp), %rax
movl 0x40(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x1bcfd
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edi
movq -0x10(%rbp), %rax
movl 0x40(%rax), %esi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %r8
movq (%rax,%r8,8), %rax
movq 0x18(%rax), %r8
callq 0x1b030
jmp 0x1bd1a
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rsi
callq 0x1ab80
jmp 0x1bd1c
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1bc4b
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x58(%rax)
jmp 0x1bd46
movq $0x0, -0x8(%rbp)
jmp 0x1bd52
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]bgt/pbwt.c
// Function: pbf_fill_sub
static inline void pbf_fill_sub(int m, const int32_t *S, int n_sub, pbs_dat_t *sub, int32_t *invS, int *sub_list)
{
	int i;
	for (i = 0; i < m; ++i) invS[S[i]] = i;
	for (i = 0; i < n_sub; ++i)
		sub[i].r = invS[sub_list[sub[i].i]];
	radix_sort_r(sub, sub + n_sub);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x1c00e
movl -0x34(%rbp), %edx
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq -0x34(%rbp), %rsi
movslq (%rcx,%rsi,4), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1bfe5
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x1c04e
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rdx
movslq -0x34(%rbp), %rsi
movl 0x4(%rdx,%rsi,8), %edx
movslq (%rcx,%rdx,4), %rcx
movl (%rax,%rcx,4), %edx
movq -0x20(%rbp), %rax
movslq -0x34(%rbp), %rcx
movl %edx, (%rax,%rcx,8)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1c015
movq -0x20(%rbp), %rdi
movq -0x20(%rbp), %rsi
movslq -0x14(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x1afd0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]bgt/pbwt.c
// Function: pbf_subset
int pbf_subset(pbf_t *pb, int n_sub, int *sub)
{
	int i, g;
	if (n_sub <= 0 || n_sub >= pb->m || sub == 0) n_sub = 0;
	if ((pb->n_sub = n_sub) != 0) {
		pb->sub_list = (int*)realloc(pb->sub_list, n_sub * sizeof(int));
		memcpy(pb->sub_list, sub, n_sub * sizeof(int));
		for (g = 0; g < pb->g; ++g) {
			pb->sub[g] = (pbs_dat_t*)realloc(pb->sub[g], n_sub * sizeof(pbs_dat_t));
			for (i = 0; i < n_sub; ++i) pb->sub[g][i].i = i;
			pbf_fill_sub(pb->m, pb->pb[g]->S, n_sub, pb->sub[g], pb->invS, pb->sub_list);
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x1c09c
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x1c09c
cmpq $0x0, -0x18(%rbp)
jne 0x1c0a3
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movl %eax, 0x40(%rcx)
cmpl $0x0, %eax
je 0x1c1be
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rdi
movslq -0xc(%rbp), %rsi
shlq $0x2, %rsi
callq 0x2340
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rdi
movq -0x18(%rbp), %rsi
movslq -0xc(%rbp), %rdx
shlq $0x2, %rdx
callq 0x2290
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x1c1bc
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0xc(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2340
movq %rax, %rdx
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x20(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x1c16b
movl -0x1c(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x1c(%rbp), %rcx
movl %edx, 0x4(%rax,%rcx,8)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1c13d
movq -0x8(%rbp), %rax
movl 0x8(%rax), %edi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rsi
movl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movq -0x8(%rbp), %rax
movq 0x68(%rax), %r8
movq -0x8(%rbp), %rax
movq 0x50(%rax), %r9
callq 0x1bfc0
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x1c0f6
jmp 0x1c1be
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]bgt/pbwt.c
// Function: pbr_enc1
static inline int pbr_enc1(uint8_t *p, int l, int b)
{
	if (l >= 16) {
		uint8_t *q = p;
		uint32_t x, i;
		for (x = 0xfU<<28, i = 7<<2; x; x >>= 4, i -= 1<<2)
			if (x&l) *q++ = (i<<2 | (x&l)>>i) << 1 | b;
		return q - p;
	} else {
		*p = l<<1 | b;
		return 1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
cmpl $0x10, -0x14(%rbp)
jl 0x1c2de
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0xf0000000, -0x24(%rbp) # imm = 0xF0000000
movl $0x1c, -0x28(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x1c2ce
movl -0x24(%rbp), %eax
andl -0x14(%rbp), %eax
cmpl $0x0, %eax
je 0x1c2b8
movl -0x28(%rbp), %eax
shll $0x2, %eax
movl -0x24(%rbp), %edx
andl -0x14(%rbp), %edx
movl -0x28(%rbp), %ecx
shrl %cl, %edx
movl %edx, %ecx
orl %ecx, %eax
shll %eax
orl -0x18(%rbp), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
jmp 0x1c2ba
movl -0x24(%rbp), %eax
shrl $0x4, %eax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %eax
subl $0x4, %eax
movl %eax, -0x28(%rbp)
jmp 0x1c27a
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x4(%rbp)
jmp 0x1c2f5
movl -0x14(%rbp), %eax
shll %eax
orl -0x18(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]bgt/bgt.c
// Function: bgt_open
bgt_file_t *bgt_open(const char *prefix)
{
	char *fn = 0;
	bgt_file_t *bf = 0;
	BGZF *fp = 0;

	fn = (char*)malloc(strlen(prefix) + 9);
	sprintf(fn, "%s.bcf", prefix);
	fp = bgzf_open(fn, "rb");
	if (fp == 0) goto bgt_open_err;
	bf = (bgt_file_t*)calloc(1, sizeof(bgt_file_t));
	bf->h0 = bcf_hdr_read(fp);
	if (bf->h0 == 0) goto bgt_open_err;
	bf->idx = bcf_index_load(fn);
	if (bf->idx == 0) goto bgt_open_err;
	sprintf(fn, "%s.spl", prefix);
	bf->f = fmf_read(fn);
	if (bf->f == 0) goto bgt_open_err;
	bf->prefix = strdup(prefix);
	bgzf_close(fp);
	free(fn);
	bf->mgs = (int32_t*)calloc(bf->f->n_rows, 4);
	bgt_set_mgs(bf);
	return bf;

bgt_open_err:
	free(fn);
	if (fp) bgzf_close(fp);
	if (bf) bgt_close(bf);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2170
movq %rax, %rdi
addq $0x9, %rdi
callq 0x22f0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0xb00c(%rip), %rsi      # 0x27358
movb $0x0, %al
callq 0x2410
movq -0x18(%rbp), %rdi
leaq 0xbc22(%rip), %rsi      # 0x27f80
callq 0x47c0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x1c373
jmp 0x1c460
movl $0x1, %edi
movl $0x28, %esi
callq 0x2230
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rdi
callq 0xff80
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x1c3aa
jmp 0x1c460
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0xc910
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x1c3d0
jmp 0x1c460
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0xaf61(%rip), %rsi      # 0x27340
movb $0x0, %al
callq 0x2410
movq -0x18(%rbp), %rdi
callq 0xd4c0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x1c407
jmp 0x1c460
movq -0x10(%rbp), %rdi
callq 0x2440
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rdi
callq 0x5c50
movq -0x18(%rbp), %rdi
callq 0x2040
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movslq 0x20(%rax), %rdi
movl $0x4, %esi
callq 0x2230
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rdi
callq 0x1c4a0
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1c491
movq -0x18(%rbp), %rdi
callq 0x2040
cmpq $0x0, -0x28(%rbp)
je 0x1c479
movq -0x28(%rbp), %rdi
callq 0x5c50
cmpq $0x0, -0x20(%rbp)
je 0x1c489
movq -0x20(%rbp), %rdi
callq 0x1c620
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]bgt/bgt.c
// Function: bgt_set_mgs
static void bgt_set_mgs(bgt_file_t *bf)
{
	int i, j, mgs_id;
	for (i = 0; i < bf->f->n_rows; ++i) bf->mgs[i] = -1;
	for (i = 0; i < bf->f->n_keys; ++i)
		if (strcmp(bf->f->keys[i], "_mgs") == 0) break;
	if (i == bf->f->n_keys) return;
	mgs_id = i;
	for (i = 0; i < bf->f->n_rows; ++i) {
		fmf1_t *r = &bf->f->rows[i];
		for (j = 0; j < r->n_meta; ++j)
			if (r->meta[j].key == mgs_id && r->meta[j].type == FMF_INT && r->meta[j].v.i >= 0)
				bf->mgs[i] = r->meta[j].v.i;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
cmpl 0x20(%rcx), %eax
jge 0x1c4e1
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1c4b3
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
cmpl (%rcx), %eax
jge 0x1c52b
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc479(%rip), %rsi      # 0x2898b
callq 0x2240
cmpl $0x0, %eax
jne 0x1c51e
jmp 0x1c52b
jmp 0x1c520
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1c4e8
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
cmpl (%rcx), %eax
jne 0x1c53f
jmp 0x1c60d
movl -0xc(%rbp), %eax
movl %eax, -0x14(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
cmpl 0x20(%rcx), %eax
jge 0x1c60d
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x1c5fd
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x10(%rbp), %rcx
movl (%rax,%rcx,8), %eax
andl $0xfffffff, %eax        # imm = 0xFFFFFFF
cmpl -0x14(%rbp), %eax
jne 0x1c5f0
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x10(%rbp), %rcx
movl (%rax,%rcx,8), %eax
shrl $0x1c, %eax
cmpl $0x1, %eax
jne 0x1c5f0
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x10(%rbp), %rcx
cmpl $0x0, 0x4(%rax,%rcx,8)
jl 0x1c5f0
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x10(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %edx
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x1c5f2
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x1c582
jmp 0x1c5ff
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1c54c
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]bgt/bgt.c
// Function: bgt_close
void bgt_close(bgt_file_t *bf)
{
	if (bf == 0) return;
	free(bf->mgs);
	if (bf->idx) hts_idx_destroy(bf->idx);
	if (bf->h0) bcf_hdr_destroy(bf->h0);
	if (bf->f) fmf_destroy(bf->f);
	free(bf->prefix);
	free(bf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x1c635
jmp 0x1c69f
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x1c65a
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0xa560
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1c672
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xfe40
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1c68a
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xdb80
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rdi
callq 0x2040
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]bgt/bgt.c
// Function: bgt_reader_init
bgt_t *bgt_reader_init(const bgt_file_t *bf)
{
	char *fn;
	bgt_t *bgt;
	assert(BGT_MAX_GROUPS <= 32);
	bgt = (bgt_t*)calloc(1, sizeof(bgt_t));
	bgt->f = bf;
	fn = (char*)malloc(strlen(bf->prefix) + 9);
	sprintf(fn, "%s.pbf", bf->prefix);
	bgt->pb = pbf_open_r(fn); // FIXME: check if .pbf is present
	sprintf(fn, "%s.bcf", bf->prefix);
	bgt->bcf = bgzf_open(fn, "rb");
	bgt->b0 = bcf_init1();
	bcf_seekn(bgt->bcf, bgt->f->idx, 0);
	bgt->gtag = (uint32_t*)calloc(bgt->f->f->n_rows, 4);
	free(fn);
	return bgt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x1, %edi
movl $0x68, %esi
callq 0x2230
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x2170
movq %rax, %rdi
addq $0x9, %rdi
callq 0x22f0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rdx
leaq 0xac42(%rip), %rsi      # 0x2734a
movb $0x0, %al
callq 0x2410
movq -0x10(%rbp), %rdi
callq 0x1b4e0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rdx
leaq 0xac23(%rip), %rsi      # 0x27358
movb $0x0, %al
callq 0x2410
movq -0x10(%rbp), %rdi
leaq 0xb839(%rip), %rsi      # 0x27f80
callq 0x47c0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movb $0x0, %al
callq 0x100d0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x15960
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movslq 0x20(%rax), %rdi
movl $0x4, %esi
callq 0x2230
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x10(%rbp), %rdi
callq 0x2040
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]bgt/bgt.c
// Function: bgt_reader_destroy
void bgt_reader_destroy(bgt_t *bgt)
{
	bcf_destroy1(bgt->b0);
	free(bgt->gtag); free(bgt->group); free(bgt->out);
	if (bgt->h_out) bcf_hdr_destroy(bgt->h_out);
	hts_itr_destroy(bgt->itr);
	pbf_close(bgt->pb);
	bgzf_close(bgt->bcf);
	free(bgt);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x10100
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x1c818
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0xfe40
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0xc0b0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1b7f0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x5c50
movq -0x8(%rbp), %rdi
callq 0x2040
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/lh3[P]bgt/bgt.c
// Function: bgt_add_group
int bgt_add_group(bgt_t *bgt, const char *expr)
{
	int is_file, ret = 0;
	is_file = bgt_is_file(expr);
	if (*expr == ':' || *expr == ',' || (*expr != '?' && is_file)) {
		int i, n;
		char **samples;
		samples = hts_readlines(expr, &n);
		ret = bgt_add_group_core(bgt, n, samples, 0);
		for (i = 0; i < n; ++i) free(samples[i]);
		free(samples);
	} else ret = bgt_add_group_core(bgt, 0, 0, expr);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1cb80
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
je 0x1cafd
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
je 0x1cafd
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3f, %eax
je 0x1cb5b
cmpl $0x0, -0x14(%rbp)
je 0x1cb5b
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x88f0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movl -0x20(%rbp), %esi
movq -0x28(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x1c850
movl %eax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x1cb50
movq -0x28(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2040
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1cb2c
movq -0x28(%rbp), %rdi
callq 0x2040
jmp 0x1cb71
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rcx
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x1c850
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]bgt/bgt.c
// Function: bgt_is_file
static int bgt_is_file(const char *fn)
{
	FILE *fp;
	int is_file = 0;
	if (bgt_no_file) return 0;
	if ((fp = fopen(fn, "r")) != 0) {
		is_file = 1;
		fclose(fp);
	}
	return is_file;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x0, 0x11b8e(%rip)     # 0x2e728
je 0x1cba5
movl $0x0, -0x4(%rbp)
jmp 0x1cbd5
movq -0x10(%rbp), %rdi
leaq 0xb52e(%rip), %rsi      # 0x280de
callq 0x23c0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x1cbcf
movl $0x1, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2160
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/lh3[P]bgt/bgt.c
// Function: bgt_set_region
int bgt_set_region(bgt_t *bgt, const char *reg)
{
	if (bgt->itr) bcf_itr_destroy(bgt->itr);
	bgt->itr = bcf_itr_querys(bgt->f->idx, bgt->f->h0, reg);
	bgt->b0->shared.l = 0; // mark b0 unread
	return bgt->itr? 0 : -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x1cc08
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0xc0b0
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rcx
leaq -0x8029(%rip), %rdx     # 0x14c00
callq 0xc330
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]bgt/bgt.c
// Function: bgt_read_core0
int bgt_read_core0(bgt_t *bgt)
{
	int i, id, row;
	row = bgt->itr? bcf_itr_next(bgt->bcf, bgt->itr, bgt->b0) : bcf_read1(bgt->bcf, bgt->b0);
	if (row < 0) return row;
	assert(bgt->b0->n_sample == 0); // there shouldn't be any sample fields
	row = -1;
	id = bcf_id2int(bgt->f->h0, BCF_DT_ID, "_row");
	assert(id > 0);
	bcf_unpack(bgt->b0, BCF_UN_INFO);
	for (i = 0; i < bgt->b0->n_info; ++i) {
		bcf_info_t *p = &bgt->b0->d.info[i];
		if (p->key == id) row = p->v1.i;
	}
	assert(row >= 0);
	return row;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x1d315
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
leaq -0xceb6(%rip), %rcx     # 0x10450
xorl %eax, %eax
movl %eax, %r8d
callq 0xc430
movl %eax, -0x2c(%rbp)
jmp 0x1d32d
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x10250
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x1d344
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1d461
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x10(%rax), %rax
shrq $0x28, %rax
cmpl $0x0, %eax
jne 0x1d35b
jmp 0x1d37a
leaq 0xb13c(%rip), %rdi      # 0x2849e
leaq 0xb14c(%rip), %rsi      # 0x284b5
movl $0x115, %edx            # imm = 0x115
leaq 0xb146(%rip), %rcx      # 0x284bb
callq 0x21b0
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rdi
xorl %esi, %esi
leaq 0x9fca(%rip), %rdx      # 0x2735f
callq 0x14b90
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jle 0x1d3a5
jmp 0x1d3c4
leaq 0xb12b(%rip), %rdi      # 0x284d7
leaq 0xb102(%rip), %rsi      # 0x284b5
movl $0x118, %edx            # imm = 0x118
leaq 0xb0fc(%rip), %rcx      # 0x284bb
callq 0x21b0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x4, %esi
callq 0x13d00
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x10(%rcx), %rcx
andq $0xffff, %rcx           # imm = 0xFFFF
cmpl %ecx, %eax
jge 0x1d434
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x78(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %eax
cmpl -0x18(%rbp), %eax
jne 0x1d427
movq -0x28(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x1c(%rbp)
jmp 0x1d429
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1d3dd
cmpl $0x0, -0x1c(%rbp)
jl 0x1d43c
jmp 0x1d45b
leaq 0xb09b(%rip), %rdi      # 0x284de
leaq 0xb06b(%rip), %rsi      # 0x284b5
movl $0x11e, %edx            # imm = 0x11E
leaq 0xb065(%rip), %rcx      # 0x284bb
callq 0x21b0
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]bgt/bgt.c
// Function: bgt_read_core
int bgt_read_core(bgt_t *bgt)
{
	if (bgt->bed || bgt->h_al) {
		int ret;
		while ((ret = bgt_read_core0(bgt)) >= 0) {
			if (bgt->bed) {
				int r;
				r = bed_overlap(bgt->bed, bgt->h_out->id[BCF_DT_CTG][bgt->b0->rid].key, bgt->b0->pos, bgt->b0->pos + bgt->b0->rlen);
				if (bgt->bed_excl && r) continue;
				if (!bgt->bed_excl && !r) continue;
			}
			if (bgt->h_al && !al_present((khash_t(str)*)bgt->h_al, bgt->h_out, bgt->b0)) continue;
			break;
		}
		return ret;
	} else return bgt_read_core0(bgt);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x1d986
movq -0x10(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x1da62
jmp 0x1d988
movq -0x10(%rbp), %rdi
callq 0x1d2d0
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jl 0x1da5a
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x1da26
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movslq (%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax), %edx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax), %ecx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
addl 0x8(%rax), %ecx
callq 0x19180
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x30(%rax)
je 0x1da0f
cmpl $0x0, -0x18(%rbp)
je 0x1da0f
jmp 0x1d988
movq -0x10(%rbp), %rax
cmpl $0x0, 0x30(%rax)
jne 0x1da24
cmpl $0x0, -0x18(%rbp)
jne 0x1da24
jmp 0x1d988
jmp 0x1da26
movq -0x10(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x1da58
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x1da80
cmpl $0x0, %eax
jne 0x1da58
jmp 0x1d988
jmp 0x1da5a
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1da6e
movq -0x10(%rbp), %rdi
callq 0x1d2d0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]bgt/bgt.c
// Function: al_present
static int al_present(khash_t(str) *h, const bcf_hdr_t *hdr, const bcf1_t *b)
{
	int ret = 0;
	bgt_allele_t a, r;
	khint_t k;
	kstring_t s = {0,0,0};
	memset(&a, 0, sizeof(bgt_allele_t));
	memset(&r, 0, sizeof(bgt_allele_t));
	bgt_al_from_bcf(hdr, b, &a, &r);
	bgt_al_format(&a, &s);
	k = kh_get(str, h, s.s);
	if (k == kh_end(h)) {
		bgt_al_format(&r, &s);
		k = kh_get(str, h, s.s);
		if (k != kh_end(h)) ret = 2;
	} else ret = 1;
	free(s.s); free(a.chr.s); free(r.chr.s);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x21e0
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x21e0
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x21e0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x50(%rbp), %rdx
leaq -0x80(%rbp), %rcx
callq 0x20ec0
leaq -0x50(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x1ed90
movq -0x8(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0x22530
movl %eax, -0x84(%rbp)
movl -0x84(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x1db57
leaq -0x80(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x1ed90
movq -0x8(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0x22530
movl %eax, -0x84(%rbp)
movl -0x84(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
je 0x1db55
movl $0x2, -0x1c(%rbp)
jmp 0x1db5e
movl $0x1, -0x1c(%rbp)
movq -0x90(%rbp), %rdi
callq 0x2040
movq -0x40(%rbp), %rdi
callq 0x2040
movq -0x70(%rbp), %rdi
callq 0x2040
movl -0x1c(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)