LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x5274
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 0x523c
movl %edx, %r9d
popq %rbx
jmp 0x527d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
xorl %esi, %esi
cmpl %esi, %ecx
movl %esi, %edx
cmovgl %ecx, %edx
testl %edx, %edx
jle 0x52a1
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_O3/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 0x76c9
movq %rdi, %r14
movslq %edx, %r15
movq 0x20(%rdi), %rax
cmpl $0x0, (%rax,%r15,4)
jle 0x76cd
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 0x1498f
testl %eax, %eax
jns 0x76b3
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 0x7670
jmp 0x76cf
xorl %ebp, %ebp
jmp 0x76d3
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_O3/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 0x7988
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 0x15124
movq %rax, (%r14,%r12,8)
incq %r12
cmpq $0x7, %r12
jne 0x7966
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xfc61(%rip), %rdi      # 0x175f0
leaq 0xfc83(%rip), %rsi      # 0x17619
leaq 0xfc84(%rip), %rcx      # 0x17621
movl $0x12, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/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 0x7a06
xorl %ecx, %ecx
testb %bpl, %bpl
movl $0x0, %r13d
cmoveq %rax, %r13
movb (%r14), %dl
testb %dl, %dl
je 0x7b3d
movq %rsp, %r12
movl %ecx, %r15d
movq 0x8(%rbx,%r15,8), %rdi
cmpq %rax, %r13
jne 0x7a7d
movzbl %dl, %edx
movl $0x1, %ecx
movq %r13, %rsi
xorl %r8d, %r8d
callq 0x152ba
movb (%r14), %cl
testq %r15, %r15
je 0x7a75
movzbl %cl, %edx
incq %r15
movq -0x8(%rbx,%r15,8), %rsi
addq 0x8(%rsi,%rdx,8), %rax
decq %r15
cmpq $0x1, %r15
ja 0x7a62
movq %rax, %r13
jmp 0x7b29
movq %r13, %rsi
movq %rax, %rdx
leaq 0x30(%rsp), %rcx
movq %r12, %r8
callq 0x1595c
movzbl (%r14), %edx
cmpb $0x2, %bpl
jne 0x7ac5
cmpl $0x5, %edx
je 0x7aca
cmpb $0x3, %dl
ja 0x7aba
movl $0x4, %eax
addq (%rsp,%rax,8), %r13
subq 0x30(%rsp,%rax,8), %r13
decq %rax
cmpq %rdx, %rax
ja 0x7aa9
addq (%rsp), %r13
subq 0x30(%rsp), %r13
jmp 0x7add
testq %rdx, %rdx
je 0x7add
xorl %eax, %eax
addq (%rsp,%rax,8), %r13
subq 0x30(%rsp,%rax,8), %r13
incq %rax
cmpq %rax, %rdx
jne 0x7acc
movq 0x8(%rbx,%r15,8), %rdi
movl $0x1, %ecx
movq %r13, %rsi
xorl %r8d, %r8d
callq 0x152ba
movb (%r14), %cl
movzbl %cl, %edx
movl $0x0, %eax
testq %r15, %r15
je 0x7b1a
incq %r15
xorl %eax, %eax
movq -0x8(%rbx,%r15,8), %rsi
addq 0x8(%rsi,%rdx,8), %rax
decq %r15
cmpq $0x1, %r15
jg 0x7b07
shll $0x3, %edx
movq 0x30(%rsp,%rdx), %r13
addq %rax, %r13
addq (%rsp,%rdx), %rax
movzbl %cl, %ecx
movb 0x1(%r14), %dl
incq %r14
testb %dl, %dl
jne 0x7a34
movl %ecx, %ecx
movq 0x8(%rbx,%rcx,8), %rdi
movl $0x1, %ecx
movq %r13, %rsi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x152ba
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x7df4
xorl %r14d, %r14d
jmp 0x7e67
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, %rdi
callq 0x15bc9
testq %rax, %rax
jne 0x7e5c
xorl %r14d, %r14d
cmpl $0x0, 0xc(%rbx)
movl 0x8(%rbx), %eax
je 0x7e33
cltq
movq (%rbx), %rcx
movq 0x8(%rcx,%rax,8), %rdi
callq 0x15257
movq (%rbx), %rcx
movslq 0x8(%rbx), %rax
movq $0x0, 0x8(%rcx,%rax,8)
incl %eax
movl %eax, 0x8(%rbx)
cmpl $0x6, %eax
je 0x7e67
movq (%rbx), %rcx
cltq
movq 0x8(%rcx,%rax,8), %rdi
movq %r15, %rsi
callq 0x15b76
movq %r15, %rdi
callq 0x15bc9
testq %rax, %rax
je 0x7e0b
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_O3/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 0x8842
movq %r14, %rdi
movq %r15, %rsi
callq 0x20d0
jmp 0x8829
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0x8864
movq 0x10(%rbx), %rax
movslq 0x18(%rbx), %rcx
movq 0x8(%rax,%rcx,8), %rdi
movq 0x28(%rbx), %rdx
movl 0x1c(%rbx), %ecx
callq 0x8476
movq (%rbx), %rax
lock
incl (%rax)
cmpl $0x0, 0xc(%rbx)
je 0x8829
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 0x21a0
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 0x8924
movslq %r14d, %rax
cmpl $0x10000, %r14d         # imm = 0x10000
jae 0x8928
cmpl $0x100, %r14d           # imm = 0x100
jae 0x8943
leaq 0xeec1(%rip), %rcx      # 0x177e0
movb (%rax,%rcx), %al
jmp 0x8965
movb $0x3f, %al
jmp 0x8965
cmpl $0x1000000, %r14d       # imm = 0x1000000
jae 0x8955
shrq $0x10, %rax
leaq 0xeea4(%rip), %rcx      # 0x177e0
movb (%rax,%rcx), %al
addb $0x10, %al
jmp 0x8965
shrq $0x8, %rax
leaq 0xee92(%rip), %rcx      # 0x177e0
movb (%rax,%rcx), %al
addb $0x8, %al
jmp 0x8965
shrq $0x18, %rax
leaq 0xee80(%rip), %rcx      # 0x177e0
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_O3/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 0x89e9
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x48(%rdi)
je 0x89ea
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 0x21e0
jmp 0x8a15
retq
cmpl $0x0, 0xc(%rbx)
jle 0x8a0c
xorl %r14d, %r14d
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2040
incq %r14
movslq 0xc(%rbx), %rax
cmpq %rax, %r14
jl 0x89f3
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_O3/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 0x8afb
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 0x8ae0
addq %r14, %rdx
movq %rdx, 0x8(%rbx)
jmp 0x8af7
testq %rdx, %rdx
je 0x8af0
movzbl %al, %ecx
movq %rbx, %rsi
callq 0x8afe
movq %r14, 0x8(%rbx)
movl %ebp, 0x4(%rbx)
popq %rbx
popq %r14
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %eax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rdx, %rcx
shrq $0x20, %rcx
jne 0x8b3f
cmpq $0x10000, %rbx          # imm = 0x10000
jae 0x8b61
cmpq $0x100, %rbx            # imm = 0x100
jae 0x8b9a
leaq 0xecaa(%rip), %rcx      # 0x177e0
movsbl (%rbx,%rcx), %ecx
jmp 0x8be6
movq %rbx, %rdx
shrq $0x30, %rdx
jne 0x8b81
movq %rbx, %rdx
shrq $0x28, %rdx
jne 0x8bb1
leaq 0xec88(%rip), %rdx      # 0x177e0
movsbl (%rcx,%rdx), %ecx
jmp 0x8be3
movq %rbx, %rcx
cmpq $0x1000000, %rbx        # imm = 0x1000000
jae 0x8bc1
shrq $0x10, %rcx
leaq 0xec68(%rip), %rdx      # 0x177e0
movsbl (%rcx,%rdx), %ecx
addl $0x10, %ecx
jmp 0x8be6
movq %rbx, %rcx
shrq $0x38, %rcx
jne 0x8bd5
leaq 0xec4f(%rip), %rcx      # 0x177e0
movsbl (%rdx,%rcx), %ecx
addl $0x10, %ecx
jmp 0x8be3
movq %rbx, %rcx
shrq $0x8, %rcx
leaq 0xec38(%rip), %rdx      # 0x177e0
movsbl (%rcx,%rdx), %ecx
addl $0x8, %ecx
jmp 0x8be6
leaq 0xec28(%rip), %rcx      # 0x177e0
movsbl (%rdx,%rcx), %ecx
addl $0x8, %ecx
jmp 0x8be3
shrq $0x18, %rcx
leaq 0xec14(%rip), %rdx      # 0x177e0
movsbl (%rcx,%rdx), %ecx
addl $0x18, %ecx
jmp 0x8be6
leaq 0xec04(%rip), %rdx      # 0x177e0
movsbl (%rcx,%rdx), %ecx
addl $0x18, %ecx
addl $0x20, %ecx
leal 0x1(%rcx), %edx
cmpl $0x10000, %edx          # imm = 0x10000
jae 0x8c00
movl %edx, %esi
leaq 0xebe6(%rip), %rdi      # 0x177e0
movsbl (%rsi,%rdi), %esi
jmp 0x8c13
movl %edx, %esi
shrl $0x18, %esi
leaq 0xebd4(%rip), %rdi      # 0x177e0
movsbl (%rsi,%rdi), %esi
addl $0x18, %esi
leal (%rdx,%rsi,2), %ebp
movslq %edx, %r12
shlq %cl, %r12
movq %rbx, %rdx
btcq %rcx, %rdx
orq %rdx, %r12
movsbl 0x2(%r14), %ecx
shlq %cl, %r12
movzbl %al, %r13d
addl %ecx, %ebp
movl (%r15), %eax
cmpl %eax, %ebp
jl 0x8c53
movq 0x10(%r15), %rcx
cmpq 0x20(%r15), %rcx
jne 0x8c53
movq %r14, %rdi
movq %r15, %rsi
callq 0x90e9
movl (%r15), %eax
orq %r13, %r12
movl %ebp, %ecx
movq 0x10(%r15), %rdx
subl %eax, %ecx
jle 0x8c83
movq %r12, %rax
shrq %cl, %rax
leaq 0x8(%rdx), %rsi
movq %rsi, 0x10(%r15)
orq %rax, (%rdx)
movl $0x40, %eax
subl %ecx, %eax
negl %ecx
shlq %cl, %r12
movq %r12, 0x8(%rdx)
jmp 0x8c8d
subl %ebp, %eax
movl %eax, %ecx
shlq %cl, %r12
orq %r12, (%rdx)
movl %eax, (%r15)
movq 0x20(%r14), %rax
addq %rbx, (%rax)
addq %rbx, 0x8(%rax,%r13,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]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 0x9083
movzbl 0x4(%r14), %ecx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8afe
movq %rbx, %rdi
movq %r14, %rsi
callq 0x90e9
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 0x90d5
movq (%rax), %rdx
xorl %esi, %esi
addq 0x8(%rax,%rsi,8), %rdx
movq %rdx, 0x8(%rax,%rsi,8)
incq %rsi
cmpq %rsi, %rcx
jne 0x90c3
movq %rbx, %rdi
callq 0x8cab
movq 0x10(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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, %rbx
movq %rdi, %r14
movq 0x20(%rsi), %rax
movq 0x28(%rsi), %r15
subq (%r15), %rax
cmpq $0x3fffff0, %rax        # imm = 0x3FFFFF0
jne 0x914c
movslq 0xc(%r14), %rax
leaq 0x1(%rax), %rcx
movl %ecx, 0xc(%r14)
movq 0x18(%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x21c0
movq %rax, 0x18(%r14)
movslq 0xc(%r14), %rcx
leaq (%rax,%rcx,8), %r15
addq $-0x8, %r15
movq %r15, 0x28(%rbx)
movl $0x800000, %edi         # imm = 0x800000
movl $0x8, %esi
callq 0x2130
movq %rax, (%r15)
jmp 0x9158
movslq 0x8(%r14), %rax
shlq $0x3, %rax
addq 0x18(%rbx), %rax
movq %rax, 0x18(%rbx)
movq 0x20(%r14), %rcx
movq 0x28(%r14), %rdx
movq (%rcx), %rdi
subq (%rdx), %rdi
cmpq $0x3fff, %rdi           # imm = 0x3FFF
ja 0x9197
movzbl (%r14), %esi
leaq 0x1(%rsi), %r8
xorl %edi, %edi
xorl %r9d, %r9d
movl (%rcx,%r9,8), %r10d
subl (%rdx,%r9,8), %r10d
movw %r10w, (%rax,%r9,2)
incq %r9
cmpq %r9, %r8
jne 0x9180
jmp 0x91e6
movzbl (%r14), %esi
cmpq $0x40000000, %rdi       # imm = 0x40000000
jae 0x91c6
leaq 0x1(%rsi), %rdi
xorl %r8d, %r8d
movl (%rcx,%r8,8), %r9d
subl (%rdx,%r8,8), %r9d
movl %r9d, (%rax,%r8,4)
incq %r8
cmpq %r8, %rdi
jne 0x91ab
movl $0x1, %edi
jmp 0x91e6
leaq 0x1(%rsi), %rdi
xorl %r8d, %r8d
movq (%rcx,%r8,8), %r9
subq (%rdx,%r8,8), %r9
movq %r9, (%rax,%r8,8)
incq %r8
cmpq %r8, %rdi
jne 0x91cd
movl $0x2, %edi
movq %rdi, %r8
shlq $0x3e, %r8
orq %r8, (%rax)
movsbq 0x5(%r14,%rdi), %rdi
leaq (%rax,%rdi,8), %rdi
movq %rdi, 0x10(%rbx)
movslq 0x8(%r14), %r8
leaq (%rax,%r8,8), %rax
movq %rax, %r8
subq (%r15), %r8
xorl %r9d, %r9d
cmpq $0x4000000, %r8         # imm = 0x4000000
setne %r9b
shll $0x3, %r9d
orq $-0x10, %r9
addq %rax, %r9
movq %r9, 0x20(%rbx)
movq %rdi, 0x30(%rbx)
movl $0x40, (%rbx)
incq %rsi
xorl %eax, %eax
movq (%rcx,%rax,8), %rdi
movq %rdi, (%rdx,%rax,8)
incq %rax
cmpq %rax, %rsi
jne 0x9238
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rdi, %rbx
movq $0x0, (%rsp)
cmpb $0x2d, (%rsi)
jne 0x9275
cmpb $0x0, 0x1(%rsi)
je 0x93c7
leaq 0xe54d(%rip), %rax      # 0x177c9
movq %rsi, %rdi
movq %rax, %rsi
callq 0x2230
movq %rax, %r14
testq %rax, %rax
je 0x9374
movzbl (%rbx), %eax
shll $0x10, %eax
movsbl 0x3(%rbx), %ecx
orl %eax, %ecx
leaq 0xc(%rsp), %r15
movl %ecx, (%r15)
leaq 0xe51e(%rip), %rdi      # 0x177cc
movl $0x1, %esi
movl $0x4, %edx
movq %r14, %rcx
callq 0x2260
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %r14, %rcx
callq 0x2260
movq %rsp, %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x2260
leaq 0x10(%rbx), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x2260
leaq 0x30(%rbx), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x2260
movq 0x28(%rbx), %rdi
addq $0x8, %rdi
movzbl (%rbx), %edx
movl $0x8, %esi
movq %r14, %rcx
callq 0x2260
movq 0x10(%rbx), %r12
shrq $0x3, %r12
xorl %r15d, %r15d
cmpl $0x2, 0xc(%rbx)
jl 0x937c
xorl %r13d, %r13d
movq 0x18(%rbx), %rax
movq (%rax,%r13,8), %rdi
movl $0x8, %esi
movl $0x800000, %edx         # imm = 0x800000
movq %r14, %rcx
callq 0x2260
incq %r13
addq $-0x800000, %r12        # imm = 0xFF800000
movslq 0xc(%rbx), %rax
decq %rax
cmpq %rax, %r13
jl 0x9342
jmp 0x937f
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x93b6
xorl %r13d, %r13d
movq 0x18(%rbx), %rax
movq (%rax,%r13,8), %rdi
movl $0x8, %esi
movq %r12, %rdx
movq %r14, %rcx
callq 0x2260
movq 0x30(%rbx), %rdx
movq 0x38(%rbx), %rdi
movzbl 0x1(%rbx), %esi
shll $0x3, %esi
movq %r14, %rcx
callq 0x2260
movq %r14, %rdi
callq 0x2090
movl %r15d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x13bf2(%rip), %rax     # 0x1cfc0
movq (%rax), %rdi
callq 0x2180
leaq 0xe3ec(%rip), %rsi      # 0x177c9
movl %eax, %edi
callq 0x21d0
jmp 0x9287
// File: /workspace/github_c_makefile_star2_O3/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
cmpb $0x2d, (%rdi)
jne 0x975b
cmpb $0x0, 0x1(%rdi)
je 0x9774
leaq 0xe06f(%rip), %rsi      # 0x177d1
callq 0x2230
movq %rax, %r14
movq %rax, (%rbx)
testq %rax, %rax
jne 0x9781
jmp 0x97a3
movq 0x1384d(%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 0x97aa
xorl %ebx, %ebx
jmp 0x9859
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 0x8880
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 0x9825
testq %r15, %r15
je 0x9851
movq (%rax), %rcx
xorl %edx, %edx
addq 0x8(%rax,%rdx,8), %rcx
movq %rcx, 0x8(%rax,%rdx,8)
incq %rdx
cmpq %rdx, %r15
jne 0x983f
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_O3/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 0x9b62
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 0x9b65
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_O3/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 0x9ca1
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 0x9ccb
movl (%r15), %eax
movq 0x10(%r15), %rsi
movq (%r12), %r8
movabsq $0x333333335555779b, %rdi # imm = 0x333333335555779B
movq (%rsi), %rdx
cmpl $0x40, %eax
jne 0x9bc6
testq %rdx, %rdx
js 0x9c43
movq %rdx, %r15
jmp 0x9bd9
movq 0x8(%rsi), %r15
movl %eax, %ecx
shrdq %cl, %rdx, %r15
testq %r15, %r15
js 0x9c5a
movq %r15, %rcx
shrq $0x39, %rcx
andb $0x3c, %cl
movq %rdi, %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 0x9c3a
movl %ecx, %eax
jmp 0x9c80
addq $0x8, %rsi
addl $0x3d, %eax
jmp 0x9c80
shrq $0x3c, %rdx
andl $0x7, %edx
movl $0x1, %r9d
movl $0x3c, %eax
movl %edx, %r15d
jmp 0x9c80
leaq 0x8(%rsi), %rcx
shrq $0x3c, %r15
andl $0x7, %r15d
xorl %edx, %edx
cmpl $0x5, %eax
cmovlq %rcx, %rsi
setl %dl
shll $0x6, %edx
addl %edx, %eax
addl $-0x4, %eax
movl $0x1, %r9d
leaq (%r8,%r9), %rdx
movl %r15d, %ecx
cmpq %r14, %rdx
jae 0x9c98
addq %r9, (%rbx,%rcx,8)
movq %rdx, %r8
jmp 0x9bb0
subq %r8, %r14
addq %r14, (%rbx,%rcx,8)
jmp 0x9cbc
movzbl (%rdi), %edx
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testq %rdx, %rdx
je 0x9cbc
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_O3/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 0xb2a1
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 0xb2fe
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 0xa1c6
movq 0x10(%r15), %r12
testq %r12, %r12
je 0xb2c0
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 0xa1c6
movq 0x10(%r15), %rcx
testq %rcx, %rcx
je 0xb2df
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 0xc638(%rip), %rdi      # 0x178e0
leaq 0xc642(%rip), %rsi      # 0x178f1
leaq 0xc644(%rip), %rcx      # 0x178fa
movl $0x80, %edx
callq 0x20e0
leaq 0xc689(%rip), %rdi      # 0x17950
leaq 0xc623(%rip), %rsi      # 0x178f1
leaq 0xc625(%rip), %rcx      # 0x178fa
movl $0x83, %edx
callq 0x20e0
leaq 0xc66a(%rip), %rdi      # 0x17950
leaq 0xc604(%rip), %rsi      # 0x178f1
leaq 0xc606(%rip), %rcx      # 0x178fa
movl $0x86, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/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 0xcd94
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rax
xorl %r15d, %r15d
xorl %r13d, %r13d
movq 0x10(%rbx), %rcx
movq (%rcx,%r15), %rbp
movq 0x18(%rcx,%r15), %r12
movq (%r14), %rcx
cmpq 0x8(%r14), %rcx
jne 0xcd66
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r14)
shlq $0x4, %rsi
movq %rax, %rdi
callq 0x21c0
movq %rax, 0x10(%r14)
movq (%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%r14)
shlq $0x4, %rcx
movq %rbp, (%rax,%rcx)
movq %r12, 0x8(%rax,%rcx)
incq %r13
addq $0x20, %r15
cmpq %r13, (%rbx)
ja 0xcd29
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/lh3[P]fermi-lite/mag.c
// Function: mag_v128_clean
static inline void v128_clean(ku128_v *r)
{
	int i, j;
	for (i = j = 0; i < r->n; ++i)
		if (!edge_is_del(r->a[i])) { // keep this arc
			if (j != i) r->a[j++] = r->a[i];
			else ++j;
		}
	r->n = j;
}

// Assembly:
movq (%rdi), %rdx
xorl %eax, %eax
testq %rdx, %rdx
je 0xefeb
xorl %ecx, %ecx
xorl %esi, %esi
movq 0x10(%rdi), %r8
cmpq $-0x2, (%r8,%rcx)
je 0xefdd
cmpq $0x0, 0x8(%r8,%rcx)
je 0xefdd
movl %eax, %r10d
leal 0x1(%rax), %r9d
cmpq %r10, %rsi
je 0xefda
leaq (%r8,%rcx), %rdx
cltq
shlq $0x4, %rax
movups (%rdx), %xmm0
movups %xmm0, (%r8,%rax)
movq (%rdi), %rdx
movl %r9d, %eax
incq %rsi
addq $0x10, %rcx
cmpq %rsi, %rdx
ja 0xefa6
cltq
movq %rax, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xf0b4
xorl %eax, %eax
movq %r15, 0x10(%rsp)
leaq (%rax,%rax), %rcx
movq %rcx, 0x20(%rsp)
movb $0x1, %bl
movq %rax, 0x18(%rsp)
imulq $0x68, %rax, %r12
addq 0x10(%r15), %r12
xorl %r15d, %r15d
movq 0x10(%r12,%r15,8), %rsi
movq %r14, %rdi
leaq 0xc(%rsp), %rdx
callq 0xd0dd
movl %eax, %ebp
cmpl $0x0, 0xc(%rsp)
je 0xf063
orq 0x20(%rsp), %r15
movq %r15, %r13
jmp 0xf073
movq $-0x1, %r13
cmpl $0x2, 0xe1ff(%rip)      # 0x1d270
jge 0xf08f
movq 0x20(%r14), %rax
movl %ebp, %ecx
movq %r13, (%rax,%rcx,8)
movl $0x1, %r15d
testb $0x1, %bl
movl $0x0, %ebx
jne 0xf03e
jmp 0xf09e
leaq (%r12,%r15,8), %rdi
addq $0x10, %rdi
callq 0x23e9
jmp 0xf073
movq 0x18(%rsp), %rax
incq %rax
movq 0x10(%rsp), %r15
cmpq (%r15), %rax
jb 0xf023
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_O3/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 0xf256
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
xorl %ecx, %ecx
movq %rdi, 0x8(%rsp)
movq 0x10(%rdi), %rax
movq %rcx, 0x20(%rsp)
imulq $0x68, %rcx, %rcx
leaq (%rax,%rcx), %rdx
movq %rdx, 0x30(%rsp)
addq %rcx, %rax
addq $0x20, %rax
movq %rax, 0x28(%rsp)
movb $0x1, %al
xorl %ebp, %ebp
movl %eax, 0x14(%rsp)
leaq (,%rbp,2), %rax
addq %rbp, %rax
movq 0x28(%rsp), %rcx
leaq (%rcx,%rax,8), %rax
movq %rax, 0x18(%rsp)
movq (%rax), %r12
testq %r12, %r12
je 0xf213
movq 0x18(%rsp), %rax
movq 0x10(%rax), %r14
movq 0x8(%rsp), %rax
movq 0x20(%rax), %r15
xorl %r13d, %r13d
movq %r13, %rbx
shlq $0x4, %rbx
movq (%r14,%rbx), %rsi
movq %r15, %rdi
callq 0xce10
cmpl (%r15), %eax
je 0xf1f3
movq 0x20(%r15), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %rax
movq %rax, %rcx
shrq %rcx
imulq $0x68, %rcx, %rcx
movq 0x8(%rsp), %rdx
addq 0x10(%rdx), %rcx
andl $0x1, %eax
leaq (%rax,%rax,2), %rdx
movq 0x20(%rcx,%rdx,8), %rax
testq %rax, %rax
je 0xf1f3
leaq (%rcx,%rdx,8), %rdx
addq $0x20, %rdx
movq 0x30(%rsp), %rcx
movq 0x10(%rcx,%rbp,8), %rcx
movq 0x10(%rdx), %rdx
cmpq %rcx, (%rdx)
je 0xf1ee
addq $0x10, %rdx
decq %rax
jne 0xf1de
jmp 0xf1f3
testq %rax, %rax
jne 0xf207
leaq (%r14,%rbx), %rax
movq $-0x2, (%rax)
movq $0x0, 0x8(%r14,%rbx)
incq %r13
cmpq %r12, %r13
jne 0xf182
movq 0x18(%rsp), %rdi
callq 0xf257
movl $0x1, %ebp
testb $0x1, 0x14(%rsp)
movl $0x0, %eax
jne 0xf144
movq 0x20(%rsp), %rcx
incq %rcx
movq 0x8(%rsp), %rdi
cmpq %rcx, (%rdi)
ja 0xf11e
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]fermi-lite/mag.c
// Function: v128_rmdup
static inline void v128_rmdup(ku128_v *r)
{
	int l, cnt;
	uint64_t x;
	if (r->n > 1) ks_introsort(128x, r->n, r->a);
	for (l = cnt = 0; l < r->n; ++l) // jump to the first node to be retained
		if (edge_is_del(r->a[l])) ++cnt;
		else break;
	if (l == r->n) { // no good arcs
		r->n = 0;
		return;
	}
	x = r->a[l].x;
	for (++l; l < r->n; ++l) { // mark duplicated node
		if (edge_is_del(r->a[l]) || r->a[l].x == x)
			edge_mark_del(r->a[l]), ++cnt;
		else x = r->a[l].x;
	}
	if (cnt) v128_clean(r);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
cmpq $0x2, %rdi
jb 0xf270
movq 0x10(%rbx), %rsi
callq 0xd80b
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xf29d
movq 0x10(%rbx), %rcx
addq $0x8, %rcx
xorl %eax, %eax
cmpq $-0x2, -0x8(%rcx)
je 0xf28c
cmpq $0x0, (%rcx)
jne 0xf29f
incq %rax
addq $0x10, %rcx
cmpq %rax, %rdi
jne 0xf27f
movq %rdi, %rax
jmp 0xf29f
xorl %eax, %eax
cmpq %rax, %rdi
jne 0xf2ab
xorl %eax, %eax
jmp 0xf35a
leal 0x1(%rax), %ecx
cmpq %rcx, %rdi
jbe 0xf307
movq 0x10(%rbx), %rsi
movq %rax, %rdx
shlq $0x4, %rdx
movq (%rsi,%rdx), %rdx
movq %rcx, %r8
shlq $0x4, %r8
addq %r8, %rsi
addq $0x8, %rsi
movq -0x8(%rsi), %r8
cmpq $-0x2, %r8
jne 0xf2ed
movq $-0x2, -0x8(%rsi)
movq $0x0, (%rsi)
incl %eax
jmp 0xf2fb
cmpq $0x0, (%rsi)
je 0xf2da
cmpq %rdx, %r8
je 0xf2da
movq %r8, %rdx
incq %rcx
addq $0x10, %rsi
cmpq %rcx, %rdi
ja 0xf2d0
testl %eax, %eax
je 0xf35d
xorl %eax, %eax
testq %rdi, %rdi
je 0xf35a
xorl %ecx, %ecx
xorl %edx, %edx
movq 0x10(%rbx), %rsi
cmpq $-0x2, (%rsi,%rcx)
je 0xf34c
cmpq $0x0, 0x8(%rsi,%rcx)
je 0xf34c
movl %eax, %r9d
leal 0x1(%rax), %r8d
cmpq %r9, %rdx
je 0xf349
leaq (%rsi,%rcx), %rdi
cltq
shlq $0x4, %rax
movups (%rdi), %xmm0
movups %xmm0, (%rsi,%rax)
movq (%rbx), %rdi
movl %r8d, %eax
incq %rdx
addq $0x10, %rcx
cmpq %rdx, %rdi
ja 0xf316
cltq
movq %rax, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]fermi-lite/mag.c
// Function: mag_g_print
void mag_g_print(const mag_t *g)
{
	int i;
	kstring_t out;
	out.l = out.m = 0; out.s = 0;
	for (i = 0; i < g->v.n; ++i) {
		if (g->v.a[i].len < 0) continue;
		mag_v_write(&g->v.a[i], &out);
		fwrite(out.s, 1, out.l, stdout);
	}
	free(out.s);
	fflush(stdout);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq (%rdi), %rax
testq %rax, %rax
je 0xfcdc
movq %rdi, %rbx
xorl %r15d, %r15d
movq %rsp, %r14
movq 0xd32a(%rip), %r12      # 0x1cfc0
xorl %r13d, %r13d
movq 0x10(%rbx), %rdi
cmpl $0x0, (%rdi,%r15)
js 0xfcc9
addq %r15, %rdi
movq %r14, %rsi
callq 0xf35f
movq (%rsp), %rdx
movq 0x10(%rsp), %rdi
movq (%r12), %rcx
movl $0x1, %esi
callq 0x2260
movq (%rbx), %rax
incq %r13
addq $0x68, %r15
cmpq %r13, %rax
ja 0xfc99
movq 0x10(%rsp), %rdi
jmp 0xfcde
xorl %edi, %edi
callq 0x2040
movq 0xd2d6(%rip), %rax      # 0x1cfc0
movq (%rax), %rdi
callq 0x21b0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]fermi-lite/mag.c
// Function: mag_g_destroy
void mag_g_destroy(mag_t *g)
{
	int i;
	kh_destroy(64, g->h);
	for (i = 0; i < g->v.n; ++i)
		mag_v_destroy(&g->v.a[i]);
	free(g->v.a);
	free(g);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
callq 0xcda7
cmpq $0x0, (%rbx)
je 0xfd87
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x10(%rbx), %rdi
addq %r14, %rdi
callq 0xfd00
incq %r15
addq $0x68, %r14
cmpq %r15, (%rbx)
ja 0xfd6f
movq 0x10(%rbx), %rdi
callq 0x2040
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2040
// File: /workspace/github_c_makefile_star2_O3/lh3[P]fermi-lite/mag.c
// Function: mag_v_copy_to_empty
void mag_v_copy_to_empty(magv_t *dst, const magv_t *src) // NB: memory leak if dst is allocated
{
	memcpy(dst, src, sizeof(magv_t));
	dst->max_len = dst->len + 1;
	kroundup32(dst->max_len);
	dst->seq = calloc(dst->max_len, 1); memcpy(dst->seq, src->seq, src->len);
	dst->cov = calloc(dst->max_len, 1); memcpy(dst->cov, src->cov, src->len);
	kv_init(dst->nei[0]); kv_copy(ku128_t, dst->nei[0], src->nei[0]);
	kv_init(dst->nei[1]); kv_copy(ku128_t, dst->nei[1], src->nei[1]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0xd, %ecx
rep  movsq (%rsi), %es:(%rdi)
movl (%r14), %eax
movl %eax, %ecx
shrl %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x2, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x4, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x8, %eax
orl %ecx, %eax
movl %eax, %r15d
shrl $0x10, %r15d
orl %eax, %r15d
incl %r15d
movl %r15d, 0x8(%r14)
movl $0x1, %esi
movq %r15, %rdi
callq 0x2130
movq %rax, 0x50(%r14)
movq 0x50(%rbx), %rsi
movslq (%rbx), %r12
movq %rax, %rdi
movq %r12, %rdx
callq 0x2170
movl $0x1, %esi
movq %r15, %rdi
callq 0x2130
movq %rax, 0x58(%r14)
movq 0x58(%rbx), %rsi
movq %rax, %rdi
movq %r12, %rdx
callq 0x2170
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%r14)
movq $0x0, 0x30(%r14)
movq 0x20(%rbx), %r15
testq %r15, %r15
je 0xfe8c
leaq -0x1(%r15), %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rdi
shrq $0x10, %rdi
orq %rax, %rdi
incq %rdi
movq %rdi, 0x28(%r14)
shlq $0x4, %rdi
callq 0x21a0
movq %rax, %rdi
movq %rax, 0x30(%r14)
jmp 0xfe8e
xorl %edi, %edi
movq %r15, 0x20(%r14)
movq 0x20(%rbx), %rdx
movq 0x30(%rbx), %rsi
shlq $0x4, %rdx
callq 0x2170
leaq 0x38(%r14), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%r14)
movq $0x0, 0x48(%r14)
movq 0x38(%rbx), %r12
testq %r12, %r12
je 0xff0f
leaq -0x1(%r12), %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rdi
shrq $0x10, %rdi
orq %rax, %rdi
incq %rdi
movq %rdi, 0x40(%r14)
shlq $0x4, %rdi
callq 0x21a0
movq %rax, %rdi
movq %rax, 0x48(%r14)
jmp 0xff11
xorl %edi, %edi
movq %r12, (%r15)
movq 0x38(%rbx), %rdx
movq 0x48(%rbx), %rsi
shlq $0x4, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2170
// File: /workspace/github_c_makefile_star2_O3/lh3[P]fermi-lite/mag.c
// Function: mag_eh_add
void mag_eh_add(mag_t *g, uint64_t u, uint64_t v, int ovlp) // add v to u
{
	ku128_v *r;
	ku128_t *q;
	uint64_t idd;
	int i;
	if ((int64_t)u < 0) return;
	idd = tid2idd(g->h, u);
	r = &g->v.a[idd>>1].nei[idd&1];
	for (i = 0; i < r->n; ++i) // no multi-edges
		if (r->a[i].x == v) return;
	kv_pushp(ku128_t, *r, &q);
	q->x = v; q->y = ovlp;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
js 0xffef
movl %ecx, %ebx
movq %rdx, %r14
movq %rdi, %r15
movq 0x20(%rdi), %r12
movq %r12, %rdi
callq 0xce10
cmpl (%r12), %eax
je 0xfffb
movq 0x20(%r12), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %rax
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
imulq $0x68, %rcx, %rcx
addq 0x10(%r15), %rcx
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %r15
addq $0x20, %r15
movq (%r15), %rcx
testq %rcx, %rcx
je 0xffa4
movq 0x10(%r15), %rax
movq %rcx, %rdx
cmpq %r14, (%rax)
je 0xffef
addq $0x10, %rax
decq %rdx
jne 0xff96
cmpq 0x8(%r15), %rcx
jne 0xffd4
leaq (%rcx,%rcx), %rax
testq %rcx, %rcx
movl $0x2, %esi
cmovneq %rax, %rsi
movq %rsi, 0x8(%r15)
movq 0x10(%r15), %rdi
shlq $0x4, %rsi
callq 0x21c0
movq %rax, 0x10(%r15)
movq (%r15), %rcx
jmp 0xffd8
movq 0x10(%r15), %rax
leaq 0x1(%rcx), %rdx
movq %rdx, (%r15)
shlq $0x4, %rcx
movq %r14, (%rax,%rcx)
movslq %ebx, %rdx
movq %rdx, 0x8(%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x73bd(%rip), %rdi      # 0x173bf
leaq 0x7b62(%rip), %rsi      # 0x17b6b
leaq 0x7de8(%rip), %rcx      # 0x17df8
movl $0x70, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/lh3[P]fermi-lite/mag.c
// Function: mag_eh_markdel
void mag_eh_markdel(mag_t *g, uint64_t u, uint64_t v) // mark deletion of v from u
{
	int i;	
	uint64_t idd;
	if ((int64_t)u < 0) return;
	idd = tid2idd(g->h, u);
	ku128_v *r = &g->v.a[idd>>1].nei[idd&1];
	for (i = 0; i < r->n; ++i)
		if (r->a[i].x == v) edge_mark_del(r->a[i]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
js 0x1008d
movq %rdx, %rbx
movq %rdi, %r14
movq 0x20(%rdi), %r15
movq %r15, %rdi
callq 0xce10
cmpl (%r15), %eax
je 0x10093
movq 0x20(%r15), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %rax
movq %rax, %rcx
shrq %rcx
imulq $0x68, %rcx, %rcx
addq 0x10(%r14), %rcx
andl $0x1, %eax
leaq (%rax,%rax,2), %rdx
movq 0x20(%rcx,%rdx,8), %rax
testq %rax, %rax
je 0x1008d
leaq (%rcx,%rdx,8), %rcx
addq $0x20, %rcx
movq 0x10(%rcx), %rcx
cmpq %rbx, (%rcx)
jne 0x10084
movq $-0x2, (%rcx)
movq $0x0, 0x8(%rcx)
addq $0x10, %rcx
decq %rax
jne 0x10070
popq %rbx
popq %r14
popq %r15
retq
leaq 0x7325(%rip), %rdi      # 0x173bf
leaq 0x7aca(%rip), %rsi      # 0x17b6b
leaq 0x7d50(%rip), %rcx      # 0x17df8
movl $0x70, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/lh3[P]fermi-lite/mag.c
// Function: mag_v_del
void mag_v_del(mag_t *g, magv_t *p)
{
	int i, j;
	khint_t k;
	if (p->len < 0) return;
	for (i = 0; i < 2; ++i) {
		ku128_v *r = &p->nei[i];
		for (j = 0; j < r->n; ++j)
			if (!edge_is_del(r->a[j]) && r->a[j].x != p->k[0] && r->a[j].x != p->k[1])
				mag_eh_markdel(g, r->a[j].x, p->k[i]);
	}
	for (i = 0; i < 2; ++i) {
		k = kh_get(64, g->h, p->k[i]);
		kh_del(64, g->h, k);
	}
	mag_v_destroy(p);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
cmpl $0x0, (%rsi)
js 0x101a5
movq %rsi, %rbx
leaq 0x20(%rsi), %rax
movq %rax, 0x10(%rsp)
movb $0x1, %bpl
xorl %r12d, %r12d
leaq (%r12,%r12,2), %rcx
movq 0x10(%rsp), %rax
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0x10145
movq 0x10(%rsp), %rdx
leaq (%rdx,%rcx,8), %r13
movl $0x8, %r14d
xorl %r15d, %r15d
movq 0x10(%r13), %rcx
movq -0x8(%rcx,%r14), %rsi
cmpq $-0x2, %rsi
je 0x10139
cmpq $0x0, (%rcx,%r14)
je 0x10139
cmpq 0x10(%rbx), %rsi
je 0x10139
cmpq 0x18(%rbx), %rsi
je 0x10139
movq 0x10(%rbx,%r12,8), %rdx
movq 0x8(%rsp), %rdi
callq 0x1001a
movq (%r13), %rax
incq %r15
addq $0x10, %r14
cmpq %r15, %rax
ja 0x10104
movl $0x1, %r12d
testb $0x1, %bpl
movl $0x0, %ebp
jne 0x100e0
movq 0x8(%rsp), %r14
movq 0x20(%r14), %r15
movq 0x10(%rbx), %rsi
movq %r15, %rdi
callq 0xce10
movq %r15, %rdi
movl %eax, %esi
callq 0xd27b
movq 0x20(%r14), %r14
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0xce10
movq %r14, %rdi
movl %eax, %esi
callq 0xd27b
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xfd00
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lh3[P]fermi-lite/mag.c
// Function: mag_v_transdel
void mag_v_transdel(mag_t *g, magv_t *p, int min_ovlp)
{
	if (p->nei[0].n && p->nei[1].n) {
		int i, j, ovlp;
		for (i = 0; i < p->nei[0].n; ++i) {
			if (edge_is_del(p->nei[0].a[i]) || p->nei[0].a[i].x == p->k[0] || p->nei[0].a[i].x == p->k[1]) continue; // due to p->p loop
			for (j = 0; j < p->nei[1].n; ++j) {
				if (edge_is_del(p->nei[1].a[j]) || p->nei[1].a[j].x == p->k[0] || p->nei[1].a[j].x == p->k[1]) continue;
				ovlp = (int)(p->nei[0].a[i].y + p->nei[1].a[j].y) - p->len;
				if (ovlp >= min_ovlp) {
					mag_eh_add(g, p->nei[0].a[i].x, p->nei[1].a[j].x, ovlp);
					mag_eh_add(g, p->nei[1].a[j].x, p->nei[0].a[i].x, ovlp);
				}
			}
		}
	}
	mag_v_del(g, p);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq 0x20(%rsi), %rcx
testq %rcx, %rcx
je 0x102cc
movq 0x38(%rbx), %rax
testq %rax, %rax
je 0x102cc
movl %edx, %r8d
xorl %r12d, %r12d
movq %rax, %rdx
movl %r8d, 0xc(%rsp)
movq %rdi, 0x10(%rsp)
movq 0x30(%rbx), %r9
movq %r12, %r13
shlq $0x4, %r13
movq (%r9,%r13), %rsi
cmpq $-0x2, %rsi
je 0x102c0
addq %r13, %r9
cmpq $0x0, 0x8(%r9)
je 0x102c0
cmpq 0x10(%rbx), %rsi
je 0x102c0
cmpq 0x18(%rbx), %rsi
je 0x102c0
testq %rdx, %rdx
je 0x102be
xorl %ebp, %ebp
xorl %r14d, %r14d
movq 0x48(%rbx), %rcx
movq (%rcx,%rbp), %rdx
cmpq $-0x2, %rdx
je 0x102a9
movq 0x8(%rcx,%rbp), %r15
testq %r15, %r15
je 0x102a9
cmpq 0x10(%rbx), %rdx
je 0x102a9
cmpq 0x18(%rbx), %rdx
je 0x102a9
movq 0x30(%rbx), %rcx
addl 0x8(%rcx,%r13), %r15d
subl (%rbx), %r15d
cmpl %r8d, %r15d
jl 0x102a9
addq %r13, %rcx
movq (%rcx), %rsi
movl %r15d, %ecx
callq 0xff30
movq 0x30(%rbx), %rax
movq 0x48(%rbx), %rcx
movq (%rcx,%rbp), %rsi
movq (%rax,%r13), %rdx
movq 0x10(%rsp), %rdi
movl %r15d, %ecx
callq 0xff30
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %r8d
movq 0x38(%rbx), %rax
incq %r14
addq $0x10, %rbp
cmpq %r14, %rax
ja 0x1023b
movq 0x20(%rbx), %rcx
movq %rax, %rdx
jmp 0x102c0
xorl %edx, %edx
incq %r12
cmpq %r12, %rcx
ja 0x101f2
movq %rbx, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x100b2