LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mc_solve_core_adv(mc_opt_t const*, mc_g_t*, bubble_type*, kv_u_trans_t*)
void mc_solve_core_adv(const mc_opt_t *opt, mc_g_t *mg, bubble_type* bub, kv_u_trans_t *ref)
{
	double index_time = yak_realtime();
	uint32_t st, i;
	mc_svaux_t *b; mc_clus_t *bc; 
	// mc_bp_t *bp = NULL;
	mc_g_cc(mg->e);
	b = mc_svaux_init(mg, opt->seed);
	bc = init_mc_clus_t(opt, mg, bub, asm_opt.thread_num, b, 16); 
	if(ref && bc) bc->asn = gen_ref_bub(bc, ref);
	// bc = gen_mc_clus_t(mg->e, b, bub, ref, asm_opt.thread_num);
	// 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_adv(opt, mg, b, st, i - st, bc);
			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); des_mc_clus_t(bc); 
	// 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
pushq %rax
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
callq 0xefea7
movsd %xmm0, (%rsp)
movq 0x28(%rbx), %rdi
callq 0x12512f
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x125338
movq %rax, %r15
leaq 0x1288c2(%rip), %rax    # 0x253758
movl 0x7c(%rax), %ecx
pushq $0x10
popq %r9
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r15, %r8
callq 0x12a6d8
movq %rax, %r12
testq %r13, %r13
sete %al
testq %r12, %r12
sete %cl
orb %al, %cl
jne 0x12aed1
movq %r12, %rdi
movq %r13, %rsi
callq 0x12a8a9
movq %rax, 0x70(%r12)
xorl %ecx, %ecx
pushq $0x1
popq %rbp
movq 0x28(%rbx), %rax
cmpl 0x38(%rax), %ebp
ja 0x12af14
je 0x12aef7
movq 0x30(%rax), %rax
movl %ecx, %edx
movl %ebp, %esi
movq (%rax,%rsi,8), %rsi
xorq (%rax,%rdx,8), %rsi
shrq $0x20, %rsi
je 0x12af10
movl %ebp, %r8d
subl %ecx, %r8d
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %r9
callq 0x128ec8
movl %ebp, %ecx
incl %ebp
jmp 0x12aed6
movq %r15, %rdi
callq 0x12542d
movq %r12, %rdi
callq 0x12a825
movq 0x1280b5(%rip), %rax    # 0x252fe0
movq (%rax), %rbx
callq 0xefea7
subsd (%rsp), %xmm0
leaq 0xc424d(%rip), %rsi     # 0x1ef18c
leaq 0xc42d1(%rip), %rdx     # 0x1ef217
movq %rbx, %rdi
movb $0x1, %al
addq $0x8, %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: set_p_flag(mc_g_t*, unsigned int, unsigned char*, trans_chain*, signed char)
void set_p_flag(mc_g_t *mg, uint32_t uID, uint8_t* trio_flag, trans_chain* t_ch, int8_t s)
{
	uint32_t i;
	ma_utg_t *u = &(mg->ug->u.a[uID]);
	for (i = 0; i < u->n; i++)
	{
		trio_flag[u->a[i]>>33] |= SET_TRIO;
		if(t_ch->ir_het[u->a[i]>>33] == N_HET) continue;
		if(s == 0)
		{
			if(t_ch->ir_het[u->a[i]>>33]&P_HET)//special case
			{
				trio_flag[u->a[i]>>33] |= FATHER;
			}
			continue;
		} 
		trio_flag[u->a[i]>>33] |= (s > 0? FATHER:MOTHER);
	}
}

// Assembly:
movq 0x18(%rdi), %rdi
movl %esi, %eax
imulq $0x28, %rax, %rax
addq 0x10(%rdi), %rax
testb %r8b, %r8b
setle %sil
incb %sil
xorl %edi, %edi
movl 0x10(%rax), %r9d
cmpq %r9, %rdi
jae 0x12afc5
movq 0x18(%rax), %r9
movq (%r9,%rdi,8), %r9
shrq $0x21, %r9
orb $0x8, (%rdx,%r9)
movq 0x10(%rcx), %r10
movq 0x18(%rax), %r9
movq (%r9,%rdi,8), %r9
shrq $0x21, %r9
movb (%r10,%r9), %r10b
testb %r10b, %r10b
je 0x12afc0
movl %esi, %r11d
testb %r8b, %r8b
jne 0x12afbc
movb $0x1, %r11b
testb $0x2, %r10b
je 0x12afc0
orb %r11b, (%rdx,%r9)
incq %rdi
jmp 0x12af78
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: filter_ovlp_by_mc(ma_ug_t*, asg_t*, unsigned int, hap_overlaps_list*, mc_match_t*, signed char*)
void filter_ovlp_by_mc(ma_ug_t *ug, asg_t *read_g, uint32_t uID, hap_overlaps_list* ha, mc_match_t *ma, 
int8_t *s)
{
	mc_edge_t *o = pt_a(*ma, uID);
	uint32_t n = pt_n(*ma, uID), k, qn, tn;
	hap_overlaps *p = NULL;
	int index;

	for (k = 0; k < n; ++k)
	{
		qn = ma_x(o[k]); tn = ma_y(o[k]); p = NULL;
		if((s[qn]*s[tn])!=-1) continue;
		index = get_specific_hap_overlap(&(ha->x[qn]), qn, tn);
		if(index != -1 && ha->x[qn].a.a[index].score == (long long)o[k].w)
		{
			p = &(ha->x[qn].a.a[index]);
		}
		else
		{
			index = get_specific_hap_overlap(&(ha->x[tn]), tn, qn);
			if(index != -1 && ha->x[tn].a.a[index].score == (long long)o[k].w)
			{
				p = &(ha->x[tn].a.a[index]);
			}
		}
		if(!p) fprintf(stderr, "ERROR\n");
		p->status = FLIP;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x10(%rsp)
movq 0x10(%r8), %rax
movq 0x28(%r8), %rcx
movl %edx, %edx
movq (%rax,%rdx,8), %rax
movl %eax, %edx
shlq $0x4, %rdx
shrq $0x1c, %rax
andq $-0x10, %rax
leaq (%rax,%rcx), %rbx
addq $0x8, %rbx
xorl %r14d, %r14d
movq %r9, 0x8(%rsp)
movq %rdx, 0x20(%rsp)
movq %rbx, 0x18(%rsp)
cmpq %r14, %rdx
je 0x12b0cd
movq -0x8(%rbx,%r14), %r12
movq %r12, %r15
shrq $0x20, %r15
movsbl (%r9,%r15), %eax
movl %r12d, %r13d
movsbl (%r9,%r13), %ecx
imull %eax, %ecx
cmpl $-0x1, %ecx
jne 0x12b0c4
imulq $0x18, %r15, %rbp
movq 0x10(%rsp), %rbx
movq (%rbx), %rdi
addq %rbp, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0xcd675
movq (%rbx), %rdi
movq 0x18(%rsp), %rbx
cmpl $-0x1, %eax
je 0x12b07c
movq 0x10(%rdi,%rbp), %rcx
cvttsd2si (%rbx,%r14), %rdx
cltq
shlq $0x6, %rax
cmpq %rdx, 0x30(%rcx,%rax)
je 0x12b0b3
imulq $0x18, %r13, %r13
addq %r13, %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0xcd675
cmpl $-0x1, %eax
je 0x12b0dc
movq 0x10(%rsp), %rcx
movq (%rcx), %rcx
movq 0x10(%rcx,%r13), %rcx
cvttsd2si (%rbx,%r14), %rdx
cltq
shlq $0x6, %rax
cmpq %rdx, 0x30(%rcx,%rax)
jne 0x12b0dc
addq %rax, %rcx
movq 0x8(%rsp), %r9
movb $0x4, 0x2(%rcx)
movq 0x20(%rsp), %rdx
addq $0x10, %r14
jmp 0x12b00f
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x127efd(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0xbfc97(%rip), %rdi     # 0x1ead84
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: clean_ovlp_by_mc(mc_g_t*, hap_overlaps_list*)
void clean_ovlp_by_mc(mc_g_t *mg, hap_overlaps_list* ha)
{
	uint32_t v, i, k, qn, tn, types[4];
    types[X2Y] = Y2X; types[Y2X] = X2Y; types[XCY] = YCX; types[YCX] = XCY;
	int index;
	hap_overlaps *x = NULL, *y = NULL;
	for (i = 0; i < mg->e->n_seq; ++i) 
	{
		filter_ovlp_by_mc(mg->ug, mg->rg, i, ha, mg->e, mg->s.a);
	}

	for (v = 0; v < ha->num; v++)
	{
		for (i = 0; i < ha->x[v].a.n; i++)
		{
			qn = ha->x[v].a.a[i].xUid;
			tn = ha->x[v].a.a[i].yUid;
			x = &(ha->x[v].a.a[i]);
			if(x->status != FLIP) continue;
			index = get_specific_hap_overlap(&(ha->x[tn]), tn, qn);
			if(index != -1)
			{
				y = &(ha->x[tn].a.a[index]);
				set_reverse_hap_overlap(y, x, types);
				y->status = FLIP;
			}
			if(index == -1) fprintf(stderr, "ERROR\n");
		}
	}

	for (v = 0; v < ha->num; v++)
    {
        for (i = k = 0; i < ha->x[v].a.n; i++)
        {
            if(ha->x[v].a.a[i].status != FLIP) continue;

            ha->x[v].a.a[k] = ha->x[v].a.a[i];
            k++;
        }
        ha->x[v].a.n = k;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movaps 0xc045d(%rip), %xmm0    # 0x1eb570
movaps %xmm0, 0x10(%rsp)
xorl %ebp, %ebp
movq 0x28(%r14), %r8
cmpl 0x38(%r8), %ebp
jae 0x12b136
movq 0x10(%r14), %r9
movl %ebp, %edx
movq %rbx, %rcx
callq 0x12afc6
incl %ebp
jmp 0x12b11a
xorl %eax, %eax
movl 0x8(%rbx), %ecx
cmpq %rcx, %rax
jae 0x12b1e2
xorl %r15d, %r15d
movq %rax, 0x8(%rsp)
imulq $0x18, %rax, %r12
movl %r15d, %r15d
movq (%rbx), %rdi
cmpq %r15, (%rdi,%r12)
jbe 0x12b1d5
leaq (%rdi,%r12), %rax
movq 0x10(%rax), %rbp
movq %r15, %rax
shlq $0x6, %rax
cmpb $0x4, 0x2(%rbp,%rax)
jne 0x12b1b2
addq %rax, %rbp
movl 0x24(%rbp), %edx
movl 0x28(%rbp), %esi
imulq $0x18, %rsi, %r14
addq %r14, %rdi
callq 0xcd675
cmpl $-0x1, %eax
je 0x12b1b7
movq (%rbx), %rcx
movq 0x10(%rcx,%r14), %r14
movslq %eax, %r13
shlq $0x6, %r13
leaq (%r14,%r13), %rdi
movq %rbp, %rsi
leaq 0x10(%rsp), %rdx
callq 0xcd6a4
movb $0x4, 0x2(%r14,%r13)
incl %r15d
jmp 0x12b150
movq 0x127e22(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0xbfbbc(%rip), %rdi     # 0x1ead84
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0x12b1b2
movq 0x8(%rsp), %rax
incq %rax
jmp 0x12b138
xorl %eax, %eax
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x12b259
xorl %ecx, %ecx
imulq $0x18, %rax, %rdx
xorl %esi, %esi
movl %esi, %esi
movq (%rbx), %r9
leaq (%r9,%rdx), %r8
movl %ecx, %edi
cmpq %rsi, (%r9,%rdx)
jbe 0x12b24e
movq 0x10(%r8), %r8
movq %rsi, %r9
shlq $0x6, %r9
cmpb $0x4, 0x2(%r8,%r9)
jne 0x12b24a
addq %r8, %r9
shlq $0x6, %rdi
movups (%r9), %xmm0
movups 0x10(%r9), %xmm1
movups 0x20(%r9), %xmm2
movups 0x30(%r9), %xmm3
movups %xmm3, 0x30(%r8,%rdi)
movups %xmm2, 0x20(%r8,%rdi)
movups %xmm1, 0x10(%r8,%rdi)
movups %xmm0, (%r8,%rdi)
incl %ecx
incl %esi
jmp 0x12b1f3
movq %rdi, (%r8)
incq %rax
movl 0x8(%rbx), %ecx
jmp 0x12b1e4
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: filter_ta_by_mc(ma_ug_t*, asg_t*, unsigned int, kv_u_trans_t*, mc_match_t*, signed char*)
void filter_ta_by_mc(ma_ug_t *ug, asg_t *read_g, uint32_t uID, kv_u_trans_t* ta, mc_match_t *ma, int8_t *s)
{
	mc_edge_t *o = pt_a(*ma, uID);
	uint32_t n = pt_n(*ma, uID), k, qn, tn;
	u_trans_t *p = NULL;
	for (k = 0; k < n; ++k)
	{
		qn = ma_x(o[k]); tn = ma_y(o[k]); p = NULL;
		if((s[qn]*s[tn])!=-1) continue;
		get_u_trans_spec(ta, qn, tn, &p, NULL);
		if(p && p->nw == o[k].w) {
			p->del = 0; 
		}
		else {
			get_u_trans_spec(ta, tn, qn, &p, NULL);
			if(p && p->nw == o[k].w) p->del = 0;
		}
		if(!p) fprintf(stderr, "ERROR-ta-p\n");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbx
movq %rcx, 0x10(%rsp)
movq 0x10(%r8), %rax
movq 0x28(%r8), %rcx
movl %edx, %edx
movq (%rax,%rdx,8), %rax
movl %eax, %ebp
shlq $0x4, %rbp
shrq $0x1c, %rax
andq $-0x10, %rax
leaq (%rax,%rcx), %r15
addq $0x8, %r15
xorl %r14d, %r14d
cmpq %r14, %rbp
je 0x12b361
movq -0x8(%r15,%r14), %r13
movq %r13, %r12
shrq $0x20, %r12
andq $0x0, 0x8(%rsp)
movsbl (%rbx,%r12), %eax
movl %r13d, %ecx
movsbl (%rbx,%rcx), %ecx
imull %eax, %ecx
cmpl $-0x1, %ecx
jne 0x12b33a
movq 0x10(%rsp), %rdi
movl %r12d, %esi
movl %r13d, %edx
leaq 0x8(%rsp), %rcx
xorl %r8d, %r8d
callq 0x8feef
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x12b305
movsd 0x20(%rax), %xmm0
ucomisd (%r15,%r14), %xmm0
jne 0x12b305
jnp 0x12b336
movq 0x10(%rsp), %rdi
movl %r13d, %esi
movl %r12d, %edx
leaq 0x8(%rsp), %rcx
xorl %r8d, %r8d
callq 0x8feef
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x12b343
movsd 0x20(%rax), %xmm0
ucomisd (%r15,%r14), %xmm0
jne 0x12b33a
jp 0x12b33a
andb $0x7f, 0x28(%rax)
addq $0x10, %r14
jmp 0x12b2a5
movq 0x127c96(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0xc3ed5(%rip), %rdi     # 0x1ef229
pushq $0xb
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0x12b33a
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: clean_ta_by_mc(mc_g_t*, kv_u_trans_t*)
void clean_ta_by_mc(mc_g_t *mg, kv_u_trans_t *ta)
{
	uint32_t v, i;
	u_trans_t *p = NULL;
	for (i = 0; i < ta->n; i++) ta->a[i].del = 1;
	for (i = 0; i < mg->e->n_seq; ++i) filter_ta_by_mc(mg->ug, mg->rg, i, ta, mg->e, mg->s.a);
	for (i = v = 0; i < ta->n; i++) {
		if(ta->a[i].del) continue;
		ta->a[v++] = ta->a[i];
	}
	ta->n = v;
	for (i = 0; i < v; i++) {
		kv_pushp(u_trans_t, *ta, &p);
		(*p) = ta->a[i];
		p->qn = ta->a[i].tn; p->qs = ta->a[i].ts; p->qe = ta->a[i].te;
        p->tn = ta->a[i].qn; p->ts = ta->a[i].qs; p->te = ta->a[i].qe;
	}
	kt_u_trans_t_idx(ta, mg->ug->g->n_seq);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
movl %eax, %eax
cmpq %rax, (%rbx)
jbe 0x12b39b
movq 0x10(%rbx), %rcx
imulq $0x30, %rax, %rdx
orb $-0x80, 0x28(%rcx,%rdx)
incl %eax
jmp 0x12b383
xorl %ebp, %ebp
movq 0x28(%r14), %r8
cmpl 0x38(%r8), %ebp
jae 0x12b3b9
movq 0x10(%r14), %r9
movl %ebp, %edx
movq %rbx, %rcx
callq 0x12b268
incl %ebp
jmp 0x12b39d
xorl %eax, %eax
xorl %ecx, %ecx
movl %ecx, %ecx
movl %eax, %edx
cmpq %rcx, (%rbx)
jbe 0x12b3fb
movq 0x10(%rbx), %rsi
imulq $0x30, %rcx, %rdi
cmpb $0x0, 0x28(%rsi,%rdi)
js 0x12b3f7
addq %rsi, %rdi
incl %eax
imulq $0x30, %rdx, %rdx
movups (%rdi), %xmm0
movups 0x10(%rdi), %xmm1
movups 0x20(%rdi), %xmm2
movups %xmm2, 0x20(%rsi,%rdx)
movups %xmm1, 0x10(%rsi,%rdx)
movups %xmm0, (%rsi,%rdx)
incl %ecx
jmp 0x12b3bd
movq %rdx, (%rbx)
imulq $0x30, %rdx, %r15
xorl %r12d, %r12d
pushq $0x2
popq %r13
cmpq %r12, %r15
je 0x12b49c
movq (%rbx), %rcx
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rcx
jne 0x12b441
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
cmoveq %r13, %rdx
movq %rdx, 0x8(%rbx)
imulq $0x30, %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%rbx)
movq (%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbx)
imulq $0x30, %rcx, %rcx
movups (%rax,%r12), %xmm0
movups 0x10(%rax,%r12), %xmm1
movups 0x20(%rax,%r12), %xmm2
movups %xmm2, 0x20(%rax,%rcx)
movups %xmm1, 0x10(%rax,%rcx)
movups %xmm0, (%rax,%rcx)
movq 0x10(%rbx), %rdx
movl 0x14(%rdx,%r12), %esi
movl %esi, 0x8(%rax,%rcx)
movq 0xc(%rdx,%r12), %rsi
movq %rsi, (%rax,%rcx)
movl 0x8(%rdx,%r12), %esi
movl %esi, 0x14(%rax,%rcx)
movq (%rdx,%r12), %rdx
movq %rdx, 0xc(%rax,%rcx)
addq $0x30, %r12
jmp 0x12b409
movq 0x18(%r14), %rax
movq 0x18(%rax), %rax
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andl 0x14(%rax), %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x88a31
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: write_mc_g_t(mc_opt_t*, mc_g_t*, char const*)
void write_mc_g_t(mc_opt_t *opt, mc_g_t *mg, const char *name)
{
	FILE* fp = fopen(name, "w");

    fwrite(opt, sizeof(mc_opt_t), 1, fp);
	fwrite(&(mg->s.n), sizeof(mg->s.n), 1, fp);
	fwrite(mg->s.a, sizeof(mc_node_t), mg->s.n, fp);
	fwrite(&(mg->e->n_seq), sizeof(mg->e->n_seq), 1, fp);
	fwrite(&(mg->e->ma.n), sizeof(mg->e->ma.n), 1, fp);
	fwrite(mg->e->ma.a, sizeof(mc_edge_t), mg->e->ma.n, fp);
	fwrite(&(mg->e->idx.n), sizeof(mg->e->idx.n), 1, fp);
	fwrite(mg->e->idx.a, sizeof(uint64_t), mg->e->idx.n, fp);

    fclose(fp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
leaq 0xcf17f(%rip), %rsi     # 0x1fa6a1
movq %rdx, %rdi
callq 0x2210
movq %rax, %rbx
pushq $0x20
popq %rsi
pushq $0x1
popq %r12
movq %r15, %rdi
movq %r12, %rdx
movq %rax, %rcx
callq 0x2410
pushq $0x8
popq %r15
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x2410
movq (%r14), %rdx
movq 0x10(%r14), %rdi
movq %r12, %rsi
movq %rbx, %rcx
callq 0x2410
movq 0x28(%r14), %rdi
addq $0x38, %rdi
pushq $0x4
popq %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x2410
movq 0x28(%r14), %rdi
addq $0x18, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x2410
movq 0x28(%r14), %rax
movq 0x18(%rax), %rdx
movq 0x28(%rax), %rdi
pushq $0x10
popq %rsi
movq %rbx, %rcx
callq 0x2410
movq 0x28(%r14), %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x2410
movq 0x28(%r14), %rax
movq (%rax), %rdx
movq 0x10(%rax), %rdi
movq %r15, %rsi
movq %rbx, %rcx
callq 0x2410
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2190
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: load_mc_g_t(mc_opt_t*, char const*)
mc_g_t* load_mc_g_t(mc_opt_t *opt, const char *name)
{
	FILE* fp = NULL; 
    fp = fopen(name, "r"); 
    if(!fp) return NULL;

	uint64_t flag = 0;
	mc_g_t *mg = NULL; CALLOC(mg, 1);
	kv_init(mg->s); CALLOC(mg->e, 1);

    flag += fread(opt, sizeof(mc_opt_t), 1, fp);

	flag += fread(&(mg->s.n), sizeof(mg->s.n), 1, fp);
	mg->s.m = mg->s.n; MALLOC(mg->s.a, mg->s.n);
	flag += fread(mg->s.a, sizeof(mc_node_t), mg->s.n, fp);

	flag += fread(&(mg->e->n_seq), sizeof(mg->e->n_seq), 1, fp);

	flag += fread(&(mg->e->ma.n), sizeof(mg->e->ma.n), 1, fp);
	mg->e->ma.m = mg->e->ma.n; MALLOC(mg->e->ma.a, mg->e->ma.n);
	flag += fread(mg->e->ma.a, sizeof(mc_edge_t), mg->e->ma.n, fp);

	flag += fread(&(mg->e->idx.n), sizeof(mg->e->idx.n), 1, fp);
	mg->e->idx.m = mg->e->idx.n; MALLOC(mg->e->idx.a, mg->e->idx.n);
	flag += fread(mg->e->idx.a, sizeof(uint64_t), mg->e->idx.n, fp);

    fclose(fp);
	return mg;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %r12
leaq 0xc60b8(%rip), %rsi     # 0x1f16b7
movq %rax, %rdi
callq 0x2210
testq %rax, %rax
je 0x12b714
movq %rax, %rbx
pushq $0x1
popq %r15
pushq $0x30
popq %rsi
movq %r15, %rdi
callq 0x2120
movq %rax, %r14
pushq $0x40
popq %rsi
movq %r15, %rdi
callq 0x2120
movq %rax, 0x28(%r14)
pushq $0x20
popq %rsi
movq %r12, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x22f0
pushq $0x8
popq %r12
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x22f0
movq (%r14), %r13
movq %r13, 0x8(%r14)
movq %r13, %rdi
callq 0x2280
movq %rax, 0x10(%r14)
movq %rax, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x22f0
movq 0x28(%r14), %r13
leaq 0x38(%r13), %rdi
pushq $0x4
popq %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x22f0
leaq 0x18(%r13), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x22f0
movq 0x18(%r13), %rbp
movq %rbp, 0x20(%r13)
movq %rbp, %rdi
shlq $0x4, %rdi
callq 0x2280
movq %rax, 0x28(%r13)
pushq $0x10
popq %rsi
movq %rax, %rdi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x22f0
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x22f0
movq (%r13), %r15
movq %r15, 0x8(%r13)
leaq (,%r15,8), %rdi
callq 0x2280
movq %rax, 0x10(%r13)
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x22f0
movq %rbx, %rdi
callq 0x2190
jmp 0x12b717
xorl %r14d, %r14d
movq %r14, %rax
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: debug_mc_g_t(char const*)
void debug_mc_g_t(const char* name)
{
	mc_opt_t opt;
	mc_g_t *mg = load_mc_g_t(&opt, name);
	mc_solve_core(&opt, mg, NULL);
	destory_mc_g_t(&mg);
	exit(1);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rsi
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x12b5e7
movq %rsp, %r14
movq %rax, (%r14)
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x12a599
movq %r14, %rdi
callq 0x123cde
pushq $0x1
popq %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: print_hap_s(signed char*, unsigned int)
void print_hap_s(int8_t *s, uint32_t sn)
{
	fprintf(stderr, "\n[M::%s]\n", __func__);
	uint32_t i;
	for (i = 0; i < sn; i++)
	{
		fprintf(stderr,"utg%.6ul\t", i + 1);
		if(s[i] > 0) fprintf(stderr, "h%u\n", 1);
		else if(s[i] < 0) fprintf(stderr, "h%u\n", 2);
		else 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 0x127866(%rip), %r12    # 0x252fe0
movq (%r12), %rdi
leaq 0xc2c36(%rip), %rsi     # 0x1ee3bb
leaq 0xc3aa9(%rip), %rdx     # 0x1ef235
xorl %eax, %eax
callq 0x22b0
movl %ebp, %ebp
leaq 0xc2bb9(%rip), %r14     # 0x1ee355
pushq $0xa
popq %r13
xorl %r15d, %r15d
cmpq %r15, %rbp
je 0x12b7f9
movq (%r12), %rdi
leal 0x1(%r15), %edx
movq %r14, %rsi
xorl %eax, %eax
callq 0x22b0
cmpb $0x0, (%rbx,%r15)
jg 0x12b7d4
movq (%r12), %rsi
js 0x12b7e3
movl %r13d, %edi
callq 0x2270
incq %r15
jmp 0x12b7a3
movq (%r12), %rdi
leaq 0xc3a62(%rip), %rsi     # 0x1ef241
pushq $0x1
jmp 0x12b7ef
movq %rsi, %rdi
leaq 0xc3a54(%rip), %rsi     # 0x1ef241
pushq $0x2
popq %rdx
xorl %eax, %eax
callq 0x22b0
jmp 0x12b7cf
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: dump_debug_phasing(char const*, kv_u_trans_t*, ma_ug_t*, asg_t*, double, unsigned int, signed char*, unsigned int, bubble_type*, kv_u_trans_t*)
void dump_debug_phasing(const char* fn, kv_u_trans_t *ta, ma_ug_t *ug, asg_t *read_g, double f_rate, 
uint32_t renew_s, int8_t *s, uint32_t is_sys, bubble_type* bub, kv_u_trans_t *ref)
{
	fprintf(stderr, "\n[M::%s]\n", __func__);
    char *buf = (char*)calloc(strlen(fn) + 50, 1);
    sprintf(buf, "%s.hic.dbg.dump.bin", fn);
    FILE *fp = fopen(buf, "w");

	dump_kv_u_trans_t(ta, fp);///ta
	dump_ma_ug_t(ug, fp);///ug
	dump_asg_t(read_g, fp);///read_g
	fwrite(&f_rate, sizeof(f_rate), 1, fp);///f_rate
	fwrite(&renew_s, sizeof(renew_s), 1, fp);///renew_s
	fwrite(s, sizeof((*s)), ug->g->n_seq, fp);///s
	fwrite(&is_sys, sizeof(is_sys), 1, fp);///is_sys
	dump_bubble_type(bub, fp);///bub
	dump_kv_u_trans_t(ref, fp);///ta
	dump_rid(&R_INF, fp);

	fclose(fp);
    free(buf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x8(%rsp)
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %rbp
movq 0x70(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x20(%rsp), %rax
movsd %xmm0, (%rax)
leaq 0x4(%rsp), %rax
movl %r8d, (%rax)
movq 0x1275b7(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0xc2988(%rip), %rsi     # 0x1ee3bb
leaq 0xc3952(%rip), %rdx     # 0x1ef38c
xorl %eax, %eax
callq 0x22b0
movq %rbp, %rdi
callq 0x2090
leaq 0x32(%rax), %rdi
pushq $0x1
popq %rbx
movq %rbx, %rsi
callq 0x2120
movq %rax, %r12
leaq 0xc38fc(%rip), %rsi     # 0x1ef35e
movq %rax, %rdi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0xcec2b(%rip), %rsi     # 0x1fa6a1
movq %r12, %rdi
callq 0x2210
movq %rax, %rbp
movq %r15, %rdi
movq %rax, %rsi
callq 0x12d861
movq %r13, %rdi
movq %rbp, %rsi
callq 0x12d9c2
movq %r14, %rdi
movq %rbp, %rsi
callq 0x12d8c7
pushq $0x8
popq %rsi
leaq 0x20(%rsp), %rdi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x2410
pushq $0x4
popq %r14
leaq 0x4(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x2410
movq 0x18(%r13), %rax
movl 0x14(%rax), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %rbp, %rcx
callq 0x2410
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x2410
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x12dacd
movq 0x18(%rsp), %rdi
movq %rbp, %rsi
callq 0x12d861
leaq 0x128713(%rip), %rdi    # 0x254230
movq %rbp, %rsi
callq 0x12dbb8
movq %rbp, %rdi
callq 0x2190
movq %r12, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: comp(int, int, int, mcb_t*, int*)
void comp(int m, int N, int M, mcb_t *p, int *c)
{
    if (m == M + 1)
    {
		int i;
		mcg_node_t x = 0;
		for (i = 0; i < M; i++) x |= ((mcg_node_t)1<<(c[i+1]-1));
		kv_push(mcg_node_t, *p, x);
    }
    else
    {
        for (c[m] = c[m - 1] + 1; c[m] <= N - M + m; c[m]++) 
        {
            comp(m + 1, N, M, p, c);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movl %edx, %r15d
leal 0x1(%r15), %eax
cmpl %edi, %eax
movq %rcx, (%rsp)
jne 0x12bb7f
xorl %eax, %eax
testl %r15d, %r15d
cmovlel %eax, %r15d
xorl %ebp, %ebp
cmpq %rax, %r15
je 0x12bbc4
movb 0x4(%r14,%rax,4), %dl
incq %rax
decb %dl
btsl %edx, %ebp
jmp 0x12bb6b
movl %esi, %r12d
movl %edi, %r13d
movslq %edi, %rax
leaq (%r14,%rax,4), %rbp
leaq (%r14,%rax,4), %rax
addq $-0x4, %rax
leal (%r12,%r13), %ebx
subl %r15d, %ebx
incl %r13d
movl (%rax), %eax
leal 0x1(%rax), %edx
movl %edx, (%rbp)
cmpl %ebx, %eax
jge 0x12bc05
movl %r13d, %edi
movl %r12d, %esi
movl %r15d, %edx
movq %r14, %r8
callq 0x12bb43
movq (%rsp), %rcx
movq %rbp, %rax
jmp 0x12bb9e
movq (%rcx), %rax
movq 0x8(%rcx), %rsi
cmpq 0x10(%rcx), %rsi
jne 0x12bbfa
leaq (%rsi,%rsi), %rdx
testq %rsi, %rsi
pushq $0x2
popq %rsi
cmovneq %rdx, %rsi
movq %rsi, 0x10(%rcx)
shlq $0x2, %rsi
movq %rax, %rdi
callq 0x2370
movq (%rsp), %rcx
movq %rax, (%rcx)
movq 0x8(%rcx), %rsi
leaq 0x1(%rsi), %rdx
movq %rdx, 0x8(%rcx)
movl %ebp, (%rax,%rsi,4)
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: init_mc_gg_t(unsigned int, kv_gg_status*, unsigned short)
mc_gg_t *init_mc_gg_t(uint32_t un, kv_gg_status *s, uint16_t hapN)
{
	uint32_t i; 
	int *c = NULL; CALLOC(c, hapN+1);
	mc_gg_t *p = NULL; CALLOC(p, 1);
	// p->ug = ug; p->rg = read_g; 
	p->un = un; p->s = s; p->hN = hapN;
	CALLOC(p->m.a, p->hN); p->m.n = p->m.m = hapN;
	for (i = 0; i < p->hN; i++) get_mcb(hapN, i+1, &(p->m.a[i]), c);
	p->mask = (1<<hapN); p->mask--;
	free(c);
	return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r12
movl %edi, %ebp
leal 0x1(%rbx), %edi
pushq $0x4
popq %rsi
callq 0x2120
movq %rax, %r14
pushq $0x1
popq %rdi
pushq $0x38
popq %rsi
callq 0x2120
movq %rax, %r15
movl %ebp, 0x8(%rax)
movq %r12, (%rax)
movw %bx, 0x34(%rax)
movl %ebx, %r12d
pushq $0x18
popq %rsi
movq %r12, %rdi
callq 0x2120
movq %rax, %r13
movq %rax, 0x28(%r15)
movq %r12, 0x20(%r15)
movq %r12, 0x18(%r15)
xorl %ebp, %ebp
cmpq %rbp, %r12
je 0x12bcd0
incq %rbp
movl %ebx, %edi
movl %ebp, %esi
movq %r13, %rdx
movq %r14, %rcx
callq 0x12bc14
addq $0x18, %r13
jmp 0x12bcb3
pushq $-0x1
popq %rax
movl %ebx, %ecx
shll %cl, %eax
notl %eax
movl %eax, 0x30(%r15)
movq %r14, %rdi
callq 0x2220
movq %r15, %rax
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_gg_t(mc_gg_t**)
void destory_mc_gg_t(mc_gg_t **p)
{
	uint32_t i; 
	if(!p || !(*p)) return;
	for (i = 0; i < (*p)->m.m; i++)
	{
		free((*p)->m.a[i].a);
	}
	free((*p)->m.a);
	
	if((*p)->e)
	{
		kv_destroy((*p)->e->idx);
		kv_destroy((*p)->e->ma);
		free((*p)->e->cc);
		free((*p)->e);
	}
	free((*p));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x12bd30
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x12bd30
xorl %ecx, %ecx
movl %ecx, %r14d
movq 0x28(%rax), %rdi
cmpq %r14, 0x20(%rax)
jbe 0x12bd38
imulq $0x18, %r14, %rax
movq (%rdi,%rax), %rdi
callq 0x2220
leal 0x1(%r14), %ecx
movq (%rbx), %rax
jmp 0x12bd0d
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x2220
movq (%rbx), %rdi
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x12bd81
movq 0x10(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x10(%rax), %rax
movq 0x28(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x10(%rax), %rax
movq 0x30(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x10(%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: update_mc_edges_general(mc_gg_t*, kv_u_trans_t*, unsigned short)
void update_mc_edges_general(mc_gg_t *mg, kv_u_trans_t *ta, uint16_t hapN)
{
	uint32_t i, k;
	mc_edge_t *ma = NULL;
	CALLOC(mg->e, 1);
	mg->e->n_seq = mg->un;
	kv_init(mg->e->idx); kv_init(mg->e->ma); 

	for (i = 0; i < ta->n; ++i)
	{
		if(ta->a[i].del) continue;
		if(mg->s->a[ta->a[i].qn].h[0] >= hapN && mg->s->a[ta->a[i].qn].h[1] >= hapN) continue;
		if(mg->s->a[ta->a[i].tn].h[0] >= hapN && mg->s->a[ta->a[i].tn].h[1] >= hapN) continue;
		kv_pushp(mc_edge_t, mg->e->ma, &ma);
		ma->x = (uint64_t)ta->a[i].qn << 32 | ta->a[i].tn;
		ma->w = w_cast((ta->a[i].nw));
	}

	for (i = k = 0; i < mg->e->ma.n; i++)
    {
        if(mg->e->ma.a[i].w == 0) continue;
        mg->e->ma.a[k] = mg->e->ma.a[i];
        k++;
    }
    mg->e->ma.n = k;
    
    radix_sort_mce(mg->e->ma.a, mg->e->ma.a + mg->e->ma.n);
    mc_edges_idx(mg->e);
    mc_edges_symm(mg->e);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x1
popq %rdi
pushq $0x40
popq %rsi
callq 0x2120
movq %rax, 0x10(%rbx)
movl 0x8(%rbx), %ecx
movl %ecx, 0x38(%rax)
xorl %r15d, %r15d
pushq $0x2
popq %r12
movl %r15d, %r15d
cmpq %r15, (%r14)
jbe 0x12c165
movq 0x10(%r14), %rdx
imulq $0x30, %r15, %r13
cmpb $0x0, 0x28(%rdx,%r13)
js 0x12c15d
leaq (%rdx,%r13), %rsi
movq (%rbx), %rcx
movq (%rcx), %rcx
movl 0x8(%rsi), %esi
movq %rsi, %rdi
shlq $0x5, %rdi
cmpw %bp, 0x4(%rcx,%rdi)
jb 0x12c0d3
addq %rcx, %rdi
addq $0x4, %rdi
cmpw %bp, 0x2(%rdi)
jae 0x12c15d
movl 0x14(%rdx,%r13), %edi
shlq $0x5, %rdi
cmpw %bp, 0x4(%rcx,%rdi)
jb 0x12c0f0
addq %rdi, %rcx
addq $0x4, %rcx
cmpw %bp, 0x2(%rcx)
jae 0x12c15d
movq 0x18(%rax), %rcx
cmpq 0x20(%rax), %rcx
jne 0x12c12c
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
cmoveq %r12, %rsi
movq %rsi, 0x20(%rax)
movq 0x28(%rax), %rdi
shlq $0x4, %rsi
callq 0x2370
movq %rax, %rcx
movq 0x10(%rbx), %rax
movq %rcx, 0x28(%rax)
movq 0x10(%r14), %rdx
movl 0x8(%rdx,%r13), %esi
jmp 0x12c130
movq 0x28(%rax), %rcx
movq 0x18(%rax), %rdi
leaq 0x1(%rdi), %r8
movq %r8, 0x18(%rax)
shlq $0x4, %rdi
shlq $0x20, %rsi
movl 0x14(%rdx,%r13), %r8d
orq %rsi, %r8
movq %r8, (%rcx,%rdi)
movsd 0x20(%rdx,%r13), %xmm0
movsd %xmm0, 0x8(%rcx,%rdi)
incl %r15d
jmp 0x12c087
xorl %ecx, %ecx
xorpd %xmm0, %xmm0
xorl %edx, %edx
movl %ecx, %ecx
movl %edx, %esi
cmpq %rcx, 0x18(%rax)
jbe 0x12c1ac
movq 0x28(%rax), %rdi
movq %rcx, %r8
shlq $0x4, %r8
movsd 0x8(%rdi,%r8), %xmm1
ucomisd %xmm0, %xmm1
jne 0x12c191
jnp 0x12c1a8
addq %rdi, %r8
shlq $0x4, %rsi
movupd (%r8), %xmm1
movupd %xmm1, (%rdi,%rsi)
incl %edx
movq 0x10(%rbx), %rax
incl %ecx
jmp 0x12c16d
movq %rsi, 0x18(%rax)
movq 0x28(%rax), %rdi
shlq $0x4, %rsi
addq %rdi, %rsi
callq 0x122033
movq 0x10(%rbx), %rdi
callq 0x123f79
movq 0x10(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x123de4
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: init_mc_poy_t(unsigned int, unsigned int)
mc_poy_t *init_mc_poy_t(uint32_t un, uint32_t hapN)
{
	uint32_t i;
	mc_poy_t *z = NULL; CALLOC(z, 1);
	MALLOC(z->z, ((uint32_t)un<<hapN));
	for (i = 0; i < ((uint32_t)un<<hapN); i++) z->z[i] = 0;
	z->hapN = hapN;
	return z;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movl %edi, %r14d
pushq $0x1
popq %rdi
pushq $0x10
popq %rsi
callq 0x2120
movq %rax, %r15
movl %ebx, %ecx
shll %cl, %r14d
leaq (,%r14,8), %rdi
callq 0x2280
movq %rax, (%r15)
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x12c21e
andq $0x0, (%rax,%rcx,8)
incq %rcx
jmp 0x12c20f
movl %ebx, 0x8(%r15)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mcgg_svaux_init(mc_gg_t const*, unsigned long, unsigned int)
mcgg_svaux_t *mcgg_svaux_init(const mc_gg_t *mg, uint64_t x, uint32_t hapN)
{
    uint32_t st, i, max_cc = 0;
    mc_match_t *ma = mg->e;
    mcgg_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->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));
    
	b->z = init_mc_poy_t(ma->n_seq, hapN);
	b->z_opt = init_mc_poy_t(ma->n_seq, hapN);

	b->m = mg->m.a;
	b->mask = ((mcg_node_t)1)<<hapN; b->mask--;
	b->hapN = hapN;
    return b;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r12
movq %rdi, %r15
movq 0x10(%rdi), %rbp
pushq $0x1
popq %r13
pushq $0x70
popq %rsi
movq %r13, %rdi
callq 0x2120
movq %rax, %r14
movq %r12, (%rax)
movl 0x38(%rbp), %r12d
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %r12, %r13
ja 0x12c2b0
je 0x12c29e
movq 0x30(%rbp), %rdx
movl %ecx, %esi
movq (%rdx,%r13,8), %rdi
xorq (%rdx,%rsi,8), %rdi
shrq $0x20, %rdi
je 0x12c2ab
movl %r13d, %edx
subl %ecx, %edx
cmpl %edx, %eax
cmovbel %edx, %eax
movl %r13d, %ecx
incq %r13
jmp 0x12c283
movl %eax, %edi
shlq $0x2, %rdi
callq 0x2280
movq %rax, 0x28(%r14)
movq (%r15), %rax
movq (%rax), %rax
movq %rax, 0x50(%r14)
pushq $0x20
popq %rsi
movq %r12, %rdi
callq 0x2120
movq %rax, 0x58(%r14)
movq %r12, %r13
shlq $0x2, %r13
movq %r13, %rdi
callq 0x2280
movq %rax, 0x30(%r14)
movq %r13, %rdi
callq 0x2280
movq %rax, 0x38(%r14)
movq %rax, %rdi
movl $0xff, %esi
movq %r13, %rdx
callq 0x20e0
movl %r12d, %edi
movl %ebx, %esi
callq 0x12c1e0
movq %rax, 0x40(%r14)
movl 0x38(%rbp), %edi
movl %ebx, %esi
callq 0x12c1e0
movq %rax, 0x48(%r14)
movq 0x28(%r15), %rax
movq %rax, 0x60(%r14)
pushq $-0x1
popq %rax
movl %ebx, %ecx
shll %cl, %eax
notl %eax
movl %eax, 0x68(%r14)
movl %ebx, 0x6c(%r14)
movq %r14, %rax
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: mcgg_svaux_destroy(mcgg_svaux_t*)
void mcgg_svaux_destroy(mcgg_svaux_t *b)
{
	b->s = NULL;
    kv_destroy(b->cc_edge); free(b->cc_node);
    free(b->s); free(b->s_opt);
    destroy_mc_poy_t(&(b->z)); 
	destroy_mc_poy_t(&(b->z_opt));
    free(b->bfs); free(b->bfs_mark);
    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
leaq 0x40(%rbx), %rdi
callq 0x12c22b
leaq 0x48(%rbx), %rdi
callq 0x12c22b
movq 0x30(%rbx), %rdi
callq 0x2220
movq 0x38(%rbx), %rdi
callq 0x2220
movq %rbx, %rdi
popq %rbx
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: debug_hapM(mc_gg_status*, char const*)
void debug_hapM(mc_gg_status *s, const char* cmd)
{
	uint32_t i, cn, hn = s->h[s->hc];
	mcg_node_t ref = s->s;
	for (i = cn = 0; i < 32; i++) cn += ((ref>>i)&1);
	if (cn != hn) fprintf(stderr, "%s-ERROR-cn, cn-%u, hn-%u\n", cmd, cn, hn);
	else fprintf(stderr, "%s-pass-cn, cn-%u, hn-%u\n", cmd, cn, hn);
}

// Assembly:
movq %rsi, %rdx
movzwl 0x8(%rdi), %eax
movzwl 0x4(%rdi,%rax,2), %r8d
movl (%rdi), %eax
xorl %ecx, %ecx
xorl %esi, %esi
cmpl $0x20, %esi
je 0x12c3ca
btl %esi, %eax
adcl $0x0, %ecx
incl %esi
jmp 0x12c3bb
movq 0x126c0f(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
cmpl %r8d, %ecx
jne 0x12c3e5
leaq 0xc2eb9(%rip), %rsi     # 0x1ef299
movl %ecx, %r8d
jmp 0x12c3ec
leaq 0xc2e92(%rip), %rsi     # 0x1ef27e
xorl %eax, %eax
jmp 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mcgg_reset_z(mc_match_t const*, mcgg_svaux_t*)
void mcgg_reset_z(const mc_match_t *ma, mcgg_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 = (1<<b->z->hapN);
		for (j = 0; j < n; j++) mcp_de(*(b->z), k, j) = 0;
		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);
			mcp_de(*(b->z), k, b->s[t].s) += e->w;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movl 0xc(%rsi), %eax
xorl %edx, %edx
cmpl %eax, %edx
jae 0x12c495
movq 0x10(%rdi), %rcx
movq 0x30(%rdi), %r8
movl 0x8(%rsi), %r9d
addl %edx, %r9d
movq (%r8,%r9,8), %r8
movl %r8d, %r9d
movq (%rcx,%r9,8), %r11
movq %r11, %r9
shrq $0x20, %r9
movq 0x40(%rsi), %r10
movl 0x8(%r10), %ecx
shll %cl, %r8d
xorl %ebx, %ebx
movl %ebx, %ebp
shrl %cl, %ebp
testl %ebp, %ebp
jne 0x12c44c
movq (%r10), %r14
leal (%r8,%rbx), %r15d
andq $0x0, (%r14,%r15,8)
incl %ebx
jmp 0x12c434
movl %r11d, %ecx
subq $0x1, %rcx
jb 0x12c48e
movq 0x28(%rdi), %r11
movl %r9d, %ebx
shlq $0x4, %rbx
movl (%r11,%rbx), %r14d
movsd 0x8(%r11,%rbx), %xmm0
movq (%r10), %r11
movq 0x50(%rsi), %rbx
shlq $0x5, %r14
movl (%rbx,%r14), %ebx
addl %r8d, %ebx
addsd (%r11,%rbx,8), %xmm0
movsd %xmm0, (%r11,%rbx,8)
incq %r9
jmp 0x12c44f
incl %edx
jmp 0x12c3fe
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: mcgg_score(mc_match_t const*, mcgg_svaux_t*)
t_w_t mcgg_score(const mc_match_t *ma, mcgg_svaux_t *b)
{
	uint32_t i, j, n = (1<<b->z->hapN);
	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
		for (j = 0; j < n; j++)
		{
			z += ((b->s[k].s&((mcg_node_t)j))?-mcp_de(*(b->z), k, j):mcp_de(*(b->z), k, j));
		}		
	}
	return z;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x40(%rsi), %rax
movl 0x8(%rax), %ecx
movl 0xc(%rsi), %edx
xorl %r8d, %r8d
xorpd %xmm0, %xmm0
movapd 0xc0c06(%rip), %xmm1    # 0x1ed0c0
cmpl %edx, %r8d
je 0x12c50d
movq 0x30(%rdi), %r9
movl 0x8(%rsi), %r10d
addl %r8d, %r10d
movq (%r9,%r10,8), %r9
movl %r9d, %r10d
shll %cl, %r9d
xorl %r11d, %r11d
shlq $0x5, %r10
movl %r11d, %ebx
shrl %cl, %ebx
testl %ebx, %ebx
jne 0x12c508
movq 0x50(%rsi), %rbx
leal (%r9,%r11), %r14d
movq (%rax), %r15
movsd (%r15,%r14,8), %xmm2
testl %r11d, (%rbx,%r10)
je 0x12c4ff
xorpd %xmm1, %xmm2
addsd %xmm2, %xmm0
incl %r11d
jmp 0x12c4db
incl %r8d
jmp 0x12c4ba
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: kr_drand_node_ref(unsigned long, mcgg_svaux_t*, unsigned short*, unsigned int, unsigned long)
static inline mcg_node_t kr_drand_node_ref(uint64_t id, mcgg_svaux_t *b, uint16_t *hc, mcg_node_t ref, uint64_t rev)
{
	uint64_t i, k, m, mm, mn, mi, cn, hn = b->s[id].h[0];
	mcg_node_t t;
	if(hc) (*hc) = 0;
	b->x = kr_splitmix64(b->x);
	if(b->s[id].h[1] != (uint16_t)-1)
	{
		union { uint64_t i; double d; } u;
		u.i = 0x3FFULL << 52 | (b->x) >> 12;
		if((u.d - 1.0) > b->s[id].hw[0])
		{
			hn = b->s[id].h[1];
			if(hc) (*hc) = 1;
		}
	} 
	if(rev) ref ^= (mcg_node_t)-1;
	ref &= b->mask;

	t = ref; cn = 0;
	while (t)
	{	
		cn += t&1;
		t >>= 1;
	} 
	if(cn == hn) return ref;

	if(cn>=hn) mm=cn, m=1, mn=cn-hn;///1->0
	else mm=b->hapN-cn, m=0, mn=hn-cn;///0->1

	for (i = 0; i < mn; i++)
	{
		mi = (b->x%mm);
		for (k = 0; k < b->hapN; k++)
		{
			if(((ref>>k)&1)!=m) continue;
			if(mi == 0)
			{
				ref ^= ((mcg_node_t)1<<k);
				break;
			}
			mi--;
		}
		mm--;
	}
    
	return ref;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movl %ecx, 0x4(%rsp)
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
movq 0x50(%rsi), %rbp
shlq $0x5, %r12
movzwl 0x4(%rbp,%r12), %r13d
testq %rdx, %rdx
je 0x12c83b
andw $0x0, (%r15)
movq (%rbx), %rdi
callq 0x125d08
movq %rax, %rcx
movq %rax, (%rbx)
movzwl 0x6(%rbp,%r12), %eax
cmpw $-0x1, %ax
je 0x12c8a0
movq %rcx, %rdx
shrq $0xc, %rdx
movabsq $0x3ff0000000000000, %rsi # imm = 0x3FF0000000000000
orq %rdx, %rsi
movq %rsi, %xmm0
addsd 0xb6d0a(%rip), %xmm0    # 0x1e3580
addq %r12, %rbp
movsd 0x10(%rbp), %xmm1
ucomisd %xmm1, %xmm0
cmoval %eax, %r13d
testq %r15, %r15
je 0x12c8a0
ucomisd %xmm1, %xmm0
movl 0x4(%rsp), %edx
jbe 0x12c8a4
movw $0x1, (%r15)
movl %eax, %r13d
jmp 0x12c8a4
movl 0x4(%rsp), %edx
xorl %edi, %edi
negq %r14
movl $0x0, %esi
sbbl %esi, %esi
xorl %edx, %esi
andl 0x68(%rbx), %esi
movl %esi, %eax
testl %eax, %eax
je 0x12c8c7
movl %eax, %edx
andl $0x1, %edx
addq %rdx, %rdi
shrl %eax
jmp 0x12c8b7
movzwl %r13w, %eax
movq %rdi, %r8
subq %rax, %r8
jne 0x12c8e4
movl %esi, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jae 0x12c8fa
movl 0x6c(%rbx), %edx
subq %rdi, %rdx
subq %rdi, %rax
xorl %r9d, %r9d
movq %rdx, %rdi
movq %rax, %r8
jmp 0x12c8fe
pushq $0x1
popq %r9
xorl %r10d, %r10d
cmpq %r8, %r10
je 0x12c8d3
movq %rcx, %rax
xorl %edx, %edx
divq %rdi
movl 0x6c(%rbx), %r11d
xorl %eax, %eax
cmpq %rax, %r11
je 0x12c934
btl %eax, %esi
movl %r9d, %ebp
sbbl $0x0, %ebp
jne 0x12c92c
testq %rdx, %rdx
je 0x12c931
decq %rdx
incq %rax
jmp 0x12c914
btcl %eax, %esi
decq %rdi
incq %r10
jmp 0x12c901
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: print_mcgg_node(mc_match_t const*, mcgg_svaux_t*, unsigned int)
void print_mcgg_node(const mc_match_t *ma, mcgg_svaux_t *b, uint32_t id)
{
	fprintf(stderr, "[M::%s::utg%.6ul-hap%u]\n", __func__, id, b->s[id].s);
	w_t w[128];
	uint32_t o, n, i, hn = (1<<b->z->hapN);
	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) w[b->s[ma_y(ma->ma.a[o + i])].s] += ma->ma.a[o + i].w;
	for (i = 0; i < hn; i++) fprintf(stderr, "w[%u]-%f, z[%u]-%f\n", i, w[i], i, mcp_de(*(b->z), id, i));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq 0x126684(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
movq 0x50(%rsi), %rax
movl %edx, %r12d
movq %r12, %rcx
shlq $0x5, %rcx
movl (%rax,%rcx), %r8d
leaq 0xc258c(%rip), %rsi     # 0x1eef04
leaq 0xc2934(%rip), %rdx     # 0x1ef2b3
xorl %r13d, %r13d
movl %ebx, %ecx
xorl %eax, %eax
callq 0x22b0
movq 0x40(%r14), %rax
movb 0x8(%rax), %cl
pushq $0x1
popq %rbp
shlq %cl, %rbp
cmpq %r13, %rbp
je 0x12c9a7
andq $0x0, (%rsp,%r13,8)
incq %r13
jmp 0x12c998
movq 0x10(%r15), %rax
movq (%rax,%r12,8), %rcx
movl %ecx, %eax
shrq $0x20, %rcx
movq 0x126624(%rip), %r13    # 0x252fe0
subq $0x1, %rax
jb 0x12c9ef
movq 0x28(%r15), %rdx
movl %ecx, %esi
shlq $0x4, %rsi
movsd 0x8(%rdx,%rsi), %xmm0
movq 0x50(%r14), %rdi
movl (%rdx,%rsi), %edx
shlq $0x5, %rdx
movl (%rdi,%rdx), %edx
addsd (%rsp,%rdx,8), %xmm0
movsd %xmm0, (%rsp,%rdx,8)
incq %rcx
jmp 0x12c9bc
xorl %r15d, %r15d
leaq 0xc2532(%rip), %r12     # 0x1eef2b
cmpq %r15, %rbp
je 0x12ca33
movq (%r13), %rdi
movq 0x40(%r14), %rax
movb 0x8(%rax), %cl
movl %ebx, %edx
shll %cl, %edx
movsd (%rsp,%r15,8), %xmm0
movq (%rax), %rax
addl %r15d, %edx
movsd (%rax,%rdx,8), %xmm1
movq %r12, %rsi
movl %r15d, %edx
movl %r15d, %ecx
movb $0x2, %al
callq 0x22b0
incq %r15
jmp 0x12c9f9
addq $0x408, %rsp            # imm = 0x408
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_genral(mc_opt_t const*, mc_gg_t*, unsigned int)
void mc_solve_core_genral(const mc_opt_t *opt, mc_gg_t *mg, uint32_t hapN)
{
	double index_time = yak_realtime();
	uint32_t st, i;
	mcgg_svaux_t *b;
	mc_g_cc(mg->e);
	b = mcgg_svaux_init(mg, opt->seed, hapN);
	// 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) {
			mcgg_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_write_info(g, b);
	mcgg_svaux_destroy(b);
	fprintf(stderr, "[M::%s::%.3f] ==> Partition\n", __func__, yak_realtime()-index_time);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
callq 0xefea7
movsd %xmm0, (%rsp)
movq 0x10(%rbx), %rdi
callq 0x12512f
movq 0x18(%r14), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x12c24f
movq %rax, %r15
xorl %ecx, %ecx
pushq $0x1
popq %rbp
movq 0x10(%rbx), %rax
cmpl 0x38(%rax), %ebp
ja 0x12d0cb
je 0x12d0b1
movq 0x30(%rax), %rax
movl %ecx, %edx
movl %ebp, %esi
movq (%rax,%rsi,8), %rsi
xorq (%rax,%rdx,8), %rsi
shrq $0x20, %rsi
je 0x12d0c7
movl %ebp, %r8d
subl %ecx, %r8d
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x12ca45
movl %ebp, %ecx
incl %ebp
jmp 0x12d090
movq %r15, %rdi
callq 0x12c34e
movq 0x125f06(%rip), %rax    # 0x252fe0
movq (%rax), %rbx
callq 0xefea7
subsd (%rsp), %xmm0
leaq 0xc209e(%rip), %rsi     # 0x1ef18c
leaq 0xc220d(%rip), %rdx     # 0x1ef302
movq %rbx, %rdi
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/rcut.cpp
// Function: print_mcb(mc_gg_t*)
void print_mcb(mc_gg_t *mg)
{
	uint32_t i, k, m;
	mcg_node_t t;
	mcb_t *p;
	for (i = 0; i < mg->m.n; i++)
	{
		p = mcb_pat(*mg, i + 1);
		fprintf(stderr, "# haplotypes: %u, # combination: %u\n", i+1, (uint32_t)p->n);
		for (k = 0; k < p->n; k++)
		{
			t = p->a[k];
			for (m = 0; m < 32; m++)
			{
				if((t>>m)&1) fprintf(stderr, "%u\t", m);
			}
			fprintf(stderr, "\n");
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x125ec2(%rip), %r14    # 0x252fe0
leaq 0xbb1ab(%rip), %r15     # 0x1e82d0
xorl %eax, %eax
movq %rdi, 0x10(%rsp)
movl %eax, %eax
cmpq %rax, 0x18(%rdi)
jbe 0x12d1b3
movq 0x28(%rdi), %rcx
leal 0x1(%rax), %edx
imulq $0x18, %rax, %rax
leaq (%rcx,%rax), %rbx
movq (%r14), %rdi
movl 0x8(%rcx,%rax), %ecx
xorl %r12d, %r12d
leaq 0xc21c3(%rip), %rsi     # 0x1ef317
movl %edx, 0xc(%rsp)
xorl %eax, %eax
callq 0x22b0
movl %r12d, %r12d
cmpq %r12, 0x8(%rbx)
jbe 0x12d1a5
movq (%rbx), %rax
movl (%rax,%r12,4), %ebp
xorl %r13d, %r13d
cmpl $0x20, %r13d
je 0x12d195
btl %r13d, %ebp
jb 0x12d183
incl %r13d
jmp 0x12d172
movq (%r14), %rdi
movq %r15, %rsi
movl %r13d, %edx
xorl %eax, %eax
callq 0x22b0
jmp 0x12d17e
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x2270
incl %r12d
jmp 0x12d15f
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %eax
jmp 0x12d12c
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: print_hap_p(kv_gg_status*)
void print_hap_p(kv_gg_status *s)
{
	fprintf(stderr, "\n[M::%s]\n", __func__);
	uint32_t i, h;
	mcg_node_t m;
	for (i = 0; i < s->n; i++)
	{
		fprintf(stderr,"utg%.6ul\t", i + 1);
		m = s->a[i].s; h = 0;
		while (m) {
			h++;
			if(m&1) fprintf(stderr, "h%u\t", h);
			m>>=1;
		}
		fprintf(stderr,"\n");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x125e09(%rip), %r14    # 0x252fe0
movq (%r14), %rdi
leaq 0xc11da(%rip), %rsi     # 0x1ee3bb
leaq 0xc2154(%rip), %rdx     # 0x1ef33c
xorl %eax, %eax
callq 0x22b0
leaq 0xc2152(%rip), %r15     # 0x1ef348
xorl %r12d, %r12d
movl %r12d, %r13d
cmpq %r13, 0x8(%rbx)
jbe 0x12d259
movq (%r14), %rdi
leal 0x1(%r13), %r12d
leaq 0xc1145(%rip), %rsi     # 0x1ee355
movl %r12d, %edx
xorl %eax, %eax
callq 0x22b0
movq (%rbx), %rax
shlq $0x5, %r13
movl (%rax,%r13), %ebp
pushq $0x1
popq %r13
testl %ebp, %ebp
je 0x12d24c
testb $0x1, %bpl
jne 0x12d23a
shrl %ebp
incl %r13d
jmp 0x12d229
movq (%r14), %rdi
movq %r15, %rsi
movl %r13d, %edx
xorl %eax, %eax
callq 0x22b0
jmp 0x12d233
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x2270
jmp 0x12d1f9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq