LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: detect_simple_bubble(asg_t*, unsigned int, unsigned int*, long long*, buf_t*)
int detect_simple_bubble(asg_t *g, uint32_t begNode, uint32_t* endNode, long long* minLen, buf_t* b)
{
    uint32_t e1, e2;
    long long l1, l2;

    if(asg_arc_n(g, begNode) != 2)
    {
        return 0;
    }

    if(asg_is_single_edge(g, asg_arc_a(g, begNode)[0].v, begNode>>1)!=1
      || 
       asg_is_single_edge(g, asg_arc_a(g, begNode)[1].v, begNode>>1)!=1)
    {
        return 0;
    }

    if(b) kv_push(uint32_t, b->b, begNode>>1);

    


    if(detect_single_path(g, asg_arc_a(g, begNode)[0].v, &e1, &l1, b) == TWO_INPUT 
       && 
       detect_single_path(g, asg_arc_a(g, begNode)[1].v, &e2, &l2, b) == TWO_INPUT)
    {
        if(e1 == e2)
        {
            (*endNode) = e1;
            (*minLen) = (l1 <= l2)? l1: l2;
            (*minLen)++;
            return 1;
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x28(%rdi), %rax
movl %esi, %r14d
movq (%rax,%r14,8), %rax
xorl %ebx, %ebx
cmpl $0x2, %eax
jne 0x6cc4b
movq %r8, %r12
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r13
movq %rcx, 0x10(%rsp)
movq 0x8(%rdi), %rcx
shrq $0x20, %rax
imulq $0x18, %rax, %rax
movl 0x8(%rcx,%rax), %esi
shrl %ebp
movl %ebp, %edx
callq 0x6c8a1
cmpl $0x1, %eax
jne 0x6cc4b
movq 0x8(%r13), %rax
movq 0x28(%r13), %rcx
movl 0x4(%rcx,%r14,8), %ecx
imulq $0x18, %rcx, %rcx
movl 0x20(%rax,%rcx), %esi
movq %r13, %rdi
movl %ebp, %edx
callq 0x6c8a1
cmpl $0x1, %eax
jne 0x6cc4b
testq %r12, %r12
je 0x6cbc1
movq 0x38(%r12), %rcx
cmpq 0x40(%r12), %rcx
jne 0x6cbb0
leaq (%rcx,%rcx), %rax
testq %rcx, %rcx
pushq $0x2
popq %rsi
cmovneq %rax, %rsi
movq %rsi, 0x40(%r12)
movq 0x48(%r12), %rdi
shlq $0x2, %rsi
callq 0x2370
movq %rax, 0x48(%r12)
movq 0x38(%r12), %rcx
jmp 0x6cbb5
movq 0x48(%r12), %rax
leaq 0x1(%rcx), %rdx
movq %rdx, 0x38(%r12)
movl %ebp, (%rax,%rcx,4)
movq 0x8(%r13), %rax
movq 0x28(%r13), %rcx
movl 0x4(%rcx,%r14,8), %ecx
imulq $0x18, %rcx, %rcx
movl 0x8(%rax,%rcx), %esi
leaq 0xc(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %r13, %rdi
movq %r12, %r8
callq 0x6c919
cmpl $0x1, %eax
jne 0x6cc4b
movq 0x8(%r13), %rax
movq 0x28(%r13), %rcx
movl 0x4(%rcx,%r14,8), %ecx
imulq $0x18, %rcx, %rcx
movl 0x20(%rax,%rcx), %esi
leaq 0x8(%rsp), %rdx
leaq 0x18(%rsp), %rcx
movq %r13, %rdi
movq %r12, %r8
callq 0x6c919
cmpl $0x1, %eax
jne 0x6cc4b
movl 0xc(%rsp), %eax
cmpl 0x8(%rsp), %eax
jne 0x6cc4b
movl %eax, (%r15)
movq 0x20(%rsp), %rax
movq 0x18(%rsp), %rcx
cmpq %rcx, %rax
cmovlq %rax, %rcx
incq %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: detect_bubble_end_with_bubbles(asg_t*, unsigned int, unsigned int, unsigned int*, long long*, buf_t*)
int detect_bubble_end_with_bubbles(asg_t *g, uint32_t begNode1, uint32_t begNode2, 
uint32_t* endNode, long long* minLen, buf_t* b)
{
    uint32_t e1, e2;
    long long l1, l2;

    if(detect_single_path_with_single_bubbles(g, begNode1, &e1, &l1, b, (uint32_t)-1) == TWO_INPUT 
       && 
       detect_single_path_with_single_bubbles(g, begNode2, &e2, &l2, b, (uint32_t)-1) == TWO_INPUT)
    {
        if(e1 == e2)
        {
            (*endNode) = e1;
            (*minLen) = (l1 <= l2)? l1: l2;
            return 1;
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r15
movq %r8, %rbx
movq %rcx, %r14
movl %edx, %r12d
movq %rdi, %r13
leaq 0x4(%rsp), %rdx
leaq 0x10(%rsp), %rcx
pushq $-0x1
popq %r9
movq %r15, %r8
callq 0x6cc5c
xorl %ebp, %ebp
cmpl $0x1, %eax
jne 0x6cf0f
movq %rsp, %rdx
leaq 0x8(%rsp), %rcx
pushq $-0x1
popq %r9
movq %r13, %rdi
movl %r12d, %esi
movq %r15, %r8
callq 0x6cc5c
cmpl $0x1, %eax
jne 0x6cf0f
movl 0x4(%rsp), %eax
cmpl (%rsp), %eax
jne 0x6cf0f
movl %eax, (%r14)
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
cmpq %rcx, %rax
cmovlq %rax, %rcx
movq %rcx, (%rbx)
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: detect_mul_bubble_end_with_bubbles(asg_t*, unsigned int*, unsigned int, unsigned int*, long long*, buf_t*)
int detect_mul_bubble_end_with_bubbles(asg_t *g, uint32_t* begs, uint32_t occ, 
uint32_t* endNode, long long* minLen, buf_t* b)
{
    uint32_t e, flag, e_s;
    long long l, i, l_s;

    if(occ < 1) return 0;

    flag = detect_single_path_with_single_bubbles(g, begs[0], &e, &l, b, (uint32_t)-1);

    if(flag == TWO_INPUT || flag == MUL_INPUT)
    {
        e_s = e;
        l_s = l;
    }
    else
    {
        return 0;
    }
    


    for (i = 1; i < occ; i++)
    {
        flag = detect_single_path_with_single_bubbles(g, begs[i], &e, &l, b, (uint32_t)-1);
        if(flag == TWO_INPUT || flag == MUL_INPUT)
        {
            if(e != e_s) return 0;
            if(l < l_s) l_s = l;
        }
        else
        {
            return 0;
        }
    }

    if(asg_arc_n(g, e_s^1) == occ)
    {
        (*endNode) = e_s;
        (*minLen) = l_s;
        return 1;
    }
    
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
xorl %ebp, %ebp
testl %edx, %edx
je 0x6d010
movq %r9, %rax
movq %r8, %rbx
movq %rcx, %r15
movl %edx, %r12d
movq %rdi, %r13
movq %rsi, 0x30(%rsp)
movl (%rsi), %esi
leaq 0xc(%rsp), %rdx
leaq 0x10(%rsp), %rcx
pushq $-0x1
popq %r9
movq %rax, %r14
movq %rax, %r8
callq 0x6cc5c
andl $0x5, %eax
cmpl $0x1, %eax
jne 0x6d010
movq %r15, 0x20(%rsp)
movq %rbx, 0x28(%rsp)
leaq 0xc(%rsp), %rax
movl (%rax), %r15d
leaq 0x10(%rsp), %rax
movq (%rax), %rbx
movl %r12d, 0x1c(%rsp)
movl %r12d, %ebp
pushq $0x1
popq %r12
cmpq %r12, %rbp
je 0x6cfe0
movq %r14, %r8
movq 0x30(%rsp), %rax
movl (%rax,%r12,4), %esi
movq %r13, %rdi
leaq 0xc(%rsp), %rdx
leaq 0x10(%rsp), %rcx
pushq $-0x1
popq %r9
callq 0x6cc5c
andl $0x5, %eax
cmpl $0x1, %eax
jne 0x6d00e
cmpl %r15d, 0xc(%rsp)
jne 0x6d00e
movq 0x10(%rsp), %rax
cmpq %rbx, %rax
cmovlq %rax, %rbx
incq %r12
jmp 0x6cf99
movq 0x28(%r13), %rax
movq %r15, %rcx
xorq $0x1, %rcx
movl 0x1c(%rsp), %edx
cmpl %edx, (%rax,%rcx,8)
movl $0x0, %ebp
jne 0x6d010
movq 0x20(%rsp), %rax
movl %r15d, (%rax)
movq 0x28(%rsp), %rax
movq %rbx, (%rax)
pushq $0x1
popq %rbp
jmp 0x6d010
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: detect_bubble_with_bubbles(asg_t*, unsigned int, unsigned int*, long long*, buf_t*, unsigned int)
int detect_bubble_with_bubbles(asg_t *g, uint32_t begNode, uint32_t* endNode, long long* minLen, 
buf_t* b, uint32_t max_ext)
{
    uint32_t e1, e2;
    long long l1, l2;

    if(asg_arc_n(g, begNode) != 2)
    {
        return 0;
    }

    if(asg_is_single_edge(g, asg_arc_a(g, begNode)[0].v, begNode>>1)!=1
      || 
       asg_is_single_edge(g, asg_arc_a(g, begNode)[1].v, begNode>>1)!=1)
    {
        return 0;
    }

    if(b) kv_push(uint32_t, b->b, begNode>>1);


    if(detect_single_path_with_single_bubbles(g, asg_arc_a(g, begNode)[0].v, &e1, &l1, b, max_ext) == TWO_INPUT)
    {
        b->b.n--;
        if(detect_single_path_with_single_bubbles(g, asg_arc_a(g, begNode)[1].v, &e2, &l2, b, max_ext) == TWO_INPUT)
        {
            b->b.n--;
            if(e1 == e2)
            {
                (*endNode) = e1;
                (*minLen) = (l1 <= l2)? l1: l2;
                (*minLen)++;
                return 1;
            }
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x28(%rdi), %rax
movl %esi, %r15d
movq (%rax,%r15,8), %rax
xorl %ebx, %ebx
cmpl $0x2, %eax
jne 0x6d193
movl %r9d, %ebp
movq %r8, %r12
movl %esi, %r14d
movq %rdi, %r13
movq %rdx, 0x8(%rsp)
movq %rcx, 0x10(%rsp)
movq 0x8(%rdi), %rcx
shrq $0x20, %rax
imulq $0x18, %rax, %rax
movl 0x8(%rcx,%rax), %esi
shrl %r14d
movl %r14d, %edx
callq 0x6c8a1
cmpl $0x1, %eax
jne 0x6d193
movq 0x8(%r13), %rax
movq 0x28(%r13), %rcx
movl 0x4(%rcx,%r15,8), %ecx
imulq $0x18, %rcx, %rcx
movl 0x20(%rax,%rcx), %esi
movq %r13, %rdi
movl %r14d, %edx
callq 0x6c8a1
cmpl $0x1, %eax
jne 0x6d193
testq %r12, %r12
je 0x6d0f8
movq 0x38(%r12), %rcx
cmpq 0x40(%r12), %rcx
jne 0x6d0e6
leaq (%rcx,%rcx), %rax
testq %rcx, %rcx
pushq $0x2
popq %rsi
cmovneq %rax, %rsi
movq %rsi, 0x40(%r12)
movq 0x48(%r12), %rdi
shlq $0x2, %rsi
callq 0x2370
movq %rax, 0x48(%r12)
movq 0x38(%r12), %rcx
jmp 0x6d0eb
movq 0x48(%r12), %rax
leaq 0x1(%rcx), %rdx
movq %rdx, 0x38(%r12)
movl %r14d, (%rax,%rcx,4)
movq 0x8(%r13), %rax
movq 0x28(%r13), %rcx
movl 0x4(%rcx,%r15,8), %ecx
imulq $0x18, %rcx, %rcx
movl 0x8(%rax,%rcx), %esi
leaq 0x4(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %r13, %rdi
movq %r12, %r8
movl %ebp, %r9d
callq 0x6cc5c
cmpl $0x1, %eax
jne 0x6d193
decq 0x38(%r12)
movq 0x8(%r13), %rax
movq 0x28(%r13), %rcx
movl 0x4(%rcx,%r15,8), %ecx
imulq $0x18, %rcx, %rcx
movl 0x20(%rax,%rcx), %esi
movq %rsp, %rdx
leaq 0x18(%rsp), %rcx
movq %r13, %rdi
movq %r12, %r8
movl %ebp, %r9d
callq 0x6cc5c
cmpl $0x1, %eax
jne 0x6d193
decq 0x38(%r12)
movl 0x4(%rsp), %eax
cmpl (%rsp), %eax
jne 0x6d193
movq 0x8(%rsp), %rcx
movl %eax, (%rcx)
movq 0x20(%rsp), %rax
movq 0x18(%rsp), %rcx
cmpq %rcx, %rax
cmovlq %rax, %rcx
incq %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/./Overlaps.h
// Function: asg_arc_del(asg_t*, unsigned int, unsigned int, int)
static inline void asg_arc_del(asg_t *g, uint32_t v, uint32_t w, int del)
{
	uint32_t i, nv = asg_arc_n(g, v);
	asg_arc_t *av = asg_arc_a(g, v);
	for (i = 0; i < nv; ++i)
		if (av[i].v == w) av[i].del = !!del;
}

// Assembly:
xorl %eax, %eax
testl %ecx, %ecx
setne %al
movq 0x8(%rdi), %r8
movq 0x28(%rdi), %rcx
movl %esi, %esi
movq (%rcx,%rsi,8), %rcx
movl %ecx, %esi
movq %rcx, %rdi
shrq $0x20, %rdi
shll $0x1f, %eax
imulq $0x18, %rsi, %rcx
imulq $0x18, %rdi, %rsi
addq %r8, %rsi
addq $0xc, %rsi
xorl %edi, %edi
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
cmpq %rdi, %rcx
je 0x6dba7
cmpl %edx, -0x4(%rsi,%rdi)
jne 0x6dba1
movl (%rsi,%rdi), %r9d
andl %r8d, %r9d
orl %eax, %r9d
movl %r9d, (%rsi,%rdi)
addq $0x18, %rdi
jmp 0x6db88
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: asg_arc_identify_simple_bubbles_multi_back(asg_t*, int)
int asg_arc_identify_simple_bubbles_multi_back(asg_t *g, int check_cross)
{
    double startTime = Get_T();
    memset(g->seq_vis, 0, g->n_seq*2*sizeof(uint8_t));

    pthread_t *_r_threads;

	_r_threads = (pthread_t *)malloc(sizeof(pthread_t)*asm_opt.thread_num);

    int i = 0;

	for (i = 0; i < asm_opt.thread_num; i++)
	{
        para_for_simple_bub* arg = (para_for_simple_bub*)malloc(sizeof(*arg));
        arg->g = g;
        arg->thread_num = asm_opt.thread_num;
        arg->threadID = i;
        arg->check_cross = check_cross;

        pthread_create(_r_threads + i, NULL, asg_arc_identify_simple_bubbles_pthread, (void*)arg);
	}
    

    for (i = 0; i<asm_opt.thread_num; i++)
		pthread_join(_r_threads[i], NULL);


    free(_r_threads);

    uint32_t v, n_vtx = g->n_seq * 2;
    long long nodes, bub_nodes, cross_nodes;
    bub_nodes = nodes = cross_nodes = 0;
    for (v = 0; v < n_vtx; ++v) 
    {
        if (g->seq[v>>1].del) continue;
        nodes++;
        if(g->seq_vis[v] == 1) bub_nodes++;
        if(g->seq_vis[v] == 2) cross_nodes++;
    }


    if(VERBOSE >= 1)
    {
        fprintf(stderr, "[M::%s] takes %0.2f s\n\n", __func__, Get_T()-startTime);
    }
    return bub_nodes+cross_nodes;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x251c
movq 0x30(%rbx), %rdi
movl 0x14(%rbx), %edx
addl %edx, %edx
xorl %r12d, %r12d
xorl %esi, %esi
callq 0x20e0
leaq 0x1e48cb(%rip), %rax    # 0x253758
movslq 0x7c(%rax), %r15
movq %r15, %rdi
shlq $0x3, %rdi
callq 0x2280
movq %rax, %r14
movq %rax, %r13
movslq %r15d, %rax
cmpq %rax, %r12
jge 0x6eee9
pushq $0x18
popq %rdi
callq 0x2280
movq %rbx, 0x10(%rax)
movl %r15d, 0x4(%rax)
movl %r12d, (%rax)
movl %ebp, 0x8(%rax)
movq %r13, %rdi
xorl %esi, %esi
leaq -0x1cc(%rip), %rdx      # 0x6ed01
movq %rax, %rcx
callq 0x23c0
incq %r12
leaq 0x1e4879(%rip), %rax    # 0x253758
movl 0x7c(%rax), %r15d
addq $0x8, %r13
jmp 0x6eea3
xorl %r12d, %r12d
movslq %r15d, %rax
cmpq %rax, %r12
jge 0x6ef0f
movq (%r14,%r12,8), %rdi
xorl %esi, %esi
callq 0x2170
incq %r12
leaq 0x1e484f(%rip), %rax    # 0x253758
movl 0x7c(%rax), %r15d
jmp 0x6eeec
movq %r14, %rdi
callq 0x2220
movl 0x14(%rbx), %ecx
addl %ecx, %ecx
xorl %edx, %edx
xorl %esi, %esi
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x6ef61
movq 0x20(%rbx), %rdi
movl %edx, %r8d
shrl %r8d
cmpl $0x0, (%rdi,%r8,8)
js 0x6ef5c
movq 0x30(%rbx), %rdi
movb (%rdi,%rdx), %dil
xorl %r8d, %r8d
cmpb $0x1, %dil
sete %r8b
addl %r8d, %esi
xorl %r8d, %r8d
cmpb $0x2, %dil
sete %r8b
addl %r8d, %eax
incq %rdx
jmp 0x6ef22
addl %esi, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: asg_arc_identify_simple_bubbles_multi(asg_t*, bub_label_t*, int)
int asg_arc_identify_simple_bubbles_multi(asg_t *g, bub_label_t* x, int check_cross)
{
    double startTime = Get_T();
    memset(g->seq_vis, 0, g->n_seq*2*sizeof(uint8_t));
    uint64_t bub_dist = get_s_bub_pop_max_dist_advance(g, &(x->b[0]));
    ///fprintf(stderr, "+++[M::%s] takes %0.2f s, bub_dist: %lu\n\n", __func__, Get_T()-startTime, bub_dist);
    // startTime = Get_T();

    reset_bub_label_t(x, g, bub_dist, check_cross);
    kt_for(x->n_thres, bubble_identify_worker, x, g->n_seq<<1);
    uint32_t v, n_vtx = g->n_seq<<1;
    long long nodes, bub_nodes, cross_nodes;
    bub_nodes = nodes = cross_nodes = 0;
    for (v = 0; v < n_vtx; ++v) 
    {
        if (g->seq[v>>1].del) continue;
        nodes++;
        if(g->seq_vis[v] == 1) bub_nodes++;
        if(g->seq_vis[v] == 2) cross_nodes++;
    }
    ///fprintf(stderr, "---[M::%s] takes %0.2f s\n\n", __func__, Get_T()-startTime);

    if(VERBOSE >= 1)
    {
        fprintf(stderr, "[M::%s] takes %0.2f s\n\n", __func__, Get_T()-startTime);
    }
    return bub_nodes+cross_nodes;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x251c
movq 0x30(%rbx), %rdi
movl 0x14(%rbx), %edx
addl %edx, %edx
xorl %r15d, %r15d
xorl %esi, %esi
callq 0x20e0
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x6f01e
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
movl %ebp, %ecx
callq 0x68def
movl 0x8(%r14), %edi
movl 0x14(%rbx), %eax
addl %eax, %eax
movslq %eax, %rcx
leaq 0x168(%rip), %rsi       # 0x6f12f
movq %r14, %rdx
callq 0xc67c0
movl 0x14(%rbx), %ecx
addl %ecx, %ecx
xorl %edx, %edx
xorl %eax, %eax
cmpq %r15, %rcx
je 0x6f011
movq 0x20(%rbx), %rsi
movl %r15d, %edi
shrl %edi
cmpl $0x0, (%rsi,%rdi,8)
js 0x6f00c
movq 0x30(%rbx), %rsi
movb (%rsi,%r15), %sil
xorl %edi, %edi
cmpb $0x1, %sil
sete %dil
addl %edi, %edx
xorl %edi, %edi
cmpb $0x2, %sil
sete %dil
addl %edi, %eax
incq %r15
jmp 0x6efd8
addl %edx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: get_s_bub_pop_max_dist_advance(asg_t*, buf_s_t*)
uint64_t get_s_bub_pop_max_dist_advance(asg_t *g, buf_s_t *b)
{
    asg_arc_t *av = NULL;
    uint32_t n_vtx = g->n_seq<<1, k, v, w, kv, nv, p_bub;
    uint64_t cLen = 0, mLen = 0;
    
    
    for (v = 0; v < n_vtx; ++v) 
    {
        if(b->a[v>>1].s) continue;
        if(g->seq[v>>1].del) continue;


        av = asg_arc_a(g, v);
        nv = asg_arc_n(g, v);
        for (k = kv = 0; k < nv; k++)
        {
            if(av[k].del) continue;
            w = av[k].v^1;
            kv++;
        }
        if(kv == 1 && get_real_length(g, w, NULL) == 1) continue;
        cLen = dfs_subgraph_s_advance(g, b, v^1, &p_bub);
        if(p_bub == 0) continue;///no bubble
        if(cLen > mLen) mLen = cLen;
    }

    for (k = 0; k < g->n_seq; ++k) 
    {
        // if(b->a[k].s == 0 && !g->seq[k].del)
        // {   
        //     uint32_t convex;
        //     long long nodeLen, baseLen, max_stop_nodeLen, max_stop_baseLen;
        //     if(get_unitig(g, NULL, k<<1, &convex, &nodeLen, &baseLen, &max_stop_nodeLen, 
        //                                                             &max_stop_baseLen, 1, NULL) != LOOP)
        //     {
        //         fprintf(stderr, "ERROR 1\n");
        //     }
        // } 
        b->a[k].s = 0;
    }

    // for (; k < n_vtx; ++k)
    // {
    //     if(b->a[k].s == 1) fprintf(stderr, "ERROR 2\n");
    // }
    
    ///fprintf(stderr, "mLen: %lu, tLen: %lu\n", mLen, tLen);
    b->S.n = b->b.n = 0;
    return mLen;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x14(%rdi), %r13d
addl %r13d, %r13d
xorl %r12d, %r12d
xorl %r15d, %r15d
cmpq %r13, %r12
je 0x6f0ec
movq (%rbx), %rcx
movl %r12d, %eax
shrl %eax
imulq $0xc, %rax, %rdx
cmpl $0x0, 0x8(%rcx,%rdx)
js 0x6f0e4
movq 0x20(%r14), %rcx
cmpl $0x0, (%rcx,%rax,8)
js 0x6f0e4
movq 0x8(%r14), %rcx
movq 0x28(%r14), %rax
movq (%rax,%r12,8), %rax
movl %eax, %edx
movq %rax, %rsi
shrq $0x20, %rsi
imulq $0x18, %rdx, %rax
imulq $0x18, %rsi, %rdx
addq %rdx, %rcx
addq $0xc, %rcx
xorl %edx, %edx
xorl %esi, %esi
cmpq %rdx, %rax
je 0x6f0a8
cmpl $0x0, (%rcx,%rdx)
js 0x6f0a2
movl -0x4(%rcx,%rdx), %ebp
xorl $0x1, %ebp
incl %esi
addq $0x18, %rdx
jmp 0x6f08e
cmpl $0x1, %esi
jne 0x6f0be
movq %r14, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0xc2e7a
cmpl $0x1, %eax
je 0x6f0e4
movl %r12d, %edx
xorl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rsi
leaq 0x4(%rsp), %rcx
callq 0xa8ee3
cmpq %r15, %rax
cmovbeq %r15, %rax
cmpl $0x0, 0x4(%rsp)
cmovneq %rax, %r15
incq %r12
jmp 0x6f03c
pushq $0x8
popq %rax
xorl %ecx, %ecx
movl 0x14(%r14), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
cmpq %rdx, %rcx
jae 0x6f113
movq (%rbx), %rdx
andl $0x7fffffff, (%rdx,%rax) # imm = 0x7FFFFFFF
incq %rcx
addq $0xc, %rax
jmp 0x6f0f1
andq $0x0, 0x20(%rbx)
andq $0x0, 0x8(%rbx)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: bubble_identify_worker(void*, long, int)
static void bubble_identify_worker(void *_data, long eid, int tid)
{
    bub_label_t *buf = (bub_label_t*)_data;
    buf_s_t *b = &(buf->b[tid]);
    uint32_t v = eid, i;
    asg_t *g = buf->g;
    if(g->seq[v>>1].del) return;
    if(asg_arc_n(g, v) < 2 || get_real_length(g, v, NULL) < 2) return;

    if(g->seq_vis[v] != 1 && asg_bub_pop1_label(g, v, buf->bub_dist, b))
    {
        //beg is v, end is b.S.a[0]
        //note b.b include end, does not include beg
        for (i = 0; i < b->b.n; i++)
        {
            if(b->b.a[i]==v || b->b.a[i]==b->S.a[0]) continue;
            g->seq_vis[b->b.a[i]] = 1;
            g->seq_vis[b->b.a[i]^1] = 1;
        }
        g->seq_vis[v] = 1;
        g->seq_vis[b->S.a[0]^1] = 1;
    }

    if(buf->check_cross == 1 && g->seq_vis[v] == 0 && check_if_cross(g, v))
    {
        g->seq_vis[v] = 2;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq 0x10(%rdi), %rbx
movq 0x20(%rbx), %rax
movl %r14d, %ecx
shrl %ecx
cmpl $0x0, (%rax,%rcx,8)
js 0x6f233
movq 0x28(%rbx), %rax
movl %r14d, %r13d
testl $0xfffffffe, (%rax,%r13,8) # imm = 0xFFFFFFFE
je 0x6f233
movq %rdi, %r15
movslq %edx, %rax
imulq $0x50, %rax, %r12
addq (%rdi), %r12
movq %rbx, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0xc2e7a
cmpl $0x2, %eax
jl 0x6f233
movq 0x30(%rbx), %rax
cmpb $0x1, (%rax,%r13)
je 0x6f209
movq 0x20(%r15), %rdx
movq %rbx, %rdi
movl %r14d, %esi
movq %r12, %rcx
callq 0xa844c
testq %rax, %rax
je 0x6f209
xorl %eax, %eax
movb $0x1, %cl
movl %eax, %eax
cmpq %rax, 0x20(%r12)
jbe 0x6f1ed
movq 0x30(%r12), %rdx
movl (%rdx,%rax,4), %edx
cmpl %r14d, %edx
je 0x6f1e9
movq 0x18(%r12), %rsi
cmpl (%rsi), %edx
je 0x6f1e9
movq 0x30(%rbx), %rsi
movb %cl, (%rsi,%rdx)
movq 0x30(%rbx), %rdx
movq 0x30(%r12), %rsi
movl (%rsi,%rax,4), %esi
xorq $0x1, %rsi
movb %cl, (%rdx,%rsi)
incl %eax
jmp 0x6f1b0
movq 0x30(%rbx), %rax
movb $0x1, %cl
movb %cl, (%rax,%r13)
movq 0x30(%rbx), %rax
movq 0x18(%r12), %rdx
movl (%rdx), %edx
xorq $0x1, %rdx
movb %cl, (%rax,%rdx)
cmpl $0x1, 0x18(%r15)
jne 0x6f233
movq 0x30(%rbx), %rax
cmpb $0x0, (%rax,%r13)
jne 0x6f233
movq %rbx, %rdi
movl %r14d, %esi
callq 0x6eb1d
testl %eax, %eax
je 0x6f233
movq 0x30(%rbx), %rax
movb $0x2, (%rax,%r13)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/./Overlaps.h
// Function: asg_seq_del(asg_t*, unsigned int)
static inline void asg_seq_del(asg_t *g, uint32_t s)
{
	uint32_t k;
	g->seq[s].del = 1;
	for (k = 0; k < 2; ++k) {
		uint32_t i, v = s<<1 | k;
		uint32_t nv = asg_arc_n(g, v);
		asg_arc_t *av = asg_arc_a(g, v);
		for (i = 0; i < nv; ++i) {
			av[i].del = 1;
			asg_arc_del(g, av[i].v^1, v^1, 1);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movq 0x20(%rdi), %rax
movl %esi, %ecx
orl $0x80000000, (%rax,%rcx,8) # imm = 0x80000000
addl %esi, %esi
movq %rsi, 0x8(%rsp)
xorl %r15d, %r15d
pushq $0x1
popq %rbp
cmpq $0x2, %r15
je 0x6f96e
movq %r15, 0x10(%rsp)
orq 0x8(%rsp), %r15
movq 0x8(%r14), %rax
movq 0x28(%r14), %rcx
movq (%rcx,%r15,8), %rcx
movl %ecx, %edx
shrq $0x20, %rcx
xorl $0x1, %r15d
imulq $0x18, %rdx, %r13
imulq $0x18, %rcx, %rcx
leaq (%rax,%rcx), %rbx
addq $0xc, %rbx
xorl %r12d, %r12d
cmpq %r12, %r13
je 0x6f964
orb $-0x80, 0x3(%rbx,%r12)
movl -0x4(%rbx,%r12), %esi
xorl $0x1, %esi
movq %r14, %rdi
movl %r15d, %edx
movl %ebp, %ecx
callq 0x6db50
addq $0x18, %r12
jmp 0x6f93e
movq 0x10(%rsp), %r15
incq %r15
jmp 0x6f905
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: asg_arc_del_single_node_directly(asg_t*, long long, ma_hit_t_alloc*)
int asg_arc_del_single_node_directly(asg_t *g, long long longLen_thres, ma_hit_t_alloc* sources)
{
    double startTime = Get_T();
    ///the reason is that each read has two direction (query->target, target->query)
	uint32_t v, n_vtx = g->n_seq * 2, n_reduced = 0;
    for (v = 0; v < n_vtx; ++v) 
    {
        uint32_t nv = asg_arc_n(g, v);
        if (g->seq[v>>1].del)
        {
            continue;
        } 

        if(nv != 2)
        {
            continue;
        }

        n_reduced += test_single_node_bubble_directly(g, v, longLen_thres, sources);
    }


    if (n_reduced) {
		asg_cleanup(g);
		asg_symm(g);
	}

    if(VERBOSE >= 1)
    {
        fprintf(stderr, "[M::%s] removed %d small bubbles\n", __func__, n_reduced);
        fprintf(stderr, "[M::%s] takes %0.2f s\n\n", __func__, Get_T()-startTime);
    }

    return n_reduced;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x251c
movl 0x14(%rbx), %r13d
addl %r13d, %r13d
xorl %r12d, %r12d
xorl %ebp, %ebp
cmpq %r12, %r13
je 0x6fcbd
movq 0x20(%rbx), %rax
movl %r12d, %ecx
shrl %ecx
cmpl $0x0, (%rax,%rcx,8)
js 0x6fcb8
movq 0x28(%rbx), %rax
cmpl $0x2, (%rax,%r12,8)
jne 0x6fcb8
movq %rbx, %rdi
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x6f97d
addl %eax, %ebp
incq %r12
jmp 0x6fc86
testl %ebp, %ebp
je 0x6fcd1
movq %rbx, %rdi
callq 0x694eb
movq %rbx, %rdi
callq 0x69638
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: asg_arc_del_cross_bubble(asg_t*, long long)
int asg_arc_del_cross_bubble(asg_t *g, long long max_dist)
{
    double startTime = Get_T();
    ///the reason is that each read has two direction (query->target, target->query)
	uint32_t v, n_vtx = g->n_seq * 2, n_reduced = 0;
    buf_t b;
	if (!g->is_symm) asg_symm(g);
	memset(&b, 0, sizeof(buf_t));
	///set information for each node
	b.a = (binfo_t*)calloc(n_vtx, sizeof(binfo_t));
    for (v = 0; v < n_vtx; ++v) 
    {
        uint32_t nv = asg_arc_n(g, v);
        if (g->seq[v>>1].del)
        {
            continue;
        } 

        if(nv < 2)
        {
            continue;
        }

        ///if this is a bubble
        if(asg_bub_finder_with_del_advance(g, v, max_dist, &b) == 1)
        {
            n_reduced += test_cross(g, b.b.a, b.b.n, v, b.S.a[0]);
        }
    
    }

    free(b.a); free(b.S.a); free(b.T.a); free(b.b.a); free(b.e.a);

    if (n_reduced) {        
		asg_cleanup(g);
		asg_symm(g);
	}

    if(VERBOSE >= 1)
    {
        fprintf(stderr, "[M::%s] removed %d cross\n", __func__, n_reduced);
        fprintf(stderr, "[M::%s] takes %0.2f s\n\n", __func__, Get_T()-startTime);
    }

    return n_reduced;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x251c
movl 0x14(%rbx), %eax
leal (%rax,%rax), %ebp
testl %eax, %eax
js 0x700d8
movq %rbx, %rdi
callq 0x69638
xorps %xmm0, %xmm0
movq %rsp, %r15
movups %xmm0, 0x58(%r15)
movups %xmm0, 0x48(%r15)
movups %xmm0, 0x38(%r15)
movups %xmm0, 0x28(%r15)
movups %xmm0, 0x18(%r15)
movups %xmm0, 0x8(%r15)
movl %ebp, %r12d
pushq $0x1c
popq %rsi
movq %r12, %rdi
callq 0x2120
movq %rax, (%r15)
xorl %r13d, %r13d
xorl %ebp, %ebp
cmpq %r13, %r12
je 0x7016e
movq 0x20(%rbx), %rax
movl %r13d, %ecx
shrl %ecx
cmpl $0x0, (%rax,%rcx,8)
js 0x70169
movq 0x28(%rbx), %rax
testl $0xfffffffe, (%rax,%r13,8) # imm = 0xFFFFFFFE
je 0x70169
movq %rbx, %rdi
movl %r13d, %esi
movl %r14d, %edx
movq %r15, %rcx
callq 0x6e781
cmpq $0x1, %rax
jne 0x70169
movq 0x48(%rsp), %rsi
movl 0x38(%rsp), %edx
movq 0x18(%rsp), %rax
movl (%rax), %r8d
movq %rbx, %rdi
movl %r13d, %ecx
callq 0x6fce2
addl %eax, %ebp
incq %r13
jmp 0x70112
movq (%rsp), %rdi
callq 0x2220
movq 0x18(%rsp), %rdi
callq 0x2220
movq 0x30(%rsp), %rdi
callq 0x2220
movq 0x48(%rsp), %rdi
callq 0x2220
movq 0x60(%rsp), %rdi
callq 0x2220
testl %ebp, %ebp
je 0x701b3
movq %rbx, %rdi
callq 0x694eb
movq %rbx, %rdi
callq 0x69638
movl %ebp, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: asg_cut_tip(asg_t*, int)
int asg_cut_tip(asg_t *g, int max_ext)
{
    double startTime = Get_T();

	asg64_v a = {0,0,0};
	uint32_t n_vtx = g->n_seq * 2, v, i, cnt = 0;
    
	for (v = 0; v < n_vtx; ++v) {
		//if this seq has been deleted
		if (g->seq[v>>1].del) continue;
		///check if the another direction of v has no overlaps
		///if the self direction of v has no overlaps, we don't have the overlaps of them
		///here is check if the reverse direction of v 
		/**
		 the following first line is to find (means v is a node has no prefix):
		        (v)--->()---->()---->()----->....
         another case is:
            ......()---->()---->()----->()------>(v)
         this case can be found by (v^1), so we don't need to process this case here
		**/
		if (asg_is_utg_end(g, v, 0) != ASG_ET_TIP) continue; // not a tip
        /**
         the following second line is: 
		 (v)--->()---->()---->()----->()
		        |--------max_ext-------|
        **/
       ///that means here is a long tip, which is longer than max_ext
		if (asg_extend(g, v, max_ext, &a) == ASG_ET_MERGEABLE) continue; // not a short unitig

		/**
		 * so combining the last two lines, they are designed to reomve(n(0), n(1), n(2)):
		 *                  		    ----->n(4)
		 *                  		   |
		 * n(0)--->n(1)---->n(2)---->n(3)
		 *                             |
		 *                              ----->n(5)
		**/
		for (i = 0; i < a.n; ++i)
			asg_seq_del(g, (uint32_t)a.a[i]>>1);
		++cnt;
	}
	free(a.a);
	if (cnt > 0) asg_cleanup(g);
    if(VERBOSE >= 1)
    {
        fprintf(stderr, "[M::%s] cut %d tips\n", __func__, cnt);
        fprintf(stderr, "[M::%s] takes %0.2f s\n\n", __func__, Get_T()-startTime);
    }
	return cnt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, 0x8(%rsp)
movq %rdi, %rbx
callq 0x251c
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rax
movaps %xmm0, (%rax)
andq $0x0, 0x10(%rax)
movl 0x14(%rbx), %r13d
addl %r13d, %r13d
xorl %r12d, %r12d
xorl %ebp, %ebp
cmpl %r13d, %r12d
je 0x705c9
movq 0x20(%rbx), %rax
movl %r12d, %ecx
shrl %ecx
cmpl $0x0, (%rax,%rcx,8)
js 0x705c4
movq %rbx, %rdi
movl %r12d, %esi
xorl %edx, %edx
callq 0x6bf48
cmpl $0x1, %eax
jne 0x705c4
movq %rbx, %rdi
movl %r12d, %esi
movl 0x8(%rsp), %edx
leaq 0x10(%rsp), %rcx
callq 0x6be7f
testl %eax, %eax
je 0x705c4
movl %ebp, 0xc(%rsp)
movq 0x10(%rsp), %r15
movq 0x20(%rsp), %r14
xorl %eax, %eax
movl %eax, %ebp
cmpq %rbp, %r15
jbe 0x705be
movl (%r14,%rbp,8), %esi
shrl %esi
movq %rbx, %rdi
callq 0x6f8da
leal 0x1(%rbp), %eax
jmp 0x705a4
movl 0xc(%rsp), %ebp
incl %ebp
incl %r12d
jmp 0x70556
movq 0x20(%rsp), %rdi
callq 0x2220
testl %ebp, %ebp
je 0x705df
movq %rbx, %rdi
callq 0x694eb
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
movq %rdi, %r14
movl 0x14(%rdi), %eax
addl %eax, %eax
xorl %ecx, %ecx
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movsd 0x16fa01(%rip), %xmm1   # 0x1e0010
xorl %ebx, %ebx
cmpq %rax, %rcx
je 0x706bf
movq 0x28(%r14), %rsi
movq (%rsi,%rcx,8), %r8
testl $0xfffffffe, %r8d       # imm = 0xFFFFFFFE
je 0x706b7
movq 0x8(%r14), %r10
movq %r8, %rsi
shrq $0x20, %rsi
imulq $0x18, %rsi, %r11
leaq (%r10,%r11), %rdi
movl 0xc(%rdi), %esi
andl %edx, %esi
cvtsi2ss %esi, %xmm2
mulss %xmm0, %xmm2
cvtss2sd %xmm2, %xmm2
addsd %xmm1, %xmm2
cvttsd2si %xmm2, %r9
movl %r8d, %esi
imulq $0x18, %rsi, %r15
addq %r11, %r15
addq %r15, %r10
addq $-0xc, %r10
movq %rsi, %r12
movq %r12, %r11
movl %r8d, %r15d
cmpq $0x1, %r12
je 0x70692
movl (%r10), %ebp
andl %edx, %ebp
addq $-0x18, %r10
leaq -0x1(%r11), %r12
leal -0x1(%r15), %r8d
cmpl %r9d, %ebp
jb 0x70670
movl %r11d, %r8d
movl %r15d, %r9d
imulq $0x18, %r9, %r9
addq %r9, %rdi
addq $0xc, %rdi
cmpq %rsi, %r8
jae 0x706b7
orb $-0x80, 0x3(%rdi)
incl %ebx
incq %r8
addq $0x18, %rdi
jmp 0x706a3
incq %rcx
jmp 0x70611
testl %ebx, %ebx
je 0x706d3
movq %r14, %rdi
callq 0x694eb
movq %r14, %rdi
callq 0x69638
movq 0x1e2906(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1779b6(%rip), %rsi    # 0x1e809a
leaq 0x1779d2(%rip), %rdx    # 0x1e80bd
movl %ebx, %ecx
xorl %eax, %eax
callq 0x22b0
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: detect_single_path_with_dels(asg_t*, unsigned int, unsigned int*, long long*, buf_t*)
uint32_t detect_single_path_with_dels(asg_t *g, uint32_t begNode, uint32_t* endNode, long long* Len, buf_t* b)
{
    uint32_t v = begNode, w;
    uint32_t kv, kw;
    (*Len) = 0;

    while (1)
    {
        (*Len)++;
        kv = get_real_length(g, v, NULL);
        (*endNode) = v;

        if(b) kv_push(uint32_t, b->b, v>>1);

        if(kv == 0)
        {
            return END_TIPS;
        }

        if(kv == 2)
        {
            return TWO_OUTPUT;
        }

        if(kv > 2)
        {
            return MUL_OUTPUT;
        }

        ///up to here, kv=1
        ///kw must >= 1
        get_real_length(g, v, &w);
        kw = get_real_length(g, w^1, NULL);
        v = w;
        (*endNode) = v;


        if(kw == 2)
        {
            (*Len)++;
            if(b) kv_push(uint32_t, b->b, v>>1);
            return TWO_INPUT;
        }

        if(kw > 2)
        {
            (*Len)++;
            if(b) kv_push(uint32_t, b->b, v>>1);
            return MUL_INPUT;
        }   


        if((v>>1) == (begNode>>1))
        {
            return LOOP;
        } 
    }

    return LONG_TIPS;   
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, %rbx
andq $0x0, (%rcx)
movl %esi, 0x4(%rsp)
incq (%r15)
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0xc2e7a
movl %eax, %r13d
movl %ebp, (%r12)
testq %r14, %r14
je 0x708f3
movq 0x38(%r14), %rcx
movq 0x48(%r14), %rax
cmpq 0x40(%r14), %rcx
jne 0x708e4
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rsi
movq %rsi, 0x40(%r14)
shlq $0x2, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x48(%r14)
movq 0x38(%r14), %rcx
movl %ebp, %edx
shrl %edx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x38(%r14)
movl %edx, (%rax,%rcx,4)
testl %r13d, %r13d
je 0x70942
cmpl $0x2, %r13d
je 0x709a0
ja 0x70946
movq %rbx, %rdi
movl %ebp, %esi
movq %rsp, %rdx
callq 0xc2e7a
movl (%rsp), %esi
xorl $0x1, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xc2e7a
movl (%rsp), %ebp
movl %ebp, (%r12)
cmpl $0x2, %eax
je 0x7094c
ja 0x70953
movl %ebp, %eax
xorl 0x4(%rsp), %eax
cmpl $0x2, %eax
jae 0x70895
pushq $0x7
jmp 0x70948
pushq $0x5
jmp 0x70948
pushq $0x4
popq %r13
jmp 0x709a0
incq (%r15)
pushq $0x1
jmp 0x70958
incq (%r15)
pushq $0x3
popq %r13
testq %r14, %r14
je 0x709a0
movq 0x38(%r14), %rcx
movq 0x48(%r14), %rax
cmpq 0x40(%r14), %rcx
jne 0x70993
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rsi
movq %rsi, 0x40(%r14)
shlq $0x2, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x48(%r14)
movq 0x38(%r14), %rcx
shrl %ebp
leaq 0x1(%rcx), %rdx
movq %rdx, 0x38(%r14)
movl %ebp, (%rax,%rcx,4)
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: if_long_tip_length(asg_t*, ma_ug_t*, unsigned int, unsigned int*, long long, long long, float, long long)
uint32_t if_long_tip_length(asg_t *sg, ma_ug_t *ug, uint32_t begNode, uint32_t* untigLen, 
long long minLongUntig, long long maxShortUntig, float ShortUntigRate, long long mainLen)
{
    long long nodeLen, baseLen, max_stop_nodeLen, max_stop_baseLen;
    uint32_t Len, endNode;
    if(untigLen == NULL)
    {
        if(get_unitig(sg, ug, begNode, &endNode, &nodeLen, &baseLen, 
                                        &max_stop_nodeLen, &max_stop_baseLen, 1, NULL) == LOOP)
        {
            ///the length of LOOP is infinite
            return 1;
        }
        Len = nodeLen;
    }
    else
    {
        Len = (*untigLen);
    }
    
    
    if(Len == 0) return 0;
    if(Len < (ShortUntigRate*mainLen)) return 0;
    if(Len >= maxShortUntig) return 1;
    if(Len >= minLongUntig && Len >= (ShortUntigRate*mainLen)) return 1;
    return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %r9, %r14
movq %r8, %rbx
pushq $0x1
popq %rbp
testq %rcx, %rcx
je 0x71502
movl (%rcx), %ecx
jmp 0x71544
movss %xmm0, 0x4(%rsp)
leaq 0x18(%rsp), %rax
leaq 0x20(%rsp), %r10
leaq 0x14(%rsp), %rcx
leaq 0x8(%rsp), %r8
leaq 0x28(%rsp), %r9
pushq $0x0
pushq $0x1
pushq %rax
pushq %r10
callq 0xc2ebf
addq $0x20, %rsp
cmpl $0x7, %eax
jne 0x7153a
movl %ebp, %eax
jmp 0x71579
movl 0x8(%rsp), %ecx
movss 0x4(%rsp), %xmm0
xorl %eax, %eax
testl %ecx, %ecx
je 0x71579
movl %ecx, %ecx
cvtsi2ss %rcx, %xmm2
cvtsi2ssq 0x50(%rsp), %xmm1
mulss %xmm0, %xmm1
ucomiss %xmm2, %xmm1
ja 0x71579
movl %ebp, %eax
cmpq %r14, %rcx
jge 0x71579
cmpq %rbx, %rcx
setge %al
ucomiss %xmm1, %xmm2
setae %cl
andb %al, %cl
movzbl %cl, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
movq %rdi, %r14
movl 0x14(%rdi), %eax
addl %eax, %eax
xorl %ecx, %ecx
xorl %ebx, %ebx
cmpq %rax, %rcx
je 0x719cf
movq 0x20(%r14), %rdi
movl %ecx, %edx
shrl %edx
cmpl $0x0, (%rdi,%rdx,8)
js 0x719ca
movq 0x28(%r14), %rdi
movq (%rdi,%rcx,8), %rdi
testl $0xfffffffe, %edi       # imm = 0xFFFFFFFE
je 0x719ca
movq 0x8(%r14), %r8
movq %rdi, %r9
shrq $0x20, %r9
imulq $0x18, %rdx, %rdx
addq %rsi, %rdx
addq $0x10, %rdx
movl %edi, %edi
decq %rdi
imulq $0x18, %r9, %r9
addq %r9, %r8
addq $0x2a, %r8
subq $0x1, %rdi
jb 0x719ca
cmpb $0x0, (%r8)
jne 0x719c4
cmpb $0x1, (%rdx)
jne 0x719c4
movl -0xa(%r8), %r9d
shrl %r9d
imulq $0x18, %r9, %r9
cmpb $0x1, 0x10(%rsi,%r9)
jne 0x719c4
orb $-0x80, -0x3(%r8)
incl %ebx
addq $0x18, %r8
jmp 0x71999
incq %rcx
jmp 0x71950
testl %ebx, %ebx
je 0x719e3
movq %r14, %rdi
callq 0x694eb
movq %r14, %rdi
callq 0x69638
movq 0x1e15f6(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x176715(%rip), %rsi    # 0x1e8109
leaq 0x176733(%rip), %rdx    # 0x1e812e
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_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: asg_topocut_aux(asg_t*, unsigned int, int)
int asg_topocut_aux(asg_t *g, uint32_t v, int max_ext)
{
	int32_t n_ext;
	for (n_ext = 1; n_ext < max_ext && v != (uint32_t)-1; ++n_ext) {
		if (asg_check_unambi1(g, v^1) == (uint32_t)-1) {
			--n_ext;
			break;
		}
		v = asg_check_unambi1(g, v);
	}
    
	return n_ext;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r14
pushq $0x1
popq %rbx
cmpl $-0x1, %r15d
je 0x71a51
cmpl %ebp, %ebx
jge 0x71a51
movl %r15d, %esi
xorl $0x1, %esi
movq %r14, %rdi
callq 0x71a5e
cmpl $-0x1, %eax
je 0x71a4f
movq %r14, %rdi
movl %r15d, %esi
callq 0x71a5e
movl %eax, %r15d
incl %ebx
jmp 0x71a20
decl %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: asg_check_unambi1(asg_t*, unsigned int)
static uint32_t asg_check_unambi1(asg_t *g, uint32_t v)
{
	asg_arc_t *av = asg_arc_a(g, v);
	uint32_t i, nv = asg_arc_n(g, v);
	uint32_t k = nv, kv;
	for (i = 0, kv = 0; i < nv; ++i)
		if (!av[i].del) ++kv, k = i;
	if (kv != 1) return (uint32_t)-1;
	return av[k].v;
}

// Assembly:
movq 0x8(%rdi), %r8
movq 0x28(%rdi), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rax
movq %rax, %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rsi
leaq (%r8,%rsi), %rcx
movl %eax, %edx
addq %r8, %rsi
addq $0xc, %rsi
xorl %edi, %edi
xorl %r8d, %r8d
cmpq %rdi, %rdx
je 0x71aa7
xorl %r9d, %r9d
cmpl $0x0, (%rsi)
cmovnsl %edi, %eax
setns %r9b
addl %r9d, %r8d
incq %rdi
addq $0x18, %rsi
jmp 0x71a89
cmpl $0x1, %r8d
jne 0x71ab8
movl %eax, %eax
imulq $0x18, %rax, %rax
movl 0x8(%rcx,%rax), %eax
retq
pushq $-0x1
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: asg_topocut_aux_pg(asg_t*, unsigned int, int, unsigned int*)
int asg_topocut_aux_pg(asg_t *g, uint32_t v, int max_ext, uint32_t *rv)
{
    int32_t n_ext; (*rv) = (uint32_t)-1;
    for (n_ext = 1; n_ext < max_ext && v != (uint32_t)-1; ++n_ext) {
        if (asg_check_unambi1(g, v^1) == (uint32_t)-1) {
            --n_ext; (*rv) = v^1;/// asg_arc_n(g, v) >= 2
            break;
        }
        v = asg_check_unambi1(g, v);
    }
    
    return n_ext;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, %r15
orl $-0x1, (%rcx)
pushq $0x1
popq %rbx
cmpl $-0x1, %r12d
je 0x71b10
cmpl %ebp, %ebx
jge 0x71b10
movl %r12d, %r13d
xorl $0x1, %r13d
movq %r15, %rdi
movl %r13d, %esi
callq 0x71a5e
cmpl $-0x1, %eax
je 0x71b0b
movq %r15, %rdi
movl %r12d, %esi
callq 0x71a5e
movl %eax, %r12d
incl %ebx
jmp 0x71ad8
decl %ebx
movl %r13d, (%r14)
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_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: get_tip_trio_infor(asg_t*, unsigned int)
uint8_t get_tip_trio_infor(asg_t *sg, uint32_t begNode)
{
    uint32_t v = begNode, w;
    uint32_t kv;
    uint32_t eLen = 0, uLen = 0;
    uint32_t father_occ = 0, mother_occ = 0, ambigious_occ = 0;

    while (1)
    {
        kv = get_real_length(sg, v, NULL);
        eLen++;

        if(R_INF.trio_flag[v>>1]==FATHER)
        {
            father_occ++;
        }
        else if(R_INF.trio_flag[v>>1]==MOTHER)
        {
            mother_occ++;
        }
        else if((R_INF.trio_flag[v>>1]==AMBIGU) || (R_INF.trio_flag[v>>1]==DROP))
        {
            ambigious_occ++;
        }
        
        if(kv!=1) break;
        ///kv must be 1 here
        kv = get_real_length(sg, v, &w);
        if(get_real_length(sg, w^1, NULL)!=1) break;
        v = w;
        if(v == begNode) break;
    }

    uLen = eLen;
    eLen = father_occ + mother_occ;
    if(eLen == 0) return AMBIGU;
    if(father_occ >= mother_occ)
    {
        if((father_occ > TRIO_THRES*eLen) && (father_occ >= DOUBLE_CHECK_THRES*uLen)) return FATHER;
    }
    else
    {
        if((mother_occ > TRIO_THRES*eLen) && (mother_occ >= DOUBLE_CHECK_THRES*uLen)) return MOTHER;
    }
    return AMBIGU;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
xorl %r13d, %r13d
pushq $0x1
popq %rax
movl %esi, %ebp
xorl %r15d, %r15d
movl %eax, %r12d
movq %r14, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0xc2e7a
leaq 0x1e193f(%rip), %rcx    # 0x254230
movq 0x28(%rcx), %rcx
movl %ebp, %edx
shrl %edx
movzbl (%rcx,%rdx), %ecx
cmpl $0x2, %ecx
je 0x7290c
cmpl $0x1, %ecx
jne 0x7290f
incl %r13d
jmp 0x7290f
incl %r15d
cmpl $0x1, %eax
jne 0x72946
movq %r14, %rdi
movl %ebp, %esi
leaq 0x4(%rsp), %rdx
callq 0xc2e7a
movl 0x4(%rsp), %esi
xorl $0x1, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0xc2e7a
cmpl $0x1, %eax
jne 0x72946
leal 0x1(%r12), %eax
movl 0x4(%rsp), %ebp
cmpl %ebx, %ebp
jne 0x728db
movl %r15d, %eax
addl %r13d, %eax
je 0x729aa
movl %eax, %eax
cvtsi2sd %rax, %xmm0
mulsd 0x170be3(%rip), %xmm0   # 0x1e3540
cmpl %r15d, %r13d
jae 0x72984
movl %r15d, %eax
cvtsi2sd %rax, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x729aa
movl %r12d, %eax
cvtsi2sd %rax, %xmm0
mulsd 0x170270(%rip), %xmm0   # 0x1e2bf0
movb $0x2, %al
jmp 0x729a4
movl %r13d, %eax
cvtsi2sd %rax, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x729aa
movl %r12d, %eax
cvtsi2sd %rax, %xmm0
mulsd 0x17024e(%rip), %xmm0   # 0x1e2bf0
movb $0x1, %al
ucomisd %xmm0, %xmm1
jae 0x729ac
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: count_edges_v_w(asg_t*, unsigned int, unsigned int)
int64_t count_edges_v_w(asg_t *g, uint32_t v, uint32_t w)
{
    asg_arc_t* av = asg_arc_a(g, v); uint32_t nv = asg_arc_n(g, v), i, occ = 0;
    for (i = 0; i < nv; i++) {
        if(av[i].del) continue;
        if(av[i].v == w) occ++;
    }
    return occ;
}

// Assembly:
movq 0x8(%rdi), %rcx
movq 0x28(%rdi), %rax
movl %esi, %esi
movq (%rax,%rsi,8), %rax
movl %eax, %esi
movq %rax, %rdi
shrq $0x20, %rdi
imulq $0x18, %rsi, %rax
imulq $0x18, %rdi, %rsi
addq %rsi, %rcx
addq $0xc, %rcx
xorl %esi, %esi
xorl %edi, %edi
cmpq %rsi, %rax
je 0x76c90
cmpl $0x0, (%rcx,%rsi)
js 0x76c8a
xorl %r8d, %r8d
cmpl %edx, -0x4(%rcx,%rsi)
sete %r8b
addl %r8d, %edi
addq $0x18, %rsi
jmp 0x76c71
movl %edi, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: update_ug_ou(ma_ug_t*, asg_t*)
void update_ug_ou(ma_ug_t *ug, asg_t *sg)
{
    uint32_t k, i, uv, uw, rv, rw, nv; asg_arc_t *ue, *av;
    for (k = 0; k < ug->g->n_arc; k++) {
        ue = &(ug->g->arc[k]); ue->ou = 0;
        uv = ue->ul>>32; uw = ue->v;
        if(uv&1) rv = ug->u.a[uv>>1].start^1;
        else rv = ug->u.a[uv>>1].end^1;

        if(uw&1) rw = ug->u.a[uw>>1].end;
        else rw = ug->u.a[uw>>1].start;

        av = asg_arc_a(sg, rv);
        nv = asg_arc_n(sg, rv);
        for (i = 0; i < nv; i++) {
            if(av[i].v == rw) break;
        }
        assert(i < nv);
        ue->ou = av[i].ou;
    }

    // asg_arc_t *e; uint32_t v, w;
    // for (k = 0; k < sg->n_arc; k++) {
    //     e = &(sg->arc[k]);
    //     v = e->v^1; w = (e->ul>>32)^1;
    //     av = asg_arc_a(sg, v); nv = asg_arc_n(sg, v);
    //     for (i = 0; i < nv; i++) {
    //         if(av[i].v == w) break;
    //     }
    //     if(i >= nv || av[i].ou != e->ou) fprintf(stderr, "[M::%s::asymmetry]\n", __func__);
    // }

    // for (k = 0; k < ug->g->n_arc; k++) {
    //     e = &(ug->g->arc[k]);
    //     v = e->v^1; w = (e->ul>>32)^1;
    //     av = asg_arc_a(ug->g, v); nv = asg_arc_n(ug->g, v);
    //     for (i = 0; i < nv; i++) {
    //         if(av[i].v == w) break;
    //     }
    //     if(i >= nv || av[i].ou != e->ou) fprintf(stderr, "[M::%s::asymmetry]\n", __func__);
    // }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
xorl %eax, %eax
movq 0x18(%rdi), %rcx
movl 0x4(%rcx), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
cmpq %rdx, %rax
jae 0x76d6c
movq 0x8(%rcx), %r8
imulq $0x18, %rax, %r9
leaq (%r8,%r9), %rcx
movzwl 0x10(%r8,%r9), %edx
andl $0xc000, %edx           # imm = 0xC000
movw %dx, 0x10(%r8,%r9)
movq (%r8,%r9), %r10
movl 0x8(%r8,%r9), %r8d
xorl %r9d, %r9d
btq $0x20, %r10
setae %r9b
movq 0x10(%rdi), %r11
shrq $0x21, %r10
imulq $0x28, %r10, %r10
addq %r11, %r10
movl 0x4(%r10,%r9,4), %r10d
xorq $0x1, %r10
movl %r8d, %r9d
shrl %r9d
imulq $0x28, %r9, %r9
addq %r11, %r9
andl $0x1, %r8d
movl 0x4(%r9,%r8,4), %r9d
movq 0x8(%rsi), %r8
movq 0x28(%rsi), %r11
movq (%r11,%r10,8), %r10
movl %r10d, %ebx
shrq $0x20, %r10
imulq $0x18, %r10, %r10
leaq (%r8,%r10), %r11
addq $0x8, %r11
imulq $0x18, %rbx, %rbx
addq $0x18, %rbx
xorl %r15d, %r15d
leaq 0x18(%r15), %r14
cmpq %r14, %rbx
je 0x76d72
cmpl %r9d, (%r11,%r15)
movq %r14, %r15
jne 0x76d3b
addq %r10, %r8
movzwl -0x8(%r14,%r8), %r8d
andl $0x3fff, %r8d           # imm = 0x3FFF
orl %r8d, %edx
movw %dx, 0x10(%rcx)
incq %rax
jmp 0x76c9a
popq %rbx
popq %r14
popq %r15
retq
leaq 0x171425(%rip), %rdi    # 0x1e819e
leaq 0x171011(%rip), %rsi    # 0x1e7d91
leaq 0x17141e(%rip), %rcx    # 0x1e81a5
movl $0x2207, %edx           # imm = 0x2207
callq 0x2110