LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Overlaps.cpp
// Function: detect_bubble_end(asg_t*, unsigned int, unsigned int, unsigned int*, long long*, buf_t*)
int detect_bubble_end(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(g, begNode1, &e1, &l1, b) == TWO_INPUT 
       && 
       detect_single_path(g, begNode2, &e2, &l2, b) == 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
movq %r9, %r8
callq 0xa36ca
xorl %ebp, %ebp
cmpl $0x1, %eax
jne 0xa3930
movq %rsp, %rdx
leaq 0x8(%rsp), %rcx
movq %r13, %rdi
movl %r12d, %esi
movq %r15, %r8
callq 0xa36ca
cmpl $0x1, %eax
jne 0xa3930
movl 0x4(%rsp), %eax
cmpl (%rsp), %eax
jne 0xa3930
movl %eax, (%r14)
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
cmpq %rcx, %rax
cmovlq %rax, %rcx
movq %rcx, (%rbx)
movl $0x1, %ebp
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_O1/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
movq %r9, %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
callq 0xa3b88
xorl %ebp, %ebp
cmpl $0x1, %eax
jne 0xa3f0e
movq %rsp, %rdx
leaq 0x8(%rsp), %rcx
movq %r13, %rdi
movl %r12d, %esi
movq %r15, %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
callq 0xa3b88
cmpl $0x1, %eax
jne 0xa3f0e
movl 0x4(%rsp), %eax
cmpl (%rsp), %eax
jne 0xa3f0e
movl %eax, (%r14)
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
cmpq %rcx, %rax
cmovlq %rax, %rcx
movq %rcx, (%rbx)
movl $0x1, %ebp
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_O1/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 $0x28, %rsp
xorl %ebp, %ebp
testl %edx, %edx
je 0xa400e
movq %r9, %r13
movq %r8, %rbx
movq %rcx, %r15
movq %rsi, %r14
movq %rdi, %r12
movl %edx, 0x4(%rsp)
movl (%rsi), %esi
movq %rsp, %rdx
leaq 0x8(%rsp), %rcx
movq %r9, %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
callq 0xa3b88
andl $0x5, %eax
cmpl $0x1, %eax
jne 0xa400e
movq %r15, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
movl (%rsp), %esi
movq 0x8(%rsp), %rbx
movl 0x4(%rsp), %eax
cmpl $0x1, %eax
je 0xa3fdc
movl %eax, %eax
movq %rax, 0x20(%rsp)
movl $0x1, %r15d
movq %rsi, %rbp
movl (%r14,%r15,4), %esi
movq %r12, %rdi
movq %rsp, %rdx
leaq 0x8(%rsp), %rcx
movq %r13, %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
callq 0xa3b88
andl $0x5, %eax
cmpl $0x1, %eax
jne 0xa400c
movq %rbp, %rsi
cmpl %esi, (%rsp)
jne 0xa400c
movq 0x8(%rsp), %rax
cmpq %rbx, %rax
cmovlq %rax, %rbx
incq %r15
cmpq %r15, 0x20(%rsp)
jne 0xa3f96
movq 0x28(%r12), %rax
movq %rsi, %rcx
xorq $0x1, %rcx
movl 0x4(%rsp), %edx
cmpl %edx, (%rax,%rcx,8)
movl $0x0, %ebp
jne 0xa400e
movq 0x10(%rsp), %rax
movl %esi, (%rax)
movq 0x18(%rsp), %rax
movq %rbx, (%rax)
movl $0x1, %ebp
jmp 0xa400e
xorl %ebp, %ebp
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_O1/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:
movq 0x28(%rdi), %rax
movl %esi, %esi
movq (%rax,%rsi,8), %rsi
testl %esi, %esi
je 0xa52b3
movq 0x8(%rdi), %rdi
movq %rsi, %r8
shrq $0x20, %r8
xorl %eax, %eax
testl %ecx, %ecx
setne %al
shll $0x1f, %eax
movl %esi, %esi
leaq (%r8,%r8,2), %rcx
leaq (%rdi,%rcx,8), %rcx
addq $0xc, %rcx
shlq $0x3, %rsi
leaq (%rsi,%rsi,2), %rsi
xorl %edi, %edi
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
cmpl %edx, -0x4(%rcx,%rdi)
jne 0xa52aa
movl (%rcx,%rdi), %r9d
andl %r8d, %r9d
orl %eax, %r9d
movl %r9d, (%rcx,%rdi)
addq $0x18, %rdi
cmpq %rdi, %rsi
jne 0xa5296
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, %r13
callq 0x300fc
movq 0x30(%r13), %rdi
movl 0x14(%r13), %edx
addl %edx, %edx
xorl %esi, %esi
callq 0x20e0
leaq 0x1e3a8c(%rip), %rax    # 0x28a758
movslq 0x7c(%rax), %rbx
leaq (,%rbx,8), %rdi
callq 0x2280
movq %rax, %r14
testq %rbx, %rbx
jle 0xa6d2d
xorl %r15d, %r15d
movq %r14, %r12
movl $0x18, %edi
callq 0x2280
movq %r13, 0x10(%rax)
movl %ebx, 0x4(%rax)
movl %r15d, (%rax)
movl %ebp, 0x8(%rax)
movq %r12, %rdi
xorl %esi, %esi
leaq -0x1de(%rip), %rdx      # 0xa6b30
movq %rax, %rcx
callq 0x23c0
incq %r15
leaq 0x1e3a38(%rip), %rax    # 0x28a758
movslq 0x7c(%rax), %rbx
addq $0x8, %r12
cmpq %rbx, %r15
jl 0xa6ceb
leaq 0x1e3a24(%rip), %r15    # 0x28a758
cmpl $0x0, 0x7c(%r15)
jle 0xa6d54
xorl %ebx, %ebx
movq (%r14,%rbx,8), %rdi
xorl %esi, %esi
callq 0x2170
incq %rbx
movslq 0x7c(%r15), %rax
cmpq %rax, %rbx
jl 0xa6d3d
movq %r14, %rdi
callq 0x2220
movl 0x14(%r13), %eax
addl %eax, %eax
je 0xa6dad
movq 0x20(%r13), %rcx
movl %eax, %edx
xorl %edi, %edi
xorl %eax, %eax
xorl %esi, %esi
movl %edi, %r8d
shrl %r8d
cmpl $0x0, (%rcx,%r8,8)
js 0xa6da1
movq 0x30(%r13), %r8
movb (%r8,%rdi), %r8b
xorl %r9d, %r9d
cmpb $0x1, %r8b
sete %r9b
addq %r9, %rsi
xorl %r9d, %r9d
cmpb $0x2, %r8b
sete %r9b
addq %r9, %rax
incq %rdi
cmpq %rdi, %rdx
jne 0xa6d70
addl %esi, %eax
jmp 0xa6daf
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_O1/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, %r15
movq %rdi, %rbx
callq 0x300fc
movq 0x30(%rbx), %rdi
movl 0x14(%rbx), %edx
addl %edx, %edx
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x20e0
movq (%r15), %rsi
movq %rbx, %rdi
callq 0xa6e76
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
movl %ebp, %ecx
callq 0x9fb31
movl 0x8(%r15), %edi
movl 0x14(%rbx), %eax
addl %eax, %eax
movslq %eax, %rcx
leaq 0x1ce(%rip), %rsi       # 0xa6fe1
movq %r15, %rdx
callq 0x1047b4
movl 0x14(%rbx), %ecx
addl %ecx, %ecx
je 0xa6e68
movq 0x20(%rbx), %rax
movl %ecx, %ecx
xorl %esi, %esi
xorl %r14d, %r14d
xorl %edx, %edx
movl %esi, %edi
shrl %edi
cmpl $0x0, (%rax,%rdi,8)
js 0xa6e5d
movq 0x30(%rbx), %rdi
movb (%rdi,%rsi), %dil
xorl %r8d, %r8d
cmpb $0x1, %dil
sete %r8b
addq %r8, %rdx
xorl %r8d, %r8d
cmpb $0x2, %dil
sete %r8b
addq %r8, %r14
incq %rsi
cmpq %rsi, %rcx
jne 0xa6e2f
addl %edx, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0xa712f
movq 0x28(%rbx), %rax
movl %r14d, %r13d
testl $0xfffffffe, (%rax,%r13,8) # imm = 0xFFFFFFFE
je 0xa712f
movl %r14d, %ecx
movq (%rax,%rcx,8), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
andq %rax, %rcx
je 0xa712f
movq %rdi, %r15
movslq %edx, %rdx
leaq (%rdx,%rdx,4), %r12
shlq $0x4, %r12
addq (%rdi), %r12
movq 0x8(%rbx), %rdx
shrq $0x20, %rax
leaq (%rax,%rax,2), %rax
leaq (%rdx,%rax,8), %rax
addq $0xc, %rax
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
xorl %esi, %esi
movl (%rax,%rdx), %edi
notl %edi
shrl $0x1f, %edi
addl %edi, %esi
addq $0x18, %rdx
cmpq %rdx, %rcx
jne 0xa705f
cmpl $0x2, %esi
jl 0xa712f
movq 0x30(%rbx), %rax
cmpb $0x1, (%rax,%r13)
je 0xa7105
movq 0x20(%r15), %rdx
movq %rbx, %rdi
movl %r14d, %esi
movq %r12, %rcx
callq 0xe46a0
testq %rax, %rax
je 0xa7105
cmpq $0x0, 0x20(%r12)
je 0xa70e9
movl $0x1, %eax
xorl %edx, %edx
movb $0x1, %cl
movq 0x30(%r12), %rsi
movl (%rsi,%rdx,4), %esi
cmpl %r14d, %esi
je 0xa70de
movq 0x18(%r12), %rdi
cmpl (%rdi), %esi
je 0xa70de
movq 0x30(%rbx), %rdi
movb %cl, (%rdi,%rsi)
movq 0x30(%rbx), %rsi
movq 0x30(%r12), %rdi
movl (%rdi,%rdx,4), %edx
xorq $0x1, %rdx
movb %cl, (%rsi,%rdx)
movl %eax, %edx
incl %eax
cmpq %rdx, 0x20(%r12)
ja 0xa70ae
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 0xa712f
movq 0x30(%rbx), %rax
cmpb $0x0, (%rax,%r13)
jne 0xa712f
movq %rbx, %rdi
movl %r14d, %esi
callq 0xa688c
testl %eax, %eax
je 0xa712f
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_O1/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 %r14
pushq %rbx
movq 0x20(%rdi), %rax
movl %esi, %ecx
orl $0x80000000, (%rax,%rcx,8) # imm = 0x80000000
addl %esi, %esi
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
leaq (%rax,%rsi), %rdx
movq 0x28(%rdi), %r8
movq (%r8,%rdx,8), %r9
testl %r9d, %r9d
je 0xa804d
movq %r9, %r8
shrq $0x20, %r8
leaq (%r8,%r8,2), %r8
shlq $0x3, %r8
addq 0x8(%rdi), %r8
movl %r9d, %r9d
xorl %r10d, %r10d
leaq (%r10,%r10,2), %r11
orb $-0x80, 0xf(%r8,%r11,8)
movl 0x8(%r8,%r11,8), %r11d
xorq $0x1, %r11
movq 0x28(%rdi), %rbx
movq (%rbx,%r11,8), %rbx
movq %rbx, %r11
andq %rcx, %r11
je 0xa8045
movq 0x8(%rdi), %r14
shrq $0x20, %rbx
shlq $0x3, %r11
leaq (%r11,%r11,2), %r11
leaq (%rbx,%rbx,2), %rbx
leaq (%r14,%rbx,8), %rbx
addq $0xc, %rbx
xorl %r14d, %r14d
movl -0x4(%rbx,%r14), %ebp
xorl %edx, %ebp
cmpl $0x1, %ebp
jne 0xa803c
orb $-0x80, 0x3(%rbx,%r14)
addq $0x18, %r14
cmpq %r14, %r11
jne 0xa802a
incq %r10
cmpq %r9, %r10
jne 0xa7fe8
leaq 0x1(%rax), %rdx
testq %rax, %rax
movq %rdx, %rax
je 0xa7fbe
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x300fc
movl 0x14(%rbx), %eax
addl %eax, %eax
je 0xa861a
movl %eax, %r13d
xorl %r12d, %r12d
xorl %ebp, %ebp
movq 0x20(%rbx), %rax
movl %r12d, %ecx
shrl %ecx
cmpl $0x0, (%rax,%rcx,8)
js 0xa8610
movq 0x28(%rbx), %rax
cmpl $0x2, (%rax,%r12,8)
jne 0xa8610
movq %rbx, %rdi
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0xa8062
addl %eax, %ebp
incq %r12
cmpq %r12, %r13
jne 0xa85e3
jmp 0xa861c
xorl %ebp, %ebp
testl %ebp, %ebp
je 0xa863c
movq %rbx, %rdi
callq 0xa02fa
movq %rbx, %rdi
callq 0xa0333
movq %rbx, %rdi
callq 0xa03e9
orb $-0x80, 0x17(%rbx)
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_O1/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 0x300fc
movl 0x14(%rbx), %eax
leal (%rax,%rax), %ebp
testl %eax, %eax
js 0xa8b86
movq %rbx, %rdi
callq 0xa0333
movq %rbx, %rdi
callq 0xa03e9
orb $-0x80, 0x17(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movq $0x0, 0x60(%rsp)
movl %ebp, %r15d
movl $0x1c, %esi
movq %r15, %rdi
callq 0x2120
movq %rax, (%rsp)
testl %ebp, %ebp
je 0xa8c2b
xorl %r12d, %r12d
movq %rsp, %r13
xorl %ebp, %ebp
movq 0x20(%rbx), %rax
movl %r12d, %ecx
shrl %ecx
cmpl $0x0, (%rax,%rcx,8)
js 0xa8c21
movq 0x28(%rbx), %rax
testl $0xfffffffe, (%rax,%r12,8) # imm = 0xFFFFFFFE
je 0xa8c21
movq %rbx, %rdi
movl %r12d, %esi
movl %r14d, %edx
movq %r13, %rcx
callq 0xa6414
cmpq $0x1, %rax
jne 0xa8c21
movq 0x48(%rsp), %rsi
movl 0x38(%rsp), %edx
movq 0x18(%rsp), %rax
movl (%rax), %r8d
movq %rbx, %rdi
movl %r12d, %ecx
callq 0xa864d
addl %eax, %ebp
incq %r12
cmpq %r12, %r15
jne 0xa8bcf
jmp 0xa8c2d
xorl %ebp, %ebp
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 0xa8c7e
movq %rbx, %rdi
callq 0xa02fa
movq %rbx, %rdi
callq 0xa0333
movq %rbx, %rdi
callq 0xa03e9
orb $-0x80, 0x17(%rbx)
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_O1/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 %r14
pushq %rbx
subq $0x38, %rsp
movq %r9, %r14
movq %r8, %rbx
testq %rcx, %rcx
je 0xaa2a8
movl (%rcx), %ecx
jmp 0xaa2ed
movss %xmm0, 0xc(%rsp)
leaq 0x20(%rsp), %rax
leaq 0x28(%rsp), %r10
leaq 0x1c(%rsp), %rcx
leaq 0x10(%rsp), %r8
leaq 0x30(%rsp), %r9
pushq $0x0
pushq $0x1
pushq %rax
pushq %r10
callq 0x10109f
addq $0x20, %rsp
movl %eax, %ecx
movl $0x1, %eax
cmpl $0x7, %ecx
je 0xaa325
movl 0x10(%rsp), %ecx
movss 0xc(%rsp), %xmm0
xorl %eax, %eax
testl %ecx, %ecx
je 0xaa325
movl %ecx, %ecx
cvtsi2ss %rcx, %xmm2
cvtsi2ssq 0x50(%rsp), %xmm1
mulss %xmm0, %xmm1
ucomiss %xmm2, %xmm1
ja 0xaa325
movl $0x1, %eax
cmpq %r14, %rcx
jge 0xaa325
cmpq %rbx, %rcx
setge %al
ucomiss %xmm1, %xmm2
setae %cl
andb %al, %cl
movzbl %cl, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
cmpl $0x2, %edx
setl %al
cmpl $-0x1, %esi
sete %cl
movl $0x1, %r15d
orb %al, %cl
jne 0xaa7dd
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
xorl %r15d, %r15d
movl %ebp, %esi
xorl $0x1, %esi
movq %r14, %rdi
callq 0xaa7eb
cmpl $-0x1, %eax
je 0xaa7dd
movq %r14, %rdi
movl %ebp, %esi
callq 0xaa7eb
movl %eax, %ebp
leal 0x1(%r15), %eax
cmpl $-0x1, %ebp
je 0xaa7d8
addl $0x2, %r15d
cmpl %ebx, %r15d
movl %eax, %r15d
jl 0xaa7a5
incl %eax
movl %eax, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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), %rcx
movq 0x28(%rdi), %rax
movl %esi, %edx
movq (%rax,%rdx,8), %rdx
movq %rdx, %rax
shrq $0x20, %rax
leaq (%rax,%rax,2), %rsi
xorl %edi, %edi
testl %edx, %edx
je 0xaa83c
movl %edx, %eax
leaq (%rcx,%rsi,8), %r8
addq $0xc, %r8
xorl %r9d, %r9d
xorl %r10d, %r10d
cmpl $0x0, (%r8)
setns %r10b
cmovnsl %r9d, %edx
addl %r10d, %edi
incq %r9
addq $0x18, %r8
cmpq %r9, %rax
jne 0xaa817
cmpl $0x1, %edi
sete %dil
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb %dil, %dil
je 0xaa854
leaq (%rcx,%rsi,8), %rax
movl %edx, %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0x8(%rax,%rcx,8), %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, %rbx
movl $0xffffffff, (%rcx)     # imm = 0xFFFFFFFF
cmpl $0x2, %edx
setl %al
cmpl $-0x1, %esi
sete %cl
movl $0x1, %r15d
orb %al, %cl
jne 0xaa8cf
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, %r14
xorl %r15d, %r15d
movl %r12d, %r13d
xorl $0x1, %r13d
movq %r14, %rdi
movl %r13d, %esi
callq 0xaa7eb
cmpl $-0x1, %eax
je 0xaa8cc
movq %r14, %rdi
movl %r12d, %esi
callq 0xaa7eb
movl %eax, %r12d
leal 0x1(%r15), %eax
cmpl $-0x1, %r12d
je 0xaa8c5
addl $0x2, %r15d
cmpl %ebp, %r15d
movl %eax, %r15d
jl 0xaa88a
incl %eax
movl %eax, %r15d
jmp 0xaa8cf
movl %r13d, (%rbx)
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/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 0x28(%rdi), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rcx
xorl %eax, %eax
testl %ecx, %ecx
je 0xb0168
movq 0x8(%rdi), %rsi
movq %rcx, %rdi
shrq $0x20, %rdi
movl %ecx, %r8d
leaq (%rdi,%rdi,2), %rcx
leaq (%rsi,%rcx,8), %rcx
addq $0xc, %rcx
shlq $0x3, %r8
leaq (%r8,%r8,2), %rsi
xorl %edi, %edi
cmpl $0x0, (%rcx,%rdi)
js 0xb015d
xorl %r8d, %r8d
cmpl %edx, -0x4(%rcx,%rdi)
sete %r8b
addl %r8d, %eax
addq $0x18, %rdi
cmpq %rdi, %rsi
jne 0xb0149
movl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rax
movq 0x18(%rdi), %rcx
testl $0x7fffffff, 0x4(%rcx)  # imm = 0x7FFFFFFF
je 0xb0264
xorl %eax, %eax
movq 0x8(%rcx), %rdx
leaq (%rax,%rax,2), %r8
movzwl 0x10(%rdx,%r8,8), %ecx
andl $0xc000, %ecx           # imm = 0xC000
movw %cx, 0x10(%rdx,%r8,8)
movq (%rdx,%r8,8), %r9
movq %r9, %r10
shrq $0x21, %r10
btq $0x20, %r9
leaq (%r10,%r10,4), %r9
jb 0xb01bb
movq 0x10(%rdi), %r10
leaq (%r10,%r9,8), %r9
addq $0x8, %r9
jmp 0xb01c7
movq 0x10(%rdi), %r10
leaq (%r10,%r9,8), %r9
addq $0x4, %r9
movl 0x8(%rdx,%r8,8), %r11d
movl (%r9), %r9d
movl %r11d, %r10d
shrl %r10d
leaq (%r10,%r10,4), %r10
testb $0x1, %r11b
jne 0xb01ed
movq 0x10(%rdi), %r11
leaq (%r11,%r10,8), %r10
addq $0x4, %r10
jmp 0xb01f9
movq 0x10(%rdi), %r11
leaq (%r11,%r10,8), %r10
addq $0x8, %r10
xorq $0x1, %r9
movq 0x28(%rsi), %r11
movq (%r11,%r9,8), %r9
testl %r9d, %r9d
je 0xb0266
leaq (%rdx,%r8,8), %rdx
movl (%r10), %r8d
movq 0x8(%rsi), %r10
movq %r9, %r11
shrq $0x20, %r11
leaq (%r11,%r11,2), %r11
leaq (%r10,%r11,8), %r10
addq $0x10, %r10
cmpl %r8d, -0x8(%r10)
je 0xb0239
addq $0x18, %r10
decl %r9d
jne 0xb0228
jmp 0xb0266
movzwl (%r10), %r8d
andl $0x3fff, %r8d           # imm = 0x3FFF
orl %r8d, %ecx
movw %cx, 0x10(%rdx)
incq %rax
movq 0x18(%rdi), %rcx
movl 0x4(%rcx), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
cmpq %rdx, %rax
jb 0xb017d
popq %rax
retq
leaq 0x179e41(%rip), %rdi    # 0x22a0ae
leaq 0x179a2d(%rip), %rsi    # 0x229ca1
leaq 0x179e3a(%rip), %rcx    # 0x22a0b5
movl $0x2207, %edx           # imm = 0x2207
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Overlaps.cpp
// Function: get_overlapLen(unsigned int, ma_hit_t_alloc*, unsigned int*, unsigned int*)
void get_overlapLen(uint32_t rId, ma_hit_t_alloc* sources, uint32_t* exactLen, uint32_t* inexactLen)
{
    (*exactLen) = (*inexactLen) = 0;
    ma_hit_t_alloc* x = &(sources[rId]);
    ma_hit_t *h = NULL;
    uint32_t i, len;
    for (i = 0; i < x->length; i++)
    {
        h = &(x->buffer[i]);
        len = Get_qe((*h)) - Get_qs((*h));
        if(h->el == 1)
        {
            (*exactLen) += len;
        }
        else
        {
            (*inexactLen) += len;
        }
    }
}

// Assembly:
xorl %r8d, %r8d
movl %r8d, (%rcx)
movl %r8d, (%rdx)
movl %edi, %eax
leaq (%rax,%rax,2), %rax
cmpl %r8d, 0xc(%rsi,%rax,8)
je 0xb2397
leaq (%rsi,%rax,8), %rax
movq (%rax), %rsi
xorl %edi, %edi
movl 0x8(%rsi), %r8d
subl (%rsi), %r8d
cmpb $0x1, 0x20(%rsi)
movq %rcx, %r9
cmoveq %rdx, %r9
addl %r8d, (%r9)
incq %rdi
movl 0xc(%rax), %r8d
addq $0x28, %rsi
cmpq %r8, %rdi
jb 0xb2372
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Overlaps.cpp
// Function: get_edge_from_source(ma_hit_t_alloc*, ma_sub_t*, R_to_U*, int, int, unsigned int, unsigned int, asg_arc_t*)
uint32_t get_edge_from_source(ma_hit_t_alloc* sources, ma_sub_t *coverage_cut, 
R_to_U* ruIndex, int max_hang, int min_ovlp, uint32_t query, uint32_t target, asg_arc_t* t)
{
    uint32_t qn = query>>1, i;
    int32_t r;
    ma_hit_t *h = NULL;
    ma_sub_t *sq = NULL;
    ma_sub_t *st = NULL;
    ma_hit_t_alloc* x = &(sources[qn]);
    for (i = 0; i < x->length; i++)
    {
        h = &(x->buffer[i]);
        sq = &(coverage_cut[Get_qn(*h)]);
        st = &(coverage_cut[Get_tn(*h)]);
    
        r = ma_hit2arc(h, sq->e - sq->s, st->e - st->s, max_hang, 
                                asm_opt.max_hang_rate, min_ovlp, t);
        
        ///if it is a contained read, skip
        if(r < 0) continue;

        if((t->ul>>32) != query) continue;
        if(t->v != target) continue;
        
        return 1;
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, 0xc(%rsp)
movl %ecx, 0x8(%rsp)
movl %r9d, %eax
shrl %eax
leaq (%rax,%rax,2), %rax
cmpl $0x0, 0xc(%rdi,%rax,8)
je 0xb2db3
movq %rsi, %r14
movq 0x58(%rsp), %r15
leaq (%rdi,%rax,8), %r13
movl %r9d, %eax
movq %rax, 0x10(%rsp)
xorl %r12d, %r12d
movl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
xorl %ebp, %ebp
movq (%r13), %rax
leaq (%rax,%r12), %rdi
movl 0x4(%rax,%r12), %ecx
movl 0xc(%rax,%r12), %eax
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rax,2), %rax
movl 0x4(%r14,%rcx,4), %esi
movl (%r14,%rcx,4), %ecx
andl %ebx, %ecx
subl %ecx, %esi
movl 0x4(%r14,%rax,4), %edx
movl (%r14,%rax,4), %eax
andl %ebx, %eax
subl %eax, %edx
leaq 0x1d79e7(%rip), %rax    # 0x28a758
movss 0x158(%rax), %xmm0
movl 0x8(%rsp), %ecx
movl 0xc(%rsp), %r8d
movq %r15, %r9
callq 0xa159b
testl %eax, %eax
js 0xb2da3
movq 0x10(%rsp), %rax
cmpl %eax, 0x4(%r15)
jne 0xb2da3
movl 0x50(%rsp), %eax
cmpl %eax, 0x8(%r15)
je 0xb2dc4
incq %rbp
movl 0xc(%r13), %eax
addq $0x28, %r12
cmpq %rax, %rbp
jb 0xb2d36
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %eax
jmp 0xb2db5
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Overlaps.cpp
// Function: detect_exact_ovec(ma_utg_t*, asg_t*, ma_hit_t_alloc*, ma_sub_t*, kvec_asg_arc_t_warp*, int, int, unsigned int, unsigned int)
uint32_t detect_exact_ovec(ma_utg_t* collection, asg_t* read_g, ma_hit_t_alloc* sources, 
ma_sub_t *coverage_cut, kvec_asg_arc_t_warp* edge, int max_hang, int min_ovlp,
uint32_t src, uint32_t dest_idx)
{
    asg_arc_t *t = NULL, i_t;
    uint32_t i, k, dest;
    for (i = dest_idx; i < collection->n; i++)
    {
        t = NULL;
        dest = (uint64_t)(collection->a[i])>>32;
        if(get_edge_from_source(sources, coverage_cut, NULL, max_hang, min_ovlp, src, dest, &i_t) == 0)
        {
            for (k = 0; k < edge->a.n; k++)
            {
                if(edge->a.a[k].del) continue;
                if((edge->a.a[k].ul>>32) == src && edge->a.a[k].v == dest)
                {
                    t = &(edge->a.a[k]);
                    break;
                }
            }
        }
        else
        {
            t = &i_t;
        }

        if(t == NULL) return (uint32_t)-1;
        if(t->el != 1) continue;
        return i;
    }

    return (uint32_t)-1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, 0xc(%rsp)
movq %rcx, 0x18(%rsp)
movl 0x80(%rsp), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, 0x10(%rdi)
jbe 0xb3944
movq %rdx, %r12
movq %rdi, %r13
movq %r8, 0x10(%rsp)
movl 0x78(%rsp), %r14d
movl %ecx, %ebx
movq 0x18(%r13), %rax
movl 0x4(%rax,%rbx,8), %ebp
movq %r12, %rdi
movq 0x18(%rsp), %rsi
movl 0xc(%rsp), %ecx
movl 0x70(%rsp), %r8d
movl 0x78(%rsp), %r9d
leaq 0x20(%rsp), %r15
pushq %r15
pushq %rbp
callq 0xb2ced
addq $0x10, %rsp
testl %eax, %eax
jne 0xb391f
movq 0x10(%rsp), %rcx
movq (%rcx), %rax
testq %rax, %rax
je 0xb391c
movq 0x10(%rcx), %rcx
movl $0x1, %edx
xorl %esi, %esi
leaq (%rsi,%rsi,2), %rsi
cmpl $0x0, 0xc(%rcx,%rsi,8)
js 0xb3913
leaq (%rcx,%rsi,8), %r15
cmpl %r14d, 0x4(%r15)
jne 0xb3913
cmpl %ebp, 0x8(%r15)
je 0xb391f
movl %edx, %esi
incl %edx
cmpq %rsi, %rax
ja 0xb38f8
xorl %r15d, %r15d
testq %r15, %r15
je 0xb393b
cmpb $0x1, 0x12(%r15)
je 0xb3942
incq %rbx
movl 0x10(%r13), %eax
cmpq %rax, %rbx
jb 0xb38ad
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xb3944
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Overlaps.cpp
// Function: get_specific_edge(ma_hit_t_alloc*, ma_sub_t*, R_to_U*, kvec_asg_arc_t_warp*, asg_t*, int, int, unsigned int, unsigned int, asg_arc_t*)
void get_specific_edge(ma_hit_t_alloc* sources, ma_sub_t *coverage_cut, 
R_to_U* ruIndex, kvec_asg_arc_t_warp* edge, asg_t* read_g, int max_hang, 
int min_ovlp, uint32_t query, uint32_t target, asg_arc_t* t)
{
    uint32_t nv, k;
    (*t).ul = (uint64_t)-1; (*t).v = (uint32_t)-1;
    if(read_g)
    {
        asg_arc_t* av = asg_arc_a(read_g, query);
        nv = asg_arc_n(read_g, query);
        for (k = 0; k < nv; k++)
        {
            if(av[k].del) continue;
            if(av[k].v == target) 
            {
                (*t) = av[k];
                break;
            }
        }
    }

    if((*t).ul == (uint64_t)-1)
    {
        if(get_edge_from_source(sources, coverage_cut, NULL, max_hang, min_ovlp, query, target, t)==0)
        {
            (*t).ul = (uint64_t)-1;
        }
    }
    
    if((*t).ul == (uint64_t)-1)
    {
        for (k = 0; k < edge->a.n; k++)
        {
            if(edge->a.a[k].del) continue;
            if((edge->a.a[k].ul>>32) == query && edge->a.a[k].v == target)
            {
                (*t) = edge->a.a[k];
                break;
            }
        }
        if(k == edge->a.n) fprintf(stderr, "ERROR\n");
    }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq 0x48(%rsp), %r14
movl 0x40(%rsp), %r15d
movl 0x38(%rsp), %ebp
movq $-0x1, (%r14)
movl $0xffffffff, 0x8(%r14)  # imm = 0xFFFFFFFF
testq %r8, %r8
je 0xb39df
movq 0x28(%r8), %rax
movl %ebp, %ecx
movq (%rax,%rcx,8), %rcx
testl %ecx, %ecx
je 0xb39df
movq 0x8(%r8), %rax
movq %rcx, %rdx
shrq $0x20, %rdx
movl %ecx, %r10d
leaq (%rdx,%rdx,2), %rcx
leaq (%rax,%rcx,8), %r8
addq $0xc, %r8
shlq $0x3, %r10
leaq (%r10,%r10,2), %r10
xorl %edx, %edx
cmpl $0x0, (%r8,%rdx)
js 0xb39bf
cmpl %r15d, -0x4(%r8,%rdx)
je 0xb39ca
addq $0x18, %rdx
cmpq %rdx, %r10
jne 0xb39b1
jmp 0xb39df
leaq (%rax,%rcx,8), %rax
movq 0x10(%rdx,%rax), %rcx
movq %rcx, 0x10(%r14)
movups (%rdx,%rax), %xmm0
movups %xmm0, (%r14)
cmpq $-0x1, (%r14)
jne 0xb3a08
movl 0x30(%rsp), %r8d
movl %r9d, %ecx
movl %ebp, %r9d
pushq %r14
pushq %r15
callq 0xb2ced
addq $0x10, %rsp
testl %eax, %eax
jne 0xb3a08
movq $-0x1, (%r14)
cmpq $-0x1, (%r14)
jne 0xb3a63
movq (%rbx), %rcx
testq %rcx, %rcx
je 0xb3a4a
movq 0x10(%rbx), %rdx
movl %ebp, %esi
movl $0x1, %edi
xorl %eax, %eax
leaq (%rax,%rax,2), %r8
cmpl $0x0, 0xc(%rdx,%r8,8)
js 0xb3a3f
leaq (%rdx,%r8,8), %r8
cmpl %esi, 0x4(%r8)
jne 0xb3a3f
cmpl %r15d, 0x8(%r8)
je 0xb3a4e
movl %edi, %eax
incl %edi
cmpq %rax, %rcx
ja 0xb3a23
jmp 0xb3a5e
xorl %eax, %eax
jmp 0xb3a5e
movq 0x10(%r8), %rcx
movq %rcx, 0x10(%r14)
movups (%r8), %xmm0
movups %xmm0, (%r14)
cmpq %rax, (%rbx)
je 0xb3a6e
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x10412
jmp 0xb3a63
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Overlaps.cpp
// Function: cal_circle_ov(ma_ug_t const*, unsigned int, unsigned int, asg_t*)
uint32_t cal_circle_ov(const ma_ug_t *ug, uint32_t uid, uint32_t rev, asg_t *sg)
{
    uint32_t v, w, vx, wx, k;
    v = w = (uid<<1)+(!!rev);
    vx = (v&1?((ug->u.a[v>>1].a[0]>>32)^1):(ug->u.a[v>>1].a[ug->u.a[v>>1].n-1]>>32));
    wx = (w&1?((ug->u.a[w>>1].a[ug->u.a[w>>1].n-1]>>32)^1):(ug->u.a[w>>1].a[0]>>32));
    v = vx; w = wx;

    if(sg) {
        asg_arc_t *av; uint32_t nv;
        av = asg_arc_a(sg, vx); nv = asg_arc_n(sg, vx);
        for (k = 0; k < nv; k++) {
            if(av[k].v == wx) return av[k].ol;
        }
    }
    return 0;
}

// Assembly:
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq 0x10(%rdi), %rax
leaq (%rsi,%rsi,4), %r8
testl %edx, %edx
je 0xb67ee
movq 0x18(%rax,%r8,8), %rax
movl 0x4(%rax), %r8d
xorq $0x1, %r8
jmp 0xb67ff
movq 0x18(%rax,%r8,8), %r9
movl 0x10(%rax,%r8,8), %eax
decl %eax
movl 0x4(%r9,%rax,8), %r8d
movq 0x10(%rdi), %rax
testl %edx, %edx
je 0xb6820
leaq (%rsi,%rsi,4), %rdx
movq 0x18(%rax,%rdx,8), %rsi
movl 0x10(%rax,%rdx,8), %eax
decl %eax
movl 0x4(%rsi,%rax,8), %eax
xorq $0x1, %rax
jmp 0xb682c
leaq (%rsi,%rsi,4), %rdx
movq 0x18(%rax,%rdx,8), %rax
movl 0x4(%rax), %eax
testq %rcx, %rcx
je 0xb688b
movq 0x28(%rcx), %rdx
movq (%rdx,%r8,8), %rsi
testl %esi, %esi
setne %dl
je 0xb6887
movq %rsi, %rdi
shrq $0x20, %rdi
leaq (%rdi,%rdi,2), %rdi
shlq $0x3, %rdi
addq 0x8(%rcx), %rdi
cmpl %eax, 0x8(%rdi)
jne 0xb685d
movq %rdi, %rcx
jmp 0xb687b
leal -0x1(%rsi), %r8d
xorl %edx, %edx
cmpl %edx, %r8d
je 0xb6885
leaq 0x18(%rdi), %rcx
incl %edx
cmpl %eax, 0x20(%rdi)
movq %rcx, %rdi
jne 0xb6863
cmpl %esi, %edx
setb %dl
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andl 0xc(%rcx), %eax
jmp 0xb6887
xorl %edx, %edx
testb %dl, %dl
jne 0xb688d
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Overlaps.cpp
// Function: reset_weak_ovlp(ma_hit_t_alloc*, unsigned int, unsigned int)
uint32_t reset_weak_ovlp(ma_hit_t_alloc *sc, uint32_t src, uint32_t dst)
{
    ma_hit_t_alloc *x = &(sc[src]); uint32_t k, tn; int32_t idx;
    for (k = 0; k < x->length; k++) {
        if((x->buffer[k].bl&((uint32_t)0x40000000))) continue;
        if((x->buffer[k].del)) continue;
        tn = Get_tn(x->buffer[k]);
        if((Get_ts(x->buffer[k]) == 0) && (Get_te(x->buffer[k]) == Get_READ_LENGTH(R_INF, tn))) {
            idx = get_specific_overlap(&(sc[tn]), tn, dst);
            if((idx >= 0) && (!(sc[tn].buffer[idx].del)) && (!(sc[tn].buffer[idx].bl&((uint32_t)0x40000000)))) {
                return 1;
            }
        }
    }
    return 0;
}

// Assembly:
movl %esi, %eax
leaq (%rax,%rax,2), %rcx
movl 0xc(%rdi,%rcx,8), %eax
testq %rax, %rax
je 0xb7752
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq (%rdi,%rcx,8), %rsi
movabsq $0x4000000000000000, %rcx # imm = 0x4000000000000000
movq (%rsi), %rsi
leaq 0x1d3b74(%rip), %r8     # 0x28b230
movq 0x18(%r8), %r8
xorl %r9d, %r9d
leaq (%r9,%r9,4), %r10
cmpq %rcx, 0x18(%rsi,%r10,8)
jae 0xb773c
leaq (%rsi,%r10,8), %r10
cmpl $0x0, 0x10(%r10)
jne 0xb773c
movl 0xc(%r10), %ebx
movl 0x14(%r10), %r10d
cmpq %r10, (%r8,%rbx,8)
jne 0xb773c
leaq (%rbx,%rbx,2), %r10
leaq (%rdi,%r10,8), %r10
movl 0xc(%r10), %r14d
movq $-0x1, %r11
testq %r14, %r14
je 0xb7722
movq (%r10), %r15
xorl %r12d, %r12d
cmpl %edx, 0xc(%r15)
jne 0xb7711
cmpl 0x4(%r15), %ebx
je 0xb771f
incq %r12
addq $0x28, %r15
cmpq %r12, %r14
jne 0xb7705
jmp 0xb7722
movq %r12, %r11
testl %r11d, %r11d
js 0xb773c
movq (%r10), %r10
andl $0x7fffffff, %r11d      # imm = 0x7FFFFFFF
leaq (%r11,%r11,4), %r11
cmpq %rcx, 0x18(%r10,%r11,8)
jb 0xb7755
incq %r9
cmpq %rax, %r9
jne 0xb76c3
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %eax, %eax
retq
movl $0x1, %eax
jmp 0xb774a
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Overlaps.cpp
// Function: ma_ug_print_bed(ma_ug_t const*, asg_t*, All_reads*, ma_sub_t*, ma_hit_t_alloc*, kvec_asg_arc_t_warp*, int, int, unsigned int, char const*, _IO_FILE*, trans_chain*)
void ma_ug_print_bed(const ma_ug_t *g, asg_t *read_g, All_reads *RNF, ma_sub_t *coverage_cut,
ma_hit_t_alloc* sources, kvec_asg_arc_t_warp* edge, int max_hang, int min_ovlp, uint32_t rate_thres,
const char* prefix, FILE *fp, trans_chain* t_ch)
{
	UC_Read g_read;
    init_UC_Read(&g_read);
    UC_Read tmp;
    init_UC_Read(&tmp);
    kvec_t_u32_warp exact_count, total_count;
    kv_init(exact_count.a);
    kv_init(total_count.a);
    uint32_t i, j, l, eLen, start;
    for (i = 0; i < g->u.n; ++i) {
		ma_utg_t *u = &g->u.a[i];
        if(u->m == 0) continue;
        if(u->n < 2) continue;
        l = 0;
        for (j = 0; j < u->n; ++j) 
        {
            start = l;
            eLen = (uint32_t)u->a[j];
			l += eLen;

            print_rough_inconsistent_sites(u, j, j+1, read_g, RNF, sources, coverage_cut, 
            edge, &g_read, &tmp, max_hang, min_ovlp, start, rate_thres, &exact_count, 
            &total_count, prefix, i+1, fp, t_ch? &(t_ch->bed.a[i]): NULL);
        }
    }

    destory_UC_Read(&g_read);
    destory_UC_Read(&tmp);
    kv_destroy(exact_count.a);
    kv_destroy(total_count.a);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %r9, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, %rbx
leaq 0x98(%rsp), %rdi
callq 0x3372c
leaq 0x78(%rsp), %rdi
callq 0x3372c
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
xorl %r14d, %r14d
movq %r14, 0x60(%rsp)
movaps %xmm0, 0x30(%rsp)
movq %r14, 0x40(%rsp)
cmpq %r14, (%rbx)
je 0xb80e2
movq 0x118(%rsp), %rdx
movq %rbx, (%rsp)
movq 0x10(%rbx), %rax
leaq (%r14,%r14,4), %rcx
cmpl $0x0, 0xc(%rax,%rcx,8)
je 0xb80d2
leaq (%rax,%rcx,8), %rbp
cmpl $0x2, 0x10(%rbp)
jb 0xb80d2
cmpl $0x0, 0x10(%rbp)
je 0xb80d2
leal 0x1(%r14), %r15d
xorl %esi, %esi
leaq (%r14,%r14,2), %r12
shlq $0x3, %r12
xorl %eax, %eax
testq %rdx, %rdx
je 0xb802e
movq 0x30(%rdx), %r10
addq %r12, %r10
jmp 0xb8031
xorl %r10d, %r10d
movq 0x18(%rbp), %rcx
movl (%rcx,%rsi,8), %r13d
addl %eax, %r13d
leaq 0x1(%rsi), %rbx
movq %rbp, %rdi
movl %ebx, %edx
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %r8
movq 0x20(%rsp), %r9
pushq %r10
pushq 0x118(%rsp)
pushq %r15
pushq 0x120(%rsp)
leaq 0x50(%rsp), %r10
pushq %r10
leaq 0x78(%rsp), %r10
pushq %r10
movl 0x130(%rsp), %r10d
pushq %r10
pushq %rax
movl 0x138(%rsp), %eax
pushq %rax
movl 0x138(%rsp), %eax
pushq %rax
leaq 0xc8(%rsp), %rax
pushq %rax
leaq 0xf0(%rsp), %rax
pushq %rax
pushq 0x88(%rsp)
pushq 0x80(%rsp)
callq 0xb4382
addq $0x70, %rsp
movl 0x10(%rbp), %ecx
movq %rbx, %rsi
movl %r13d, %eax
cmpq %rcx, %rbx
movq 0x118(%rsp), %rdx
jb 0xb8020
incl %r14d
movq (%rsp), %rbx
cmpq %r14, (%rbx)
ja 0xb7fe5
leaq 0x98(%rsp), %rdi
callq 0x33667
leaq 0x78(%rsp), %rdi
callq 0x33667
movq 0x60(%rsp), %rdi
callq 0x2220
movq 0x40(%rsp), %rdi
callq 0x2220
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Overlaps.cpp
// Function: push_cov_interval_direct(kvec_t_u64_warp*, long long, long long, long long, unsigned long)
uint32_t push_cov_interval_direct(kvec_t_u64_warp* a, long long x_beg, long long x_end, long long utg_len, uint64_t is_circle)
{
    if(x_beg <= x_end && x_beg >= 0 && x_end >= 0 && x_beg < utg_len && x_end < utg_len)
    {
        uint64_t key;
        key = x_beg; key <<= 1; key |= (!is_circle); key <<= 1; key|=1;
        kv_push(uint64_t, a->a, key);
        key = x_end + 1; key <<= 1; key |= (!is_circle); key <<= 1; 
        kv_push(uint64_t, a->a, key);
        return 1;
    }
    return 0;
}

// Assembly:
xorl %eax, %eax
cmpq %rcx, %rdx
jge 0xb83f0
cmpq %rcx, %rsi
jge 0xb83f0
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
cmpq %rdx, %rsi
jg 0xb83e5
movq %r14, %rcx
orq %rsi, %rcx
js 0xb83e5
movq %rdi, %rbx
xorl %r15d, %r15d
testq %r8, %r8
sete %r15b
shlq $0x2, %rsi
leaq (%rsi,%r15,2), %r12
incq %r12
movq 0x8(%rdi), %rax
cmpq %rax, (%rdi)
jne 0xb8387
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %esi
cmovneq %rcx, %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x10(%rbx)
movq (%rbx), %rax
movq 0x10(%rbx), %rdi
leaq 0x1(%rax), %rcx
movq %rcx, (%rbx)
movq %r12, (%rdi,%rax,8)
addl %r15d, %r15d
leaq (%r15,%r14,4), %r14
addq $0x4, %r14
movq 0x8(%rbx), %rax
cmpq %rax, (%rbx)
jne 0xb83ce
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %esi
cmovneq %rcx, %rsi
movq %rsi, 0x8(%rbx)
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x10(%rbx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movq %r14, (%rcx,%rax,8)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq