LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: chhylp123[P]hifiasm/inter.cpp
// Function: alignment_ul_pipeline(uldat_t*, enzyme const*)
int alignment_ul_pipeline(uldat_t* sl, const enzyme *fn)
{
    double index_time = yak_realtime();
    int i;
    for (i = 0; i < fn->n; i++){
        gzFile fp;
        if ((fp = gzopen(fn->a[i], "r")) == 0) return 0;
        sl->ks = kseq_init(fp);
        kt_pipeline(3, worker_ul_pipeline, sl, 3);
        kseq_destroy(sl->ks);
        gzclose(fp);
    }
	sl->hits.total_base = sl->total_base;
	sl->hits.total_pair = sl->total_pair;
    fprintf(stderr, "[M::%s::%.3f] ==> Qualification\n", __func__, yak_realtime()-index_time);
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
callq 0x1b7ca0
movsd %xmm0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x2ce5f2
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc1e4e(%rip), %rsi     # 0x3903d6
callq 0x22c0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x2ce5a3
movl $0x0, -0x4(%rbp)
jmp 0x2ce650
movq -0x30(%rbp), %rdi
callq 0x2ce660
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rdx
movl $0x3, %ecx
leaq 0xd9(%rip), %rsi        # 0x2ce6a0
movl %ecx, %edi
callq 0x16d950
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x2cee50
movq -0x30(%rbp), %rdi
callq 0x2380
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2ce561
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movq 0xf59c1(%rip), %rax     # 0x3c3fe0
movq (%rax), %rax
movq %rax, -0x38(%rbp)
callq 0x1b7ca0
movq -0x38(%rbp), %rdi
subsd -0x20(%rbp), %xmm0
leaq 0xbea95(%rip), %rsi     # 0x38d0d0
leaq 0xc46df(%rip), %rdx     # 0x392d21
movb $0x1, %al
callq 0x22a0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: push_uc_block_t(ug_opt_t const*, kv_ul_ov_t*, char**, unsigned long*, unsigned long)
void push_uc_block_t(const ug_opt_t *uopt, kv_ul_ov_t *z, char **seq, uint64_t *len, uint64_t b_id)
{
	uint64_t k, l, rid;
	for (k = 1, l = 0; k <= z->n; k++) {
        if(k == z->n || z->a[k].qn != z->a[l].qn) {
			rid = b_id + z->a[l].qn;
			// fprintf(stderr, "rid->%lu, b_id->%lu, l->%lu, z->a[l].qn->%u, len[z->a[l].qn]->%lu, seq[z->a[l].qn]->%u\n", rid, b_id, l, z->a[l].qn, len[z->a[l].qn], seq[z->a[l].qn]?1:0);
			append_ul_t(&UL_INF, &rid, NULL, 0, seq[z->a[l].qn], len[z->a[l].qn], z->a + l, k - l, P_CHAIN_COV, uopt, 0);
			// append_ul_t_back(&UL_INF, &rid, NULL, 0, seq[z->a[l].qn], len[z->a[l].qn], z->a + l, k - l, P_CHAIN_COV);
			l = k;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq $0x1, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
ja 0x2cefed
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
je 0x2cef34
movq -0x10(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x30(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x38(%rbp), %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
je 0x2cefda
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x38(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x38(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
movq (%rax,%rcx,8), %r8
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x38(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
movq (%rax,%rcx,8), %r9
movq -0x10(%rbp), %rax
movq (%rax), %r11
imulq $0x1c, -0x38(%rbp), %rax
addq %rax, %r11
movq -0x30(%rbp), %r10
subq -0x38(%rbp), %r10
movq -0x8(%rbp), %rax
leaq 0xf6414(%rip), %rdi     # 0x3c53b8
leaq -0x40(%rbp), %rsi
xorl %ecx, %ecx
movss 0xc17ce(%rip), %xmm0    # 0x390780
xorl %edx, %edx
movq %rcx, %rdx
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movl $0x0, 0x18(%rsp)
callq 0xeb50
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x2cefdc
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x2ceeec
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: init_ucr_file_t(uldat_t*, char*, unsigned long)
int32_t init_ucr_file_t(uldat_t *sl, char* file, uint64_t mode)
{
	if(mode == 1 || mode == 2) {
		char *gfa_name = (char*)malloc(strlen(file)+25);
		sprintf(gfa_name, "%s.uidx.ucr.bin", file);
		CALLOC(sl->ucr_s, 1); 
		sl->ucr_s->flag = mode;
		sl->ucr_s->fp = fopen(gfa_name, mode==1?"w":"r");
		if (!(sl->ucr_s->fp)) {
			free(gfa_name);
			return 0;
		}
		free(gfa_name);
		return 1;
	}	
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x1, -0x20(%rbp)
je 0x2cf026
cmpq $0x2, -0x20(%rbp)
jne 0x2cf0f5
movq -0x18(%rbp), %rdi
callq 0x20a0
movq %rax, %rdi
addq $0x19, %rdi
callq 0x2270
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0xcb4c5(%rip), %rsi     # 0x39a513
movb $0x0, %al
callq 0x2050
movl $0x1, %edi
movl $0x68, %esi
callq 0x2140
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rcx, 0x60(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x1, -0x20(%rbp)
jne 0x2cf09b
leaq 0xca33d(%rip), %rax     # 0x3993d2
movq %rax, -0x38(%rbp)
jmp 0x2cf0a8
leaq 0xc1334(%rip), %rax     # 0x3903d6
movq %rax, -0x38(%rbp)
jmp 0x2cf0a8
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x2200
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
cmpq $0x0, (%rax)
jne 0x2cf0e3
movq -0x28(%rbp), %rdi
callq 0x2210
movl $0x0, -0x4(%rbp)
jmp 0x2cf0fc
movq -0x28(%rbp), %rdi
callq 0x2210
movl $0x1, -0x4(%rbp)
jmp 0x2cf0fc
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: destory_ucr_file_t(uldat_t*)
void destory_ucr_file_t(uldat_t *sl)
{
	if(sl->ucr_s) {
		free(sl->ucr_s->u.r_base.a);
		free(sl->ucr_s->u.bb.a);
		free(sl->ucr_s->u.N_site.a);

		fclose(sl->ucr_s->fp);
		free(sl->ucr_s);
		sl->ucr_s = NULL;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x2cf183
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x38(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x40(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq (%rax), %rdi
callq 0x21a0
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq $0x0, 0x40(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: get_add_cov_score(ul_idx_t const*, long, long, long, long, long, long*)
uint64_t get_add_cov_score(const ul_idx_t *uref, int64_t ps, int64_t pe, int64_t cs, int64_t ce, int64_t uid, int64_t *cov_i)
{
	int64_t os = MAX(ps, cs), oe = MIN(pe, ce);
	int64_t ovlp = ((oe > os)? (oe - os):0);
	// fprintf(stderr, "ovlp:%ld, os:%ld, oe:%ld, ps:%ld, pe:%ld, cs:%ld, ce::%ld\n", ovlp, os, oe, ps, pe, cs, ce);
	if(ovlp > 0) {
		return (os>cs?retrieve_u_cov_region(uref, uid, 0, cs, os, cov_i):0) + 
						(ce>oe?retrieve_u_cov_region(uref, uid, 0, oe, ce, cov_i):0);
	} 

	return retrieve_u_cov_region(uref, uid, 0, cs, ce, cov_i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jl 0x2d008b
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x2d0093
movq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jg 0x2d00af
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x2d00b7
movq -0x30(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jle 0x2d00d7
movq -0x48(%rbp), %rax
subq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x2d00df
xorl %eax, %eax
movq %rax, -0x68(%rbp)
jmp 0x2d00df
movq -0x68(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jle 0x2d016d
movq -0x40(%rbp), %rax
cmpq -0x28(%rbp), %rax
jle 0x2d0119
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rcx
movq -0x40(%rbp), %r8
movq 0x10(%rbp), %r9
xorl %edx, %edx
callq 0x110c0
movq %rax, -0x70(%rbp)
jmp 0x2d0121
xorl %eax, %eax
movq %rax, -0x70(%rbp)
jmp 0x2d0121
movq -0x70(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x48(%rbp), %rax
jle 0x2d0154
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x48(%rbp), %rcx
movq -0x30(%rbp), %r8
movq 0x10(%rbp), %r9
xorl %edx, %edx
callq 0x110c0
movq %rax, -0x80(%rbp)
jmp 0x2d015c
xorl %eax, %eax
movq %rax, -0x80(%rbp)
jmp 0x2d015c
movq -0x78(%rbp), %rax
movq -0x80(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x2d018c
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq 0x10(%rbp), %r9
xorl %edx, %edx
callq 0x110c0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: gen_end_coord(ul_ov_t*, long, long, long*, long*, long*, long*)
void gen_end_coord(ul_ov_t *z, int64_t qlen, int64_t tlen, int64_t *r_qs, int64_t *r_qe, int64_t *r_ts, int64_t *r_te)
{
    int64_t qs, qe, ts, te, qtail, ttail;
    qs = z->qs; qe = z->qe; ts = z->ts; te = z->te;
    if(z->rev) {
        ts = tlen - z->te; te = tlen - z->ts;
    }
    
    if(qs <= ts) {
        ts -= qs; qs = 0;
    } else {
        qs -= ts; ts = 0;
    }

    qtail = qlen - qe; ttail = tlen - te;
    if(qtail <= ttail) {
        qe = qlen; te += qtail;
    }
    else {
        te = tlen; qe += ttail; 
    }

	if(r_qs) (*r_qs) = qs; if(r_qe) (*r_qe) = qe;
	if(r_ts) (*r_ts) = ts; if(r_te) (*r_te) = te;
    if(z->rev) {
        if(r_ts) (*r_ts) = tlen - te; 
		if(r_te) (*r_te) = tlen - ts;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x2d1d8f
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x14(%rcx), %ecx
subq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x10(%rcx), %ecx
subq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jg 0x2d1db2
movq -0x38(%rbp), %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x38(%rbp)
jmp 0x2d1dc9
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x10(%rbp), %rax
subq -0x40(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
subq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x60(%rbp), %rax
jg 0x2d1e01
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x58(%rbp), %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x2d1e15
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x60(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x2d1e27
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x28(%rbp)
je 0x2d1e39
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x2d1e4b
movq -0x48(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, 0x10(%rbp)
je 0x2d1e5d
movq -0x50(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x2d1e9a
cmpq $0x0, -0x30(%rbp)
je 0x2d1e82
movq -0x18(%rbp), %rcx
subq -0x50(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, 0x10(%rbp)
je 0x2d1e98
movq -0x18(%rbp), %rcx
subq -0x48(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x2d1e9a
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: is_end_check(unsigned int, ul_ov_t*, asg_t*)
uint32_t is_end_check(uint32_t v, ul_ov_t *z, asg_t *g)
{
	if(v&1) {
		if(z->ts==0) return 1;
	} else {
		if(z->te==g->seq[v>>1].len) return 1;
	}
	
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl -0x8(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2d1ecf
movq -0x10(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x2d1ecd
movl $0x1, -0x4(%rbp)
jmp 0x2d1f04
jmp 0x2d1efd
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x18(%rbp), %rcx
movq 0x20(%rcx), %rcx
movl -0x8(%rbp), %edx
shrl %edx
movl %edx, %edx
movl (%rcx,%rdx,8), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jne 0x2d1efb
movl $0x1, -0x4(%rbp)
jmp 0x2d1f04
jmp 0x2d1efd
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: set_trans_arr(unsigned long*, vec_sp_node_t*, long)
void set_trans_arr(uint64_t *trans, vec_sp_node_t *out, int64_t idx)
{
	int64_t i;
	for (i = idx; i >=0; ) {
		// if(out->a[idx]->v == 65) {
		// 	fprintf(stderr, "+[M::%s::] out->a[%ld]->v:%u\n", __func__, i, out->a[i]->v);
		// }
		trans[i]++;
		i = out->a[i]->pre;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jl 0x2d315c
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
addq $0x1, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0xc(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x2d3128
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/inter.cpp
// Function: ck_hq_chain(mg_lchain_t*, mg_lchain_t*, ma_ug_t*, ul_idx_t const*, ug_opt_t const*, long, double)
uint64_t ck_hq_chain(mg_lchain_t *li, mg_lchain_t *lj, ma_ug_t *ug, const ul_idx_t *uref, const ug_opt_t *uopt, int64_t bw, double ng_diff_thre)
{
	if(lj->qe+G_CHAIN_INDEL <= li->qs) return 0;
	if(lj->qs >= li->qs/**+G_CHAIN_INDEL**/) return 0;
	ul_ov_t ui, uj; int64_t qo, share
;	set_ul_ov_t_by_mg_lchain_t(&ui, li); set_ul_ov_t_by_mg_lchain_t(&uj, lj);
	qo = infer_rovlp(&ui, &uj, NULL, NULL, NULL, ug); ///overlap length in query (UL read)
	if(li->v!=lj->v && get_ecov_adv(uref, uopt, li->v^1, lj->v^1, bw, ng_diff_thre, qo, 0, &share)) {
		return 1;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movsd %xmm0, -0x40(%rbp)
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
addl $0x80, %eax
movq -0x10(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jg 0x2d446a
movq $0x0, -0x8(%rbp)
jmp 0x2d452d
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jl 0x2d4487
movq $0x0, -0x8(%rbp)
jmp 0x2d452d
movq -0x10(%rbp), %rsi
leaq -0x5c(%rbp), %rdi
callq 0x2a3930
movq -0x18(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x2a3930
movq -0x20(%rbp), %r9
leaq -0x5c(%rbp), %rdi
leaq -0x78(%rbp), %rsi
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rdx
movq %r8, %rcx
callq 0x71a90
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
je 0x2d4525
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edx
xorl $0x1, %edx
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
xorl $0x1, %ecx
movq -0x38(%rbp), %r8
movsd -0x40(%rbp), %xmm0
movq -0x80(%rbp), %r9
xorl %eax, %eax
leaq -0x88(%rbp), %rax
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x292000
cmpq $0x0, %rax
je 0x2d4525
movq $0x1, -0x8(%rbp)
jmp 0x2d452d
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: debug_gchain2(asg_t const*, mg_pathv_t*, unsigned long)
void debug_gchain2(const asg_t *g, mg_pathv_t *a, uint64_t n)
{
	uint64_t k, i, v, w, nv; asg_arc_t *av;
	for (k = 1; k < n; k++) {
		v = a[k-1].v; w = a[k].v;
		nv = asg_arc_n(g, v); av = asg_arc_a(g, v);
		for (i = 0; i < nv; i++) {
			if(av[i].v == w) break;
		}
		if(i >= nv) {
			// fprintf(stderr, "[M::%s::]\n", __func__);
			fprintf(stderr, "[M::%s::]\tutg%.6dl(%c)\t->\tutg%.6dl(%c)\n", __func__, (int32_t)(v>>1)+1, "+-"[v&1], (int32_t)(w>>1)+1, "+-"[w&1]);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x1, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x2d492b
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
subq $0x1, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
imulq $0xc, -0x20(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq -0x30(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x2d48ab
movq -0x48(%rbp), %rax
imulq $0x18, -0x28(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpq -0x38(%rbp), %rax
jne 0x2d489b
jmp 0x2d48ab
jmp 0x2d489d
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x2d487a
movq -0x28(%rbp), %rax
cmpq -0x40(%rbp), %rax
jb 0x2d4918
movq 0xef724(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
movq -0x30(%rbp), %rax
shrq %rax
movl %eax, %ecx
addl $0x1, %ecx
movq -0x30(%rbp), %rdx
andq $0x1, %rdx
leaq 0xae5c1(%rip), %rax     # 0x382e9b
movsbl (%rax,%rdx), %r8d
movq -0x38(%rbp), %rax
shrq %rax
movl %eax, %r9d
addl $0x1, %r9d
movq -0x38(%rbp), %rdx
andq $0x1, %rdx
leaq 0xae59f(%rip), %rax     # 0x382e9b
movsbl (%rax,%rdx), %eax
leaq 0xbe8bd(%rip), %rsi     # 0x3931c4
leaq 0xbe8de(%rip), %rdx     # 0x3931ec
movl %eax, (%rsp)
movb $0x0, %al
callq 0x22a0
jmp 0x2d491a
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x2d47fc
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: reverse_track(mg_pathv_t*, unsigned long)
void reverse_track(mg_pathv_t *a, uint64_t a_n)
{
	int64_t k, hn = (a_n>>1); mg_pathv_t z;
	for (k = a_n-1; k >= 1; k--) a[k].d -= a[k-1].d;

	for (k = 0; k < hn; k++) {
		z = a[k]; a[k] = a[a_n - k - 1]; a[a_n - k - 1] = z;
		a[k].v ^= 1; a[a_n - k - 1].v ^= 1;
	}
	if(a_n&1) a[k].v ^= 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
shrq %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x18(%rbp)
cmpq $0x1, -0x18(%rbp)
jl 0x2d49a2
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %edx
movq -0x8(%rbp), %rax
imulq $0xc, -0x18(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x2d4963
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x2d4a66
movq -0x8(%rbp), %rax
imulq $0xc, -0x18(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0x2c(%rbp)
movl 0x8(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
subq -0x18(%rbp), %rax
subq $0x1, %rax
imulq $0xc, %rax, %rax
addq %rax, %rcx
movq -0x8(%rbp), %rax
imulq $0xc, -0x18(%rbp), %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
subq -0x18(%rbp), %rcx
subq $0x1, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movq -0x2c(%rbp), %rcx
movq %rcx, (%rax)
movl -0x24(%rbp), %ecx
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
imulq $0xc, -0x18(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %ecx
xorl $0x1, %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
subq -0x18(%rbp), %rcx
subq $0x1, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
xorl $0x1, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x2d49aa
movq -0x10(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x2d4a87
movq -0x8(%rbp), %rax
imulq $0xc, -0x18(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %ecx
xorl $0x1, %ecx
movl %ecx, (%rax)
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: dbg_print(mg_pathv_t*, long)
void dbg_print(mg_pathv_t *a, int64_t a_n)
{
	int64_t k;
	for (k = 0; k < a_n; k++) {
		if(a[k].pre == -2) break;
	}
	
	if(k < a_n) {
		fprintf(stderr, "+[M::%s::] src:utg%.6dl(v:%u), dst:utg%.6dl(v:%u)\n", __func__,
		(int32_t)(a[0].v>>1)+1, a[0].v, (int32_t)(a[a_n-1].v>>1)+1, a[a_n-1].v);
		for (k = 0; k < a_n; k++) {
			fprintf(stderr, "-[M::%s::] utg%.6dl(v:%u), pre:%d, d:%u\n", __func__, (int32_t)(a[k].v>>1)+1, a[k].v, 
			a[k].pre, a[k].d);
		}
	}
	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jge 0x2d4ad6
movq -0x8(%rbp), %rax
imulq $0xc, -0x18(%rbp), %rcx
addq %rcx, %rax
cmpl $-0x2, 0x8(%rax)
jne 0x2d4ac6
jmp 0x2d4ad6
jmp 0x2d4ac8
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x2d4aa8
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jge 0x2d4bcf
movq 0xef4f5(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl (%rax), %ecx
shrl %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rax
movl (%rax), %r8d
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rdx
subq $0x1, %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl (%rax), %r9d
shrl %r9d
addl $0x1, %r9d
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rdx
subq $0x1, %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl (%rax), %eax
leaq 0xbe6c1(%rip), %rsi     # 0x3931fa
leaq 0xbe6ed(%rip), %rdx     # 0x39322d
movl %eax, (%rsp)
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jge 0x2d4bcd
movq 0xef47d(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
movq -0x8(%rbp), %rax
imulq $0xc, -0x18(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %ecx
shrl %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rax
imulq $0xc, -0x18(%rbp), %rdx
addq %rdx, %rax
movl (%rax), %r8d
movq -0x8(%rbp), %rax
imulq $0xc, -0x18(%rbp), %rdx
addq %rdx, %rax
movl 0x8(%rax), %r9d
movq -0x8(%rbp), %rax
imulq $0xc, -0x18(%rbp), %rdx
addq %rdx, %rax
movl 0x4(%rax), %eax
leaq 0xbe689(%rip), %rsi     # 0x393237
leaq 0xbe678(%rip), %rdx     # 0x39322d
movl %eax, (%rsp)
movb $0x0, %al
callq 0x22a0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x2d4b52
jmp 0x2d4bcf
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: print_chain(mg_lchain_t*, unsigned int)
void print_chain(mg_lchain_t *a, uint32_t a_n)
{
	uint32_t k;
	for (k = 0; k < a_n; k++) {
		if(a[k].off!=-1) {
			fprintf(stderr, "%u\t%u\t%c\tutg%.6dl\t%u\t%u\n", 
					a[k].qs, a[k].qe, "+-"[a[k].v&1], (int32_t)(a[k].v>>1)+1, a[k].rs, a[k].re);
		} else {
			fprintf(stderr, "*\t*\t%c\tutg%.6dl\t*\t*\n", "+-"[a[k].v&1], (int32_t)(a[k].v>>1)+1);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jae 0x2d4d1e
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $-0x1, (%rax)
je 0x2d4cbd
movq 0xef3c0(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %edx
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %ecx
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0xae237(%rip), %rax     # 0x382e9b
movsbl (%rax,%rsi), %r8d
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rax
movl 0x8(%rax), %r9d
shrl %r9d
addl $0x1, %r9d
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rax
movl 0xc(%rax), %r10d
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rax
movl 0x10(%rax), %eax
leaq 0xbe64b(%rip), %rsi     # 0x3932f7
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x22a0
jmp 0x2d4d0e
movq 0xef31c(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0xae1b5(%rip), %rax     # 0x382e9b
movsbl (%rax,%rcx), %edx
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
shrl %ecx
addl $0x1, %ecx
leaq 0xbe609(%rip), %rsi     # 0x393310
movb $0x0, %al
callq 0x22a0
jmp 0x2d4d10
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2d4bf6
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: convert_mg_lchain_t(utg_ct_t*, mg_lchain_t*)
int64_t convert_mg_lchain_t(utg_ct_t *p, mg_lchain_t *o)
{
	int64_t rs = p->s, re = p->e;
	rs = MAX(rs, o->rs); re = MIN(re, o->re);
	assert(rs < re);	
	if(!(p->x&1)) {
		o->rs = rs-p->s; o->re = re-p->s;
	} else {
		o->rs = p->e-re; o->re = p->e-rs;
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0xc(%rcx), %rcx
cmpq %rcx, %rax
jl 0x2daa51
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x2daa5d
movq -0x10(%rbp), %rax
movslq 0xc(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0x10(%rcx), %rcx
cmpq %rcx, %rax
jg 0x2daa80
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x2daa8c
movq -0x10(%rbp), %rax
movslq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x2daaa0
jmp 0x2daabf
leaq 0xb9145(%rip), %rdi     # 0x393bec
leaq 0xb5d81(%rip), %rsi     # 0x39082f
movl $0x3d66, %edx           # imm = 0x3D66
leaq 0xb913a(%rip), %rcx     # 0x393bf4
callq 0x2130
movq -0x8(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x2daafd
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x4(%rcx), %ecx
subq %rcx, %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x4(%rcx), %ecx
subq %rcx, %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x2dab25
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
subq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
subq -0x18(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movl $0x1, %eax
addq $0x30, %rsp
popq %rbp
retq
// File: chhylp123[P]hifiasm/inter.cpp
// Function: get_seq_bub_id(unsigned long, bubble_type*, unsigned long*, unsigned long*)
uint64_t get_seq_bub_id(uint64_t v, bubble_type *bub, uint64_t *bid, uint64_t *nxt)
{
	uint64_t id0, id1, id; uint32_t beg, sink;

	(*bid) = (*nxt) = (uint64_t)-1;
	get_bub_id(bub, v>>1, &id0, &id1, 1);
	
	id = id0;
	if((id != (uint64_t)-1) && (id < bub->f_bub)) {///no need broken bubble
		get_bubbles(bub, id, &beg, &sink, NULL, NULL, NULL);
		if(v == beg) {
			(*bid) = id; (*nxt) = sink^1; return 1;
		}

		if(v == sink) {
			(*bid) = id; (*nxt) = beg^1; return 1;
		}
	}

	id = id1;
	if((id != (uint64_t)-1) && (id < bub->f_bub)) {///no need broken bubble
		get_bubbles(bub, id, &beg, &sink, NULL, NULL, NULL);
		if(v == beg) {
			(*bid) = id; (*nxt) = sink^1; return 1;
		}

		if(v == sink) {
			(*bid) = id; (*nxt) = beg^1; return 1;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq $-0x1, (%rax)
movq -0x20(%rbp), %rax
movq $-0x1, (%rax)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
shrq %rax
movl %eax, %esi
leaq -0x30(%rbp), %rdx
leaq -0x38(%rbp), %rcx
movl $0x1, %r8d
callq 0x1dc360
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $-0x1, -0x40(%rbp)
je 0x2df227
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x80(%rcx), %rax
jae 0x2df227
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rsi
leaq -0x44(%rbp), %rdx
leaq -0x48(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
movq $0x0, (%rsp)
callq 0x1c4b20
movq -0x10(%rbp), %rax
movl -0x44(%rbp), %ecx
cmpq %rcx, %rax
jne 0x2df1f0
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl -0x48(%rbp), %eax
xorl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq $0x1, -0x8(%rbp)
jmp 0x2df2e2
movq -0x10(%rbp), %rax
movl -0x48(%rbp), %ecx
cmpq %rcx, %rax
jne 0x2df225
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl -0x44(%rbp), %eax
xorl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq $0x1, -0x8(%rbp)
jmp 0x2df2e2
jmp 0x2df227
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $-0x1, -0x40(%rbp)
je 0x2df2da
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x80(%rcx), %rax
jae 0x2df2da
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rsi
leaq -0x44(%rbp), %rdx
leaq -0x48(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
movq $0x0, (%rsp)
callq 0x1c4b20
movq -0x10(%rbp), %rax
movl -0x44(%rbp), %ecx
cmpq %rcx, %rax
jne 0x2df2a6
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl -0x48(%rbp), %eax
xorl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq $0x1, -0x8(%rbp)
jmp 0x2df2e2
movq -0x10(%rbp), %rax
movl -0x48(%rbp), %ecx
cmpq %rcx, %rax
jne 0x2df2d8
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl -0x44(%rbp), %eax
xorl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq $0x1, -0x8(%rbp)
jmp 0x2df2e2
jmp 0x2df2da
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: pick_bubble(uc_block_t*, unsigned long, bubble_type*, unsigned long*)
uint64_t pick_bubble(uc_block_t *a, uint64_t a_n, bubble_type *bub, uint64_t *r_bid)
{
	uint64_t k = 0, v, bid = (uint64_t)-1, w = (uint64_t)-1; (*r_bid) = (uint64_t)-1;
	if(a_n <= 1) return 0;///no bubble
	v = (((uint32_t)a[k].hid)<<1)|((uint32_t)a[k].rev);
	if(!get_seq_bub_id(v, bub, &bid, &w)) return 0;
	(*r_bid) = bid;
	for (k = 1; k < a_n; k++) {
		v = (((uint32_t)a[k].hid)<<1)|((uint32_t)a[k].rev);
		if(v == w) return k;
		if(bub->index[v>>1] != bid) return 0;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq $-0x1, -0x40(%rbp)
movq $-0x1, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq $-0x1, (%rax)
cmpq $0x1, -0x18(%rbp)
ja 0x2df33f
movq $0x0, -0x8(%rbp)
jmp 0x2df431
movq -0x10(%rbp), %rax
imulq $0x24, -0x30(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
shll %eax
movq -0x10(%rbp), %rcx
imulq $0x24, -0x30(%rbp), %rdx
addq %rdx, %rcx
movb 0x20(%rcx), %cl
shrb $0x5, %cl
andb $0x1, %cl
movzbl %cl, %ecx
orl %ecx, %eax
movl %eax, %eax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq -0x40(%rbp), %rdx
leaq -0x48(%rbp), %rcx
callq 0x2df120
cmpq $0x0, %rax
jne 0x2df397
movq $0x0, -0x8(%rbp)
jmp 0x2df431
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq $0x1, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x2df429
movq -0x10(%rbp), %rax
imulq $0x24, -0x30(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
shll %eax
movq -0x10(%rbp), %rcx
imulq $0x24, -0x30(%rbp), %rdx
addq %rdx, %rcx
movb 0x20(%rcx), %cl
shrb $0x5, %cl
andb $0x1, %cl
movzbl %cl, %ecx
orl %ecx, %eax
movl %eax, %eax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jne 0x2df3f8
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2df431
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x38(%rbp), %rcx
shrq %rcx
movl (%rax,%rcx,4), %eax
cmpq -0x40(%rbp), %rax
je 0x2df419
movq $0x0, -0x8(%rbp)
jmp 0x2df431
jmp 0x2df41b
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x2df3aa
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: cal_reliable_ovlp(ul_ov_t*, asg64_v*, unsigned long, unsigned long)
uint64_t cal_reliable_ovlp(ul_ov_t *z, asg64_v *in, uint64_t s, uint64_t e)
{
	if(z->sec >= in->n) return 0;
	uint64_t k, zs, ze, os, oe, ovq, l = 0;
	for (k = z->sec - in->a[z->sec]; k < z->sec; k++) {
		zs = (in->a[k]>>32); ze = ((uint32_t)in->a[k]);
		if(zs >= e) break;
		if(ze <= s) continue;
		os = MAX(s, zs); oe = MIN(e, ze);
		ovq = ((oe > os)? (oe - os):0);
		l += ovq;
	}
	return l;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl %eax, %eax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jb 0x2e28a8
movq $0x0, -0x8(%rbp)
jmp 0x2e29d7
movq $0x0, -0x60(%rbp)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl %eax, %eax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x10(%rbp), %rdx
movl 0x18(%rdx), %edx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
movl %edx, %edx
subq (%rcx,%rdx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x18(%rcx), %ecx
andl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x2e29cf
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x2e2936
jmp 0x2e29cf
movq -0x40(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0x2e2942
jmp 0x2e29be
movq -0x20(%rbp), %rax
cmpq -0x38(%rbp), %rax
jb 0x2e2956
movq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x2e295e
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x40(%rbp), %rax
ja 0x2e297a
movq -0x28(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x2e2982
movq -0x40(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x48(%rbp), %rax
jbe 0x2e29a2
movq -0x50(%rbp), %rax
subq -0x48(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0x2e29aa
xorl %eax, %eax
movq %rax, -0x78(%rbp)
jmp 0x2e29aa
movq -0x78(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
addq -0x60(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x2e28dd
movq -0x60(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: gconnect_test(asg_t const*, unsigned int, unsigned int, long, double, long)
int64_t gconnect_test(const asg_t *g, uint32_t v, uint32_t w, int64_t bw, double diff_ec_ul, int64_t dq)
{
	int64_t dt = -1, dif, mm; 
	uint32_t nv, i; asg_arc_t *av = NULL; ///ma_hit_t *x = NULL;
	nv = asg_arc_n(g, v); av = asg_arc_a(g, v);
	for (i = 0; i < nv; i++) {
		if(av[i].del || av[i].v != w) continue;
		dt = av[i].ol; 
		break;
	}

	if(dt < 0) return 0;
	dif = (dq>dt? dq-dt:dt-dq);
	mm = MAX(dq, dt); mm *= diff_ec_ul; if(mm < bw) mm = bw;
	if(dif <= mm) return 1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movsd %xmm0, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq $-0x1, -0x38(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x14(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jae 0x2e6eec
movq -0x58(%rbp), %rax
movl -0x50(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x2e6ec1
movq -0x58(%rbp), %rax
movl -0x50(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x18(%rbp), %eax
je 0x2e6ec3
jmp 0x2e6ee1
movq -0x58(%rbp), %rax
movl -0x50(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movq %rax, -0x38(%rbp)
jmp 0x2e6eec
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x2e6e8a
cmpq $0x0, -0x38(%rbp)
jge 0x2e6f00
movq $0x0, -0x8(%rbp)
jmp 0x2e6f96
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jle 0x2e6f18
movq -0x30(%rbp), %rax
subq -0x38(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x2e6f24
movq -0x38(%rbp), %rax
subq -0x30(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jl 0x2e6f40
movq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x2e6f48
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x48(%rbp)
movsd -0x28(%rbp), %xmm1
cvtsi2sdq -0x48(%rbp), %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x2e6f7a
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
jg 0x2e6f8e
movq $0x1, -0x8(%rbp)
jmp 0x2e6f96
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: detect_outlier_len(char const*)
void detect_outlier_len(const char* cmd)
{
	uint64_t k;
	for (k = 0; k < UL_INF.n; k++) {
        if(UL_INF.a[k].rlen == 0) {
            fprintf(stderr, "[%s] rid->%lu, rlen->%u, %.*s\n", 
                    cmd, k, UL_INF.a[k].rlen, (int32_t)UL_INF.nid.a[k].n, UL_INF.nid.a[k].a);
        }
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xd96a9(%rip), %rcx     # 0x3c53b8
cmpq 0x50(%rcx), %rax
jae 0x2ebdb3
leaq 0xd9698(%rip), %rax     # 0x3c53b8
movq 0x48(%rax), %rax
imulq $0x58, -0x10(%rbp), %rcx
addq %rcx, %rax
cmpl $0x0, 0x18(%rax)
jne 0x2ebda0
movq 0xd82a7(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
movq -0x10(%rbp), %rcx
leaq 0xd966d(%rip), %rax     # 0x3c53b8
movq 0x48(%rax), %rax
imulq $0x58, -0x10(%rbp), %rsi
addq %rsi, %rax
movl 0x18(%rax), %r8d
leaq 0xd9656(%rip), %rax     # 0x3c53b8
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rsi
shlq $0x4, %rsi
addq %rsi, %rax
movl 0x8(%rax), %r9d
leaq 0xd963c(%rip), %rax     # 0x3c53b8
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rsi
shlq $0x4, %rsi
addq %rsi, %rax
movq (%rax), %rax
leaq 0xa8980(%rip), %rsi     # 0x394715
movq %rax, (%rsp)
movb $0x0, %al
callq 0x22a0
jmp 0x2ebda2
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x2ebd04
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: update_contain_dedup_arr(asg64_v*, unsigned long, asg64_v*)
void update_contain_dedup_arr(asg64_v *in, uint64_t prefix, asg64_v *res)
{
	if(in->n == 0) return;
	uint64_t i, m;
	for (i = 0; i < in->n; i++) {
		if(in->a[i] == ((uint64_t)-1)) continue;
		if(((uint32_t)in->a[i]) == ((uint32_t)-1)) {
			m = prefix; m <<= 32; m += i;
			kv_push(uint64_t, *res, m);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x2ee1c3
jmp 0x2ee2cb
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x2ee2cb
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
cmpq $-0x1, (%rax,%rcx,8)
jne 0x2ee1f4
jmp 0x2ee2ba
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpl $-0x1, %eax
jne 0x2ee2b8
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x20, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x2ee295
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2ee25a
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x30(%rbp)
jmp 0x2ee265
movl $0x2, %eax
movq %rax, -0x30(%rbp)
jmp 0x2ee265
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x2ee2b8
jmp 0x2ee2ba
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x2ee1cb
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/inter.cpp
// Function: path_del_topo(asg_t*, unsigned long)
uint64_t path_del_topo(asg_t *g, uint64_t v)
{
	uint64_t nv, nw, kw, k, z, w; asg_arc_t *av, *aw;
	nv = asg_arc_n(g, v); av = asg_arc_a(g, v);
	for (k = 0; k < nv; k++){
		if(av[k].del) continue;
		w = av[k].v^1;
		nw = asg_arc_n(g, w); aw = asg_arc_a(g, w);
		for (z = kw = 0; z < nw; z++) {
			if(aw[z].del) continue;
			if((aw[z].v>>1) != (v>>1)) continue;
			kw++;
		}
		if(kw <= 0) return 0; 
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq -0x18(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x2ee442
movq -0x50(%rbp), %rax
imulq $0x18, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x2ee35b
jmp 0x2ee431
movq -0x50(%rbp), %rax
imulq $0x18, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
xorl $0x1, %eax
movl %eax, %eax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq -0x48(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x2ee41e
movq -0x58(%rbp), %rax
imulq $0x18, -0x40(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x2ee3e3
jmp 0x2ee410
movq -0x58(%rbp), %rax
imulq $0x18, -0x40(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
shrl %eax
movl %eax, %eax
movq -0x18(%rbp), %rcx
shrq %rcx
cmpq %rcx, %rax
je 0x2ee404
jmp 0x2ee410
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x2ee3c0
cmpq $0x0, -0x30(%rbp)
ja 0x2ee42f
movq $0x0, -0x8(%rbp)
jmp 0x2ee44a
jmp 0x2ee431
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x2ee331
movq $0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
// File: chhylp123[P]hifiasm/inter.cpp
// Function: print_all_ul_t_stat(all_ul_t*)
void print_all_ul_t_stat(all_ul_t *x)
{
	uint64_t k, i, ucov_occ = 0, cov_occ = 0, ucov_len = 0, cov_len = 0;
	ul_vec_t *p = NULL;
	for (k = 0; k < x->n; k++) {
		p = &(x->a[k]);
		for (i = 0; i < p->bb.n; i++) {
			if(p->bb.a[i].base/**.hid&x->mm**/) {
				ucov_occ++;
				ucov_len += (p->bb.a[i].qe-(p->bb.a[i].hid&FLANK_M)) - 
					(p->bb.a[i].qs+((p->bb.a[i].hid>>15)&FLANK_M));
			} else {
				cov_occ++;
			}
		}
		cov_len += p->rlen;
	}
	cov_len -= ucov_len;
	fprintf(stderr, "[M::%s::] ==>cov_occ:%lu, ucov_occ:%lu\n", __func__, cov_occ, ucov_occ);
	fprintf(stderr, "[M::%s::] ==>cov_len:%lu, ucov_len:%lu\n", __func__, cov_len, ucov_len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x50(%rcx), %rax
jae 0x2f0ace
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
imulq $0x58, -0x10(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jae 0x2f0aae
movq -0x40(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x18(%rbp), %rcx
addq %rcx, %rax
movb 0x20(%rax), %al
shrb $0x6, %al
andb $0x1, %al
cmpb $0x0, %al
je 0x2f0a8f
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x40(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x18(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0x40(%rbp), %rcx
movq 0x30(%rcx), %rcx
imulq $0x24, -0x18(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
andl $0x7fff, %ecx           # imm = 0x7FFF
subl %ecx, %eax
movq -0x40(%rbp), %rcx
movq 0x30(%rcx), %rcx
imulq $0x24, -0x18(%rbp), %rdx
addq %rdx, %rcx
movl 0x4(%rcx), %ecx
movq -0x40(%rbp), %rdx
movq 0x30(%rdx), %rdx
imulq $0x24, -0x18(%rbp), %rsi
addq %rsi, %rdx
movl (%rdx), %edx
shrl $0xf, %edx
andl $0x7fff, %edx           # imm = 0x7FFF
addl %edx, %ecx
subl %ecx, %eax
movl %eax, %eax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x2f0a9b
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x2f0a9d
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x2f09ea
movq -0x40(%rbp), %rax
movl 0x18(%rax), %eax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x2f09bc
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq 0xd34fc(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %r8
leaq 0xa406b(%rip), %rsi     # 0x394b61
leaq 0xa408c(%rip), %rdx     # 0x394b89
movb $0x0, %al
callq 0x22a0
movq 0xd34d5(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %r8
leaq 0xa4080(%rip), %rsi     # 0x394b9d
leaq 0xa4065(%rip), %rdx     # 0x394b89
movb $0x0, %al
callq 0x22a0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)