LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: mcgg_optimize_local(mc_opt_t const*, mc_match_t const*, mcgg_svaux_t*, unsigned int*)
static t_w_t mcgg_optimize_local(const mc_opt_t *opt, const mc_match_t *ma, mcgg_svaux_t *b, uint32_t *n_iter)
{
	uint32_t i, n_flip = 0;
	int32_t n_iter_local = 0;
	mcg_node_t ms;
	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
			ms = get_max_m(k, b);
			if(ms != b->s[k].s)
			{
				mcgg_set_spin(ma, b, k, ms, __func__);///no need to change the score of k itself
				// debug_hapM(&(b->s[k]), "s4");
				++n_flip;
			}
		}
		++n_iter_local;
		if (n_flip == 0) break;
	}

	return mcgg_score(ma, b);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x229ee5
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, %edi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0x22c0c0
movl $0x0, -0x28(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jae 0x229ecf
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x24(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, %edi
movq -0x18(%rbp), %rsi
callq 0x22c900
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x18(%rbp), %rcx
movq 0x50(%rcx), %rcx
movl -0x34(%rbp), %edx
shlq $0x5, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
je 0x229ec2
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x34(%rbp), %edx
movl -0x30(%rbp), %ecx
leaq 0x16426e(%rip), %r8     # 0x38e122
callq 0x22cca0
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x229ec4
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x229e58
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x28(%rbp)
jne 0x229ee0
jmp 0x229ee5
jmp 0x229e16
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x228e90
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: mcgg_perturb(mc_opt_t const*, mc_match_t const*, mcgg_svaux_t*)
static void mcgg_perturb(const mc_opt_t *opt, 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];///node id
        double y;
        y = kr_drand_r(&b->x);
        if (y < opt->f_perturb)
			mcgg_set_spin(ma, b, k, kr_drand_node_new(k, b), __func__);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %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 0x229fb5
movq -0x10(%rbp), %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 0x229fa5
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x20(%rbp), %eax
movl %eax, %edi
movq -0x18(%rbp), %rsi
callq 0x22cdd0
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x2c(%rbp), %edx
movl %eax, %ecx
leaq 0x164196(%rip), %r8     # 0x38e136
callq 0x22cca0
jmp 0x229fa7
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x229f1b
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: mcgg_perturb_node(mc_opt_t const*, mc_match_t const*, mcgg_svaux_t*, int)
static void mcgg_perturb_node(const mc_opt_t *opt, const mc_match_t *ma, mcgg_svaux_t *b, int32_t bfs_round)
{
	uint32_t i, k, n_bfs = 0;
	k = (uint32_t)(kr_drand_r(&b->x) * b->cc_size + .499);
	if(k >= b->cc_size) k = b->cc_size - 1;
	k = (uint32_t)ma->cc[b->cc_off + k];///node id
	n_bfs = mcgg_bfs(ma, b, k, bfs_round, (int32_t)(b->cc_size * opt->f_perturb));
	for (i = 0; i < n_bfs; ++i)
		mcgg_set_spin(ma, b, b->bfs[i], kr_drand_node_new(b->bfs[i], b), __func__);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %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 0x155041(%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 0x22a024
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
subl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %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), %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 0x22cf90
movl %eax, -0x28(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x28(%rbp), %eax
jae 0x22a0d7
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, %edi
movq -0x18(%rbp), %rsi
callq 0x22cdd0
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x2c(%rbp), %edx
movl %eax, %ecx
leaq 0x16407c(%rip), %r8     # 0x38e143
callq 0x22cca0
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x22a071
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: mc_solve_core_genral(mc_opt_t const*, mc_gg_t*, unsigned int)
void mc_solve_core_genral(const mc_opt_t *opt, mc_gg_t *mg, uint32_t hapN)
{
	double index_time = yak_realtime();
	uint32_t st, i;
	mcgg_svaux_t *b;
	mc_g_cc(mg->e);
	b = mcgg_svaux_init(mg, opt->seed, hapN);
	// if(VERBOSE_CUT)
	// {
	// 	fprintf(stderr, "\n\n\n\n\n*************beg-[M::%s::score->%f] ==> Partition\n", __func__, mc_score_all_advance(mg->e, mg->s.a));
	// }
	
	for (st = 0, i = 1; i <= mg->e->n_seq; ++i) {
		if (i == mg->e->n_seq || mg->e->cc[st]>>32 != mg->e->cc[i]>>32) {
			mcgg_solve_cc(opt, mg, b, st, i - st);
			st = i;
		}
	}

	// if(VERBOSE_CUT)
	// {
	// 	fprintf(stderr, "##############end-[---M::%s::score->%f] ==> Partition\n", __func__, mc_score_all(mg->e, b));
	// }
	///mc_write_info(g, b);
	mcgg_svaux_destroy(b);
	fprintf(stderr, "[M::%s::%.3f] ==> Partition\n", __func__, yak_realtime()-index_time);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
callq 0x1b7ca0
movsd %xmm0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x21b680
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movl -0x14(%rbp), %edx
callq 0x2289d0
movq %rax, -0x30(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x1, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
cmpl 0x38(%rcx), %eax
ja 0x22a1b5
movl -0x28(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
cmpl 0x38(%rcx), %eax
je 0x22a183
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x30(%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq 0x30(%rcx), %rcx
movl -0x28(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
cmpq %rcx, %rax
je 0x22a1a5
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
movl -0x24(%rbp), %ecx
movl -0x28(%rbp), %r8d
subl -0x24(%rbp), %r8d
callq 0x229a40
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x22a1a7
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x22a130
movq -0x30(%rbp), %rdi
callq 0x228be0
movq 0x199e1b(%rip), %rax    # 0x3c3fe0
movq (%rax), %rax
movq %rax, -0x38(%rbp)
callq 0x1b7ca0
movq -0x38(%rbp), %rdi
subsd -0x20(%rbp), %xmm0
leaq 0x163d0b(%rip), %rsi    # 0x38deec
leaq 0x163e7a(%rip), %rdx    # 0x38e062
movb $0x1, %al
callq 0x22a0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: print_mcb(mc_gg_t*)
void print_mcb(mc_gg_t *mg)
{
	uint32_t i, k, m;
	mcg_node_t t;
	mcb_t *p;
	for (i = 0; i < mg->m.n; i++)
	{
		p = mcb_pat(*mg, i + 1);
		fprintf(stderr, "# haplotypes: %u, # combination: %u\n", i+1, (uint32_t)p->n);
		for (k = 0; k < p->n; k++)
		{
			t = p->a[k];
			for (m = 0; m < 32; m++)
			{
				if((t>>m)&1) fprintf(stderr, "%u\t", m);
			}
			fprintf(stderr, "\n");
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x22a309
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
subl $0x1, %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq 0x199d97(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0xc(%rbp), %edx
addl $0x1, %edx
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, %ecx
leaq 0x163e14(%rip), %rsi    # 0x38e077
movb $0x0, %al
callq 0x22a0
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x22a2f9
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl -0x10(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x20, -0x14(%rbp)
jae 0x22a2d3
movl -0x18(%rbp), %eax
movl -0x14(%rbp), %ecx
shrl %cl, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x22a2c6
movq 0x199d2e(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x14(%rbp), %edx
leaq 0x15cb3d(%rip), %rsi    # 0x386dfc
movb $0x0, %al
callq 0x22a0
jmp 0x22a2c8
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x22a295
movq 0x199d06(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x15c744(%rip), %rsi    # 0x386a28
movb $0x0, %al
callq 0x22a0
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x22a271
jmp 0x22a2fb
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x22a213
addq $0x20, %rsp
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: print_hap_p(kv_gg_status*)
void print_hap_p(kv_gg_status *s)
{
	fprintf(stderr, "\n[M::%s]\n", __func__);
	uint32_t i, h;
	mcg_node_t m;
	for (i = 0; i < s->n; i++)
	{
		fprintf(stderr,"utg%.6ul\t", i + 1);
		m = s->a[i].s; h = 0;
		while (m) {
			h++;
			if(m&1) fprintf(stderr, "h%u\t", h);
			m>>=1;
		}
		fprintf(stderr,"\n");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq 0x199cbd(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x162dff(%rip), %rsi    # 0x38d12c
leaq 0x163d68(%rip), %rdx    # 0x38e09c
movb $0x0, %al
callq 0x22a0
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x22a3f3
movq 0x199c86(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0xc(%rbp), %edx
addl $0x1, %edx
leaq 0x162d5c(%rip), %rsi    # 0x38d0c6
movb $0x0, %al
callq 0x22a0
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0xc(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x22a3cd
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movl -0x14(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x22a3c3
movq 0x199c31(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x10(%rbp), %edx
leaq 0x163cec(%rip), %rsi    # 0x38e0a8
movb $0x0, %al
callq 0x22a0
movl -0x14(%rbp), %eax
shrl %eax
movl %eax, -0x14(%rbp)
jmp 0x22a38e
movq 0x199c0c(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x15c64a(%rip), %rsi    # 0x386a28
movb $0x0, %al
callq 0x22a0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x22a342
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: write_mc_gg_dump(kv_u_trans_t*, unsigned int, kv_gg_status*, unsigned short, char const*)
void write_mc_gg_dump(kv_u_trans_t *ta, uint32_t un, kv_gg_status *s, uint16_t hapN, const char* fn)
{
	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");

	fwrite(&ta->n, sizeof(ta->n), 1, fp);
    fwrite(ta->a, sizeof(u_trans_t), ta->n, fp);

    fwrite(&ta->idx.n, sizeof(ta->idx.n), 1, fp);
    fwrite(ta->idx.a, sizeof(uint64_t), ta->idx.n, fp);

	fwrite(&un, sizeof(un), 1, fp);

	fwrite(&(s->n), sizeof(s->n), 1, fp);
    fwrite(s->a, sizeof(mc_gg_status), s->n, fp);

	fwrite(&hapN, sizeof(hapN), 1, fp);

	fclose(fp);
    free(buf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movw %cx, %ax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movw %ax, -0x1a(%rbp)
movq %r8, -0x28(%rbp)
movq 0x199bbb(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x162cfd(%rip), %rsi    # 0x38d12c
leaq 0x163c77(%rip), %rdx    # 0x38e0ad
movb $0x0, %al
callq 0x22a0
movq -0x28(%rbp), %rdi
callq 0x20a0
movq %rax, %rdi
addq $0x32, %rdi
movl $0x1, %esi
callq 0x2140
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x163c54(%rip), %rsi    # 0x38e0be
movb $0x0, %al
callq 0x2050
movq -0x30(%rbp), %rdi
leaq 0x16ef56(%rip), %rsi    # 0x3993d2
callq 0x2200
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x2400
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rdx
movq -0x38(%rbp), %rcx
movl $0x30, %esi
callq 0x2400
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
movq -0x38(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x2400
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x38(%rbp), %rcx
movl $0x8, %esi
callq 0x2400
movq -0x38(%rbp), %rcx
leaq -0xc(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x2400
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
movq -0x38(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x2400
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x38(%rbp), %rcx
movl $0x20, %esi
callq 0x2400
movq -0x38(%rbp), %rcx
leaq -0x1a(%rbp), %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x2400
movq -0x38(%rbp), %rdi
callq 0x21a0
movq -0x30(%rbp), %rdi
callq 0x2210
addq $0x40, %rsp
popq %rbp
retq
// File: 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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %r8
leaq -0x18(%rbp), %rdi
leaq -0x24(%rbp), %rsi
leaq -0x20(%rbp), %rdx
leaq -0x26(%rbp), %rcx
callq 0x22a570
cmpl $0x0, %eax
je 0x22ad41
cmpl $0x0, -0x10(%rbp)
je 0x22ad1e
leaq 0x199b73(%rip), %rax    # 0x3c47f8
movl 0x1d0(%rax), %esi
leaq 0x199b66(%rip), %rax    # 0x3c47f8
movsd 0x1d8(%rax), %xmm0
leaq 0x199b57(%rip), %rax    # 0x3c47f8
movq 0x1c8(%rax), %rdx
leaq -0x48(%rbp), %rdi
callq 0x216710
movq $0x0, -0x50(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x22a820
movq %rax, -0x50(%rbp)
leaq 0x199b24(%rip), %rax    # 0x3c47f8
movq 0x10(%rax), %rdi
callq 0x163c00
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0xfd250
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq $0x138, %rdx            # imm = 0x138
leaq -0x48(%rbp), %rdi
movl $0x1, %ecx
callq 0x2253d0
movq -0x50(%rbp), %rsi
leaq -0x48(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0x2255a0
jmp 0x22ad3f
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x20(%rbp), %rdx
movw -0x26(%rbp), %cx
movl -0xc(%rbp), %eax
xorl %r9d, %r9d
movzwl %cx, %ecx
movzwl %ax, %r8d
callq 0x22ad50
jmp 0x22ad41
movl $0x1, %edi
callq 0x2240
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: dump_kv_u_trans_t(kv_u_trans_t*, _IO_FILE*)
void dump_kv_u_trans_t(kv_u_trans_t *z, FILE *fp)
{
	fwrite(&(z->n), sizeof(z->n), 1, fp);
    fwrite(z->a, sizeof((*(z->a))), z->n, fp);
    fwrite(&z->idx.n, sizeof(z->idx.n), 1, fp);
    fwrite(z->idx.a, sizeof((*(z->idx.a))), z->idx.n, fp);
}

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

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

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

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


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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rcx
leaq -0x14(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x2400
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
shrl $0x1f, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rcx
leaq -0x14(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x2400
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rcx
leaq -0x14(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x2400
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
shrl $0x1f, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rcx
leaq -0x14(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x2400
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rcx
leaq -0x14(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x2400
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shll %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
movl -0x18(%rbp), %eax
movl %eax, %edx
movq -0x10(%rbp), %rcx
movl $0x8, %esi
callq 0x2400
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %edx
movq -0x10(%rbp), %rcx
movl $0x18, %esi
callq 0x2400
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %edx
movq -0x10(%rbp), %rcx
movl $0x8, %esi
callq 0x2400
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0xc8, %rdi
movq -0x10(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x2400
movq -0x8(%rbp), %rax
movq 0xd8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rdx
movq -0x10(%rbp), %rcx
movl $0x20, %esi
callq 0x2400
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x2400
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x10(%rbp), %rcx
movl $0x4, %esi
callq 0x2400
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
movq -0x10(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x2400
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdx
movq -0x10(%rbp), %rcx
movl $0x4, %esi
callq 0x2400
movq -0x8(%rbp), %rdi
addq $0x48, %rdi
movq -0x10(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x2400
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdx
movq -0x10(%rbp), %rcx
movl $0x8, %esi
callq 0x2400
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x22b060
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x22af10
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x22b060
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: dump_rid(All_reads*, _IO_FILE*)
void dump_rid(All_reads *rdb, FILE *fp)
{
	fwrite(&(rdb->total_reads), sizeof(rdb->total_reads), 1, fp);
	fwrite(&(rdb->name_index_size), sizeof(rdb->name_index_size), 1, fp);
	fwrite(rdb->name_index, sizeof((*(rdb->name_index))), rdb->name_index_size, fp);

	fwrite(&(rdb->total_name_length), sizeof(rdb->total_name_length), 1, fp);
	fwrite(rdb->name, sizeof((*(rdb->name))), rdb->total_name_length, fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x50, %rdi
movq -0x10(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x2400
movq -0x8(%rbp), %rdi
addq $0x48, %rdi
movq -0x10(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x2400
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdx
movq -0x10(%rbp), %rcx
movl $0x8, %esi
callq 0x2400
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
movq -0x10(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x2400
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdx
movq -0x10(%rbp), %rcx
movl $0x1, %esi
callq 0x2400
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: load_rid(All_reads*, _IO_FILE*)
void load_rid(All_reads *rdb, FILE *fp)
{
	fread(&(rdb->total_reads), sizeof(rdb->total_reads), 1, fp);
	fread(&(rdb->name_index_size), sizeof(rdb->name_index_size), 1, fp);
	MALLOC(rdb->name_index, rdb->name_index_size);
	fread(rdb->name_index, sizeof((*(rdb->name_index))), rdb->name_index_size, fp);

	fread(&(rdb->total_name_length), sizeof(rdb->total_name_length), 1, fp);
	MALLOC(rdb->name, rdb->total_name_length);
	fread(rdb->name, sizeof((*(rdb->name))), rdb->total_name_length, fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x50, %rdi
movq -0x10(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x22e0
movq -0x8(%rbp), %rdi
addq $0x48, %rdi
movq -0x10(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x22e0
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
shlq $0x3, %rdi
callq 0x2270
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdx
movq -0x10(%rbp), %rcx
movl $0x8, %esi
callq 0x22e0
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
movq -0x10(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x22e0
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
shlq $0x0, %rdi
callq 0x2270
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdx
movq -0x10(%rbp), %rcx
movl $0x1, %esi
callq 0x22e0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: load_kv_u_trans_t(kv_u_trans_t*, _IO_FILE*)
void load_kv_u_trans_t(kv_u_trans_t *z, FILE *fp)
{
	fread(&(z->n), sizeof(z->n), 1, fp); 
	z->m = z->n; MALLOC(z->a, z->n);
    fread(z->a, sizeof((*(z->a))), z->n, fp);

    fread(&z->idx.n, sizeof(z->idx.n), 1, fp);
	z->idx.m = z->idx.n; MALLOC(z->idx.a, z->idx.n);
    fread(z->idx.a, sizeof((*(z->idx.a))), z->idx.n, fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x22e0
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
imulq $0x30, (%rax), %rdi
callq 0x2270
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rdx
movq -0x10(%rbp), %rcx
movl $0x30, %esi
callq 0x22e0
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x22e0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
shlq $0x3, %rdi
callq 0x2270
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x10(%rbp), %rcx
movl $0x8, %esi
callq 0x22e0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: load_ma_ug_t(ma_ug_t*, _IO_FILE*)
void load_ma_ug_t(ma_ug_t *ug, FILE *fp)
{
	ma_utg_t *u = NULL; uint32_t t, i;
    fread(&(ug->u.n), sizeof(ug->u.n), 1, fp);
	ug->u.m = ug->u.n; CALLOC(ug->u.a, ug->u.n);
    for (i = 0; i < ug->u.n; i++) {
        u = &(ug->u.a[i]);
		fread(&t, sizeof(t), 1, fp); u->len = t;
        fread(&t, sizeof(t), 1, fp); u->circ = t;
        fread(&(u->start), sizeof(u->start), 1, fp);
        fread(&(u->end), sizeof(u->end), 1, fp);
        fread(&(u->n), sizeof(u->n), 1, fp);
		u->m = u->n; MALLOC(u->a, u->n);
        fread(u->a, sizeof((*(u->a))), u->n, fp);
    }
	CALLOC(ug->g, 1);
	load_asg_t(ug->g, fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x22e0
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl $0x28, %esi
callq 0x2140
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x22b8d0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x20(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
leaq -0x1c(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x22e0
movl -0x1c(%rbp), %edx
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl $0x80000000, %ecx       # imm = 0x80000000
orl %edx, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rcx
leaq -0x1c(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x22e0
movl -0x1c(%rbp), %edx
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $0x1, %edx
shll $0x1f, %edx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl %edx, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rdi
addq $0x4, %rdi
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x22e0
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x22e0
movq -0x18(%rbp), %rdi
addq $0x10, %rdi
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x22e0
movq -0x18(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, %edi
shlq $0x3, %rdi
callq 0x2270
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, %edx
movq -0x10(%rbp), %rcx
movl $0x8, %esi
callq 0x22e0
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x22b7a1
movl $0x1, %edi
movl $0x48, %esi
callq 0x2140
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x22b550
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: quick_debug_phasing(char const*)
void quick_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;
	load_debug_phasing(fn, &ta, &ug, &read_g, &f_rate, &renew_s, &s, &is_sys, &bub, &ref);



	mc_solve(NULL, NULL, ta, ug, read_g, f_rate, NULL, renew_s, s, is_sys, bub, ref, 0, 0);
	// mc_solve_core_adv(const mc_opt_t *opt, mc_g_t *mg, bubble_type* bub, kv_u_trans_t *ref)

	// for (k = 0; k < ug->g->n_seq; k++) {
	// 	fprintf(stderr, "utg%.6dl(len::%u), s[k]::%d\n", (int32_t)(k)+1, ug->g->seq[k].len, s[k]);
	// }
	prt_rcut_res(fn, s, ug, read_g);
	
	exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
leaq -0x28(%rbp), %rdx
leaq -0x30(%rbp), %rcx
leaq -0x38(%rbp), %r8
leaq -0x3c(%rbp), %r9
leaq -0x48(%rbp), %rbx
leaq -0x4c(%rbp), %r11
leaq -0x58(%rbp), %r10
leaq -0x60(%rbp), %rax
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x22bb60
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movsd -0x38(%rbp), %xmm0
movl -0x3c(%rbp), %r14d
movq -0x48(%rbp), %rbx
movl -0x4c(%rbp), %r11d
movq -0x58(%rbp), %r10
movq -0x60(%rbp), %rax
xorl %esi, %esi
movl %esi, %r9d
xorl %esi, %esi
movq %r9, %rdi
movq %r9, %rsi
movl %r14d, (%rsp)
movq %rbx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movl $0x0, 0x30(%rsp)
callq 0x227770
movq -0x18(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x22bd90
movl $0x1, %edi
callq 0x2240
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x1, -0x20(%rbp)
jbe 0x22c190
movq -0x18(%rbp), %rdi
callq 0x22c1a0
movaps 0x155f19(%rip), %xmm2   # 0x382010
movq -0x20(%rbp), %xmm1
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x155f18(%rip), %xmm2   # 0x382020
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movaps %xmm0, %xmm1
cvttsd2si %xmm1, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
movsd 0x155ec6(%rip), %xmm1   # 0x381ff8
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
subq $0x1, %rcx
movl (%rax,%rcx,4), %edx
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x2c(%rbp), %edx
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
subq $0x1, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x22c0dc
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: mc_bfs(mc_match_t const*, mc_svaux_t*, unsigned int, unsigned int, unsigned int)
static uint32_t mc_bfs(const mc_match_t *ma, mc_svaux_t *b, uint32_t k0, uint32_t bfs_round, uint32_t max_size)
{
	uint32_t i, n_bfs = 0, st, en, r;
	b->bfs[n_bfs++] = k0, b->bfs_mark[k0] = k0;
	st = 0, en = n_bfs;
	for (r = 0; r < bfs_round; ++r) {
		for (i = st; i < en; ++i) {
			uint32_t k = b->bfs[i];
			uint32_t o = ma->idx.a[k] >> 32;
			uint32_t n = (uint32_t)ma->idx.a[k], j;
			for (j = 0; j < n; ++j) {
				uint32_t t = (uint32_t)ma->ma.a[o + j].x;
				if (b->bfs_mark[t] != k0)
					b->bfs[n_bfs++] = t, b->bfs_mark[t] = k0;
			}
		}
		st = en, en = n_bfs;
		if (max_size > 0 && n_bfs > max_size) break;
	}
	return n_bfs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x14(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x24(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x24(%rbp)
movl %ecx, %ecx
movl %edx, (%rax,%rcx,4)
movl -0x14(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x14(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movl $0x0, -0x28(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x18(%rbp), %eax
jae 0x22c368
movl -0x28(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jae 0x22c33c
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x34(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x34(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x3c(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jae 0x22c32c
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x38(%rbp), %ecx
addl -0x40(%rbp), %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x44(%rbp), %ecx
movl (%rax,%rcx,4), %eax
cmpl -0x14(%rbp), %eax
je 0x22c31f
movl -0x44(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x24(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x24(%rbp)
movl %ecx, %ecx
movl %edx, (%rax,%rcx,4)
movl -0x14(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x44(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
jmp 0x22c321
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x22c2bb
jmp 0x22c32e
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x22c26f
movl -0x2c(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jbe 0x22c358
movl -0x24(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jbe 0x22c358
jmp 0x22c368
jmp 0x22c35a
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x22c25d
movl -0x24(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: mcgg_set_spin(mc_match_t const*, mcgg_svaux_t*, unsigned int, unsigned int, char const*)
static void mcgg_set_spin(const mc_match_t *ma, mcgg_svaux_t *b, uint32_t k, mcg_node_t s, const char* cmd)
{
	uint32_t o, j, n;
	mcg_node_t s0 = b->s[k].s;
	/*******************************for debug************************************/
	// mcg_node_t t = s;
	// o = 0;
	// while (t) {
	// 	o += (t&1); t>>=1;
	// }
	// if(o != b->s[k].h[0] && o != b->s[k].h[1]) fprintf(stderr, "cmd-%s, ERROR-mcgg-1\n", cmd);
	// if(s0 == s) fprintf(stderr, "cmd-%s, ERROR-mcgg-2\n", cmd);
	/*******************************for debug************************************/
	if (s0 == s) return;
	o = ma->idx.a[k] >> 32;
	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);///1->z[0]; (-1)->z[1];
		mcp_de(*(b->z), t, s0) -= e->w; 
		mcp_de(*(b->z), t, s) += e->w; 
	}
	b->s[k].s = s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movl -0x14(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x18(%rbp), %eax
jne 0x22ccda
jmp 0x22cdcd
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x2c(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jae 0x22cdb6
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x24(%rbp), %ecx
addl -0x28(%rbp), %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movsd 0x8(%rax), %xmm1
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq (%rax), %rax
movl -0x3c(%rbp), %edx
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rcx
movl 0x8(%rcx), %ecx
shll %cl, %edx
movl %edx, %ecx
addl -0x30(%rbp), %ecx
movl %ecx, %ecx
movsd (%rax,%rcx,8), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq -0x38(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq (%rax), %rax
movl -0x3c(%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
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x22cd09
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movl -0x14(%rbp), %edx
shlq $0x5, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: kr_drand_node_new(unsigned long, mcgg_svaux_t*)
static inline mcg_node_t kr_drand_node_new(uint64_t id, mcgg_svaux_t *b)
{
	uint32_t hn = b->s[id].h[0]-1, k;
	if((b->s[id].h[1] != (uint16_t)-1) && (kr_drand_r(&b->x) > b->s[id].hw[0]))
	{
		hn = b->s[id].h[1]-1;
	}
	b->x = kr_splitmix64(b->x);
	k = b->x%(b->m[hn].n);
	if(b->m[hn].a[k] == b->s[id].s && b->m[hn].n > 1)
	{
		k = b->x%(b->m[hn].n-1);
		if(b->m[hn].a[k] == b->s[id].s) k = b->m[hn].n-1;
	} 
	return b->m[hn].a[k];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%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
movl %eax, -0x14(%rbp)
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 0x22ce5b
movq -0x10(%rbp), %rdi
callq 0x22c1a0
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x8(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
ucomisd 0x10(%rax), %xmm0
jbe 0x22ce5b
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
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x21cf60
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x60(%rcx), %rcx
movl -0x14(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
xorl %edx, %edx
divq 0x8(%rcx)
movl %edx, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rcx
movq -0x8(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
jne 0x22cf60
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x1, 0x8(%rax)
jbe 0x22cf60
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x60(%rcx), %rcx
movl -0x14(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rcx
movq -0x8(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
jne 0x22cf5e
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
subq $0x1, %rax
movl %eax, -0x18(%rbp)
jmp 0x22cf60
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: decode_mb_node(mb_g_t*, unsigned int, unsigned int**, unsigned int*, signed char*, unsigned int**, unsigned int*, signed char*)
inline void decode_mb_node(mb_g_t *mbg, uint32_t id, uint32_t **a0, uint32_t *n0, mc_node_t *s0, 
uint32_t **a1, uint32_t *n1, mc_node_t *s1)
{
	if(a0) (*a0) = mbg->u->bid.a + mbg->u->u.a[id].a[0];
	if(n0) (*n0) = mbg->u->u.a[id].occ[0];
	if(s0) (*s0) = mbg->u->u.a[id].s[0];

	if(a1) (*a1) = mbg->u->bid.a + mbg->u->u.a[id].a[1];
	if(n1) (*n1) = mbg->u->u.a[id].occ[1];
	if(s1) (*s1) = mbg->u->u.a[id].s[1];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x22d15a
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x40(%rax), %rax
movl -0xc(%rbp), %edx
imulq $0x38, %rdx, %rdx
addq %rdx, %rax
movl (%rax), %eax
shlq $0x2, %rax
addq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x20(%rbp)
je 0x22d17f
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x40(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x28(%rbp)
je 0x22d1a4
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x40(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movb 0x10(%rax), %cl
movq -0x28(%rbp), %rax
movb %cl, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x22d1dc
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x40(%rax), %rax
movl -0xc(%rbp), %edx
imulq $0x38, %rdx, %rdx
addq %rdx, %rax
movl 0x4(%rax), %eax
shlq $0x2, %rax
addq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, 0x10(%rbp)
je 0x22d201
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x40(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
movq 0x10(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, 0x18(%rbp)
je 0x22d226
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x40(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movb 0x11(%rax), %cl
movq 0x18(%rbp), %rax
movb %cl, (%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: next_uid(mc_bp_iter*, bubble_type*, unsigned int*, unsigned int*)
inline uint32_t next_uid(mc_bp_iter *iter, bubble_type* bub, uint32_t *c_bid, uint32_t *c_uid)
{
	ma_utg_t *u = &(bub->b_ug->u.a[iter->chain_id]);
	uint32_t *a, n, uid;
	while (1)
	{
		if(iter->bid >= u->n) break;
		get_bubbles(bub, u->a[iter->bid]>>33, NULL, NULL, &a, &n, NULL);
		while (1)
		{
			if(iter->uid >= n) break;
			uid = a[iter->uid]>>1;
			if(c_bid) (*c_bid) = iter->bid;
			if(c_uid) (*c_uid) = iter->uid;
			iter->uid++;
			return uid;
		}
		iter->bid++, iter->uid = 0;
	}
	return (uint32_t)-1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0xc0(%rax), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
imulq $0x28, (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x30(%rbp), %rcx
movl 0x10(%rcx), %ecx
cmpq %rcx, %rax
jb 0x22d27f
jmp 0x22d344
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq (%rax,%rcx,8), %rsi
shrq $0x21, %rsi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x38(%rbp), %r8
leaq -0x3c(%rbp), %r9
movq %rcx, %rdx
movq $0x0, (%rsp)
callq 0x1c4b20
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x3c(%rbp), %ecx
cmpq %rcx, %rax
jb 0x22d2c9
jmp 0x22d323
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl (%rax,%rcx,4), %eax
shrl %eax
movl %eax, -0x40(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x22d2f4
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x28(%rbp)
je 0x22d30b
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movl -0x40(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x22d34b
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
jmp 0x22d266
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop