LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/./kmer.h
// Function: bfc_kmer_append
static inline void bfc_kmer_append(int k, uint64_t x[4], int c)
{ // IMPORTANT: 0 <= c < 4
	uint64_t mask = (1ULL<<k) - 1;
	x[0] = (x[0]<<1 | (c&1))  & mask;
	x[1] = (x[1]<<1 | (c>>1)) & mask;
	x[2] = x[2]>>1 | (1ULL^(c&1))<<(k-1);
	x[3] = x[3]>>1 | (1ULL^c>>1) <<(k-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
subq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
shlq %rcx
movl -0x14(%rbp), %eax
andl $0x1, %eax
cltq
orq %rax, %rcx
andq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
shlq %rcx
movl -0x14(%rbp), %eax
sarl %eax
cltq
orq %rax, %rcx
andq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
shrq %rax
movq %rax, -0x30(%rbp)
movl -0x14(%rbp), %eax
andl $0x1, %eax
cltq
xorq $0x1, %rax
movl -0x4(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
shlq %cl, %rax
movq -0x30(%rbp), %rcx
orq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
shrq %rax
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %eax
sarl %eax
cltq
xorq $0x1, %rax
movl -0x4(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
shlq %cl, %rax
movq -0x28(%rbp), %rcx
orq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/bfc.c
// Function: bfc_ec_best_island
uint64_t bfc_ec_best_island(int k, const ecseq_t *s)
{ // IMPORTANT: call bfc_ec_kcov() before calling this function!
	int i, l, max, max_i;
	for (i = k - 1, max = l = 0, max_i = -1; i < s->n; ++i) {
		if (!s->a[i].solid_end) {
			if (l > max) max = l, max_i = i;
			l = 0;
		} else ++l;
	}
	if (l > max) max = l, max_i = i;
	return max > 0? (uint64_t)(max_i - max - k + 1) << 32 | max_i : 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x4(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0xffffffff, -0x20(%rbp) # imm = 0xFFFFFFFF
movslq -0x14(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x5918
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x14(%rbp), %rcx
movw 0x2(%rax,%rcx,8), %ax
shrw $0xc, %ax
andw $0x1, %ax
cmpw $0x0, %ax
jne 0x5902
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jle 0x58f9
movl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x18(%rbp)
jmp 0x590b
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x590d
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x58b9
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jle 0x592c
movl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x1c(%rbp)
jle 0x5951
movl -0x20(%rbp), %eax
subl -0x1c(%rbp), %eax
subl -0x4(%rbp), %eax
addl $0x1, %eax
cltq
shlq $0x20, %rax
movslq -0x20(%rbp), %rcx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x5959
xorl %eax, %eax
movq %rax, -0x28(%rbp)
jmp 0x5959
movq -0x28(%rbp), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/bfc.c
// Function: bfc_seq_revcomp
static void bfc_seq_revcomp(ecseq_t *seq)
{
	int i;
	for (i = 0; i < seq->n>>1; ++i) {
		ecbase_t tmp;
		tmp = ecbase_comp(&seq->a[i]);
		seq->a[i] = ecbase_comp(&seq->a[seq->n - 1 - i]);
		seq->a[seq->n - 1 - i] = tmp;
	}
	if (seq->n&1) seq->a[i] = ecbase_comp(&seq->a[i]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movslq -0xc(%rbp), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
shrq %rcx
cmpq %rcx, %rax
jae 0x880f
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movslq -0xc(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
callq 0x9950
movq %rax, -0x1c(%rbp)
movq -0x1c(%rbp), %rax
movq %rax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movslq -0xc(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
subq $0x1, %rax
movslq -0xc(%rbp), %rcx
subq %rcx, %rax
shlq $0x3, %rax
addq %rax, %rdi
callq 0x9950
movq -0x40(%rbp), %rcx
movq %rax, %rdx
movq -0x38(%rbp), %rax
movq %rdx, -0x24(%rbp)
movq -0x24(%rbp), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
subq $0x1, %rcx
movslq -0xc(%rbp), %rdx
subq %rdx, %rcx
movq -0x14(%rbp), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x8753
movq -0x8(%rbp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x8863
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
movslq -0xc(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movslq -0xc(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
callq 0x9950
movq -0x50(%rbp), %rcx
movq %rax, %rdx
movq -0x48(%rbp), %rax
movq %rdx, -0x2c(%rbp)
movq -0x2c(%rbp), %rdx
movq %rdx, (%rax,%rcx,8)
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/bfc.c
// Function: bfc_kmer_insert
static void bfc_kmer_insert(cnt_step_t *cs, const bfc_kmer_t *x, int is_high, int tid)
{
	int k = cs->k;
	uint64_t y[2], hash;
	hash = bfc_kmer_hash(k, x->x, y);
	if (bfc_ch_insert(cs->ch, y, is_high, 0) < 0) {
		insbuf_t *p;
		if (bfc_kmer_bufclear(cs, 0, tid) == CNT_BUF_SIZE)
			bfc_kmer_bufclear(cs, 1, tid);
		p = &cs->buf[tid][cs->n_buf[tid]++];
		p->y[0] = y[0], p->y[1] = y[1], p->is_high = is_high;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x90c0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x30(%rbp), %rsi
movl -0x14(%rbp), %edx
xorl %ecx, %ecx
callq 0x21360
cmpl $0x0, %eax
jge 0x90ba
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %edx
xorl %esi, %esi
callq 0x91f0
cmpl $0x100, %eax            # imm = 0x100
jne 0x9064
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %edx
movl $0x1, %esi
callq 0x91f0
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x8(%rbp), %rcx
movq 0x20(%rcx), %rdx
movslq -0x18(%rbp), %rsi
movl (%rdx,%rsi,4), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, (%rdx,%rsi,4)
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x14(%rbp), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x10(%rax)
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/./kmer.h
// Function: bfc_kmer_hash
static inline uint64_t bfc_kmer_hash(int k, const uint64_t x[4], uint64_t h[2])
{
	int t = k>>1, u = ((x[1]>>t&1) > (x[3]>>t&1)); // the middle base is always different
	uint64_t mask = (1ULL<<k) - 1, ret;
	h[0] = bfc_hash_64((x[u<<1|0] + x[u<<1|1]) & mask, mask);
	h[1] = bfc_hash_64(h[0] ^ x[u<<1|1], mask);
	ret = (h[0] ^ h[1]) << k | ((h[0] + h[1]) & mask);
	h[0] = (h[0] + h[1]) & mask;
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl -0x4(%rbp), %eax
sarl %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x1c(%rbp), %ecx
shrq %cl, %rax
andq $0x1, %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rdx
movl -0x1c(%rbp), %ecx
shrq %cl, %rdx
movq %rdx, %rcx
andq $0x1, %rcx
cmpq %rcx, %rax
seta %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x20(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
subq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
shll %ecx
orl $0x0, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
shll %ecx
orl $0x1, %ecx
movslq %ecx, %rcx
addq (%rax,%rcx,8), %rdi
andq -0x28(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x9320
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
shll %ecx
orl $0x1, %ecx
movslq %ecx, %rcx
xorq (%rax,%rcx,8), %rdi
movq -0x28(%rbp), %rsi
callq 0x9320
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
xorq 0x8(%rcx), %rax
movl -0x4(%rbp), %ecx
shlq %cl, %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movq -0x18(%rbp), %rdx
addq 0x8(%rdx), %rcx
andq -0x28(%rbp), %rcx
orq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
addq 0x8(%rax), %rcx
andq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/bfc.c
// Function: bfc_kmer_bufclear
static int bfc_kmer_bufclear(cnt_step_t *cs, int forced, int tid)
{
	int i, k, r;
	if (cs->ch == 0) return 0;
	for (i = k = 0; i < cs->n_buf[tid]; ++i) {
		r = bfc_ch_insert(cs->ch, cs->buf[tid][i].y, cs->buf[tid][i].is_high, forced);
		if (r < 0) cs->buf[tid][k++] = cs->buf[tid][i];
	}
	cs->n_buf[tid] = k;
	return k;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x9219
movl $0x0, -0x4(%rbp)
jmp 0x930f
movl $0x0, -0x20(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rcx
movslq -0x18(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x92f7
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movslq -0x1c(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rsi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %edx
movl -0x14(%rbp), %ecx
callq 0x21360
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jge 0x92e7
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x20(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x20(%rbp)
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movslq -0x18(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x1c(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
jmp 0x92e9
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x9227
movl -0x20(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x18(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/bfc.c
// Function: ecbase_comp
static inline ecbase_t ecbase_comp(const ecbase_t *b)
{
	ecbase_t r = *b;
	r.b = b->b < 4? 3 - b->b : 4;
	r.ob = b->ob < 4? 3 - b->ob : 4;
	return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movb (%rax), %al
andb $0x7, %al
movzbl %al, %eax
cmpl $0x4, %eax
jge 0x998a
movq -0x10(%rbp), %rax
movb (%rax), %al
andb $0x7, %al
movzbl %al, %ecx
movl $0x3, %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
jmp 0x9994
movl $0x4, %eax
movl %eax, -0x14(%rbp)
jmp 0x9994
movl -0x14(%rbp), %eax
movb %al, %cl
movb -0x8(%rbp), %al
andb $0x7, %cl
andb $-0x8, %al
orb %cl, %al
movb %al, -0x8(%rbp)
movq -0x10(%rbp), %rax
movb (%rax), %al
shrb $0x4, %al
andb $0x7, %al
movzbl %al, %eax
cmpl $0x4, %eax
jge 0x99d3
movq -0x10(%rbp), %rax
movb (%rax), %al
shrb $0x4, %al
andb $0x7, %al
movzbl %al, %ecx
movl $0x3, %eax
subl %ecx, %eax
movl %eax, -0x18(%rbp)
jmp 0x99dd
movl $0x4, %eax
movl %eax, -0x18(%rbp)
jmp 0x99dd
movl -0x18(%rbp), %eax
movb %al, %cl
movb -0x8(%rbp), %al
andb $0x7, %cl
shlb $0x4, %cl
andb $-0x71, %al
orb %cl, %al
movb %al, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/bfc.c
// Function: max_streak
static uint64_t max_streak(int k, const bfc_ch_t *ch, const bseq1_t *s)
{
	int i, l;
	uint64_t max = 0, t = 0;
	bfc_kmer_t x = bfc_kmer_null;
	for (i = l = 0; i < s->l_seq; ++i) {
		int c = seq_nt6_table[(uint8_t)s->seq[i]] - 1;
		if (c < 4) { // not an ambiguous base
			bfc_kmer_append(k, x.x, c);
			if (++l >= k) { // ok, we have a k-mer now
				if (bfc_ch_kmer_occ(ch, &x) > 0) t += 1ULL<<32;
				else t = i + 1;
			} else t = i + 1;
		} else l = 0, x = bfc_kmer_null, t = i + 1;
		max = max > t? max : t;
	}
	return max;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq 0x20896(%rip), %rax     # 0x2a2c0
movq %rax, -0x50(%rbp)
movq 0x20893(%rip), %rax     # 0x2a2c8
movq %rax, -0x48(%rbp)
movq 0x20890(%rip), %rax     # 0x2a2d0
movq %rax, -0x40(%rbp)
movq 0x2088d(%rip), %rax     # 0x2a2d8
movq %rax, -0x38(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x9b65
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x206fb(%rip), %rax     # 0x2a180
movzbl (%rax,%rcx), %eax
subl $0x1, %eax
movl %eax, -0x54(%rbp)
cmpl $0x4, -0x54(%rbp)
jge 0x9af4
movl -0x4(%rbp), %edi
leaq -0x50(%rbp), %rsi
movl -0x54(%rbp), %edx
callq 0x5550
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
cmpl -0x4(%rbp), %eax
jl 0x9ae6
movq -0x10(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x21b20
cmpl $0x0, %eax
jle 0x9ad8
movabsq $0x100000000, %rax      # imm = 0x100000000
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x9ae4
movl -0x1c(%rbp), %eax
addl $0x1, %eax
cltq
movq %rax, -0x30(%rbp)
jmp 0x9af2
movl -0x1c(%rbp), %eax
addl $0x1, %eax
cltq
movq %rax, -0x30(%rbp)
jmp 0x9b33
movl $0x0, -0x20(%rbp)
movq 0x207be(%rip), %rax     # 0x2a2c0
movq %rax, -0x50(%rbp)
movq 0x207bb(%rip), %rax     # 0x2a2c8
movq %rax, -0x48(%rbp)
movq 0x207b8(%rip), %rax     # 0x2a2d0
movq %rax, -0x40(%rbp)
movq 0x207b5(%rip), %rax     # 0x2a2d8
movq %rax, -0x38(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
cltq
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jbe 0x9b47
movq -0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x9b4f
movq -0x30(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x9a5d
movq -0x28(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/mrope.c
// Function: mr_init
mrope_t *mr_init(int max_nodes, int block_len, int sorting_order)
{
	int a;
	mrope_t *r;
	assert(sorting_order >= 0 && sorting_order <= 2);
	r = calloc(1, sizeof(mrope_t));
	r->so = sorting_order;
	r->thr_min = 1000;
	for (a = 0; a != 6; ++a)
		r->r[a] = rope_init(max_nodes, block_len);
	return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0x9b8f
cmpl $0x2, -0xc(%rbp)
jg 0x9b8f
jmp 0x9bae
leaq 0x1b9a3(%rip), %rdi     # 0x25539
leaq 0x1b9c5(%rip), %rsi     # 0x25562
movl $0x12, %edx
leaq 0x1b9c1(%rip), %rcx     # 0x2556a
callq 0x20f0
movl $0x1, %edi
movl $0x38, %esi
callq 0x2140
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movl $0x3e8, 0x4(%rax)       # imm = 0x3E8
movl $0x0, -0x10(%rbp)
cmpl $0x6, -0x10(%rbp)
je 0x9c0a
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
callq 0x222e0
movq %rax, %rdx
movq -0x18(%rbp), %rax
movslq -0x10(%rbp), %rcx
movq %rdx, 0x8(%rax,%rcx,8)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x9bde
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/mrope.c
// Function: mr_destroy
void mr_destroy(mrope_t *r)
{
	int a;
	for (a = 0; a != 6; ++a)
		if (r->r[a]) rope_destroy(r->r[a]);
	free(r);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x6, -0xc(%rbp)
je 0x9c68
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpq $0x0, 0x8(%rax,%rcx,8)
je 0x9c5b
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rdi
callq 0x22550
jmp 0x9c5d
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x9c33
movq -0x8(%rbp), %rdi
callq 0x2040
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/mrope.c
// Function: mr_itr_next_block
const uint8_t *mr_itr_next_block(mritr_t *i)
{
	const uint8_t *s;
	if (i->a >= 6) return 0;
	while ((s = rope_itr_next_block(&i->i)) == 0) {
		if (i->to_free) {
			rope_destroy(i->r->r[i->a]);
			i->r->r[i->a] = 0;
		}
		if (++i->a == 6) return 0;
		rope_itr_first(i->r->r[i->a], &i->i);
	}
	return i->a == 6? 0 : s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x6, 0x8(%rax)
jl 0xa4a3
movq $0x0, -0x8(%rbp)
jmp 0xa55b
jmp 0xa4a5
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
callq 0x23330
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0xa539
movq -0x10(%rbp), %rax
cmpl $0x0, 0xc(%rax)
je 0xa4f7
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x8(%rcx), %rcx
movq 0x8(%rax,%rcx,8), %rdi
callq 0x22550
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x8(%rcx), %rcx
movq $0x0, 0x8(%rax,%rcx,8)
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x8(%rcx)
cmpl $0x6, %eax
jne 0xa513
movq $0x0, -0x8(%rbp)
jmp 0xa55b
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x8(%rcx), %rcx
movq 0x8(%rax,%rcx,8), %rdi
movq -0x10(%rbp), %rsi
addq $0x10, %rsi
callq 0x23270
jmp 0xa4a5
movq -0x10(%rbp), %rax
cmpl $0x6, 0x8(%rax)
jne 0xa54b
xorl %eax, %eax
movq %rax, -0x20(%rbp)
jmp 0xa553
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/mrope.c
// Function: worker
static void *worker(void *data)
{
	worker_t *w = (worker_t*)data;
	struct timespec req, rem;
	req.tv_sec = 0; req.tv_nsec = 1000000;
	do {
		while (!__sync_bool_compare_and_swap(&w->to_run, 1, 0)) nanosleep(&req, &rem); // wait for the signal from the master thread
		if (w->m) mr_insert_multi_aux(w->mr->r[w->b], w->m, w->a, w->is_comp);
		__sync_add_and_fetch(w->n_fin_workers, 1);
	} while (!w->to_exit);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movq $0xf4240, -0x18(%rbp)   # imm = 0xF4240
jmp 0xb416
movq -0x10(%rbp), %rcx
movl $0x1, %eax
xorl %edx, %edx
lock
cmpxchgl %edx, 0x8(%rcx)
movl %eax, %ecx
sete %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xb433
jmp 0xb442
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x20e0
jmp 0xb416
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xb47e
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x18(%rcx), %rcx
movq 0x8(%rax,%rcx,8), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdx
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %ecx
callq 0xaec0
movq -0x10(%rbp), %rax
movq (%rax), %rax
lock
incl (%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0xc(%rax)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xb414
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/rld0.c
// Function: rld_init
rld_t *rld_init(int asize, int bbits)
{
	rld_t *e;
	e = xcalloc(1, sizeof(rld_t));
	e->n = 1;
	e->z = xmalloc(sizeof(void*));
	e->z[0] = xcalloc(RLD_LSIZE, 8);
	e->ssize = 1<<bbits;
	e->cnt = xcalloc(asize + 1, 8);
	e->mcnt = xcalloc(asize + 1, 8);
	e->abits = ilog2(asize) + 1;
	e->asize = asize;
	e->sbits = bbits;
	e->asize1 = asize + 1;
	e->offset0[0] = (e->asize1*16+63)/64;
	e->offset0[1] = (e->asize1*32+63)/64;
	e->offset0[2] = e->asize1;
	return e;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl $0x1, %edi
movl $0x50, %esi
callq 0x2140
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, 0xc(%rax)
movl $0x8, %edi
callq 0x21c0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movl $0x800000, %edi         # imm = 0x800000
movl $0x8, %esi
callq 0x2140
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, (%rax)
movl -0x8(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
movl $0x8, %esi
callq 0x2140
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
movl $0x8, %esi
callq 0x2140
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movslq -0x4(%rbp), %rdi
callq 0xb5f0
addl $0x1, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x4(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movl -0x8(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
shll $0x4, %eax
addl $0x3f, %eax
movl $0x40, %ecx
cltd
idivl %ecx
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
shll $0x5, %eax
addl $0x3f, %eax
movl $0x40, %ecx
cltd
idivl %ecx
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x6(%rax)
movq -0x10(%rbp), %rax
movb 0x1(%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x7(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/rld0.c
// Function: rld_destroy
void rld_destroy(rld_t *e)
{
	int i = 0;
	if (e == 0) return;
	if (e->mem) {
		close(e->fd);
		munmap(e->mem, rld_file_size(e));
	} else {
		for (i = 0; i < e->n; ++i) free(e->z[i]);
		free(e->frame);
	}
	free(e->z); free(e->cnt); free(e->mcnt); free(e);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xb65f
jmp 0xb72d
movq -0x8(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0xb6bd
movq -0x8(%rbp), %rax
movl 0x40(%rax), %edi
callq 0x2120
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
addl $0x4, %eax
shll $0x3, %eax
movslq %eax, %rsi
movq -0x8(%rbp), %rax
addq 0x10(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
shlq $0x3, %rax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq %rcx, %rax
addq %rax, %rsi
callq 0x2200
jmp 0xb6fd
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0xb6f0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2040
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xb6c4
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
movq 0x28(%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]fermi-lite/rld0.c
// Function: rld_itr_init
void rld_itr_init(const rld_t *e, rlditr_t *itr, uint64_t k)
{
	itr->i = e->z + (k >> RLD_LBITS);
	itr->shead = *itr->i + k%RLD_LSIZE;
	itr->stail = rld_get_stail(e, itr);
	itr->p = itr->shead + e->offset0[rld_block_type(*itr->shead)];
	itr->q = (uint8_t*)itr->p;
	itr->r = 64;
	itr->c = -1;
	itr->l = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
shrq $0x17, %rax
shlq $0x3, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
andq $0x7fffff, %rax         # imm = 0x7FFFFF
shlq $0x3, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x8(%rbp), %rax
movslq 0x8(%rax), %rax
shlq $0x3, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x8(%rbp), %rax
movslq 0x8(%rax), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rax
subq %rax, %rsi
sarq $0x3, %rsi
movl $0x1, %eax
movl $0x2, %edx
cmpq $0x800000, %rsi         # imm = 0x800000
cmovel %edx, %eax
movslq %eax, %rdx
xorl %eax, %eax
subq %rdx, %rax
shlq $0x3, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rdx
movq 0x18(%rdx), %rdx
movq (%rdx), %rdx
shrq $0x3e, %rdx
movsbl 0x5(%rax,%rdx), %eax
cltq
shlq $0x3, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rax
movl $0x40, (%rax)
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x4(%rax)  # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/rld0.c
// Function: rld_enc
int rld_enc(rld_t *e, rlditr_t *itr, int64_t l, uint8_t c)
{
	if (l == 0) return 0;
	if (itr->c != c) {
		if (itr->l) rld_enc1(e, itr, itr->l, itr->c);
		itr->l = l; itr->c = c;
	} else itr->l += l;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movb %al, -0x21(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xb899
movl $0x0, -0x4(%rbp)
jmp 0xb902
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movzbl -0x21(%rbp), %ecx
cmpl %ecx, %eax
je 0xb8eb
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xb8d2
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movzbl %al, %ecx
callq 0xb910
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movzbl -0x21(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
jmp 0xb8fb
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/rld0.c
// Function: rld_enc1
static int rld_enc1(rld_t *e, rlditr_t *itr, int64_t l, uint8_t c)
{
	int w;
	uint64_t x = rld_delta_enc1(l, &w) << e->abits | c;
	w += e->abits;
	if (w >= itr->r && itr->p == itr->stail) enc_next_block(e, itr);
	if (w > itr->r) {
		w -= itr->r;
		*itr->p++ |= x >> w;
		*itr->p = x << (itr->r = 64 - w);
	} else itr->r -= w, *itr->p |= x << itr->r;
	e->cnt[0] += l;
	e->cnt[c + 1] += l;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0xd970
movq -0x8(%rbp), %rcx
movsbl 0x2(%rcx), %ecx
movl %ecx, %ecx
shlq %cl, %rax
movzbl -0x19(%rbp), %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movsbl 0x2(%rax), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jl 0xb986
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jne 0xb986
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xbfd0
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jle 0xb9ec
movq -0x10(%rbp), %rax
movl (%rax), %ecx
movl -0x20(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movl -0x20(%rbp), %ecx
shrq %cl, %rax
movq %rax, %rcx
movq -0x10(%rbp), %rdx
movq 0x10(%rdx), %rax
movq %rax, %rsi
addq $0x8, %rsi
movq %rsi, 0x10(%rdx)
orq (%rax), %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movl $0x40, %ecx
subl -0x20(%rbp), %ecx
movq -0x10(%rbp), %rdx
movl %ecx, (%rdx)
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, (%rax)
jmp 0xba17
movl -0x20(%rbp), %edx
movq -0x10(%rbp), %rax
movl (%rax), %ecx
subl %edx, %ecx
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
shlq %cl, %rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
orq (%rax), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movzbl -0x19(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
addq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/rld0.c
// Function: rld_enc_finish
uint64_t rld_enc_finish(rld_t *e, rlditr_t *itr)
{
	int i;
	if (itr->l) rld_enc1(e, itr, itr->l, itr->c);
	enc_next_block(e, itr);
	e->n_bytes = (((uint64_t)(e->n - 1) * RLD_LSIZE) + (itr->p - *itr->i)) * 8;
	// recompute e->cnt as the accumulative count; e->mcnt[] keeps the marginal counts
	for (e->cnt[0] = 0, i = 1; i <= e->asize; ++i) e->cnt[i] += e->cnt[i - 1];
	rld_rank_index(e);
	return e->n_bytes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xbf1a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movzbl %al, %ecx
callq 0xb910
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xbfd0
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
subl $0x1, %eax
movslq %eax, %rcx
shlq $0x17, %rcx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdx
movq 0x28(%rdx), %rdx
movq (%rdx), %rdx
subq %rdx, %rax
sarq $0x3, %rax
addq %rax, %rcx
shlq $0x3, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq $0x0, (%rax)
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jg 0xbfb9
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
addq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xbf77
movq -0x8(%rbp), %rdi
callq 0xba50
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/rld0.c
// Function: rld_rank11
uint64_t rld_rank11(const rld_t *e, uint64_t k, int c)
{
	uint64_t *ok;
	if (k == (uint64_t)-1) return 0;
	ok = alloca(e->asize1 * 8);
	rld_rank1a(e, k, ok);
	return ok[c];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
cmpq $-0x1, -0x18(%rbp)
jne 0xcc54
movq $0x0, -0x8(%rbp)
jmp 0xcc98
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %ecx
movl %ecx, %eax
leal 0xf(,%rax,8), %eax
andl $-0x10, %eax
movl %eax, %ecx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xccb0
movq -0x28(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rbp, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/rld0.c
// Function: rld_rank1a
int rld_rank1a(const rld_t *e, uint64_t k, uint64_t *ok)
{
	uint64_t z, l;
	int a = -1;
	rlditr_t itr;
	if (k == 0) {
		for (a = 0; a < e->asize; ++a) ok[a] = 0;
		return -1;
	}
	rld_locate_blk(e, &itr, k-1, ok, &z);
	while (1) {
#ifdef _DNA_ONLY
		l = rld_dec0_fast_dna(e, &itr, &a);
#else
		l = rld_dec0(e, &itr, &a);
#endif
		if (z + l >= k) break;
		z += l; ok[a] += l;
	}
	ok[a] += k - z;
	return a;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF
cmpq $0x0, -0x18(%rbp)
jne 0xcd0e
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jge 0xcd02
movq -0x20(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xccd9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xcd90
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
subq $0x1, %rdx
movq -0x20(%rbp), %rcx
leaq -0x70(%rbp), %rsi
leaq -0x28(%rbp), %r8
callq 0xcda0
movq -0x10(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0x34(%rbp), %rdx
callq 0xd190
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jb 0xcd50
jmp 0xcd72
movq -0x30(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rdx
movq -0x20(%rbp), %rax
movslq -0x34(%rbp), %rcx
addq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
jmp 0xcd2b
movq -0x18(%rbp), %rdx
subq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rax
movslq -0x34(%rbp), %rcx
addq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/rld0.c
// Function: rld_dec0_fast_dna
static inline int64_t rld_dec0_fast_dna(const rld_t *e, rlditr_t *itr, int *c)
{ // This is NOT a replacement of rld_dec0(). It does not do boundary check.
	uint64_t x = itr->r == 64? itr->p[0] : itr->p[0] << (64 - itr->r) | itr->p[1] >> itr->r;
	if (x>>63 == 0) {
		int64_t y;
		int l, w = 0x333333335555779bll>>(x>>59<<2)&0xf;
		l = (x >> (64 - w)) - 1;
		y = x << w >> (64 - l) | 1u << l;
		w += l;
		*c = x << w >> 61;
		w += 3;
		itr->r -= w;
		if (itr->r <= 0) ++itr->p, itr->r += 64;
		return y;
	} else {
		*c = x << 1 >> 61;
		itr->r -= 4;
		if (itr->r <= 0) ++itr->p, itr->r += 64;
		return 1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x40, (%rax)
jne 0xd1ba
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0xd1f4
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rdx
movl $0x40, %ecx
subl (%rdx), %ecx
movl %ecx, %ecx
shlq %cl, %rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq 0x8(%rcx), %rdx
movq -0x18(%rbp), %rcx
movl (%rcx), %ecx
shrq %cl, %rdx
movq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shrq $0x3f, %rax
cmpq $0x0, %rax
jne 0xd2d5
movq -0x28(%rbp), %rcx
shrq $0x3b, %rcx
shlq $0x2, %rcx
movabsq $0x333333335555779b, %rax # imm = 0x333333335555779B
sarq %cl, %rax
andq $0xf, %rax
movl %eax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movl $0x40, %ecx
subl -0x38(%rbp), %ecx
movl %ecx, %ecx
shrq %cl, %rax
subq $0x1, %rax
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rax
movl -0x38(%rbp), %ecx
shlq %cl, %rax
movl $0x40, %ecx
subl -0x34(%rbp), %ecx
movl %ecx, %ecx
shrq %cl, %rax
movl -0x34(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
movl %ecx, %ecx
orq %rcx, %rax
movq %rax, -0x30(%rbp)
movl -0x34(%rbp), %eax
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movl -0x38(%rbp), %ecx
shlq %cl, %rax
shrq $0x3d, %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl -0x38(%rbp), %eax
addl $0x3, %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %edx
movq -0x18(%rbp), %rax
movl (%rax), %ecx
subl %edx, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jg 0xd2cb
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x8, %rcx
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl $0x40, %ecx
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xd31f
movq -0x28(%rbp), %rax
shlq %rax
shrq $0x3d, %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
subl $0x4, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jg 0xd317
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x8, %rcx
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl $0x40, %ecx
movl %ecx, (%rax)
movq $0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/./rld0.h
// Function: rld_dec0
static inline int64_t rld_dec0(const rld_t *e, rlditr_t *itr, int *c)
{
	int w;
	uint64_t x;
	int64_t l, y = 0;
	x = itr->p[0] << (64 - itr->r) | (itr->p != itr->stail && itr->r != 64? itr->p[1] >> itr->r : 0);
	if (x>>63 == 0) {
		if ((w = 0x333333335555779bll>>(x>>59<<2)&0xf) == 0xb && x>>58 == 0) return 0;
		l = (x >> (64 - w)) - 1;
		y = x << w >> (64 - l) | 1u << l;
		w += l;
	} else w = y = 1;
	*c = x << w >> (64 - e->abits);
	w += e->abits;
	if (itr->r > w) itr->r -= w;
	else ++itr->p, itr->r = 64 + itr->r - w;
	return y;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rdx
movl $0x40, %ecx
subl (%rdx), %ecx
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x20(%rcx), %rax
je 0xd59d
movq -0x18(%rbp), %rax
cmpl $0x40, (%rax)
je 0xd59d
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movl (%rcx), %ecx
shrq %cl, %rax
movq %rax, -0x50(%rbp)
jmp 0xd5a5
xorl %eax, %eax
movq %rax, -0x50(%rbp)
jmp 0xd5a5
movq -0x48(%rbp), %rax
movq -0x50(%rbp), %rcx
orq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
shrq $0x3f, %rax
cmpq $0x0, %rax
jne 0xd65b
movq -0x30(%rbp), %rcx
shrq $0x3b, %rcx
shlq $0x2, %rcx
movabsq $0x333333335555779b, %rax # imm = 0x333333335555779B
sarq %cl, %rax
andq $0xf, %rax
movl %eax, -0x24(%rbp)
cmpl $0xb, %eax
jne 0xd606
movq -0x30(%rbp), %rax
shrq $0x3a, %rax
cmpq $0x0, %rax
jne 0xd606
movq $0x0, -0x8(%rbp)
jmp 0xd6e2
movq -0x30(%rbp), %rax
movl $0x40, %ecx
subl -0x24(%rbp), %ecx
movl %ecx, %ecx
shrq %cl, %rax
subq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movl -0x24(%rbp), %ecx
shlq %cl, %rax
movl $0x40, %ecx
subq -0x38(%rbp), %rcx
shrq %cl, %rax
movq -0x38(%rbp), %rcx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
movl %ecx, %ecx
orq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rcx
movslq -0x24(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x24(%rbp)
jmp 0xd66a
movq $0x1, -0x40(%rbp)
movl $0x1, -0x24(%rbp)
movq -0x30(%rbp), %rax
movl -0x24(%rbp), %ecx
shlq %cl, %rax
movq -0x10(%rbp), %rcx
movsbl 0x2(%rcx), %edx
movl $0x40, %ecx
subl %edx, %ecx
movl %ecx, %ecx
shrq %cl, %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movsbl 0x2(%rax), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
cmpl -0x24(%rbp), %eax
jle 0xd6b8
movl -0x24(%rbp), %edx
movq -0x18(%rbp), %rax
movl (%rax), %ecx
subl %edx, %ecx
movl %ecx, (%rax)
jmp 0xd6da
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x8, %rcx
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl $0x40, %ecx
subl -0x24(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/rld0.c
// Function: rld_extend
int rld_extend(const rld_t *e, const rldintv_t *ik, rldintv_t ok[6], int is_back)
{ // TODO: this can be accelerated a little by using rld_rank1a() when ik.x[2]==1
	uint64_t tk[6], tl[6];
	int i;
	rld_rank2a(e, ik->x[!is_back], ik->x[!is_back] + ik->x[2], tk, tl);
	for (i = 0; i < 6; ++i) {
		ok[i].x[!is_back] = e->cnt[i] + tk[i];
		ok[i].x[2] = (tl[i] -= tk[i]);
	}
	ok[0].x[is_back] = ik->x[is_back];
	ok[4].x[is_back] = ok[0].x[is_back] + tl[0];
	ok[3].x[is_back] = ok[4].x[is_back] + tl[4];
	ok[2].x[is_back] = ok[3].x[is_back] + tl[3];
	ok[1].x[is_back] = ok[2].x[is_back] + tl[2];
	ok[5].x[is_back] = ok[1].x[is_back] + tl[1];
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
cmpl $0x0, -0x1c(%rbp)
setne %cl
xorb $-0x1, %cl
andb $0x1, %cl
movzbl %cl, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
movq -0x10(%rbp), %rax
cmpl $0x0, -0x1c(%rbp)
setne %cl
xorb $-0x1, %cl
andb $0x1, %cl
movzbl %cl, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rax
addq 0x10(%rax), %rdx
leaq -0x50(%rbp), %rcx
leaq -0x80(%rbp), %r8
callq 0xd330
movl $0x0, -0x84(%rbp)
cmpl $0x6, -0x84(%rbp)
jge 0xd802
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x84(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movslq -0x84(%rbp), %rax
addq -0x50(%rbp,%rax,8), %rdx
movq -0x18(%rbp), %rax
movslq -0x84(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x0, -0x1c(%rbp)
setne %cl
xorb $-0x1, %cl
andb $0x1, %cl
movzbl %cl, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movslq -0x84(%rbp), %rax
movq -0x50(%rbp,%rax,8), %rdx
movslq -0x84(%rbp), %rax
movq -0x80(%rbp,%rax,8), %rcx
subq %rdx, %rcx
movq %rcx, -0x80(%rbp,%rax,8)
movq -0x18(%rbp), %rax
movslq -0x84(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0xd763
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
addq -0x80(%rbp), %rdx
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, 0x80(%rax,%rcx,8)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq 0x80(%rax,%rcx,8), %rdx
addq -0x60(%rbp), %rdx
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, 0x60(%rax,%rcx,8)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq 0x60(%rax,%rcx,8), %rdx
addq -0x68(%rbp), %rdx
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, 0x40(%rax,%rcx,8)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq 0x40(%rax,%rcx,8), %rdx
addq -0x70(%rbp), %rdx
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, 0x20(%rax,%rcx,8)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq 0x20(%rax,%rcx,8), %rdx
addq -0x78(%rbp), %rdx
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, 0xa0(%rax,%rcx,8)
xorl %eax, %eax
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/rld0.c
// Function: rld_delta_enc1
static inline int64_t rld_delta_enc1(uint64_t x, int *width)
{
	int y = ilog2(x);
	int z = ilog2_32(y + 1);
	*width = (z<<1) + 1 + y;
	return (x ^ (uint64_t)1<<y) | (uint64_t)(y+1)<<y;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xb5f0
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %edi
addl $0x1, %edi
callq 0xd8d0
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
addl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
xorq %rcx, %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rdx
movl -0x14(%rbp), %ecx
shlq %cl, %rdx
movq %rdx, %rcx
orq %rcx, %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/unitig.c
// Function: rld_extend0
int rld_extend0(const rld_t *e, const rldintv_t *ik, rldintv_t *ok0, int is_back)
{ // FIXME: this can be accelerated a little by using rld_rank1a() when ik.x[2]==1
	uint64_t tk[6], tl[6];
	rld_rank2a(e, ik->x[!is_back], ik->x[!is_back] + ik->x[2], tk, tl);
	ok0->x[!is_back] = tk[0];
	ok0->x[is_back] = ik->x[is_back];
	ok0->x[2] = tl[0] - tk[0];
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
cmpl $0x0, -0x1c(%rbp)
setne %cl
xorb $-0x1, %cl
andb $0x1, %cl
movzbl %cl, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
movq -0x10(%rbp), %rax
cmpl $0x0, -0x1c(%rbp)
setne %cl
xorb $-0x1, %cl
andb $0x1, %cl
movzbl %cl, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rax
addq 0x10(%rax), %rdx
leaq -0x50(%rbp), %rcx
leaq -0x80(%rbp), %r8
callq 0xd330
movq -0x50(%rbp), %rdx
movq -0x18(%rbp), %rax
cmpl $0x0, -0x1c(%rbp)
setne %cl
xorb $-0x1, %cl
andb $0x1, %cl
movzbl %cl, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x80(%rbp), %rcx
subq -0x50(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
xorl %eax, %eax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/unitig.c
// Function: fm6_is_contained
int fm6_is_contained(const rld_t *e, int min_match, const kstring_t *s, rldintv_t *intv, rldintv_v *ovlp)
{ // for s is a sequence in e, test if s is contained in other sequences in e; return intervals right overlapping with s
	rldintv_t ik, ok[6];
	int ret = 0;
	assert(s->l > min_match);
	ovlp->n = 0;
	ik = overlap_intv(e, s->l, (uint8_t*)s->s, min_match, s->l - 1, 0, ovlp, 0);
	rld_extend(e, &ik, ok, 1); assert(ok[0].x[2]);
	if (ik.x[2] != ok[0].x[2]) ret = -1; // the sequence is left contained
	ik = ok[0];
	rld_extend(e, &ik, ok, 0); assert(ok[0].x[2]);
	if (ik.x[2] != ok[0].x[2]) ret = -1; // the sequence is right contained
	*intv = ok[0];
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl $0x0, -0x114(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
cmpq %rcx, %rax
jbe 0xf82a
jmp 0xf849
leaq 0x15faf(%rip), %rdi     # 0x257e0
leaq 0x15fb9(%rip), %rsi     # 0x257f1
movl $0x80, %edx
leaq 0x15fb6(%rip), %rcx     # 0x257fa
callq 0x20f0
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl %eax, %edx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movl -0xc(%rbp), %r8d
movq -0x18(%rbp), %rax
movq (%rax), %rax
subq $0x1, %rax
movl %eax, %r9d
movq -0x28(%rbp), %rax
leaq -0x138(%rbp), %rdi
xorl %r10d, %r10d
movl $0x0, (%rsp)
movq %rax, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
callq 0xf9f0
movq -0x138(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x130(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x128(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x120(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x110(%rbp), %rdx
leaq -0x48(%rbp), %rsi
movl $0x1, %ecx
callq 0xd6f0
cmpq $0x0, -0x100(%rbp)
je 0xf8f3
jmp 0xf912
leaq 0x15f56(%rip), %rdi     # 0x25850
leaq 0x15ef0(%rip), %rsi     # 0x257f1
movl $0x83, %edx
leaq 0x15eed(%rip), %rcx     # 0x257fa
callq 0x20f0
movq -0x38(%rbp), %rax
cmpq -0x100(%rbp), %rax
je 0xf929
movl $0xffffffff, -0x114(%rbp) # imm = 0xFFFFFFFF
movq -0x110(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x108(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x100(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0xf8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x110(%rbp), %rdx
leaq -0x48(%rbp), %rsi
xorl %ecx, %ecx
callq 0xd6f0
cmpq $0x0, -0x100(%rbp)
je 0xf977
jmp 0xf996
leaq 0x15ed2(%rip), %rdi     # 0x25850
leaq 0x15e6c(%rip), %rsi     # 0x257f1
movl $0x86, %edx
leaq 0x15e69(%rip), %rcx     # 0x257fa
callq 0x20f0
movq -0x38(%rbp), %rax
cmpq -0x100(%rbp), %rax
je 0xf9ad
movl $0xffffffff, -0x114(%rbp) # imm = 0xFFFFFFFF
movq -0x20(%rbp), %rax
movq -0x110(%rbp), %rcx
movq %rcx, (%rax)
movq -0x108(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x100(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0xf8(%rbp), %rcx
movq %rcx, 0x18(%rax)
movl -0x114(%rbp), %eax
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
nopl (%rax,%rax)