LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: is_unreliable_hits(long long, long long, long long, unsigned long, trans_chain*)
inline int is_unreliable_hits(long long rev, long long ref_p, long long tLen, uint64_t uID, trans_chain* t_ch)
{
    uint64_t i;
    long long p_beg, p_end;
    bed_in* p = NULL;
    if(rev)
    {
        p_end = ref_p;
        p_beg = p_end + 1 - tLen;
    }
    else
    {
        p_beg = ref_p; 
        p_end = p_beg + tLen - 1;
    }
    if(p_beg < 0) p_beg = 0;
    if(p_end < 0) p_end = 0;

    p = &(t_ch->bed.a[uID]);
    for (i = 0; i < p->n; i++)
    {
        if(inter_interval(p_beg, p_end, p->a[i].beg, p->a[i].end, NULL, NULL)) break;
    }
    if(p->n > 0 && i < p->n) return 1;

    return 0;
}

// Assembly:
movq %rsi, %rax
subq %rdx, %rax
incq %rax
testq %rdi, %rdi
leaq -0x1(%rsi,%rdx), %rdx
cmoveq %rsi, %rax
cmovneq %rsi, %rdx
xorl %esi, %esi
testq %rax, %rax
cmovleq %rsi, %rax
testq %rdx, %rdx
cmovleq %rsi, %rdx
movq 0x30(%r8), %r8
imulq $0x18, %rcx, %rcx
leaq (%r8,%rcx), %rdi
movq (%r8,%rcx), %rcx
pushq $0x8
popq %r9
movq %rsi, %r8
cmpq %rsi, %rcx
je 0x121e2d
movq %r9, %r10
movq 0x10(%rdi), %r11
leaq 0x1(%r8), %rsi
addq $0x10, %r9
cmpl %edx, -0x8(%r11,%r10)
jg 0x121e09
cmpl (%r11,%r10), %eax
jg 0x121e09
xorl %eax, %eax
cmpq %rcx, %r8
setb %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_opt_init(mc_opt_t*, int, double, unsigned long)
void mc_opt_init(mc_opt_t *opt, int32_t n_perturb, double f_perturb, uint64_t seed)
{
	memset(opt, 0, sizeof(mc_opt_t));
	opt->n_perturb = n_perturb;
	opt->f_perturb = f_perturb;
	opt->max_iter = 1000;
	opt->seed = seed;
	opt->n_s_perturb = n_perturb;
	opt->n_b_perturb = n_perturb*0.5;
}

// Assembly:
movl %esi, 0x4(%rdi)
movsd %xmm0, 0x10(%rdi)
movl $0x3e8, (%rdi)          # imm = 0x3E8
movq %rdx, 0x18(%rdi)
cvtsi2sd %esi, %xmm0
mulsd 0xc0e7d(%rip), %xmm0    # 0x1e3548
movl %esi, 0xc(%rdi)
cvttsd2si %xmm0, %eax
movl %eax, 0x8(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_merge_dup(mc_g_t*)
void mc_merge_dup(mc_g_t *mg) // MUST BE sorted
{
	uint32_t i, j, k, st;
	w_t w;
	for (st = 0, i = 1, k = 0; i <= mg->e->ma.n; ++i) {
		if (i == mg->e->ma.n || mg->e->ma.a[i].x != mg->e->ma.a[st].x) {
			if (i - st > 1) {
				for (j = st, w = 0; j < i; ++j) {
					w += mg->e->ma.a[j].w;
				}
				mg->e->ma.a[k] = mg->e->ma.a[st];
				mg->e->ma.a[k++].w = w;
			} else mg->e->ma.a[k++] = mg->e->ma.a[st];
			st = i;
		}
	}
	mg->e->ma.n = k;
}

// Assembly:
pushq %r14
pushq %rbx
xorl %eax, %eax
movl $0x1, %ecx
xorl %r9d, %r9d
movl %ecx, %esi
movq 0x28(%rdi), %r10
movl %eax, %edx
cmpq %rsi, 0x18(%r10)
jb 0x12278d
movl %r9d, %r8d
je 0x122716
movq 0x28(%r10), %r11
movq %rsi, %rbx
shlq $0x4, %rbx
movq (%r11,%rbx), %rbx
movq %r8, %r14
shlq $0x4, %r14
cmpq (%r11,%r14), %rbx
je 0x122786
movl %ecx, %r11d
subl %r9d, %r11d
cmpl $0x2, %r11d
jb 0x12276a
movq 0x28(%r10), %r9
movq %r8, %r10
shlq $0x4, %r10
leaq (%r9,%r10), %r11
addq $0x8, %r11
xorpd %xmm0, %xmm0
cmpq %rsi, %r8
jae 0x12274c
addsd (%r11), %xmm0
incq %r8
addq $0x10, %r11
jmp 0x122739
shlq $0x4, %rdx
movups (%r9,%r10), %xmm1
movups %xmm1, (%r9,%rdx)
movq 0x28(%rdi), %rsi
movq 0x28(%rsi), %rsi
movsd %xmm0, 0x8(%rsi,%rdx)
jmp 0x122781
movq 0x28(%r10), %rsi
shlq $0x4, %r8
shlq $0x4, %rdx
movupd (%rsi,%r8), %xmm0
movupd %xmm0, (%rsi,%rdx)
incl %eax
movl %ecx, %r9d
incl %ecx
jmp 0x1226e3
movq %rdx, 0x18(%r10)
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mb_merge_dup(mb_g_t*)
void mb_merge_dup(mb_g_t *mbg) // MUST BE sorted
{
	uint32_t i, j, k, st;
	t_w_t w[4];
	for (st = 0, i = 1, k = 0; i <= mbg->e->ma.n; ++i) {
		if (i == mbg->e->ma.n || mbg->e->ma.a[i].x != mbg->e->ma.a[st].x) {
			if (i - st > 1) {
				w[0] = w[1] = w[2] = w[3] = 0;
				for (j = st; j < i; ++j) {
					w[0] += mbg->e->ma.a[j].w[0];
					w[1] += mbg->e->ma.a[j].w[1];
					w[2] += mbg->e->ma.a[j].w[2];
					w[3] += mbg->e->ma.a[j].w[3];
				}
				mbg->e->ma.a[k] = mbg->e->ma.a[st];
				mbg->e->ma.a[k].w[0] = w[0];
				mbg->e->ma.a[k].w[1] = w[1];
				mbg->e->ma.a[k].w[2] = w[2];
				mbg->e->ma.a[k].w[3] = w[3];
				k++;
			} else mbg->e->ma.a[k++] = mbg->e->ma.a[st];
			st = i;
		}
	}
	mbg->e->ma.n = k;
}

// Assembly:
pushq %r14
pushq %rbx
xorl %eax, %eax
movl $0x1, %ecx
xorl %r9d, %r9d
movl %ecx, %esi
movq 0x8(%rdi), %r10
movl %eax, %edx
cmpq %rsi, 0x18(%r10)
jb 0x122890
movl %r9d, %r8d
je 0x1227d3
movq 0x28(%r10), %r11
imulq $0x28, %rsi, %rbx
movq (%r11,%rbx), %rbx
imulq $0x28, %r8, %r14
cmpq (%r11,%r14), %rbx
je 0x122889
movl %ecx, %r11d
subl %r9d, %r11d
cmpl $0x2, %r11d
jb 0x122856
movq 0x28(%r10), %r9
imulq $0x28, %r8, %r10
leaq (%r9,%r10), %r11
addq $0x18, %r11
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
cmpq %rsi, %r8
jae 0x122818
movupd -0x10(%r11), %xmm2
movupd (%r11), %xmm3
addpd %xmm2, %xmm0
addpd %xmm3, %xmm1
incq %r8
addq $0x28, %r11
jmp 0x1227f7
imulq $0x28, %rdx, %rdx
movq 0x20(%r9,%r10), %rsi
movq %rsi, 0x20(%r9,%rdx)
movupd (%r9,%r10), %xmm2
movupd 0x10(%r9,%r10), %xmm3
movupd %xmm3, 0x10(%r9,%rdx)
movupd %xmm2, (%r9,%rdx)
movq 0x8(%rdi), %rsi
movq 0x28(%rsi), %rsi
movupd %xmm0, 0x8(%rsi,%rdx)
movupd %xmm1, 0x18(%rsi,%rdx)
jmp 0x122884
movq 0x28(%r10), %rsi
imulq $0x28, %r8, %r8
imulq $0x28, %rdx, %rdx
movq 0x20(%rsi,%r8), %r9
movq %r9, 0x20(%rsi,%rdx)
movupd (%rsi,%r8), %xmm0
movupd 0x10(%rsi,%r8), %xmm1
movupd %xmm1, 0x10(%rsi,%rdx)
movupd %xmm0, (%rsi,%rdx)
incl %eax
movl %ecx, %r9d
incl %ecx
jmp 0x1227a2
movq %rdx, 0x18(%r10)
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: init_mc_g_t(ma_ug_t*, asg_t*, signed char*, unsigned int)
mc_g_t *init_mc_g_t(ma_ug_t *ug, asg_t *read_g, int8_t *s, uint32_t renew_s)
{
	mc_g_t *p = NULL; CALLOC(p, 1);
	p->ug = ug;
	p->rg = read_g;
	kv_init(p->s);
	if(s)
	{
		p->s.a = s;
		p->s.n = ug->g->n_seq;
		p->s.m = 0;
		if(renew_s) memset(p->s.a, 0, p->s.n);
	}
	else
	{
		CALLOC(p->s.a, ug->g->n_seq);
		p->s.n = p->s.m = ug->g->n_seq;
	} 
	return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
pushq $0x1
popq %rdi
pushq $0x30
popq %rsi
callq 0x2120
movq %rax, %rbx
movq %r15, 0x18(%rax)
movq %r12, 0x20(%rax)
testq %r14, %r14
je 0x1228ef
movq %r14, 0x10(%rbx)
movq 0x18(%r15), %rax
movl 0x14(%rax), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq %rdx, (%rbx)
andq $0x0, 0x8(%rbx)
testl %ebp, %ebp
je 0x122914
movq %r14, %rdi
xorl %esi, %esi
callq 0x20e0
jmp 0x122914
movq 0x18(%r15), %rax
movl 0x14(%rax), %r14d
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x2120
movq %rax, 0x10(%rbx)
movq %r14, 0x8(%rbx)
movq %r14, (%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: get_mb_edge(mb_match_t const*, unsigned int, unsigned int)
static mb_edge_t *get_mb_edge(const mb_match_t *ma, uint32_t sid1, uint32_t sid2)
{
	mb_edge_t *o = pt_a(*ma, sid1);
	uint32_t n = pt_n(*ma, sid1), k;
	for (k = 0; k < n; ++k)
		if (((uint32_t)o[k].x) == sid2)
			return &(o[k]);
	return NULL;
}

// Assembly:
movq 0x10(%rdi), %rax
movq 0x28(%rdi), %rdi
movl %esi, %ecx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
shrq $0x20, %rax
incq %rcx
imulq $0x28, %rax, %rax
leaq (%rax,%rdi), %rsi
addq $-0x28, %rsi
decq %rcx
je 0x122c8f
leaq 0x28(%rsi), %rax
cmpl %edx, 0x28(%rsi)
movq %rax, %rsi
jne 0x122c7d
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: update_mb_nodes_t(kv_u_trans_t*, mc_match_t*, unsigned int)
mb_nodes_t *update_mb_nodes_t(kv_u_trans_t *ref, mc_match_t* ma, uint32_t occ)
{
	uint32_t i, st;
	uint64_t *cc = NULL;
	mb_nodes_t *x = NULL; CALLOC(x, 1);
	x->bid.n = x->u.n = x->idx.n = 0;
	kv_resize(uint32_t, x->idx, occ);
	x->idx.n = occ;
	memset(x->idx.a, -1, sizeof(uint32_t)*x->idx.n);
	kvec_t_u32_warp stack; kv_init(stack.a);
	uint32_t *flag = NULL; MALLOC(flag, occ);

	cc = mb_nodes_core(ref, ma, occ, flag, &stack);

	for (st = 0, i = 1; i <= occ; ++i) {
        if (i == occ || cc[st]>>32 != cc[i]>>32) {
			assgin_mb_node(x, ref, ma, flag, &stack, cc, st, i - st);
            st = i;
        }
	}
	
	free(cc); free(flag);
	kv_destroy(stack.a);

	/*******************************for debug************************************/
	// debug_mb_nodes(x, ref, ma);
	/*******************************for debug************************************/
	return x;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rsi, 0x8(%rsp)
movq %rdi, (%rsp)
pushq $0x1
popq %rdi
pushq $0x48
popq %rsi
callq 0x2120
movq %rax, %rbx
movl %ebp, %r12d
xorl %r14d, %r14d
testl %ebp, %ebp
je 0x1236bf
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, %rcx
shrq $0x10, %rcx
orq %rax, %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0x20(%rbx)
leaq 0x4(,%rcx,4), %rdi
callq 0x2280
movq %rax, %rdi
movq %rax, 0x28(%rbx)
jmp 0x1236c1
xorl %edi, %edi
movq %r12, 0x18(%rbx)
shlq $0x2, %r12
movl $0xff, %esi
movq %r12, %rdx
callq 0x20e0
movq %r12, %rdi
callq 0x2280
movq %rax, %r12
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r8
movaps %xmm0, (%r8)
andq $0x0, 0x10(%r8)
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movl %ebp, %edx
movq %rax, %rcx
callq 0x122c92
movq %rax, %r13
pushq $0x1
popq %r15
cmpl %ebp, %r15d
ja 0x12375a
je 0x123729
movl %r14d, %eax
movl %r15d, %ecx
movq (%r13,%rcx,8), %rcx
xorq (%r13,%rax,8), %rcx
shrq $0x20, %rcx
je 0x123755
movl %r15d, %eax
subl %r14d, %eax
movq %rbx, %rdi
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r12, %rcx
leaq 0x10(%rsp), %r8
movq %r13, %r9
pushq %rax
pushq %r14
callq 0x122e9c
addq $0x10, %rsp
movl %r15d, %r14d
incl %r15d
jmp 0x12370c
movq %r13, %rdi
callq 0x2220
movq %r12, %rdi
callq 0x2220
movq 0x20(%rsp), %rdi
callq 0x2220
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mb_edges_idx(mb_match_t*)
static void mb_edges_idx(mb_match_t *ma)
{
	uint32_t st, i;
	kv_resize(uint64_t, ma->idx, ma->n_seq);
	ma->idx.n = ma->n_seq;
	memset(ma->idx.a, 0, ma->idx.n*sizeof(uint64_t));
	for (st = 0, i = 1; i <= ma->ma.n; ++i)
		if (i == ma->ma.n || (ma->ma.a[i].x>>32) != (ma->ma.a[st].x>>32))
			ma->idx.a[ma->ma.a[st].x>>32] = (uint64_t)st << 32 | (i - st), st = i;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x38(%rdi), %edx
cmpq %rdx, 0x8(%rdi)
jae 0x123b12
decq %rdx
movq %rdx, %rax
shrq %rax
orq %rdx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x10, %rax
orq %rcx, %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq 0x10(%rbx), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x2370
movq %rax, %rdi
movq %rax, 0x10(%rbx)
movl 0x38(%rbx), %edx
jmp 0x123b16
movq 0x10(%rbx), %rdi
movq %rdx, (%rbx)
shlq $0x3, %rdx
xorl %ebp, %ebp
xorl %esi, %esi
callq 0x20e0
pushq $0x1
popq %rax
movl %eax, %edx
cmpq %rdx, 0x18(%rbx)
jb 0x123b79
movq 0x28(%rbx), %rsi
movl %ebp, %ecx
jne 0x123b43
imulq $0x28, %rcx, %rdx
movq (%rsi,%rdx), %rdx
jmp 0x123b5c
imulq $0x28, %rdx, %rdi
imulq $0x28, %rcx, %rdx
movq (%rsi,%rdx), %rdx
movq (%rsi,%rdi), %rsi
xorq %rdx, %rsi
shrq $0x20, %rsi
je 0x123b75
shlq $0x20, %rcx
movl %eax, %esi
subl %ebp, %esi
orq %rcx, %rsi
movq 0x10(%rbx), %rcx
shrq $0x20, %rdx
movq %rsi, (%rcx,%rdx,8)
movl %eax, %ebp
incl %eax
jmp 0x123b29
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mb_edges_symm(mb_match_t*)
uint32_t mb_edges_symm(mb_match_t *ma)
{
	uint8_t *del = NULL;
	uint32_t i, k, n = 0;
	mb_edge_t *t = NULL, *m = NULL;
	CALLOC(del, ma->ma.n);

	for (i = 0; i < ma->ma.n; ++i) {
		m = &ma->ma.a[i];
		if (ma_x(*m) == ma_y(*m))
		{
			del[i] = 1, ++n;///self overlap
			continue;
		}
		t = get_mb_edge(ma, ma_y(*m), ma_x(*m));
		if(!t)
		{
			del[i] = 1, ++n;///self overlap
			continue;
		} 
		normalize_mb_edge(m, t);
	}

	if (n > 0) {
		for (i = k = 0; i < ma->ma.n; ++i)
			if (!del[i]) ma->ma.a[k++] = ma->ma.a[i];
		ma->ma.n = k;
		mb_edges_idx(ma);
	}

	free(del);
	return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %r15
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0x2120
movq %rbx, %rdi
movq %rax, %r9
xorl %r12d, %r12d
xorl %ebp, %ebp
movq %r15, (%rsp)
movl %r12d, %r12d
cmpq %r12, %r15
jbe 0x123c6a
movq 0x28(%rdi), %r13
imulq $0x28, %r12, %r14
movq (%r13,%r14), %rsi
movq %rsi, %rdx
shrq $0x20, %rdx
movl %esi, %eax
cmpq %rax, %rdx
jne 0x123bdf
movb $0x1, (%r9,%r12)
incl %ebp
jmp 0x123c62
movl %ebp, %ebx
movq %r9, %rbp
movq %rdi, %r15
callq 0x122c5a
testq %rax, %rax
je 0x123c01
addq %r14, %r13
cmpq %rax, %r13
movq %rbp, %r9
jb 0x123c13
movq %r13, %rcx
jmp 0x123c19
movq %rbp, %r9
movb $0x1, (%rbp,%r12)
movl %ebx, %ebp
incl %ebp
movq %r15, %rdi
jmp 0x123c5e
movq %rax, %rcx
movq %r13, %rax
movl %ebx, %ebp
movq %r15, %rdi
movq (%rcx), %rdx
movq %rdx, %rsi
shlq $0x20, %rsi
movq %rsi, (%rax)
movq (%rcx), %rsi
shrdq $0x20, %rdx, %rsi
movq %rsi, (%rax)
movsd 0x8(%rcx), %xmm0
movsd %xmm0, 0x8(%rax)
movsd 0x20(%rcx), %xmm0
movsd %xmm0, 0x20(%rax)
movsd 0x18(%rcx), %xmm0
movsd %xmm0, 0x10(%rax)
movsd 0x10(%rcx), %xmm0
movsd %xmm0, 0x18(%rax)
movq (%rsp), %r15
incl %r12d
jmp 0x123bac
testl %ebp, %ebp
je 0x123cc5
xorl %eax, %eax
xorl %ecx, %ecx
movl %eax, %eax
movl %ecx, %edx
cmpq %rax, %r15
jbe 0x123cb6
cmpb $0x0, (%r9,%rax)
jne 0x123cb2
movq 0x28(%rdi), %rsi
imulq $0x28, %rax, %r10
incl %ecx
imulq $0x28, %rdx, %rdx
movq 0x20(%rsi,%r10), %r8
movq %r8, 0x20(%rsi,%rdx)
movups (%rsi,%r10), %xmm0
movups 0x10(%rsi,%r10), %xmm1
movups %xmm1, 0x10(%rsi,%rdx)
movups %xmm0, (%rsi,%rdx)
movq 0x18(%rdi), %r15
incl %eax
jmp 0x123c72
movq %rdx, 0x18(%rdi)
movq %r9, %rbx
callq 0x123aaa
movq %rbx, %r9
movq %r9, %rdi
callq 0x2220
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: destory_mc_g_t(mc_g_t**)
void destory_mc_g_t(mc_g_t **p)
{
	if(!p || !(*p)) return;
	if((*p)->s.m == 0) (*p)->s.a = NULL;
	kv_destroy((*p)->s);
	if((*p)->e)
	{
		kv_destroy((*p)->e->idx);
		kv_destroy((*p)->e->ma);
		free((*p)->e->cc);
		free((*p)->e);
	}
	free((*p));
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x123d51
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x123d51
cmpq $0x0, 0x8(%rax)
jne 0x123cfe
andq $0x0, 0x10(%rax)
movq (%rbx), %rax
movq 0x10(%rax), %rdi
callq 0x2220
movq (%rbx), %rdi
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x123d4b
movq 0x10(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x28(%rax), %rax
movq 0x28(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x28(%rax), %rax
movq 0x30(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x28(%rax), %rdi
callq 0x2220
movq (%rbx), %rdi
popq %rbx
jmp 0x2220
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_edges_symm(mc_match_t*)
uint32_t mc_edges_symm(mc_match_t *ma)
{
	uint8_t *del = NULL;
	uint32_t i, k, n = 0;
	mc_edge_t *t = NULL, *m = NULL;
	CALLOC(del, ma->ma.n);

	for (i = 0; i < ma->ma.n; ++i) {
		m = &ma->ma.a[i];
		if (ma_x(*m) == ma_y(*m))
		{
			del[i] = 1, ++n;///self overlap
			continue;
		}
		t = get_mc_edge(ma, ma_y(*m), ma_x(*m));
		if(!t)
		{
			del[i] = 1, ++n;///self overlap
			continue;
		} 
		normalize_mc_edge(m, t);
	}

	if (n > 0) {
		for (i = k = 0; i < ma->ma.n; ++i)
			if (!del[i]) ma->ma.a[k++] = ma->ma.a[i];
		ma->ma.n = k;
		mc_edges_idx(ma);
	}

	free(del);
	return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %r15
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0x2120
movq %rbx, %rdi
movq %rax, %r8
xorl %r13d, %r13d
xorl %ebx, %ebx
movq %r15, 0x10(%rsp)
movl %r13d, %r13d
cmpq %r13, %r15
jbe 0x123ed9
movq 0x28(%rdi), %r14
movq %r13, %rbp
shlq $0x4, %rbp
movq (%r14,%rbp), %r12
movq %r12, %rdx
shrq $0x20, %rdx
movl %r12d, %eax
cmpq %rax, %rdx
jne 0x123e4a
movb $0x1, (%r8,%r13)
incl %ebx
jmp 0x123ed1
movl %ebx, 0xc(%rsp)
movq %r8, %rbx
movq %rdi, %r15
movl %r12d, %esi
callq 0x123f41
testq %rax, %rax
je 0x123e98
addq %rbp, %r14
movsd 0x8(%r14), %xmm0
movsd 0x8(%rax), %xmm1
ucomisd %xmm1, %xmm0
movq %rbx, %r8
jae 0x123eab
movq (%rax), %rcx
movq %rcx, %rdx
shlq $0x20, %rdx
movq %rdx, (%r14)
movq (%rax), %rax
shrdq $0x20, %rcx, %rax
movq %rax, (%r14)
movsd %xmm1, 0x8(%r14)
jmp 0x123ec5
movq %rbx, %r8
movb $0x1, (%rbx,%r13)
movl 0xc(%rsp), %ebx
incl %ebx
movq %r15, %rdi
jmp 0x123ecc
movq %r12, %rcx
shlq $0x20, %rcx
movq %rcx, (%rax)
movq (%r14), %rcx
shrdq $0x20, %r12, %rcx
movq %rcx, (%rax)
movsd %xmm0, 0x8(%rax)
movq %r15, %rdi
movl 0xc(%rsp), %ebx
movq 0x10(%rsp), %r15
incl %r13d
jmp 0x123e14
testl %ebx, %ebx
je 0x123f28
xorl %eax, %eax
xorl %ecx, %ecx
movl %eax, %eax
movl %ecx, %edx
cmpq %rax, %r15
jbe 0x123f15
cmpb $0x0, (%r8,%rax)
jne 0x123f11
movq 0x28(%rdi), %rsi
movq %rax, %r9
shlq $0x4, %r9
incl %ecx
shlq $0x4, %rdx
movupd (%rsi,%r9), %xmm0
movupd %xmm0, (%rsi,%rdx)
movq 0x18(%rdi), %r15
incl %eax
jmp 0x123ee1
movq %rdx, 0x18(%rdi)
movl %ebx, %ebp
movq %r8, %rbx
callq 0x123f79
movq %rbx, %r8
movl %ebp, %ebx
movq %r8, %rdi
callq 0x2220
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: get_mc_edge(mc_match_t const*, unsigned int, unsigned int)
static mc_edge_t *get_mc_edge(const mc_match_t *ma, uint32_t sid1, uint32_t sid2)
{
	mc_edge_t *o = pt_a(*ma, sid1);
	uint32_t n = pt_n(*ma, sid1), k;
	for (k = 0; k < n; ++k)
		if (((uint32_t)o[k].x) == sid2)
			return &(o[k]);
	return NULL;
}

// Assembly:
movq 0x10(%rdi), %rax
movq 0x28(%rdi), %rdi
movl %esi, %ecx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
incq %rcx
shrq $0x1c, %rax
andq $-0x10, %rax
leaq (%rax,%rdi), %rsi
addq $-0x10, %rsi
decq %rcx
je 0x123f76
leaq 0x10(%rsi), %rax
cmpl %edx, 0x10(%rsi)
movq %rax, %rsi
jne 0x123f64
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: get_w_scale(kv_u_trans_t*)
double get_w_scale(kv_u_trans_t *ta)
{
	uint32_t i, max_w_i, min_w_i;
	double max_w = 0, min_w = 0, w;
	max_w_i = min_w_i = (uint32_t)-1;
	for (i = 0; i < ta->n; ++i)
	{
		if(ta->a[i].del) continue;
		if(ta->a[i].nw == 0) continue;
		w = (ta->a[i].nw >= 0? ta->a[i].nw:-ta->a[i].nw);
		if(max_w_i == (uint32_t)-1 || max_w < w) max_w = w, max_w_i = i;
		if(min_w_i == (uint32_t)-1 || min_w > w) min_w = w, min_w_i = i;
	}

	if(max_w_i == (uint32_t)-1 || min_w_i == (uint32_t)-1) return 1;
	if(min_w > 1.1) return 1;
	double sc_max = (double)(1<<30), sc_min = 1.1;

	return MIN(sc_max/max_w, sc_min/min_w) + sc_min;
}

// Assembly:
movq (%rdi), %rax
xorpd %xmm1, %xmm1
xorl %edx, %edx
pushq $-0x1
popq %rcx
xorpd %xmm0, %xmm0
movapd 0xc8d77(%rip), %xmm2    # 0x1ed0c0
movl %ecx, %esi
movl %edx, %r8d
movapd %xmm1, %xmm3
unpckhpd %xmm1, %xmm3            # xmm3 = xmm3[1],xmm1[1]
cmpq %r8, %rax
jbe 0x1243d7
movq 0x10(%rdi), %r9
imulq $0x30, %r8, %r8
cmpb $0x0, 0x28(%r9,%r8)
js 0x1243d0
addq %r8, %r9
movsd 0x20(%r9), %xmm5
ucomisd %xmm0, %xmm5
jne 0x12437c
jnp 0x1243d0
movapd %xmm5, %xmm6
xorpd %xmm2, %xmm6
cmpl $-0x1, %esi
sete %r8b
movapd %xmm6, %xmm4
cmpnlesd %xmm5, %xmm4
andpd %xmm4, %xmm6
andnpd %xmm5, %xmm4
orpd %xmm6, %xmm4
ucomisd %xmm1, %xmm4
seta %r9b
orb %r8b, %r9b
movapd %xmm4, %xmm5
testb %r9b, %r9b
jne 0x1243b8
movapd %xmm1, %xmm5
cmovnel %edx, %esi
movsd %xmm5, %xmm1            # xmm1 = xmm5[0],xmm1[1]
cmpl $-0x1, %ecx
je 0x1243ca
ucomisd %xmm4, %xmm3
jbe 0x1243d0
unpcklpd %xmm4, %xmm1            # xmm1 = xmm1[0],xmm4[0]
movl %edx, %ecx
incl %edx
jmp 0x12434b
movsd 0xbeec1(%rip), %xmm0    # 0x1e32a0
cmpl $-0x1, %esi
je 0x124424
cmpl $-0x1, %ecx
je 0x124424
ucomisd 0xc3877(%rip), %xmm3    # 0x1e7c68
ja 0x124424
movapd 0xca785(%rip), %xmm2    # 0x1eeb80
divpd %xmm1, %xmm2
movapd %xmm2, %xmm1
unpckhpd %xmm2, %xmm1            # xmm1 = xmm1[1],xmm2[1]
movapd %xmm2, %xmm0
cmplesd %xmm1, %xmm0
andpd %xmm0, %xmm2
andnpd %xmm1, %xmm0
orpd %xmm2, %xmm0
addsd 0xc3844(%rip), %xmm0    # 0x1e7c68
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: debug_mc_g_t(mc_g_t*)
void debug_mc_g_t(mc_g_t *mg)
{
    fprintf(stderr, "0----------[M::%s]----------\n", __func__);
	mc_edge_t *o = NULL, *s = NULL;
	uint32_t i, k, n, cnt;
	for (i = 0; i < mg->e->n_seq; ++i) 
	{
		o = pt_a(*(mg->e), i); n = pt_n(*(mg->e), i);
		for (k = 0; k < n; ++k)
		{
			if(ma_x(o[k]) != i) fprintf(stderr, "ERROR-g\n");
			s = get_mc_edge(mg->e, ma_y(o[k]), ma_x(o[k]));
			if(!s) fprintf(stderr, "ERROR-e\n");
			if(s)
			{
				if(!(ma_x(*s) == ma_y(o[k]) && ma_y(*s) == ma_x(o[k]) && s->w == o[k].w))
				{
					fprintf(stderr, "ERROR-f\n");
				}
			}
		}

		for (k = cnt = 0; k < mg->e->ma.n; ++k)
		{
			if(ma_x(mg->e->ma.a[k]) == i) cnt++;
		}

		if(cnt != n) fprintf(stderr, "ERROR-h\n");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x12e1e6(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0xc9eba(%rip), %rsi     # 0x1eecbe
leaq 0xc9f3c(%rip), %rdx     # 0x1eed47
xorl %r13d, %r13d
xorl %eax, %eax
callq 0x22b0
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rax
movl 0x38(%rax), %ecx
cmpq %rcx, %r13
jae 0x124f6a
movq 0x10(%rax), %rcx
movq (%rcx,%r13,8), %rcx
movq %rcx, %r15
shrq $0x1c, %r15
andq $-0x10, %r15
addq 0x28(%rax), %r15
movq %rcx, 0x10(%rsp)
movl %ecx, %ebx
shlq $0x4, %rbx
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0x124f05
movq (%r15,%r12), %r14
movq %r14, %rbp
shrq $0x20, %rbp
cmpq %r13, %rbp
jne 0x124ed9
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x123f41
leaq 0xc9edb(%rip), %rdi     # 0x1eed5d
testq %rax, %rax
leaq 0xc9eda(%rip), %rsi     # 0x1eed66
je 0x124ec2
movq (%rax), %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
movq %rsi, %rdi
cmpl %r14d, %edx
jne 0x124ec2
movl %ecx, %ecx
movq %rsi, %rdi
cmpl %ebp, %ecx
jne 0x124ec2
movsd 0x8(%rax), %xmm0
ucomisd 0x8(%r15,%r12), %xmm0
movq %rsi, %rdi
jne 0x124ec2
jp 0x124ec2
addq $0x10, %r12
jmp 0x124e4f
movq 0x12e117(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0x124ebc
movq 0x12e100(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0xc9e6a(%rip), %rdi     # 0x1eed54
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
movq (%r15,%r12), %r14
movq %r14, %rbp
shrq $0x20, %rbp
jmp 0x124e68
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x18(%rax), %rcx
xorl %esi, %esi
xorl %edx, %edx
movl %esi, %esi
cmpq %rsi, %rcx
jbe 0x124f3e
movq 0x28(%rax), %rdi
movq %rsi, %r8
shlq $0x4, %r8
movl 0x4(%rdi,%r8), %edi
xorl %r8d, %r8d
cmpq %r13, %rdi
sete %r8b
addl %r8d, %edx
incl %esi
jmp 0x124f16
cmpl 0x10(%rsp), %edx
jne 0x124f4c
incq %r13
jmp 0x124e15
movq 0x12e08d(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0xc9e12(%rip), %rdi     # 0x1eed6f
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0x124f44
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_bp_t_init(mc_match_t*, mc_svaux_t*, bubble_type*, unsigned long)
mc_bp_t *mc_bp_t_init(mc_match_t *ma, mc_svaux_t *b_aux, bubble_type* bub, uint64_t n_thread)
{
	uint32_t i, k, n;
	mc_bp_t *bp = NULL; 
	ma_utg_t *u = NULL;
	CALLOC(bp, 1);
	bp->b_aux = b_aux;
	bp->ma = ma;
	bp->b_b = bub;
	bp->n_thread = n_thread;
	CALLOC(bp->lock, bub->ug->g->n_seq);
	CALLOC(bp->res, n_thread);
	CALLOC(bp->vis, n_thread);
	for (i = 0; i < n_thread; i++)
	{
		bp->vis[i].m = bp->vis[i].n = bub->ug->g->n_seq;
		CALLOC(bp->vis[i].a, bp->vis[i].n);
	}
	

	MALLOC(bp->idx, bub->chain_weight.n+1);
	bp->idx_n = bp->occ = 0;
	for (i = 0; i < bub->chain_weight.n; i++)
	{
		bp->idx[i] = bp->occ;
		bp->idx_n++;
		if(bub->chain_weight.a[i].del) continue;
		u = &(bub->b_ug->u.a[bub->chain_weight.a[i].id]);///list of bubbles
		for (k = 0; k < u->n; k++)
		{
			get_bubbles(bub, u->a[k]>>33, NULL, NULL, NULL, &n, NULL);
			bp->occ += n;
		}
	}
	bp->idx[i] = bp->occ;
	fprintf(stderr, "# nodes in chains: %lu, # chains: %lu\n", bp->occ, bp->idx_n);
	return bp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %rbp
pushq $0x1
popq %r12
pushq $0x50
popq %rsi
movq %r12, %rdi
callq 0x2120
movq %rax, %rbx
movq %r13, 0x38(%rax)
movq %rbp, 0x40(%rax)
movq %r14, (%rax)
movq %r15, 0x20(%rax)
movq 0x10(%r14), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %r13d
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
movq %r13, %rdi
movq %r12, %rsi
callq 0x2120
movq %rax, 0x30(%rbx)
pushq $0x20
popq %rsi
movq %r15, %rdi
callq 0x2120
movq %rax, 0x28(%rbx)
pushq $0x18
popq %rsi
movq %r15, 0x10(%rsp)
movq %r15, %rdi
callq 0x2120
movq %rax, %rbp
movq %rax, 0x48(%rbx)
xorl %eax, %eax
movl %eax, %r12d
cmpq 0x10(%rsp), %r12
jae 0x1251f2
imulq $0x18, %r12, %r15
movq %r13, (%rbp,%r15)
movq %r13, 0x8(%rbp,%r15)
movq %r13, %rdi
pushq $0x1
popq %rsi
callq 0x2120
movq %rax, 0x10(%rbp,%r15)
leal 0x1(%r12), %eax
jmp 0x1251c3
movq 0xc8(%r14), %r13
leaq 0x8(,%r13,8), %rdi
callq 0x2280
movq %rax, 0x8(%rbx)
xorl %r15d, %r15d
leaq 0x1c(%rsp), %rbp
xorl %ecx, %ecx
movq %rax, 0x20(%rsp)
movl %ecx, %esi
movq %r15, (%rax,%rsi,8)
cmpq %rsi, %r13
jbe 0x1252ae
incq %rcx
movq %rcx, 0x10(%rbx)
movq 0xd8(%r14), %rdx
shlq $0x5, %rsi
cmpb $0x0, 0x18(%rdx,%rsi)
jne 0x125219
movq %rcx, 0x10(%rsp)
addq %rsi, %rdx
imulq $0x28, 0x10(%rdx), %r13
movq 0xc0(%r14), %rax
addq 0x10(%rax), %r13
xorl %r12d, %r12d
movl 0x10(%r13), %eax
cmpq %rax, %r12
jae 0x125298
movq 0x18(%r13), %rax
movq (%rax,%r12,8), %rsi
shrq $0x21, %rsi
andq $0x0, (%rsp)
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rbp, %r9
callq 0xf6ab5
movl 0x1c(%rsp), %eax
addq %rax, %r15
movq %r15, 0x18(%rbx)
incq %r12
jmp 0x12525c
movq 0xc8(%r14), %r13
movq 0x10(%rsp), %rcx
movq 0x20(%rsp), %rax
jmp 0x125219
movq 0x12dd2b(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0xc9ab9(%rip), %rsi     # 0x1eed78
movq %r15, %rdx
xorl %eax, %eax
callq 0x22b0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: destroy_mc_bp_t(mc_bp_t**)
void destroy_mc_bp_t(mc_bp_t **bp)
{
	uint32_t i;
	for (i = 0; i < (*bp)->n_thread; i++)
	{
		free((*bp)->vis[i].a);
	}
	free((*bp)->idx);
	free((*bp)->res);
	free((*bp)->lock);
	free((*bp));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %eax, %eax
movl %eax, %r14d
movq (%rbx), %rax
cmpq %r14, 0x20(%rax)
jbe 0x125308
movq 0x48(%rax), %rax
imulq $0x18, %r14, %rcx
movq 0x10(%rax,%rcx), %rdi
callq 0x2220
leal 0x1(%r14), %eax
jmp 0x1252e4
movq 0x8(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x28(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x30(%rax), %rdi
callq 0x2220
movq (%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_svaux_init(mc_g_t const*, unsigned long)
mc_svaux_t *mc_svaux_init(const mc_g_t *mg, uint64_t x)
{
	uint32_t st, i, max_cc = 0;
	mc_match_t *ma = mg->e;
	mc_svaux_t *b;
	CALLOC(b, 1);
	b->x = x;
	for (st = 0, i = 1; i <= ma->n_seq; ++i)
		if (i == ma->n_seq || ma->cc[st]>>32 != ma->cc[i]>>32)
			max_cc = max_cc > i - st? max_cc : i - st, st = i;
	kv_init(b->cc_edge);
	MALLOC(b->cc_node, max_cc);
	///CALLOC(b->s, ma->n_seq);
	b->s = mg->s.a;
	CALLOC(b->s_opt, ma->n_seq);
	MALLOC(b->bfs, ma->n_seq);

	MALLOC(b->bfs_mark, ma->n_seq); 
	memset(b->bfs_mark, -1, ma->n_seq*sizeof(uint32_t));
	
	CALLOC(b->z, ma->n_seq);
	CALLOC(b->z_opt, ma->n_seq);
	CALLOC(b->f, ma->n_seq);
	return b;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x28(%rdi), %r13
pushq $0x1
popq %r12
pushq $0x68
popq %rsi
movq %r12, %rdi
callq 0x2120
movq %rax, %rbx
movq %r14, (%rax)
movl 0x38(%r13), %r14d
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %r14, %r12
ja 0x125395
je 0x125383
movq 0x30(%r13), %rdx
movl %ecx, %esi
movq (%rdx,%r12,8), %rdi
xorq (%rdx,%rsi,8), %rdi
shrq $0x20, %rdi
je 0x125390
movl %r12d, %edx
subl %ecx, %edx
cmpl %edx, %eax
cmovbel %edx, %eax
movl %r12d, %ecx
incq %r12
jmp 0x125368
movl %eax, %edi
shlq $0x2, %rdi
callq 0x2280
movq %rax, 0x28(%rbx)
movq 0x10(%r15), %rax
movq %rax, 0x50(%rbx)
pushq $0x1
popq %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2120
movq %rax, 0x58(%rbx)
leaq (,%r14,4), %r12
movq %r12, %rdi
callq 0x2280
movq %rax, 0x30(%rbx)
movq %r12, %rdi
callq 0x2280
movq %rax, 0x38(%rbx)
movq %rax, %rdi
movl $0xff, %esi
movq %r12, %rdx
callq 0x20e0
pushq $0x10
popq %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x2120
movq %rax, 0x40(%rbx)
movq %r14, %rdi
movq %r12, %rsi
callq 0x2120
movq %rax, 0x48(%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x2120
movq %rax, 0x60(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_svaux_destroy(mc_svaux_t*)
void mc_svaux_destroy(mc_svaux_t *b)
{
	b->s = NULL;
	kv_destroy(b->cc_edge); free(b->cc_node);
	free(b->s); free(b->s_opt);
	free(b->z); free(b->z_opt);
	free(b->bfs); free(b->bfs_mark);
	free(b->f);
	free(b);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
andq $0x0, 0x50(%rdi)
movq 0x20(%rdi), %rdi
callq 0x2220
movq 0x28(%rbx), %rdi
callq 0x2220
movq 0x50(%rbx), %rdi
callq 0x2220
movq 0x58(%rbx), %rdi
callq 0x2220
movq 0x40(%rbx), %rdi
callq 0x2220
movq 0x48(%rbx), %rdi
callq 0x2220
movq 0x30(%rbx), %rdi
callq 0x2220
movq 0x38(%rbx), %rdi
callq 0x2220
movq 0x60(%rbx), %rdi
callq 0x2220
movq %rbx, %rdi
popq %rbx
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mb_svaux_init(mb_g_t const*, unsigned long)
mb_svaux_t *mb_svaux_init(const mb_g_t *mg, uint64_t x)
{
	uint32_t st, i, max_cc = 0;
	mb_match_t *ma = mg->e;
	mb_svaux_t *b;
	CALLOC(b, 1);
	b->x = x;
	for (st = 0, i = 1; i <= ma->n_seq; ++i)
		if (i == ma->n_seq || ma->cc[st]>>32 != ma->cc[i]>>32)
			max_cc = max_cc > i - st? max_cc : i - st, st = i;
	kv_init(b->cc_edge);
	MALLOC(b->cc_node, max_cc);

	b->u = mg->u->u.a;
	CALLOC(b->u_opt, ma->n_seq);

	MALLOC(b->bfs, ma->n_seq);
	MALLOC(b->bfs_mark, ma->n_seq); 
	memset(b->bfs_mark, -1, ma->n_seq*sizeof(uint32_t));
	
	CALLOC(b->f, ma->n_seq);
	return b;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdi), %r13
pushq $0x1
popq %r12
pushq $0x58
popq %rsi
movq %r12, %rdi
callq 0x2120
movq %rax, %rbx
movq %r14, (%rax)
movl 0x38(%r13), %r14d
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %r14, %r12
ja 0x1254ed
je 0x1254db
movq 0x30(%r13), %rdx
movl %ecx, %esi
movq (%rdx,%r12,8), %rdi
xorq (%rdx,%rsi,8), %rdi
shrq $0x20, %rdi
je 0x1254e8
movl %r12d, %edx
subl %ecx, %edx
cmpl %edx, %eax
cmovbel %edx, %eax
movl %r12d, %ecx
incq %r12
jmp 0x1254c0
movl %eax, %edi
shlq $0x2, %rdi
callq 0x2280
movq %rax, 0x28(%rbx)
movq (%r15), %rax
movq 0x40(%rax), %rax
movq %rax, 0x40(%rbx)
pushq $0x38
popq %rsi
movq %r14, %rdi
callq 0x2120
movq %rax, 0x48(%rbx)
leaq (,%r14,4), %r15
movq %r15, %rdi
callq 0x2280
movq %rax, 0x30(%rbx)
movq %r15, %rdi
callq 0x2280
movq %rax, 0x38(%rbx)
movq %rax, %rdi
movl $0xff, %esi
movq %r15, %rdx
callq 0x20e0
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x2120
movq %rax, 0x50(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mb_svaux_destroy(mb_svaux_t*)
void mb_svaux_destroy(mb_svaux_t *b)
{
	b->u = NULL;
	kv_destroy(b->cc_edge); free(b->cc_node);
	free(b->u); free(b->u_opt);
	free(b->bfs); free(b->bfs_mark);
	free(b->f);
	free(b);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
andq $0x0, 0x40(%rdi)
movq 0x20(%rdi), %rdi
callq 0x2220
movq 0x28(%rbx), %rdi
callq 0x2220
movq 0x40(%rbx), %rdi
callq 0x2220
movq 0x48(%rbx), %rdi
callq 0x2220
movq 0x30(%rbx), %rdi
callq 0x2220
movq 0x38(%rbx), %rdi
callq 0x2220
movq 0x50(%rbx), %rdi
callq 0x2220
movq %rbx, %rdi
popq %rbx
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: init_mc_svaux_t_mul(mc_g_t const*, unsigned long)
mc_svaux_t_mul *init_mc_svaux_t_mul(const mc_g_t *mg, uint64_t n_threads)
{
	uint32_t st, i;
	mc_match_t *ma = mg->e;
	mc_svaux_t_mul *b; CALLOC(b, 1);
	for (st = 0, i = 1, b->n_t = 0; i <= ma->n_seq; ++i)
	{
		if (i == ma->n_seq || ma->cc[st]>>32 != ma->cc[i]>>32)
		{
			b->n_t++;
		}
	}
	b->n_g = b->n_t;
	if(n_threads < b->n_t) b->n_t = n_threads;
	
	kv_init(b->cc_edge);
	MALLOC(b->bfs_mark, ma->n_seq);
	memset(b->bfs_mark, -1, ma->n_seq*sizeof(uint32_t));
	CALLOC(b->s_opt, ma->n_seq);
	CALLOC(b->z, ma->n_seq);
	CALLOC(b->z_opt, ma->n_seq);
	b->s = mg->s.a;

	kv_init(b->bs); CALLOC(b->bs.a, b->n_t); 
	b->bs.n = b->bs.m = b->n_t;
	for (i = 0; i < b->bs.n; i++)
	{
		kv_init(b->bs.a[i].cc_node);
		kv_init(b->bs.a[i].bfs);
		b->bs.a[i].bfs_mark = b->bfs_mark;
		b->bs.a[i].z = b->z;
		b->bs.a[i].z_opt = b->z_opt;
		b->bs.a[i].s = b->s;
		b->bs.a[i].s_opt = b->s_opt;
	}
	return b;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r12
movq %rdi, 0x10(%rsp)
movq 0x28(%rdi), %r14
pushq $0x1
popq %r13
pushq $0x60
popq %rsi
movq %r13, %rdi
callq 0x2120
movq %rax, %rbx
movl 0x38(%r14), %r15d
xorl %eax, %eax
cmpq %r15, %r13
ja 0x125607
je 0x1255fd
movq 0x30(%r14), %rcx
movq (%rcx,%r13,8), %rdx
xorq (%rcx), %rdx
shrq $0x20, %rdx
je 0x125602
incl %eax
movl %eax, 0x58(%rbx)
incq %r13
jmp 0x1255e5
movl %eax, 0x5c(%rbx)
movl %eax, %eax
cmpq %r12, %rax
jbe 0x125618
movl %r12d, 0x58(%rbx)
movq %r12, %rax
movq %rax, 0x8(%rsp)
leaq (,%r15,4), %r14
movq %r14, %rdi
callq 0x2280
movq %rax, %r12
movq %rax, 0x30(%rbx)
movq %rax, %rdi
movl $0xff, %esi
movq %r14, %rdx
callq 0x20e0
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0x2120
movq %rax, %rbp
movq %rax, 0x50(%rbx)
pushq $0x10
popq %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x2120
movq %rax, %r14
movq %rax, 0x38(%rbx)
movq %r15, %rdi
movq %r13, %rsi
callq 0x2120
movq %rax, %r15
movq %rax, 0x40(%rbx)
movq 0x10(%rsp), %rax
movq 0x10(%rax), %r13
movq %r13, 0x48(%rbx)
pushq $0x68
popq %rsi
movq 0x8(%rsp), %rdi
callq 0x2120
movq %rax, 0x10(%rbx)
movq 0x8(%rsp), %rcx
movq %rcx, 0x8(%rbx)
movq %rcx, (%rbx)
imulq $0x68, %rcx, %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x1256d2
movq %r12, 0x40(%rax,%rdx)
movq %r14, 0x48(%rax,%rdx)
movq %r15, 0x50(%rax,%rdx)
movq %r13, 0x58(%rax,%rdx)
movq %rbp, 0x60(%rax,%rdx)
addq $0x68, %rdx
jmp 0x1256ae
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: destroy_mc_svaux_t_mul(mc_svaux_t_mul*)
void destroy_mc_svaux_t_mul(mc_svaux_t_mul *b)
{
	uint32_t i;
	kv_destroy(b->cc_edge);
	free(b->bfs_mark);
	free(b->s_opt);
	free(b->z);
	free(b->z_opt);
	b->s = NULL;
	for (i = 0; i < b->bs.n; i++)
	{
		kv_destroy(b->bs.a[i].cc_node);
		kv_destroy(b->bs.a[i].bfs);
	}
	kv_destroy(b->bs);
	free(b);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
callq 0x2220
movq 0x30(%rbx), %rdi
callq 0x2220
movq 0x50(%rbx), %rdi
callq 0x2220
movq 0x38(%rbx), %rdi
callq 0x2220
movq 0x40(%rbx), %rdi
callq 0x2220
andq $0x0, 0x48(%rbx)
xorl %eax, %eax
movl %eax, %r14d
movq 0x10(%rbx), %rdi
cmpq %r14, (%rbx)
jbe 0x12574e
imulq $0x68, %r14, %r15
movq 0x20(%rdi,%r15), %rdi
callq 0x2220
movq 0x10(%rbx), %rax
movq 0x38(%rax,%r15), %rdi
callq 0x2220
leal 0x1(%r14), %eax
jmp 0x125720
callq 0x2220
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_best(mc_match_t const*, mc_svaux_t*)
uint32_t mc_best(const mc_match_t *ma, mc_svaux_t *b)
{
	uint32_t i, max_i = (uint32_t)-1;
	t_w_t w, max_w;
	for (i = 0, max_w = -1; i < b->cc_size; ++i) {
		uint32_t k = (uint32_t)ma->cc[b->cc_off + i];///uid
		if(b->f[k] || b->s[k] == 0) continue;
		///z += -((t_w_t)(b->s[k])) * (b->z[k].z[0] - b->z[k].z[1]);
		///-((t_w_t)(b->s[k])) * (b->z[k].z[0] - b->z[k].z[1]) current
		///((t_w_t)(b->s[k])) * (b->z[k].z[0] - b->z[k].z[1]) flipped
		w = ((t_w_t)(b->s[k])) * (b->z[k].z[0] - b->z[k].z[1]) * 2;
		if(w <= 0) continue;
		if(w > max_w)
		{
			w = max_w; max_i = k;
		}
	}

	return max_i;
}

// Assembly:
movl 0xc(%rsi), %ecx
xorl %edx, %edx
pushq $-0x1
popq %rax
xorpd %xmm0, %xmm0
movsd 0xbde0c(%rip), %xmm1    # 0x1e3580
cmpl %edx, %ecx
je 0x1257dc
movq 0x30(%rdi), %r8
movl 0x8(%rsi), %r9d
addl %edx, %r9d
movq (%r8,%r9,8), %r8
movl %r8d, %r9d
movq 0x60(%rsi), %r10
cmpb $0x0, (%r10,%r9)
je 0x125799
incl %edx
jmp 0x125774
movq 0x50(%rsi), %r10
movb (%r10,%r9), %r10b
testb %r10b, %r10b
je 0x125795
movsbl %r10b, %r10d
cvtsi2sd %r10d, %xmm3
movq 0x40(%rsi), %r10
shlq $0x4, %r9
movsd (%r10,%r9), %xmm2
subsd 0x8(%r10,%r9), %xmm2
mulsd %xmm3, %xmm2
addsd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jae 0x125795
ucomisd %xmm1, %xmm2
cmoval %r8d, %eax
jmp 0x125795
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mb_score(mb_g_t*, mb_svaux_t*)
t_w_t mb_score(mb_g_t *mbg, mb_svaux_t *b)
{
	uint32_t i;
	t_w_t z = 0;
	mb_match_t *ma = mbg->e;
	for (i = 0; i < b->cc_size; ++i) {
		uint32_t k = (uint32_t)ma->cc[b->cc_off + i];///uid
		///a[0]
		z += -(t_w_t)(mbg->u->u.a[k].s[0]) * (mbg->u->u.a[k].z[0] - mbg->u->u.a[k].z[1]);
		///a[1]
		z += -(t_w_t)(mbg->u->u.a[k].s[1]) * (mbg->u->u.a[k].z[2] - mbg->u->u.a[k].z[3]);
	}
	return z;
}

// Assembly:
movq 0x8(%rdi), %rax
movl 0xc(%rsi), %ecx
xorl %edx, %edx
xorpd %xmm0, %xmm0
cmpl %edx, %ecx
je 0x12584e
movq 0x30(%rax), %r8
movl 0x8(%rsi), %r9d
addl %edx, %r9d
movl (%r8,%r9,8), %r8d
movq (%rdi), %r9
movq 0x40(%r9), %r9
imulq $0x38, %r8, %r8
movsbl 0x10(%r9,%r8), %r10d
cvtsi2sd %r10d, %xmm1
movsd 0x18(%r9,%r8), %xmm2
movsd 0x28(%r9,%r8), %xmm3
subsd 0x20(%r9,%r8), %xmm2
mulsd %xmm1, %xmm2
movsbl 0x11(%r9,%r8), %r10d
cvtsi2sd %r10d, %xmm1
subsd 0x30(%r9,%r8), %xmm3
subsd %xmm2, %xmm0
mulsd %xmm1, %xmm3
subsd %xmm3, %xmm0
incl %edx
jmp 0x1257ea
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_score(mc_match_t const*, mc_svaux_t*)
t_w_t mc_score(const mc_match_t *ma, mc_svaux_t *b)
{
	uint32_t i;
	t_w_t z = 0;
	for (i = 0; i < b->cc_size; ++i) {
		uint32_t k = (uint32_t)ma->cc[b->cc_off + i];///uid
		z += -((t_w_t)(b->s[k])) * (b->z[k].z[0] - b->z[k].z[1]);
	}
	return z;
}

// Assembly:
movl 0xc(%rsi), %eax
xorl %ecx, %ecx
xorpd %xmm0, %xmm0
cmpl %ecx, %eax
je 0x12589a
movq 0x30(%rdi), %rdx
movl 0x8(%rsi), %r8d
addl %ecx, %r8d
movl (%rdx,%r8,8), %edx
movq 0x40(%rsi), %r8
movq 0x50(%rsi), %r9
movsbl (%r9,%rdx), %r9d
cvtsi2sd %r9d, %xmm1
shlq $0x4, %rdx
movsd (%r8,%rdx), %xmm2
subsd 0x8(%r8,%rdx), %xmm2
mulsd %xmm1, %xmm2
subsd %xmm2, %xmm0
incl %ecx
jmp 0x125858
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_score_all(mc_match_t const*, mc_svaux_t*)
t_w_t mc_score_all(const mc_match_t *ma, mc_svaux_t *b)
{
	uint32_t k;
	t_w_t z = 0;
	for (k = 0; k < ma->n_seq; ++k) 
	{
		z += -((t_w_t)(b->s[k])) * (b->z[k].z[0] - b->z[k].z[1]);
	}
	return z;
}

// Assembly:
movl 0x38(%rdi), %eax
xorpd %xmm0, %xmm0
pushq $0x8
popq %rcx
xorl %edx, %edx
cmpq %rdx, %rax
je 0x1258d8
movq 0x50(%rsi), %rdi
movsbl (%rdi,%rdx), %edi
cvtsi2sd %edi, %xmm1
movq 0x40(%rsi), %rdi
movsd -0x8(%rdi,%rcx), %xmm2
subsd (%rdi,%rcx), %xmm2
mulsd %xmm1, %xmm2
subsd %xmm2, %xmm0
incq %rdx
addq $0x10, %rcx
jmp 0x1258a7
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_reset_z(mc_match_t const*, mc_svaux_t*)
void mc_reset_z(const mc_match_t *ma, mc_svaux_t *b)
{
	uint32_t i;
	for (i = 0; i < b->cc_size; ++i) {
		uint32_t k = (uint32_t)ma->cc[b->cc_off + i];///uid
		uint32_t o = ma->idx.a[k] >> 32;
		uint32_t j, n = (uint32_t)ma->idx.a[k];
		b->z[k].z[0] = b->z[k].z[1] = 0;
		for (j = 0; j < n; ++j) {
			const mc_edge_t *e = &ma->ma.a[o + j];
			uint32_t t = ma_y(*e);
			if (b->s[t] > 0) b->z[k].z[0] += e->w;
			else if (b->s[t] < 0) b->z[k].z[1] += e->w;
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
movl 0xc(%rsi), %eax
xorl %ecx, %ecx
xorps %xmm0, %xmm0
cmpl %eax, %ecx
jae 0x125973
movq 0x10(%rdi), %r8
movq 0x30(%rdi), %rdx
movl 0x8(%rsi), %r9d
addl %ecx, %r9d
movl (%rdx,%r9,8), %edx
movq (%r8,%rdx,8), %r9
movl %r9d, %r8d
shrq $0x20, %r9
movq 0x40(%rsi), %r11
shlq $0x4, %rdx
leaq (%r11,%rdx), %r10
addq $0x8, %r10
addq %r11, %rdx
movups %xmm0, -0x8(%r10)
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
subq $0x1, %r8
jb 0x12596c
movq 0x28(%rdi), %rbx
movl %r9d, %r14d
shlq $0x4, %r14
leaq (%rbx,%r14), %r11
movl (%rbx,%r14), %ebx
movq 0x50(%rsi), %r14
cmpb $0x0, (%r14,%rbx)
jle 0x12595a
addsd 0x8(%r11), %xmm1
movsd %xmm1, (%rdx)
jmp 0x125967
jns 0x125967
addsd 0x8(%r11), %xmm2
movsd %xmm2, (%r10)
incq %r9
jmp 0x12592a
incl %ecx
jmp 0x1258e4
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_reset_z_debug(mc_match_t const*, mc_svaux_t*)
void mc_reset_z_debug(const mc_match_t *ma, mc_svaux_t *b)
{
	uint32_t i;
	t_w_t z[2];
	for (i = 0; i < b->cc_size; ++i) {
		uint32_t k = (uint32_t)ma->cc[b->cc_off + i];///uid
		uint32_t o = ma->idx.a[k] >> 32;
		uint32_t j, n = (uint32_t)ma->idx.a[k];
		z[0] = b->z[k].z[0]; z[1] = b->z[k].z[1];
		b->z[k].z[0] = b->z[k].z[1] = 0;
		for (j = 0; j < n; ++j) {
			const mc_edge_t *e = &ma->ma.a[o + j];
			uint32_t t = ma_y(*e);
			if (b->s[t] > 0) b->z[k].z[0] += e->w;
			else if (b->s[t] < 0) b->z[k].z[1] += e->w;
		}
		if(z[0] != b->z[k].z[0]) fprintf(stderr, "ERROR1\n");
		if(z[1] != b->z[k].z[1]) fprintf(stderr, "ERROR2\n");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
xorps %xmm3, %xmm3
pushq $0x7
popq %r12
pushq $0x1
popq %r13
cmpl 0xc(%rbx), %r15d
jae 0x125a90
movq 0x10(%r14), %rax
movq 0x30(%r14), %rcx
movl 0x8(%rbx), %edx
addl %r15d, %edx
movl (%rcx,%rdx,8), %ebp
movq (%rax,%rbp,8), %rcx
movl %ecx, %eax
shrq $0x20, %rcx
movq 0x40(%rbx), %rdx
shlq $0x4, %rbp
leaq (%rdx,%rbp), %rsi
addq $0x8, %rsi
addq %rbp, %rdx
movsd -0x8(%rsi), %xmm1
movsd (%rsi), %xmm4
movups %xmm3, -0x8(%rsi)
xorpd %xmm0, %xmm0
xorpd %xmm2, %xmm2
subq $0x1, %rax
jb 0x125a22
movq 0x28(%r14), %r8
movl %ecx, %r9d
shlq $0x4, %r9
leaq (%r8,%r9), %rdi
movl (%r8,%r9), %r8d
movq 0x50(%rbx), %r9
cmpb $0x0, (%r9,%r8)
jle 0x125a12
addsd 0x8(%rdi), %xmm2
movsd %xmm2, (%rdx)
jmp 0x125a1d
jns 0x125a1d
addsd 0x8(%rdi), %xmm0
movsd %xmm0, (%rsi)
incq %rcx
jmp 0x1259e3
ucomisd %xmm2, %xmm1
jne 0x125a3a
jp 0x125a3a
ucomisd %xmm0, %xmm4
jne 0x125a6f
jp 0x125a6f
incl %r15d
jmp 0x125996
movq 0x12d59f(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0xc2ce1(%rip), %rdi     # 0x1e872c
movq %r12, %rsi
movq %r13, %rdx
movsd %xmm4, (%rsp)
callq 0x2410
movsd (%rsp), %xmm4
xorps %xmm3, %xmm3
movq 0x40(%rbx), %rax
movsd 0x8(%rax,%rbp), %xmm0
jmp 0x125a2a
movq 0x12d56a(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0xc2cb4(%rip), %rdi     # 0x1e8734
movq %r12, %rsi
movq %r13, %rdx
callq 0x2410
xorps %xmm3, %xmm3
jmp 0x125a32
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_best_flip(mc_match_t const*, mc_svaux_t*)
void mc_best_flip(const mc_match_t *ma, mc_svaux_t *b)
{
	uint32_t idx;
	for (idx = 0; idx < b->cc_size; ++idx) {
		b->f[(uint32_t)ma->cc[b->cc_off + idx]] = 0;
        ///uint32_t k = (uint32_t)ma->cc[b->cc_off + idx];///uid
	}
	while (1)
	{
		idx = mc_best(ma, b);
		if(idx == (uint32_t)-1) break;
		mc_set_spin(ma, b, idx, -b->s[idx]);
		b->f[idx] = 1;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
cmpl 0xc(%rbx), %eax
jae 0x125faa
movq 0x60(%rbx), %rcx
movq 0x30(%r14), %rdx
movl 0x8(%rbx), %esi
addl %eax, %esi
movl (%rdx,%rsi,8), %edx
movb $0x0, (%rcx,%rdx)
incl %eax
jmp 0x125f65
movq 0x50(%rbx), %rcx
movl %eax, %r15d
movb (%rcx,%r15), %cl
xorl %edx, %edx
subb %cl, %dl
movsbl %dl, %ecx
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x125fc0
movq 0x60(%rbx), %rax
movb $0x1, (%rax,%r15)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x125760
cmpl $-0x1, %eax
jne 0x125f82
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_set_spin(mc_match_t const*, mc_svaux_t*, unsigned int, signed char)
static void mc_set_spin(const mc_match_t *ma, mc_svaux_t *b, uint32_t k, int8_t s)
{
	uint32_t o, j, n;
	int8_t s0 = b->s[k];
	if (s0 == s) return;
	o = ma->idx.a[k] >> 32;
	n = (uint32_t)ma->idx.a[k];
	for (j = 0; j < n; ++j) {
		const mc_edge_t *e = &ma->ma.a[o + j];
		uint32_t t = ma_y(*e);///1->z[0]; (-1)->z[1];
		if (s0 != 0) b->z[t].z[(s0 < 0)] -= e->w; 
		if (s  != 0) b->z[t].z[(s  < 0)] += e->w;
	}
	b->s[k] = s;
}

// Assembly:
movq 0x50(%rsi), %rax
movl %edx, %edx
movzbl (%rax,%rdx), %r8d
cmpb %cl, %r8b
je 0x126061
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x10(%rdi), %r9
movq (%r9,%rdx,8), %r10
movl %r10d, %r9d
shrq $0x20, %r10
movl %r8d, %r11d
shrl $0x7, %r11d
movl %ecx, %ebx
shrb $0x7, %bl
movzbl %bl, %ebx
subq $0x1, %r9
jb 0x126057
movq 0x28(%rdi), %r14
movl %r10d, %r12d
shlq $0x4, %r12
leaq (%r14,%r12), %r15
movl (%r14,%r12), %r14d
testq %r8, %r8
je 0x126034
movq %r14, %r12
shlq $0x4, %r12
addq 0x40(%rsi), %r12
movsd (%r12,%r11,8), %xmm0
subsd 0x8(%r15), %xmm0
movsd %xmm0, (%r12,%r11,8)
testb %cl, %cl
je 0x126052
shlq $0x4, %r14
addq 0x40(%rsi), %r14
movsd 0x8(%r15), %xmm0
addsd (%r14,%rbx,8), %xmm0
movsd %xmm0, (%r14,%rbx,8)
incq %r10
jmp 0x125ff9
movb %cl, (%rax,%rdx)
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: reset_mc_bp_iter(mc_bp_t*, mc_bp_iter*, unsigned long)
void reset_mc_bp_iter(mc_bp_t* bp, mc_bp_iter *x, uint64_t id)
{
	ma_utg_t *u = NULL;
	uint32_t i, n, occ;
	for (i = 0; i < bp->idx_n; i++)
	{
		if(id >= bp->idx[i]) break;
	}

	id -= bp->idx[i];
	x->chain_id = bp->b_b->chain_weight.a[i].id;
	u = &(bp->b_b->b_ug->u.a[x->chain_id]);
	for (i = occ = 0; i < u->n; i++)
	{
		get_bubbles(bp->b_b, u->a[i]>>33, NULL, NULL, NULL, &n, NULL);
		occ += n;
		if(id < occ)
		{
			x->bid = i;
			x->uid = id - (occ -n);
			break;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rdi, %r15
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %r8
xorl %edi, %edi
movl %edi, %ecx
movq (%rdx,%rcx,8), %rax
cmpq %rcx, %r8
jbe 0x1260ae
incl %edi
cmpq %rax, %rbx
jb 0x12609c
movq (%r15), %rdx
movq 0xd8(%rdx), %rdi
shlq $0x5, %rcx
movq 0x10(%rdi,%rcx), %rcx
movq %rsi, 0x10(%rsp)
movq %rcx, (%rsi)
movq 0xc0(%rdx), %rdx
imulq $0x28, %rcx, %r13
addq 0x10(%rdx), %r13
subq %rax, %rbx
xorl %ebp, %ebp
leaq 0xc(%rsp), %r12
xorl %eax, %eax
movl %eax, %r14d
movl 0x10(%r13), %eax
cmpq %rax, %rbp
jae 0x126138
movq (%r15), %rdi
movq 0x18(%r13), %rax
movq (%rax,%rbp,8), %rsi
shrq $0x21, %rsi
andq $0x0, (%rsp)
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r12, %r9
callq 0xf6ab5
movl 0xc(%rsp), %eax
addl %r14d, %eax
incq %rbp
cmpq %rax, %rbx
jae 0x1260e4
decq %rbp
movq 0x10(%rsp), %rcx
movq %rbp, 0x8(%rcx)
movl %r14d, %eax
subq %rax, %rbx
movq %rbx, 0x10(%rcx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq