LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: hpc_check_naive(hpc_ss_t*, long, long, long, long)
int64_t hpc_check_naive(hpc_ss_t *a, int64_t n, int64_t s, int64_t e, int64_t bd)
{
	int64_t k, os, oe;
	for (k = 0; k < n; k++) {
		os = MAX(s, a[k].s); oe = MIN(e, a[k].e);
		if(oe - os >= -bd) return 1;
		if(a[k].s > (uint64_t)(e + bd)) break;
	}
	return 0;
}

// Assembly:
testq %rsi, %rsi
jle 0x1bdefd
pushq %rbx
leaq (%r8,%rcx), %r9
negq %r8
decq %rsi
addq $0x4, %rdi
xorl %eax, %eax
movl -0x4(%rdi), %r10d
movl (%rdi), %r11d
cmpq %rdx, %r10
movq %rdx, %rbx
cmovgq %r10, %rbx
cmpq %rcx, %r11
cmovgeq %rcx, %r11
subq %rbx, %r11
cmpq %r8, %r11
jge 0x1bdf00
subq $0x1, %rsi
setb %r11b
cmpq %r10, %r9
jb 0x1bdf05
addq $0xc, %rdi
testb %r11b, %r11b
je 0x1bdec5
jmp 0x1bdf05
xorl %eax, %eax
retq
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: hpc_check(hpc_ss_t*, long, long, long, long*, long)
int64_t hpc_check(hpc_ss_t *a, int64_t n, int64_t s, int64_t e, int64_t *idx, int64_t bd)
{
	if(n<=0) return 0;
	if((*idx) >= n) (*idx) = n - 1;
	if((*idx) < 0) (*idx) = 0;
	int64_t k = (*idx), os, oe;
	for (; k < n; k++) {
		os = MAX(s, a[k].s); oe = MIN(e, a[k].e);
		if(oe - os >= -bd) {
			(*idx) = k; return 1;
		}
		if(a[k].s > (uint64_t)(e + bd)) break;
	}
	os = (*idx); (*idx) = k; k = os - 1;
	for (; k >= 0; k--) {
		os = MAX(s, a[k].s); oe = MIN(e, a[k].e);
		if(oe - os >= -bd) {
			(*idx) = k; return 1;
		}
	}
	// assert(!hpc_check_naive(a, n, s, e, bd));
	return 0;
}

// Assembly:
testq %rsi, %rsi
jle 0x1bdfc5
cmpq %rsi, (%r8)
jl 0x1bdf1c
leaq -0x1(%rsi), %rax
movq %rax, (%r8)
cmpq $0x0, (%r8)
jns 0x1bdf29
movq $0x0, (%r8)
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq (%r8), %r10
leaq (%r10,%r10,2), %rax
movq %r10, %r11
cmpq %rsi, %r10
jge 0x1bdf8b
movq %r9, %rbx
negq %rbx
leaq (%r9,%rcx), %r14
leaq (%rdi,%rax,4), %r15
addq $0x4, %r15
movq %r10, %r11
movl -0x4(%r15), %r12d
movl (%r15), %r13d
cmpq %rdx, %r12
movq %rdx, %rbp
cmovgq %r12, %rbp
cmpq %rcx, %r13
cmovgeq %rcx, %r13
subq %rbp, %r13
cmpq %rbx, %r13
jge 0x1bdfc8
cmpq %r12, %r14
jb 0x1bdf8b
incq %r11
addq $0xc, %r15
cmpq %r11, %rsi
jne 0x1bdf57
movq %rsi, %r11
movq %r11, (%r8)
negq %r9
leaq (%rdi,%rax,4), %rsi
addq $-0x8, %rsi
xorl %eax, %eax
testq %r10, %r10
jle 0x1bdfd3
decq %r10
movl -0x4(%rsi), %edi
cmpq %rdx, %rdi
cmovleq %rdx, %rdi
movl (%rsi), %r11d
cmpq %rcx, %r11
cmovgeq %rcx, %r11
subq %rdi, %r11
addq $-0xc, %rsi
cmpq %r9, %r11
jl 0x1bdf9b
jmp 0x1bdfcb
xorl %eax, %eax
retq
movq %r11, %r10
movq %r10, (%r8)
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: cal_s_interval(ma_ug_t*, asg_arc_t*, ul_ov_t*)
void cal_s_interval(ma_ug_t *ug, asg_arc_t *p, ul_ov_t *res)
{
	memset(res, 0, sizeof((*res)));
	res->rev = (((p->ul>>32)^(p->v))&((uint32_t)1));
	res->qn = p->ul>>33; res->tn = p->v>>1;
	uint32_t ql = ug->g->seq[res->qn].len, tl = ug->g->seq[res->tn].len;
	if((p->ul>>32)&1) {
		res->qs = 0; res->qe = ((p->ol<=ql)?(p->ol):(ql));
	} else {
		res->qe = ql; res->qs = ((p->ol<=res->qe)?(res->qe-p->ol):(0));
	}

	if(p->v&1) {
		res->te = tl; res->ts = ((p->ol<=res->te)?(res->te-p->ol):(0));
	} else {
		res->ts = 0; res->te = ((p->ol<=tl)?(p->ol):(tl));
	}
}

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rdx)
movups %xmm0, (%rdx)
movl 0x8(%rsi), %eax
xorl 0x4(%rsi), %eax
shll $0x1f, %eax
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl 0x18(%rdx), %r8d
andl %ecx, %r8d
orl %eax, %r8d
movl %r8d, 0x18(%rdx)
movq (%rsi), %r9
movq %r9, %rax
shrq $0x21, %rax
movl %eax, (%rdx)
movl 0x8(%rsi), %r8d
movl %r8d, %r10d
shrl %r10d
movl %r10d, 0xc(%rdx)
movq 0x18(%rdi), %rdi
movq 0x20(%rdi), %r11
movl (%r11,%rax,8), %edi
andl %ecx, %edi
movl (%r11,%r10,8), %eax
andl %ecx, %eax
btq $0x20, %r9
jb 0x1be612
movl %edi, 0x8(%rdx)
andl 0xc(%rsi), %ecx
xorl %r9d, %r9d
subl %ecx, %edi
cmovbl %r9d, %edi
movl $0x4, %r9d
movl %edi, %ecx
jmp 0x1be627
movl $0x0, 0x4(%rdx)
andl 0xc(%rsi), %ecx
cmpl %edi, %ecx
cmovael %edi, %ecx
movl $0x8, %r9d
movl %ecx, (%rdx,%r9)
testb $0x1, %r8b
jne 0x1be64c
movl $0x0, 0x10(%rdx)
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl 0xc(%rsi), %ecx
cmpl %eax, %ecx
cmovbl %ecx, %eax
movl $0x14, %ecx
jmp 0x1be663
movl %eax, 0x14(%rdx)
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl 0xc(%rsi), %ecx
xorl %esi, %esi
subl %ecx, %eax
cmovbl %esi, %eax
movl $0x10, %ecx
movl %eax, (%rdx,%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: infer_se(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int*, unsigned int*)
uint32_t infer_se(uint32_t qs, uint32_t qe, uint32_t ts, uint32_t te, uint32_t rev, 
uint32_t rqs, uint32_t rqe, uint32_t *rts, uint32_t *rte)
{
	if(rqs <= rqe && rqs >= qs && rqe <= qe) {
		uint32_t s_shift, e_shift, m;
		s_shift = get_offset_adjust(rqs-qs, qe-qs, te-ts);
		e_shift = get_offset_adjust(qe-rqe, qe-qs, te-ts);
		if(rev) {
			m = s_shift; s_shift = e_shift; e_shift = m;
		}
		// if(rqs == 2623 && rqe == 17620) {
		// 	fprintf(stderr, "[M::%s]\tqs::%u\tqe::%u\tts::%u\tte::%u\trqs::%u\trqe::%u\ts_shift::%u\te_shift::%u\n", __func__, 
		// 		qs, qe, ts, te, rqs, rqe, s_shift, e_shift);
		// }
		(*rts) = ts + s_shift; (*rte) = te - e_shift;
		if((*rts) <= (*rte) && (*rts) >= ts && (*rte) <= te) return 1;
	}
	(*rts) = (*rte) = (uint32_t)-1;
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
movq 0x28(%rsp), %r11
movq 0x20(%rsp), %r10
movl 0x18(%rsp), %ebp
movl %esi, %eax
subl %ebp, %eax
jb 0x1be6e7
movl %r9d, %ebx
subl %edi, %ebx
jb 0x1be6e7
cmpl %ebp, %r9d
ja 0x1be6e7
subl %edi, %esi
movl %ecx, %edi
subl %edx, %edi
cvtsi2sd %rbx, %xmm0
cvtsi2sd %rsi, %xmm1
cvtsi2sd %rdi, %xmm2
divsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
cvttsd2si %xmm0, %rsi
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
cvttsd2si %xmm0, %rax
testl %r8d, %r8d
movl %eax, %edi
cmovel %esi, %edi
cmovel %eax, %esi
addl %edx, %edi
movl %edi, (%r10)
subl %esi, %ecx
movl %ecx, (%r11)
jb 0x1be6e7
movl (%r10), %esi
cmpl %ecx, %esi
ja 0x1be6e7
movl $0x1, %eax
cmpl %edx, %esi
jae 0x1be6f4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, (%r11)
movl %eax, (%r10)
xorl %eax, %eax
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: extend_batch(ul_ov_t*, long, long, long*, long*, long*, long*)
void extend_batch(ul_ov_t *z, int64_t ql, int64_t tl, int64_t *rqs, int64_t *rqe, int64_t *rts, int64_t *rte)
{
	int64_t q0, t0, q1, t1;
	(*rqs) = (*rqe) = (*rts) = (*rte) = -1;
	if(!(z->rev)) {
		q0 = z->qs; t0 = z->ts;
		if(q0 <= t0) {
			(*rqs) = z->qs - q0; (*rts) = z->ts - q0;
		} else {
			(*rqs) = z->qs - t0; (*rts) = z->ts - t0;
		}

		q1 = ql - z->qe; t1 = tl - z->te;
		if(q1 <= t1) {
			(*rqe) = z->qe + q1; (*rte) = z->te + q1;
		} else {
			(*rqe) = z->qe + t1; (*rte) = z->te + t1;
		}
	} else {
		q0 = z->qs; t0 = tl - z->te;
		if(q0 <= t0) {
			(*rqs) = z->qs - q0; (*rte) = z->te + q0;
		} else {
			(*rqs) = z->qs - t0; (*rte) = z->te + t0;
		}

		q1 = ql - z->qe; t1 = z->ts;
		if(q1 <= t1) {
			(*rqe) = z->qe + q1; (*rts) = z->ts - q1;
		} else {
			(*rqe) = z->qe + t1; (*rts) = z->ts - t1;
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
movq 0x18(%rsp), %rax
movq $-0x1, %r10
movq %r10, (%rax)
movq %r10, (%r9)
movq %r10, (%r8)
movq %r10, (%rcx)
cmpl $0x0, 0x18(%rdi)
movl 0x4(%rdi), %r10d
js 0x1c096a
movl 0x10(%rdi), %r11d
cmpl %r11d, %r10d
jbe 0x1c0981
subq %r11, %r10
movq %r10, (%rcx)
xorl %r11d, %r11d
jmp 0x1c098b
movl 0x14(%rdi), %r11d
movq %rdx, %r14
subq %r11, %r14
movq %r10, %rbx
subq %r14, %rbx
jle 0x1c09bb
movq %rbx, (%rcx)
jmp 0x1c09c8
movq $0x0, (%rcx)
subq %r10, %r11
movq %r11, (%r9)
movl 0x8(%rdi), %ecx
movl 0x14(%rdi), %edi
movq %rsi, %r9
subq %rcx, %r9
movq %rdx, %r10
subq %rdi, %r10
cmpq %r10, %r9
jle 0x1c09b0
addq %rcx, %r10
movq %r10, (%r8)
movq %rdx, (%rax)
jmp 0x1c09f4
movq %rsi, (%r8)
addq %rdi, %r9
movq %r9, (%rax)
jmp 0x1c09f4
movq $0x0, (%rcx)
addq %r10, %r11
movq %r11, %rdx
movq %rdx, (%rax)
movl 0x8(%rdi), %eax
movl 0x10(%rdi), %ecx
movq %rsi, %rdi
subq %rax, %rdi
movq %rcx, %rdx
subq %rdi, %rdx
jge 0x1c09ee
addq %rax, %rcx
movq %rcx, (%r8)
movq $0x0, (%r9)
jmp 0x1c09f4
movq %rsi, (%r8)
movq %rdx, (%r9)
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: check_ul_ov_t_consist(ul_ov_t*, ul_ov_t*, long, long, double)
uint64_t check_ul_ov_t_consist(ul_ov_t *x, ul_ov_t *y, int64_t ql, int64_t tl, double diff)
{
	if(x->qn == y->qn && x->tn == y->tn && x->rev == y->rev) {
		int64_t xqs, xqe, xts, xte, yqs, yqe, yts, yte, os, oe, ovlp;
		extend_batch(x, ql, tl, &xqs, &xqe, &xts, &xte);
		extend_batch(y, ql, tl, &yqs, &yqe, &yts, &yte);

		os = MAX(xqs, yqs); oe = MIN(xqe, yqe);
		if(oe <= os) return 0;
		ovlp = oe - os;
		if(ovlp <= ((xqe-xqs)*(1-diff))) return 0;
		if(ovlp <= ((yqe-yqs)*(1-diff))) return 0;

		os = MAX(xts, yts); oe = MIN(xte, yte);
		if(oe <= os) return 0;
		if(ovlp <= ((xte-xts)*(1-diff))) return 0;
		if(ovlp <= ((yte-yts)*(1-diff))) return 0;
		return 1;
	}
	return 0;
}

// Assembly:
movl (%rdi), %eax
cmpl (%rsi), %eax
jne 0x1c0b51
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r15
movl 0xc(%rdi), %eax
cmpl 0xc(%rsi), %eax
jne 0x1c0b54
movl 0x18(%r15), %eax
xorl 0x18(%rdi), %eax
js 0x1c0b54
movq %rcx, %rbx
movq %rdx, %r14
movsd %xmm0, 0x10(%rsp)
leaq 0x28(%rsp), %rax
movq %rax, (%rsp)
leaq 0x50(%rsp), %r12
leaq 0x38(%rsp), %r8
leaq 0x30(%rsp), %r9
movq %rdx, %rsi
movq %rcx, %rdx
movq %r12, %rcx
callq 0x1c0931
leaq 0x18(%rsp), %rax
movq %rax, (%rsp)
leaq 0x48(%rsp), %rbp
leaq 0x40(%rsp), %r13
leaq 0x20(%rsp), %r9
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %rbp, %rcx
movq %r13, %r8
callq 0x1c0931
movq (%r12), %rdx
movq (%rbp), %rax
cmpq %rax, %rdx
movq %rax, %r8
cmovgq %rdx, %r8
leaq 0x38(%rsp), %rcx
movq (%rcx), %rsi
movq (%r13), %rcx
cmpq %rcx, %rsi
movq %rcx, %rdi
cmovlq %rsi, %rdi
subq %r8, %rdi
jle 0x1c0b54
cvtsi2sd %rdi, %xmm0
subq %rdx, %rsi
cvtsi2sd %rsi, %xmm2
movsd 0x647a0(%rip), %xmm1    # 0x225270
subsd 0x10(%rsp), %xmm1
mulsd %xmm1, %xmm2
ucomisd %xmm0, %xmm2
jae 0x1c0b54
subq %rax, %rcx
xorps %xmm2, %xmm2
cvtsi2sd %rcx, %xmm2
mulsd %xmm1, %xmm2
ucomisd %xmm0, %xmm2
jae 0x1c0b54
movq 0x30(%rsp), %rdx
movq 0x20(%rsp), %rax
cmpq %rax, %rdx
movq %rax, %rdi
cmovgq %rdx, %rdi
movq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rcx
cmpq %rcx, %rsi
movq %rcx, %r8
cmovlq %rsi, %r8
cmpq %rdi, %r8
jle 0x1c0b54
subq %rdx, %rsi
xorps %xmm2, %xmm2
cvtsi2sd %rsi, %xmm2
mulsd %xmm1, %xmm2
ucomisd %xmm0, %xmm2
jae 0x1c0b54
subq %rax, %rcx
xorps %xmm2, %xmm2
cvtsi2sd %rcx, %xmm2
mulsd %xmm2, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
setb %al
jmp 0x1c0b56
xorl %eax, %eax
retq
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: push_emask0(kv_emask_t*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, ul_ov_t*)
void push_emask0(kv_emask_t *res, uint64_t q0l, uint64_t t0l, uint64_t e0l, uint64_t q1l, uint64_t t1l, uint64_t e1l,
uint64_t end, uint64_t is_pe, uint64_t minov, ul_ov_t *p)
{
	emask_t *m;
	m = &(res->a[res->n++]); memset(m, 0, sizeof((*m))); 
	m->dir = end; m->pe = is_pe;
	m->tn = p->tn; m->rev = p->rev; m->rn = (uint32_t)-1;
	if(!end) {///left end
		assert(q0l >= minov && t0l >= minov);
		m->el = e0l; 
		m->qs = p->qs; m->qe = p->qs + q0l;
		if(!(m->rev)) {
			m->ts = p->ts; m->te = p->ts + t0l;
		} else {
			m->te = p->te; m->ts = p->te - t0l;
		}
	} else {///right end
		assert(q1l >= minov && t1l >= minov);
		m->el = e1l;
		m->qe = p->qe; m->qs = p->qe - q1l;
		if(!(m->rev)) {
			m->te = p->te; m->ts = p->te - t1l;
		} else {
			m->ts = p->ts; m->te = p->ts + t1l;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x50(%rsp), %r10
movq 0x48(%rsp), %r11
movb 0x40(%rsp), %bpl
movq 0x38(%rsp), %rbx
movq (%rdi), %r14
movq 0x8(%rdi), %r15
leaq 0x1(%r15), %rax
movq %rax, 0x8(%rdi)
shlq $0x5, %r15
leaq (%r14,%r15), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14,%r15)
movups %xmm0, (%r14,%r15)
movb 0x1c(%r14,%r15), %dil
movl %ebx, %r12d
andb $0x1f, %r12b
andb $-0x40, %dil
shlb $0x5, %bpl
andb $0x20, %bpl
orb %r12b, %bpl
orb %dil, %bpl
movb %bpl, 0x1c(%r14,%r15)
movl 0xc(%r10), %edi
movl %edi, (%r14,%r15)
movl 0x18(%r10), %edi
movl %edi, %r12d
shrl $0x18, %r12d
andb $-0x80, %r12b
andb $0x7f, %bpl
orb %r12b, %bpl
movb %bpl, 0x1c(%r14,%r15)
movl $0xffffffff, 0x4(%r14,%r15) # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x1c1c57
cmpq %r11, %r8
jb 0x1c1cb4
cmpq %r11, %r9
jb 0x1c1cb4
movq 0x30(%rsp), %rcx
movl %ecx, 0x8(%rax)
movl 0x8(%r10), %ecx
movl %ecx, 0x10(%rax)
subl %r8d, %ecx
movl %ecx, 0xc(%rax)
testl %edi, %edi
js 0x1c1c84
movl 0x14(%r10), %edx
movl %edx, 0x18(%rax)
subl %r9d, %edx
movl $0x14, %ecx
jmp 0x1c1ca8
cmpq %r11, %rsi
jb 0x1c1cd3
cmpq %r11, %rdx
jb 0x1c1cd3
movl %ecx, 0x8(%rax)
movl 0x4(%r10), %ecx
movl %ecx, 0xc(%rax)
addl %ecx, %esi
movl %esi, 0x10(%rax)
testl %edi, %edi
js 0x1c1c98
movl 0x10(%r10), %ecx
movl %ecx, 0x14(%rax)
addl %ecx, %edx
movl $0x18, %ecx
jmp 0x1c1ca8
movl 0x10(%r10), %ecx
movl %ecx, 0x14(%rax)
addl %ecx, %r9d
movl $0x18, %ecx
movl %r9d, %edx
jmp 0x1c1ca8
movl 0x14(%r10), %esi
movl %esi, 0x18(%rax)
subl %edx, %esi
movl $0x14, %ecx
movl %esi, %edx
movl %edx, (%rax,%rcx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x74047(%rip), %rdi     # 0x235d02
leaq 0x71cc9(%rip), %rsi     # 0x23398b
leaq 0x73fb5(%rip), %rcx     # 0x235c7e
movl $0x2f92, %edx           # imm = 0x2F92
callq 0x2110
leaq 0x73f87(%rip), %rdi     # 0x235c61
leaq 0x71caa(%rip), %rsi     # 0x23398b
leaq 0x73f96(%rip), %rcx     # 0x235c7e
movl $0x2f89, %edx           # imm = 0x2F89
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: get_emask_ovlp(idx_emask_t*, unsigned int, unsigned int, unsigned int*, unsigned int*)
emask_t* get_emask_ovlp(idx_emask_t *idx, uint32_t qn, uint32_t tn, uint32_t *occ, uint32_t *st)
{
	emask_t *a = NULL; (*occ) = 0; if(st) (*st) = (uint32_t)-1;
	if(qn >= idx->n) return a;
	uint32_t k;
	for (k = 0; k < idx->a[qn].n && idx->a[qn].a[k].tn < tn; k++);
	if(k < idx->a[qn].n && idx->a[qn].a[k].tn == tn) {
		a = idx->a[qn].a + k; if(st) (*st) = k;
		for ((*occ) = k; k < idx->a[qn].n && idx->a[qn].a[k].tn == tn; k++);
		(*occ) = k - (*occ);
		return a;
	}
	return a;
}

// Assembly:
movl $0x0, (%rcx)
testq %r8, %r8
je 0x1c3092
movl $0xffffffff, (%r8)      # imm = 0xFFFFFFFF
cmpl %esi, 0x8(%rdi)
jbe 0x1c30e0
pushq %r14
pushq %rbx
movq (%rdi), %rax
movl %esi, %esi
leaq (%rsi,%rsi,2), %rdi
movq 0x8(%rax,%rdi,8), %rsi
xorl %r9d, %r9d
testq %rsi, %rsi
setne %r11b
je 0x1c312f
leaq (%rax,%rdi,8), %r10
movq (%r10), %rbx
cmpl %edx, (%rbx)
jae 0x1c30e3
xorl %eax, %eax
xorl %edi, %edi
incl %edi
cmpq %rdi, %rsi
seta %r11b
jbe 0x1c3131
movq %rdi, %r14
shlq $0x5, %r14
movl %edi, %r9d
cmpl %edx, (%rbx,%r14)
jb 0x1c30c3
jmp 0x1c30e5
xorl %eax, %eax
retq
xorl %edi, %edi
testb %r11b, %r11b
je 0x1c312f
movq (%r10), %rax
shlq $0x5, %rdi
cmpl %edx, (%rax,%rdi)
jne 0x1c312f
testq %r8, %r8
je 0x1c30fe
movl %r9d, (%r8)
movl %r9d, (%rcx)
movl %r9d, %r10d
movl %r9d, %r8d
cmpq %r10, %rsi
jbe 0x1c3124
movl %r9d, %r8d
shlq $0x5, %r10
cmpl %edx, (%rax,%r10)
jne 0x1c3124
incl %r8d
movq %r8, %r10
cmpq %r8, %rsi
ja 0x1c310f
addq %rdi, %rax
subl %r9d, %r8d
movl %r8d, (%rcx)
jmp 0x1c3131
xorl %eax, %eax
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: detect_sysm_graph_bin(idx_emask_t*, unsigned int)
void detect_sysm_graph_bin(idx_emask_t *idx, uint32_t rid)
{
	kv_emask_t *r = &(idx->a[rid]); uint32_t k, an, st; 
	for (k = 0; k < r->n; k++) {
		get_emask_ovlp(idx, r->a[k].tn, rid, &an, &st);
		r->a[k].rn = (uint32_t)-1;
		if(!an) r->a[k].rn = st;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rax
movl %esi, %ecx
leaq (%rcx,%rcx,2), %rcx
movq 0x8(%rax,%rcx,8), %r13
testq %r13, %r13
je 0x1c31ab
movl %esi, %ebx
movq %rdi, %r14
leaq (%rax,%rcx,8), %rax
movq (%rax), %rbp
movl $0x1, %r15d
xorl %r12d, %r12d
shlq $0x5, %r12
movl (%rbp,%r12), %esi
movq %r14, %rdi
movl %ebx, %edx
leaq 0x4(%rsp), %rcx
movq %rsp, %r8
callq 0x1c3080
movl $0xffffffff, 0x4(%rbp,%r12) # imm = 0xFFFFFFFF
cmpl $0x0, 0x4(%rsp)
jne 0x1c31a0
leaq (%r12,%rbp), %rax
addq $0x4, %rax
movl (%rsp), %ecx
movl %ecx, (%rax)
movl %r15d, %r12d
incl %r15d
cmpq %r12, %r13
ja 0x1c3168
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: get_trans_ul_ov_t(ug_trans_t*, unsigned int, unsigned int)
ul_ov_t* get_trans_ul_ov_t(ug_trans_t *s, uint32_t qn, uint32_t tn)
{
	ha_mzl_t *f = &(s->srt_a.a[qn]);
	if(!(f->rev)) return NULL;
	kv_ul_ov_t *bl = &(s->ll[(uint32_t)(f->x)].tk);
	uint64_t k = f->rid; k <<= 32; k += f->pos;
	// if(!(bl->a[k].qn == (f->x>>32))) {
	// 	fprintf(stderr, "[M::%s::] k::%lu, qn::%u, tn::%u, x>>32::%lu, (uint32_t)x::%u\n", 
	// 	__func__, k, qn, tn, (f->x>>32), (uint32_t)(f->x));
	// }
	// if(!(bl->a[k].qn == (f->x>>32))) {
	// 	fprintf(stderr, "[M::%s::] k::%lu, bl->a[k].qn::%u, (f->x>>32)::%lu, (uint32_t)(f->x)::%u\n", 
	// 				__func__, k, bl->a[k].qn, (f->x>>32), (uint32_t)(f->x));
	// }
	assert(bl->a[k].qn == (f->x>>32));
	for (; (k < bl->n) && (bl->a[k].qn == (f->x>>32)); k++) {
		if(bl->a[k].qn == bl->a[k].tn) continue;
		if(bl->a[k].tn == tn) return &(bl->a[k]);
	}
	return NULL;
}

// Assembly:
pushq %rax
movq 0x98(%rdi), %rax
movl %esi, %ecx
leaq (%rcx,%rcx,2), %rcx
movq 0x8(%rax,%rcx,8), %r8
testl %r8d, %r8d
jns 0x1c3271
leaq (%rax,%rcx,8), %rax
movq 0x20(%rdi), %rdi
movq (%rax), %rcx
movl %ecx, %eax
imulq $0x68, %rax, %r9
movq %r8, %rsi
rolq $0x20, %rsi
btrq $0x3f, %rsi
movq 0x18(%rdi,%r9), %rax
leaq (%rsi,%rsi,8), %r10
leaq (%r10,%r10,2), %r10
addq %rsi, %r10
movl (%rax,%r10), %r10d
shrq $0x20, %rcx
cmpq %r10, %rcx
jne 0x1c3275
addq %r9, %rdi
addq $0x18, %rdi
movq 0x8(%rdi), %rdi
cmpq %rdi, %rsi
jae 0x1c3271
movq %r8, %r9
shrq $0x20, %r9
movabsq $0x1c00000000, %r10     # imm = 0x1C00000000
imulq %r8, %r10
leaq (%r9,%r9,8), %r8
leaq (%r8,%r8,2), %r8
addq %r9, %r8
addq %r10, %r8
addq %r8, %rax
movl (%rax), %r8d
cmpl %r8d, %ecx
jne 0x1c3271
movl 0xc(%rax), %r9d
cmpl %r9d, %r8d
sete %r8b
cmpl %edx, %r9d
setne %r9b
orb %r8b, %r9b
je 0x1c3273
incq %rsi
addq $0x1c, %rax
cmpq %rdi, %rsi
jb 0x1c3246
xorl %eax, %eax
popq %rcx
retq
leaq 0x72b65(%rip), %rdi     # 0x235de1
leaq 0x70708(%rip), %rsi     # 0x23398b
leaq 0x72b71(%rip), %rcx     # 0x235dfb
movl $0x310a, %edx           # imm = 0x310A
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: get_utepdat_t_mem(utepdat_t const*, long)
int64_t get_utepdat_t_mem(const utepdat_t *b, int64_t is_print)
{
	int64_t i, mem[7] = {0}, tt[6] = {0};
	for (i = 0; i < b->n_thread; i++) {
		get_utepdat_t_mem_tid(b, i, tt, NULL);
		mem[0] += tt[0]; mem[1] += tt[1]; mem[2] += tt[2]; mem[3] += tt[3]; mem[4] += tt[4]; mem[5] += tt[5];
	}

	for (i = 0; i < b->n; ++i) mem[6] += b->len[i];
	mem[6] += (sizeof(*(b->len))*b->n) + (sizeof(*(b->seq))*b->n);
	if(is_print) {
		for (i = 0; i < 7; i++) {
			fprintf(stderr, "[M::%s] size of buffer[%ld]: %.3fGB, %.3fKB, %ldB\n", 
				__func__, i, mem[i]/1073741824.0, mem[i]/1048576.0, mem[i]);
		}
	}

	return mem[0] + mem[1] + mem[2] + mem[3] + mem[4] + mem[5] + mem[6];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movq $0x0, 0x30(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
cmpq $0x0, 0xc0(%rdi)
jle 0x1c35e2
movq %rsi, 0x38(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %r12
movq 0x20(%rsp), %rbp
movq 0x28(%rsp), %rdx
xorl %r15d, %r15d
xorl %ebx, %ebx
movq %rsi, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
movq %r14, %rdi
movq %r15, %rsi
leaq 0x50(%rsp), %rdx
xorl %ecx, %ecx
callq 0x1b3523
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
addq 0x50(%rsp), %rbx
addq 0x58(%rsp), %rsi
addq 0x60(%rsp), %r13
addq 0x68(%rsp), %r12
addq 0x70(%rsp), %rbp
addq 0x78(%rsp), %rdx
incq %r15
cmpq 0xc0(%r14), %r15
jl 0x1c3572
movq %rsi, 0x8(%rsp)
movq %r13, 0x10(%rsp)
movq %r12, 0x18(%rsp)
movq %rbp, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x38(%rsp), %rsi
jmp 0x1c35e4
xorl %ebx, %ebx
movq %rbx, (%rsp)
movslq 0x38(%r14), %r15
testq %r15, %r15
jle 0x1c360d
movq 0x48(%r14), %rcx
movq 0x30(%rsp), %rax
xorl %edx, %edx
addq (%rcx,%rdx,8), %rax
incq %rdx
cmpq %rdx, %r15
jne 0x1c35fc
movq %rax, 0x30(%rsp)
shlq $0x4, %r15
addq 0x30(%rsp), %r15
movq %r15, 0x30(%rsp)
testq %rsi, %rsi
jne 0x1c3652
addq (%rsp), %r15
addq 0x8(%rsp), %r15
addq 0x10(%rsp), %r15
addq 0x18(%rsp), %r15
addq 0x20(%rsp), %r15
addq 0x28(%rsp), %r15
movq %r15, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %rdi
callq 0x2a34e
jmp 0x1c3620
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1303c7
movsd %xmm0, (%rsp)
cmpl $0x0, 0x8(%r14)
jle 0x1c36e5
leaq 0x6ff22(%rip), %r12     # 0x2335a7
leaq 0xc8(%rip), %r13        # 0x1c3754
xorl %r15d, %r15d
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %r12, %rsi
callq 0x22d0
testq %rax, %rax
je 0x1c36f9
movq %rax, %rbp
movq %rax, %rdi
callq 0x1c370a
movq %rax, 0x48(%rbx)
movl $0x3, %edi
movq %r13, %rsi
movq %rbx, %rdx
movl $0x3, %ecx
callq 0x104984
movq 0x48(%rbx), %rdi
callq 0x1c3b87
movq %rbp, %rdi
callq 0x2390
incq %r15
movslq 0x8(%r14), %rax
cmpq %rax, %r15
jl 0x1c368f
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x2a3b6
movl $0x1, %eax
jmp 0x1c36fb
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x8(%rsp)
movq %rcx, %r14
movq 0x8(%rsi), %rcx
testq %rcx, %rcx
je 0x1c3ca6
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movl $0x1, %ebp
movl $0x1c, %ebx
xorl %eax, %eax
cmpq %rcx, %rbp
je 0x1c3c34
movq (%r12), %rcx
movl (%rcx,%rbx), %edx
leaq (%rax,%rax,8), %rsi
leaq (%rsi,%rsi,2), %rsi
addq %rax, %rsi
cmpl (%rcx,%rsi), %edx
je 0x1c3c91
movq (%r12), %rcx
leaq (%rax,%rax,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rax, %rdx
leaq (%rcx,%rdx), %r10
movl (%rcx,%rdx), %ecx
movq 0x8(%rsp), %rdx
addq %rcx, %rdx
movq %rdx, 0x10(%rsp)
movq (%r15,%rcx,8), %r8
movq (%r14,%rcx,8), %r9
movq %rbp, %r11
subq %rax, %r11
leaq 0xc76ac(%rip), %rdi     # 0x28b318
leaq 0x10(%rsp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movss 0x6fc6b(%rip), %xmm0    # 0x2338e8
pushq $0x0
pushq %r13
pushq %r11
pushq %r10
callq 0x35e01
addq $0x20, %rsp
movq %rbp, %rax
incq %rbp
movq 0x8(%r12), %rcx
addq $0x1c, %rbx
cmpq %rcx, %rbp
jbe 0x1c3c18
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq -0x1(%rdx), %rax
xorl %ebp, %ebp
cmpq $0x1, %rax
ja 0x1c3d47
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2090
leaq 0x19(%rax), %rdi
callq 0x2280
movq %rax, %r15
leaq 0x79852(%rip), %rsi     # 0x23d53f
movq %rax, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2050
movl $0x1, %edi
movl $0x68, %esi
callq 0x2120
cmpq $0x1, %r14
movq %rax, 0x40(%rbx)
movq %r14, 0x60(%rax)
leaq 0x786e2(%rip), %rax     # 0x23c3fe
leaq 0x6f884(%rip), %rsi     # 0x2335a7
cmoveq %rax, %rsi
movq %r15, %rdi
callq 0x2210
movq 0x40(%rbx), %rcx
movq %rax, (%rcx)
xorl %ebp, %ebp
testq %rax, %rax
setne %bpl
movq %r15, %rdi
callq 0x2220
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movq 0x40(%rdi), %rax
testq %rax, %rax
je 0x1c3da0
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rax), %rdi
callq 0x2220
movq 0x40(%rbx), %rax
movq 0x38(%rax), %rdi
callq 0x2220
movq 0x40(%rbx), %rax
movq 0x40(%rax), %rdi
callq 0x2220
movq 0x40(%rbx), %rax
movq (%rax), %rdi
callq 0x2190
movq 0x40(%rbx), %rdi
callq 0x2220
movq $0x0, 0x40(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: rov2uov(unsigned long, ul_idx_t const*, utg_rid_dt*, uc_block_t*, ul_ov_t*, unsigned int, long)
uint64_t rov2uov(uint64_t rid, const ul_idx_t *uref, utg_rid_dt *ru_map, uc_block_t *rovlp, ul_ov_t *res, uint32_t adjust_rev, int64_t ulid)
{
	uint64_t ori = ru_map->u&1, ts, te;
	if(!ori) {
		ts = rovlp->ts; te = rovlp->te;
	} else {
		ts = uref->r_ug->rg->seq[rid].len - rovlp->te;
		te = uref->r_ug->rg->seq[rid].len - rovlp->ts;
	}
	// if(ulid == 14714) {
	// 	fprintf(stderr, "[M::%s::]\tori::%lu\trovlp->rev::%u\tro_t::[%u, %u)\tt::[%lu, %lu)\toff::%u\n", __func__, 
	// 		ori, rovlp->rev, rovlp->ts, rovlp->te, ts, te, ru_map->off);
	// }
	ts += ru_map->off; te += ru_map->off;
	if(ts >= 0 && te <= uref->ug->g->seq[ru_map->u>>1].len) {
		memset(res, 0, sizeof(*res));
		res->qn = 0; res->qs = rovlp->qs; res->qe = rovlp->qe; 
		res->tn = ru_map->u>>1; res->ts = ts; res->te = te; 
		res->el = rovlp->el; res->rev = (rovlp->rev == ori?0:1);
		if(adjust_rev && res->rev) {///for linear chaining
			res->ts = uref->ug->g->seq[res->tn].len - te;
			res->te = uref->ug->g->seq[res->tn].len - ts;
		}
		return 1;
	} 
	return 0;
	// if(ulid == 14714) {
	// 	fprintf(stderr, "[M::%s::]\tulen::%u\trlen::%u\tro_t::[%u, %u)\tt::[%lu, %lu)\toff::%u\n", __func__, 
	// 		uref->ug->g->seq[res->tn].len, uref->r_ug->rg->seq[rid].len, rovlp->ts, rovlp->te, ts, te, ru_map->off);
	// }
}

// Assembly:
movl (%rdx), %r10d
testb $0x1, %r10b
jne 0x1c4460
movl 0xc(%rcx), %eax
movl 0x10(%rcx), %r11d
jmp 0x1c4480
movq 0x28(%rsi), %rax
movq 0x20(%rax), %rax
movq 0x20(%rax), %rax
movl $0x7fffffff, %r11d      # imm = 0x7FFFFFFF
andl (%rax,%rdi,8), %r11d
movl %r11d, %eax
subl 0x10(%rcx), %eax
subl 0xc(%rcx), %r11d
pushq %r14
pushq %rbx
movl %r11d, %r11d
movl 0x4(%rdx), %edi
addq %rdi, %r11
movq (%rsi), %rbx
movq 0x18(%rbx), %rbx
movq 0x20(%rbx), %rbx
movl %r10d, %r14d
shrl %r14d
movl (%rbx,%r14,8), %ebx
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
cmpq %rbx, %r11
jbe 0x1c44b3
xorl %eax, %eax
jmp 0x1c4553
andl $0x1, %r10d
addl %eax, %edi
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%r8)
movups %xmm0, (%r8)
movl 0x4(%rcx), %eax
movl %eax, 0x4(%r8)
movl 0x8(%rcx), %eax
movl %eax, 0x8(%r8)
movl (%rdx), %edx
shrl %edx
movl %edx, 0xc(%r8)
movl %edi, 0x10(%r8)
movl %r11d, 0x14(%r8)
movl 0x20(%rcx), %eax
shll $0x17, %eax
andl $0x40000000, %eax       # imm = 0x40000000
movl $0xbfffffff, %ebx       # imm = 0xBFFFFFFF
andl 0x18(%r8), %ebx
orl %eax, %ebx
movl %ebx, 0x18(%r8)
movl 0x20(%rcx), %ecx
shrl $0x5, %ecx
andl $0x1, %ecx
xorl %eax, %eax
cmpl %ecx, %r10d
setne %al
shll $0x1f, %eax
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
orl %eax, %ebx
movl %ebx, 0x18(%r8)
movl $0x1, %eax
testl %r9d, %r9d
je 0x1c4553
cmpl %ecx, %r10d
je 0x1c4553
movq (%rsi), %rcx
movq 0x18(%rcx), %rcx
movq 0x20(%rcx), %rcx
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movl (%rcx,%rdx,8), %r9d
andl %esi, %r9d
subl %r11d, %r9d
movl %r9d, 0x10(%r8)
andl (%rcx,%rdx,8), %esi
subl %edi, %esi
movl %esi, 0x14(%r8)
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r15
movq %r8, %rbx
movq %rdi, %r12
movq 0x40(%rsp), %r14
cmpq %rcx, %rsi
movq %rcx, %r8
cmovgq %rsi, %r8
cmpq %rbx, %rdx
movq %rbx, %rbp
cmovlq %rdx, %rbp
cmpq %r8, %rbp
jle 0x1c475f
movq %rdx, %r13
cmpq %rcx, %rsi
jle 0x1c4780
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r14, %r9
callq 0x36ec9
movq %rax, %rcx
jmp 0x1c4782
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rbx, %r8
movq %r14, %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x36ec9
xorl %ecx, %ecx
cmpq %rbx, %r13
jge 0x1c47a5
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rcx, %r15
movq %rbp, %rcx
movq %rbx, %r8
movq %r14, %r9
callq 0x36ec9
movq %r15, %rcx
jmp 0x1c47a7
xorl %eax, %eax
addq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/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 %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x4(%rdi), %ebx
movl 0x8(%rdi), %r11d
movl 0x10(%rdi), %eax
movl 0x14(%rdi), %r15d
movq %rdx, %r14
subq %r15, %r14
movq %rdx, %r10
subq %rax, %r10
cmpl $0x0, 0x18(%rdi)
cmovnsq %rax, %r14
cmovnsq %r15, %r10
xorl %eax, %eax
movq %r14, %r15
subq %rbx, %r15
cmovgeq %r15, %rax
movq %rsi, %r15
subq %r11, %r15
movq %rdx, %r12
subq %r10, %r12
addq %r15, %r10
addq %r12, %r11
cmpq %r12, %r15
cmovgq %rdx, %r10
cmovleq %rsi, %r11
testq %rcx, %rcx
je 0x1c59b0
xorl %esi, %esi
subq %r14, %rbx
cmovgq %rbx, %rsi
movq %rsi, (%rcx)
testq %r8, %r8
je 0x1c59b8
movq %r11, (%r8)
movq 0x28(%rsp), %rcx
testq %r9, %r9
je 0x1c59c5
movq %rax, (%r9)
testq %rcx, %rcx
je 0x1c59cd
movq %r10, (%rcx)
cmpl $0x0, 0x18(%rdi)
jns 0x1c59ec
testq %r9, %r9
je 0x1c59e1
movq %rdx, %rsi
subq %r10, %rsi
movq %rsi, (%r9)
testq %rcx, %rcx
je 0x1c59ec
subq %rax, %rdx
movq %rdx, (%rcx)
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
testb $0x1, %dil
jne 0x1c5a13
movq 0x20(%rdx), %rax
shrl %edi
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl (%rax,%rdi,8), %ecx
movl $0x1, %eax
cmpl %ecx, 0x14(%rsi)
jne 0x1c5a19
retq
cmpl $0x0, 0x10(%rsi)
je 0x1c5a1c
xorl %eax, %eax
retq
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: extend_end_coord(mg_lchain_t*, ul_ov_t*, long, long, long*, long*, long*, long*)
void extend_end_coord(mg_lchain_t *li, ul_ov_t *ui, const int64_t qlen, const int64_t rlen, int64_t *r_qs, int64_t *r_qe, int64_t *r_rs, int64_t *r_re)
{
    int64_t qs = 0, qe = 0, rs = 0, re = 0, rev = 0, qtail = 0, rtail = 0;
	if(li) {
		qs = li->qs; qe = li->qe; rs = li->rs; re = li->re; rev = li->v&1; 
		if(rev) {
			rs = rlen - li->re; re = rlen - li->rs;
		}
	}
	if(ui) {
		qs = ui->qs; qe = ui->qe; rs = ui->ts; re = ui->te; rev = ui->rev; 
		if(rev) {
        rs = rlen - ui->te; re = rlen - ui->ts;
    	}
	}
    
    
    
    if(qs <= rs) {
        rs -= qs; qs = 0;
    } else {
        qs -= rs; rs = 0;
    }

    qtail = qlen - qe; rtail = rlen - re;
    if(qtail <= rtail) {
        qe = qlen; re += qtail;
    }
    else {
        re = rlen; qe += rtail; 
    }

	if(r_qs) (*r_qs) = qs; if(r_qe) (*r_qe) = qe;
	if(r_rs) (*r_rs) = rs; if(r_re) (*r_re) = re;
    if(rev) {
        if(r_rs) (*r_rs) = rlen - re; 
		if(r_re) (*r_re) = rlen - rs;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x1c62da
movslq 0x14(%rdi), %r11
movslq 0x18(%rdi), %r10
movslq 0xc(%rdi), %rbx
movslq 0x10(%rdi), %rax
testb $0x1, 0x8(%rdi)
je 0x1c62e4
movq %rcx, %r14
subq %rax, %r14
movq %rcx, %rax
subq %rbx, %rax
movl $0x1, %edi
movq %r14, %rbx
jmp 0x1c62e6
xorl %r11d, %r11d
xorl %r10d, %r10d
xorl %ebx, %ebx
xorl %eax, %eax
xorl %edi, %edi
testq %rsi, %rsi
je 0x1c6317
movl 0x4(%rsi), %r11d
movl 0x8(%rsi), %r10d
movl 0x10(%rsi), %ebx
movl 0x14(%rsi), %eax
cmpl $0x0, 0x18(%rsi)
js 0x1c6303
xorl %edi, %edi
jmp 0x1c6317
movq %rcx, %rsi
subq %rax, %rsi
movq %rcx, %rax
subq %rbx, %rax
movl $0x1, %edi
movq %rsi, %rbx
xorl %esi, %esi
movq %rbx, %r14
subq %r11, %r14
cmovgeq %r14, %rsi
movq %rdx, %r14
subq %r10, %r14
movq %rcx, %r15
subq %rax, %r15
addq %r14, %rax
addq %r15, %r10
cmpq %r15, %r14
cmovleq %rdx, %r10
cmovgq %rcx, %rax
testq %r8, %r8
je 0x1c6351
xorl %edx, %edx
subq %rbx, %r11
cmovgq %r11, %rdx
movq %rdx, (%r8)
movq 0x20(%rsp), %r8
testq %r9, %r9
je 0x1c635e
movq %r10, (%r9)
movq 0x28(%rsp), %rdx
testq %r8, %r8
je 0x1c636b
movq %rsi, (%r8)
testq %rdx, %rdx
je 0x1c6373
movq %rax, (%rdx)
testq %rdi, %rdi
je 0x1c6391
testq %r8, %r8
je 0x1c6386
movq %rcx, %rdi
subq %rax, %rdi
movq %rdi, (%r8)
testq %rdx, %rdx
je 0x1c6391
subq %rsi, %rcx
movq %rcx, (%rdx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: select_mul_way_nodes(mg_pathv_t*, long, vec_sp_node_t*, float, int, unsigned long*)
int64_t select_mul_way_nodes(mg_pathv_t *a, int64_t a_n, vec_sp_node_t *out, float len_dif, int32_t m_pathn, uint64_t *flag)
{
	int64_t i, k, pd, kd, occ, tt = 0; uint32_t pp; mg_pathv_t *p = NULL;
	if(a_n > 1) radix_sort_mg_pathv_t_d_srt(a, a + a_n);
	for (i = 0; i < a_n; i++) {
		p = &(a[i]); pp = (p->d<<1)>>1; pd = out->a[p->pre]->di>>32; occ = 1;
		
		if(p->d&0x80000000) break;
		for (k = 0; k < a_n; k++) {
			if(k == i) continue; ///same alignment
			if(((a[k].d<<1)>>1) == pp) continue; //same path
			if(a[k].v!=p->v) continue;
			kd = out->a[a[k].pre]->di>>32;
			if(kd >= (pd*(1-len_dif)) && kd <= (pd*(1+len_dif))) occ++;
		}
		if(occ >= m_pathn) {
			flag[p->pre] = 1; tt++;
		}
	}

	return tt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x10(%rsp)
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
cmpq $0x2, %rsi
jl 0x1c65a0
leaq (%r14,%r14,2), %rax
leaq (%r15,%rax,4), %rsi
movq %r15, %rdi
movss %xmm0, 0xc(%rsp)
callq 0x197590
movss 0xc(%rsp), %xmm0
testq %r14, %r14
jle 0x1c6686
movq (%r12), %rcx
movss 0x5bb0b(%rip), %xmm1    # 0x2220c0
movaps %xmm1, %xmm5
subss %xmm0, %xmm5
addss %xmm1, %xmm0
movslq %ebp, %rdx
leaq 0x8(%r15), %rsi
xorl %edi, %edi
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
xorl %eax, %eax
leaq (%rdi,%rdi,2), %r10
movl 0x4(%r15,%r10,4), %r9d
testl %r9d, %r9d
js 0x1c6688
leaq (%r15,%r10,4), %r11
movslq 0x8(%r11), %r10
movq (%rcx,%r10,8), %r12
movl 0x4(%r12), %r12d
xorps %xmm1, %xmm1
cvtsi2ss %r12, %xmm1
movaps %xmm5, %xmm2
mulss %xmm1, %xmm2
mulss %xmm0, %xmm1
movl $0x1, %r12d
movq %rsi, %r13
xorl %ebp, %ebp
cmpq %rbp, %rdi
je 0x1c6657
movl -0x4(%r13), %ebx
andl %r8d, %ebx
cmpl %r9d, %ebx
je 0x1c6657
movl -0x8(%r13), %ebx
cmpl (%r11), %ebx
jne 0x1c6657
movslq (%r13), %rbx
movq (%rcx,%rbx,8), %rbx
movl 0x4(%rbx), %ebx
xorps %xmm3, %xmm3
cvtsi2ss %rbx, %xmm3
movaps %xmm2, %xmm4
cmpleps %xmm3, %xmm4
cmpleps %xmm1, %xmm3
andps %xmm4, %xmm3
movd %xmm3, %ebx
andl $0x1, %ebx
addq %rbx, %r12
incq %rbp
addq $0xc, %r13
cmpq %rbp, %r14
jne 0x1c6612
cmpq %rdx, %r12
jl 0x1c6678
movq 0x10(%rsp), %r9
movq $0x1, (%r9,%r10,8)
incq %rax
incq %rdi
cmpq %r14, %rdi
jne 0x1c65d1
jmp 0x1c6688
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: hc_chain_backtrack(long, long const*, unsigned long const*, unsigned long*, unsigned long*, unsigned long*, long*, long*)
int64_t hc_chain_backtrack(int64_t n, const int64_t *f, const uint64_t *p, uint64_t *srt, uint64_t *u, uint64_t *v, 
int64_t *n_u_, int64_t *n_v_)
{
	if(n_u_) *n_u_ = 0; if(n_v_) *n_v_ = 0;
	int64_t i, k, n_v, n_srt, n_v0, n_u, sc;
	if (n == 0) return 0;
	// v[] keeps the peak score up to i; f[] is the score ending at i, not always the peak
	*n_u_ = *n_v_ = 0;	
	for (i = 0, k = 0; i < n; ++i) {
		if(f[i] >= 0) {
			srt[k] = (uint64_t)f[i]; srt[k] <<= 32; srt[k] |= (((uint64_t)i)<<1); k++;
		}
	}
	n_srt = k;
	radix_sort_gfa64(srt, srt + n_srt); ///sort by score

	///from the largest to the smallest
	for (k = n_srt-1, n_v = n_u = 0; k >= 0; --k) { // precompute n_u
		n_v0 = n_v;
		for (i = ((uint32_t)srt[k])>>1; i >= 0 && (srt[i]&1) == 0; i = (p[i]==(uint64_t)-1?-1:p[i])) {
			v[n_v++] = i; srt[i] |= 1;
		}
		if(n_v <= n_v0) continue;
		sc = i < 0? srt[k]>>32: (int64_t)(srt[k]>>32)-f[i]; 
		u[n_u++] = (((uint64_t)sc)<<32) | ((uint64_t)(n_v-n_v0));
	}

	if(n_u_) *n_u_ = n_u; if(n_v_) *n_v_ = n_v;
	return n_u;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
testq %rcx, %rcx
je 0x1c6e88
movq $0x0, (%rcx)
testq %rax, %rax
je 0x1c6e94
movq $0x0, (%rax)
testq %rdi, %rdi
je 0x1c6f3d
xorl %ebp, %ebp
movq %rbp, (%rax)
movq %rbp, (%rcx)
testq %rdi, %rdi
jle 0x1c6ecf
xorl %eax, %eax
xorl %ebp, %ebp
movq (%r13,%rax,4), %rcx
testq %rcx, %rcx
js 0x1c6ec6
shlq $0x20, %rcx
orq %rax, %rcx
movq %rcx, (%r15,%rbp,8)
incq %rbp
addq $0x2, %rax
decq %rdi
jne 0x1c6eae
leaq (%r15,%rbp,8), %rsi
movq %r15, %rdi
callq 0x194fef
testq %rbp, %rbp
jle 0x1c6f41
xorl %eax, %eax
xorl %ecx, %ecx
movq %rcx, %rdi
movq %rbp, %rdx
decq %rbp
movl -0x8(%r15,%rdx,8), %esi
shrl %esi
testb $0x1, (%r15,%rsi,8)
jne 0x1c6f10
movq %rsi, (%rbx,%rcx,8)
orb $0x1, (%r15,%rsi,8)
incq %rcx
movq (%r12,%rsi,8), %rsi
testq %rsi, %rsi
jns 0x1c6ef4
movq %rcx, %r8
subq %rdi, %r8
jle 0x1c6f35
movl 0x4(%r15,%rbp,8), %edi
testq %rsi, %rsi
js 0x1c6f27
subq (%r13,%rsi,8), %rdi
shlq $0x20, %rdi
orq %r8, %rdi
movq %rdi, (%r14,%rax,8)
incq %rax
cmpq $0x1, %rdx
jg 0x1c6ee4
jmp 0x1c6f45
xorl %eax, %eax
jmp 0x1c6f55
xorl %ecx, %ecx
xorl %eax, %eax
movq 0x40(%rsp), %rdx
movq %rax, (%rdx)
movq 0x48(%rsp), %rdx
movq %rcx, (%rdx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %r9, %rbx
movq %rcx, %r15
movq %rdx, %r9
movl 0x18(%rsi), %eax
leal 0x80(%rax), %ecx
movl 0x14(%rdi), %edx
cmpl %edx, %ecx
jle 0x1c7071
movq %rsi, %r12
movl 0x14(%rsi), %ecx
cmpl %edx, %ecx
jge 0x1c7071
movq %r8, %r14
movq %rdi, %r13
movsd %xmm0, 0x8(%rsp)
movl 0x8(%rdi), %esi
movl %esi, %r8d
shrl %r8d
leaq 0x34(%rsp), %rdi
movl %r8d, 0xc(%rdi)
shll $0x1f, %esi
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
movl 0x18(%rdi), %r10d
andl %r8d, %r10d
orl %esi, %r10d
movl %r10d, 0x18(%rdi)
movl 0xc(%r13), %esi
movl %esi, 0x10(%rdi)
movl 0x10(%r13), %esi
movl %esi, 0x14(%rdi)
movl %edx, 0x4(%rdi)
movl 0x18(%r13), %edx
movl %edx, 0x8(%rdi)
movl 0x8(%r12), %edx
movl %edx, %r10d
shrl %r10d
leaq 0x18(%rsp), %rsi
movl %r10d, 0xc(%rsi)
shll $0x1f, %edx
andl 0x18(%rsi), %r8d
orl %edx, %r8d
movl %r8d, 0x18(%rsi)
movl 0xc(%r12), %edx
movl %edx, 0x10(%rsi)
movl 0x10(%r12), %edx
movl %edx, 0x14(%rsi)
movl %ecx, 0x4(%rsi)
movl %eax, 0x8(%rsi)
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x6f050
movl 0x8(%r13), %edx
movl 0x8(%r12), %ecx
cmpl %ecx, %edx
je 0x1c7071
xorl $0x1, %edx
xorl $0x1, %ecx
leaq 0x10(%rsp), %r10
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %r8
movsd 0x8(%rsp), %xmm0
movq %rax, %r9
pushq %r10
pushq $0x0
callq 0x1a24f3
addq $0x10, %rsp
movq %rax, %rcx
movl $0x1, %eax
testq %rcx, %rcx
jne 0x1c7073
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
cmpq $0x2, %rdx
jb 0x1c72c5
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %r12d
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
leaq (%r12,%r12,2), %rax
movl -0xc(%r14,%rax,4), %edi
movl (%r14,%rax,4), %edx
movq 0x28(%r15), %rax
movq (%rax,%rdi,8), %r8
movq %r8, %rax
andq %r13, %rax
setne %cl
je 0x1c72b2
movq 0x8(%r15), %rsi
shrq $0x20, %r8
leaq (%r8,%r8,2), %r8
leaq (%rsi,%r8,8), %r9
cmpl %edx, 0x8(%r9)
je 0x1c72a4
leaq (%rsi,%r8,8), %rsi
addq $0x20, %rsi
leaq -0x1(%rax), %rcx
xorl %r8d, %r8d
cmpq %r8, %rcx
je 0x1c72b2
leaq 0x18(%rsi), %r9
incq %r8
cmpl %edx, (%rsi)
movq %r9, %rsi
jne 0x1c728b
cmpq %rax, %r8
setb %cl
testb %cl, %cl
je 0x1c72b2
incq %r12
cmpq %rbx, %r12
jne 0x1c7246
jmp 0x1c72bc
movq %rdi, %rsi
callq 0x2a448
jmp 0x1c72a8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
leaq -0x1(%rsi), %rcx
leaq (%rsi,%rsi,2), %rax
testq %rcx, %rcx
jle 0x1c72f2
leaq (%rdi,%rax,4), %rdx
addq $-0x8, %rdx
movq %rsi, %rcx
movl -0xc(%rdx), %r8d
subl %r8d, (%rdx)
addq $-0xc, %rdx
decq %rcx
cmpq $0x1, %rcx
jg 0x1c72de
cmpq $0x2, %rsi
jae 0x1c72fc
xorl %eax, %eax
jmp 0x1c7356
movq %rsi, %rcx
shrq %rcx
leaq (%rdi,%rax,4), %rdx
addq $-0xc, %rdx
xorl %eax, %eax
movq %rdi, %r8
movl 0x8(%r8), %r9d
movl %r9d, -0x8(%rsp)
movq (%r8), %r9
movq %r9, -0x10(%rsp)
movl 0x8(%rdx), %r9d
movl %r9d, 0x8(%r8)
movq (%rdx), %r9
movq %r9, (%r8)
movq -0x10(%rsp), %r9
movq %r9, (%rdx)
movl -0x8(%rsp), %r9d
movl %r9d, 0x8(%rdx)
xorb $0x1, (%r8)
xorb $0x1, (%rdx)
incq %rax
addq $0xc, %r8
addq $-0xc, %rdx
cmpq %rax, %rcx
jne 0x1c730f
testb $0x1, %sil
je 0x1c7364
leaq (%rax,%rax,2), %rax
xorb $0x1, (%rdi,%rax,4)
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
testl %esi, %esi
je 0x1c73c7
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, %r14d
movq 0xc2c3e(%rip), %r15     # 0x289fe0
cmpl $-0x1, (%rbx)
movq (%r15), %rsi
movq %rbx, %rdi
jne 0x1c73b4
callq 0x2a578
jmp 0x1c73b9
callq 0x2a531
addq $0x28, %rbx
decq %r14
jne 0x1c73a2
popq %rbx
popq %r14
popq %r15
retq