LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: normalize_gou0(void*, long, int)
static void normalize_gou0(void *data, long i, int tid)
{
    sset_aux *sl = (sset_aux *)data;
    asg_t *g = sl->g;
    asg_arc_t *e = &(g->arc[i]);
    if(e->v > (e->ul>>32)) return;
    uint32_t k, v = e->v^1, w = (e->ul>>32)^1, ou;
    uint32_t nv = asg_arc_n(g, v);
    asg_arc_t *av = asg_arc_a(g, v);
    for (k = 0; k < nv; ++k) {
        if (av[k].v == w) {
            ou = MAX(av[k].ou, e->ou);
            av[k].ou = e->ou = ou;
            break;
        }
    }
}

// Assembly:
movq (%rdi), %rdi
movq 0x8(%rdi), %rax
leaq (%rsi,%rsi,2), %rcx
movl 0x8(%rax,%rcx,8), %esi
movq (%rax,%rcx,8), %rdx
shrq $0x20, %rdx
cmpq %rsi, %rdx
jb 0x1f105c
xorq $0x1, %rsi
movq 0x28(%rdi), %rdi
movq (%rdi,%rsi,8), %rsi
testl %esi, %esi
je 0x1f105c
leaq (%rax,%rcx,8), %rcx
movq %rsi, %rdi
shrq $0x20, %rdi
movl %esi, %esi
leaq (%rdi,%rdi,2), %rdi
leaq (%rax,%rdi,8), %r8
addq $0x10, %r8
shlq $0x3, %rsi
leaq (%rsi,%rsi,2), %r9
xorl %esi, %esi
movl -0x8(%r8,%rsi), %r10d
xorl %edx, %r10d
cmpl $0x1, %r10d
je 0x1f105d
addq $0x18, %rsi
cmpq %rsi, %r9
jne 0x1f1045
retq
leaq (%rax,%rdi,8), %rax
movzwl 0x10(%rsi,%rax), %edx
movl $0x3fff, %edi           # imm = 0x3FFF
andl %edi, %edx
movzwl 0x10(%rcx), %r8d
andl %r8d, %edi
cmpw %di, %dx
cmoval %edx, %edi
andl $0xc000, %r8d           # imm = 0xC000
orl %edi, %r8d
movw %r8w, 0x10(%rcx)
movl $0xffffc000, %ecx       # imm = 0xFFFFC000
andl 0x10(%rsi,%rax), %ecx
orl %edi, %ecx
movw %cx, 0x10(%rsi,%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: update_sg_uo_t(void*, long, int)
static void update_sg_uo_t(void *data, long i, int tid)
{
	sset_aux *sl = (sset_aux *)data;
	ma_hit_t_alloc *src = sl->src; asg_t *g = sl->g;
	asg_arc_t *e = &(g->arc[i]); uint32_t k, qn, tn;
    ma_hit_t_alloc *x = &(src[e->ul>>33]);
    e->ou = 0;
    if(e->del) return;
	for (k = 0; k < x->length; k++) {
		qn = Get_qn(x->buffer[k]);
		tn = Get_tn(x->buffer[k]);
		if(qn == (e->ul>>33) && tn == (e->v>>1)) {
			e->ou = (x->buffer[k].bl>OU_MASK?OU_MASK:x->buffer[k].bl);
			break;
		}
	}
	assert(k < x->length);
}

// Assembly:
pushq %rax
movq (%rdi), %rax
movq 0x8(%rax), %rdx
leaq (%rsi,%rsi,2), %r9
movq (%rdx,%r9,8), %rsi
shrq $0x21, %rsi
leaq (%rsi,%rsi,2), %rax
shlq $0x3, %rax
addq 0x8(%rdi), %rax
movzwl 0x10(%rdx,%r9,8), %ecx
andl $0xc000, %ecx           # imm = 0xC000
movw %cx, 0x10(%rdx,%r9,8)
cmpl $0x0, 0xc(%rdx,%r9,8)
js 0x1f1162
movl 0xc(%rax), %r8d
testq %r8, %r8
je 0x1f115a
leaq (%rdx,%r9,8), %rdi
movq (%rax), %r9
xorl %edx, %edx
cmpl %esi, 0x4(%r9)
jne 0x1f10fe
movl 0x8(%rdi), %r10d
shrl %r10d
cmpl %r10d, 0xc(%r9)
je 0x1f1129
incq %rdx
addq $0x28, %r9
cmpq %rdx, %r8
jne 0x1f10eb
leaq 0x540d8(%rip), %rdi     # 0x2451e9
leaq 0x544f1(%rip), %rsi     # 0x245609
leaq 0x5936c(%rip), %rcx     # 0x24a48b
movl $0x31f, %edx            # imm = 0x31F
callq 0x2110
movq 0x18(%r9), %rsi
movq %rsi, %r8
shrq $0x20, %r8
movl $0x3fff, %r9d           # imm = 0x3FFF
andl %r9d, %r8d
movabsq $0x7fffc00000000000, %r10 # imm = 0x7FFFC00000000000
testq %r10, %rsi
cmovnel %r9d, %r8d
orl %r8d, %ecx
movw %cx, 0x10(%rdi)
movl 0xc(%rax), %eax
jmp 0x1f115e
xorl %eax, %eax
xorl %edx, %edx
cmpl %eax, %edx
jae 0x1f110a
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: is_dedup_weak_arc(asg_arc_t*, unsigned int, unsigned int, ma_hit_t_alloc*)
uint32_t is_dedup_weak_arc(asg_arc_t *av, uint32_t an, uint32_t ak, ma_hit_t_alloc *rev)
{
    uint32_t k, w, m; ma_hit_t_alloc *z = NULL;
    for (k = 0; k < an; k++) {
        if((k == ak) || (av[k].del) || (!av[k].strong)) continue;
        if(av[k].ol > av[ak].ol) {
            z = &(rev[av[k].v>>1]); w = (av[ak].v^(av[k].v&1));
            for (m = 0; m < z->length; m++) {
                if((z->buffer[m].tn<<1|(z->buffer[m].rev)) == w) break;
            }
            if(m < z->length) return 1;
        }
    }

    return 0;
}

// Assembly:
testl %esi, %esi
je 0x1f368e
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %eax
leaq (%rax,%rax,2), %rdx
leaq (%rdi,%rdx,8), %rdx
movl %esi, %esi
xorl %r8d, %r8d
movl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
cmpq %rax, %r8
je 0x1f3682
leaq (%r8,%r8,2), %r11
movl 0xc(%rdi,%r11,8), %r10d
testl %r10d, %r10d
js 0x1f3682
leaq (%rdi,%r11,8), %r11
testb $0x40, 0x11(%r11)
je 0x1f3682
movl 0xc(%rdx), %ebx
andl %r9d, %ebx
cmpl %ebx, %r10d
jbe 0x1f3682
movl 0x8(%r11), %r10d
movl %r10d, %r11d
shrl %r11d
leaq (%r11,%r11,2), %r11
movl 0xc(%rcx,%r11,8), %ebx
testq %rbx, %rbx
je 0x1f3682
leaq (%rcx,%r11,8), %r11
andl $0x1, %r10d
xorl 0x8(%rdx), %r10d
movq (%r11), %r11
shlq $0x3, %rbx
leaq (%rbx,%rbx,4), %rbx
xorl %r14d, %r14d
movl 0xc(%r11,%r14), %ebp
movl 0x18(%r11,%r14), %r15d
shrdl $0x1f, %ebp, %r15d
cmpl %r10d, %r15d
je 0x1f3691
addq $0x28, %r14
cmpq %r14, %rbx
jne 0x1f3665
incq %r8
cmpq %rsi, %r8
jne 0x1f360a
xorl %eax, %eax
jmp 0x1f3696
xorl %eax, %eax
retq
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: iter_flex_asg(flex_asg_t*, flex_asg_e_retrive_t*, unsigned int)
asg_arc_t *iter_flex_asg(flex_asg_t *fg, flex_asg_e_retrive_t *rr, uint32_t v)
{
    asg_arc_t *av; uint32_t nv; asg_arc_t *z;
    av = asg_arc_a(fg->g, v); nv = asg_arc_n(fg->g, v);
    while(rr->i[0] < nv) {
        return &(av[rr->i[0]++]);
    }

    if(rr->i[0] >= nv && rr->i[0] != ((uint32_t)-1)) {
        rr->i[0] = ((uint32_t)-1); rr->i[1] = fg->idx[v];
    }
    while (rr->i[1] != ((uint32_t)-1)) {
        z = &(fg->a[rr->i[1]]); rr->i[1] = fg->pi.a[rr->i[1]];
        return z;
    }
    return NULL;
}

// Assembly:
movq 0x30(%rdi), %rcx
movq 0x28(%rcx), %rax
movl %edx, %edx
movq (%rax,%rdx,8), %r8
movl (%rsi), %eax
cmpl %r8d, %eax
jae 0x1f5379
shrq $0x20, %r8
leaq (%r8,%r8,2), %rdx
shlq $0x3, %rdx
addq 0x8(%rcx), %rdx
leal 0x1(%rax), %ecx
movl %ecx, (%rsi)
leaq (%rax,%rax,2), %rax
leaq (%rdx,%rax,8), %rax
retq
cmpl $-0x1, %eax
je 0x1f5390
movl $0xffffffff, (%rsi)     # imm = 0xFFFFFFFF
movq 0x38(%rdi), %rax
movl (%rax,%rdx,4), %eax
movl %eax, 0x4(%rsi)
jmp 0x1f5393
movl 0x4(%rsi), %eax
cmpl $-0x1, %eax
je 0x1f53b1
movl %eax, %ecx
leaq (%rcx,%rcx,2), %rax
shlq $0x3, %rax
addq 0x58(%rdi), %rax
movq 0x50(%rdi), %rdx
movl (%rdx,%rcx,4), %ecx
movl %ecx, 0x4(%rsi)
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: push_flex_asg_t(flex_asg_t*, asg_arc_t*)
void push_flex_asg_t(flex_asg_t *fg, asg_arc_t *z)
{
    asg_arc_t *av; uint32_t nv, k, v = z->ul>>32;
    av = asg_arc_a(fg->g, v); nv = asg_arc_n(fg->g, v);
    for (k = 0; k < nv; k++) {
        if(av[k].del) {
            av[k] = *z; 
            if(!(fg->need_srt)) {
                if(k > 0 && av[k].ul < av[k-1].ul) fg->need_srt = 1;
                if(k+1 < nv && av[k].ul > av[k+1].ul) fg->need_srt = 1;
            }
            return;
        }
    }

    k = fg->n; fg->need_srt = 1;
    kv_push(asg_arc_t, *fg, *z); 
    kv_push(uint32_t, fg->pi, fg->idx[v]); fg->idx[v] = k;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %r15
shrq $0x20, %r15
movq 0x30(%rdi), %rcx
movq 0x28(%rcx), %rax
movq (%rax,%r15,8), %rax
testl %eax, %eax
je 0x1f5981
movq %rax, %rdx
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rdx
shlq $0x3, %rdx
addq 0x8(%rcx), %rdx
movl %eax, %edi
negl %edi
movl $0x1, %esi
movq %rdx, %rcx
cmpl $0x0, 0xc(%rcx)
js 0x1f5a38
addq $0x18, %rcx
leal (%rdi,%rsi), %r8d
incl %r8d
incl %esi
cmpl $0x1, %r8d
jne 0x1f5964
movq 0x60(%rbx), %r12
movq $0x1, 0x20(%rbx)
cmpq 0x68(%rbx), %r12
jne 0x1f59c2
leaq (%r12,%r12), %rax
testq %r12, %r12
movl $0x2, %ecx
cmovneq %rax, %rcx
movq %rcx, 0x68(%rbx)
movq 0x58(%rbx), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x2370
movq %rax, 0x58(%rbx)
movq 0x60(%rbx), %rcx
jmp 0x1f59c9
movq 0x58(%rbx), %rax
movq %r12, %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x60(%rbx)
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%r14), %rdx
movq %rdx, 0x10(%rax,%rcx,8)
movups (%r14), %xmm0
movups %xmm0, (%rax,%rcx,8)
movq 0x40(%rbx), %rcx
cmpq 0x48(%rbx), %rcx
jne 0x1f5a1b
leaq (%rcx,%rcx), %rax
testq %rcx, %rcx
movl $0x2, %esi
cmovneq %rax, %rsi
movq %rsi, 0x48(%rbx)
movq 0x50(%rbx), %rdi
shlq $0x2, %rsi
callq 0x2370
movq %rax, 0x50(%rbx)
movq 0x40(%rbx), %rcx
jmp 0x1f5a1f
movq 0x50(%rbx), %rax
movq 0x38(%rbx), %rdx
movl (%rdx,%r15,4), %esi
leaq 0x1(%rcx), %rdi
movq %rdi, 0x40(%rbx)
movl %esi, (%rax,%rcx,4)
movl %r12d, (%rdx,%r15,4)
jmp 0x1f5a81
movq 0x10(%r14), %rdi
movq %rdi, 0x10(%rcx)
movups (%r14), %xmm0
movups %xmm0, (%rcx)
cmpq $0x0, 0x20(%rbx)
jne 0x1f5a81
cmpl $0x1, %esi
je 0x1f5a6c
movq (%rcx), %rdi
leal -0x2(%rsi), %r8d
leaq (%r8,%r8,2), %r8
cmpq (%rdx,%r8,8), %rdi
jae 0x1f5a6c
movq $0x1, 0x20(%rbx)
cmpl %eax, %esi
jae 0x1f5a81
movq (%rcx), %rax
cmpq 0x18(%rcx), %rax
jbe 0x1f5a81
movq $0x1, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: flex_asg_t_cleanup(flex_asg_t*)
void flex_asg_t_cleanup(flex_asg_t *fg)
{
    asg_arc_t *p; uint32_t i;
    if(fg->n) {
        for (i = 0; i < fg->n; i++) {
            if(fg->a[i].del) continue;
            p = asg_arc_pushp(fg->g);
            *p = fg->a[i];
        }
        free(fg->g->idx);
        fg->g->idx = 0;
        fg->g->is_srt = 0;
    } else if(fg->need_srt){
        fg->g->is_srt = 0;
    }
    asg_cleanup(fg->g);
    // asg_symm(fg->g);
    // asg_arc_del_trans_ul(fg->g, fg->gap_fuzz);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x60(%rdi), %rax
testq %rax, %rax
je 0x1f6b94
movl $0x1, %ebp
xorl %ecx, %ecx
movl $0x10, %r14d
movq 0x58(%rbx), %rdx
leaq (%rcx,%rcx,2), %r15
cmpl $0x0, 0xc(%rdx,%r15,8)
js 0x1f6b6c
movq 0x30(%rbx), %r12
movl 0x4(%r12), %edx
movl %edx, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl (%r12), %ecx
jne 0x1f6b30
leal (%rcx,%rcx), %eax
testl %ecx, %ecx
cmovel %r14d, %eax
movl %eax, (%r12)
movq 0x8(%r12), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
callq 0x2370
movq %rax, 0x8(%r12)
movl 0x4(%r12), %edx
movl %edx, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
jmp 0x1f6b35
movq 0x8(%r12), %rax
leal 0x1(%rdx), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andl $0x80000000, %edx       # imm = 0x80000000
orl %esi, %edx
movl %edx, 0x4(%r12)
movl %ecx, %ecx
leaq (%rcx,%rcx,2), %rcx
movq 0x58(%rbx), %rdx
movq 0x10(%rdx,%r15,8), %rsi
movq %rsi, 0x10(%rax,%rcx,8)
movups (%rdx,%r15,8), %xmm0
movups %xmm0, (%rax,%rcx,8)
movq 0x60(%rbx), %rax
movl %ebp, %ecx
incl %ebp
cmpq %rcx, %rax
ja 0x1f6ad2
movq 0x30(%rbx), %rax
movq 0x28(%rax), %rdi
callq 0x2220
movq 0x30(%rbx), %rax
movq $0x0, 0x28(%rax)
jmp 0x1f6b9f
cmpq $0x0, 0x20(%rbx)
je 0x1f6ba3
movq 0x30(%rbx), %rax
andb $0x7f, 0x7(%rax)
movq 0x30(%rbx), %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xa0a7d
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: label_contain_dup(asg_t*, R_to_U*, unsigned int, asg64_v*, asg64_v*)
void label_contain_dup(asg_t *g, R_to_U* rI, uint32_t v0, asg64_v *b, asg64_v *dump)
{
    asg_arc_t *av; uint32_t nv, v, i;
    if(!is_contain_r((*rI), (v0>>1))) return;
    b->n = 0; kv_push(uint64_t, *b, v0);
    while (b->n) {
        v = kv_pop(*b);
        if(g->seq_vis[v]&1) continue;
        kv_push(uint64_t, *dump, v);
        g->seq_vis[v] |= 1;
        av = asg_arc_a(g, v); 
        nv = asg_arc_n(g, v);
        for (i = 0; i < nv; ++i) {
            if(av[i].del || (g->seq_vis[av[i].v]&1) || (!is_contain_r((*rI), (av[i].v>>1)))) continue;
            kv_push(uint64_t, *b, av[i].v);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, (%rsp)
movl %edx, %eax
shrl %eax
cmpq %rax, (%rsi)
jbe 0x1f6f10
movq %rcx, %r14
movq %rsi, %r15
movq 0x8(%rsi), %rcx
cmpl $0x0, (%rcx,%rax,4)
js 0x1f6f10
movl %edx, %ebp
movq %rdi, %r12
movq $0x0, (%r14)
cmpq $0x0, 0x8(%r14)
je 0x1f6dc2
movq 0x10(%r14), %rax
xorl %ecx, %ecx
jmp 0x1f6ddf
movq $0x2, 0x8(%r14)
movq 0x10(%r14), %rdi
movl $0x10, %esi
callq 0x2370
movq %rax, 0x10(%r14)
movq (%r14), %rcx
movl %ebp, %edx
leaq 0x1(%rcx), %rsi
movq %rsi, (%r14)
movq %rdx, (%rax,%rcx,8)
movq (%r14), %rax
testq %rax, %rax
je 0x1f6f10
movq 0x10(%r14), %rcx
leaq -0x1(%rax), %rdx
movq %rdx, (%r14)
movl -0x8(%rcx,%rax,8), %ebx
movq 0x30(%r12), %rcx
testb $0x1, (%rcx,%rbx)
jne 0x1f6dec
movq (%rsp), %r13
movq (%r13), %rdx
movq 0x10(%r13), %rax
cmpq 0x8(%r13), %rdx
jne 0x1f6e51
leaq (%rdx,%rdx), %rsi
testq %rdx, %rdx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r13)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%r13)
movq (%r13), %rdx
movq 0x30(%r12), %rcx
leaq 0x1(%rdx), %rsi
movq %rsi, (%r13)
movq %rbx, (%rax,%rdx,8)
orb $0x1, (%rcx,%rbx)
movq 0x28(%r12), %rax
movq (%rax,%rbx,8), %rax
testl %eax, %eax
je 0x1f6dec
movq 0x8(%r12), %rcx
movq %rax, %rdx
shrq $0x20, %rdx
movl %eax, %eax
leaq (%rdx,%rdx,2), %rdx
leaq (%rcx,%rdx,8), %rbp
addq $0x8, %rbp
shlq $0x3, %rax
leaq (%rax,%rax,2), %r13
xorl %ebx, %ebx
cmpl $0x0, 0x4(%rbp,%rbx)
js 0x1f6f02
movq 0x30(%r12), %rax
movl (%rbp,%rbx), %ecx
testb $0x1, (%rax,%rcx)
jne 0x1f6f02
movl %ecx, %eax
shrl %eax
cmpq %rax, (%r15)
jbe 0x1f6f02
movq 0x8(%r15), %rdx
cmpl $0x0, (%rdx,%rax,4)
js 0x1f6f02
movq (%r14), %rdx
movq 0x10(%r14), %rax
cmpq 0x8(%r14), %rdx
jne 0x1f6ef7
leaq (%rdx,%rdx), %rsi
testq %rdx, %rdx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r14)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%r14)
movl (%rbp,%rbx), %ecx
movq (%r14), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, (%r14)
movq %rcx, (%rax,%rdx,8)
addq $0x18, %rbx
cmpq %rbx, %r13
jne 0x1f6e96
jmp 0x1f6dec
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: asg_iterative_semi_circ(asg_t*, ma_hit_t_alloc*, asg64_v*, unsigned int, unsigned int, telo_end_t*)
void asg_iterative_semi_circ(asg_t *g, ma_hit_t_alloc* src, asg64_v *in, uint32_t normal_len, uint32_t pop_chimer, telo_end_t *te)
{
    uint64_t occ = 0, s = 1;
    while (s) {
        s = asg_cut_semi_circ(g, LIM_LEN, 0);
        if(pop_chimer) s = s + asg_cut_chimeric_bub(g, src, in, normal_len, 0, te);
        occ += s;
    }

    // stats_sysm(g);
    if(occ) asg_cleanup(g);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movl %r8d, %ebp
movl %ecx, 0xc(%rsp)
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x64, %esi
xorl %edx, %edx
callq 0x1f81cd
movl %eax, %r15d
testl %ebp, %ebp
je 0x1f890c
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl 0xc(%rsp), %ecx
xorl %r8d, %r8d
movq 0x10(%rsp), %r9
callq 0x1f840a
movl %eax, %eax
addq %rax, %r15
addq %r15, %r14
testq %r15, %r15
jne 0x1f88d7
testq %r14, %r14
je 0x1f892f
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa0a7d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: clear_path_dp_t(path_dp_t*, asg_t*)
void clear_path_dp_t(path_dp_t *x, asg_t *g)
{
    uint32_t n_vx = g->n_seq<<1;
    x->ref.n = x->pat.n = x->pat_cor.n = 0; 
    kv_resize(uint8_t, x->g_flt, n_vx); x->g_flt.n = n_vx;
    memset(x->g_flt.a, 0, sizeof(*(x->g_flt.a))*x->g_flt.n);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl 0x14(%rsi), %ebx
addl %ebx, %ebx
xorl %eax, %eax
movq %rax, 0x30(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, (%rdi)
cmpq %rbx, 0x50(%rdi)
jae 0x1fbccb
leaq -0x1(%rbx), %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x50(%r14)
movq 0x58(%r14), %rdi
callq 0x2370
movq %rax, %rdi
movq %rax, 0x58(%r14)
jmp 0x1fbccf
movq 0x58(%r14), %rdi
movq %rbx, 0x48(%r14)
xorl %esi, %esi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x20e0
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: clear_ubuf_t(ubuf_t*, asg_t*, all_ul_t*, int)
void clear_ubuf_t(ubuf_t *x, asg_t *g, all_ul_t *ul_idx, int32_t up_dp)
{
    uint32_t n_vx = g->n_seq<<1;
    x->a.n = x->S.n = x->T.n = x->b.n = x->e.n = 0;
    kv_resize(uinfo_t, x->a, n_vx); x->a.n = n_vx; memset(x->a.a, 0, sizeof(*(x->a.a))*x->a.n);
    if(up_dp) clear_path_dp_t(&(x->dp), g);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x14(%rsi), %r15d
addl %r15d, %r15d
xorl %eax, %eax
movq %rax, 0x60(%rdi)
movq %rax, 0x48(%rdi)
movq %rax, 0x30(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, (%rdi)
cmpq %r15, 0x8(%rdi)
jae 0x1fbd67
leaq -0x1(%r15), %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%r14)
movq 0x10(%r14), %rdi
shlq $0x5, %rsi
callq 0x2370
movq %rax, %rdi
movq %rax, 0x10(%r14)
jmp 0x1fbd6b
movq 0x10(%r14), %rdi
movq %r15, (%r14)
shlq $0x5, %r15
xorl %esi, %esi
movq %r15, %rdx
callq 0x20e0
testl %ebp, %ebp
je 0x1fbd9c
addq $0x90, %r14
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1fbc5e
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: get_ul_read_weight(all_ul_t*, unsigned int*, uinfo_t*, ul_vec_t*, unsigned int, unsigned int, unsigned int)
uint64_t get_ul_read_weight(all_ul_t *ul, uint32_t *prg, uinfo_t *g_idx, ul_vec_t *p, uint32_t ii, uint32_t v, uint32_t w)
{
    assert((!p->bb.a[ii].base)&&(p->bb.a[ii].hid == (v>>1))&&(p->bb.a[ii].el)&&(p->bb.a[ii].pchain));
    if(p->bb.a[ii].aidx == (uint32_t)-1) return 0; ///not connected
    uc_block_t *li = NULL, *lk = NULL; uint32_t li_v, lk_v;
    li = &(p->bb.a[ii]); li_v = (((uint32_t)(li->hid))<<1)|((uint32_t)(li->rev)); //li_v^=1;
    if(li_v != v) return 0;

    for (lk = &(p->bb.a[li->aidx]), w^=1; lk; ) {
        lk_v = (((uint32_t)(lk->hid))<<1)|((uint32_t)(lk->rev)); //lk_v^=1;
        while (lk_v != (w^1)) {
            if(g_idx[w].p==(uint32_t)-1) break;
            w = g_idx[w].p;
        }

        if(lk_v == (w^1)) {

        }

        lk = ((lk->aidx==(uint32_t)-1)?NULL:&(p->bb.a[lk->aidx]));
        
    }
    return 1;
}

// Assembly:
movq 0x30(%rcx), %rcx
movl %r8d, %eax
leaq (%rax,%rax,8), %rdx
movzbl 0x20(%rcx,%rdx,4), %eax
testb $0x40, %al
jne 0x1fbded
testb $0x1f, %al
je 0x1fbded
testb %al, %al
jns 0x1fbded
leaq (%rcx,%rdx,4), %rdx
movl (%rdx), %ecx
movl %r9d, %esi
shrl %esi
cmpl %esi, %ecx
jne 0x1fbded
cmpl $-0x1, 0x1c(%rdx)
je 0x1fbdea
shrl $0x5, %eax
andl $0x1, %eax
leal (%rax,%rcx,2), %ecx
xorl %eax, %eax
cmpl %r9d, %ecx
sete %al
retq
xorl %eax, %eax
retq
pushq %rax
leaq 0x4a060(%rip), %rdi     # 0x245e55
leaq 0x4980d(%rip), %rsi     # 0x245609
leaq 0x4a0ab(%rip), %rcx     # 0x245eae
movl $0xd22, %edx            # imm = 0xD22
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: ulg_len_check(asg_t*, unsigned int, uc_block_t*)
uint64_t ulg_len_check(asg_t *g, uint32_t v, uc_block_t *p)
{
    // if(!(((v&1) && (p->ts==0)) || (((v&1)==0) && (p->te==g->seq[v>>1].len)))) {
    //     fprintf(stderr, "\n[M::%s::] v>>1:%u, v&1:%u, ts:%u, te:%u, tlen:%u, qs:%u, qe:%u, pidx:%u, aidx:%u, flag:%u\n", 
    //     __func__, v>>1, v&1, p->ts, p->te, g->seq[v>>1].len, p->qs, p->qe, p->pidx, p->aidx, flag);
    // }
    // assert(((v&1) && (p->ts==0)) || (((v&1)==0) && (p->te==g->seq[v>>1].len)));
    if(!(((v&1) && (p->ts==0)) || (((v&1)==0) && (p->te==g->seq[v>>1].len)))) return 0;
    // if((v&1) && (p->ts!=0)) return 0;
    // if(((v&1)==0) && (p->te!=g->seq[v>>1].len)) return 0;
    if(p->ts==0 && p->te==g->seq[v>>1].len) return 1;
    int32_t ol = arc_first(g, v).ol;///max len
    int32_t tl = p->te - p->ts;
    tl -= ol;
    if(tl > 20000 || tl > (g->seq[v>>1].len*0.2)) return 1;
    return 0;
}

// Assembly:
testb $0x1, %sil
jne 0x1fbe39
movq 0x20(%rdi), %rax
movl %esi, %ecx
shrl %ecx
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
andl (%rax,%rcx,8), %r8d
cmpl %r8d, 0x10(%rdx)
jne 0x1fbe3f
movl 0xc(%rdx), %r8d
testl %r8d, %r8d
je 0x1fbe42
movl 0x10(%rdx), %ecx
jmp 0x1fbe64
cmpl $0x0, 0xc(%rdx)
je 0x1fbe42
xorl %eax, %eax
retq
movq 0x20(%rdi), %rax
movl %esi, %ecx
shrl %ecx
movl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
andl (%rax,%rcx,8), %r9d
movl 0x10(%rdx), %ecx
xorl %r8d, %r8d
movl $0x1, %eax
cmpl %r9d, %ecx
je 0x1fbe41
movq 0x8(%rdi), %rax
movq 0x28(%rdi), %rdx
movl %esi, %r9d
movl 0x4(%rdx,%r9,8), %edx
leaq (%rdx,%rdx,2), %r9
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl 0xc(%rax,%r9,8), %eax
andl %edx, %eax
addl %r8d, %eax
subl %eax, %ecx
movl $0x1, %eax
cmpl $0x4e20, %ecx           # imm = 0x4E20
jg 0x1fbe41
cvtsi2sd %ecx, %xmm0
movq 0x20(%rdi), %rcx
shrl %esi
andl (%rcx,%rsi,8), %edx
cvtsi2sd %edx, %xmm1
mulsd 0x356d1(%rip), %xmm1    # 0x231580
ucomisd %xmm1, %xmm0
jbe 0x1fbe3f
jmp 0x1fbe41
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: update_l_coord(asg_t*, unsigned long, unsigned int, uc_block_t*, unsigned long*, unsigned long*)
void update_l_coord(asg_t *g, uint64_t o_s, uint32_t v, uc_block_t *p, uint64_t *s, uint64_t *e)
{
    // if(!(((v&1) && (p->ts==0)) || (((v&1)==0) && (p->te==g->seq[v>>1].len)))) {
    //     fprintf(stderr, "\n[M::%s::] v>>1:%u, v&1:%u, ts:%u, te:%u, tlen:%u\n", 
    //     __func__, v>>1, v&1, p->ts, p->te, g->seq[v>>1].len);
    // }
    // assert(((v&1) && (p->ts==0)) || (((v&1)==0) && (p->te==g->seq[v>>1].len)));
    // assert((v&1) && (p->ts==0));
    // assert(((v&1)==0) && (p->te==g->seq[v>>1].len));
    if(((v&1)==0)) {
        (*s) = o_s + p->ts; (*e) = o_s + p->te;
    } else {
        (*s) = o_s + g->seq[v>>1].len - p->te;
        (*e) = o_s + g->seq[v>>1].len - p->ts;
    }
}

// Assembly:
testb $0x1, %dl
jne 0x1fbecd
movl 0xc(%rcx), %eax
addq %rsi, %rax
movq %rax, (%r8)
movl 0x10(%rcx), %eax
addq %rsi, %rax
jmp 0x1fbefb
movq 0x20(%rdi), %rax
shrl %edx
movl (%rax,%rdx,8), %edi
movl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
andq %r10, %rdi
addq %rsi, %rdi
movl 0x10(%rcx), %r11d
subq %r11, %rdi
movq %rdi, (%r8)
movl (%rax,%rdx,8), %eax
andq %r10, %rax
addq %rsi, %rax
movl 0xc(%rcx), %ecx
subq %rcx, %rax
movq %rax, (%r9)
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: get_arch_len(asg_t*, unsigned int, unsigned int)
uint32_t get_arch_len(asg_t *g, uint32_t v, uint32_t w)
{

    uint32_t i, an; asg_arc_t *av; 
    av = asg_arc_a(g, v); an = asg_arc_n(g, v);     
    for (i = 0; i < an; i++) {
        if(av[i].del) continue;
        if(av[i].v == w) return ((uint32_t)av[i].ul);
    }
    return (uint32_t)-1;
}

// Assembly:
movq 0x28(%rdi), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rsi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %esi, %esi
je 0x1fc507
movq 0x8(%rdi), %rcx
movq %rsi, %rdi
shrq $0x20, %rdi
movl %esi, %r8d
leaq (%rdi,%rdi,2), %rsi
leaq (%rcx,%rsi,8), %rdi
addq $0xc, %rdi
shlq $0x3, %r8
leaq (%r8,%r8,2), %r9
xorl %r8d, %r8d
cmpl $0x0, (%rdi,%r8)
js 0x1fc4fe
cmpl %edx, -0x4(%rdi,%r8)
je 0x1fc508
addq $0x18, %r8
cmpq %r8, %r9
jne 0x1fc4f0
retq
leaq (%rcx,%rsi,8), %rax
movl (%r8,%rax), %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: node_check(unsigned int, unsigned int, unsigned int, unsigned int, double, unsigned int)
uint64_t node_check(uint32_t ul_v, uint32_t g_v, uint32_t ul_v_len, uint32_t g_v_len, double diff_len, uint32_t ul_weight)
{
    if(ul_v != g_v) return 0;
    uint32_t x = ((ul_v_len >= g_v_len)? (ul_v_len - g_v_len): (g_v_len - ul_v_len));
    if(x > g_v_len*diff_len) return 0;
    if(g_v_len == 0) {
        return ul_weight;
    } else {
        return (((double)(g_v_len-x))/((double)g_v_len))*ul_weight;
    }
}

// Assembly:
cmpl %esi, %edi
jne 0x1fcdcc
movl %edx, %eax
subl %ecx, %eax
negl %eax
subl %ecx, %edx
cmovbl %eax, %edx
cvtsi2sd %rdx, %xmm2
movl %ecx, %eax
cvtsi2sd %rax, %xmm1
mulsd %xmm1, %xmm0
ucomisd %xmm0, %xmm2
jbe 0x1fcdcf
xorl %eax, %eax
retq
testl %ecx, %ecx
je 0x1fce10
subl %edx, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
movl %r8d, %eax
xorps %xmm2, %xmm2
cvtsi2sd %rax, %xmm2
divsd %xmm1, %xmm0
mulsd %xmm0, %xmm2
cvttsd2si %xmm2, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
subsd 0x34504(%rip), %xmm2    # 0x231308
cvttsd2si %xmm2, %rax
andq %rdx, %rax
orq %rcx, %rax
retq
movl %r8d, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: print_dp_matrix(path_dp_t*)
void print_dp_matrix(path_dp_t *dp)
{
    uint64_t i, j;
    for (i = 0; i < dp->n; i++) {//pat
        for (j = 0; j < dp->m; j++) {//mat
            fprintf(stderr, "%ld<%u>,\t", dp->m_score.a[ul_dp_idx(*dp, i, j)], dp->m_dir.a[ul_dp_idx(*dp, i, j)]);
        }
        fprintf(stderr, "\n");
    }
    
}

// Assembly:
cmpq $0x0, 0x90(%rdi)
je 0x1fcea9
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x981ab(%rip), %r15     # 0x294fe0
leaq 0x4922b(%rip), %r14     # 0x246067
xorl %r12d, %r12d
movq 0x98(%rbx), %rax
testq %rax, %rax
je 0x1fce87
xorl %r13d, %r13d
movq (%r15), %rdi
movq 0x88(%rbx), %rcx
imulq %r12, %rax
leaq (%rax,%r13), %rdx
movq (%rcx,%rdx,8), %rdx
addq 0x70(%rbx), %rax
movzbl (%r13,%rax), %ecx
movq %r14, %rsi
xorl %eax, %eax
callq 0x22b0
incq %r13
movq 0x98(%rbx), %rax
cmpq %rax, %r13
jb 0x1fce4e
movq (%r15), %rsi
movl $0xa, %edi
callq 0x2270
incq %r12
cmpq 0x90(%rbx), %r12
jb 0x1fce3f
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: get_eul_weight(bubble_type*, unsigned int, unsigned int, uinfo_t*, ubuf_t*, all_ul_t*, asg_t*)
uint64_t get_eul_weight(bubble_type* bub, uint32_t v, uint32_t w, uinfo_t *g_idx, ubuf_t *b, all_ul_t *ul, asg_t *g)
{
    uint64_t *a, to = 0; int64_t a_n, l, k;
    a = ul->ridx.occ.a + ul->ridx.idx.a[v>>1];
	a_n = ul->ridx.idx.a[(v>>1)+1] - ul->ridx.idx.a[v>>1]; 
    b->dp.pat.n = b->dp.pat_cor.n = b->dp.ref.n = 0;
    for (l = 0, k = 1; k <= a_n; k++) {
        if((k == a_n) || ((a[k]>>32) != (a[l]>>32))) {
            // if((v == 106 && w == 103) || (v == 24 && w == 23)) {
            //     fprintf(stderr, "+[M::%s::] l->%ld, k->%ld, a_n->%ld\n", __func__, l, k, a_n);
            // }
            to += ul_dp(bub, ul, b, a + l, k - l, g, v, w, 1);
            // if((v == 106 && w == 103) || (v == 24 && w == 23)) { 
            //     fprintf(stderr, "-[M::%s::] l->%ld, k->%ld, a_n->%ld\n", __func__, l, k, a_n);
            // }
            to += ul_dp(bub, ul, b, a + l, k - l, g, v, w, 0);
            // if((v == 106 && w == 103) || (v == 24 && w == 23)) {
            //     fprintf(stderr, "*[M::%s::] l->%ld, k->%ld, a_n->%ld\n", __func__, l, k, a_n);
            // }
            l = k;
        }
    }

    return to;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, 0x28(%rsp)
movq %rdi, 0x18(%rsp)
movq 0x28(%r9), %rax
movq %rsi, 0x20(%rsp)
movl %esi, %ecx
shrl %ecx
movl (%rax,%rcx,4), %edx
movl 0x4(%rax,%rcx,4), %esi
movq %rdx, %rcx
shlq $0x3, %rcx
movq %r9, 0x38(%rsp)
addq 0x40(%r9), %rcx
movq %rcx, 0x10(%rsp)
xorl %eax, %eax
movq %rax, 0x90(%r8)
movq %rax, 0xc0(%r8)
movq %r8, 0x30(%rsp)
movq %rax, 0xa8(%r8)
subl %edx, %esi
movq %rsi, 0x8(%rsp)
je 0x1fd7be
xorl %esi, %esi
movq 0x8(%rsp), %rcx
cmpq $0x1, %rcx
movl $0x0, %edx
sbbq %rcx, %rdx
movq %rdx, 0x40(%rsp)
movl $0x1, %r13d
xorl %eax, %eax
movq 0x38(%rsp), %rbx
movq 0x30(%rsp), %rbp
movq 0x28(%rsp), %r15
cmpq %r13, 0x8(%rsp)
je 0x1fd724
movq 0x10(%rsp), %rdx
movq (%rdx,%rsi,8), %rcx
xorq (%rdx,%r13,8), %rcx
shrq $0x20, %rcx
je 0x1fd7a6
movq 0x10(%rsp), %rcx
leaq (%rcx,%rsi,8), %rcx
movq %rcx, 0x50(%rsp)
movq %r13, %r14
subq %rsi, %r14
subq $0x8, %rsp
movq 0x20(%rsp), %rdi
movq %rax, 0x50(%rsp)
movq %rbx, %rsi
movq %rbp, %rdx
movq %r14, %r8
movq 0x98(%rsp), %r9
pushq $0x1
pushq %r15
pushq 0x38(%rsp)
callq 0x1fd43e
addq $0x20, %rsp
movq %rax, %r12
addq 0x48(%rsp), %r12
subq $0x8, %rsp
movq 0x20(%rsp), %rdi
movq %rbx, %rsi
movq %rbp, %rdx
movq 0x58(%rsp), %rcx
movq %r14, %r8
movq 0x98(%rsp), %r9
pushq $0x0
pushq %r15
pushq 0x38(%rsp)
callq 0x1fd43e
addq $0x20, %rsp
addq %r12, %rax
movq %r13, %rsi
movq 0x40(%rsp), %rcx
addq %r13, %rcx
incq %rcx
incq %r13
cmpq $0x1, %rcx
jne 0x1fd706
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: phrase_exact_chains(ul_resolve_t*, unsigned long*, long, asg_t*, unsigned long, unsigned long)
void phrase_exact_chains(ul_resolve_t *uidx, uint64_t *a, int64_t a_n, asg_t *bg, uint64_t bub_id, uint64_t inner_beg)
{
    int64_t k, l;
    for (k = l = 0; k < a_n; k++) {
        if(k+1 >= a_n) continue;
        if((arc_first(bg, a[k]>>32)).el) continue;
        get_chain_ul_cov(uidx, a+l, k+1-l, bub_id, inner_beg + l);
        l = k + 1;
    }
    if(l < a_n) get_chain_ul_cov(uidx, a+l, a_n-l, bub_id, inner_beg + l);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
testq %rdx, %rdx
jle 0x1fe16b
movq %rcx, %r12
movq %rbx, %r13
negq %r13
movl $0x1, %ebp
xorl %eax, %eax
cmpq %rbx, %rbp
jge 0x1fe155
movq 0x8(%r12), %rcx
movq 0x28(%r12), %rdx
movl -0x4(%r15,%rbp,8), %esi
movl 0x4(%rdx,%rsi,8), %edx
leaq (%rdx,%rdx,2), %rdx
cmpb $0x0, 0x12(%rcx,%rdx,8)
jne 0x1fe155
leaq (%r15,%rax,8), %rsi
movq %rbp, %rdx
subq %rax, %rdx
movq %r14, %rdi
callq 0x1fde3e
movq %rbp, %rax
leaq 0x1(,%rbp), %rcx
addq %r13, %rcx
incq %rbp
cmpq $0x1, %rcx
jne 0x1fe11d
jmp 0x1fe16d
xorl %eax, %eax
subq %rax, %rbx
jle 0x1fe18f
leaq (%r15,%rax,8), %rsi
movq %r14, %rdi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1fde3e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: resolve_dip_bub_chains(ul_resolve_t*)
void resolve_dip_bub_chains(ul_resolve_t *uidx)
{
    bubble_type *bub = uidx->bub; 
    uint32_t i; int32_t k, l, un; ma_utg_t *u; 
    for (i = 0; i < bub->b_ug->u.n; i++) {
        u = &(bub->b_ug->u.a[i]); un = u->n;
        if(un <= 1) continue;///single bubble
        for (l = -1, k = 0; k <= un; k++) {
            if((k == un) || ((u->a[k]>>33) >= bub->f_bub)) {///not a complete bubble
                // if(k < un) {
                //     fprintf(stderr, "++++++[M::%s::] l->%d, k->%d, bid->%lu, f_bub->%lu\n", 
                //     __func__, l, k, (u->a[k]>>33), bub->f_bub);
                // }
                if(k - l > 1) {///at least a complete bubble
                    // fprintf(stderr, "\n[M::%s::] l->%d, k->%d\n", __func__, l, k);
                    phrase_exact_chains(uidx, u->a+l+1, k-l-1, bub->b_g, i, l+1);
                }
                l = k;
            }
        }

    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, (%rsp)
movq 0x28(%rdi), %r14
movq 0xc0(%r14), %rax
movq (%rax), %rcx
testq %rcx, %rcx
je 0x1fe257
xorl %r15d, %r15d
movq 0x10(%rax), %rdx
leaq (%r15,%r15,4), %rsi
movslq 0x10(%rdx,%rsi,8), %r12
cmpq $0x2, %r12
jl 0x1fe24b
leaq (%rdx,%rsi,8), %r13
leal 0x1(%r12), %ebp
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ebx, %ebx
cmpq %rbx, %r12
je 0x1fe204
movq 0x18(%r13), %rcx
movq (%rcx,%rbx,8), %rcx
shrq $0x21, %rcx
cmpq 0x80(%r14), %rcx
jb 0x1fe239
movl %ebx, %ecx
subl %eax, %ecx
cmpl $0x1, %ecx
jle 0x1fe237
movq 0x18(%r13), %rcx
movslq %eax, %rdx
leaq (%rcx,%rdx,8), %rsi
addq $0x8, %rsi
movl %eax, %edx
notl %edx
addl %ebx, %edx
movq 0xb8(%r14), %rcx
incl %eax
movslq %eax, %r9
movq (%rsp), %rdi
callq 0x1fe0f4
movl %ebx, %eax
incq %rbx
cmpq %rbx, %rbp
jne 0x1fe1ea
movq 0xc0(%r14), %rax
movq (%rax), %rcx
incl %r15d
cmpq %r15, %rcx
ja 0x1fe1c7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: ug_occ_w(unsigned long, unsigned long, ma_utg_t*)
uint64_t ug_occ_w(uint64_t is, uint64_t ie, ma_utg_t *u)
{
    if(is == 0 && ie == u->len) return u->n;
    uint64_t l, i, us, ue, occ;
    for (i = l = occ = 0; i < u->n; i++) {
		us = l; ue = l + Get_READ_LENGTH(R_INF, (u->a[i]>>33));
        // if(is == 15390 && ie == 31730) {
        //     fprintf(stderr, "[M::%s::i->%lu] is->%lu, ie->%lu, us->%lu, ue->%lu, u->len->%u\n", 
        //     __func__, i, is, ie, us, ue, u->len);
        // }
		if(is <= us && ie >= ue) occ++;
		if(us >= ie) break;
		l += (uint32_t)u->a[i];
	}
    return occ;
}

// Assembly:
testq %rdi, %rdi
jne 0x1fe27b
movl (%rdx), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq %rsi, %rax
jne 0x1fe27b
movl 0x10(%rdx), %eax
retq
movl 0x10(%rdx), %ecx
testq %rcx, %rcx
je 0x1fe2ce
leaq 0x97fa6(%rip), %rax     # 0x296230
movq 0x18(%rax), %r8
xorl %eax, %eax
xorl %r9d, %r9d
xorl %r10d, %r10d
cmpq %rdi, %r9
jb 0x1fe2b5
movq 0x18(%rdx), %r11
movq (%r11,%r10,8), %r11
shrq $0x21, %r11
movq (%r8,%r11,8), %r11
addq %r9, %r11
cmpq %r11, %rsi
sbbq $-0x1, %rax
cmpq %rsi, %r9
jae 0x1fe2cd
movq 0x18(%rdx), %r11
movl (%r11,%r10,8), %r11d
addq %r11, %r9
incq %r10
cmpq %r10, %rcx
jne 0x1fe296
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: init_ul_resolve_t(asg_t*, ma_ug_t*, bubble_type*, all_ul_t*, ug_opt_t*, unsigned char*)
ul_resolve_t *init_ul_resolve_t(asg_t *sg, ma_ug_t *init_ug, bubble_type* bub, all_ul_t *idx, ug_opt_t *uopt, uint8_t *r_het)
{
    ul_resolve_t *p = NULL; CALLOC(p, 1);
    p->sg = sg; p->init_ug = init_ug; p->bub = bub; p->idx = idx; p->r_het = r_het; p->uopt = uopt;
    p->l1_ug = copy_untig_graph(p->init_ug);  
    init_integer_ml_t(&p->str_b, p, asm_opt.thread_num);
    // init_ul_path_srt_t(p);
    init_ul_str_idx_t(p);
    return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, (%rsp)
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movl $0x1, %edi
movl $0x2b0, %esi            # imm = 0x2B0
callq 0x2120
movq %rax, %rbx
movq %rbp, 0x20(%rax)
movq %r13, 0x8(%rax)
movq %r12, 0x28(%rax)
movq %r15, 0x30(%rax)
movq (%rsp), %rax
movq %rax, 0x58(%rbx)
movq %r14, (%rbx)
movq %r13, %rdi
callq 0xc8eab
movq %rax, 0x18(%rbx)
leaq 0x970a7(%rip), %rax     # 0x295758
movslq 0x7c(%rax), %rdi
movq %rdi, 0x1e0(%rbx)
movl $0x328, %esi            # imm = 0x328
callq 0x2120
movq %rax, 0x1d8(%rbx)
movq %rbx, %rdi
callq 0x1fe2d1
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: append_connective(integer_aln_t*, ul_chain_t*, long, unsigned long, unsigned long*)
int64_t append_connective(integer_aln_t *aln, ul_chain_t *idx, int64_t str_i, uint64_t occ_thres, uint64_t *res)
{
    int64_t k, kl = idx->e - idx->s, str_k = -1, fp = 0; integer_aln_t *a = aln + idx->s; 
    assert(idx->sc <= (uint64_t)kl);
    for (k = idx->sc; k < kl; k++) {
        str_k = (uint32_t)a[k].tn_rev_qk;
        if(str_k >= str_i) break;
    }
    idx->sc = k;
    if(k >= kl || str_k != str_i) return 0;

    for (k -= 1; k >= 0; k--) {
        str_k = (uint32_t)a[k].tn_rev_qk;
        if(res[str_k] < occ_thres) {
            res[str_k]++;
            if(res[str_k] == occ_thres) fp++;
        }
    }
    return fp;
}

// Assembly:
pushq %rax
movl (%rsi), %r10d
movl 0x4(%rsi), %eax
subl %r10d, %eax
movq 0x10(%rsi), %r9
cmpq %rax, %r9
ja 0x1ffd41
jae 0x1ffcf7
leaq (%r9,%r9,2), %r11
incq %r9
leaq (%r10,%r10,2), %r10
shlq $0x3, %r10
leaq (%r10,%r11,8), %r10
addq %r10, %rdi
addq $-0x8, %rdi
movq %rax, %r10
negq %r10
movl 0x18(%rdi), %r11d
cmpq %rdx, %r11
jge 0x1ffcff
addq $0x18, %rdi
leaq (%r10,%r9), %r11
incq %r11
incq %r9
cmpq $0x1, %r11
jne 0x1ffcd7
movq %rax, %r9
movq %r9, 0x10(%rsi)
xorl %eax, %eax
popq %rcx
retq
leaq -0x1(%r9), %r10
movq %r10, 0x10(%rsi)
xorl %eax, %eax
cmpq %rdx, %r11
jne 0x1ffcfd
testq %r10, %r10
jle 0x1ffcfd
xorl %eax, %eax
movl (%rdi), %edx
movq (%r8,%rdx,8), %rsi
cmpq %rcx, %rsi
jae 0x1ffd32
incq %rsi
movq %rsi, (%r8,%rdx,8)
xorl %edx, %edx
cmpq %rcx, %rsi
sete %dl
addq %rdx, %rax
decq %r9
addq $-0x18, %rdi
cmpq $0x1, %r9
ja 0x1ffd15
jmp 0x1ffcfd
leaq 0x46668(%rip), %rdi     # 0x2463b0
leaq 0x458ba(%rip), %rsi     # 0x245609
leaq 0x46672(%rip), %rcx     # 0x2463c8
movl $0x1241, %edx           # imm = 0x1241
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: connective_conform(integer_aln_t*, ul_chain_t*, long, long, long, unsigned long)
int64_t connective_conform(integer_aln_t *aln, ul_chain_t *idx_a, int64_t idx_n, int64_t str_i0, int64_t occ_thres, uint64_t is_cov_check)
{
    if(str_i0 == 0) return 1;
    int64_t z; ul_chain_t *x; int64_t k, kl, str_k, match, exact; integer_aln_t *a;
    for (z = match = exact = 0; z < idx_n; z++) {
        x = &(idx_a[z]);
        kl = x->e - x->s; str_k = -1; a = aln + x->s; 
        assert(x->sc <= (uint64_t)kl);
        for (k = x->sc; k < kl; k++) {
            str_k = (uint32_t)a[k].tn_rev_qk;
            if(str_k >= str_i0) break;
        }
        x->sc = k;
        if(k >= kl || str_k != str_i0) continue;
        k--;
        if(k >= 0) {
            str_k = (uint32_t)a[k].tn_rev_qk;
            if(str_k+1 == str_i0) {
                match++;
                if(a[k].tk+1 == a[k+1].tk) exact++;
            }
        }
    }

    if(is_cov_check) {
        if(match < occ_thres) return 0;
    } else {
        assert(match >= occ_thres);
    }

    if(exact == match) return 1;
    if(exact > (match*0.51) && exact > (match/2)) return 1;
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x1, %eax
testq %rcx, %rcx
je 0x1ffe68
testq %rdx, %rdx
jle 0x1ffe19
xorl %r10d, %r10d
xorl %r11d, %r11d
xorl %ebx, %ebx
leaq (%rbx,%rbx,4), %r13
movl (%rsi,%r13,8), %r14d
movl 0x4(%rsi,%r13,8), %r12d
subl %r14d, %r12d
movq 0x10(%rsi,%r13,8), %r15
cmpq %r12, %r15
ja 0x1ffe77
leaq (%rsi,%r13,8), %r13
jae 0x1ffdd9
leaq (%r15,%r15,2), %rbp
leaq (%r14,%r14,2), %r14
shlq $0x3, %r14
leaq (%r14,%rbp,8), %r14
addq %rdi, %r14
movl 0x10(%r14), %ebp
cmpq %rcx, %rbp
jge 0x1ffde7
incq %r15
addq $0x18, %r14
cmpq %r15, %r12
jne 0x1ffdc1
movq %r12, %r15
movq %r15, 0x10(%r13)
incq %rbx
cmpq %rdx, %rbx
jne 0x1ffd8a
jmp 0x1ffe1f
movq %r15, 0x10(%r13)
testq %r15, %r15
jle 0x1ffddd
cmpq %rcx, %rbp
jne 0x1ffddd
movl -0x8(%r14), %r15d
incq %r15
cmpq %rcx, %r15
jne 0x1ffddd
incq %r11
movl -0x18(%r14), %ebp
incl %ebp
xorl %r15d, %r15d
cmpl (%r14), %ebp
sete %r15b
addq %r15, %r10
jmp 0x1ffddd
xorl %r11d, %r11d
xorl %r10d, %r10d
testq %r9, %r9
je 0x1ffe2d
cmpq %r8, %r11
jge 0x1ffe32
xorl %eax, %eax
jmp 0x1ffe68
cmpq %r8, %r11
jl 0x1ffe96
cmpq %r11, %r10
je 0x1ffe68
cvtsi2sd %r10, %xmm0
cvtsi2sd %r11, %xmm1
mulsd 0x317ff(%rip), %xmm1    # 0x231648
ucomisd %xmm1, %xmm0
seta %al
movq %r11, %rcx
shrq $0x3f, %rcx
addq %r11, %rcx
sarq %rcx
cmpq %rcx, %r10
setg %cl
andb %al, %cl
movzbl %cl, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x46534(%rip), %rdi     # 0x2463b2
leaq 0x45784(%rip), %rsi     # 0x245609
leaq 0x46594(%rip), %rcx     # 0x246420
movl $0x125a, %edx           # imm = 0x125A
callq 0x2110
leaq 0x465e2(%rip), %rdi     # 0x24647f
leaq 0x45765(%rip), %rsi     # 0x245609
leaq 0x46575(%rip), %rcx     # 0x246420
movl $0x126e, %edx           # imm = 0x126E
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: print_integer_seq(ma_ug_t*, ul_str_t*, long, long)
void print_integer_seq(ma_ug_t *ug, ul_str_t *str, int64_t id, int64_t is_header)
{
    uint64_t i;
    if(is_header) {
        fprintf(stderr,"[M::%s::tid->%ld] occ::%u\n", __func__, id, str[id].cn);
    }
    for (i = 0; i < str[id].cn; i++) {
        fprintf(stderr, "utg%.6d%c(%c)\t", (((uint32_t)str[id].a[i])>>1)+1, 
        "lc"[ug->u.a[(((uint32_t)str[id].a[i])>>1)].circ], "+-"[(((uint32_t)str[id].a[i])&1)]);
    }
    fprintf(stderr,"\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
testq %rcx, %rcx
jne 0x20050a
shlq $0x5, %r14
testl $0x7fffffff, 0x18(%r15,%r14) # imm = 0x7FFFFFFF
jne 0x200517
movq 0x94ae8(%rip), %rax     # 0x294fe0
movq (%rax), %rsi
movl $0xa, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x2270
movq %r15, %rdi
movq %r14, %rsi
callq 0x2ebb9
jmp 0x2004e2
leaq (%r15,%r14), %rdi
leaq (%r15,%r14), %rdx
addq $0x18, %rdx
movq %rbx, %rsi
callq 0x2ebf0
jmp 0x2004f1
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: utg_cover_read_occ_by_qs(ma_ug_t*, long, long, uc_block_t*)
int64_t utg_cover_read_occ_by_qs(ma_ug_t *ug, int64_t oqs, int64_t oqe, uc_block_t *x)
{
    assert(oqs >= (int64_t)x->qs && oqs <= (int64_t)x->qe);
    assert(oqe >= (int64_t)x->qs && oqe <= (int64_t)x->qe);
    assert(oqe > oqs);
    int64_t s_off, e_off, k;
    s_off = get_offset_adjust(oqs-x->qs, x->qe-x->qs, x->te-x->ts);
	e_off = get_offset_adjust(x->qe-oqe, x->qe-x->qs, x->te-x->ts);
    if(x->rev) {
        k = s_off; s_off = e_off; e_off = k;
    }

    return ug_occ_w(x->ts + s_off, x->te - e_off, &(ug->u.a[x->hid]));
}

// Assembly:
pushq %rax
movq %rsi, %rax
movl 0x4(%rcx), %esi
cmpq %rax, %rsi
jg 0x200757
movl 0x8(%rcx), %r8d
cmpq %rax, %r8
jb 0x200757
cmpq %rdx, %rsi
jg 0x200776
cmpq %rdx, %r8
jl 0x200776
cmpq %rax, %rdx
jbe 0x200795
subl %esi, %eax
movl %r8d, %r10d
subl %esi, %r10d
movl 0x10(%rcx), %esi
movl 0xc(%rcx), %r9d
movl %esi, %r11d
subl %r9d, %r11d
cvtsi2sd %rax, %xmm0
cvtsi2sd %r10, %xmm1
divsd %xmm1, %xmm0
cvtsi2sd %r11, %xmm2
mulsd %xmm2, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, %r10d
subl %edx, %r8d
xorps %xmm0, %xmm0
cvtsi2sd %r8, %xmm0
divsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
cvttsd2si %xmm0, %rax
testb $0x20, 0x20(%rcx)
movl %eax, %eax
movq %r10, %r8
cmoveq %rax, %r8
movl (%rcx), %ecx
cmoveq %r10, %rax
addq %r9, %rax
leaq (%rcx,%rcx,4), %rdx
shlq $0x3, %rdx
addq 0x10(%rdi), %rdx
subq %r8, %rsi
movq %rax, %rdi
popq %rax
jmp 0x1fe266
leaq 0x45f1b(%rip), %rdi     # 0x246679
leaq 0x44ea4(%rip), %rsi     # 0x245609
leaq 0x45f3c(%rip), %rcx     # 0x2466a8
movl $0x131c, %edx           # imm = 0x131C
callq 0x2110
leaq 0x45f77(%rip), %rdi     # 0x2466f4
leaq 0x44e85(%rip), %rsi     # 0x245609
leaq 0x45f1d(%rip), %rcx     # 0x2466a8
movl $0x131d, %edx           # imm = 0x131D
callq 0x2110
leaq 0x45f87(%rip), %rdi     # 0x246723
leaq 0x44e66(%rip), %rsi     # 0x245609
leaq 0x45efe(%rip), %rcx     # 0x2466a8
movl $0x131e, %edx           # imm = 0x131E
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: uc_block_qse_cutoff(unsigned int, unsigned int, uc_block_t*, unsigned int*, unsigned int*)
void uc_block_qse_cutoff(uint32_t c_ts, uint32_t c_te, uc_block_t *x, uint32_t *nqs, uint32_t *nqe)
{
    uint32_t l, r;
    assert(c_ts >= x->ts && c_te <= x->te);
    if(!(x->rev)) {
        l = c_ts - x->ts; r = x->te - c_te;
    } else {
        r = c_ts - x->ts; l = x->te - c_te;
    }

    (*nqs) = x->qs + get_offset_adjust(l, x->te - x->ts, x->qe - x->qs);
    (*nqe) = x->qe - get_offset_adjust(r, x->te - x->ts, x->qe - x->qs);
    assert((*nqs) >= x->qs && (*nqe) <= x->qe);
}

// Assembly:
pushq %rax
movl 0xc(%rdx), %r9d
subl %r9d, %edi
jb 0x20171b
movl 0x10(%rdx), %eax
movl %eax, %r10d
subl %esi, %r10d
jb 0x20171b
testb $0x20, 0x20(%rdx)
movl %r10d, %esi
cmovel %edi, %esi
cmovel %r10d, %edi
subl %r9d, %eax
movl 0x4(%rdx), %r9d
movl 0x8(%rdx), %r10d
cvtsi2sd %rsi, %xmm0
cvtsi2sd %rax, %xmm1
subl %r9d, %r10d
divsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r10, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
addl %r9d, %eax
movl %eax, (%rcx)
movl 0x10(%rdx), %esi
subl 0xc(%rdx), %esi
movl 0x8(%rdx), %eax
movl %eax, %r9d
subl 0x4(%rdx), %r9d
xorps %xmm0, %xmm0
cvtsi2sd %rdi, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %rsi, %xmm1
divsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r9, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %rsi
subl %esi, %eax
movl %eax, (%r8)
movl (%rcx), %ecx
cmpl 0x4(%rdx), %ecx
jb 0x20173a
cmpl 0x8(%rdx), %eax
ja 0x20173a
popq %rax
retq
leaq 0x453b5(%rip), %rdi     # 0x246ad7
leaq 0x43ee0(%rip), %rsi     # 0x245609
leaq 0x453c6(%rip), %rcx     # 0x246af6
movl $0x1467, %edx           # imm = 0x1467
callq 0x2110
leaq 0x45408(%rip), %rdi     # 0x246b49
leaq 0x43ec1(%rip), %rsi     # 0x245609
leaq 0x453a7(%rip), %rcx     # 0x246af6
movl $0x1470, %edx           # imm = 0x1470
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: clean_poa_g_t(poa_g_t*)
void clean_poa_g_t(poa_g_t *g)
{
    uint64_t set_n = g->seq.n<<1;
    assert(g->arc.n >= g->update_arc); assert(g->seq.n >= g->update_seq);
    if(g->seq.n > g->update_seq) {
        kv_resize(uint64_t, g->idx, (g->seq.n<<1)); set_n = g->update_seq<<1;
        memset(g->idx.a + (g->update_seq<<1), 0, sizeof((*g->idx.a))*((g->seq.n<<1)-(g->update_seq<<1)));
        g->update_seq = g->seq.n; g->idx.n = (g->seq.n<<1);
    }

    if(g->arc.n > g->update_arc) {
        radix_sort_poa_arc_srt(g->arc.a, g->arc.a + g->arc.n);
        memset(g->idx.a, 0, sizeof((*g->idx.a))*set_n);
        int64_t k, last, n = g->arc.n;
        for (k = 1, last = 0; k <= n; ++k){
            if (k == n || g->arc.a[k-1].ul>>32 != g->arc.a[k].ul>>32) {
                g->idx.a[g->arc.a[k-1].ul>>32] = (((uint64_t)last<<32)) | (k - last), last = k;
            }
        }
        g->update_arc = g->arc.n;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x18(%rdi), %rsi
movl 0x4c(%rdi), %eax
cmpq %rax, %rsi
jb 0x202178
movq %rdi, %rbx
movq (%rdi), %rdx
leaq (%rdx,%rdx), %r14
movl 0x48(%rdi), %r15d
cmpq %r15, %rdx
jb 0x202181
jbe 0x2020cd
cmpq %r14, 0x38(%rbx)
jae 0x202095
decq %r14
movq %r14, %rax
shrq %rax
orq %r14, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x10, %rax
orq %rcx, %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x38(%rbx)
movq 0x40(%rbx), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x2370
movq %rax, 0x40(%rbx)
movl 0x48(%rbx), %r15d
movq (%rbx), %rdx
jmp 0x202099
movq 0x40(%rbx), %rax
addl %r15d, %r15d
leaq (%rax,%r15,8), %rdi
shlq $0x4, %rdx
leaq (,%r15,8), %rax
subq %rax, %rdx
xorl %esi, %esi
callq 0x20e0
movq (%rbx), %rax
movq 0x18(%rbx), %rsi
movl %eax, 0x48(%rbx)
addq %rax, %rax
movq %rax, 0x30(%rbx)
movl 0x4c(%rbx), %eax
movq %r15, %r14
cmpq %rax, %rsi
jbe 0x202172
movq 0x28(%rbx), %rdi
shlq $0x4, %rsi
addq %rdi, %rsi
callq 0x1ef3c7
movq 0x40(%rbx), %rdi
shlq $0x3, %r14
xorl %esi, %esi
movq %r14, %rdx
callq 0x20e0
movq 0x18(%rbx), %rax
testq %rax, %rax
jle 0x20216f
movq 0x28(%rbx), %rcx
movq %rax, %rdx
shlq $0x4, %rdx
addq %rcx, %rdx
negq %rax
addq $0x10, %rcx
movl $0x1, %esi
xorl %edi, %edi
movq %rax, %r8
addq %rsi, %r8
je 0x202137
movq -0x10(%rcx), %r8
movq (%rcx), %r9
xorq %r8, %r9
shrq $0x20, %r9
jne 0x20213b
jmp 0x202157
movq -0x10(%rdx), %r8
movq %rsi, %r9
subq %rdi, %r9
shlq $0x20, %rdi
orq %r9, %rdi
movq 0x40(%rbx), %r9
shrq $0x20, %r8
movq %rdi, (%r9,%r8,8)
movq %rsi, %rdi
leaq (%rax,%rsi), %r8
incq %r8
incq %rsi
addq $0x10, %rcx
cmpq $0x1, %r8
jne 0x20211d
movq 0x18(%rbx), %rax
movl %eax, 0x4c(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x44ab2(%rip), %rdi     # 0x246c31
jmp 0x202188
leaq 0x44ae1(%rip), %rdi     # 0x246c69
leaq 0x4347a(%rip), %rsi     # 0x245609
leaq 0x44ab5(%rip), %rcx     # 0x246c4b
movl $0x1519, %edx           # imm = 0x1519
callq 0x2110