LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/./Levenshtein_distance.h
// Function: push_trace_bp(asg16_v*, unsigned short, unsigned short, unsigned int, unsigned int)
inline void push_trace_bp(asg16_v *res, uint16_t c, uint16_t b, uint32_t len, uint32_t is_append)
{
    uint16_t p, c0, b0, len0, mm; 
	if((is_append) && (res->n)) {
		b0 = b;
		pop_trac_bpc(res->a[res->n-1], c0, b0, len0);
		if((c == c0) && (b == b0)) {
			res->n--; len += len0;
		}
	}
	
	mm = (0x3fff); c0 = c; c <<= 14;
	if(c0 == 1 || c0 == 2) {
		mm = (0xfff); c += ((b&3) << 12);
	}

	
	while (len >= mm) {
		p = (c + mm); kv_push(uint16_t, *res, p); len -= mm;
	}
	// fprintf(stderr, "[M::%s] c::%u, len::%u\n", __func__, c, len);
	if(len) {
		p = (c + len); kv_push(uint16_t, *res, p);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %r8d, %r8d
je 0x14f471
movq (%rbx), %rax
testq %rax, %rax
je 0x14f471
movq 0x10(%rbx), %rdi
movzwl -0x2(%rdi,%rax,2), %edi
movl %edi, %r11d
shrl $0xe, %r11d
movl %r11d, %r8d
addl $-0x3, %r8d
cmpw $-0x2, %r8w
setb %r9b
movl %edi, %r10d
shrl $0xc, %r10d
andl $0x3, %r10d
cmpw %dx, %r10w
sete %r10b
cmpw %si, %r11w
jne 0x14f471
orb %r10b, %r9b
je 0x14f471
cmpw $-0x2, %r8w
movl $0x3fff, %r8d           # imm = 0x3FFF
movl $0xfff, %r9d            # imm = 0xFFF
cmovbl %r8d, %r9d
andl %r9d, %edi
decq %rax
movq %rax, (%rbx)
addl %edi, %ecx
movl %esi, %eax
shll $0xe, %eax
decl %esi
andl $0x3, %edx
shll $0xc, %edx
xorl %r14d, %r14d
cmpw $0x2, %si
cmovbl %edx, %r14d
movl $0xfff, %edx            # imm = 0xFFF
movl $0x3fff, %r12d          # imm = 0x3FFF
cmovbl %edx, %r12d
orl %eax, %r14d
leal (%r14,%r12), %ebp
addl %ecx, %r14d
movzwl %r12w, %r13d
movl %ecx, %r15d
subl %r12d, %r15d
jb 0x14f4f2
movq (%rbx), %rcx
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rcx
jne 0x14f4df
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%rbx)
addq %rsi, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%rbx)
movq (%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbx)
movw %bp, (%rax,%rcx,2)
subl %r13d, %r14d
movl %r15d, %ecx
jmp 0x14f4a9
testl %ecx, %ecx
je 0x14f533
movq (%rbx), %rcx
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rcx
jne 0x14f527
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%rbx)
addq %rsi, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%rbx)
movq (%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbx)
movw %r14w, (%rax,%rcx,2)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/./Levenshtein_distance.h
// Function: pop_trace_bp(asg16_v*, unsigned int, unsigned short*, unsigned short*, unsigned int*)
inline uint32_t pop_trace_bp(asg16_v *res, uint32_t i, uint16_t *c, uint16_t *b, uint32_t *len)
{
	(*c) = (res->a[i]>>14); 
	if((*c) == 1 || (*c) == 2) {
		(*b) = ((res->a[i]>>12)&3); 
		(*len) = (res->a[i]&(0xfff));
	} else {
		(*b) = (uint16_t)-1; 
		(*len) = (res->a[i]&(0x3fff));
	}

	uint32_t sl; uint16_t sb;
	for (i++; (i < res->n) && ((*c) == (res->a[i]>>14)); i++) {
		if((*c) == 1 || (*c) == 2) {
			sb = ((res->a[i]>>12)&3); sl = (res->a[i]&(0xfff));
		} else {
			sb = (uint16_t)-1; sl = (res->a[i]&(0x3fff));
		}
		if((*b) != sb) break;
		(*len) += sl;
	}
	return i;
}

// Assembly:
pushq %rbx
movq 0x10(%rdi), %r9
movl %esi, %eax
movzwl (%r9,%rax,2), %r10d
shrl $0xe, %r10d
movw %r10w, (%rdx)
decl %r10d
cmpw $0x1, %r10w
ja 0x14f716
movzwl (%r9,%rax,2), %r10d
shrl $0xc, %r10d
andl $0x3, %r10d
movw %r10w, (%rcx)
movzwl (%r9,%rax,2), %eax
andl $0xfff, %eax            # imm = 0xFFF
jmp 0x14f72a
orw $-0x1, (%rcx)
movzwl (%r9,%rax,2), %eax
andl $0x3fff, %eax           # imm = 0x3FFF
movl $0xffff, %r10d          # imm = 0xFFFF
movzwl %ax, %r11d
movq (%rdi), %rcx
incl %esi
movl %r11d, %edi
movl %esi, %eax
cmpq %rax, %rcx
jbe 0x14f780
movzwl (%rdx), %esi
movzwl (%r9,%rax,2), %r11d
movl %r11d, %ebx
shrl $0xe, %ebx
cmpl %esi, %ebx
jne 0x14f780
decl %esi
cmpw $0x1, %si
ja 0x14f769
movl %r11d, %ebx
shrl $0xc, %ebx
andl $0x3, %ebx
andl $0xfff, %r11d           # imm = 0xFFF
jmp 0x14f775
andl $0x3fff, %r11d          # imm = 0x3FFF
movl $0xffff, %ebx           # imm = 0xFFFF
addl %edi, %r11d
leal 0x1(%rax), %esi
cmpl %r10d, %ebx
je 0x14f733
movl %edi, (%r8)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/./Levenshtein_distance.h
// Function: pop_trace_bp_rev_f(asg16_v*, long, unsigned short*, unsigned short*, unsigned short*, unsigned int*)
inline int64_t pop_trace_bp_rev_f(asg16_v *res, int64_t i, uint16_t *c, uint16_t *bq, uint16_t *bt, uint32_t *len)
{
	(*c) = (res->a[i]>>14); (*bq) = (*bt) = (uint16_t)-1;
	if((*c) == 2 || (*c) == 3) {
		(*bt) = ((res->a[i]>>12)&3); 
		(*len) = (res->a[i]&(0xfff));
	} else if((*c) == 1) {
		(*bt) = ((res->a[i]>>12)&3);
		(*bq) = ((res->a[i]>>10)&3);
		(*len) = (res->a[i]&(0x3ff));
	} else {
		(*len) = (res->a[i]&(0x3fff));
	}

	uint32_t sl; uint16_t sbq, sbt;
	for (i--; (i >= 0) && ((*c) == (res->a[i]>>14)); i--) {
		sbq = sbt = (uint16_t)-1;
		if((*c) == 2 || (*c) == 3) {
			sbt = ((res->a[i]>>12)&3); 
			sl = (res->a[i]&(0xfff));
		} else if((*c) == 1) {
			sbt = ((res->a[i]>>12)&3);
			sbq = ((res->a[i]>>10)&3);
			sl = (res->a[i]&(0x3ff));
		} else {
			sl = (res->a[i]&(0x3fff));
		}
		if((*bq) != sbq || (*bt) != sbt) break;
		(*len) += sl;
	}
	if((*c) == 3) {
		(*bq) = (*bt); (*bt) = (uint16_t)-1;
	}
	return i;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rax
movq 0x10(%rdi), %rdi
movzwl (%rdi,%rsi,2), %esi
shrl $0xe, %esi
movw %si, (%rdx)
orw $-0x1, (%r8)
movq %rcx, %rsi
orw $-0x1, (%rcx)
movzwl (%rdx), %ecx
leal -0x2(%rcx), %r10d
cmpl $0x2, %r10d
jae 0x14f7f7
movw $0xfff, %r10w           # imm = 0xFFF
movw $0xc, %cx
movq %r8, %r11
jmp 0x14f81b
movw $0x3fff, %r10w          # imm = 0x3FFF
cmpl $0x1, %ecx
jne 0x14f828
movzwl (%rdi,%rax,2), %ecx
shrl $0xc, %ecx
andl $0x3, %ecx
movw %cx, (%r8)
movw $0x3ff, %r10w           # imm = 0x3FF
movw $0xa, %cx
movq %rsi, %r11
movzwl (%rdi,%rax,2), %ebx
shrl %cl, %ebx
andl $0x3, %ebx
movw %bx, (%r11)
andw (%rdi,%rax,2), %r10w
movzwl %r10w, %r10d
movl %r10d, (%r9)
movzwl (%rdx), %ecx
leal -0x2(%rcx), %edx
testq %rax, %rax
jle 0x14f8b0
movzwl -0x2(%rdi,%rax,2), %r11d
movl %r11d, %ebx
shrl $0xe, %ebx
cmpl %ecx, %ebx
jne 0x14f8b0
cmpl $0x2, %edx
jae 0x14f866
movl %r11d, %ebx
shrl $0xc, %ebx
andl $0x3, %ebx
andl $0xfff, %r11d           # imm = 0xFFF
jmp 0x14f891
cmpl $0x1, %ecx
jne 0x14f886
movl %r11d, %ebx
shrl $0xc, %ebx
andl $0x3, %ebx
movl %r11d, %ebp
shrl $0xa, %ebp
andl $0x3, %ebp
andl $0x3ff, %r11d           # imm = 0x3FF
jmp 0x14f896
andl $0x3fff, %r11d          # imm = 0x3FFF
movw $0xffff, %bx            # imm = 0xFFFF
movl $0xffff, %ebp           # imm = 0xFFFF
movzwl (%rsi), %r14d
cmpl %r14d, %ebp
jne 0x14f8b0
cmpw %bx, (%r8)
jne 0x14f8b0
addl %r11d, %r10d
movl %r10d, (%r9)
decq %rax
jmp 0x14f83a
decq %rax
cmpl $0x3, %ecx
jne 0x14f8c4
movzwl (%r8), %ecx
movw %cx, (%rsi)
orw $-0x1, (%r8)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/ecovlp.cpp
// Function: get_cns_arc_bp(cns_gfa*, unsigned int, unsigned int, unsigned int, unsigned int)
inline uint32_t get_cns_arc_bp(cns_gfa *cns, uint32_t src, uint32_t bp, uint32_t is_ou, uint32_t av_bp)
{
    uint32_t k, s, e;
    if(is_ou) {
        s = 0; e = (*cns).a[src].arc.nou;
    } else {
        s = (*cns).a[src].arc.nou; e = (*cns).a[src].arc.n;
    }

    for (k = s; k < e; k++) {
        if((*cns).a[src].arc.a[k].v == 0 || (*cns).a[src].arc.a[k].v == 1) continue;
        if(av_bp && (*cns).a[src].arc.a[k].v >= (*cns).bb0 && (*cns).a[src].arc.a[k].v < (*cns).bb1) continue;///no backbone
        if((*cns).a[(*cns).a[src].arc.a[k].v].c == bp) {
            return k;
        }
    }
    
    return ((uint32_t)-1);
}

// Assembly:
movq 0x10(%rdi), %r9
movl %esi, %eax
testl %ecx, %ecx
je 0x14f8e3
imulq $0x28, %rax, %rcx
leaq (%r9,%rcx), %rsi
addq $0x18, %rsi
xorl %ecx, %ecx
jmp 0x14f8f2
imulq $0x28, %rax, %rcx
leaq (%r9,%rcx), %rsi
addq $0x8, %rsi
movl 0x10(%rsi), %ecx
movl (%rsi), %esi
imulq $0x28, %rax, %rax
leaq (%r9,%rax), %r10
addq $0x20, %r10
pushq $-0x1
popq %rax
cmpq %rsi, %rcx
jae 0x14f945
movq (%r10), %r11
movl (%r11,%rcx,8), %r11d
andl $0x7fffffff, %r11d      # imm = 0x7FFFFFFF
cmpl $0x2, %r11d
jb 0x14f93e
testl %r8d, %r8d
je 0x14f92d
cmpl 0x28(%rdi), %r11d
jb 0x14f92d
cmpl 0x2c(%rdi), %r11d
jb 0x14f93e
imulq $0x28, %r11, %r11
movl (%r9,%r11), %r11d
andl $0x3, %r11d
cmpl %edx, %r11d
je 0x14f943
incq %rcx
jmp 0x14f903
movl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/ecovlp.cpp
// Function: insert_cns_node(cns_gfa*)
inline uint32_t insert_cns_node(cns_gfa *cns)
{
    cns_t *p; uint32_t m0; 
    if (((*cns)).n == ((*cns)).m) { 
        m0 = ((*cns)).m;
        ((*cns)).m = ((*cns)).m? ((*cns)).m<<1 : 2; 
        ((*cns)).a = (cns_t*)realloc(((*cns)).a, sizeof(cns_t) * ((*cns)).m); 
        if(((*cns)).m > m0) {
            memset(((*cns)).a + m0, 0, sizeof(cns_t)*(((*cns)).m-m0));
        }
    } 
    *(&p) = &((*cns)).a[((*cns)).n++];
    p->arc.n = p->arc.nou = 0;
    p->c = p->f = p->sc = 0;
    return ((*cns)).n - 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r15
cmpq 0x8(%rdi), %r15
jne 0x14f9a0
leaq (%r15,%r15), %rax
testq %r15, %r15
pushq $0x2
popq %rcx
cmovneq %rax, %rcx
movq %rcx, 0x8(%rbx)
movq 0x10(%rbx), %rdi
imulq $0x28, %rcx, %rsi
callq 0x2370
movq %rax, %r14
movq %rax, 0x10(%rbx)
movq 0x8(%rbx), %rax
movl %r15d, %ecx
subq %rcx, %rax
jbe 0x14f9a4
imulq $0x28, %rcx, %rcx
movq %r14, %rdi
addq %rcx, %rdi
imulq $0x28, %rax, %rdx
xorl %esi, %esi
callq 0x20e0
jmp 0x14f9a4
movq 0x10(%rbx), %r14
movq (%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, (%rbx)
imulq $0x28, %rax, %rax
andq $0x0, 0x18(%r14,%rax)
andq $0x0, 0x8(%r14,%rax)
andl $0x0, (%r14,%rax)
movl (%rbx), %eax
decl %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/tovlp.cpp
// Function: init_clean_mul_t(asg_t*, ma_ug_t*, unsigned long, unsigned char, unsigned char)
clean_mul_t *init_clean_mul_t(asg_t *g, ma_ug_t *ug, uint64_t n_threads, uint8_t fp, uint8_t fa)
{
    uint32_t i;
    clean_t *kt = NULL;
    clean_mul_t *p = NULL; CALLOC(p, 1);
    p->g = g; p->ug = ug;
    CALLOC(p->bs_flag, p->g->n_seq<<1);
    p->n = p->m = n_threads;
    CALLOC(p->a, p->n);
    for (i = 0, kt = NULL; i < p->n; i++)
    {
        kt = &(p->a[i]);
        kv_init(kt->tt.a); kv_init(kt->stack.a);
        CALLOC(kt->vis, p->g->n_seq<<1);
        init_pdq(&kt->pq_p, p->g->n_seq<<1);
        init_pdq(&kt->pq_a, p->g->n_seq<<1);
        memset(&kt->b, 0, sizeof(kt->b));
        kt->b.a = (binfo_t*)calloc(p->g->n_seq<<1, sizeof(binfo_t));
    }
    p->max_dist = get_bub_pop_max_dist_advance(g, &kt->b);
    p->fp = fp; p->fa = fa;
    return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, 0x4(%rsp)
movl %ecx, (%rsp)
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1
popq %rbp
pushq $0x40
popq %rsi
movq %rbp, %rdi
callq 0x2120
movq %rax, %r15
movq %r14, 0x30(%rax)
movq %rbx, 0x38(%rax)
movl 0x14(%r14), %r13d
leal (,%r13,2), %eax
movslq %eax, %rdi
movq %rbp, %rsi
callq 0x2120
movq %rax, 0x20(%r15)
movq %r12, 0x10(%r15)
movq %r12, 0x8(%r15)
movl $0x1a0, %esi            # imm = 0x1A0
movq %r12, 0x10(%rsp)
movq %r12, %rdi
callq 0x2120
movq %rax, %rbx
movq %r15, 0x8(%rsp)
movq %rax, (%r15)
xorl %eax, %eax
xorl %r15d, %r15d
movl %eax, %ebp
cmpq 0x10(%rsp), %rbp
jae 0x14fd3f
imulq $0x1a0, %rbp, %r12      # imm = 0x1A0
leaq (%rbx,%r12), %r15
addl %r13d, %r13d
movslq %r13d, %r13
movq %r13, %rdi
pushq $0x1
popq %rsi
callq 0x2120
andq $0x0, 0x10(%rbx,%r12)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx,%r12)
andq $0x0, 0x30(%rbx,%r12)
movups %xmm0, 0x20(%rbx,%r12)
movq %rax, 0x40(%rbx,%r12)
leaq (%rbx,%r12), %rdi
addq $0x48, %rdi
movq %r13, %rsi
callq 0xfa585
leaq (%rbx,%r12), %rdi
addq $0xb0, %rdi
movl 0x14(%r14), %eax
addl %eax, %eax
movslq %eax, %rsi
callq 0xfa585
xorps %xmm0, %xmm0
movups %xmm0, 0x170(%rbx,%r12)
movups %xmm0, 0x160(%rbx,%r12)
movups %xmm0, 0x150(%rbx,%r12)
movups %xmm0, 0x140(%rbx,%r12)
movups %xmm0, 0x130(%rbx,%r12)
movups %xmm0, 0x120(%rbx,%r12)
movl 0x14(%r14), %r13d
leal (%r13,%r13), %eax
movslq %eax, %rdi
pushq $0x1c
popq %rsi
callq 0x2120
movq %rax, 0x118(%rbx,%r12)
leal 0x1(%rbp), %eax
jmp 0x14fc71
addq $0x118, %r15            # imm = 0x118
movq %r14, %rdi
movq %r15, %rsi
callq 0x84975
movq 0x8(%rsp), %rcx
movq %rax, 0x18(%rcx)
movl (%rsp), %eax
movb %al, 0x28(%rcx)
movl 0x4(%rsp), %eax
movb %al, 0x29(%rcx)
movq %rcx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/tovlp.cpp
// Function: destroy_clean_mul_t(clean_mul_t**)
void destroy_clean_mul_t(clean_mul_t **p)
{
    uint32_t i;
    clean_t *kt = NULL;
    free((*p)->bs_flag);
    for (i = 0; i < (*p)->n; i++)
    {
        kt = &((*p)->a[i]);
        kv_destroy(kt->tt.a);
        kv_destroy(kt->stack.a);
        free(kt->vis);
        destory_pdq(&kt->pq_p);
        destory_pdq(&kt->pq_a);
        free(kt->b.a); free(kt->b.S.a); free(kt->b.T.a); free(kt->b.b.a); free(kt->b.e.a);
    }
    free((*p)->a);
    free((*p));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x20(%rax), %rdi
callq 0x2220
xorl %eax, %eax
movl %eax, %r12d
movq (%rbx), %rax
movq (%rax), %r14
cmpq %r12, 0x8(%rax)
jbe 0x14fe2d
imulq $0x1a0, %r12, %r13      # imm = 0x1A0
leaq (%r14,%r13), %r15
addq $0x48, %r15
movq -0x38(%r15), %rdi
callq 0x2220
movq -0x18(%r15), %rdi
callq 0x2220
movq -0x8(%r15), %rdi
callq 0x2220
movq %r15, %rdi
callq 0xfa60b
addq %r13, %r14
addq $0xb0, %r14
movq %r14, %rdi
callq 0xfa60b
movq 0x68(%r14), %rdi
callq 0x2220
movq 0x80(%r14), %rdi
callq 0x2220
movq 0x98(%r14), %rdi
callq 0x2220
movq 0xb0(%r14), %rdi
callq 0x2220
movq 0xc8(%r14), %rdi
callq 0x2220
leal 0x1(%r12), %eax
jmp 0x14fd93
movq %r14, %rdi
callq 0x2220
movq (%rbx), %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/tovlp.cpp
// Function: init_utg_trans_t(ma_ug_t*, ma_hit_t_alloc*, ma_sub_t*, R_to_U*, asg_t*, int, int)
utg_trans_t *init_utg_trans_t(ma_ug_t *ug, ma_hit_t_alloc* reverse_sources, ma_sub_t *coverage_cut, R_to_U* ruIndex, asg_t *read_g, int max_hang, int min_ovlp)
{
    utg_trans_t *o = NULL; 
    CALLOC(o, 1);
    o->reverse_sources = reverse_sources;
    o->coverage_cut = coverage_cut;
    o->ruIndex = ruIndex;
    o->read_g = read_g;
    o->rn = read_g->n_seq;
    memset(&(o->b0), 0, sizeof(o->b0));
    memset(&(o->b1), 0, sizeof(o->b1));
    MALLOC(o->pos_idx, o->rn); memset(o->pos_idx, -1, o->rn*sizeof(uint64_t));
    o->cug = copy_untig_graph(ug);
    o->max_hang = max_hang;
    o->min_ovlp = min_ovlp;
    return o;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, 0x4(%rsp)
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %rbp
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1
popq %rdi
movl $0x230, %esi            # imm = 0x230
callq 0x2120
movq %rax, %r15
movq %rbx, (%rax)
movq %rbp, 0x8(%rax)
movq %r13, 0x10(%rax)
movq %r12, 0x18(%rax)
movl 0x14(%r12), %ebx
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
movq %rbx, 0xe8(%rax)
shlq $0x3, %rbx
movq %rbx, %rdi
callq 0x2280
movq %rax, 0xe0(%r15)
movq %rax, %rdi
movl $0xff, %esi
movq %rbx, %rdx
callq 0x20e0
movq %r14, %rdi
callq 0x8c99a
movq %rax, 0x108(%r15)
movl 0x4(%rsp), %eax
movl %eax, 0x110(%r15)
movl 0x40(%rsp), %eax
movl %eax, 0x114(%r15)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/tovlp.cpp
// Function: get_utg_chain_length(ma_ug_t*, unsigned int*, unsigned int)
uint64_t get_utg_chain_length(ma_ug_t *ug, uint32_t *a, uint32_t a_n)
{
    uint64_t i, k, l, qn, v, w, nv, offset;
    asg_arc_t *av  = NULL;
    for (i = 0, offset = 0; i < a_n; i++)
    {
        qn = a[i]>>1;
        l = ug->g->seq[qn].len;
        if(i + 1 < a_n)
        {
            v = a[i]; w = a[i+1];
            av = asg_arc_a(ug->g, v);
            nv = asg_arc_n(ug->g, v);
            for (k = 0; k < nv; k++)
            {
                if(av[k].del) continue;
                if(av[k].v == w) 
                {
                    l = asg_arc_len(av[k]);
                    break;
                }
            }
            if(k >= nv) fprintf(stderr, "ERROR-mc\n");
        }
        offset += l;
    }
    return offset;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r15d
xorl %r12d, %r12d
xorl %ebp, %ebp
cmpq %r15, %r12
je 0x14ffa1
movl (%rbx,%r12,4), %edx
movl %edx, %eax
shrl %eax
movq 0x18(%r14), %rsi
movq 0x20(%rsi), %rcx
movl (%rcx,%rax,8), %r13d
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
incq %r12
cmpq %r15, %r12
jae 0x14ff7e
movl (%rbx,%r12,4), %ecx
movq 0x8(%rsi), %rax
movq 0x28(%rsi), %rsi
movq (%rsi,%rdx,8), %rdx
movl %edx, %esi
shrq $0x20, %rdx
imulq $0x18, %rsi, %rsi
imulq $0x18, %rdx, %rdx
leaq (%rax,%rdx), %r8
addq $0xc, %r8
xorl %edi, %edi
cmpq %rdi, %rsi
je 0x14ff83
cmpl $0x0, (%r8,%rdi)
js 0x14ff71
cmpl %ecx, -0x4(%r8,%rdi)
je 0x14ff77
addq $0x18, %rdi
jmp 0x14ff5e
addq %rdx, %rax
movl (%rdi,%rax), %r13d
addq %r13, %rbp
jmp 0x14ff0a
movq 0x103056(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0xa188c(%rip), %rdi     # 0x1f1820
pushq $0x9
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0x14ff7e
movq %rbp, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/tovlp.cpp
// Function: collect_trans_ovlp(char const*, buf_t*, unsigned long, buf_t*, unsigned long, ma_ug_t*, utg_trans_t*)
void collect_trans_ovlp(const char* cmd, buf_t* pri, uint64_t pri_offset, buf_t* aux, uint64_t aux_offset,
ma_ug_t *ug, utg_trans_t *o)
{
    uint32_t thre_pri;
    uint64_t len_aux;
    if(pri->b.n == 0 || aux->b.n == 0) return;

    len_aux = set_utg_offset(aux->b.a, aux->b.n, ug, o->read_g, o->pos_idx, 0, 0);
    chain_trans_ovlp(NULL, o, ug, o->read_g, pri, len_aux, &thre_pri);

    
    if(thre_pri > 0)
    {
        chain_trans_d(o, pri->b.a, pri->b.n, pri_offset, NULL, aux->b.a, aux->b.n, aux_offset, &len_aux, 
        ug, RC_1, -1024, __func__);
        // fprintf(stderr, "\n%s, thre_pri: %u, len_aux: %lu\n", cmd, thre_pri, len_aux);
        // print_buf_t(ug, pri, "pri");
        // print_buf_t(ug, aux, "aux");
    }
    set_utg_offset(aux->b.a, aux->b.n, ug, o->read_g, o->pos_idx, 1, 0);
}

// Assembly:
cmpq $0x0, 0x38(%rsi)
je 0x151cfe
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r14
movq %rsi, %rbp
movq 0x38(%rcx), %rsi
testq %rsi, %rsi
je 0x151cf0
movq %r9, %rbx
movq %r8, %r13
movq %rdx, 0x30(%rsp)
movq 0x80(%rsp), %r12
movq 0x48(%r14), %rdi
movq 0x18(%r12), %rcx
movq 0xe0(%r12), %r8
andl $0x0, (%rsp)
movq %r9, %rdx
xorl %r9d, %r9d
callq 0x80ffc
movl %eax, %ecx
movq %rcx, 0x38(%rsp)
movq 0x18(%r12), %rcx
leaq 0x44(%rsp), %r15
movq %r15, (%rsp)
xorl %edi, %edi
movq %r12, %rsi
movq %rbx, %rdx
movq %rbp, %r8
movl %eax, %r9d
callq 0xc9edc
cmpl $0x0, (%r15)
je 0x151ccb
movq 0x48(%rbp), %rsi
movl 0x38(%rbp), %edx
movq 0x48(%r14), %r9
movl 0x38(%r14), %eax
movq %rbx, 0x18(%rsp)
leaq 0x38(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movl %r13d, 0x8(%rsp)
movl %eax, (%rsp)
movl $0x1, 0x20(%rsp)
movsd 0x95f9d(%rip), %xmm0    # 0x1e7c58
movq %r12, %rdi
movq 0x30(%rsp), %rcx
xorl %r8d, %r8d
callq 0x150658
movq 0x48(%r14), %rdi
movl 0x38(%r14), %esi
movq 0x18(%r12), %rcx
movq 0xe0(%r12), %r8
andl $0x0, (%rsp)
pushq $0x1
popq %r9
movq %rbx, %rdx
callq 0x80ffc
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/tovlp.cpp
// Function: get_dir_v(unsigned int, buf_t*)
uint32_t get_dir_v(uint32_t x, buf_t *b)
{
    uint32_t i;
    for (i = 0; i < b->b.n; i++)
    {
        if((b->b.a[i]>>1) == x) return b->b.a[i];
    }

    return (uint32_t)-1;
}

// Assembly:
movq 0x38(%rsi), %rcx
xorl %r8d, %r8d
pushq $-0x1
popq %rdx
movl %r8d, %r8d
cmpq %r8, %rcx
jbe 0x152341
movq 0x48(%rsi), %rax
movl (%rax,%r8,4), %eax
movl %eax, %r9d
shrl %r9d
incl %r8d
cmpl %edi, %r9d
jne 0x152322
retq
movl %edx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/tovlp.cpp
// Function: is_pop_bub(unsigned int, asg_t*, ma_ug_t*, buf_t*, unsigned long, unsigned char*)
int is_pop_bub(uint32_t v, asg_t *g, ma_ug_t *ug, buf_t *b, uint64_t max_dist, uint8_t *bs_flag)
{
    bs_flag[v] = 4;
    asg_arc_t *av = NULL;
    uint32_t nv, i, n_arc;
    int occ = 0;
    nv = asg_arc_n(g, v);
    av = asg_arc_a(g, v);
    ///some node could be deleted
    if (nv < 2 || g->seq[v>>1].del || g->seq[v>>1].c == ALTER_LABLE) return occ;
    ///some edges could be deleted
    for (i = n_arc = 0; i < nv; ++i) // asg_bub_pop1() may delete some edges/arcs
        if (!av[i].del) ++n_arc;
    if (n_arc < 2) return occ;
    if(asg_bub_pop1_primary_trio(ug->g, NULL, v, max_dist, b, (uint32_t)-1, (uint32_t)-1, 0, NULL, NULL, NULL, 0, 0, NULL))
    {
        //beg is v, end is b.S.a[0]
        //note b.b include end, does not include beg
        bs_flag[v] = 0;
        occ = 1;
    }
    return occ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rcx, %rax
movl %edi, %ecx
movl %edi, %r15d
movb $0x4, (%r9,%r15)
movq 0x28(%rsi), %rdi
movq (%rdi,%r15,8), %rdi
xorl %r14d, %r14d
testl $0xfffffffe, %edi       # imm = 0xFFFFFFFE
je 0x152767
movq %r9, %rbx
movq 0x20(%rsi), %r9
movl %ecx, %r10d
shrl %r10d
cmpl $0x0, (%r9,%r10,8)
js 0x152767
cmpb $0x1, 0x4(%r9,%r10,8)
je 0x152767
movq 0x8(%rsi), %r9
movq %rdi, %r10
shrq $0x20, %r10
movl %edi, %esi
imulq $0x18, %rsi, %rsi
imulq $0x18, %r10, %rdi
addq %r9, %rdi
addq $0xc, %rdi
xorl %r9d, %r9d
xorl %r10d, %r10d
cmpq %r9, %rsi
je 0x15270f
movl (%rdi,%r9), %r11d
notl %r11d
shrl $0x1f, %r11d
addl %r11d, %r10d
addq $0x18, %r9
jmp 0x1526f6
xorl %r14d, %r14d
cmpl $0x2, %r10d
jb 0x152767
movq 0x18(%rdx), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
andq $0x0, 0x38(%rsp)
andl $0x0, 0x30(%rsp)
andl $0x0, 0x28(%rsp)
andq $0x0, 0x20(%rsp)
andl $0x0, 0x8(%rsp)
orl $-0x1, (%rsp)
xorl %r14d, %r14d
pushq $-0x1
popq %r9
xorl %esi, %esi
movl %ecx, %edx
movq %r8, %rcx
movq %rax, %r8
callq 0x84a86
testq %rax, %rax
je 0x152767
movb $0x0, (%rbx,%r15)
pushq $0x1
popq %r14
movl %r14d, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/tovlp.cpp
// Function: unitig_iden_worker(void*, long, int)
static void unitig_iden_worker(void *_data, long eid, int tid)
{
    long long d;
    clean_mul_t *buf = (clean_mul_t*)_data;
    clean_t *b = &(buf->a[tid]);
    if(is_pop_unitig(eid, buf->g, buf->ug, &(b->tt), &(b->stack), b->vis, &(b->pq_p), &(b->pq_a), buf->fp, buf->fa, &d))
    {
        if(b->min_v == (uint32_t)-1 || (b->min_d > d) || 
        (b->min_d == d && buf->g->seq[b->min_v>>1].len > buf->g->seq[eid>>1].len) ||
        (b->min_d == d && buf->g->seq[b->min_v>>1].len == buf->g->seq[eid>>1].len && b->min_v > eid))
        {
            b->min_v = eid; b->min_d = d;
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movslq %edx, %rax
imulq $0x1a0, %rax, %rax      # imm = 0x1A0
movq (%rdi), %rcx
movq 0x30(%rdi), %rsi
leaq (%rcx,%rax), %r14
movq 0x38(%rdi), %rdx
leaq 0x20(%rcx,%rax), %r8
movq 0x20(%r8), %r9
leaq 0x48(%rcx,%rax), %r10
addq %rcx, %rax
addq $0xb0, %rax
movzbl 0x28(%rdi), %r11d
movzbl 0x29(%rdi), %r12d
subq $0x8, %rsp
leaq 0x10(%rsp), %r13
movl %ebx, %edi
movq %r14, %rcx
pushq %r13
pushq %r12
pushq %r11
pushq %rax
pushq %r10
callq 0x152344
addq $0x30, %rsp
testl %eax, %eax
je 0x152c64
movl 0x180(%r14), %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq 0x8(%rsp), %rax
cmpq %rdx, %rcx
je 0x152c56
cmpq %rax, 0x190(%r14)
jle 0x152c72
movl %ebx, 0x180(%r14)
movq %rax, 0x190(%r14)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jne 0x152c64
movq 0x30(%r15), %rdx
movq 0x20(%rdx), %rsi
movl %ecx, %edx
shrl %edx
movl (%rsi,%rdx,8), %edx
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
movl %edx, %r8d
andl %edi, %r8d
movq %rbx, %r9
andq $-0x2, %r9
movl (%rsi,%r9,4), %esi
andl %esi, %edi
cmpl %edi, %r8d
ja 0x152c56
cmpq %rbx, %rcx
jle 0x152c64
xorl %edx, %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
je 0x152c56
jmp 0x152c64
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/tovlp.cpp
// Function: rs_sort_pt128x(pt128_t*, pt128_t*, int, int)
KRADIX_SORT_INIT(tb64, uint64_t, generic_key, 8)

typedef struct { uint32_t n, m; pt128_t *a; } pt128_v;
typedef struct { uint32_t n, m; pt_mz1_t *a; } pt_mz1_v;

static inline int mzcmp(const pt_mz1_t *a, const pt_mz1_t *b)
{
	return (a->x > b->x) - (a->x < b->x);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, -0x2c(%rbp)
movl %edx, %ecx
pushq $0x1
popq %rdx
movl %ecx, -0x30(%rbp)
shll %cl, %edx
movq %rdx, %rax
shlq $0x4, %rax
movq %rsp, %r15
subq %rax, %r15
movq %r15, %rsp
movslq %edx, %r12
movq %r12, %rcx
shlq $0x4, %rcx
leaq (%r15,%rcx), %rax
movq %rax, -0x38(%rbp)
movq %r15, %r8
testq %rcx, %rcx
je 0x153feb
movq %rdi, 0x8(%r8)
movq %rdi, (%r8)
addq $0x10, %r8
addq $-0x10, %rcx
jmp 0x153fd5
decl %edx
movl -0x2c(%rbp), %ecx
movslq %edx, %rdx
movq %rdi, %r8
cmpq %rsi, %r8
je 0x154014
movq (%r8), %r9
shrq %cl, %r9
andq %rdx, %r9
shlq $0x4, %r9
addq $0x10, 0x8(%r15,%r9)
addq $0x10, %r8
jmp 0x153ff6
leaq 0x10(%r15), %rsi
shlq $0x4, %r12
leaq -0x10(%r12), %r8
movq %rsi, %r9
testq %r8, %r8
je 0x154044
movq -0x8(%r9), %r10
movq %r10, %r11
subq %rdi, %r11
addq %r11, 0x8(%r9)
movq %r10, (%r9)
addq $0x10, %r9
addq $-0x10, %r8
jmp 0x154024
movq %r15, %r8
cmpq -0x38(%rbp), %r8
je 0x1540c7
movq (%r8), %r11
cmpq 0x8(%r8), %r11
je 0x1540c1
movq (%r11), %r9
movq %r9, %r10
shrq %cl, %r10
andq %rdx, %r10
shlq $0x4, %r10
addq %r15, %r10
cmpq %r8, %r10
je 0x1540b8
movq 0x8(%r11), %r11
movq %r9, %r13
movq %r11, %r14
movq (%r10), %rbx
movq (%rbx), %r9
movq 0x8(%rbx), %r11
leaq 0x10(%rbx), %rax
movq %rax, (%r10)
movq %r13, (%rbx)
movq %r14, 0x8(%rbx)
movq %r9, %r10
shrq %cl, %r10
andq %rdx, %r10
shlq $0x4, %r10
addq %r15, %r10
cmpq %r8, %r10
jne 0x154072
movq (%r8), %rax
leaq 0x10(%rax), %r10
movq %r10, (%r8)
movq %r9, (%rax)
movq %r11, 0x8(%rax)
jmp 0x154047
addq $0x10, %r11
movq %r11, (%r8)
jmp 0x154047
addq $0x10, %r8
jmp 0x154047
movq %rdi, (%r15)
leaq -0x10(%r12), %rax
testq %rax, %rax
je 0x1540e5
movq -0x8(%rsi), %rcx
movq %rcx, (%rsi)
addq $0x10, %rsi
addq $-0x10, %rax
jmp 0x1540cf
cmpl $0x0, -0x2c(%rbp)
je 0x154133
xorl %eax, %eax
movl -0x2c(%rbp), %ebx
subl -0x30(%rbp), %ebx
cmovlel %eax, %ebx
testq %r12, %r12
je 0x154133
movq (%r15), %rdi
movq 0x8(%r15), %rsi
movq %rsi, %rax
subq %rdi, %rax
sarq $0x4, %rax
cmpq $0x41, %rax
jl 0x15411e
movl -0x30(%rbp), %edx
movl %ebx, %ecx
callq 0x153f92
jmp 0x154129
cmpq $0x2, %rax
jl 0x154129
callq 0x153f4d
addq $0x10, %r15
addq $-0x10, %r12
jmp 0x1540f6
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/tovlp.cpp
// Function: pt_collect_minimizers(ma_ug_t*, asg_t*, ma_sub_t*, ma_hit_t_alloc*, kvec_asg_arc_t_warp*, int, int)
pt_mz1_v *pt_collect_minimizers(ma_ug_t *ug, asg_t *read_g, ma_sub_t *coverage_cut, ma_hit_t_alloc* sources, 
kvec_asg_arc_t_warp* edge, int max_hang, int min_ovlp)
{
    uint32_t i;
    pt_mz1_v *mz = NULL; CALLOC(mz, 1);
    
    for (i = 0; i < ug->u.n; i++)
    {
        if(!ug->u.a[i].len) continue;
        pt_sketch(ug->u.a[i].s, ug->u.a[i].len, asm_opt.mz_win, asm_opt.k_mer_length, i, 0, mz);
    }

    radix_sort_mz(mz->a, mz->a + mz->n);
    return mz;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
pushq $0x1
popq %rdi
pushq $0x10
popq %rsi
callq 0x2120
movq %rax, %rbx
xorl %r15d, %r15d
movl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
leaq 0xfe999(%rip), %r12     # 0x253758
movl %r15d, %r15d
cmpq %r15, (%r14)
jbe 0x154e01
movq 0x10(%r14), %rax
imulq $0x28, %r15, %rcx
movl (%rax,%rcx), %esi
andl %ebp, %esi
je 0x154dfc
addq %rcx, %rax
movq 0x20(%rax), %rdi
movl 0x80(%r12), %ecx
movl 0x94(%r12), %edx
movq %rbx, (%rsp)
movl %r15d, %r8d
xorl %r9d, %r9d
callq 0x154349
incl %r15d
jmp 0x154dbf
movq 0x8(%rbx), %rdi
movl (%rbx), %eax
imulq $0x18, %rax, %rsi
addq %rdi, %rsi
callq 0x153f2f
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/tovlp.cpp
// Function: pt_lis_64(int, unsigned long const*, int*, int*)
int32_t pt_lis_64(int32_t n, const uint64_t *a_idx, int32_t *b, int32_t *M)
{
	int32_t i, k, L = 0, *P = b;
	// MALLOC(M, n+1);
	for (i = 0; i < n; ++i) {
		int32_t lo = 1, hi = L, newL;
		while (lo <= hi) {
			int32_t mid = (lo + hi + 1) >> 1;
			if ((uint32_t)a_idx[M[mid]] < (uint32_t)a_idx[i]) lo = mid + 1;
			else hi = mid - 1;
		}
		newL = lo, P[i] = M[newL - 1], M[newL] = i;
		if (newL > L) L = newL;
	}
	k = M[L];
	memcpy(M, P, n * sizeof(int32_t));
	for (i = L - 1; i >= 0; --i) b[i] = k, k = M[k];
	// free(M);
	return L;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
xorl %eax, %eax
testl %edi, %edi
movl $0x0, %ecx
cmovgl %edi, %ecx
pushq $0x1
popq %rdx
xorl %ebp, %ebp
cmpq %rcx, %rax
je 0x1552b2
movl %edx, %r8d
movl %ebp, %r9d
cmpl %r9d, %r8d
jg 0x155296
leal (%r8,%r9), %r10d
incl %r10d
sarl %r10d
movslq %r10d, %r11
movslq (%rbx,%r11,4), %r11
movl (%rsi,%r11,8), %r11d
cmpl (%rsi,%rax,8), %r11d
jb 0x15528e
decl %r10d
movl %r10d, %r9d
jmp 0x155266
incl %r10d
movl %r10d, %r8d
jmp 0x155266
movslq %r8d, %r9
movl -0x4(%rbx,%r9,4), %r10d
movl %r10d, (%r14,%rax,4)
movl %eax, (%rbx,%r9,4)
cmpl %ebp, %r8d
cmovgl %r8d, %ebp
incq %rax
jmp 0x15525b
movslq %ebp, %rax
movl (%rbx,%rax,4), %r15d
movslq %edi, %rdx
shlq $0x2, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2160
movl %ebp, %eax
testl %eax, %eax
jle 0x1552e2
movl %r15d, -0x4(%r14,%rax,4)
decq %rax
movslq %r15d, %rcx
movl (%rbx,%rcx,4), %r15d
jmp 0x1552cd
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/tovlp.cpp
// Function: debug_lis_64(unsigned long const*, int*, unsigned long)
uint32_t debug_lis_64(const uint64_t *a, int32_t *b, uint64_t n)
{
    uint32_t i;
    if(n <= 1) return 1;
    for (i = 0; i+1 < n; i++)
    {
        if(((a[b[i]]>>32) > (a[b[i+1]]>>32)) || (((uint32_t)a[b[i]]) > ((uint32_t)a[b[i+1]])))
        {
            i = (uint32_t)-1;
            break;
        }
    } 
    if(i == (uint32_t)-1)
    {
        fprintf(stderr, "\nERROR-chain\n");   
        for (i = 0; i < n; i++)
        {
            fprintf(stderr, "x-%lu, y-%lu\n", (a[b[i]]>>32), (uint64_t)((uint32_t)a[b[i]]));
        }
    }
    return 1;
}

// Assembly:
cmpq $0x2, %rdx
jb 0x155356
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
pushq $0x1
popq %rsi
movl %esi, %eax
cmpq %rbx, %rax
jae 0x155343
decl %esi
movl %esi, %ecx
movslq (%r14,%rcx,4), %rcx
movq (%r15,%rcx,8), %rcx
movq %rcx, %rsi
shrq $0x20, %rsi
movslq (%r14,%rax,4), %rdx
movq (%r15,%rdx,8), %rdx
movq %rdx, %rdi
shrq $0x20, %rdi
cmpl %edi, %esi
ja 0x15535a
incl %eax
movl %eax, %esi
cmpl %edx, %ecx
jbe 0x15530c
jmp 0x15535a
testq %rax, %rax
je 0x15535a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
pushq $0x1
popq %rax
retq
movq 0xfdc7f(%rip), %r13     # 0x252fe0
movq (%r13), %rcx
leaq 0x9c5ab(%rip), %rdi     # 0x1f1917
pushq $0xd
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
leaq 0x9c5a7(%rip), %r12     # 0x1f1925
xorl %eax, %eax
movl %eax, %ebp
cmpq %rbx, %rbp
jae 0x155348
movq (%r13), %rdi
movslq (%r14,%rbp,4), %rax
movq (%r15,%rax,8), %rdx
movl %edx, %ecx
shrq $0x20, %rdx
movq %r12, %rsi
xorl %eax, %eax
callq 0x22b0
leal 0x1(%rbp), %eax
jmp 0x155380
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/tovlp.cpp
// Function: update_mz_ovlp(unsigned int*, unsigned int*, long, unsigned int*, unsigned int*, long, unsigned int)
void update_mz_ovlp(uint32_t* n_x_beg, uint32_t* n_x_end, int64_t xLen, 
uint32_t* n_y_beg, uint32_t* n_y_end, int64_t yLen, uint32_t rev)
{
    int64_t x_beg = (*n_x_beg), x_end = (*n_x_end);
    int64_t y_beg = (*n_y_beg), y_end = (*n_y_end);
    if(x_beg <= y_beg)
    {
        y_beg = y_beg - x_beg;
        x_beg = 0;
    }
    else
    {
        x_beg = x_beg - y_beg;
        y_beg = 0;
    }

    long long x_right_length = xLen - x_end - 1;
    long long y_right_length = yLen - y_end - 1;


    if(x_right_length <= y_right_length)
    {
        x_end = xLen - 1;
        y_end = y_end + x_right_length;        
    }
    else
    {
        x_end = x_end + y_right_length;
        y_end = yLen - 1;
    }

    if(rev == 0)
    {
        (*n_y_beg) = y_beg;
        (*n_y_end) = y_end + 1;
    }
    else
    {
        (*n_y_beg) = yLen - y_end - 1;
        (*n_y_end) = yLen - y_beg - 1 + 1;
    }

    (*n_x_beg) = x_beg;
    (*n_x_end) = x_end + 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movl (%rsi), %r11d
movl (%r8), %ebx
movl (%rcx), %eax
movl (%rdi), %r10d
movq %rbx, %r14
notq %r14
addq %r9, %r14
leal (%r11,%r14), %ebp
incl %ebp
notq %r11
addq %rdx, %r11
addl %r11d, %ebx
leal -0x1(%r9), %r15d
cmpq %r14, %r11
cmovlel %ebx, %r15d
cmovgl %ebp, %edx
xorl %r11d, %r11d
movl %r10d, %ebx
subl %eax, %ebx
movl %ebx, %ebp
cmovbl %r11d, %ebp
negl %ebx
cmpl %eax, %r10d
movl %r15d, %eax
notl %eax
cmoval %r11d, %ebx
incl %r15d
addl %r9d, %eax
subl %ebx, %r9d
cmpl %r11d, 0x28(%rsp)
cmovel %ebx, %eax
cmovel %r15d, %r9d
movl %eax, (%rcx)
movl %r9d, (%r8)
movl %ebp, (%rdi)
movl %edx, (%rsi)
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/tovlp.cpp
// Function: get_insert_pos(unsigned long*, long, long)
int64_t get_insert_pos(uint64_t *a, int64_t n, int64_t target)
{
    int64_t left, right, ans, mid;
    left = 0; right = n - 1; ans = n;
    while (left <= right) {
        mid = ((right - left) >> 1) + left;
        if (target <= (uint32_t)a[mid]) {
            ans = mid;
            right = mid - 1;
        } else {
            left = mid + 1;
        }
    }
    return ans;
}

// Assembly:
movq %rsi, %rax
decq %rsi
xorl %ecx, %ecx
movq %rsi, %r8
subq %rcx, %r8
jl 0x155454
sarq %r8
leaq (%r8,%rcx), %r9
movl (%rdi,%r9,8), %r10d
cmpq %rdx, %r10
jl 0x15544c
leaq (%r8,%rcx), %rsi
decq %rsi
movq %r9, %rax
jmp 0x155428
addq %r8, %rcx
incq %rcx
jmp 0x155428
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/tovlp.cpp
// Function: get_mz_occ(mz_ds_t*, unsigned long, unsigned long, unsigned long)
uint32_t get_mz_occ(mz_ds_t *mz_idx, uint64_t uid, uint64_t s, uint64_t e)
{
    uint64_t *a = mz_idx->pos.a + (mz_idx->idx[uid]>>32), n = (uint32_t)(mz_idx->idx[uid]);
    if(n == 0) return 0;
    int64_t sid, eid;
    sid = get_insert_pos(a, n, s);
    eid = get_insert_pos(a, n, e);
    return eid + 1 - sid;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rax
movq (%rax,%rsi,8), %r15
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
andq %r15, %r14
je 0x1554a1
movq %rcx, %rbx
shrq $0x1d, %r15
andq $-0x8, %r15
addq 0x18(%rdi), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x155420
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x155420
subl %r12d, %eax
incl %eax
jmp 0x1554a3
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/tovlp.cpp
// Function: print_u_trans(kv_u_trans_t*)
void print_u_trans(kv_u_trans_t *ta)
{
    uint32_t i;
    u_trans_t *p = NULL;
    for (i = 0; i < ta->n; i++)
    {
        p = &(ta->a[i]);
        fprintf(stderr, "q-utg%.6ul\tqs(%u)\tqe(%u)\tt-utg%.6ul\tts(%u)\tte(%u)\trev(%u)\tw(%f)\tf(%u)\n", 
        p->qn+1, p->qs, p->qe, p->tn+1, p->ts, p->te, p->rev, p->nw, p->f);
    }
    fprintf(stderr, "[M::%s::] \n", __func__);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %eax, %eax
movq 0xfd2ea(%rip), %r15     # 0x252fe0
leaq 0x99875(%rip), %r14     # 0x1ef572
movl %eax, %r12d
cmpq %r12, (%rbx)
jbe 0x155d65
movq 0x10(%rbx), %rax
imulq $0x30, %r12, %rsi
movq (%r15), %rdi
movl 0x8(%rax,%rsi), %edx
incl %edx
movl (%rax,%rsi), %ecx
movl 0x4(%rax,%rsi), %r8d
movl 0x14(%rax,%rsi), %r9d
incl %r9d
movl 0xc(%rax,%rsi), %r10d
movl 0x10(%rax,%rsi), %r11d
movzbl 0x28(%rax,%rsi), %r13d
movl %r13d, %ebp
shrl $0x6, %ebp
andl $0x1, %ebp
movsd 0x20(%rax,%rsi), %xmm0
andl $0x3f, %r13d
movq %r14, %rsi
movb $0x1, %al
pushq %r13
pushq %rbp
pushq %r11
pushq %r10
callq 0x22b0
addq $0x20, %rsp
leal 0x1(%r12), %eax
jmp 0x155cfd
movq (%r15), %rdi
leaq 0x9882d(%rip), %rsi     # 0x1ee59c
leaq 0x9bbbd(%rip), %rdx     # 0x1f1933
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/tovlp.cpp
// Function: pt_pdist(ma_ug_t*, asg_t*, ma_sub_t*, ma_hit_t_alloc*, kvec_asg_arc_t_warp*, int, int, unsigned int)
kv_u_trans_t *pt_pdist(ma_ug_t *ug, asg_t *read_g, ma_sub_t *coverage_cut, ma_hit_t_alloc* sources, 
kvec_asg_arc_t_warp* edge, int max_hang, int min_ovlp, uint32_t min_chain_cnt)
{
    pt_mz1_v *mz = NULL;
    mz_ds_t mz_idx; memset(&mz_idx, 0, sizeof(mz_idx));
    pt128_v *an = NULL;
    kv_u_trans_t *ma = NULL; CALLOC(ma, 1);
    mz = pt_collect_minimizers(ug, read_g, coverage_cut, sources, edge, max_hang, min_ovlp);
    an = pt_collect_anchors(ug, mz, &mz_idx, asm_opt.polyploidy*10);
    kv_destroy(*mz); free(mz);

    ma = pt_cal_sim(an, &mz_idx, ug, min_chain_cnt, asm_opt.purge_simi_thres);
    kv_destroy(*an); free(an); 
    kv_destroy(mz_idx.pos); free(mz_idx.idx);
    
    kt_u_trans_t_idx(ma, ug->g->n_seq);
    kt_u_trans_t_simple_symm(ma, ug->g->n_seq, 1);
    clean_mz_ovlp(ma, ug);
    // print_u_trans(ma);
    // exit(1);
    return ma;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movl 0x78(%rsp), %ebp
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
callq 0x154d93
movq %rax, %r15
leaq 0xfd998(%rip), %r13     # 0x253758
imull $0xa, 0x1bc(%r13), %ecx
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x154e23
movq %rax, %r12
movq 0x8(%r15), %rdi
callq 0x2220
movq %r15, %rdi
callq 0x2220
cvtss2sd 0x16c(%r13), %xmm0
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
callq 0x1554af
movq %rax, %r15
movq 0x8(%r12), %rdi
callq 0x2220
movq %r12, %rdi
callq 0x2220
movq 0x18(%r14), %rdi
callq 0x2220
movq (%r14), %rdi
callq 0x2220
movq 0x18(%rbx), %rax
movl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
movl 0x14(%rax), %esi
andl %ebp, %esi
movq %r15, %rdi
callq 0x88a31
movq 0x18(%rbx), %rax
andl 0x14(%rax), %ebp
pushq $0x1
popq %rdx
movq %r15, %rdi
movl %ebp, %esi
callq 0x90b09
movq %r15, %rdi
movq %rbx, %rsi
callq 0x15596d
movq %r15, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/inter.cpp
// Function: uidx_build(ma_ug_t*, mg_idxopt_t*)
void uidx_build(ma_ug_t *ug, mg_idxopt_t *opt)
{
    int flag = asm_opt.flag;
    asm_opt.flag |= HA_F_NO_HPC;
    ha_flt_tab = ha_ft_ug_gen(&asm_opt, &(ug->u), opt->is_HPC, opt->k, opt->w, 1, opt->hap_n*5);
    ha_idx = ha_pt_ug_gen(&asm_opt, ha_flt_tab, &(ug->u), opt->is_HPC, opt->k, opt->w, 1);
    asm_opt.flag = flag;
	fprintf(stderr, "[M::%s] Index has been built.\n", __func__);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
leaq 0xf8ce1(%rip), %rbx     # 0x253758
movl (%rbx), %ebp
movl %ebp, %eax
orl $0x1, %eax
movl %eax, (%rbx)
movl 0x10(%rsi), %edx
movl (%rsi), %r8d
movl 0x4(%rsi), %ecx
imull $0x5, 0x14(%rsi), %eax
movl %eax, (%rsp)
pushq $0x1
popq %r9
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd6133
leaq 0xf998a(%rip), %rcx     # 0x254430
movq %rax, (%rcx)
movl 0x10(%r15), %ecx
movl (%r15), %r9d
movl 0x4(%r15), %r8d
movl $0x1, (%rsp)
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0xd67b1
leaq 0xf9968(%rip), %rcx     # 0x254438
movq %rax, (%rcx)
movl %ebp, (%rbx)
movq 0xf8504(%rip), %rax     # 0x252fe0
movq (%rax), %rdi
leaq 0x96ff6(%rip), %rsi     # 0x1f1adc
leaq 0x9701b(%rip), %rdx     # 0x1f1b08
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/inter.cpp
// Function: mg_gres_a_des(mg_gres_a*)
void mg_gres_a_des(mg_gres_a *p)
{
	uint64_t i = 0;
	for (i = 0; i < p->n; i++){
		free(p->a[i].lc); free(p->a[i].gc);
	}
	free(p->a);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x10(%rbx), %rdi
cmpq (%rbx), %r15
jae 0x15ab68
movq 0x10(%rdi,%r14), %rdi
callq 0x2220
movq 0x10(%rbx), %rax
movq 0x8(%rax,%r14), %rdi
callq 0x2220
incq %r15
addq $0x28, %r14
jmp 0x15ab3e
popq %rbx
popq %r14
popq %r15
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/inter.cpp
// Function: flt_anchors(long, mg128_t*, int)
int64_t flt_anchors(int64_t n_a, mg128_t *a, int32_t r)
{
	int64_t i, j;
	for (i = 0; i < n_a; ++i) {
		for (j = i - 1; j >= 0; --j) {
			/**
			 * a is sorted by x
			 * a[].x: ref_id(31)rev(1)r_pos(32)
			 * a[].y: weight(8)query_id(8)flag(8)span(8)q_pos(32)
			 **/
			int32_t dq;
			int64_t dr = a[i].x - a[j].x;///a is sorted by x
			if (dr > r) break;///if two candidates coming from differnt unitigs, dr would be extremly large
			dq = (int32_t)a[i].y - (int32_t)a[j].y;
			if (dq > r || dq < 0) continue;
			a[j].y |= MG_SEED_KEPT;
			a[i].y |= MG_SEED_KEPT;
			break;
		}
	}
	for (i = n_a - 1; i >= 0; --i) {
		if (a[i].y & MG_SEED_KEPT) continue;
		for (j = i + 1; j < n_a; ++j) {
			int32_t dq;
			int64_t dr = a[j].x - a[i].x;
			if (dr > r) break;
			dq = (int32_t)a[j].y - (int32_t)a[i].y;
			if (dq > r || dq < 0) continue;
			a[j].y |= MG_SEED_KEPT;
			a[i].y |= MG_SEED_KEPT;
			break;
		}
	}
	for (i = j = 0; i < n_a; ++i)
		if (a[i].y & MG_SEED_KEPT)
			a[j++] = a[i];
	return j;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq %edx, %rax
xorl %r9d, %r9d
testq %rdi, %rdi
movl $0x0, %r8d
cmovgq %rdi, %r8
leaq 0x8(%rsi), %r10
movabsq $0x1, %r11
movabsq $0x80000000000, %rcx    # imm = 0x80000000000
cmpq %r8, %r9
je 0x15af4c
movq %r9, %rbx
shlq $0x4, %rbx
addq %rsi, %rbx
movq %r10, %r14
movq %r11, %r15
decq %r15
testq %r15, %r15
jle 0x15af40
movq (%rbx), %r12
subq -0x18(%r14), %r12
cmpq %rax, %r12
jg 0x15af40
movl 0x8(%rbx), %ebp
movq -0x10(%r14), %r12
addq $-0x10, %r14
subl %r12d, %ebp
sets %r13b
cmpl %edx, %ebp
setg %bpl
orb %r13b, %bpl
jne 0x15af05
orq %rcx, %r12
movq %r12, (%r14)
orq %rcx, 0x8(%rbx)
incq %r9
incq %r11
addq $0x10, %r10
jmp 0x15aef0
movq %rdi, %r9
shlq $0x4, %r9
addq %rsi, %r9
leaq -0x1(%rdi), %r10
movq %rdi, %r11
testq %r11, %r11
jle 0x15afd6
decq %r11
movq %r11, %rbx
shlq $0x4, %rbx
movq 0x8(%rsi,%rbx), %r14
movabsq $0x80000000000, %rcx    # imm = 0x80000000000
testq %rcx, %r14
jne 0x15afcd
addq %rsi, %rbx
movq %r10, %r12
movq %r9, %r15
incq %r12
cmpq %rdi, %r12
jge 0x15afcd
movq (%r15), %r13
subq (%rbx), %r13
cmpq %rax, %r13
jg 0x15afcd
movq 0x8(%r15), %r13
addq $0x10, %r15
movl %r13d, %ebp
subl %r14d, %ebp
sets %cl
cmpl %edx, %ebp
setg %bpl
orb %cl, %bpl
jne 0x15af89
movabsq $0x80000000000, %rcx    # imm = 0x80000000000
orq %rcx, %r13
movq %r13, -0x8(%r15)
orq %rcx, 0x8(%rbx)
addq $-0x10, %r9
decq %r10
jmp 0x15af5d
leaq 0x8(%rsi), %rdx
xorl %eax, %eax
subq $0x1, %r8
jb 0x15b00d
movabsq $0x80000000000, %rcx    # imm = 0x80000000000
testq %rcx, (%rdx)
je 0x15b007
leaq -0x8(%rdx), %rcx
leaq 0x1(%rax), %rdi
shlq $0x4, %rax
movups (%rcx), %xmm0
movups %xmm0, (%rsi,%rax)
movq %rdi, %rax
addq $0x10, %rdx
jmp 0x15afdc
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/inter.cpp
// Function: comput_sc(mg128_t const*, mg128_t const*, int, int, int, float)
static inline int32_t comput_sc(const mg128_t *ai, const mg128_t *aj, int32_t max_dist_x, int32_t max_dist_y, int32_t bw, float chn_pen_gap)
{	
	int32_t dq = (int32_t)ai->y - (int32_t)aj->y, dr = (int32_t)ai->x - (int32_t)aj->x, dd, dg, q_span, sc;
	///ai and aj has already been sorted by x
	///which means ai->x >= aj->x
	if (dq <= 0 || dq > max_dist_x) return INT32_MIN;
    if (dr <= 0 || dr > max_dist_y) return INT32_MIN;
	dd = dr > dq? dr - dq : dq - dr; ///indel, dd is always >= 0
	if (dd > bw) return INT32_MIN;
	dg = dr < dq? dr : dq;///MIN(dr, dq)
	q_span = aj->y>>32&0xff;///query span; should be ai->y>>32&0xff, is it a bug?
    sc = normal_sc(aj->y>>MG_SEED_WT_SHIFT, (q_span<dg?q_span:dg)); ///positive part of sc
    ///dd: there are indels
    ///dg > q_span: there are some bases that are not covered between ai and aj
    ///it is if (dd || dg > q_span) in minigraph
	if (dd) {
		float lin_pen, log_pen;
		lin_pen = chn_pen_gap * (float)dd;
		log_pen = dd >= 2? mg_log2(dd) : 0.0f; // mg_log2() only works for dd>=2
        sc -= (int)(lin_pen + log_pen);
	}
	return sc;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl 0x8(%rdi), %r9d
movq 0x8(%rsi), %rax
subl %eax, %r9d
setle %r10b
cmpl %edx, %r9d
setg %dl
orb %r10b, %dl
movl $0x80000000, %ebx       # imm = 0x80000000
jne 0x15b9b9
movl (%rdi), %edx
subl (%rsi), %edx
testl %edx, %edx
setle %sil
cmpl %ecx, %edx
setg %cl
orb %sil, %cl
jne 0x15b9b9
movl %r9d, %esi
subl %edx, %esi
negl %esi
movl %r9d, %ecx
subl %edx, %ecx
cmovbl %esi, %ecx
cmpl %r8d, %ecx
jg 0x15b9b9
movapd %xmm0, %xmm2
cmpl %r9d, %edx
cmovbl %edx, %r9d
movq %rax, %rdx
shrq $0x20, %rdx
movzbl %dl, %edx
shrq $0x38, %rax
cmpl %r9d, %edx
movl %r9d, %ebx
cmovbl %edx, %ebx
cmpq $0xff, %rax
je 0x15b986
cvtsi2sd %eax, %xmm0
mulsd 0x960af(%rip), %xmm0    # 0x1f1a20
cvtsi2sd %ebx, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
cmpl $0x2, %eax
pushq $0x1
popq %rbx
cmovgel %eax, %ebx
testl %ecx, %ecx
je 0x15b9b9
cvtsi2ss %ecx, %xmm1
mulss %xmm1, %xmm2
xorpd %xmm0, %xmm0
cmpl $0x2, %ecx
jl 0x15b9af
movaps %xmm1, %xmm0
movss %xmm2, 0xc(%rsp)
callq 0x1a1d6e
movss 0xc(%rsp), %xmm2
addss %xmm0, %xmm2
cvttss2si %xmm2, %eax
subl %eax, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/inter.cpp
// Function: mg_update_anchors(int, mg128_t*, int, int const*)
void mg_update_anchors(int32_t n_a, mg128_t *a, int32_t n, const int32_t *mini_pos)
{
	int32_t st, j, k;
	if (n_a <= 0) return;
	st = get_mini_idx(&a[0], n, mini_pos);
	assert(st >= 0);
	for (k = 0, j = st; j < n && k < n_a; ++j)
		if ((int32_t)a[k].y == mini_pos[j])
			a[k].x = (uint64_t)j << 32 | (a[k].x & 0xffffffffU), ++k;
	assert(k == n_a);
}

// Assembly:
pushq %rbx
testl %edi, %edi
jle 0x15bc90
movl 0x8(%rsi), %r8d
xorl %r9d, %r9d
movl %edx, %r10d
leal -0x1(%r10), %eax
movslq %eax, %r11
cmpl %r10d, %r9d
jge 0x15bc92
movslq %r9d, %rax
addq %r11, %rax
shrq %rax
cmpl %r8d, (%rcx,%rax,4)
jge 0x15bc38
leal 0x1(%rax), %r9d
jmp 0x15bc1e
movl %eax, %r10d
jg 0x15bc17
testl %eax, %eax
js 0x15bc92
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, %r8
shlq $0x20, %r8
xorl %r9d, %r9d
movabsq $0x100000000, %r10      # imm = 0x100000000
cmpl %edx, %eax
jge 0x15bc8b
cmpl %edi, %r9d
jge 0x15bc8b
movslq %r9d, %r11
shlq $0x4, %r11
movl (%rcx,%rax,4), %ebx
cmpl 0x8(%rsi,%r11), %ebx
jne 0x15bc83
addq %rsi, %r11
movl (%r11), %ebx
addq %r8, %rbx
movq %rbx, (%r11)
incl %r9d
incq %rax
addq %r10, %r8
jmp 0x15bc5a
cmpl %edi, %r9d
jne 0x15bcb1
popq %rbx
retq
leaq 0x95f2b(%rip), %rdi     # 0x1f1bc4
leaq 0x95e83(%rip), %rsi     # 0x1f1b23
leaq 0x95f25(%rip), %rcx     # 0x1f1bcc
movl $0x3dc, %edx            # imm = 0x3DC
callq 0x2110
leaq 0x95f59(%rip), %rdi     # 0x1f1c11
leaq 0x95e64(%rip), %rsi     # 0x1f1b23
leaq 0x95f06(%rip), %rcx     # 0x1f1bcc
movl $0x3e0, %edx            # imm = 0x3E0
callq 0x2110