LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: incre_weight(mc_svaux_t*, mc_match_t*, unsigned char*, unsigned int)
t_w_t incre_weight(mc_svaux_t *b_aux, mc_match_t *ma, uint8_t* vis, uint32_t uid)
{
	mc_edge_t *o = NULL;
	uint32_t n, i, t;
	t_w_t w = ((t_w_t)(b_aux->s[uid])) * (b_aux->z[uid].z[0] - b_aux->z[uid].z[1]) * 2;
	t_w_t w_off = 0;
	o = pt_a(*ma, uid);
	n = pt_n(*ma, uid);
	for (i = 0; i < n; ++i) 
	{
		t = ma_y(o[i]);
		if(vis[t] == 0) continue;
        if(t == uid) continue;
		w_off += (b_aux->s[uid]*b_aux->s[t]*o[i].w);
	}
	return w - (w_off*4);//2 for self; 4 for both directions
}

// Assembly:
pushq %rbx
movq 0x40(%rdi), %r8
movq 0x50(%rdi), %rdi
movl %ecx, %r9d
movsbl (%rdi,%r9), %eax
movq 0x10(%rsi), %r10
movq (%r10,%r9,8), %r10
shlq $0x4, %r9
movsd (%r8,%r9), %xmm1
movsd 0x8(%r8,%r9), %xmm2
movq 0x28(%rsi), %r8
movl %r10d, %esi
shlq $0x4, %rsi
shrq $0x1c, %r10
andq $-0x10, %r10
addq %r10, %r8
addq $0x8, %r8
xorpd %xmm0, %xmm0
xorl %r9d, %r9d
cmpq %r9, %rsi
je 0x1261d1
movq -0x8(%r8,%r9), %r11
movl %r11d, %r10d
cmpb $0x0, (%rdx,%r10)
sete %bl
cmpl %ecx, %r11d
sete %r11b
orb %bl, %r11b
jne 0x1261cb
movsbl (%rdi,%r10), %r10d
imull %eax, %r10d
cvtsi2sd %r10d, %xmm3
mulsd (%r8,%r9), %xmm3
addsd %xmm3, %xmm0
addq $0x10, %r9
jmp 0x126192
subsd %xmm2, %xmm1
cvtsi2sd %eax, %xmm2
mulsd %xmm1, %xmm2
addsd %xmm2, %xmm2
mulsd 0xc895f(%rip), %xmm0    # 0x1eeb48
addsd %xmm2, %xmm0
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: best_bp(mc_bp_t*, mc_bp_res*)
uint32_t best_bp(mc_bp_t *bp, mc_bp_res *res)
{
	uint32_t i;
	clean_mc_bp_res(res);
	for (i = 0; i < bp->n_thread; i++)
	{
		clean_mc_bp_res(&(bp->res[i]));
	} 
	kt_for(bp->n_thread, worker_for_min_bp, bp, bp->occ);
	
	for (i = 0; i < bp->n_thread; i++)
	{
		if(bp->res[i].chain_id == (uint32_t)-1) continue;
		if(bp->res[i].w <= 0) continue;
		if((bp->res[i].w > res->w) || (bp->res[i].w == res->w && bp->res[i].id < res->id))
		{
			(*res) = bp->res[i];
		}
	}
	if(res->chain_id != (uint32_t)-1) return 1;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pcmpeqd %xmm0, %xmm0
orq $-0x1, 0x10(%rsi)
movdqu %xmm0, (%rsi)
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, 0x18(%rsi)
xorl %ecx, %ecx
movl %ecx, %ecx
movq 0x20(%r14), %rdi
cmpq %rcx, %rdi
jbe 0x1263dd
movq 0x28(%r14), %rdx
movq %rcx, %rsi
shlq $0x5, %rsi
orq $-0x1, 0x10(%rdx,%rsi)
movdqu %xmm0, (%rdx,%rsi)
movq %rax, 0x18(%rdx,%rsi)
incl %ecx
jmp 0x1263b3
movq 0x18(%r14), %rcx
leaq 0x6c(%rip), %rsi        # 0x126454
movq %r14, %rdx
callq 0xc67c0
xorl %eax, %eax
pxor %xmm0, %xmm0
movl %eax, %eax
cmpq %rax, 0x20(%r14)
jbe 0x126444
movq 0x28(%r14), %rcx
movq %rax, %rdx
shlq $0x5, %rdx
cmpl $-0x1, (%rcx,%rdx)
je 0x126440
addq %rdx, %rcx
movsd 0x18(%rcx), %xmm1
ucomisd %xmm1, %xmm0
jae 0x126440
ucomisd 0x18(%rbx), %xmm1
ja 0x126430
jne 0x126440
jp 0x126440
movl 0x14(%rcx), %edx
cmpl 0x14(%rbx), %edx
jae 0x126440
movupd (%rcx), %xmm1
movups 0x10(%rcx), %xmm2
movups %xmm2, 0x10(%rbx)
movupd %xmm1, (%rbx)
incl %eax
jmp 0x1263f6
xorl %eax, %eax
cmpl $-0x1, (%rbx)
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_set_bp_spin(bubble_type*, mc_match_t*, mc_svaux_t*, mc_bp_t*, unsigned char*, bits_p*, mc_bp_res*)
void mc_set_bp_spin(bubble_type* bub, mc_match_t *ma, mc_svaux_t *b_aux, mc_bp_t* bp,
uint8_t *lock, bits_p *vis, mc_bp_res *res)
{
	uint32_t uid, val = 0, c_bid, c_uid;
	mc_bp_iter i;
	i.chain_id = res->chain_id;
	i.bid = res->f_bid;
	i.uid = res->f_uid;
	memset(vis->a, 0, vis->n);
	while (1)
    {
        uid = next_uid(&i, bub, &c_bid, &c_uid);
        if(uid == (uint32_t)-1) break;
		if(lock[uid] == 0)
		{
			val = 1;
			break;
		}
        if(c_bid == res->l_bid && c_uid == res->l_uid) break;
    }

	if(val == 0)
	{
		fprintf(stderr, "ERROR-1\n");
		return;
	}

	i.bid = res->f_bid;
	i.uid = res->f_uid;
	while (1)
	{
		uid = next_uid(&i, bub, &c_bid, &c_uid);
        if(uid == (uint32_t)-1) break;
        if(vis->a[uid] == 1) continue;
        lock[uid] = 1;
        vis->a[uid] = 1;
		mc_set_spin(ma, b_aux, uid, -b_aux->s[uid]);
        if(c_bid == res->l_bid && c_uid == res->l_uid) break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rdx, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdi, %r13
movq 0x70(%rsp), %r12
movsd (%r12), %xmm0
xorps %xmm1, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
leaq 0x20(%rsp), %rcx
movaps %xmm0, (%rcx)
movl 0x8(%r12), %eax
movq %rax, 0x10(%rcx)
movq (%r9), %rdx
movq 0x10(%r9), %rdi
xorl %esi, %esi
callq 0x20e0
leaq 0xc(%rsp), %rbp
leaq 0x8(%rsp), %r15
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %r15, %rcx
callq 0x12e9df
cmpl $-0x1, %eax
je 0x12651e
movl %eax, %eax
cmpb $0x0, (%r14,%rax)
je 0x12653f
movl 0xc(%rsp), %eax
cmpl 0xc(%r12), %eax
jne 0x1264e7
movl 0x8(%rsp), %eax
cmpl 0x10(%r12), %eax
jne 0x1264e7
movq 0x12cabb(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0xc3838(%rip), %rdi     # 0x1e9d67
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0x1265c2
movsd 0x4(%r12), %xmm0
xorps %xmm1, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
leaq 0x20(%rsp), %rbp
movups %xmm0, 0x8(%rbp)
leaq 0x8(%rsp), %r15
movq %rbp, %rdi
movq %r13, %rsi
leaq 0xc(%rsp), %rdx
movq %r15, %rcx
callq 0x12e9df
cmpl $-0x1, %eax
je 0x1265c2
movq 0x10(%rbx), %rdx
movl %eax, %ecx
cmpb $0x1, (%rdx,%rcx)
je 0x12655a
movb $0x1, %sil
movb %sil, (%r14,%rcx)
movq 0x10(%rbx), %rdx
movb %sil, (%rdx,%rcx)
movq 0x18(%rsp), %rsi
movq 0x50(%rsi), %rdx
movb (%rdx,%rcx), %cl
xorl %edx, %edx
subb %cl, %dl
movsbl %dl, %ecx
movq 0x10(%rsp), %rdi
movl %eax, %edx
callq 0x125fc0
movl 0xc(%rsp), %eax
cmpl 0xc(%r12), %eax
jne 0x12655a
movl 0x8(%rsp), %eax
cmpl 0x10(%r12), %eax
jne 0x12655a
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: mc_solve_bp_cc(mc_bp_t*)
t_w_t mc_solve_bp_cc(mc_bp_t *bp)
{
	mc_bp_res res;
	memset(bp->lock, 0, bp->b_b->ug->g->n_seq);
	while (best_bp(bp, &res))
	{
		mc_set_bp_spin(bp->b_b, bp->ma, bp->b_aux, bp, bp->lock, &(bp->vis[0]), &res);
	}

	return mc_score_all(bp->ma, bp->b_aux);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x30(%rdi), %rdi
movq 0x10(%rax), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
xorl %esi, %esi
callq 0x20e0
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x12638c
testl %eax, %eax
je 0x12662c
movq 0x40(%rbx), %rsi
movq 0x38(%rbx), %rdx
movq (%rbx), %rdi
movq 0x30(%rbx), %r8
movq 0x48(%rbx), %r9
movq %r14, (%rsp)
callq 0x12648c
jmp 0x1265ff
movq 0x38(%rbx), %rsi
movq 0x40(%rbx), %rdi
addq $0x28, %rsp
popq %rbx
popq %r14
jmp 0x12589b
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_reset_z_all(mc_match_t const*, mc_svaux_t*)
void mc_reset_z_all(const mc_match_t *ma, mc_svaux_t *b)
{
	// t_w_t z[2];
	uint32_t k;
	for (k = 0; k < ma->n_seq; ++k) 
	{
		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-all\n");
        // if(z[1] != b->z[k].z[1]) fprintf(stderr, "ERROR2-all\n");
	}
}

// Assembly:
pushq %r14
pushq %rbx
movl 0x38(%rdi), %eax
xorl %ecx, %ecx
xorps %xmm0, %xmm0
cmpq %rax, %rcx
jae 0x1266ca
movq 0x10(%rdi), %rdx
movq (%rdx,%rcx,8), %r8
movl %r8d, %edx
shrq $0x20, %r8
movq 0x40(%rsi), %r11
movq %rcx, %r9
shlq $0x4, %r9
leaq (%r11,%r9), %r10
addq $0x8, %r10
addq %r11, %r9
movups %xmm0, -0x8(%r10)
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
subq $0x1, %rdx
jb 0x1266c5
movq 0x28(%rdi), %rbx
movl %r8d, %r14d
shlq $0x4, %r14
leaq (%rbx,%r14), %r11
movl (%rbx,%r14), %ebx
movq 0x50(%rsi), %r14
cmpb $0x0, (%r14,%rbx)
jle 0x1266b3
addsd 0x8(%r11), %xmm1
movsd %xmm1, (%r9)
jmp 0x1266c0
jns 0x1266c0
addsd 0x8(%r11), %xmm2
movsd %xmm2, (%r10)
incq %r8
jmp 0x126682
incq %rcx
jmp 0x12664b
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_solve_bp(mc_bp_t*)
void mc_solve_bp(mc_bp_t *bp)
{
	double index_time = yak_realtime();
	uint32_t r = 1;
	t_w_t sc_opt, sc;
	mc_reset_z_all(bp->ma, bp->b_aux);
	sc_opt = mc_score_all(bp->ma, bp->b_aux);

	while (1)
	{
		sc = mc_solve_bp_cc(bp);
		// fprintf(stderr, "[M::%s::# round: %u] sc_opt: %ld, sc: %ld\n", __func__, r, sc_opt, sc);
		fprintf(stderr, "[M::%s::# round: %u] sc_opt: %f, sc: %f\n", __func__, r, sc_opt, sc);
		if(sc <= sc_opt) break;
		sc_opt = sc;
		r++;
	}
	fprintf(stderr, "[M::%s::%.3f] ==> round %u\n", __func__, yak_realtime()-index_time, r);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
callq 0xefea7
movsd %xmm0, 0x10(%rsp)
movq 0x38(%rbx), %rsi
movq 0x40(%rbx), %rdi
callq 0x126640
movq 0x38(%rbx), %rsi
movq 0x40(%rbx), %rdi
callq 0x12589b
xorl %ebp, %ebp
movq 0x12c8d5(%rip), %r12    # 0x252fe0
leaq 0xc8728(%rip), %r14     # 0x1eee3a
leaq 0xc874a(%rip), %r15     # 0x1eee63
movsd %xmm0, 0x8(%rsp)
incl %ebp
movq %rbx, %rdi
callq 0x1265d1
movapd %xmm0, %xmm1
movsd %xmm0, 0x18(%rsp)
movq (%r12), %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %ebp, %ecx
movsd 0x8(%rsp), %xmm0
movb $0x2, %al
callq 0x22b0
movsd 0x8(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
ucomisd %xmm1, %xmm0
movapd %xmm1, %xmm0
jb 0x126719
movq (%r12), %rbx
callq 0xefea7
subsd 0x10(%rsp), %xmm0
leaq 0xc86f7(%rip), %rsi     # 0x1eee6f
leaq 0xc86e4(%rip), %rdx     # 0x1eee63
movq %rbx, %rdi
movl %ebp, %ecx
movb $0x1, %al
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_score_all_advance(mc_match_t const*, signed char*)
t_w_t mc_score_all_advance(const mc_match_t *ma, int8_t *s)
{
	uint32_t k;
	t_w_t z[2], zt = 0;
	for (k = 0; k < ma->n_seq; ++k) 
	{
		uint32_t o = ma->idx.a[k] >> 32;
        uint32_t j, n = (uint32_t)ma->idx.a[k];
		z[0] = 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 (s[t] > 0) z[0] += e->w;
            else if (s[t] < 0) z[1] += e->w;
        }
		zt += -((t_w_t)(s[k])) * (z[0] - z[1]);
	}
	return zt;
}

// Assembly:
movl 0x38(%rdi), %eax
xorpd %xmm0, %xmm0
xorl %ecx, %ecx
cmpq %rax, %rcx
je 0x12680a
movq 0x10(%rdi), %rdx
movq (%rdx,%rcx,8), %r8
movl %r8d, %edx
shrq $0x20, %r8
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
subq $0x1, %rdx
jb 0x1267f1
movq 0x28(%rdi), %r10
movl %r8d, %r11d
shlq $0x4, %r11
leaq (%r10,%r11), %r9
movl (%r10,%r11), %r10d
cmpb $0x0, (%rsi,%r10)
jle 0x1267e4
addsd 0x8(%r9), %xmm1
jmp 0x1267ec
jns 0x1267ec
addsd 0x8(%r9), %xmm2
incq %r8
jmp 0x1267bc
movsbl (%rsi,%rcx), %edx
cvtsi2sd %edx, %xmm3
subsd %xmm2, %xmm1
mulsd %xmm3, %xmm1
subsd %xmm1, %xmm0
incq %rcx
jmp 0x1267a0
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_status_all(mc_match_t const*, signed char*)
void mc_status_all(const mc_match_t *ma, int8_t *s)
{
	t_w_t tt_w = mc_score_all_advance(ma, s);
	uint64_t k, nn = 0, ne = 0;
	for (k = 0; k < ma->n_seq; ++k) {
		if((uint32_t)ma->idx.a[k]) nn++;
		ne += (uint32_t)ma->idx.a[k];
	}
	fprintf(stderr, "[M::%s::] ==> # nodes: %lu, # edges: %lu, weight: %f\n", __func__, nn, ne, tt_w);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x126797
movl 0x38(%rbx), %eax
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
cmpq %rdx, %rax
je 0x12683a
movq 0x10(%rbx), %rsi
movl (%rsi,%rdx,8), %esi
cmpq $0x1, %rsi
sbbq $-0x1, %rcx
addq %rsi, %r8
incq %rdx
jmp 0x12681e
movq 0x12c79f(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0xc8640(%rip), %rsi     # 0x1eee8b
leaq 0xc866f(%rip), %rdx     # 0x1eeec1
movb $0x1, %al
popq %rbx
jmp 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mb_score_all_advance(mc_match_t const*, mb_g_t*)
t_w_t mb_score_all_advance(const mc_match_t *ma, mb_g_t *mbg)
{
	uint32_t k;
	t_w_t z[2], zt = 0;
	for (k = 0; k < ma->n_seq; ++k) 
	{
		uint32_t o = ma->idx.a[k] >> 32;
        uint32_t j, n = (uint32_t)ma->idx.a[k];
		z[0] = 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 (mbg->u->u.a[mbg->u->idx.a[t]>>1].s[mbg->u->idx.a[t]&1] > 0) z[0] += e->w;
            else if (mbg->u->u.a[mbg->u->idx.a[t]>>1].s[mbg->u->idx.a[t]&1] < 0) z[1] += e->w;
        }
		zt += -((t_w_t)(mbg->u->u.a[mbg->u->idx.a[k]>>1].s[mbg->u->idx.a[k]&1])) * (z[0] - z[1]);
	}
	return zt;
}

// Assembly:
pushq %rbx
movl 0x38(%rdi), %eax
xorpd %xmm0, %xmm0
xorl %ecx, %ecx
cmpq %rax, %rcx
je 0x126911
movq 0x10(%rdi), %rdx
movq (%rdx,%rcx,8), %r8
movl %r8d, %edx
shrq $0x20, %r8
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
subq $0x1, %rdx
jb 0x1268d6
movq 0x28(%rdi), %r10
movl %r8d, %r11d
shlq $0x4, %r11
leaq (%r10,%r11), %r9
movl (%r10,%r11), %r10d
movq (%rsi), %r11
movq 0x28(%r11), %rbx
movl (%rbx,%r10,4), %r10d
movl %r10d, %ebx
shrl %ebx
andl $0x1, %r10d
imulq $0x38, %rbx, %rbx
addq 0x40(%r11), %rbx
cmpb $0x0, 0x10(%r10,%rbx)
jle 0x1268c9
addsd 0x8(%r9), %xmm1
jmp 0x1268d1
jns 0x1268d1
addsd 0x8(%r9), %xmm2
incq %r8
jmp 0x126884
movq (%rsi), %rdx
movq 0x28(%rdx), %r8
movl (%r8,%rcx,4), %r8d
movl %r8d, %r9d
shrl %r9d
imulq $0x38, %r9, %r9
addq 0x40(%rdx), %r9
andl $0x1, %r8d
movsbl 0x10(%r8,%r9), %edx
cvtsi2sd %edx, %xmm3
subsd %xmm2, %xmm1
mulsd %xmm3, %xmm1
subsd %xmm1, %xmm0
incq %rcx
jmp 0x126864
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: print_mc_node(mc_match_t const*, mc_svaux_t*, unsigned int)
void print_mc_node(const mc_match_t *ma, mc_svaux_t *b, uint32_t id)
{
	fprintf(stderr, "[M::%s::utg%.6ul-hap%u]\n", __func__, id, b->s[id]>0?1:b->s[id]<0?2:0);
	w_t w[128], z[4];
	uint32_t o, n, i, hn = 4;
	int8_t s;
	for (i = 0; i < hn; i++) w[i] = 0;
	o = ma->idx.a[id] >> 32;
    n = (uint32_t)ma->idx.a[id];
	for (i = 0; i < n; ++i)
	{
		s = b->s[ma_y(ma->ma.a[o + i])];
		w[s>0?1:s<0?2:0] += ma->ma.a[o + i].w;
	}	
	z[0] = z[3] = 0; z[1] = b->z[id].z[0]; z[2] = b->z[id].z[1];
	for (i = 0; i < hn; i++) fprintf(stderr, "w[%u]-%f, z[%u]-%f\n", i, w[i], i, z[i]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movl %edx, %ecx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x50(%rsi), %rax
movl %edx, %r12d
movb (%rax,%r12), %al
xorl %r8d, %r8d
testb %al, %al
setne %r8b
addl %r8d, %r8d
testb %al, %al
movq 0x12c626(%rip), %r15    # 0x252fe0
movq (%r15), %rdi
pushq $0x1
popq %rbp
cmovgl %ebp, %r8d
leaq 0xc8539(%rip), %rsi     # 0x1eef04
leaq 0xc854b(%rip), %rdx     # 0x1eef1d
xorl %r13d, %r13d
xorl %eax, %eax
callq 0x22b0
cmpq $0x4, %r13
je 0x1269ed
andq $0x0, 0x20(%rsp,%r13,8)
incq %r13
jmp 0x1269dc
movq 0x10(%r14), %rax
movq (%rax,%r12,8), %rcx
movl %ecx, %eax
shrq $0x20, %rcx
subq $0x1, %rax
jb 0x126a42
movq 0x50(%rbx), %rdx
movq 0x28(%r14), %rsi
movl %ecx, %edi
shlq $0x4, %rdi
movl (%rsi,%rdi), %r8d
movb (%rdx,%r8), %dl
xorl %r8d, %r8d
testb %dl, %dl
setne %r8b
addl %r8d, %r8d
testb %dl, %dl
movsd 0x8(%rsi,%rdi), %xmm0
cmovgl %ebp, %r8d
addsd 0x20(%rsp,%r8,8), %xmm0
movsd %xmm0, 0x20(%rsp,%r8,8)
incq %rcx
jmp 0x1269fb
andq $0x0, 0x18(%rsp)
andq $0x0, (%rsp)
movq 0x40(%rbx), %rax
shlq $0x4, %r12
movups (%rax,%r12), %xmm0
movups %xmm0, 0x8(%rsp)
xorl %ebx, %ebx
leaq 0xc84c3(%rip), %r14     # 0x1eef2b
cmpq $0x4, %rbx
je 0x126a8f
movq (%r15), %rdi
movsd 0x20(%rsp,%rbx,8), %xmm0
movsd (%rsp,%rbx,8), %xmm1
movq %r14, %rsi
movl %ebx, %edx
movl %ebx, %ecx
movb $0x2, %al
callq 0x22b0
incq %rbx
jmp 0x126a68
addq $0x428, %rsp            # imm = 0x428
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_optimize_local(mc_opt_t const*, mc_match_t const*, mc_svaux_t*, unsigned int*)
static t_w_t mc_optimize_local(const mc_opt_t *opt, const mc_match_t *ma, mc_svaux_t *b, uint32_t *n_iter)
{
	uint32_t i, n_flip = 0;
	int32_t n_iter_local = 0;
	while (n_iter_local < opt->max_iter) {
		++(*n_iter);
		ks_shuffle_uint32_t(b->cc_size, b->cc_node, &b->x);
		for (i = n_flip = 0; i < b->cc_size; ++i) {
			uint32_t k = b->cc_node[i];///uid
			int8_t s;
			if (b->z[k].z[0] == b->z[k].z[1]) continue;
			s = b->z[k].z[0] > b->z[k].z[1]? -1 : 1;
			if (b->s[k] != s) {
				// fprintf(stderr, "utg%.6dl, s[k]::%d, s::%d\n", (int32_t)(k)+1, b->s[k], s);
				mc_set_spin(ma, b, k, s);///no need to change the score of k itself
				++n_flip;
			}
		}
		++n_iter_local;
		if (n_flip == 0) break;
	}

	// if(n_flip != 0) mc_best_flip(ma, b);
	return mc_score(ma, b);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
xorl %ebp, %ebp
cmpl (%r12), %ebp
jge 0x126df0
movq (%rsp), %rax
incl (%rax)
movl 0xc(%rbx), %edi
movq 0x28(%rbx), %rsi
movq %rbx, %rdx
callq 0x12e5d4
xorl %r14d, %r14d
xorl %r13d, %r13d
movl 0xc(%rbx), %eax
cmpq %rax, %r14
jae 0x126de9
movq 0x28(%rbx), %rax
movq 0x40(%rbx), %rcx
movl (%rax,%r14,4), %edx
movq %rdx, %rax
shlq $0x4, %rax
movsd (%rcx,%rax), %xmm0
ucomisd 0x8(%rcx,%rax), %xmm0
jne 0x126dc3
jnp 0x126de4
seta %al
negb %al
orb $0x1, %al
movq 0x50(%rbx), %rcx
cmpb %al, (%rcx,%rdx)
je 0x126de4
movsbl %al, %ecx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x125fc0
incl %r13d
incq %r14
jmp 0x126d99
incl %ebp
testl %r13d, %r13d
jne 0x126d78
movq %r15, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x12584f
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_perturb(mc_opt_t const*, mc_match_t const*, mc_svaux_t*)
static void mc_perturb(const mc_opt_t *opt, 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];///node id
		double y;
		y = kr_drand_r(&b->x);
		if (y < opt->f_perturb)
			mc_set_spin(ma, b, k, -b->s[k]);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %ebp, %ebp
cmpl 0xc(%rbx), %ebp
jae 0x126e63
movq 0x30(%r14), %rax
movl 0x8(%rbx), %ecx
addl %ebp, %ecx
movl (%rax,%rcx,8), %r12d
movq %rbx, %rdi
callq 0x12e635
movsd 0x10(%r15), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x126e5f
movq 0x50(%rbx), %rax
movb (%rax,%r12), %al
xorl %ecx, %ecx
subb %al, %cl
movsbl %cl, %ecx
movq %r14, %rdi
movq %rbx, %rsi
movl %r12d, %edx
callq 0x125fc0
incl %ebp
jmp 0x126e1c
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_perturb_node(mc_opt_t const*, mc_match_t const*, mc_svaux_t*, int)
static void mc_perturb_node(const mc_opt_t *opt, const mc_match_t *ma, mc_svaux_t *b, int32_t bfs_round)
{
	uint32_t i, k, n_bfs = 0;
	k = (uint32_t)(kr_drand_r(&b->x) * b->cc_size + .499);
	if(k >= b->cc_size) k = b->cc_size - 1;
	k = (uint32_t)ma->cc[b->cc_off + k];///node id
	n_bfs = mc_bfs(ma, b, k, bfs_round, (int32_t)(b->cc_size * opt->f_perturb));
	for (i = 0; i < n_bfs; ++i)
		mc_set_spin(ma, b, b->bfs[i], -b->s[b->bfs[i]]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, %rdi
callq 0x12e635
movl 0xc(%rbx), %eax
cvtsi2sd %rax, %xmm1
mulsd %xmm1, %xmm0
addsd 0xb9174(%rip), %xmm0    # 0x1e0010
cvttsd2si %xmm0, %rcx
leal -0x1(%rax), %edx
cmpl %ecx, %eax
cmoval %ecx, %edx
movq 0x30(%r14), %rax
addl 0x8(%rbx), %edx
movq (%rax,%rdx,8), %rax
mulsd 0x10(%r15), %xmm1
cvttsd2si %xmm1, %ecx
movl %eax, %edi
movq 0x30(%rbx), %rdx
movl %eax, (%rdx)
movq 0x38(%rbx), %rsi
movl %eax, (%rsi,%rdi,4)
pushq $0x1
popq %rdi
xorl %r8d, %r8d
xorl %r10d, %r10d
cmpl $0x3, %r8d
je 0x126f52
movl %r10d, %r10d
movl %edi, %r11d
movl %edi, %r9d
cmpq %r11, %r10
jae 0x126f31
movl (%rdx,%r10,4), %r15d
movq 0x10(%r14), %r12
movq (%r12,%r15,8), %r12
movl %r12d, %r15d
shrq $0x20, %r12
subq $0x1, %r15
jb 0x126f2c
movq 0x28(%r14), %r13
movl %r12d, %ebp
shlq $0x4, %rbp
movl (%r13,%rbp), %r13d
cmpl %eax, (%rsi,%r13,4)
je 0x126f27
movl %r9d, %ebp
incl %r9d
movl %r13d, (%rdx,%rbp,4)
movl %eax, (%rsi,%r13,4)
incq %r12
jmp 0x126efd
incq %r10
jmp 0x126ee5
testl %ecx, %ecx
setne %r10b
cmpl %ecx, %r9d
seta %r11b
andb %r10b, %r11b
incl %r8d
movl %edi, %r10d
movl %r9d, %edi
cmpb $0x1, %r11b
jne 0x126ed6
jmp 0x126f55
movl %edi, %r9d
movl %r9d, %r15d
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x126f86
movq 0x30(%rbx), %rax
movq 0x50(%rbx), %rcx
movl (%rax,%r12,4), %edx
movb (%rcx,%rdx), %al
xorl %ecx, %ecx
subb %al, %cl
movsbl %cl, %ecx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x125fc0
incq %r12
jmp 0x126f5b
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: prt_bub(unsigned int*, unsigned int, char const*)
void prt_bub(uint32_t *a, uint32_t a_n, const char *cmd) 
{
	uint32_t k;
	fprintf(stderr, "%s\n", cmd);
	for (k = 0; k < a_n; k++) {
		fprintf(stderr, "utg%.6dl\t", (int32_t)a[k]+1);
	}
	fprintf(stderr, "\n");
	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x12bcc3(%rip), %r15    # 0x252fe0
movq (%r15), %rdi
leaq 0xc6f16(%rip), %rsi     # 0x1ee23d
xorl %eax, %eax
callq 0x22b0
movl %ebp, %r12d
leaq 0xc7cad(%rip), %r14     # 0x1eefe5
xorl %r13d, %r13d
movq (%r15), %rsi
cmpq %r13, %r12
je 0x12735b
movl (%rbx,%r13,4), %edx
incl %edx
movq %rsi, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x22b0
incq %r13
jmp 0x12733b
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2270
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: clus_weight(mc_svaux_t*, mc_match_t*, bits_p*, unsigned int)
t_w_t clus_weight(mc_svaux_t *b_aux, mc_match_t *ma, bits_p *vis, uint32_t uid)
{
	mc_edge_t *o = NULL;
	uint32_t n, i, t;
	t_w_t w = ((t_w_t)(b_aux->s[uid])) * (b_aux->z[uid].z[0] - b_aux->z[uid].z[1]) * 2;
	t_w_t w_off = 0;
	o = pt_a(*ma, uid);
	n = pt_n(*ma, uid);
	for (i = 0; i < n; ++i) {
		t = ma_y(o[i]);
		if(!(is_set_bits_p((*vis), t))) continue;
		// if(vis[t] == 0) continue;
        if(t == uid) continue;
		w_off += (b_aux->s[uid]*b_aux->s[t]*o[i].w);
	}
	return w - (w_off*4);//2 for self; 4 for both directions
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %ecx, %eax
movq 0x40(%rdi), %rcx
movq 0x50(%rdi), %r8
movl %eax, %r9d
movsbl (%r8,%r9), %edi
movq 0x10(%rsi), %r10
movq (%r10,%r9,8), %r10
shlq $0x4, %r9
movsd (%rcx,%r9), %xmm1
movsd 0x8(%rcx,%r9), %xmm2
movq 0x28(%rsi), %rcx
movl %r10d, %esi
shlq $0x4, %rsi
shrq $0x1c, %r10
andq $-0x10, %r10
leaq (%r10,%rcx), %r9
addq $0x8, %r9
xorpd %xmm0, %xmm0
xorl %r10d, %r10d
movl $0x1, %r11d
cmpq %r10, %rsi
je 0x12852a
movq -0x8(%r9,%r10), %rbx
movl %ebx, %ecx
andb $0x7, %cl
movl %r11d, %ebp
shll %cl, %ebp
cmpl %eax, %ebx
je 0x128524
movq 0x10(%rdx), %rcx
movl %ebx, %r14d
shrl $0x3, %r14d
movzbl (%rcx,%r14), %ecx
andl %ecx, %ebp
je 0x128524
movl %ebx, %ecx
movsbl (%r8,%rcx), %ecx
imull %edi, %ecx
cvtsi2sd %ecx, %xmm3
mulsd (%r9,%r10), %xmm3
addsd %xmm3, %xmm0
addq $0x10, %r10
jmp 0x1284e0
subsd %xmm2, %xmm1
cvtsi2sd %edi, %xmm2
mulsd %xmm1, %xmm2
addsd %xmm2, %xmm2
mulsd 0xc6606(%rip), %xmm0    # 0x1eeb48
addsd %xmm2, %xmm0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: gen_best_clus(mc_clus_t*, unsigned int*, unsigned int*, double*)
uint32_t gen_best_clus(mc_clus_t *bc, uint32_t *off, uint32_t *occ, double *rw)
{
	uint32_t i; (*off) = (*occ) = (uint32_t)-1; (*rw) = -1;
	for (i = 0; i < bc->n_thread; i++) clean_clus_flip_aux(&(bc->aux[i]));
	
	kt_for(bc->n_thread, worker_cal_clus_sc, bc, bc->cc.nn.n);
	
	for (i = 0; i < bc->n_thread; i++) {
		if(bc->aux[i].off == (uint32_t)-1) continue;
		if(bc->aux[i].w < 0) continue;

		if((bc->aux[i].w > (*rw)) || (bc->aux[i].w == (*rw) && bc->aux[i].off < (*off))) {
			(*off) = bc->aux[i].off; (*occ) = bc->aux[i].occ; (*rw) = bc->aux[i].w;
		}
	}
	if((*off) != (uint32_t)-1) return 1;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rsi, %rbx
movq %rdx, (%rsp)
orl $-0x1, (%rdx)
movq %rdi, %r12
orl $-0x1, (%rsi)
movabsq $-0x4010000000000000, %r13 # imm = 0xBFF0000000000000
movq %r13, (%rcx)
pushq $0x24
popq %rbp
xorl %r15d, %r15d
movl 0x58(%r12), %edi
cmpq %rdi, %r15
jae 0x1287a2
movq 0x60(%r12), %rax
movq %r13, -0xc(%rax,%rbp)
orq $-0x1, -0x4(%rax,%rbp)
movq -0x24(%rax,%rbp), %rdx
movq -0x14(%rax,%rbp), %rdi
xorl %esi, %esi
callq 0x20e0
incq %r15
addq $0x28, %rbp
jmp 0x12876e
movq (%r12), %rcx
leaq 0x74(%rip), %rsi        # 0x128821
movq %r12, %rdx
callq 0xc67c0
pushq $0x24
popq %rax
xorl %ecx, %ecx
xorpd %xmm0, %xmm0
movq (%rsp), %rdi
movl 0x58(%r12), %edx
cmpq %rdx, %rcx
jae 0x12880a
movq 0x60(%r12), %rdx
movl -0x4(%rdx,%rax), %esi
cmpl $-0x1, %esi
je 0x128801
movsd -0xc(%rdx,%rax), %xmm1
ucomisd %xmm1, %xmm0
ja 0x128801
ucomisd (%r14), %xmm1
ja 0x1287f5
jne 0x128801
jp 0x128801
cmpl (%rbx), %esi
jae 0x128801
movl %esi, (%rbx)
movl (%rdx,%rax), %edx
movl %edx, (%rdi)
movsd %xmm1, (%r14)
incq %rcx
addq $0x28, %rax
jmp 0x1287c2
xorl %eax, %eax
cmpl $-0x1, (%rbx)
setne %al
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: worker_cal_clus_sc(void*, long, int)
static void worker_cal_clus_sc(void *data, long i, int tid) // callback for kt_for()
{
	mc_clus_t *bc = (mc_clus_t *)data;
	uint32_t *a = bc->cc.nn.a, a_n = bc->cc.nn.n;
	if(a[i] == (uint32_t)-1) return;
	cal_clus_sc0(bc->mg->e, bc->baux, bc, bc->lock, bc->lock_max, a, a_n, i, &(bc->aux[tid]), tid);
}

// Assembly:
movq 0x10(%rdi), %r9
cmpl $-0x1, (%r9,%rsi,4)
je 0x128868
pushq %rax
movq %rsi, %rax
movl (%rdi), %r11d
movq 0x40(%rdi), %rcx
movq 0x28(%rcx), %r10
movq 0x68(%rdi), %rsi
movq 0x48(%rdi), %rcx
movzbl 0x50(%rdi), %r8d
movslq %edx, %rdx
imulq $0x28, %rdx, %rdx
addq 0x60(%rdi), %rdx
subq $0x8, %rsp
movq %r10, %rdi
pushq %rdx
pushq %rax
pushq %r11
callq 0x12854b
addq $0x20, %rsp
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: flip_chain(mc_match_t const*, mc_svaux_t*, unsigned int*, unsigned int, unsigned int, unsigned int, bits_p*, unsigned char*, unsigned char)
double flip_chain(const mc_match_t *ma, mc_svaux_t *b, uint32_t *a, uint32_t a_n, uint32_t off, uint32_t occ, 
bits_p *vis, uint8_t *lock, uint8_t lock_max)
{
	uint32_t k, kn = off + occ;
	for (k = off; k < kn; k++) {
		vis->a[a[k]>>3] = 0;
		// if(occ == 4 && a[off] == 11279) dbg = 1;
	}
	for (k = off; k < kn; k++) {
		if(lock[a[k]] >= lock_max) continue;
		if(is_set_bits_p((*vis), a[k])) continue;
		set_bits_p((*vis), a[k]); lock[a[k]]++;
		// if(dbg) fprintf(stderr, "[M::%s::] a[%u]::%u, s::%d\n", __func__, k, a[k], b->s[a[k]]);
		mc_set_spin(ma, b, a[k], -b->s[a[k]]);
	}
	return mc_score(ma, b);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %ebx
movq %rdx, %r15
movq %rsi, 0x8(%rsp)
movq %rdi, (%rsp)
movb 0x60(%rsp), %r13b
movq 0x58(%rsp), %r10
movq 0x50(%rsp), %r12
addl %r8d, %ebx
movl %r8d, %r14d
movq %r14, %rax
cmpq %rbx, %rax
jae 0x1288b8
movq 0x10(%r12), %rcx
movl (%r15,%rax,4), %edx
shrl $0x3, %edx
movb $0x0, (%rcx,%rdx)
incq %rax
jmp 0x12889e
pushq $0x1
popq %rbp
movq %r10, 0x10(%rsp)
cmpq %rbx, %r14
jae 0x128927
movl (%r15,%r14,4), %edx
cmpb %r13b, (%r10,%rdx)
jae 0x128922
movq 0x10(%r12), %rax
movl %edx, %esi
movl %edx, %ecx
andb $0x7, %cl
movl %ebp, %edi
shll %cl, %edi
shrl $0x3, %esi
movzbl (%rax,%rsi), %ecx
andl $0x7, %edx
btl %edx, %ecx
jb 0x128922
orb %cl, %dil
movb %dil, (%rax,%rsi)
movl (%r15,%r14,4), %eax
incb (%r10,%rax)
movl (%r15,%r14,4), %edx
movq 0x8(%rsp), %rsi
movq 0x50(%rsi), %rax
movb (%rax,%rdx), %al
xorl %ecx, %ecx
subb %al, %cl
movsbl %cl, %ecx
movq (%rsp), %rdi
callq 0x125fc0
movq 0x10(%rsp), %r10
incq %r14
jmp 0x1288c0
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x12584f
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_solve_clus(mc_clus_t*)
t_w_t mc_solve_clus(mc_clus_t *bc)
{
	uint32_t off, occ/**, r = 0**/; double rw, sc, sc_opt = mc_score(bc->mg->e, bc->baux);
	memset(bc->lock, 0, bc->n*sizeof(*(bc->lock)));
	while (gen_best_clus(bc, &off, &occ, &rw)) {
		sc = flip_chain(bc->mg->e, bc->baux, bc->cc.nn.a, bc->cc.nn.n, off, occ, &(bc->aux[0].vis), bc->lock, bc->lock_max);
		// if(r%10000) {
		// 	fprintf(stderr, "[M::%s::] rw::%f, sc_opt::%f, sc::%f, off::%u, occ::%u, r::%u\n", 
		// 	__func__, rw, sc_opt, sc, off, occ, r);
		// }
		if(sc < sc_opt) {
			fprintf(stderr, "\nwrong::[M::%s::] rw::%f, sc_opt::%f, sc::%f, off::%u, occ::%u\n", 
			__func__, rw, sc_opt, sc, off, occ);
			// if(occ == 2) {
			// uint32_t k;
			// 	for (k = off; k < off + occ; k++) {
			// 		fprintf(stderr, "[M::%s::] a[%u]::%u, s::%d\n", __func__, k, bc->cc.nn.a[k], bc->baux->s[bc->cc.nn.a[k]]);
			// 	}
			// 	test_flip_sc(bc->mg->e, bc->baux, bc->cc.nn.a+off, occ, &(bc->aux[0].vis));
			// }
		}
		sc_opt = sc; //r++;
	}
	return sc_opt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x68(%rdi), %rsi
movq 0x28(%rax), %rdi
callq 0x12584f
movsd %xmm0, (%rsp)
movq 0x48(%rbx), %rdi
movl 0x54(%rbx), %edx
xorl %esi, %esi
callq 0x20e0
movsd (%rsp), %xmm2
leaq 0xc(%rsp), %r14
leaq 0x8(%rsp), %r15
leaq 0x10(%rsp), %r12
movsd %xmm2, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x12873d
testl %eax, %eax
je 0x128e62
movq 0x10(%rbx), %rdx
movq 0x40(%rbx), %rax
movq 0x28(%rax), %rdi
movq 0x68(%rbx), %rsi
movl 0xc(%rsp), %r13d
movl 0x8(%rsp), %ebp
movzbl 0x50(%rbx), %eax
subq $0x8, %rsp
movl %r13d, %r8d
movl %ebp, %r9d
pushq %rax
pushq 0x48(%rbx)
pushq 0x60(%rbx)
callq 0x128869
addq $0x20, %rsp
movapd %xmm0, %xmm2
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x128dbf
movq 0x12a1b6(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
movsd 0x10(%rsp), %xmm0
leaq 0xc62a2(%rip), %rsi     # 0x1ef0dc
leaq 0xc62db(%rip), %rdx     # 0x1ef11c
movsd %xmm2, (%rsp)
movsd (%rsp), %xmm2
movl %r13d, %ecx
movl %ebp, %r8d
movb $0x3, %al
callq 0x22b0
movsd (%rsp), %xmm2
jmp 0x128dbf
movsd (%rsp), %xmm0
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_clus_cc(mc_clus_t*)
t_w_t mc_clus_cc(mc_clus_t *bc)
{
	// fprintf(stderr, "+[M::%s::]\n", __func__);
	// double index_time = yak_realtime();
    // uint32_t r = 1;
    t_w_t sc_opt, sc;
	// fprintf(stderr, "-[M::%s::]\n", __func__);
	mc_reset_z(bc->mg->e, bc->baux);
	// fprintf(stderr, "*[M::%s::]\n", __func__);
	sc_opt = mc_score(bc->mg->e, bc->baux); 
	// fprintf(stderr, "[M::%s::] sc_opt: %f\n", __func__, sc_opt);
	while (1) {
        sc = mc_solve_clus(bc);
        // fprintf(stderr, "[M::%s::# round: %u] sc_opt: %f, sc: %f\n", __func__, r, sc_opt, sc);
        if(sc <= (sc_opt+0.0000001)) break;
        sc_opt = sc; //r++;
    }
    // fprintf(stderr, "[M::%s::%.3f] ==> round %u\n", __func__, yak_realtime()-index_time, r);
	return sc;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x68(%rdi), %rsi
movq 0x28(%rax), %rdi
callq 0x1258d9
movq 0x40(%rbx), %rax
movq 0x68(%rbx), %rsi
movq 0x28(%rax), %rdi
callq 0x12584f
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
callq 0x128d76
movsd 0x8(%rsp), %xmm1
addsd 0xc5ca4(%rip), %xmm1    # 0x1eeb60
ucomisd %xmm0, %xmm1
jb 0x128ea0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mb_optimize_local(mc_opt_t const*, mb_g_t*, mb_svaux_t*, unsigned int*)
static t_w_t mb_optimize_local(const mc_opt_t *opt, mb_g_t *mbg, mb_svaux_t *b, uint32_t *n_iter)
{
	uint32_t i, n_flip = 0;
	int32_t n_iter_local = 0;
	mb_node_t *u = NULL;
	t_w_t z = 0;
	while (n_iter_local < opt->max_iter) {
		++(*n_iter);
		ks_shuffle_uint32_t(b->cc_size, b->cc_node, &b->x);
		for (i = n_flip = 0; i < b->cc_size; ++i) {
			uint32_t k = b->cc_node[i];///uid
			u = &(mbg->u->u.a[k]);
			if(u->z[0] == u->z[1] && u->z[2] == u->z[3]) continue;
			z = 0;
			///a[0]
			z += -(t_w_t)(u->s[0]) * (u->z[0] - u->z[1]);
			///a[1]
			z += -(t_w_t)(u->s[1]) * (u->z[2] - u->z[3]);
			if(z >= 0) continue;

			mb_flip_spin(mbg, b, k);///no need to change the score of k itself
			++n_flip;
		}
		++n_iter_local;
		if (n_flip == 0) break;
	}

	// if(n_flip != 0) mc_best_flip(ma, b);
	return mb_score(mbg, b);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
xorl %ebp, %ebp
cmpl (%r12), %ebp
jge 0x129955
movq (%rsp), %rax
incl (%rax)
movl 0xc(%rbx), %edi
movq 0x28(%rbx), %rsi
movq %rbx, %rdx
callq 0x12e5d4
xorl %r14d, %r14d
xorl %r13d, %r13d
movl 0xc(%rbx), %eax
cmpq %rax, %r14
jae 0x12994a
movq 0x28(%rbx), %rax
movl (%rax,%r14,4), %esi
movq (%r15), %rax
movq 0x40(%rax), %rax
imulq $0x38, %rsi, %rcx
movsd 0x18(%rax,%rcx), %xmm2
movsd 0x20(%rax,%rcx), %xmm3
ucomisd %xmm3, %xmm2
movsd 0x28(%rax,%rcx), %xmm0
movsd 0x30(%rax,%rcx), %xmm1
jne 0x1298fe
jp 0x1298fe
ucomisd %xmm1, %xmm0
jne 0x1298fe
jnp 0x129942
addq %rcx, %rax
movsbl 0x10(%rax), %ecx
cvtsi2sd %ecx, %xmm4
subsd %xmm3, %xmm2
mulsd %xmm4, %xmm2
xorpd %xmm3, %xmm3
subsd %xmm2, %xmm3
movsbl 0x11(%rax), %eax
cvtsi2sd %eax, %xmm2
subsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
subsd %xmm0, %xmm3
ucomisd 0xb9c33(%rip), %xmm3    # 0x1e3568
jae 0x129942
movq %r15, %rdi
callq 0x12e664
incl %r13d
incq %r14
jmp 0x1298b7
incl %ebp
testl %r13d, %r13d
jne 0x129892
movq %r15, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1257dd
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: reset_mb_g_t_z(mb_g_t*)
void reset_mb_g_t_z(mb_g_t *mbg)
{
	uint32_t k;
	mb_match_t *ma = mbg->e;
	for (k = 0; k < ma->n_seq; ++k) ///each block
	{
		uint32_t o = ma->idx.a[k] >> 32;
        uint32_t j, n = (uint32_t)ma->idx.a[k];
		mbg->u->u.a[k].z[0] = mbg->u->u.a[k].z[1] = 0;
		mbg->u->u.a[k].z[2] = mbg->u->u.a[k].z[3] = 0;
		for (j = 0; j < n; ++j) {
            const mb_edge_t *e = &ma->ma.a[o + j];
            uint32_t t = ma_y(*e);

			///a[0]->b[0]
			if(mbg->u->u.a[t].s[0] > 0) mbg->u->u.a[k].z[0] += e->w[0];
			else if(mbg->u->u.a[t].s[0] < 0) mbg->u->u.a[k].z[1] += e->w[0];

			///a[0]->b[1]
			if(mbg->u->u.a[t].s[1] > 0) mbg->u->u.a[k].z[0] += e->w[1];
			else if(mbg->u->u.a[t].s[1] < 0) mbg->u->u.a[k].z[1] += e->w[1];

			///a[1]->b[0]
			if(mbg->u->u.a[t].s[0] > 0) mbg->u->u.a[k].z[2] += e->w[2];
			else if(mbg->u->u.a[t].s[0] < 0) mbg->u->u.a[k].z[3] += e->w[2];

			///a[1]->b[1]
			if(mbg->u->u.a[t].s[1] > 0) mbg->u->u.a[k].z[2] += e->w[3];
			else if(mbg->u->u.a[t].s[1] < 0) mbg->u->u.a[k].z[3] += e->w[3];
        }
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x8(%rdi), %rax
movl 0x38(%rax), %ecx
xorl %edx, %edx
xorps %xmm0, %xmm0
cmpq %rcx, %rdx
jae 0x129a7d
movq 0x10(%rax), %rsi
movq (%rsi,%rdx,8), %r8
movl %r8d, %esi
shrq $0x20, %r8
movq (%rdi), %r9
movq 0x40(%r9), %r9
imulq $0x38, %rdx, %r10
addq %r9, %r10
addq $0x20, %r10
movups %xmm0, 0x8(%r10)
movups %xmm0, -0x8(%r10)
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
xorpd %xmm3, %xmm3
xorpd %xmm4, %xmm4
subq $0x1, %rsi
jb 0x129a75
movq 0x28(%rax), %rbx
movl %r8d, %r11d
imulq $0x28, %r11, %r14
leaq (%rbx,%r14), %r11
movl (%rbx,%r14), %ebx
imulq $0x38, %rbx, %r14
movb 0x10(%r9,%r14), %bl
testb %bl, %bl
jle 0x1299fa
addsd 0x8(%r11), %xmm3
movsd %xmm3, -0x8(%r10)
jmp 0x129a07
jns 0x129a07
addsd 0x8(%r11), %xmm4
movsd %xmm4, (%r10)
movb 0x11(%r9,%r14), %bpl
testb %bpl, %bpl
jle 0x129a1f
addsd 0x10(%r11), %xmm3
movsd %xmm3, -0x8(%r10)
jmp 0x129a2c
jns 0x129a2c
addsd 0x10(%r11), %xmm4
movsd %xmm4, (%r10)
testb %bl, %bl
jle 0x129a3e
addsd 0x18(%r11), %xmm1
movsd %xmm1, 0x8(%r10)
jmp 0x129a4c
jns 0x129a4c
addsd 0x18(%r11), %xmm2
movsd %xmm2, 0x10(%r10)
testb %bpl, %bpl
jle 0x129a5f
addsd 0x20(%r11), %xmm1
movsd %xmm1, 0x8(%r10)
jmp 0x129a6d
jns 0x129a6d
addsd 0x20(%r11), %xmm2
movsd %xmm2, 0x10(%r10)
incq %r8
jmp 0x1299c2
incq %rdx
jmp 0x12997e
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_set_by_mbg(mc_g_t*, mb_g_t*)
void mc_set_by_mbg(mc_g_t *mg, mb_g_t *mbg)
{
	// t_w_t z0 = mc_score_all_advance(mg->e, mg->s.a);
	// t_w_t z1 = mb_score_all_advance(mg->e, mbg);
	// if(z0 >= z1) return;
	uint32_t i, k, qn, *a[2], a_n[2];
	int8_t s[2];
	for (i = 0; i < mbg->u->u.n; i++)
	{
		decode_mb_node(mbg, i, &(a[0]), &(a_n[0]), &(s[0]), &(a[1]), &(a_n[1]), &(s[1]));
		for (k = 0; k < a_n[0]; k++)
		{
			qn = a[0][k];
			if(mg->s.a[qn] == 0) continue;
			mg->s.a[qn] = s[0];
		}

		for (k = 0; k < a_n[1]; k++)
		{
			qn = a[1][k];
			if(mg->s.a[qn] == 0) continue;
			mg->s.a[qn] = s[1];
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
leaq 0x10(%rsp), %r13
leaq 0x8(%rsp), %rbp
leaq 0x6(%rsp), %r15
movl %r12d, %eax
movq (%rbx), %rcx
cmpq %rax, 0x30(%rcx)
jbe 0x12a2fe
movq %rbx, %rdi
movl %r12d, %esi
movq %r13, %rdx
movq %rbp, %rcx
movq %r15, %r8
leaq 0x18(%rsp), %r9
leaq 0x7(%rsp), %rax
pushq %rax
leaq 0x14(%rsp), %rax
pushq %rax
callq 0x12e939
addq $0x10, %rsp
xorl %eax, %eax
movl 0x8(%rsp), %ecx
cmpq %rcx, %rax
jae 0x12a2cb
movq 0x10(%rsp), %rcx
movl (%rcx,%rax,4), %ecx
movq 0x10(%r14), %rdx
cmpb $0x0, (%rdx,%rcx)
je 0x12a2c6
movb 0x6(%rsp), %sil
movb %sil, (%rdx,%rcx)
incq %rax
jmp 0x12a2a2
xorl %eax, %eax
movl 0xc(%rsp), %ecx
cmpq %rcx, %rax
jae 0x12a2f6
movq 0x18(%rsp), %rcx
movl (%rcx,%rax,4), %ecx
movq 0x10(%r14), %rdx
cmpb $0x0, (%rdx,%rcx)
je 0x12a2f1
movb 0x7(%rsp), %sil
movb %sil, (%rdx,%rcx)
incq %rax
jmp 0x12a2cd
incl %r12d
jmp 0x12a267
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: print_mb_g_blcok(mb_g_t*)
void print_mb_g_blcok(mb_g_t *mbg)
{
	uint32_t i, k, a_n[2], *a[2];
	for (i = 0; i < mbg->u->u.n; i++)///each block
	{
		decode_mb_node(mbg, i, &(a[0]), &(a_n[0]), NULL, &(a[1]), &(a_n[1]), NULL);
		{
			if(a_n[0] + a_n[1] <= 1) continue;
			fprintf(stderr, "\nB0-%s\n", a_n[0]>1?"mul":"single");
			for (k = 0; k < a_n[0]; k++)
        	{
				fprintf(stderr,"s-utg%.6ul\n", a[0][k]+1);
			}

			fprintf(stderr, "B1-%s\n", a_n[0]>1?"mul":"single");
			for (k = 0; k < a_n[1]; k++)
			{
				fprintf(stderr,"d-utg%.6ul\n", a[1][k]+1);
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r12
movq 0x128c8e(%rip), %r14    # 0x252fe0
leaq 0xc4e20(%rip), %rbp     # 0x1ef179
xorl %r13d, %r13d
movl %r13d, %eax
movq (%rbx), %rcx
cmpq %rax, 0x30(%rcx)
jbe 0x12a448
movq %rbx, %rdi
movl %r13d, %esi
leaq 0x10(%rsp), %rdx
movq %r12, %rcx
xorl %r8d, %r8d
leaq 0x18(%rsp), %r9
pushq $0x0
leaq 0x14(%rsp), %rax
pushq %rax
callq 0x12e939
popq %rax
popq %rcx
movl 0x8(%rsp), %eax
movl 0xc(%rsp), %ecx
addl %eax, %ecx
cmpl $0x2, %ecx
jae 0x12a3a5
incl %r13d
jmp 0x12a35c
movq (%r14), %rdi
cmpl $0x2, %eax
leaq 0xc4dc0(%rip), %rdx     # 0x1ef172
leaq 0xc74bc(%rip), %rax     # 0x1f1875
cmovaeq %rax, %rdx
leaq 0xc4da6(%rip), %rsi     # 0x1ef16a
xorl %eax, %eax
callq 0x22b0
xorl %r15d, %r15d
movl 0x8(%rsp), %eax
movq (%r14), %rdi
cmpq %rax, %r15
jae 0x12a3f4
movq 0x10(%rsp), %rax
movl (%rax,%r15,4), %edx
incl %edx
movq %rbp, %rsi
xorl %eax, %eax
callq 0x22b0
incq %r15
jmp 0x12a3ce
cmpl $0x2, %eax
leaq 0xc4d74(%rip), %rdx     # 0x1ef172
leaq 0xc7470(%rip), %rax     # 0x1f1875
cmovaeq %rax, %rdx
leaq 0xc4d75(%rip), %rsi     # 0x1ef185
xorl %eax, %eax
callq 0x22b0
xorl %r15d, %r15d
movl 0xc(%rsp), %eax
cmpq %rax, %r15
jae 0x12a3a0
movq (%r14), %rdi
movq 0x18(%rsp), %rax
movl (%rax,%r15,4), %edx
incl %edx
leaq 0xc0837(%rip), %rsi     # 0x1eac73
xorl %eax, %eax
callq 0x22b0
incq %r15
jmp 0x12a41a
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: mc_solve_core(mc_opt_t const*, mc_g_t*, bubble_type*)
void mc_solve_core(const mc_opt_t *opt, mc_g_t *mg, bubble_type* bub)
{
	double index_time = yak_realtime();
	uint32_t st, i;
	mc_svaux_t *b;
	mc_bp_t *bp = NULL;
	mc_g_cc(mg->e);
	b = mc_svaux_init(mg, opt->seed);
	if(bub) bp = mc_bp_t_init(mg->e, b, bub, asm_opt.thread_num);
	/*******************************for debug************************************/
	if(bp) mc_init_spin_all(opt, mg, NULL, b);
	if(bp) mc_solve_bp(bp);
	/*******************************for debug************************************/
	if(VERBOSE_CUT)
	{
		fprintf(stderr, "\n\n\n\n\n*************beg-[M::%s::score->%f] ==> Partition\n", __func__, mc_score_all_advance(mg->e, mg->s.a));
	}
	
	for (st = 0, i = 1; i <= mg->e->n_seq; ++i) {
		if (i == mg->e->n_seq || mg->e->cc[st]>>32 != mg->e->cc[i]>>32) {
			mc_solve_cc(opt, mg, b, st, i - st);
			st = i;
		}
	}

	if(VERBOSE_CUT)
	{
		fprintf(stderr, "##############end-[---M::%s::score->%f] ==> Partition\n", __func__, mc_score_all(mg->e, b));
		mc_status_all(mg->e, mg->s.a);
	}
	

	if(bp) mc_solve_bp(bp);	
	///mc_write_info(g, b);
	mc_svaux_destroy(b);
	if(bp) destroy_mc_bp_t(&bp);
	fprintf(stderr, "[M::%s::%.3f] ==> Partition\n", __func__, yak_realtime()-index_time);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r14
callq 0xefea7
movsd %xmm0, 0x10(%rsp)
andq $0x0, 0x8(%rsp)
movq 0x28(%rbx), %rdi
callq 0x12512f
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x125338
movq %rax, %r15
xorl %r12d, %r12d
testq %r13, %r13
je 0x12a605
movq 0x28(%rbx), %rdi
leaq 0x12916c(%rip), %rax    # 0x253758
movslq 0x7c(%rax), %rcx
movq %r15, %rsi
movq %r13, %rdx
callq 0x12513e
movq %rax, 0x8(%rsp)
testq %rax, %rax
jne 0x12a610
movb $0x1, %al
movq %rax, (%rsp)
xorl %r13d, %r13d
jmp 0x12a630
movq %rax, %r13
movq $0x0, (%rsp)
movq %rbx, %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0x129c1f
movq %r13, %rdi
callq 0x1266ce
pushq $0x1
popq %rbp
movq 0x28(%rbx), %rax
cmpl 0x38(%rax), %ebp
ja 0x12a673
je 0x12a655
movq 0x30(%rax), %rax
movl %r12d, %ecx
movl %ebp, %edx
movq (%rax,%rdx,8), %rdx
xorq (%rax,%rcx,8), %rdx
shrq $0x20, %rdx
je 0x12a66f
movl %ebp, %r8d
subl %r12d, %r8d
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl %r12d, %ecx
callq 0x126aa1
movl %ebp, %r12d
incl %ebp
jmp 0x12a633
cmpb $0x0, (%rsp)
je 0x12a683
movq %r15, %rdi
callq 0x12542d
jmp 0x12a69d
movq %r13, %rdi
callq 0x1266ce
movq %r15, %rdi
callq 0x12542d
leaq 0x8(%rsp), %rdi
callq 0x1252db
movq 0x12893c(%rip), %rax    # 0x252fe0
movq (%rax), %rbx
callq 0xefea7
subsd 0x10(%rsp), %xmm0
leaq 0xc4ad3(%rip), %rsi     # 0x1ef18c
leaq 0xc4af7(%rip), %rdx     # 0x1ef1b7
movq %rbx, %rdi
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: init_mc_clus_t(mc_opt_t const*, mc_g_t*, bubble_type*, unsigned int, mc_svaux_t*, unsigned int)
mc_clus_t *init_mc_clus_t(const mc_opt_t *opt, mc_g_t *mg, bubble_type* bub, uint32_t n_thread, mc_svaux_t *b, uint32_t flp_max)
{
	if((!bub)) return NULL;
	mc_clus_t *p; CALLOC(p, 1); 
	p->bub = bub; p->opt = opt; p->mg = mg; p->n = bub->ug->g->n_seq;
	CALLOC(p->lock, p->n);
	if(n_thread > 64) n_thread = 64; p->n_thread = n_thread;
	CALLOC(p->aux, p->n_thread);
	uint32_t k, ss = (p->n>>3)+(!!(p->n&7));
	for (k = 0; k < p->n_thread; k++) {
		kv_resize(uint8_t, p->aux[k].vis, ss); p->aux[k].vis.n = ss;
	}
	p->baux = b; p->lock_max = ((flp_max<=255)?flp_max:255); if(p->lock_max < 1) p->lock_max = 1;
	return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rdx, %rdx
je 0x12a810
movl %ecx, %r13d
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbp
movq %r8, 0x10(%rsp)
movl %r9d, 0xc(%rsp)
pushq $0x1
popq %rbx
movl $0x80, %esi
movq %rbx, %rdi
callq 0x2120
movq %rax, %r14
movq %r15, 0x30(%rax)
movq %rbp, 0x38(%rax)
movq %r12, 0x40(%rax)
movq 0x10(%r15), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %r15d
movl %r15d, %r12d
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movl %r12d, 0x54(%r14)
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2120
movq %rax, 0x48(%r14)
cmpl $0x40, %r13d
pushq $0x40
popq %rbp
cmovbl %r13d, %ebp
movl %ebp, 0x58(%r14)
pushq $0x28
popq %rsi
movq %rbp, %rdi
callq 0x2120
movq %rax, %r13
shrl $0x3, %r12d
andl $0x7, %r15d
cmpl $0x1, %r15d
sbbl $-0x1, %r12d
movq %rax, 0x60(%r14)
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, %r15
shrq $0x10, %r15
orq %rax, %r15
incq %r15
imulq $0x28, %rbp, %rbp
xorl %ebx, %ebx
cmpq %rbx, %rbp
je 0x12a7eb
cmpq %r12, 0x8(%r13,%rbx)
jae 0x12a7e0
movq %r15, 0x8(%r13,%rbx)
movq 0x10(%r13,%rbx), %rdi
movq %r15, %rsi
callq 0x2370
movq %rax, 0x10(%r13,%rbx)
movq %r12, (%r13,%rbx)
addq $0x28, %rbx
jmp 0x12a7bd
movq 0x10(%rsp), %rax
movq %rax, 0x68(%r14)
movl $0xff, %eax
movl 0xc(%rsp), %ecx
cmpl %eax, %ecx
cmovbl %ecx, %eax
testl %ecx, %ecx
pushq $0x1
popq %rcx
cmovnel %eax, %ecx
movb %cl, 0x50(%r14)
jmp 0x12a813
xorl %r14d, %r14d
movq %r14, %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: des_mc_clus_t(mc_clus_t*)
void des_mc_clus_t(mc_clus_t *p)
{
	if((!p)) return;
	uint32_t k; free(p->lock); osg_destroy(p->sg.g);
	if(p->asn) {
		free(p->asn->a); free(p->asn);
	}
	for (k = 0; k < p->n_thread; k++) free(p->aux[k].vis.a);
	free(p->aux); free(p->cc.ng.a); free(p->cc.nn.a); 
	free(p);
}

// Assembly:
testq %rdi, %rdi
je 0x12a8a8
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
callq 0x2220
movq 0x78(%rbx), %rdi
callq 0x13782f
movq 0x70(%rbx), %rax
testq %rax, %rax
je 0x12a85f
movq 0x10(%rax), %rdi
callq 0x2220
movq 0x70(%rbx), %rdi
callq 0x2220
pushq $0x10
popq %r14
xorl %r15d, %r15d
movl 0x58(%rbx), %eax
movq 0x60(%rbx), %rdi
cmpq %rax, %r15
jae 0x12a884
movq (%rdi,%r14), %rdi
callq 0x2220
incq %r15
addq $0x28, %r14
jmp 0x12a866
callq 0x2220
movq 0x28(%rbx), %rdi
callq 0x2220
movq 0x10(%rbx), %rdi
callq 0x2220
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2220
retq