LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r15
xorl %eax, %eax
testq %rdx, %rdx
movl $0x0, %r13d
cmovgq %rdx, %r13
negq %r13
pushq $0x1
popq %rdx
leaq 0x1(%rax), %rbp
movq %r13, %rcx
addq %rbp, %rcx
cmpq $0x1, %rcx
je 0x1b2231
cmpq %rbx, %rbp
jge 0x1b2212
movq 0x8(%r12), %rcx
movq 0x28(%r12), %rsi
movl -0x4(%r15,%rbp,8), %r8d
movl 0x4(%rsi,%r8,8), %esi
imulq $0x18, %rsi, %rsi
cmpb $0x0, 0x12(%rcx,%rsi)
je 0x1b221a
incq %rbp
incq %rdx
jmp 0x1b21e2
leaq (%r15,%rax,8), %rsi
movq %rdi, %r14
callq 0x1b1f1c
movq %r14, %rdi
pushq $0x1
popq %rdx
movq %rbp, %rax
jmp 0x1b21de
subq %rax, %rbx
jle 0x1b2250
leaq (%r15,%rax,8), %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1b1f1c
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: 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
xorl %r15d, %r15d
movl %r15d, %r15d
movq 0xc0(%r14), %rax
cmpq %r15, (%rax)
jbe 0x1b2303
movq 0x10(%rax), %r12
imulq $0x28, %r15, %rax
movslq 0x10(%r12,%rax), %r13
cmpq $0x2, %r13
jge 0x1b229c
incl %r15d
jmp 0x1b2275
addq %rax, %r12
leal 0x1(%r13), %ebp
xorl %ebx, %ebx
pushq $-0x1
popq %rax
cmpq %rbx, %rbp
je 0x1b2297
cmpq %rbx, %r13
je 0x1b22c8
movq 0x18(%r12), %rcx
movq (%rcx,%rbx,8), %rcx
shrq $0x21, %rcx
cmpq 0x80(%r14), %rcx
jb 0x1b22fe
movl %ebx, %ecx
subl %eax, %ecx
cmpl $0x1, %ecx
jle 0x1b22fc
movq 0x18(%r12), %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 0x1b21b5
movl %ebx, %eax
incq %rbx
jmp 0x1b22a8
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: 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 0x1b2327
movl (%rdx), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq %rsi, %rax
jne 0x1b2327
movl 0x10(%rdx), %eax
retq
movl 0x10(%rdx), %ecx
leaq 0xa1eff(%rip), %rax     # 0x254230
movq 0x18(%rax), %r8
xorl %r9d, %r9d
xorl %r10d, %r10d
xorl %eax, %eax
cmpq %r9, %rcx
je 0x1b2326
cmpq %rdi, %r10
jb 0x1b2361
movq 0x18(%rdx), %r11
movq (%r11,%r9,8), %r11
shrq $0x21, %r11
movq (%r8,%r11,8), %r11
addq %r10, %r11
cmpq %r11, %rsi
sbbq $-0x1, %rax
cmpq %rsi, %r10
jae 0x1b2326
movq 0x18(%rdx), %r11
movl (%r11,%r9,8), %r11d
addq %r11, %r10
incq %r9
jmp 0x1b233d
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x1
popq %rdi
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 0x8c99a
movq %rax, 0x18(%rbx)
leaq 0x1d8(%rbx), %rdi
leaq 0xa103d(%rip), %rax     # 0x253758
movslq 0x7c(%rax), %rdx
callq 0x1a4e2e
movq %rbx, %rdi
callq 0x1b2376
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_O2/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 %rbx
movl (%rsi), %r10d
movl 0x4(%rsi), %eax
subl %r10d, %eax
movq 0x10(%rsi), %r9
cmpq %rax, %r9
ja 0x1b3c1f
imulq $0x18, %r9, %r11
imulq $0x18, %r10, %r10
addq %r10, %r11
addq %rdi, %r11
addq $0x10, %r11
cmpq %r9, %rax
je 0x1b3bd2
movl (%r11), %ebx
cmpq %rdx, %rbx
jge 0x1b3bd8
incq %r9
addq $0x18, %r11
jmp 0x1b3bbc
movq %rax, 0x10(%rsi)
jmp 0x1b3c1b
movq %r9, 0x10(%rsi)
jne 0x1b3c1b
leaq (%r10,%rdi), %rdx
addq $-0x8, %rdx
xorl %eax, %eax
imulq $0x18, %r9, %rsi
addq %rdx, %rsi
testq %r9, %r9
jle 0x1b3c1d
decq %r9
movl (%rsi), %edi
addq $-0x18, %rsi
movq (%r8,%rdi,8), %r10
cmpq %rcx, %r10
jae 0x1b3bef
incq %r10
movq %r10, (%r8,%rdi,8)
xorl %esi, %esi
cmpq %rcx, %r10
sete %sil
addq %rsi, %rax
jmp 0x1b3be8
xorl %eax, %eax
popq %rbx
retq
leaq 0x446e6(%rip), %rdi     # 0x1f830c
leaq 0x438ac(%rip), %rsi     # 0x1f74d9
leaq 0x446f0(%rip), %rcx     # 0x1f8324
movl $0x1241, %edx           # imm = 0x1241
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
testq %rcx, %rcx
jne 0x1b4314
shlq $0x5, %r15
addq %r15, %rbx
movq 0x9ed46(%rip), %r12     # 0x252fe0
leaq 0x2ff82(%rip), %rbp     # 0x1e4223
leaq 0x3d825(%rip), %r15     # 0x1f1acd
xorl %r13d, %r13d
movl 0x18(%rbx), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq (%r12), %rsi
cmpq %rax, %r13
jae 0x1b42fe
movq 0x10(%rbx), %rax
movq (%rax,%r13,8), %rax
movl %eax, %ecx
shrl %ecx
leal 0x1(%rcx), %edx
movq 0x10(%r14), %rdi
imulq $0x28, %rcx, %rcx
movl (%rdi,%rcx), %ecx
shrl $0x1f, %ecx
leaq 0x323ab(%rip), %rdi     # 0x1e668b
movsbl (%rcx,%rdi), %ecx
andl $0x1, %eax
movsbl (%rax,%rbp), %r8d
movq %rsi, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x22b0
incq %r13
jmp 0x1b42ab
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2270
movq 0x9ecc5(%rip), %rax     # 0x252fe0
movq (%rax), %rdi
movq %r15, %rax
shlq $0x5, %rax
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
andl 0x18(%rbx,%rax), %r8d
leaq 0x44155(%rip), %rsi     # 0x1f848c
leaq 0x44169(%rip), %rdx     # 0x1f84a7
movq %r15, %rcx
xorl %eax, %eax
callq 0x22b0
jmp 0x1b428c
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: print_cns_seq(ma_ug_t*, ul_str_t*, unsigned long*, unsigned long)
void print_cns_seq(ma_ug_t *ug, ul_str_t *str, uint64_t *cns_seq, uint64_t cns_occ)
{
    fprintf(stderr,"[M::%s::]\t", __func__);
    uint64_t k, ck;
    for (k = ck = 0; k < str->cn; k++) {
        for (; ck < cns_occ; ck++) {
            if(cns_seq[ck] >= k) break;
        }
        if(ck < cns_occ && cns_seq[ck] == k) {
            fprintf(stderr, "utg%.6d%c(%c)\t", (((uint32_t)str->a[k])>>1)+1, 
                    "lc"[ug->u.a[(((uint32_t)str->a[k])>>1)].circ], "+-"[(((uint32_t)str->a[k])&1)]);
        } else {
            fprintf(stderr, "*\t");
        }
    }
    fprintf(stderr,"\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, (%rsp)
movq 0x9e8b9(%rip), %r13     # 0x252fe0
movq (%r13), %rdi
leaq 0x43e79(%rip), %rsi     # 0x1f85ab
leaq 0x43e7d(%rip), %rdx     # 0x1f85b6
xorl %eax, %eax
callq 0x22b0
xorl %ebp, %ebp
xorl %r12d, %r12d
movl 0x18(%r15), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq %rax, %rbp
jae 0x1b47e5
cmpq %rbx, %r12
movq %rbx, %rax
cmovaq %r12, %rax
cmpq %rbx, %r12
jae 0x1b4771
cmpq %rbp, (%r14,%r12,8)
jae 0x1b4776
incq %r12
jmp 0x1b4761
movq %rax, %r12
jmp 0x1b47c7
jne 0x1b47c7
movq (%r13), %rdi
movq 0x10(%r15), %rax
movq (%rax,%rbp,8), %rax
movl %eax, %ecx
shrl %ecx
leal 0x1(%rcx), %edx
movq (%rsp), %rsi
movq 0x10(%rsi), %rsi
imulq $0x28, %rcx, %rcx
movl (%rsi,%rcx), %ecx
shrl $0x1f, %ecx
leaq 0x31ee7(%rip), %rsi     # 0x1e668b
movsbl (%rcx,%rsi), %ecx
andl $0x1, %eax
leaq 0x2fa71(%rip), %rsi     # 0x1e4223
movsbl (%rax,%rsi), %r8d
leaq 0x3d30f(%rip), %rsi     # 0x1f1acd
xorl %eax, %eax
callq 0x22b0
jmp 0x1b47dd
movq (%r13), %rcx
leaq 0x43df2(%rip), %rdi     # 0x1f85c4
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
incq %rbp
jmp 0x1b4745
movq (%r13), %rsi
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2270
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: print_res_seq(poa_g_t*, ma_ug_t*, unsigned int*, unsigned int)
void print_res_seq(poa_g_t *pg, ma_ug_t *ug, uint32_t *cns_seq, uint32_t cns_occ)
{
    fprintf(stderr,"[M::%s::]\t", __func__);
    uint64_t k;
    for (k = 0; k < cns_occ; k++) {
        fprintf(stderr, "utg%.6d%c(%c)\t", (pg->seq.a[(cns_seq[k]>>1)].nid>>1)+1, 
                "lc"[ug->u.a[(pg->seq.a[(cns_seq[k]>>1)].nid>>1)].circ], 
                "+-"[(pg->seq.a[(cns_seq[k]>>1)].nid&1)]);
        
    }
    fprintf(stderr,"\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x9e7c4(%rip), %r13     # 0x252fe0
movq (%r13), %rdi
leaq 0x43d84(%rip), %rsi     # 0x1f85ab
leaq 0x43d99(%rip), %rdx     # 0x1f85c7
xorl %eax, %eax
callq 0x22b0
movl %ebp, %ebp
xorl %r12d, %r12d
movq (%r13), %rsi
cmpq %r12, %rbp
je 0x1b4897
movq 0x10(%r15), %rax
movl (%rbx,%r12,4), %ecx
shrl %ecx
movl 0x4(%rax,%rcx,8), %eax
movl %eax, %ecx
shrl %ecx
imulq $0x28, %rcx, %rdi
movl %ecx, %edx
incl %edx
movq 0x10(%r14), %rcx
movl (%rcx,%rdi), %ecx
shrl $0x1f, %ecx
leaq 0x31e1d(%rip), %rdi     # 0x1e668b
movsbl (%rcx,%rdi), %ecx
andl $0x1, %eax
leaq 0x2f9a7(%rip), %rdi     # 0x1e4223
movsbl (%rax,%rdi), %r8d
movq %rsi, %rdi
leaq 0x3d242(%rip), %rsi     # 0x1f1acd
xorl %eax, %eax
callq 0x22b0
incq %r12
jmp 0x1b483a
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2270
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movq %rsi, %rax
movl 0x4(%rcx), %esi
cmpq %rax, %rsi
jg 0x1b4958
movl 0x8(%rcx), %r8d
cmpq %rax, %r8
jb 0x1b4958
cmpq %rdx, %rsi
jg 0x1b4977
cmpq %rdx, %r8
jl 0x1b4977
cmpq %rax, %rdx
jbe 0x1b4996
subl %esi, %eax
movl %r8d, %r11d
subl %esi, %r11d
movl 0x10(%rcx), %esi
movl (%rcx), %r9d
movl 0xc(%rcx), %r10d
movl %esi, %ebx
subl %r10d, %ebx
cvtsi2sd %rax, %xmm0
cvtsi2sd %r11, %xmm1
cvtsi2sd %rbx, %xmm2
divsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, %r11d
subl %edx, %r8d
cvtsi2sd %r8, %xmm0
divsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, %eax
testb $0x20, 0x20(%rcx)
movq %r11, %rcx
cmoveq %rax, %rcx
cmoveq %r11, %rax
addq %r10, %rax
imulq $0x28, %r9, %rdx
addq 0x10(%rdi), %rdx
subq %rcx, %rsi
movq %rax, %rdi
popq %rbx
jmp 0x1b2312
leaq 0x43c76(%rip), %rdi     # 0x1f85d5
leaq 0x42b73(%rip), %rsi     # 0x1f74d9
leaq 0x43c97(%rip), %rcx     # 0x1f8604
movl $0x131c, %edx           # imm = 0x131C
callq 0x2110
leaq 0x43cd2(%rip), %rdi     # 0x1f8650
leaq 0x42b54(%rip), %rsi     # 0x1f74d9
leaq 0x43c78(%rip), %rcx     # 0x1f8604
movl $0x131d, %edx           # imm = 0x131D
callq 0x2110
leaq 0x43ce2(%rip), %rdi     # 0x1f867f
leaq 0x42b35(%rip), %rsi     # 0x1f74d9
leaq 0x43c59(%rip), %rcx     # 0x1f8604
movl $0x131e, %edx           # imm = 0x131E
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1b5a2b
movl 0x10(%rdx), %eax
movl %eax, %r10d
subl %esi, %r10d
jb 0x1b5a2b
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
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
cvtsi2sd %rdi, %xmm0
cvtsi2sd %rsi, %xmm1
divsd %xmm1, %xmm0
cvtsi2sd %r9, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %rsi
subl %esi, %eax
movl %eax, (%r8)
movl (%rcx), %ecx
cmpl 0x4(%rdx), %ecx
jb 0x1b5a4a
cmpl 0x8(%rdx), %eax
ja 0x1b5a4a
popq %rax
retq
leaq 0x43001(%rip), %rdi     # 0x1f8a33
leaq 0x41aa0(%rip), %rsi     # 0x1f74d9
leaq 0x43012(%rip), %rcx     # 0x1f8a52
movl $0x1467, %edx           # imm = 0x1467
callq 0x2110
leaq 0x43054(%rip), %rdi     # 0x1f8aa5
leaq 0x41a81(%rip), %rsi     # 0x1f74d9
leaq 0x42ff3(%rip), %rcx     # 0x1f8a52
movl $0x1470, %edx           # imm = 0x1470
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1b6486
movq %rdi, %rbx
movq (%rdi), %rdx
leaq (%rdx,%rdx), %r14
movl 0x48(%rdi), %r15d
cmpq %r15, %rdx
jb 0x1b648f
jbe 0x1b63db
cmpq %r14, 0x38(%rbx)
jae 0x1b63a3
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 0x1b63a7
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 0x1b6480
movq 0x28(%rbx), %rdi
shlq $0x4, %rsi
addq %rdi, %rsi
callq 0x1a4bce
movq 0x40(%rbx), %rdi
shlq $0x3, %r14
xorl %r15d, %r15d
xorl %esi, %esi
movq %r14, %rdx
callq 0x20e0
movq 0x18(%rbx), %rax
testq %rax, %rax
movl $0x0, %ecx
cmovgq %rax, %rcx
negq %rcx
pushq $0x1
popq %rdx
pushq $0x10
popq %rsi
movq %rax, %rdi
shlq $0x4, %rdi
leaq (%rcx,%rdx), %r8
cmpq $0x1, %r8
je 0x1b647a
movq 0x28(%rbx), %r9
cmpq %rdx, %rax
jne 0x1b6443
movq -0x10(%r9,%rdi), %r8
jmp 0x1b6455
movq -0x10(%r9,%rsi), %r8
movq (%r9,%rsi), %r9
xorq %r8, %r9
shrq $0x20, %r9
je 0x1b6471
movq %rdx, %r9
subq %r15, %r9
shlq $0x20, %r15
orq %r9, %r15
movq 0x40(%rbx), %r9
shrq $0x20, %r8
movq %r15, (%r9,%r8,8)
movq %rdx, %r15
incq %rdx
addq $0x10, %rsi
jmp 0x1b6429
movl 0x18(%rbx), %eax
movl %eax, 0x4c(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x42700(%rip), %rdi     # 0x1f8b8d
jmp 0x1b6496
leaq 0x4272f(%rip), %rdi     # 0x1f8bc5
leaq 0x4103c(%rip), %rsi     # 0x1f74d9
leaq 0x42703(%rip), %rcx     # 0x1f8ba7
movl $0x1519, %edx           # imm = 0x1519
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: update_poa_nid_occ(ma_ug_t*, uc_block_t*, poa_g_t*, long, unsigned long*, long, long)
void update_poa_nid_occ(ma_ug_t *ug, uc_block_t *raw, poa_g_t *g, int64_t gidx, uint64_t *str, int64_t str_idx, int64_t is_rev)
{
    uint32_t g_v, str_v, new_occ; uc_block_t *z; 
    ///update 
    g_v = g->seq.a[gidx].nid;
    z = &(raw[str[str_idx]>>32]); str_v = ((uint32_t)str[str_idx]); if(is_rev) str_v ^= 1;
    assert(g_v == str_v); assert(g->seq.a[gidx].occ <= ug->u.a[g->seq.a[gidx].nid>>1].n);
    if(g->seq.a[gidx].occ != ug->u.a[g->seq.a[gidx].nid>>1].n) {
        new_occ = ug_occ_w(z->ts, z->te, &(ug->u.a[z->hid]));
        if(new_occ > g->seq.a[gidx].occ) g->seq.a[gidx].occ = new_occ;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq 0x10(%rdx), %r14
movq (%r8,%r9,8), %rcx
xorl %edx, %edx
cmpq $0x0, 0x20(%rsp)
movl 0x4(%r14,%rbx,8), %eax
setne %dl
xorl %ecx, %edx
cmpl %edx, %eax
jne 0x1b67fd
shrq $0x20, %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rsi
movl (%r14,%rbx,8), %ebp
movq 0x10(%rdi), %rdx
shrl %eax
imulq $0x28, %rax, %rax
cmpl 0x10(%rdx,%rax), %ebp
ja 0x1b6806
je 0x1b67f8
movl (%rsi), %eax
movl 0xc(%rsi), %edi
movl 0x10(%rsi), %esi
imulq $0x28, %rax, %rax
addq %rax, %rdx
callq 0x1b2312
cmpl %eax, %ebp
jae 0x1b67f8
movl %eax, (%r14,%rbx,8)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x423db(%rip), %rdi     # 0x1f8bdf
jmp 0x1b680d
leaq 0x42442(%rip), %rdi     # 0x1f8c4f
leaq 0x40cc5(%rip), %rsi     # 0x1f74d9
leaq 0x423d1(%rip), %rcx     # 0x1f8bec
movl $0x1555, %edx           # imm = 0x1555
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: push_poa_arch_0(poa_g_t*, unsigned int, unsigned int, long, long, long)
void push_poa_arch_0(poa_g_t *g, uint32_t src, uint32_t des, int64_t str_id, int64_t str_src, int64_t str_des)
{
    poa_arc_t *ae; emap_t *em;
    kv_pushp(poa_arc_t, g->arc, &ae);
    ae->ul = des; ae->ul <<= 33; ae->ul += ((uint64_t)(0x100000000)); ae->ul += 1;
    ae->v = src; ae->v <<= 1; ae->v += 1;

    kv_pushp(poa_arc_t, g->arc, &ae);
    ae->ul = src; ae->ul <<= 33; ae->ul += 1;
    ae->v = des; ae->v <<= 1;

    kv_pushp(emap_t, g->e_idx, &em);
    em->pge = src; em->pge <<= 32; em->pge += des;
    em->ule = str_src; em->ule <<= 32; em->ule += str_des;
    em->ulid = str_id;

    // assert((g->seq.a[em->pge>>32].nid^(debug_is_rev?1:0)) == ((uint32_t)debug_str->a[em->ule>>32]));
    // assert((g->seq.a[(uint32_t)em->pge].nid^(debug_is_rev?1:0)) == ((uint32_t)debug_str->a[(uint32_t)em->ule]));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x8(%rsp)
movq %r8, %r15
movq %rcx, 0x10(%rsp)
movl %edx, %ebp
movl %esi, %r13d
movq %rdi, %r12
movq 0x18(%rdi), %rdi
movq 0x20(%r12), %rdx
pushq $0x2
popq %rax
cmpq %rdx, %rdi
jne 0x1b6b30
leaq (%rdi,%rdi), %rsi
testq %rdi, %rdi
movq %rax, %r14
cmoveq %rax, %rsi
movq %rsi, 0x20(%r12)
movq 0x28(%r12), %rdi
shlq $0x4, %rsi
callq 0x2370
movq %rax, 0x28(%r12)
movq 0x18(%r12), %rdi
movq 0x20(%r12), %rdx
jmp 0x1b6b38
movq %rax, %r14
movq 0x28(%r12), %rax
leaq 0x1(%rdi), %rcx
movq %rcx, 0x18(%r12)
shlq $0x4, %rdi
movl %ebp, %ebx
movq %rbx, %rsi
shlq $0x21, %rsi
movabsq $0x100000001, %r8       # imm = 0x100000001
orq %rsi, %r8
movq %r8, (%rax,%rdi)
leal 0x1(,%r13,2), %esi
movl %esi, 0x8(%rax,%rdi)
cmpq %rdx, %rcx
jne 0x1b6b96
leaq (%rdx,%rdx), %rsi
testq %rdx, %rdx
cmoveq %r14, %rsi
movq %rsi, 0x20(%r12)
shlq $0x4, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x28(%r12)
movq 0x18(%r12), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x18(%r12)
shlq $0x4, %rcx
movl %r13d, %r13d
movq %r13, %rdx
shlq $0x21, %rdx
incq %rdx
movq %rdx, (%rax,%rcx)
addl %ebp, %ebp
movl %ebp, 0x8(%rax,%rcx)
movq 0xc8(%r12), %rcx
cmpq 0xd0(%r12), %rcx
jne 0x1b6c02
leaq (%rcx,%rcx), %rax
testq %rcx, %rcx
cmoveq %r14, %rax
movq %rax, 0xd0(%r12)
movq 0xd8(%r12), %rdi
imulq $0x18, %rax, %rsi
callq 0x2370
movq %rax, 0xd8(%r12)
movq 0xc8(%r12), %rcx
jmp 0x1b6c0a
movq 0xd8(%r12), %rax
leaq 0x1(%rcx), %rdx
movq %rdx, 0xc8(%r12)
imulq $0x18, %rcx, %rcx
shlq $0x20, %r13
orq %rbx, %r13
movq %r13, (%rax,%rcx)
shlq $0x20, %r15
addq 0x8(%rsp), %r15
movq %r15, 0x8(%rax,%rcx)
movq 0x10(%rsp), %rdx
movl %edx, 0x10(%rax,%rcx)
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: update_poa_arch_0(poa_g_t*, unsigned int, unsigned int, long, long, long)
void update_poa_arch_0(poa_g_t *g, uint32_t src, uint32_t des, int64_t str_id, int64_t str_src, int64_t str_des)
{
    uint32_t k, v, w, a_n; poa_arc_t *a; emap_t *em;
    v = src<<1; w = des<<1;
    a_n = poa_arc_n(g, v); a = poa_arc_a(g, v);
    for (k = 0; k < a_n; k++) {
        if(a[k].v == w) break;
    }
    if(k >= a_n) {
        push_poa_arch_0(g, src, des, str_id, str_src, str_des);
    } else {
        a[k].ul++;
        v = des<<1; v^=1; 
        w = src<<1; w^=1;
        a_n = poa_arc_n(g, v); a = poa_arc_a(g, v);
        for (k = 0; k < a_n; k++) {
            if(a[k].v == w) break;
        }
        assert(k < a_n);
        a[k].ul++;

        kv_pushp(emap_t, g->e_idx, &em);
        em->pge = src; em->pge <<= 32; em->pge += des;
        em->ule = str_src; em->ule <<= 32; em->ule += str_des;
        em->ulid = str_id;

        // assert((g->seq.a[em->pge>>32].nid^(debug_is_rev?1:0)) == ((uint32_t)debug_str->a[em->ule>>32]));
        // assert((g->seq.a[(uint32_t)em->pge].nid^(debug_is_rev?1:0)) == ((uint32_t)debug_str->a[(uint32_t)em->ule]));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r15
movq %rcx, %r14
movl %edx, %r13d
movl %esi, %r12d
movq %rdi, %rbp
leal (%r12,%r12), %eax
leal (%r13,%r13), %edx
movq 0x28(%rdi), %rcx
movq 0x40(%rdi), %rsi
movq (%rsi,%rax,8), %rdi
movl %edi, %r8d
shrq $0x1c, %rdi
andq $-0x10, %rdi
addq %rcx, %rdi
shlq $0x4, %r8
xorl %r9d, %r9d
cmpq %r9, %r8
je 0x1b6ca4
cmpl %edx, 0x8(%rdi,%r9)
je 0x1b6cc9
addq $0x10, %r9
jmp 0x1b6c92
movq %rbp, %rdi
movl %r12d, %esi
movl %r13d, %edx
movq %r14, %rcx
movq %r15, %r8
movq %rbx, %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1b6aca
incq (%rdi,%r9)
orl $0x1, %eax
movl %edx, %edx
movq 0x8(%rsi,%rdx,8), %rsi
movl %esi, %edx
shrq $0x1c, %rsi
andq $-0x10, %rsi
addq %rsi, %rcx
shlq $0x4, %rdx
pushq $-0x10
popq %rsi
leaq 0x10(%rsi), %rdi
cmpq %rdi, %rdx
je 0x1b6d8e
cmpl %eax, 0x18(%rcx,%rsi)
movq %rdi, %rsi
jne 0x1b6ceb
incq (%rcx,%rdi)
movq 0xc8(%rbp), %rcx
cmpq 0xd0(%rbp), %rcx
jne 0x1b6d4a
leaq (%rcx,%rcx), %rax
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmovneq %rax, %rcx
movq %rcx, 0xd0(%rbp)
movq 0xd8(%rbp), %rdi
imulq $0x18, %rcx, %rsi
callq 0x2370
movq %rax, 0xd8(%rbp)
movq 0xc8(%rbp), %rcx
jmp 0x1b6d51
movq 0xd8(%rbp), %rax
leaq 0x1(%rcx), %rdx
movq %rdx, 0xc8(%rbp)
imulq $0x18, %rcx, %rcx
shlq $0x20, %r12
movl %r13d, %edx
orq %r12, %rdx
movq %rdx, (%rax,%rcx)
shlq $0x20, %r15
addq %rbx, %r15
movq %r15, 0x8(%rax,%rcx)
movl %r14d, 0x10(%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x41ef1(%rip), %rdi     # 0x1f8c86
leaq 0x4073d(%rip), %rsi     # 0x1f74d9
leaq 0x41eeb(%rip), %rcx     # 0x1f8c8e
movl $0x15af, %edx           # imm = 0x15AF
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: append_aligned_integer_seq(ma_ug_t*, uc_block_t*, poa_g_t*, long, unsigned long*, long, unsigned long, unsigned int*, unsigned int*, long)
void append_aligned_integer_seq(ma_ug_t *ug, uc_block_t *raw, poa_g_t *g, int64_t g_occ, uint64_t *str, int64_t str_occ, uint64_t is_rev,
uint32_t *match_g, uint32_t *match_str, int64_t match_occ)
{
    if(str_occ <= 0) return;
    int64_t k, p_str, p_g;
    
    if(is_rev == 0) {
        for (k = match_occ-1, p_str = 0, p_g = -1; k >= 0; k--) {
            fprintf(stderr, "+[M::%s::] match_str[%ld]::%u, match_occ::%ld, p_g::%ld\n", 
            __func__, k, match_str[k], match_occ, p_g);
            assert(((int64_t)match_str[k]) >= p_str); 
            // append_integer_seq_frag(ug, raw, g, p_g, match_g[k], str+p_str, match_str[k]+1-p_str, is_rev);
            p_str = match_str[k]; p_g = match_g[k]; 
        }
        // append_integer_seq_frag(ug, raw, g, p_g, -1, str+p_str, str_occ-p_str, is_rev);
    } else {
        for (k = match_occ-1, p_str = str_occ-1, p_g = -1; k >= 0; k--) {
            fprintf(stderr, "-[M::%s::] match_str[%ld]::%u, match_occ::%ld\n", 
            __func__, k, match_str[k], match_occ);
            assert(((int64_t)match_str[k]) <= p_str); 
            // append_integer_seq_frag(ug, raw, g, p_g, match_g[k], str+match_str[k], p_str+1-match_str[k], is_rev);
            p_str = match_str[k]; p_g = match_g[k];  
        }
        // append_integer_seq_frag(ug, raw, g, p_g, -1, str, p_str+1, is_rev);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %r9, %r9
jle 0x1b723a
movq 0x58(%rsp), %rbx
movq 0x50(%rsp), %rbp
cmpq $0x0, 0x40(%rsp)
je 0x1b71d8
movq %r9, %r14
decq %r14
leaq 0x41c43(%rip), %r12     # 0x1f8db6
movq %rbx, %r13
testq %r13, %r13
jle 0x1b723a
leaq -0x1(%r13), %r15
movq 0x9be56(%rip), %rax     # 0x252fe0
movq (%rax), %rdi
movl -0x4(%rbp,%r13,4), %r8d
leaq 0x41ce6(%rip), %rsi     # 0x1f8e7f
movq %r12, %rdx
movq %r15, %rcx
movq %rbx, %r9
xorl %eax, %eax
callq 0x22b0
movl -0x4(%rbp,%r13,4), %eax
movq %r15, %r13
cmpq %rax, %r14
movq %rax, %r14
jae 0x1b7176
leaq 0x41cee(%rip), %rdi     # 0x1f8eae
leaq 0x40312(%rip), %rsi     # 0x1f74d9
leaq 0x41c24(%rip), %rcx     # 0x1f8df2
movl $0x1602, %edx           # imm = 0x1602
callq 0x2110
leaq -0x1(%rbx), %r14
pushq $-0x1
popq %rax
leaq 0x41b97(%rip), %r15     # 0x1f8d7d
leaq 0x41bc9(%rip), %r12     # 0x1f8db6
xorl %r13d, %r13d
leaq 0x1(%r14), %rcx
testq %rcx, %rcx
jle 0x1b723a
movq 0x9bde0(%rip), %rcx     # 0x252fe0
movq (%rcx), %rdi
movl (%rbp,%r14,4), %r8d
movq %rax, (%rsp)
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
movq %rbx, %r9
xorl %eax, %eax
callq 0x22b0
movl (%rbp,%r14,4), %ecx
cmpq %rcx, %r13
ja 0x1b7249
movq 0x48(%rsp), %rax
movl (%rax,%r14,4), %eax
decq %r14
movq %rcx, %r13
jmp 0x1b71f0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x41b81(%rip), %rdi     # 0x1f8dd1
leaq 0x40282(%rip), %rsi     # 0x1f74d9
leaq 0x41b94(%rip), %rcx     # 0x1f8df2
movl $0x15f9, %edx           # imm = 0x15F9
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: poa_cns_chain(poa_g_t*, all_ul_t*, ma_ug_t*, ul_str_t*, ul_chain_t*, long, long, integer_t*, unsigned int*)
void poa_cns_chain(poa_g_t *g, all_ul_t *ul_idx, ma_ug_t *ug, ul_str_t *str, ul_chain_t *idx, int64_t idx_n, int64_t qid, integer_t *buf, uint32_t *is_circle)
{
    (*is_circle) = 0;
    int64_t k, tid, is_rev; 
    reset_poa_g_t(g); 

    append_unmatch_integer_seq(g, ug, ul_idx->a[qid].bb.a, &(str[qid]), 0, str[qid].cn, 0, qid);
    clean_poa_g_t(g); (*is_circle) = 1 - topo_srt_gen(g, qid, ug);
    if((*is_circle)) return;

    for (k = 0; k < idx_n; k++) {
        tid = idx[k].v>>1; is_rev = idx[k].v&1;
        // fprintf(stderr, "\n[M::%s::] k::%ld, tid::%ld, is_rev::%ld\n", __func__, k, tid, is_rev);
        // print_integer_seq(ug, str, tid, 1);
        poa_chain_0(g, ug, ul_idx->a[tid].bb.a, &(str[tid]), idx[k].t_sidx, idx[k].t_eidx, is_rev, buf, tid, qid, is_circle);
        if((*is_circle)) return;
        // print_integer_g(g, ug, 1);
    }

    gen_cns_by_poa(g);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r14
movq 0x70(%rsp), %rbp
movq 0x68(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x60(%rsp), %r10
andl $0x0, (%rbp)
movq %rdi, %rbx
andq $0x0, 0x30(%rdi)
movq %r8, %r13
andq $0x0, 0x18(%rdi)
movq %rcx, %rdi
andq $0x0, (%rbx)
movq %rdx, %r8
andq $0x0, 0xc8(%rbx)
andq $0x0, 0x48(%rbx)
movq %rsi, 0x8(%rsp)
movq 0x48(%rsi), %rax
imulq $0x58, %r10, %rcx
movq 0x30(%rax,%rcx), %rdx
movq %r10, %rax
shlq $0x5, %rax
leaq (%rdi,%rax), %rcx
movq %rdi, 0x18(%rsp)
movl 0x18(%rdi,%rax), %r9d
andl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
subq $0x10, %rsp
andq $0x0, (%rsp)
movq %r10, 0x20(%rsp)
movq %r10, 0x8(%rsp)
movq %rbx, %rdi
movq %r8, %r15
movq %r8, %rsi
xorl %r8d, %r8d
callq 0x1b64ae
popq %rax
popq %rcx
movq %rbx, %rdi
callq 0x1b6311
movq %rbx, %rdi
callq 0x1b73c3
movl %eax, %ecx
xorl $0x1, %ecx
movl %ecx, (%rbp)
testl %eax, %eax
je 0x1b8c34
xorl %r12d, %r12d
testq %r14, %r14
cmovgq %r14, %r12
incq %r12
addq $0x24, %r13
decq %r12
je 0x1b8c43
leaq 0x28(%r13), %r14
movl -0x1c(%r13), %eax
movl -0x4(%r13), %r8d
movl %eax, %r10d
shrl %r10d
andl $0x1, %eax
movq 0x8(%rsp), %rcx
movq 0x48(%rcx), %rcx
imulq $0x58, %r10, %rdx
movq 0x30(%rcx,%rdx), %rdx
movq %r10, %rcx
shlq $0x5, %rcx
addq 0x18(%rsp), %rcx
movl (%r13), %r9d
subq $0x8, %rsp
movq %rbx, %rdi
movq %r15, %rsi
pushq %rbp
pushq 0x20(%rsp)
pushq %r10
pushq 0x40(%rsp)
pushq %rax
callq 0x1b81bd
addq $0x30, %rsp
cmpl $0x0, (%rbp)
movq %r14, %r13
je 0x1b8bd0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1b8607
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: poa_g_arc_w(poa_g_t*, unsigned int, unsigned int)
uint32_t poa_g_arc_w(poa_g_t *pg, uint32_t v, uint32_t w)
{
    poa_arc_t *av; uint32_t an, k;
    an = poa_arc_n(pg, v); av = poa_arc_a(pg, v);
    for (k = 0; k < an; k++) {
        if(av[k].v == w) return (uint32_t)av[k].ul;
    }
    return 0;
}

// Assembly:
movq 0x40(%rdi), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
shrq $0x1c, %rax
andq $-0x10, %rax
addq 0x28(%rdi), %rax
shlq $0x4, %rcx
pushq $-0x10
popq %rsi
leaq 0x10(%rsi), %rdi
cmpq %rdi, %rcx
je 0x1b9360
cmpl %edx, 0x18(%rax,%rsi)
movq %rdi, %rsi
jne 0x1b934a
movl (%rax,%rdi), %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: get_ul_o(ul2ul_idx_t*, unsigned int, unsigned int, unsigned int, unsigned int)
ul2ul_t *get_ul_o(ul2ul_idx_t *idx, uint32_t qid, uint32_t is_q_ul, uint32_t tid, uint32_t is_t_ul)
{
    ul2ul_item_t *z = get_ul_ovlp(idx, qid, is_q_ul); uint64_t k;
    if(!is_t_ul) tid += idx->uln;
    for (k = 0; k < z->n; k++) {
        if(z->a[k].hid == tid) return &(z->a[k]);
    }
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %r8d, %ebp
movl %ecx, %ebx
movq %rdi, %r14
movl %esi, %esi
movl %edx, %edx
callq 0x1ba426
testl %ebp, %ebp
jne 0x1ba468
addl 0x18(%r14), %ebx
movq 0x8(%rax), %rdx
pushq $-0x28
popq %rdi
pushq $-0x1
popq %rsi
xorl %ecx, %ecx
incq %rsi
cmpq %rdx, %rsi
jae 0x1ba493
leaq 0x28(%rdi), %r8
movq (%rax), %r9
cmpl %ebx, 0x28(%r9,%rdi)
movq %r8, %rdi
jne 0x1ba474
addq %r8, %r9
movq %r9, %rcx
movq %rcx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: integer_normalize_ovlp_purge(ul_resolve_t*, unsigned int, ul2ul_item_t*, ul2ul_idx_t*)
void integer_normalize_ovlp_purge(ul_resolve_t *uidx, uint32_t qid, ul2ul_item_t *o, ul2ul_idx_t *ul2)
{
    if(o->is_del) return;
    ul2ul_t *z; uint64_t k, is_del;
    for (k = is_del = 0; k < o->n; k++) {
        if(o->a[k].is_del) continue;
        z = get_ul_o(ul2, o->a[k].hid, 1, qid, 1);
        if((!z) || (z->is_del)) {
            o->a[k].is_del = 1; is_del++;
        } 
    }

    if(is_del) {
        for (k = o->cn = 0; k < o->n; k++) {
            if(o->a[k].is_del) o->a[k].hid |= ((uint32_t)(0x80000000));
            else o->cn++;
        }

        radix_sort_ul2ul_srt(o->a, o->a + o->n);

        for (k = 0; k < o->n; k++) {
            if(o->a[k].hid&((uint32_t)(0x80000000))) {
                o->a[k].hid -= ((uint32_t)(0x80000000));
            }
        }
    }

    if(o->cn == 0) o->is_del = 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x10(%rsp)
movl %esi, 0xc(%rsp)
cmpl $0x0, 0x18(%rdx)
js 0x1badf9
movq %rdx, %rbx
pushq $0x24
popq %r12
xorl %r13d, %r13d
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
cmpq %rax, %r13
jae 0x1bad8d
movq (%rbx), %rbp
movb (%rbp,%r12), %r15b
testb $0x40, %r15b
jne 0x1bad84
movl -0x24(%rbp,%r12), %esi
movq 0x10(%rsp), %rdi
pushq $0x1
popq %rdx
movl 0xc(%rsp), %ecx
movl %edx, %r8d
callq 0x1ba44b
testq %rax, %rax
je 0x1bad78
testb $0x40, 0x24(%rax)
je 0x1bad84
orb $0x40, %r15b
movb %r15b, (%rbp,%r12)
incq %r14
incq %r13
addq $0x28, %r12
jmp 0x1bad3d
testq %r14, %r14
je 0x1badef
andl $0x0, 0x1c(%rbx)
movq (%rbx), %rdi
xorl %ecx, %ecx
movq %rdi, %rdx
movq %rax, %rsi
subq $0x1, %rsi
jb 0x1badbe
testb $0x40, 0x24(%rdx)
jne 0x1badb4
incl %ecx
movl %ecx, 0x1c(%rbx)
jmp 0x1badb8
orb $-0x80, 0x3(%rdx)
addq $0x28, %rdx
jmp 0x1bada1
imulq $0x28, %rax, %rsi
addq %rdi, %rsi
callq 0x1a4565
movq 0x8(%rbx), %rax
xorl %ecx, %ecx
subq $0x1, %rax
jb 0x1badef
movq (%rbx), %rdx
movl (%rdx,%rcx), %esi
testl %esi, %esi
jns 0x1bade9
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movl %esi, (%rdx,%rcx)
addq $0x28, %rcx
jmp 0x1badd0
cmpl $0x0, 0x1c(%rbx)
jne 0x1badf9
orb $-0x80, 0x1b(%rbx)
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: integer_node_del(ul2ul_idx_t*, unsigned long, unsigned long)
void integer_node_del(ul2ul_idx_t *ul2, uint64_t id, uint64_t is_ct)
{
    ul2ul_item_t *o = get_ul_ovlp(ul2, ulg_id(*ul2, id), ulg_type(*ul2, id));
    if(o) {
        uint64_t k; ul2ul_t *z;
        for (k = 0; k < o->cn; k++) {
            if(is_ct) o->a[k].is_ct = 1;
            else o->a[k].is_del = 1;
            z = get_ul_o(ul2, ulg_id(*ul2, o->a[k].hid), ulg_type(*ul2, o->a[k].hid), ulg_id(*ul2, id), ulg_type(*ul2, id));
            if(is_ct) z->is_ct = 1;
            else z->is_del = 1;
        }
        o->is_del = 1;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rax
xorl %edx, %edx
cmpq %rsi, %rax
movl $0x0, %ecx
cmovbeq %rax, %rcx
seta %dl
subq %rcx, %rsi
callq 0x1ba426
testq %rax, %rax
je 0x1bb3b7
movq %rax, %r15
testq %r12, %r12
pushq $0x40
popq %rax
movl $0x80, %ebp
cmovel %eax, %ebp
xorl %r12d, %r12d
xorl %r13d, %r13d
movl 0x1c(%r15), %eax
cmpq %rax, %r13
jae 0x1bb3b2
movq (%r15), %rax
orb %bpl, 0x24(%rax,%r12)
movq (%r15), %rax
movl (%rax,%r12), %esi
movq 0x18(%r14), %rax
xorl %edx, %edx
cmpq %rsi, %rax
movl %eax, %ecx
movl $0x0, %edi
cmoval %edi, %ecx
seta %dl
subl %ecx, %esi
xorl %r8d, %r8d
cmpq %rbx, %rax
cmoval %edi, %eax
seta %r8b
movl %ebx, %ecx
subl %eax, %ecx
movq %r14, %rdi
callq 0x1ba44b
orb %bpl, 0x24(%rax)
incq %r13
addq $0x28, %r12
jmp 0x1bb35c
orb $-0x80, 0x1b(%r15)
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: gen_integer_normalize(ul_resolve_t*)
void gen_integer_normalize(ul_resolve_t *uidx) 
{
    uint64_t k; ul2ul_idx_t *u2o = &(uidx->uovl); ul2ul_item_t *it;
    for (k = 0; k < u2o->uln; k++) {
        it = get_ul_ovlp(u2o, k, 1);
        if(!it) continue;
        assert(uidx->pstr.str.a[k].cn > 1);
        if(it->is_del) continue;
        integer_normalize_ovlp(uidx, k, it, u2o);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x1f0(%rdi), %r14
pushq $0x18
popq %r12
xorl %r15d, %r15d
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
cmpq 0x208(%rbx), %r15
jae 0x1bb7a5
movq 0x220(%rbx), %rax
movl (%rax,%r15,4), %eax
cmpq %r13, %rax
je 0x1bb79c
movq (%r14), %rdx
testq %rdx, %rdx
je 0x1bb79c
movq 0x1d0(%rbx), %rcx
testl $0x7ffffffe, (%rcx,%r12) # imm = 0x7FFFFFFE
je 0x1bb7af
shlq $0x5, %rax
addq %rax, %rdx
cmpl $0x0, 0x18(%rdx)
js 0x1bb79c
movl %r15d, %esi
movq %r14, %rcx
callq 0x1baa1e
incq %r15
addq $0x20, %r12
jmp 0x1bb752
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x3df60(%rip), %rdi     # 0x1f9716
leaq 0x3bd1c(%rip), %rsi     # 0x1f74d9
leaq 0x3df6d(%rip), %rcx     # 0x1f9731
movl $0x1b46, %edx           # imm = 0x1B46
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: dd_path_connect(asg_t*, ul_str_t*)
uint64_t dd_path_connect(asg_t *g, ul_str_t *str)
{
    if(str->cn < 2) return 1;///actually should return 1, doesn't matter
    uint64_t i, v, w, nv, k; asg_arc_t *av;
    v = ((uint32_t)str->a[0]);
    for (i = 1; i < str->cn; i++) {
        w = ((uint32_t)str->a[i]);

        nv = asg_arc_n(g, v); av = asg_arc_a(g, v);
        for (k = 0; k < nv; k++) {
            if(av[k].del) continue;
            if(av[k].v == w) break;
        }
        if(k >= nv) return 0;

        nv = asg_arc_n(g, w^1); av = asg_arc_a(g, w^1);
        for (k = 0; k < nv; k++) {
            if(av[k].del) continue;
            if(av[k].v == (v^1)) break;
        }
        if(k >= nv) return 0;

        v = w;
    }
    return 1;
}

// Assembly:
movl 0x18(%rsi), %ecx
testl $0x7ffffffe, %ecx       # imm = 0x7FFFFFFE
je 0x1bb8a3
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x10(%rsi), %rdx
movl (%rdx), %esi
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movabsq $0x1, %rax
movq %rax, %r8
cmpq %rcx, %r8
jae 0x1bb89b
movq (%rdx,%r8,8), %r11
movl %r11d, %r9d
movq 0x8(%rdi), %r10
movq 0x28(%rdi), %rbx
movq (%rbx,%rsi,8), %r15
movl %r15d, %r14d
shrq $0x20, %r15
imulq $0x18, %r14, %r14
imulq $0x18, %r15, %r15
addq %r10, %r15
addq $0xc, %r15
xorl %r12d, %r12d
cmpq %r12, %r14
je 0x1bb899
cmpl $0x0, (%r15,%r12)
js 0x1bb845
cmpl %r11d, -0x4(%r15,%r12)
je 0x1bb84b
addq $0x18, %r12
jmp 0x1bb832
movq %r9, %r11
xorq $0x1, %r11
movq (%rbx,%r11,8), %rbx
movl %ebx, %r11d
shrq $0x20, %rbx
imulq $0x18, %r11, %r11
imulq $0x18, %rbx, %rbx
addq %rbx, %r10
addq $0xc, %r10
xorl %ebx, %ebx
cmpq %rbx, %r11
je 0x1bb899
cmpl $0x0, (%r10,%rbx)
js 0x1bb888
movl -0x4(%r10,%rbx), %r14d
xorq %rsi, %r14
cmpq $0x1, %r14
je 0x1bb88e
addq $0x18, %rbx
jmp 0x1bb86e
incq %r8
movq %r9, %rsi
jmp 0x1bb7fd
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movabsq $0x1, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: clean_srt_integer(ul_resolve_t*, unsigned int, ul2ul_item_t*, ul2ul_idx_t*)
void clean_srt_integer(ul_resolve_t *uidx, uint32_t qid, ul2ul_item_t *o, ul2ul_idx_t *ul2)
{
    uint64_t k, l, i, m; ul2ul_t *p;
    radix_sort_ul2ul_srt(o->a, o->a + o->n);
    for(k = 1, l = m = o->cn = 0; k <= o->n; k++) {
        if(k == o->n || o->a[k].hid != o->a[l].hid) {
            for (i = l, p = &(o->a[l]); i < k; i++) {
                if(((p->is_del) && (!o->a[i].is_del)) || 
                            ((o->a[i].qe - o->a[i].qs + o->a[i].te - o->a[i].ts) > (p->qe - p->qs + p->te - p->ts))) {
                    p = &(o->a[i]);
                }
            }
            if(!(p->is_del)) o->cn++;
            o->a[m++] = *p;
            l = k;
        }
    }
    o->n = m;
    if(o->n == o->cn) return;

    for (k = o->cn = 0; k < o->n; k++) {
        if(o->a[k].is_del) o->a[k].hid |= ((uint32_t)(0x80000000));
        else o->cn++;
    }
    radix_sort_ul2ul_srt(o->a, o->a + o->n);

    for (k = 0; k < o->n; k++) {
        if(o->a[k].hid&((uint32_t)(0x80000000))) {
            o->a[k].hid -= ((uint32_t)(0x80000000));
        }
    }
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
movq (%rdx), %rdi
imulq $0x28, 0x8(%rdx), %rsi
addq %rdi, %rsi
callq 0x1a4565
andl $0x0, 0x1c(%rbx)
pushq $0x1
popq %rcx
xorl %edx, %edx
xorl %eax, %eax
cmpq 0x8(%rbx), %rcx
ja 0x1bbd50
movq (%rbx), %rsi
je 0x1bbcc5
imulq $0x28, %rcx, %rdi
movl (%rsi,%rdi), %edi
imulq $0x28, %rdx, %r8
cmpl (%rsi,%r8), %edi
je 0x1bbd48
imulq $0x28, %rdx, %r8
addq %rsi, %r8
movq %r8, %rdi
movb 0x24(%rdi), %r9b
cmpq %rcx, %rdx
jae 0x1bbd1c
testb $0x40, %r9b
je 0x1bbce5
testb $0x40, 0x24(%r8)
je 0x1bbd10
movl 0x8(%r8), %r9d
addl 0x10(%r8), %r9d
movl 0x4(%r8), %r10d
addl 0xc(%r8), %r10d
subl %r10d, %r9d
movl 0x4(%rdi), %r10d
movl 0x8(%rdi), %r11d
addl 0x10(%rdi), %r11d
addl 0xc(%rdi), %r10d
subl %r10d, %r11d
cmpl %r11d, %r9d
jbe 0x1bbd13
movq %r8, %rdi
incq %rdx
addq $0x28, %r8
jmp 0x1bbccf
testb $0x40, %r9b
jne 0x1bbd25
incl 0x1c(%rbx)
imulq $0x28, %rax, %rdx
incq %rax
movq 0x20(%rdi), %r8
movq %r8, 0x20(%rsi,%rdx)
movups (%rdi), %xmm0
movups 0x10(%rdi), %xmm1
movups %xmm1, 0x10(%rsi,%rdx)
movups %xmm0, (%rsi,%rdx)
movq %rcx, %rdx
incq %rcx
jmp 0x1bbca1
movq %rax, 0x8(%rbx)
movl 0x1c(%rbx), %ecx
cmpq %rcx, %rax
jne 0x1bbd5e
popq %rbx
retq
andl $0x0, 0x1c(%rbx)
movq (%rbx), %rdi
xorl %ecx, %ecx
movq %rdi, %rdx
movq %rax, %rsi
subq $0x1, %rsi
jb 0x1bbd8a
testb $0x40, 0x24(%rdx)
jne 0x1bbd80
incl %ecx
movl %ecx, 0x1c(%rbx)
jmp 0x1bbd84
orb $-0x80, 0x3(%rdx)
addq $0x28, %rdx
jmp 0x1bbd6d
imulq $0x28, %rax, %rsi
addq %rdi, %rsi
callq 0x1a4565
movq 0x8(%rbx), %rax
xorl %ecx, %ecx
subq $0x1, %rax
jb 0x1bbd5c
movq (%rbx), %rdx
movl (%rdx,%rcx), %esi
testl %esi, %esi
jns 0x1bbdb5
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movl %esi, (%rdx,%rcx)
addq $0x28, %rcx
jmp 0x1bbd9c
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: chimeric_integer_deal(ul_resolve_t*)
void chimeric_integer_deal(ul_resolve_t *uidx)
{
    uint64_t k; ul2ul_idx_t *u2o = &(uidx->uovl); ul2ul_item_t *it;
    kt_for(uidx->str_b.n_thread, worker_detect_chimeric, uidx, uidx->idx->n);
    for (k = 0; k < u2o->uln; k++) {
        it = get_ul_ovlp(u2o, k, 1);
        if(!it) continue;
        assert(uidx->pstr.str.a[k].cn > 1);
        integer_normalize_ovlp_purge(uidx, k, it, u2o);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x1f0(%rdi), %r14
movl 0x1e0(%rdi), %edi
movq 0x30(%rbx), %rax
movq 0x50(%rax), %rcx
leaq 0x8b(%rip), %rsi        # 0x1bbe6e
movq %rbx, %rdx
callq 0xc67c0
pushq $0x18
popq %r12
xorl %r15d, %r15d
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
cmpq 0x208(%rbx), %r15
jae 0x1bbe45
movq 0x220(%rbx), %rax
movl (%rax,%r15,4), %eax
cmpq %r13, %rax
je 0x1bbe3c
movq (%r14), %rdx
testq %rdx, %rdx
je 0x1bbe3c
movq 0x1d0(%rbx), %rcx
testl $0x7ffffffe, (%rcx,%r12) # imm = 0x7FFFFFFE
je 0x1bbe4f
shlq $0x5, %rax
addq %rax, %rdx
movl %r15d, %esi
movq %r14, %rcx
callq 0x1bad0f
incq %r15
addq $0x20, %r12
jmp 0x1bbdf8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x3d8c0(%rip), %rdi     # 0x1f9716
leaq 0x3b67c(%rip), %rsi     # 0x1f74d9
leaq 0x3d96f(%rip), %rcx     # 0x1f97d3
movl $0x1c34, %edx           # imm = 0x1C34
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: double_check_gconnect(asg_t*, unsigned int, unsigned int, unsigned int)
uint32_t double_check_gconnect(asg_t *g, uint32_t v, uint32_t w, uint32_t v2w_d)
{
    asg_arc_t *av = asg_arc_a(g, v); uint32_t nv = asg_arc_n(g, v), k;
    for (k = 0; k < nv; k++) {
        if(av[k].del) continue;
        if(av[k].v == w) break;
    }
    if(k < nv) return 1;
    return 0;
}

// Assembly:
movq 0x8(%rdi), %rax
movq 0x28(%rdi), %rcx
movl %esi, %esi
movq (%rcx,%rsi,8), %rsi
movl %esi, %ecx
shrq $0x20, %rsi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
addq $0xc, %rax
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x1bc387
cmpl $0x0, (%rax)
js 0x1bc37e
cmpl %edx, -0x4(%rax)
je 0x1bc387
incq %rsi
addq $0x18, %rax
jmp 0x1bc36f
xorl %eax, %eax
cmpq %rcx, %rsi
setb %al
retq