LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Process_Read.cpp
// Function: push_subblock_original_bases(char*, all_ul_t*, ul_vec_t*, unsigned int, unsigned int, unsigned int)
void push_subblock_original_bases(char* str, all_ul_t *x, ul_vec_t *p, uint32_t s, uint32_t e, uint32_t subLen)//for debug
{
	uc_block_t *b = NULL;
	uint32_t qs = s, qe = e;
	while (qs < e) {
		qe = qs + subLen; if(qe > e) qe = e;
		kv_pushp(uc_block_t, p->bb, &b);
		b->hid = (uint32_t)-1; b->rev = 0;
		b->qs = qs; b->qe = qe;
		b->ts = p->r_base.n; b->te = b->ts + B4L(b->qe - b->qs);
		kv_resize(uint8_t, p->r_base, b->te); p->r_base.n = b->te;
		ha_encode_base(p->r_base.a+b->ts, str+b->qs, b->qe-b->qs, &(p->N_site), b->qs);

		qs = qe;
	}	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movl %r8d, %ebp
movl %ecx, %r13d
movq %rdx, %r14
movq %rdi, 0x8(%rsp)
leaq 0x38(%rdx), %r12
cmpl %ebp, %r13d
jae 0x81b9
movq 0x10(%rsp), %rax
leal (%rax,%r13), %r15d
cmpl %ebp, %r15d
cmovael %ebp, %r15d
movq 0x20(%r14), %rax
movq 0x30(%r14), %rbx
cmpq 0x28(%r14), %rax
jne 0x80ed
leaq (%rax,%rax), %rcx
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %rcx
movq %rcx, 0x28(%r14)
imulq $0x24, %rcx, %rsi
movq %rbx, %rdi
callq 0x2370
movq %rax, %rbx
movq %rax, 0x30(%r14)
movq 0x20(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x20(%r14)
imulq $0x24, %rax, %rdi
orl $-0x1, (%rbx,%rdi)
andb $-0x21, 0x20(%rbx,%rdi)
movl %r13d, 0x4(%rbx,%rdi)
movl %r15d, 0x8(%rbx,%rdi)
movl (%r14), %esi
movl %esi, 0xc(%rbx,%rdi)
movl %r15d, %edx
subl %r13d, %edx
movl %edx, %ecx
shrl $0x2, %ecx
movl %edx, %eax
andl $0x3, %eax
cmpl $0x1, %eax
sbbl $-0x1, %ecx
addl %esi, %ecx
movl %ecx, 0x10(%rbx,%rdi)
movq 0x10(%r14), %rax
cmpq %rcx, 0x8(%r14)
jae 0x8193
addq %rdi, %rbx
decq %rcx
movq %rcx, %rdx
shrq %rdx
orq %rcx, %rdx
movq %rdx, %rcx
shrq $0x2, %rcx
orq %rdx, %rcx
movq %rcx, %rdx
shrq $0x4, %rdx
orq %rcx, %rdx
movq %rdx, %rcx
shrq $0x8, %rcx
orq %rdx, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x8(%r14)
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%r14)
movl 0x10(%rbx), %ecx
movl 0xc(%rbx), %esi
movl 0x4(%rbx), %r13d
movl 0x8(%rbx), %edx
subl %r13d, %edx
movq %rcx, (%r14)
movl %esi, %edi
addq %rax, %rdi
movl %r13d, %r8d
movq 0x8(%rsp), %rax
leaq (%rax,%r8), %rsi
movl %edx, %edx
movq %r12, %rcx
callq 0x7dde
movl %r15d, %r13d
jmp 0x809d
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/Process_Read.cpp
// Function: retrieve_u_cov(ul_idx_t const*, unsigned long, unsigned char, unsigned long, unsigned char, long*)
uint32_t retrieve_u_cov(const ul_idx_t *ul, uint64_t id, uint8_t strand, uint64_t pos, uint8_t dir, int64_t *pi)
{
	uint64_t *a = ul->cc->interval.a + ul->cc->idx[id], cc = 0, ff = 0;
	int64_t a_n = ul->cc->idx[id+1]-ul->cc->idx[id], k = 0, cc_i = pi? *pi:0;
	if(a_n == 0) return 0;
	if(cc_i + 1 >= a_n || cc_i < 0) cc_i = 0;
	if(strand) pos = ul->ug->u.a[id].len - pos - 1;
	if(dir == 0) {
		for (k = cc_i; k + 1 < a_n; k++) {
			if(pos>=(a[k]>>32) && pos<(a[k+1]>>32)) {
				cc = (uint32_t)a[k];
				ff = 1;
				break;
			}
		}

		if(ff == 0) {
			for (k = 0; k < cc_i; k++) {
					if(pos>=(a[k]>>32) && pos<(a[k+1]>>32)) {
					cc = (uint32_t)a[k];
					ff = 1;
					break;
				}
			}
		}
	} else {
		for (k = cc_i; k >= 0; k--) {
			if(pos>=(a[k]>>32) && pos<(a[k+1]>>32)) {
				cc = (uint32_t)a[k];
				ff = 1;
				break;
			}
		}

		if(ff == 0) {
			for (k = cc_i+1; k + 1 < a_n; k++) {
				if(pos>=(a[k]>>32) && pos<(a[k+1]>>32)) {
					cc = (uint32_t)a[k];
					ff = 1;
					break;
				}
			}
		}
	}
	
	if(pi) *pi = ff?k:0;
	return cc;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x10(%rdi), %r14
movq (%r14), %rax
movl (%rax,%rsi,4), %ebx
movl 0x4(%rax,%rsi,4), %r11d
xorl %eax, %eax
testq %r9, %r9
je 0xa125
movq (%r9), %r10
jmp 0xa128
xorl %r10d, %r10d
cmpl %ebx, %r11d
je 0xa23a
subl %ebx, %r11d
leaq 0x1(%r10), %rax
xorl %r15d, %r15d
testq %r10, %r10
cmovleq %r15, %r10
cmpq %r11, %rax
cmovgeq %r15, %r10
testb %dl, %dl
je 0xa166
movq (%rdi), %rax
movq 0x10(%rax), %rax
imulq $0x28, %rsi, %rdx
movl (%rax,%rdx), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
notq %rcx
addq %rax, %rcx
movq 0x18(%r14), %rax
testb %r8b, %r8b
je 0xa1c8
leaq (%rax,%rbx,8), %rsi
movq %r10, %rdx
testq %rdx, %rdx
js 0xa19d
movq (%rsi,%rdx,8), %rax
movq %rax, %rdi
shrq $0x20, %rdi
cmpq %rdi, %rcx
jb 0xa198
movl 0xc(%rsi,%rdx,8), %edi
cmpq %rdi, %rcx
jb 0xa232
decq %rdx
jmp 0xa176
addq $0x2, %r10
xorl %edx, %edx
cmpq %r11, %r10
jae 0xa1fc
movq -0x8(%rsi,%r10,8), %rax
movq %rax, %rdi
shrq $0x20, %rdi
cmpq %rdi, %rcx
jb 0xa1c3
movl 0x4(%rsi,%r10,8), %edi
cmpq %rdi, %rcx
jb 0xa22c
incq %r10
jmp 0xa1a3
leaq (%rax,%rbx,8), %rsi
addq $0x8, %rsi
movq %r10, %rdx
leaq 0x1(%rdx), %rdi
cmpq %r11, %rdi
jae 0xa200
movq -0x8(%rsi,%rdx,8), %rax
movq %rax, %r8
shrq $0x20, %r8
cmpq %r8, %rcx
jb 0xa1f7
movl 0x4(%rsi,%rdx,8), %r8d
cmpq %r8, %rcx
jb 0xa232
movq %rdi, %rdx
jmp 0xa1d3
xorl %eax, %eax
jmp 0xa232
xorl %edx, %edx
cmpq %rdx, %r10
je 0xa226
movq -0x8(%rsi,%rdx,8), %rax
movq %rax, %rdi
shrq $0x20, %rdi
cmpq %rdi, %rcx
jb 0xa221
movl 0x4(%rsi,%rdx,8), %edi
cmpq %rdi, %rcx
jb 0xa232
incq %rdx
jmp 0xa202
xorl %eax, %eax
xorl %edx, %edx
jmp 0xa232
decq %r10
movq %r10, %rdx
testq %r9, %r9
je 0xa23a
movq %rdx, (%r9)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Process_Read.cpp
// Function: produce_u_seq(char*, ma_utg_t*, UC_Read*)
void produce_u_seq(char* r, ma_utg_t *u, UC_Read *buf)
{
	if(u->m == 0 || u->n == 0) return;
	uint32_t j, k, l = 0;
    uint32_t rId, ori, start, eLen, readLen;
	char *readS = NULL;
	memset(r, 'N', u->len);
	for (j = 0; j < u->n; ++j) {
		rId = u->a[j]>>33;
		///uId = i;
		ori = u->a[j]>>32&1;
		start = l;
		eLen = (uint32_t)u->a[j];
		l += eLen;

		if(eLen == 0) continue;
		recover_UC_Read(buf, &R_INF, rId);

		readS = buf->seq;
		readLen = Get_READ_LENGTH(R_INF, rId);
		
		if (!ori) // forward strand
		{
			for (k = 0; k < eLen; k++)
			{
				r[start + k] = readS[k];
			}
		}
		else
		{
			for (k = 0; k < eLen; k++)
			{
				uint8_t c = (uint8_t)readS[readLen - 1 - k];
				r[start + k] = c >= 128? 'N' : RC_CHAR(c);
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
cmpl $0x0, 0xc(%rsi)
je 0xa9fb
movq %rsi, %r12
cmpl $0x0, 0x10(%rsi)
je 0xa9fb
movq %rdi, %r15
movl (%r12), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
pushq $0x4e
popq %rsi
callq 0x20e0
xorl %ebp, %ebp
leaq 0x249910(%rip), %rbx    # 0x254230
xorl %r13d, %r13d
movq %r12, 0x8(%rsp)
movl 0x10(%r12), %eax
cmpq %rax, %rbp
jae 0xa9fb
movq 0x18(%r12), %rax
movq (%rax,%rbp,8), %r14
testl %r14d, %r14d
je 0xa9f0
movl %r13d, 0x4(%rsp)
movq %r14, %r13
shrq $0x21, %r13
movq 0x10(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x715e
movq (%r12), %rax
btq $0x20, %r14
movl %r14d, %ecx
jb 0xa99b
movl 0x4(%rsp), %r13d
movl %r13d, %edx
xorl %r9d, %r9d
movq 0x8(%rsp), %r12
cmpq %r9, %rcx
je 0xa9f0
movb (%rax,%r9), %dil
leal (%rdx,%r9), %r8d
movb %dil, (%r15,%r8)
incq %r9
jmp 0xa985
movq 0x18(%rbx), %rdx
movq (%rdx,%r13,8), %rdx
decq %rdx
movl 0x4(%rsp), %r13d
movl %r13d, %r9d
movq 0x8(%rsp), %r12
leaq 0x248c76(%rip), %r10    # 0x253630
leaq 0x248d74(%rip), %r11    # 0x253735
subq $0x1, %rcx
jb 0xa9f0
movl %edx, %edi
movsbq (%rax,%rdi), %rdi
testq %rdi, %rdi
js 0xa9de
movzbl (%rdi,%r10), %edi
movb (%rdi,%r11), %dil
jmp 0xa9e1
movb $0x4e, %dil
movl %r9d, %r8d
movb %dil, (%r15,%r8)
decq %rdx
incl %r9d
jmp 0xa9c1
addl %r14d, %r13d
incq %rbp
jmp 0xa928
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/Process_Read.cpp
// Function: write_compress_base_disk(_IO_FILE*, unsigned long, char*, unsigned int, ul_vec_t*)
void write_compress_base_disk(FILE *fp, uint64_t ul_rid, char *str, uint32_t len, ul_vec_t *buf)
{
	buf->N_site.n = buf->bb.n = 0; buf->rlen = len; buf->r_base.n = B4L(len); 
	kv_resize(uint8_t, buf->r_base, buf->r_base.n); 
	ha_encode_base(buf->r_base.a, str, len, &(buf->N_site), 0);

	fwrite(&ul_rid, sizeof(ul_rid), 1, fp);
	fwrite(&len, sizeof(len), 1, fp);
	fwrite(&buf->N_site.n, sizeof(buf->N_site.n), 1, fp);
	fwrite(buf->N_site.a, sizeof((*buf->N_site.a)), buf->N_site.n, fp);
	fwrite(buf->r_base.a, sizeof((*buf->r_base.a)), buf->r_base.n, fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
andq $0x0, 0x20(%r8)
movq %rdi, %r14
andq $0x0, 0x40(%r8)
leaq 0x40(%r8), %r15
movl %ecx, %eax
shrl $0x2, %eax
andl $0x3, %ecx
cmpl $0x1, %ecx
sbbl $-0x1, %eax
movl %ebp, 0x18(%r8)
movq %rax, (%r8)
cmpq %rax, 0x8(%r8)
jae 0xb858
decq %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2370
movq %rax, %rdi
movq %rax, 0x10(%rbx)
jmp 0xb85c
movq 0x10(%rbx), %rdi
leaq 0x38(%rbx), %rcx
movl %ebp, %edx
movq %r12, %rsi
xorl %r8d, %r8d
callq 0x7dde
leaq 0x10(%rsp), %rdi
pushq $0x8
popq %r13
pushq $0x1
popq %r12
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x2410
leaq 0xc(%rsp), %rdi
pushq $0x4
popq %rbp
movq %rbp, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x2410
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x2410
movq 0x38(%rbx), %rdi
movq 0x40(%rbx), %rdx
movq %rbp, %rsi
movq %r14, %rcx
callq 0x2410
movq (%rbx), %rdx
movq 0x10(%rbx), %rdi
movq %r12, %rsi
movq %r14, %rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2410
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Process_Read.cpp
// Function: destroy_scaf_res_t(scaf_res_t*)
void destroy_scaf_res_t(scaf_res_t *p)
{
	if(p) {
		uint32_t k;
		for (k = 0; k < p->m; k++) {
			free(p->a[k].N_site.a); free(p->a[k].r_base.a); free(p->a[k].bb.a);	
		}
		free(p->a);
		free(p);
	}
}

// Assembly:
testq %rdi, %rdi
je 0xbb6c
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %eax, %eax
movl %eax, %r14d
movq (%rbx), %rdi
cmpq %r14, 0x10(%rbx)
jbe 0xbb5a
imulq $0x58, %r14, %r15
movq 0x38(%rdi,%r15), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x10(%rax,%r15), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x30(%rax,%r15), %rdi
callq 0x2220
leal 0x1(%r14), %eax
jmp 0xbb20
callq 0x2220
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2220
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Assembly.cpp
// Function: get_corrected_read_from_cigar(Cigar_record*, char*, int, char*, int*)
void get_corrected_read_from_cigar(Cigar_record* cigar, char* pre_read, int pre_length, char* new_read, int* new_length)
{
    int i, j;
    int pre_i, new_i;
    int operation, operation_length;
    pre_i = new_i = 0;
    int diff_char_i = 0;


    for (i = 0; i < (long long)cigar->length; i++)
    {
        operation = Get_Cigar_Type(cigar->record[i]);
        operation_length = Get_Cigar_Length(cigar->record[i]);

        if (operation == 0)
        {
            memcpy(new_read + new_i, pre_read + pre_i, operation_length);
            pre_i = pre_i + operation_length;
            new_i = new_i + operation_length;
        }
        else if (operation == 1)
        {

            for (j = 0; j < operation_length; j++)
            {
                new_read[new_i] = Get_MisMatch_Base(cigar->lost_base[diff_char_i]);
                new_i++;
                diff_char_i++;
            }
            pre_i = pre_i + operation_length;
        }
        else if (operation == 3)
        {
            pre_i = pre_i + operation_length;
            diff_char_i = diff_char_i + operation_length;
        }
        else if (operation == 2)
        {
            memcpy(new_read + new_i, cigar->lost_base + diff_char_i, operation_length);
            new_i = new_i + operation_length;
            diff_char_i = diff_char_i + operation_length;
        }
    }
    *new_length = new_i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdi, %r12
xorl %ebp, %ebp
leaq 0x1d6fd7(%rip), %r8     # 0x1e2b70
leaq 0x247b90(%rip), %r15    # 0x253730
xorl %r14d, %r14d
xorl %r10d, %r10d
xorl %ebx, %ebx
cmpq %rbp, 0x18(%r12)
jle 0xbc75
movq 0x8(%r12), %rax
movl (%rax,%rbp,4), %r13d
movl %r13d, %eax
andl $0x3, %eax
shrl $0x2, %r13d
movslq (%r8,%rax,4), %rax
addq %r8, %rax
movslq %r10d, %rdi
movslq %ebx, %rsi
jmpq *%rax
addq 0x10(%rsp), %rdi
movslq %r14d, %rsi
addq 0x20(%rsp), %rsi
movq %r13, %rdx
movl %r10d, 0xc(%rsp)
callq 0x2160
movl 0xc(%rsp), %r10d
leaq 0x1d6f75(%rip), %r8     # 0x1e2b70
addl %r13d, %r14d
addl %r13d, %r10d
jmp 0xbc6d
addq 0x10(%rsp), %rdi
addq 0x28(%r12), %rsi
movl %r13d, %edx
movl %r10d, 0xc(%rsp)
callq 0x2160
movl 0xc(%rsp), %r10d
leaq 0x1d6f4a(%rip), %r8     # 0x1e2b70
addl %r13d, %r10d
jmp 0xbc2e
addl %r13d, %r14d
addl %r13d, %ebx
jmp 0xbc6d
addq 0x10(%rsp), %rdi
movl %r13d, %ecx
negl %ecx
xorl %eax, %eax
cmpl %eax, %ecx
je 0xbc62
movq 0x28(%r12), %rdx
movb (%rdx,%rsi), %dl
sarb $0x3, %dl
movsbq %dl, %rdx
movb (%r15,%rdx), %dl
movb %dl, (%rdi)
incq %rsi
decl %eax
incq %rdi
jmp 0xbc3f
subl %eax, %ebx
subl %eax, %r10d
addl %r14d, %r13d
movl %r13d, %r14d
incq %rbp
jmp 0xbba8
movq 0x18(%rsp), %rax
movl %r10d, (%rax)
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/Assembly.cpp
// Function: get_uncorrected_read_from_cigar(Cigar_record*, char*, int, char*, int*)
void get_uncorrected_read_from_cigar(Cigar_record* cigar, char* new_read, int new_length, char* pre_read, int* pre_length)
{
    int i, j;
    int pre_i, new_i;
    int operation, operation_length;
    pre_i = new_i = 0;
    int diff_char_i = 0;


    for (i = 0; i < (long long)cigar->length; i++)
    {
        operation = Get_Cigar_Type(cigar->record[i]);
        operation_length = Get_Cigar_Length(cigar->record[i]);


        if (operation == 0)
        {
            memcpy(pre_read + pre_i, new_read + new_i, operation_length);
            pre_i = pre_i + operation_length;
            new_i = new_i + operation_length;
        }
        else if (operation == 1)
        {

            for (j = 0; j < operation_length; j++)
            {
                pre_read[pre_i] = Get_Match_Base(cigar->lost_base[diff_char_i]);
                pre_i++;
                diff_char_i++;
            }
            new_i = new_i + operation_length;
        }
        else if (operation == 3)
        {
            memcpy(pre_read + pre_i, cigar->lost_base + diff_char_i, operation_length);
            pre_i = pre_i + operation_length;
            diff_char_i = diff_char_i + operation_length;
        }
        else if (operation == 2)
        {
            new_i = new_i + operation_length;
            diff_char_i = diff_char_i + operation_length;
        }
    }

    *pre_length = pre_i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdi, %r12
xorl %ebp, %ebp
leaq 0x1d6ecb(%rip), %r8     # 0x1e2b80
leaq 0x247a74(%rip), %r15    # 0x253730
xorl %r10d, %r10d
xorl %r14d, %r14d
xorl %r11d, %r11d
cmpq %rbp, 0x18(%r12)
jle 0xbd9f
movq 0x8(%r12), %rax
movl (%rax,%rbp,4), %r13d
movl %r13d, %eax
andl $0x3, %eax
shrl $0x2, %r13d
movslq (%r8,%rax,4), %rax
addq %r8, %rax
movslq %r10d, %rdi
movslq %r11d, %rsi
jmpq *%rax
addq 0x10(%rsp), %rdi
movslq %r14d, %rsi
addq 0x20(%rsp), %rsi
movq %r13, %rdx
movl %r14d, 0xc(%rsp)
movl %r10d, %ebx
movl %r11d, %r14d
callq 0x2160
movl %r14d, %r11d
movl %ebx, %r10d
leaq 0x1d6e61(%rip), %r8     # 0x1e2b80
addl %r13d, %r10d
addl 0xc(%rsp), %r13d
jmp 0xbd94
addl %r13d, %r14d
jmp 0xbd5a
addq 0x10(%rsp), %rdi
addq 0x28(%r12), %rsi
movl %r13d, %edx
movl %r10d, 0xc(%rsp)
movl %r11d, %ebx
callq 0x2160
movl %ebx, %r11d
movl 0xc(%rsp), %r10d
leaq 0x1d6e29(%rip), %r8     # 0x1e2b80
addl %r13d, %r10d
addl %r13d, %r11d
jmp 0xbd97
addq 0x10(%rsp), %rdi
movl %r13d, %ecx
negl %ecx
xorl %eax, %eax
cmpl %eax, %ecx
je 0xbd8b
movq 0x28(%r12), %rdx
movzbl (%rdx,%rsi), %edx
andl $0x7, %edx
movb (%r15,%rdx), %dl
movb %dl, (%rdi)
incq %rsi
decl %eax
incq %rdi
jmp 0xbd6b
subl %eax, %r11d
subl %eax, %r10d
addl %r14d, %r13d
movl %r13d, %r14d
incq %rbp
jmp 0xbcc5
movq 0x18(%rsp), %rax
movl %r10d, (%rax)
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/Assembly.cpp
// Function: ha_ovec_buf_init(void*, int, int, int)
ha_ovec_buf_t *ha_ovec_buf_init(void *km, int is_final, int save_ov, int is_ug)
{
	ha_ovec_buf_t *b;
	KCALLOC(km, b, 1);
	b->is_final = !!is_final, b->save_ov = !!save_ov;
	init_UC_Read(&b->self_read);//set 0
	init_UC_Read(&b->ovlp_read);//set 0
	init_Candidates_list(&b->clist);//set 0
    memset(&b->olist, 0, sizeof(overlap_region_alloc));
    memset(&b->olist_hp, 0, sizeof(overlap_region_alloc));
    // init_overlap_region_alloc(&b->olist);
    // init_overlap_region_alloc(&b->olist_hp);
    init_fake_cigar(&(b->tmp_region.f_cigar));//set 0
    kv_init(b->b_buf.a);//set 0
    kv_init(b->r_buf.a);//set 0
    kv_init(b->k_flag.a);//set 0
    kv_init(b->sp);//set 0
	if(!is_ug) b->ab = ha_abuf_init_buf(km);
    else b->abl = ha_abufl_init_buf(km);
	if (!b->is_final) {
        init_Cigar_record_buf(&b->cigar1, km);
		// init_Graph(&b->POA_Graph);
		// init_Graph(&b->DAGCon);
		init_Correct_dumy_buf(&b->correct, km);//set 0
        InitHaplotypeEvdience_buf(&b->hap, km);
		init_Round2_alignment_buf(&b->round2, km);
	}
	return b;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %rbx
pushq $0x1
popq %rsi
movl $0x12340, %edx          # imm = 0x12340
callq 0x1a3848
movq %rax, %r14
movd %r15d, %xmm0
movd %r12d, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
pxor %xmm0, %xmm0
pcmpeqd %xmm0, %xmm1
pandn 0x1d689e(%rip), %xmm1   # 0x1e2bd0
movq %xmm1, (%rax)
leaq 0x8(%rax), %rdi
callq 0x6bd1
leaq 0x28(%r14), %rdi
callq 0x6bd1
leaq 0x48(%r14), %rdi
callq 0x13d08
leaq 0x121d8(%r14), %rdi
pxor %xmm0, %xmm0
movdqa %xmm0, 0xd0(%r14)
movdqa %xmm0, 0xc0(%r14)
movdqa %xmm0, 0xb0(%r14)
movdqa %xmm0, 0xa0(%r14)
callq 0x1191f
andq $0x0, 0x12150(%r14)
andq $0x0, 0x12170(%r14)
andq $0x0, 0x12190(%r14)
andq $0x0, 0x12260(%r14)
pxor %xmm0, %xmm0
movdqa %xmm0, 0x12140(%r14)
movdqa %xmm0, 0x12160(%r14)
movdqa %xmm0, 0x12180(%r14)
movdqa %xmm0, 0x12250(%r14)
movq %rbx, %rdi
testl %ebp, %ebp
je 0xc3e2
callq 0xe3a05
movq %rax, 0xe8(%r14)
jmp 0xc3ee
callq 0xe391c
movq %rax, 0xe0(%r14)
cmpl $0x0, (%r14)
jne 0xc43f
leaq 0x108(%r14), %rdi
movq %rbx, %rsi
callq 0x1b3c5
leaq 0x2c0(%r14), %rdi
movq %rbx, %rsi
callq 0x1b38c
leaq 0x9040(%r14), %rdi
movl $0x2e8, %edx            # imm = 0x2E8
xorl %esi, %esi
callq 0x20e0
orq $-0x1, 0x9300(%r14)
movq %r14, %rdi
addq $0x9330, %rdi           # imm = 0x9330
movq %rbx, %rsi
callq 0x1b330
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Assembly.cpp
// Function: ha_ovec_init(int, int, int)
ha_ovec_buf_t *ha_ovec_init(int is_final, int save_ov, int is_ug)
{
	ha_ovec_buf_t *b;
	CALLOC(b, 1);
	b->is_final = !!is_final, b->save_ov = !!save_ov;
	init_UC_Read(&b->self_read);
	init_UC_Read(&b->ovlp_read);
	init_Candidates_list(&b->clist);
	init_overlap_region_alloc(&b->olist);
    init_overlap_region_alloc(&b->olist_hp);
    init_fake_cigar(&(b->tmp_region.f_cigar));
    memset(&(b->tmp_region.w_list), 0, sizeof(b->tmp_region.w_list));
    CALLOC(b->tmp_region.w_list.a, 1); b->tmp_region.w_list.n = b->tmp_region.w_list.m = 1;
    kv_init(b->b_buf.a);
    kv_init(b->r_buf.a);
    kv_init(b->k_flag.a);
    kv_init(b->sp);
    init_bit_extz_t(&(b->exz), 31);
	if(!is_ug) b->ab = ha_abuf_init();
    else b->abl = ha_abufl_init();
	if (!b->is_final) {
		init_Cigar_record(&b->cigar1);
		init_Graph(&b->POA_Graph);
		init_Graph(&b->DAGCon);
		init_Correct_dumy(&b->correct);
		InitHaplotypeEvdience(&b->hap);
		init_Round2_alignment(&b->round2);
	}
	return b;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movl %esi, %r15d
movl %edi, %r12d
pushq $0x1
popq %r14
movl $0x12340, %esi          # imm = 0x12340
movq %r14, %rdi
callq 0x2120
movq %rax, %rbx
movd %r15d, %xmm0
movd %r12d, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
pxor %xmm0, %xmm0
pcmpeqd %xmm0, %xmm1
pandn 0x1d6743(%rip), %xmm1   # 0x1e2bd0
movq %xmm1, (%rax)
leaq 0x8(%rax), %rdi
callq 0x6bd1
leaq 0x28(%rbx), %rdi
callq 0x6bd1
leaq 0x48(%rbx), %rdi
callq 0x13d08
leaq 0xa0(%rbx), %rdi
callq 0x1189e
leaq 0xc0(%rbx), %rdi
callq 0x1189e
leaq 0x121d8(%rbx), %rdi
callq 0x1191f
pxor %xmm0, %xmm0
movdqu %xmm0, 0x12200(%rbx)
andq $0x0, 0x12210(%rbx)
pushq $0x20
popq %rsi
movq %r14, %rdi
callq 0x2120
movq %rax, 0x121f8(%rbx)
movq %r14, 0x121f0(%rbx)
movq %r14, 0x121e8(%rbx)
leaq 0x12268(%rbx), %rdi
pxor %xmm0, %xmm0
movdqa %xmm0, 0x12140(%rbx)
andq $0x0, 0x12150(%rbx)
movdqa %xmm0, 0x12160(%rbx)
andq $0x0, 0x12170(%rbx)
movdqa %xmm0, 0x12180(%rbx)
andq $0x0, 0x12190(%rbx)
movdqa %xmm0, 0x12250(%rbx)
andq $0x0, 0x12260(%rbx)
pushq $0x1f
popq %rsi
callq 0x10710
testl %ebp, %ebp
je 0xc569
callq 0xe3a10
movq %rax, 0xe8(%rbx)
jmp 0xc575
callq 0xe3927
movq %rax, 0xe0(%rbx)
cmpl $0x0, (%rbx)
jne 0xc5c5
leaq 0x108(%rbx), %rdi
callq 0x1b2ea
leaq 0x148(%rbx), %rdi
callq 0x184c3
leaq 0x200(%rbx), %rdi
callq 0x184c3
leaq 0x2c0(%rbx), %rdi
callq 0x1b29e
leaq 0x9040(%rbx), %rdi
callq 0x1080b
movq %rbx, %rdi
addq $0x9330, %rdi           # imm = 0x9330
callq 0x1b273
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Assembly.cpp
// Function: ha_ovec_destroy(ha_ovec_buf_t*)
void ha_ovec_destroy(ha_ovec_buf_t *b)
{
	destory_UC_Read(&b->self_read);
	destory_UC_Read(&b->ovlp_read);
	destory_Candidates_list(&b->clist);
	destory_overlap_region_alloc(&b->olist);
    destory_overlap_region_alloc(&b->olist_hp);
	ha_abuf_destroy(b->ab);
    ha_abufl_destroy(b->abl);
    destory_fake_cigar(&(b->tmp_region.f_cigar));
    free(b->tmp_region.w_list.a); free(b->tmp_region.w_list.c.a);
    kv_destroy(b->b_buf.a);
    kv_destroy(b->r_buf.a);
    kv_destroy(b->k_flag.a);
    kv_destroy(b->sp);
    destroy_bit_extz_t(&(b->exz));
	if (!b->is_final) {
		destory_Cigar_record(&b->cigar1);
		destory_Graph(&b->POA_Graph);
		destory_Graph(&b->DAGCon);
		destory_Correct_dumy(&b->correct);
		destoryHaplotypeEvdience(&b->hap);
		destory_Round2_alignment(&b->round2);
	}
	free(b);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x8, %rdi
callq 0x6b07
leaq 0x28(%rbx), %rdi
callq 0x6b07
leaq 0x48(%rbx), %rdi
callq 0x13d2f
leaq 0xa0(%rbx), %rdi
callq 0x11985
leaq 0xc0(%rbx), %rdi
callq 0x11985
movq 0xe0(%rbx), %rdi
callq 0xe39c3
movq 0xe8(%rbx), %rdi
callq 0xe3aac
leaq 0x121d8(%rbx), %rdi
callq 0x119da
movq 0x121f8(%rbx), %rdi
callq 0x2220
movq 0x12210(%rbx), %rdi
callq 0x2220
movq 0x12150(%rbx), %rdi
callq 0x2220
movq 0x12170(%rbx), %rdi
callq 0x2220
movq 0x12190(%rbx), %rdi
callq 0x2220
movq 0x12260(%rbx), %rdi
callq 0x2220
leaq 0x12268(%rbx), %rdi
callq 0x108b7
cmpl $0x0, (%rbx)
jne 0xc6cd
leaq 0x108(%rbx), %rdi
callq 0x1b416
leaq 0x148(%rbx), %rdi
callq 0x184ff
leaq 0x200(%rbx), %rdi
callq 0x184ff
leaq 0x2c0(%rbx), %rdi
callq 0x1b400
leaq 0x9040(%rbx), %rdi
callq 0x108dd
leaq 0x9330(%rbx), %rdi
callq 0x1b3db
movq %rbx, %rdi
popq %rbx
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Assembly.cpp
// Function: ha_Graph_mem(Graph const*)
static int64_t ha_Graph_mem(const Graph *g)
{
	int64_t i, mem = 0;
	mem = sizeof(Graph) + g->node_q.size * 8 + g->g_nodes.size * sizeof(Node);
	for (i = 0; i < (int64_t)g->g_nodes.size; ++i) {
		Node *n = &g->g_nodes.list[i];
		mem += n->mismatch_edges.size * sizeof(Edge);
		mem += n->deletion_edges.size * sizeof(Edge);
		mem += n->insertion_edges.size * sizeof(Edge);
	}
	mem += g->g_nodes.sort.size * 9;
	return mem;
}

// Assembly:
movq 0x58(%rdi), %rdx
movq 0x88(%rdi), %rax
movq %rdx, %rcx
shlq $0x7, %rcx
leaq (%rcx,%rax,8), %rcx
addq $0xb8, %rcx
xorl %eax, %eax
testq %rdx, %rdx
cmovgq %rdx, %rax
pushq $0x68
popq %rdx
subq $0x1, %rax
jb 0xc977
movq 0x18(%rdi), %rsi
movq -0x20(%rsi,%rdx), %r8
addq -0x40(%rsi,%rdx), %r8
addq (%rsi,%rdx), %r8
imulq $0x38, %r8, %rsi
addq %rsi, %rcx
subq $-0x80, %rdx
jmp 0xc952
imulq $0x9, 0x30(%rdi), %rax
addq %rcx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Assembly.cpp
// Function: get_het_cnt(haplotype_evdience_alloc*)
uint32_t get_het_cnt(haplotype_evdience_alloc *hap)
{
    uint32_t i, cnt;
    for (i = cnt = 0; i < hap->snp_stat.n; i++) {
        if(hap->snp_stat.a[i].score == 1 && (!(hap->snp_stat.a[i].occ_0 < 2 || hap->snp_stat.a[i].occ_1 < 2))) {
            cnt++;
        }
    }
    return cnt;
}

// Assembly:
movq 0x220(%rdi), %rcx
xorl %edx, %edx
xorl %eax, %eax
movl %edx, %edx
cmpq %rdx, %rcx
jbe 0xc9b9
movq 0x218(%rdi), %rsi
imulq $0x28, %rdx, %r8
cmpl $0x1, 0x1c(%rsi,%r8)
jne 0xc9b5
addq %r8, %rsi
cmpl $0x2, 0x8(%rsi)
jb 0xc9b5
cmpl $0x2, 0xc(%rsi)
sbbl $-0x1, %eax
incl %edx
jmp 0xc98b
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Assembly.cpp
// Function: Output_corrected_reads()
void Output_corrected_reads()
{
    long long i;
    UC_Read g_read;
    init_UC_Read(&g_read);
    char* gfa_name = (char*)malloc(strlen(asm_opt.output_file_name)+35);
    sprintf(gfa_name, "%s.ec.fa", asm_opt.output_file_name);
    FILE* output_file = fopen(gfa_name, "w");
    free(gfa_name);

    for (i = 0; i < (long long)R_INF.total_reads; i++)
    {
        recover_UC_Read(&g_read, &R_INF, i);
        fwrite(">", 1, 1, output_file);
        fwrite(Get_NAME(R_INF, i), 1, Get_NAME_LENGTH(R_INF, i), output_file);
        fwrite("\n", 1, 1, output_file);
        fwrite(g_read.seq, 1, g_read.length, output_file);
        fwrite("\n", 1, 1, output_file);
    }
    destory_UC_Read(&g_read);
    fclose(output_file);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x8(%rsp), %rdi
callq 0x6bd1
leaq 0x246d7f(%rip), %rax    # 0x253758
movq 0x10(%rax), %rbx
movq %rbx, %rdi
callq 0x2090
leaq 0x23(%rax), %rdi
callq 0x2280
movq %rax, %r12
leaq 0x1d6282(%rip), %rsi    # 0x1e2c7a
xorl %r14d, %r14d
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0x1edc92(%rip), %rsi    # 0x1fa6a1
movq %r12, %rdi
callq 0x2210
movq %rax, %r15
movq %r12, %rdi
callq 0x2220
leaq 0x247807(%rip), %r12    # 0x254230
pushq $0x3e
popq %rbp
pushq $0x1
popq %r13
pushq $0xa
popq %rbx
cmpq 0x247846(%rip), %r14    # 0x254280
jge 0xcaac
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x715e
movl %ebp, %edi
movq %r15, %rsi
callq 0x2270
movq 0x247813(%rip), %rax    # 0x254270
movq (%rax,%r14,8), %rcx
movq 0x8(%rax,%r14,8), %rdx
movq 0x2477cb(%rip), %rdi    # 0x254238
addq %rcx, %rdi
incq %r14
subq %rcx, %rdx
movq %r13, %rsi
movq %r15, %rcx
callq 0x2410
movl %ebx, %edi
movq %r15, %rsi
callq 0x2270
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rdx
movq %r13, %rsi
movq %r15, %rcx
callq 0x2410
movl %ebx, %edi
movq %r15, %rsi
callq 0x2270
jmp 0xca33
leaq 0x8(%rsp), %rdi
callq 0x6b07
movq %r15, %rdi
callq 0x2190
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/Assembly.cpp
// Function: Output_corrected_fastq()
void Output_corrected_fastq()
{
    long long i; uint64_t k;
    UC_Read g_read; asg8_v dv;
    init_UC_Read(&g_read); kv_init(dv);
    char* gfa_name = (char*)malloc(strlen(asm_opt.output_file_name)+35);
    sprintf(gfa_name, "%s.ec.fq", asm_opt.output_file_name);
    FILE* fp = fopen(gfa_name, "w");
    free(gfa_name);

    for (i = 0; i < (long long)R_INF.total_reads; i++) {
        recover_UC_Read(&g_read, &R_INF, i);
        fprintf(fp, "@%.*s\n", (int32_t)Get_NAME_LENGTH(R_INF, i), Get_NAME(R_INF, i));
        fprintf(fp, "%.*s\n", (int32_t)g_read.length, g_read.seq);        
        fprintf(fp, "+\n");
        retrive_bqual(&dv, NULL, i, -1, -1, 0, sc_bn);
        for (k = 0; k < dv.n; k++) fprintf(fp, "%c", (char)(sc_tb[dv.a[k]] + 33 - 1));
        fprintf(fp, "\n");
    }
    destory_UC_Read(&g_read); kv_destroy(dv);
    fclose(fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq 0x28(%rsp), %rdi
callq 0x6bd1
leaq 0x10(%rsp), %rax
andq $0x0, 0x10(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
leaq 0x246c5c(%rip), %rax    # 0x253758
movq 0x10(%rax), %rbx
movq %rbx, %rdi
callq 0x2090
leaq 0x23(%rax), %rdi
callq 0x2280
movq %rax, %r14
leaq 0x1d6168(%rip), %rsi    # 0x1e2c83
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0x1edb72(%rip), %rsi    # 0x1fa6a1
movq %r14, %rdi
callq 0x2210
movq %rax, %r15
movq %r14, %rdi
callq 0x2220
pushq $-0x1
popq %r13
leaq 0x1d6043(%rip), %r14    # 0x1e2b90
pushq $0xa
popq %rbp
xorl %ebx, %ebx
cmpq 0x247727(%rip), %rbx    # 0x254280
jge 0xcc29
leaq 0x28(%rsp), %rdi
leaq 0x2476c5(%rip), %rsi    # 0x254230
movq %rbx, %rdx
callq 0x715e
movq 0x2476f6(%rip), %rax    # 0x254270
leaq 0x1(%rbx), %r12
movl 0x8(%rax,%rbx,8), %edx
movq (%rax,%rbx,8), %rcx
subl %ecx, %edx
addq 0x2476a9(%rip), %rcx    # 0x254238
movq %r15, %rdi
leaq 0x1d60f3(%rip), %rsi    # 0x1e2c8c
xorl %eax, %eax
callq 0x22b0
movl 0x30(%rsp), %edx
movq 0x28(%rsp), %rcx
movq %r15, %rdi
leaq 0x1eb4b7(%rip), %rsi    # 0x1f806a
xorl %eax, %eax
callq 0x22b0
leaq 0x1d5bab(%rip), %rdi    # 0x1e276c
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
movq %r15, %rcx
callq 0x2410
movq $0x2, (%rsp)
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %r13, %rcx
movq %r13, %r8
xorl %r9d, %r9d
callq 0x7638
xorl %ebx, %ebx
cmpq 0x10(%rsp), %rbx
jae 0xcc17
movq 0x20(%rsp), %rax
movzbl (%rax,%rbx), %eax
movb (%r14,%rax,8), %al
addb $0x20, %al
movsbl %al, %edi
movq %r15, %rsi
callq 0x2270
incq %rbx
jmp 0xcbf1
movl %ebp, %edi
movq %r15, %rsi
callq 0x2270
movq %r12, %rbx
jmp 0xcb52
leaq 0x28(%rsp), %rdi
callq 0x6b07
movq 0x20(%rsp), %rdi
callq 0x2220
movq %r15, %rdi
callq 0x2190
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/Assembly.cpp
// Function: debug_print_pob_regions()
void debug_print_pob_regions()
{
    uint64_t i, total = 0;
    for (i = 0; i < R_INF.total_reads; i++)
    {
        if(R_INF.trio_flag[i]!=AMBIGU)
        {
            total++;
            fprintf(stderr, "(%lu) %.*s\n", i, (int)Get_NAME_LENGTH(R_INF, i), Get_NAME(R_INF, i));
        }
    }
    fprintf(stderr, "total hp reads: %lu, R_INF.total_reads: %lu\n", total, R_INF.total_reads);
    exit(1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x24761d(%rip), %rcx    # 0x254280
movq 0x246376(%rip), %r12    # 0x252fe0
leaq 0x1d6022(%rip), %r14    # 0x1e2c93
xorl %r15d, %r15d
xorl %ebx, %ebx
cmpq %rcx, %r15
jae 0xccc5
movq 0x2475d6(%rip), %rax    # 0x254258
cmpb $0x0, (%rax,%r15)
jne 0xcc8e
incq %r15
jmp 0xcc76
incq %rbx
movq (%r12), %rdi
movq 0x2475d4(%rip), %rax    # 0x254270
movl 0x8(%rax,%r15,8), %ecx
movq (%rax,%r15,8), %r8
subl %r8d, %ecx
addq 0x247589(%rip), %r8     # 0x254238
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x22b0
movq 0x2475bd(%rip), %rcx    # 0x254280
jmp 0xcc89
movq (%r12), %rdi
leaq 0x1d5fcf(%rip), %rsi    # 0x1e2c9f
movq %rbx, %rdx
xorl %eax, %eax
callq 0x22b0
pushq $0x1
popq %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Assembly.cpp
// Function: rescue_hp_reads(ha_ovec_buf_t**)
void rescue_hp_reads(ha_ovec_buf_t **b)
{
    int hom_cov, het_cov;
    ha_flt_tab_hp = ha_idx_hp = NULL;
    if (!(asm_opt.flag & HA_F_NO_KMER_FLT)) {
       ha_flt_tab_hp = ha_ft_gen(&asm_opt, &R_INF, &hom_cov, 1, 0);
    }
    ha_idx_hp = ha_pt_gen(&asm_opt, ha_flt_tab, 1, 1, &R_INF, &hom_cov, &het_cov);


    if (asm_opt.required_read_name)
		kt_for(asm_opt.thread_num, worker_ovec_related_reads, b, R_INF.total_reads);
	else
		kt_for(asm_opt.thread_num, worker_ovec, b, R_INF.total_reads);




    ha_ft_destroy(ha_flt_tab_hp); ha_flt_tab_hp = NULL;
    ha_pt_destroy(ha_idx_hp); ha_idx_hp = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x247754(%rip), %r15    # 0x254448
andq $0x0, (%r15)
leaq 0x247741(%rip), %r12    # 0x254440
andq $0x0, (%r12)
movq %rdi, %rbx
leaq 0x246a4a(%rip), %r14    # 0x253758
testb $0x2, (%r14)
jne 0xcd36
leaq 0x246a3d(%rip), %rdi    # 0x253758
leaq 0x24750e(%rip), %rsi    # 0x254230
leaq 0x10(%rsp), %rdx
pushq $0x1
popq %rcx
xorl %r8d, %r8d
callq 0xd61b1
movq %rax, (%r12)
leaq 0x2476f3(%rip), %rax    # 0x254430
movq (%rax), %rsi
leaq 0x14(%rsp), %rax
movq %rax, (%rsp)
leaq 0x2474e0(%rip), %r8     # 0x254230
pushq $0x1
popq %rcx
leaq 0x10(%rsp), %r9
movq %r14, %rdi
movl %ecx, %edx
callq 0xd6a80
movq %rax, (%r15)
cmpq $0x0, 0x18(%r14)
movl 0x7c(%r14), %edi
movq 0x24750b(%rip), %rcx    # 0x254280
leaq 0x5a9(%rip), %rax       # 0xd325
leaq 0x32(%rip), %rsi        # 0xcdb5
cmoveq %rax, %rsi
movq %rbx, %rdx
callq 0xc67c0
movq (%r12), %rdi
callq 0xd5c37
andq $0x0, (%r12)
movq (%r15), %rdi
callq 0xd4d2f
andq $0x0, (%r15)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Assembly.cpp
// Function: print_het_cnt_log(unsigned int*)
void print_het_cnt_log(uint32_t *het_cnt)
{
    if(!het_cnt) return;
    char* gfa_name = (char*)malloc(strlen(asm_opt.output_file_name)+35);
    sprintf(gfa_name, "%s.het_cnt.log", asm_opt.output_file_name);
    FILE* output_file = fopen(gfa_name, "w");
    fprintf(stderr, "[M::%s::] ==> print cnt of het sites to %s...\n", __func__, gfa_name);
    free(gfa_name);
    uint64_t i;
    for (i = 0; i < R_INF.total_reads; i++){
        fprintf(output_file, ">%.*s\t%u\n", (int)Get_NAME_LENGTH(R_INF, i), Get_NAME(R_INF, i), het_cnt[i]);
    }
    fclose(output_file);
}

// Assembly:
testq %rdi, %rdi
jne 0xd595
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x2461b1(%rip), %rax    # 0x253758
movq 0x10(%rax), %r14
movq %r14, %rdi
callq 0x2090
leaq 0x23(%rax), %rdi
callq 0x2280
movq %rax, %r15
leaq 0x1d5706(%rip), %rsi    # 0x1e2ccc
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0x1ed0c7(%rip), %rsi    # 0x1fa6a1
movq %r15, %rdi
callq 0x2210
movq %rax, %r14
movq 0x2459f4(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d56e5(%rip), %rsi    # 0x1e2cdb
leaq 0x1d570d(%rip), %rdx    # 0x1e2d0a
movq %r15, %rcx
xorl %eax, %eax
callq 0x22b0
movq %r15, %rdi
callq 0x2220
leaq 0x1d5706(%rip), %r15    # 0x1e2d1c
xorl %eax, %eax
cmpq 0x246c61(%rip), %rax    # 0x254280
jae 0xd653
movq 0x246c48(%rip), %rcx    # 0x254270
leaq 0x1(%rax), %r12
movl 0x8(%rcx,%rax,8), %edx
movq (%rcx,%rax,8), %rcx
subl %ecx, %edx
addq 0x246bfb(%rip), %rcx    # 0x254238
movl (%rbx,%rax,4), %r8d
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x22b0
movq %r12, %rax
jmp 0xd618
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2190
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Assembly.cpp
// Function: prt_dbg_rs(_IO_FILE*, Debug_reads*, unsigned long)
void prt_dbg_rs(FILE *fp, Debug_reads* x, uint64_t round)
{
    uint64_t k, id; UC_Read g_read; init_UC_Read(&g_read);
    for (k = 0; k < R_INF_FLAG.query_num; k++) {
        id = x->read_id[k];
        if(id == ((uint64_t)-1)) continue;
        recover_UC_Read(&g_read, &R_INF, id);
        fprintf(fp, ">%.*s_r%lu\n", (int)Get_NAME_LENGTH((R_INF), id), Get_NAME((R_INF), id), round);
        fprintf(fp, "%.*s\n", (int)g_read.length, g_read.seq);
    }
    destory_UC_Read(&g_read);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %rdi
callq 0x6bd1
movq 0x246c3a(%rip), %rax    # 0x2542c8
leaq 0x1ea9d5(%rip), %r12    # 0x1f806a
xorl %ebp, %ebp
cmpq %rax, %rbp
jae 0xd70d
movq 0x8(%r14), %rcx
movq (%rcx,%rbp,8), %r13
cmpq $-0x1, %r13
je 0xd708
leaq 0x8(%rsp), %rdi
leaq 0x246b7a(%rip), %rsi    # 0x254230
movq %r13, %rdx
callq 0x715e
movq 0x246bab(%rip), %rax    # 0x254270
movl 0x8(%rax,%r13,8), %edx
movq (%rax,%r13,8), %rcx
subl %ecx, %edx
addq 0x246b61(%rip), %rcx    # 0x254238
movq %r15, %rdi
leaq 0x1d5645(%rip), %rsi    # 0x1e2d26
movq %rbx, %r8
xorl %eax, %eax
callq 0x22b0
movl 0x10(%rsp), %edx
movq 0x8(%rsp), %rcx
movq %r15, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x22b0
movq 0x246bc0(%rip), %rax    # 0x2542c8
incq %rbp
jmp 0xd697
leaq 0x8(%rsp), %rdi
callq 0x6b07
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/Assembly.cpp
// Function: ha_ec_dbg()
int ha_ec_dbg(void)
{
	int hom_cov, het_cov;

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

    cal_ec_r_dbg(asm_opt.thread_num, R_INF.total_reads);

    ha_pt_destroy(ha_idx); ha_idx = NULL;

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x10(%rsp), %r15
movq %r15, (%rsp)
leaq 0x245dd1(%rip), %rbx    # 0x253758
leaq 0x2468a2(%rip), %r8     # 0x254230
leaq 0x14(%rsp), %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r14, %r9
callq 0xd6a80
leaq 0x246a8d(%rip), %r12    # 0x254438
movq %rax, (%r12)
movl (%r14), %esi
movl %esi, 0xd0(%rbx)
movl (%r15), %eax
movl %eax, 0xd4(%rbx)
movq %rbx, %rdi
callq 0x3430
movslq 0x7c(%rbx), %rdi
movq 0x2468ac(%rip), %rsi    # 0x254280
callq 0x14db61
movq (%r12), %rdi
callq 0xd4d2f
andq $0x0, (%r12)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Assembly.cpp
// Function: check_chain_indels(Fake_Cigar*, long long, long long, float)
int check_chain_indels(Fake_Cigar* chain, long long xBeg, long long xEnd, float indel_rate)
{
    uint64_t i = 0;
    long long indels = 0, xOffset;
    if(chain->length != 0)
    {
        indels += abs(get_fake_gap_shift(chain, 0));
        xOffset = get_fake_gap_pos(chain, 0);
        if(indels > (xOffset - xBeg + 1) * indel_rate) return 0;

        for (i = 1; i < chain->length; i++)
        {
            indels += abs((get_fake_gap_shift(chain, i) - get_fake_gap_shift(chain, i-1)));
            xOffset = get_fake_gap_pos(chain, i);
            if(indels > (xOffset - xBeg + 1) * indel_rate) return 0;
        }
    }

    if(indels > (xEnd - xBeg + 1) * indel_rate) return 0;
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
movq %rsi, %r14
cmpl $0x0, 0x8(%rdi)
je 0xe601
movq %rdi, %r15
xorl %ebp, %ebp
xorl %esi, %esi
movss %xmm0, 0xc(%rsp)
callq 0x11a0b
movl %eax, %ebx
negl %ebx
cmovsl %eax, %ebx
movq %r15, %rdi
xorl %esi, %esi
callq 0x11a00
movss 0xc(%rsp), %xmm0
cltq
cvtsi2ss %ebx, %xmm2
subq %r14, %rax
incq %rax
cvtsi2ss %rax, %xmm1
mulss %xmm0, %xmm1
ucomiss %xmm1, %xmm2
ja 0xe628
movq %r12, 0x10(%rsp)
movl %ebx, %ebx
xorl %r13d, %r13d
leaq 0x1(%r13), %r12
movl 0x8(%r15), %eax
cmpq %rax, %r12
jae 0xe606
movq %r15, %rdi
movl %r12d, %esi
callq 0x11a0b
movl %eax, %ebp
movq %r15, %rdi
movl %r13d, %esi
callq 0x11a0b
subl %eax, %ebp
movl %ebp, %eax
negl %eax
cmovsl %ebp, %eax
addq %rax, %rbx
movq %r15, %rdi
movl %r12d, %esi
callq 0x11a00
movss 0xc(%rsp), %xmm0
cltq
cvtsi2ss %rbx, %xmm2
subq %r14, %rax
incq %rax
cvtsi2ss %rax, %xmm1
mulss %xmm0, %xmm1
ucomiss %xmm1, %xmm2
movq %r12, %r13
jbe 0xe59d
xorl %ebp, %ebp
jmp 0xe628
xorps %xmm2, %xmm2
jmp 0xe610
cvtsi2ss %rbx, %xmm2
movq 0x10(%rsp), %r12
subq %r14, %r12
incq %r12
cvtsi2ss %r12, %xmm1
mulss %xmm0, %xmm1
xorl %ebp, %ebp
ucomiss %xmm1, %xmm2
setbe %bpl
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Assembly.cpp
// Function: update_exact_overlaps(overlap_region_alloc*, UC_Read*, UC_Read*)
void update_exact_overlaps(overlap_region_alloc* overlap_list, UC_Read* g_read, UC_Read* overlap_read)
{
    uint64_t j;
    for (j = 0; j < overlap_list->length; j++)
    {
        if (overlap_list->list[j].is_match != 1)
        {
            if((overlap_list->list[j].x_pos_e + 1 - overlap_list->list[j].x_pos_s) != 
               (overlap_list->list[j].y_pos_e + 1 - overlap_list->list[j].y_pos_s))
            {
                continue;
            }

            if(overlap_list->list[j].y_pos_strand == 0)
            {
                recover_UC_Read(overlap_read, &R_INF, overlap_list->list[j].y_id);
            }
            else
            {
                recover_UC_Read_RC(overlap_read, &R_INF, overlap_list->list[j].y_id);
            }

            if(if_exact_match(g_read->seq, g_read->length, overlap_read->seq, overlap_read->length, 
            overlap_list->list[j].x_pos_s, overlap_list->list[j].x_pos_e, 
            overlap_list->list[j].y_pos_s, overlap_list->list[j].y_pos_e))
            {
                overlap_list->list[j].is_match = 1;
                overlap_list->list[j].strong = 0;
                overlap_list->list[j].without_large_indel = 1;
                overlap_list->list[j].shared_seed = 1;
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r13d, %r13d
leaq 0x245992(%rip), %r12    # 0x254230
xorl %ebp, %ebp
cmpq 0x10(%r15), %rbp
jae 0xe94c
movq (%r15), %rax
cmpb $0x1, 0x2c(%rax,%r13)
je 0xe93d
movl 0x8(%rax,%r13), %ecx
subl 0x4(%rax,%r13), %ecx
movl 0x18(%rax,%r13), %edx
subl 0x14(%rax,%r13), %edx
cmpl %edx, %ecx
jne 0xe93d
cmpl $0x0, 0x1c(%rax,%r13)
movl 0x10(%rax,%r13), %edx
movq %rbx, %rdi
movq %r12, %rsi
je 0xe8eb
callq 0x7215
jmp 0xe8f0
callq 0x715e
movq (%r14), %rdi
movq 0x8(%r14), %rsi
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
movq (%r15), %rax
movl 0x4(%rax,%r13), %r8d
movl 0x8(%rax,%r13), %r9d
movl 0x14(%rax,%r13), %r10d
movl 0x18(%rax,%r13), %eax
pushq %rax
pushq %r10
callq 0x1097d
popq %rcx
popq %rdx
testl %eax, %eax
je 0xe93d
movq (%r15), %rax
movw $0x101, 0x2c(%rax,%r13) # imm = 0x101
movb $0x0, 0x2e(%rax,%r13)
movl $0x1, 0x24(%rax,%r13)
incq %rbp
addq $0xa8, %r13
jmp 0xe8a0
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/Assembly.cpp
// Function: Final_phasing(overlap_region_alloc*, Cigar_record_alloc*, UC_Read*, UC_Read*, unsigned char*)
void Final_phasing(overlap_region_alloc* overlap_list, Cigar_record_alloc* cigarline,
UC_Read* g_read, UC_Read* overlap_read, uint8_t* c2n)
{
    uint64_t i, xLen, yStrand;
    char* x_string;
    char* y_string;
    Cigar_record* cigar;
    resize_Cigar_record_alloc(cigarline, overlap_list->length);



    for (i = 0; i < overlap_list->length; i++)
    {
        if(overlap_list->list[i].is_match == 1 ||
           overlap_list->list[i].is_match == 2 ||
           overlap_list->list[i].is_match == 3)
        {
            xLen = overlap_list->list[i].x_pos_e - overlap_list->list[i].x_pos_s + 1;
            yStrand = overlap_list->list[i].y_pos_strand;
            cigar = &(cigarline->buffer[i]);
            ///has already been matched exactly
            if(overlap_list->list[i].is_match == 1 && overlap_list->list[i].shared_seed == 1)
            {
                add_cigar_record(g_read->seq + overlap_list->list[i].x_pos_s, xLen, cigar, 0);
            }
            else 
            {
                if(yStrand == 0)
                {
                    recover_UC_Read(overlap_read, &R_INF, overlap_list->list[i].y_id);
                }
                else
                {
                    recover_UC_Read_RC(overlap_read, &R_INF, overlap_list->list[i].y_id);
                }
                x_string = g_read->seq;
                y_string = overlap_read->seq;

                fill_chain(&(overlap_list->list[i].f_cigar), x_string, y_string, 
                overlap_list->list[i].x_pos_s, overlap_list->list[i].y_pos_s,
                Get_READ_LENGTH(R_INF, overlap_list->list[i].x_id), 
                Get_READ_LENGTH(R_INF, overlap_list->list[i].y_id), cigar, c2n);
            }

        }
    }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, 0x10(%rsp)
movq %rsi, %rax
movq %rdi, %r12
movq 0x10(%rdi), %rsi
movq %rax, 0x8(%rsp)
movq %rax, %rdi
callq 0x2969b
pushq $0x2c
popq %rbp
xorl %r14d, %r14d
leaq 0x245723(%rip), %r13    # 0x254230
xorl %r15d, %r15d
cmpq 0x10(%r12), %r15
jae 0xeb89
movq (%r12), %rax
movb (%rax,%rbp), %dl
leal -0x1(%rdx), %ecx
cmpb $0x2, %cl
ja 0xeb79
movl -0x10(%rax,%rbp), %ecx
cmpb $0x1, %dl
jne 0xeb5f
cmpl $0x1, -0x8(%rax,%rbp)
jne 0xeb5f
movl -0x28(%rax,%rbp), %edi
movl -0x24(%rax,%rbp), %esi
subl %edi, %esi
incl %esi
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdx
addq %r14, %rdx
movq 0x10(%rsp), %rax
addq (%rax), %rdi
xorl %ecx, %ecx
callq 0x109b4
jmp 0xeb79
movl -0x1c(%rax,%rbp), %edx
movq %rbx, %rdi
movq %r13, %rsi
testl %ecx, %ecx
je 0xeb74
callq 0x7215
jmp 0xeb79
callq 0x715e
incq %r15
addq $0xa8, %rbp
addq $0x40, %r14
jmp 0xeb10
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/Assembly.cpp
// Function: reset_final_overlaps(overlap_region_alloc*)
void reset_final_overlaps(overlap_region_alloc *overlap_list)
{
    
    uint64_t i;
    for (i = 0; i < overlap_list->length; i++)
    {
        if (overlap_list->list[i].is_match == 1 || overlap_list->list[i].is_match == 2)
        {
            overlap_list->list[i].x_pos_s = overlap_list->list[i].x_pos_e = (uint32_t)-1;
            overlap_list->list[i].y_pos_s = overlap_list->list[i].y_pos_e = (uint32_t)-1;
            overlap_list->list[i].is_match = 0;
        }
    }

    ha_sort_list_by_anchor(overlap_list);
}

// Assembly:
movq 0x10(%rdi), %rax
pushq $0x2c
popq %rcx
xorl %edx, %edx
cmpq %rax, %rdx
jae 0xe58de
movq (%rdi), %rsi
movb (%rsi,%rcx), %r8b
decb %r8b
cmpb $0x1, %r8b
ja 0xebca
orq $-0x1, -0x28(%rsi,%rcx)
orq $-0x1, -0x18(%rsi,%rcx)
movb $0x0, (%rsi,%rcx)
incq %rdx
addq $0xa8, %rcx
jmp 0xeba1