LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi-lite/bfc.c
// Function: fml_count
struct bfc_ch_s *fml_count(int n, const bseq1_t *seq, int k, int q, int l_pre, int n_threads)
{
	int i;
	cnt_step_t cs;
	cs.n_seqs = n, cs.seqs = seq, cs.k = k, cs.q = q;
	cs.ch = bfc_ch_init(cs.k, l_pre);
	cs.n_buf = calloc(n_threads, sizeof(int));
	cs.buf = calloc(n_threads, sizeof(void*));
	for (i = 0; i < n_threads; ++i)
		cs.buf[i] = malloc(CNT_BUF_SIZE * sizeof(insbuf_t));
	kt_for(n_threads, worker_count, &cs, cs.n_seqs);
	for (i = 0; i < n_threads; ++i) free(cs.buf[i]);
	free(cs.buf); free(cs.n_buf);
	return cs.ch;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %r9d, %ebx
movl %edi, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
movl %edx, (%rsp)
movl %ecx, 0x4(%rsp)
movl %edx, %edi
movl %r8d, %esi
callq 0x1412c
movq %rax, 0x18(%rsp)
movslq %ebx, %r14
movl $0x4, %esi
movq %r14, %rdi
callq 0x2130
movq %rax, 0x20(%rsp)
movl $0x8, %esi
movq %r14, %rdi
callq 0x2130
movq %rax, 0x28(%rsp)
movl %ebx, %r15d
testl %r14d, %r14d
jle 0x4573
xorl %r14d, %r14d
movl $0x1800, %edi           # imm = 0x1800
callq 0x21b0
movq 0x28(%rsp), %rcx
movq %rax, (%rcx,%r14,8)
incq %r14
cmpq %r14, %r15
jne 0x4558
movq %rsp, %rdx
movslq 0x8(%rdx), %rcx
leaq 0x46(%rip), %rsi        # 0x45c7
movl %ebx, %edi
callq 0x13f60
testl %ebx, %ebx
jle 0x45a4
xorl %ebx, %ebx
movq 0x28(%rsp), %rax
movq (%rax,%rbx,8), %rdi
callq 0x2040
incq %rbx
cmpq %rbx, %r15
jne 0x458e
movq 0x28(%rsp), %rdi
callq 0x2040
movq 0x20(%rsp), %rdi
callq 0x2040
movq 0x18(%rsp), %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi-lite/bfc.c
// Function: bfc_ec_greedy_k
int bfc_ec_greedy_k(int k, int mode, const bfc_kmer_t *x, const bfc_ch_t *ch)
{
	int i, j, max = 0, max_ec = -1, max2 = 0;
	for (i = 0; i < k; ++i) {
		int c = (x->x[1]>>i&1)<<1 | (x->x[0]>>i&1);
		for (j = 0; j < 4; ++j) {
			bfc_kmer_t y = *x;
			int ret;
			if (j == c) continue;
			bfc_kmer_change(k, y.x, i, j);
			ret = bfc_ch_kmer_occ(ch, &y);
			if (ret < 0) continue;
			if ((max&0xff) < (ret&0xff)) max2 = max, max = ret, max_ec = i<<2 | j;
			else if ((max2&0xff) < (ret&0xff)) max2 = ret;
		}
	}
	return (max&0xff) * 3 > mode && (max2&0xff) < 3? max_ec : -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, 0x48(%rsp)
movq %rdx, %r15
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
testl %edi, %edi
jle 0x4a62
movl %esi, 0x18(%rsp)
movl %edi, %eax
movq %rax, 0x40(%rsp)
movl $0xffffffff, 0xc(%rsp)  # imm = 0xFFFFFFFF
movq $0x0, 0x10(%rsp)
xorl %r9d, %r9d
xorl %r13d, %r13d
xorl %eax, %eax
movl %edi, 0x1c(%rsp)
movq 0x8(%r15), %rdx
movl %r9d, %ecx
shrq %cl, %rdx
movq (%r15), %rcx
andl $0x1, %edx
xorl %esi, %esi
btq %r9, %rcx
setb %sil
leal (%rsi,%rdx,2), %ebx
movq $-0x2, %rdx
movl %r9d, %ecx
rolq %cl, %rdx
movq %rdx, 0x60(%rsp)
movl %r9d, %ecx
notl %ecx
addl %edi, %ecx
movq $-0x2, %rdx
movq %rcx, 0x58(%rsp)
rolq %cl, %rdx
movq %rdx, 0x50(%rsp)
xorl %ebp, %ebp
movl %eax, %r12d
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movaps %xmm1, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
cmpl %ebp, %ebx
je 0x4a12
movl %ebp, %eax
andl $0x1, %eax
movq %rax, %rsi
movl %r9d, %ecx
shlq %cl, %rsi
movq 0x20(%rsp), %rdi
movq 0x60(%rsp), %r10
andq %r10, %rdi
movl %ebp, %edx
shrl %edx
movq %rdx, %r8
movq %r9, %r14
shlq %cl, %r8
orq %rsi, %rdi
movq %rdi, 0x20(%rsp)
movq 0x28(%rsp), %rcx
andq %r10, %rcx
orq %r8, %rcx
movq %rcx, 0x28(%rsp)
xorl $0x1, %eax
movq 0x58(%rsp), %rcx
shlq %cl, %rax
movq 0x30(%rsp), %rsi
movq 0x50(%rsp), %rdi
andq %rdi, %rsi
orq %rax, %rsi
movq %rsi, 0x30(%rsp)
xorl $0x1, %edx
shlq %cl, %rdx
movq 0x38(%rsp), %rax
andq %rdi, %rax
orq %rdx, %rax
movq %rax, 0x38(%rsp)
movq 0x48(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x1461d
testl %eax, %eax
js 0x49fc
movl %r12d, %edx
movl $0xff, %esi
andl %esi, %edx
movl %eax, %ecx
andl %esi, %ecx
cmpl %ecx, %edx
movq %r14, %r9
jae 0x4a04
movq 0x10(%rsp), %rcx
addl %ebp, %ecx
movl %ecx, 0xc(%rsp)
movl %r12d, %r13d
jmp 0x4a15
movl %r12d, %eax
movq %r14, %r9
jmp 0x4a15
movzbl %r13b, %edx
cmpl %ecx, %edx
jb 0x4a0f
movl %r13d, %eax
movl %eax, %r13d
movl %r12d, %eax
incl %ebp
cmpl $0x4, %ebp
jne 0x4930
incq %r9
movq 0x10(%rsp), %rcx
addl $0x4, %ecx
movq %rcx, 0x10(%rsp)
cmpq 0x40(%rsp), %r9
movl 0x1c(%rsp), %edi
jne 0x48e4
movl $0xff, %ecx
andl %ecx, %eax
leal (%rax,%rax,2), %edi
andl %ecx, %r13d
cmpl $0x3, %r13d
setb %cl
movl 0x18(%rsp), %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl 0xc(%rsp), %eax
jmp 0x4a6b
movb $0x1, %cl
xorl %edi, %edi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb $0x1, %cl
cmovel %edx, %eax
cmpl %esi, %edi
cmovlel %edx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi-lite/bfc.c
// Function: bfc_ec_first_kmer
int bfc_ec_first_kmer(int k, const ecseq_t *s, int start, bfc_kmer_t *x)
{
	int i, l;
	*x = bfc_kmer_null;
	for (i = start, l = 0; i < s->n; ++i) {
		ecbase_t *c = &s->a[i];
		if (c->b < 4) {
			bfc_kmer_append(k, x->x, c->b);
			if (++l == k) break;
		} else l = 0, *x = bfc_kmer_null;
	}
	return i;
}

// Assembly:
movups 0x18804(%rip), %xmm0    # 0x1d290
movups %xmm0, 0x10(%rcx)
movups 0x187e9(%rip), %xmm0    # 0x1d280
movups %xmm0, (%rcx)
movslq %edx, %r8
cmpq %r8, (%rsi)
jbe 0x4b62
pushq %r14
pushq %rbx
movq %rcx, %rax
movq $-0x1, %rdx
movl %edi, %ecx
shlq %cl, %rdx
notq %rdx
leal -0x1(%rdi), %ecx
xorl %r9d, %r9d
movq 0x10(%rsi), %r10
movzbl (%r10,%r8,8), %r10d
andl $0x7, %r10d
cmpb $0x3, %r10b
ja 0x4b30
movl %r10d, %r11d
andl $0x1, %r11d
movq (%rax), %rbx
movq 0x8(%rax), %r14
leaq (%r11,%rbx,2), %rbx
andq %rdx, %rbx
movq %rbx, (%rax)
shrl %r10d
leaq (%r10,%r14,2), %rbx
andq %rdx, %rbx
movq %rbx, 0x8(%rax)
xorq $0x1, %r11
shlq %cl, %r11
movq 0x10(%rax), %rbx
shrq %rbx
orq %rbx, %r11
movq %r11, 0x10(%rax)
movq 0x18(%rax), %r11
shrq %r11
xorq $0x1, %r10
shlq %cl, %r10
orq %r11, %r10
movq %r10, 0x18(%rax)
incl %r9d
cmpl %edi, %r9d
setne %r10b
jmp 0x4b4b
movups 0x18759(%rip), %xmm0    # 0x1d290
movups %xmm0, 0x10(%rax)
movups 0x1873e(%rip), %xmm0    # 0x1d280
movups %xmm0, (%rax)
movb $0x1, %r10b
xorl %r9d, %r9d
testb %r10b, %r10b
je 0x4b5c
incq %r8
cmpq %r8, (%rsi)
ja 0x4ac1
movl %r8d, %edx
popq %rbx
popq %r14
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi-lite/bfc.c
// Function: bfc_ec_kcov
void bfc_ec_kcov(int k, int min_occ, ecseq_t *s, const bfc_ch_t *ch)
{
	int i, l, r, j;
	bfc_kmer_t x = bfc_kmer_null;
	for (i = l = 0; i < s->n; ++i) {
		ecbase_t *c = &s->a[i];
		c->high_end = c->solid_end = c->lcov = c->hcov = 0;
		if (c->b < 4) {
			bfc_kmer_append(k, x.x, c->b);
			if (++l >= k) {
				if ((r = bfc_ch_kmer_occ(ch, &x)) >= 0) {
					if ((r>>8&0x3f) >= min_occ+1) c->high_end = 1;
					if ((r&0xff) >= min_occ) {
						c->solid_end = 1;
						for (j = i - k + 1; j <= i; ++j)
							++s->a[j].lcov, s->a[j].hcov += c->high_end;
					}
				}
			}
		} else l = 0, x = bfc_kmer_null;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, 0x40(%rsp)
movl %esi, 0xc(%rsp)
movups 0x1870d(%rip), %xmm0    # 0x1d290
movaps %xmm0, 0x20(%rsp)
movups 0x186f1(%rip), %xmm0    # 0x1d280
movaps %xmm0, 0x10(%rsp)
cmpq $0x0, (%rdx)
je 0x4d29
movq %rdx, %r14
movl %edi, %r13d
movq $-0x1, %r8
movl %r13d, %ecx
shlq %cl, %r8
notq %r8
leal -0x1(%r13), %ecx
movl %edi, %ebx
negl %ebx
xorl %ebp, %ebp
xorl %r15d, %r15d
movq %r8, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movq 0x10(%r14), %r12
andw $0xc000, 0x2(%r12,%rbp,8) # imm = 0xC000
movzbl (%r12,%rbp,8), %eax
andl $0x7, %eax
cmpb $0x3, %al
ja 0x4cf2
movl %eax, %edx
andl $0x1, %edx
movq 0x10(%rsp), %r9
movq 0x18(%rsp), %rsi
leaq (%rdx,%r9,2), %r9
andq %r8, %r9
movq %r9, 0x10(%rsp)
shrl %eax
leaq (%rax,%rsi,2), %rsi
andq %r8, %rsi
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rsi
shrq %rsi
xorq $0x1, %rdx
shlq %cl, %rdx
orq %rsi, %rdx
movq %rdx, 0x20(%rsp)
movq 0x28(%rsp), %rdx
shrq %rdx
xorq $0x1, %rax
shlq %cl, %rax
orq %rdx, %rax
movq %rax, 0x28(%rsp)
incl %r15d
cmpl %r13d, %r15d
jl 0x4d0d
movq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x1461d
testl %eax, %eax
js 0x4d1d
movl %eax, %ecx
shrl $0x8, %ecx
andl $0x3f, %ecx
cmpl 0xc(%rsp), %ecx
jle 0x4c75
orb $0x20, 0x3(%r12,%rbp,8)
movzbl %al, %eax
cmpl 0xc(%rsp), %eax
movq 0x38(%rsp), %r8
movq 0x30(%rsp), %rcx
jl 0x4d0d
orb $0x10, 0x3(%r12,%rbp,8)
testl %r13d, %r13d
jle 0x4d0d
movslq %ebx, %rax
movq 0x10(%r14), %r9
movzwl 0xa(%r9,%rax,8), %edx
leal 0x1(%rdx), %esi
andl $0x3f, %esi
andl $-0x40, %edx
orl %esi, %edx
movw %dx, 0xa(%r9,%rax,8)
movzwl 0x2(%r12,%rbp,8), %r9d
movq 0x10(%r14), %rdx
movzwl 0xa(%rdx,%rax,8), %esi
shrl $0x7, %r9d
andl $0x40, %r9d
addl %esi, %r9d
andl $0xfc0, %r9d            # imm = 0xFC0
andl $0xfffff03f, %esi       # imm = 0xFFFFF03F
orl %r9d, %esi
movw %si, 0xa(%rdx,%rax,8)
leaq 0x1(%rax), %rdx
movq %rdx, %rax
cmpq %rbp, %rdx
jl 0x4c9a
jmp 0x4d0d
movups 0x18597(%rip), %xmm0    # 0x1d290
movaps %xmm0, 0x20(%rsp)
movups 0x1857b(%rip), %xmm0    # 0x1d280
movaps %xmm0, 0x10(%rsp)
xorl %r15d, %r15d
incq %rbp
incl %ebx
cmpq %rbp, (%r14)
ja 0x4bcb
jmp 0x4d29
movq 0x38(%rsp), %r8
movq 0x30(%rsp), %rcx
jmp 0x4d0d
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
leal -0x1(%rdi), %r9d
movq (%rsi), %rdx
movslq %r9d, %r8
cmpq %r8, %rdx
jbe 0x4d9b
pushq %rbx
movq 0x10(%rsi), %rax
movslq %edi, %rcx
leaq (%rax,%rcx,8), %r9
addq $-0x6, %r9
xorl %r10d, %r10d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %esi, %esi
xorl %ecx, %ecx
movl %esi, %r11d
movl %eax, %ebx
cmpl %esi, %ecx
movl %ecx, %esi
cmovlel %r11d, %esi
movl %r8d, %eax
cmovlel %ebx, %eax
testb $0x10, 0x1(%r9)
leal 0x1(%rcx), %ecx
cmovel %r10d, %ecx
cmovnel %r11d, %esi
cmovnel %ebx, %eax
incq %r8
addq $0x8, %r9
cmpq %r8, %rdx
jne 0x4d63
movl %edx, %r9d
popq %rbx
jmp 0x4da4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
xorl %esi, %esi
cmpl %esi, %ecx
movl %esi, %edx
cmovgl %ecx, %edx
testl %edx, %edx
jle 0x4dc8
cmpl %esi, %ecx
cmovgl %r9d, %eax
addl %edi, %edx
negl %edx
leal (%rax,%rdx), %ecx
incl %ecx
shlq $0x20, %rcx
cltq
orq %rcx, %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq (%rdi), %r9
cmpq $0x2, %r9
jae 0x6b47
xorl %eax, %eax
jmp 0x6c71
movq $-0x8, %rcx
xorl %eax, %eax
movl $0x4, %edx
movl $0x40, %esi
movq 0x10(%rdi), %r8
movb (%r8,%rax,8), %r10b
movzwl 0x5(%r8,%rax,8), %ebx
movzbl 0x7(%r8,%rax,8), %r11d
shll $0x10, %r11d
orl %ebx, %r11d
movl %r10d, %ebx
andb $0x7, %bl
movb $0x3, %bpl
subb %bl, %bpl
cmpb $0x4, %bl
movzbl %bpl, %ebx
cmovael %edx, %ebx
movl %r10d, %ebp
shrb $0x4, %bpl
andb $0x7, %bpl
movl %ebp, %r14d
shlb $0x4, %r14b
movb $0x30, %r15b
subb %r14b, %r15b
cmpb $0x4, %bpl
movzbl %r15b, %ebp
cmovael %esi, %ebp
movl 0x1(%r8,%rax,8), %r14d
andb $-0x78, %r10b
orb %bl, %r10b
orb %bpl, %r10b
shlq $0x28, %r11
shlq $0x8, %r14
orq %r11, %r14
movzbl %r10b, %r10d
orq %r14, %r10
leaq (%r8,%r9,8), %rbx
movb (%rcx,%rbx), %r9b
movzwl 0x5(%rcx,%rbx), %ebp
movzbl 0x7(%rcx,%rbx), %r11d
shll $0x10, %r11d
orl %ebp, %r11d
movl 0x1(%rcx,%rbx), %ebx
movl %r9d, %ebp
andb $0x7, %bpl
movb $0x3, %r14b
subb %bpl, %r14b
cmpb $0x4, %bpl
movzbl %r14b, %ebp
cmovael %edx, %ebp
movl %r9d, %r14d
shrb $0x4, %r14b
andb $0x7, %r14b
movl %r14d, %r15d
shlb $0x4, %r15b
movb $0x30, %r12b
subb %r15b, %r12b
cmpb $0x4, %r14b
movzbl %r12b, %r14d
cmovael %esi, %r14d
andb $-0x78, %r9b
orb %bpl, %r9b
orb %r14b, %r9b
shlq $0x28, %r11
shlq $0x8, %rbx
orq %r11, %rbx
movzbl %r9b, %r9d
orq %rbx, %r9
movq %r9, (%r8,%rax,8)
movq (%rdi), %r8
shlq $0x3, %r8
addq 0x10(%rdi), %r8
movq %r10, (%rcx,%r8)
incq %rax
movq (%rdi), %r9
movq %r9, %r8
shrq %r8
addq $-0x8, %rcx
cmpq %rax, %r8
ja 0x6b5a
testb $0x1, %r9b
je 0x6cfc
movq 0x10(%rdi), %rcx
movb (%rcx,%rax,8), %dl
movzwl 0x5(%rcx,%rax,8), %edi
movzbl 0x7(%rcx,%rax,8), %esi
shll $0x10, %esi
orl %edi, %esi
movl 0x1(%rcx,%rax,8), %edi
movl %edx, %r8d
andb $0x7, %r8b
movb $0x3, %r9b
subb %r8b, %r9b
cmpb $0x4, %r8b
movzbl %r9b, %r8d
movl $0x4, %r9d
cmovbl %r8d, %r9d
movl %edx, %r8d
shrb $0x4, %r8b
andb $0x7, %r8b
movl %r8d, %r10d
shlb $0x4, %r10b
movb $0x30, %r11b
subb %r10b, %r11b
cmpb $0x4, %r8b
movzbl %r11b, %r8d
movl $0x40, %r10d
cmovbl %r8d, %r10d
andb $-0x78, %dl
orb %r9b, %dl
orb %r10b, %dl
shlq $0x28, %rsi
shlq $0x8, %rdi
orq %rsi, %rdi
movzbl %dl, %edx
orq %rdi, %rdx
movq %rdx, (%rcx,%rax,8)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x0, 0x18(%rdi)
je 0x731b
movq %rdi, %r14
movslq %edx, %r15
movq 0x20(%rdi), %rax
cmpl $0x0, (%rax,%r15,4)
jle 0x731f
movl %esi, %ebx
xorl %r12d, %r12d
xorl %r13d, %r13d
xorl %ebp, %ebp
movq 0x18(%r14), %rdi
movq 0x28(%r14), %rax
movq (%rax,%r15,8), %rsi
movl 0x10(%rsi,%r12), %edx
addq %r12, %rsi
movl %ebx, %ecx
callq 0x14279
testl %eax, %eax
jns 0x7305
movq 0x28(%r14), %rax
movq (%rax,%r15,8), %rax
movslq %ebp, %rcx
incl %ebp
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%rax,%r12), %rdx
movq %rdx, 0x10(%rax,%rcx,8)
movups (%rax,%r12), %xmm0
movups %xmm0, (%rax,%rcx,8)
incq %r13
movq 0x20(%r14), %rax
movslq (%rax,%r15,4), %rcx
addq $0x18, %r12
cmpq %rcx, %r13
jl 0x72c2
jmp 0x7321
xorl %ebp, %ebp
jmp 0x7325
xorl %ebp, %ebp
movl %ebp, (%rax,%r15,4)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpl $0x3, %edx
jae 0x75d0
movl %edx, %r15d
movl %esi, %ebx
movl %edi, %ebp
movl $0x1, %r12d
movl $0x1, %edi
movl $0x38, %esi
callq 0x2130
movq %rax, %r14
movb %r15b, (%rax)
movl $0x3e8, 0x4(%rax)       # imm = 0x3E8
movl %ebp, %edi
movl %ebx, %esi
callq 0x14a38
movq %rax, (%r14,%r12,8)
incq %r12
cmpq $0x7, %r12
jne 0x75ae
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xfffe(%rip), %rdi      # 0x175d5
leaq 0x10020(%rip), %rsi     # 0x175fe
leaq 0x10021(%rip), %rcx     # 0x17606
movl $0x12, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi-lite/mrope.c
// Function: mr_insert1
int64_t mr_insert1(mrope_t *r, const uint8_t *str)
{
	int64_t tl[6], tu[6], l, u;
	const uint8_t *p;
	int b, is_srt = (r->so != MR_SO_IO), is_comp = (r->so == MR_SO_RCLO);
	for (u = 0, b = 0; b != 6; ++b) u += r->r[b]->c[0];
	l = is_srt? 0 : u;
	for (p = str, b = 0; *p; b = *p++) {
		int a;
		if (l != u) {
			int64_t cnt = 0;
			rope_rank2a(r->r[b], l, u, tl, tu);
			if (is_comp && *p != 5) {
				for (a = 4; a > *p; --a) l += tu[a] - tl[a];
				l += tu[0] - tl[0];
			} else for (a = 0; a < *p; ++a) l += tu[a] - tl[a];
			rope_insert_run(r->r[b], l, *p, 1, 0);
			while (--b >= 0) cnt += r->r[b]->c[*p];
			l = cnt + tl[*p]; u = cnt + tu[*p];
		} else {
			l = rope_insert_run(r->r[b], l, *p, 1, 0);
			while (--b >= 0) l += r->r[b]->c[*p];
			u = l;
		}
	}
	return rope_insert_run(r->r[b], l, 0, 1, 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movb (%rdi), %bpl
movl $0x1, %ecx
xorl %eax, %eax
movq (%rbx,%rcx,8), %rdx
addq 0x8(%rdx), %rax
incq %rcx
cmpq $0x7, %rcx
jne 0x764b
xorl %ecx, %ecx
testb %bpl, %bpl
movl $0x0, %r13d
cmoveq %rax, %r13
movb (%r14), %dl
testb %dl, %dl
je 0x7795
movq %rsp, %r12
movl %ecx, %r15d
cmpq %rax, %r13
jne 0x76c0
movq 0x8(%rbx,%r15,8), %rdi
movzbl %dl, %edx
movl $0x1, %ecx
movq %r13, %rsi
xorl %r8d, %r8d
callq 0x14c5a
testq %r15, %r15
je 0x7706
movzbl (%r14), %ecx
incq %r15
movq -0x8(%rbx,%r15,8), %rdx
addq 0x8(%rdx,%rcx,8), %rax
decq %r15
movq %rax, %r13
cmpq $0x1, %r15
jg 0x76a5
jmp 0x7780
movq 0x8(%rbx,%r15,8), %rdi
movq %r13, %rsi
movq %rax, %rdx
leaq 0x30(%rsp), %rcx
movq %r12, %r8
callq 0x15296
cmpb $0x2, %bpl
jne 0x76e8
movzbl (%r14), %eax
cmpq $0x5, %rax
jne 0x770b
movzbl (%r14), %eax
testq %rax, %rax
je 0x772e
xorl %ecx, %ecx
addq (%rsp,%rcx,8), %r13
subq 0x30(%rsp,%rcx,8), %r13
incq %rcx
cmpq %rcx, %rax
jne 0x76f3
jmp 0x772e
movq %rax, %r13
jmp 0x7780
cmpb $0x3, %al
ja 0x7725
movl $0x4, %ecx
addq (%rsp,%rcx,8), %r13
subq 0x30(%rsp,%rcx,8), %r13
decq %rcx
cmpq %rax, %rcx
ja 0x7714
addq (%rsp), %r13
subq 0x30(%rsp), %r13
movq 0x8(%rbx,%r15,8), %rdi
movzbl (%r14), %edx
movl $0x1, %ecx
movq %r13, %rsi
xorl %r8d, %r8d
callq 0x14c5a
movl $0x0, %eax
testq %r15, %r15
je 0x776d
movzbl (%r14), %ecx
incq %r15
xorl %eax, %eax
movq -0x8(%rbx,%r15,8), %rdx
addq 0x8(%rdx,%rcx,8), %rax
decq %r15
cmpq $0x1, %r15
jg 0x775a
movzbl (%r14), %ecx
shll $0x3, %ecx
movq 0x30(%rsp,%rcx), %r13
addq %rax, %r13
addq (%rsp,%rcx), %rax
movzbl (%r14), %ecx
movb 0x1(%r14), %dl
incq %r14
testb %dl, %dl
jne 0x7679
movl %ecx, %ecx
movq 0x8(%rbx,%rcx,8), %rdi
movl $0x1, %ecx
movq %r13, %rsi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x14c5a
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
cmpl $0x5, 0x8(%rdi)
jle 0x7a30
xorl %r14d, %r14d
jmp 0x7aa5
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, %rdi
callq 0x1550c
testq %rax, %rax
jne 0x7a9a
xorl %r14d, %r14d
cmpl $0x0, 0xc(%rbx)
je 0x7a6e
movq (%rbx), %rax
movslq 0x8(%rbx), %rcx
movq 0x8(%rax,%rcx,8), %rdi
callq 0x14bf7
movq (%rbx), %rax
movslq 0x8(%rbx), %rcx
movq $0x0, 0x8(%rax,%rcx,8)
movslq 0x8(%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8(%rbx)
cmpl $0x6, %ecx
je 0x7aa5
movq (%rbx), %rcx
movq 0x10(%rcx,%rax,8), %rdi
movq %r15, %rsi
callq 0x154ae
movq %r15, %rdi
callq 0x1550c
testq %rax, %rax
je 0x7a47
xorl %r14d, %r14d
cmpl $0x6, 0x8(%rbx)
cmovneq %rax, %r14
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %r14
movq $0x0, (%r14)
movq $0xf4240, 0x8(%r14)     # imm = 0xF4240
xorl %ebp, %ebp
leaq 0x8(%rsp), %r15
movl $0x1, %eax
lock
cmpxchgl %ebp, 0x8(%rbx)
je 0x8466
movq %r14, %rdi
movq %r15, %rsi
callq 0x20d0
jmp 0x844d
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0x8488
movq 0x10(%rbx), %rax
movslq 0x18(%rbx), %rcx
movq 0x8(%rax,%rcx,8), %rdi
movq 0x28(%rbx), %rdx
movl 0x1c(%rbx), %ecx
callq 0x80a1
movq (%rbx), %rax
lock
incl (%rax)
cmpl $0x0, 0xc(%rbx)
je 0x844d
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movl %edi, %r14d
movl $0x1, %edi
movl $0x50, %esi
callq 0x2130
movq %rax, %rbx
movl $0x1, 0xc(%rax)
movl $0x8, %edi
callq 0x21b0
movq %rax, %r15
movq %rax, 0x18(%rbx)
movl $0x800000, %edi         # imm = 0x800000
movl $0x8, %esi
callq 0x2130
movl $0x1, %edx
movl %ebp, %ecx
shll %cl, %edx
movq %rax, (%r15)
movl %edx, 0x8(%rbx)
leal 0x1(%r14), %r12d
movslq %r12d, %r15
movl $0x8, %esi
movq %r15, %rdi
callq 0x2130
movq %rax, 0x20(%rbx)
movl $0x8, %esi
movq %r15, %rdi
callq 0x2130
movq %rax, 0x28(%rbx)
testl %r14d, %r14d
js 0x8548
movslq %r14d, %rax
cmpl $0x10000, %r14d         # imm = 0x10000
jae 0x854c
cmpl $0x100, %r14d           # imm = 0x100
jae 0x8567
leaq 0xf22d(%rip), %rcx      # 0x17770
movb (%rax,%rcx), %al
jmp 0x8589
movb $0x3f, %al
jmp 0x8589
cmpl $0x1000000, %r14d       # imm = 0x1000000
jae 0x8579
shrq $0x10, %rax
leaq 0xf210(%rip), %rcx      # 0x17770
movb (%rax,%rcx), %al
addb $0x10, %al
jmp 0x8589
shrq $0x8, %rax
leaq 0xf1fe(%rip), %rcx      # 0x17770
movb (%rax,%rcx), %al
addb $0x8, %al
jmp 0x8589
shrq $0x18, %rax
leaq 0xf1ec(%rip), %rcx      # 0x17770
movb (%rax,%rcx), %al
addb $0x18, %al
incb %al
movb %al, 0x2(%rbx)
movb %r14b, (%rbx)
movb %bpl, 0x3(%rbx)
movb %r12b, 0x1(%rbx)
movzbl %r12b, %eax
movl %eax, %ecx
shll $0x4, %ecx
addl $0x3f, %ecx
shrl $0x6, %ecx
movb %cl, 0x5(%rbx)
movl %eax, %ecx
shll $0x5, %ecx
addl $0x3f, %ecx
shrl $0x6, %ecx
movb %cl, 0x6(%rbx)
movb %al, 0x7(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rdi, %rdi
je 0x860d
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x48(%rdi)
je 0x860e
movl 0x40(%rbx), %edi
callq 0x2110
movq 0x48(%rbx), %rdi
movzbl (%rbx), %eax
leaq (,%rax,8), %rcx
addq 0x10(%rbx), %rcx
incq %rax
imulq 0x30(%rbx), %rax
leaq (%rcx,%rax,8), %rsi
addq $0x20, %rsi
callq 0x21f0
jmp 0x8639
retq
cmpl $0x0, 0xc(%rbx)
jle 0x8630
xorl %r14d, %r14d
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2040
incq %r14
movslq 0xc(%rbx), %rax
cmpq %rax, %r14
jl 0x8617
movq 0x38(%rbx), %rdi
callq 0x2040
movq 0x18(%rbx), %rdi
callq 0x2040
movq 0x20(%rbx), %rdi
callq 0x2040
movq 0x28(%rbx), %rdi
callq 0x2040
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2040
// File: /workspace/github_c_makefile_star2_O1/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:
movq 0x18(%rdi), %rax
movq %rdx, %rcx
shrq $0x17, %rcx
leaq (%rax,%rcx,8), %rax
movq %rax, 0x28(%rsi)
movq (%rax), %rcx
andl $0x7fffff, %edx         # imm = 0x7FFFFF
leaq (%rcx,%rdx,8), %rcx
movq %rcx, 0x18(%rsi)
movslq 0x8(%rdi), %rdx
leaq (%rcx,%rdx,8), %rdx
movq %rdx, %r8
subq (%rax), %r8
xorl %eax, %eax
cmpq $0x4000000, %r8         # imm = 0x4000000
setne %al
shll $0x3, %eax
orq $-0x10, %rax
addq %rdx, %rax
movq %rax, 0x20(%rsi)
movq (%rcx), %rax
shrq $0x3e, %rax
movsbq 0x5(%rdi,%rax), %rax
leaq (%rcx,%rax,8), %rax
movq %rax, 0x10(%rsi)
movq %rax, 0x30(%rsi)
movabsq $-0xffffffc0, %rax      # imm = 0xFFFFFFFF00000040
movq %rax, (%rsi)
movq $0x0, 0x8(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rdx, %rdx
je 0x871f
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movl 0x4(%rsi), %eax
movzbl %cl, %ebp
movq 0x8(%rsi), %rdx
cmpl %ebp, %eax
jne 0x8704
addq %r14, %rdx
movq %rdx, 0x8(%rbx)
jmp 0x871b
testq %rdx, %rdx
je 0x8714
movzbl %al, %ecx
movq %rbx, %rsi
callq 0x8722
movq %r14, 0x8(%rbx)
movl %ebp, 0x4(%rbx)
popq %rbx
popq %r14
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %rdx
testq %rdx, %rdx
je 0x8cf6
movzbl 0x4(%r14), %ecx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8722
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8d5c
movslq 0xc(%rbx), %rax
shlq $0x1a, %rax
movq 0x28(%r14), %rcx
addq 0x10(%r14), %rax
subq (%rcx), %rax
addq $-0x4000000, %rax       # imm = 0xFC000000
movq %rax, 0x10(%rbx)
movq 0x20(%rbx), %rax
movq $0x0, (%rax)
movzbl (%rbx), %ecx
testq %rcx, %rcx
je 0x8d48
movq (%rax), %rdx
xorl %esi, %esi
addq 0x8(%rax,%rsi,8), %rdx
movq %rdx, 0x8(%rax,%rsi,8)
incq %rsi
cmpq %rsi, %rcx
jne 0x8d36
movq %rbx, %rdi
callq 0x890c
movq 0x10(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi-lite/rld0.c
// Function: enc_next_block
static inline void enc_next_block(rld_t *e, rlditr_t *itr)
{
	int i, type;
	if (itr->stail + 2 - *itr->i == RLD_LSIZE) {
		++e->n;
		e->z = realloc(e->z, e->n * sizeof(void*));
		itr->i = e->z + e->n - 1;
		itr->shead = *itr->i = xcalloc(RLD_LSIZE, 8);
	} else itr->shead += e->ssize;
	if (e->cnt[0] - e->mcnt[0] < 0x4000) {
		uint16_t *p = (uint16_t*)itr->shead;
		for (i = 0; i <= e->asize; ++i) p[i] = e->cnt[i] - e->mcnt[i];
		type = 0;
	} else if (e->cnt[0] - e->mcnt[0] < 0x40000000) {
		uint32_t *p = (uint32_t*)itr->shead;
		for (i = 0; i <= e->asize; ++i) p[i] = e->cnt[i] - e->mcnt[i];
		type = 1;
	} else {
		uint64_t *p = (uint64_t*)itr->shead;
		for (i = 0; i <= e->asize; ++i) p[i] = e->cnt[i] - e->mcnt[i];
		type = 2;
	}
	*itr->shead |= (uint64_t)type<<62;
	itr->p = itr->shead + e->offset0[type];
	itr->stail = rld_get_stail(e, itr);
	itr->q = (uint8_t*)itr->p;
	itr->r = 64;
	for (i = 0; i <= e->asize; ++i) e->mcnt[i] = e->cnt[i];
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %rax
movq 0x28(%rsi), %rcx
subq (%rcx), %rax
cmpq $0x3fffff0, %rax        # imm = 0x3FFFFF0
jne 0x8dc2
movslq 0xc(%rbx), %rax
leaq 0x1(%rax), %rcx
movl %ecx, 0xc(%rbx)
movq 0x18(%rbx), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x21d0
movq %rax, 0x18(%rbx)
movslq 0xc(%rbx), %rcx
leaq (%rax,%rcx,8), %r15
addq $-0x8, %r15
movq %r15, 0x28(%r14)
movl $0x800000, %edi         # imm = 0x800000
movl $0x8, %esi
callq 0x2130
movq %rax, (%r15)
movq %rax, 0x18(%r14)
jmp 0x8dce
movslq 0x8(%rbx), %rax
shlq $0x3, %rax
addq %rax, 0x18(%r14)
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
movq (%rax), %rdi
subq (%rcx), %rdi
cmpq $0x3fff, %rdi           # imm = 0x3FFF
ja 0x8e0b
movq 0x18(%r14), %rsi
movzbl (%rbx), %edi
incq %rdi
xorl %edx, %edx
xorl %r8d, %r8d
movl (%rax,%r8,8), %r9d
subl (%rcx,%r8,8), %r9d
movw %r9w, (%rsi,%r8,2)
incq %r8
cmpq %r8, %rdi
jne 0x8df4
jmp 0x8e56
movq 0x18(%r14), %rdx
movzbl (%rbx), %esi
incq %rsi
cmpq $0x40000000, %rdi       # imm = 0x40000000
jae 0x8e3b
xorl %edi, %edi
movl (%rax,%rdi,8), %r8d
subl (%rcx,%rdi,8), %r8d
movl %r8d, (%rdx,%rdi,4)
incq %rdi
cmpq %rdi, %rsi
jne 0x8e20
movl $0x1, %edx
jmp 0x8e56
xorl %edi, %edi
movq (%rax,%rdi,8), %r8
subq (%rcx,%rdi,8), %r8
movq %r8, (%rdx,%rdi,8)
incq %rdi
cmpq %rdi, %rsi
jne 0x8e3d
movl $0x2, %edx
movq %rdx, %rsi
shlq $0x3e, %rsi
movq 0x18(%r14), %rdi
orq %rsi, (%rdi)
movsbq 0x5(%rbx,%rdx), %rdx
leaq (%rdi,%rdx,8), %rdx
movq %rdx, 0x10(%r14)
movslq 0x8(%rbx), %rsi
leaq (%rdi,%rsi,8), %rsi
movq 0x28(%r14), %rdi
movq %rsi, %r8
subq (%rdi), %r8
xorl %edi, %edi
cmpq $0x4000000, %r8         # imm = 0x4000000
setne %dil
shll $0x3, %edi
orq $-0x10, %rdi
addq %rsi, %rdi
movq %rdi, 0x20(%r14)
movq %rdx, 0x30(%r14)
movl $0x40, (%r14)
movzbl (%rbx), %edx
incq %rdx
xorl %esi, %esi
movq (%rax,%rsi,8), %rdi
movq %rdi, (%rcx,%rsi,8)
incq %rsi
cmpq %rsi, %rdx
jne 0x8eb2
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi-lite/rld0.c
// Function: rld_dump
int rld_dump(const rld_t *e, const char *fn)
{
	uint64_t k = 0;
	int i;
	uint32_t a;
	FILE *fp;
	fp = strcmp(fn, "-")? fopen(fn, "wb") : fdopen(fileno(stdout), "wb");
	if (fp == 0) return -1;
	a = e->asize<<16 | e->sbits;
	fwrite("RLD\3", 1, 4, fp); // write magic
	fwrite(&a, 4, 1, fp); // write sbits and asize
	fwrite(&k, 8, 1, fp); // preserve 8 bytes for future uses
	fwrite(&e->n_bytes, 8, 1, fp); // n_bytes can always be divided by 8
	fwrite(&e->n_frames, 8, 1, fp); // number of frames
	fwrite(e->mcnt + 1, 8, e->asize, fp); // write the marginal counts
	for (i = 0, k = e->n_bytes / 8; i < e->n - 1; ++i, k -= RLD_LSIZE)
		fwrite(e->z[i], 8, RLD_LSIZE, fp);
	fwrite(e->z[i], 8, k, fp);
	fwrite(e->frame, 8 * e->asize1, e->n_frames, fp);
	fclose(fp);
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq $0x0, (%rsp)
leaq 0xe55a(%rip), %rsi      # 0x17444
movq %r14, %rdi
callq 0x2140
testl %eax, %eax
je 0x8f07
leaq 0xe867(%rip), %rsi      # 0x17764
movq %r14, %rdi
callq 0x2240
jmp 0x8f24
movq 0x140b2(%rip), %rax     # 0x1cfc0
movq (%rax), %rdi
callq 0x2190
leaq 0xe847(%rip), %rsi      # 0x17764
movl %eax, %edi
callq 0x21e0
movq %rax, %r14
testq %rax, %rax
je 0x9011
movzbl (%rbx), %eax
shll $0x10, %eax
movsbl 0x3(%rbx), %ecx
orl %eax, %ecx
leaq 0xc(%rsp), %r15
movl %ecx, (%r15)
leaq 0xe81c(%rip), %rdi      # 0x17767
movl $0x1, %esi
movl $0x4, %edx
movq %r14, %rcx
callq 0x2270
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %r14, %rcx
callq 0x2270
movq %rsp, %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x2270
leaq 0x10(%rbx), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x2270
leaq 0x30(%rbx), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x2270
movq 0x28(%rbx), %rdi
addq $0x8, %rdi
movzbl (%rbx), %edx
movl $0x8, %esi
movq %r14, %rcx
callq 0x2270
movq 0x10(%rbx), %r12
shrq $0x3, %r12
xorl %r15d, %r15d
cmpl $0x2, 0xc(%rbx)
jl 0x9019
xorl %r13d, %r13d
movq 0x18(%rbx), %rax
movq (%rax,%r13,8), %rdi
movl $0x8, %esi
movl $0x800000, %edx         # imm = 0x800000
movq %r14, %rcx
callq 0x2270
incq %r13
addq $-0x800000, %r12        # imm = 0xFF800000
movslq 0xc(%rbx), %rax
decq %rax
cmpq %rax, %r13
jl 0x8fdf
jmp 0x901c
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x9057
xorl %r13d, %r13d
movq %r12, (%rsp)
movq 0x18(%rbx), %rax
movq (%rax,%r13,8), %rdi
movl $0x8, %esi
movq %r12, %rdx
movq %r14, %rcx
callq 0x2270
movq 0x30(%rbx), %rdx
movq 0x38(%rbx), %rdi
movzbl 0x1(%rbx), %esi
shll $0x3, %esi
movq %r14, %rcx
callq 0x2270
movq %r14, %rdi
callq 0x2090
movl %r15d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi-lite/rld0.c
// Function: rld_restore_header
static rld_t *rld_restore_header(const char *fn, FILE **_fp)
{
	FILE *fp;
	rld_t *e;
	char magic[4];
	uint64_t a[3];
	int32_t i, x;

	if (strcmp(fn, "-") == 0) *_fp = fp = stdin;
	else if ((*_fp = fp = fopen(fn, "rb")) == 0) return 0;
	fread(magic, 1, 4, fp);
	if (strncmp(magic, "RLD\3", 4)) return 0;
	fread(&x, 4, 1, fp);
	e = rld_init(x>>16, x&0xffff);
	fread(a, 8, 3, fp);
	e->n_bytes = a[1]; e->n_frames = a[2];
	fread(e->mcnt + 1, 8, e->asize, fp);
	for (i = 0; i <= e->asize; ++i) e->cnt[i] = e->mcnt[i];
	for (i = 1; i <= e->asize; ++i) e->cnt[i] += e->cnt[i - 1];
	e->mcnt[0] = e->cnt[e->asize];
	return e;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xe080(%rip), %rsi      # 0x17444
callq 0x2140
testl %eax, %eax
je 0x93e9
leaq 0xe398(%rip), %rsi      # 0x1776c
movq %r14, %rdi
callq 0x2240
movq %rax, %r14
movq %rax, (%rbx)
testq %rax, %rax
jne 0x93f6
jmp 0x9418
movq 0x13bd8(%rip), %rax     # 0x1cfc8
movq (%rax), %r14
movq %r14, (%rbx)
leaq 0xc(%rsp), %rbx
movl $0x1, %esi
movl $0x4, %edx
movq %rbx, %rdi
movq %r14, %rcx
callq 0x2060
cmpl $0x3444c52, (%rbx)      # imm = 0x3444C52
je 0x941f
xorl %ebx, %ebx
jmp 0x94d6
leaq 0x8(%rsp), %rbx
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rcx
callq 0x2060
movl (%rbx), %edi
movzwl %di, %esi
sarl $0x10, %edi
callq 0x84a4
movq %rax, %rbx
leaq 0x10(%rsp), %r15
movl $0x8, %esi
movl $0x3, %edx
movq %r15, %rdi
movq %r14, %rcx
callq 0x2060
movq 0x8(%r15), %rax
movq %rax, 0x10(%rbx)
movq 0x10(%r15), %rax
movq %rax, 0x30(%rbx)
movq 0x28(%rbx), %r12
leaq 0x8(%r12), %rdi
movzbl (%rbx), %r15d
movl $0x8, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2060
movq 0x20(%rbx), %rax
leaq 0x1(%r15), %rcx
xorl %edx, %edx
movq (%r12,%rdx,8), %rsi
movq %rsi, (%rax,%rdx,8)
incq %rdx
cmpq %rdx, %rcx
jne 0x949a
testq %r15, %r15
je 0x94ca
movq 0x20(%rbx), %rax
movq (%rax), %rcx
xorl %edx, %edx
addq 0x8(%rax,%rdx,8), %rcx
movq %rcx, 0x8(%rax,%rdx,8)
incq %rdx
cmpq %rdx, %r15
jne 0x94b8
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rax
movq %rax, (%r12)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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:
cmpq $-0x1, %rsi
je 0x9738
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movzbl 0x1(%rdi), %eax
leal 0xf(,%rax,8), %eax
andl $-0x10, %eax
movq %rsp, %r14
subq %rax, %r14
movq %r14, %rsp
movq %r14, %rdx
callq 0x973b
movslq %ebx, %rax
movq (%r14,%rax,8), %rax
leaq -0x10(%rbp), %rsp
popq %rbx
popq %r14
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
testq %rsi, %rsi
je 0x9858
movq %rsi, %r14
leaq -0x1(%rsi), %rdx
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
movq %r15, %rsi
movq %rbx, %rcx
movq %r12, %r8
callq 0x9882
movl (%r15), %eax
movq (%r12), %rsi
movq 0x10(%r15), %rdi
movabsq $0x333333335555779b, %r8 # imm = 0x333333335555779B
movq (%rdi), %r15
cmpl $0x40, %eax
je 0x979b
movq 0x8(%rdi), %rdx
movl %eax, %ecx
shrdq %cl, %r15, %rdx
movq %rdx, %r15
testq %r15, %r15
js 0x9801
movq %r15, %rcx
shrq $0x39, %rcx
andb $0x3c, %cl
movq %r8, %rdx
shrq %cl, %rdx
movl %edx, %r10d
andl $0xf, %r10d
movl %r10d, %ecx
negb %cl
movq %r15, %r11
shrq %cl, %r11
andb $0xf, %dl
movq %r15, %r12
movl %edx, %ecx
shlq %cl, %r12
leal -0x1(%r11), %edx
movb $0x41, %cl
subb %r11b, %cl
shrq %cl, %r12
movl $0x1, %r9d
movl %edx, %ecx
shll %cl, %r9d
orq %r12, %r9
leal (%r11,%r10), %ecx
decl %ecx
shlq %cl, %r15
shrq $0x3d, %r15
subl %ecx, %eax
leal -0x3(%rax), %ecx
testl %ecx, %ecx
jle 0x981d
movl %ecx, %eax
jmp 0x9829
shrq $0x3c, %r15
andl $0x7, %r15d
movl $0x1, %r9d
cmpl $0x4, %eax
jg 0x9826
addq $0x8, %rdi
addl $0x3c, %eax
jmp 0x9829
addq $0x8, %rdi
addl $0x3d, %eax
jmp 0x9829
addl $-0x4, %eax
leaq (%rsi,%r9), %rdx
movl %r15d, %ecx
cmpq %r14, %rdx
jae 0x9841
addq %r9, (%rbx,%rcx,8)
movq %rdx, %rsi
jmp 0x9786
movq %rdi, 0x20(%rsp)
movl %eax, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
subq %rsi, %r14
addq %r14, (%rbx,%rcx,8)
jmp 0x9873
movzbl (%rdi), %edx
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testq %rdx, %rdx
je 0x9873
shll $0x3, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2100
movl %r15d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
testl %ecx, %ecx
sete %r12b
shll $0x3, %r12d
movq (%rsi,%r12), %rsi
movq 0x10(%r14), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %rcx
movq %rsp, %r8
callq 0x9a53
movq 0x20(%r15), %rax
addq %rbx, %r12
xorl %ecx, %ecx
movq 0x30(%rsp,%rcx), %rdx
movq (%rax,%rcx), %rsi
addq %rdx, %rsi
movq %rsi, (%r12,%rcx,4)
movq (%rsp,%rcx), %rsi
subq %rdx, %rsi
movq %rsi, (%rsp,%rcx)
movq %rsi, 0x10(%rbx,%rcx,4)
addq $0x8, %rcx
cmpq $0x30, %rcx
jne 0x9d68
movslq %ebp, %rax
movq (%r14,%rax,8), %rcx
movq %rcx, (%rbx,%rax,8)
addq (%rsp), %rcx
movq %rcx, 0x80(%rbx,%rax,8)
addq 0x20(%rsp), %rcx
movq %rcx, 0x60(%rbx,%rax,8)
addq 0x18(%rsp), %rcx
movq %rcx, 0x40(%rbx,%rax,8)
addq 0x10(%rsp), %rcx
movq %rcx, 0x20(%rbx,%rax,8)
addq 0x8(%rsp), %rcx
movq %rcx, 0xa0(%rbx,%rax,8)
xorl %eax, %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
xorl %r13d, %r13d
testl %ecx, %ecx
sete %r13b
shll $0x3, %r13d
movq (%rsi,%r13), %rsi
movq 0x10(%r14), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %r15
movq %rsp, %r12
movq %r15, %rcx
movq %r12, %r8
callq 0x9a53
movq (%r15), %rax
movq %rax, (%rbx,%r13)
movslq %ebp, %rcx
movq (%r14,%rcx,8), %rdx
movq %rdx, (%rbx,%rcx,8)
movq (%r12), %rcx
subq %rax, %rcx
movq %rcx, 0x10(%rbx)
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe0, %rsp
movq %r8, %rax
movq %rcx, %rbx
movq %rdx, %rcx
movl %esi, %r8d
movq (%rdx), %rdx
movslq %esi, %rsi
cmpq %rsi, %rdx
jbe 0xadba
movq %rdi, %r14
movq $0x0, (%rax)
movq 0x10(%rcx), %rcx
leal -0x1(%rdx), %r9d
subq $0x8, %rsp
xorl %r10d, %r10d
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
pushq %r10
pushq %rax
pushq %r10
callq 0xae17
addq $0x20, %rsp
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movq %rsp, %rsi
movaps %xmm1, 0x10(%rsi)
movaps %xmm0, (%rsi)
leaq 0x20(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x9d23
movq 0x10(%r15), %r12
testq %r12, %r12
je 0xadd9
movq %rsp, %rsi
movq 0x10(%rsi), %r13
leaq 0x20(%rsp), %r15
movaps (%r15), %xmm0
movaps 0x10(%r15), %xmm1
movaps %xmm0, (%rsi)
movaps %xmm1, 0x10(%rsi)
movq %r14, %rdi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x9d23
movq 0x10(%r15), %rcx
testq %rcx, %rcx
je 0xadf8
xorq %r12, %r13
xorq 0x10(%rsp), %rcx
xorl %eax, %eax
orq %r13, %rcx
setne %al
negl %eax
movaps 0x20(%rsp), %xmm0
movaps 0x30(%rsp), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
addq $0xe0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0xcaaf(%rip), %rdi      # 0x17870
leaq 0xcab9(%rip), %rsi      # 0x17881
leaq 0xcabb(%rip), %rcx      # 0x1788a
movl $0x80, %edx
callq 0x20e0
leaq 0xcb00(%rip), %rdi      # 0x178e0
leaq 0xca9a(%rip), %rsi      # 0x17881
leaq 0xca9c(%rip), %rcx      # 0x1788a
movl $0x83, %edx
callq 0x20e0
leaq 0xcae1(%rip), %rdi      # 0x178e0
leaq 0xca7b(%rip), %rsi      # 0x17881
leaq 0xca7d(%rip), %rcx      # 0x1788a
movl $0x86, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi-lite/unitig.c
// Function: copy_nei
static void copy_nei(ku128_v *dst, const rldintv_v *src)
{
	int i;
	for (i = 0; i < src->n; ++i) {
		ku128_t z;
		z.x = src->a[i].x[0]; z.y = src->a[i].info;
		kv_push(ku128_t, *dst, z);
	}
}

// Assembly:
cmpq $0x0, (%rsi)
je 0xc859
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
xorl %r13d, %r13d
movq 0x10(%rbx), %rax
movq (%rax,%r15), %rbp
movq 0x18(%rax,%r15), %r12
movq 0x8(%r14), %rax
cmpq %rax, (%r14)
jne 0xc824
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x8(%r14)
movq 0x10(%r14), %rdi
shlq $0x4, %rsi
callq 0x21d0
movq %rax, 0x10(%r14)
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r14)
shlq $0x4, %rax
movq %rbp, (%rcx,%rax)
movq %r12, 0x8(%rcx,%rax)
incq %r13
addq $0x20, %r15
cmpq %r13, (%rbx)
ja 0xc7e9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi-lite/mag.c
// Function: mag_g_build_hash
void mag_g_build_hash(mag_t *g)
{
	long i;
	int j, ret;
	hash64_t *h;
	h = kh_init(64);
	for (i = 0; i < g->v.n; ++i) {
		const magv_t *p = &g->v.a[i];
		for (j = 0; j < 2; ++j) {
			khint_t k = kh_put(64, h, p->k[j], &ret);
			if (ret == 0) {
				if (fm_verbose >= 2)
					fprintf(stderr, "[W::%s] terminal %ld is duplicated.\n", __func__, (long)p->k[j]);
				kh_val(h, k) = (uint64_t)-1;
			} else kh_val(h, k) = i<<1|j;
		}
	}
	g->h = h;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r15
movl $0x1, %edi
movl $0x28, %esi
callq 0x2130
movq %rax, %r14
cmpq $0x0, (%r15)
je 0xeb42
movl $0x10, %eax
xorl %ebx, %ebx
xorl %ecx, %ecx
movq %r15, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
movq 0x10(%r15), %r12
movq %rax, 0x20(%rsp)
addq %rax, %r12
xorl %r13d, %r13d
movq (%r12), %rsi
movq %r14, %rdi
leaq 0xc(%rsp), %rdx
callq 0xcba8
movl %eax, %ebp
cmpl $0x0, 0xc(%rsp)
je 0xeaec
leaq (%rbx,%r13), %r15
jmp 0xeafc
movq $-0x1, %r15
cmpl $0x2, 0xe776(%rip)      # 0x1d270
jge 0xeb15
movq 0x20(%r14), %rax
movl %ebp, %ecx
movq %r15, (%rax,%rcx,8)
incq %r13
addq $0x8, %r12
cmpq $0x1, %r13
je 0xeacc
jmp 0xeb1f
movq %r12, %rdi
callq 0x23f9
jmp 0xeafc
movq 0x18(%rsp), %rcx
incq %rcx
movq 0x20(%rsp), %rax
addq $0x68, %rax
addq $0x2, %rbx
movq 0x10(%rsp), %r15
cmpq (%r15), %rcx
jb 0xeab8
movq %r14, 0x20(%r15)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi-lite/mag.c
// Function: mag_g_amend
void mag_g_amend(mag_t *g)
{
	int i, j, l, ll;
	for (i = 0; i < g->v.n; ++i) {
		magv_t *p = &g->v.a[i];
		ku128_v *r;
		for (j = 0; j < 2; ++j) {
			for (l = 0; l < p->nei[j].n; ++l) {
				khint_t k;
				uint64_t z, x = p->nei[j].a[l].x;
				k = kh_get(64, g->h, x);
				if (k == kh_end((hash64_t*)g->h)) { // neighbor is not in the hash table; likely due to tip removal
					edge_mark_del(p->nei[j].a[l]);
					continue;
				} else z = kh_val((hash64_t*)g->h, k);
				r = &g->v.a[z>>1].nei[z&1];
				for (ll = 0, z = p->k[j]; ll < r->n; ++ll)
					if (r->a[ll].x == z) break;
				if (ll == r->n) // not in neighbor's neighor
					edge_mark_del(p->nei[j].a[l]);
			}
			v128_rmdup(&p->nei[j]);
		}
	}
}

// Assembly:
cmpq $0x0, (%rdi)
je 0xecda
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
xorl %ecx, %ecx
movq %rdi, (%rsp)
movq 0x10(%rdi), %rax
movq %rcx, 0x10(%rsp)
imulq $0x68, %rcx, %rcx
leaq (%rax,%rcx), %rdx
movq %rdx, 0x20(%rsp)
addq %rcx, %rax
addq $0x20, %rax
movq %rax, 0x18(%rsp)
xorl %r12d, %r12d
leaq (%r12,%r12,2), %rax
movq 0x18(%rsp), %rcx
leaq (%rcx,%rax,8), %rax
movq %rax, 0x8(%rsp)
movq (%rax), %rbp
testq %rbp, %rbp
je 0xec9c
movq 0x8(%rsp), %rax
movq 0x10(%rax), %r14
movq (%rsp), %rax
movq 0x20(%rax), %r15
xorl %r13d, %r13d
movq %r13, %rbx
shlq $0x4, %rbx
movq (%r14,%rbx), %rsi
movq %r15, %rdi
callq 0xc8d4
cmpl (%r15), %eax
je 0xec7c
movq 0x20(%r15), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %rax
movq %rax, %rcx
shrq %rcx
imulq $0x68, %rcx, %rcx
movq (%rsp), %rdx
addq 0x10(%rdx), %rcx
andl $0x1, %eax
leaq (%rax,%rax,2), %rdx
movq 0x20(%rcx,%rdx,8), %rax
testq %rax, %rax
je 0xec75
leaq (%rcx,%rdx,8), %rcx
addq $0x20, %rcx
movq 0x20(%rsp), %rdx
movq 0x10(%rdx,%r12,8), %rdx
movq 0x10(%rcx), %rsi
xorl %ecx, %ecx
cmpq %rdx, (%rsi)
je 0xec77
incq %rcx
addq $0x10, %rsi
cmpq %rcx, %rax
jne 0xec5f
movq %rax, %rcx
jmp 0xec77
xorl %ecx, %ecx
cmpq %rcx, %rax
jne 0xec90
leaq (%r14,%rbx), %rax
movq $-0x2, (%rax)
movq $0x0, 0x8(%r14,%rbx)
incq %r13
cmpq %rbp, %r13
jne 0xec02
movq 0x8(%rsp), %rdi
callq 0xecdb
leaq 0x1(%r12), %rax
testq %r12, %r12
movq %rax, %r12
je 0xebd0
movq 0x10(%rsp), %rcx
incq %rcx
movq (%rsp), %rdi
cmpq %rcx, (%rdi)
ja 0xebab
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq