LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: asg_destroy(asg_t*)
void asg_destroy(asg_t *g)
{
	if (g == 0) return;
	free(g->seq); free(g->idx); free(g->arc); free(g->seq_vis);
     
    if(g->n_F_seq > 0 && g->F_seq)
    {
        uint32_t i = 0;
        for (i = 0; i < g->n_F_seq; i++)
        {
            if(g->F_seq[i].a) free(g->F_seq[i].a);
            if(g->F_seq[i].s) free(g->F_seq[i].s);
        }

        free(g->F_seq);
    }
    

    free(g);
}

// Assembly:
testq %rdi, %rdi
je 0x68fdc
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
callq 0x2220
movq 0x28(%rbx), %rdi
callq 0x2220
movq 0x8(%rbx), %rdi
callq 0x2220
movq 0x30(%rbx), %rdi
callq 0x2220
movl 0x38(%rbx), %eax
testl %eax, %eax
je 0x68fe2
cmpq $0x0, 0x40(%rbx)
je 0x68fe2
xorl %r14d, %r14d
xorl %r15d, %r15d
movl %eax, %eax
movq 0x40(%rbx), %rdi
cmpq %rax, %r15
jae 0x68fdd
movq 0x18(%rdi,%r14), %rdi
callq 0x2220
movq 0x40(%rbx), %rax
movq 0x20(%rax,%r14), %rdi
callq 0x2220
incq %r15
movl 0x38(%rbx), %eax
addq $0x28, %r14
jmp 0x68fad
retq
callq 0x2220
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: add_overlaps(ma_hit_t_alloc*, ma_hit_t_alloc*, unsigned long*, long long)
void add_overlaps(ma_hit_t_alloc* source_paf, ma_hit_t_alloc* dest_paf, uint64_t* source_index, long long listLen)
{
    long long i;
    ma_hit_t* tmp;
    for (i = 0; i < listLen; i++)
    {
        tmp = &(source_paf->buffer[(uint32_t)(source_index[i])]);
        add_ma_hit_t_alloc(dest_paf, tmp);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorl %r13d, %r13d
testq %rcx, %rcx
cmovleq %r13, %rbx
cmpq %r13, %rbx
je 0x69048
movl (%r14,%r13,8), %eax
imulq $0x28, %rax, %rsi
addq (%r12), %rsi
movq %r15, %rdi
callq 0x69052
incq %r13
jmp 0x6902a
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: add_ma_hit_t_alloc(ma_hit_t_alloc*, ma_hit_t*)
void add_ma_hit_t_alloc(ma_hit_t_alloc* x, ma_hit_t* element)
{
	if (x->length + 1 > x->size) {
		x->size = x->length + 1;
		kroundup32(x->size);
		REALLOC(x->buffer, x->size);
	}
	x->buffer[x->length++] = *element;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0xc(%rdi), %ecx
leal 0x1(%rcx), %edx
movq (%rdi), %rax
cmpl 0x8(%rdi), %edx
jbe 0x690a8
movl %ecx, %edx
shrl %edx
orl %ecx, %edx
movl %edx, %ecx
shrl $0x2, %ecx
orl %edx, %ecx
movl %ecx, %edx
shrl $0x4, %edx
orl %ecx, %edx
movl %edx, %ecx
shrl $0x8, %ecx
orl %edx, %ecx
movl %ecx, %edx
shrl $0x10, %edx
orl %ecx, %edx
incl %edx
movl %edx, 0x8(%r14)
imulq $0x28, %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, (%r14)
movl 0xc(%r14), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0xc(%r14)
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
movq 0x20(%rbx), %rdx
movq %rdx, 0x20(%rax,%rcx)
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm1, 0x10(%rax,%rcx)
movups %xmm0, (%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: remove_overlaps(ma_hit_t_alloc*, unsigned long*, long long)
void remove_overlaps(ma_hit_t_alloc* source_paf, uint64_t* source_index, long long listLen)
{
    long long i, m;
    for (i = 0; i < listLen; i++)
    {
        source_paf->buffer[(uint32_t)(source_index[i])].qns = (uint64_t)(-1);
    }

    m = 0;
    for (i = 0; i < source_paf->length; i++)
    {
        if(source_paf->buffer[i].qns != (uint64_t)(-1))
        {
            source_paf->buffer[m] = source_paf->buffer[i];
            m++;
        }
    }
    source_paf->length = m;
}

// Assembly:
xorl %eax, %eax
testq %rdx, %rdx
cmovleq %rax, %rdx
cmpq %rax, %rdx
je 0x690f6
movq (%rdi), %rcx
movl (%rsi,%rax,8), %r8d
imulq $0x28, %r8, %r8
orq $-0x1, (%rcx,%r8)
incq %rax
jmp 0x690dc
xorl %eax, %eax
xorl %edx, %edx
xorl %ecx, %ecx
movl 0xc(%rdi), %esi
cmpq %rsi, %rdx
jae 0x6913f
movq (%rdi), %rsi
cmpq $-0x1, (%rsi,%rax)
je 0x69136
leaq (%rsi,%rax), %r8
imulq $0x28, %rcx, %r9
movq 0x20(%r8), %r10
movq %r10, 0x20(%rsi,%r9)
movups (%r8), %xmm0
movups 0x10(%r8), %xmm1
movups %xmm1, 0x10(%rsi,%r9)
movups %xmm0, (%rsi,%r9)
incq %rcx
incq %rdx
addq $0x28, %rax
jmp 0x690fc
movl %ecx, 0xc(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: add_overlaps_from_different_sources(ma_hit_t_alloc*, ma_hit_t_alloc*, unsigned long*, long long)
void add_overlaps_from_different_sources(ma_hit_t_alloc* source_paf_list, ma_hit_t_alloc* dest_paf, 
uint64_t* source_index, long long listLen)
{
    long long i;
    ma_hit_t ele;
    ma_hit_t* tmp;
    uint32_t source_n, source_i;
    for (i = 0; i < listLen; i++)
    {
        source_n = source_index[i] >> 32;
        source_i = (uint32_t)(source_index[i]);
        tmp = &(source_paf_list[source_n].buffer[source_i]);

        ele.del = 0;
        ele.rev = tmp->rev;
        ele.qns = Get_tn((*tmp));
        ele.qns = ele.qns << 32;
        ele.qns = ele.qns | (uint64_t)(Get_ts((*tmp)));
        ele.qe = Get_te((*tmp));

        ele.tn = Get_qn((*tmp));
        ele.ts = Get_qs((*tmp));
        ele.te = Get_qe((*tmp));

        ele.bl = R_INF.read_length[ele.tn];
        ele.ml = tmp->ml;
        ele.el = tmp->el;
        ele.no_l_indel = tmp->no_l_indel;
        
        add_ma_hit_t_alloc(dest_paf, &ele);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorl %ebp, %ebp
testq %rcx, %rcx
cmovleq %rbp, %rbx
movq %rsp, %r13
cmpq %rbp, %rbx
je 0x6920e
movq (%r14,%rbp,8), %rax
movl %eax, %ecx
shrq $0x20, %rax
imulq $0x18, %rax, %rax
movq (%r12,%rax), %rax
imulq $0x28, %rcx, %rcx
movq 0x18(%rax,%rcx), %rdx
movl 0xc(%rax,%rcx), %esi
movl 0x10(%rax,%rcx), %edi
shlq $0x20, %rsi
orq %rsi, %rdi
movq %rdi, (%rsp)
movl 0x14(%rax,%rcx), %esi
movl %esi, 0x8(%rsp)
movq (%rax,%rcx), %rsi
movq %rsi, %rdi
rorq $0x20, %rdi
movq %rdi, 0xc(%rsp)
movl 0x8(%rax,%rcx), %edi
movl %edi, 0x14(%rsp)
leaq 0x1eb069(%rip), %rdi    # 0x254230
movq 0x18(%rdi), %rdi
shrq $0x20, %rsi
movq (%rdi,%rsi,8), %rsi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
shlq $0x20, %rsi
andl $0xc0000000, %edx       # imm = 0xC0000000
orq %rsi, %rdx
movq %rdx, 0x18(%rsp)
movb 0x20(%rax,%rcx), %dl
movb %dl, 0x20(%rsp)
movb 0x21(%rax,%rcx), %al
movb %al, 0x21(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0x69052
incq %rbp
jmp 0x69169
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: ma_ug_destroy(ma_ug_t*)
void ma_ug_destroy(ma_ug_t *ug)
{
	uint32_t i;
	if (ug == 0) return;
	for (i = 0; i < ug->u.n; ++i) {
		free(ug->u.a[i].a);
		free(ug->u.a[i].s);
	}
	free(ug->u.a);
	asg_destroy(ug->g);
    kv_destroy(ug->occ);
	free(ug);
}

// Assembly:
testq %rdi, %rdi
je 0x6927e
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %eax, %eax
movl %eax, %r14d
movq 0x10(%rbx), %rdi
cmpq %r14, (%rbx)
jbe 0x6925a
imulq $0x28, %r14, %r15
movq 0x18(%rdi,%r15), %rdi
callq 0x2220
movq 0x10(%rbx), %rax
movq 0x20(%rax,%r15), %rdi
callq 0x2220
leal 0x1(%r14), %eax
jmp 0x6922c
callq 0x2220
movq 0x18(%rbx), %rdi
callq 0x68f68
movq 0x30(%rbx), %rdi
callq 0x2220
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2220
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: asg_arc_index_core(unsigned long, unsigned long, asg_arc_t const*)
uint64_t *asg_arc_index_core(size_t max_seq, size_t n, const asg_arc_t *a)
{
	size_t i, last;
	uint64_t *idx;
	idx = (uint64_t*)calloc(max_seq * 2, 8);


    /**
		 * ul: |____________31__________|__________1___________|______________32_____________|
	                       qns            direction of overlap       length of this node (not overlap length)
	**/
    ///so if we use high 32-bit, we store the index of each qn with two direction
	for (i = 1, last = 0; i <= n; ++i)
		if (i == n || a[i-1].ul>>32 != a[i].ul>>32)
			idx[a[i-1].ul>>32] = (uint64_t)last<<32 | (i - last), last = i;

    
	return idx;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
addq %rdi, %rdi
pushq $0x8
popq %rsi
callq 0x2120
imulq $0x18, %r14, %rcx
addq %rbx, %rcx
addq $-0x18, %rcx
pushq $0x1
popq %rdx
xorl %esi, %esi
cmpq %r14, %rdx
ja 0x692e1
jne 0x692b0
movq (%rcx), %rdi
jmp 0x692c0
movq (%rbx), %rdi
movq 0x18(%rbx), %r8
xorq %rdi, %r8
shrq $0x20, %r8
je 0x692d8
movq %rdx, %r8
subq %rsi, %r8
shlq $0x20, %rsi
orq %r8, %rsi
shrq $0x20, %rdi
movq %rsi, (%rax,%rdi,8)
movq %rdx, %rsi
incq %rdx
addq $0x18, %rbx
jmp 0x692a4
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: asg_seq_set(asg_t*, int, int, int)
void asg_seq_set(asg_t *g, int sid, int len, int del)
{
	///just malloc size
	if (sid >= (int)g->m_seq) {
		g->m_seq = sid + 1;
		kv_roundup32(g->m_seq);
		g->seq = (asg_seq_t*)realloc(g->seq, g->m_seq * sizeof(asg_seq_t));
	}

	if (sid >= g->n_seq) g->n_seq = sid + 1;
	
    g->seq[sid].del = !!del;
    g->seq[sid].len = len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %ebx
movl %esi, %r15d
movq %rdi, %r14
cmpl %esi, 0x10(%rdi)
jg 0x69367
movl %r15d, %eax
shrl %eax
orl %r15d, %eax
movl %eax, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %esi
shrl $0x10, %esi
orl %ecx, %esi
incl %esi
movl %esi, 0x10(%r14)
movq 0x20(%r14), %rdi
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x20(%r14)
movl 0x14(%r14), %eax
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %r15d, %ecx
jg 0x69386
andl $0x80000000, %eax       # imm = 0x80000000
addl %r15d, %eax
incl %eax
movl %eax, 0x14(%r14)
xorl %eax, %eax
testl %ebp, %ebp
setne %al
movq 0x20(%r14), %rcx
movslq %r15d, %rdx
shll $0x1f, %eax
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andl %esi, %ebx
andl (%rcx,%rdx,8), %esi
orl %eax, %esi
movl %esi, (%rcx,%rdx,8)
movq 0x20(%r14), %rax
movl $0x80000000, %ecx       # imm = 0x80000000
andl (%rax,%rdx,8), %ecx
orl %ebx, %ecx
movl %ecx, (%rax,%rdx,8)
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_F_seq_set(asg_t*, int)
ma_utg_t* asg_F_seq_set(asg_t *g, int iid)
{
    if(iid < (int)g->r_seq) return NULL;
    uint32_t index = iid - g->r_seq, pre_n_F_seq = g->n_F_seq;

	///just malloc size
	if (index >= g->n_F_seq) {
		g->n_F_seq = index + 1;
		kv_roundup32(g->n_F_seq);
        g->F_seq = (ma_utg_t*)realloc(g->F_seq, g->n_F_seq*sizeof(ma_utg_t));
        memset(g->F_seq + pre_n_F_seq, 0, sizeof(ma_utg_t)*(g->n_F_seq-pre_n_F_seq));
	}

    return &(g->F_seq[index]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
subl 0x18(%rdi), %ebx
jge 0x693d5
xorl %eax, %eax
jmp 0x69445
movq %rdi, %r14
movl 0x38(%rdi), %r12d
cmpl %r12d, %ebx
jae 0x693e7
movq 0x40(%r14), %r15
jmp 0x6943c
movl %ebx, %eax
shrl %eax
orl %ebx, %eax
movl %eax, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x10, %eax
orl %ecx, %eax
incl %eax
movl %eax, 0x38(%r14)
movq 0x40(%r14), %rdi
imulq $0x28, %rax, %rsi
callq 0x2370
movq %rax, %r15
movq %rax, 0x40(%r14)
imulq $0x28, %r12, %rdi
addq %rax, %rdi
movl 0x38(%r14), %eax
subl %r12d, %eax
imulq $0x28, %rax, %rdx
xorl %esi, %esi
callq 0x20e0
movl %ebx, %eax
imulq $0x28, %rax, %rax
addq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: asg_arc_rm(asg_t*)
void asg_arc_rm(asg_t *g)
{
	/**
	p->ul: |____________31__________|__________1___________|______________32_____________|
	                    qns            direction of overlap       length of this node (not overlap length)
	p->v : |___________31___________|__________1___________|
				        tns              relative strand between query and target
	p->ol: overlap length
	**/
	uint32_t e, n;
	///just clean arc requiring: 1. arc it self must be available 2. both the query and target are available
	for (e = n = 0; e < g->n_arc; ++e) {
		//u and v is the read id
		uint32_t u = g->arc[e].ul>>32, v = g->arc[e].v;
		if (!g->arc[e].del && !g->seq[u>>1].del && !g->seq[v>>1].del)
			g->arc[n++] = g->arc[e];
	}
	if (n < g->n_arc) { // arc index is out of sync
		if (g->idx) free(g->idx);
		g->idx = 0;
	}
	g->n_arc = n;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %eax, %eax
xorl %ecx, %ecx
xorl %ebp, %ebp
movl 0x4(%rbx), %edx
movl %edx, %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
cmpq %rsi, %rcx
jae 0x694be
movq 0x8(%rbx), %rdx
cmpl $0x0, 0xc(%rdx,%rax)
js 0x694b5
leaq (%rdx,%rax), %rsi
movq (%rsi), %r8
movq 0x20(%rbx), %rdi
shrq $0x21, %r8
cmpl $0x0, (%rdi,%r8,8)
js 0x694b5
movl 0x8(%rdx,%rax), %r8d
shrl %r8d
cmpl $0x0, (%rdi,%r8,8)
js 0x694b5
movl %ebp, %edi
incl %ebp
imulq $0x18, %rdi, %rdi
movq 0x10(%rsi), %r8
movq %r8, 0x10(%rdx,%rdi)
movups (%rsi), %xmm0
movups %xmm0, (%rdx,%rdi)
incq %rcx
addq $0x18, %rax
jmp 0x6945d
cmpl %esi, %ebp
jae 0x694d3
movq 0x28(%rbx), %rdi
callq 0x2220
andq $0x0, 0x28(%rbx)
movl 0x4(%rbx), %edx
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
andl $0x80000000, %edx       # imm = 0x80000000
orl %ebp, %edx
movl %edx, 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: asg_arc_del_multi(asg_t*)
int asg_arc_del_multi(asg_t *g)
{
	//the number of nodes are number of read times 2
	uint32_t *cnt, n_vtx = g->n_seq * 2, n_multi = 0, v;
	cnt = (uint32_t*)calloc(n_vtx, 4);
	for (v = 0; v < n_vtx; ++v) {
		///out-nodes of v
		asg_arc_t *av = asg_arc_a(g, v);
		int32_t i, nv = asg_arc_n(g, v);
		///if v just have one out-node, there is no muti-edge
		if (nv < 2) continue;
		for (i = nv - 1; i >= 0; --i) ++cnt[av[i].v];
		for (i = nv - 1; i >= 0; --i)
			if (--cnt[av[i].v] != 0)
				av[i].del = 1, ++n_multi;
	}
	free(cnt);
	if (n_multi) asg_cleanup(g);

    if(VERBOSE >= 1)
    {
        fprintf(stderr, "[M::%s] removed %d multi-arcs\n", __func__, n_multi);
    }
	
	return n_multi;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x14(%rdi), %r14d
addl %r14d, %r14d
pushq $0x4
popq %rsi
movq %r14, %rdi
callq 0x2120
xorl %ecx, %ecx
xorl %ebp, %ebp
cmpq %r14, %rcx
je 0x69597
movq 0x28(%rbx), %rdx
movq (%rdx,%rcx,8), %rsi
cmpl $0x2, %esi
jl 0x69592
movq %rsi, %rdx
shrq $0x20, %rdx
imulq $0x18, %rdx, %rdx
addq 0x8(%rbx), %rdx
decl %esi
movl %esi, %edi
testl %edi, %edi
js 0x6958e
movl %edi, %r8d
imulq $0x18, %r8, %r8
movl 0x8(%rdx,%r8), %r8d
incl (%rax,%r8,4)
decl %edi
jmp 0x6955a
movl %esi, %edi
imulq $0x18, %rdi, %rdi
movl 0x8(%rdx,%rdi), %r8d
decl (%rax,%r8,4)
je 0x6958c
addq %rdx, %rdi
orb $-0x80, 0xf(%rdi)
incl %ebp
decl %esi
testl %esi, %esi
jns 0x69572
incq %rcx
jmp 0x69535
movq %rax, %rdi
callq 0x2220
testl %ebp, %ebp
je 0x695ab
movq %rbx, %rdi
callq 0x694eb
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: asg_arc_del_asymm(asg_t*)
int asg_arc_del_asymm(asg_t *g)
{
	uint32_t e, n_asymm = 0;
	///g->n_arc is the number of overlaps 
	for (e = 0; e < g->n_arc; ++e) {
		uint32_t v = g->arc[e].v^1, u = g->arc[e].ul>>32^1;
		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 == u) break;
		if (i == nv) g->arc[e].del = 1, ++n_asymm;
	}
	if (n_asymm) asg_cleanup(g);
    if(VERBOSE >= 1)
    {
	    fprintf(stderr, "[M::%s] removed %d asymmetric arcs\n", __func__, n_asymm);
    }
	return n_asymm;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
xorl %eax, %eax
xorl %ebx, %ebx
movl 0x4(%rdi), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpq %rcx, %rax
jae 0x69626
movq 0x8(%rdi), %rcx
movq 0x28(%rdi), %r8
imulq $0x18, %rax, %rdx
movl 0x4(%rcx,%rdx), %esi
movl 0x8(%rcx,%rdx), %r9d
xorq $0x1, %r9
movq (%r8,%r9,8), %r8
movq %r8, %r10
shrq $0x20, %r10
movl %r8d, %r9d
imulq $0x18, %r10, %r10
leaq (%rcx,%r10), %r11
addq $0x8, %r11
xorl %r10d, %r10d
cmpq %r10, %r9
je 0x6961a
movl (%r11), %ebp
xorl %esi, %ebp
cmpl $0x1, %ebp
je 0x69615
incq %r10
addq $0x18, %r11
jmp 0x695fd
cmpl %r10d, %r8d
jne 0x69621
orb $-0x80, 0xf(%rcx,%rdx)
incl %ebx
incq %rax
jmp 0x695b9
testl %ebx, %ebx
je 0x6962f
callq 0x694eb
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: get_specific_overlap(ma_hit_t_alloc*, unsigned int, unsigned int)
long long get_specific_overlap(ma_hit_t_alloc* x, uint32_t qn, uint32_t tn)
{
    long long i;
    for (i = 0; i < x->length; i++)
    {
        if(x->buffer[i].tn == tn 
        &&
          ((uint32_t)(x->buffer[i].qns>>32)) == qn)
        {
            return i;
        }        
    }

    return -1;
}

// Assembly:
movl 0xc(%rdi), %ecx
xorl %r8d, %r8d
pushq $-0x1
popq %rax
xorl %r9d, %r9d
cmpq %rcx, %r9
jae 0x696d9
movq (%rdi), %r10
cmpl %edx, 0xc(%r10,%r8)
jne 0x696cd
cmpl %esi, 0x4(%r10,%r8)
je 0x696d6
incq %r9
addq $0x28, %r8
jmp 0x696b7
movq %r9, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: normalize_ma_hit_t_single_side_advance_mult(ma_hit_t_alloc*, long, long)
void normalize_ma_hit_t_single_side_advance_mult(ma_hit_t_alloc* src, int64_t n_src, int64_t n_thread)
{
    ma_hit_t_aux aux; int64_t k; uint64_t z; ma_hit_t e;
    aux.n_thread = n_thread; aux.src = src; CALLOC(aux.buf, aux.n_thread);

    kt_for(aux.n_thread, update_ma_hit_t_norm, &aux, n_src);

    for (k = 0; k < aux.n_thread; k++) {
        for (z = 0; z < aux.buf[k].a.n; z++) {
            set_reverse_overlap(&e, &(src[aux.buf[k].a.a[z]>>32].buffer[(uint32_t)(aux.buf[k].a.a[z])]));
            src[aux.buf[k].a.a[z]>>32].buffer[(uint32_t)(aux.buf[k].a.a[z])].del = e.del = 1;
            add_ma_hit_t_alloc(&(src[Get_qn(e)]), &e);
        }
        free(aux.buf[k].a.a);
    }
    free(aux.buf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rsp), %r12
movq %rdx, 0x10(%r12)
movq %rdi, 0x8(%r12)
pushq $0x20
popq %rsi
movq %rdx, %rdi
callq 0x2120
movq %rax, (%r12)
leaq 0xac(%rip), %rsi        # 0x69ab3
movl %r14d, %edi
movq %r12, %rdx
movq %r15, %rcx
callq 0xc67c0
xorl %r12d, %r12d
leaq 0x20(%rsp), %r14
cmpq 0x18(%rsp), %r12
jge 0x69a9a
movq %r12, (%rsp)
shlq $0x5, %r12
xorl %ebp, %ebp
movq 0x8(%rsp), %rax
movq 0x10(%rax,%r12), %rdi
cmpq (%rax,%r12), %rbp
jae 0x69a8c
movq (%rdi,%rbp,8), %rax
movl %eax, %ecx
shrq $0x20, %rax
imulq $0x18, %rax, %rax
movq (%rbx,%rax), %r15
imulq $0x28, %rcx, %r13
leaq (%r15,%r13), %rsi
movq %r14, %rdi
callq 0x696da
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
orq %rax, 0x38(%rsp)
orq %rax, 0x18(%r15,%r13)
movl 0x24(%rsp), %eax
imulq $0x18, %rax, %rdi
addq %rbx, %rdi
movq %r14, %rsi
callq 0x69052
incq %rbp
jmp 0x69a2e
callq 0x2220
movq (%rsp), %r12
incq %r12
jmp 0x69a1d
movq 0x8(%rsp), %rdi
callq 0x2220
addq $0x48, %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_end_match_length(ma_hit_t*, UC_Read*, UC_Read*, unsigned int*, unsigned int*)
void get_end_match_length(ma_hit_t* edge, UC_Read* query, UC_Read* target,
uint32_t* left, uint32_t* right)
{
    (*left) = (*right) = 0;

    uint32_t query_beg, query_end, target_beg, target_end, targetLen, oLen;
    long long i;
    targetLen = Get_READ_LENGTH(R_INF, Get_tn(*edge));
    query_beg = Get_qs(*edge);
    query_end = Get_qe(*edge)-1;
    recover_UC_Read(query, &R_INF, Get_qn(*edge));
    
    if(edge->rev)
    {
        target_beg = targetLen-(Get_te(*edge)-1)-1;
        target_end = targetLen-Get_ts(*edge)-1;
        recover_UC_Read_RC(target, &R_INF, Get_tn(*edge));
    }
    else
    {
        target_beg = Get_ts(*edge);
        target_end = Get_te(*edge)-1;
        recover_UC_Read(target, &R_INF, Get_tn(*edge));
    }

    oLen = Get_qe(*edge) - Get_qs(*edge);
    /***************************left*******************************/
    for (i = 0; i < oLen; i++)
    {
        if(query->seq[query_beg+i]!=target->seq[target_beg+i]) break;
        (*left)++;
    }
    /***************************left*******************************/

    /***************************right*******************************/
    for (i = 0; i < oLen; i++)
    {
        if(query->seq[query_end-i]!=target->seq[target_end-i]) break;
        (*right)++;
    }
    /***************************right*******************************/
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
andl $0x0, (%r8)
movq %rdi, %r13
andl $0x0, (%rcx)
leaq 0x1ea590(%rip), %rsi    # 0x254230
movq 0x18(%rsi), %rax
movl 0xc(%rdi), %ecx
movq (%rax,%rcx,8), %rbp
movq (%rdi), %rdx
movl 0x8(%rdi), %eax
movl %eax, 0xc(%rsp)
movq %rdx, 0x10(%rsp)
shrq $0x20, %rdx
movq %r15, %rdi
callq 0x715e
testb $-0x80, 0x1b(%r13)
jne 0x69cf0
movl 0xc(%r13), %edx
movl 0x10(%r13), %eax
movl %eax, 0x8(%rsp)
movl 0x14(%r13), %ebp
decl %ebp
leaq 0x1ea54a(%rip), %rsi    # 0x254230
movq %r14, %rdi
callq 0x715e
jmp 0x69d18
movl %ebp, %eax
subl 0x14(%r13), %eax
movl %eax, 0x8(%rsp)
movl 0xc(%r13), %edx
movq %rbp, %rax
movl 0x10(%r13), %ebp
notl %ebp
addl %eax, %ebp
leaq 0x1ea520(%rip), %rsi    # 0x254230
movq %r14, %rdi
callq 0x7215
movl 0x8(%r13), %eax
subl (%r13), %eax
movl 0xc(%rsp), %r9d
decl %r9d
movl 0x10(%rsp), %ecx
movl 0x8(%rsp), %edx
movq %rax, %rsi
subq $0x1, %rsi
jb 0x69d55
movq (%r15), %rdi
movb (%rdi,%rcx), %dil
movq (%r14), %r8
cmpb (%r8,%rdx), %dil
jne 0x69d55
incl (%r12)
incq %rdx
incq %rcx
jmp 0x69d33
movl %r9d, %ecx
movl %ebp, %edx
subq $0x1, %rax
jb 0x69d7a
movq (%r15), %rsi
movb (%rsi,%rcx), %sil
movq (%r14), %rdi
cmpb (%rdi,%rdx), %sil
jne 0x69d7a
incl (%rbx)
decq %rcx
decq %rdx
jmp 0x69d5a
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: drop_edges_by_trio(ma_hit_t_alloc*, long long)
void drop_edges_by_trio(ma_hit_t_alloc* sources, long long num_sources)
{
    double startTime = Get_T();

    long long i, j;
    uint32_t qn, tn;
    for (i = 0; i < num_sources; i++)
    {
        for (j = 0; j < sources[i].length; j++)
        {
            if(sources[i].buffer[j].del) continue;
            
            qn = Get_qn(sources[i].buffer[j]);
            tn = Get_tn(sources[i].buffer[j]);

            if(R_INF.trio_flag[qn] != AMBIGU && R_INF.trio_flag[tn] != AMBIGU)
            {
                if(R_INF.trio_flag[qn] != R_INF.trio_flag[tn])
                {
                    sources[i].buffer[j].del = 1;
                    continue;
                }
            }

            sources[i].buffer[j].del = 0;
        }
    }

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x251c
xorl %eax, %eax
testq %rbx, %rbx
cmovleq %rax, %rbx
pushq $0x18
popq %rcx
leaq 0x1e9fe4(%rip), %rdx    # 0x254230
cmpq %rbx, %rax
je 0x6a2af
imulq $0x18, %rax, %rsi
addq %r14, %rsi
movq %rcx, %rdi
xorl %r8d, %r8d
movl 0xc(%rsi), %r9d
cmpq %r9, %r8
jae 0x6a2aa
movq (%rsi), %r9
movq (%r9,%rdi), %r10
testq %r10, %r10
js 0x6a2a1
movl -0x14(%r9,%rdi), %r11d
movq 0x28(%rdx), %r15
movb (%r15,%r11), %r11b
testb %r11b, %r11b
je 0x6a29d
movl -0xc(%r9,%rdi), %r12d
movb (%r15,%r12), %bpl
testb %bpl, %bpl
je 0x6a29d
cmpb %bpl, %r11b
je 0x6a29d
btsq $0x3f, %r10
movq %r10, (%r9,%rdi)
incq %r8
addq $0x28, %rdi
jmp 0x6a25e
incq %rax
jmp 0x6a24c
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: get_specific_overlap_with_del(ma_hit_t_alloc*, ma_sub_t*, unsigned int, unsigned int)
ma_hit_t* get_specific_overlap_with_del(ma_hit_t_alloc* sources, ma_sub_t *coverage_cut, 
uint32_t qn, uint32_t tn)
{
    if(coverage_cut[qn].del || coverage_cut[tn].del) return NULL;
    ma_hit_t_alloc* x = &(sources[qn]);
    uint32_t i;
    for (i = 0; i < x->length; i++)
    {
        if(x->buffer[i].del) continue;
        if(coverage_cut[Get_qn(x->buffer[i])].del) continue;
        if(coverage_cut[Get_tn(x->buffer[i])].del) continue;

        if(Get_tn(x->buffer[i])==tn 
        &&
           Get_qn(x->buffer[i])==qn)
        {
            return &(x->buffer[i]);
        }        
    }

    return NULL;
}

// Assembly:
movl %edx, %eax
imulq $0xc, %rax, %r8
cmpl $0x0, (%rsi,%r8)
js 0x6a329
movl %ecx, %r8d
imulq $0xc, %r8, %r8
cmpl $0x0, (%rsi,%r8)
js 0x6a329
pushq %rbx
imulq $0x18, %rax, %rax
leaq (%rdi,%rax), %r8
movl 0xc(%rdi,%rax), %eax
imulq $0x28, %rax, %rdi
xorl %eax, %eax
xorl %r9d, %r9d
cmpq %r9, %rdi
je 0x6a332
movq (%r8), %r10
cmpq $0x0, 0x18(%r10,%r9)
js 0x6a323
movq (%r10,%r9), %r11
shrq $0x20, %r11
imulq $0xc, %r11, %rbx
cmpl $0x0, (%rsi,%rbx)
js 0x6a323
movl 0xc(%r10,%r9), %ebx
cmpl %ecx, %ebx
jne 0x6a323
imulq $0xc, %rbx, %rbx
cmpl $0x0, (%rsi,%rbx)
js 0x6a323
cmpl %edx, %r11d
je 0x6a32c
addq $0x28, %r9
jmp 0x6a2e9
xorl %eax, %eax
retq
addq %r9, %r10
movq %r10, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: delete_all_edges(ma_hit_t_alloc*, ma_sub_t*, unsigned int)
void delete_all_edges(ma_hit_t_alloc* sources, ma_sub_t *coverage_cut, uint32_t qn)
{
    ma_hit_t_alloc* x = &(sources[qn]);
    uint32_t i;
    for (i = 0; i < x->length; i++)
    {
        x->buffer[i].del = 1;
        delete_single_edge(sources, coverage_cut, Get_tn(x->buffer[i]), Get_qn(x->buffer[i]));
    }
    coverage_cut[qn].del = 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %eax
movq %rax, (%rsp)
imulq $0x18, %rax, %r12
addq %rdi, %r12
xorl %r13d, %r13d
movabsq $-0x8000000000000000, %rbp # imm = 0x8000000000000000
xorl %r15d, %r15d
movl 0xc(%r12), %eax
cmpq %rax, %r15
jae 0x6a3a8
movq (%r12), %rax
orq %rbp, 0x18(%rax,%r13)
movq (%r12), %rax
movl 0x4(%rax,%r13), %ecx
movl 0xc(%rax,%r13), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6a334
incq %r15
addq $0x28, %r13
jmp 0x6a373
imulq $0xc, (%rsp), %rax
orb $-0x80, 0x3(%rbx,%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: get_real_sources_length(ma_hit_t_alloc*, ma_sub_t*, int, int, unsigned int)
uint32_t get_real_sources_length(ma_hit_t_alloc* sources, ma_sub_t *coverage_cut, 
int max_hang, int min_ovlp, uint32_t query)
{
    uint32_t qn = query>>1;
    if(coverage_cut[qn].del) return 0;
    int32_t r;
    asg_arc_t t;
    ma_hit_t *h = NULL;
    ma_sub_t *sq = NULL;
    ma_sub_t *st = NULL;
    ma_hit_t_alloc* x = &(sources[qn]);
    uint32_t i, occ = 0;
    for (i = 0; i < x->length; i++)
    {
        h = &(x->buffer[i]);
        if(h->del) continue;
        ///now the edge has not been removed
        sq = &(coverage_cut[Get_qn(*h)]);
        st = &(coverage_cut[Get_tn(*h)]);
        if(sq->del || st->del) continue;
        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
        if(r < 0) continue;
        if((t.ul>>32) == query) occ++;
    }

    return occ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, 0x4(%rsp)
movl %r8d, %eax
shrl %eax
imulq $0xc, %rax, %rcx
cmpl $0x0, (%rsi,%rcx)
js 0x6a492
movl %edx, %ebp
movq %rsi, %r14
imulq $0x18, %rax, %rax
leaq (%rdi,%rax), %r13
movl 0xc(%rdi,%rax), %eax
leaq 0x1e935a(%rip), %rcx    # 0x253758
movss 0x158(%rcx), %xmm0
movss %xmm0, (%rsp)
movl %r8d, %ecx
movq %rcx, 0x8(%rsp)
imulq $0x28, %rax, %r12
xorl %ebx, %ebx
xorl %r15d, %r15d
cmpq %rbx, %r12
je 0x6a495
movq (%r13), %rdi
cmpq $0x0, 0x18(%rdi,%rbx)
js 0x6a48c
movl 0x4(%rdi,%rbx), %eax
imulq $0xc, %rax, %rcx
movl (%r14,%rcx), %eax
testl %eax, %eax
js 0x6a48c
movl 0xc(%rdi,%rbx), %edx
imulq $0xc, %rdx, %rdx
addq %r14, %rdx
movl (%rdx), %r8d
testl %r8d, %r8d
js 0x6a48c
addq %rbx, %rdi
addq %r14, %rcx
movl 0x4(%rcx), %esi
subl %eax, %esi
movl 0x4(%rdx), %edx
subl %r8d, %edx
movl %ebp, %ecx
movss (%rsp), %xmm0
movl 0x4(%rsp), %r8d
leaq 0x10(%rsp), %r9
callq 0x6a4a7
testl %eax, %eax
js 0x6a48c
xorl %eax, %eax
movq 0x8(%rsp), %rcx
cmpl %ecx, 0x14(%rsp)
sete %al
addl %eax, %r15d
addq $0x28, %rbx
jmp 0x6a41c
xorl %r15d, %r15d
movl %r15d, %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: set_R_to_U(R_to_U*, unsigned int, unsigned int, unsigned int, unsigned char*)
void set_R_to_U(R_to_U* x, uint32_t rID, uint32_t uID, uint32_t is_Unitig, uint8_t* flag)
{
    if(flag && (*flag) == FAKE_LABLE) return;
     
	if(rID >= x->len)
	{
		x->index = (uint32_t*)realloc(x->index, (rID + 1)*sizeof(uint32_t));
        memset(x->index + x->len, -1, sizeof(uint32_t)*((rID + 1) - x->len));
        x->len = rID + 1;
	}

	x->index[rID] = uID & (uint32_t)(0x7fffffff);
	x->index[rID] = x->index[rID] | (uint32_t)(is_Unitig<<31);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
testq %r8, %r8
je 0x6ab76
cmpb $0x4, (%r8)
je 0x6abc9
movl %r14d, %r13d
movq 0x8(%r15), %r12
cmpq %r13, (%r15)
ja 0x6abba
incl %r14d
leaq (,%r14,4), %rsi
movq %r12, %rdi
callq 0x2370
movq %rax, %r12
movq %rax, 0x8(%r15)
movq (%r15), %rax
leaq (%r12,%rax,4), %rdi
movq %r14, %rdx
subq %rax, %rdx
shlq $0x2, %rdx
movl $0xff, %esi
callq 0x20e0
movq %r14, (%r15)
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
shll $0x1f, %ebx
orl %ebp, %ebx
movl %ebx, (%r12,%r13,4)
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: collect_sides_trio(ma_hit_t_alloc*, unsigned long, ma_sub_t*, ma_sub_t*, unsigned int)
void collect_sides_trio(ma_hit_t_alloc* paf, uint64_t rLen, ma_sub_t* max_left, ma_sub_t* max_right,
uint32_t trio_flag)
{
    long long j;
    uint32_t qs, qe;
    for (j = 0; j < paf->length; j++)
    {
        if(paf->buffer[j].del) continue;

        if(R_INF.trio_flag[Get_tn(paf->buffer[j])] == trio_flag) continue;

        qs = Get_qs(paf->buffer[j]);
        qe = Get_qe(paf->buffer[j]);

        ///overlaps from left side
        if(qs == 0)
        {
            if(qs < max_left->s) max_left->s = qs;
            if(qe > max_left->e) max_left->e = qe;
        }

        ///overlaps from right side
        if(qe == rLen)
        {
            if(qs < max_right->s) max_right->s = qs;
            if(qe > max_right->e) max_right->e = qe;
        }

        ///note: if (qs == 0 && qe == rLen)
        ///this overlap would be added to both b_left and b_right
        ///that is what we want
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorl %eax, %eax
leaq 0x1e90d5(%rip), %r9     # 0x254230
xorl %r10d, %r10d
movl 0xc(%rdi), %r11d
cmpq %r11, %r10
jae 0x6b1e4
movq (%rdi), %r11
cmpq $0x0, 0x18(%r11,%rax)
js 0x6b1d8
movq 0x28(%r9), %rbx
movl 0xc(%r11,%rax), %r14d
movzbl (%rbx,%r14), %ebx
cmpl %r8d, %ebx
je 0x6b1d8
movl (%r11,%rax), %ebx
movl 0x8(%r11,%rax), %r11d
testl %ebx, %ebx
jne 0x6b1ae
movl (%rdx), %ebp
testl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
je 0x6b1a4
andl $0x80000000, %ebp       # imm = 0x80000000
movl %ebp, (%rdx)
cmpl 0x4(%rdx), %r11d
jbe 0x6b1ae
movl %r11d, 0x4(%rdx)
cmpq %rsi, %r11
jne 0x6b1d8
movl (%rcx), %ebp
movl %ebp, %r14d
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
cmpl %ebx, %r14d
jbe 0x6b1ce
andl $0x80000000, %ebp       # imm = 0x80000000
orl %ebx, %ebp
movl %ebp, (%rcx)
cmpl 0x4(%rcx), %r11d
jbe 0x6b1d8
movl %r11d, 0x4(%rcx)
incq %r10
addq $0x28, %rax
jmp 0x6b15e
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: intersection_check_by_base(ma_hit_t_alloc*, unsigned long, unsigned int, unsigned int, char*, char*)
int intersection_check_by_base(ma_hit_t_alloc* paf, uint64_t rLen, uint32_t interval_s, uint32_t interval_e,
char* bq, char* bt)
{
    long long j;
    uint32_t qs, qe;

    for (j = 0; j < paf->length; j++) {
        if(paf->buffer[j].del) continue;

        qs = Get_qs(paf->buffer[j]);
        qe = Get_qe(paf->buffer[j]);
        ///[interval_s, interval_e) must be at least contained at one of the [qs, qe)
        if(qs<=interval_s && qe>=interval_e) {
            if((paf->buffer[j].el) || 
                    (boundary_verify(interval_s, interval_e, &(paf->buffer[j]), bq, bt, &R_INF) == 0)) {
                return 1;
            }
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, (%rsp)
movq %r8, %r15
movl %ecx, %ebp
movl %edx, %r12d
movq %rdi, %r13
xorl %ebx, %ebx
xorl %r14d, %r14d
movl 0xc(%r13), %eax
cmpq %rax, %r14
jae 0x6b725
movq (%r13), %rax
cmpq $0x0, 0x18(%rax,%rbx)
js 0x6b71c
leaq (%rax,%rbx), %rdx
cmpl %r12d, (%rdx)
ja 0x6b71c
cmpl %ebp, 0x8(%rax,%rbx)
jb 0x6b71c
cmpb $0x0, 0x20(%rax,%rbx)
jne 0x6b729
movl %r12d, %edi
movl %ebp, %esi
movq %r15, %rcx
movq (%rsp), %r8
leaq 0x1e8b1d(%rip), %r9     # 0x254230
callq 0x6b031
testl %eax, %eax
je 0x6b729
incq %r14
addq $0x28, %rbx
jmp 0x6b6d5
xorl %eax, %eax
jmp 0x6b72c
pushq $0x1
popq %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: asg_extend(asg_t const*, unsigned int, int, asg64_v*)
int asg_extend(const asg_t *g, uint32_t v, int max_ext, asg64_v *a)
{
	int ret;
	uint64_t lw;
	a->n = 0;
	kv_push(uint64_t, *a, v);
	do {
        /**
		 test (v) and (v^1), 
         if the out-degrees of both (v) and (v^1) are 1, ret == 0
        **/
		ret = asg_is_utg_end(g, v^1, &lw);
        /**
        #define ASG_ET_MERGEABLE 0
        #define ASG_ET_TIP       1
        #define ASG_ET_MULTI_OUT 2
        #define ASG_ET_MULTI_NEI 3
        **/
		if (ret != 0) break;
		kv_push(uint64_t, *a, lw);
		/**
		 ret == 0 means: 
		   v^1 and is the only prefix of (uint32_t)lw, 
		   and (uint32_t)lw is the only prefix of v^1
		**/
		
		v = (uint32_t)lw;
	} while (--max_ext > 0);
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
andq $0x0, (%rcx)
movl %esi, %r13d
movq %rdi, %r14
cmpq $0x0, 0x8(%rcx)
je 0x6bea8
movq 0x10(%rbx), %r15
xorl %eax, %eax
jmp 0x6bec6
movq $0x2, 0x8(%rbx)
movq 0x10(%rbx), %rdi
pushq $0x10
popq %rsi
callq 0x2370
movq %rax, %r15
movq %rax, 0x10(%rbx)
movq (%rbx), %rax
movl %r13d, %ecx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movq %rcx, (%r15,%rax,8)
incl %ebp
xorl $0x1, %r13d
movq %r14, %rdi
movl %r13d, %esi
movq %rsp, %rdx
callq 0x6bf48
movl %eax, %r12d
testl %eax, %eax
jne 0x6bf36
movq (%rbx), %rax
cmpq 0x8(%rbx), %rax
jne 0x6bf20
leaq (%rax,%rax), %rsi
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %rsi
movq %rsi, 0x8(%rbx)
shlq $0x3, %rsi
movq %r15, %rdi
callq 0x2370
movq %rax, %r15
movq %rax, 0x10(%rbx)
movq (%rbx), %rax
movq (%rsp), %r13
leaq 0x1(%rax), %rcx
movq %rcx, (%rbx)
movq %r13, (%r15,%rax,8)
decl %ebp
cmpl $0x1, %ebp
jg 0x6bed6
movl %r12d, %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_R_to_U(R_to_U*, unsigned int, unsigned int*, unsigned int*)
void get_R_to_U(R_to_U* x, uint32_t rID, uint32_t* uID, uint32_t* is_Unitig)
{
	if(rID >= x->len || (x->index[rID] == (uint32_t)(-1)))
	{
		(*uID) = (uint32_t)-1;
		(*is_Unitig) = (uint32_t)-1;
		return;
	}
    
    (*uID) = x->index[rID] & (uint32_t)(0x7fffffff);
	(*is_Unitig) = (x->index[rID]>>31);
}

// Assembly:
movl %esi, %eax
cmpq %rax, (%rdi)
jbe 0x6c2c5
movq 0x8(%rdi), %rsi
movl (%rsi,%rax,4), %edi
cmpl $-0x1, %edi
je 0x6c2c5
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
movl %edi, (%rdx)
movl (%rsi,%rax,4), %eax
shrl $0x1f, %eax
jmp 0x6c2cb
orl $-0x1, (%rdx)
pushq $-0x1
popq %rax
movl %eax, (%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/./Overlaps.h
// Function: asg_arc_pushp(asg_t*)
static inline asg_arc_t *asg_arc_pushp(asg_t *g)
{
	if (g->n_arc == g->m_arc) {
		g->m_arc = g->m_arc? g->m_arc<<1 : 16;
		g->arc = (asg_arc_t*)realloc(g->arc, g->m_arc * sizeof(asg_arc_t));
	}
	return &g->arc[g->n_arc++];
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x4(%rdi), %edx
movl %edx, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl (%rdi), %ecx
jne 0x6c49b
leal (%rcx,%rcx), %eax
testl %ecx, %ecx
pushq $0x10
popq %rcx
cmovnel %eax, %ecx
movl %ecx, (%rbx)
movq 0x8(%rbx), %rdi
imulq $0x18, %rcx, %rsi
callq 0x2370
movq %rax, 0x8(%rbx)
movl 0x4(%rbx), %edx
movl %edx, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
jmp 0x6c49f
movq 0x8(%rbx), %rax
leal 0x1(%rdx), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andl $0x80000000, %edx       # imm = 0x80000000
orl %esi, %edx
movl %edx, 0x4(%rbx)
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rax, %rcx
movq %rcx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: prt_specific_overlap(ma_hit_t_alloc*, unsigned long, unsigned long, char const*)
void prt_specific_overlap(ma_hit_t_alloc *src, uint64_t qn, uint64_t tn, const char *cmd)
{
    ma_hit_t *h = NULL; int64_t idx = -1, k;
    if(tn != ((uint64_t)-1)) {
        idx = get_specific_overlap(&(src[qn]), qn, tn); h = &(src[qn].buffer[idx]);
        fprintf(stderr, "%s::idx::%ld[M::%s::] qn::%u, tn::%u, del::%u, bl::%u, ml::%u\n", cmd, idx, __func__, 
        Get_qn(*h), Get_tn(*h), h->del, h->bl, h->ml);
    } else {
        for (k = 0; k < src[qn].length; k++) {
            h = &(src[qn].buffer[k]);
            fprintf(stderr, "%s::idx::%ld[M::%s::] qn::%u, tn::%u, del::%u, bl::%u, ml::%u\n", cmd, idx, __func__, 
            Get_qn(*h), Get_tn(*h), h->del, h->bl, h->ml); 
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
imulq $0x18, %rsi, %r14
addq %rdi, %r14
cmpq $-0x1, %rdx
jne 0x6c566
xorl %ebp, %ebp
xorl %r15d, %r15d
movl 0xc(%r14), %eax
cmpq %rax, %r15
jae 0x6c557
movq (%r14), %rax
movq 0x1e6ae8(%rip), %rcx    # 0x252fe0
movq (%rcx), %rdi
movl 0x4(%rax,%rbp), %r9d
movl 0xc(%rax,%rbp), %r10d
movq 0x18(%rax,%rbp), %r11
movq %r11, %r12
shrq $0x3f, %r12
movq %r11, %r13
shrq $0x20, %r13
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
shrl $0x1e, %r11d
andl $0x1, %r11d
leaq 0x17bab2(%rip), %rsi    # 0x1e7fe0
movq %rbx, %rdx
pushq $-0x1
popq %rcx
leaq 0x17bae4(%rip), %r8     # 0x1e801f
xorl %eax, %eax
pushq %r11
pushq %r13
pushq %r12
pushq %r10
callq 0x22b0
addq $0x20, %rsp
incq %r15
addq $0x28, %rbp
jmp 0x6c4e5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x696ab
movq (%r14), %rcx
imulq $0x28, %rax, %rdx
movq 0x1e6a64(%rip), %rsi    # 0x252fe0
movq (%rsi), %rdi
movl 0x4(%rcx,%rdx), %r9d
movl 0xc(%rcx,%rdx), %r10d
movq 0x18(%rcx,%rdx), %r14
movq %r14, %r11
shrq $0x3f, %r11
movq %r14, %r15
shrq $0x20, %r15
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
shrl $0x1e, %r14d
andl $0x1, %r14d
leaq 0x17ba2e(%rip), %rsi    # 0x1e7fe0
leaq 0x17ba66(%rip), %r8     # 0x1e801f
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
pushq %r14
pushq %r15
pushq %r11
pushq %r10
callq 0x22b0
addq $0x28, %rsp
jmp 0x6c55b
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: if_node_exist(unsigned int*, unsigned int, unsigned int)
int if_node_exist(uint32_t* nodes, uint32_t length, uint32_t query)
{
    uint32_t i;
    for (i = 0; i < length; ++i)
    {
        if((nodes[i]>>1) == query)
        {
            return 1;
        }
    }

    return 0;
}

// Assembly:
movl %esi, %ecx
xorl %eax, %eax
pushq $0x1
popq %rsi
xorl %r8d, %r8d
cmpq %r8, %rcx
je 0x6c810
movl (%rdi,%r8,4), %r9d
shrl %r9d
incq %r8
cmpl %edx, %r9d
jne 0x6c7fa
movl %esi, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: single_edge_length(asg_t*, unsigned int, unsigned int, long long)
long long single_edge_length(asg_t *g, uint32_t begNode, uint32_t endNode, long long edgeLen)
{
    
    uint32_t v = begNode;
    uint32_t nv = asg_arc_n(g, v);
    asg_arc_t *av = asg_arc_a(g, v);
    long long rLen = 0;

    while (rLen < edgeLen && nv == 1)
    {
        rLen++;
        if((av[0].v>>1) == endNode)
        {
            return rLen;
        }

        if(asg_is_single_edge(g, av[0].v, v>>1) != 1)
        {
            return -1;
        }

        v = av[0].v;
        nv = asg_arc_n(g, v);
        av = asg_arc_a(g, v);      
    }

    return -1;   

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %ebp
movl %esi, %edx
movq %rdi, %r15
movl %esi, %eax
shlq $0x3, %rax
addq 0x28(%rdi), %rax
pushq $0x1
popq %r12
leaq -0x1(%r12), %rcx
cmpq %r14, %rcx
jge 0x6c88a
movq (%rax), %rax
movl %eax, %ecx
cmpl $0x1, %ecx
jne 0x6c88a
movq 0x8(%r15), %r13
shrq $0x20, %rax
imulq $0x18, %rax, %rbx
movl 0x8(%r13,%rbx), %esi
movl %esi, %eax
shrl %eax
cmpl %ebp, %eax
je 0x6c88f
shrl %edx
movq %r15, %rdi
callq 0x6c8a1
cmpl $0x1, %eax
jne 0x6c88a
leaq (%rbx,%r13), %rax
addq $0x8, %rax
movl (%rax), %edx
movq %rdx, %rax
shlq $0x3, %rax
addq 0x28(%r15), %rax
incq %r12
jmp 0x6c834
pushq $-0x1
popq %rax
jmp 0x6c892
movq %r12, %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: detect_single_path(asg_t*, unsigned int, unsigned int*, long long*, buf_t*)
uint32_t detect_single_path(asg_t *g, uint32_t begNode, uint32_t* endNode, long long* Len, buf_t* b)
{
    
    uint32_t v = begNode;
    uint32_t nv, rnv;
    asg_arc_t *av;
    (*Len) = 0;


    while (1)
    {
        (*Len)++;
        nv = asg_arc_n(g, v);
        av = asg_arc_a(g, v);   
        (*endNode) = v;

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

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

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

        if(nv > 2)
        {
            return MUL_OUTPUT;
        }

        ///up to here, nv=1
        ///rnv must >= 1
        rnv = asg_is_single_edge(g, av[0].v, v>>1);
        v = av[0].v;
        (*endNode) = v;
        if(rnv == 2)
        {
            (*Len)++;
            if(b) kv_push(uint32_t, b->b, v>>1);
            return TWO_INPUT;
        }

        if(rnv > 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
subq $0x18, %rsp
movq %r8, %rbx
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, %r13
movq %rcx, 0x8(%rsp)
andq $0x0, (%rcx)
movl %esi, 0x14(%rsp)
movq 0x8(%rsp), %rax
incq (%rax)
movq 0x8(%r13), %r15
movq 0x28(%r13), %rax
movl %ebp, %ecx
movq (%rax,%rcx,8), %r14
movl %ebp, (%r12)
testq %rbx, %rbx
je 0x6c9a1
movq 0x38(%rbx), %rcx
movq 0x48(%rbx), %rax
cmpq 0x40(%rbx), %rcx
jne 0x6c992
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rsi
movq %rsi, 0x40(%rbx)
shlq $0x2, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x48(%rbx)
movq 0x38(%rbx), %rcx
movl %ebp, %edx
shrl %edx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x38(%rbx)
movl %edx, (%rax,%rcx,4)
testl %r14d, %r14d
je 0x6c9f1
movq %r14, %rax
shrq $0x20, %rax
cmpl $0x2, %r14d
je 0x6ca5d
ja 0x6c9f7
imulq $0x18, %rax, %r14
movl 0x8(%r15,%r14), %esi
shrl %ebp
movq %r13, %rdi
movl %ebp, %edx
callq 0x6c8a1
movl 0x8(%r15,%r14), %ebp
movl %ebp, (%r12)
cmpl $0x2, %eax
je 0x6c9ff
ja 0x6ca0b
movl %ebp, %eax
xorl 0x14(%rsp), %eax
cmpl $0x2, %eax
jae 0x6c93f
pushq $0x7
jmp 0x6c9f9
pushq $0x5
popq %r14
jmp 0x6ca5d
pushq $0x4
popq %rax
movl %eax, %r14d
jmp 0x6ca5d
movq 0x8(%rsp), %rax
incq (%rax)
pushq $0x1
jmp 0x6ca15
movq 0x8(%rsp), %rax
incq (%rax)
pushq $0x3
popq %r14
testq %rbx, %rbx
je 0x6ca5d
movq 0x38(%rbx), %rcx
movq 0x48(%rbx), %rax
cmpq 0x40(%rbx), %rcx
jne 0x6ca50
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rsi
movq %rsi, 0x40(%rbx)
shlq $0x2, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x48(%rbx)
movq 0x38(%rbx), %rcx
shrl %ebp
leaq 0x1(%rcx), %rdx
movq %rdx, 0x38(%rbx)
movl %ebp, (%rax,%rcx,4)
movl %r14d, %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_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 0x6c919
xorl %ebp, %ebp
cmpl $0x1, %eax
jne 0x6cae3
movq %rsp, %rdx
leaq 0x8(%rsp), %rcx
movq %r13, %rdi
movl %r12d, %esi
movq %r15, %r8
callq 0x6c919
cmpl $0x1, %eax
jne 0x6cae3
movl 0x4(%rsp), %eax
cmpl (%rsp), %eax
jne 0x6cae3
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