// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: integer_realign_g(ul_resolve_t*, usg_t*, uinfo_srt_warp_t*, unsigned int, integer_t*)
void integer_realign_g(ul_resolve_t *uidx, usg_t *ng, uinfo_srt_warp_t *seq, uint32_t seq_id, integer_t *buf)
{
    if(seq->n < 2) return;
    // if(seq_id != 1137) return;
    uint64_t *srt, *track, k, z, m, t, i, l, seq_n, j, sc, csc, mm_sc, mm_idx, n_v, n_u, n_v0, *p, lin, pn;
    uint32_t vi, vj; mmap_t *zm, *zt; 
    ///ng->map: the nodes in the new graph that are mapped to the initial HiFi graph 
    for (i = seq_n = 0; i < seq->n; ++i) seq_n += ng->mp.a[seq->a[i].v>>1].n;
    // fprintf(stderr, "[M::%s::] seq_id::%u, seq_n::%u, seq->n::%u\n", 
    // __func__, seq_id, (uint32_t)seq_n, (uint32_t)seq->n);

    buf->o.n = buf->u.n = 0; 
    kv_resize(uint64_t, buf->o, (seq_n<<1)); 
    srt = buf->o.a; track = buf->o.a + seq_n;

    for (z = l = 0; z < seq->n; ++z) {
        csc = seq->a[z].n; 
        zm = &(ng->mp.a[seq->a[z].v>>1]);///current 
        zt = ((z>0)?(&(ng->mp.a[seq->a[z-1].v>>1])):(NULL));///prefix
        for (m = 0; m < zm->n; m++) {
            i = l + m; mm_sc = csc; mm_idx = ((uint64_t)0x7FFFFFFF); 
            vi = (zm->a[m]<<1)|(seq->a[z].v&1);
            if(zt && zt->n > 0) {
                for (t = 0; t < zt->n; t++) {
                    j = l + t - zt->n;
                    vj = (zt->a[t]<<1)|(seq->a[z-1].v&1);
                    if(check_hybrid_connect(ng, seq_id, vj, z-1, vi, z)) {///seq_id:: integer contig id
                        sc = csc + (((uint32_t)-1) - (track[j]>>32));
                        if(sc > mm_sc) {
                            mm_sc = sc; mm_idx = j;
                        }
                    }
                }
            }
            mm_sc = ((uint32_t)-1) - mm_sc;
            track[i] = mm_sc; track[i] <<= 32; track[i] |= mm_idx;
            srt[i] = track[i]>>32; srt[i] <<= 32; srt[i] |= i;
        }
        l += zm->n;
    }
    assert(l == seq_n);

    radix_sort_srt64(srt, srt + seq_n); 
    kv_resize(uint64_t, buf->res_dump, buf->res_dump.n + seq_n); 
    l = buf->res_dump.n; m = buf->u.n;
    for (k = n_v = n_u = 0; k < seq_n; k++) {
        n_v0 = n_v; i = (uint32_t)srt[k];
        for (; i != ((uint64_t)0x7FFFFFFF) && (!(track[i]&((uint64_t)0x80000000)));) {
            kv_push(uint64_t, buf->res_dump, i); n_v++; 
            track[i] |= ((uint64_t)0x80000000);
            i = track[i]&((uint64_t)0x7FFFFFFF); 
        }
        if(n_v - n_v0 <= 1) {///not useful to resolve anything if the UL covers less than 1 nodes 
            buf->res_dump.n -= (n_v-n_v0); n_v = n_v0;
            continue;
        }
        kv_pushp(uint64_t, buf->u, &p); n_u++; 
        (*p) = n_v-n_v0; (*p) = ((uint32_t)-1) - (*p); (*p) <<= 32; (*p) |= ((uint64_t)(l+n_v0));
    }

    for (z = i = 0; z < seq->n; ++z) {
        zm = &(ng->mp.a[seq->a[z].v>>1]);
        for (k = 0; k < zm->n; k++, i++) {
            srt[i] = z; srt[i] <<= 32; srt[i] |= ((zm->a[k]<<1)|(seq->a[z].v&1));
        }
    }
    assert(i == seq_n);
    ///srt[]: (idx in seq)|(node id)
    uint64_t *r, nt;
    for (k = n_u = nt = 0; k < buf->u.n; k++) {
        n_v0 = (uint32_t)buf->u.a[k]; r = buf->res_dump.a + n_v0; 
        n_v = (((uint32_t)-1) - (buf->u.a[k]>>32));
        // if(n_v < 2) continue;
        // fprintf(stderr, "+[M::%s::k->%lu] buf->u.n::%u, n_v0::%lu, n_v::%lu, nt::%lu\n", 
        // __func__, k, (uint32_t)buf->u.n, n_v0, n_v, nt);
        assert(n_v >= 2);
        buf->u.a[n_u] = nt<<32;
        for (i = 0; i < n_v; i++, nt++) {
            // fprintf(stderr, ">[M::%s::] i::%lu, nt::%lu, n_v-i-1::%lu, r[n_v-i-1]::%lu\n", 
            //         __func__, i, nt, n_v-i-1, r[n_v-i-1]);
            track[nt] = srt[r[n_v-i-1]];
        }
        buf->u.a[n_u] |= nt; n_u++;
        // fprintf(stderr, "-[M::%s::k->%lu] buf->u.n::%u, n_v0::%lu, n_v::%lu, nt::%lu\n", 
        // __func__, k, (uint32_t)buf->u.n, n_v0, n_v, nt);
    }
    buf->u.n = n_u;

    uint64_t ceq_s, ceq_e, peq_s, peq_e, min_e, max_s;
    for (k = n_u = 0; k < buf->u.n; k++) {
        n_v0 = buf->u.a[k]>>32; n_v = (uint32_t)buf->u.a[k];///[n_v0, n_v)
        ceq_s = track[n_v0]>>32; ceq_e = (track[n_v-1]>>32) + 1;
        assert((ceq_e-ceq_s) == (n_v-n_v0));
        for (z = 0; z < n_u; z++) {
            n_v0 = buf->u.a[z]>>32; n_v = (uint32_t)buf->u.a[z];
            peq_s = track[n_v0]>>32; peq_e = (track[n_v-1]>>32) + 1;
            assert((peq_e-peq_s) == (n_v-n_v0));
            max_s = MAX(peq_s, ceq_s); min_e = MIN(peq_e, ceq_e);
            if(min_e > max_s) break;
        }
        if(z < n_u) continue;
        buf->u.a[n_u++] = buf->u.a[k];
    }
    buf->u.n = n_u; buf->res_dump.n = l;
    for (k = n_u = 0; k < buf->u.n; k++) {
        // t = (uint32_t)-1; t <<= 32; 
        t = seq_id; t <<= 32; t |= ((uint64_t)0x8000000000000000);
        t |= (((uint32_t)buf->u.a[k])-(buf->u.a[k]>>32)); 
        pn = buf->res_dump.n; kv_push(uint64_t, buf->res_dump, t);
        n_v0 = buf->u.a[k]>>32; n_v = (uint32_t)buf->u.a[k];
        for (z = n_v0, lin = 1; z < n_v; z++) {
            if(lin && (z > n_v0)) {
                if((usg_arc_occ(ng, ((uint32_t)track[z])^1) > 1) || 
                            (usg_arc_occ(ng, ((uint32_t)track[z-1])) > 1)) {
                    lin = 0;
                }
            }
            kv_push(uint64_t, buf->res_dump, (uint32_t)track[z]);
        }

        if(lin == 1) buf->res_dump.n = pn;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rcx, 0x48(%rsp)
movq %rsi, 0x20(%rsp)
movq (%rdx), %rax
cmpq $0x2, %rax
jb 0x2183f6
movq %r8, %r15
movq %rdx, %rbx
movq 0x20(%rsp), %rcx
movq 0x28(%rcx), %rcx
movq 0x10(%rdx), %rdx
xorl %r14d, %r14d
movq %rax, %rsi
movl (%rdx), %edi
shrl %edi
leaq (%rdi,%rdi,2), %rdi
addq 0x8(%rcx,%rdi,8), %r14
addq $0x10, %rdx
decq %rsi
jne 0x217b59
xorl %ecx, %ecx
movq %rcx, 0x90(%r15)
movq %rcx, 0x78(%r15)
leaq (%r14,%r14), %rcx
cmpq %rcx, 0x80(%r15)
movq %r15, 0x30(%rsp)
movq %rbx, 0x58(%rsp)
movq %r14, 0x38(%rsp)
jae 0x217c0f
decq %rcx
movq %rcx, %rax
shrq %rax
orq %rcx, %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, 0x80(%r15)
movq 0x88(%r15), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x2370
movq %rax, %rdi
movq %rax, 0x88(%r15)
movq (%rbx), %rax
leaq (%rdi,%r14,8), %rsi
testq %rax, %rax
jne 0x217c1a
movq $0x0, 0x10(%rsp)
jmp 0x217e66
movq 0x88(%r15), %rdi
leaq (%rdi,%r14,8), %rsi
movq 0x10(%rbx), %r8
movq 0x20(%rsp), %rcx
movq 0x28(%rcx), %r9
xorl %r10d, %r10d
movq $0x0, 0x10(%rsp)
movq %rsi, (%rsp)
movq %rdi, 0x28(%rsp)
movq %r8, 0x70(%rsp)
movq %r9, 0x68(%rsp)
movq %r10, %rcx
shlq $0x4, %rcx
testq %r10, %r10
je 0x217c65
leaq (%r8,%rcx), %rdx
movl -0x10(%rdx), %edx
shrl %edx
leaq (%rdx,%rdx,2), %rdx
leaq (%r9,%rdx,8), %r11
jmp 0x217c68
xorl %r11d, %r11d
movl (%r8,%rcx), %ebx
movl %ebx, %edx
shrl %edx
leaq (%rdx,%rdx,2), %rdx
leaq (%r9,%rdx,8), %rdx
cmpq $0x0, 0x8(%rdx)
je 0x217e53
movl 0xc(%r8,%rcx), %eax
movq %rax, 0x18(%rsp)
movq (%rdx), %rax
movq %rax, 0x90(%rsp)
andl $0x1, %ebx
movq %rbx, 0x98(%rsp)
movq %r10, 0x78(%rsp)
leaq -0x1(%r10), %rax
movq %rax, 0x50(%rsp)
shlq $0x4, %rax
addq %r8, %rax
movq %rax, 0x88(%rsp)
movq 0x10(%rsp), %rax
leaq (%rsi,%rax,8), %rax
movq %rax, 0x80(%rsp)
movq $0x0, 0x40(%rsp)
movq %r11, 0x60(%rsp)
movq %rdx, 0xa0(%rsp)
movl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
testq %r11, %r11
je 0x217dce
movq 0x8(%r11), %r15
movq 0x18(%rsp), %rbp
testq %r15, %r15
je 0x217dd3
movq 0x90(%rsp), %rax
movq 0x40(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x98(%rsp), %rcx
leal (%rcx,%rax,2), %eax
movl %eax, 0x8(%rsp)
movq 0x60(%rsp), %rax
movq (%rax), %r12
movq 0x88(%rsp), %rax
movl (%rax), %r13d
andl $0x1, %r13d
movq 0x10(%rsp), %rax
subq %r15, %rax
movq %rax, 0xb0(%rsp)
leaq (,%r15,8), %rax
movq 0x80(%rsp), %rcx
subq %rax, %rcx
movq %rcx, 0xa8(%rsp)
xorl %ebx, %ebx
movq 0x18(%rsp), %rbp
movl (%r12,%rbx,4), %eax
leal (%r13,%rax,2), %edx
movq 0x20(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rcx
movl 0x8(%rsp), %r8d
callq 0x217a27
testl %eax, %eax
je 0x217dc4
movq 0xb0(%rsp), %rax
addq %rbx, %rax
movq 0xa8(%rsp), %rcx
movq (%rcx,%rbx,8), %rcx
notq %rcx
shrq $0x20, %rcx
addq 0x18(%rsp), %rcx
cmpq %rbp, %rcx
cmovaq %rax, %r14
cmovaq %rcx, %rbp
incq %rbx
cmpq %rbx, %r15
jne 0x217d70
jmp 0x217dd3
movq 0x18(%rsp), %rbp
movq 0x10(%rsp), %rax
movq 0x40(%rsp), %r8
addq %r8, %rax
shlq $0x20, %rbp
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
movq %rdx, %rcx
subq %rbp, %rcx
orq %r14, %rcx
movq (%rsp), %rsi
movq %rcx, (%rsi,%rax,8)
andq %rdx, %rcx
orq %rax, %rcx
movq 0x28(%rsp), %rdi
movq %rcx, (%rdi,%rax,8)
incq %r8
movq 0xa0(%rsp), %rax
movq 0x8(%rax), %rcx
movq %r8, 0x40(%rsp)
cmpq %rcx, %r8
movq 0x60(%rsp), %r11
jb 0x217ce7
movq 0x58(%rsp), %rax
movq (%rax), %rax
movq 0x30(%rsp), %r15
movq 0x38(%rsp), %r14
movq 0x70(%rsp), %r8
movq 0x68(%rsp), %r9
movq 0x78(%rsp), %r10
jmp 0x217e55
xorl %ecx, %ecx
addq %rcx, 0x10(%rsp)
incq %r10
cmpq %rax, %r10
jb 0x217c46
cmpq %r14, 0x10(%rsp)
jne 0x218465
movq %rdi, 0x28(%rsp)
movq %rsi, (%rsp)
callq 0x1ee586
movq 0x300(%r15), %rax
movq %rax, 0x8(%rsp)
addq %r14, %rax
cmpq %rax, 0x308(%r15)
jae 0x217efd
decq %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x10, %rcx
orq %rax, %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0x308(%r15)
movq 0x310(%r15), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x2370
movq %rax, 0x310(%r15)
movq 0x300(%r15), %rax
movq %rax, 0x8(%rsp)
testq %r14, %r14
movq (%rsp), %r10
je 0x218050
xorl %r13d, %r13d
movl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
xorl %r12d, %r12d
movq 0x28(%rsp), %rax
movl (%rax,%r13,8), %r14d
movq %r12, %rbx
cmpq $0x7fffffff, %r14       # imm = 0x7FFFFFFF
je 0x217fb6
movq %r12, %rbx
testb $-0x80, 0x3(%r10,%r14,8)
jne 0x217fb6
movq 0x300(%r15), %rcx
movq 0x310(%r15), %rax
cmpq 0x308(%r15), %rcx
jne 0x217f85
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x308(%r15)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq (%rsp), %r10
movq %rax, 0x310(%r15)
movq 0x300(%r15), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x300(%r15)
movq %r14, (%rax,%rcx,8)
incq %rbx
movq (%r10,%r14,8), %rax
movq %rax, %rcx
btsq $0x1f, %rcx
movq %rcx, (%r10,%r14,8)
andq %rbp, %rax
movq %rax, %r14
cmpq %rbp, %rax
jne 0x217f31
movq %rbx, %r14
subq %r12, %r14
cmpq $0x1, %r14
ja 0x217fcb
subq %r14, 0x300(%r15)
jmp 0x218042
movq 0x90(%r15), %rcx
movq 0xa0(%r15), %rax
cmpq 0x98(%r15), %rcx
jne 0x218017
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x98(%r15)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq (%rsp), %r10
movq %rax, 0xa0(%r15)
movq 0x90(%r15), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x90(%r15)
shlq $0x20, %r14
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
subq %r14, %rdx
addq 0x8(%rsp), %r12
orq %rdx, %r12
movq %r12, (%rax,%rcx,8)
movq %rbx, %r12
incq %r13
cmpq 0x38(%rsp), %r13
jne 0x217f15
movq 0x58(%rsp), %r12
movq (%r12), %rdi
testq %rdi, %rdi
je 0x2180e3
movq 0x20(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x10(%r12), %rdx
xorl %esi, %esi
xorl %ecx, %ecx
movq 0x28(%rsp), %r13
movq %rsi, %r8
shlq $0x4, %r8
movl (%rdx,%r8), %r8d
movl %r8d, %r9d
shrl %r9d
leaq (%r9,%r9,2), %r9
cmpq $0x0, 0x8(%rax,%r9,8)
je 0x2180d9
leaq (%rax,%r9,8), %rdi
movq %rsi, %r9
shlq $0x20, %r9
movq (%rdi), %r10
andl $0x1, %r8d
leaq (,%rcx,8), %rbx
addq %r13, %rbx
xorl %r11d, %r11d
movl (%r10,%r11,4), %r14d
leal (%r8,%r14,2), %r14d
orq %r9, %r14
movq %r14, (%rbx,%r11,8)
incq %r11
cmpq 0x8(%rdi), %r11
jb 0x2180b6
movq (%r12), %rdi
addq %r11, %rcx
movq (%rsp), %r10
incq %rsi
cmpq %rdi, %rsi
jb 0x218079
jmp 0x2180ea
xorl %ecx, %ecx
movq 0x28(%rsp), %r13
cmpq 0x38(%rsp), %rcx
jne 0x218484
cmpq $0x0, 0x90(%r15)
je 0x2183ea
movq 0xa0(%r15), %rcx
movq 0x310(%r15), %rdx
addq $-0x8, %rdx
xorl %eax, %eax
xorl %esi, %esi
movq (%rcx,%rax,8), %r8
movq %r8, %rdi
shrq $0x21, %rdi
cmpl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
jae 0x218427
movq %r8, %rdi
notq %rdi
shrq $0x20, %rdi
movl %r8d, %r8d
movq %rsi, %r9
shlq $0x20, %r9
movq %r9, (%rcx,%rax,8)
leaq (%rdx,%r8,8), %r8
movq (%r8,%rdi,8), %r9
movq (%r13,%r9,8), %r9
movq %r9, (%r10,%rsi,8)
incq %rsi
decq %rdi
jne 0x21814c
orq %rsi, (%rcx,%rax,8)
incq %rax
cmpq 0x90(%r15), %rax
jb 0x218119
movq %rax, 0x90(%r15)
movq 0xa0(%r15), %rcx
xorl %edx, %edx
xorl %esi, %esi
movq (%rcx,%rdx,8), %rdi
movq %rdi, %r10
shrq $0x20, %r10
movl %edi, %r11d
movq (%rsp), %r9
movq (%r9,%r10,8), %r8
shrq $0x20, %r8
movl -0x4(%r9,%r11,8), %r9d
incq %r9
movq %r9, %rbx
subq %r8, %rbx
subq %r10, %r11
cmpq %r11, %rbx
jne 0x218446
testq %rsi, %rsi
je 0x21820e
xorl %r10d, %r10d
movq (%rcx,%r10,8), %r11
movl %r11d, %r14d
movq %r11, %r15
shrq $0x20, %r15
movq (%rsp), %rbx
movq (%rbx,%r15,8), %r11
shrq $0x20, %r11
movl -0x4(%rbx,%r14,8), %ebx
incq %rbx
movq %rbx, %r12
subq %r11, %r12
subq %r15, %r14
cmpq %r14, %r12
jne 0x218408
cmpq %r8, %r11
cmovbeq %r8, %r11
cmpq %r9, %rbx
cmovaeq %r9, %rbx
cmpq %r11, %rbx
ja 0x218223
incq %r10
cmpq %r10, %rsi
jne 0x2181bf
movq %rdi, (%rcx,%rsi,8)
incq %rsi
movq 0x30(%rsp), %r14
movq 0x90(%r14), %rax
jmp 0x218228
movq 0x30(%rsp), %r14
incq %rdx
cmpq %rax, %rdx
jb 0x218183
movq %rsi, 0x90(%r14)
movq 0x8(%rsp), %rax
movq %rax, 0x300(%r14)
testq %rsi, %rsi
movq (%rsp), %rdi
je 0x2183f6
shlq $0x20, 0x48(%rsp)
movq 0x310(%r14), %r13
xorl %ebp, %ebp
movq 0xa0(%r14), %rax
movq (%rax,%rbp,8), %rbx
movq 0x300(%r14), %r12
cmpq 0x308(%r14), %r12
jne 0x2182bf
leaq (%r12,%r12), %rsi
testq %r12, %r12
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x308(%r14)
shlq $0x3, %rsi
movq %r13, %rdi
callq 0x2370
movq (%rsp), %rdi
movq %rax, %r13
movq %rax, 0x310(%r14)
movq 0x300(%r14), %rcx
movq 0xa0(%r14), %rax
jmp 0x2182c2
movq %r12, %rcx
movl %ebx, %edx
shrq $0x20, %rbx
subq %rbx, %rdx
orq 0x48(%rsp), %rdx
btsq $0x3f, %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x300(%r14)
movq %rdx, (%r13,%rcx,8)
movq (%rax,%rbp,8), %rax
movl %eax, %ecx
shrq $0x20, %rax
cmpq %rcx, %rax
jae 0x2183d1
movq %rcx, %r15
movq %rbp, 0x18(%rsp)
movq %r12, 0x50(%rsp)
movq %rax, %rbp
movl $0x1, %ebx
movq %rax, 0x8(%rsp)
testq %rbx, %rbx
je 0x218356
movl $0x1, %ebx
movb $0x1, %r12b
cmpq 0x8(%rsp), %rbp
jbe 0x21835b
movl (%rdi,%rbp,8), %esi
xorl $0x1, %esi
movq 0x20(%rsp), %rdi
callq 0x217ad8
movq (%rsp), %rdi
cmpl $0x1, %eax
ja 0x218356
movl -0x8(%rdi,%rbp,8), %esi
movq 0x20(%rsp), %rdi
callq 0x217ad8
movq (%rsp), %rdi
cmpl $0x2, %eax
jb 0x21835b
xorl %r12d, %r12d
xorl %ebx, %ebx
movq 0x300(%r14), %rax
cmpq 0x308(%r14), %rax
jne 0x2183a3
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x308(%r14)
shlq $0x3, %rsi
movq %r13, %rdi
callq 0x2370
movq (%rsp), %rdi
movq %rax, %r13
movq %rax, 0x310(%r14)
movq 0x300(%r14), %rax
movl (%rdi,%rbp,8), %ecx
leaq 0x1(%rax), %rdx
movq %rdx, 0x300(%r14)
movq %rcx, (%r13,%rax,8)
incq %rbp
cmpq %rbp, %r15
jne 0x218312
testb %r12b, %r12b
movq 0x50(%rsp), %r12
movq 0x18(%rsp), %rbp
je 0x2183d8
movq %r12, 0x300(%r14)
incq %rbp
cmpq 0x90(%r14), %rbp
jb 0x218263
jmp 0x2183f6
movq 0x8(%rsp), %rax
movq %rax, 0x300(%r15)
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x303e4(%rip), %rdi     # 0x2487f3
leaq 0x2d1f3(%rip), %rsi     # 0x245609
leaq 0x3034b(%rip), %rcx     # 0x248768
movl $0x2eee, %edx           # imm = 0x2EEE
callq 0x2110
leaq 0x303a0(%rip), %rdi     # 0x2487ce
leaq 0x2d1d4(%rip), %rsi     # 0x245609
leaq 0x3032c(%rip), %rcx     # 0x248768
movl $0x2ed9, %edx           # imm = 0x2ED9
callq 0x2110
leaq 0x3038a(%rip), %rdi     # 0x2487d7
leaq 0x2d1b5(%rip), %rsi     # 0x245609
leaq 0x3030d(%rip), %rcx     # 0x248768
movl $0x2eea, %edx           # imm = 0x2EEA
callq 0x2110
leaq 0x302f1(%rip), %rdi     # 0x24875d
leaq 0x2d196(%rip), %rsi     # 0x245609
leaq 0x302ee(%rip), %rcx     # 0x248768
movl $0x2eb6, %edx           # imm = 0x2EB6
callq 0x2110
leaq 0x30338(%rip), %rdi     # 0x2487c3
leaq 0x2d177(%rip), %rsi     # 0x245609
leaq 0x302cf(%rip), %rcx     # 0x248768
movl $0x2ed0, %edx           # imm = 0x2ED0
callq 0x2110