LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/juli9797[P]ssf/src/filetree.hpp
// Function: ssf::Filetree::move_left()
void move_left()
	{

		if (current_path.has_parent_path() &&
			current_path != current_path.root_path())
		{
			current_path = current_path.parent_path();
			if(!parent_selection.empty()){
				update_selection(parent_selection.at(0));
			}
		}
		update();
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
movq %r14, %rdi
callq 0x30f0
testb %al, %al
je 0x9831
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x32c0
movq %r14, %rdi
movq %r15, %rsi
callq 0x31e0
movl %eax, %ebp
movq %r15, %rdi
callq 0x751e
testl %ebp, %ebp
je 0x9831
movq %r15, %rdi
movq %r14, %rsi
callq 0x3400
cmpq %r14, %r15
je 0x97f2
movq %rsp, %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x350c
movq %rsp, %rdi
callq 0x751e
movq 0x48(%rbx), %r14
cmpq 0x50(%rbx), %r14
je 0x9831
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x74c8
movb 0x28(%r14), %al
movb %al, 0x28(%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x827c
leaq 0x28(%rsp), %rdi
callq 0x751e
movq %rbx, %rdi
callq 0x79be
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x751e
movq %rbx, %rdi
callq 0x33b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/juli9797[P]ssf/src/filetree.hpp
// Function: ssf::Filetree::move_right()
void move_right()
	{
		try
		{
			if(!selection.empty())
			{
				auto selected = *selection.begin();
				if (selected.is_directory())
				{
					//THIS IS A DIRTY HACK AND SHOULD BE DONE PROPERLY ASAP
					auto probePerm = get_directory_list(selected.path()); //probe if filesystem throws permission error

					current_path = selected.path();
					if(!probePerm.empty()){
						update_selection(*(probePerm.begin()));
					}
				
				}
				else if (selected.is_regular_file() || selected.is_character_file())
				{
					try
					{
						move_right_on_file();
					}
					catch (std::bad_function_call &e)
					{
					}
				}
			}
		}
		catch (std::filesystem::filesystem_error &e)
		{
		}
		update();
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %r14
cmpq 0x38(%rdi), %r14
je 0x996b
movq %rsp, %rdi
movq %r14, %rsi
callq 0x74c8
movzbl 0x28(%r14), %eax
movb %al, 0x28(%rsp)
cmpl $0x3, %eax
je 0x9894
testl %eax, %eax
jne 0x989c
movq %rsp, %rdi
callq 0x30c0
cmpb $0x2, %al
jne 0x9918
leaq 0x48(%rsp), %rdi
movq %rsp, %rsi
callq 0x74c8
leaq 0x30(%rsp), %rdi
leaq 0x48(%rsp), %rdx
movq %rbx, %rsi
callq 0x7cca
leaq 0x48(%rsp), %rdi
callq 0x751e
leaq 0x8(%rbx), %rdi
movq %rsp, %rsi
callq 0x3300
movq 0x30(%rsp), %r14
cmpq 0x38(%rsp), %r14
je 0x990c
leaq 0x70(%rsp), %rdi
movq %r14, %rsi
callq 0x74c8
movb 0x28(%r14), %al
leaq 0x70(%rsp), %rsi
movb %al, 0x28(%rsi)
movq %rbx, %rdi
callq 0x827c
leaq 0x70(%rsp), %rdi
callq 0x751e
leaq 0x30(%rsp), %rdi
callq 0x5e12
jmp 0x9963
movzbl 0x28(%rsp), %eax
cmpl $0x3, %eax
je 0x9926
testl %eax, %eax
jne 0x992e
movq %rsp, %rdi
callq 0x30c0
cmpb $0x1, %al
je 0x994c
movzbl 0x28(%rsp), %eax
cmpl $0x3, %eax
je 0x9940
testl %eax, %eax
jne 0x9948
movq %rsp, %rdi
callq 0x30c0
cmpb $0x5, %al
jne 0x9963
cmpq $0x0, 0xd0(%rbx)
je 0x9980
leaq 0xc0(%rbx), %rdi
callq *0xd8(%rbx)
movq %rsp, %rdi
callq 0x751e
movq %rbx, %rdi
callq 0x79be
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0x30b0
movq %rdx, %r15
movq %rax, %r14
leaq 0x70(%rsp), %rdi
callq 0x751e
jmp 0x999f
jmp 0x9999
movq %rdx, %r15
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x5e12
jmp 0x99ea
movq %rdx, %r15
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x751e
jmp 0x99ea
jmp 0x99e4
movq %rdx, %r15
movq %rax, %r14
cmpl $0x2, %r15d
jne 0x99ea
movq %r14, %rdi
callq 0x30d0
callq 0x3370
jmp 0x9963
jmp 0x99e4
movq %rdx, %r15
movq %rax, %r14
jmp 0x99f2
movq %rdx, %r15
movq %rax, %r14
movq %rsp, %rdi
callq 0x751e
movq %r14, %rdi
cmpl $0x1, %r15d
jne 0x9a0a
callq 0x30d0
callq 0x3370
jmp 0x996b
callq 0x33b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/CommandLines.cpp
// Function: ha_opt_update_cov(hifiasm_opt_t*, int)
void ha_opt_update_cov(hifiasm_opt_t *opt, int hom_cov)
{
	int max_n_chain = (int)(hom_cov * opt->high_factor + .499);
	opt->hom_cov = hom_cov;
	if (opt->max_n_chain < max_n_chain)
		opt->max_n_chain = max_n_chain;
	fprintf(stderr, "[M::%s] updated max_n_chain to %d\n", __func__, opt->max_n_chain);
}

// Assembly:
cvtsi2sd %esi, %xmm0
mulsd 0xb8(%rdi), %xmm0
addsd 0x22b0a3(%rip), %xmm0   # 0x22e010
cvttsd2si %xmm0, %eax
movl %esi, 0xd0(%rdi)
movl 0xe8(%rdi), %ecx
cmpl %eax, %ecx
jge 0x2f89
movl %eax, 0xe8(%rdi)
movl %eax, %ecx
movq 0x292050(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
leaq 0x22ca3f(%rip), %rsi    # 0x22f9d9
leaq 0x22ca5b(%rip), %rdx    # 0x22f9fc
xorl %eax, %eax
jmp 0x22b0
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/CommandLines.cpp
// Function: ha_opt_update_cov_min(hifiasm_opt_t*, int, int)
void ha_opt_update_cov_min(hifiasm_opt_t *opt, int hom_cov, int min_chain)
{
	int max_n_chain = (int)(hom_cov * opt->high_factor + .499);
	opt->hom_cov = hom_cov; opt->max_n_chain = max_n_chain;
    if(opt->max_n_chain < min_chain) opt->max_n_chain = min_chain;
	fprintf(stderr, "[M::%s] updated max_n_chain to %d\n", __func__, opt->max_n_chain);
}

// Assembly:
cvtsi2sd %esi, %xmm0
mulsd 0xb8(%rdi), %xmm0
addsd 0x22b054(%rip), %xmm0   # 0x22e010
cvttsd2si %xmm0, %ecx
movl %esi, 0xd0(%rdi)
cmpl %edx, %ecx
cmovlel %edx, %ecx
movl %ecx, 0xe8(%rdi)
movq 0x292008(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
leaq 0x22c9f7(%rip), %rsi    # 0x22f9d9
leaq 0x22ca25(%rip), %rdx    # 0x22fa0e
xorl %eax, %eax
jmp 0x22b0
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Assembly.cpp
// Function: hap_recalculate_peaks(char*)
void hap_recalculate_peaks(char* output_file_name)
{
    destory_read_bin(&R_INF);
    destory_ma_hit_t_alloc(R_INF.paf);
    destory_ma_hit_t_alloc(R_INF.reverse_paf);

    char* gfa_name = (char*)malloc(strlen(output_file_name)+25);
	sprintf(gfa_name, "%s.ec", output_file_name);

    int hom_cov, het_cov;
    // construct hash table for high occurrence k-mers
    if (!(asm_opt.flag & HA_F_NO_KMER_FLT)) {
        ha_flt_tab = ha_ft_gen(&asm_opt, &R_INF, &hom_cov, 0, 0);
        ha_opt_update_cov(&asm_opt, hom_cov);
    }
    free(R_INF.read_length);
    free(R_INF.name_index);

    load_All_reads(&R_INF, gfa_name);

    ha_idx = ha_pt_gen(&asm_opt, ha_flt_tab, 1, 0, &R_INF, &hom_cov, &het_cov); // build the index
    asm_opt.hom_cov = hom_cov;
    asm_opt.het_cov = het_cov;
    ha_pt_destroy(ha_idx);
    ha_idx = 0;

    destory_read_bin(&R_INF);
    free(gfa_name);

    load_all_data_from_disk(&R_INF.paf, &R_INF.reverse_paf, asm_opt.output_file_name); 
    fprintf(stderr, "M::%s has done.\n", __func__);   
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
leaq 0x291c67(%rip), %rdi    # 0x296230
callq 0x32a2c
movq 0x291cd3(%rip), %rdi    # 0x2962a8
callq 0xa0c91
movq 0x291ccf(%rip), %rdi    # 0x2962b0
callq 0xa0c91
movq %r14, %rdi
callq 0x2090
leaq 0x19(%rax), %rdi
callq 0x2280
movq %rax, %rbx
leaq 0x22c8c7(%rip), %rsi    # 0x230ec8
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0x291143(%rip), %r14    # 0x295758
testb $0x2, (%r14)
jne 0x4654
leaq 0x291136(%rip), %r15    # 0x295758
leaq 0x291c07(%rip), %rsi    # 0x296230
leaq 0x10(%rsp), %r12
movq %r15, %rdi
movq %r12, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1390f
leaq 0x291deb(%rip), %rcx    # 0x296430
movq %rax, (%rcx)
movl (%r12), %esi
movq %r15, %rdi
callq 0x2f59
leaq 0x291bd5(%rip), %r15    # 0x296230
movq 0x291be6(%rip), %rdi    # 0x296248
callq 0x2220
movq 0x291c02(%rip), %rdi    # 0x296270
callq 0x2220
movq %r15, %rdi
movq %rbx, %rsi
callq 0x31d8d
leaq 0x291dab(%rip), %rax    # 0x296430
movq (%rax), %rsi
leaq 0x14(%rsp), %r13
movq %r13, (%rsp)
pushq $0x1
popq %rdx
leaq 0x10(%rsp), %r12
movq %r14, %rdi
xorl %ecx, %ecx
movq %r15, %r8
movq %r12, %r9
callq 0x13d74
leaq 0x291d88(%rip), %rbp    # 0x296438
movq %rax, (%rbp)
movl (%r12), %ecx
movl %ecx, 0xd0(%r14)
movl (%r13), %ecx
movl %ecx, 0xd4(%r14)
movq %rax, %rdi
callq 0x1193ff
andq $0x0, (%rbp)
movq %r15, %rdi
callq 0x32a2c
movq %rbx, %rdi
callq 0x2220
movq 0x10(%r14), %rdx
leaq 0x291bb6(%rip), %rdi    # 0x2962a8
leaq 0x291bb7(%rip), %rsi    # 0x2962b0
callq 0xe1530
movq 0x2908db(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
leaq 0x22c7bf(%rip), %rsi    # 0x230ece
leaq 0x22c7c9(%rip), %rdx    # 0x230edf
xorl %eax, %eax
callq 0x22b0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Correct.cpp
// Function: print_graph(Graph*)
void print_graph(Graph* DAGCon)
{
    uint64_t i;
    for (i = 0; i < DAGCon->g_nodes.length; i++)
    {
        Node* currentStartNode = &(G_Node(*DAGCon, i));
        RSet iter_out;

        if(If_Node_Exist(*currentStartNode))
        {
            fprintf(stderr, "ID: %lu (%c) (w: %lu)\n", (unsigned long)(*currentStartNode).ID, (*currentStartNode).base, (unsigned long)(*currentStartNode).weight);
            clear_RSet(&iter_out);
            Edge* e;
            fprintf(stderr, "****Out-node: ");
            while(getOutputEdges(&iter_out, DAGCon, currentStartNode, &e))
            {
                //fprintf(stderr, "%d[%c], ", G_Node(*DAGCon, e->out_node).ID, G_Node(*DAGCon, e->out_node).base);
                fprintf(stderr, "%lu(w: %lu), ", (unsigned long)G_Node(*DAGCon, e->out_node).ID, (unsigned long)e->weight);
            }
            fprintf(stderr, "\n");


            // clear_RSet(&iter_out);
            // fprintf(stderr, "In-node: ");
            // while(getInputEdges(&iter_out, DAGCon, currentStartNode, &e))
            // {
            //     fprintf(stderr, "%d[%c], ", G_Node(*DAGCon, e->in_node).ID, G_Node(*DAGCon, e->in_node).base);
            // }
        }
    }

    fprintf(stderr, "*******\n");

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x60(%rdi), %rax
testq %rax, %rax
jne 0x5189
movq 0x28fe7a(%rip), %rax    # 0x294fe0
movq (%rax), %rcx
leaq 0x233678(%rip), %rdi    # 0x2387e8
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2410
movq %rdi, %rbx
movq 0x28fe4d(%rip), %r14    # 0x294fe0
pushq $0xa
popq %rbp
xorl %r15d, %r15d
movq 0x18(%rbx), %r12
movq %r15, %rdx
shlq $0x7, %rdx
movsbl 0x18(%r12,%rdx), %ecx
cmpl $0x44, %ecx
jne 0x51b9
incq %r15
cmpq %rax, %r15
jb 0x5199
jmp 0x515f
addq %rdx, %r12
movq (%r14), %rdi
movq (%r12), %rdx
movq 0x8(%r12), %r8
leaq 0x22c855(%rip), %rsi    # 0x231a24
xorl %eax, %eax
callq 0x22b0
movq (%r14), %rcx
leaq 0x22c85b(%rip), %rdi    # 0x231a3b
pushq $0xe
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
movq 0x50(%r12), %rax
testq %rax, %rax
jle 0x5258
xorl %r13d, %r13d
movq 0x40(%r12), %rcx
imulq $0x38, %r13, %rdx
addq %rdx, %rcx
addq $0x10, %rcx
incq %r13
negq %rax
movq -0x8(%rcx), %rdx
cmpq $-0x1, %rdx
jne 0x522e
addq $0x38, %rcx
leaq (%rax,%r13), %rdx
incq %rdx
incq %r13
cmpq $0x1, %rdx
jne 0x520e
jmp 0x5258
movq (%r14), %rdi
movq 0x18(%rbx), %rax
shlq $0x7, %rdx
movq (%rax,%rdx), %rdx
movq (%rcx), %rcx
leaq 0x22c803(%rip), %rsi    # 0x231a4a
xorl %eax, %eax
callq 0x22b0
movq 0x50(%r12), %rax
cmpq %rax, %r13
jl 0x51f8
movq (%r14), %rsi
movl %ebp, %edi
callq 0x2270
movq 0x60(%rbx), %rax
jmp 0x51af
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Correct.cpp
// Function: prt_sub_read(char*, unsigned long, unsigned long, unsigned long)
void prt_sub_read(char *str, uint64_t str_l, uint64_t site, uint64_t win)
{
    uint64_t k, s, e;
    s = ((site >= win)?(site-win):(0)); 
    e = (((site+win+1) <= str_l)?(site+win+1):(str_l));
    fprintf(stderr, "[M::%s-site::%lu] [%lu, %lu)\n", __func__, site, s, e);

    for (k = s; k < site; k++) fprintf(stderr, "%c", str[k]);
    fprintf(stderr, "[%c]", str[k++]);
    for (; k < e; k++) fprintf(stderr, "%c", str[k]);

    fprintf(stderr, "\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, %rax
subq %rcx, %rax
movl $0x0, %r13d
cmovaeq %rax, %r13
leaq (%rdx,%rcx), %rax
incq %rax
cmpq %rsi, %rax
cmovbq %rax, %rbx
movq 0x28fd39(%rip), %rbp    # 0x294fe0
movq (%rbp), %rdi
leaq 0x22ca09(%rip), %rsi    # 0x231cbb
leaq 0x22ca20(%rip), %rdx    # 0x231cd9
movq %r15, %rcx
movq %r13, %r8
movq %rbx, %r9
xorl %eax, %eax
callq 0x22b0
cmpq %r15, %r13
jae 0x5300
movq %r15, %rax
incq %r15
cmpq %rax, %r12
cmovaeq %rax, %r12
negq %r12
movq %rax, (%rsp)
leaq (%r14,%rax), %r13
movq (%rbp), %rsi
movsbl (%r13,%r12), %edi
callq 0x2270
incq %r12
jne 0x52e6
movq (%rsp), %r13
jmp 0x5304
leaq 0x1(%r13), %r15
movq (%rbp), %rdi
movsbl (%r14,%r13), %edx
leaq 0x22c9d2(%rip), %rsi    # 0x231ce6
xorl %eax, %eax
callq 0x22b0
cmpq %rbx, %r15
jae 0x5336
movq (%rbp), %rsi
movsbl (%r14,%r15), %edi
callq 0x2270
incq %r15
cmpq %r15, %rbx
jne 0x5320
movq (%rbp), %rsi
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2270
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Correct.cpp
// Function: prt_overlap_region_stat(overlap_region*, long)
void prt_overlap_region_stat(overlap_region *z, int64_t sid)
{
    uint64_t k = 0, aln = 0, ualn = 0, err = 0;
    for (k = 0; k < z->w_list.n; k++) {
        if(is_ualn_win(z->w_list.a[k])) {
            ualn += z->w_list.a[k].x_end+1-z->w_list.a[k].x_start;
        } else {
            aln += z->w_list.a[k].x_end+1-z->w_list.a[k].x_start;
            err += z->w_list.a[k].error;
        }
    }
    fprintf(stderr, "[M::%s::utg%.6dl::%c] sid::%ld, q::[%d, %d), t::[%d, %d), aln::%lu, ualn::%lu, err::%lu\n", 
        __func__, (int32_t)z->y_id+1, "+-"[z->y_pos_strand], sid, z->x_pos_s, z->x_pos_e+1, 
        z->y_pos_s, z->y_pos_e+1, aln, ualn, err);
    
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r9
movq 0x48(%rdi), %rax
testq %rax, %rax
jne 0x5573
xorl %r10d, %r10d
xorl %ebx, %ebx
xorl %r11d, %r11d
movq 0x28fad1(%rip), %rax    # 0x294fe0
movq (%rax), %rax
movl 0x10(%rdi), %ecx
incl %ecx
movl 0x1c(%rdi), %edx
leaq 0x22cdb2(%rip), %rsi    # 0x2322d3
movsbl (%rdx,%rsi), %r8d
movl 0x4(%rdi), %r14d
movl 0x8(%rdi), %r15d
incl %r15d
movl 0x14(%rdi), %r12d
movl 0x18(%rdi), %r13d
incl %r13d
subq $0x8, %rsp
leaq 0x22eb29(%rip), %rsi    # 0x234070
leaq 0x22eb7b(%rip), %rdx    # 0x2340c9
movq %rax, %rdi
xorl %eax, %eax
pushq %r11
pushq %rbx
pushq %r10
pushq %r13
pushq %r12
pushq %r15
pushq %r14
callq 0x22b0
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x58(%rdi), %rcx
xorl %r11d, %r11d
xorl %ebx, %ebx
xorl %r10d, %r10d
movswq 0x14(%rcx), %rdx
cmpq $0x7fff, %rdx           # imm = 0x7FFF
jne 0x559a
cmpl $0x0, 0x1c(%rcx)
jne 0x559a
cmpw $0x0, 0x12(%rcx)
js 0x55b8
movl 0x4(%rcx), %esi
subl (%rcx), %esi
incl %esi
movslq %esi, %rsi
addq %rsi, %r10
addq %rdx, %r11
addq $0x20, %rcx
decq %rax
jne 0x557f
jmp 0x5508
movl 0x4(%rcx), %edx
subl (%rcx), %edx
incl %edx
movslq %edx, %rdx
addq %rdx, %rbx
jmp 0x55aa
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Correct.cpp
// Function: prt_overlap_region_phase_stat(overlap_region*, long)
void prt_overlap_region_phase_stat(overlap_region *z, int64_t sid)
{
    uint64_t k = 0;
    fprintf(stderr, "[M::%s::utg%.6dl::%c] sid::%ld, q::[%d, %d), t::[%d, %d)\n", __func__, 
        (int32_t)z->y_id+1, "+-"[z->y_pos_strand], sid, z->x_pos_s, z->x_pos_e+1, z->y_pos_s, z->y_pos_e+1);
    for (k = 0; k < z->w_list.n; k++) {
        fprintf(stderr, "[k::%lu] sid::%ld, q::[%d, %d), sec::%u\n", k, sid,
        z->w_list.a[k].x_start, z->w_list.a[k].x_end, z->w_list.a[k].clen);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x28fa01(%rip), %r13    # 0x294fe0
movq (%r13), %rdi
movl 0x10(%r14), %ecx
incl %ecx
movl 0x1c(%r14), %eax
leaq 0x22ccdf(%rip), %rdx    # 0x2322d3
movsbl (%rax,%rdx), %r8d
movl 0x4(%r14), %r10d
movl 0x8(%r14), %r11d
incl %r11d
movl 0x14(%r14), %r15d
movl 0x18(%r14), %r12d
incl %r12d
leaq 0x22eacb(%rip), %rsi    # 0x2340e1
leaq 0x22eafe(%rip), %rdx    # 0x23411b
movq %rbx, %r9
xorl %eax, %eax
pushq %r12
pushq %r15
pushq %r11
pushq %r10
callq 0x22b0
addq $0x20, %rsp
cmpq $0x0, 0x48(%r14)
je 0x5681
leaq 0x22eaf8(%rip), %r15    # 0x234139
xorl %ebp, %ebp
xorl %r12d, %r12d
movq (%r13), %rdi
movq 0x58(%r14), %rax
movl (%rax,%rbp), %r8d
movl 0x4(%rax,%rbp), %r9d
movl 0x1c(%rax,%rbp), %r10d
subq $0x8, %rsp
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
xorl %eax, %eax
pushq %r10
callq 0x22b0
popq %rcx
popq %rdx
incq %r12
addq $0x20, %rbp
cmpq 0x48(%r14), %r12
jb 0x5646
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: asg_arc_del_short(asg_t*, float)
int asg_arc_del_short(asg_t *g, float drop_ratio)
{
	uint32_t v, n_vtx = g->n_seq * 2, n_short = 0;
	for (v = 0; v < n_vtx; ++v) {
		asg_arc_t *av = asg_arc_a(g, v);
		uint32_t i, thres, nv = asg_arc_n(g, v);
		///if there is just one overlap, do nothing
		if (nv < 2) continue;
		//av[0] has the most overlap length
		///remove short overlaps
		thres = (uint32_t)(av[0].ol * drop_ratio + .499);
		///av has been sorted by overlap length
		for (i = nv - 1; i >= 1 && av[i].ol < thres; --i);
		for (i = i + 1; i < nv; ++i)
			av[i].del = 1, ++n_short;
	}
	if (n_short) {
		asg_cleanup(g);
		asg_symm(g);
	}
	fprintf(stderr, "[M::%s] removed %d short overlaps\n", __func__, n_short);
	return n_short;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x14(%rdi), %eax
addl %eax, %eax
je 0x69d4
movq %rdi, %r14
movl %eax, %eax
xorl %ecx, %ecx
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movsd 0x2276ef(%rip), %xmm1   # 0x22e010
pushq $0x1
popq %rsi
xorl %ebx, %ebx
movq 0x28(%r14), %rdi
movq (%rdi,%rcx,8), %rdi
cmpl $0x2, %edi
jb 0x69c4
movq 0x8(%r14), %r8
movq %rdi, %r9
shrq $0x20, %r9
imulq $0x18, %r9, %r11
leaq (%r8,%r11), %r9
movl 0xc(%r9), %r9d
andl %edx, %r9d
cvtsi2ss %r9d, %xmm2
mulss %xmm0, %xmm2
cvtss2sd %xmm2, %xmm2
addsd %xmm1, %xmm2
cvttsd2si %xmm2, %r15
movl %edi, %r9d
leal 0x1(%rdi), %r10d
imulq $0x18, %r9, %r12
leaq (%r8,%r11), %r13
addq $-0xc, %r13
cmpq $0x18, %r12
je 0x6995
movl (%r13,%r12), %ebp
andl %edx, %ebp
decl %r10d
addq $-0x18, %r12
cmpl %r15d, %ebp
jb 0x697a
jmp 0x6998
movl %esi, %r10d
cmpl %edi, %r10d
jae 0x69c4
movl %r10d, %r15d
addl %edi, %ebx
imulq $0x18, %r15, %rdi
addq %rdi, %r11
leaq (%r8,%r11), %rdi
addq $0xc, %rdi
subq %r15, %r9
orb $-0x80, 0x3(%rdi)
addq $0x18, %rdi
decq %r9
jne 0x69b4
subl %r10d, %ebx
incq %rcx
cmpq %rax, %rcx
jne 0x6926
testl %ebx, %ebx
jne 0x69d8
xorl %ebx, %ebx
jmp 0x69f5
movq %r14, %rdi
callq 0xa0a7d
movq %r14, %rdi
callq 0xa0ab6
movq %r14, %rdi
callq 0xa0b79
orb $-0x80, 0x17(%r14)
movq 0x28e5e4(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
leaq 0x22f794(%rip), %rsi    # 0x23619a
leaq 0x22f7b0(%rip), %rdx    # 0x2361bd
movl %ebx, %ecx
xorl %eax, %eax
callq 0x22b0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: asg_arc_del_short_diploid_unclean_exact(asg_t*, float, ma_hit_t_alloc*)
int asg_arc_del_short_diploid_unclean_exact(asg_t *g, float drop_ratio, ma_hit_t_alloc* sources)
{
	uint32_t v, n_vtx = g->n_seq * 2, n_short = 0;
	for (v = 0; v < n_vtx; ++v) 
    {
        if (g->seq[v>>1].del) continue;

		asg_arc_t *av = asg_arc_a(g, v);
		uint32_t i, nv = asg_arc_n(g, v);
		///if there is just one overlap, do nothing
		if (nv < 2) continue;
		///keep the longest one
        for (i = 1; i < nv; i++)
        {
            ///if it is an inexact overlap
            if(av[i].el == 0 && 
              sources[v>>1].is_fully_corrected == 1&& 
              sources[(av[i].v>>1)].is_fully_corrected == 1)
            {
                av[i].del = 1;
                ++n_short;
            }
        }

	}

	if (n_short) 
    {
		asg_cleanup(g);
		asg_symm(g);
	}
	fprintf(stderr, "[M::%s] removed %d inexact overlaps\n", __func__, n_short);
	return n_short;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x14(%rdi), %eax
addl %eax, %eax
je 0x6c53
movq %rdi, %r14
movl %eax, %eax
xorl %ecx, %ecx
xorl %ebx, %ebx
movq 0x20(%r14), %rdi
movl %ecx, %edx
shrl %edx
cmpl $0x0, (%rdi,%rdx,8)
js 0x6c47
movq 0x28(%r14), %rdi
movq (%rdi,%rcx,8), %rdi
testl $0xfffffffe, %edi       # imm = 0xFFFFFFFE
je 0x6c47
movq 0x8(%r14), %r8
movq %rdi, %r9
shrq $0x20, %r9
imulq $0x18, %rdx, %rdx
addq %rsi, %rdx
addq $0x10, %rdx
movl %edi, %edi
imulq $0x18, %r9, %r9
addq %r9, %r8
addq $0x2a, %r8
decq %rdi
cmpb $0x0, (%r8)
jne 0x6c3e
cmpb $0x1, (%rdx)
jne 0x6c3e
movl -0xa(%r8), %r9d
shrl %r9d
imulq $0x18, %r9, %r9
cmpb $0x1, 0x10(%rsi,%r9)
jne 0x6c3e
orb $-0x80, -0x3(%r8)
incl %ebx
addq $0x18, %r8
decq %rdi
jne 0x6c19
incq %rcx
cmpq %rax, %rcx
jne 0x6bd5
testl %ebx, %ebx
jne 0x6c57
xorl %ebx, %ebx
jmp 0x6c74
movq %r14, %rdi
callq 0xa0a7d
movq %r14, %rdi
callq 0xa0ab6
movq %r14, %rdi
callq 0xa0b79
orb $-0x80, 0x17(%r14)
movq 0x28e365(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
leaq 0x22f584(%rip), %rsi    # 0x236209
leaq 0x22f5a2(%rip), %rdx    # 0x23622e
movl %ebx, %ecx
xorl %eax, %eax
callq 0x22b0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: prt_scaf_stats(sec_t*, ma_ug_t*, char const*, unsigned long)
void prt_scaf_stats(sec_t *scp, ma_ug_t *ctg, const char* prefix, uint64_t id)
{
    uint64_t k, tl0, tl1; ma_utg_t *z = NULL; char name[32];
    for (k = tl0 = tl1 = 0; k < scp->n; k++) {
        z = &(ctg->u.a[((uint32_t)scp->a[k])>>1]); tl0 += z->len; tl1 += (scp->a[k]>>32);
    }
    sprintf(name, "%s%.6lu%c", prefix, id + 1, "lc"[scp->is_c]);

    fprintf(stderr, "[M::%s] [M::%s] tot::%lu\tel::%lu\tnl::%lu\tis_c::%lu\t#::%lu\t%s\n", __func__, name, tl0+tl1, tl0, tl1, scp->is_c, (uint64_t)scp->n, ((scp->n>1)?"scf":"ctg"));
    for (k = 0; k < scp->n; k++) {
        z = &(ctg->u.a[((uint32_t)scp->a[k])>>1]);
        fprintf(stderr, "%s%.6u%c(%c)\tlen::%u\tNs::%lu\n", 
        prefix, (((uint32_t)scp->a[k])>>1)+1, "lc"[z->circ], "+-"[(((uint32_t)scp->a[k])&1)], z->len, (scp->a[k]>>32));
    }
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdi), %rax
testq %rax, %rax
jne 0x7835
xorl %r12d, %r12d
xorl %ebp, %ebp
jmp 0x786f
movq 0x10(%r14), %rdx
movq 0x18(%r15), %rsi
xorl %ebp, %ebp
xorl %r12d, %r12d
xorl %edi, %edi
movq (%rsi,%rdi,8), %r8
movl %r8d, %r9d
shrl %r9d
imulq $0x28, %r9, %r9
movl (%rdx,%r9), %r9d
andl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
addq %r9, %r12
shrq $0x20, %r8
addq %r8, %rbp
incq %rdi
cmpq %rdi, %rax
jne 0x7844
incq %rcx
movq 0x10(%r15), %rax
leaq 0x22cebe(%rip), %rdx    # 0x23473b
movsbl (%rax,%rdx), %r8d
leaq 0x22ec89(%rip), %rsi    # 0x236512
movq %rsp, %r13
movq %r13, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2050
movq 0x28d740(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
leaq (%r12,%rbp), %r8
movq 0x8(%r15), %r10
cmpq $0x2, %r10
leaq 0x22ecb3(%rip), %rax    # 0x236569
leaq 0x22ecb0(%rip), %r11    # 0x23656d
cmovaeq %rax, %r11
leaq 0x22ec54(%rip), %rsi    # 0x23651c
leaq 0x22ec8b(%rip), %rdx    # 0x23655a
movq %r13, %rcx
movq %r12, %r9
xorl %eax, %eax
pushq %r11
pushq %r10
pushq 0x10(%r15)
pushq %rbp
callq 0x22b0
addq $0x20, %rsp
cmpq $0x0, 0x8(%r15)
je 0x7969
leaq 0x22a9dc(%rip), %r13    # 0x2322d3
leaq 0x22ec73(%rip), %r12    # 0x236571
xorl %ebp, %ebp
movq 0x10(%r14), %rax
movq 0x18(%r15), %rcx
movq (%rcx,%rbp,8), %r10
movl %r10d, %ecx
shrl %ecx
imulq $0x28, %rcx, %rdx
movq 0x28d6c4(%rip), %rsi    # 0x294fe0
movq (%rsi), %rdi
incl %ecx
movl (%rax,%rdx), %r11d
movl %r11d, %eax
shrl $0x1f, %eax
leaq 0x22ce09(%rip), %rdx    # 0x23473b
movsbl (%rax,%rdx), %r8d
movl %r10d, %eax
andl $0x1, %eax
movsbl (%rax,%r13), %r9d
andl $0x7fffffff, %r11d      # imm = 0x7FFFFFFF
shrq $0x20, %r10
movq %r12, %rsi
movq %rbx, %rdx
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0x22b0
popq %rcx
popq %rdx
incq %rbp
cmpq 0x8(%r15), %rbp
jb 0x7900
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: print_utg_stats(ma_ug_t*, char const*)
void print_utg_stats(ma_ug_t *ug, const char* command)
{
    uint32_t i;
    uint64_t len, occ_n, occ_m, occ_n_0;
    for (i = len = occ_n = occ_m = occ_n_0 = 0; i < ug->u.n; ++i) {
		ma_utg_t *u = &ug->u.a[i];
        len += u->len;
        occ_n += u->n;
        occ_m += u->m;
        if(u->n == 0) occ_n_0++;
    }

    fprintf(stderr, "%s: len: %lu, occ_n: %lu, occ_m: %lu, occ_n_0: %lu\n", 
                                command, len, occ_n, occ_m, occ_n_0);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rdx
movq (%rdi), %rsi
testq %rsi, %rsi
jne 0x7c10
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
xorl %eax, %eax
jmp 0x7c57
movq 0x10(%rdi), %rdi
addq $0x10, %rdi
pushq $0x1
popq %r10
xorl %eax, %eax
xorl %r9d, %r9d
xorl %r8d, %r8d
xorl %ecx, %ecx
movl -0x10(%rdi), %r11d
movl -0x4(%rdi), %ebx
andl $0x7fffffff, %r11d      # imm = 0x7FFFFFFF
addq %r11, %rcx
movl (%rdi), %r11d
addq %r11, %r8
addq %rbx, %r9
cmpq $0x1, %r11
adcq $0x0, %rax
movl %r10d, %r11d
addq $0x28, %rdi
incl %r10d
cmpq %r11, %rsi
ja 0x7c26
movq 0x28d382(%rip), %rsi    # 0x294fe0
movq (%rsi), %rdi
movq %rax, (%rsp)
leaq 0x22ec74(%rip), %rsi    # 0x2368e0
xorl %eax, %eax
callq 0x22b0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: print_buf_t(ma_ug_t*, buf_t*, char const*)
void print_buf_t(ma_ug_t *ug, buf_t* x, const char* command)
{
    fprintf(stderr, "%s\n", command);
    uint32_t i, ori;
    ma_utg_t* u = NULL;
    for (i = 0; i < x->b.n; i++)
    {
        u = &(ug->u.a[x->b.a[i]>>1]);
        if(u->n == 0) continue;
        ori = x->b.a[i] & 1;
        fprintf(stderr, "utg%.6ul\tori:%u\tocc:%u\tlen:%u\n", (x->b.a[i]>>1)+1, ori, (uint32_t)u->n, u->len);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x28d34f(%rip), %r12    # 0x294fe0
movq (%r12), %rdi
leaq 0x2346b1(%rip), %rsi    # 0x23c34d
xorl %eax, %eax
callq 0x22b0
movq 0x38(%rbx), %rax
testq %rax, %rax
je 0x7d08
pushq $0x1
popq %rbp
movl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
leaq 0x22ecfa(%rip), %r15    # 0x2369b6
xorl %ecx, %ecx
movq 0x10(%r14), %rsi
movq 0x48(%rbx), %rdx
movl (%rdx,%rcx,4), %ecx
movl %ecx, %edx
shrl %edx
imulq $0x28, %rdx, %rdi
movl 0x10(%rsi,%rdi), %r8d
testl %r8d, %r8d
jne 0x7ce6
movl %ebp, %ecx
incl %ebp
cmpq %rcx, %rax
ja 0x7cbe
jmp 0x7d08
addq %rdi, %rsi
andl $0x1, %ecx
movq (%r12), %rdi
incl %edx
movl (%rsi), %r9d
andl %r13d, %r9d
movq %r15, %rsi
xorl %eax, %eax
callq 0x22b0
movq 0x38(%rbx), %rax
jmp 0x7cdb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: dbg_prt_utg_trans(kv_u_trans_t*, ma_ug_t*, char const*)
void dbg_prt_utg_trans(kv_u_trans_t *ta, ma_ug_t *ug, const char *o_n)
{
    char* gfa_name = (char*)malloc(strlen(o_n)+100); 
    FILE *fn = NULL; sprintf(gfa_name, "%s.tran.dbg.ovlp.log", o_n);
    u_trans_t *p = NULL; uint32_t i; fn = fopen(gfa_name, "w");
    for (i = 0; i < ta->n; i++) {
        p = &(ta->a[i]);
        fprintf(fn, "utg%.6u%c\t%u\t%u\t%u\t%c\tutg%.6u%c\t%u\t%u\t%u\tw(%f)\tf(%u)\n", 
        p->qn+1, "lc"[ug->u.a[p->qn].circ], ug->u.a[p->qn].len, p->qs, p->qe, "+-"[p->rev],
        p->tn+1, "lc"[ug->u.a[p->tn].circ], ug->u.a[p->tn].len, p->ts, p->te, p->nw, p->f);
    }
    fclose(fn); free(gfa_name); fprintf(stderr, "[M::%s::] done\n", __func__);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, %rdi
callq 0x2090
leaq 0x64(%rax), %rdi
callq 0x2280
movq %rax, %r15
leaq 0x22ea46(%rip), %rsi    # 0x236ca2
movq %rax, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0x240472(%rip), %rsi    # 0x2486e2
movq %r15, 0x8(%rsp)
movq %r15, %rdi
callq 0x2210
movq %rax, (%rsp)
cmpq $0x0, (%r14)
je 0x8378
pushq $0x1
popq %rbp
xorl %ecx, %ecx
movq %rbx, 0x10(%rsp)
movq 0x10(%r14), %rax
imulq $0x30, %rcx, %rsi
movl 0x8(%rax,%rsi), %ecx
leal 0x1(%rcx), %edx
movq 0x10(%rbx), %rdi
imulq $0x28, %rcx, %rcx
movl (%rdi,%rcx), %r8d
movl %r8d, %ecx
shrl $0x1f, %ecx
leaq 0x22c47e(%rip), %r9     # 0x23473b
movsbl (%rcx,%r9), %ecx
movl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
andl %r9d, %r8d
movl (%rax,%rsi), %r9d
movl 0x4(%rax,%rsi), %r10d
movq %r10, 0x20(%rsp)
movzbl 0x28(%rax,%rsi), %r12d
btl $0x6, %r12d
leaq 0x229fe8(%rip), %r11    # 0x2322d3
adcq $0x0, %r11
movsbl (%r11), %r10d
movq %r10, 0x18(%rsp)
movl 0x14(%rax,%rsi), %r15d
leal 0x1(%r15), %ebx
imulq $0x28, %r15, %r15
movl (%rdi,%r15), %r15d
movl 0xc(%rax,%rsi), %r13d
movsd 0x20(%rax,%rsi), %xmm0
movq %r14, %r10
movl 0x10(%rax,%rsi), %r14d
movl %r15d, %eax
shrl $0x1f, %eax
leaq 0x22c412(%rip), %rsi    # 0x23473b
movsbl (%rax,%rsi), %r11d
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andl %eax, %r15d
andl $0x3f, %r12d
movq (%rsp), %rdi
leaq 0x22e972(%rip), %rsi    # 0x236cb7
movb $0x1, %al
pushq %r12
pushq %r14
movq %r10, %r14
pushq %r13
pushq %r15
pushq %r11
pushq %rbx
movq 0x40(%rsp), %rbx
pushq 0x48(%rsp)
pushq 0x58(%rsp)
callq 0x22b0
addq $0x40, %rsp
movl %ebp, %ecx
incl %ebp
cmpq %rcx, (%r14)
ja 0x8295
movq (%rsp), %rdi
callq 0x2190
movq 0x8(%rsp), %rdi
callq 0x2220
movq 0x28cc4e(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
leaq 0x22e951(%rip), %rsi    # 0x236ced
leaq 0x22e95a(%rip), %rdx    # 0x236cfd
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22b0
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: trans_sec_cut_filter_mmhap(kv_u_trans_t*, ma_ug_t*, asg_t*, ma_hit_t_alloc*)
void trans_sec_cut_filter_mmhap(kv_u_trans_t *ta, ma_ug_t *ug, asg_t *sg, ma_hit_t_alloc* src)
{
    uint64_t k, hom_cov, het_cov, hom_cut; 
    asg64_v b64; kv_init(b64);
    uint64_t *cc = gen_cov_rg(ug, sg, src);
    if(asm_opt.hom_global_coverage_set) {
        hom_cov = asm_opt.hom_global_coverage;
    } else {
        hom_cov = ((double)asm_opt.hom_global_coverage)/((double)HOM_PEAK_RATE);
    }
    het_cov = hom_cov/asm_opt.polyploidy;
    hom_cut = hom_cov + (het_cov*(0.5+(((double)asm_opt.polyploidy)*0.05)));

    fprintf(stderr, "+[M::%s]\thom_cov::%lu\thet_cov::%lu\thom_cut::%lu\n", __func__, 
        hom_cov, het_cov, hom_cut);

    for (k = 0; k < ug->g->n_seq; k++) {
        purge_ovlp_cov(k, ta, ug, sg, &b64, cc, hom_cut);
    }
    free(cc); kv_destroy(b64);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
movq %rsi, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0xc69da
leaq 0x28d153(%rip), %rdx    # 0x295758
movslq 0x144(%rdx), %rsi
cvtsi2sd %esi, %xmm1
divsd 0x22d748(%rip), %xmm1   # 0x235d60
cvttsd2si %xmm1, %rdi
movsd 0x228ce3(%rip), %xmm0   # 0x231308
subsd %xmm0, %xmm1
cvttsd2si %xmm1, %r8
movq %rdi, %rcx
sarq $0x3f, %rcx
andq %r8, %rcx
orq %rdi, %rcx
cmpl $0x0, 0x148(%rdx)
cmovneq %rsi, %rcx
movq %rax, %r12
movslq 0x1bc(%rdx), %rsi
xorl %r13d, %r13d
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
movq %rcx, %xmm1
movq 0x228c18(%rip), %xmm2   # 0x231280
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x228c1c(%rip), %xmm3   # 0x231290
subpd %xmm3, %xmm1
movapd %xmm1, %xmm4
unpckhpd %xmm1, %xmm4            # xmm4 = xmm4[1],xmm1[1]
addsd %xmm1, %xmm4
movq %rax, %xmm1
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
subpd %xmm3, %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
cvtsi2sd %esi, %xmm3
mulsd 0x228f23(%rip), %xmm3   # 0x2315c8
addsd %xmm1, %xmm2
addsd 0x228f3f(%rip), %xmm3   # 0x2315f0
mulsd %xmm2, %xmm3
addsd %xmm4, %xmm3
cvttsd2si %xmm3, %rdx
movq %rdx, %rsi
sarq $0x3f, %rsi
subsd %xmm0, %xmm3
cvttsd2si %xmm3, %rbp
andq %rsi, %rbp
orq %rdx, %rbp
movq 0x28c905(%rip), %rdx    # 0x294fe0
movq (%rdx), %rdi
leaq 0x22e752(%rip), %rsi    # 0x236e37
leaq 0x22e77c(%rip), %rdx    # 0x236e68
movq %rax, %r8
movq %rbp, %r9
xorl %eax, %eax
callq 0x22b0
movq 0x18(%r14), %rax
testl $0x7fffffff, 0x14(%rax) # imm = 0x7FFFFFFF
je 0x873f
xorl %r13d, %r13d
movq %rbp, (%rsp)
movl %r13d, %edi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
leaq 0x10(%rsp), %r8
movq %r12, %r9
callq 0xc7b00
incq %r13
movq 0x18(%r14), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq %rax, %r13
jb 0x8709
movq 0x20(%rsp), %r13
movq %r12, %rdi
callq 0x2220
movq %r13, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: trans_sec_cut_filter_mmhap_adv(kv_u_trans_t*, ma_ug_t*, asg_t*, ma_hit_t_alloc*, ug_rid_cov_t*)
void trans_sec_cut_filter_mmhap_adv(kv_u_trans_t *ta, ma_ug_t *ug, asg_t *sg, ma_hit_t_alloc* src, ug_rid_cov_t *in)
{
    uint64_t k; asg64_v b64; kv_init(b64);
    ug_rid_cov_t *cc = ((in)?(in):(gen_ug_rid_cov_t(ug, sg, src)));

    fprintf(stderr, "+[M::%s]\thom_cov::%lu\thet_cov::%lu\thom_cut::%lu\n", __func__, 
        cc->hom_cov, cc->het_cov, cc->hom_max);

    for (k = 0; k < ug->g->n_seq; k++) {
        purge_ovlp_cov_adv(k, ta, &b64, cc, cc->hom_max);
    }

    if(!in) {destory_ug_rid_cov_t(cc); free(cc);} kv_destroy(b64);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rsi, %r14
movq %rdi, %r15
andq $0x0, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq %r8, %r12
testq %r8, %r8
jne 0x879a
movq %r14, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0xc6eb8
movq %rax, %r12
movq 0x28c83f(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
movq 0x38(%r12), %r9
movq 0x40(%r12), %rcx
movq 0x48(%r12), %r8
leaq 0x22e67d(%rip), %rsi    # 0x236e37
leaq 0x22e6c2(%rip), %rdx    # 0x236e83
xorl %eax, %eax
callq 0x22b0
movq 0x18(%r14), %rax
testl $0x7fffffff, 0x14(%rax) # imm = 0x7FFFFFFF
je 0x8805
xorl %r13d, %r13d
movq %rsp, %rbp
movq 0x38(%r12), %r8
movl %r13d, %edi
movq %r15, %rsi
movq %rbp, %rdx
movq %r12, %rcx
callq 0xc7dc4
incq %r13
movq 0x18(%r14), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq %rax, %r13
jb 0x87db
testq %rbx, %rbx
jne 0x881a
movq %r12, %rdi
callq 0xc7129
movq %r12, %rdi
callq 0x2220
movq 0x10(%rsp), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: dbg_prt_trio_mmhap_label(ma_ug_t*, mmhap_t*, char const*)
void dbg_prt_trio_mmhap_label(ma_ug_t *ug, mmhap_t *rh, const char *o_n)
{
    char* gfa_name = (char*)malloc(strlen(o_n)+100); 
    FILE *fn = NULL; sprintf(gfa_name, "%s.mmhap.binning.log", o_n);
    uint32_t i, z; fn = fopen(gfa_name, "w");
    for (i = 0; i < ug->g->n_seq; i++) {
        fprintf(fn, "utg%.6u%c\tm::%u\tn::%u", i+1, "lc"[ug->u.a[i].circ], rh->h.a[i].m, rh->h.a[i].n);
        for (z = 0; z < rh->h.a[i].n; z++) {
            fprintf(fn, "\t%u", rh->a.a[rh->h.a[i].a+z]);
        }
        fprintf(fn, "\n");
    }
    fclose(fn); free(gfa_name); fprintf(stderr, "[M::%s::] done\n", __func__);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, %rdi
callq 0x2090
leaq 0x64(%rax), %rdi
callq 0x2280
movq %rax, %r12
leaq 0x22deaf(%rip), %rsi    # 0x236fbc
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0x23f5c1(%rip), %rsi    # 0x2486e2
movq %r12, 0x8(%rsp)
movq %r12, %rdi
callq 0x2210
movq %rax, %r12
movq 0x18(%r14), %rax
testl $0x7fffffff, 0x14(%rax) # imm = 0x7FFFFFFF
je 0x91ec
leaq 0x22de9e(%rip), %r15    # 0x236fe7
xorl %r13d, %r13d
movq %r14, 0x10(%rsp)
imulq $0x28, %r13, %rax
imulq $0xc, %r13, %rbp
incq %r13
movq 0x10(%r14), %rcx
movl (%rcx,%rax), %eax
shrl $0x1f, %eax
leaq 0x22b5ce(%rip), %rcx    # 0x23473b
movsbl (%rax,%rcx), %ecx
movq 0x10(%rbx), %rax
movl (%rax,%rbp), %r9d
movl 0x4(%rax,%rbp), %r8d
movq %r12, %rdi
leaq 0x22de49(%rip), %rsi    # 0x236fd1
movl %r13d, %edx
xorl %eax, %eax
callq 0x22b0
movq 0x10(%rbx), %rax
cmpl $0x0, (%rax,%rbp)
je 0x91c7
xorl %r14d, %r14d
movq 0x28(%rbx), %rcx
movl 0x8(%rax,%rbp), %eax
addl %r14d, %eax
movl (%rcx,%rax,4), %edx
movq %r12, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x22b0
incl %r14d
movq 0x10(%rbx), %rax
cmpl (%rax,%rbp), %r14d
jb 0x919f
pushq $0xa
popq %rdi
movq %r12, %rsi
callq 0x2270
movq 0x10(%rsp), %r14
movq 0x18(%r14), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq %rax, %r13
jb 0x9151
movq %r12, %rdi
callq 0x2190
movq 0x8(%rsp), %rdi
callq 0x2220
movq 0x28bddb(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
leaq 0x22dade(%rip), %rsi    # 0x236ced
leaq 0x22ddd5(%rip), %rdx    # 0x236feb
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22b0
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: prt_phase_dbg_graph(char*, asg_t*, ma_sub_t*, ma_hit_t_alloc*, R_to_U*, int, int)
void prt_phase_dbg_graph(char *in, asg_t *sg, ma_sub_t *cov, ma_hit_t_alloc *src, R_to_U* ri, int max_hang, int min_ovlp)
{
    char* gfa_name = (char*)malloc(strlen(in)+100);
    sprintf(gfa_name, "%s.phase", in);
    uint64_t pscut = 0;
    pscut = (asm_opt.hom_global_coverage_set?(asm_opt.hom_global_coverage):(((double)asm_opt.hom_global_coverage)/((double)HOM_PEAK_RATE)));
    pscut *= PHASE_SEF; if(pscut < PHASE_SEP) pscut = PHASE_SEP;
    ma_ug_t *ug = ma_ug_gen_phase(sg, pscut, PHASE_SEP_RATE);
    print_debug_gfa(sg, ug, cov, gfa_name, src, ri, max_hang, min_ovlp, 0, 0, 0);
    ma_ug_destroy(ug);

    sprintf(gfa_name, "%s.raw", in);
    ug = ma_ug_gen(sg);
    print_debug_gfa(sg, ug, cov, gfa_name, src, ri, max_hang, min_ovlp, 0, 0, 0);
    ma_ug_destroy(ug);

    free(gfa_name);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x20(%rsp)
movq %r8, (%rsp)
movq %rcx, 0x18(%rsp)
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %rbx
movl 0x60(%rsp), %r12d
callq 0x2090
leaq 0x64(%rax), %rdi
callq 0x2280
movq %rax, %r14
leaq 0x22c7bd(%rip), %rsi    # 0x23771a
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0x28a7e7(%rip), %rax    # 0x295758
cmpl $0x0, 0x148(%rax)
cvtsi2sdl 0x144(%rax), %xmm0
jne 0xaf8a
divsd 0x22add6(%rip), %xmm0   # 0x235d60
cvttsd2si %xmm0, %rax
movq %rax, %rcx
subsd 0x22636e(%rip), %xmm0   # 0x231308
cvttsd2si %xmm0, %rdx
sarq $0x3f, %rcx
andq %rcx, %rdx
orq %rax, %rdx
addq %rdx, %rdx
cmpq $0x41, %rdx
pushq $0x40
popq %rsi
cmovaeq %rdx, %rsi
movsd 0x226629(%rip), %xmm0   # 0x2315e8
movq %rbp, %rdi
callq 0xb18e6
movq %rax, %r15
subq $0x8, %rsp
movq %rbp, %rdi
movq %rax, %rsi
movq %r13, %rdx
movq %r14, %rcx
movq %r13, 0x18(%rsp)
movq 0x20(%rsp), %r13
movq %r13, %r8
movq 0x8(%rsp), %r9
pushq $0x0
pushq $0x0
pushq $0x0
pushq %r12
movq %r12, 0x30(%rsp)
movq 0x48(%rsp), %r12
pushq %r12
callq 0xa5f3
addq $0x30, %rsp
movq %r15, %rdi
callq 0xa0761
leaq 0x22c70b(%rip), %rsi    # 0x237723
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2050
movq %rbp, %rdi
callq 0xb10cd
movq %rax, %rbx
subq $0x8, %rsp
movq %rbp, %rdi
movq %rax, %rsi
movq 0x18(%rsp), %rdx
movq %r14, %rcx
movq %r13, %r8
movq 0x8(%rsp), %r9
pushq $0x0
pushq $0x0
pushq $0x0
pushq 0x28(%rsp)
pushq %r12
callq 0xa5f3
addq $0x30, %rsp
movq %rbx, %rdi
callq 0xa0761
movq %r14, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: output_hap_sc_graph(kvect_sec_t*, asg_t*, ma_sub_t*, char*, unsigned char, ma_hit_t_alloc*, R_to_U*, char*)
void output_hap_sc_graph(kvect_sec_t *ug, asg_t *sg, /**kvec_asg_arc_t_warp *arcs,**/ ma_sub_t* coverage_cut, char* output_file_name, uint8_t flag, ma_hit_t_alloc* sources, R_to_U* ruIndex, /**int max_hang, int min_ovlp,**/ char *f_prefix)
{
    char* gfa_name = (char*)malloc(strlen(output_file_name)+100);
    sprintf(gfa_name, "%s.%s.p_ctg.gfa", output_file_name, f_prefix?f_prefix:(flag==FATHER?"hap1":"hap2"));
    FILE* output_file = fopen(gfa_name, "w");

    fprintf(stderr, "Writing %s to disk... \n", gfa_name);

    // ma_ug_seq(ug->ctg, sg, coverage_cut, sources, arcs, max_hang, min_ovlp, 0, 1);
    // ma_ug_print(ug, sg, coverage_cut, sources, ruIndex, (flag==FATHER?"h1tg":"h2tg"), output_file);
    ma_scg_print(ug, &R_INF, sg, coverage_cut, sources, ruIndex, 1, (flag==FATHER?"h1tg":"h2tg"), output_file);
    fclose(output_file);

    free(gfa_name);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x20(%rsp)
movl %r8d, %r14d
movq %rcx, %rbx
movq %rdx, 0x18(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, %rbp
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x68(%rsp), %r13
movq %rcx, %rdi
callq 0x2090
leaq 0x64(%rax), %rdi
callq 0x2280
movq %rax, %r15
cmpl $0x1, %r14d
leaq 0x22c3f9(%rip), %rax    # 0x23773a
leaq 0x22c3f7(%rip), %rcx    # 0x23773f
cmoveq %rax, %rcx
leaq 0x22c3f1(%rip), %rax    # 0x237744
leaq 0x22c3ef(%rip), %r12    # 0x237749
cmoveq %rax, %r12
testq %r13, %r13
leaq 0x22c3c2(%rip), %rsi    # 0x23772a
leaq 0x23d373(%rip), %r14    # 0x2486e2
cmovneq %r13, %rcx
movq %r15, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2050
movq %r15, %rdi
movq %r14, %rsi
callq 0x2210
movq %rax, %rbx
movq 0x289c4b(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
leaq 0x22b6d4(%rip), %rsi    # 0x236a73
movq %r15, %rdx
xorl %eax, %eax
callq 0x22b0
subq $0x8, %rsp
leaq 0x28ae7c(%rip), %rsi    # 0x296230
movq %rbp, %rdi
movq 0x10(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %r8
movq 0x18(%rsp), %r9
pushq %rbx
pushq %r12
pushq $0x1
callq 0xb7f17
addq $0x20, %rsp
movq %rbx, %rdi
callq 0x2190
movq %r15, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: prt_scf_dbg_nds(u_trans_t*, unsigned int*, unsigned int*, unsigned int, ma_ug_t*, ma_ug_t*, ma_ug_t*, unsigned long, unsigned long, char const*)
void prt_scf_dbg_nds(u_trans_t *z, uint32_t *za, uint32_t *zd, uint32_t zn, ma_ug_t *ref, ma_ug_t *hu1, ma_ug_t *hu2, uint64_t s_end, uint64_t e_end, const char *cmd)
{
    uint64_t k, id, rev, ui, uid; ma_utg_t *u;

    id = z->tn; rev = z->rev;
    u = ((id<hu1->u.n)?&(hu1->u.a[id]):&(hu2->u.a[id-hu1->u.n]));
    ui = ((id<hu1->u.n)?1:2); uid = ((id<hu1->u.n)?(id):(id-hu1->u.n));

    fprintf(stderr, "\nCMD::%s[M::%s] h%lutg%.6lu%c(%c)\ts::%u\te::%u\ts_end::%lu\te_end::%lu\tref_n::%u\n", cmd, __func__,
    ui, uid+1, "lc"[u->circ], "+-"[rev], z->ts, z->te, s_end, e_end, (uint32_t)ref->u.n);
    for (k = 0; k < zn; k++) {
        fprintf(stderr, "[%u|%u]", (za[k]>>1), (za[k]&1));
        fprintf(stderr, "utg%.6u%c(%c)(d::%u),", (za[k]>>1)+1, "lc"[ref->u.a[(za[k]>>1)].circ], "+-"[za[k]&1], zd[k]);
    }
    fprintf(stderr, "\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %rax
movl %ecx, 0xc(%rsp)
movq %rdx, %r11
movq %rsi, %r15
movq 0x78(%rsp), %rdx
movq 0x70(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movq 0x68(%rsp), %rcx
movq %rcx, 0x18(%rsp)
movl 0x14(%rdi), %r9d
movzbl 0x28(%rdi), %ecx
shrl $0x6, %ecx
andl $0x1, %ecx
movq (%rax), %rsi
movq %r9, %r10
subq %rsi, %r10
movq %r11, 0x20(%rsp)
movq %r8, %r11
jae 0xb7cc
imulq $0x28, %r9, %r13
addq 0x10(%rax), %r13
pushq $0x1
popq %r8
xorl %esi, %esi
jmp 0xb7dd
movq 0x60(%rsp), %rax
imulq $0x28, %r10, %r13
addq 0x10(%rax), %r13
pushq $0x2
popq %r8
movq 0x2897fc(%rip), %r12    # 0x294fe0
movq (%r12), %rax
subq %rsi, %r9
incq %r9
movl (%r13), %esi
shrl $0x1f, %esi
leaq 0x228f3f(%rip), %r10    # 0x23473b
movsbl (%rsi,%r10), %r13d
leaq 0x226acb(%rip), %rsi    # 0x2322d3
movsbl (%rcx,%rsi), %r14d
movl 0xc(%rdi), %r10d
movl 0x10(%rdi), %ebx
movl (%r11), %ebp
subq $0x8, %rsp
leaq 0x22c254(%rip), %rsi    # 0x237a76
leaq 0x22c29c(%rip), %rcx    # 0x237ac5
movq %rax, %rdi
xorl %eax, %eax
pushq %rbp
pushq 0x20(%rsp)
pushq 0x30(%rsp)
pushq %rbx
movq %r11, %rbx
pushq %r10
pushq %r14
pushq %r13
callq 0x22b0
addq $0x40, %rsp
movl 0xc(%rsp), %eax
testl %eax, %eax
movq 0x20(%rsp), %r14
je 0xb8cb
movl %eax, %ebp
xorl %r13d, %r13d
movq (%r12), %rdi
movl (%r15,%r13,4), %ecx
movl %ecx, %edx
shrl %edx
andl $0x1, %ecx
leaq 0x22c263(%rip), %rsi    # 0x237ad5
xorl %eax, %eax
callq 0x22b0
movq (%r12), %rdi
movl (%r15,%r13,4), %eax
movl %eax, %ecx
shrl %ecx
imulq $0x28, %rcx, %rsi
movl %ecx, %edx
incl %edx
movq 0x10(%rbx), %rcx
movl (%rcx,%rsi), %ecx
shrl $0x1f, %ecx
leaq 0x228e9d(%rip), %rsi    # 0x23473b
movsbl (%rcx,%rsi), %ecx
andl $0x1, %eax
leaq 0x226a27(%rip), %rsi    # 0x2322d3
movsbl (%rax,%rsi), %r8d
movl (%r14,%r13,4), %r9d
leaq 0x22c221(%rip), %rsi    # 0x237add
xorl %eax, %eax
callq 0x22b0
incq %r13
cmpq %r13, %rbp
jne 0xb85c
movq (%r12), %rsi
pushq $0xa
popq %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2270