LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Hash_Table.cpp
// Function: test_single_list(Candidates_list*, k_mer_pos*, unsigned long, unsigned long, unsigned long)
void test_single_list(Candidates_list* candidates, k_mer_pos* n_list, uint64_t n_lengh, uint64_t end_pos, uint64_t strand)
{
    uint64_t i;
    long long j = 0;
    for (i = 0; i < n_lengh; i++)
    {
        
        for (; j < candidates->length; j++)
        {
            if (
                n_list[i].offset == (uint64_t)candidates->list[j].offset
                &&
                n_list[i].readID == candidates->list[j].readID
                &&
                end_pos == (uint64_t)candidates->list[j].self_offset
                &&
                strand == candidates->list[j].strand
            )
            {
                break;
            }   
        }

        if (j == candidates->length)
        {
            fprintf(stderr, "ERROR 4\n");
        }
    }
}

// Assembly:
testq %rdx, %rdx
je 0x3fca6
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rsi, %r12
movq %rdi, %r13
xorl %ebp, %ebp
xorl %r15d, %r15d
movq %rdx, (%rsp)
movq 0x8(%r13), %rax
cmpq %rax, %rbp
jge 0x3fc7e
movl (%r12,%r15,8), %ecx
movq (%r13), %rdi
movq %rbp, %rsi
shlq $0x4, %rsi
leaq (%rdi,%rsi), %r8
addq $0x8, %r8
cmpl -0x4(%r8), %ecx
jne 0x3fc6f
movl -0x8(%r8), %esi
movl 0x4(%r12,%r15,8), %edi
xorl %esi, %edi
testl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
jne 0x3fc6f
movl (%r8), %edi
xorq %r14, %rdi
shrl $0x1f, %esi
movl %esi, %esi
xorq %rbx, %rsi
orq %rdi, %rsi
je 0x3fc7e
incq %rbp
addq $0x10, %r8
cmpq %rbp, %rax
jne 0x3fc43
movq %rax, %rbp
cmpq %rax, %rbp
je 0x3fc8d
incq %r15
cmpq %rdx, %r15
jne 0x3fc23
jmp 0x3fc98
callq 0x510b
movq (%rsp), %rdx
jmp 0x3fc83
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/Hash_Table.cpp
// Function: destory_Chain_Data(Chain_Data*)
void destory_Chain_Data(Chain_Data* x)
{
    free(x->score);
    free(x->pre);
    free(x->indels);
    free(x->self_length);
    free(x->occ);
	free(x->tmp);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x2220
movq 0x8(%rbx), %rdi
callq 0x2220
movq 0x10(%rbx), %rdi
callq 0x2220
movq 0x18(%rbx), %rdi
callq 0x2220
movq 0x20(%rbx), %rdi
callq 0x2220
movq 0x28(%rbx), %rdi
popq %rbx
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Hash_Table.cpp
// Function: destory_Candidates_list_buf(void*, Candidates_list*, int)
void destory_Candidates_list_buf(void *km, Candidates_list* l, int is_z)
{
    kfree(km, l->list);
    kfree(km, l->chainDP.score);
    kfree(km, l->chainDP.pre);
    kfree(km, l->chainDP.indels);
    kfree(km, l->chainDP.self_length);
    kfree(km, l->chainDP.occ);
    kfree(km, l->chainDP.tmp);
    if(is_z) memset(l, 0, sizeof(*l));
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rsi
callq 0x1e3632
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x1e3632
movq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0x1e3632
movq 0x28(%rbx), %rsi
movq %r14, %rdi
callq 0x1e3632
movq 0x30(%rbx), %rsi
movq %r14, %rdi
callq 0x1e3632
movq 0x38(%rbx), %rsi
movq %r14, %rdi
callq 0x1e3632
movq 0x40(%rbx), %rsi
movq %r14, %rdi
callq 0x1e3632
testl %ebp, %ebp
je 0x3fdbe
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movq $0x0, 0x50(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Hash_Table.cpp
// Function: resize_window_list_alloc(window_list_alloc*, unsigned long)
void resize_window_list_alloc(window_list_alloc* x, uint64_t size)
{
    kv_resize(window_list, *x, size); x->n = x->c.n = 0;
    uint64_t k;
    for (k = 0; k < x->m; k++) x->a[k].error = -1; 
    x->c.n = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq %rsi, 0x8(%rdi)
jae 0x3fe19
decq %rsi
movq %rsi, %rax
shrq %rax
orq %rsi, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
shlq $0x5, %rsi
callq 0x2370
movq %rax, 0x10(%rbx)
xorl %eax, %eax
movq %rax, 0x18(%rbx)
movq %rax, (%rbx)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x3fe41
movq 0x10(%rbx), %rcx
addq $0x14, %rcx
movw $0xffff, (%rcx)         # imm = 0xFFFF
addq $0x20, %rcx
decq %rax
jne 0x3fe33
movq $0x0, 0x18(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Hash_Table.cpp
// Function: push_ovlp_chain_qgen(overlap_region*, unsigned int, long, long, long, k_mer_hit*, k_mer_hit*)
void push_ovlp_chain_qgen(overlap_region* o, uint32_t xid, int64_t xl, int64_t yl, int64_t sc, 
k_mer_hit *beg, k_mer_hit *end)
{
    int64_t xr, yr; 
    o->x_id = xid; o->y_id = beg->readID;
    o->x_pos_strand = 0; o->y_pos_strand = beg->strand;
    o->x_pos_s = beg->self_offset; o->y_pos_s = beg->offset;
    o->x_pos_e = end->self_offset; o->y_pos_e = end->offset;

    if(o->x_pos_s <= o->y_pos_s) {
        o->y_pos_s -= o->x_pos_s; o->x_pos_s = 0;
    } else {
        o->x_pos_s -= o->y_pos_s; o->y_pos_s = 0;
    }

    xr = xl-o->x_pos_e-1; yr = yl-o->y_pos_e-1;
    if(xr <= yr) {
        o->x_pos_e = xl-1; o->y_pos_e += xr;        
    } else {
        o->y_pos_e = yl-1; o->x_pos_e += yr; 
    }

    o->shared_seed = sc;
    o->align_length = 0;
    o->is_match = 0;
    o->non_homopolymer_errors = 0;
    o->strong = 0;
    o->overlapLen = 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x20(%rsp), %r14
movl %esi, (%rdi)
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andl (%r9), %eax
movl %eax, 0x10(%rdi)
movl $0x0, 0xc(%rdi)
movl (%r9), %eax
shrl $0x1f, %eax
movl %eax, 0x1c(%rdi)
movl 0x8(%r9), %esi
leaq 0x4(%rdi), %r10
movl %esi, 0x4(%rdi)
movl 0x4(%r9), %ebx
leaq 0x14(%rdi), %r11
movl %ebx, 0x14(%rdi)
movl 0x8(%r14), %eax
movl %eax, 0x8(%rdi)
movl 0x4(%r14), %r9d
movl %r9d, 0x18(%rdi)
movl %esi, %ebp
subl %ebx, %ebp
jbe 0x41138
movl %ebp, (%r10)
movq %r11, %r10
jmp 0x4113d
subl %esi, %ebx
movl %ebx, (%r11)
xorl %esi, %esi
movl %esi, (%r10)
movq %rax, %r11
notq %r11
addq %rdx, %r11
movq %r9, %r10
notq %r10
addq %rcx, %r10
xorl %ebx, %ebx
xorl %r14d, %r14d
cmpq %r10, %r11
setle %bl
setg %r14b
cmovlq %r11, %r10
cmovlel %r9d, %eax
cmovgl %ecx, %edx
shll $0x4, %r14d
shll $0x4, %ebx
decl %edx
movl %edx, 0x8(%rdi,%r14)
addl %eax, %r10d
movl %r10d, 0x8(%rdi,%rbx)
movl %r8d, 0x24(%rdi)
movl %esi, 0x28(%rdi)
movb %sil, 0x2c(%rdi)
movl %esi, 0x30(%rdi)
movb %sil, 0x2e(%rdi)
movl %esi, 0x20(%rdi)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Hash_Table.cpp
// Function: filter_non_ovlp_xchains(overlap_region*, long, long*)
int64_t filter_non_ovlp_xchains(overlap_region *a, int64_t a_n, int64_t *n_v)
{
    int64_t k, i, n_mchain, omx, opx, ovx, os, oe; overlap_region *m, *p, t;
    for (k = n_mchain = (*n_v) = 0; k < a_n; k++) {
		m = &(a[k]); 
        omx = m->x_pos_e + 1 - m->x_pos_s;
		for (i = 0; i < n_mchain; i++) {
			p = &(a[i]);
            opx = p->x_pos_e + 1 - p->x_pos_s;

            os = ((m->x_pos_s>=p->x_pos_s)? m->x_pos_s:p->x_pos_s);
            oe = ((m->x_pos_e<=p->x_pos_e)? m->x_pos_e:p->x_pos_e) + 1;
			ovx = oe>os?oe-os:0;
            if((ovx > omx*0.1) || (ovx > opx*0.1)) break;
		}
		if(i < n_mchain) continue;

        if (n_mchain != k) {
            t = a[k]; a[k] = a[n_mchain]; a[n_mchain] = t;
        }
        (*n_v) += a[n_mchain].align_length;
		n_mchain++;
	}
	return n_mchain;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq $0x0, (%rdx)
testq %rsi, %rsi
jle 0x414e0
movq %rdx, %r11
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rdi), %r13
xorl %ebx, %ebx
movsd 0x1e380b(%rip), %xmm3   # 0x224bd0
xorl %r12d, %r12d
movq %rsi, 0x8(%rsp)
movq %rdx, (%rsp)
imulq $0xa8, %rbx, %rbp
testq %r12, %r12
jle 0x41463
movl 0x4(%r15,%rbp), %eax
movl 0x8(%r15,%rbp), %ecx
movl %ecx, %edx
subl %eax, %edx
incl %edx
xorps %xmm0, %xmm0
cvtsi2sd %rdx, %xmm0
mulsd %xmm3, %xmm0
movq %r13, %rdx
movq %r12, %rsi
movl -0x4(%rdx), %edi
cmpl %edi, %eax
movl %edi, %r9d
cmoval %eax, %r9d
movl (%rdx), %r8d
cmpl %r8d, %ecx
movl %r8d, %r10d
cmovbl %ecx, %r10d
incl %r10d
cmpl %r9d, %r10d
ja 0x4142a
xorpd %xmm1, %xmm1
jmp 0x41435
subq %r9, %r10
xorps %xmm1, %xmm1
cvtsi2sd %r10, %xmm1
ucomisd %xmm0, %xmm1
ja 0x414d2
subl %edi, %r8d
incl %r8d
xorps %xmm2, %xmm2
cvtsi2sd %r8, %xmm2
mulsd %xmm3, %xmm2
ucomisd %xmm2, %xmm1
ja 0x414d2
addq $0xa8, %rdx
decq %rsi
jne 0x41403
cmpq %rbx, %r12
je 0x414c0
addq %r15, %rbp
movl $0xa8, %edx
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x2160
movq %r13, %r14
imulq $0xa8, %r12, %r13
addq %r15, %r13
movl $0xa8, %edx
movq %rbp, %rdi
movq %r13, %rsi
callq 0x2160
movl $0xa8, %edx
movq %r13, %rdi
movq %r14, %r13
leaq 0x10(%rsp), %rsi
callq 0x2160
movsd 0x1e3719(%rip), %xmm3   # 0x224bd0
movq (%rsp), %r11
movq 0x8(%rsp), %r14
imulq $0xa8, %r12, %rax
movl 0x28(%r15,%rax), %eax
addq %rax, (%r11)
incq %r12
incq %rbx
cmpq %r14, %rbx
jne 0x413d1
jmp 0x414e3
xorl %r12d, %r12d
movq %r12, %rax
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/Hash_Table.cpp
// Function: lchain_dp_trace(k_mer_hit*, long, long, double, long)
uint64_t lchain_dp_trace(k_mer_hit* a, int64_t a_n, int64_t max_lgap, double sgap_rate, int64_t sgap)
{
    // fprintf(stderr, "[M::%s::] a_n::%ld\n", __func__, a_n);
    if(a_n <= 0) return 0;
    int64_t i, st, occ = 0; 

    for (i = 1, st = 0; i <= a_n; ++i) {
        // fprintf(stderr, "[M::%s::i->%ld] q::%u, t::%u, cnt::%u, readID::%u\n", __func__, 
        // i-1, a[i-1].self_offset, a[i-1].offset, a[i-1].cnt, a[i-1].readID);
        if((i == a_n) || (is_alnw(a[i]))) {///[st, i)
            if(i > st) {
                occ += filter_bad_seed_dp((st>0)?&(a[st-1]):NULL, (i<a_n)?&(a[i]):NULL, a, a_n, max_lgap, sgap_rate, sgap);
            }
            st = i+1;
        }
    }

    if(occ) {
        for (i = occ = 0; i < a_n; ++i) {
            if(a[i].self_offset == ((uint32_t)-1)) continue;
            a[occ++] = a[i];
        }
        a_n = occ;
    }
    return a_n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x20(%rsp)
movsd %xmm0, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
testq %rsi, %rsi
jle 0x44bd4
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x10(%rdi), %rax
movq %rax, 0x8(%rsp)
movq %rsi, %rbp
negq %rbp
leaq 0x10(%rdi), %r15
movl $0x2, %r12d
xorl %r13d, %r13d
xorl %eax, %eax
leaq (%r12,%rbp), %rcx
cmpq $0x1, %rcx
je 0x44b3f
movl (%r15), %ecx
notl %ecx
testl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
jne 0x44b8e
leaq -0x1(%r12), %rcx
cmpq %rax, %rcx
jle 0x44b8b
movq %rax, %rdi
shlq $0x4, %rdi
addq 0x8(%rsp), %rdi
testq %rax, %rax
movl $0x0, %eax
cmovleq %rax, %rdi
cmpq %rbx, %rcx
movl $0x0, %esi
cmovlq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movq 0x10(%rsp), %r8
movsd 0x18(%rsp), %xmm0
movq 0x20(%rsp), %r9
callq 0x44843
addq %rax, %r13
movq %r12, %rax
leaq (%r12,%rbp), %rcx
incq %rcx
incq %r12
addq $0x10, %r15
cmpq $0x2, %rcx
jne 0x44b28
testq %r13, %r13
je 0x44bd8
leaq 0x8(%r14), %rcx
xorl %eax, %eax
cmpl $-0x1, (%rcx)
je 0x44bc9
leaq -0x8(%rcx), %rdx
leaq 0x1(%rax), %rsi
shlq $0x4, %rax
movups (%rdx), %xmm0
movups %xmm0, (%r14,%rax)
movq %rsi, %rax
addq $0x10, %rcx
decq %rbx
jne 0x44bad
jmp 0x44bdb
xorl %eax, %eax
jmp 0x44bdb
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/POA.cpp
// Function: init_Edge_alloc(Edge_alloc*)
void init_Edge_alloc(Edge_alloc* list)
{
	if (list->list == NULL) {
		list->size = INIT_EDGE_SIZE;
		list->length = 0;
		list->delete_length = 0;
		list->list = (Edge*)malloc(sizeof(Edge)*list->size);
	} else {
		list->length = 0;
		list->delete_length = 0;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x44bff
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
popq %rbx
retq
movq $0x32, 0x8(%rbx)
movl $0xaf0, %edi            # imm = 0xAF0
callq 0x2280
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq %rax, (%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/POA.cpp
// Function: append_Edge_alloc(Edge_alloc*, unsigned long, unsigned long, unsigned long, unsigned long)
void append_Edge_alloc(Edge_alloc* list,  uint64_t in_node, uint64_t out_node, uint64_t weight, uint64_t length)
{
	if (list->length + 1 > list->size) {
		uint64_t old_size = list->size;
		list->size = list->size + INCREASE_EDGE_SIZE;
		list->list = (Edge*)realloc(list->list, sizeof(Edge)*list->size);
		memset(&list->list[old_size], 0, (list->size - old_size) * sizeof(Edge));
	}

	list->list[list->length].in_node = in_node;
	list->list[list->length].out_node = out_node;
	list->list[list->length].weight = weight;
	list->list[list->length].length = length;
	list->list[list->length].num_insertions = 0;
	list->list[list->length].self_edge_ID = list->length;

	list->length++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
movq 0x8(%rdi), %r14
movq 0x10(%rdi), %rax
incq %rax
cmpq %r14, %rax
jbe 0x44c9c
leaq 0x5(%r14), %rax
movq %rax, 0x8(%rbx)
movq (%rbx), %rdi
imulq $0x38, %r14, %rbp
leaq 0x118(%rbp), %rsi
movq %r8, (%rsp)
callq 0x2370
movq %rax, (%rbx)
addq %rax, %rbp
movq 0x8(%rbx), %rax
subq %r14, %rax
imulq $0x38, %rax, %rdx
movq %rbp, %rdi
xorl %esi, %esi
callq 0x20e0
movq (%rsp), %r8
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
imulq $0x38, %rcx, %rdx
movq %r13, (%rax,%rdx)
movq %r12, 0x8(%rax,%rdx)
movq %r15, 0x10(%rax,%rdx)
movq %r8, 0x20(%rax,%rdx)
movq $0x0, 0x18(%rax,%rdx)
movq %rcx, 0x28(%rax,%rdx)
incq %rcx
movq %rcx, 0x10(%rbx)
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/POA.cpp
// Function: add_and_check_bi_direction_edge(Graph*, Node*, Node*, unsigned long, unsigned long)
int add_and_check_bi_direction_edge(Graph* graph, Node* in_node, Node* out_node, uint64_t weight, uint64_t flag)
{
    Edge* e_forward;
    Edge* e_backward;

    //if there are no edge from in_node to out_node
    if(!get_bi_Edge(graph, in_node, out_node, &e_forward, &e_backward))
    {
        append_Edge_alloc(&(Output_Edges((*in_node))), (*in_node).ID, (*out_node).ID, weight, flag);
        append_Edge_alloc(&(Input_Edges((*out_node))), (*in_node).ID, (*out_node).ID, weight, flag);

        Output_Edges((*in_node)).list[Output_Edges((*in_node)).length - 1].reverse_edge_ID 
        = Input_Edges((*out_node)).length - 1;

        Input_Edges((*out_node)).list[Input_Edges((*out_node)).length - 1].reverse_edge_ID
        = Output_Edges((*in_node)).length - 1;

        return 1;
    }
    else//if there is an edge from in_node to out_node, do nothing
    {
        return 0;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r14
cmpb $0x44, 0x18(%rsi)
je 0x44cfe
cmpb $0x44, 0x18(%rbx)
jne 0x44d62
leaq 0x40(%r14), %rdi
movq (%r14), %rsi
movq (%rbx), %rdx
movq %r12, %rcx
movq %r15, %r8
callq 0x44c37
leaq 0x60(%rbx), %rdi
movq (%r14), %rsi
movq (%rbx), %rdx
movq %r12, %rcx
movq %r15, %r8
callq 0x44c37
movq 0x70(%rbx), %rax
leaq -0x1(%rax), %rcx
movq 0x40(%r14), %rdx
movq 0x50(%r14), %rsi
imulq $0x38, %rsi, %rdi
movq %rcx, -0x8(%rdx,%rdi)
decq %rsi
movq 0x60(%rbx), %rcx
imulq $0x38, %rax, %rax
movq %rsi, -0x8(%rcx,%rax)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x70(%rbx), %rax
leaq -0x1(%rax), %rcx
xorl %edx, %edx
movb $0x1, %dil
cmpq %rax, %rdx
jge 0x44dcd
movq 0x60(%rbx), %r8
imulq $0x38, %rdx, %r9
movb $0x1, %dil
cmpq $-0x1, 0x8(%r8,%r9)
je 0x44d8c
movb $0x1, %r9b
jmp 0x44dac
addq %r8, %r9
addq $0x40, %r9
cmpq %rdx, %rcx
je 0x44dca
incq %rdx
cmpq $-0x1, (%r9)
leaq 0x38(%r9), %r9
je 0x44d93
cmpq %rax, %rdx
setl %r9b
testb %r9b, %r9b
je 0x44dcd
imulq $0x38, %rdx, %r9
cmpq $-0x1, 0x8(%r8,%r9)
je 0x44dcd
addq %r9, %r8
incq %rdx
xorl %edi, %edi
movq %r8, %rsi
jmp 0x44dcd
movq %rax, %rdx
testb %dil, %dil
jne 0x44cfe
movq (%rsi), %rdi
cmpq (%r14), %rdi
jne 0x44d6c
xorl %eax, %eax
jmp 0x44d56
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/POA.cpp
// Function: add_bi_direction_edge(Graph*, Node*, Node*, unsigned long, unsigned long)
void add_bi_direction_edge(Graph* graph, Node* in_node, Node* out_node, uint64_t weight, uint64_t flag)
{

    append_Edge_alloc(&(Output_Edges((*in_node))), (*in_node).ID, (*out_node).ID, weight, flag);
    append_Edge_alloc(&(Input_Edges((*out_node))), (*in_node).ID, (*out_node).ID, weight, flag);

    Output_Edges((*in_node)).list[Output_Edges((*in_node)).length - 1].reverse_edge_ID 
    = Input_Edges((*out_node)).length - 1;

    Input_Edges((*out_node)).list[Input_Edges((*out_node)).length - 1].reverse_edge_ID
    = Output_Edges((*in_node)).length - 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r12
leaq 0x40(%rsi), %rdi
movq (%rsi), %rsi
movq (%rdx), %rdx
callq 0x44c37
leaq 0x60(%rbx), %rdi
movq (%r12), %rsi
movq (%rbx), %rdx
movq %r15, %rcx
movq %r14, %r8
callq 0x44c37
movq 0x70(%rbx), %rax
leaq -0x1(%rax), %rcx
movq 0x40(%r12), %rdx
movq 0x50(%r12), %rsi
imulq $0x38, %rsi, %rdi
movq %rcx, -0x8(%rdx,%rdi)
decq %rsi
movq 0x60(%rbx), %rcx
imulq $0x38, %rax, %rax
movq %rsi, -0x8(%rcx,%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/POA.cpp
// Function: remove_and_check_bi_direction_edge_from_nodes(Graph*, Node*, Node*)
int remove_and_check_bi_direction_edge_from_nodes(Graph* graph, Node* in_node, Node* out_node)
{
    Edge* e_forward;
    Edge* e_backward;

    //if there are no edge from in_node to out_node
    //1. remove these two edges
    //2. increase the edge_list.delete_length in both in_node and out_node
    if(get_bi_Edge(graph, in_node, out_node, &e_forward, &e_backward))
    {
        e_forward->in_node = (uint64_t)-1;
        e_forward->out_node = (uint64_t)-1;
        e_forward->weight = (uint64_t)-1;
        e_forward->length = (uint64_t)-1;
        e_forward->num_insertions = (uint64_t)-1;
        e_forward->self_edge_ID = (uint64_t)-1;
        e_forward->reverse_edge_ID = (uint64_t)-1;


        e_backward->in_node = (uint64_t)-1;
        e_backward->out_node = (uint64_t)-1;
        e_backward->weight = (uint64_t)-1;
        e_backward->length = (uint64_t)-1;
        e_backward->num_insertions = (uint64_t)-1;
        e_backward->self_edge_ID = (uint64_t)-1;
        e_backward->reverse_edge_ID = (uint64_t)-1;

        Output_Edges(*in_node).delete_length++;
        Input_Edges((*out_node)).delete_length++;

        return 1;
    }
    else//if there is an edge from in_node to out_node, do nothing
    {
        return 0;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movb $0x1, %cl
cmpb $0x44, 0x18(%rsi)
jne 0x44e66
jmp 0x44f46
cmpb $0x44, 0x18(%rdx)
je 0x44f46
movq 0x70(%rdx), %r8
leaq -0x1(%r8), %r9
xorl %r10d, %r10d
movb $0x1, %cl
cmpq %r8, %r10
jge 0x44e9a
movq 0x60(%rdx), %rbx
imulq $0x38, %r10, %r14
movb $0x1, %r11b
cmpq $-0x1, 0x8(%rbx,%r14)
je 0x44e9f
movb $0x1, %bpl
jmp 0x44ebf
movb $0x1, %r11b
jmp 0x44ee1
addq %rbx, %r14
addq $0x40, %r14
cmpq %r10, %r9
je 0x44ede
incq %r10
cmpq $-0x1, (%r14)
leaq 0x38(%r14), %r14
je 0x44ea6
cmpq %r8, %r10
setl %bpl
testb %bpl, %bpl
je 0x44ee1
imulq $0x38, %r10, %r14
cmpq $-0x1, 0x8(%rbx,%r14)
je 0x44ee1
addq %r14, %rbx
incq %r10
xorl %r11d, %r11d
movq %rbx, %rax
jmp 0x44ee1
movq %r8, %r10
testb %r11b, %r11b
jne 0x44f46
movq (%rax), %r11
cmpq (%rsi), %r11
jne 0x44e7b
movq 0x8(%rax), %rcx
movq 0x28(%rax), %r8
movq 0x18(%rdi), %rdi
movq %r11, %r9
shlq $0x7, %r9
addq %rdi, %r9
addq $0x40, %r9
cmpq 0x10(%r9), %r8
jae 0x44f2f
movq (%r9), %rbx
imulq $0x38, %r8, %r10
cmpq %r11, (%rbx,%r10)
jne 0x44f2f
addq %r10, %rbx
cmpq %rcx, 0x8(%rbx)
jne 0x44f2f
imulq $0x38, 0x30(%rax), %r14
shlq $0x7, %rcx
jmp 0x44f3f
imulq $0x38, 0x30(%rax), %rbx
addq (%r9), %rbx
shlq $0x7, %rcx
imulq $0x38, %r8, %r14
addq 0x60(%rdi,%rcx), %r14
xorl %ecx, %ecx
xorl %eax, %eax
testb %cl, %cl
jne 0x44f8b
movq $-0x1, %rax
movq %rax, 0x30(%rbx)
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x20(%rbx)
movdqu %xmm0, 0x10(%rbx)
movdqu %xmm0, (%rbx)
movq %rax, 0x30(%r14)
movdqu %xmm0, 0x20(%r14)
movdqu %xmm0, 0x10(%r14)
movdqu %xmm0, (%r14)
incq 0x58(%rsi)
incq 0x78(%rdx)
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/POA.cpp
// Function: remove_and_check_bi_direction_edge_from_edge(Graph*, Edge*)
int remove_and_check_bi_direction_edge_from_edge(Graph* graph, Edge* e)
{
    Edge* e_forward;
    Edge* e_backward;

    if(If_Edge_Exist(*e))
    {
        get_bi_direction_edges(graph, e, &e_forward, &e_backward);
        Output_Edges(G_Node(*graph, e_forward->in_node)).delete_length++;
        Input_Edges(G_Node(*graph, e_forward->out_node)).delete_length++;

        e_forward->in_node = (uint64_t)-1;
        e_forward->out_node = (uint64_t)-1;
        e_forward->weight = (uint64_t)-1;
        e_forward->length = (uint64_t)-1;
        e_forward->num_insertions = (uint64_t)-1;
        e_forward->self_edge_ID = (uint64_t)-1;
        e_forward->reverse_edge_ID = (uint64_t)-1;


        e_backward->in_node = (uint64_t)-1;
        e_backward->out_node = (uint64_t)-1;
        e_backward->weight = (uint64_t)-1;
        e_backward->length = (uint64_t)-1;
        e_backward->num_insertions = (uint64_t)-1;
        e_backward->self_edge_ID = (uint64_t)-1;
        e_backward->reverse_edge_ID = (uint64_t)-1;

        return 1;
    }
    else
    {
        return 0;
    }
}

// Assembly:
movq 0x8(%rsi), %rdx
cmpq $-0x1, %rdx
je 0x45042
movq (%rsi), %r9
movq 0x28(%rsi), %r8
movq 0x18(%rdi), %rax
movq %r9, %rcx
shlq $0x7, %rcx
leaq (%rax,%rcx), %rdi
addq $0x40, %rdi
cmpq 0x10(%rdi), %r8
jae 0x44fdf
movq (%rdi), %rcx
imulq $0x38, %r8, %r10
cmpq %r9, (%rcx,%r10)
jne 0x44fdf
addq %r10, %rcx
cmpq %rdx, 0x8(%rcx)
jne 0x44fdf
shlq $0x7, %rdx
imulq $0x38, 0x30(%rsi), %rsi
jmp 0x44fef
imulq $0x38, 0x30(%rsi), %rcx
addq (%rdi), %rcx
shlq $0x7, %rdx
imulq $0x38, %r8, %rsi
addq 0x60(%rax,%rdx), %rsi
movq (%rcx), %rdx
shlq $0x7, %rdx
incq 0x58(%rax,%rdx)
movq 0x8(%rcx), %rdx
shlq $0x7, %rdx
incq 0x78(%rax,%rdx)
movq $-0x1, %rax
movq %rax, 0x30(%rcx)
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x20(%rcx)
movdqu %xmm0, 0x10(%rcx)
movdqu %xmm0, (%rcx)
movq %rax, 0x30(%rsi)
movdqu %xmm0, 0x20(%rsi)
movdqu %xmm0, 0x10(%rsi)
movdqu %xmm0, (%rsi)
movl $0x1, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/POA.cpp
// Function: destory_Node_alloc(Node_alloc*)
void destory_Node_alloc(Node_alloc* list)
{
	uint64_t i;
	for (i = 0; i < list->size; i++) {
		destory_Edge_alloc(&list->list[i].deletion_edges);
		destory_Edge_alloc(&list->list[i].insertion_edges);
		destory_Edge_alloc(&list->list[i].mismatch_edges);
	}
	free(list->list);
	free(list->sort.list);
	free(list->sort.visit);
	free(list->sort.iterative_buffer);
	free(list->sort.iterative_buffer_visit);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x40(%rdi)
je 0x450db
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rbx), %rax
movq 0x40(%rax,%r14), %rdi
testq %rdi, %rdi
je 0x450aa
callq 0x2220
movq (%rbx), %rax
movq 0x60(%rax,%r14), %rdi
testq %rdi, %rdi
je 0x450bc
callq 0x2220
movq (%rbx), %rax
movq 0x20(%rax,%r14), %rdi
testq %rdi, %rdi
je 0x450ce
callq 0x2220
incq %r15
subq $-0x80, %r14
cmpq 0x40(%rbx), %r15
jb 0x45098
movq (%rbx), %rdi
callq 0x2220
movq 0x8(%rbx), %rdi
callq 0x2220
movq 0x10(%rbx), %rdi
callq 0x2220
movq 0x28(%rbx), %rdi
callq 0x2220
movq 0x30(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/POA.cpp
// Function: clear_Node_alloc(Node_alloc*)
void clear_Node_alloc(Node_alloc* list)
{
	uint64_t i =0;
	for (i = 0; i < list->length; i++) { // TODO: is this list->size or list->length? The original version is list->length.
		clear_Edge_alloc(&list->list[i].insertion_edges);
		clear_Edge_alloc(&list->list[i].mismatch_edges);
		clear_Edge_alloc(&list->list[i].deletion_edges);
	}
	list->length = 0;
	list->delete_length = 0;
}

// Assembly:
cmpq $0x0, 0x48(%rdi)
je 0x4513f
xorl %eax, %eax
xorps %xmm0, %xmm0
xorl %ecx, %ecx
movq (%rdi), %rdx
movups %xmm0, 0x70(%rdx,%rax)
movq (%rdi), %rdx
movups %xmm0, 0x30(%rdx,%rax)
movq (%rdi), %rdx
movups %xmm0, 0x50(%rdx,%rax)
incq %rcx
subq $-0x80, %rax
cmpq 0x48(%rdi), %rcx
jb 0x4511a
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/POA.cpp
// Function: append_Node_alloc(Node_alloc*, char)
uint64_t append_Node_alloc(Node_alloc* list, char base)
{
	if (list->length + 1 > list->size) {
		uint64_t old_size = list->size;
		list->size = list->size * 2;
		list->list = (Node*)realloc(list->list, sizeof(Node) * list->size);
		memset(&list->list[old_size], 0, (list->size - old_size) * sizeof(Node));
	}

	list->list[list->length].ID = list->length;
	list->list[list->length].base = base;
	list->list[list->length].weight = 1;
	list->list[list->length].num_insertions = 0;
	init_Edge_alloc(&list->list[list->length].deletion_edges);
	init_Edge_alloc(&list->list[list->length].insertion_edges);
	init_Edge_alloc(&list->list[list->length].mismatch_edges);

	list->length++;

	return list->length - 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq 0x40(%rdi), %r14
movq 0x48(%rdi), %rax
incq %rax
cmpq %r14, %rax
jbe 0x45196
leaq (%r14,%r14), %rax
movq %rax, 0x40(%rbx)
movq (%rbx), %rdi
movq %r14, %rsi
shlq $0x8, %rsi
callq 0x2370
movq %rax, (%rbx)
movq %r14, %rdi
shlq $0x7, %rdi
addq %rax, %rdi
movq 0x40(%rbx), %rdx
subq %r14, %rdx
shlq $0x7, %rdx
xorl %esi, %esi
callq 0x20e0
movq (%rbx), %rax
movq 0x48(%rbx), %rcx
movq %rcx, %rdx
shlq $0x7, %rdx
leaq (%rax,%rdx), %r14
addq $0x40, %r14
movq %rcx, -0x40(%r14)
movb %bpl, -0x28(%r14)
movq $0x1, -0x38(%r14)
movq $0x0, -0x30(%r14)
cmpq $0x0, (%r14)
je 0x451d4
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
jmp 0x451f1
movq $0x32, 0x8(%r14)
movl $0xaf0, %edi            # imm = 0xAF0
callq 0x2280
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movq %rax, (%r14)
movq (%rbx), %rax
movq 0x48(%rbx), %rcx
shlq $0x7, %rcx
leaq (%rax,%rcx), %r14
addq $0x60, %r14
cmpq $0x0, (%r14)
je 0x45211
movups %xmm0, 0x10(%r14)
jmp 0x4522e
movq $0x32, 0x8(%r14)
movl $0xaf0, %edi            # imm = 0xAF0
callq 0x2280
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movq %rax, (%r14)
movq (%rbx), %rax
movq 0x48(%rbx), %rcx
shlq $0x7, %rcx
leaq (%rax,%rcx), %r14
addq $0x20, %r14
cmpq $0x0, (%r14)
je 0x4524e
movups %xmm0, 0x10(%r14)
jmp 0x4526b
movq $0x32, 0x8(%r14)
movl $0xaf0, %edi            # imm = 0xAF0
callq 0x2280
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movq %rax, (%r14)
movq 0x48(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x48(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/POA.cpp
// Function: init_Graph(Graph*)
void init_Graph(Graph* g)
{
    init_Node_alloc(&g->g_nodes);
    g->g_n_edges = 0;
    g->g_n_nodes = 0;
    g->g_next_nodeID = 0;
    g->s_end_nodeID = 0;
    g->s_start_nodeID = 0;
    g->seq = NULL;
    g->seqID = (uint64_t)-1;

    init_Queue(&(g->node_q));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x18(%rdi)
xorl %r14d, %r14d
movq %r14, 0x68(%rdi)
movq $0x3e80, 0x58(%rdi)     # imm = 0x3E80
movl $0x3e80, %edi           # imm = 0x3E80
movl $0x80, %esi
callq 0x2120
movq %rax, 0x18(%rbx)
movq %r14, 0x98(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %r14, 0x10(%rbx)
movups %xmm0, 0xa8(%rbx)
movq $-0x1, 0xa0(%rbx)
movups %xmm0, 0x70(%rbx)
movq %r14, 0x80(%rbx)
movq $0x14, 0x88(%rbx)
movl $0xa0, %edi
callq 0x2280
movq %rax, 0x90(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/POA.cpp
// Function: clear_Graph(Graph*)
void clear_Graph(Graph* g)
{
    clear_Node_alloc(&g->g_nodes);

    g->g_n_edges = 0;
    g->g_n_nodes = 0;
    g->g_next_nodeID = 0;
    g->s_end_nodeID = 0;
    g->s_start_nodeID = 0;
    g->seq = NULL;
    g->seqID = (uint64_t)-1;

    clear_Queue(&(g->node_q));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x18, %rdi
callq 0x4510c
xorl %eax, %eax
movq %rax, 0x98(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rax, 0x10(%rbx)
movups %xmm0, 0xa8(%rbx)
movq $-0x1, 0xa0(%rbx)
movups %xmm0, 0x70(%rbx)
movq %rax, 0x80(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/POA.cpp
// Function: addUnmatchedSeqToGraph(Graph*, char*, long long, long long*, long long*)
void addUnmatchedSeqToGraph(Graph* g, char* g_read_seq, long long g_read_length, long long* startID, long long* endID)
{
    long long firstID, lastID, nodeID, i;
    firstID = -1;
    lastID = -1;

    if(g_read_length == 0)
        return;

    ///start node
    nodeID  = add_Node_Graph(g, 'S');
    firstID = nodeID;
    lastID = nodeID;


    for (i = 0; i < g_read_length; i++)
    {
        nodeID = add_Node_Graph(g, g_read_seq[i]);
        
        if (firstID == -1)
        {
            firstID = nodeID;
        }
        if (lastID != -1)
        {
            ///the legnth of match edge is 0, while the length of musmatch is 1
            append_Edge_alloc(&(g->g_nodes.list[lastID].mismatch_edges), lastID, nodeID, 1, 0);
        }

        lastID = nodeID; 
    }

    *startID = firstID;
    *endID = lastID;

    g->s_start_nodeID = firstID;
    g->s_end_nodeID = lastID;
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, 0x20(%rsp)
testq %rdx, %rdx
je 0x45433
movq %rdx, %r12
movq %rcx, 0x8(%rsp)
movq %r8, 0x18(%rsp)
movq %rdi, 0x10(%rsp)
leaq 0x18(%rdi), %rbp
movq %rbp, %rdi
movl $0x53, %esi
callq 0x45147
movq %rax, %rbx
testq %r12, %r12
jle 0x4540a
xorl %r13d, %r13d
movq %rbx, %r14
movq 0x20(%rsp), %rax
movsbl (%rax,%r13), %esi
movq %rbp, %rdi
callq 0x45147
movq %rax, %r15
cmpq $-0x1, %r14
cmoveq %rax, %r14
cmpq $-0x1, %rbx
je 0x453fd
movq (%rbp), %rax
movq %rbx, %rcx
shlq $0x7, %rcx
leaq (%rax,%rcx), %rdi
addq $0x20, %rdi
movl $0x1, %ecx
movq %rbx, %rsi
movq %r15, %rdx
xorl %r8d, %r8d
callq 0x44c37
incq %r13
movq %r15, %rbx
cmpq %r13, %r12
jne 0x453b4
jmp 0x45410
movq %rbx, %r14
movq %rbx, %r15
movq 0x8(%rsp), %rax
movq %r14, (%rax)
movq 0x18(%rsp), %rax
movq %r15, (%rax)
movq 0x10(%rsp), %rax
movq %r14, 0xa8(%rax)
movq %r15, 0xb0(%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: clear_Round2_alignment(Round2_alignment*)
void clear_Round2_alignment(Round2_alignment* h)
{
    clear_Correct_dumy_pure(&(h->dumy));
    clear_Cigar_record(&(h->cigar));
    clear_Cigar_record(&(h->tmp_cigar));
    h->obtained_cigar_length = 0;
}

// Assembly:
xorl %eax, %eax
movq %rax, 0x48(%rdi)
movq %rax, 0x20(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movaps %xmm0, 0x30(%rdi)
movl %eax, 0x8da0(%rdi)
movq %rax, 0x8d98(%rdi)
movq %rax, 0x8db8(%rdi)
movl %eax, 0x8d84(%rdi)
movb $0x7f, %cl
movb %cl, 0x8d80(%rdi)
movl %eax, 0x8de0(%rdi)
movq %rax, 0x8dd8(%rdi)
movups %xmm0, 0x8df8(%rdi)
movl %eax, 0x8dc4(%rdi)
movb %cl, 0x8dc0(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: init_Round2_alignment(Round2_alignment*)
void init_Round2_alignment(Round2_alignment* h)
{
    init_Correct_dumy(&(h->dumy));
    init_Cigar_record(&(h->cigar));
    init_Cigar_record(&(h->tmp_cigar));
    h->obtained_cigar_length = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x7d80, %rdi           # imm = 0x7D80
xorl %r14d, %r14d
movl $0x1000, %edx           # imm = 0x1000
xorl %esi, %esi
callq 0x20e0
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
movups %xmm0, 0x38(%rbx)
movq %r14, 0x48(%rbx)
movq $0x3e8, 0x18(%rbx)      # imm = 0x3E8
movq %r14, 0x8(%rbx)
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x2280
movq %rax, (%rbx)
movq %r14, 0x20(%rbx)
leaq 0x8d80(%rbx), %rdi
callq 0x480dc
leaq 0x8dc0(%rbx), %rdi
callq 0x480dc
movq %r14, 0x8e00(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: init_Correct_dumy(Correct_dumy*)
void init_Correct_dumy(Correct_dumy* list)
{
    list->size = 0;
    list->length = 0;
    list->lengthNT = 0;
    list->start_i = 0;
    list->overlapID = NULL;
    int i;
    for (i = 0; i < 256; i++)
	{
		list->Peq_SSE[i] = _mm_setzero_si128();
	}


    list->corrected_read_size = 1000;
    list->corrected_read_length = 0;
    list->corrected_read = (char*)malloc(sizeof(char)*list->corrected_read_size);
    list->corrected_base = 0;

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x7d80, %rdi           # imm = 0x7D80
xorl %r14d, %r14d
movl $0x1000, %edx           # imm = 0x1000
xorl %esi, %esi
callq 0x20e0
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
movups %xmm0, 0x38(%rbx)
movq %r14, 0x48(%rbx)
movq $0x3e8, 0x18(%rbx)      # imm = 0x3E8
movq %r14, 0x8(%rbx)
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x2280
movq %rax, (%rbx)
movq %r14, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: init_Cigar_record(Cigar_record*)
void init_Cigar_record(Cigar_record* dummy)
{
    dummy->length = 0;
    dummy->size = 100;
    dummy->record = (uint32_t*)malloc(sizeof(uint32_t)*dummy->size);


    dummy->lost_base_length = 0;
    dummy->lost_base_size = 100;
    dummy->lost_base = (char*)malloc(sizeof(char)*dummy->lost_base_size);



    dummy->current_operation_length = 0;
    dummy->current_operation = 127;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
movq %r14, 0x18(%rdi)
movl $0x64, %r15d
movq %r15, 0x10(%rdi)
movl $0x190, %edi            # imm = 0x190
callq 0x2280
movq %rax, 0x8(%rbx)
movq %r14, 0x38(%rbx)
movq %r15, 0x30(%rbx)
movl $0x64, %edi
callq 0x2280
movq %rax, 0x28(%rbx)
movl $0x0, 0x4(%rbx)
movb $0x7f, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: init_Round2_alignment_buf(Round2_alignment*, void*)
void init_Round2_alignment_buf(Round2_alignment* h, void *km)
{
    init_Correct_dumy_buf(&(h->dumy), km);
    init_Cigar_record_buf(&(h->cigar), km);
    init_Cigar_record_buf(&(h->tmp_cigar), km);
    h->obtained_cigar_length = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x8dc0, %edx           # imm = 0x8DC0
xorl %esi, %esi
callq 0x20e0
movb $0x7f, %al
movb %al, 0x8d80(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8dc0(%rbx)
movups %xmm0, 0x8dd0(%rbx)
movups %xmm0, 0x8de0(%rbx)
movups %xmm0, 0x8df0(%rbx)
movb %al, 0x8dc0(%rbx)
movq $0x0, 0x8e00(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: print_string(char*, int)
void print_string(char* s, int l)
{
    int i;
    for (i = 0; i < l; i++)
    {
        fprintf(stderr, "%c", s[i]);
    }

    fprintf(stderr, "\n");
    
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testl %esi, %esi
jle 0x4823a
movq %rdi, %rbx
movl %esi, %r14d
xorl %r15d, %r15d
movq 0x241dbc(%rip), %r12    # 0x289fe0
movq (%r12), %rsi
movsbl (%rbx,%r15), %edi
callq 0x2270
incq %r15
cmpq %r15, %r14
jne 0x48224
movq 0x241d9f(%rip), %rax    # 0x289fe0
movq (%rax), %rsi
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2270
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/./Hash_Table.h
// Function: y_start_offset(long long, Fake_Cigar*)
static inline long long y_start_offset(long long x_start, Fake_Cigar* o)
{
    if(x_start == get_fake_gap_pos(o, o->length - 1))
    {
        return get_fake_gap_shift(o, o->length - 1);
    }
    
    long long i;
    for (i = 0; i < (long long)o->length; i++)
    {
        if(x_start < get_fake_gap_pos(o, i))
        {
            break;
        }
    }

    if(i == 0 || i == (long long)o->length)
    {
        fprintf(stderr, "ERROR at %s:%d\n", __FILE__, __LINE__);
        exit(0);
    }

    ///note here return i - 1
    return get_fake_gap_shift(o, i - 1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movl 0x8(%rsi), %esi
decl %esi
movq %rbx, %rdi
callq 0x3dc2f
cltq
movl 0x8(%rbx), %r14d
cmpq %r15, %rax
je 0x48e50
testl %r14d, %r14d
je 0x48e40
xorl %r14d, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x3dc2f
cltq
cmpq %r15, %rax
jg 0x48e43
incq %r14
movl 0x8(%rbx), %eax
cmpq %rax, %r14
jb 0x48e21
jmp 0x48e43
xorl %r14d, %r14d
testq %r14, %r14
je 0x48e66
movl 0x8(%rbx), %eax
cmpq %rax, %r14
je 0x48e66
decl %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x3dc3a
cltq
popq %rbx
popq %r14
popq %r15
retq
callq 0x568c
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: init_waln(long, long, long, long, long*, long*, long*, long*)
int32_t init_waln(int64_t err, int64_t s, int64_t l, int64_t w_l, int64_t* aux_beg, int64_t* aux_end, int64_t* r_s, int64_t* r_l)
{
    (*aux_beg) = (*aux_end) = (*r_s) = (*r_l) = -1;
    ///since w_l == x_len + (err << 1)
    if((s < 0) || (s >= l) || ((l-s+(2*err)+THRESHOLD_MAX_SIZE) < w_l)) return 0;
    (*aux_beg) = (*aux_end) = 0;
    ///s might be less than 0
    (*r_s) = s - err; 
    (*r_l) = l-(*r_s); if((*r_l) > w_l) (*r_l) = w_l;
    (*aux_end) = w_l - (*r_l);

    if ((*r_s) < 0) {
        (*aux_beg) = -(*r_s); (*r_s) = 0; (*r_l) -= (*aux_beg);
    }
    return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
movq 0x20(%rsp), %r10
movq 0x18(%rsp), %r11
movq $-0x1, %rax
movq %rax, (%r10)
movq %rax, (%r11)
movq %rax, (%r9)
movq %rax, (%r8)
testq %rsi, %rsi
sets %bl
cmpq %rdx, %rsi
setge %bpl
xorl %eax, %eax
orb %bl, %bpl
jne 0x49866
leaq (%rdi,%rdi), %rbx
subq %rsi, %rbx
addq %rdx, %rbx
addq $0x1f, %rbx
cmpq %rcx, %rbx
jl 0x49866
xorl %eax, %eax
movq %rax, (%r9)
movq %rax, (%r8)
subq %rdi, %rsi
movq %rsi, (%r11)
subq %rsi, %rdx
cmpq %rcx, %rdx
cmovgeq %rcx, %rdx
movq %rdx, (%r10)
subq %rdx, %rcx
movq %rcx, (%r9)
movq (%r11), %rcx
movl $0x1, %eax
testq %rcx, %rcx
jns 0x49866
negq %rcx
movq %rcx, (%r8)
movq $0x0, (%r11)
movq (%r8), %rcx
subq %rcx, (%r10)
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: get_init_paras(All_reads*, ul_idx_t const*, overlap_region*, long, long, double, long, long*, long*, long*, long*)
uint32_t get_init_paras(All_reads* rref, const ul_idx_t *uref, overlap_region *z, int64_t x_s, int64_t x_e, double e_rate, int64_t block_s, 
                        int64_t *r_ys, int64_t *r_ex_beg, int64_t *r_ex_end, int64_t *r_err_thre)
{
    int e, ex_beg, ex_end; long long y_s, o_len, Window_Len;
    e = get_init_err_thres(x_e+1-x_s, e_rate, block_s, rref?THRESHOLD:THRESHOLD_MAX_SIZE);
    y_s = (x_s-z->x_pos_s) + z->y_pos_s; y_s += y_start_offset(x_s, &(z->f_cigar));
    Window_Len = (x_e+1-x_s) + (e<<1);

    if(!determine_overlap_region(e, y_s, z->y_id, Window_Len, (rref?(Get_READ_LENGTH((*rref), z->y_id)):(uref->ug->u.a[z->y_id].len)),
    &ex_beg, &ex_end, &y_s, &o_len)) {
        return 0;
    }
    (*r_ys) = y_s; (*r_ex_beg) = ex_beg; (*r_ex_end) = ex_end; (*r_err_thre) = e;
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rdx, %r12
movq %rsi, (%rsp)
movq %rdi, %r15
subq %rcx, %rbx
incq %rbx
xorl %r13d, %r13d
testq %rdi, %rdi
sete %al
cmpq %r9, %rbx
jge 0x49f2f
cvtsi2sd %rbx, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
cmpq $0x1f, %rax
movl $0x1f, %edx
cmovlq %rax, %rdx
testq %rax, %rax
movl $0x1, %r13d
cmovneq %rdx, %r13
cmpq $0x4, %rbx
cmovlq %rdx, %r13
jmp 0x49f3a
movb %al, %r13b
shll $0x4, %r13d
orq $0xf, %r13
movl 0x4(%r12), %eax
movl 0x14(%r12), %ebp
movq %rcx, %r14
subq %rax, %r14
leaq 0x38(%r12), %rsi
movq %rcx, %rdi
callq 0x48df6
addq %rbp, %rax
addq %r14, %rax
movl 0x10(%r12), %ecx
testq %r15, %r15
je 0x49f71
movq 0x18(%r15), %rdx
movq (%rdx,%rcx,8), %rsi
jmp 0x49f89
movq (%rsp), %rdx
movq (%rdx), %rdx
movq 0x10(%rdx), %rdx
leaq (%rcx,%rcx,4), %rcx
movl (%rdx,%rcx,8), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
xorl %ecx, %ecx
movb $0x1, %dl
testq %rax, %rax
js 0x49fb4
cmpq %rax, %rsi
jle 0x49fb4
leal (,%r13,2), %edi
movslq %edi, %rdi
addq %rdi, %rbx
subq %rax, %rdi
addq %rsi, %rdi
addq $0x1f, %rdi
cmpq %rbx, %rdi
jge 0x49fba
xorl %esi, %esi
xorl %edi, %edi
jmp 0x49ff2
movslq %r13d, %rdx
subq %rdx, %rax
subq %rax, %rsi
cmpq %rbx, %rsi
cmovgeq %rbx, %rsi
subl %esi, %ebx
xorl %edx, %edx
testq %rax, %rax
movl $0x0, %r8d
cmovgq %rax, %r8
movl %eax, %esi
negl %esi
movslq %esi, %rsi
sarq $0x3f, %rax
movq %rax, %rdi
andq %rsi, %rdi
movslq %ebx, %rsi
movq %r8, %rax
testb %dl, %dl
jne 0x4a01e
movq 0x58(%rsp), %rcx
movq 0x50(%rsp), %rdx
movq 0x48(%rsp), %r8
movq 0x40(%rsp), %r9
movq %rax, (%r9)
movq %rdi, (%r8)
movq %rsi, (%rdx)
movslq %r13d, %rax
movq %rax, (%rcx)
movl $0x1, %ecx
movl %ecx, %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/Correct.cpp
// Function: check_coverage_gap(unsigned long*, unsigned long, unsigned long, long)
int64_t check_coverage_gap(uint64_t *v_idx, uint64_t w_s, uint64_t w_e, int64_t block_s)
{
    int64_t wid = w_s/block_s, a_n = (uint32_t)(v_idx[wid]), k;
    uint64_t *a = v_idx + (v_idx[wid]>>32);
    for (k = 0; k < a_n; k++) {
        if(((a[k]>>32) == w_s) && (((uint32_t)(a[k])) == w_e)) return 1;
    }
    return 0;
}

// Assembly:
movq %rdx, %r8
xorl %r9d, %r9d
movq %rsi, %rax
xorl %edx, %edx
divq %rcx
movq (%rdi,%rax,8), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
andq %rcx, %rax
je 0x4a07e
shrq $0x20, %rcx
leaq (%rdi,%rcx,8), %rcx
xorl %r9d, %r9d
xorl %edx, %edx
movq (%rcx,%rdx,8), %rdi
movl %edi, %r10d
shrq $0x20, %rdi
xorq %rsi, %rdi
xorq %r8, %r10
orq %rdi, %r10
je 0x4a078
incq %rdx
cmpq %rdx, %rax
jne 0x4a058
jmp 0x4a07e
movl $0x1, %r9d
movq %r9, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: get_adjust_winid(overlap_region*, long, long)
int64_t get_adjust_winid(overlap_region *z, int64_t win_beg, int64_t win_len)
{   
    int64_t win_id, k;
    win_id = (win_beg-((z->x_pos_s/win_len)*win_len))/win_len;
    if((uint64_t)win_id < z->w_list.n && z->w_list.a[win_id].x_start == win_beg) return win_id;
    if(z->w_list.n == 0) return -1;
    // if(z->w_list.a[win_id].x_start <= win_beg) {
    //     fprintf(stderr, "z->w_list.n::%u, z->w_list.a[%ld].x_start::%d, win_beg::%ld\n", 
    //     (uint32_t)z->w_list.n, win_id, z->w_list.a[win_id].x_start, win_beg);
    // }
    if((uint64_t)win_id > z->w_list.n) win_id = z->w_list.n;
    // assert((z->w_list.a[win_id].x_start > win_beg);
    for (k = win_id - 1; k >= 0; k--) {
        // if(k < 0 || k >= (int64_t)z->w_list.n) fprintf(stderr, "win_id::%ld, k::%ld, z->w_list.n::%ld\n", win_id, k, (int64_t)z->w_list.n);
        if(z->w_list.a[k].x_start == win_beg) return k;
        if(z->w_list.a[k].x_start < win_beg) return -1;
    }
    return -1;
}

// Assembly:
movq %rdx, %rcx
movl 0x4(%rdi), %r8d
movq %r8, %rax
xorl %edx, %edx
idivq %rcx
leaq (%rdx,%rsi), %rax
subq %r8, %rax
cqto
idivq %rcx
movq %rax, %rcx
movq 0x48(%rdi), %rdx
cmpq %rdx, %rax
jae 0x4b64d
movq 0x58(%rdi), %rax
movq %rcx, %r8
shlq $0x5, %r8
movslq (%rax,%r8), %r8
movq %rcx, %rax
cmpq %rsi, %r8
je 0x4b689
movq $-0x1, %rax
testq %rdx, %rdx
je 0x4b689
cmpq %rdx, %rcx
cmovbq %rcx, %rdx
movq %rdx, %rcx
shlq $0x5, %rcx
addq $-0x20, %rcx
testq %rdx, %rdx
jle 0x4b689
movq 0x58(%rdi), %r8
movslq (%r8,%rcx), %r8
cmpq %rsi, %r8
je 0x4b68a
addq $-0x20, %rcx
decq %rdx
cmpq %rsi, %r8
jge 0x4b66b
retq
decq %rdx
movq %rdx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: cmp_snp_stats(void const*, void const*)
int cmp_snp_stats(const void * a, const void * b)
{
    if ((*(SnpStats*)a).score != (*(SnpStats*)b).score)
    {
        return (*(SnpStats*)a).score < (*(SnpStats*)b).score ? 1 : -1; 
    }
    else
    {
        if ((*(SnpStats*)a).occ_2 != (*(SnpStats*)b).occ_2)
        {
            return (*(SnpStats*)a).occ_2 > (*(SnpStats*)b).occ_2 ? 1 : -1; 
        }
        else
        {
            return 0;
        }   
    }
}

// Assembly:
movl 0x1c(%rsi), %eax
cmpl %eax, 0x1c(%rdi)
jne 0x50b86
movl 0x10(%rdi), %ecx
movl 0x10(%rsi), %edx
xorl %eax, %eax
cmpl %edx, %ecx
je 0x50b85
xorl %eax, %eax
cmpl %ecx, %edx
adcl $-0x1, %eax
orl $0x1, %eax
retq
setl %al
movzbl %al, %eax
leal -0x1(,%rax,2), %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: add_to_result_snp_vector(haplotype_evdience_alloc*, signed char*, int)
void add_to_result_snp_vector(haplotype_evdience_alloc* hap, int8_t *new_vector, int Len)
{
    int8_t *r_vector = Get_Result_SNP_Vector((*hap));
    int j;
    for (j = 0; j < Len; j++)
    {
        if(r_vector[j] == -1)
        {
            if(new_vector[j] == 0)
            {
                hap->result_stat.occ_0++;
                r_vector[j] = new_vector[j];
            }
            else if(new_vector[j] == 1)
            {
                hap->result_stat.occ_1++;
                r_vector[j] = new_vector[j];
            }
        }
        ///can debug here
    }

    hap->result_stat.overlap_num = hap->result_stat.occ_0 + hap->result_stat.occ_1;
}

// Assembly:
testl %edx, %edx
jle 0x50dae
movq 0x1e0(%rdi), %rax
leaq 0x1f8(%rdi), %rcx
leaq 0x1f4(%rdi), %r8
movl %edx, %edx
xorl %r9d, %r9d
cmpb $-0x1, (%rax,%r9)
jne 0x50da6
movzbl (%rsi,%r9), %r10d
movq %r8, %r11
testl %r10d, %r10d
je 0x50d9b
cmpl $0x1, %r10d
jne 0x50da6
movq %rcx, %r11
incl (%r11)
movb (%rsi,%r9), %r10b
movb %r10b, (%rax,%r9)
incq %r9
cmpq %r9, %rdx
jne 0x50d7e
movl 0x1f8(%rdi), %eax
addl 0x1f4(%rdi), %eax
movl %eax, 0x1f0(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: debug_add_to_result_snp_vector(haplotype_evdience_alloc*, signed char*, int)
int debug_add_to_result_snp_vector(haplotype_evdience_alloc* hap, int8_t *new_vector, int Len)
{
    int8_t *r_vector = Get_Result_SNP_Vector((*hap));
    int j;
    for (j = 0; j < Len; j++)
    {
        if(r_vector[j] == -1)
        {
            if(new_vector[j] == 0)
            {
                hap->result_stat.occ_0++;
                r_vector[j] = new_vector[j];
            }
            else if(new_vector[j] == 1)
            {
                hap->result_stat.occ_1++;
                r_vector[j] = new_vector[j];
            }
        }
        else ///can debug here
        {
            ///if((new_vector[j] != -1 && new_vector[j] != 2 && new_vector[j] != r_vector[j]))
            if((new_vector[j] == 0 || new_vector[j] == 1) && new_vector[j] != r_vector[j])
            {
                return j;
            }
        }
    }

    return -1;

}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %edx, %edx
jle 0x50e32
pushq %rbx
movq 0x1e0(%rdi), %rcx
leaq 0x1f8(%rdi), %r8
addq $0x1f4, %rdi            # imm = 0x1F4
movl %edx, %r9d
xorl %edx, %edx
movb (%rcx,%rdx), %r11b
movzbl (%rsi,%rdx), %r10d
cmpb $-0x1, %r11b
je 0x50e09
cmpb $0x2, %r10b
setae %bl
cmpb %r11b, %r10b
sete %r10b
orb %bl, %r10b
jne 0x50e25
jmp 0x50e2f
movq %rdi, %r11
testl %r10d, %r10d
je 0x50e1a
movq %r8, %r11
cmpl $0x1, %r10d
jne 0x50e25
incl (%r11)
movb (%rsi,%rdx), %r10b
movb %r10b, (%rcx,%rdx)
incq %rdx
cmpq %rdx, %r9
jne 0x50de5
jmp 0x50e31
movl %edx, %eax
popq %rbx
retq