LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/gfa-bbl.c
// Function: gfa_scbuf_init
gfa_scbuf_t *gfa_scbuf_init(const gfa_t *g)
{
	uint32_t v, n_vtx = gfa_n_vtx(g);
	gfa_scbuf_t *b;
	GFA_CALLOC(b, 1);
	GFA_CALLOC(b->a, n_vtx);
	for (v = 0; v < n_vtx; ++v)
		b->a[v].index = b->a[v].start = (uint32_t)-1;
	return b;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x4(%rdi), %ebx
addl %ebx, %ebx
pushq $0x1
popq %rdi
pushq $0x40
popq %rsi
callq 0x21e0
movq %rax, %r14
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0x21e0
movq %rax, 0x8(%r14)
shlq $0x4, %rbx
xorl %ecx, %ecx
cmpq %rcx, %rbx
je 0x885a
orl $-0x1, 0xc(%rax,%rcx)
orl $-0x1, (%rax,%rcx)
addq $0x10, %rcx
jmp 0x8846
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/gfa-bbl.c
// Function: gfa_scc_all
void gfa_scc_all(const gfa_t *g)
{
	uint32_t v, n_vtx = gfa_n_vtx(g);
	gfa_scbuf_t *b;
	b = gfa_scbuf_init(g);
	for (v = 0; v < n_vtx; ++v)
		if (b->a[v].index == (uint32_t)-1 && b->a[v^1].index == (uint32_t)-1) {
			gfa_sub_t *sub;
			sub = gfa_scc1(0, g, b, v);
			gfa_sub_print(stderr, g, sub);
			gfa_sub_destroy(sub);
		}
	gfa_scbuf_destroy(b);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x4(%rdi), %r13d
addl %r13d, %r13d
callq 0x881a
movq %rax, %r14
xorl %ebp, %ebp
xorl %r15d, %r15d
cmpq %r15, %r13
je 0x8e67
movq 0x8(%r14), %rax
cmpl $-0x1, (%rax,%rbp)
jne 0x8e5e
movq %r15, %rcx
xorq $0x1, %rcx
shlq $0x4, %rcx
cmpl $-0x1, (%rax,%rcx)
jne 0x8e5e
xorl %edi, %edi
movq %rbx, %rsi
movq %r14, %rdx
movl %r15d, %ecx
callq 0x888d
movq %rax, %r12
movq 0x251b0(%rip), %rax     # 0x2dff8
movq (%rax), %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x870e
movq %r12, %rdi
callq 0x8e7d
incq %r15
addq $0x10, %rbp
jmp 0x8e0e
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8865
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/gfa-bbl.c
// Function: gfa_sub_destroy
void gfa_sub_destroy(gfa_sub_t *sub)
{
	void *km;
	if (sub == 0) return;
	km = sub->km;
	kfree(km, sub->v); kfree(km, sub->a); kfree(km, sub);
}

// Assembly:
testq %rdi, %rdi
je 0x8eb7
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
movq 0x20(%rdi), %r14
movq %r14, %rdi
callq 0x2577
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x2577
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2577
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/gfa-bbl.c
// Function: bb_write_seq
static void bb_write_seq(const gfa_t *g, int32_t n, const uint32_t *v, int32_t l_seq, char *seq)
{
	int32_t k, l;
	for (k = n - 1, l = 0; k >= 0; --k) {
		const gfa_seg_t *s = &g->seg[v[k]>>1];
		if (v[k]&1) {
			int32_t p;
			for (p = s->len - 1; p >= 0; --p)
				seq[l++] = gfa_comp_table[(uint8_t)s->seq[p]];
		} else {
			memcpy(&seq[l], s->seq, s->len);
			l += s->len;
		}
	}
	assert(l == l_seq);
	seq[l] = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r14
movl %ecx, 0xc(%rsp)
movq %rdi, %r15
movl %esi, %r12d
xorl %r13d, %r13d
leaq 0x24bc7(%rip), %rbp     # 0x2e200
movq %rdx, 0x10(%rsp)
testl %r12d, %r12d
jle 0x969a
movl -0x4(%rdx,%r12,4), %eax
decq %r12
movl %eax, %ebx
shrl %ebx
shlq $0x6, %rbx
addq 0x10(%r15), %rbx
movslq %r13d, %rdi
testb $0x1, %al
jne 0x9677
addq %r14, %rdi
movq 0x20(%rbx), %rsi
movslq (%rbx), %rdx
callq 0x2230
movq 0x10(%rsp), %rdx
addl (%rbx), %r13d
jmp 0x963e
movl (%rbx), %eax
addq %r14, %rdi
testl %eax, %eax
jle 0x963e
movq 0x20(%rbx), %rcx
movzbl -0x1(%rcx,%rax), %ecx
decq %rax
movb (%rbp,%rcx), %cl
movb %cl, (%rdi)
incl %r13d
incq %rdi
jmp 0x967c
movl 0xc(%rsp), %eax
cmpl %eax, %r13d
jne 0x96b9
cltq
movb $0x0, (%r14,%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1a0f9(%rip), %rdi     # 0x237b9
leaq 0x19fef(%rip), %rsi     # 0x236b6
leaq 0x1a0f6(%rip), %rcx     # 0x237c4
movl $0xda, %edx
callq 0x2160
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/gfa-ed.c
// Function: gfa_edseq_init
gfa_edseq_t *gfa_edseq_init(const gfa_t *g)
{
	uint32_t i, n_vtx = gfa_n_vtx(g);
	gfa_edseq_t *es;
	GFA_MALLOC(es, n_vtx);
	for (i = 0; i < g->n_seg; ++i) {
		const gfa_seg_t *s = &g->seg[i];
		char *t;
		int32_t j;
		GFA_MALLOC(t, s->len + 1);
		for (j = 0; j < s->len; ++j)
			t[s->len - j - 1] = gfa_comp_table[(uint8_t)s->seq[j]];
		t[s->len] = 0;
		es[i<<1].seq = (char*)s->seq;
		es[i<<1|1].seq = t;
		es[i<<1].len = es[i<<1|1].len = s->len;
	}
	return es;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, (%rsp)
movl 0x4(%rdi), %r15d
leal (%r15,%r15), %edi
shlq $0x4, %rdi
callq 0x2280
movq %rax, %r14
xorl %r12d, %r12d
leaq 0x24ae5(%rip), %r13     # 0x2e200
cmpq %r15, %r12
je 0x97ac
movq (%rsp), %rax
movq 0x10(%rax), %rax
movq %r12, %rcx
shlq $0x6, %rcx
leaq (%rax,%rcx), %rbp
movslq (%rax,%rcx), %rbx
movq %rbx, %rdi
incq %rdi
callq 0x2280
pushq $-0x1
popq %rcx
xorl %edx, %edx
movslq %ebx, %rsi
cmpq %rsi, %rdx
jge 0x9773
movq 0x20(%rbp), %rsi
movzbl (%rsi,%rdx), %esi
movb (%r13,%rsi), %sil
addl %ecx, %ebx
movslq %ebx, %rdi
movb %sil, (%rax,%rdi)
incq %rdx
movl (%rbp), %ebx
decl %ecx
jmp 0x974b
movb $0x0, (%rax,%rsi)
movq 0x20(%rbp), %rcx
leal (%r12,%r12), %edx
shlq $0x4, %rdx
movq %rcx, (%r14,%rdx)
leal 0x1(,%r12,2), %ecx
shlq $0x4, %rcx
movq %rax, (%r14,%rcx)
movl (%rbp), %eax
movl %eax, 0x8(%r14,%rcx)
movl %eax, 0x8(%r14,%rdx)
incq %r12
jmp 0x971b
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/gfa-ed.c
// Function: gfa_edseq_destroy
void gfa_edseq_destroy(int32_t n_seg, gfa_edseq_t *es)
{
	int32_t i;
	for (i = 0; i < n_seg; ++i)
		free((char*)es[i<<1|1].seq);
	free(es);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %r14d
xorl %r15d, %r15d
testl %edi, %edi
cmovlel %r15d, %r14d
addl %r14d, %r14d
cmpq %r15, %r14
je 0x97f3
leal 0x1(%r15), %eax
cltq
shlq $0x4, %rax
movq (%rbx,%rax), %rdi
callq 0x2040
addq $0x2, %r15
jmp 0x97d5
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2040
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/gfa-ed.c
// Function: rs_sort_gwf_intv
static int gwf_intv_is_sorted(int32_t n_a, const gwf_intv_t *a)
{
	int32_t i;
	for (i = 1; i < n_a; ++i)
		if (a[i-1].vd0 > a[i].vd0) break;
	return (i == n_a);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1018, %rsp           # imm = 0x1018
movl %ecx, %ebx
movl %edx, %ecx
pushq $0x1
popq %rdx
shll %cl, %edx
movl %ecx, 0xc(%rsp)
cmpl $0x8, %ecx
jg 0x9a0a
movslq %edx, %r14
decl %edx
movq %r14, %rcx
shlq $0x4, %rcx
leaq (%rsp,%rcx), %rax
addq $0x10, %rax
leaq 0x10(%rsp), %r8
testq %rcx, %rcx
je 0x989b
movq %rdi, 0x8(%r8)
movq %rdi, (%r8)
addq $0x10, %r8
addq $-0x10, %rcx
jmp 0x9885
movl %ebx, %ecx
movslq %edx, %rdx
movq %rdi, %r8
cmpq %rsi, %r8
je 0x98c1
movq (%r8), %r9
shrq %cl, %r9
andq %rdx, %r9
shlq $0x4, %r9
addq $0x10, 0x18(%rsp,%r9)
addq $0x10, %r8
jmp 0x98a3
leaq 0x20(%rsp), %rsi
shlq $0x4, %r14
leaq -0x10(%r14), %r8
movq %rsi, %r9
testq %r8, %r8
je 0x98f1
movq -0x8(%r9), %r10
movq %r10, %r11
subq %rdi, %r11
addq %r11, 0x8(%r9)
movq %r10, (%r9)
addq $0x10, %r9
addq $-0x10, %r8
jmp 0x98d1
leaq 0x10(%rsp), %r8
cmpq %rax, %r8
je 0x9989
movq (%r8), %r10
cmpq 0x8(%r8), %r10
je 0x9980
movq (%r10), %r9
movq %r9, %r11
shrq %cl, %r11
andq %rdx, %r11
shlq $0x4, %r11
addq %rsp, %r11
addq $0x10, %r11
cmpq %r8, %r11
je 0x9974
movq 0x8(%r10), %r10
movq %r9, %r15
movq %r10, %r12
movq (%r11), %r13
movq (%r13), %r9
movq 0x8(%r13), %r10
leaq 0x10(%r13), %rbp
movq %rbp, (%r11)
movq %r15, (%r13)
movq %r12, 0x8(%r13)
movq %r9, %r11
shrq %cl, %r11
andq %rdx, %r11
shlq $0x4, %r11
addq %rsp, %r11
addq $0x10, %r11
cmpq %r8, %r11
jne 0x9928
movq (%r8), %r11
leaq 0x10(%r11), %r15
movq %r15, (%r8)
movq %r9, (%r11)
movq %r10, 0x8(%r11)
jmp 0x98f6
addq $0x10, %r10
movq %r10, (%r8)
jmp 0x98f6
addq $0x10, %r8
jmp 0x98f6
movq %rdi, 0x10(%rsp)
leaq -0x10(%r14), %rax
testq %rax, %rax
je 0x99a8
movq -0x8(%rsi), %rcx
movq %rcx, (%rsi)
addq $0x10, %rsi
addq $-0x10, %rax
jmp 0x9992
testl %ebx, %ebx
je 0x99f8
xorl %eax, %eax
subl 0xc(%rsp), %ebx
cmovlel %eax, %ebx
leaq 0x10(%rsp), %r15
testq %r14, %r14
je 0x99f8
movq (%r15), %rdi
movq 0x8(%r15), %rsi
movq %rsi, %rax
subq %rdi, %rax
sarq $0x4, %rax
cmpq $0x41, %rax
jl 0x99e3
movl 0xc(%rsp), %edx
movl %ebx, %ecx
callq 0x9845
jmp 0x99ee
cmpq $0x2, %rax
jl 0x99ee
callq 0x9800
addq $0x10, %r15
addq $-0x10, %r14
jmp 0x99ba
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1970b(%rip), %rdi     # 0x2311c
leaq 0x19e18(%rip), %rsi     # 0x23830
leaq 0x19e1a(%rip), %rcx     # 0x23839
pushq $0x49
popq %rdx
callq 0x2160
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/gfa-ed.c
// Function: gfa_ed_init
void *gfa_ed_init(void *km, const gfa_edopt_t *opt, const gfa_t *g, const gfa_edseq_t *es, int32_t ql, const char *q, uint32_t v0, int32_t off0)
{
	gfa_edbuf_t *z;
	KCALLOC(km, z, 1);
	z->buf.km = km;
	z->opt = opt;
	z->g = g, z->es = es;
	z->ql = ql, z->q = q;
	z->buf.ha = gwf_set64_init2(km);
	z->buf.ht = gwf_map64_init2(km);
	kv_resize(gwf_trace_t, km, z->buf.t, 16);
	KCALLOC(km, z->a, 1);
	z->a[0].vd = gwf_gen_vd(v0, -off0), z->a[0].k = off0 - 1, z->a[0].xo = 0;
	if (z->opt->traceback) z->a[0].t = gwf_trace_push(km, &z->buf.t, -1, -1, z->buf.ht);
	z->n_a = 1;
	return z;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movl %r8d, 0xc(%rsp)
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r14
movl 0x58(%rsp), %ebp
pushq $0x1
popq %rsi
movl $0xd0, %edx
callq 0x24f0
movq %rax, %rbx
movq %r14, 0x28(%rax)
movq %r15, 0x10(%rax)
movq %r13, (%rax)
movq %r12, 0x8(%rax)
movl 0xc(%rsp), %eax
movl %eax, 0x18(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rbx)
pushq $0x20
popq %r15
movq %r14, %rdi
pushq $0x1
popq %rsi
movq %r15, %rdx
callq 0x24f0
movq %r14, 0x18(%rax)
movq %rax, 0x30(%rbx)
movq %r14, %rdi
pushq $0x1
popq %rsi
movq %r15, %rdx
callq 0x24f0
movq %r14, 0x18(%rax)
movq %rax, 0x38(%rbx)
cmpq $0xf, 0xa8(%rbx)
ja 0x9d68
movq $0x10, 0xa8(%rbx)
movq 0xb0(%rbx), %rsi
movl $0x80, %edx
movq %r14, %rdi
callq 0x2774
movq %rax, 0xb0(%rbx)
pushq $0x1
popq %rsi
pushq $0x18
popq %rdx
movq %r14, %rdi
callq 0x24f0
movq %rax, 0xc0(%rbx)
movl 0x50(%rsp), %ecx
movq %rcx, %rdx
shlq $0x20, %rdx
movl $0x40000000, %ecx       # imm = 0x40000000
subl %ebp, %ecx
movslq %ecx, %rcx
orq %rdx, %rcx
movq %rcx, (%rax)
decl %ebp
movl %ebp, 0x8(%rax)
andl $0x0, 0x10(%rax)
movq 0x10(%rbx), %rax
cmpl $0x0, (%rax)
je 0x9dcf
movq %rbx, %rsi
addq $0xa0, %rsi
movq 0x38(%rbx), %r8
pushq $-0x1
popq %rcx
movq %r14, %rdi
movl %ecx, %edx
callq 0x9deb
movq 0xc0(%rbx), %rcx
movl %eax, 0x14(%rcx)
movl $0x1, 0xbc(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/gfa-ed.c
// Function: gfa_ed_destroy
void gfa_ed_destroy(void *z_)
{
	gfa_edbuf_t *z = (gfa_edbuf_t*)z_;
	void *km = z->buf.km;
	kfree(km, z->a);
	gwf_set64_destroy(z->buf.ha);
	gwf_map64_destroy(z->buf.ht);
	kfree(km, z->buf.ooo.a);
	kfree(km, z->buf.intv.a);
	kfree(km, z->buf.tmp.a);
	kfree(km, z->buf.swap.a);
	kfree(km, z->buf.t.a);
	kfree(km, z);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %r14
movq 0xc0(%rdi), %rsi
movq %r14, %rdi
callq 0x2577
movq 0x30(%rbx), %r15
testq %r15, %r15
je 0xbe16
movq 0x10(%r15), %rsi
movq 0x18(%r15), %r12
movq %r12, %rdi
callq 0x2577
movq 0x8(%r15), %rsi
movq %r12, %rdi
callq 0x2577
movq %r12, %rdi
movq %r15, %rsi
callq 0x2577
movq 0x38(%rbx), %r15
testq %r15, %r15
je 0xbe46
movq 0x10(%r15), %rsi
movq 0x18(%r15), %r12
movq %r12, %rdi
callq 0x2577
movq 0x8(%r15), %rsi
movq %r12, %rdi
callq 0x2577
movq %r12, %rdi
movq %r15, %rsi
callq 0x2577
movq 0x98(%rbx), %rsi
movq %r14, %rdi
callq 0x2577
movq 0x50(%rbx), %rsi
movq %r14, %rdi
callq 0x2577
movq 0x68(%rbx), %rsi
movq %r14, %rdi
callq 0x2577
movq 0x80(%rbx), %rsi
movq %r14, %rdi
callq 0x2577
movq 0xb0(%rbx), %rsi
movq %r14, %rdi
callq 0x2577
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2577
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/gfa-ed.c
// Function: gfa_edit_dist
int32_t gfa_edit_dist(void *km, const gfa_edopt_t *opt, const gfa_t *g, const gfa_edseq_t *es, int32_t ql, const char *q, uint32_t v0, int32_t off0, gfa_edrst_t *rst)
{
	void *z;
	z = gfa_ed_init(km, opt, g, es, ql, q, v0, off0);
	gfa_ed_step(z, (uint32_t)-1, -1, -1, rst);
	gfa_ed_destroy(z);
	return rst->s;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x30(%rsp), %rbx
movl 0x20(%rsp), %eax
movl 0x28(%rsp), %r10d
pushq %r10
pushq %rax
callq 0x9cb1
popq %rcx
popq %rdx
movq %rax, %r14
pushq $-0x1
popq %rcx
movq %rax, %rdi
movl %ecx, %esi
movl %ecx, %edx
movq %rbx, %r8
callq 0xa199
movq %r14, %rdi
callq 0xbdc8
movl (%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/./khashl.h
// Function: gwf_map64_m_hash
static kh_inline khint_t kh_hash_uint64(khint64_t key) {
	key = ~key + (key << 21);
	key = key ^ key >> 24;
	key = (key + (key << 3)) + (key << 8);
	key = key ^ key >> 14;
	key = (key + (key << 2)) + (key << 4);
	key = key ^ key >> 28;
	key = key + (key << 31);
	return (khint_t)key;
}

// Assembly:
movq %rdi, %rax
notq %rax
shlq $0x15, %rdi
addq %rax, %rdi
movq %rdi, %rax
shrq $0x18, %rax
xorq %rdi, %rax
imulq $0x109, %rax, %rax      # imm = 0x109
movq %rax, %rcx
shrq $0xe, %rcx
xorq %rax, %rcx
imulq $0x15, %rcx, %rax
movq %rax, %rcx
shrq $0x1c, %rcx
xorl %eax, %ecx
imull $0x80000001, %ecx, %eax # imm = 0x80000001
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/gfa-ed.c
// Function: gwf_extend1
static inline int32_t gwf_extend1(int32_t d, int32_t k, int32_t vl, const char *ts, int32_t ql, const char *qs)
{
	int32_t max_k = (ql - d < vl? ql - d : vl) - 1;
	const char *ts_ = ts + 1, *qs_ = qs + d + 1;
#if 0
	// int32_t i = k + d; while (k + 1 < vl && i + 1 < ql && ts[k+1] == q[i+1]) ++k, ++i;
	while (k < max_k && *(ts_ + k) == *(qs_ + k))
		++k;
#else
	uint64_t cmp = 0;
	while (k + 7 < max_k) {
		uint64_t x = *(uint64_t*)(ts_ + k); // warning: unaligned memory access
		uint64_t y = *(uint64_t*)(qs_ + k);
		cmp = x ^ y;
		if (cmp == 0) k += 8;
		else break;
	}
	if (cmp)
		k += __builtin_ctzl(cmp) >> 3; // on x86, this is done via the BSR instruction: https://www.felixcloutier.com/x86/bsr
	else if (k + 7 >= max_k)
		while (k < max_k && *(ts_ + k) == *(qs_ + k)) // use this for generic CPUs. It is slightly faster than the unoptimized version
			++k;
#endif
	return k;
}

// Assembly:
subl %edi, %r8d
cmpl %edx, %r8d
cmovgel %edx, %r8d
movslq %r8d, %r8
leaq -0x1(%r8), %rdx
movslq %edi, %rax
leaq (%r9,%rax), %rdi
incq %rdi
movslq %esi, %r9
addq $-0x8, %r8
xorl %esi, %esi
movq %r9, %rax
cmpq %r8, %r9
jge 0xbf64
movq 0x1(%rcx,%rax), %r10
movq (%rdi,%rax), %r11
movq %r11, %rsi
xorq %r10, %rsi
leaq 0x8(%rax), %r9
cmpq %r11, %r10
je 0xbf44
testq %rsi, %rsi
je 0xbf75
bsfq %rsi, %rcx
shrl $0x3, %ecx
addl %eax, %ecx
movl %ecx, %eax
retq
leal 0x7(%rax), %esi
cmpl %edx, %esi
jge 0xbf7d
retq
cmpq %rdx, %rax
jge 0xbf7c
movb 0x1(%rcx,%rax), %sil
cmpb (%rdi,%rax), %sil
jne 0xbf7c
incq %rax
jmp 0xbf7d
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/gfa-ed.c
// Function: gwf_diag_update
static inline int32_t gwf_diag_update(gwf_diag_t *p, uint32_t v, int32_t d, int32_t k, uint32_t x, uint32_t ooo, int32_t t)
{
	uint64_t vd = gwf_gen_vd(v, d);
	if (p->vd == vd) {
		p->xo = p->k > k? p->xo : x<<1|ooo;
		p->t  = p->k > k? p->t : t;
		p->k  = p->k > k? p->k : k;
		return 0;
	}
	return 1;
}

// Assembly:
shlq $0x20, %rsi
addl $0x40000000, %edx       # imm = 0x40000000
movslq %edx, %rax
orq %rsi, %rax
cmpq %rax, (%rdi)
jne 0xbfb3
movl 0x8(%rdi), %eax
cmpl %ecx, %eax
jle 0xbfb7
movl 0x14(%rdi), %edx
jmp 0xbfc5
pushq $0x1
popq %rax
retq
movl 0x8(%rsp), %edx
addl %r8d, %r8d
orl %r9d, %r8d
movl %r8d, 0x10(%rdi)
movl %edx, 0x14(%rdi)
cmpl %ecx, %eax
cmovgl %eax, %ecx
movl %ecx, 0x8(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/bseq.c
// Function: mg_bseq_open
mg_bseq_file_t *mg_bseq_open(const char *fn)
{
	mg_bseq_file_t *fp;
	gzFile f;
	f = fn && strcmp(fn, "-")? gzopen(fn, "r") : gzdopen(0, "r");
	if (f == 0) return 0;
	fp = (mg_bseq_file_t*)calloc(1, sizeof(mg_bseq_file_t));
	fp->fp = f;
	fp->ks = kseq_init(fp->fp);
	return fp;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xcd26
cmpb $0x2d, (%rdi)
jne 0xcd18
cmpb $0x0, 0x1(%rdi)
je 0xcd26
leaq 0x187d6(%rip), %rsi     # 0x254f5
callq 0x22e0
jmp 0xcd34
leaq 0x187c8(%rip), %rsi     # 0x254f5
xorl %edi, %edi
callq 0x20f0
movq %rax, %rbx
testq %rax, %rax
je 0xcd91
pushq $0x1
popq %r15
pushq $0x38
popq %rsi
movq %r15, %rdi
callq 0x21e0
movq %rax, %r14
movq %rbx, (%rax)
pushq $0x50
popq %rsi
movq %r15, %rdi
callq 0x21e0
movq %rax, %r12
pushq $0x20
popq %rsi
movq %r15, %rdi
callq 0x21e0
movq %rax, %r15
movq %rbx, 0x10(%rax)
movl $0x40000, 0x8(%rax)     # imm = 0x40000
movl $0x10000, %edi          # imm = 0x10000
callq 0x2280
movq %rax, 0x18(%r15)
movq %r15, 0x48(%r12)
movq %r12, 0x8(%r14)
jmp 0xcd94
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/bseq.c
// Function: kseq2bseq
static inline void kseq2bseq(kseq_t *ks, mg_bseq1_t *s, int with_qual, int with_comment)
{
	int i;
	if (ks->name.l == 0)
		fprintf(stderr, "[WARNING]\033[1;31m empty sequence name in the input.\033[0m\n");
	s->name = kstrdup(&ks->name);
	s->seq = kstrdup(&ks->seq);
	for (i = 0; i < (int)ks->seq.l; ++i) // convert U to T
		if (s->seq[i] == 'u' || s->seq[i] == 'U')
			--s->seq[i];
	s->qual = with_qual && ks->qual.l? kstrdup(&ks->qual) : 0;
	s->comment = with_comment && ks->comment.l? kstrdup(&ks->comment) : 0;
	s->l_seq = ks->seq.l;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x0, (%rdi)
je 0xd380
movq %r14, %rdi
callq 0xd7cb
movq %rax, 0x8(%rbx)
leaq 0x20(%r14), %r15
movq %r15, %rdi
callq 0xd7cb
movq %rax, 0x10(%rbx)
xorl %eax, %eax
movslq (%r15), %rcx
cmpq %rcx, %rax
jge 0xd336
movq 0x10(%rbx), %rcx
movzbl (%rcx,%rax), %edx
movl %edx, %esi
orl $0x20, %esi
cmpl $0x75, %esi
jne 0xd331
decb %dl
movb %dl, (%rcx,%rax)
incq %rax
jmp 0xd312
testl %r12d, %r12d
je 0xd34d
cmpl $0x0, 0x30(%r14)
je 0xd34d
leaq 0x30(%r14), %rdi
callq 0xd7cb
jmp 0xd34f
xorl %eax, %eax
movq %rax, 0x18(%rbx)
testl %ebp, %ebp
je 0xd36c
cmpl $0x0, 0x10(%r14)
je 0xd36c
addq $0x10, %r14
movq %r14, %rdi
callq 0xd7cb
jmp 0xd36e
xorl %eax, %eax
movq %rax, 0x20(%rbx)
movl (%r15), %eax
movl %eax, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x20c71(%rip), %rax     # 0x2dff8
movq (%rax), %rcx
leaq 0x1673e(%rip), %rdi     # 0x23acf
pushq $0x37
popq %rsi
pushq $0x1
popq %rdx
callq 0x2340
jmp 0xd2f4
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/bseq.c
// Function: mg_bseq_read_frag
mg_bseq1_t *mg_bseq_read_frag(int n_fp, mg_bseq_file_t **fp, int64_t chunk_size, int with_qual, int with_comment, int *n_)
{
	int i;
	int64_t size = 0;
	kvec_t(mg_bseq1_t) a = {0,0,0};
	*n_ = 0;
	if (n_fp < 1) return 0;
	while (1) {
		int n_read = 0;
		for (i = 0; i < n_fp; ++i)
			if (kseq_read(fp[i]->ks) >= 0)
				++n_read;
		if (n_read < n_fp) {
			if (n_read > 0)
				fprintf(stderr, "[W::%s]\033[1;31m query files have different number of records; extra records skipped.\033[0m\n", __func__);
			break; // some file reaches the end
		}
		if (a.m == 0) kv_resize(mg_bseq1_t, 0, a, 256);
		for (i = 0; i < n_fp; ++i) {
			mg_bseq1_t *s;
			kv_pushp(mg_bseq1_t, 0, a, &s);
			kseq2bseq(fp[i]->ks, s, with_qual, with_comment);
			size += s->l_seq;
		}
		if (size >= chunk_size) break;
	}
	*n_ = a.n;
	return a.a;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r8d, 0x14(%rsp)
movl %ecx, 0x10(%rsp)
movq %rdx, 0x28(%rsp)
movq %rsi, 0x18(%rsp)
andl $0x0, (%r9)
testl %edi, %edi
jle 0xd4c0
movq %r9, 0x20(%rsp)
movl %edi, 0xc(%rsp)
movl %edi, %eax
movq %rax, 0x40(%rsp)
addq %rax, %rax
movq %rax, 0x38(%rsp)
xorl %r15d, %r15d
xorl %r12d, %r12d
xorl %ebp, %ebp
xorl %r14d, %r14d
xorl %r13d, %r13d
xorl %ebx, %ebx
cmpq %r13, 0x40(%rsp)
je 0xd41b
movq 0x18(%rsp), %rax
movq (%rax,%r13,8), %rax
movq 0x8(%rax), %rdi
callq 0xd112
notl %eax
shrl $0x1f, %eax
addl %eax, %ebx
incq %r13
jmp 0xd3f6
cmpl 0xc(%rsp), %ebx
jl 0xd4c5
testq %rbp, %rbp
jne 0xd441
movl $0x2800, %edx           # imm = 0x2800
xorl %edi, %edi
movq %r14, %rsi
callq 0x2774
movq %rax, %r14
movl $0x100, %ebp            # imm = 0x100
leaq (%r12,%r12), %rax
movq %rax, 0x30(%rsp)
imulq $0x28, %r12, %rbx
xorl %r13d, %r13d
cmpq %r13, 0x38(%rsp)
je 0xd4b3
cmpq %rbp, %r12
jne 0xd481
movq 0x30(%rsp), %rax
leaq (%rax,%r13), %rbp
testq %r12, %r12
pushq $0x2
popq %rax
cmoveq %rax, %rbp
imulq $0x28, %rbp, %rdx
xorl %edi, %edi
movq %r14, %rsi
callq 0x2774
movq %rax, %r14
incq %r12
leaq (%r14,%rbx), %rsi
movq 0x18(%rsp), %rax
movq (%rax,%r13,4), %rax
movq 0x8(%rax), %rdi
movl 0x10(%rsp), %edx
movl 0x14(%rsp), %ecx
callq 0xd2d8
movslq (%r14,%rbx), %rax
addq %rax, %r15
addq $0x2, %r13
addq $0x28, %rbx
jmp 0xd451
cmpq 0x28(%rsp), %r15
jl 0xd3f1
jmp 0xd4c9
xorl %r14d, %r14d
jmp 0xd4d1
testl %ebx, %ebx
jne 0xd4e3
movq 0x20(%rsp), %rax
movl %r12d, (%rax)
movq %r14, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x20b0e(%rip), %rax     # 0x2dff8
movq (%rax), %rdi
leaq 0x16570(%rip), %rsi     # 0x23a64
leaq 0x165c2(%rip), %rdx     # 0x23abd
xorl %eax, %eax
callq 0x2210
jmp 0xd4c9
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/options.c
// Function: mg_opt_check
int mg_opt_check(const mg_idxopt_t *io, const mg_mapopt_t *mo, const mg_ggopt_t *go)
{
	if ((mo->flag & MG_M_FRAG_MODE) && !(mo->flag & MG_M_FRAG_MERGE)) {
		if (mg_verbose >= 1)
			fprintf(stderr, "[ERROR]\033[1;31m the fragment-without-merge mode is not implemented\033[0m\n");
		return -1;
	}
	return 0;
}

// Assembly:
pushq %rbx
movl $0xc0, %eax
andl (%rsi), %eax
xorl %ebx, %ebx
cmpl $0x40, %eax
jne 0xdb78
leaq 0x20890(%rip), %rax     # 0x2e400
pushq $-0x1
popq %rbx
cmpl $0x0, (%rax)
jg 0xdb7c
movl %ebx, %eax
popq %rbx
retq
movq 0x20475(%rip), %rax     # 0x2dff8
movq (%rax), %rcx
leaq 0x16027(%rip), %rdi     # 0x23bb4
pushq $0x46
popq %rsi
pushq $0x1
popq %rdx
callq 0x2340
jmp 0xdb78
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/options.c
// Function: mg_opt_update
void mg_opt_update(const mg_idx_t *gi, mg_mapopt_t *mo, mg_ggopt_t *go)
{
	float f[2];
	int32_t q[2];
	f[0] = 0.1f, f[1] = mo->occ_max1_frac;
	mg_idx_cal_quantile(gi, 2, f, q);
	if (q[0] > mo->lc_max_occ) mo->lc_max_occ = q[0];
	if (mo->lc_max_occ > mo->occ_max1_cap) mo->lc_max_occ = mo->occ_max1_cap;
	if (q[1] > mo->occ_max1) mo->occ_max1 = q[1];
	if (mo->occ_max1 > mo->occ_max1_cap) mo->occ_max1 = mo->occ_max1_cap;
	if (mo->bw_long < mo->bw) mo->bw_long = mo->bw;
	if (mg_verbose >= 3)
		fprintf(stderr, "[M::%s::%.3f*%.2f] occ_max1=%d; lc_max_occ=%d\n", __func__,
				realtime() - mg_realtime0, cputime() / (realtime() - mg_realtime0), mo->occ_max1, mo->lc_max_occ);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
leaq 0x18(%rsp), %rdx
movl $0x3dcccccd, (%rdx)     # imm = 0x3DCCCCCD
movss 0x24(%rsi), %xmm0
movss %xmm0, 0x4(%rdx)
pushq $0x2
popq %rsi
leaq 0x10(%rsp), %r14
movq %r14, %rcx
callq 0x12707
movl (%r14), %eax
movl 0x7c(%rbx), %ecx
cmpl %ecx, %eax
jle 0xdbda
movl %eax, 0x7c(%rbx)
movl %eax, %ecx
movl 0x20(%rbx), %eax
cmpl %eax, %ecx
jle 0xdbe4
movl %eax, 0x7c(%rbx)
movl 0x14(%rsp), %edx
movl 0x1c(%rbx), %ecx
cmpl %ecx, %edx
cmovgl %edx, %ecx
setle %dl
cmpl %eax, %ecx
setle %sil
testb %sil, %dl
jne 0xdc06
cmpl %eax, %ecx
cmovll %ecx, %eax
movl %eax, 0x1c(%rbx)
movl 0x28(%rbx), %eax
cmpl %eax, 0x2c(%rbx)
jge 0xdc11
movl %eax, 0x2c(%rbx)
leaq 0x207e8(%rip), %rax     # 0x2e400
cmpl $0x3, (%rax)
jge 0xdc27
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x203ca(%rip), %rax     # 0x2dff8
movq (%rax), %r14
callq 0x37fd
leaq 0x20a43(%rip), %r15     # 0x2e680
subsd (%r15), %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x3794
movsd %xmm0, (%rsp)
callq 0x37fd
subsd (%r15), %xmm0
movsd (%rsp), %xmm1
divsd %xmm0, %xmm1
movl 0x1c(%rbx), %ecx
movl 0x7c(%rbx), %r8d
leaq 0x15f88(%rip), %rsi     # 0x23bfb
leaq 0x15fb0(%rip), %rdx     # 0x23c2a
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
movb $0x2, %al
callq 0x2210
jmp 0xdc1d
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/shortk.c
// Function: mg_sub_print_path
void mg_sub_print_path(FILE *fp, const gfa_t *g, int32_t n, mg_pathv_t *path)
{
	int32_t i;
	for (i = 0; i < n; ++i) {
		mg_pathv_t *p = &path[i];
		fprintf(fp, "[%d]\t%d\t%s\t%d\t%d\n", i, p->v, g->seg[p->v>>1].name, p->d, p->pre);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %r14d
movq %rsi, %r15
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %r14d
movq %rdi, %r12
addq $0x8, %rbx
leaq 0x14a3f(%rip), %r13     # 0x23d25
xorl %ebp, %ebp
cmpq %rbp, %r14
je 0xf322
movq 0x10(%r15), %rax
movl -0x8(%rbx), %ecx
movl -0x4(%rbx), %r9d
movl %ecx, %edx
shrl %edx
shlq $0x6, %rdx
movq 0x18(%rax,%rdx), %r8
movl (%rbx), %eax
movl %eax, (%rsp)
movq %r12, %rdi
movq %r13, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x2210
incq %rbp
addq $0xc, %rbx
jmp 0xf2e8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/miniwfa.c
// Function: mwf_opt_init
void mwf_opt_init(mwf_opt_t *opt)
{
	memset(opt, 0, sizeof(*opt));
	opt->x  = 4; // corresponding SW score: m=1, x=3, o1=4, e1=3/2, o2=15, e2=1/2
	opt->o1 = 4, opt->e1 = 2;
	opt->o2 = 15, opt->e2 = 1;
	opt->kmer = 13, opt->max_occ = 2, opt->min_len = 30;
}

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
andq $0x0, 0x30(%rdi)
movups %xmm0, (%rdi)
movups %xmm0, 0x20(%rdi)
movaps 0x144ca(%rip), %xmm0    # 0x23d40
movups %xmm0, 0x4(%rdi)
movl $0x1, 0x14(%rdi)
movabsq $0xd00000002, %rax      # imm = 0xD00000002
movq %rax, 0x28(%rdi)
movl $0x1e, 0x30(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/miniwfa.c
// Function: wf_stripe_init
static wf_stripe_t *wf_stripe_init(void *km, int32_t max_pen)
{
	int32_t i;
	wf_stripe_t *wf;
	wf = Kcalloc(km, wf_stripe_t, 1);
	wf->max_pen = max_pen;
	wf->n = max_pen + 1;
	wf->a = Kcalloc(km, wf_slice_t, wf->n);
	wf->lo = wf->hi = 0;
	for (i = 0; i < wf->n; ++i) {
		wf_slice_t *f;
		wf_stripe_add(km, wf, 0, 0);
		f = &wf->a[wf->top];
		f->H[0] = f->E1[0] = f->E2[0] = f->F1[0] = f->F2[0] = WF_NEG_INF;
	}
	wf->s = 0;
	wf->a[wf->top].H[0] = -1;
	return wf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
pushq $0x1
popq %rsi
pushq $0x20
popq %rdx
callq 0x24f0
movq %rax, %r14
movl %ebp, 0xc(%rax)
incl %ebp
movl %ebp, 0x8(%rax)
movslq %ebp, %rsi
pushq $0x38
popq %rdx
movq %rbx, %rdi
callq 0x24f0
movq %rax, 0x18(%r14)
andq $0x0, 0x10(%r14)
xorl %ebp, %ebp
movl $0xc0000000, %r15d      # imm = 0xC0000000
cmpl 0x8(%r14), %ebp
jge 0x104eb
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf897
movq 0x18(%r14), %rax
movslq 0x4(%r14), %rcx
imulq $0x38, %rcx, %rcx
movq 0x30(%rax,%rcx), %rdx
movl %r15d, (%rdx)
movq 0x28(%rax,%rcx), %rdx
movl %r15d, (%rdx)
movq 0x20(%rax,%rcx), %rdx
movl %r15d, (%rdx)
movq 0x18(%rax,%rcx), %rdx
movl %r15d, (%rdx)
movq 0x10(%rax,%rcx), %rcx
movl %r15d, (%rcx)
incl %ebp
jmp 0x1049e
andl $0x0, (%r14)
movslq 0x4(%r14), %rcx
imulq $0x38, %rcx, %rcx
movq 0x10(%rax,%rcx), %rax
orl $-0x1, (%rax)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/miniwfa.c
// Function: wf_extend1_padded
static inline int32_t wf_extend1_padded(const char *ts, const char *qs, int32_t k, int32_t d)
{
	uint64_t cmp = 0;
	const char *ts_ = ts + 1;
	const char *qs_ = qs + d + 1;
	while (1) {
		uint64_t x = *(uint64_t*)(ts_ + k); // warning: unaligned memory access
		uint64_t y = *(uint64_t*)(qs_ + k);
		cmp = x ^ y;
		if (cmp == 0) k += 8;
		else break;
	}
	k += __builtin_ctzl(cmp) >> 3;
	return k;
}

// Assembly:
movslq %ecx, %rax
movslq %edx, %r8
leaq (%r8,%rdi), %rcx
incq %rcx
addq %r8, %rax
addq %rax, %rsi
incq %rsi
xorl %eax, %eax
movq (%rcx,%rax), %rdi
movq (%rsi,%rax), %r8
addq $0x8, %rax
cmpq %r8, %rdi
je 0x10525
xorq %rdi, %r8
bsfq %r8, %rcx
shrl $0x3, %ecx
addl %ecx, %edx
addl %edx, %eax
addl $-0x8, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/miniwfa.c
// Function: wf_stripe_destroy
static void wf_stripe_destroy(void *km, wf_stripe_t *wf)
{
	int32_t i;
	for (i = 0; i < wf->n; ++i)
		kfree(km, wf->a[i].mem);
	kfree(km, wf->a);
	kfree(km, wf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x8
popq %r14
xorl %r15d, %r15d
movslq 0x8(%rbx), %rax
movq 0x18(%rbx), %rsi
cmpq %rax, %r15
jge 0x1088d
movq (%rsi,%r14), %rsi
xorl %edi, %edi
callq 0x2577
incq %r15
addq $0x38, %r14
jmp 0x1086c
xorl %edi, %edi
callq 0x2577
xorl %edi, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x2577
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/miniwfa.c
// Function: wf_cigar_push1
static void wf_cigar_push1(void *km, wf_cigar_t *c, int32_t op, int32_t len)
{
	if (c->n && op == (c->cigar[c->n-1]&0xf)) {
		c->cigar[c->n-1] += len<<4;
	} else {
		if (c->n == c->m) {
			c->m = c->m + (c->m>>1) + 4;
			c->cigar = Krealloc(km, uint32_t, c->cigar, c->m);
		}
		c->cigar[c->n++] = len<<4 | op;
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r14
movslq 0x4(%rsi), %rcx
testq %rcx, %rcx
je 0x12086
movq 0x8(%r14), %rax
movl -0x4(%rax,%rcx,4), %edx
movl %edx, %esi
andl $0xf, %esi
cmpl %ebp, %esi
jne 0x12086
shll $0x4, %ebx
addl %ebx, %edx
movl %edx, -0x4(%rax,%rcx,4)
jmp 0x120c7
cmpl (%r14), %ecx
jne 0x120b1
movl %ecx, %eax
sarl %eax
addl %ecx, %eax
addl $0x4, %eax
movl %eax, (%r14)
movq 0x8(%r14), %rsi
movslq %eax, %rdx
shlq $0x2, %rdx
callq 0x2774
movq %rax, 0x8(%r14)
movl 0x4(%r14), %ecx
jmp 0x120b5
movq 0x8(%r14), %rax
shll $0x4, %ebx
orl %ebp, %ebx
leal 0x1(%rcx), %edx
movl %edx, 0x4(%r14)
movslq %ecx, %rcx
movl %ebx, (%rax,%rcx,4)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/miniwfa.c
// Function: mwf_wfa_auto
void mwf_wfa_auto(void *km, const mwf_opt_t *opt0, int32_t tl, const char *ts, int32_t ql, const char *qs, mwf_rst_t *r)
{
	mwf_opt_t opt = *opt0;
	opt.step = 0, opt.max_iter = 100000000;
	mwf_wfa_exact(km, &opt, tl, ts, ql, qs, r);
	if (r->s < 0) {
		if (opt.flag & MWF_F_CIGAR) opt.step = 5000;
		opt.max_iter = -1;
		mwf_wfa_chain(km, &opt, tl, ts, ql, qs, r);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, %rbx
movl %r8d, %ebp
movq %rcx, %r14
movl %edx, %r15d
movq %rdi, %r12
movq 0x80(%rsp), %r13
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movups 0x20(%rsi), %xmm2
leaq 0x10(%rsp), %rax
movaps %xmm1, 0x10(%rax)
movaps %xmm2, 0x20(%rax)
movq 0x30(%rsi), %rcx
movq %rcx, 0x30(%rax)
movaps %xmm0, (%rax)
andl $0x0, 0x18(%rax)
movq $0x5f5e100, 0x20(%rax)  # imm = 0x5F5E100
movq %r13, (%rsp)
movq %rax, %rsi
movq %r14, %rcx
callq 0x108a3
cmpl $0x0, (%r13)
jns 0x12167
testb $0x1, 0x10(%rsp)
je 0x12145
movl $0x1388, 0x28(%rsp)     # imm = 0x1388
leaq 0x10(%rsp), %rsi
orq $-0x1, 0x20(%rsi)
movq %r13, (%rsp)
movq %r12, %rdi
movl %r15d, %edx
movq %r14, %rcx
movl %ebp, %r8d
movq %rbx, %r9
callq 0x115ee
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/miniwfa.c
// Function: wf_next_prep
static void wf_next_prep(void *km, const mwf_opt_t *opt, wf_stripe_t *wf, int32_t lo, int32_t hi,
						 int32_t **H, int32_t **E1, int32_t **F1, int32_t **E2, int32_t **F2,
						 const int32_t **pHx, const int32_t **pHo1, const int32_t **pHo2,
						 const int32_t **pE1, const int32_t **pF1, const int32_t **pE2, const int32_t **pF2)
{
	const wf_slice_t *fx, *fo1, *fo2, *fe1, *fe2;
	wf_slice_t *ft;
	wf_stripe_add(km, wf, lo, hi);
	ft  = &wf->a[wf->top];
	fx  = wf_stripe_get(wf, opt->x);
	fo1 = wf_stripe_get(wf, opt->o1 + opt->e1);
	fo2 = wf_stripe_get(wf, opt->o2 + opt->e2);
	fe1 = wf_stripe_get(wf, opt->e1);
	fe2 = wf_stripe_get(wf, opt->e2);
	*pHx = fx->H, *pHo1 = fo1->H, *pHo2 = fo2->H, *pE1 = fe1->E1, *pE2 = fe2->E2, *pF1 = fe1->F1, *pF2 = fe2->F2;
	*H = ft->H, *E1 = ft->E1, *E2 = ft->E2, *F1 = ft->F1, *F2 = ft->F2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdx, %rsi
movl %ecx, %edx
movl %r8d, %ecx
callq 0xf897
movq 0x18(%r14), %r12
movslq 0x4(%r14), %rax
imulq $0x38, %rax, %r13
movl 0x4(%r15), %esi
movq %r14, %rdi
callq 0x1246f
movq %rax, 0x8(%rsp)
movl 0xc(%r15), %ebp
movl 0x8(%r15), %esi
addl %ebp, %esi
movq %r14, %rdi
callq 0x1246f
movq %rax, (%rsp)
movl 0x14(%r15), %ebx
movl 0x10(%r15), %esi
addl %ebx, %esi
movq %r14, %rdi
callq 0x1246f
movq %rax, %r15
movq %r14, %rdi
movl %ebp, %esi
callq 0x1246f
movq %rax, %rbp
movq %r14, %rdi
movl %ebx, %esi
callq 0x1246f
movq 0x8(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq 0x70(%rsp), %rdx
movq %rcx, (%rdx)
movq (%rsp), %rcx
movq 0x10(%rcx), %rcx
movq 0x78(%rsp), %rdx
movq %rcx, (%rdx)
movq 0x10(%r15), %rcx
movq 0x80(%rsp), %rdx
movq %rcx, (%rdx)
movq 0x18(%rbp), %rcx
movq 0x88(%rsp), %rdx
movq %rcx, (%rdx)
movq 0x20(%rax), %rcx
movq 0x98(%rsp), %rdx
movq %rcx, (%rdx)
movq 0x28(%rbp), %rcx
movq 0x90(%rsp), %rdx
movq %rcx, (%rdx)
movq 0x30(%rax), %rax
movq 0xa0(%rsp), %rcx
movq %rax, (%rcx)
movq 0x10(%r12,%r13), %rax
movq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movq 0x18(%r12,%r13), %rax
movq 0x50(%rsp), %rcx
movq %rax, (%rcx)
movq 0x20(%r12,%r13), %rax
movq 0x60(%rsp), %rcx
movq %rax, (%rcx)
movq 0x28(%r12,%r13), %rax
movq 0x58(%rsp), %rcx
movq %rax, (%rcx)
movq 0x30(%r12,%r13), %rax
movq 0x68(%rsp), %rcx
movq %rax, (%rcx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/miniwfa.c
// Function: mg_fc_kmer
static int32_t mg_fc_kmer(int32_t len, const char *seq, int32_t rid, int32_t k, uint64_t *a)
{
	int32_t i, l, n;
	uint64_t x, mask = (1ULL<<k*2) - 1;
	for (i = l = 0, x = 0, n = 0; i < len; ++i) {
		int32_t c = seq_nt4_table[(uint8_t)seq[i]];
		if (c < 4) {
			x = (x << 2 | c) & mask;
			if (++l >= k) a[n++] = (x<<1|rid) << 32 | i;
		} else l = 0, x = 0;
	}
	return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movl %ecx, %r9d
leal (%r9,%r9), %ecx
movabsq $-0x1, %r10
shlq %cl, %r10
notq %r10
shlq $0x20, %rdx
xorl %ecx, %ecx
testl %edi, %edi
cmovlel %ecx, %edi
leaq 0x1be4d(%rip), %r11     # 0x2e300
xorl %eax, %eax
xorl %ebx, %ebx
xorl %ebp, %ebp
cmpq %rcx, %rdi
je 0x124fd
movzbl (%rsi,%rcx), %r14d
movzbl (%r11,%r14), %r14d
cmpq $0x3, %r14
ja 0x124f4
leaq (%r14,%rbx,4), %rbx
andq %r10, %rbx
incl %ebp
cmpl %r9d, %ebp
jl 0x124f8
movq %rbx, %r14
shlq $0x21, %r14
orq %rdx, %r14
addq %rcx, %r14
movslq %eax, %r15
incl %eax
movq %r14, (%r8,%r15,8)
jmp 0x124f8
xorl %ebx, %ebx
xorl %ebp, %ebp
incq %rcx
jmp 0x124b9
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/index.c
// Function: mg_idx_init
mg_idx_t *mg_idx_init(int k, int w, int b)
{
	mg_idx_t *gi;
	if (k*2 < b) b = k * 2;
	if (w < 1) w = 1;
	KCALLOC(0, gi, 1);
	gi->w = w, gi->k = k, gi->b = b;
	KCALLOC(0, gi->B, 1<<b);
	return gi;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %r14d
leal (%r14,%r14), %ebp
cmpl %edx, %ebp
cmovgel %edx, %ebp
cmpl $0x2, %esi
pushq $0x1
popq %r13
cmovll %r13d, %ebx
pushq $0x1
popq %rsi
pushq $0x30
popq %r15
xorl %edi, %edi
movq %r15, %rdx
callq 0x24f0
movq %rax, %r12
movl %ebx, 0x14(%rax)
movl %r14d, 0x18(%rax)
movl %ebp, 0x10(%rax)
movl %ebp, %ecx
shll %cl, %r13d
movslq %r13d, %rsi
xorl %edi, %edi
movq %r15, %rdx
callq 0x24f0
movq %rax, 0x28(%r12)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/index.c
// Function: mg_idx_destroy
void mg_idx_destroy(mg_idx_t *gi)
{
	uint32_t i;
	if (gi == 0) return;
	if (gi->B) {
		for (i = 0; i < 1U<<gi->b; ++i) {
			free(gi->B[i].p);
			free(gi->B[i].a.a);
			mg_hidx_destroy((idxhash_t*)gi->B[i].h);
		}
		free(gi->B);
	}
	gfa_edseq_destroy(gi->n_seg, gi->es);
	free(gi);
}

// Assembly:
testq %rdi, %rdi
je 0x125e0
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x28(%rdi)
je 0x125c8
xorl %ebp, %ebp
movb 0x10(%rbx), %cl
movl %ebp, %eax
shrl %cl, %eax
movq 0x28(%rbx), %rdi
testl %eax, %eax
jne 0x125c3
movl %ebp, %eax
imulq $0x30, %rax, %r14
movq 0x20(%rdi,%r14), %rdi
callq 0x2040
movq 0x28(%rbx), %rax
movq 0x10(%rax,%r14), %rdi
callq 0x2040
movq 0x28(%rbx), %rax
movq 0x28(%rax,%r14), %rdi
callq 0x125e1
incl %ebp
jmp 0x12584
callq 0x2040
movl 0x20(%rbx), %edi
movq 0x8(%rbx), %rsi
callq 0x97be
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2040
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/index.c
// Function: mg_idx_hget
const uint64_t *mg_idx_hget(const void *h_, const uint64_t *q, int suflen, uint64_t minier, int *n)
{
	khint_t k;
	const idxhash_t *h = (const idxhash_t*)h_;
	*n = 0;
	if (h == 0) return 0;
	k = mg_hidx_get(h, minier>>suflen<<1);
	if (k == kh_end(h)) return 0;
	if (kh_key(h, k)&1) { // special casing when there is only one k-mer
		*n = 1;
		return &kh_val(h, k);
	} else {
		*n = (uint32_t)kh_val(h, k);
		return &q[kh_val(h, k)>>32];
	}
}

// Assembly:
andl $0x0, (%r8)
testq %rdi, %rdi
je 0x12696
movq %rcx, %rax
movl %edx, %ecx
shrq %cl, %rax
movq 0x10(%rdi), %rdx
testq %rdx, %rdx
je 0x12696
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movb (%rdi), %cl
movl $0x1, %r9d
shll %cl, %r9d
leaq (%rax,%rax), %r10
imull $0x9e3779b9, %eax, %r11d # imm = 0x9E3779B9
negb %cl
shrl %cl, %r11d
leal -0x1(%r9), %ecx
movq 0x8(%rdi), %rdi
xorl %eax, %eax
movl %r11d, %ebx
movl %ebx, %r14d
shrl $0x5, %r14d
movl (%rdi,%r14,4), %ebp
btl %ebx, %ebp
jae 0x126d0
movl %ebx, %r14d
movq %r14, %r15
shlq $0x4, %r15
movq (%rdx,%r15), %r15
xorq %r10, %r15
cmpq $0x2, %r15
jb 0x12699
incl %ebx
andl %ecx, %ebx
cmpl %r11d, %ebx
jne 0x12664
jmp 0x126d0
xorl %eax, %eax
retq
cmpl %r9d, %ebx
jne 0x126a2
xorl %eax, %eax
jmp 0x126d0
shlq $0x4, %r14
testb $0x1, (%rdx,%r14)
jne 0x126c1
addq %r14, %rdx
movq 0x8(%rdx), %rax
movl %eax, (%r8)
shrq $0x20, %rax
leaq (%rsi,%rax,8), %rax
jmp 0x126d0
movl $0x1, (%r8)
leaq (%rdx,%r14), %rax
addq $0x8, %rax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/index.c
// Function: mg_idx_cal_quantile
void mg_idx_cal_quantile(const mg_idx_t *gi, int32_t m, float f[], int32_t q[])
{
	int32_t i;
	uint64_t n = 0;
	khint_t *a, k;
	for (i = 0; i < 1<<gi->b; ++i)
		if (gi->B[i].h) n += kh_size((idxhash_t*)gi->B[i].h);
	a = (uint32_t*)malloc(n * 4);
	for (i = 0, n = 0; i < 1<<gi->b; ++i) {
		idxhash_t *h = (idxhash_t*)gi->B[i].h;
		if (h == 0) continue;
		for (k = 0; k < kh_end(h); ++k) {
			if (!kh_exist(h, k)) continue;
			a[n++] = kh_key(h, k)&1? 1 : (uint32_t)kh_val(h, k);
		}
	}
	for (i = 0; i < m; ++i)
		q[i] = ks_ksmall_uint32_t(n, a, (size_t)((1.0 - (double)f[i]) * n));
	free(a);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x8(%rsp)
movq %rdi, %r13
movb 0x10(%rdi), %cl
pushq $0x1
popq %rbx
movl %ebx, %r14d
shll %cl, %r14d
movq %rdx, (%rsp)
movl %esi, %r15d
xorl %eax, %eax
testl %r14d, %r14d
cmovlel %eax, %r14d
imulq $0x30, %r14, %rcx
xorl %edi, %edi
cmpq %rax, %rcx
je 0x1275e
movq 0x28(%r13), %rdx
movq 0x28(%rdx,%rax), %rdx
testq %rdx, %rdx
je 0x12758
movl 0x4(%rdx), %edx
addq %rdx, %rdi
addq $0x30, %rax
jmp 0x1273f
shlq $0x2, %rdi
callq 0x2280
movq %rax, %r12
xorl %eax, %eax
pushq $0x1
popq %rdx
xorl %ebp, %ebp
cmpq %r14, %rax
je 0x127e0
movq 0x28(%r13), %rcx
imulq $0x30, %rax, %rsi
movq 0x28(%rcx,%rsi), %rsi
testq %rsi, %rsi
je 0x127db
movq 0x10(%rsi), %rdi
leaq 0x8(%rdi), %r8
xorl %r9d, %r9d
testq %rdi, %rdi
je 0x127a2
movb (%rsi), %cl
movq %rdx, %r10
shlq %cl, %r10
jmp 0x127a5
xorl %r10d, %r10d
cmpq %r10, %r9
jae 0x127db
movq 0x8(%rsi), %rcx
movq %r9, %r10
shrq $0x5, %r10
movl (%rcx,%r10,4), %ecx
btl %r9d, %ecx
jae 0x127d2
testb $0x1, -0x8(%r8)
movl %ebx, %ecx
jne 0x127cb
movl (%r8), %ecx
movl %ecx, (%r12,%rbp,4)
incq %rbp
incq %r9
addq $0x10, %r8
jmp 0x12793
incq %rax
jmp 0x12771
movq %rbp, %xmm0
punpckldq 0x11913(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1191b(%rip), %xmm0    # 0x24110
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, 0x10(%rsp)
xorl %ebx, %ebx
testl %r15d, %r15d
cmovlel %ebx, %r15d
movq 0x8(%rsp), %r14
movq (%rsp), %r13
cmpq %rbx, %r15
je 0x1286a
cvtss2sd (%r13,%rbx,4), %xmm0
movsd 0x118f3(%rip), %xmm1    # 0x24120
subsd %xmm0, %xmm1
mulsd 0x10(%rsp), %xmm1
cvttsd2si %xmm1, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x118dd(%rip), %xmm1    # 0x24128
cvttsd2si %xmm1, %rdx
andq %rcx, %rdx
orq %rax, %rdx
movq %rbp, %rdi
movq %r12, %rsi
callq 0xcc38
movl %eax, (%r14,%rbx,4)
incq %rbx
jmp 0x12819
movq %r12, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2040
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/index.c
// Function: mg_index_core
mg_idx_t *mg_index_core(gfa_t *g, int k, int w, int b, int n_threads)
{
	mg_idx_t *gi;
	mg128_v a = {0,0,0};
	int i;

	if (mg_gfa_overlap(g)) {
		if (mg_verbose >= 1)
			fprintf(stderr, "[E::%s] minigraph doesn't work with graphs containing overlapping segments\n", __func__);
		return 0;
	}
	gi = mg_idx_init(k, w, b);
	gi->g = g;

	for (i = 0; i < g->n_seg; ++i) {
		gfa_seg_t *s = &g->seg[i];
		a.n = 0;
		mg_sketch(0, s->seq, s->len, w, k, i, &a); // TODO: this can be parallelized
		mg_idx_add(gi, a.n, a.a);
	}
	free(a.a);
	kt_for(n_threads, worker_post, gi, 1<<gi->b);
	return gi;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r8d, %ebp
movl %ecx, %ebx
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
callq 0x12bff
testl %eax, %eax
je 0x12c74
leaq 0x1b79c(%rip), %rax     # 0x2e400
cmpl $0x0, (%rax)
jg 0x12dd4
xorl %ebx, %ebx
jmp 0x12dc2
movl %r15d, %edi
movl %r14d, %esi
movl %ebx, %edx
callq 0x12504
movq %rax, %rbx
movq %r12, (%rax)
xorl %r9d, %r9d
movl %ebp, 0x1c(%rsp)
movl %r14d, 0x18(%rsp)
movl %r15d, 0x14(%rsp)
movq %r12, 0x38(%rsp)
movl 0x4(%r12), %eax
cmpq %rax, %r9
jae 0x12d9c
movq 0x10(%r12), %rax
andq $0x0, 0x20(%rsp)
movq %r9, %rcx
shlq $0x6, %rcx
movq 0x20(%rax,%rcx), %rsi
movl (%rax,%rcx), %edx
leaq 0x20(%rsp), %rax
movq %rax, (%rsp)
xorl %edi, %edi
movl %r14d, %ecx
movl %r15d, %r8d
movq %r9, 0x40(%rsp)
callq 0xc1e8
movb 0x10(%rbx), %cl
pushq $-0x1
popq %rax
movl %eax, %r14d
shll %cl, %r14d
movl 0x20(%rsp), %r15d
movq 0x30(%rsp), %r12
notl %r14d
testl %r15d, %r15d
movl $0x0, %eax
cmovlel %eax, %r15d
shlq $0x4, %r15
xorl %r13d, %r13d
cmpq %r13, %r15
je 0x12d7c
movq 0x28(%rbx), %rax
movl 0x1(%r12,%r13), %ecx
andl %r14d, %ecx
imulq $0x30, %rcx, %rdx
leaq (%rax,%rdx), %rbp
movq (%rax,%rdx), %rcx
cmpq 0x8(%rax,%rdx), %rcx
jne 0x12d5b
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
pushq $0x2
popq %rax
cmoveq %rax, %rdx
movq %rdx, 0x8(%rbp)
movq 0x10(%rbp), %rsi
shlq $0x4, %rdx
xorl %edi, %edi
callq 0x2774
movq %rax, 0x10(%rbp)
movq (%rbp), %rcx
jmp 0x12d5f
movq 0x10(%rbp), %rax
leaq (%r12,%r13), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, (%rbp)
shlq $0x4, %rcx
movups (%rdx), %xmm0
movups %xmm0, (%rax,%rcx)
addq $0x10, %r13
jmp 0x12d0c
movq 0x40(%rsp), %r9
incq %r9
movl 0x1c(%rsp), %ebp
movl 0x18(%rsp), %r14d
movl 0x14(%rsp), %r15d
movq 0x38(%rsp), %r12
jmp 0x12c9d
movq 0x30(%rsp), %rdi
callq 0x2040
movb 0x10(%rbx), %cl
pushq $0x1
popq %rax
shll %cl, %eax
movslq %eax, %rcx
leaq 0x3f(%rip), %rsi        # 0x12df7
movl %ebp, %edi
movq %rbx, %rdx
callq 0x2968
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1b21d(%rip), %rax     # 0x2dff8
movq (%rax), %rdi
leaq 0x113c5(%rip), %rsi     # 0x241aa
leaq 0x1140a(%rip), %rdx     # 0x241f6
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x2210
jmp 0x12dc2
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/index.c
// Function: worker_post
static void worker_post(void *g, long i, int tid)
{
	mg_idx_t *gi = (mg_idx_t*)g;
	mg_idx_bucket_t *b = &gi->B[i];
	if (b->a.n == 0) return;
	b->h = (idxhash_t*)mg_idx_a2h(0, b->a.n, b->a.a, gi->b, &b->p, &b->n);
	kfree(0, b->a.a);
	b->a.n = b->a.m = 0, b->a.a = 0;
}

// Assembly:
pushq %rbx
movq 0x28(%rdi), %rbx
imulq $0x30, %rsi, %rax
movq (%rbx,%rax), %rsi
testq %rsi, %rsi
je 0x12e3c
addq %rax, %rbx
movq 0x10(%rbx), %rdx
movl 0x10(%rdi), %ecx
leaq 0x20(%rbx), %r8
leaq 0x18(%rbx), %r9
xorl %edi, %edi
callq 0x1288a
movq %rax, 0x28(%rbx)
movq 0x10(%rbx), %rsi
xorl %edi, %edi
callq 0x2577
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/index.c
// Function: mg_index
mg_idx_t *mg_index(gfa_t *g, const mg_idxopt_t *io, int n_threads, mg_mapopt_t *mo)
{
	int32_t i, j;
	mg_idx_t *gi;
	for (i = 0; i < g->n_seg; ++i) { // uppercase
		gfa_seg_t *s = &g->seg[i];
		for (j = 0; j < s->len; ++j)
			if (s->seq[j] >= 'a' && s->seq[j] <= 'z')
				s->seq[j] -= 32;
	}
	gi = mg_index_core(g, io->k, io->w, io->bucket_bits, n_threads);
	if (gi == 0) return 0;
	gi->es = gfa_edseq_init(gi->g);
	gi->n_seg = g->n_seg;
	if (mg_verbose >= 3)
		fprintf(stderr, "[M::%s::%.3f*%.2f] indexed the graph\n", __func__,
				realtime() - mg_realtime0, cputime() / (realtime() - mg_realtime0));
	if (mo) mg_opt_update(gi, mo, 0);
	return gi;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movl %edx, %r8d
movq %rdi, %r14
xorl %eax, %eax
movl 0x4(%r14), %ecx
cmpq %rcx, %rax
jae 0x12e96
movq %rax, %rcx
shlq $0x6, %rcx
addq 0x10(%r14), %rcx
xorl %edx, %edx
movslq (%rcx), %rdi
cmpq %rdi, %rdx
jge 0x12e91
movq 0x20(%rcx), %rdi
movb (%rdi,%rdx), %r9b
leal -0x61(%r9), %r10d
cmpb $0x19, %r10b
ja 0x12e8c
addb $-0x20, %r9b
movb %r9b, (%rdi,%rdx)
incq %rdx
jmp 0x12e6a
incq %rax
jmp 0x12e54
movl (%rsi), %edx
movl 0x4(%rsi), %eax
movl 0x8(%rsi), %ecx
movq %r14, %rdi
movl %eax, %esi
callq 0x12c2a
movq %rax, %r15
testq %rax, %rax
je 0x12ee2
movq (%r15), %rdi
callq 0x96ee
movq %rax, 0x8(%r15)
movl 0x4(%r14), %eax
movl %eax, 0x20(%r15)
leaq 0x1b535(%rip), %rax     # 0x2e400
cmpl $0x3, (%rax)
jge 0x12ef1
testq %rbx, %rbx
je 0x12ee2
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0xdb9a
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x1b100(%rip), %rax     # 0x2dff8
movq (%rax), %r14
callq 0x37fd
leaq 0x1b779(%rip), %r12     # 0x2e680
subsd (%r12), %xmm0
movsd %xmm0, 0x10(%rsp)
callq 0x3794
movsd %xmm0, 0x8(%rsp)
callq 0x37fd
subsd (%r12), %xmm0
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
leaq 0x112ca(%rip), %rsi     # 0x24204
leaq 0x112e9(%rip), %rdx     # 0x2422a
movq %r14, %rdi
movsd 0x10(%rsp), %xmm0
movb $0x2, %al
callq 0x2210
jmp 0x12ed0