// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: gen_unique_g_adv(ul_resolve_t*, usg_t*, unsigned long*, unsigned long, unsigned long*, unsigned int)
uint64_t gen_unique_g_adv(ul_resolve_t *uidx, usg_t *ng, uint64_t *int_idx, uint64_t int_idx_n, uint64_t *int_a, uint32_t max_ext)
{
    uint64_t pi, ei, *pz, bn, a_n, ua_n, *r_a, r_n; uint8_t *ff; CALLOC(ff, ng->n<<1);
    uint32_t i, k, n_vtx = ng->n<<1, s, e, zs, ze, v, b64_n; 
    uint32_t *ng_occ; CALLOC(ng_occ, n_vtx); 
    asg64_v b64, ub64; kv_init(b64); kv_init(ub64); 
    uint64_t *i_idx, n_clus; CALLOC(i_idx, ng->n<<1);
    
    for (k = 0; k < int_idx_n; k++) {///scan all integer contigs
        r_a = int_a + (int_idx[k]>>32); r_n = (uint32_t)int_idx[k];
        assert(r_n >= 2);
        for (i = 1; i + 1 < r_n; i++) {
            ng_occ[r_a[i]]++; ng_occ[r_a[i]^1]++;
        }
        ng_occ[r_a[0]]++; ng_occ[r_a[r_n-1]^1]++;
    }

    ma_ug_t *un_g = ma_ug_hybrid_gen(ng); ma_utg_t *u;
    // print_debug_gfa(uidx->sg, un_g, uidx->uopt->coverage_cut, "iig0", uidx->uopt->sources, 
    // uidx->uopt->ruIndex, uidx->uopt->max_hang, uidx->uopt->min_ovlp, 0, 0, 0);
    int32_t ui, un;
    for (k = 0; k < un_g->u.n; k++) {///all unitigs of raw utg 
        u = &(un_g->u.a[k]); 
        zs = ze = (uint32_t)-1; un = u->n;
        for (ui = 0; ui < un; ui++) {
            if(occ_m(ng_occ[(u->a[ui]>>32)^1]) == 1) {
                zs = ui; break;
            }
        }

        for (ui = ((int32_t)un)-1; ui >= 0; ui--) {
            if(occ_m(ng_occ[u->a[ui]>>32]) == 1) {
                ze = ui; break;
            }
        }
        if(zs != (uint32_t)-1 && ze != (uint32_t)-1 && zs > ze) continue;
        if(zs != (uint32_t)-1) ng_occ[(u->a[zs]>>32)^1] |= ((uint32_t)0x80000000);
        if(ze != (uint32_t)-1) ng_occ[(u->a[ze]>>32)] |= ((uint32_t)0x80000000);
    }
    ma_ug_destroy(un_g);
    
    // fprintf(stderr, ">>>>>>[M::%s::] int_idx[0]::%lu, int_idx[1]::%lu\n", __func__, int_idx[0], int_idx[1]);
    // prt_intg_info(int_idx, int_idx_n, int_a, "intg");
    for (i = b64.n = ua_n = a_n = 0; i < int_idx_n; i++) {///scan all integer contigs
        s = int_idx[i]>>32; e = s + ((uint32_t)int_idx[i]); 
        assert(e > s + 1);//the length is at least 2
        for (k = s, bn = b64.n, pi = (uint64_t)-1; k < e; k++) {
            v = int_a[k]; 
            if((!(ng_occ[v]&((uint32_t)0x80000000)))&&(!(ng_occ[v^1]&((uint32_t)0x80000000)))) {
                continue;///it must be a unique node
            }
            if((pi != (uint64_t)-1) && (ng_occ[v^1]&((uint32_t)0x80000000))) {
                // fprintf(stderr, "+++[M::%s::i->%u::s->%u::e->%u] pi::%lu, k::%u\n", __func__, i, s, e, pi, k);
                pz = (b64.n>0)? &(b64.a[b64.n-1]):(NULL);
                if((!pz) || (((*pz)>>32) != pi)) {//keep the shortest pi<->k 
                    kv_pushp(uint64_t, b64, &pz); 
                    *pz = pi; (*pz) <<= 32; (*pz) |= k;
                    a_n++;
                }
            }
            if(ng_occ[v]&((uint32_t)0x80000000)) pi = k;//keep the shortest pi<->k
        }

        b64_n = b64.n;
        for (k = bn, pi = s; k < b64_n; k++) {
            ei = b64.a[k]>>32;
            if(pi < ei) {
                kv_pushp(uint64_t, b64, &pz); ua_n++;
                (*pz) = pi; (*pz) <<= 32; (*pz) |= ei; (*pz) |= ((uint64_t)0x8000000000000000);
            }
            pi = (uint32_t)b64.a[k];
        }

        ei = e - 1;
        if(pi < ei) {
            kv_pushp(uint64_t, b64, &pz); ua_n++;
            (*pz) = pi; (*pz) <<= 32; (*pz) |= ei; (*pz) |= ((uint64_t)0x8000000000000000);
        }
    }
    assert(a_n + ua_n == b64.n);
    // prt_thread_info(b64.a, a_n+ua_n, NULL, 0, "tt_minus");
    // fprintf(stderr, "**0**[M::%s::] a_n::%lu, ua_n::%lu\n", __func__, a_n, ua_n);
    radix_sort_srt64(b64.a, b64.a + b64.n);///keeps the coordinates within int_a[]

    for (i = a_n; i < b64.n; i++) {///unavailable intervals; mask all unavailable nodes
        assert(b64.a[i]&((uint64_t)0x8000000000000000)); ua_n--;
        s = (b64.a[i]<<1)>>33; e = (uint32_t)b64.a[i]; assert(e > s);//[s, e]
        for (k = s + 1; k < e; k++) {///note: here is [s, e]
            i_idx[int_a[k]] |= ((uint64_t)0x8000000000000000);
            i_idx[int_a[k]^1] |= ((uint64_t)0x8000000000000000);
        }
        i_idx[int_a[s]] |= ((uint64_t)0x8000000000000000);
        i_idx[int_a[e]^1] |= ((uint64_t)0x8000000000000000);
    }
    // prt_thread_info(b64.a, a_n, NULL, 0, "tt1");
    ///unavailable intervals are useless
    b64.n = a_n; assert(ua_n == 0);
    for (i = 0; i < a_n; i++) { ///available intervals
        s = b64.a[i]>>32; e = (uint32_t)b64.a[i]; assert(e > s);///[s, e] -> coordinates within int_a[]
        assert(!(b64.a[i]&((uint64_t)0x8000000000000000)));

        for (k = s + 1; k < e; k++) {///note: here is [s, e]; s && e are unique, but [s+1, e-1] are not unique
            kv_pushp(uint64_t, b64, &pz); //i_idx[int_a[k]]++;
            (*pz) = int_a[k]; (*pz) <<= 32; (*pz) |= i;///(raw unitig/non-unqiue node id)|(integer contig id)

            kv_pushp(uint64_t, b64, &pz); //i_idx[int_a[k]^1]++;
            (*pz) = int_a[k]^1; (*pz) <<= 32; (*pz) |= i;
        }
        kv_pushp(uint64_t, b64, &pz); //i_idx[int_a[s]]++;
        (*pz) = int_a[s]; (*pz) <<= 32; (*pz) |= i;

        kv_pushp(uint64_t, b64, &pz); //i_idx[int_a[e]^1]++;
        (*pz) = int_a[e]^1; (*pz) <<= 32; (*pz) |= i;
    }
    // prt_thread_info(b64.a, a_n, NULL, 0, "tt2");
    // fprintf(stderr, "**1**[M::%s::] a_n::%lu, ua_n::%lu\n", __func__, a_n, ua_n);
    ///index
    radix_sort_srt64(b64.a + a_n, b64.a + b64.n);///(raw unitig node id)|(integer contig id)
    for (k = a_n + 1, i = a_n; k <= b64.n; k++) {
        if(k == b64.n || (b64.a[k]>>32) != (b64.a[i]>>32)) {
            i_idx[b64.a[i]>>32] |= (((uint64_t)i)<<32)|((uint64_t)k);///b64.a[i]>>32 appear once (unique ends)/multipe times
            i = k;
        }
    }
    // prt_thread_info(b64.a, a_n, NULL, 0, "tt3");
    // fprintf(stderr, "**2**[M::%s::] a_n::%lu, ua_n::%lu\n", __func__, a_n, ua_n);
    ///b64.a[0, a_n]:: all resolvable paths with unique beg && end
    ///b64.a[a_n, b64.n]:: (raw unitig/non-unqiue node id)|(resolvable path id)
    // n_clus = usg_unique_arcs_cluster(&b64, a_n, i_idx, int_a);///this function might be wrong
    n_clus = usg_unique_arcs_cluster_adv(&b64, a_n, i_idx, int_a, &ub64);
    // fprintf(stderr, "**3**[M::%s::] a_n::%lu, n_clus::%lu\n", __func__, a_n, n_clus);
    // prt_thread_info(b64.a, a_n, NULL, 0, "tt4");
    assert(b64.n == (a_n<<1));
    old_path_ext(uidx, ng, &b64, &ub64, a_n, n_clus, i_idx, int_a, ff, ng_occ, max_ext);
    // new_path_ext(uidx, ng, &b64, &ub64, a_n, n_clus, i_idx, int_a, ff, ng_occ, max_ext);//wrong

    free(ng_occ); free(i_idx); free(ff); kv_destroy(b64); kv_destroy(ub64); 
    return b64.n - a_n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %r9d, 0x6c(%rsp)
movq %r8, %r13
movq %rcx, %r15
movq %rdx, 0x88(%rsp)
movq %rdi, 0x90(%rsp)
movq %rsi, 0x78(%rsp)
movq 0x8(%rsi), %r12
addq %r12, %r12
movl $0x1, %esi
movq %r12, %rdi
callq 0x2120
movq %rax, 0x98(%rsp)
movl %r12d, %edi
movl $0x4, %esi
callq 0x2120
movq %rax, %r14
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
xorl %ebx, %ebx
movq %rbx, 0x40(%rsp)
movl $0x8, %esi
movq %r12, %rdi
movq %r15, %r12
callq 0x2120
xorps %xmm0, %xmm0
movaps %xmm0, 0xc0(%rsp)
movq %rbx, 0xd0(%rsp)
testq %r15, %r15
je 0x211a08
leaq 0x8(%r13), %r10
movq 0x88(%rsp), %rcx
movq (%rcx,%rbx,8), %rdx
movl %edx, %ecx
cmpq $0x2, %rcx
jb 0x2121c5
shrq $0x20, %rdx
cmpl $0x2, %ecx
je 0x2119e2
leaq -0x2(%rcx), %rsi
leaq (%r10,%rdx,8), %rdi
xorl %r8d, %r8d
movq (%rdi,%r8,8), %r9
incl (%r14,%r9,4)
xorq $0x1, %r9
incl (%r14,%r9,4)
incq %r8
cmpq %r8, %rsi
jne 0x2119ca
leaq (,%rdx,8), %rdx
addq %r13, %rdx
movq (%rdx), %rsi
incl (%r14,%rsi,4)
movq -0x8(%rdx,%rcx,8), %rcx
xorq $0x1, %rcx
incl (%r14,%rcx,4)
incl %ebx
cmpq %r12, %rbx
jb 0x21199e
movq %rax, 0x70(%rsp)
movq %r14, 0x50(%rsp)
movq 0x78(%rsp), %rdi
callq 0x20f140
movq (%rax), %rcx
testq %rcx, %rcx
je 0x211b0e
movq 0x10(%rax), %rdx
xorl %esi, %esi
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
movq 0x50(%rsp), %r15
leaq (%rsi,%rsi,4), %r8
leaq (%rdx,%r8,8), %r8
movl 0x10(%r8), %r9d
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
testl %r9d, %r9d
jle 0x211a7b
movq 0x18(%r8), %rbx
xorl %r11d, %r11d
movl 0x4(%rbx,%r11,8), %r14d
shlq $0x2, %r14
xorq $0x4, %r14
movl (%r15,%r14), %ebp
andl %edi, %ebp
cmpl $0x1, %ebp
je 0x211a78
incq %r11
cmpq %r11, %r9
jne 0x211a56
jmp 0x211a7b
movl %r11d, %r10d
leaq -0x1(%r9), %r11
testl %r9d, %r9d
jle 0x211aa8
movq 0x18(%r8), %rbx
movl %r11d, %r14d
movl 0x4(%rbx,%r14,8), %ebx
movq 0x50(%rsp), %r14
movl (%r14,%rbx,4), %ebx
andl %edi, %ebx
decl %r9d
decq %r11
cmpl $0x1, %ebx
jne 0x211a7f
jmp 0x211aae
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
cmpl $-0x1, %r10d
je 0x211ab9
cmpl %r9d, %r10d
ja 0x211aff
cmpl $-0x1, %r10d
je 0x211ae0
movq 0x18(%r8), %r11
movl %r10d, %r10d
movl 0x4(%r11,%r10,8), %r10d
shlq $0x2, %r10
xorq $0x4, %r10
movq 0x50(%rsp), %r11
orl $0x80000000, (%r11,%r10) # imm = 0x80000000
cmpl $-0x1, %r9d
je 0x211aff
movq 0x18(%r8), %r8
movl %r9d, %r9d
movl 0x4(%r8,%r9,8), %r8d
movq 0x50(%rsp), %r9
orl $0x80000000, (%r9,%r8,4) # imm = 0x80000000
incq %rsi
movl %esi, %r8d
cmpq %r8, %rcx
ja 0x211a38
movabsq $-0x8000000000000000, %rbp # imm = 0x8000000000000000
movq %rax, %rdi
callq 0xa0004
movq $0x0, 0x30(%rsp)
xorl %ecx, %ecx
testq %r12, %r12
movq %r13, 0x60(%rsp)
je 0x211dd9
movq $0x0, 0x58(%rsp)
xorl %r9d, %r9d
movq 0x50(%rsp), %r8
movq %r12, 0xa0(%rsp)
movq 0x88(%rsp), %rax
movq (%rax,%rcx,8), %rdx
movq %rdx, %r12
shrq $0x20, %r12
addl %r12d, %edx
leal 0x1(%r12), %eax
cmpl %eax, %edx
jbe 0x2121e4
movq %rcx, 0x80(%rsp)
movl 0x30(%rsp), %r15d
cmpl %r12d, %edx
movq %rdx, 0xb0(%rsp)
jbe 0x211c82
movl %edx, %r14d
movq $-0x1, %rbx
movq %r12, %rbp
movq %r9, 0xa8(%rsp)
movl (%r13,%rbp,8), %eax
movl (%r8,%rax,4), %r13d
testl %r13d, %r13d
js 0x211bc8
movq %rax, %rcx
xorq $0x1, %rcx
cmpl $0x0, (%r8,%rcx,4)
jns 0x211c71
cmpq $-0x1, %rbx
je 0x211c6a
xorq $0x1, %rax
cmpl $0x0, (%r8,%rax,4)
jns 0x211c6a
movq 0x30(%rsp), %rax
movq 0x40(%rsp), %rdi
testq %rax, %rax
sete %dl
leaq (%rdi,%rax,8), %rcx
addq $-0x8, %rcx
sete %sil
orb %dl, %sil
jne 0x211c0a
movl 0x4(%rcx), %ecx
cmpq %rbx, %rcx
je 0x211c6a
movq 0x38(%rsp), %rcx
cmpq %rcx, %rax
jne 0x211c44
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x38(%rsp)
shlq $0x3, %rsi
callq 0x2370
movq 0xa8(%rsp), %r9
movq 0x50(%rsp), %r8
movq %rax, 0x40(%rsp)
movq 0x30(%rsp), %rax
movq 0x40(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rbx, %rdx
shlq $0x20, %rdx
addq %rbp, %rdx
movq %rdx, (%rcx,%rax,8)
incq 0x58(%rsp)
testl %r13d, %r13d
cmovsq %rbp, %rbx
incq %rbp
cmpq %rbp, %r14
movq 0x60(%rsp), %r13
jne 0x211ba8
movq 0x30(%rsp), %rax
cmpl %eax, %r15d
jae 0x211d3f
movl %eax, %esi
movabsq $-0x8000000000000000, %rbp # imm = 0x8000000000000000
movq %rsi, 0xb8(%rsp)
movq 0x40(%rsp), %rdi
movq (%rdi,%r15,8), %r14
shrq $0x20, %r14
cmpq %r14, %r12
jae 0x211d28
movq 0x38(%rsp), %rax
cmpq %rax, 0x30(%rsp)
jne 0x211d04
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x38(%rsp)
shlq $0x3, %rsi
movq %rbp, %rbx
movq %r13, %rbp
movq %r9, %r13
callq 0x2370
movq 0xb8(%rsp), %rsi
movq %r13, %r9
movq %rbp, %r13
movq %rbx, %rbp
movq 0x50(%rsp), %r8
movq %rax, 0x40(%rsp)
movq 0x30(%rsp), %rax
movq 0x40(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x30(%rsp)
incq %r9
shlq $0x20, %r12
orq %r12, %r14
orq %rbp, %r14
movq %r14, (%rcx,%rax,8)
movq 0x40(%rsp), %rax
movl (%rax,%r15,8), %r12d
incq %r15
cmpq %r15, %rsi
jne 0x211ca4
jmp 0x211d49
movabsq $-0x8000000000000000, %rbp # imm = 0x8000000000000000
movq 0xb0(%rsp), %r14
decl %r14d
cmpl %r14d, %r12d
jae 0x211dbc
movq 0x38(%rsp), %rax
cmpq %rax, 0x30(%rsp)
jne 0x211d98
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rdi
shlq $0x3, %rsi
movq %r9, %rbx
callq 0x2370
movq %rbx, %r9
movq 0x50(%rsp), %r8
movq %rax, 0x40(%rsp)
movq 0x30(%rsp), %rax
movq 0x40(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x30(%rsp)
incq %r9
shlq $0x20, %r12
orq %r14, %r12
orq %rbp, %r12
movq %r12, (%rcx,%rax,8)
movq 0x80(%rsp), %rcx
incl %ecx
movq 0xa0(%rsp), %r12
cmpq %r12, %rcx
jb 0x211b52
jmp 0x211de5
xorl %r9d, %r9d
movq $0x0, 0x58(%rsp)
movq 0x58(%rsp), %r15
leaq (%r15,%r9), %rcx
movq 0x30(%rsp), %rax
cmpq %rax, %rcx
jne 0x21227f
movq %r9, %rbx
movq 0x40(%rsp), %rdi
leaq (%rdi,%rax,8), %rsi
callq 0x1e3b6a
movq 0x30(%rsp), %rax
movl %r15d, %esi
cmpq %rsi, %rax
jbe 0x211eb2
movq 0x40(%rsp), %rcx
movl %r15d, %edx
movq 0x70(%rsp), %r11
movq (%rcx,%rsi,8), %rsi
testq %rsi, %rsi
jns 0x212241
movq %rsi, %rdi
shrq $0x20, %rdi
movl %edi, %r8d
andl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
cmpl %esi, %r8d
jae 0x212260
incl %r8d
cmpl %esi, %r8d
jae 0x211e83
movl %edi, %r8d
andl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
incq %r8
movl %esi, %r9d
movq (%r13,%r8,8), %r10
orq %rbp, (%r11,%r10,8)
xorq $0x1, %r10
orq %rbp, (%r11,%r10,8)
incq %r8
cmpq %r8, %r9
jne 0x211e6a
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
movq (%r13,%rdi,8), %rdi
orq %rbp, (%r11,%rdi,8)
movl %esi, %esi
movq (%r13,%rsi,8), %rsi
xorq $0x1, %rsi
orq %rbp, (%r11,%rsi,8)
decq %rbx
incl %edx
movq %rdx, %rsi
cmpq %rdx, %rax
ja 0x211e2b
movq %r15, 0x30(%rsp)
testq %rbx, %rbx
jne 0x21229e
testq %r15, %r15
je 0x21209b
xorl %ebx, %ebx
movq 0x40(%rsp), %rax
movq (%rax,%rbx,8), %r14
movq %r14, %rbp
shrq $0x20, %rbp
movl %r14d, %r12d
subl %ebp, %r12d
jbe 0x212222
testq %r14, %r14
js 0x212203
leal 0x1(%rbp), %eax
cmpl %r14d, %eax
jae 0x211fcd
movq 0x60(%rsp), %rax
leaq (%rax,%rbp,8), %r13
movl $0x1, %r15d
movq 0x38(%rsp), %rax
cmpq %rax, 0x30(%rsp)
jne 0x211f3f
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rdi
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x40(%rsp)
movq 0x30(%rsp), %rax
movq 0x40(%rsp), %rdi
leaq 0x1(%rax), %rcx
movq %rcx, 0x30(%rsp)
movq (%r13,%r15,8), %rcx
shlq $0x20, %rcx
orq %rbx, %rcx
movq %rcx, (%rdi,%rax,8)
movq 0x38(%rsp), %rax
cmpq %rax, 0x30(%rsp)
jne 0x211f91
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x38(%rsp)
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x40(%rsp)
movq 0x30(%rsp), %rax
movq 0x40(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq (%r13,%r15,8), %rdx
shlq $0x20, %rdx
orq %rbx, %rdx
movabsq $0x100000000, %rsi      # imm = 0x100000000
xorq %rsi, %rdx
movq %rdx, (%rcx,%rax,8)
incq %r15
cmpl %r15d, %r12d
jne 0x211f0b
movq 0x38(%rsp), %rax
cmpq %rax, 0x30(%rsp)
jne 0x212001
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rdi
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x40(%rsp)
movq 0x30(%rsp), %rax
movq 0x40(%rsp), %rdi
leaq 0x1(%rax), %rcx
movq %rcx, 0x30(%rsp)
movq 0x60(%rsp), %r13
movq (%r13,%rbp,8), %rcx
shlq $0x20, %rcx
orq %rbx, %rcx
movq %rcx, (%rdi,%rax,8)
movq 0x38(%rsp), %rax
cmpq %rax, 0x30(%rsp)
movq 0x58(%rsp), %r15
jne 0x21205d
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x38(%rsp)
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x40(%rsp)
movq 0x30(%rsp), %rax
movq 0x40(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x30(%rsp)
movl %r14d, %edx
movq (%r13,%rdx,8), %rdx
shlq $0x20, %rdx
orq %rbx, %rdx
movabsq $0x100000000, %rsi      # imm = 0x100000000
xorq %rsi, %rdx
movq %rdx, (%rcx,%rax,8)
incl %ebx
cmpq %rbx, %r15
ja 0x211ecb
movq 0x30(%rsp), %rax
movq 0x40(%rsp), %rcx
leaq (%rcx,%r15,8), %rdi
leaq (%rcx,%rax,8), %rsi
callq 0x1e3b6a
movq 0x30(%rsp), %rax
leal 0x1(%r15), %ecx
cmpq %rcx, %rax
movq 0x70(%rsp), %rbp
jb 0x212109
movq 0x40(%rsp), %r10
leal 0x2(%r15), %esi
movl %r15d, %edi
movl %edi, %r8d
cmpq %rcx, %rax
je 0x2120e7
movq (%r10,%r8,8), %r9
xorq (%r10,%rcx,8), %r9
shrq $0x20, %r9
je 0x212100
leal -0x1(%rsi), %edi
movl 0x4(%r10,%r8,8), %r9d
shlq $0x20, %r8
orq (%rbp,%r9,8), %r8
orq %rcx, %r8
movq %r8, (%rbp,%r9,8)
movl %esi, %ecx
incl %esi
cmpq %rcx, %rax
jae 0x2120d1
leaq 0x30(%rsp), %rbx
leaq 0xc0(%rsp), %r8
movq %rbx, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x20dac8
leaq (%r15,%r15), %rax
cmpq %rax, (%rbx)
jne 0x2122bd
movq %r15, %r14
movl 0x6c(%rsp), %eax
movl %eax, 0x20(%rsp)
movq 0x50(%rsp), %r12
movq %r12, 0x18(%rsp)
movq 0x98(%rsp), %r15
movq %r15, 0x10(%rsp)
movq %r13, 0x8(%rsp)
leaq 0x30(%rsp), %rbx
leaq 0xc0(%rsp), %r13
movq 0x90(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq %rbx, %rdx
movq %r13, %rcx
movq %r14, %r8
callq 0x210b27
movq %r12, %rdi
callq 0x2220
movq %rbp, %rdi
callq 0x2220
movq %r15, %rdi
callq 0x2220
movq 0x10(%rbx), %rdi
callq 0x2220
movq 0x10(%r13), %rdi
callq 0x2220
movq (%rbx), %rax
subq %r14, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2aae6(%rip), %rdi     # 0x23ccb2
leaq 0x27152(%rip), %rsi     # 0x239325
leaq 0x2ac4c(%rip), %rcx     # 0x23ce26
movl $0x34d2, %edx           # imm = 0x34D2
callq 0x2110
leaq 0x2a73d(%rip), %rdi     # 0x23c928
leaq 0x27133(%rip), %rsi     # 0x239325
leaq 0x2ac2d(%rip), %rcx     # 0x23ce26
movl $0x34f5, %edx           # imm = 0x34F5
callq 0x2110
leaq 0x2abb9(%rip), %rdi     # 0x23cdc3
leaq 0x27114(%rip), %rsi     # 0x239325
leaq 0x2ac0e(%rip), %rcx     # 0x23ce26
movl $0x352b, %edx           # imm = 0x352B
callq 0x2110
leaq 0x2a302(%rip), %rdi     # 0x23c52b
leaq 0x270f5(%rip), %rsi     # 0x239325
leaq 0x2abef(%rip), %rcx     # 0x23ce26
movl $0x352a, %edx           # imm = 0x352A
callq 0x2110
leaq 0x2aaea(%rip), %rdi     # 0x23cd32
leaq 0x270d6(%rip), %rsi     # 0x239325
leaq 0x2abd0(%rip), %rcx     # 0x23ce26
movl $0x351d, %edx           # imm = 0x351D
callq 0x2110
leaq 0x2a2c4(%rip), %rdi     # 0x23c52b
leaq 0x270b7(%rip), %rsi     # 0x239325
leaq 0x2abb1(%rip), %rcx     # 0x23ce26
movl $0x351e, %edx           # imm = 0x351E
callq 0x2110
leaq 0x2aa98(%rip), %rdi     # 0x23cd1e
leaq 0x27098(%rip), %rsi     # 0x239325
leaq 0x2ab92(%rip), %rcx     # 0x23ce26
movl $0x3517, %edx           # imm = 0x3517
callq 0x2110
leaq 0x2aab5(%rip), %rdi     # 0x23cd5a
leaq 0x27079(%rip), %rsi     # 0x239325
leaq 0x2ab73(%rip), %rcx     # 0x23ce26
movl $0x3528, %edx           # imm = 0x3528
callq 0x2110
leaq 0x2ab50(%rip), %rdi     # 0x23ce14
leaq 0x2705a(%rip), %rsi     # 0x239325
leaq 0x2ab54(%rip), %rcx     # 0x23ce26
movl $0x354c, %edx           # imm = 0x354C
callq 0x2110