LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: flip_chain(mc_match_t const*, mc_svaux_t*, unsigned int*, unsigned int, unsigned int, unsigned int, bits_p*, unsigned char*, unsigned char)
double flip_chain(const mc_match_t *ma, mc_svaux_t *b, uint32_t *a, uint32_t a_n, uint32_t off, uint32_t occ, 
bits_p *vis, uint8_t *lock, uint8_t lock_max)
{
	uint32_t k, kn = off + occ;
	for (k = off; k < kn; k++) {
		vis->a[a[k]>>3] = 0;
		// if(occ == 4 && a[off] == 11279) dbg = 1;
	}
	for (k = off; k < kn; k++) {
		if(lock[a[k]] >= lock_max) continue;
		if(is_set_bits_p((*vis), a[k])) continue;
		set_bits_p((*vis), a[k]); lock[a[k]]++;
		// if(dbg) fprintf(stderr, "[M::%s::] a[%u]::%u, s::%d\n", __func__, k, a[k], b->s[a[k]]);
		mc_set_spin(ma, b, a[k], -b->s[a[k]]);
	}
	return mc_score(ma, b);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb 0x20(%rbp), %al
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movl -0x20(%rbp), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jae 0x222327
movq 0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movl -0x28(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl $0x3, %ecx
movl %ecx, %ecx
movb $0x0, (%rax,%rcx)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2222f9
movl -0x20(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jae 0x22241e
movq 0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movl -0x28(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
movzbl (%rax,%rcx), %eax
movzbl 0x20(%rbp), %ecx
cmpl %ecx, %eax
jl 0x222358
jmp 0x222410
movq 0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movl -0x28(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl $0x3, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
movq -0x18(%rbp), %rcx
movl -0x28(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
andl $0x7, %ecx
sarl %cl, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x22238f
jmp 0x222410
movq -0x18(%rbp), %rax
movl -0x28(%rbp), %ecx
movl (%rax,%rcx,4), %ecx
andl $0x7, %ecx
movl $0x1, %esi
shll %cl, %esi
movq 0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movl -0x28(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl $0x3, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movq 0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movl -0x28(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
movb (%rax,%rcx), %dl
addb $0x1, %dl
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movl -0x28(%rbp), %ecx
movl (%rax,%rcx,4), %edx
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x18(%rbp), %rcx
movl -0x28(%rbp), %r8d
movl (%rcx,%r8,4), %ecx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
subl %ecx, %eax
movsbl %al, %ecx
callq 0x21d470
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x22232d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x21c580
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: mc_solve_clus(mc_clus_t*)
t_w_t mc_solve_clus(mc_clus_t *bc)
{
	uint32_t off, occ/**, r = 0**/; double rw, sc, sc_opt = mc_score(bc->mg->e, bc->baux);
	memset(bc->lock, 0, bc->n*sizeof(*(bc->lock)));
	while (gen_best_clus(bc, &off, &occ, &rw)) {
		sc = flip_chain(bc->mg->e, bc->baux, bc->cc.nn.a, bc->cc.nn.n, off, occ, &(bc->aux[0].vis), bc->lock, bc->lock_max);
		// if(r%10000) {
		// 	fprintf(stderr, "[M::%s::] rw::%f, sc_opt::%f, sc::%f, off::%u, occ::%u, r::%u\n", 
		// 	__func__, rw, sc_opt, sc, off, occ, r);
		// }
		if(sc < sc_opt) {
			fprintf(stderr, "\nwrong::[M::%s::] rw::%f, sc_opt::%f, sc::%f, off::%u, occ::%u\n", 
			__func__, rw, sc_opt, sc, off, occ);
			// if(occ == 2) {
			// uint32_t k;
			// 	for (k = off; k < off + occ; k++) {
			// 		fprintf(stderr, "[M::%s::] a[%u]::%u, s::%d\n", __func__, k, bc->cc.nn.a[k], bc->baux->s[bc->cc.nn.a[k]]);
			// 	}
			// 	test_flip_sc(bc->mg->e, bc->baux, bc->cc.nn.a+off, occ, &(bc->aux[0].vis));
			// }
		}
		sc_opt = sc; //r++;
	}
	return sc_opt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x28(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rsi
callq 0x21c580
movsd %xmm0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x54(%rax), %eax
movl %eax, %edx
shlq $0x0, %rdx
xorl %esi, %esi
callq 0x2100
movq -0x8(%rbp), %rdi
leaq -0xc(%rbp), %rsi
leaq -0x10(%rbp), %rdx
leaq -0x18(%rbp), %rcx
callq 0x222040
cmpl $0x0, %eax
je 0x222b14
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x28(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl %eax, %ecx
movl -0xc(%rbp), %r8d
movl -0x10(%rbp), %r9d
movq -0x8(%rbp), %rax
movq 0x60(%rax), %r11
movq -0x8(%rbp), %rax
movq 0x48(%rax), %r10
movq -0x8(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movzbl 0x50(%rax), %eax
movl %eax, 0x10(%rsp)
callq 0x2222c0
movsd %xmm0, -0x20(%rbp)
movsd -0x20(%rbp), %xmm1
movsd -0x28(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x222b05
movq 0x1a1509(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movsd -0x18(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
movsd -0x20(%rbp), %xmm2
movl -0xc(%rbp), %ecx
movl -0x10(%rbp), %r8d
leaq 0x16b345(%rip), %rsi    # 0x38de3c
leaq 0x16b37e(%rip), %rdx    # 0x38de7c
movb $0x3, %al
callq 0x22a0
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
jmp 0x222a46
movsd -0x28(%rbp), %xmm0
addq $0x40, %rsp
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: mc_clus_cc(mc_clus_t*)
t_w_t mc_clus_cc(mc_clus_t *bc)
{
	// fprintf(stderr, "+[M::%s::]\n", __func__);
	// double index_time = yak_realtime();
    // uint32_t r = 1;
    t_w_t sc_opt, sc;
	// fprintf(stderr, "-[M::%s::]\n", __func__);
	mc_reset_z(bc->mg->e, bc->baux);
	// fprintf(stderr, "*[M::%s::]\n", __func__);
	sc_opt = mc_score(bc->mg->e, bc->baux); 
	// fprintf(stderr, "[M::%s::] sc_opt: %f\n", __func__, sc_opt);
	while (1) {
        sc = mc_solve_clus(bc);
        // fprintf(stderr, "[M::%s::# round: %u] sc_opt: %f, sc: %f\n", __func__, r, sc_opt, sc);
        if(sc <= (sc_opt+0.0000001)) break;
        sc_opt = sc; //r++;
    }
    // fprintf(stderr, "[M::%s::%.3f] ==> round %u\n", __func__, yak_realtime()-index_time, r);
	return sc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x28(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rsi
callq 0x21c700
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x28(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rsi
callq 0x21c580
movsd %xmm0, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x222a00
movsd %xmm0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm1
movsd 0x16ad62(%rip), %xmm0   # 0x38d8e0
addsd -0x10(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x222b8b
jmp 0x222b97
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
jmp 0x222b63
movsd -0x18(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: mb_perturb(mc_opt_t const*, mb_g_t*, mb_svaux_t*)
static void mb_perturb(const mc_opt_t *opt, mb_g_t *mbg, mb_svaux_t *b)
{
	uint32_t i;
	for (i = 0; i < b->cc_size; ++i) {
		uint32_t k = (uint32_t)mbg->e->cc[b->cc_off + i];///node id
		double y;
		y = kr_drand_r(&b->x);
		if (y < opt->f_perturb)
			mb_flip_spin(mbg, b, k);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jae 0x223f85
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x8(%rcx), %ecx
addl -0x1c(%rbp), %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x22c1a0
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm1
movq -0x8(%rbp), %rax
movsd 0x10(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x223f78
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x20(%rbp), %edx
callq 0x22c370
jmp 0x223f7a
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x223f1b
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: mb_perturb_node(mc_opt_t const*, mb_g_t*, mb_svaux_t*, int)
static void mb_perturb_node(const mc_opt_t *opt, mb_g_t *mbg, mb_svaux_t *b, int32_t bfs_round)
{
	uint32_t i, k, n_bfs = 0;
	k = (uint32_t)(kr_drand_r(&b->x) * b->cc_size + .499);
	if(k >= b->cc_size) k = b->cc_size - 1;
	k = (uint32_t)mbg->e->cc[b->cc_off + k];///node id
	n_bfs = mb_bfs(mbg->e, b, k, bfs_round, (int32_t)(b->cc_size * opt->f_perturb));
	for (i = 0; i < n_bfs; ++i)
		mb_flip_spin(mbg, b, b->bfs[i]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x22c1a0
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
cvtsi2sd %rax, %xmm1
mulsd %xmm1, %xmm0
movsd 0x15b071(%rip), %xmm1   # 0x37f040
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jb 0x223ff4
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
subl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x8(%rcx), %ecx
movl -0x24(%rbp), %edx
addl %edx, %ecx
movl (%rax,%rcx,8), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
movl -0x24(%rbp), %edx
movl -0x1c(%rbp), %ecx
movl 0xc(%rsi), %eax
cvtsi2sd %rax, %xmm0
movq -0x8(%rbp), %rax
mulsd 0x10(%rax), %xmm0
cvttsd2si %xmm0, %r8d
callq 0x22c790
movl %eax, -0x28(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x28(%rbp), %eax
jae 0x224077
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %edx
callq 0x22c370
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x224049
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: mc_set_by_mbg(mc_g_t*, mb_g_t*)
void mc_set_by_mbg(mc_g_t *mg, mb_g_t *mbg)
{
	// t_w_t z0 = mc_score_all_advance(mg->e, mg->s.a);
	// t_w_t z1 = mb_score_all_advance(mg->e, mbg);
	// if(z0 >= z1) return;
	uint32_t i, k, qn, *a[2], a_n[2];
	int8_t s[2];
	for (i = 0; i < mbg->u->u.n; i++)
	{
		decode_mb_node(mbg, i, &(a[0]), &(a_n[0]), &(s[0]), &(a[1]), &(a_n[1]), &(s[1]));
		for (k = 0; k < a_n[0]; k++)
		{
			qn = a[0][k];
			if(mg->s.a[qn] == 0) continue;
			mg->s.a[qn] = s[0];
		}

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x30(%rcx), %rax
jae 0x225220
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
leaq -0x30(%rbp), %rdx
leaq -0x38(%rbp), %rcx
leaq -0x3a(%rbp), %r8
leaq -0x30(%rbp), %r9
addq $0x8, %r9
leaq -0x38(%rbp), %r10
addq $0x4, %r10
leaq -0x3a(%rbp), %rax
addq $0x1, %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x22d100
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x38(%rbp), %eax
jae 0x2251c2
movq -0x30(%rbp), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x1c(%rbp), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x2251a6
jmp 0x2251b7
movb -0x3a(%rbp), %dl
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x1c(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x22517b
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x34(%rbp), %eax
jae 0x225210
movq -0x28(%rbp), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x1c(%rbp), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x2251f4
jmp 0x225205
movb -0x39(%rbp), %dl
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x1c(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x2251c9
jmp 0x225212
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x225127
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x30(%rcx), %rax
jae 0x2253c9
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x30(%rbp), %rdx
leaq -0x18(%rbp), %rcx
leaq -0x30(%rbp), %r9
addq $0x8, %r9
leaq -0x18(%rbp), %rax
addq $0x4, %rax
xorl %r8d, %r8d
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x22d100
movl -0x18(%rbp), %eax
addl -0x14(%rbp), %eax
cmpl $0x1, %eax
ja 0x2252db
jmp 0x2253bb
movq 0x19ecfe(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x18(%rbp), %ecx
leaq 0x168be3(%rip), %rdx    # 0x38ded2
leaq 0x16b306(%rip), %rax    # 0x3905fc
cmpl $0x1, %ecx
cmovaq %rax, %rdx
leaq 0x168bc6(%rip), %rsi    # 0x38deca
movb $0x0, %al
callq 0x22a0
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x18(%rbp), %eax
jae 0x22534a
movq 0x19ecbf(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x30(%rbp), %rax
movl -0x10(%rbp), %ecx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
leaq 0x168ba1(%rip), %rsi    # 0x38ded9
movb $0x0, %al
callq 0x22a0
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x225312
movq 0x19ec8f(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x18(%rbp), %ecx
leaq 0x168b74(%rip), %rdx    # 0x38ded2
leaq 0x16b297(%rip), %rax    # 0x3905fc
cmpl $0x1, %ecx
cmovaq %rax, %rdx
leaq 0x168b72(%rip), %rsi    # 0x38dee5
movb $0x0, %al
callq 0x22a0
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x2253b9
movq 0x19ec50(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movl -0x10(%rbp), %ecx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
leaq 0x1645f7(%rip), %rsi    # 0x38999e
movb $0x0, %al
callq 0x22a0
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x225381
jmp 0x2253bb
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x225283
addq $0x40, %rsp
popq %rbp
retq
nop
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x225ac8
jmp 0x225b74
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rdi
callq 0x23f890
movq -0x8(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0x225b0b
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rax
movq 0x10(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x2210
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x58(%rcx), %eax
jae 0x225b44
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
callq 0x2210
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x225b12
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rdi
callq 0x2210
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movb %r8b, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movb %al, -0x21(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x10(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x226899
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl -0x28(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x21, %rcx
movzbl (%rax,%rcx), %edx
orl $0x8, %edx
movb %dl, (%rax,%rcx)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl -0x28(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x21, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x226804
jmp 0x22688b
movsbl -0x21(%rbp), %eax
cmpl $0x0, %eax
jne 0x226857
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl -0x28(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x21, %rcx
movzbl (%rax,%rcx), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x226855
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl -0x28(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x21, %rcx
movzbl (%rax,%rcx), %edx
orl $0x1, %edx
movb %dl, (%rax,%rcx)
jmp 0x22688b
movsbl -0x21(%rbp), %ecx
movl $0x2, %esi
movl $0x1, %eax
cmpl $0x0, %ecx
cmovgl %eax, %esi
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl -0x28(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x21, %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2267aa
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x14(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x3c(%rbp)
movq $0x0, -0x50(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jae 0x226f3a
movq -0x38(%rbp), %rax
movl -0x40(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rax
movl -0x40(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl %eax, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x30(%rbp), %rax
movl -0x44(%rbp), %ecx
movsbl (%rax,%rcx), %eax
movq -0x30(%rbp), %rcx
movl -0x48(%rbp), %edx
movsbl (%rcx,%rdx), %ecx
imull %ecx, %eax
cmpl $-0x1, %eax
je 0x226e69
jmp 0x226f2c
movq -0x20(%rbp), %rdi
movl -0x44(%rbp), %esi
movl -0x48(%rbp), %edx
leaq -0x50(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x110ee0
cmpq $0x0, -0x50(%rbp)
je 0x226eba
movq -0x50(%rbp), %rax
movsd 0x20(%rax), %xmm0
movq -0x38(%rbp), %rax
movl -0x40(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
ucomisd 0x8(%rax), %xmm0
jne 0x226eba
jp 0x226eba
movq -0x50(%rbp), %rax
movb 0x28(%rax), %cl
andb $0x7f, %cl
orb $0x0, %cl
movb %cl, 0x28(%rax)
jmp 0x226f0b
movq -0x20(%rbp), %rdi
movl -0x48(%rbp), %esi
movl -0x44(%rbp), %edx
leaq -0x50(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x110ee0
cmpq $0x0, -0x50(%rbp)
je 0x226f09
movq -0x50(%rbp), %rax
movsd 0x20(%rax), %xmm0
movq -0x38(%rbp), %rax
movl -0x40(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
ucomisd 0x8(%rax), %xmm0
jne 0x226f09
jp 0x226f09
movq -0x50(%rbp), %rax
movb 0x28(%rax), %cl
andb $0x7f, %cl
orb $0x0, %cl
movb %cl, 0x28(%rax)
jmp 0x226f0b
cmpq $0x0, -0x50(%rbp)
jne 0x226f2a
movq 0x19d0c7(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x167066(%rip), %rsi    # 0x38df89
movb $0x0, %al
callq 0x22a0
jmp 0x226f2c
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x226e06
addq $0x50, %rsp
popq %rbp
retq
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x172143(%rip), %rsi    # 0x3993d2
callq 0x2200
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl $0x20, %esi
movl $0x1, %edx
callq 0x2400
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x2400
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movq -0x20(%rbp), %rcx
movl $0x1, %esi
callq 0x2400
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
addq $0x38, %rdi
movq -0x20(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x2400
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
addq $0x18, %rdi
movq -0x20(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x2400
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x28(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x18(%rax), %rdx
movq -0x20(%rbp), %rcx
movl $0x10, %esi
callq 0x2400
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x20(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x2400
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rdx
movq -0x20(%rbp), %rcx
movl $0x8, %esi
callq 0x2400
movq -0x20(%rbp), %rdi
callq 0x21a0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x2273a0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
leaq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0x2255a0
leaq -0x30(%rbp), %rdi
callq 0x218f10
movl $0x1, %edi
callq 0x2240
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: print_hap_s(signed char*, unsigned int)
void print_hap_s(int8_t *s, uint32_t sn)
{
	fprintf(stderr, "\n[M::%s]\n", __func__);
	uint32_t i;
	for (i = 0; i < sn; i++)
	{
		fprintf(stderr,"utg%.6ul\t", i + 1);
		if(s[i] > 0) fprintf(stderr, "h%u\n", 1);
		else if(s[i] < 0) fprintf(stderr, "h%u\n", 2);
		else fprintf(stderr,"\n");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq 0x19c94a(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x165a8c(%rip), %rsi    # 0x38d12c
leaq 0x1668ee(%rip), %rdx    # 0x38df95
movb $0x0, %al
callq 0x22a0
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jae 0x227767
movq 0x19c918(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x10(%rbp), %edx
addl $0x1, %edx
leaq 0x1659ee(%rip), %rsi    # 0x38d0c6
movb $0x0, %al
callq 0x22a0
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jle 0x22770e
movq 0x19c8ea(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x1668a1(%rip), %rsi    # 0x38dfa1
movl $0x1, %edx
movb $0x0, %al
callq 0x22a0
jmp 0x227757
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jge 0x22773d
movq 0x19c8bb(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x166872(%rip), %rsi    # 0x38dfa1
movl $0x2, %edx
movb $0x0, %al
callq 0x22a0
jmp 0x227755
movq 0x19c89c(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x15f2da(%rip), %rsi    # 0x386a28
movb $0x0, %al
callq 0x22a0
jmp 0x227757
jmp 0x227759
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2276b5
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: dump_debug_phasing(char const*, kv_u_trans_t*, ma_ug_t*, asg_t*, double, unsigned int, signed char*, unsigned int, bubble_type*, kv_u_trans_t*)
void dump_debug_phasing(const char* fn, kv_u_trans_t *ta, ma_ug_t *ug, asg_t *read_g, double f_rate, 
uint32_t renew_s, int8_t *s, uint32_t is_sys, bubble_type* bub, kv_u_trans_t *ref)
{
	fprintf(stderr, "\n[M::%s]\n", __func__);
    char *buf = (char*)calloc(strlen(fn) + 50, 1);
    sprintf(buf, "%s.hic.dbg.dump.bin", fn);
    FILE *fp = fopen(buf, "w");

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

	fclose(fp);
    free(buf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movsd %xmm0, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq %r9, -0x38(%rbp)
movq 0x19c679(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x1657bb(%rip), %rsi    # 0x38d12c
leaq 0x166774(%rip), %rdx    # 0x38e0ec
movb $0x0, %al
callq 0x22a0
movq -0x8(%rbp), %rdi
callq 0x20a0
movq %rax, %rdi
addq $0x32, %rdi
movl $0x1, %esi
callq 0x2140
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x8(%rbp), %rdx
leaq 0x166712(%rip), %rsi    # 0x38e0be
movb $0x0, %al
callq 0x2050
movq -0x40(%rbp), %rdi
leaq 0x171a14(%rip), %rsi    # 0x3993d2
callq 0x2200
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x22ae80
movq -0x18(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x22b060
movq -0x20(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x22af10
movq -0x48(%rbp), %rcx
leaq -0x28(%rbp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x2400
movq -0x48(%rbp), %rcx
leaq -0x2c(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x2400
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %edx
movq -0x48(%rbp), %rcx
movl $0x1, %esi
callq 0x2400
movq -0x48(%rbp), %rcx
leaq 0x10(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x2400
movq 0x18(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x22b1a0
movq 0x20(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x22ae80
movq -0x48(%rbp), %rsi
leaq 0x19d852(%rip), %rdi    # 0x3c52d0
callq 0x22b2e0
movq -0x48(%rbp), %rdi
callq 0x21a0
movq -0x40(%rbp), %rdi
callq 0x2210
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movl -0x4(%rbp), %eax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jne 0x227b96
movl $0x0, -0x28(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x227b0b
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %ecx
subl $0x1, %ecx
movl $0x1, %eax
shll %cl, %eax
orl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x227ad8
jmp 0x227b0d
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x227b74
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x227b3b
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
shlq %rax
movq %rax, -0x30(%rbp)
jmp 0x227b46
movl $0x2, %eax
movq %rax, -0x30(%rbp)
jmp 0x227b46
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
shlq $0x2, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0x28(%rbp), %edx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rsi
movq 0x8(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x8(%rsi)
movl %edx, (%rax,%rcx,4)
jmp 0x227bfa
movq -0x20(%rbp), %rax
movl -0x4(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movq -0x20(%rbp), %rax
movslq -0x4(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x20(%rbp), %rax
movslq -0x4(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl -0x8(%rbp), %ecx
subl -0xc(%rbp), %ecx
addl -0x4(%rbp), %ecx
cmpl %ecx, %eax
jg 0x227bf8
movl -0x4(%rbp), %edi
addl $0x1, %edi
movl -0x8(%rbp), %esi
movl -0xc(%rbp), %edx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
callq 0x227aa0
movq -0x20(%rbp), %rax
movslq -0x4(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
jmp 0x227bb4
jmp 0x227bfa
addq $0x30, %rsp
popq %rbp
retq
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movw %dx, %ax
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq $0x0, -0x20(%rbp)
movzwl -0x12(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
movl $0x4, %esi
callq 0x2140
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x1, %edi
movl $0x38, %esi
callq 0x2140
movq %rax, -0x28(%rbp)
movl -0x4(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movw -0x12(%rbp), %cx
movq -0x28(%rbp), %rax
movw %cx, 0x34(%rax)
movq -0x28(%rbp), %rax
movzwl 0x34(%rax), %eax
movl %eax, %edi
movl $0x18, %esi
callq 0x2140
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x28(%rax)
movzwl -0x12(%rbp), %eax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x28(%rbp), %rcx
movzwl 0x34(%rcx), %ecx
cmpl %ecx, %eax
jae 0x227d4d
movzwl -0x12(%rbp), %edi
movl -0x18(%rbp), %esi
addl $0x1, %esi
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rdx
movl -0x18(%rbp), %eax
imulq $0x18, %rax, %rax
addq %rax, %rdx
movq -0x20(%rbp), %rcx
callq 0x227c00
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x227d0e
movzwl -0x12(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x28(%rbp), %rax
movl 0x30(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x30(%rax)
movq -0x20(%rbp), %rdi
callq 0x2210
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x227dad
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x227db2
jmp 0x227e67
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x20(%rcx), %rax
jae 0x227df1
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x2210
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x227db9
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x10(%rax)
je 0x227e5b
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq 0x28(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq 0x30(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x2210
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x1, %edi
movl $0x10, %esi
callq 0x2140
movq %rax, -0x18(%rbp)
movl -0x4(%rbp), %eax
movl -0x8(%rbp), %ecx
shll %cl, %eax
movl %eax, %eax
movl %eax, %edi
shlq $0x3, %rdi
callq 0x2270
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl -0x4(%rbp), %edx
movl -0x8(%rbp), %ecx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jae 0x22896d
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl -0xc(%rbp), %ecx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x22893f
movl -0x8(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rdi
addq $0x40, %rdi
callq 0x228990
movq -0x8(%rbp), %rdi
addq $0x48, %rdi
callq 0x228990
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rdi
callq 0x2210
addq $0x10, %rsp
popq %rbp
retq
nop
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movzwl 0x8(%rcx), %ecx
movzwl 0x4(%rax,%rcx,2), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x20, -0x14(%rbp)
jae 0x228ccd
movl -0x20(%rbp), %eax
movl -0x14(%rbp), %ecx
shrl %cl, %eax
andl $0x1, %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x228cab
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
je 0x228cfa
movq 0x19b304(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
movl -0x18(%rbp), %ecx
movl -0x1c(%rbp), %r8d
leaq 0x1652ed(%rip), %rsi    # 0x38dfde
movb $0x0, %al
callq 0x22a0
jmp 0x228d1d
movq 0x19b2df(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
movl -0x18(%rbp), %ecx
movl -0x1c(%rbp), %r8d
leaq 0x1652e3(%rip), %rsi    # 0x38dff9
movb $0x0, %al
callq 0x22a0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jae 0x228e84
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
addl -0x14(%rbp), %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x18(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl 0x8(%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0x228ddd
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq (%rax), %rax
movl -0x18(%rbp), %edx
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rcx
movl 0x8(%rcx), %ecx
shll %cl, %edx
movl %edx, %ecx
addl -0x20(%rbp), %ecx
movl %ecx, %ecx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x228da0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x18(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x24(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0x228e74
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x1c(%rbp), %ecx
addl -0x20(%rbp), %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq (%rax), %rax
movl -0x18(%rbp), %edx
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rcx
movl 0x8(%rcx), %ecx
shll %cl, %edx
movl %edx, %ecx
movq -0x10(%rbp), %rdx
movq 0x50(%rdx), %rdx
movl -0x34(%rbp), %esi
shlq $0x5, %rsi
addq %rsi, %rdx
addl (%rdx), %ecx
movl %ecx, %ecx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x228df6
jmp 0x228e76
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x228d43
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: mcgg_score(mc_match_t const*, mcgg_svaux_t*)
t_w_t mcgg_score(const mc_match_t *ma, mcgg_svaux_t *b)
{
	uint32_t i, j, n = (1<<b->z->hapN);
	t_w_t z = 0;
	for (i = 0; i < b->cc_size; ++i) {
		uint32_t k = (uint32_t)ma->cc[b->cc_off + i];///uid
		for (j = 0; j < n; j++)
		{
			z += ((b->s[k].s&((mcg_node_t)j))?-mcp_de(*(b->z), k, j):mcp_de(*(b->z), k, j));
		}		
	}
	return z;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl 0x8(%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x1c(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jae 0x228fb8
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
addl -0x14(%rbp), %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x2c(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x228fa8
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movl -0x2c(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl -0x18(%rbp), %eax
cmpl $0x0, %eax
je 0x228f5f
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq (%rax), %rax
movl -0x2c(%rbp), %edx
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rcx
movl 0x8(%rcx), %ecx
shll %cl, %edx
movl %edx, %ecx
addl -0x18(%rbp), %ecx
movl %ecx, %ecx
movsd (%rax,%rcx,8), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x38(%rbp)
jmp 0x228f8b
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq (%rax), %rax
movl -0x2c(%rbp), %edx
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rcx
movl 0x8(%rcx), %ecx
shll %cl, %edx
movl %edx, %ecx
addl -0x18(%rbp), %ecx
movl %ecx, %ecx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x38(%rbp), %xmm0
addsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x228ef2
jmp 0x228faa
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x228ec0
movsd -0x28(%rbp), %xmm0
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: kr_drand_node(unsigned long, mcgg_svaux_t*, unsigned short*)
static inline mcg_node_t kr_drand_node(uint64_t id, mcgg_svaux_t *b, uint16_t *hc)
{
	uint16_t hn = b->s[id].h[0]-1;
	if(hc) (*hc) = 0;
	b->x = kr_splitmix64(b->x);
	if(b->s[id].h[1] != (uint16_t)-1)
	{
		union { uint64_t i; double d; } u;
		u.i = 0x3FFULL << 52 | (b->x) >> 12;
		if((u.d - 1.0) > b->s[id].hw[0])
		{
			hn = b->s[id].h[1]-1;
			if(hc) (*hc) = 1;
		}
	} 
    return b->m[hn].a[(b->x)%b->m[hn].n];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x8(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movzwl 0x4(%rax), %eax
subl $0x1, %eax
movw %ax, -0x1a(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2294e2
movq -0x18(%rbp), %rax
movw $0x0, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x21cf60
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x8(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movzwl 0x6(%rax), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x22958f
movq -0x10(%rbp), %rax
movq (%rax), %rax
shrq $0xc, %rax
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
movsd 0x158ac1(%rip), %xmm1   # 0x382000
subsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x8(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
ucomisd 0x10(%rax), %xmm0
jbe 0x22958d
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x8(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movzwl 0x6(%rax), %eax
subl $0x1, %eax
movw %ax, -0x1a(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x22958b
movq -0x18(%rbp), %rax
movw $0x1, (%rax)
jmp 0x22958d
jmp 0x22958f
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movzwl -0x1a(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x60(%rcx), %rcx
movzwl -0x1a(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
xorl %edx, %edx
divq 0x8(%rcx)
movq -0x30(%rbp), %rax
movl (%rax,%rdx,4), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: print_mcgg_node(mc_match_t const*, mcgg_svaux_t*, unsigned int)
void print_mcgg_node(const mc_match_t *ma, mcgg_svaux_t *b, uint32_t id)
{
	fprintf(stderr, "[M::%s::utg%.6ul-hap%u]\n", __func__, id, b->s[id].s);
	w_t w[128];
	uint32_t o, n, i, hn = (1<<b->z->hapN);
	for (i = 0; i < hn; i++) w[i] = 0;
	o = ma->idx.a[id] >> 32;
    n = (uint32_t)ma->idx.a[id];
	for (i = 0; i < n; ++i) w[b->s[ma_y(ma->ma.a[o + i])].s] += ma->ma.a[o + i].w;
	for (i = 0; i < hn; i++) fprintf(stderr, "w[%u]-%f, z[%u]-%f\n", i, w[i], i, mcp_de(*(b->z), id, i));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x440, %rsp            # imm = 0x440
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq 0x19a783(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movl -0x14(%rbp), %edx
shlq $0x5, %rdx
addq %rdx, %rax
movl (%rax), %r8d
leaq 0x1643e5(%rip), %rsi    # 0x38dc64
leaq 0x16478d(%rip), %rdx    # 0x38e013
movb $0x0, %al
callq 0x22a0
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl 0x8(%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x430(%rbp)
movl $0x0, -0x42c(%rbp)
movl -0x42c(%rbp), %eax
cmpl -0x430(%rbp), %eax
jae 0x2298e0
movl -0x42c(%rbp), %eax
xorps %xmm0, %xmm0
movsd %xmm0, -0x420(%rbp,%rax,8)
movl -0x42c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x42c(%rbp)
jmp 0x2298af
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, -0x424(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x428(%rbp)
movl $0x0, -0x42c(%rbp)
movl -0x42c(%rbp), %eax
cmpl -0x428(%rbp), %eax
jae 0x2299a1
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x424(%rbp), %ecx
addl -0x42c(%rbp), %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x424(%rbp), %edx
addl -0x42c(%rbp), %edx
movl %edx, %edx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
movl %ecx, %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
addsd -0x420(%rbp,%rax,8), %xmm0
movsd %xmm0, -0x420(%rbp,%rax,8)
movl -0x42c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x42c(%rbp)
jmp 0x229918
movl $0x0, -0x42c(%rbp)
movl -0x42c(%rbp), %eax
cmpl -0x430(%rbp), %eax
jae 0x229a34
movq 0x19a620(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x42c(%rbp), %edx
movl -0x42c(%rbp), %eax
movsd -0x420(%rbp,%rax,8), %xmm0
movl -0x42c(%rbp), %eax
movl %eax, -0x434(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq (%rax), %rax
movl -0x14(%rbp), %esi
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rcx
movl 0x8(%rcx), %ecx
shll %cl, %esi
movl -0x434(%rbp), %ecx
addl -0x42c(%rbp), %esi
movl %esi, %esi
movsd (%rax,%rsi,8), %xmm1
leaq 0x164272(%rip), %rsi    # 0x38dc8b
movb $0x2, %al
callq 0x22a0
movl -0x42c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x42c(%rbp)
jmp 0x2299ab
addq $0x440, %rsp            # imm = 0x440
popq %rbp
retq
nopl (%rax)