LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 0x16765c
movq (%rsp), %rax
incl (%rax)
movl 0xc(%rbx), %edi
movq 0x28(%rbx), %rsi
movq %rbx, %rdx
callq 0x16ba4c
cmpl $0x0, 0xc(%rbx)
je 0x167650
xorl %r13d, %r13d
xorl %r14d, %r14d
movq 0x28(%rbx), %rax
movl (%rax,%r13,4), %esi
movq (%r15), %rax
movq 0x40(%rax), %rcx
imulq $0x38, %rsi, %rdx
leaq (%rcx,%rdx), %rax
movsd 0x18(%rcx,%rdx), %xmm0
movsd 0x20(%rcx,%rdx), %xmm1
ucomisd %xmm1, %xmm0
jne 0x1675ec
jp 0x1675ec
movsd 0x28(%rax), %xmm2
ucomisd 0x30(%rax), %xmm2
jne 0x1675ec
jnp 0x167639
movsbl 0x10(%rax), %ecx
xorps %xmm2, %xmm2
cvtsi2sd %ecx, %xmm2
subsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
xorpd %xmm1, %xmm1
movsbl 0x11(%rax), %ecx
xorps %xmm2, %xmm2
cvtsi2sd %ecx, %xmm2
subsd %xmm0, %xmm1
movsd 0x28(%rax), %xmm0
subsd 0x30(%rax), %xmm0
mulsd %xmm2, %xmm0
subsd %xmm0, %xmm1
ucomisd 0xbdeec(%rip), %xmm1    # 0x225518
jae 0x167639
movq %r15, %rdi
callq 0x16bb18
incl %r14d
incq %r13
movl 0xc(%rbx), %eax
cmpq %rax, %r13
jb 0x1675b3
testl %r14d, %r14d
sete %al
jmp 0x167652
movb $0x1, %al
incl %ebp
testb %al, %al
je 0x167584
movq %r15, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1634fc
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x8(%rdi), %rax
movl 0x38(%rax), %ecx
testq %rcx, %rcx
je 0x1677a9
movq 0x10(%rax), %rdx
movq (%rdi), %rsi
movq 0x40(%rsi), %rsi
xorl %edi, %edi
xorps %xmm0, %xmm0
movq (%rdx,%rdi,8), %r15
imulq $0x38, %rdi, %rbx
movups %xmm0, 0x28(%rsi,%rbx)
movups %xmm0, 0x18(%rsi,%rbx)
testl %r15d, %r15d
je 0x16779d
movq %r15, %r8
shrq $0x20, %r8
leaq (%rsi,%rbx), %r9
addq $0x20, %r9
leaq 0x18(%rsi,%rbx), %r10
leaq (%rsi,%rbx), %r11
addq $0x30, %r11
addq %rsi, %rbx
addq $0x28, %rbx
movq 0x28(%rax), %r14
movl %r15d, %r15d
movl %r8d, %r12d
leaq (%r12,%r12,4), %r12
leaq (%r14,%r12,8), %r12
movl (%r12), %r13d
imulq $0x38, %r13, %r13
cmpb $0x0, 0x10(%rsi,%r13)
movq %r10, %rbp
jle 0x167715
movsd 0x8(%r12), %xmm1
addsd (%rbp), %xmm1
movsd %xmm1, (%rbp)
jmp 0x16771a
movq %r9, %rbp
js 0x167702
cmpb $0x0, 0x11(%rsi,%r13)
movq %r10, %rbp
jle 0x167738
movsd 0x10(%r12), %xmm1
addsd (%rbp), %xmm1
movsd %xmm1, (%rbp)
jmp 0x16773d
movq %r9, %rbp
js 0x167725
leaq (%rsi,%r13), %rbp
addq $0x10, %rbp
cmpb $0x0, (%rbp)
movq %rbx, %rbp
jle 0x167761
movsd 0x18(%r12), %xmm1
addsd (%rbp), %xmm1
movsd %xmm1, (%rbp)
jmp 0x167766
movq %r11, %rbp
js 0x16774e
addq %rsi, %r13
addq $0x11, %r13
cmpb $0x0, (%r13)
movq %rbx, %r13
jle 0x16778c
movsd 0x20(%r12), %xmm1
addsd (%r13), %xmm1
movsd %xmm1, (%r13)
jmp 0x167791
movq %r11, %r13
js 0x167777
incq %r8
decq %r15
jne 0x1676e4
incq %rdi
cmpq %rcx, %rdi
jne 0x16769f
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
movq (%rsi), %rcx
cmpq $0x0, 0x30(%rcx)
je 0x167f60
xorl %eax, %eax
movq 0x10(%rcx), %r8
movq 0x40(%rcx), %rbx
imulq $0x38, %rax, %r14
movl 0x4(%rbx,%r14), %r9d
movl 0x8(%rbx,%r14), %r10d
movl 0xc(%rbx,%r14), %ecx
movb 0x11(%rbx,%r14), %dl
testq %r10, %r10
je 0x167f2a
movl (%rbx,%r14), %r11d
leaq (%r8,%r11,4), %r11
movb 0x10(%rbx,%r14), %bl
xorl %r14d, %r14d
movl (%r11,%r14,4), %r15d
movq 0x10(%rdi), %r12
cmpb $0x0, (%r12,%r15)
je 0x167f22
movb %bl, (%r12,%r15)
incq %r14
cmpq %r14, %r10
jne 0x167f0f
testq %rcx, %rcx
je 0x167f51
leaq (%r8,%r9,4), %r8
xorl %r9d, %r9d
movl (%r8,%r9,4), %r10d
movq 0x10(%rdi), %r11
cmpb $0x0, (%r11,%r10)
je 0x167f49
movb %dl, (%r11,%r10)
incq %r9
cmpq %r9, %rcx
jne 0x167f36
incl %eax
movq (%rsi), %rcx
cmpq %rax, 0x30(%rcx)
ja 0x167eda
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
pushq %rax
movq (%rdi), %rax
cmpq $0x0, 0x30(%rax)
je 0x167ff6
movq %rdi, %rbx
movl $0x1, %ebp
xorl %ecx, %ecx
movq 0x40(%rax), %rdx
imulq $0x38, %rcx, %rcx
movl 0x8(%rdx,%rcx), %edi
movl 0xc(%rdx,%rcx), %esi
leal (%rsi,%rdi), %r8d
cmpl $0x2, %r8d
jae 0x167fdb
movl %ebp, %ecx
movq (%rbx), %rax
incl %ebp
cmpq %rcx, 0x30(%rax)
ja 0x167fb2
jmp 0x167ff6
movq 0x10(%rax), %rax
movl (%rdx,%rcx), %r8d
movl 0x4(%rdx,%rcx), %edx
leaq (%rax,%r8,4), %rcx
leaq (%rax,%rdx,4), %rdx
callq 0x2015d
jmp 0x167fcc
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1682b2
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq %r8, 0x10(%rsp)
movl %r9d, 0xc(%rsp)
movl $0x1, %edi
movl $0x80, %esi
callq 0x2120
movq %rax, %r14
movq %r15, 0x30(%rax)
movq %r13, 0x38(%rax)
movq %r12, 0x40(%rax)
movq 0x10(%r15), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %ebx
movl %ebx, %r12d
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movl %r12d, 0x54(%r14)
movl $0x1, %esi
movq %r12, %rdi
callq 0x2120
movq %rax, 0x48(%r14)
cmpl $0x40, %ebp
movl $0x40, %r15d
cmovbl %ebp, %r15d
movl %r15d, 0x58(%r14)
movl $0x28, %esi
movq %r15, %rdi
callq 0x2120
movq %rax, 0x60(%r14)
testl %ebp, %ebp
je 0x16828b
movq %rax, %r13
andl $0x7, %ebx
shrl $0x3, %r12d
cmpl $0x1, %ebx
sbbl $-0x1, %r12d
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, %rbp
shrq $0x10, %rbp
orq %rax, %rbp
incq %rbp
movl %r15d, %eax
shlq $0x3, %rax
leaq (%rax,%rax,4), %rbx
xorl %r15d, %r15d
cmpq %r12, 0x8(%r13,%r15)
jae 0x16827d
movq %rbp, 0x8(%r13,%r15)
movq 0x10(%r13,%r15), %rdi
movq %rbp, %rsi
callq 0x2370
movq %rax, 0x10(%r13,%r15)
movq %r12, (%r13,%r15)
addq $0x28, %r15
cmpq %r15, %rbx
jne 0x16825f
movq 0x10(%rsp), %rax
movq %rax, 0x68(%r14)
movl $0xff, %eax
movl 0xc(%rsp), %ecx
cmpl %eax, %ecx
cmovbl %ecx, %eax
testl %ecx, %ecx
movl $0x1, %ecx
cmovnel %eax, %ecx
movb %cl, 0x50(%r14)
jmp 0x1682b5
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_O1/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 0x168358
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
callq 0x2220
movq 0x78(%rbx), %rdi
callq 0x174c02
movq 0x70(%rbx), %rax
testq %rax, %rax
je 0x168305
movq 0x10(%rax), %rdi
callq 0x2220
movq 0x70(%rbx), %rdi
callq 0x2220
cmpl $0x0, 0x58(%rbx)
je 0x168330
movl $0x10, %r14d
xorl %r15d, %r15d
movq 0x60(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x2220
incq %r15
movl 0x58(%rbx), %eax
addq $0x28, %r14
cmpq %rax, %r15
jb 0x168314
movq 0x60(%rbx), %rdi
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
// File: /workspace/github_cpp_makefile_star2_O1/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), %rax
movq 0x10(%rax), %rax
movl %esi, %esi
leaq (%rsi,%rsi,4), %rsi
cmpl $0x0, 0x10(%rax,%rsi,8)
je 0x168a1b
leaq (%rax,%rsi,8), %rax
testb %r8b, %r8b
setle %sil
incb %sil
xorl %edi, %edi
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 0x168a0f
movl %esi, %r11d
testb %r8b, %r8b
jne 0x168a0b
movb $0x1, %r11b
testb $0x2, %r10b
je 0x168a0f
orb %r11b, (%rdx,%r9)
incq %rdi
movl 0x10(%rax), %r9d
cmpq %r9, %rdi
jb 0x1689d0
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10(%r8), %rax
movl %edx, %edx
movq (%rax,%rdx,8), %rax
testl %eax, %eax
je 0x168b75
movq %r9, %rbx
movq 0x28(%r8), %rsi
movq %rax, %rdx
shrq $0x20, %rdx
movl %eax, %edi
shlq $0x4, %rdx
addq %rdx, %rsi
addq $0x8, %rsi
shlq $0x4, %rdi
xorl %r14d, %r14d
movq %rcx, 0x18(%rsp)
movq %r9, 0x10(%rsp)
movq %rdi, 0x20(%rsp)
movq %rsi, 0x8(%rsp)
movq -0x8(%rsi,%r14), %r12
movq %r12, %r15
shrq $0x20, %r15
movsbl (%rbx,%r15), %eax
movl %r12d, %r13d
movsbl (%rbx,%r13), %edx
imull %eax, %edx
cmpl $-0x1, %edx
jne 0x168b55
leaq (%r15,%r15,2), %rbp
leaq (,%rbp,8), %rdi
addq (%rcx), %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x10c0b9
movq 0x18(%rsp), %rcx
cmpl $-0x1, %eax
je 0x168ae0
movq (%rcx), %rdx
movq 0x10(%rdx,%rbp,8), %rbp
movq 0x8(%rsp), %rdx
cvttsd2si (%rdx,%r14), %rdx
cltq
shlq $0x6, %rax
cmpq %rdx, 0x30(%rbp,%rax)
jne 0x168ae0
addq %rax, %rbp
jmp 0x168b42
leaq (%r13,%r13,2), %r13
leaq (,%r13,8), %rdi
addq (%rcx), %rdi
movq %rcx, %rbx
movl %r12d, %esi
movl %r15d, %edx
callq 0x10c0b9
cmpl $-0x1, %eax
je 0x168b38
movq (%rbx), %rcx
movq 0x10(%rcx,%r13,8), %rcx
cltq
shlq $0x6, %rax
leaq (%rcx,%rax), %rbp
movq 0x8(%rsp), %rsi
cvttsd2si (%rsi,%r14), %rdx
cmpq %rdx, 0x30(%rcx,%rax)
movl $0x0, %eax
cmovneq %rax, %rbp
movq %rbx, %rcx
movq 0x10(%rsp), %rbx
jmp 0x168b47
xorl %ebp, %ebp
movq %rbx, %rcx
movq 0x10(%rsp), %rbx
movq 0x8(%rsp), %rsi
testq %rbp, %rbp
je 0x168b64
movb $0x4, 0x2(%rbp)
movq 0x20(%rsp), %rdi
addq $0x10, %r14
cmpq %r14, %rdi
jne 0x168a72
jmp 0x168b75
callq 0x20232
movq 0x8(%rsp), %rsi
movq 0x18(%rsp), %rcx
jmp 0x168b4c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rcx, 0x10(%rsp)
movq 0x10(%r8), %rcx
movq 0x28(%r8), %rax
movl %edx, %edx
movq (%rcx,%rdx,8), %rcx
movq $0x0, 0x8(%rsp)
testl %ecx, %ecx
je 0x168e0f
movq %r9, %rbx
movq %rcx, %rdx
shrq $0x20, %rdx
movl %ecx, %ebp
shlq $0x4, %rdx
leaq (%rdx,%rax), %r15
addq $0x8, %r15
shlq $0x4, %rbp
xorl %r14d, %r14d
movq -0x8(%r15,%r14), %r12
movq %r12, %r13
shrq $0x20, %r13
movq $0x0, 0x8(%rsp)
movsbl (%rbx,%r13), %eax
movl %r12d, %ecx
movsbl (%rbx,%rcx), %ecx
imull %eax, %ecx
cmpl $-0x1, %ecx
jne 0x168df9
movq 0x10(%rsp), %rdi
movl %r13d, %esi
movl %r12d, %edx
leaq 0x8(%rsp), %rcx
xorl %r8d, %r8d
callq 0xca79c
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x168dbc
movsd 0x20(%rax), %xmm0
ucomisd (%r15,%r14), %xmm0
jne 0x168dbc
jnp 0x168ded
movq 0x10(%rsp), %rdi
movl %r12d, %esi
movl %r13d, %edx
leaq 0x8(%rsp), %rcx
xorl %r8d, %r8d
callq 0xca79c
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x168df1
movsd 0x20(%rax), %xmm0
ucomisd (%r15,%r14), %xmm0
jne 0x168df1
jp 0x168df1
andb $0x7f, 0x28(%rax)
cmpq $0x0, 0x8(%rsp)
je 0x168e08
addq $0x10, %r14
cmpq %r14, %rbp
jne 0x168d62
jmp 0x168e0f
callq 0x20270
jmp 0x168df9
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
cmpq $0x0, (%rsi)
je 0x168e56
movl $0x1, %eax
xorl %ecx, %ecx
movq 0x10(%rbx), %rdx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
orb $-0x80, 0x28(%rdx,%rcx)
movl %eax, %ecx
incl %eax
cmpq %rcx, (%rbx)
ja 0x168e3c
movq 0x28(%r14), %r8
cmpl $0x0, 0x38(%r8)
je 0x168e7d
xorl %ebp, %ebp
movq 0x10(%r14), %r9
movl %ebp, %edx
movq %rbx, %rcx
callq 0x168d11
incl %ebp
movq 0x28(%r14), %r8
cmpl 0x38(%r8), %ebp
jb 0x168e63
cmpq $0x0, (%rbx)
je 0x168ed2
xorl %edx, %edx
movl $0x1, %ecx
xorl %eax, %eax
movq 0x10(%rbx), %rsi
leaq (%rdx,%rdx,2), %rdx
shlq $0x4, %rdx
cmpb $0x0, 0x28(%rsi,%rdx)
js 0x168ec7
addq %rsi, %rdx
movl %eax, %edi
incl %eax
leaq (%rdi,%rdi,2), %rdi
shlq $0x4, %rdi
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movups 0x20(%rdx), %xmm2
movups %xmm2, 0x20(%rsi,%rdi)
movups %xmm1, 0x10(%rsi,%rdi)
movups %xmm0, (%rsi,%rdi)
movl %ecx, %edx
incl %ecx
cmpq %rdx, (%rbx)
ja 0x168e8c
jmp 0x168ed4
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, (%rbx)
testl %eax, %eax
je 0x168f99
shlq $0x4, %rcx
leaq (%rcx,%rcx,2), %r15
xorl %r12d, %r12d
movl $0x2, %r13d
movq 0x8(%rbx), %rax
cmpq %rax, (%rbx)
jne 0x168f1f
leaq (%rax,%rax), %rcx
testq %rax, %rax
cmoveq %r13, %rcx
movq %rcx, 0x8(%rbx)
movq 0x10(%rbx), %rdi
shlq $0x4, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x2370
movq %rax, 0x10(%rbx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
movups (%rcx,%r12), %xmm0
movups 0x10(%rcx,%r12), %xmm1
movups 0x20(%rcx,%r12), %xmm2
movups %xmm2, 0x20(%rcx,%rax)
movups %xmm1, 0x10(%rcx,%rax)
movups %xmm0, (%rcx,%rax)
movq 0x10(%rbx), %rdx
movl 0x14(%rdx,%r12), %esi
movl %esi, 0x8(%rcx,%rax)
movl 0xc(%rdx,%r12), %esi
movl %esi, (%rcx,%rax)
movl 0x10(%rdx,%r12), %esi
movl %esi, 0x4(%rcx,%rax)
movl 0x8(%rdx,%r12), %esi
movl %esi, 0x14(%rcx,%rax)
movl (%rdx,%r12), %esi
movl %esi, 0xc(%rcx,%rax)
movl 0x4(%rdx,%r12), %edx
movl %edx, 0x10(%rcx,%rax)
addq $0x30, %r12
cmpq %r12, %r15
jne 0x168ef2
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 0xc405a
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0xd33da(%rip), %rsi     # 0x23c3fe
movq %rdx, %rdi
callq 0x2210
movq %rax, %rbx
movl $0x20, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rax, %rcx
callq 0x2410
movl $0x8, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x2410
movq (%r14), %rdx
movq 0x10(%r14), %rdi
movl $0x1, %esi
movq %rbx, %rcx
callq 0x2410
movq 0x28(%r14), %rdi
addq $0x38, %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2410
movq 0x28(%r14), %rdi
addq $0x18, %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2410
movq 0x28(%r14), %rax
movq 0x18(%rax), %rdx
movq 0x28(%rax), %rdi
movl $0x10, %esi
movq %rbx, %rcx
callq 0x2410
movq 0x28(%r14), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2410
movq 0x28(%r14), %rax
movq (%rax), %rdx
movq 0x10(%rax), %rdi
movl $0x8, %esi
movq %rbx, %rcx
callq 0x2410
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2190
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %r15
leaq 0xca49d(%rip), %rsi     # 0x2335a7
movq %rax, %rdi
callq 0x2210
testq %rax, %rax
je 0x169247
movq %rax, %rbx
movl $0x1, %edi
movl $0x30, %esi
callq 0x2120
movq %rax, %r14
movl $0x1, %edi
movl $0x40, %esi
callq 0x2120
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x0, 0x10(%r14)
movq %rax, 0x28(%r14)
movl $0x20, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x22f0
movl $0x8, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x22f0
movq (%r14), %r15
movq %r15, 0x8(%r14)
movq %r15, %rdi
callq 0x2280
movq %rax, 0x10(%r14)
movl $0x1, %esi
movq %rax, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x22f0
movq 0x28(%r14), %r15
leaq 0x38(%r15), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x22f0
leaq 0x18(%r15), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x22f0
movq 0x18(%r15), %r12
movq %r12, 0x20(%r15)
movq %r12, %rdi
shlq $0x4, %rdi
callq 0x2280
movq %rax, 0x28(%r15)
movl $0x10, %esi
movq %rax, %rdi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x22f0
movl $0x8, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x22f0
movq (%r15), %r12
movq %r12, 0x8(%r15)
leaq (,%r12,8), %rdi
callq 0x2280
movq %rax, 0x10(%r15)
movl $0x8, %esi
movq %rax, %rdi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x22f0
movq %rbx, %rdi
callq 0x2190
jmp 0x16924a
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1690f5
movq %rsp, %r14
movq %rax, (%r14)
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x1eaf5
movq %r14, %rdi
callq 0x161f4e
movl $0x1, %edi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1692d2
testl %r15d, %r15d
jle 0x16931b
movl %r15d, %eax
xorl %esi, %esi
xorl %ebp, %ebp
movb 0x4(%r14,%rsi,4), %dl
incq %rsi
decb %dl
btsl %edx, %ebp
cmpq %rsi, %rax
jne 0x1692be
jmp 0x16931d
movl %esi, %r12d
movl %edi, %r13d
movslq %edi, %rbp
leal (%r12,%r13), %ebx
subl %r15d, %ebx
movl -0x4(%r14,%rbp,4), %eax
leal 0x1(%rax), %edx
movl %edx, (%r14,%rbp,4)
cmpl %ebx, %eax
jge 0x169360
incl %r13d
movl %r13d, %edi
movl %r12d, %esi
movl %r15d, %edx
movq %r14, %r8
callq 0x169295
movq (%rsp), %rcx
movl (%r14,%rbp,4), %eax
leal 0x1(%rax), %edx
movl %edx, (%r14,%rbp,4)
cmpl %ebx, %eax
jl 0x1692f5
jmp 0x169360
xorl %ebp, %ebp
movq 0x10(%rcx), %rax
cmpq %rax, 0x8(%rcx)
jne 0x16934e
leaq (%rax,%rax), %rdx
testq %rax, %rax
movl $0x2, %esi
cmovneq %rdx, %rsi
movq %rsi, 0x10(%rcx)
movq (%rcx), %rdi
shlq $0x2, %rsi
callq 0x2370
movq (%rsp), %rcx
movq %rax, (%rcx)
movq (%rcx), %rax
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_O1/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
movl $0x4, %esi
callq 0x2120
movq %rax, %r14
movl $0x1, %edi
movl $0x38, %esi
callq 0x2120
movq %rax, %r15
movl %ebp, 0x8(%rax)
movq %r12, (%rax)
movw %bx, 0x34(%rax)
movl %ebx, %r13d
movl $0x18, %esi
movq %r13, %rdi
callq 0x2120
movq %rax, 0x28(%r15)
movq %r13, 0x20(%r15)
movq %r15, (%rsp)
movq %r13, 0x18(%r15)
testl %ebx, %ebx
je 0x169465
movq %rax, %r12
movzwl %bx, %r15d
leaq 0x1(,%r15,4), %r13
xorl %ebp, %ebp
incq %rbp
movq %r14, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x20e0
movq $0x0, 0x8(%r12)
movl $0x1, %edi
movl %ebx, %esi
movl %ebp, %edx
movq %r12, %rcx
movq %r14, %r8
callq 0x169295
addq $0x18, %r12
cmpq %rbp, %r15
jne 0x16942f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %ebx, %ecx
shll %cl, %eax
notl %eax
movq (%rsp), %rbx
movl %eax, 0x30(%rbx)
movq %r14, %rdi
callq 0x2220
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x169531
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x169531
movq (%rbx), %rax
cmpq $0x0, 0x20(%rax)
je 0x1694d9
movl $0x1, %ebp
xorl %ecx, %ecx
movq 0x28(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2220
movl %ebp, %ecx
movq (%rbx), %rax
incl %ebp
cmpq %rcx, 0x20(%rax)
ja 0x1694bb
movq 0x28(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x169523
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 %rbp
jmp 0x2220
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movl $0x1, %edi
movl $0x40, %esi
callq 0x2120
movq %rax, 0x10(%rbx)
movl 0x8(%rbx), %ecx
movl %ecx, 0x38(%rax)
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
movupd %xmm0, 0x10(%rax)
movupd %xmm0, 0x20(%rax)
cmpq $0x0, (%r14)
je 0x16966b
movl $0x1, %r15d
xorl %ecx, %ecx
movl $0x2, %r12d
movq 0x10(%r14), %rax
leaq (%rcx,%rcx,2), %r13
shlq $0x4, %r13
cmpb $0x0, 0x28(%rax,%r13)
js 0x16965c
leaq (%rax,%r13), %rdx
movq (%rbx), %rcx
movq (%rcx), %rcx
movl 0x8(%rdx), %edx
shlq $0x5, %rdx
cmpw %bp, 0x4(%rcx,%rdx)
jb 0x1695cf
addq %rcx, %rdx
addq $0x4, %rdx
cmpw %bp, 0x2(%rdx)
jae 0x16965c
movl 0x14(%rax,%r13), %eax
shlq $0x5, %rax
cmpw %bp, 0x4(%rcx,%rax)
jb 0x1695ec
addq %rcx, %rax
addq $0x4, %rax
cmpw %bp, 0x2(%rax)
jae 0x16965c
movq 0x10(%rbx), %rax
movq 0x20(%rax), %rcx
cmpq %rcx, 0x18(%rax)
jne 0x16961e
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
cmoveq %r12, %rsi
movq %rsi, 0x20(%rax)
movq 0x28(%rax), %rdi
shlq $0x4, %rsi
callq 0x2370
movq 0x10(%rbx), %rcx
movq %rax, 0x28(%rcx)
movq 0x10(%rbx), %rax
movq 0x18(%rax), %rcx
movq 0x28(%rax), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x18(%rax)
shlq $0x4, %rcx
movq 0x10(%r14), %rax
movl 0x8(%rax,%r13), %esi
movl 0x14(%rax,%r13), %edi
shlq $0x20, %rsi
orq %rsi, %rdi
movq %rdi, (%rdx,%rcx)
movsd 0x20(%rax,%r13), %xmm0
movsd %xmm0, 0x8(%rdx,%rcx)
movl %r15d, %ecx
incl %r15d
cmpq %rcx, (%r14)
ja 0x16958e
movq 0x10(%rbx), %rcx
xorl %esi, %esi
cmpq $0x0, 0x18(%rcx)
je 0x1696bd
movl $0x1, %eax
xorpd %xmm0, %xmm0
xorl %edx, %edx
movq 0x28(%rcx), %rcx
shlq $0x4, %rdx
movsd 0x8(%rcx,%rdx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x169699
jnp 0x1696ad
addq %rcx, %rdx
movl %esi, %edi
shlq $0x4, %rdi
movupd (%rdx), %xmm1
movupd %xmm1, (%rcx,%rdi)
incl %esi
movl %eax, %edx
movq 0x10(%rbx), %rcx
incl %eax
cmpq %rdx, 0x18(%rcx)
ja 0x169683
movl %esi, %esi
movq %rsi, 0x18(%rcx)
movq 0x28(%rcx), %rdi
shlq $0x4, %rsi
addq %rdi, %rsi
callq 0x160033
movq 0x10(%rbx), %rdi
callq 0x16219e
movq 0x10(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x162057
// File: /workspace/github_cpp_makefile_star2_O1/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, %r15d
movl $0x1, %edi
movl $0x10, %esi
callq 0x2120
movq %rax, %r14
movl %ebx, %ecx
shll %cl, %r15d
leaq (,%r15,8), %rdi
callq 0x2280
movq %rax, (%r14)
testl %r15d, %r15d
je 0x169738
movl %r15d, %edx
shlq $0x3, %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x20e0
movl %ebx, 0x8(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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), %r13
movl $0x1, %ebp
movl $0x1, %edi
movl $0x70, %esi
callq 0x2120
movq %rax, %r14
movq %r12, (%rax)
movl 0x38(%r13), %r12d
xorl %edi, %edi
testq %r12, %r12
je 0x1697e9
leal 0x1(%r12), %ecx
cmpl $0x3, %ecx
movl $0x2, %eax
cmovael %ecx, %eax
xorl %ecx, %ecx
cmpq %rbp, %r12
je 0x1697d0
movq 0x30(%r13), %rdx
movl %edi, %esi
movq (%rdx,%rbp,8), %r8
xorq (%rdx,%rsi,8), %r8
shrq $0x20, %r8
je 0x1697db
movl %ebp, %edx
subl %edi, %edx
cmpl %edx, %ecx
cmovbel %edx, %ecx
movl %ebp, %edi
incq %rbp
cmpq %rbp, %rax
jne 0x1697b7
movl %ecx, %edi
shlq $0x2, %rdi
callq 0x2280
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movq $0x0, 0x20(%r14)
movq %rax, 0x28(%r14)
movq (%r15), %rax
movq (%rax), %rax
movq %rax, 0x50(%r14)
movl $0x20, %esi
movq %r12, %rdi
callq 0x2120
movq %rax, 0x58(%r14)
shlq $0x2, %r12
movq %r12, %rdi
callq 0x2280
movq %rax, 0x30(%r14)
movq %r12, %rdi
callq 0x2280
movq %rax, 0x38(%r14)
movq %rax, %rdi
movl $0xff, %esi
movq %r12, %rdx
callq 0x20e0
movl 0x38(%r13), %edi
movl %ebx, %esi
callq 0x1696f1
movq %rax, 0x40(%r14)
movl 0x38(%r13), %edi
movl %ebx, %esi
callq 0x1696f1
movq %rax, 0x48(%r14)
movq 0x28(%r15), %rax
movq %rax, 0x60(%r14)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
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_O1/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
movq $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 0x169745
leaq 0x48(%rbx), %rdi
callq 0x169745
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_O1/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 %r13
pushq %r12
pushq %rbx
movq %rdi, -0x18(%rsp)
movq %rsi, -0x10(%rsp)
movl 0xc(%rsi), %eax
testq %rax, %rax
je 0x1699d7
movq -0x18(%rsp), %rcx
movq 0x10(%rcx), %rsi
movq 0x30(%rcx), %r8
movq -0x10(%rsp), %rcx
movl 0x8(%rcx), %r9d
movq 0x40(%rcx), %rdx
movl 0x8(%rdx), %ecx
movq %rdx, -0x8(%rsp)
movq (%rdx), %r11
xorl %ebx, %ebx
leal (%r9,%rbx), %r10d
movq (%r8,%r10,8), %r14
movl %r14d, %r10d
movq (%rsi,%r10,8), %r12
movq %r12, %r15
shrq $0x20, %r15
movl %r14d, %r10d
shll %cl, %r10d
movl $0x1, %r13d
movl %r13d, %ebp
shrl %cl, %ebp
leal (%r10,%r13), %edi
decl %edi
movq $0x0, (%r11,%rdi,8)
incl %r13d
testl %ebp, %ebp
je 0x16995a
testl %r12d, %r12d
je 0x1699cb
shll %cl, %r14d
movq -0x18(%rsp), %rdx
movq 0x28(%rdx), %r13
movq -0x8(%rsp), %rdx
movq (%rdx), %rbp
movq -0x10(%rsp), %rdx
movq 0x50(%rdx), %r10
movl %r12d, %r12d
movl %r15d, %edi
shlq $0x4, %rdi
movl (%r13,%rdi), %edx
movsd 0x8(%r13,%rdi), %xmm0
shlq $0x5, %rdx
movl (%r10,%rdx), %edx
addl %r14d, %edx
addsd (%rbp,%rdx,8), %xmm0
movsd %xmm0, (%rbp,%rdx,8)
incq %r15
decq %r12
jne 0x169999
incq %rbx
cmpq %rax, %rbx
jne 0x169938
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movl 0xc(%rsi), %eax
testq %rax, %rax
je 0x169a61
pushq %rbp
pushq %r14
pushq %rbx
movq 0x40(%rsi), %r8
movl 0x8(%r8), %ecx
movq 0x30(%rdi), %rdx
movl 0x8(%rsi), %edi
movq 0x50(%rsi), %rsi
movq (%r8), %r8
xorpd %xmm0, %xmm0
xorl %r9d, %r9d
movapd 0xc55ad(%rip), %xmm1    # 0x22efc0
leal (%rdi,%r9), %r10d
movq (%rdx,%r10,8), %r10
movl %r10d, %r11d
shlq $0x5, %r11
movl (%rsi,%r11), %r11d
shll %cl, %r10d
xorl %ebx, %ebx
leal (%r10,%rbx), %r14d
testl %ebx, %r11d
je 0x169a40
movsd (%r8,%r14,8), %xmm2
xorpd %xmm1, %xmm2
jmp 0x169a46
movsd (%r8,%r14,8), %xmm2
addsd %xmm2, %xmm0
incl %ebx
movl %ebx, %ebp
shrl %cl, %ebp
testl %ebp, %ebp
je 0x169a2b
incq %r9
cmpq %rax, %r9
jne 0x169a13
popq %rbx
popq %r14
popq %rbp
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/rcut.cpp
// Function: debug_mc_gg_t(char const*, unsigned int, unsigned int)
void debug_mc_gg_t(const char* fn, uint32_t update_ta, uint32_t convert_mc_g_t)
{
	kv_u_trans_t *ta = NULL;
	kv_gg_status *s = NULL;
	uint32_t un;
	uint16_t hapN;
	if(load_mc_gg_dump(&ta, &un, &s, &hapN, fn))
	{
		if(convert_mc_g_t)
		{
			mc_opt_t opt;
			mc_opt_init(&opt, asm_opt.n_perturb, asm_opt.f_perturb, asm_opt.seed);
			mc_g_t *mg = NULL;
			mg = to_mc_g_t(ta, s, un);
			char *o_file = get_outfile_name(asm_opt.output_file_name);
			trans_chain* t_ch = load_hc_trans(o_file);
			mb_solve_core(&opt, mg, &(t_ch->k_trans), 1);
			mc_solve_core(&opt, mg, NULL);
		}
		else
		{
			mc_solve_general(ta, un, s, hapN, update_ta, 0);
		}
	}
	exit(1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %edx, %ebx
movq %rdi, %r8
xorl %eax, %eax
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x10(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x8(%rsp), %rsi
leaq 0xe(%rsp), %rcx
callq 0x1f80b
testl %eax, %eax
je 0x16adef
testl %ebx, %ebx
je 0x16adf9
leaq 0x11fa05(%rip), %r15    # 0x28a758
movl 0x1d0(%r15), %eax
movsd 0x1d8(%r15), %xmm0
movq 0x1c8(%r15), %rcx
xorps %xmm1, %xmm1
leaq 0x20(%rsp), %rbx
movaps %xmm1, (%rbx)
movaps %xmm1, 0x10(%rbx)
movl %eax, 0x4(%rbx)
movsd %xmm0, 0x10(%rbx)
movl $0x3e8, (%rbx)          # imm = 0x3E8
movq %rcx, 0x18(%rbx)
movl %eax, 0xc(%rbx)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0xba753(%rip), %xmm0    # 0x2254f0
cvttsd2si %xmm0, %eax
movl %eax, 0x8(%rbx)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl 0x8(%rsp), %edx
callq 0x1f9c6
movq %rax, %r14
movq 0x10(%r15), %rdi
callq 0xffed8
movq %rax, %rdi
callq 0xbeaa7
leaq 0x138(%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x167ffd
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x1eaf5
movl $0x1, %edi
callq 0x2250
movq 0x10(%rsp), %rdi
callq 0x1f61d
jmp 0x16adef
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/rcut.cpp
// Function: dump_kv_u_trans_t(kv_u_trans_t*, _IO_FILE*)
void dump_kv_u_trans_t(kv_u_trans_t *z, FILE *fp)
{
	fwrite(&(z->n), sizeof(z->n), 1, fp);
    fwrite(z->a, sizeof((*(z->a))), z->n, fp);
    fwrite(&z->idx.n, sizeof(z->idx.n), 1, fp);
    fwrite(z->idx.a, sizeof((*(z->idx.a))), z->idx.n, fp);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2410
movq (%r14), %rdx
movq 0x10(%r14), %rdi
movl $0x30, %esi
movq %rbx, %rcx
callq 0x2410
leaq 0x18(%r14), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2410
movq 0x18(%r14), %rdx
movq 0x28(%r14), %rdi
movl $0x8, %esi
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2410
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/rcut.cpp
// Function: dump_asg_t(asg_t*, _IO_FILE*)
void dump_asg_t(asg_t *g, FILE *fp)
{
	uint32_t tmp, Len;
	tmp = g->n_arc;
    fwrite(&tmp, sizeof(tmp), 1, fp);

    tmp = g->is_srt;
    fwrite(&tmp, sizeof(tmp), 1, fp);

    tmp = g->n_seq;
    fwrite(&tmp, sizeof(tmp), 1, fp);
    
    tmp = g->is_symm;
    fwrite(&tmp, sizeof(tmp), 1, fp);

    tmp = g->r_seq;
    fwrite(&tmp, sizeof(tmp), 1, fp);


    // Len = g->n_seq*2;
    // fwrite(g->seq_vis, sizeof((*(g->seq_vis))), Len, fp);

    Len = g->n_seq*2;
    fwrite(g->idx, sizeof((*(g->idx))), Len, fp);
    fwrite(g->arc, sizeof((*(g->arc))), g->n_arc, fp);
    fwrite(g->seq, sizeof((*(g->seq))), g->n_seq, fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
movl 0x4(%rdi), %eax
andl %ebp, %eax
leaq 0x4(%rsp), %r15
movl %eax, (%r15)
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x2410
movl 0x4(%r14), %eax
shrl $0x1f, %eax
movl %eax, (%r15)
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x2410
andl 0x14(%r14), %ebp
movl %ebp, (%r15)
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x2410
movl 0x14(%r14), %eax
shrl $0x1f, %eax
movl %eax, (%r15)
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x2410
movl 0x18(%r14), %eax
movl %eax, (%r15)
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x2410
movl 0x14(%r14), %edx
addl %edx, %edx
movq 0x28(%r14), %rdi
movl $0x8, %esi
movq %rbx, %rcx
callq 0x2410
movq 0x8(%r14), %rdi
movl 0x4(%r14), %edx
movl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
andq %r15, %rdx
movl $0x18, %esi
movq %rbx, %rcx
callq 0x2410
movq 0x20(%r14), %rdi
movl 0x14(%r14), %edx
andq %r15, %rdx
movl $0x8, %esi
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2410
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/rcut.cpp
// Function: dump_ma_ug_t(ma_ug_t*, _IO_FILE*)
void dump_ma_ug_t(ma_ug_t *ug, FILE *fp)
{
	ma_utg_t *u = NULL; uint32_t t, i;
    fwrite(&(ug->u.n), sizeof(ug->u.n), 1, fp);
    for (i = 0; i < ug->u.n; i++) {
        u = &(ug->u.a[i]);
        t = u->len;
        fwrite(&t, sizeof(t), 1, fp);
        t = u->circ;
        fwrite(&t, sizeof(t), 1, fp);
        fwrite(&(u->start), sizeof(u->start), 1, fp);
        fwrite(&(u->end), sizeof(u->end), 1, fp);
        fwrite(&(u->n), sizeof(u->n), 1, fp);
        fwrite(u->a, sizeof(uint64_t), u->n, fp);
    }
	dump_asg_t(ug->g, fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2410
cmpq $0x0, (%r14)
je 0x16b0ee
movl $0x1, %ebp
xorl %eax, %eax
movq %r14, 0x10(%rsp)
movq 0x10(%r14), %r13
leaq (%rax,%rax,4), %r15
leaq 0x4(,%r15,8), %r12
addq %r13, %r12
movl -0x4(%r12), %eax
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl %ecx, %eax
movl %eax, 0xc(%rsp)
movl $0x4, %esi
movl $0x1, %edx
leaq 0xc(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
callq 0x2410
movl -0x4(%r12), %eax
shrl $0x1f, %eax
movl %eax, 0xc(%rsp)
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rdi
movq 0x10(%rsp), %r14
movq %rbx, %rcx
callq 0x2410
movl $0x4, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %rbx, %rcx
callq 0x2410
leaq 0x8(,%r15,8), %rdi
addq %r13, %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2410
leaq 0x10(,%r15,8), %r12
addq %r13, %r12
movl $0x4, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %rbx, %rcx
callq 0x2410
movq 0x8(%r12), %rdi
movl (%r12), %edx
movl $0x8, %esi
movq %rbx, %rcx
callq 0x2410
movl %ebp, %eax
incl %ebp
cmpq %rax, (%r14)
ja 0x16b016
movq 0x18(%r14), %rdi
movq %rbx, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x16aed9
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/rcut.cpp
// Function: dump_bubble_type(bubble_type*, _IO_FILE*)
void dump_bubble_type(bubble_type* bub, FILE *fp)
{
	fwrite(&(bub->chain_weight.n), sizeof(bub->chain_weight.n), 1, fp);
	fwrite(bub->chain_weight.a, sizeof((*(bub->chain_weight.a))), bub->chain_weight.n, fp);

	fwrite(&(bub->list.n), sizeof(bub->list.n), 1, fp);
	fwrite(bub->list.a, sizeof((*(bub->list.a))), bub->list.n, fp);

	fwrite(&(bub->num.n), sizeof(bub->num.n), 1, fp);
	fwrite(bub->num.a, sizeof((*(bub->num.a))), bub->num.n, fp);

	fwrite(&(bub->pathLen.n), sizeof(bub->pathLen.n), 1, fp);
	fwrite(bub->pathLen.a, sizeof((*(bub->pathLen.a))), bub->pathLen.n, fp);

	dump_ma_ug_t(bub->b_ug, fp);
	dump_asg_t(bub->b_g, fp);
	dump_ma_ug_t(bub->ug, fp);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0xc8, %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2410
movq 0xc8(%r14), %rdx
movq 0xd8(%r14), %rdi
movl $0x20, %esi
movq %rbx, %rcx
callq 0x2410
leaq 0x18(%r14), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2410
movq 0x18(%r14), %rdx
movq 0x28(%r14), %rdi
movl $0x4, %esi
movq %rbx, %rcx
callq 0x2410
leaq 0x30(%r14), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2410
movq 0x30(%r14), %rdx
movq 0x40(%r14), %rdi
movl $0x4, %esi
movq %rbx, %rcx
callq 0x2410
leaq 0x48(%r14), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2410
movq 0x48(%r14), %rdx
movq 0x58(%r14), %rdi
movl $0x8, %esi
movq %rbx, %rcx
callq 0x2410
movq 0xc0(%r14), %rdi
movq %rbx, %rsi
callq 0x16afda
movq 0xb8(%r14), %rdi
movq %rbx, %rsi
callq 0x16aed9
movq 0x10(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x16afda