LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 0x16e09c
movq (%rsp), %rax
incl (%rax)
movl 0xc(%rbx), %edi
movq 0x28(%rbx), %rsi
movq %rbx, %rdx
callq 0x17249e
movl 0xc(%rbx), %eax
testl %eax, %eax
je 0x16e09c
xorl %r13d, %r13d
xorl %r14d, %r14d
movq 0x28(%rbx), %rcx
movl (%rcx,%r13,4), %esi
movq (%r15), %rcx
movq 0x40(%rcx), %rcx
imulq $0x38, %rsi, %rdx
movsd 0x18(%rcx,%rdx), %xmm2
movsd 0x20(%rcx,%rdx), %xmm3
ucomisd %xmm3, %xmm2
movsd 0x28(%rcx,%rdx), %xmm0
movsd 0x30(%rcx,%rdx), %xmm1
jne 0x16e036
jp 0x16e036
ucomisd %xmm1, %xmm0
jne 0x16e036
jnp 0x16e083
addq %rdx, %rcx
movsbl 0x10(%rcx), %edx
xorps %xmm4, %xmm4
cvtsi2sd %edx, %xmm4
subsd %xmm3, %xmm2
mulsd %xmm4, %xmm2
xorpd %xmm3, %xmm3
subsd %xmm2, %xmm3
movsbl 0x11(%rcx), %ecx
xorps %xmm2, %xmm2
cvtsi2sd %ecx, %xmm2
subsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
subsd %xmm0, %xmm3
ucomisd 0xc35a5(%rip), %xmm3    # 0x231618
jae 0x16e083
movq %r15, %rdi
callq 0x17256a
incl %r14d
movl 0xc(%rbx), %eax
incq %r13
movl %eax, %ecx
cmpq %rcx, %r13
jb 0x16dffb
incl %ebp
testl %r14d, %r14d
jne 0x16dfcb
movq %r15, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x169e6b
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/rcut.cpp
// Function: reset_mb_g_t_z(mb_g_t*)
void reset_mb_g_t_z(mb_g_t *mbg)
{
	uint32_t k;
	mb_match_t *ma = mbg->e;
	for (k = 0; k < ma->n_seq; ++k) ///each block
	{
		uint32_t o = ma->idx.a[k] >> 32;
        uint32_t j, n = (uint32_t)ma->idx.a[k];
		mbg->u->u.a[k].z[0] = mbg->u->u.a[k].z[1] = 0;
		mbg->u->u.a[k].z[2] = mbg->u->u.a[k].z[3] = 0;
		for (j = 0; j < n; ++j) {
            const mb_edge_t *e = &ma->ma.a[o + j];
            uint32_t t = ma_y(*e);

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

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

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

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

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x8(%rdi), %rax
movl 0x38(%rax), %ecx
testq %rcx, %rcx
je 0x16e1c9
movq 0x10(%rax), %rdx
movq (%rdi), %rsi
movq 0x40(%rsi), %rsi
xorl %edi, %edi
xorps %xmm0, %xmm0
movq (%rdx,%rdi,8), %r11
imulq $0x38, %rdi, %r9
movups %xmm0, 0x28(%rsi,%r9)
movups %xmm0, 0x18(%rsi,%r9)
testl %r11d, %r11d
je 0x16e1bd
movq %r11, %r8
shrq $0x20, %r8
addq %rsi, %r9
addq $0x20, %r9
movq 0x28(%rax), %r10
movl %r11d, %r11d
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
xorpd %xmm3, %xmm3
xorpd %xmm4, %xmm4
movl %r8d, %ebx
leaq (%rbx,%rbx,4), %rbx
leaq (%r10,%rbx,8), %rbx
movl (%rbx), %r14d
imulq $0x38, %r14, %r14
movb 0x10(%rsi,%r14), %bpl
testb %bpl, %bpl
jle 0x16e144
addsd 0x8(%rbx), %xmm3
movsd %xmm3, -0x8(%r9)
jmp 0x16e150
jns 0x16e150
addsd 0x8(%rbx), %xmm4
movsd %xmm4, (%r9)
movb 0x11(%rsi,%r14), %r14b
testb %r14b, %r14b
jle 0x16e167
addsd 0x10(%rbx), %xmm3
movsd %xmm3, -0x8(%r9)
jmp 0x16e173
jns 0x16e173
addsd 0x10(%rbx), %xmm4
movsd %xmm4, (%r9)
testb %bpl, %bpl
jle 0x16e185
addsd 0x18(%rbx), %xmm1
movsd %xmm1, 0x8(%r9)
jmp 0x16e192
jns 0x16e192
addsd 0x18(%rbx), %xmm2
movsd %xmm2, 0x10(%r9)
testb %r14b, %r14b
jle 0x16e1a4
addsd 0x20(%rbx), %xmm1
movsd %xmm1, 0x8(%r9)
jmp 0x16e1b1
jns 0x16e1b1
addsd 0x20(%rbx), %xmm2
movsd %xmm2, 0x10(%r9)
incq %r8
decq %r11
jne 0x16e11b
incq %rdi
cmpq %rcx, %rdi
jne 0x16e0d9
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x16e9c8
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 0x16e992
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 0x16e98a
movb %bl, (%r12,%r15)
incq %r14
cmpq %r14, %r10
jne 0x16e977
testq %rcx, %rcx
je 0x16e9b9
leaq (%r8,%r9,4), %r8
xorl %r9d, %r9d
movl (%r8,%r9,4), %r10d
movq 0x10(%rdi), %r11
cmpb $0x0, (%r11,%r10)
je 0x16e9b1
movb %dl, (%r11,%r10)
incq %r9
cmpq %r9, %rcx
jne 0x16e99e
incl %eax
movq (%rsi), %rcx
cmpq %rax, 0x30(%rcx)
ja 0x16e942
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x16ea5e
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 0x16ea43
movl %ebp, %ecx
movq (%rbx), %rax
incl %ebp
cmpq %rcx, 0x30(%rax)
ja 0x16ea1a
jmp 0x16ea5e
movq 0x10(%rax), %rax
movl (%rdx,%rcx), %r8d
movl 0x4(%rdx,%rcx), %edx
leaq (%rax,%r8,4), %rcx
leaq (%rax,%rdx,4), %rdx
callq 0x1f4b3
jmp 0x16ea34
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x16ed1b
movl %ecx, %r15d
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movq %r8, 0x10(%rsp)
movl %r9d, 0xc(%rsp)
movl $0x1, %edi
movl $0x80, %esi
callq 0x2120
movq %rax, %r14
movq %r12, 0x30(%rax)
movq %rbp, 0x38(%rax)
movq %r13, 0x40(%rax)
movq 0x10(%r12), %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, %r15d
movl $0x40, %ebp
cmovbl %r15d, %ebp
movl %ebp, 0x58(%r14)
movl $0x28, %esi
movq %rbp, %rdi
callq 0x2120
movq %rax, 0x60(%r14)
testl %r15d, %r15d
je 0x16ecf4
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, %r15
shrq $0x10, %r15
orq %rax, %r15
incq %r15
shlq $0x3, %rbp
leaq (,%rbp,4), %rbx
addq %rbp, %rbx
xorl %ebp, %ebp
cmpq %r12, 0x8(%r13,%rbp)
jae 0x16ece6
movq %r15, 0x8(%r13,%rbp)
movq 0x10(%r13,%rbp), %rdi
movq %r15, %rsi
callq 0x2370
movq %rax, 0x10(%r13,%rbp)
movq %r12, (%r13,%rbp)
addq $0x28, %rbp
cmpq %rbp, %rbx
jne 0x16ecc8
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 0x16ed1e
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_O3/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 0x16edc1
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
callq 0x2220
movq 0x78(%rbx), %rdi
callq 0x17b748
movq 0x70(%rbx), %rax
testq %rax, %rax
je 0x16ed6e
movq 0x10(%rax), %rdi
callq 0x2220
movq 0x70(%rbx), %rdi
callq 0x2220
cmpl $0x0, 0x58(%rbx)
je 0x16ed99
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 0x16ed7d
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_O3/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 0x16f497
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 0x16f48b
movl %esi, %r11d
testb %r8b, %r8b
jne 0x16f487
movb $0x1, %r11b
testb $0x2, %r10b
je 0x16f48b
orb %r11b, (%rdx,%r9)
incq %rdi
movl 0x10(%rax), %r9d
cmpq %r9, %rdi
jb 0x16f44c
retq
// File: /workspace/github_cpp_makefile_star2_O3/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, 0x18(%rsp)
movq 0x10(%r8), %rax
movl %edx, %ecx
movq (%rax,%rcx,8), %rax
testl %eax, %eax
je 0x16f5ac
movq 0x28(%r8), %rcx
movq %rax, %rdx
shrq $0x20, %rdx
movl %eax, %esi
shlq $0x4, %rdx
leaq (%rdx,%rcx), %rbx
addq $0x8, %rbx
shlq $0x4, %rsi
xorl %r14d, %r14d
movq %r9, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rbx, 0x20(%rsp)
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 0x16f59f
leaq (%r15,%r15,2), %rbp
leaq (,%rbp,8), %rdi
movq 0x18(%rsp), %rbx
addq (%rbx), %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x1111f4
movq (%rbx), %rdx
movq 0x20(%rsp), %rbx
cmpl $-0x1, %eax
je 0x16f555
movq 0x10(%rdx,%rbp,8), %rcx
cvttsd2si (%rbx,%r14), %rsi
cltq
shlq $0x6, %rax
cmpq %rsi, 0x30(%rcx,%rax)
je 0x16f58e
leaq (%r13,%r13,2), %r13
leaq (%rdx,%r13,8), %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x1111f4
cmpl $-0x1, %eax
je 0x16f5bb
movq 0x18(%rsp), %rcx
movq (%rcx), %rcx
movq 0x10(%rcx,%r13,8), %rcx
cvttsd2si (%rbx,%r14), %rdx
cltq
shlq $0x6, %rax
cmpq %rdx, 0x30(%rcx,%rax)
jne 0x16f5bb
addq %rax, %rcx
movq 0x10(%rsp), %r9
movq 0x8(%rsp), %rsi
movb $0x4, 0x2(%rcx)
addq $0x10, %r14
cmpq %r14, %rsi
jne 0x16f4ec
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1f588
// File: /workspace/github_cpp_makefile_star2_O3/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), %rax
movl %edx, %ecx
movq (%rax,%rcx,8), %rax
testl %eax, %eax
je 0x16f842
movq %r9, %rbx
movq 0x28(%r8), %rcx
movq %rax, %rdx
shrq $0x20, %rdx
movl %eax, %ebp
shlq $0x4, %rdx
leaq (%rdx,%rcx), %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 0x16f82c
movq 0x10(%rsp), %rdi
movl %r13d, %esi
movl %r12d, %edx
leaq 0x8(%rsp), %rcx
xorl %r8d, %r8d
callq 0xcba40
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x16f7f7
movsd 0x20(%rax), %xmm0
ucomisd (%r15,%r14), %xmm0
jne 0x16f7f7
jnp 0x16f828
movq 0x10(%rsp), %rdi
movl %r12d, %esi
movl %r13d, %edx
leaq 0x8(%rsp), %rcx
xorl %r8d, %r8d
callq 0xcba40
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x16f83b
movsd 0x20(%rax), %xmm0
ucomisd (%r15,%r14), %xmm0
jne 0x16f82c
jp 0x16f82c
andb $0x7f, 0x28(%rax)
addq $0x10, %r14
cmpq %r14, %rbp
jne 0x16f79d
jmp 0x16f842
callq 0x1f5c7
jmp 0x16f82c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x16f88e
movl $0x1, %ecx
xorl %edx, %edx
movq 0x10(%rbx), %rax
leaq (%rdx,%rdx,2), %rdx
shlq $0x4, %rdx
orb $-0x80, 0x28(%rax,%rdx)
movl %ecx, %edx
movq (%rbx), %rax
incl %ecx
cmpq %rdx, %rax
ja 0x16f86f
jmp 0x16f890
xorl %eax, %eax
movq 0x28(%r14), %r8
cmpl $0x0, 0x38(%r8)
je 0x16f8ba
xorl %ebp, %ebp
movq 0x10(%r14), %r9
movl %ebp, %edx
movq %rbx, %rcx
callq 0x16f755
incl %ebp
movq 0x28(%r14), %r8
cmpl 0x38(%r8), %ebp
jb 0x16f89d
movq (%rbx), %rax
testq %rax, %rax
je 0x16f9cc
xorl %esi, %esi
movl $0x1, %ecx
xorl %edx, %edx
movq 0x10(%rbx), %rdi
leaq (%rsi,%rsi,2), %rsi
shlq $0x4, %rsi
cmpb $0x0, 0x28(%rdi,%rsi)
js 0x16f90a
addq %rdi, %rsi
movl %edx, %eax
incl %edx
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movups 0x20(%rsi), %xmm2
movups %xmm2, 0x20(%rdi,%rax)
movups %xmm1, 0x10(%rdi,%rax)
movups %xmm0, (%rdi,%rax)
movq (%rbx), %rax
movl %ecx, %esi
incl %ecx
cmpq %rsi, %rax
ja 0x16f8cc
movl %edx, %ecx
movq %rcx, (%rbx)
testl %edx, %edx
je 0x16f9d3
movq 0x10(%rbx), %rax
shlq $0x4, %rcx
leaq (%rcx,%rcx,2), %r15
xorl %r12d, %r12d
movl $0x2, %r13d
movq (%rbx), %rcx
cmpq 0x8(%rbx), %rcx
jne 0x16f964
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
cmoveq %r13, %rdx
movq %rdx, 0x8(%rbx)
shlq $0x4, %rdx
leaq (%rdx,%rdx,2), %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%rbx)
movq (%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbx)
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %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), %rsi
movq %rsi, 0xc(%rax,%rcx)
addq $0x30, %r12
movq %rdx, %rax
cmpq %r12, %r15
jne 0x16f935
jmp 0x16f9d3
movq $0x0, (%rbx)
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 0xc4edd
// File: /workspace/github_cpp_makefile_star2_O3/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 0xcfcb3(%rip), %rsi     # 0x23f7f7
movq %rax, %rdi
callq 0x2210
testq %rax, %rax
je 0x16fc72
movq %rax, %rbx
movl $0x1, %edi
movl $0x30, %esi
callq 0x2120
movq %rax, %r14
movl $0x1, %edi
movl $0x40, %esi
callq 0x2120
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 0x16fc75
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x16fb2f
movq %rsp, %r14
movq %rax, (%r14)
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x1dd74
movq %r14, %rdi
callq 0x168848
movl $0x1, %edi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O3/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 0x16fcfd
testl %r15d, %r15d
jle 0x16fd46
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 0x16fce9
jmp 0x16fd48
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 0x16fd8b
incl %r13d
movl %r13d, %edi
movl %r12d, %esi
movl %r15d, %edx
movq %r14, %r8
callq 0x16fcc0
movq (%rsp), %rcx
movl (%r14,%rbp,4), %eax
leal 0x1(%rax), %edx
movl %edx, (%r14,%rbp,4)
cmpl %ebx, %eax
jl 0x16fd20
jmp 0x16fd8b
xorl %ebp, %ebp
movq (%rcx), %rax
movq 0x8(%rcx), %rsi
cmpq 0x10(%rcx), %rsi
jne 0x16fd80
leaq (%rsi,%rsi), %rdx
testq %rsi, %rsi
movl $0x2, %esi
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_O3/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 0x16fe90
movq %rax, %r12
leaq 0x1(,%r13,4), %r13
movzwl %bx, %r15d
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 0x16fcc0
addq $0x18, %r12
cmpq %rbp, %r15
jne 0x16fe5a
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_O3/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 0x16ff5b
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x16ff5b
cmpq $0x0, 0x20(%rax)
je 0x16ff03
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 0x16fee5
movq 0x28(%rax), %rdi
callq 0x2220
movq (%rbx), %rdi
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x16ff50
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_O3/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)
movq (%r14), %rdx
testq %rdx, %rdx
je 0x1700d5
movq 0x10(%r14), %rsi
movl $0x1, %r15d
xorl %ecx, %ecx
movl $0x2, %r12d
leaq (%rcx,%rcx,2), %r13
shlq $0x4, %r13
cmpb $0x0, 0x28(%rsi,%r13)
js 0x170076
leaq (%rsi,%r13), %rdi
movq (%rbx), %rcx
movq (%rcx), %rcx
movl 0x8(%rdi), %edi
shlq $0x5, %rdi
cmpw %bp, 0x4(%rcx,%rdi)
jb 0x16ffe9
addq %rcx, %rdi
addq $0x4, %rdi
cmpw %bp, 0x2(%rdi)
jae 0x170076
movl 0x14(%rsi,%r13), %edi
shlq $0x5, %rdi
cmpw %bp, 0x4(%rcx,%rdi)
jb 0x170006
addq %rdi, %rcx
addq $0x4, %rcx
cmpw %bp, 0x2(%rcx)
jae 0x170076
movq 0x18(%rax), %rcx
cmpq 0x20(%rax), %rcx
jne 0x170040
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 (%r14), %rdx
movq 0x10(%r14), %rsi
jmp 0x170044
movq 0x28(%rax), %rcx
movq 0x18(%rax), %rdi
leaq 0x1(%rdi), %r8
movq %r8, 0x18(%rax)
shlq $0x4, %rdi
movl 0x8(%rsi,%r13), %r8d
movl 0x14(%rsi,%r13), %r9d
shlq $0x20, %r8
orq %r8, %r9
movq %r9, (%rcx,%rdi)
movsd 0x20(%rsi,%r13), %xmm0
movsd %xmm0, 0x8(%rcx,%rdi)
movl %r15d, %ecx
incl %r15d
cmpq %rcx, %rdx
ja 0x16ffac
xorl %esi, %esi
cmpq $0x0, 0x18(%rax)
je 0x1700d7
movl $0x1, %ecx
xorpd %xmm0, %xmm0
xorl %edx, %edx
movq 0x28(%rax), %rdi
shlq $0x4, %rdx
movsd 0x8(%rdi,%rdx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x1700af
jnp 0x1700c7
addq %rdi, %rdx
movl %esi, %eax
shlq $0x4, %rax
movupd (%rdx), %xmm1
movupd %xmm1, (%rdi,%rax)
incl %esi
movq 0x10(%rbx), %rax
movl %ecx, %edx
incl %ecx
cmpq %rdx, 0x18(%rax)
ja 0x170099
movl %esi, %esi
jmp 0x1700d7
xorl %esi, %esi
movq %rsi, 0x18(%rax)
movq 0x28(%rax), %rdi
shlq $0x4, %rsi
addq %rdi, %rsi
callq 0x16695f
movq 0x10(%rbx), %rdi
callq 0x168a9c
movq 0x10(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x168951
// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %r12d
movl $0x1, %edi
movl $0x10, %esi
callq 0x2120
movq %rax, %r14
movl %ebx, %ecx
shll %cl, %r12d
leaq (,%r12,8), %r15
movq %r15, %rdi
callq 0x2280
movq %rax, (%r14)
testl %r12d, %r12d
je 0x170154
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x20e0
movl %ebx, 0x8(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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, (%rsp)
movq 0x10(%rdi), %rbp
movl $0x1, %r13d
movl $0x1, %edi
movl $0x70, %esi
callq 0x2120
movq %rax, %r14
movq %r12, (%rax)
movl 0x38(%rbp), %r15d
xorl %r12d, %r12d
testq %r15, %r15
je 0x170216
leal 0x1(%r15), %ecx
cmpl $0x3, %ecx
movl $0x2, %eax
cmovael %ecx, %eax
xorl %ecx, %ecx
cmpq %r13, %r15
je 0x1701f5
movq 0x30(%rbp), %rdx
movl %r12d, %esi
movq (%rdx,%r13,8), %rdi
xorq (%rdx,%rsi,8), %rdi
shrq $0x20, %rdi
je 0x170203
movl %r13d, %edx
subl %r12d, %edx
cmpl %edx, %ecx
cmovbel %edx, %ecx
movl %r13d, %r12d
incq %r13
cmpq %r13, %rax
jne 0x1701db
movl %ecx, %edi
shlq $0x2, %rdi
movq %r15, %r12
jmp 0x170218
xorl %edi, %edi
callq 0x2280
movq %rax, 0x28(%r14)
movq (%rsp), %r13
movq (%r13), %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 %r15d, %edi
movl %ebx, %esi
callq 0x17010b
movq %rax, 0x40(%r14)
movl 0x38(%rbp), %edi
movl %ebx, %esi
callq 0x17010b
movq %rax, 0x48(%r14)
movq 0x28(%r13), %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_O3/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 0x170167
leaq 0x48(%rbx), %rdi
callq 0x170167
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_O3/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
movd (%rdi), %xmm0
pshufd $0x0, %xmm0, %xmm1      # xmm1 = xmm0[0,0,0,0]
pxor %xmm0, %xmm0
movdqa 0xcc98b(%rip), %xmm2    # 0x23ccc0
movl $0x20, %eax
movaps 0xc11af(%rip), %xmm3    # 0x2314f0
movdqa 0xcc987(%rip), %xmm4    # 0x23ccd0
pshuflw $0xfe, %xmm2, %xmm5     # xmm5 = xmm2[2,3,3,3,4,5,6,7]
movdqa %xmm1, %xmm6
psrld %xmm5, %xmm6
pshuflw $0x54, %xmm2, %xmm5     # xmm5 = xmm2[0,1,1,1,4,5,6,7]
movdqa %xmm1, %xmm7
psrld %xmm5, %xmm7
punpcklqdq %xmm6, %xmm7    # xmm7 = xmm7[0],xmm6[0]
pshufd $0xee, %xmm2, %xmm5     # xmm5 = xmm2[2,3,2,3]
pshuflw $0xfe, %xmm5, %xmm6     # xmm6 = xmm5[2,3,3,3,4,5,6,7]
movdqa %xmm1, %xmm8
psrld %xmm6, %xmm8
pshuflw $0x54, %xmm5, %xmm5     # xmm5 = xmm5[0,1,1,1,4,5,6,7]
movdqa %xmm1, %xmm6
psrld %xmm5, %xmm6
punpckhqdq %xmm8, %xmm6    # xmm6 = xmm6[1],xmm8[1]
shufps $0xcc, %xmm6, %xmm7     # xmm7 = xmm7[0,3],xmm6[0,3]
andps %xmm3, %xmm7
paddd %xmm7, %xmm0
paddd %xmm4, %xmm2
addl $-0x4, %eax
jne 0x170349
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
paddd %xmm0, %xmm1
pshufd $0x55, %xmm1, %xmm0     # xmm0 = xmm1[1,1,1,1]
paddd %xmm1, %xmm0
movd %xmm0, %ecx
movq 0x124c22(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
cmpl %r8d, %ecx
jne 0x1703d2
leaq 0xcd00c(%rip), %rsi     # 0x23d3d9
movl %ecx, %r8d
jmp 0x1703d9
leaq 0xccfe5(%rip), %rsi     # 0x23d3be
xorl %eax, %eax
jmp 0x22b0
// File: /workspace/github_cpp_makefile_star2_O3/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, -0x8(%rsp)
movl 0xc(%rsi), %eax
testq %rax, %rax
je 0x1704a5
movq -0x8(%rsp), %rcx
movq 0x10(%rcx), %rdi
movq 0x30(%rcx), %r8
movl 0x8(%rsi), %r9d
movq 0x40(%rsi), %r10
movl 0x8(%r10), %ecx
movq (%r10), %r10
xorl %r11d, %r11d
leal (%r9,%r11), %ebx
movq (%r8,%rbx,8), %rbx
movl %ebx, %r14d
movq (%rdi,%r14,8), %r15
movq %r15, %r14
shrq $0x20, %r14
shll %cl, %ebx
movl $0x1, %r12d
movl %r12d, %ebp
shrl %cl, %ebp
leal (%rbx,%r12), %r13d
decl %r13d
movq $0x0, (%r10,%r13,8)
incl %r12d
testl %ebp, %ebp
je 0x170438
testl %r15d, %r15d
je 0x170499
movq -0x8(%rsp), %rdx
movq 0x28(%rdx), %r12
movq 0x50(%rsi), %r13
movl %r15d, %r15d
movl %r14d, %ebp
shlq $0x4, %rbp
movl (%r12,%rbp), %edx
movsd 0x8(%r12,%rbp), %xmm0
shlq $0x5, %rdx
movl (%r13,%rdx), %edx
addl %ebx, %edx
addsd (%r10,%rdx,8), %xmm0
movsd %xmm0, (%r10,%rdx,8)
incq %r14
decq %r15
jne 0x170468
incq %r11
cmpq %rax, %r11
jne 0x17041a
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x170527
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 0xcacef(%rip), %xmm1    # 0x23b1d0
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
movsd (%r8,%r14,8), %xmm2
testl %ebx, %r11d
je 0x17050c
xorpd %xmm1, %xmm2
addsd %xmm2, %xmm0
incl %ebx
movl %ebx, %ebp
shrl %cl, %ebp
testl %ebp, %ebp
je 0x1704f9
incq %r9
cmpq %rax, %r9
jne 0x1704e1
popq %rbx
popq %r14
popq %rbp
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1eb84
testl %eax, %eax
je 0x17183a
testl %ebx, %ebx
je 0x171844
leaq 0x123fb0(%rip), %r15    # 0x295758
movl 0x1d0(%r15), %eax
movsd 0x1d8(%r15), %xmm0
movq 0x1c8(%r15), %rcx
leaq 0x20(%rsp), %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 0xbfe08(%rip), %xmm0    # 0x2315f0
cvttsd2si %xmm0, %eax
movl %eax, 0x8(%rbx)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl 0x8(%rsp), %edx
callq 0x1ed3f
movq %rax, %r14
movq 0x10(%r15), %rdi
callq 0x104233
movq %rax, %rdi
callq 0xbf9e8
leaq 0x138(%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x16ea65
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x1dd74
movl $0x1, %edi
callq 0x2250
movq 0x10(%rsp), %rdi
callq 0x1e996
jmp 0x17183a
// File: /workspace/github_cpp_makefile_star2_O3/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 0x171b39
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 0x171a61
movq 0x18(%r14), %rdi
movq %rbx, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x171924
// File: /workspace/github_cpp_makefile_star2_O3/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 0x171a25
movq 0xb8(%r14), %rdi
movq %rbx, %rsi
callq 0x171924
movq 0x10(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x171a25
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/rcut.cpp
// Function: prt_rcut_res(char const*, signed char*, ma_ug_t*, asg_t*)
void prt_rcut_res(const char* fn, int8_t *s, ma_ug_t *ug, asg_t *sg)
{
	uint32_t i, k, flag = AMBIGU; 
	char *buf = (char*)calloc(strlen(fn) + 50, 1);
    sprintf(buf, "%s.rcut.res.log", fn);
    FILE *fp = fopen(buf, "w");
	uint8_t *rs = NULL; MALLOC(rs, sg->n_seq);
	memset(rs, AMBIGU, sg->n_seq*sizeof((*rs)));

    for (i = 0; i < ug->g->n_seq; i++) {
        if(ug->g->seq[i].del) continue;
        flag = AMBIGU;
		if(s[i] == 0) continue;
		flag = (s[i] > 0? FATHER:MOTHER);
        for (k = 0; k < ug->u.a[i].n; k++) rs[ug->u.a[i].a[k]>>33] = flag;
    }

	for (i = 0; i < sg->n_seq; i++) {
		if(rs[i] == AMBIGU) continue;
		fprintf(fp, "%.*s\t%u\n", (int)Get_NAME_LENGTH(R_INF, i), Get_NAME(R_INF, i), rs[i]);
	}

	fclose(fp); free(rs);
    free(buf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r14
callq 0x2090
leaq 0x32(%rax), %rdi
movl $0x1, %esi
callq 0x2120
movq %rax, %r15
leaq 0xcb255(%rip), %rsi     # 0x23d4f2
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0xd6431(%rip), %rsi     # 0x2486e2
movq %r15, 0x8(%rsp)
movq %r15, %rdi
callq 0x2210
movq %rax, %r15
movq %rbx, 0x10(%rsp)
movl 0x14(%rbx), %r14d
movl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
movq %r14, %rsi
andq %rbx, %rsi
movl $0x1, %edi
movq %rsi, (%rsp)
callq 0x2120
movq %rax, %r12
movq 0x18(%r13), %rcx
movl 0x14(%rcx), %eax
andq %rbx, %rax
je 0x17234b
movq 0x20(%rcx), %rcx
xorl %edx, %edx
cmpl $0x0, (%rcx,%rdx,8)
js 0x172343
movb (%rbp,%rdx), %dil
testb %dil, %dil
je 0x172343
movq 0x10(%r13), %r8
leaq (%rdx,%rdx,4), %r9
movl 0x10(%r8,%r9,8), %esi
testq %rsi, %rsi
je 0x172343
leaq (%r8,%r9,8), %r8
testb %dil, %dil
setle %dil
incb %dil
movq 0x18(%r8), %r8
xorl %r9d, %r9d
movq (%r8,%r9,8), %r10
shrq $0x21, %r10
movb %dil, (%r12,%r10)
incq %r9
cmpq %r9, %rsi
jne 0x17232f
incq %rdx
cmpq %rax, %rdx
jne 0x1722f8
cmpl $0x0, (%rsp)
je 0x1723a3
leaq 0x123ed8(%rip), %rbp    # 0x296230
leaq 0xbe9ce(%rip), %r13     # 0x230d2d
xorl %ebx, %ebx
movzbl (%r12,%rbx), %r8d
testl %r8d, %r8d
je 0x172393
movq 0x40(%rbp), %rax
movl 0x8(%rax,%rbx,8), %edx
movq (%rax,%rbx,8), %rcx
subl %ecx, %edx
addq 0x8(%rbp), %rcx
movq %r15, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x22b0
movq 0x10(%rsp), %rax
movl 0x14(%rax), %r14d
incq %rbx
movl %r14d, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq %rax, %rbx
jb 0x172361
movq %r15, %rdi
callq 0x2190
movq %r12, %rdi
callq 0x2220
movq 0x8(%rsp), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/rcut.cpp
// Function: ks_shuffle_uint32_t(unsigned long, unsigned int*, unsigned long*)
static void ks_shuffle_uint32_t(size_t n, uint32_t a[], uint64_t *x)
{
	size_t i, j;
	for (i = n; i > 1; --i) {
		uint32_t tmp;
		j = (size_t)(kr_drand_r(x) * i);
		tmp = a[j]; a[j] = a[i-1]; a[i-1] = tmp;
	}
}

// Assembly:
cmpq $0x2, %rdi
jb 0x172569
pushq %r14
pushq %rbx
movq (%rdx), %r10
movabsq $-0x61c8864680b583eb, %rax # imm = 0x9E3779B97F4A7C15
movabsq $-0x40a7b892e31b1a47, %rcx # imm = 0xBF58476D1CE4E5B9
movabsq $-0x6b2fb644ecceee15, %r8 # imm = 0x94D049BB133111EB
movabsq $0x3ff0000000000000, %r9 # imm = 0x3FF0000000000000
movsd 0xbf15a(%rip), %xmm0    # 0x231638
movsd 0xbee22(%rip), %xmm1    # 0x231308
addq %rax, %r10
movq %r10, %r11
shrq $0x1e, %r11
xorq %r10, %r11
imulq %rcx, %r11
movq %r11, %rbx
shrq $0x1b, %rbx
xorq %r11, %rbx
imulq %r8, %rbx
movq %rbx, %r10
shrq $0x1f, %r10
xorq %rbx, %r10
movq %r10, %r11
shrq $0xc, %r11
orq %r9, %r11
movq %r11, %xmm2
addsd %xmm0, %xmm2
xorps %xmm3, %xmm3
cvtsi2sd %rdi, %xmm3
mulsd %xmm2, %xmm3
cvttsd2si %xmm3, %r11
movq %r11, %rbx
sarq $0x3f, %rbx
subsd %xmm1, %xmm3
cvttsd2si %xmm3, %r14
andq %rbx, %r14
orq %r11, %r14
movl (%rsi,%r14,4), %r11d
movl -0x4(%rsi,%rdi,4), %ebx
movl %ebx, (%rsi,%r14,4)
movl %r11d, -0x4(%rsi,%rdi,4)
decq %rdi
cmpq $0x1, %rdi
ja 0x1724e6
movq %r10, (%rdx)
popq %rbx
popq %r14
retq