LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: print_ul_rs(all_ul_t*)
int print_ul_rs(all_ul_t *U_INF)
{
	uint32_t i;
	UC_Read ur;
	init_UC_Read(&ur);
	for (i = 0; i < U_INF->n; i++) {
		retrieve_ul_t(&ur, NULL, U_INF, i, 0, 0, -1);
		fprintf(stderr, ">%s\n", U_INF->nid.a[i].a);
		fprintf(stderr, "%.*s\n", (int)ur.length, ur.seq);		
	}

	destory_UC_Read(&ur);
	return 1;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x3372c
cmpq $0x0, 0x50(%rbx)
jne 0x1d866a
movq %rsp, %rdi
callq 0x33667
movl $0x1, %eax
addq $0x20, %rsp
popq %rbx
retq
leaq 0x50(%rbx), %rdx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2a9f9
jmp 0x1d8657
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: spec_ovlp_occ(eg_srt_t*, int, int, int, int)
int32_t spec_ovlp_occ(eg_srt_t *a, int32_t a_n, int32_t st, int32_t vv, int32_t c_thres)
{
	int32_t i, dst = a[st].d, occ = 1;
	if(occ >= c_thres) return 1;
	for (i = st + 1; i < a_n; i++) {
		if(a[i].id == a[st].id) continue;
		if(a[i].d - dst <= vv) {
			occ++;
			if(occ >= c_thres) return 1; 
		}
	}

	for (i = st - 1; i >= 0; i--) {
		if(a[i].id == a[st].id) continue;
		if(dst - a[i].d <= vv) {
			occ++;
			if(occ >= c_thres) return 1; 
		}
	}	
	return 0;
}

// Assembly:
movl $0x1, %eax
cmpl $0x2, %r8d
jl 0x1d8997
pushq %rbp
pushq %rbx
movslq %edx, %rbx
leaq (%rbx,%rbx,2), %rax
leaq (%rdi,%rax,8), %r11
movl 0x10(%r11), %r9d
incl %ebx
movl $0x1, %r10d
cmpl %esi, %ebx
jge 0x1d894e
movl 0x14(%r11), %eax
movslq %ebx, %r10
leaq (%r10,%r10,2), %r10
leaq (%rdi,%r10,8), %rbx
addq $0x14, %rbx
movl %edx, %ebp
notl %ebp
addl %esi, %ebp
movl $0x1, %r10d
cmpl %eax, (%rbx)
je 0x1d8946
movl -0x4(%rbx), %esi
subl %r9d, %esi
cmpl %ecx, %esi
jg 0x1d8946
incl %r10d
cmpl %r8d, %r10d
jge 0x1d8990
addq $0x18, %rbx
decl %ebp
jne 0x1d8930
xorl %eax, %eax
testl %edx, %edx
jle 0x1d8995
movl 0x14(%r11), %esi
movl %edx, %edx
leaq (%rdx,%rdx,2), %r11
incq %rdx
leaq (%rdi,%r11,8), %rdi
addq $-0x4, %rdi
cmpl %esi, (%rdi)
je 0x1d8981
movl %r9d, %r11d
subl -0x4(%rdi), %r11d
cmpl %ecx, %r11d
jg 0x1d8981
incl %r10d
cmpl %r8d, %r10d
jge 0x1d8990
decq %rdx
addq $-0x18, %rdi
cmpq $0x1, %rdx
jg 0x1d8969
jmp 0x1d8995
movl $0x1, %eax
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: print_dedup_HiFis_seq(ma_ug_t*)
void print_dedup_HiFis_seq(ma_ug_t *ug)
{
	uint64_t i;
	ma_utg_t *p = NULL;
	for (i = 0; i < ug->u.n; i++) {
		p = &(ug->u.a[i]);
		CALLOC(p->s, p->len+1);
		retrieve_u_seq(NULL, p->s, p, 0, 0, -1, NULL);
		p->s[p->len] = '\0';
	}

	FILE* output_file = fopen("dedup_HiFis_seq.gfa", "w");
    ma_ug_print(ug, NULL, NULL, NULL, NULL, "utg", output_file);
    fclose(output_file);

	output_file = fopen("dedup_HiFis_seq.noseq.gfa", "w");
	ma_ug_print_simple(ug, NULL, NULL, NULL, NULL, "utg", output_file);
	fclose(output_file);
	exit(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x1d994d
xorl %r15d, %r15d
movl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
movq 0x10(%rbx), %rbp
leaq (%r15,%rbp), %r14
movl (%rbp,%r15), %edi
andq %r12, %rdi
incq %rdi
movl $0x1, %esi
callq 0x2120
movq %rax, 0x20(%rbp,%r15)
movq $0x0, (%rsp)
xorl %edi, %edi
movq %rax, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq $-0x1, %r9
callq 0x36b0d
movq 0x20(%rbp,%r15), %rax
movl (%rbp,%r15), %ecx
andq %r12, %rcx
movb $0x0, (%rax,%rcx)
incq %r13
addq $0x28, %r15
cmpq (%rbx), %r13
jb 0x1d98ed
leaq 0x5eb19(%rip), %rdi     # 0x23846d
leaq 0x62aa3(%rip), %r14     # 0x23c3fe
movq %r14, %rsi
callq 0x2210
movq %rax, %r15
movq %rax, (%rsp)
leaq 0x561ca(%rip), %r12     # 0x22fb3b
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r12, %r9
callq 0xb6f6d
movq %r15, %rdi
callq 0x2190
leaq 0x5eaed(%rip), %rdi     # 0x238481
movq %r14, %rsi
callq 0x2210
movq %rax, %r14
movq %rax, (%rsp)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r12, %r9
callq 0xb7f45
movq %r14, %rdi
callq 0x2190
movl $0x1, %edi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: hpc_l(char*, long, long, long)
uint32_t hpc_l(char *s, int64_t hof, int64_t sof, int64_t scut)
{
	if(scut == sof) return hof;
	if(scut < sof) sof = hof = 0;
	int64_t l, k;
	for (k=sof; (k>0)&&(k<scut)&&(s[k]==s[k-1])&&(seq_nt4_table[(uint8_t)s[k]]<4); k++) break;
	sof = k;
	for (l=sof, k=sof+1; k <= scut; k++) {
		if((k == scut) || (s[k] != s[l]) || (seq_nt4_table[(uint8_t)s[l]] >= 4)) {
			hof++; l = k;
		}
	}
	return hof;
}

// Assembly:
movq %rsi, %rax
cmpq %rdx, %rcx
je 0x1da6d9
xorl %esi, %esi
cmpq %rdx, %rcx
cmovlq %rsi, %rax
cmovlq %rsi, %rdx
cmpq %rcx, %rdx
jge 0x1da6d9
negq %rcx
leaq 0x1(%rdx), %rsi
leaq 0x53367(%rip), %r8      # 0x22da10
movq %rcx, %r9
addq %rsi, %r9
je 0x1da6c3
movzbl (%rdi,%rdx), %r9d
cmpb %r9b, (%rdi,%rsi)
jne 0x1da6c3
cmpb $0x4, (%r8,%r9)
jb 0x1da6c9
incq %rax
movq %rsi, %rdx
leaq (%rcx,%rsi), %r9
incq %r9
incq %rsi
cmpq $0x1, %r9
jne 0x1da6a9
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: debug_append_inexact_edges(ma_ug_t*, ug_opt_t const*)
void debug_append_inexact_edges(ma_ug_t *ug, const ug_opt_t *uopt) {
	uint32_t n_asymm = 0, n_disconnect = 0, z, v, w, k, nv; asg_arc_t *av = NULL;
	for (z = 0; z < ug->g->n_arc; ++z) {
		if(ug->g->arc[z].del) continue;
		if(!get_ug_edge_src(ug, uopt->sources, uopt->max_hang, uopt->min_ovlp, 
													ug->g->arc[z].ul>>32, ug->g->arc[z].v)) {
			n_disconnect++;
		}
        v = ug->g->arc[z].v^1; w = (ug->g->arc[z].ul>>32)^1;
        nv = asg_arc_n(ug->g, v); av = asg_arc_a(ug->g, v);
        for (k = 0; k < nv; ++k) {
			if (av[k].del) continue;
			// fprintf(stderr, "found <%lu> -> <%u>\n", av[k].ul>>32, av[k].v);
			if (av[k].v == w) break;
		}
            
        if (k == nv) {
			ug->g->arc[z].del = 1, ++n_asymm;
			// fprintf(stderr, "# lack of <%u> -> <%u>, should be <%u> -> <%u>\n\n", w^1, v^1, v, w);
		}
    }

	if(n_asymm || n_disconnect) {
		asg_cleanup(ug->g); 
		fprintf(stderr, "[M::%s] # asymm edges: %u, # disconnect edges: %u\n", 
		__func__, n_asymm, n_disconnect);
		// exit(1);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq 0x18(%rdi), %rdi
testl $0x7fffffff, 0x4(%rdi)  # imm = 0x7FFFFFFF
je 0x1dacd1
movq %rsi, %r14
xorl %r12d, %r12d
xorl %ebp, %ebp
xorl %ebx, %ebx
movq 0x8(%rdi), %rax
leaq (%r12,%r12,2), %r13
cmpl $0x0, 0xc(%rax,%r13,8)
js 0x1dacb7
leaq (%rax,%r13,8), %rax
movq 0x8(%r14), %rsi
movslq 0x40(%r14), %rdx
movslq 0x44(%r14), %rcx
movl 0x4(%rax), %r8d
movl 0x8(%rax), %r9d
movq %r15, %rdi
callq 0x1a23dc
cmpq $0x1, %rax
adcl $0x0, %ebx
movq 0x18(%r15), %rcx
movq 0x8(%rcx), %rax
movq 0x28(%rcx), %rcx
movl 0x8(%rax,%r13,8), %edx
xorq $0x1, %rdx
movq (%rcx,%rdx,8), %rcx
testl %ecx, %ecx
je 0x1daca9
movl 0x4(%rax,%r13,8), %edx
movq %rcx, %rsi
shrq $0x20, %rsi
movl %ecx, %edi
leaq (%rsi,%rsi,2), %rsi
leaq (%rax,%rsi,8), %r8
addq $0xc, %r8
xorl %esi, %esi
cmpl $0x0, (%r8)
js 0x1dac99
movl -0x4(%r8), %r9d
xorl %edx, %r9d
cmpl $0x1, %r9d
je 0x1dacab
incq %rsi
addq $0x18, %r8
cmpq %rsi, %rdi
jne 0x1dac86
movl %ecx, %esi
jmp 0x1dacab
xorl %esi, %esi
cmpl %ecx, %esi
jne 0x1dacb7
orb $-0x80, 0xf(%rax,%r13,8)
incl %ebp
incq %r12
movq 0x18(%r15), %rdi
movl 0x4(%rdi), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq %rax, %r12
jb 0x1dac12
jmp 0x1dacd5
xorl %ebx, %ebx
xorl %ebp, %ebp
movl %ebp, %eax
orl %ebx, %eax
jne 0x1dacea
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xa02fa
movq 0xaf2ea(%rip), %rax     # 0x289fe0
movq (%rax), %rdi
leaq 0x5d7eb(%rip), %rsi     # 0x2384eb
leaq 0x5d817(%rip), %rdx     # 0x23851e
movl %ebp, %ecx
movl %ebx, %r8d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22b0
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: load_emask_t(idx_emask_t**, char*, ma_ug_t*)
int32_t load_emask_t(idx_emask_t **z, char* file_name, ma_ug_t *ug)
{
	char* gfa_name = NULL; MALLOC(gfa_name, strlen(file_name)+50);
    sprintf(gfa_name, "%s.ul.msk.bin", file_name);
    FILE* fp = fopen(gfa_name, "r"); free(gfa_name);
    if (!fp) return 0;
    if(ug && (!test_dbug(ug, fp))) {
        fprintf(stderr, "[M::%s] Renew UL Index\n", __func__);
        fclose(fp);
        return 0;
    }
    uint64_t k; kv_emask_t *p; idx_emask_t *x; CALLOC(x, 1);


	fread(&x->n, sizeof(x->n), 1, fp); MALLOC(x->a, x->n); 
	for (k = 0; k < x->n; k++) {
		p = &(x->a[k]);
		fread(&p->n, sizeof(p->n), 1, fp); MALLOC(p->a, p->n); p->m = p->n;
		fread(p->a, sizeof((*(p->a))), p->n, fp);
	}
	
    fprintf(stderr, "[M::%s] Index has been loaded.\n", __func__);
    fclose(fp);
	*z = x;
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2090
leaq 0x32(%rax), %rdi
callq 0x2280
movq %rax, %r12
leaq 0x5c76a(%rip), %rsi     # 0x2385c9
xorl %ebp, %ebp
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0x57732(%rip), %rsi     # 0x2335a7
movq %r12, %rdi
callq 0x2210
movq %rax, %r15
movq %r12, %rdi
callq 0x2220
testq %r15, %r15
jne 0x1dbe98
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
testq %r14, %r14
je 0x1dbeb6
movq %r14, %rdi
movq %r15, %rsi
callq 0xc270e
testl %eax, %eax
jne 0x1dbeb6
movq %r15, %rdi
callq 0x2acd0
jmp 0x1dbe8d
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2acfc
movl $0x1, %ebp
jmp 0x1dbe8d
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: write_emask_t(idx_emask_t*, char*, ma_ug_t*)
int32_t write_emask_t(idx_emask_t *x, char* file_name, ma_ug_t *ug)
{
	char* gfa_name = NULL; MALLOC(gfa_name, strlen(file_name)+50);
    sprintf(gfa_name, "%s.ul.msk.bin", file_name);
    FILE* fp = fopen(gfa_name, "w"); free(gfa_name);
    if (!fp) return 0;
    uint64_t k; kv_emask_t *p = NULL;

    if(ug) write_dbug(ug, fp);

	fwrite(&x->n, sizeof(x->n), 1, fp);
	for (k = 0; k < x->n; k++) {
		p = &(x->a[k]);
		fwrite(&p->n, sizeof(p->n), 1, fp);
		fwrite(p->a, sizeof((*(p->a))), p->n, fp);
	}

    fprintf(stderr, "[M::%s] Index has been written.\n", __func__);
    fclose(fp);
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x2090
leaq 0x32(%rax), %rdi
callq 0x2280
movq %rax, %r12
leaq 0x5c6d5(%rip), %rsi     # 0x2385c9
xorl %ebp, %ebp
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0x604f4(%rip), %rsi     # 0x23c3fe
movq %r12, %rdi
callq 0x2210
movq %rax, %r15
movq %r12, %rdi
callq 0x2220
testq %r15, %r15
jne 0x1dbf2d
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2adde
movl $0x1, %ebp
jmp 0x1dbf22
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: graph_ovlp_binning(ma_ug_t*, asg_t*, ug_opt_t const*)
idx_emask_t* graph_ovlp_binning(ma_ug_t *ug, asg_t *sg, const ug_opt_t *uopt)
{
	ug_bin_t sl; 
	init_aux_table(); ha_opt_update_cov(&asm_opt, asm_opt.hom_cov);
	init_ug_bin_t(&sl, uopt, 0, GBIN_K, GBIN_W, asm_opt.max_n_chain, GBIN_E, GBIN_E, GBIN_BE, GBIN_ME, GBIN_L,
	asm_opt.thread_num, 512, 3, 1, ug, sg);
	cal_graph_ovlp_binning(&sl);
	return sl.mm;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
callq 0x3366f
leaq 0xae7f3(%rip), %rbx     # 0x28a758
movl 0xd0(%rbx), %esi
movq %rbx, %rdi
callq 0x2f59
movl 0x7c(%rbx), %eax
movl 0xe8(%rbx), %r9d
leaq 0x8(%rsp), %rbx
movsd 0x4955e(%rip), %xmm0    # 0x2254e8
movsd 0x53086(%rip), %xmm2    # 0x22f018
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movl $0x1f, %ecx
movl $0x1f, %r8d
movaps %xmm0, %xmm1
pushq %r15
pushq %r12
pushq $0x1
pushq $0x3
pushq $0x200                  # imm = 0x200
pushq %rax
pushq $0x100                  # imm = 0x100
pushq $0x4
callq 0x1e0ac9
addq $0x40, %rsp
movq %rbx, %rdi
callq 0x1e1611
movq 0xf8(%rbx), %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: init_uldat_t(uldat_t*, void*, void*, mg_idxopt_t*, unsigned long, unsigned long, ug_opt_t const*, ul_idx_t*)
void init_uldat_t(uldat_t *sl, void *ha_flt_tab, void *ha_idx, mg_idxopt_t *opt, uint64_t chunk_size, uint64_t n_thread, const ug_opt_t *uopt, ul_idx_t *uu)
{
	memset(sl, 0, sizeof(uldat_t));
    sl->ha_flt_tab = ha_flt_tab;
    sl->ha_idx = (ha_pt_t *)ha_idx;
    sl->opt = opt;   
    sl->chunk_size = chunk_size;
    sl->n_thread = n_thread;
    sl->uu = uu;
    sl->uopt = uopt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movl $0xe8, %edx
xorl %esi, %esi
callq 0x20e0
movq %r13, (%rbp)
movq %r12, 0x8(%rbp)
movq %r15, 0x10(%rbp)
movq %r14, 0x50(%rbp)
movq %rbx, 0x58(%rbp)
movaps 0x40(%rsp), %xmm0
movups %xmm0, 0x28(%rbp)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: update_ovlp_src(void*, long, int)
static void update_ovlp_src(void *data, long i, int tid) // callback for kt_for()
{
	uldat_t *sl = (uldat_t *)data;
	ma_hit_t_alloc* src = sl->uopt->sources;
	uint64_t z, k, *a, a_n;
	for (z = 0; z < src[i].length; z++) src[i].buffer[z].bl = 0;
	a = UL_INF.ridx.occ.a + UL_INF.ridx.idx.a[i];
	a_n = UL_INF.ridx.idx.a[i+1] - UL_INF.ridx.idx.a[i];
	// fprintf(stderr, "++i->%d, a_n->%lu++\n", i, a_n);
	for (k = 0; k < a_n; k++) {
		///note: we only label reliable chains
		// if(i == 4217) fprintf(stderr, "\nul_id: %lu\n", a[k]>>32);
		determine_connective_backtrack(&UL_INF, sl->uopt, &(UL_INF.a[a[k]>>32]), (uint32_t)(a[k]), i, a[k]>>32);
		// determine_connective_adv(&UL_INF, sl->uopt, G_CHAIN_BW, sl->opt->diff_ec_ul, &(UL_INF.a[a[k]>>32]), (uint32_t)(a[k]), i);
		// determine_connective(&UL_INF, sl->uopt, G_CHAIN_BW, sl->opt->diff_ec_ul, 
		// 										&(UL_INF.a[a[k]>>32]), (uint32_t)(a[k]), i);
	}
	// fprintf(stderr, "--i->%d, a_n->%lu--\n", i, a_n);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x28(%rdi), %rax
movq 0x8(%rax), %rax
leaq (%rsi,%rsi,2), %rcx
cmpl $0x0, 0xc(%rax,%rcx,8)
je 0x1dc4b1
leaq (%rax,%rcx,8), %rax
movl $0x18, %ecx
xorl %edx, %edx
movabsq $-0x7fffffff00000001, %rsi # imm = 0x80000000FFFFFFFF
movq (%rax), %rdi
andq %rsi, (%rdi,%rcx)
incq %rdx
movl 0xc(%rax), %edi
addq $0x28, %rcx
cmpq %rdi, %rdx
jb 0x1dc49b
leaq 0xaee60(%rip), %r15     # 0x28b318
movq 0x28(%r15), %rax
movl (%rax,%rbx,4), %r12d
movl 0x4(%rax,%rbx,4), %r13d
subl %r12d, %r13d
je 0x1dc503
shlq $0x3, %r12
addq 0x40(%r15), %r12
cmpl $0x1, %r13d
adcl $0x0, %r13d
xorl %ebp, %ebp
movq 0x28(%r14), %rsi
movq (%r12,%rbp,8), %rcx
movq %rcx, %rax
shrq $0x20, %rax
imulq $0x58, %rax, %rdx
addq 0x48(%r15), %rdx
movq %rbx, %r8
callq 0x1d7750
incq %rbp
cmpq %rbp, %r13
jne 0x1dc4dc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: update_ovlp_src_bl(void*, long, int)
static void update_ovlp_src_bl(void *data, long i, int tid)
{
	uldat_t *sl = (uldat_t *)data;
	ma_hit_t_alloc* src = sl->uopt->sources;
	uint64_t z, sum; uint32_t qn, tn; int32_t idx;
	for (z = 0; z < src[i].length; z++) {
		qn = Get_qn(src[i].buffer[z]);
		tn = Get_tn(src[i].buffer[z]);
		if(qn > tn) continue;
		idx = get_specific_overlap(&(src[tn]), tn, qn);
		assert(idx != -1);
		sum = src[i].buffer[z].bl + src[tn].buffer[idx].bl;
		src[i].buffer[z].bl = src[tn].buffer[idx].bl = sum/**(sum&0x7fffffffU)**/;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x28(%rdi), %rax
movq 0x8(%rax), %r14
leaq (%rsi,%rsi,2), %rax
cmpl $0x0, 0xc(%r14,%rax,8)
je 0x1dc5c3
leaq (%r14,%rax,8), %r15
movabsq $0x7fffffff00000000, %r13 # imm = 0x7FFFFFFF00000000
xorl %ebp, %ebp
xorl %r12d, %r12d
movq (%r15), %rax
movl 0x4(%rax,%rbp), %edx
movl 0xc(%rax,%rbp), %esi
cmpl %edx, %esi
jb 0x1dc5b3
leaq (%rsi,%rsi,2), %rax
leaq (%r14,%rax,8), %rbx
movq %rbx, %rdi
callq 0xa04f9
cmpl $-0x1, %eax
je 0x1dc5d2
movq (%r15), %rcx
movq 0x18(%rcx,%rbp), %rcx
andq %r13, %rcx
movq (%rbx), %rdx
cltq
leaq (%rax,%rax,4), %rax
movq 0x18(%rdx,%rax,8), %rsi
addq %rsi, %rcx
andq %r13, %rcx
movabsq $-0x7fffffff00000001, %rdi # imm = 0x80000000FFFFFFFF
andq %rdi, %rsi
orq %rcx, %rsi
movq %rsi, 0x18(%rdx,%rax,8)
movq (%r15), %rax
movq 0x18(%rax,%rbp), %rdx
andq %rdi, %rdx
orq %rcx, %rdx
movq %rdx, 0x18(%rax,%rbp)
incq %r12
movl 0xc(%r15), %eax
addq $0x28, %rbp
cmpq %rax, %r12
jb 0x1dc548
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5c975(%rip), %rdi     # 0x238f4e
leaq 0x573ab(%rip), %rsi     # 0x23398b
leaq 0x5c971(%rip), %rcx     # 0x238f58
movl $0x4e12, %edx           # imm = 0x4E12
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: clean_contained_chg(void*, long, int)
static void clean_contained_chg(void *data, long i, int tid) // callback for kt_for()
{
	uldat_t *sl = (uldat_t *)data;
	sl->rg->seq_vis[i] = 0;
	if(sl->rg->seq[i].del) return;
	if(!(is_contain_r((*(sl->uopt->ruIndex)), ((uint64_t)i)))) return;
	ma_hit_t_alloc* src = sl->uopt->sources;
	uint64_t z;
	for (z = 0; z < src[i].length; z++) {
		if(src[i].buffer[z].bl) break;
	}
	if(z >= src[i].length) sl->rg->seq_vis[i] = 1;
}

// Assembly:
movq 0x20(%rdi), %rax
movq 0x30(%rax), %rax
movb $0x0, (%rax,%rsi)
movq 0x20(%rdi), %rax
movq 0x20(%rax), %rcx
cmpl $0x0, (%rcx,%rsi,8)
js 0x1dc685
movq 0x28(%rdi), %rcx
movq 0x30(%rcx), %rdx
cmpq %rsi, (%rdx)
jbe 0x1dc685
movq 0x8(%rdx), %rdx
cmpl $0x0, (%rdx,%rsi,4)
js 0x1dc685
movq 0x8(%rcx), %rdx
leaq (%rsi,%rsi,2), %r8
movl 0xc(%rdx,%r8,8), %ecx
testq %rcx, %rcx
setne %dil
je 0x1dc67d
leaq (%rdx,%r8,8), %rdx
movq (%rdx), %rdx
testl $0x7fffffff, 0x1c(%rdx) # imm = 0x7FFFFFFF
jne 0x1dc678
movabsq $0x7fffffff00000000, %rdi # imm = 0x7FFFFFFF00000000
addq $0x40, %rdx
leaq -0x1(%rcx), %r9
xorl %r8d, %r8d
cmpq %r8, %r9
je 0x1dc67d
leaq 0x28(%rdx), %r10
incq %r8
testq %rdi, (%rdx)
movq %r10, %rdx
je 0x1dc65d
cmpq %rcx, %r8
setb %dil
testb %dil, %dil
jne 0x1dc685
movq 0x30(%rax), %rax
movb $0x1, (%rax,%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: label_contained_chg(void*, long, int)
static void label_contained_chg(void *data, long i, int tid) // callback for kt_for()
{
	uldat_t *sl = (uldat_t *)data; uint32_t v = i;
	sl->rg->seq_vis[v] = 0;
	if(sl->rg->seq[v>>1].del) return;
	if(is_contain_r((*(sl->uopt->ruIndex)), (v>>1))) {
		sl->rg->seq_vis[v] = 1; return;
	}
	asg_arc_t *av = asg_arc_a(sl->rg, v);
	uint32_t nv = asg_arc_n(sl->rg, v), k;
	for (k = 0; k < nv; ++k) {
		if(av[k].del) continue;
		if(is_contain_r((*(sl->uopt->ruIndex)), (av[k].v>>1))) break;
	}
	if(k < nv) sl->rg->seq_vis[v] = 1;
}

// Assembly:
movq 0x20(%rdi), %rax
movq 0x30(%rax), %rcx
movl %esi, %eax
movb $0x0, (%rcx,%rax)
movq 0x20(%rdi), %rcx
movq 0x20(%rcx), %rdx
shrl %esi
cmpl $0x0, (%rdx,%rsi,8)
js 0x1dcee3
movq 0x28(%rdi), %rdx
movq 0x30(%rdx), %rdx
movq (%rdx), %rdi
cmpq %rdi, %rsi
jae 0x1dce8a
movq 0x8(%rdx), %r8
cmpl $0x0, (%r8,%rsi,4)
js 0x1dce8a
movq 0x30(%rcx), %rcx
movb $0x1, (%rcx,%rax)
retq
movq 0x28(%rcx), %rsi
movq (%rsi,%rax,8), %rsi
testl %esi, %esi
je 0x1dcee3
movq 0x8(%rcx), %r8
movq %rsi, %r9
shrq $0x20, %r9
movl %esi, %r10d
leaq (%r9,%r9,2), %rsi
leaq (%r8,%rsi,8), %rsi
addq $0xc, %rsi
shlq $0x3, %r10
leaq (%r10,%r10,2), %r8
xorl %r9d, %r9d
cmpl $0x0, (%rsi,%r9)
js 0x1dceda
movl -0x4(%rsi,%r9), %r10d
shrl %r10d
cmpq %r10, %rdi
jbe 0x1dceda
movq 0x8(%rdx), %r11
cmpl $0x0, (%r11,%r10,4)
jns 0x1dce81
addq $0x18, %r9
cmpq %r9, %r8
jne 0x1dcebb
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: dedup_contain_g(ug_opt_t const*, asg_t*)
void dedup_contain_g(const ug_opt_t *uopt, asg_t *sg)
{
	mg_idxopt_t opt; uldat_t sl; int32_t cutoff;
	init_aux_table(); ha_opt_update_cov(&asm_opt, asm_opt.hom_cov);
	cutoff = asm_opt.max_n_chain;
	init_mg_opt(&opt, !(asm_opt.flag&HA_F_NO_HPC), 19, 10, cutoff, asm_opt.max_n_chain, asm_opt.ul_error_rate, asm_opt.ul_error_rate, asm_opt.ul_error_rate_low, asm_opt.ul_error_rate_hpc, asm_opt.ul_ec_round);
	init_uldat_t(&sl, NULL, NULL, &opt, CHUNK_SIZE, asm_opt.thread_num, uopt, NULL); sl.rg = sg;
	work_rg_contain_dedup(&sl);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x170, %rsp            # imm = 0x170
movq %rsi, %rbx
movq %rdi, %r14
callq 0x3366f
leaq 0xad852(%rip), %r15     # 0x28a758
movl 0xd0(%r15), %esi
movq %r15, %rdi
callq 0x2f59
movl (%r15), %eax
movl 0xe8(%r15), %ecx
notl %eax
andl $0x1, %eax
movsd 0x228(%r15), %xmm0
movups 0x230(%r15), %xmm1
movl 0x240(%r15), %edx
movabsq $0x130000000a, %rsi     # imm = 0x130000000A
movq %rsp, %r12
movq %rsi, (%r12)
movl %ecx, 0x14(%r12)
movl %eax, 0x10(%r12)
movabsq $0x7a12000002710, %rax  # imm = 0x7A12000002710
movq %rax, 0x8(%r12)
movabsq $0x271000000014, %rax   # imm = 0x271000000014
movq %rax, 0x18(%r12)
movabsq $0x3f0000003e428f5c, %rax # imm = 0x3F0000003E428F5C
movq %rax, 0x50(%r12)
movabsq $0x271000000019, %rax   # imm = 0x271000000019
movq %rax, 0x28(%r12)
movaps 0x568a6(%rip), %xmm2    # 0x233840
movups %xmm2, 0x30(%r12)
movabsq $0xb00000005, %rax      # imm = 0xB00000005
movq %rax, 0x20(%r12)
movaps 0x5689a(%rip), %xmm2    # 0x233850
movups %xmm2, 0x40(%r12)
movl $0x3f4ccccd, 0x58(%r12) # imm = 0x3F4CCCCD
movl %ecx, 0x80(%r12)
movsd %xmm0, 0x60(%r12)
movsd %xmm0, 0x68(%r12)
movups %xmm1, 0x70(%r12)
movl %edx, 0x84(%r12)
movslq 0x7c(%r15), %r13
leaq 0x88(%rsp), %r15
movl $0xe8, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x20e0
movq %r12, 0x10(%r15)
movq $0x3b9aca00, 0x50(%r15) # imm = 0x3B9ACA00
movq %r13, 0x58(%r15)
movq $0x0, 0x30(%r15)
movq %r14, 0x28(%r15)
movq %rbx, 0x20(%r15)
movq %r15, %rdi
callq 0x1d6680
addq $0x170, %rsp            # imm = 0x170
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: dd_ug(asg_t*, ma_ug_t*, ma_sub_t*, ma_hit_t_alloc*, R_to_U*, char const*)
uint32_t dd_ug(asg_t *sg, ma_ug_t *ug, ma_sub_t* coverage_cut, ma_hit_t_alloc* sources, R_to_U* ruIndex, const char* output_file_name)
{
    fprintf(stderr, "Writing raw unitig GFA to disk... \n");
    char* gfa_name = (char*)malloc(strlen(output_file_name)+25);
    sprintf(gfa_name, "%s.r_utg.noseq.gfa", output_file_name);
    FILE* output_file = fopen(gfa_name, "w");
    ma_ug_print_simple(ug, sg, coverage_cut, sources, ruIndex, "utg", output_file);
    fclose(output_file);

    free(gfa_name);
    exit(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbx
movq %r8, 0x10(%rsp)
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r12
movq 0xacbc3(%rip), %rax     # 0x289fe0
movq (%rax), %rcx
leaq 0x4d406(%rip), %rdi     # 0x22a82d
movl $0x23, %esi
movl $0x1, %edx
callq 0x2410
movq %rbx, %rdi
callq 0x2090
leaq 0x19(%rax), %rdi
callq 0x2280
movq %rax, %rbp
leaq 0x4d40d(%rip), %rsi     # 0x22a85e
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0x5ef99(%rip), %rsi     # 0x23c3fe
movq %rbp, %rdi
callq 0x2210
movq %rax, %rbx
movq %rax, (%rsp)
leaq 0x526c0(%rip), %r9      # 0x22fb3b
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq 0x10(%rsp), %r8
callq 0xb7f45
movq %rbx, %rdi
callq 0x2190
movq %rbp, %rdi
callq 0x2220
movl $0x1, %edi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: clear_all_ul_t(all_ul_t*)
void clear_all_ul_t(all_ul_t *x)
{
	uint64_t k, rlen;
	for (k = 0; k < x->n; k++) {
        rlen = x->a[k].rlen;
        free(x->a[k].bb.a); free(x->a[k].N_site.a); free(x->a[k].r_base.a); 
        memset(&(x->a[k]), 0, sizeof(x->a[k])); x->a[k].rlen = rlen;
    }
	free(x->ridx.idx.a); free(x->ridx.occ.a); memset(&(x->ridx), 0, sizeof((x->ridx)));

	// if(x->mm) {
	// 	for (k = 0; k < x->mm->n; k++) {
	// 		free(x->mm->a[k].a); memset(&(x->mm->a[k]), 0, sizeof(x->mm->a[k])); 
	// 	}
	// 	free(x->mm->a); free(x->mm); x->mm = NULL;
	// }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x50(%rdi)
je 0x1dd534
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x48(%rbx), %rax
movl 0x18(%rax,%r14), %ebp
movq 0x30(%rax,%r14), %rdi
callq 0x2220
movq 0x48(%rbx), %rax
movq 0x38(%rax,%r14), %rdi
callq 0x2220
movq 0x48(%rbx), %rax
movq 0x10(%rax,%r14), %rdi
callq 0x2220
movq 0x48(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rax,%r14)
movups %xmm0, 0x30(%rax,%r14)
movups %xmm0, 0x20(%rax,%r14)
movups %xmm0, 0x10(%rax,%r14)
movups %xmm0, (%rax,%r14)
movq $0x0, 0x50(%rax,%r14)
movq 0x48(%rbx), %rax
movl %ebp, 0x18(%rax,%r14)
incq %r15
addq $0x58, %r14
cmpq 0x50(%rbx), %r15
jb 0x1dd4c2
movq 0x28(%rbx), %rdi
callq 0x2220
movq 0x40(%rbx), %rdi
callq 0x2220
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rbx)
movups %xmm0, 0x28(%rbx)
movups %xmm0, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: trans_base_infer(ma_ug_t*, asg_t*, ug_opt_t*, kv_u_trans_t*, bubble_type*)
void trans_base_infer(ma_ug_t *ug, asg_t *sg, ug_opt_t *uopt, kv_u_trans_t *res, bubble_type *bub)
{
    ug_trans_t sl; 
    init_aux_table(); ha_opt_update_cov(&asm_opt, asm_opt.hom_cov);
    init_ug_trans_t(&sl, uopt, 0, asm_opt.trans_mer_length, asm_opt.trans_win, asm_opt.max_n_chain, 
	1.0-asm_opt.trans_base_rate, 1.0-asm_opt.trans_base_rate, 1.0-asm_opt.trans_base_rate_sec, 1.0-asm_opt.trans_base_rate_sec, 
	0.85, asm_opt.thread_num, 512, 3, 1, ug, sg, bub, 1);
	// gen_trans_base_count(&sl, res);
	gen_trans_base_count_comp(&sl, res);
	if(!bub) {
		destory_bubbles(sl.bub); free(sl.bub);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %rbp
movq %rsi, %r12
movq %rdi, %r15
callq 0x3366f
leaq 0xa9e25(%rip), %r13     # 0x28a758
movl 0xd0(%r13), %esi
movq %r13, %rdi
callq 0x2f59
movl 0x7c(%r13), %eax
movl 0x8c(%r13), %ecx
movl 0x9c(%r13), %r8d
movl 0xe8(%r13), %r9d
cvtss2sd 0x170(%r13), %xmm1
movsd 0x44904(%rip), %xmm2    # 0x225270
movapd %xmm2, %xmm0
subsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtss2sd 0x174(%r13), %xmm1
subsd %xmm1, %xmm2
movl $0x1, %r10d
leaq 0x8(%rsp), %r13
movsd 0x491f1(%rip), %xmm4    # 0x229b88
movq %r13, %rdi
movq %rbp, %rsi
xorl %edx, %edx
movapd %xmm0, %xmm1
movapd %xmm2, %xmm3
pushq %r10
pushq %rbx
pushq %r12
pushq %r15
pushq %r10
pushq $0x3
pushq $0x200                  # imm = 0x200
pushq %rax
callq 0x1dd560
addq $0x40, %rsp
movq %r13, %rdi
movq %r14, %rsi
callq 0x1de1e5
testq %rbx, %rbx
jne 0x1e09e5
movq 0x30(%rsp), %rdi
callq 0x1380d4
movq 0x30(%rsp), %rdi
callq 0x2220
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: trans_base_mmhap_infer(ma_ug_t*, asg_t*, ug_opt_t*, kv_u_trans_t*)
void trans_base_mmhap_infer(ma_ug_t *ug, asg_t *sg, ug_opt_t *uopt, kv_u_trans_t *res)
{
    ug_trans_t sl; 
    init_aux_table(); ha_opt_update_cov(&asm_opt, asm_opt.hom_cov);
    init_ug_trans_t(&sl, uopt, 0, asm_opt.trans_mer_length, asm_opt.trans_win, asm_opt.max_n_chain, 
	1.0-asm_opt.trans_base_rate, 1.0-asm_opt.trans_base_rate, 1.0-asm_opt.trans_base_rate_sec, 1.0-asm_opt.trans_base_rate_sec, 
	0.85, asm_opt.thread_num, 512, 3, 1, ug, sg, NULL, 0);
	// gen_trans_base_count(&sl, res);
	gen_trans_base_count_mmhap_comp(&sl, res);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq %rcx, %rbx
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r14
callq 0x3366f
leaq 0xa9d39(%rip), %r12     # 0x28a758
movl 0xd0(%r12), %esi
movq %r12, %rdi
callq 0x2f59
movl 0x7c(%r12), %eax
movl 0x8c(%r12), %ecx
movl 0x9c(%r12), %r8d
movl 0xe8(%r12), %r9d
cvtss2sd 0x170(%r12), %xmm1
movsd 0x44812(%rip), %xmm2    # 0x225270
movapd %xmm2, %xmm0
subsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtss2sd 0x174(%r12), %xmm1
subsd %xmm1, %xmm2
movq %rsp, %r12
movsd 0x49106(%rip), %xmm4    # 0x229b88
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
movapd %xmm0, %xmm1
movapd %xmm2, %xmm3
pushq $0x0
pushq $0x0
pushq %r15
pushq %r14
pushq $0x1
pushq $0x3
pushq $0x200                  # imm = 0x200
pushq %rax
callq 0x1dd560
addq $0x40, %rsp
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1e0036
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: gen_hpc_re_t(ma_ug_t*)
hpc_re_t *gen_hpc_re_t(ma_ug_t *ug)
{
	uint64_t k; asg64_v buf; kv_init(buf); 
	hpc_re_t *p = NULL; CALLOC(p, 1);
	kvec_t(char) cc; kv_init(cc);
	p->idx_n = ug->u.n; CALLOC(p->idx, p->idx_n);

	for (k = 0; k < ug->u.n; k++) {
		kv_resize(char, cc, ug->u.a[k].len);
		retrieve_u_seq(NULL, cc.a, &(ug->u.a[k]), 0, 0, ug->u.a[k].len, NULL);
		// fprintf(stderr, "\nutg%.6lu%c\tlen::%u\n", k + 1, "lc"[ug->u.a[k].circ], ug->u.a[k].len);
		extract_microsatellite(cc.a, ug->u.a[k].len, p, &buf, 8, 8, 5, 1, &(p->idx[k]));
		// fprintf(stderr, "utg%.6lu%c\t#::%u\tlen::%u\n", k + 1, "lc"[ug->u.a[k].circ], p->idx[k].e-p->idx[k].s, ug->u.a[k].len);
	}

	kv_destroy(cc); kv_destroy(buf); 
	return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movl $0x1, %edi
movl $0x28, %esi
callq 0x2120
movq %rax, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq (%r14), %r15
movq %r15, 0x20(%rax)
movl $0x8, %esi
movq %r15, %rdi
callq 0x2120
movq %rbx, 0x8(%rsp)
movq %rax, 0x18(%rbx)
testq %r15, %r15
je 0x1e140e
xorl %ebp, %ebp
xorl %r15d, %r15d
xorl %ebx, %ebx
xorl %r13d, %r13d
xorl %r12d, %r12d
movq 0x10(%r14), %rax
movl (%rax,%rbp), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq %rax, %r13
jae 0x1e138d
decq %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %r13
shrq $0x10, %r13
orq %rax, %r13
incq %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x2370
movq %rax, %r12
movq 0x10(%r14), %rdx
movl (%rdx,%rbp), %r9d
addq %rbp, %rdx
andl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
subq $0x8, %rsp
xorl %edi, %edi
movq %r12, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
pushq $0x0
callq 0x36b0d
addq $0x10, %rsp
movq 0x10(%r14), %rax
movl (%rax,%rbp), %esi
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andl %eax, %esi
movq 0x8(%rsp), %rdx
movq 0x18(%rdx), %rax
addq %r15, %rax
subq $0x8, %rsp
movq %r12, %rdi
leaq 0x18(%rsp), %rcx
movl $0x8, %r8d
movl $0x8, %r9d
pushq %rax
pushq $0x1
pushq $0x5
callq 0x1e0c4c
addq $0x20, %rsp
incq %rbx
addq $0x8, %r15
addq $0x28, %rbp
cmpq (%r14), %rbx
jb 0x1e1337
jmp 0x1e1411
xorl %r12d, %r12d
movq %r12, %rdi
callq 0x2220
movq 0x20(%rsp), %rdi
callq 0x2220
movq 0x8(%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: sysm_graph_bin(ug_bin_t*)
void sysm_graph_bin(ug_bin_t *s)
{
	uint64_t k, i; kv_emask_t *r;
	s->is_cnt = 1; s->is_ovlp = 0;
	kt_for(s->n_thread, worker_for_graph_bin_sysm, s, s->ug->u.n);
	for (i = 0; i < s->mm->n; i++) {
		r = &(s->mm->a[i]); 
		for (k = 0; k < r->n; k++) {
			if(r->a[k].rn == (uint32_t)-1) s->mm->a[r->a[k].tn].m++;
		}
	}
	for (i = 0; i < s->mm->n; i++) {
		r = &(s->mm->a[i]); 
		if(r->m > r->n) REALLOC(r->a, r->m);
	}
	

	s->is_cnt = 0; s->is_ovlp = 1;
	kt_for(s->n_thread, worker_for_graph_bin_sysm, s, s->ug->u.n);

	s->is_cnt = 1; s->is_ovlp = 1;
	kt_for(s->n_thread, worker_for_graph_bin_sysm, s, s->ug->u.n);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq $0x1, 0xac(%rdi)
movl 0xa8(%rdi), %edi
movq 0x8(%rbx), %rax
movq (%rax), %rcx
leaq 0x105(%rip), %rsi       # 0x1e1566
movq %rbx, %rdx
callq 0x1047b4
movq 0xf8(%rbx), %rcx
movl 0x8(%rcx), %eax
testq %rax, %rax
je 0x1e14b9
movq (%rcx), %rcx
xorl %edx, %edx
leaq (%rdx,%rdx,2), %rdi
movq 0x8(%rcx,%rdi,8), %rsi
testq %rsi, %rsi
je 0x1e14b1
leaq (%rcx,%rdi,8), %rdi
movq (%rdi), %rdi
addq $0x4, %rdi
cmpl $-0x1, (%rdi)
jne 0x1e14a8
movl -0x4(%rdi), %r8d
leaq (%r8,%r8,2), %r8
incq 0x10(%rcx,%r8,8)
addq $0x20, %rdi
decq %rsi
jne 0x1e1496
incq %rdx
cmpq %rax, %rdx
jne 0x1e147d
movq 0xf8(%rbx), %rax
cmpl $0x0, 0x8(%rax)
je 0x1e1502
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rax), %r12
movq 0x10(%r12,%r14), %rsi
cmpq 0x8(%r12,%r14), %rsi
jbe 0x1e14ec
movq (%r12,%r14), %rdi
shlq $0x5, %rsi
callq 0x2370
movq %rax, (%r12,%r14)
incq %r15
movq 0xf8(%rbx), %rax
movl 0x8(%rax), %ecx
addq $0x18, %r14
cmpq %rcx, %r15
jb 0x1e14cc
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0xac(%rbx)
movl 0xa8(%rbx), %edi
movq 0x8(%rbx), %rax
movq (%rax), %rcx
leaq 0x3f(%rip), %r14        # 0x1e1566
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1047b4
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0xac(%rbx)
movl 0xa8(%rbx), %edi
movq 0x8(%rbx), %rax
movq (%rax), %rcx
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1047b4
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: worker_for_graph_bin_sysm(void*, long, int)
static void worker_for_graph_bin_sysm(void *data, long i, int tid) // callback for kt_for()
{
    ug_bin_t *s = (ug_bin_t*)data; 
	if(s->ug->g->seq[i].del) return;
	if((s->is_cnt) && (!s->is_ovlp)) detect_sysm_graph_bin(s->mm, i);
	if((!s->is_cnt) && (s->is_ovlp)) srt_kv_emask_t(&(s->mm->a[i]), &(s->mk[tid]), i, s->udb.ug);
	if((s->is_cnt) && (s->is_ovlp)) detect_sysm_graph_bin(s->mm, i);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x8(%rdi), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
cmpl $0x0, (%rax,%rsi,8)
js 0x1e160c
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x0, 0xac(%rdi)
je 0x1e15a9
cmpl $0x0, 0xb0(%r14)
jne 0x1e15a9
movq 0xf8(%r14), %rdi
movl %ebx, %esi
callq 0x1c3135
cmpl $0x0, 0xac(%r14)
jne 0x1e15e6
cmpl $0x0, 0xb0(%r14)
je 0x1e15e6
movq 0xf8(%r14), %rax
leaq (%rbx,%rbx,2), %rdi
shlq $0x3, %rdi
addq (%rax), %rdi
movslq %ebp, %rax
leaq (%rax,%rax,2), %rsi
shlq $0x4, %rsi
addq 0xf0(%r14), %rsi
callq 0x1c245d
cmpl $0x0, 0xac(%r14)
je 0x1e160c
cmpl $0x0, 0xb0(%r14)
je 0x1e160c
movq 0xf8(%r14), %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x1c3135
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/kalloc.cpp
// Function: km_init2
void *km_init2(void *km_par, size_t min_core_size)
{
	kmem_t *km;
	km = (kmem_t*)kcalloc(km_par, 1, sizeof(kmem_t));
	km->par = km_par;
	km->min_core_size = min_core_size > 0? min_core_size : 0x80000;
	return (void*)km;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, %esi
movl $0x30, %edx
callq 0x1e3590
movq %r14, (%rax)
testq %rbx, %rbx
movl $0x80000, %ecx          # imm = 0x80000
cmovneq %rbx, %rcx
movq %rcx, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/kalloc.cpp
// Function: kcalloc
void *kcalloc(void *_km, size_t count, size_t size)
{
	kmem_t *km = (kmem_t*)_km;
	void *p;
	if (size == 0 || count == 0) return 0;
	if (km == NULL) return calloc(count, size);
	p = kmalloc(km, count * size);
	memset(p, 0, count * size);
	return p;
}

// Assembly:
pushq %rbx
testq %rdx, %rdx
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x1e35a5
xorl %eax, %eax
popq %rbx
retq
movq %rdx, %rbx
testq %rdi, %rdi
je 0x1e35c7
imulq %rsi, %rbx
movq %rbx, %rsi
callq 0x1e36fd
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
popq %rbx
jmp 0x20e0
movq %rsi, %rdi
movq %rbx, %rsi
popq %rbx
jmp 0x2120
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/kalloc.cpp
// Function: km_destroy
void km_destroy(void *_km)
{
	kmem_t *km = (kmem_t*)_km;
	void *km_par;
	header_t *p, *q;
	if (km == NULL) return;
	km_par = km->par;
	for (p = km->core_head; p != NULL;) {
		q = p->ptr;
		kfree(km_par, p);
		p = q;
	}
	kfree(km_par, km);
}

// Assembly:
testq %rdi, %rdi
je 0x1e3631
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x28(%rdi), %rsi
testq %rsi, %rsi
je 0x1e3621
movq 0x8(%rsi), %r15
movq %r14, %rdi
callq 0x1e3632
movq %r15, %rsi
testq %r15, %r15
jne 0x1e360d
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x1e3632
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/kalloc.cpp
// Function: kmalloc
void *kmalloc(void *_km, size_t n_bytes)
{
	kmem_t *km = (kmem_t*)_km;
	size_t n_units;
	header_t *p, *q;

	if (n_bytes == 0) return 0;
	if (km == NULL) return malloc(n_bytes);
	n_units = (n_bytes + sizeof(size_t) + sizeof(header_t) - 1) / sizeof(header_t); /* header+n_bytes requires at least this number of units */

	if (!(q = km->loop_head)) /* the first time when kmalloc() is called, intialize it */
		q = km->loop_head = km->base.ptr = &km->base;
	for (p = q->ptr;; q = p, p = p->ptr) { /* search for a suitable block */
		if (p->size >= n_units) { /* p->size if the size of current block. This line means the current block is large enough. */
			if (p->size == n_units) q->ptr = p->ptr; /* no need to split the block */
			else { /* split the block. NB: memory is allocated at the end of the block! */
				p->size -= n_units; /* reduce the size of the free block */
				p += p->size; /* p points to the allocated block */
				*(size_t*)p = n_units; /* set the size */
			}
			km->loop_head = q; /* set the end of chain */
			return (size_t*)p + 1;
		}
		if (p == km->loop_head) { /* then ask for more "cores" */
			if ((p = morecore(km, n_units)) == 0) return 0;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x1e37bc
movq %rsi, %r14
movq %rdi, %rbx
testq %rdi, %rdi
je 0x1e37c0
addq $0x17, %r14
shrq $0x4, %r14
movq 0x20(%rbx), %rcx
testq %rcx, %rcx
jne 0x1e3737
leaq 0x10(%rbx), %rcx
movq %rcx, 0x18(%rbx)
movq %rcx, 0x20(%rbx)
movq 0x8(%rcx), %rsi
movq (%rsi), %rdx
cmpq %r14, %rdx
jae 0x1e37cd
cmpq 0x20(%rbx), %rsi
jne 0x1e37a8
movq (%rbx), %rdi
movq 0x8(%rbx), %rcx
movq %rcx, %r15
addq %r14, %r15
movq %r15, %rax
xorl %edx, %edx
divq %rcx
subq %rdx, %r15
movq %r15, %rsi
shlq $0x4, %rsi
callq 0x1e36fd
testq %rax, %rax
je 0x1e37fb
movq 0x28(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %r15, (%rax)
movq %rax, 0x28(%rbx)
decq %r15
movq %r15, 0x10(%rax)
addq $0x18, %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1e3632
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0x1e37bc
movq 0x8(%rsi), %rax
movq (%rax), %rdx
movq %rsi, %rcx
movq %rax, %rsi
cmpq %r14, %rdx
jb 0x1e3747
jmp 0x1e37d0
xorl %eax, %eax
jmp 0x1e37f5
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2280
movq %rsi, %rax
subq %r14, %rdx
jne 0x1e37df
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rcx)
jmp 0x1e37ed
movq %rdx, (%rax)
shlq $0x4, %rdx
movq %r14, (%rax,%rdx)
addq %rdx, %rax
movq %rcx, 0x20(%rbx)
addq $0x8, %rax
popq %rbx
popq %r14
popq %r15
retq
callq 0x2b20d
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/kalloc.cpp
// Function: krealloc
void *krealloc(void *_km, void *ap, size_t n_bytes) // TODO: this can be made more efficient in principle
{
	kmem_t *km = (kmem_t*)_km;
	size_t cap, *p, *q;

	if (n_bytes == 0) {
		kfree(km, ap); return 0;
	}
	if (km == NULL) return realloc(ap, n_bytes);
	if (ap == NULL) return kmalloc(km, n_bytes);
	p = (size_t*)ap - 1;
	cap = (*p) * sizeof(header_t) - sizeof(size_t);
	if (cap >= n_bytes) return ap; /* TODO: this prevents shrinking */
	q = (size_t*)kmalloc(km, n_bytes);
	memcpy(q, ap, cap);
	kfree(km, ap);
	return q;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x1e385a
testq %r14, %r14
je 0x1e3876
testq %rbx, %rbx
je 0x1e388c
movq -0x8(%rbx), %r15
shlq $0x4, %r15
addq $-0x8, %r15
cmpq %rdx, %r15
jae 0x1e3867
movq %r14, %rdi
movq %rdx, %rsi
callq 0x1e36fd
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2160
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1e3632
movq %r12, %rbx
jmp 0x1e3867
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1e3632
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
movq %rdx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2370
movq %r14, %rdi
movq %rdx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1e36fd
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/kalloc.cpp
// Function: km_stat
void km_stat(const void *_km, km_stat_t *s)
{
	kmem_t *km = (kmem_t*)_km;
	header_t *p;
	memset(s, 0, sizeof(km_stat_t));
	if (km == NULL || km->loop_head == NULL) return;
	for (p = km->loop_head;; p = p->ptr) {
		s->available += p->size * sizeof(header_t);
		if (p->size != 0) ++s->n_blocks; /* &kmem_t::base is always one of the cores. It is zero-sized. */
		if (p->ptr > p && p + p->size > p->ptr)
			panic("[km_stat] The end of a free block enters another free block.");
		if (p->ptr == km->loop_head) break;
	}
	for (p = km->core_head; p != NULL; p = p->ptr) {
		size_t size = p->size * sizeof(header_t);
		++s->n_cores;
		s->capacity += size;
		s->largest = s->largest > size? s->largest : size;
	}
}

// Assembly:
pushq %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsi)
movups %xmm0, (%rsi)
movq $0x0, 0x20(%rsi)
testq %rdi, %rdi
je 0x1e3951
movq 0x20(%rdi), %rdx
testq %rdx, %rdx
je 0x1e3951
leaq 0x8(%rsi), %rax
movq 0x8(%rsi), %rcx
movq %rdx, %r8
movq (%r8), %r10
testq %r10, %r10
je 0x1e38e2
incq 0x10(%rsi)
shlq $0x4, %r10
addq %r10, %rcx
movq 0x8(%r8), %r9
cmpq %r8, %r9
seta %r11b
addq %r8, %r10
cmpq %r9, %r10
seta %r8b
andb %r11b, %r8b
cmpb $0x1, %r8b
je 0x1e3953
movq %r9, %r8
cmpq %rdx, %r9
jne 0x1e38d6
movq %rcx, (%rax)
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x1e3951
movq (%rsi), %rcx
movq 0x18(%rsi), %rdi
movq 0x20(%rsi), %rdx
movq %rdx, %r8
movq (%rax), %rdx
movq 0x8(%rax), %rax
shlq $0x4, %rdx
incq %rdi
addq %rdx, %rcx
cmpq %rdx, %r8
cmovaq %r8, %rdx
testq %rax, %rax
jne 0x1e3926
movq %rdi, 0x18(%rsi)
movq %rcx, (%rsi)
movq %rdx, 0x20(%rsi)
popq %rax
retq
movq %rcx, %rdi
movq %rax, %rsi
callq 0x2b232
nop
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: stats_sysm_worker(void*, long, int)
static void stats_sysm_worker(void *_data, long eid, int tid)
{
    asg_t *g = (asg_t*)_data;
    asg_arc_t *p = &(g->arc[eid]);
    if(p->del) return;
    uint32_t k, v = p->v^1, w = (p->ul>>32)^1, nv; asg_arc_t *av;
    av = asg_arc_a(g, v); nv = asg_arc_n(g, v);
    for (k = 0; k < nv; k++) {
        if (av[k].del || av[k].v!=w) continue;
        break;
    }
    assert(k < nv);

    v = p->ul>>32; w = p->v;
    av = asg_arc_a(g, v); nv = asg_arc_n(g, v);
    for (k = 0; k < nv; k++) {
        if (av[k].del || av[k].v!=w) continue;
        assert((uint32_t)eid == av-g->arc+k);
    }
}

// Assembly:
pushq %rax
movq 0x8(%rdi), %rcx
leaq (%rsi,%rsi,2), %rax
cmpl $0x0, 0xc(%rcx,%rax,8)
js 0x1e50b3
leaq (%rcx,%rax,8), %r8
movl 0x8(%r8), %eax
movq %rax, %r9
xorq $0x1, %r9
movq 0x28(%rdi), %rdx
movq (%rdx,%r9,8), %r10
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
andq %r10, %r9
je 0x1e5055
movq (%r8), %rdi
shrq $0x20, %rdi
shrq $0x20, %r10
leaq (%r10,%r10,2), %r8
leaq (%rcx,%r8,8), %r8
addq $0xc, %r8
shlq $0x3, %r9
leaq (%r9,%r9,2), %r9
xorl %r10d, %r10d
cmpl $0x0, (%r8,%r10)
js 0x1e504c
movl -0x4(%r8,%r10), %r11d
xorl %edi, %r11d
cmpl $0x1, %r11d
je 0x1e5074
addq $0x18, %r10
cmpq %r10, %r9
jne 0x1e5037
leaq 0x52661(%rip), %rdi     # 0x2376bd
leaq 0x542c2(%rip), %rsi     # 0x239325
leaq 0x590bd(%rip), %rcx     # 0x23e127
movl $0x1c0, %edx            # imm = 0x1C0
callq 0x2110
movq (%rdx,%rdi,8), %rdi
testl %edi, %edi
je 0x1e50b3
movq %rdi, %r8
shrq $0x20, %r8
movl %esi, %edx
movl %edi, %esi
leaq (%r8,%r8,2), %rdi
leaq (%rcx,%rdi,8), %rcx
addq $0xc, %rcx
subq %r8, %rdx
xorl %edi, %edi
cmpl $0x0, (%rcx)
js 0x1e50a7
cmpl %eax, -0x4(%rcx)
jne 0x1e50a7
cmpq %rdi, %rdx
jne 0x1e50b5
incq %rdi
addq $0x18, %rcx
cmpq %rdi, %rsi
jne 0x1e5098
popq %rax
retq
leaq 0x59095(%rip), %rdi     # 0x23e151
leaq 0x54262(%rip), %rsi     # 0x239325
leaq 0x5905d(%rip), %rcx     # 0x23e127
movl $0x1c6, %edx            # imm = 0x1C6
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: get_arcs(asg_t*, unsigned int, unsigned int*, unsigned int)
uint32_t get_arcs(asg_t *g, uint32_t v, uint32_t* idx, uint32_t idx_n)
{
    uint32_t i, kv = 0, an = asg_arc_n(g, v), beg = g->idx[v]>>32;
    for (i = 0, kv = 0; i < an; i++) {
        if(g->arc[beg+i].del) continue;
        if(idx && kv<idx_n) idx[kv] = beg+i;
        kv++;
    }
    return kv;
}

// Assembly:
movq 0x28(%rdi), %rax
movl %esi, %esi
movq (%rax,%rsi,8), %rax
testl %eax, %eax
je 0x1e5128
movq %rax, %rsi
shrq $0x20, %rsi
movq 0x8(%rdi), %rdi
movl %eax, %r8d
xorl %eax, %eax
movl %esi, %r9d
leaq (%r9,%r9,2), %r9
cmpl $0x0, 0xc(%rdi,%r9,8)
js 0x1e5120
testq %rdx, %rdx
setne %r9b
cmpl %ecx, %eax
setb %r10b
andb %r9b, %r10b
cmpb $0x1, %r10b
jne 0x1e511e
movl %eax, %r9d
movl %esi, (%rdx,%r9,4)
incl %eax
incl %esi
decq %r8
jne 0x1e50f2
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: get_flex_arcs(flex_asg_t*, unsigned int, unsigned int*, unsigned int)
uint32_t get_flex_arcs(flex_asg_t *fg, uint32_t v, uint32_t* idx, uint32_t idx_n)
{
    asg_t *g = fg->g; uint32_t i, kv = 0;
    uint32_t an = asg_arc_n(g, v), beg = g->idx[v]>>32;
    for (i = 0, kv = 0; i < an; i++) {
        if(g->arc[beg+i].del) continue;
        if(idx && kv<idx_n) idx[kv] = beg+i;
        kv++;
    }
    for(i = fg->idx[v]; i != ((uint32_t)-1); i = fg->pi.a[i]) {
        if(fg->a[i].del) continue;
        if(idx && kv<idx_n) idx[kv] = (i)|((uint32_t)(0x80000000));
        kv++;
    }
    return kv;
}

// Assembly:
pushq %rbx
movq 0x30(%rdi), %rax
movq 0x28(%rax), %r8
movl %esi, %esi
movq (%r8,%rsi,8), %r10
testl %r10d, %r10d
je 0x1e5185
movq %r10, %r8
shrq $0x20, %r8
movq 0x8(%rax), %r9
movl %r10d, %r10d
xorl %eax, %eax
movl %r8d, %r11d
leaq (%r11,%r11,2), %r11
cmpl $0x0, 0xc(%r9,%r11,8)
js 0x1e517b
testq %rdx, %rdx
setne %r11b
cmpl %ecx, %eax
setb %bl
andb %r11b, %bl
cmpb $0x1, %bl
jne 0x1e5179
movl %eax, %r11d
movl %r8d, (%rdx,%r11,4)
incl %eax
incl %r8d
decq %r10
jne 0x1e514f
jmp 0x1e5187
xorl %eax, %eax
movq 0x38(%rdi), %r8
movl (%r8,%rsi,4), %r8d
cmpl $-0x1, %r8d
je 0x1e51df
movq 0x50(%rdi), %rsi
movq 0x58(%rdi), %rdi
movl %r8d, %r8d
leaq (%r8,%r8,2), %r9
cmpl $0x0, 0xc(%rdi,%r9,8)
js 0x1e51d5
testq %rdx, %rdx
setne %r9b
cmpl %ecx, %eax
setb %r10b
andb %r9b, %r10b
cmpb $0x1, %r10b
jne 0x1e51d3
movl %r8d, %r9d
orl $0x80000000, %r9d       # imm = 0x80000000
movl %eax, %r10d
movl %r9d, (%rdx,%r10,4)
incl %eax
movl (%rsi,%r8,4), %r8d
cmpl $-0x1, %r8d
jne 0x1e519d
popq %rbx
retq