// File: chhylp123[P]hifiasm/hic.cpp
// Function: resolve_bubble_chain_tangle_back(ma_ug_t*, bubble_type*, hc_links*)
void resolve_bubble_chain_tangle_back(ma_ug_t* ug, bubble_type* bub, hc_links* link)
{
    ma_ug_t *copy_ug = copy_untig_graph(bub->b_ug);
    asg_arc_t *av = NULL;
    uint32_t i, j, k, v, w, w1, w2, nw1, nw2, nv, occ_e_1, occ_e_2, occ_c;
    ma_ug_t *bub_ug = copy_ug;
    ///ma_utg_t *u = NULL;
    buf_t b; memset(&b, 0, sizeof(buf_t));
    kvec_t_u32_warp stack, result;
    kv_init(stack.a); kv_init(result.a);
    uint8_t *vis = NULL; CALLOC(vis, ug->g->n_seq<<1);
    uint8_t *is_vis = NULL; CALLOC(is_vis, ug->g->n_seq<<1);
    kvec_t(uint64_t) occ_idx; kv_init(occ_idx); uint64_t tmp, *p = NULL;

    for (k = occ_idx.n = 0; k < bub_ug->g->n_seq; k++)
    {
        v = (k<<1);
        av = asg_arc_a(bub_ug->g, v);
        nv = asg_arc_n(bub_ug->g, v);
        for (i = 0, w = (uint32_t)-1, nw1 = 0; i < nv; i++)
        {
            if(av[i].del) continue;
            nw1++;
            if((av[i].v>>1) == (v>>1)) continue;
            if(w != (uint32_t)-1) break;
            w = av[i].v;
        }
        if(i < nv) continue;
        w1 = w;


        v = (k<<1)+1;
        av = asg_arc_a(bub_ug->g, v);
        nv = asg_arc_n(bub_ug->g, v);
        for (i = 0, w = (uint32_t)-1, nw2 = 0; i < nv; i++)
        {
            if(av[i].del) continue;
            nw2++;
            if((av[i].v>>1) == (v>>1)) continue;
            if(w != (uint32_t)-1) break;
            w = av[i].v;
        }
        if(i < nv) continue;
        w2 = w;

        if(nw1 <= 1 && nw2 <= 1) continue;
        if(w1 == (uint32_t)-1 && w2 == (uint32_t)-1) continue;
        if(w1 != (uint32_t)-1) w1 ^=1;
        if(w2 != (uint32_t)-1) w2 ^=1;

        if(w1 != (uint32_t)-1)
        {   
            w = (uint32_t)-1;
            if(w2 != (uint32_t)-1) w = w2^1;

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


        if(w2 != (uint32_t)-1)
        {   
            w = (uint32_t)-1;
            if(w1 != (uint32_t)-1) w = w1^1;

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

        
        if(w1 == (uint32_t)-1 && w2 != (uint32_t)-1) w1 = w2;
        if(w1 == w2) w2 = (uint32_t)-1;

        occ_c = occ_e_1 = occ_e_2 = (uint32_t)-1;
        set_b_utg_weight_flag(bub, &b, k<<1, NULL, 0, &occ_c);
        if(w1 != (uint32_t)-1) set_b_utg_weight_flag(bub, &b, w1^1, NULL, 0, &occ_e_1);
        if(w2 != (uint32_t)-1) set_b_utg_weight_flag(bub, &b, w2^1, NULL, 0, &occ_e_2);

        fprintf(stderr, "\n>>>>>>k=btg%.6ul (n=%u), w1=btg%.6ul (n=%u), w2=utg%.6ul (n=%u)\n", k+1, occ_c, 
                (w1>>1)+1, occ_e_1, (w2>>1)+1, occ_e_2);

        if(occ_c*5 >= occ_e_1) continue;
        if(occ_c*5 >= occ_e_2) continue;
        if(occ_c*10 >= (occ_e_1 + occ_e_2)) continue;
        kv_pushp(uint64_t, occ_idx, &p);
        (*p) = occ_e_1 + occ_e_2 - occ_c;
        (*p) <<= 32; (*p) += k;
        fprintf(stderr, "passed\n");
    }

    radix_sort_hc64(occ_idx.a, occ_idx.a + occ_idx.n);
    
    for (k = 0; k < occ_idx.n; ++k) 
    {
        tmp = occ_idx.a[k];
        occ_idx.a[k] = occ_idx.a[occ_idx.n - k - 1];
        occ_idx.a[occ_idx.n - k - 1] = tmp;
    }

    for (j = 0; j < occ_idx.n; j++)
    {
        k = (uint32_t)occ_idx.a[j];

        v = (k<<1);
        av = asg_arc_a(bub_ug->g, v);
        nv = asg_arc_n(bub_ug->g, v);
        for (i = 0, w = (uint32_t)-1, nw1 = 0; i < nv; i++)
        {
            if(av[i].del) continue;
            nw1++;
            if((av[i].v>>1) == (v>>1)) continue;
            if(w != (uint32_t)-1) break;
            w = av[i].v;
        }
        if(i < nv) continue;
        w1 = w;


        v = (k<<1)+1;
        av = asg_arc_a(bub_ug->g, v);
        nv = asg_arc_n(bub_ug->g, v);
        for (i = 0, w = (uint32_t)-1, nw2 = 0; i < nv; i++)
        {
            if(av[i].del) continue;
            nw2++;
            if((av[i].v>>1) == (v>>1)) continue;
            if(w != (uint32_t)-1) break;
            w = av[i].v;
        }
        if(i < nv) continue;
        w2 = w;

        if(nw1 <= 1 && nw2 <= 1) continue;
        if(w1 == (uint32_t)-1 && w2 == (uint32_t)-1) continue;
        if(w1 != (uint32_t)-1) w1 ^=1;
        if(w2 != (uint32_t)-1) w2 ^=1;



    }

    free(vis); free(is_vis); free(b.b.a); kv_destroy(occ_idx); kv_destroy(stack.a); kv_destroy(result.a);
    ma_ug_destroy(copy_ug);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rdi
callq 0x10ba70
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0xd0(%rbp), %rdi
xorl %esi, %esi
movl $0x68, %edx
callq 0x2100
movq $0x0, -0xe8(%rbp)
movq $0x0, -0xf0(%rbp)
movq $0x0, -0xe0(%rbp)
movq $0x0, -0x108(%rbp)
movq $0x0, -0x110(%rbp)
movq $0x0, -0x100(%rbp)
movq $0x0, -0x118(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shll %eax
movslq %eax, %rdi
movl $0x1, %esi
callq 0x2140
movq %rax, -0x118(%rbp)
movq $0x0, -0x120(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shll %eax
movslq %eax, %rdi
movl $0x1, %esi
callq 0x2140
movq %rax, -0x120(%rbp)
movq $0x0, -0x130(%rbp)
movq $0x0, -0x138(%rbp)
movq $0x0, -0x128(%rbp)
movq $0x0, -0x148(%rbp)
movq $0x0, -0x138(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x68(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0x1e023d
movl -0x34(%rbp), %eax
shll %eax
movl %eax, -0x38(%rbp)
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq -0x68(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x28(%rcx), %rcx
movl -0x38(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl -0x38(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x50(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x48(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0x1dfd3e
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x1dfcf0
jmp 0x1dfd33
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
shrl %eax
movl -0x38(%rbp), %ecx
shrl %ecx
cmpl %ecx, %eax
jne 0x1dfd17
jmp 0x1dfd33
cmpl $-0x1, -0x3c(%rbp)
je 0x1dfd1f
jmp 0x1dfd3e
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x3c(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1dfccd
movl -0x2c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0x1dfd4b
jmp 0x1e022f
movl -0x3c(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x34(%rbp), %eax
shll %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq -0x68(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x28(%rcx), %rcx
movl -0x38(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl -0x38(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x50(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x4c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0x1dfe26
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x1dfdd8
jmp 0x1dfe1b
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
shrl %eax
movl -0x38(%rbp), %ecx
shrl %ecx
cmpl %ecx, %eax
jne 0x1dfdff
jmp 0x1dfe1b
cmpl $-0x1, -0x3c(%rbp)
je 0x1dfe07
jmp 0x1dfe26
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x3c(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1dfdb5
movl -0x2c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0x1dfe33
jmp 0x1e022f
movl -0x3c(%rbp), %eax
movl %eax, -0x44(%rbp)
cmpl $0x1, -0x48(%rbp)
ja 0x1dfe4a
cmpl $0x1, -0x4c(%rbp)
ja 0x1dfe4a
jmp 0x1e022f
cmpl $-0x1, -0x40(%rbp)
jne 0x1dfe5b
cmpl $-0x1, -0x44(%rbp)
jne 0x1dfe5b
jmp 0x1e022f
cmpl $-0x1, -0x40(%rbp)
je 0x1dfe6a
movl -0x40(%rbp), %eax
xorl $0x1, %eax
movl %eax, -0x40(%rbp)
cmpl $-0x1, -0x44(%rbp)
je 0x1dfe79
movl -0x44(%rbp), %eax
xorl $0x1, %eax
movl %eax, -0x44(%rbp)
cmpl $-0x1, -0x40(%rbp)
je 0x1dff55
movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF
cmpl $-0x1, -0x44(%rbp)
je 0x1dfe99
movl -0x44(%rbp), %eax
xorl $0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq -0x68(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x28(%rcx), %rcx
movl -0x40(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl -0x40(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x50(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0x1dff46
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x1dff07
jmp 0x1dff3b
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
shrl %eax
cmpl -0x34(%rbp), %eax
jne 0x1dff21
jmp 0x1dff3b
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x3c(%rbp), %eax
jne 0x1dff39
jmp 0x1dff3b
jmp 0x1dff46
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1dfee4
movl -0x2c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0x1dff53
jmp 0x1e022f
jmp 0x1dff55
cmpl $-0x1, -0x44(%rbp)
je 0x1e0031
movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF
cmpl $-0x1, -0x40(%rbp)
je 0x1dff75
movl -0x40(%rbp), %eax
xorl $0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq -0x68(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x28(%rcx), %rcx
movl -0x44(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl -0x44(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x50(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0x1e0022
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x1dffe3
jmp 0x1e0017
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
shrl %eax
cmpl -0x34(%rbp), %eax
jne 0x1dfffd
jmp 0x1e0017
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x3c(%rbp), %eax
jne 0x1e0015
jmp 0x1e0017
jmp 0x1e0022
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1dffc0
movl -0x2c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0x1e002f
jmp 0x1e022f
jmp 0x1e0031
cmpl $-0x1, -0x40(%rbp)
jne 0x1e0043
cmpl $-0x1, -0x44(%rbp)
je 0x1e0043
movl -0x44(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x44(%rbp), %eax
jne 0x1e0052
movl $0xffffffff, -0x44(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x58(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x54(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x5c(%rbp) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rdi
movl -0x34(%rbp), %edx
shll %edx
leaq -0xd0(%rbp), %rsi
xorl %eax, %eax
movl %eax, %ecx
xorl %r8d, %r8d
leaq -0x5c(%rbp), %r9
callq 0x1e0580
cmpl $-0x1, -0x40(%rbp)
je 0x1e00ae
movq -0x10(%rbp), %rdi
movl -0x40(%rbp), %edx
xorl $0x1, %edx
leaq -0xd0(%rbp), %rsi
xorl %eax, %eax
movl %eax, %ecx
xorl %r8d, %r8d
leaq -0x54(%rbp), %r9
callq 0x1e0580
cmpl $-0x1, -0x44(%rbp)
je 0x1e00d5
movq -0x10(%rbp), %rdi
movl -0x44(%rbp), %edx
xorl $0x1, %edx
leaq -0xd0(%rbp), %rsi
xorl %eax, %eax
movl %eax, %ecx
xorl %r8d, %r8d
leaq -0x58(%rbp), %r9
callq 0x1e0580
movq 0x1e3f04(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x34(%rbp), %edx
addl $0x1, %edx
movl -0x5c(%rbp), %ecx
movl -0x40(%rbp), %r8d
shrl %r8d
addl $0x1, %r8d
movl -0x54(%rbp), %r9d
movl -0x44(%rbp), %r10d
shrl %r10d
addl $0x1, %r10d
movl -0x58(%rbp), %eax
leaq 0x1ac902(%rip), %rsi    # 0x38ca0e
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x22a0
imull $0x5, -0x5c(%rbp), %eax
cmpl -0x54(%rbp), %eax
jb 0x1e0129
jmp 0x1e022f
imull $0x5, -0x5c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jb 0x1e0137
jmp 0x1e022f
imull $0xa, -0x5c(%rbp), %eax
movl -0x54(%rbp), %ecx
addl -0x58(%rbp), %ecx
cmpl %ecx, %eax
jb 0x1e014a
jmp 0x1e022f
jmp 0x1e014c
movq -0x138(%rbp), %rax
cmpq -0x130(%rbp), %rax
jne 0x1e01b3
cmpq $0x0, -0x130(%rbp)
je 0x1e0179
movq -0x130(%rbp), %rax
shlq %rax
movq %rax, -0x150(%rbp)
jmp 0x1e0187
movl $0x2, %eax
movq %rax, -0x150(%rbp)
jmp 0x1e0187
movq -0x150(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x128(%rbp), %rdi
movq -0x130(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movq -0x138(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x138(%rbp)
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x148(%rbp)
movl -0x54(%rbp), %eax
addl -0x58(%rbp), %eax
subl -0x5c(%rbp), %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x148(%rbp), %rax
movq %rcx, (%rax)
movq -0x148(%rbp), %rax
movq (%rax), %rcx
shlq $0x20, %rcx
movq %rcx, (%rax)
movl -0x34(%rbp), %eax
movl %eax, %ecx
movq -0x148(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq 0x1e3dc2(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x1abcdf(%rip), %rsi    # 0x38bf07
movb $0x0, %al
callq 0x22a0
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1dfc50
movq -0x128(%rbp), %rdi
movq -0x128(%rbp), %rsi
movq -0x138(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x1ba0f0
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpq -0x138(%rbp), %rax
jae 0x1e02de
movq -0x128(%rbp), %rax
movl -0x34(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x140(%rbp)
movq -0x128(%rbp), %rax
movq -0x138(%rbp), %rcx
movl -0x34(%rbp), %edx
subq %rdx, %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x128(%rbp), %rax
movl -0x34(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movq -0x140(%rbp), %rdx
movq -0x128(%rbp), %rax
movq -0x138(%rbp), %rcx
movl -0x34(%rbp), %esi
subq %rsi, %rcx
subq $0x1, %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1e0265
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpq -0x138(%rbp), %rax
jae 0x1e051a
movq -0x128(%rbp), %rax
movl -0x30(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
shll %eax
movl %eax, -0x38(%rbp)
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq -0x68(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x28(%rcx), %rcx
movl -0x38(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl -0x38(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x50(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x48(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0x1e03d8
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x1e038a
jmp 0x1e03cd
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
shrl %eax
movl -0x38(%rbp), %ecx
shrl %ecx
cmpl %ecx, %eax
jne 0x1e03b1
jmp 0x1e03cd
cmpl $-0x1, -0x3c(%rbp)
je 0x1e03b9
jmp 0x1e03d8
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x3c(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1e0367
movl -0x2c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0x1e03e5
jmp 0x1e050c
movl -0x3c(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x34(%rbp), %eax
shll %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq -0x68(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x28(%rcx), %rcx
movl -0x38(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl -0x38(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x50(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x4c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0x1e04c0
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x1e0472
jmp 0x1e04b5
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
shrl %eax
movl -0x38(%rbp), %ecx
shrl %ecx
cmpl %ecx, %eax
jne 0x1e0499
jmp 0x1e04b5
cmpl $-0x1, -0x3c(%rbp)
je 0x1e04a1
jmp 0x1e04c0
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x3c(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1e044f
movl -0x2c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0x1e04ca
jmp 0x1e050c
movl -0x3c(%rbp), %eax
movl %eax, -0x44(%rbp)
cmpl $0x1, -0x48(%rbp)
ja 0x1e04de
cmpl $0x1, -0x4c(%rbp)
ja 0x1e04de
jmp 0x1e050c
cmpl $-0x1, -0x40(%rbp)
jne 0x1e04ec
cmpl $-0x1, -0x44(%rbp)
jne 0x1e04ec
jmp 0x1e050c
cmpl $-0x1, -0x40(%rbp)
je 0x1e04fb
movl -0x40(%rbp), %eax
xorl $0x1, %eax
movl %eax, -0x40(%rbp)
cmpl $-0x1, -0x44(%rbp)
je 0x1e050a
movl -0x44(%rbp), %eax
xorl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x1e050c
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x1e02e5
movq -0x118(%rbp), %rdi
callq 0x2210
movq -0x120(%rbp), %rdi
callq 0x2210
movq -0x88(%rbp), %rdi
callq 0x2210
movq -0x128(%rbp), %rdi
callq 0x2210
movq -0xe0(%rbp), %rdi
callq 0x2210
movq -0x100(%rbp), %rdi
callq 0x2210
movq -0x20(%rbp), %rdi
callq 0xcd6f0
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
nopw %cs:(%rax,%rax)