LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: follow_limit_path(asg_t*, unsigned int, unsigned int*, unsigned int*, asg64_v*, unsigned int)
uint32_t follow_limit_path(asg_t *g, uint32_t s, uint32_t *e, uint32_t *occ, asg64_v *b, uint32_t lim)
{
    
    uint32_t v = s, w = 0;
    uint32_t kv, kw;
    (*occ) = 0;


    while (1) {
        (*occ)++;
        kv = get_arcs(g, v, &w, 1);        
        (*e) = v;

        ///if(b) kv_push(uint32_t, b->b, v>>1);
        if(b) kv_push(uint64_t, *b, v);

        if(kv == 0) return END_TIPS;
        if(kv == 2) return TWO_OUTPUT;
        if(kv > 2) return MUL_OUTPUT;
        if((*occ) > lim) return LONG_TIPS;
        w = g->arc[w].v;
        ///up to here, kv=1
        ///kw must >= 1
        kw = get_arcs(g, w^1, NULL, 0);
        v = w;

        if(kw == 2) return TWO_INPUT;
        if(kw > 2) return MUL_INPUT;
        if(v == s) return LOOP;
    }

    return LONG_TIPS;   
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, 0xc(%rsp)
movq %r8, %r14
movq %rcx, %r15
movq %rdx, 0x10(%rsp)
movl %esi, %ebp
leaq 0x8(%rsp), %rax
andl $0x0, (%rax)
movq %rdi, %rbx
xorl %r12d, %r12d
movl %esi, %r13d
incl %r12d
movl %r12d, (%r15)
movq %rbx, %rdi
movl %r13d, %esi
leaq 0x8(%rsp), %rdx
pushq $0x1
popq %rcx
callq 0x1a5422
movl %eax, %r12d
movq 0x10(%rsp), %rax
movl %r13d, (%rax)
testq %r14, %r14
je 0x1a55ba
movq (%r14), %rcx
movq 0x10(%r14), %rax
cmpq 0x8(%r14), %rcx
jne 0x1a55ac
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r14)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%r14)
movq (%r14), %rcx
movl %r13d, %edx
leaq 0x1(%rcx), %rsi
movq %rsi, (%r14)
movq %rdx, (%rax,%rcx,8)
testl %r12d, %r12d
je 0x1a560d
cmpl $0x2, %r12d
je 0x1a5611
ja 0x1a5616
movl (%r15), %r12d
cmpl 0xc(%rsp), %r12d
ja 0x1a561a
movq 0x8(%rbx), %rax
movl 0x8(%rsp), %ecx
imulq $0x18, %rcx, %rcx
movl 0x8(%rax,%rcx), %r13d
movl %r13d, 0x8(%rsp)
movl %r13d, %esi
xorl $0x1, %esi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x1a5422
cmpl $0x2, %eax
je 0x1a561e
ja 0x1a5622
cmpl %ebp, %r13d
jne 0x1a5551
pushq $0x7
jmp 0x1a5624
pushq $0x5
jmp 0x1a5624
movl %r12d, %eax
jmp 0x1a5625
pushq $0x4
jmp 0x1a5624
xorl %eax, %eax
jmp 0x1a5625
pushq $0x1
jmp 0x1a5624
pushq $0x3
popq %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/gfa_ut.cpp
// Function: asg_end(asg_t const*, unsigned int, unsigned long*, unsigned int*)
static inline int asg_end(const asg_t *g, uint32_t v, uint64_t *lw, uint32_t *ou)
{
	///v^1 is the another direction of v
	uint32_t w, nv, nw, nw0, nv0 = asg_arc_n(g, v^1);
	int i, i0 = -1;
	asg_arc_t *aw, *av = asg_arc_a(g, v^1);

	///if this arc has not been deleted
	for (i = nv = 0; i < (int)nv0; ++i)
		if (!av[i].del) i0 = i, ++nv;

	///end without any out-degree
	if (nv == 0) return ASG_ET_TIP; // tip
	if (nv > 1) return ASG_ET_MULTI_OUT; // multiple outgoing arcs
	///until here, nv == 1
	if (lw) *lw = av[i0].ul<<32 | av[i0].v;
	if (ou) *ou = av[i0].ou;
	w = av[i0].v ^ 1;
	nw0 = asg_arc_n(g, w);
	aw = asg_arc_a(g, w);
	for (i = nw = 0; i < (int)nw0; ++i)
		if (!aw[i].del) ++nw;

	if (nw != 1) return ASG_ET_MULTI_NEI;
	return ASG_ET_MERGEABLE;
}

// Assembly:
pushq %rbp
pushq %rbx
movq 0x8(%rdi), %rax
movq 0x28(%rdi), %rdi
xorl $0x1, %esi
movq (%rdi,%rsi,8), %rsi
movq %rsi, %r8
shrq $0x20, %r8
imulq $0x18, %r8, %r8
xorl %r9d, %r9d
testl %esi, %esi
movl $0x0, %r10d
cmovgl %esi, %r10d
leaq (%rax,%r8), %rsi
leaq (%rax,%r8), %r11
addq $0xc, %r11
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %ebx, %ebx
cmpq %r9, %r10
je 0x1a5fc3
xorl %ebp, %ebp
cmpl $0x0, (%r11)
cmovnsl %r9d, %r8d
setns %bpl
addl %ebp, %ebx
incq %r9
addq $0x18, %r11
jmp 0x1a5fa5
testl %ebx, %ebx
je 0x1a605f
cmpl $0x1, %ebx
jne 0x1a6066
movslq %r8d, %r8
testq %rdx, %rdx
je 0x1a5ff3
imulq $0x18, %r8, %r9
movq (%rsi,%r9), %r10
shlq $0x20, %r10
movl 0x8(%rsi,%r9), %r9d
orq %r10, %r9
movq %r9, (%rdx)
testq %rcx, %rcx
je 0x1a6009
imulq $0x18, %r8, %rdx
movzwl 0x10(%rsi,%rdx), %edx
andl $0x3fff, %edx           # imm = 0x3FFF
movl %edx, (%rcx)
imulq $0x18, %r8, %rcx
movl 0x8(%rsi,%rcx), %ecx
xorq $0x1, %rcx
movq (%rdi,%rcx,8), %rdx
movq %rdx, %rsi
shrq $0x20, %rsi
xorl %ecx, %ecx
testl %edx, %edx
movl $0x0, %edi
cmovgl %edx, %edi
imulq $0x18, %rdi, %rdx
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
addq $0xc, %rax
xorl %esi, %esi
cmpq %rcx, %rdx
je 0x1a6052
movl (%rax,%rcx), %edi
notl %edi
shrl $0x1f, %edi
addl %edi, %esi
addq $0x18, %rcx
jmp 0x1a603d
xorl %eax, %eax
cmpl $0x1, %esi
setne %al
leal (%rax,%rax,2), %eax
jmp 0x1a606b
movl $0x1, %eax
jmp 0x1a606b
movl $0x2, %eax
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: recover_contain_g(asg_t*, ma_hit_t_alloc*, R_to_U*, long, long, long)
void recover_contain_g(asg_t *g, ma_hit_t_alloc *src, R_to_U* ruIndex, int64_t max_hang, int64_t min_ovlp, int64_t ul_occ)
{
    sset_aux s; s.g = g; s.src = src; s.ruIndex = ruIndex;
    s.max_hang = max_hang; s.min_ovlp = min_ovlp; s.ul_occ = ul_occ;
    kt_for(asm_opt.thread_num, update_sg_contain, &s, g->n_seq);
    uint32_t k;
    for (k = 0; k < g->n_seq; k++) {
        if(g->seq_vis[k]) g->seq[k].del = 0;
    }
    memset(g->seq_vis, 0, (sizeof(*(g->seq_vis))*(g->n_seq<<1)));
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rax
movq %rdi, (%rax)
movq %rsi, 0x8(%rax)
movq %rdx, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq %r8, 0x28(%rax)
movq %r9, 0x30(%rax)
leaq 0xad61c(%rip), %rcx     # 0x253758
movl 0x7c(%rcx), %edi
movl 0x14(%rbx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
leaq 0x44(%rip), %rsi        # 0x1a6193
movq %rax, %rdx
callq 0xc67c0
xorl %eax, %eax
movl 0x14(%rbx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq 0x30(%rbx), %rdi
cmpq %rcx, %rax
jae 0x1a6181
cmpb $0x0, (%rdi,%rax)
je 0x1a617c
movq 0x20(%rbx), %rcx
andl $0x7fffffff, (%rcx,%rax,8) # imm = 0x7FFFFFFF
incq %rax
jmp 0x1a6159
addl %ecx, %ecx
movslq %ecx, %rdx
xorl %esi, %esi
callq 0x20e0
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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), %rdx
movq 0x8(%rdx), %rcx
imulq $0x18, %rsi, %rax
movl 0x8(%rcx,%rax), %edi
movq (%rcx,%rax), %rsi
shrq $0x20, %rsi
cmpq %rdi, %rsi
jb 0x1a64c1
addq %rcx, %rax
xorq $0x1, %rdi
movq 0x28(%rdx), %rdx
movq (%rdx,%rdi,8), %rdx
movl %edx, %edi
shrq $0x20, %rdx
imulq $0x18, %rdi, %r8
addq $0x18, %r8
imulq $0x18, %rdx, %rdx
leaq (%rdx,%rcx), %r9
addq $-0x8, %r9
xorl %r10d, %r10d
leaq 0x18(%r10), %rdi
cmpq %rdi, %r8
je 0x1a64c1
movl 0x10(%r9,%r10), %r11d
xorl %esi, %r11d
movq %rdi, %r10
cmpl $0x1, %r11d
jne 0x1a646b
addq %rcx, %rdx
movzwl -0x8(%rdi,%rdx), %ecx
movl $0x3fff, %esi           # imm = 0x3FFF
andl %esi, %ecx
movzwl 0x10(%rax), %r8d
andl %r8d, %esi
cmpw %si, %cx
cmoval %ecx, %esi
andl $0xc000, %r8d           # imm = 0xC000
orl %esi, %r8d
movw %r8w, 0x10(%rax)
movl $0xffffc000, %eax       # imm = 0xFFFFC000
andl -0x8(%rdi,%rdx), %eax
orl %esi, %eax
movw %ax, -0x8(%rdi,%rdx)
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: update_sg_uo(asg_t*, ma_hit_t_alloc*)
void update_sg_uo(asg_t *g, ma_hit_t_alloc *src)
{
	sset_aux s; s.g = g; s.src = src;
	kt_for(asm_opt.thread_num, update_sg_uo_t, &s, g->n_arc);
    uint32_t k, z, nv, occ_a = 0, occ_n = 0; asg_arc_t *av = NULL;
    for (k = 0; k < g->n_seq; k++) {
        if(g->seq[k].del) continue;
        occ_n++;

        av = asg_arc_a(g, (k<<1)); nv = asg_arc_n(g, (k<<1));
        for (z = 0; z < nv; z++) {
            if(av[z].del || av[z].ou == 0) continue;
            break;
        }
        if(z < nv) {
            occ_a++;
            continue;
        }

        av = asg_arc_a(g, ((k<<1)+1)); nv = asg_arc_n(g, ((k<<1)+1));
        for (z = 0; z < nv; z++) {
            if(av[z].del || av[z].ou == 0) continue;
            break;
        }
        if(z < nv) {
            occ_a++;
        }
    }

    fprintf(stderr, "[M::%s::] ==> # gfa reads:%u, # covered gfa reads:%u\n", __func__, occ_n, occ_a);

    // asg_arc_t *e; uint32_t v, w;
    // for (k = 0; k < g->n_arc; k++) {
    //     e = &(g->arc[k]);
    //     v = e->v^1; w = (e->ul>>32)^1;
    //     av = asg_arc_a(g, v); nv = asg_arc_n(g, v);
    //     for (z = 0; z < nv; z++) {
    //         if(av[z].v == w) break;
    //     }
    //     if(z >= nv || av[z].ou != e->ou) fprintf(stderr, "[M::%s::asymmetry]\n", __func__);
    // }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdx
movq %rdi, (%rdx)
movq %rsi, 0x8(%rdx)
leaq 0xad278(%rip), %rax     # 0x253758
movl 0x7c(%rax), %edi
movl 0x4(%rbx), %ecx
movl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
andq %r14, %rcx
leaq 0xf3(%rip), %rsi        # 0x1a65e9
callq 0xc67c0
movl 0x14(%rbx), %eax
andq %r14, %rax
xorl %edx, %edx
xorl %r8d, %r8d
xorl %ecx, %ecx
cmpq %rax, %rdx
je 0x1a65c1
movq 0x20(%rbx), %rsi
cmpl $0x0, (%rsi,%rdx,8)
js 0x1a65b9
incl %ecx
movq 0x8(%rbx), %rsi
movq 0x28(%rbx), %rdi
leaq (%rdx,%rdx), %r9
movq %rdx, %r10
shlq $0x4, %r10
movq (%rdi,%r10), %r10
movl %r10d, %r11d
movq %r10, %r14
shrq $0x20, %r14
imulq $0x18, %r11, %r10
imulq $0x18, %r14, %r11
addq %rsi, %r11
addq $0x10, %r11
xorl %r14d, %r14d
cmpq %r14, %r10
je 0x1a6573
cmpl $0x0, -0x4(%r11,%r14)
js 0x1a656d
movzwl (%r11,%r14), %ebp
testw $0x3fff, %bp            # imm = 0x3FFF
jne 0x1a65b6
addq $0x18, %r14
jmp 0x1a6554
movq 0x8(%rdi,%r9,8), %r9
movl %r9d, %edi
shrq $0x20, %r9
imulq $0x18, %r9, %r9
addq %r9, %rsi
addq $0x10, %rsi
xorl %r9d, %r9d
cmpq %r9, %rdi
je 0x1a65ad
cmpl $0x0, -0x4(%rsi)
js 0x1a65a4
movzwl (%rsi), %r10d
testw $0x3fff, %r10w          # imm = 0x3FFF
jne 0x1a65ad
incq %r9
addq $0x18, %rsi
jmp 0x1a658d
cmpq %rdi, %r9
adcl $0x0, %r8d
jmp 0x1a65b9
incl %r8d
incq %rdx
jmp 0x1a6508
movq 0xaca18(%rip), %rax     # 0x252fe0
movq (%rax), %rdi
leaq 0x50e85(%rip), %rsi     # 0x1f7457
leaq 0x50eb4(%rip), %rdx     # 0x1f748d
xorl %eax, %eax
callq 0x22b0
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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), %rax
imulq $0x18, %rsi, %r8
movq (%rax,%r8), %rsi
shrq $0x21, %rsi
imulq $0x18, %rsi, %rcx
addq 0x8(%rdi), %rcx
movzwl 0x10(%rax,%r8), %edx
andl $0xc000, %edx           # imm = 0xC000
movw %dx, 0x10(%rax,%r8)
cmpl $0x0, 0xc(%rax,%r8)
js 0x1a6683
addq %r8, %rax
movl 0xc(%rcx), %r8d
xorl %r9d, %r9d
xorl %edi, %edi
cmpq %rdi, %r8
je 0x1a6685
movq (%rcx), %r10
cmpl %esi, 0x4(%r10,%r9)
jne 0x1a6648
movl 0x8(%rax), %r11d
shrl %r11d
cmpl %r11d, 0xc(%r10,%r9)
je 0x1a6651
incq %rdi
addq $0x28, %r9
jmp 0x1a662b
movq 0x18(%r10,%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, %edx
movw %dx, 0x10(%rax)
cmpl %edi, 0xc(%rcx)
jbe 0x1a6685
popq %rax
retq
leaq 0x50a25(%rip), %rdi     # 0x1f70b1
leaq 0x50e46(%rip), %rsi     # 0x1f74d9
leaq 0x55db0(%rip), %rcx     # 0x1fc44a
movl $0x31f, %edx            # imm = 0x31F
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %edx
imulq $0x18, %rdx, %r8
addq %rdi, %r8
movl %esi, %esi
xorl %eax, %eax
movl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
xorl %r11d, %r11d
cmpq %rsi, %r11
je 0x1a898e
cmpq %rdx, %r11
je 0x1a8984
imulq $0x18, %r11, %rbx
movl 0xc(%rdi,%rbx), %ebp
testl %ebp, %ebp
js 0x1a8984
addq %rdi, %rbx
testb $0x40, 0x11(%rbx)
je 0x1a8984
movl 0xc(%r8), %r14d
andl %r10d, %r14d
cmpl %r14d, %ebp
jbe 0x1a8984
movl 0x8(%rbx), %ebx
movl %ebx, %r14d
shrl %r14d
imulq $0x18, %r14, %r15
leaq (%rcx,%r15), %r14
andl $0x1, %ebx
xorl 0x8(%r8), %ebx
movl 0xc(%rcx,%r15), %r15d
imulq $0x28, %r15, %r15
addq $0x28, %r15
xorl %r12d, %r12d
leaq 0x28(%r12), %r13
cmpq %r13, %r15
je 0x1a8984
movq (%r14), %rbp
movl 0xc(%rbp,%r12), %r9d
movl 0x18(%rbp,%r12), %ebp
shrdl $0x1f, %r9d, %ebp
movq %r13, %r12
cmpl %ebx, %ebp
jne 0x1a895f
jmp 0x1a8989
incq %r11
jmp 0x1a890c
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: get_ug_tip_trio_infor(ma_ug_t*, unsigned int)
uint8_t get_ug_tip_trio_infor(ma_ug_t *ug, uint32_t begNode)
{
    uint32_t v = begNode, w, k, s;
    uint32_t kv;
    uint32_t eLen = 0, uLen = 0;
    uint32_t father_occ = 0, mother_occ = 0, ambigious_occ = 0;
    ma_utg_t *u;

    while (1) {
        kv = get_real_length(ug->g, v, NULL);
        u = &(ug->u.a[v>>1]); eLen += u->n; 

        for (k = 0; k < u->n; k++) {
            s = u->a[k]>>33;
            if(R_INF.trio_flag[s]==FATHER) father_occ++;
            else if(R_INF.trio_flag[s]==MOTHER) mother_occ++;
            else if((R_INF.trio_flag[s]==AMBIGU) || (R_INF.trio_flag[s]==DROP)) ambigious_occ++;
        }
        if(kv!=1) break;
        ///kv must be 1 here
        kv = get_real_length(ug->g, v, &w);
        if(get_real_length(ug->g, w^1, NULL)!=1) break;
        v = w;
        if(v == begNode) break;
    }

    uLen = eLen;///how many nodes
    eLen = father_occ + mother_occ;///haplotype-sepcific nodes
    if(eLen == 0) return AMBIGU;
    if(father_occ >= mother_occ) {
        if((father_occ > TRIO_THRES*eLen) && (father_occ >= DOUBLE_CHECK_THRES*uLen)) return FATHER;
    } else {
        if((mother_occ > TRIO_THRES*eLen) && (mother_occ >= DOUBLE_CHECK_THRES*uLen)) return MOTHER;
    }
    return AMBIGU;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
xorl %r12d, %r12d
movl %esi, %ebp
xorl %r13d, %r13d
xorl %r15d, %r15d
movq 0x18(%r14), %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0xc2e7a
movq 0x10(%r14), %rcx
movl %ebp, %edx
shrl %edx
imulq $0x28, %rdx, %rsi
leaq (%rcx,%rsi), %rdx
movl 0x10(%rcx,%rsi), %ecx
leaq 0xa9f9d(%rip), %rsi     # 0x254230
movq 0x28(%rsi), %rsi
xorl %edi, %edi
cmpq %rdi, %rcx
je 0x1aa2c8
movq 0x18(%rdx), %r8
movq (%r8,%rdi,8), %r8
shrq $0x21, %r8
movzbl (%rsi,%r8), %r8d
cmpl $0x2, %r8d
je 0x1aa2c0
cmpl $0x1, %r8d
jne 0x1aa2c3
incl %r13d
jmp 0x1aa2c3
incl %r15d
incq %rdi
jmp 0x1aa299
addl %ecx, %r12d
cmpl $0x1, %eax
jne 0x1aa303
movq 0x18(%r14), %rdi
movl %ebp, %esi
leaq 0x4(%rsp), %rdx
callq 0xc2e7a
movq 0x18(%r14), %rdi
movl 0x4(%rsp), %esi
xorl $0x1, %esi
xorl %edx, %edx
callq 0xc2e7a
cmpl $0x1, %eax
jne 0x1aa303
movl 0x4(%rsp), %ebp
cmpl %ebx, %ebp
jne 0x1aa26b
movl %r15d, %eax
addl %r13d, %eax
je 0x1aa367
movl %eax, %eax
cvtsi2sd %rax, %xmm0
mulsd 0x39226(%rip), %xmm0    # 0x1e3540
cmpl %r15d, %r13d
jae 0x1aa341
movl %r15d, %eax
cvtsi2sd %rax, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x1aa367
movl %r12d, %eax
cvtsi2sd %rax, %xmm0
mulsd 0x388b3(%rip), %xmm0    # 0x1e2bf0
movb $0x2, %al
jmp 0x1aa361
movl %r13d, %eax
cvtsi2sd %rax, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x1aa367
movl %r12d, %eax
cvtsi2sd %rax, %xmm0
mulsd 0x38891(%rip), %xmm0    # 0x1e2bf0
movb $0x1, %al
ucomisd %xmm0, %xmm1
jae 0x1aa369
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1aa3a6
shrq $0x20, %r8
imulq $0x18, %r8, %rdx
addq 0x8(%rcx), %rdx
leal 0x1(%rax), %ecx
movl %ecx, (%rsi)
imulq $0x18, %rax, %rax
addq %rdx, %rax
retq
cmpl $-0x1, %eax
je 0x1aa3ba
orl $-0x1, (%rsi)
movq 0x38(%rdi), %rax
movl (%rax,%rdx,4), %eax
movl %eax, 0x4(%rsi)
jmp 0x1aa3bd
movl 0x4(%rsi), %eax
cmpl $-0x1, %eax
je 0x1aa3d7
movl %eax, %ecx
imulq $0x18, %rcx, %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_O2/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 %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %r15
shrq $0x20, %r15
movq 0x30(%rdi), %rdx
movq 0x28(%rdx), %rax
movq (%rax,%r15,8), %rcx
movq %rcx, %rax
shrq $0x20, %rax
imulq $0x18, %rax, %rax
addq 0x8(%rdx), %rax
xorl %edx, %edx
cmpl %edx, %ecx
je 0x1aa8e4
movl %edx, %esi
imulq $0x18, %rsi, %rsi
cmpl $0x0, 0xc(%rax,%rsi)
js 0x1aa924
incl %edx
jmp 0x1aa8cf
movq 0x60(%rbx), %r12
movq $0x1, 0x20(%rbx)
pushq $0x2
popq %r13
cmpq 0x68(%rbx), %r12
jne 0x1aa981
leaq (%r12,%r12), %rax
testq %r12, %r12
cmoveq %r13, %rax
movq %rax, 0x68(%rbx)
movq 0x58(%rbx), %rdi
imulq $0x18, %rax, %rsi
callq 0x2370
movq %rax, 0x58(%rbx)
movq 0x60(%rbx), %rcx
jmp 0x1aa988
addq %rax, %rsi
movq 0x10(%r14), %rdi
movq %rdi, 0x10(%rsi)
movups (%r14), %xmm0
movups %xmm0, (%rsi)
cmpq $0x0, 0x20(%rbx)
jne 0x1aa9f0
testl %edx, %edx
je 0x1aa95e
movq (%rsi), %rdi
leal -0x1(%rdx), %r8d
imulq $0x18, %r8, %r8
cmpq (%rax,%r8), %rdi
jae 0x1aa95e
movq $0x1, 0x20(%rbx)
incl %edx
cmpl %ecx, %edx
jae 0x1aa9f0
movq (%rsi), %rcx
movl %edx, %edx
imulq $0x18, %rdx, %rdx
cmpq (%rax,%rdx), %rcx
jbe 0x1aa9f0
movq $0x1, 0x20(%rbx)
jmp 0x1aa9f0
movq 0x58(%rbx), %rax
movq %r12, %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x60(%rbx)
imulq $0x18, %rcx, %rcx
movq 0x10(%r14), %rdx
movq %rdx, 0x10(%rax,%rcx)
movups (%r14), %xmm0
movups %xmm0, (%rax,%rcx)
movq 0x40(%rbx), %rcx
cmpq 0x48(%rbx), %rcx
jne 0x1aa9d5
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
cmoveq %r13, %rsi
movq %rsi, 0x48(%rbx)
movq 0x50(%rbx), %rdi
shlq $0x2, %rsi
callq 0x2370
movq %rax, 0x50(%rbx)
movq 0x40(%rbx), %rcx
jmp 0x1aa9d9
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)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x60(%rdi), %rax
testq %rax, %rax
je 0x1ab538
xorl %r14d, %r14d
movl %r14d, %r14d
cmpq %r14, %rax
jbe 0x1ab520
movq 0x58(%rbx), %rcx
imulq $0x18, %r14, %r15
cmpl $0x0, 0xc(%rcx,%r15)
js 0x1ab51b
movq 0x30(%rbx), %rdi
callq 0x1ab555
movq 0x58(%rbx), %rcx
movq 0x10(%rcx,%r15), %rdx
movq %rdx, 0x10(%rax)
movups (%rcx,%r15), %xmm0
movups %xmm0, (%rax)
movq 0x60(%rbx), %rax
incl %r14d
jmp 0x1ab4e1
movq 0x30(%rbx), %rax
movq 0x28(%rax), %rdi
callq 0x2220
movq 0x30(%rbx), %rax
andq $0x0, 0x28(%rax)
jmp 0x1ab543
cmpq $0x0, 0x20(%rbx)
je 0x1ab547
movq 0x30(%rbx), %rax
andb $0x7f, 0x7(%rax)
movq 0x30(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x694eb
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1ab8f8
movq %rcx, %r14
movq %rsi, %r15
movq 0x8(%rsi), %rcx
cmpl $0x0, (%rcx,%rax,4)
js 0x1ab8f8
movl %edx, %ebp
movq %rdi, %r12
andq $0x0, (%r14)
cmpq $0x0, 0x8(%r14)
je 0x1ab7bb
movq 0x10(%r14), %rax
xorl %ecx, %ecx
jmp 0x1ab7d6
movq $0x2, 0x8(%r14)
movq 0x10(%r14), %rdi
pushq $0x10
popq %rsi
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 0x1ab8f8
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 0x1ab7e3
movq (%rsp), %r13
movq (%r13), %rdx
movq 0x10(%r13), %rax
cmpq 0x8(%r13), %rdx
jne 0x1ab846
leaq (%rdx,%rdx), %rsi
testq %rdx, %rdx
pushq $0x2
popq %rcx
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 0x8(%r12), %rax
movq 0x28(%r12), %rcx
movq (%rcx,%rbx,8), %rcx
movl %ecx, %edx
shrq $0x20, %rcx
imulq $0x18, %rdx, %rbp
imulq $0x18, %rcx, %rcx
leaq (%rax,%rcx), %r13
addq $0x8, %r13
xorl %ebx, %ebx
cmpq %rbx, %rbp
je 0x1ab7e3
cmpl $0x0, 0x4(%r13,%rbx)
js 0x1ab8f2
movq 0x30(%r12), %rax
movl (%r13,%rbx), %ecx
testb $0x1, (%rax,%rcx)
jne 0x1ab8f2
movl %ecx, %eax
shrl %eax
cmpq %rax, (%r15)
jbe 0x1ab8f2
movq 0x8(%r15), %rdx
cmpl $0x0, (%rdx,%rax,4)
js 0x1ab8f2
movq (%r14), %rdx
movq 0x10(%r14), %rax
cmpq 0x8(%r14), %rdx
jne 0x1ab8e7
leaq (%rdx,%rdx), %rsi
testq %rdx, %rdx
pushq $0x2
popq %rcx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r14)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%r14)
movl (%r13,%rbx), %ecx
movq (%r14), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, (%r14)
movq %rcx, (%rax,%rdx,8)
addq $0x18, %rbx
jmp 0x1ab87c
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/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
pushq $0x1
popq %r15
xorl %r14d, %r14d
testq %r15, %r15
je 0x1ace9e
movq %rbx, %rdi
pushq $0x64
popq %rsi
xorl %edx, %edx
callq 0x1ac895
movl %eax, %r15d
testl %ebp, %ebp
je 0x1ace99
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl 0xc(%rsp), %ecx
xorl %r8d, %r8d
movq 0x10(%rsp), %r9
callq 0x1aca96
movl %eax, %eax
addq %rax, %r15
addq %r15, %r14
jmp 0x1ace61
testq %r14, %r14
je 0x1aceb9
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x694eb
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/gfa_ut.cpp
// Function: debug_edges(asg64_v*, unsigned int*, unsigned int)
void debug_edges(asg64_v *dbg, uint32_t *l, uint32_t l_n) {
    uint32_t k, k_n, i, m;
    for (i = k = 0; i < l_n; i++) {
        fprintf(stderr, "# gid-%u: %u\n", i, l[i]);
        for (k_n = k + l[i]; k < k_n; k++) {
            dbg->a[k] <<= 32; dbg->a[k] += i;
        }
    }
    fprintf(stderr, "# dbg->n: %u\n", (uint32_t)dbg->n);
    
    radix_sort_srt64(dbg->a, dbg->a + dbg->n);
    for (k = 1, i = 0; k <= dbg->n; k++) {
        if(k == dbg->n || (dbg->a[k]>>32) != (dbg->a[i]>>32)) {
            if(k - i < l_n) {
                
                for (m = i; m < k; m++) {
                    fprintf(stderr, "eid->%lu, gid->%u\n", dbg->a[m]>>32, (uint32_t)dbg->a[m]);
                }
            }
            i = k;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
movl %edx, 0x4(%rsp)
movl %edx, %ebx
leaq 0x4a65f(%rip), %r12     # 0x1f7a3e
xorl %r13d, %r13d
xorl %ebp, %ebp
movq 0xa5bf5(%rip), %rax     # 0x252fe0
movq (%rax), %rdi
cmpq %rbx, %r13
je 0x1ad42e
movl (%r15,%r13,4), %ecx
movq %r12, %rsi
movl %r13d, %edx
xorl %eax, %eax
callq 0x22b0
movl %ebp, %eax
addl (%r15,%r13,4), %ebp
cmpq %rbp, %rax
jae 0x1ad427
movq 0x10(%r14), %rcx
movq (%rcx,%rax,8), %rdx
shlq $0x20, %rdx
orq %r13, %rdx
movq %rdx, (%rcx,%rax,8)
incq %rax
jmp 0x1ad40a
incq %r13
movl %eax, %ebp
jmp 0x1ad3e4
movl (%r14), %edx
leaq 0x4a614(%rip), %rsi     # 0x1f7a4c
xorl %eax, %eax
callq 0x22b0
movq (%r14), %rax
movq 0x10(%r14), %rdi
leaq (%rdi,%rax,8), %rsi
callq 0x1a3def
pushq $0x1
popq %r12
leaq 0x4a600(%rip), %r15     # 0x1f7a5a
xorl %eax, %eax
movl 0x4(%rsp), %ebp
movl %r12d, %ebx
cmpq %rbx, (%r14)
jb 0x1ad4c0
movl %eax, %r13d
je 0x1ad47f
movq 0x10(%r14), %rcx
movq (%rcx,%r13,8), %rdx
xorq (%rcx,%rbx,8), %rdx
shrq $0x20, %rdx
je 0x1ad4bb
movl %r12d, %ecx
subl %eax, %ecx
movl %r12d, %eax
cmpl %ebp, %ecx
jae 0x1ad4bb
cmpq %rbx, %r13
jae 0x1ad4b8
movq 0xa5b49(%rip), %rax     # 0x252fe0
movq (%rax), %rdi
movq 0x10(%r14), %rax
movq (%rax,%r13,8), %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
movq %r15, %rsi
xorl %eax, %eax
callq 0x22b0
incq %r13
jmp 0x1ad48b
movl %r12d, %eax
incl %r12d
jmp 0x1ad460
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/gfa_ut.cpp
// Function: prt_spec_edge(asg_t*, ma_hit_t_alloc*, unsigned int, unsigned int, unsigned int, ug_opt_t*, char const*)
void prt_spec_edge(asg_t *rg, ma_hit_t_alloc *src, uint32_t tot_rid, uint32_t vid, uint32_t wid, ug_opt_t *uopt, const char *cmd)
{
    if(vid >= tot_rid) return;
    uint32_t k, qn, tn; int32_t r; asg_arc_t p; ma_hit_t_alloc *s = &(src[vid]); 
    for (k = 0; k < s->length; k++) {
        qn = Get_qn(s->buffer[k]); tn = Get_tn(s->buffer[k]);
        if(qn == vid && tn == wid) {
            r = ma_hit2arc(&(s->buffer[k]), rg->seq[qn].len, rg->seq[tn].len, uopt->max_hang, asm_opt.max_hang_rate, uopt->min_ovlp, &p);
            fprintf(stderr, "[M::%s::]%s\tqn::%u(%c)\tq::[%u,\t%u)\t%c\ttn::%u(%c)\tt::[%u,\t%u)\n", 
                    __func__, cmd, qn, (r>=0)?("+-"[(p.ul>>32)&1]):('*'), Get_qs(s->buffer[k]), Get_qe(s->buffer[k]), 
                    "+-"[s->buffer[k].rev], 
                    tn, (r>=0)?("+-"[p.v&1]):('*'), Get_ts(s->buffer[k]), Get_te(s->buffer[k]));
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %ecx, %ebp
cmpl %edx, %ecx
jae 0x1add7c
movq %rsi, %r15
movq %rdi, %rcx
movl %ebp, %eax
imulq $0x18, %rax, %rax
addq %rax, %r15
movl %r8d, %eax
movq %rax, (%rsp)
xorl %r13d, %r13d
xorl %r12d, %r12d
movq %r9, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
movl 0xc(%r15), %eax
cmpq %rax, %r12
jae 0x1add7c
movq (%r15), %r14
movq (%r14,%r13), %rbx
movq %rbx, %rax
shrq $0x20, %rax
cmpl %ebp, %eax
jne 0x1adc73
cmpl %r8d, 0xc(%r14,%r13)
je 0x1adc7c
incq %r12
addq $0x28, %r13
jmp 0x1adc4d
leaq (%r14,%r13), %rdi
movq 0x20(%rcx), %rcx
movl (%rcx,%rax,8), %esi
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
andl %r8d, %esi
movq (%rsp), %rax
movl (%rcx,%rax,8), %edx
andl %r8d, %edx
leaq 0xa5ab7(%rip), %rax     # 0x253758
movss 0x158(%rax), %xmm0
movl 0x40(%r9), %ecx
movl 0x44(%r9), %r8d
leaq 0x30(%rsp), %r9
callq 0x1aac6d
pushq $0x2a
popq %r9
testl %eax, %eax
js 0x1adcd9
btq $0x20, 0x30(%rsp)
leaq 0x36552(%rip), %rcx     # 0x1e4223
adcq $0x0, %rcx
movsbl (%rcx), %r9d
movq 0xa5300(%rip), %rcx     # 0x252fe0
movq (%rcx), %rdi
movl 0x8(%r14,%r13), %ecx
movq %rcx, 0x28(%rsp)
movl 0x18(%r14,%r13), %ecx
shrl $0x1f, %ecx
leaq 0x36527(%rip), %rdx     # 0x1e4223
movsbl (%rcx,%rdx), %ecx
movq %rcx, 0x20(%rsp)
pushq $0x2a
popq %rcx
movl %ecx, %r10d
testl %eax, %eax
js 0x1add22
movl 0x38(%rsp), %eax
andl $0x1, %eax
leaq 0x36506(%rip), %rcx     # 0x1e4223
movsbl (%rax,%rcx), %r10d
movl 0x10(%r14,%r13), %r11d
movl 0x14(%r14,%r13), %r14d
subq $0x8, %rsp
leaq 0x49df7(%rip), %rsi     # 0x1f7b2e
leaq 0x49e2e(%rip), %rdx     # 0x1f7b6c
movq 0x88(%rsp), %rcx
movl %ebp, %r8d
xorl %eax, %eax
pushq %r14
pushq %r11
pushq %r10
movq 0x30(%rsp), %r14
pushq %r14
pushq 0x48(%rsp)
pushq 0x58(%rsp)
pushq %rbx
callq 0x22b0
movq %r14, %r8
addq $0x40, %rsp
movq 0x18(%rsp), %r9
movq 0x8(%rsp), %rcx
jmp 0x1adc73
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/gfa_ut.cpp
// Function: gen_spec_edge(asg_t*, ug_opt_t*, unsigned int, unsigned int, asg_arc_t*)
int32_t gen_spec_edge(asg_t *rg, ug_opt_t *uopt, uint32_t v, uint32_t w, asg_arc_t *t)
{
    uint32_t k, qn, tn; int32_t r; ma_hit_t_alloc *s = &(uopt->sources[v>>1]); asg_arc_t p;
    for (k = 0; k < s->length; k++) {
        qn = Get_qn(s->buffer[k]); tn = Get_tn(s->buffer[k]);
        if(tn != (w>>1)) continue;
        r = ma_hit2arc(&(s->buffer[k]), rg->seq[qn].len, rg->seq[tn].len, uopt->max_hang, asm_opt.max_hang_rate, uopt->min_ovlp, &p);
        if(r < 0) continue;
        if((p.ul>>32) != v || p.v != w) continue;
        *t = p; t->ou = 0;
        return 1;
    }
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, 0x8(%rsp)
movq %rsi, %r14
movq %rdi, 0x18(%rsp)
movq 0x8(%rsi), %rax
movl %edx, %esi
movq %rsi, 0x10(%rsp)
shrl %edx
imulq $0x18, %rdx, %rdx
leaq (%rax,%rdx), %r12
movl 0xc(%rax,%rdx), %eax
movl %ecx, (%rsp)
movl %ecx, %ebp
shrl %ebp
leaq 0xa598b(%rip), %rcx     # 0x253758
movss 0x158(%rcx), %xmm0
movss %xmm0, 0x4(%rsp)
imulq $0x28, %rax, %r13
xorl %ebx, %ebx
movl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
cmpq %rbx, %r13
je 0x1ade47
movq (%r12), %rdi
cmpl %ebp, 0xc(%rdi,%rbx)
jne 0x1ade41
addq %rbx, %rdi
movl 0x4(%rdi), %eax
movq 0x18(%rsp), %rcx
movq 0x20(%rcx), %rcx
movl (%rcx,%rax,8), %esi
andl %r15d, %esi
movl (%rcx,%rbp,8), %edx
andl %r15d, %edx
movl 0x40(%r14), %ecx
movl 0x44(%r14), %r8d
movss 0x4(%rsp), %xmm0
leaq 0x20(%rsp), %r9
callq 0x1aac6d
testl %eax, %eax
js 0x1ade41
movq 0x10(%rsp), %rax
cmpl %eax, 0x24(%rsp)
jne 0x1ade41
movl (%rsp), %eax
cmpl %eax, 0x28(%rsp)
je 0x1ade4b
addq $0x28, %rbx
jmp 0x1adde7
pushq $-0x1
jmp 0x1ade6c
movq 0x30(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rax, 0x10(%rcx)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rcx)
andl $0xc000, %eax           # imm = 0xC000
movw %ax, 0x10(%rcx)
pushq $0x1
popq %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/gfa_ut.cpp
// Function: init_flex_asg_t(asg_t*, ma_hit_t_alloc*, long, long, long, long)
flex_asg_t *init_flex_asg_t(asg_t *g, ma_hit_t_alloc* src, int64_t min_ovlp, int64_t max_hang, int64_t max_hang_rate, int64_t gap_fuzz)
{
    flex_asg_t *z; CALLOC(z, 1);
    z->g = g; z->src = src; z->min_ovlp = min_ovlp; z->gap_fuzz = gap_fuzz;
    z->max_hang = max_hang; z->max_hang_rate = max_hang_rate; 
    MALLOC(z->idx, (z->g->n_seq<<1)); memset(z->idx, -1, (z->g->n_seq<<1)*sizeof(*(z->idx)));
    return z;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, (%rsp)
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
pushq $0x1
popq %rdi
pushq $0x70
popq %rsi
callq 0x2120
movq %rax, %r14
movq %rbp, 0x30(%rax)
movq %r13, (%rax)
movq %r12, 0x8(%rax)
movq %rbx, 0x28(%rax)
movq %r15, 0x10(%rax)
movq (%rsp), %rax
movq %rax, 0x18(%r14)
movl 0x14(%rbp), %eax
addl %eax, %eax
movslq %eax, %rbx
shlq $0x2, %rbx
movq %rbx, %rdi
callq 0x2280
movq %rax, 0x38(%r14)
movq %rax, %rdi
movl $0xff, %esi
movq %rbx, %rdx
callq 0x20e0
movq %r14, %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/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
andq $0x0, 0x30(%rdi)
andq $0x0, 0x18(%rdi)
andq $0x0, (%rdi)
addl %ebx, %ebx
cmpq %rbx, 0x50(%rdi)
jae 0x1b007a
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 0x1b007e
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_O2/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
movq %rsi, %rbx
movq %rdi, %r14
movl 0x14(%rsi), %r15d
andq $0x0, 0x60(%rdi)
andq $0x0, 0x48(%rdi)
andq $0x0, 0x30(%rdi)
andq $0x0, 0x18(%rdi)
andq $0x0, (%rdi)
movl %ecx, %ebp
addl %r15d, %r15d
cmpq %r15, 0x8(%rdi)
jae 0x1b0119
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 0x1b011d
movq 0x10(%r14), %rdi
movq %r15, (%r14)
shlq $0x5, %r15
xorl %esi, %esi
movq %r15, %rdx
callq 0x20e0
testl %ebp, %ebp
je 0x1b014e
addq $0x90, %r14
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1b000c
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
imulq $0x24, %rax, %rdx
movzbl 0x20(%rcx,%rdx), %eax
testb $0x40, %al
jne 0x1b019e
testb $0x1f, %al
je 0x1b019e
testb %al, %al
jns 0x1b019e
addq %rdx, %rcx
movl (%rcx), %edx
movl %r9d, %esi
shrl %esi
cmpl %esi, %edx
jne 0x1b019e
cmpl $-0x1, 0x1c(%rcx)
je 0x1b019b
shrl $0x5, %eax
andl $0x1, %eax
leal (%rax,%rdx,2), %ecx
xorl %eax, %eax
cmpl %r9d, %ecx
sete %al
retq
xorl %eax, %eax
retq
pushq %rax
leaq 0x47b7f(%rip), %rdi     # 0x1f7d25
leaq 0x4732c(%rip), %rsi     # 0x1f74d9
leaq 0x47bca(%rip), %rcx     # 0x1f7d7e
movl $0xd22, %edx            # imm = 0xD22
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq $0x1
popq %rax
testb $0x1, %sil
jne 0x1b01ef
movq 0x20(%rdi), %rcx
movl %esi, %r8d
shrl %r8d
movl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
andl (%rcx,%r8,8), %r9d
cmpl %r9d, 0x10(%rdx)
jne 0x1b01f5
movl 0xc(%rdx), %r8d
testl %r8d, %r8d
je 0x1b01f8
movl 0x10(%rdx), %ecx
jmp 0x1b0217
cmpl $0x0, 0xc(%rdx)
je 0x1b01f8
xorl %eax, %eax
retq
movl 0x10(%rdx), %ecx
movq 0x20(%rdi), %rdx
movl %esi, %r8d
shrl %r8d
movl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
andl (%rdx,%r8,8), %r9d
xorl %r8d, %r8d
cmpl %r9d, %ecx
je 0x1b01f7
movq 0x8(%rdi), %r9
movq 0x28(%rdi), %rdx
movl %esi, %r10d
movl 0x4(%rdx,%r10,8), %edx
imulq $0x18, %rdx, %r10
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl 0xc(%r9,%r10), %r9d
andl %edx, %r9d
addl %r8d, %r9d
subl %r9d, %ecx
cmpl $0x4e20, %ecx           # imm = 0x4E20
jg 0x1b01f7
cvtsi2sd %ecx, %xmm0
movq 0x20(%rdi), %rcx
shrl %esi
andl (%rcx,%rsi,8), %edx
cvtsi2sd %edx, %xmm1
mulsd 0x33271(%rip), %xmm1    # 0x1e34d0
ucomisd %xmm1, %xmm0
jbe 0x1b01f5
jmp 0x1b01f7
// File: /workspace/github_cpp_makefile_star2_O2/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 0x8(%rdi), %rcx
movq 0x28(%rdi), %rax
movl %esi, %esi
movq (%rax,%rsi,8), %rax
movl %eax, %esi
shrq $0x20, %rax
imulq $0x18, %rsi, %r8
imulq $0x18, %rax, %rsi
leaq (%rsi,%rcx), %r9
addq $0xc, %r9
xorl %edi, %edi
pushq $-0x1
popq %rax
cmpq %rdi, %r8
je 0x1b081b
cmpl $0x0, (%r9,%rdi)
js 0x1b080f
cmpl %edx, -0x4(%r9,%rdi)
je 0x1b0815
addq $0x18, %rdi
jmp 0x1b07fc
addq %rcx, %rsi
movl (%rdi,%rsi), %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1b1082
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 0x1b1085
xorl %eax, %eax
retq
testl %ecx, %ecx
je 0x1b10c0
subl %edx, %ecx
cvtsi2sd %rcx, %xmm0
movl %r8d, %eax
cvtsi2sd %rax, %xmm2
divsd %xmm1, %xmm0
mulsd %xmm0, %xmm2
cvttsd2si %xmm2, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
subsd 0x321e4(%rip), %xmm2    # 0x1e3298
cvttsd2si %xmm2, %rax
andq %rdx, %rax
orq %rcx, %rax
retq
movl %r8d, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xa1f07(%rip), %r15     # 0x252fe0
leaq 0x46e57(%rip), %r14     # 0x1f7f37
pushq $0xa
popq %rbp
xorl %r12d, %r12d
cmpq 0x90(%rbx), %r12
jae 0x1b113c
xorl %r13d, %r13d
movq 0x98(%rbx), %rax
movq (%r15), %rsi
cmpq %rax, %r13
jae 0x1b1130
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 %rsi, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x22b0
incq %r13
jmp 0x1b10f2
movl %ebp, %edi
callq 0x2270
incq %r12
jmp 0x1b10e6
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/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 $0x48, %rsp
movq %rdx, 0x18(%rsp)
movq %rdi, 0x8(%rsp)
movq 0x28(%r9), %rax
movq %rsi, 0x10(%rsp)
movl %esi, %ecx
shrl %ecx
movl (%rax,%rcx,4), %edx
movq %rdx, %rsi
shlq $0x3, %rsi
movq %r9, 0x28(%rsp)
addq 0x40(%r9), %rsi
movq %rsi, (%rsp)
movl 0x4(%rax,%rcx,4), %eax
andq $0x0, 0x90(%r8)
subl %edx, %eax
andq $0x0, 0xc0(%r8)
movq %r8, 0x20(%rsp)
andq $0x0, 0xa8(%r8)
negq %rax
movq %rax, 0x30(%rsp)
pushq $0x1
popq %r14
xorl %eax, %eax
xorl %esi, %esi
movq 0x28(%rsp), %rbx
movq 0x20(%rsp), %rbp
movq 0x18(%rsp), %r15
movq 0x30(%rsp), %rcx
addq %r14, %rcx
cmpq $0x1, %rcx
je 0x1b1956
testq %rcx, %rcx
je 0x1b18cd
movq (%rsp), %rdx
movq (%rdx,%rsi,8), %rcx
xorq (%rdx,%r14,8), %rcx
shrq $0x20, %rcx
je 0x1b194e
movq (%rsp), %rcx
leaq (%rcx,%rsi,8), %rcx
movq %rcx, 0x40(%rsp)
movq %r14, %r13
subq %rsi, %r13
subq $0x8, %rsp
movq 0x10(%rsp), %rdi
movq %rax, 0x40(%rsp)
movq %rbx, %rsi
movq %rbp, %rdx
movq %r13, %r8
movq 0x88(%rsp), %r9
pushq $0x1
pushq %r15
pushq 0x28(%rsp)
callq 0x1b1605
addq $0x20, %rsp
movq %rax, %r12
addq 0x38(%rsp), %r12
subq $0x8, %rsp
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
movq %rbp, %rdx
movq 0x48(%rsp), %rcx
movq %r13, %r8
movq 0x88(%rsp), %r9
pushq $0x0
pushq %r15
pushq 0x28(%rsp)
callq 0x1b1605
addq $0x20, %rsp
addq %r12, %rax
movq %r14, %rsi
incq %r14
jmp 0x1b18a0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq