LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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), %rax
xorl %ecx, %ecx
cmpq $0x0, 0x20(%rsp)
movl 0x4(%r14,%rbx,8), %edx
setne %cl
xorl %eax, %ecx
cmpl %ecx, %edx
jne 0x2024ec
shrq $0x20, %rax
movl (%r14,%rbx,8), %ebp
movq 0x10(%rdi), %rcx
shrl %edx
leaq (%rdx,%rdx,4), %rdx
cmpl 0x10(%rcx,%rdx,8), %ebp
ja 0x2024f5
je 0x2024e7
leaq (%rax,%rax,8), %rax
leaq (%rsi,%rax,4), %rax
movl (%rax), %edx
movl 0xc(%rax), %edi
movl 0x10(%rax), %esi
leaq (%rdx,%rdx,4), %rax
leaq (%rcx,%rax,8), %rdx
callq 0x1fe266
cmpl %eax, %ebp
jae 0x2024e7
movl %eax, (%r14,%rbx,8)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x44790(%rip), %rdi     # 0x246c83
jmp 0x2024fc
leaq 0x447f7(%rip), %rdi     # 0x246cf3
leaq 0x43106(%rip), %rsi     # 0x245609
leaq 0x44786(%rip), %rcx     # 0x246c90
movl $0x1555, %edx           # imm = 0x1555
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %rax
movq %r9, %r14
movq %r8, %r15
movq %rcx, (%rsp)
movl %edx, %ebp
movl %esi, %r13d
movq %rdi, %r12
movq 0x18(%rdi), %rsi
movq 0x20(%rdi), %rdx
cmpq %rdx, %rsi
jne 0x20281a
leaq (%rsi,%rsi), %rax
testq %rsi, %rsi
movl $0x2, %esi
cmovneq %rax, %rsi
movq %rsi, 0x20(%r12)
movq 0x28(%r12), %rdi
shlq $0x4, %rsi
callq 0x2370
movq %rax, 0x28(%r12)
movq 0x18(%r12), %rsi
movq 0x20(%r12), %rdx
jmp 0x20281f
movq 0x28(%r12), %rax
leaq 0x1(%rsi), %rcx
movq %rcx, 0x18(%r12)
shlq $0x4, %rsi
movl %ebp, %ebx
movq %rbx, %rdi
shlq $0x21, %rdi
movabsq $0x100000001, %r8       # imm = 0x100000001
orq %rdi, %r8
movq %r8, (%rax,%rsi)
leal 0x1(,%r13,2), %edi
movl %edi, 0x8(%rax,%rsi)
cmpq %rdx, %rcx
jne 0x202882
leaq (%rdx,%rdx), %rcx
testq %rdx, %rdx
movl $0x2, %esi
cmovneq %rcx, %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 0x2028f7
leaq (%rcx,%rcx), %rax
testq %rcx, %rcx
movl $0x2, %ecx
cmovneq %rax, %rcx
movq %rcx, 0xd0(%r12)
movq 0xd8(%r12), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x2370
movq %rax, 0xd8(%r12)
movq 0xc8(%r12), %rcx
jmp 0x2028ff
movq 0xd8(%r12), %rax
leaq 0x1(%rcx), %rdx
movq %rdx, 0xc8(%r12)
leaq (%rcx,%rcx,2), %rcx
shlq $0x20, %r13
orq %rbx, %r13
movq %r13, (%rax,%rcx,8)
shlq $0x20, %r15
addq %r14, %r15
movq %r15, 0x8(%rax,%rcx,8)
movq (%rsp), %rdx
movl %edx, 0x10(%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: 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
movq 0x40(%rdi), %rdx
movq (%rdx,%rax,8), %rsi
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
andq %rsi, %rdi
je 0x20299e
leal (,%r13,2), %r8d
movq 0x28(%rbp), %rcx
shrq $0x1c, %rsi
andq $-0x10, %rsi
addq %rcx, %rsi
shlq $0x4, %rdi
xorl %r9d, %r9d
cmpl %r8d, 0x8(%rsi,%r9)
je 0x2029c3
addq $0x10, %r9
cmpq %r9, %rdi
jne 0x20298e
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 0x2027bc
incq (%rsi,%r9)
movl %r8d, %esi
movq 0x8(%rdx,%rsi,8), %rdx
testl %edx, %edx
je 0x2029fb
orl $0x1, %eax
movq %rdx, %rsi
shrq $0x1c, %rsi
andq $-0x10, %rsi
addq %rsi, %rcx
movl %edx, %edx
shlq $0x4, %rdx
xorl %esi, %esi
cmpl %eax, 0x8(%rcx,%rsi)
je 0x202a1a
addq $0x10, %rsi
cmpq %rsi, %rdx
jne 0x2029ec
leaq 0x44328(%rip), %rdi     # 0x246d2a
leaq 0x42c00(%rip), %rsi     # 0x245609
leaq 0x44322(%rip), %rcx     # 0x246d32
movl $0x15af, %edx           # imm = 0x15AF
callq 0x2110
incq (%rcx,%rsi)
movq 0xc8(%rbp), %rcx
cmpq 0xd0(%rbp), %rcx
jne 0x202a69
leaq (%rcx,%rcx), %rax
testq %rcx, %rcx
movl $0x2, %ecx
cmovneq %rax, %rcx
movq %rcx, 0xd0(%rbp)
movq 0xd8(%rbp), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x2370
movq %rax, 0xd8(%rbp)
movq 0xc8(%rbp), %rcx
jmp 0x202a70
movq 0xd8(%rbp), %rax
leaq 0x1(%rcx), %rdx
movq %rdx, 0xc8(%rbp)
leaq (%rcx,%rcx,2), %rcx
shlq $0x20, %r12
movl %r13d, %edx
orq %r12, %rdx
movq %rdx, (%rax,%rcx,8)
shlq $0x20, %r15
addq %rbx, %r15
movq %r15, 0x8(%rax,%rcx,8)
movl %r14d, 0x10(%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: append_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 0x202ee8
movq 0x58(%rsp), %r14
movq 0x50(%rsp), %rbx
cmpq $0x0, 0x40(%rsp)
je 0x202ee3
movq %r9, %r15
decq %r15
leaq 0x43fd7(%rip), %r13     # 0x246e5a
movq %r14, %rbp
testq %rbp, %rbp
jle 0x202ee8
leaq -0x1(%rbp), %r12
movq 0x9214a(%rip), %rax     # 0x294fe0
movq (%rax), %rdi
movl -0x4(%rbx,%rbp,4), %r8d
leaq 0x4407e(%rip), %rsi     # 0x246f23
movq %r13, %rdx
movq %r12, %rcx
movq %r14, %r9
xorl %eax, %eax
callq 0x22b0
movl -0x4(%rbx,%rbp,4), %eax
movq %r12, %rbp
cmpq %rax, %r15
movq %rax, %r15
jae 0x202e86
leaq 0x44087(%rip), %rdi     # 0x246f52
leaq 0x42737(%rip), %rsi     # 0x245609
leaq 0x43fbd(%rip), %rcx     # 0x246e96
movl $0x1602, %edx           # imm = 0x1602
callq 0x2110
testq %r14, %r14
jg 0x202ef7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x48(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2ef8f
jmp 0x202ee8
// File: /workspace/github_cpp_makefile_star2_O3/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), %rsi
testl %esi, %esi
je 0x205254
movq 0x28(%rdi), %rax
movq %rsi, %rcx
shrq $0x20, %rcx
movl %esi, %esi
shlq $0x4, %rcx
leaq (%rcx,%rax), %r8
addq $0x8, %r8
shlq $0x4, %rsi
xorl %edi, %edi
cmpl %edx, (%r8,%rdi)
je 0x205257
addq $0x10, %rdi
cmpq %rdi, %rsi
jne 0x205245
xorl %eax, %eax
retq
addq %rax, %rcx
movl (%rdi,%rcx), %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
movl %esi, %eax
testl %edx, %edx
jne 0x2064e7
addq 0x18(%rdi), %rax
movq 0x30(%rdi), %rdx
movl (%rdx,%rax,4), %eax
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmpq %rdx, %rax
je 0x206501
shlq $0x5, %rax
addq (%rdi), %rax
jmp 0x206503
xorl %eax, %eax
testl %r8d, %r8d
jne 0x20650b
addl 0x18(%rdi), %ecx
movq 0x8(%rax), %rdx
testq %rdx, %rdx
je 0x206524
movq (%rax), %rax
cmpl %ecx, (%rax)
je 0x206526
addq $0x28, %rax
decq %rdx
jne 0x206517
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
cmpl $0x0, 0x18(%rdx)
js 0x206f50
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq 0x8(%rdx), %rax
testq %rax, %rax
je 0x206f41
xorl %edx, %edx
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
movq (%rbx), %r9
leaq (%r8,%r8,4), %r10
movb 0x24(%r9,%r10,8), %r11b
testb $0x40, %r11b
jne 0x206ed3
leaq (%r9,%r10,8), %r14
movl (%r14), %r14d
movq 0x30(%rcx), %r15
movl (%r15,%r14,4), %r15d
cmpq %rdi, %r15
je 0x206e9d
shlq $0x5, %r15
addq (%rcx), %r15
jmp 0x206ea0
xorl %r15d, %r15d
movq 0x8(%r15), %r14
testq %r14, %r14
je 0x206ec3
movq (%r15), %r15
cmpl %esi, (%r15)
je 0x206ebc
addq $0x28, %r15
decq %r14
jne 0x206eac
jmp 0x206ec3
testb $0x40, 0x24(%r15)
je 0x206ed3
orb $0x40, %r11b
movb %r11b, 0x24(%r9,%r10,8)
incq %rdx
movq 0x8(%rbx), %rax
incq %r8
cmpq %rax, %r8
jb 0x206e6e
testq %rdx, %rdx
je 0x206f41
movl $0x0, 0x1c(%rbx)
movq (%rbx), %rdi
testq %rax, %rax
je 0x206f11
xorl %ecx, %ecx
movq %rdi, %rdx
movq %rax, %rsi
testb $0x40, 0x24(%rdx)
jne 0x206f04
incl %ecx
movl %ecx, 0x1c(%rbx)
jmp 0x206f08
orb $-0x80, 0x3(%rdx)
addq $0x28, %rdx
decq %rsi
jne 0x206ef7
leaq (%rax,%rax,4), %rax
leaq (%rdi,%rax,8), %rsi
callq 0x1eed55
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x206f41
movq (%rbx), %rcx
movl (%rcx), %edx
testl %edx, %edx
jns 0x206f38
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl %edx, (%rcx)
addq $0x28, %rcx
decq %rax
jne 0x206f2a
cmpl $0x0, 0x1c(%rbx)
jne 0x206f4b
orb $-0x80, 0x1b(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x208(%rdi), %rax
testq %rax, %rax
je 0x207b87
movq %rdi, %rbx
leaq 0x1f0(%rdi), %r14
movl $0x18, %r12d
xorl %r15d, %r15d
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movq 0x220(%rbx), %rcx
movl (%rcx,%r15,4), %ecx
cmpq %r13, %rcx
je 0x207b7b
movq (%r14), %rdx
testq %rdx, %rdx
je 0x207b7b
movq 0x1d0(%rbx), %rsi
testl $0x7ffffffe, (%rsi,%r12) # imm = 0x7FFFFFFE
je 0x207b91
shlq $0x5, %rcx
addq %rcx, %rdx
cmpl $0x0, 0x18(%rdx)
js 0x207b7b
movl %r15d, %esi
movq %r14, %rcx
callq 0x206b49
movq 0x208(%rbx), %rax
incq %r15
addq $0x20, %r12
cmpq %rax, %r15
jb 0x207b33
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x3fbbf(%rip), %rdi     # 0x247757
leaq 0x3da6a(%rip), %rsi     # 0x245609
leaq 0x3fbcc(%rip), %rcx     # 0x247772
movl $0x1b46, %edx           # imm = 0x1B46
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O3/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
movl $0x1, %eax
testl $0x7ffffffe, %ecx       # imm = 0x7FFFFFFE
je 0x207ca2
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl $0x2, %ecx
jb 0x207ca2
pushq %r15
pushq %r14
pushq %rbx
movq 0x10(%rsi), %rdx
movl (%rdx), %r8d
movq 0x8(%rdi), %rsi
movq 0x28(%rdi), %rdi
addq $0xc, %rsi
movl $0x1, %r9d
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
movq (%rdi,%r8,8), %rbx
movq %rbx, %rax
andq %r10, %rax
je 0x207c9b
movl (%rdx,%r9,8), %r11d
shrq $0x20, %rbx
shlq $0x3, %rax
leaq (%rax,%rax,2), %rax
leaq (%rbx,%rbx,2), %rbx
leaq (%rsi,%rbx,8), %rbx
xorl %r14d, %r14d
cmpl $0x0, (%rbx,%r14)
js 0x207c30
cmpl %r11d, -0x4(%rbx,%r14)
je 0x207c3b
addq $0x18, %r14
cmpq %r14, %rax
jne 0x207c22
jmp 0x207c9b
movq %r11, %rax
xorq $0x1, %rax
movq (%rdi,%rax,8), %rbx
movq %rbx, %rax
andq %r10, %rax
je 0x207c9b
shrq $0x20, %rbx
shlq $0x3, %rax
leaq (%rax,%rax,2), %rax
leaq (%rbx,%rbx,2), %rbx
leaq (%rsi,%rbx,8), %rbx
xorl %r14d, %r14d
cmpl $0x0, (%rbx,%r14)
js 0x207c7a
movl -0x4(%rbx,%r14), %r15d
xorq %r8, %r15
cmpq $0x1, %r15
je 0x207c85
addq $0x18, %r14
cmpq %r14, %rax
jne 0x207c65
jmp 0x207c9b
incq %r9
movl $0x1, %eax
movq %r11, %r8
cmpq %rcx, %r9
jne 0x207bf7
jmp 0x207c9d
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
movq 0x8(%rdx), %rax
leaq (%rax,%rax,4), %rax
leaq (%rdi,%rax,8), %rsi
callq 0x1eed55
movl $0x0, 0x1c(%rbx)
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x208211
movl $0x1, %ecx
xorl %eax, %eax
xorl %edx, %edx
movq (%rbx), %rsi
cmpq %rdi, %rcx
je 0x208110
leaq (%rcx,%rcx,4), %r8
movl (%rsi,%r8,8), %r8d
leaq (%rdx,%rdx,4), %r9
cmpl (%rsi,%r9,8), %r8d
je 0x208198
leaq (%rdx,%rdx,4), %r8
leaq (%rsi,%r8,8), %rdi
cmpq %rcx, %rdx
jae 0x208168
leaq (%rsi,%r8,8), %r8
testb $0x40, 0x24(%rdi)
je 0x20812e
testb $0x40, 0x24(%r8)
je 0x208159
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 0x20815c
movq %r8, %rdi
incq %rdx
addq $0x28, %r8
cmpq %rdx, %rcx
jne 0x208121
testb $0x40, 0x24(%rdi)
jne 0x208171
incl 0x1c(%rbx)
leaq (%rax,%rax,4), %rdx
incq %rax
movq 0x20(%rdi), %r8
movq %r8, 0x20(%rsi,%rdx,8)
movups (%rdi), %xmm0
movups 0x10(%rdi), %xmm1
movups %xmm1, 0x10(%rsi,%rdx,8)
movups %xmm0, (%rsi,%rdx,8)
movq 0x8(%rbx), %rdi
movq %rcx, %rdx
incq %rcx
cmpq %rdi, %rcx
jbe 0x2080f2
movl 0x1c(%rbx), %ecx
movq %rax, 0x8(%rbx)
cmpq %rcx, %rax
je 0x208211
movl $0x0, 0x1c(%rbx)
movq (%rbx), %rdi
testq %rax, %rax
je 0x2081e1
xorl %ecx, %ecx
movq %rdi, %rdx
movq %rax, %rsi
testb $0x40, 0x24(%rdx)
jne 0x2081d4
incl %ecx
movl %ecx, 0x1c(%rbx)
jmp 0x2081d8
orb $-0x80, 0x3(%rdx)
addq $0x28, %rdx
decq %rsi
jne 0x2081c7
leaq (%rax,%rax,4), %rax
leaq (%rdi,%rax,8), %rsi
callq 0x1eed55
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x208211
movq (%rbx), %rcx
movl (%rcx), %edx
testl %edx, %edx
jns 0x208208
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl %edx, (%rcx)
addq $0x28, %rcx
decq %rax
jne 0x2081fa
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
movl 0x1e0(%rdi), %edi
movq 0x30(%rbx), %rax
movq 0x50(%rax), %rcx
leaq 0xa1(%rip), %rsi        # 0x2082d5
movq %rbx, %rdx
callq 0x108f2c
movq 0x208(%rbx), %rax
testq %rax, %rax
je 0x2082ac
leaq 0x1f0(%rbx), %r14
movl $0x18, %r12d
xorl %r15d, %r15d
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movq 0x220(%rbx), %rcx
movl (%rcx,%r15,4), %ecx
cmpq %r13, %rcx
je 0x2082a0
movq (%r14), %rdx
testq %rdx, %rdx
je 0x2082a0
movq 0x1d0(%rbx), %rax
testl $0x7ffffffe, (%rax,%r12) # imm = 0x7FFFFFFE
je 0x2082b6
shlq $0x5, %rcx
addq %rcx, %rdx
movl %r15d, %esi
movq %r14, %rcx
callq 0x206e45
movq 0x208(%rbx), %rax
incq %r15
addq $0x20, %r12
cmpq %rax, %r15
jb 0x20825e
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x3f49a(%rip), %rdi     # 0x247757
leaq 0x3d345(%rip), %rsi     # 0x245609
leaq 0x3f549(%rip), %rcx     # 0x247814
movl $0x1c34, %edx           # imm = 0x1C34
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: worker_detect_chimeric(void*, long, int)
static void worker_detect_chimeric(void *data, long i, int tid) // callback for kt_for()
{
    ul_resolve_t *uidx = (ul_resolve_t *)data;
    integer_ml_t *sl = &(uidx->str_b); 
    integer_t *buf = &(sl->buf[tid]);
    ul2ul_item_t *it = get_ul_ovlp(&(uidx->uovl), i, 1);
    if(!it) return;
    assert(uidx->pstr.str.a[i].cn > 1);
    if(it->is_del) return;
    clip_integer_chimeric(uidx, i, it, &(uidx->uovl), buf, 1);
}

// Assembly:
movl %edx, %eax
movq 0x220(%rdi), %rcx
movl (%rcx,%rsi,4), %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmpq %rdx, %rcx
je 0x208338
movq 0x1f0(%rdi), %rdx
testq %rdx, %rdx
je 0x208338
movq 0x1d0(%rdi), %r8
movq %rsi, %r9
shlq $0x5, %r9
testl $0x7ffffffe, 0x18(%r8,%r9) # imm = 0x7FFFFFFE
je 0x208339
shlq $0x5, %rcx
addq %rcx, %rdx
cmpl $0x0, 0x18(%rdx)
js 0x208338
cltq
imulq $0x328, %rax, %r8       # imm = 0x328
addq 0x1d8(%rdi), %r8
movl $0x1, %r9d
jmp 0x207ca3
retq
pushq %rax
leaq 0x42171(%rip), %rdi     # 0x24a4b2
leaq 0x3d2c1(%rip), %rsi     # 0x245609
leaq 0x4217e(%rip), %rcx     # 0x24a4cd
movl $0x1c27, %edx           # imm = 0x1C27
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: print_primary_ul_chain(ul_str_t*, ul_vec_t*, ma_ug_t*)
void print_primary_ul_chain(ul_str_t *p_str, ul_vec_t *ul, ma_ug_t *ug)
{
    uc_block_t *z; uint64_t k, dd = 0;
    if(p_str) {
        for (k = 0; k < p_str->cn; k++) {
            z = &(ul->bb.a[p_str->a[k]>>32]);
            fprintf(stderr, "[M::%s::pk->%lu] utg%.6d%c(%c::len->%u), qs::%u, qe::%u, ts::%u, te::%u\n", __func__, k,
                    z->hid+1, "lc"[ug->u.a[z->hid].circ], "+-"[z->rev], ug->u.a[z->hid].len, 
                    z->qs, z->qe, z->ts, z->te);
            dd++;
        }
    } else {
        for (k = 0; k < ul->bb.n; k++) {
            z = &(ul->bb.a[k]);
            if(!z->pchain) continue;
            fprintf(stderr, "[M::%s::rk->%lu] utg%.6d%c(%c::len->%u), qs::%u, qe::%u, ts::%u, te::%u\n", __func__, k,
                    z->hid+1, "lc"[ug->u.a[z->hid].circ], "+-"[z->rev], ug->u.a[z->hid].len, 
                    z->qs, z->qe, z->ts, z->te);
            dd++;
        }
    }

    if(dd) fprintf(stderr, "*******************************************\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
testq %rdi, %rdi
je 0x208390
movq %rdi, %rsi
testl $0x7fffffff, 0x18(%rdi) # imm = 0x7FFFFFFF
je 0x208474
leaq 0x18(%rsi), %rcx
movq %r14, %rdi
callq 0x2f02b
jmp 0x208483
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x208474
xorl %ebp, %ebp
xorl %esi, %esi
xorl %r13d, %r13d
movq %rdx, (%rsp)
movq 0x30(%r14), %rcx
movzbl 0x20(%rcx,%rbp), %r10d
testb $0x1f, %r10b
jne 0x2083c9
incq %r13
addq $0x24, %rbp
cmpq %rax, %r13
jb 0x2083a8
jmp 0x20846f
movq 0x8cc10(%rip), %rax     # 0x294fe0
movq (%rax), %rdi
movl (%rcx,%rbp), %eax
movl 0x4(%rcx,%rbp), %r8d
movq %r8, 0x8(%rsp)
leal 0x1(%rax), %r8d
movq %rsi, 0x10(%rsp)
movq 0x10(%rdx), %rsi
leaq (%rax,%rax,4), %rax
movl (%rsi,%rax,8), %r11d
movl %r11d, %eax
shrl $0x1f, %eax
leaq 0x2c339(%rip), %rdx     # 0x23473b
movsbl (%rax,%rdx), %r9d
btl $0x5, %r10d
leaq 0x29ec0(%rip), %rax     # 0x2322d3
adcq $0x0, %rax
movsbl (%rax), %r12d
andl $0x7fffffff, %r11d      # imm = 0x7FFFFFFF
movl 0x8(%rcx,%rbp), %ebx
movl 0xc(%rcx,%rbp), %r15d
movl 0x10(%rcx,%rbp), %r10d
leaq 0x3f468(%rip), %rsi     # 0x24789f
leaq 0x3f44a(%rip), %rdx     # 0x247888
movq %r13, %rcx
xorl %eax, %eax
pushq %r10
pushq %r15
pushq %rbx
pushq 0x20(%rsp)
pushq %r11
pushq %r12
callq 0x22b0
movq 0x40(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq $0x30, %rsp
incq %rsi
movq 0x20(%r14), %rax
jmp 0x2083b8
testq %rsi, %rsi
jne 0x208483
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2f115
jmp 0x208474
// File: /workspace/github_cpp_makefile_star2_O3/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 0x28(%rdi), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rax
testl %eax, %eax
je 0x20877f
movq 0x8(%rdi), %rcx
movq %rax, %rsi
shrq $0x20, %rsi
movl %eax, %eax
leaq (%rsi,%rsi,2), %rsi
leaq (%rcx,%rsi,8), %rcx
addq $0xc, %rcx
movq %rax, %rsi
negq %rsi
movb $0x1, %dil
movl $0x1, %r8d
cmpl $0x0, (%rcx)
js 0x20875c
cmpl %edx, -0x4(%rcx)
je 0x208777
cmpq %rax, %r8
setb %dil
addq $0x18, %rcx
leaq (%rsi,%r8), %r9
incq %r9
incq %r8
cmpq $0x1, %r9
jne 0x208752
movzbl %dil, %eax
andl $0x1, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: clean_ul_re_correct_buf(ul_resolve_t*, unsigned long, unsigned long*)
uint64_t clean_ul_re_correct_buf(ul_resolve_t *uidx, uint64_t clean_dump, uint64_t *tot_circle)
{
    uint64_t k, occ, n_circle;
    for (k = occ = n_circle = 0; k < uidx->str_b.n_thread; k++) {
        occ += uidx->str_b.buf[k].n_correct; 
        n_circle += uidx->str_b.buf[k].n_circle;
        uidx->str_b.buf[k].n_correct = 0;
        uidx->str_b.buf[k].n_circle = 0;
        if(clean_dump) uidx->str_b.buf[k].res_dump.n = 0;
        uidx->str_b.buf[k].q.n = 0;
        uidx->str_b.buf[k].t.n = 0;
        uidx->str_b.buf[k].b.n = 0;
        uidx->str_b.buf[k].f.n = 0;
        uidx->str_b.buf[k].p.n = 0;
        uidx->str_b.buf[k].o.n = 0;
        uidx->str_b.buf[k].u.n = 0;
        uidx->str_b.buf[k].vis.n = 0;
        uidx->str_b.buf[k].sc.n = 0;
        uidx->str_b.buf[k].snp.n = 0;
    }
    (*tot_circle) = n_circle;
    return occ;
}

// Assembly:
movq 0x1e0(%rdi), %rcx
testq %rcx, %rcx
je 0x209404
movq 0x1d8(%rdi), %rdi
xorl %r8d, %r8d
xorps %xmm0, %xmm0
xorl %r9d, %r9d
xorl %eax, %eax
addq 0x318(%rdi), %rax
addq 0x320(%rdi), %r9
movups %xmm0, 0x318(%rdi)
testq %rsi, %rsi
je 0x2093c3
movq $0x0, 0x300(%rdi)
movq %r8, (%rdi)
movq %r8, 0x18(%rdi)
movq %r8, 0x30(%rdi)
movq %r8, 0x48(%rdi)
movq %r8, 0x60(%rdi)
movq %r8, 0x78(%rdi)
movq %r8, 0x90(%rdi)
movq %r8, 0xa8(%rdi)
movq %r8, 0xc0(%rdi)
movq %r8, 0xd8(%rdi)
addq $0x328, %rdi            # imm = 0x328
decq %rcx
jne 0x20939e
jmp 0x209409
xorl %eax, %eax
xorl %r9d, %r9d
movq %r9, (%rdx)
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: rebuid_idx(ul_resolve_t*)
void rebuid_idx(ul_resolve_t *uidx)
{
    uint32_t k;
    free(uidx->idx->ridx.idx.a); free(uidx->idx->ridx.occ.a); 
    memset(&(uidx->idx->ridx), 0, sizeof((uidx->idx->ridx)));
    filter_ul_ug(uidx->l1_ug);
	gen_ul_vec_rid_t(uidx->idx, NULL, uidx->l1_ug);
    update_ug_arch_ul_mul(uidx->l1_ug);

    free(uidx->pstr.idx.a); free(uidx->pstr.occ.a); 
    for (k = 0; k < uidx->pstr.str.n; k++) {
        free(uidx->pstr.str.a[k].a);
    }
    free(uidx->pstr.str.a); 
    memset(&(uidx->pstr), 0, sizeof(uidx->pstr));
    init_ul_str_idx_t(uidx);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movq 0x28(%rax), %rdi
callq 0x2220
movq 0x30(%rbx), %rax
movq 0x40(%rax), %rdi
callq 0x2220
movq 0x30(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rax)
movups %xmm0, 0x28(%rax)
movups %xmm0, 0x18(%rax)
movq 0x18(%rbx), %rdi
callq 0x1e0f03
movq 0x18(%rbx), %rdx
movq 0x30(%rbx), %rdi
xorl %esi, %esi
callq 0x1e0ae1
movq 0x18(%rbx), %rdi
callq 0x1e0cc9
movq 0x1a0(%rbx), %rdi
callq 0x2220
movq 0x1b8(%rbx), %rdi
callq 0x2220
cmpq $0x0, 0x1c0(%rbx)
je 0x2094ac
movl $0x1, %ebp
xorl %eax, %eax
movq 0x1d0(%rbx), %rcx
shlq $0x5, %rax
movq 0x10(%rcx,%rax), %rdi
callq 0x2220
movl %ebp, %eax
incl %ebp
cmpq %rax, 0x1c0(%rbx)
ja 0x20948a
movq 0x1d0(%rbx), %rdi
callq 0x2220
xorps %xmm0, %xmm0
movups %xmm0, 0x1c0(%rbx)
movups %xmm0, 0x1b0(%rbx)
movups %xmm0, 0x1a0(%rbx)
movups %xmm0, 0x190(%rbx)
movq $0x0, 0x1d0(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1fe2d1
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: shrink_1b(ma_ug_t*, uc_block_t*, uc_block_t*, unsigned int)
void shrink_1b(ma_ug_t *ug, uc_block_t *z, uc_block_t *lim, uint32_t is_forward)
{
    if(z->ts != 0 || z->te != ug->g->seq[z->hid].len) return;
    uc_block_t bc = *z;
    if(z->ts + 1 < z->te && z->qs + 1 < z->qe) {
        uint32_t off = get_offset_adjust(1, z->te-z->ts, z->qe-z->qs);
        if(is_forward) {
            if((!z->rev)) {
                z->ts += 1; z->qs += off;
            } else {
                z->te -= 1; z->qs += off;
            }
            if((lim) && (!((z->qs <= lim->qs) && (z->qe <= lim->qe)))) *z = bc;
        } else {
            if((!z->rev)) {
                z->te -= 1; z->qe -= off;
            } else {
                z->ts += 1; z->qe -= off;
            }
            if((lim) && (!((z->qs >= lim->qs) && (z->qe >= lim->qe)))) *z = bc;
        }
        if((ugl_cover_check(bc.ts, bc.te, &(ug->u.a[bc.hid]))) && 
                                            (!ugl_cover_check(z->ts, z->te, &(ug->u.a[z->hid])))) {
            *z = bc;
        }
    }
    
}

// Assembly:
cmpl $0x0, 0xc(%rsi)
je 0x2094f7
retq
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movl (%rsi), %r12d
movl 0x10(%rsi), %r14d
movq 0x18(%rdi), %rax
movq 0x20(%rax), %rax
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andl (%rax,%r12,8), %esi
cmpl %esi, %r14d
jne 0x209645
movq 0x4(%rbx), %r13
movupd 0x14(%rbx), %xmm0
movapd %xmm0, (%rsp)
cmpl $0x2, %r14d
jb 0x209645
movq %r13, %rax
shrq $0x20, %rax
leal 0x1(%r13), %esi
cmpl %eax, %esi
jae 0x209645
movl %eax, %esi
subl %r13d, %esi
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
movsd 0x27da5(%rip), %xmm1    # 0x231310
divsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %rsi, %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rsi
movb 0x20(%rbx), %dil
testl %ecx, %ecx
je 0x209597
testb $0x20, %dil
jne 0x2095a6
movl $0x1, 0xc(%rbx)
jmp 0x2095ad
testb $0x20, %dil
jne 0x2095c4
leal -0x1(%r14), %ecx
movl %ecx, 0x10(%rbx)
jmp 0x2095cb
leal -0x1(%r14), %ecx
movl %ecx, 0x10(%rbx)
addl %r13d, %esi
movl %esi, 0x4(%rbx)
testq %rdx, %rdx
je 0x2095ef
cmpl 0x4(%rdx), %esi
ja 0x2095e0
cmpl %eax, 0x8(%rdx)
jb 0x2095e0
jmp 0x2095ef
movl $0x1, 0xc(%rbx)
subl %esi, %eax
movl %eax, 0x8(%rbx)
testq %rdx, %rdx
je 0x2095ef
cmpl %r13d, 0x4(%rdx)
ja 0x2095e0
cmpl 0x8(%rdx), %eax
jae 0x2095ef
movq %r13, 0x4(%rbx)
movl $0x0, 0xc(%rbx)
movl %r14d, 0x10(%rbx)
leaq (%r12,%r12,4), %rdx
shlq $0x3, %rdx
addq 0x10(%r15), %rdx
xorl %edi, %edi
movq %r14, %rsi
callq 0x1e0c58
testl %eax, %eax
je 0x209645
movl (%rbx), %eax
movl 0xc(%rbx), %edi
movl 0x10(%rbx), %esi
leaq (%rax,%rax,4), %rdx
shlq $0x3, %rdx
addq 0x10(%r15), %rdx
callq 0x1e0c58
testl %eax, %eax
jne 0x209645
leaq 0x14(%rbx), %rax
movl %r12d, (%rbx)
movq %r13, 0x4(%rbx)
movl $0x0, 0xc(%rbx)
movl %r14d, 0x10(%rbx)
movapd (%rsp), %xmm0
movupd %xmm0, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: shrink_uls(ul_resolve_t*)
void shrink_uls(ul_resolve_t *uidx)
{
    all_ul_t *uls = uidx->idx; uint64_t k, ul_n = uls->n; 
    for (k = 0; k < ul_n; k++) {
        // fprintf(stderr, "+[M::%s::k->%lu] ul_n::%lu, uls->n::%u\n", __func__, k, ul_n, uls->n);
        shrink_ul0(uls, &(uidx->pstr.str.a[k]), k, &(uidx->str_b.buf[0]), uidx->l1_ug);
        // fprintf(stderr, "-[M::%s::k->%lu] ul_n::%lu, uls->n::%u\n", __func__, k, ul_n, uls->n);
    }
    rebuid_idx(uidx);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %r14
movq 0x50(%r14), %r12
testq %r12, %r12
je 0x20a0c2
xorl %r13d, %r13d
xorl %r15d, %r15d
movq 0x1d0(%rbx), %rsi
addq %r13, %rsi
movq 0x18(%rbx), %r8
movq 0x1d8(%rbx), %rcx
movq %r14, %rdi
movq %r15, %rdx
callq 0x209885
incq %r15
addq $0x20, %r13
cmpq %r15, %r12
jne 0x20a096
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x20940d
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: worker_integer_update(void*, long, int)
static void worker_integer_update(void *data, long i, int tid) // callback for kt_for()
{
    ul_resolve_t *uidx = (ul_resolve_t *)data;
    integer_ml_t *sl = &(uidx->str_b); 
    integer_t *buf = &(sl->buf[i]);///normally should be buf = &(sl->buf[tid])
    uint64_t k, l;
    for (k = 0, l = (uint64_t)-1; k <= buf->res_dump.n; k++) {
        if(k == buf->res_dump.n || (buf->res_dump.a[k]&((uint64_t)(0xffffffff))) == ((uint64_t)(0xffffffff))) {
            if(l != (uint64_t)-1 && k - l > 1) {
                update_integer_seq(uidx, buf, buf->res_dump.a[l]>>32, buf->res_dump.a + l + 1, k - l - 1, tid);
            }
            l = k;
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x1d8(%rdi), %rax
imulq $0x328, %rsi, %rcx      # imm = 0x328
leaq (%rax,%rcx), %r14
movq 0x300(%rax,%rcx), %rax
movq $-0x1, %r8
xorl %r15d, %r15d
cmpq %rax, %r15
je 0x20a16c
movq 0x310(%r14), %rcx
cmpl $-0x1, (%rcx,%r15,8)
jne 0x20a1b0
cmpq $-0x1, %r8
je 0x20a1ab
movq %r15, %rdx
subq %r8, %rdx
movq %r15, %rcx
cmpq $0x2, %rdx
jb 0x20a1b3
movq 0x310(%r14), %rax
leaq (%rax,%r8,8), %rcx
addq $0x8, %rcx
movl -0x4(%rcx), %edx
notq %r8
addq %r15, %r8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x208782
movq 0x300(%r14), %rax
movq %r15, %rcx
jmp 0x20a1b3
movq %r8, %rcx
incq %r15
movq %rcx, %r8
cmpq %rax, %r15
jbe 0x20a159
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: append_utg_es(ul_resolve_t*)
void append_utg_es(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);
        integer_append_ug_ovlp(uidx, k, it, u2o);
    }

    kt_for(uidx->str_b.n_thread, worker_integert_clean, uidx, u2o->tot);///all ul + ug

    for (k = 0; k < u2o->tot; k++) {
        it = get_ul_ovlp(u2o, ulg_id(*u2o, k), ulg_type(*u2o, k));
        if(!it) continue;
        integer_normalize_ovlp(uidx, k, it, u2o);
    }

    kt_for(uidx->str_b.n_thread, worker_integert_clean, uidx, u2o->tot);///all ul + ug
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x1f0(%rdi), %r14
movq 0x208(%rdi), %rax
testq %rax, %rax
je 0x20a247
movl $0x18, %r12d
xorl %r15d, %r15d
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movq 0x220(%rbx), %rcx
movl (%rcx,%r15,4), %ecx
cmpq %r13, %rcx
je 0x20a23b
movq (%r14), %rdx
testq %rdx, %rdx
je 0x20a23b
movq 0x1d0(%rbx), %rax
testl $0x7ffffffe, (%rax,%r12) # imm = 0x7FFFFFFE
je 0x20a2f5
shlq $0x5, %rcx
addq %rcx, %rdx
movq %rbx, %rdi
movl %r15d, %esi
movq %r14, %rcx
callq 0x206f51
movq 0x208(%rbx), %rax
incq %r15
addq $0x20, %r12
cmpq %rax, %r15
jb 0x20a1f2
movl 0x1e0(%rbx), %edi
movq 0x218(%rbx), %rcx
leaq 0xb9(%rip), %rsi        # 0x20a314
movq %rbx, %rdx
callq 0x108f2c
movq 0x218(%rbx), %rcx
testq %rcx, %rcx
je 0x20a2d5
xorl %r15d, %r15d
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq 0x208(%rbx), %rax
movq 0x220(%rbx), %rdx
cmpq %rax, %r15
movl $0x0, %esi
cmovaeq %rax, %rsi
movq %rax, %rdi
subq %rsi, %rdi
addq %r15, %rdi
cmpq %rax, %r15
cmovbq %r15, %rdi
movl (%rdx,%rdi,4), %eax
cmpq %r12, %rax
je 0x20a2cb
movq (%r14), %rdx
testq %rdx, %rdx
je 0x20a2cb
shlq $0x5, %rax
addq %rax, %rdx
movl %r15d, %esi
movq %r14, %rcx
callq 0x206b49
movq 0x218(%rbx), %rcx
incq %r15
cmpq %rcx, %r15
jb 0x20a278
jmp 0x20a2d7
xorl %ecx, %ecx
movl 0x1e0(%rbx), %edi
leaq 0x30(%rip), %rsi        # 0x20a314
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x108f2c
leaq 0x3d45b(%rip), %rdi     # 0x247757
leaq 0x3b306(%rip), %rsi     # 0x245609
leaq 0x3d8bf(%rip), %rcx     # 0x247bc9
movl $0x1eef, %edx           # imm = 0x1EEF
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: worker_integert_clean(void*, long, int)
static void worker_integert_clean(void *data, long i, int tid) // callback for kt_for()
{
    ul_resolve_t *uidx = (ul_resolve_t *)data;
    ul2ul_item_t *it = get_ul_ovlp(&(uidx->uovl), ulg_id(uidx->uovl, (uint32_t)i), 
                                                            ulg_type(uidx->uovl, (uint32_t)i));
    if(!it) return;
    if((uint32_t)i >= uidx->uovl.uln) it->id = i;
    clean_srt_integer(uidx, i, it, &(uidx->uovl));
}

// Assembly:
movl %esi, %eax
movq 0x208(%rdi), %rcx
xorl %edx, %edx
cmpq %rcx, %rax
cmovaeq %rcx, %rdx
movq %rax, %r8
subq %rdx, %r8
addq %rcx, %r8
cmpq %rcx, %rax
cmovbq %rax, %r8
movq 0x220(%rdi), %rdx
movl (%rdx,%r8,4), %r8d
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmpq %rdx, %r8
je 0x20a37f
movq 0x1f0(%rdi), %rdx
testq %rdx, %rdx
je 0x20a37f
shlq $0x5, %r8
addq %r8, %rdx
cmpq %rcx, %rax
jb 0x2080bd
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movl $0x80000000, %eax       # imm = 0x80000000
andl 0x18(%rdx), %eax
orl %esi, %eax
movl %eax, 0x18(%rdx)
jmp 0x2080bd
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: remove_integert_containment(ul_resolve_t*, unsigned int)
void remove_integert_containment(ul_resolve_t *uidx, uint32_t keep_raw_utg)
{
    ul2ul_idx_t *u2o = &(uidx->uovl); ul2ul_item_t *o;
    uint64_t k, kn = keep_raw_utg?u2o->uln:u2o->tot; 
    for (k = 0; k < kn; k++) {
        o = get_ul_ovlp(u2o, ulg_id(*u2o, k), ulg_type(*u2o, k));
        if(!o) continue;
        integer_containment_purge(uidx, k, o, u2o, keep_raw_utg);
    }

    kt_for(uidx->str_b.n_thread, worker_integert_clean, uidx, u2o->tot);///all ul + ug
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %eax, %eax
testl %esi, %esi
sete %al
shll $0x4, %eax
movq 0x208(%rdi,%rax), %r12
testq %r12, %r12
je 0x20a411
movl %esi, %ebp
leaq 0x1f0(%rbx), %r14
xorl %r15d, %r15d
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movq 0x208(%rbx), %rax
movq 0x220(%rbx), %rcx
cmpq %rax, %r15
movl $0x0, %edx
cmovaeq %rax, %rdx
movq %rax, %rsi
subq %rdx, %rsi
addq %r15, %rsi
cmpq %rax, %r15
cmovbq %r15, %rsi
movl (%rcx,%rsi,4), %eax
cmpq %r13, %rax
je 0x20a409
movq (%r14), %rdx
testq %rdx, %rdx
je 0x20a409
shlq $0x5, %rax
addq %rax, %rdx
movq %rbx, %rdi
movl %r15d, %esi
movq %r14, %rcx
movl %ebp, %r8d
callq 0x20764b
incq %r15
cmpq %r15, %r12
jne 0x20a3b7
movl 0x1e0(%rbx), %edi
movq 0x218(%rbx), %rcx
leaq -0x111(%rip), %rsi      # 0x20a314
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x108f2c
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: output_integer_graph(ul_resolve_t*, ma_ug_t*, char const*, unsigned int)
void output_integer_graph(ul_resolve_t *uidx, ma_ug_t *iug, const char *nn, uint32_t is_seq)
{
    char* gfa_name = NULL; MALLOC(gfa_name, strlen(nn)+50);
	sprintf(gfa_name, "%s.integer.noseq.gfa", nn);
    FILE* fp = fopen(gfa_name, "w"); free(gfa_name);
	if (!fp) return;
    ma_integer_ug_print0(iug, uidx, 0, "itg", fp, is_seq);
    fclose(fp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %ecx, %ebx
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
movq %rdx, %rdi
callq 0x2090
leaq 0x32(%rax), %rdi
callq 0x2280
movq %rax, %r13
leaq 0x3c65d(%rip), %rsi     # 0x247cd5
movq %rax, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0x3d056(%rip), %rsi     # 0x2486e2
movq %r13, %rdi
callq 0x2210
movq %rax, %r12
movq %r13, %rdi
callq 0x2220
testq %r12, %r12
je 0x20b6cd
leaq 0x3c63f(%rip), %rcx     # 0x247cea
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %r8
movl %ebx, %r9d
callq 0x20ad02
movq %r12, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2190
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: print_raw_uls_seq(ul_resolve_t*, char const*)
void print_raw_uls_seq(ul_resolve_t *uidx, const char *nn)
{
    char* gfa_name = NULL; MALLOC(gfa_name, strlen(nn)+70);
    sprintf(gfa_name, "%s.raw.integer.seq.log", nn);
    FILE* fp = fopen(gfa_name, "w"); free(gfa_name);
    if (!fp) return;
    ma_ug_t *ug = uidx->init_ug; all_ul_t *aln = uidx->idx;
    uint64_t id; uc_block_t *a = NULL; int64_t k, a_n;
    for (id = 0; id < aln->n; id++) {
        a = aln->a[id].bb.a; a_n = aln->a[id].bb.n; k = 0;
        if(a_n == 0) continue;
        fprintf(fp,"%.*s\tid::%lu\t", (int32_t)aln->nid.a[id].n, aln->nid.a[id].a, id);
        // for (k = 0; k < a_n && ug_occ_w(a[k].ts, a[k].te, &(ug->u.a[a[k].hid])) == 0; k++);
        for (; k < a_n; k++) {
            // if(ug_occ_w(a[k].ts, a[k].te, &(ug->u.a[a[k].hid])) == 0) break;
            fprintf(fp, "utg%.6d%c(%c)(n::%lu)\t", a[k].hid + 1, "lc"[ug->u.a[a[k].hid].circ], "+-"[a[k].rev], ug_occ_w(a[k].ts, a[k].te, &(ug->u.a[a[k].hid])));
        }
        fprintf(fp,"\n");
    }
    fclose(fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x2090
leaq 0x46(%rax), %rdi
callq 0x2280
movq %rax, %r15
leaq 0x3c5e8(%rip), %rsi     # 0x247cee
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0x3cfc8(%rip), %rsi     # 0x2486e2
movq %r15, %rdi
callq 0x2210
movq %rax, %rbx
movq %r15, %rdi
callq 0x2220
testq %rbx, %rbx
je 0x20b861
movq 0x30(%r14), %rsi
movq 0x50(%rsi), %rax
testq %rax, %rax
je 0x20b84b
movq 0x8(%r14), %r14
leaq 0x28fe9(%rip), %r13     # 0x23473b
xorl %r8d, %r8d
movq %rsi, 0x18(%rsp)
movq %rbx, 0x10(%rsp)
movq 0x48(%rsi), %rcx
imulq $0x58, %r8, %rdx
movq 0x20(%rcx,%rdx), %r12
testq %r12, %r12
je 0x20b83f
movq 0x30(%rcx,%rdx), %r15
movq 0x10(%rsi), %rax
movq %r8, %rcx
shlq $0x4, %rcx
movl 0x8(%rax,%rcx), %edx
movq (%rax,%rcx), %rcx
movq %rbx, %rdi
leaq 0x34460(%rip), %rsi     # 0x23fbf7
movq %r8, 0x20(%rsp)
xorl %eax, %eax
callq 0x22b0
testq %r12, %r12
jle 0x20b81f
addq $0x20, %r15
movl -0x20(%r15), %eax
movl -0x14(%r15), %edi
leal 0x1(%rax), %ecx
movl %ecx, 0xc(%rsp)
movq 0x10(%r14), %rcx
leaq (%rax,%rax,4), %rax
leaq (%rcx,%rax,8), %rdx
movl (%rdx), %eax
shrl $0x1f, %eax
movsbl (%rax,%r13), %ebp
movzbl (%r15), %eax
btl $0x5, %eax
leaq 0x26af3(%rip), %rax     # 0x2322d3
adcq $0x0, %rax
movq %r14, %rbx
movsbl (%rax), %r14d
movl -0x10(%r15), %esi
callq 0x1fe266
movq 0x10(%rsp), %rdi
leaq 0x3c505(%rip), %rsi     # 0x247d05
movl 0xc(%rsp), %edx
movl %ebp, %ecx
movl %r14d, %r8d
movq %rbx, %r14
movq %rax, %r9
xorl %eax, %eax
callq 0x22b0
addq $0x24, %r15
decq %r12
jne 0x20b7ac
movl $0xa, %edi
movq 0x10(%rsp), %rbx
movq %rbx, %rsi
callq 0x2270
movq 0x18(%rsp), %rsi
movq 0x50(%rsi), %rax
movq 0x20(%rsp), %r8
incq %r8
cmpq %rax, %r8
jb 0x20b75f
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2190
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: print_raw_uls_aln(ul_resolve_t*, char const*)
void print_raw_uls_aln(ul_resolve_t *uidx, const char *nn)
{
    char* gfa_name = NULL; MALLOC(gfa_name, strlen(nn)+70);
    sprintf(gfa_name, "%s.raw.aln.log", nn);
    FILE* fp = fopen(gfa_name, "w"); free(gfa_name);
    if (!fp) return;
    ma_ug_t *ug = uidx->init_ug; all_ul_t *aln = uidx->idx;
    uint64_t id; uc_block_t *a = NULL; int64_t k, a_n;
    for (id = 0; id < aln->n; id++) {
        a = aln->a[id].bb.a; a_n = aln->a[id].bb.n; k = 0;
        if(a_n == 0) continue;
        fprintf(fp,"%.*s\tid::%lu\tdd::%u\t", (int32_t)aln->nid.a[id].n, aln->nid.a[id].a, id, aln->a[id].dd);
        // for (k = 0; k < a_n && ug_occ_w(a[k].ts, a[k].te, &(ug->u.a[a[k].hid])) == 0; k++);
        for (; k < a_n; k++) {
            // if(ug_occ_w(a[k].ts, a[k].te, &(ug->u.a[a[k].hid])) == 0) break;
            fprintf(fp, "utg%.6d%c(%c)q::[%u, %u)\t", a[k].hid + 1, "lc"[ug->u.a[a[k].hid].circ], "+-"[a[k].rev], a[k].qs, a[k].qe);
        }
        fprintf(fp,"\n");
    }
    fclose(fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x2090
leaq 0x46(%rax), %rdi
callq 0x2280
movq %rax, %r15
leaq 0x3c47d(%rip), %rsi     # 0x247d1c
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0x3ce2f(%rip), %rsi     # 0x2486e2
movq %r15, %rdi
callq 0x2210
movq %rax, %rbx
movq %r15, %rdi
callq 0x2220
testq %rbx, %rbx
je 0x20b9e9
movq 0x30(%r14), %rsi
movq 0x50(%rsi), %rax
testq %rax, %rax
je 0x20b9d3
movq 0x8(%r14), %r10
leaq 0x28e50(%rip), %r15     # 0x23473b
leaq 0x269e1(%rip), %r12     # 0x2322d3
leaq 0x3c447(%rip), %rbp     # 0x247d40
xorl %r8d, %r8d
movq %rsi, 0x10(%rsp)
movq %r10, 0x20(%rsp)
movq 0x48(%rsi), %rcx
imulq $0x58, %r8, %rdx
movq 0x20(%rcx,%rdx), %r14
testq %r14, %r14
je 0x20b9c7
leaq (%rcx,%rdx), %rax
movq %rbx, %rdi
movq 0x30(%rcx,%rdx), %r13
movq 0x10(%rsi), %rcx
movq %r8, %rsi
shlq $0x4, %rsi
movl 0x8(%rcx,%rsi), %edx
movq (%rcx,%rsi), %rcx
movzbl 0x50(%rax), %r9d
leaq 0x3c3e4(%rip), %rsi     # 0x247d2b
movq %r8, 0x18(%rsp)
xorl %eax, %eax
callq 0x22b0
testq %r14, %r14
jle 0x20b9ac
movl (%r13), %eax
movl 0x4(%r13), %r9d
leal 0x1(%rax), %edx
movq 0x20(%rsp), %rcx
movq 0x10(%rcx), %rcx
leaq (%rax,%rax,4), %rax
movl (%rcx,%rax,8), %eax
shrl $0x1f, %eax
movsbl (%rax,%r15), %ecx
movzbl 0x20(%r13), %eax
btl $0x5, %eax
movq %r12, %rax
adcq $0x0, %rax
movsbl (%rax), %r8d
movl 0x8(%r13), %eax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x22b0
addq $0x24, %r13
decq %r14
jne 0x20b958
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2270
movq 0x10(%rsp), %rsi
movq 0x50(%rsi), %rax
movq 0x18(%rsp), %r8
incq %r8
cmpq %rax, %r8
jb 0x20b906
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2190
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq