// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: identify_bubbles(ma_ug_t*, bubble_type*, unsigned char*, kv_u_trans_t*)
void identify_bubbles(ma_ug_t* ug, bubble_type* bub, uint8_t *r_het_flag, kv_u_trans_t *ref)
{
    asg_cleanup(ug->g);
    if (!ug->g->is_symm) asg_symm(ug->g);
    uint32_t v, n_vtx = ug->g->n_seq * 2, i, k, mode = (((uint32_t)-1)<<2);
    uint32_t beg, sink, n, *a, n_occ;
    uint64_t pathLen;
    bub->ug = ug; 
    bub->b_bub = bub->b_end_bub = bub->tangle_bub = bub->cross_bub = bub->mess_bub = 0;
    if(bub->round_id == 0)
    {
        buf_t b; memset(&b, 0, sizeof(buf_t)); b.a = (binfo_t*)calloc(n_vtx, sizeof(binfo_t));
        uint64_t tLen = get_bub_pop_max_dist_advance(ug->g, &b);
        kv_init(bub->list); kv_init(bub->num); kv_init(bub->pathLen);
        kv_init(bub->b_s_idx); kv_malloc(bub->b_s_idx, ug->g->n_seq); 
        bub->b_ug = NULL; kv_init(bub->chain_weight);
        bub->b_s_idx.n = ug->g->n_seq;
        memset(bub->b_s_idx.a, -1, bub->b_s_idx.n * sizeof(uint64_t));
        CALLOC(bub->index, n_vtx);
        for (i = 0; i < ug->g->n_seq; i++) ug->g->seq[i].c = 0;
        for (v = 0; v < n_vtx; ++v) 
        {
            if(ug->g->seq[v>>1].del) continue;
            if(asg_arc_n(ug->g, v) < 2) continue;
            if((bub->index[v]&(uint32_t)3) != 0) continue;
            if(asg_bub_pop1_primary_trio(ug->g, NULL, v, tLen, &b, (uint32_t)-1, (uint32_t)-1, 0, NULL, NULL, NULL, 0, 0, NULL))
            {
                //beg is v, end is b.S.a[0]
                //note b.b include end, does not include beg
                for (i = 0; i < b.b.n; i++)
                {
                    if(b.b.a[i]==v || b.b.a[i]==b.S.a[0]) continue;
                    bub->index[b.b.a[i]] &= mode; bub->index[b.b.a[i]] += 1;
                    bub->index[b.b.a[i]^1] &= mode; bub->index[b.b.a[i]^1] += 1;
                }
                bub->index[v] &= mode; bub->index[v] += 2;
                bub->index[b.S.a[0]^1] &= mode; bub->index[b.S.a[0]^1] += 3;
            }
        }

        kvec_t_u32_warp stack, result;
        kv_init(stack.a); kv_init(result.a);
        for (v = 0; v < n_vtx; ++v) 
        {
            if((bub->index[v]&(uint32_t)3) !=2) continue;
            if(asg_bub_pop1_primary_trio(ug->g, ug, v, tLen, &b, (uint32_t)-1, (uint32_t)-1, 0, &pathLen, NULL, NULL, 0, 0, NULL))
            {   
                //note b.b include end, does not include beg
                i = b.b.n + 1;
                if(b.b.n == 2 || b.b.n == 3 || b.b.n == 5)
                {
                    for (i = 0; i < b.b.n; i++)
                    {
                        if(b.b.a[i]==v || b.b.a[i]==b.S.a[0]) continue;
                        dfs_bubble(ug->g, &stack, &result, b.b.a[i]>>1, v>>1, b.S.a[0]>>1);
                        if((result.a.n + 3) != b.b.n && (result.a.n + 2) != b.b.n) break;
                    }
                }

                if(i == b.b.n)
                {
                    kv_push(uint32_t, bub->num, v);
                }
                else
                {
                    kv_push(uint32_t, bub->num, v + (1<<31));
                }
            }
        }
        kv_destroy(stack.a); kv_destroy(result.a);
        radix_sort_u32(bub->num.a, bub->num.a + bub->num.n);
        bub->s_bub = 0;
        for (k = 0; k < bub->num.n; k++)
        {
            if((bub->num.a[k]>>31) == 0) bub->s_bub++;
            v = (bub->num.a[k]<<1)>>1;
            bub->num.a[k] = bub->list.n;
            if(asg_bub_pop1_primary_trio(ug->g, ug, v, tLen, &b, (uint32_t)-1, (uint32_t)-1, 0, &pathLen, NULL, NULL, 0, 0, NULL))
            {
                kv_push(uint64_t, bub->pathLen, pathLen);
                //beg is v, end is b.S.a[0]
                kv_push(uint32_t, bub->list, v);
                kv_push(uint32_t, bub->list, b.S.a[0]^1);
                
                //note b.b include end, does not include beg
                for (i = 0; i < b.b.n; i++)
                {
                    if(b.b.a[i]==v || b.b.a[i]==b.S.a[0]) continue;
                    kv_push(uint32_t, bub->list, b.b.a[i]);
                }
            }
        }
        kv_push(uint32_t, bub->num, bub->list.n);
        free(b.a); free(b.S.a); free(b.T.a); free(b.b.a); free(b.e.a);
        bub->f_bub = bub->num.n - 1; ///bub->s_bub = bub->num.n - 1;
        
        for (i = 0; i < ug->g->n_seq; i++)
        {
            bub->index[i] = get_unitig_het_arb(ug, i, r_het_flag, ref, 20, M_het(*bub), P_het(*bub), (uint32_t)-1);
        }
        for (i = 0; i < bub->f_bub; i++)
        {
            get_bubbles(bub, i, &beg, &sink, &a, &n, &pathLen);
            for (v = n_occ = 0; v < n; v++)
            {
                bub->index[(a[v]>>1)] = i;
                n_occ += ug->u.a[a[v]>>1].n;
            }

            // if((pathLen*2) >= ug->g->seq[beg>>1].len && (pathLen*2) >= ug->g->seq[sink>>1].len)
            // {
            //     bub->index[(beg>>1)] = (uint32_t)-1;
            //     bub->index[(sink>>1)] = (uint32_t)-1;
            // }

            if(n_occ > 3)
            {
                if(bub->index[(beg>>1)] != M_het(*bub)) bub->index[(beg>>1)] = (uint32_t)-1;
                if(bub->index[(sink>>1)] != M_het(*bub)) bub->index[(sink>>1)] = (uint32_t)-1;
            }
            
            
            v = beg>>1;
            if(bub->b_s_idx.a[v] == (uint64_t)-1)
            {
                bub->b_s_idx.a[v] <<= 32;
                bub->b_s_idx.a[v] |= i;
            }
            else if((bub->b_s_idx.a[v] & 0xffffffff00000000) == 0xffffffff00000000)
            {
                bub->b_s_idx.a[v] <<= 32;
                bub->b_s_idx.a[v] |= i;
            }


            v = sink>>1;
            if(bub->b_s_idx.a[v] == (uint64_t)-1)
            {
                bub->b_s_idx.a[v] <<= 32;
                bub->b_s_idx.a[v] |= i;
            }
            else if((bub->b_s_idx.a[v] & 0xffffffff00000000) == 0xffffffff00000000)
            {
                bub->b_s_idx.a[v] <<= 32;
                bub->b_s_idx.a[v] |= i;
            }        
        }
        for (i = 0; i < ug->g->n_seq; i++)
        {
            if(bub->index[i] == M_het(*bub)) bub->index[i] = P_het(*bub);
        }
    }
    else
    {
        bub->num.n = bub->f_bub + 1; 
        bub->pathLen.n = bub->f_bub;
        bub->list.n = bub->num.a[bub->num.n-1];
        update_bub_b_s_idx(bub);
        bub->check_het = 0;
        asg_destroy(bub->b_g); bub->b_g = NULL;
        ma_ug_destroy(bub->b_ug); bub->b_ug = NULL;
        kv_destroy(bub->chain_weight); kv_init(bub->chain_weight);
    }
    bub->b_g = NULL;
    bub->b_ug = NULL;
    build_bub_graph(ug, bub);
    // fprintf(stderr, "-bub->index[18759]: %u, bub->num.n: %u\n",  (uint32_t)bub->index[18759], bub->num.n);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rcx, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
callq 0x694eb
movq 0x18(%r14), %r15
movl 0x14(%r15), %edi
testl %edi, %edi
js 0xf73cd
movq %r15, %rdi
callq 0x69638
movq 0x18(%r14), %r15
movl 0x14(%r15), %edi
movq %r14, 0x10(%rbx)
xorps %xmm0, %xmm0
andq $0x0, 0xa8(%rbx)
movups %xmm0, 0x88(%rbx)
movups %xmm0, 0x98(%rbx)
cmpl $0x0, 0x8(%rbx)
je 0xf748e
movq 0x40(%rbx), %rax
movq 0x80(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x30(%rbx)
movq %rcx, 0x48(%rbx)
movl (%rax,%rcx,4), %eax
movq %rax, 0x18(%rbx)
movq %rbx, %rdi
callq 0xf7cab
andl $0x0, 0xb0(%rbx)
movq 0xb8(%rbx), %rdi
callq 0x68f68
andq $0x0, 0xb8(%rbx)
movq 0xc0(%rbx), %rdi
callq 0x6921d
andq $0x0, 0xc0(%rbx)
movq 0xd8(%rbx), %rdi
callq 0x2220
xorps %xmm0, %xmm0
movups %xmm0, 0xc8(%rbx)
andq $0x0, 0xd8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xb8(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xf7d63
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addl %edi, %edi
movq %rdi, 0x58(%rsp)
leaq 0x88(%rsp), %r13
movups %xmm0, 0x58(%r13)
movups %xmm0, 0x48(%r13)
movups %xmm0, 0x38(%r13)
movups %xmm0, 0x28(%r13)
movups %xmm0, 0x18(%r13)
movups %xmm0, 0x8(%r13)
pushq $0x1c
popq %rsi
callq 0x2120
movq %rax, (%r13)
movq %r15, %rdi
movq %r13, %rsi
callq 0x84975
movq %rax, 0x48(%rsp)
leaq 0x18(%rbx), %rbp
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
movups %xmm0, 0x28(%rbx)
movups %xmm0, 0x38(%rbx)
movups %xmm0, 0x48(%rbx)
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x68(%rbx)
movq 0x18(%r14), %r15
movl 0x14(%r15), %eax
movl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
andq %r12, %rax
movq %rax, 0x68(%rbx)
movl 0x14(%r15), %edi
andq %r12, %rdi
shlq $0x3, %rdi
callq 0x2280
movq %rax, 0x70(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xc0(%rbx)
movups %xmm0, 0xd0(%rbx)
movl 0x14(%r15), %edx
andq %r12, %rdx
movq 0x58(%rsp), %r12
movq %rdx, 0x60(%rbx)
shlq $0x3, %rdx
movq %rax, %rdi
movl $0xff, %esi
callq 0x20e0
pushq $0x4
popq %rsi
movq %r12, %rdi
callq 0x2120
movq %rax, (%rbx)
xorl %eax, %eax
movl 0x14(%r15), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpq %rcx, %rax
jae 0xf757e
movq 0x20(%r15), %rcx
movb $0x0, 0x4(%rcx,%rax,8)
incq %rax
jmp 0xf7561
xorl %r15d, %r15d
pushq $-0x1
popq %r13
cmpq %r12, %r15
je 0xf769b
movq 0x18(%r14), %rdi
movq 0x20(%rdi), %rax
movl %r15d, %ecx
shrl %ecx
cmpl $0x0, (%rax,%rcx,8)
js 0xf7693
movq 0x28(%rdi), %rax
testl $0xfffffffe, (%rax,%r15,8) # imm = 0xFFFFFFFE
je 0xf7693
movq (%rbx), %rax
testb $0x3, (%rax,%r15,4)
jne 0xf7693
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
andq $0x0, 0x38(%rsp)
andl $0x0, 0x30(%rsp)
andl $0x0, 0x28(%rsp)
andq $0x0, 0x20(%rsp)
andl $0x0, 0x8(%rsp)
orl $-0x1, (%rsp)
xorl %esi, %esi
movl %r15d, %edx
movq 0x48(%rsp), %rcx
leaq 0x88(%rsp), %r8
movl %r13d, %r9d
callq 0x84a86
testq %rax, %rax
je 0xf7693
movq 0xa0(%rsp), %rax
movq 0xc0(%rsp), %rcx
movq 0xd0(%rsp), %rdx
xorl %esi, %esi
movl %esi, %esi
cmpq %rsi, %rcx
jbe 0xf7666
movl (%rdx,%rsi,4), %edi
cmpq %rdi, %r15
je 0xf7662
cmpl (%rax), %edi
je 0xf7662
movq (%rbx), %r8
andl $-0x4, (%r8,%rdi,4)
movl (%rdx,%rsi,4), %edi
incl (%r8,%rdi,4)
movl (%rdx,%rsi,4), %edi
xorq $0x1, %rdi
andl $-0x4, (%r8,%rdi,4)
movl (%rdx,%rsi,4), %edi
xorq $0x1, %rdi
incl (%r8,%rdi,4)
incl %esi
jmp 0xf7629
movq (%rbx), %rax
movl (%rax,%r15,4), %ecx
andl $-0x4, %ecx
orl $0x2, %ecx
movl %ecx, (%rax,%r15,4)
movq 0xa0(%rsp), %rcx
movl (%rcx), %edx
xorq $0x1, %rdx
andl $-0x4, (%rax,%rdx,4)
movl (%rcx), %ecx
xorq $0x1, %rcx
addl $0x3, (%rax,%rcx,4)
incq %r15
jmp 0xf7585
xorps %xmm0, %xmm0
leaq 0x110(%rsp), %rax
andq $0x0, 0x10(%rax)
leaq 0xf0(%rsp), %rcx
andq $0x0, 0x10(%rcx)
movaps %xmm0, (%rax)
movaps %xmm0, (%rcx)
xorl %r13d, %r13d
leaq 0x88(%rsp), %r15
cmpq %r12, %r13
je 0xf787c
movq (%rbx), %rax
movl (%rax,%r13,4), %eax
andl $0x3, %eax
cmpl $0x2, %eax
jne 0xf7874
movq 0x18(%r14), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
andq $0x0, 0x38(%rsp)
andl $0x0, 0x30(%rsp)
andl $0x0, 0x28(%rsp)
andl $0x0, 0x8(%rsp)
orl $-0x1, (%rsp)
leaq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r14, %rsi
movl %r13d, %edx
movq 0x48(%rsp), %rcx
movq %r15, %r8
pushq $-0x1
popq %r9
callq 0x84a86
testq %rax, %rax
je 0xf7874
movq 0xc0(%rsp), %rdx
cmpq $0x5, %rdx
ja 0xf77dd
pushq $0x2c
popq %rax
btq %rdx, %rax
jae 0xf77dd
movl %r13d, %r15d
shrl %r15d
xorl %r12d, %r12d
movl %r12d, %r12d
cmpq %r12, %rdx
jbe 0xf77d3
movq 0xd0(%rsp), %rax
movl (%rax,%r12,4), %ecx
cmpq %rcx, %r13
je 0xf77ce
movq 0xa0(%rsp), %rax
movl (%rax), %r9d
cmpl %r9d, %ecx
je 0xf77ce
movq 0x18(%r14), %rdi
shrl %ecx
shrl %r9d
leaq 0x110(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
movl %r15d, %r8d
callq 0xf6fe5
movq 0xf0(%rsp), %rax
leaq 0x3(%rax), %rcx
movq 0xc0(%rsp), %rdx
cmpq %rdx, %rcx
setne %cl
addq $0x2, %rax
cmpq %rdx, %rax
setne %al
testb %al, %cl
jne 0xf77d3
incl %r12d
jmp 0xf775c
leaq 0x88(%rsp), %r15
jmp 0xf77e1
leal 0x1(%rdx), %r12d
movq 0x30(%rbx), %rcx
movq 0x38(%rbx), %rsi
movq 0x40(%rbx), %rax
cmpq %r12, %rdx
jne 0xf7830
cmpq %rsi, %rcx
movq 0x58(%rsp), %r12
jne 0xf7822
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rsi
movq %rsi, 0x38(%rbx)
shlq $0x2, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x40(%rbx)
movq 0x30(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x30(%rbx)
movl %r13d, (%rax,%rcx,4)
jmp 0xf7874
cmpq %rsi, %rcx
movq 0x58(%rsp), %r12
jne 0xf7860
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rsi
movq %rsi, 0x38(%rbx)
shlq $0x2, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x40(%rbx)
movq 0x30(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x30(%rbx)
movl %r13d, %edx
orl $0x80000000, %edx       # imm = 0x80000000
movl %edx, (%rax,%rcx,4)
incq %r13
jmp 0xf76c9
movq 0x120(%rsp), %rdi
callq 0x2220
movq 0x100(%rsp), %rdi
callq 0x2220
movq 0x30(%rbx), %rax
movq 0x40(%rbx), %rdi
leaq (%rdi,%rax,4), %rsi
callq 0xf1352
andq $0x0, 0x78(%rbx)
xorl %r13d, %r13d
movl %r13d, %r13d
movq 0x30(%rbx), %rcx
cmpq %r13, %rcx
jbe 0xf7a81
movq 0x40(%rbx), %rax
movl (%rax,%r13,4), %r12d
testl %r12d, %r12d
js 0xf78d0
incq 0x78(%rbx)
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movl (%rbp), %ecx
movl %ecx, (%rax,%r13,4)
movq 0x18(%r14), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
andq $0x0, 0x38(%rsp)
andl $0x0, 0x30(%rsp)
andl $0x0, 0x28(%rsp)
andl $0x0, 0x8(%rsp)
orl $-0x1, (%rsp)
leaq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r14, %rsi
movl %r12d, %edx
movq 0x48(%rsp), %rcx
leaq 0x88(%rsp), %r8
pushq $-0x1
popq %r9
callq 0x84a86
testq %rax, %rax
je 0xf7a79
movq 0x48(%rbx), %rcx
movq 0x58(%rbx), %rax
cmpq 0x50(%rbx), %rcx
jne 0xf7966
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rsi
movq %rsi, 0x50(%rbx)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x58(%rbx)
movq 0x48(%rbx), %rcx
movq 0x60(%rsp), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x48(%rbx)
movq %rdx, (%rax,%rcx,8)
movq 0x18(%rbx), %rdx
movq 0x20(%rbx), %rcx
movq 0x28(%rbx), %rax
cmpq %rcx, %rdx
jne 0xf79b2
leaq (%rdx,%rdx), %rsi
testq %rdx, %rdx
pushq $0x2
popq %rcx
cmoveq %rcx, %rsi
movq %rsi, 0x20(%rbx)
shlq $0x2, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x28(%rbx)
movq 0x18(%rbx), %rdx
movq 0x20(%rbx), %rcx
leaq 0x1(%rdx), %rsi
movq %rsi, (%rbp)
movl %r12d, (%rax,%rdx,4)
cmpq %rcx, %rsi
jne 0xf79e9
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rsi
movq %rsi, 0x20(%rbx)
shlq $0x2, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x28(%rbx)
movq 0x18(%rbx), %rsi
movq 0xa0(%rsp), %rcx
movl (%rcx), %edx
xorl $0x1, %edx
leaq 0x1(%rsi), %rcx
movq %rcx, (%rbp)
movl %edx, (%rax,%rsi,4)
xorl %r15d, %r15d
movl %r15d, %r15d
cmpq %r15, 0xc0(%rsp)
jbe 0xf7a79
movq 0xd0(%rsp), %rdx
movl (%rdx,%r15,4), %edx
cmpl %r12d, %edx
je 0xf7a74
movq 0xa0(%rsp), %rsi
cmpl (%rsi), %edx
je 0xf7a74
cmpq 0x20(%rbx), %rcx
jne 0xf7a66
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rsi
movq %rsi, 0x20(%rbx)
shlq $0x2, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x28(%rbx)
movq 0xd0(%rsp), %rcx
movl (%rcx,%r15,4), %edx
movq 0x18(%rbx), %rcx
leaq 0x1(%rcx), %rsi
movq %rsi, (%rbp)
movl %edx, (%rax,%rcx,4)
movq %rsi, %rcx
incl %r15d
jmp 0xf7a04
incl %r13d
jmp 0xf78af
movq 0x40(%rbx), %rax
cmpq 0x38(%rbx), %rcx
jne 0xf7ab1
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rsi
movq %rsi, 0x38(%rbx)
shlq $0x2, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x40(%rbx)
movq 0x30(%rbx), %rcx
movl 0x18(%rbx), %edx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x30(%rbx)
movl %edx, (%rax,%rcx,4)
movq 0x88(%rsp), %rdi
callq 0x2220
movq 0xa0(%rsp), %rdi
callq 0x2220
movq 0xb8(%rsp), %rdi
callq 0x2220
movq 0xd0(%rsp), %rdi
callq 0x2220
movq 0xe8(%rsp), %rdi
callq 0x2220
movq 0x30(%rbx), %r12
leaq -0x1(%r12), %r13
movq %r13, 0x80(%rbx)
movq 0x18(%r14), %rax
movq %rax, 0x48(%rsp)
leal 0x1(%r12), %ebp
xorl %r15d, %r15d
movq 0x48(%rsp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq %rax, %r15
jae 0xf7b64
orl $-0x1, 0x8(%rsp)
movl %r12d, (%rsp)
movq %r14, %rdi
movl %r15d, %esi
movq 0x70(%rsp), %rdx
movq 0x78(%rsp), %rcx
pushq $0x14
popq %r8
movl %ebp, %r9d
callq 0xf72dc
movq (%rbx), %rcx
movl %eax, (%rcx,%r15,4)
incq %r15
jmp 0xf7b21
xorl %r12d, %r12d
movabsq $-0x100000001, %rbp     # imm = 0xFFFFFFFEFFFFFFFF
movl %r12d, %r15d
cmpq %r15, %r13
jbe 0xf7c77
leaq 0x60(%rsp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
leaq 0x54(%rsp), %rdx
leaq 0x50(%rsp), %rcx
leaq 0x80(%rsp), %r8
leaq 0x6c(%rsp), %r9
callq 0xf6ab5
xorl %eax, %eax
movq 0x80(%rsp), %rcx
xorl %edx, %edx
movl 0x6c(%rsp), %esi
cmpq %rsi, %rax
jae 0xf7bdf
movq (%rbx), %rsi
movl (%rcx,%rax,4), %edi
shrl %edi
movl %r12d, (%rsi,%rdi,4)
movq 0x10(%r14), %rsi
movl (%rcx,%rax,4), %edi
shrl %edi
imulq $0x28, %rdi, %rdi
addl 0x10(%rsi,%rdi), %edx
incq %rax
jmp 0xf7bb4
cmpl $0x4, %edx
jb 0xf7c12
movq (%rbx), %rax
movq 0x30(%rbx), %rcx
movl 0x54(%rsp), %edx
shrl %edx
movl (%rax,%rdx,4), %esi
incq %rcx
cmpq %rsi, %rcx
je 0xf7c00
orl $-0x1, (%rax,%rdx,4)
movl 0x50(%rsp), %edx
shrl %edx
movl (%rax,%rdx,4), %esi
cmpq %rsi, %rcx
je 0xf7c12
orl $-0x1, (%rax,%rdx,4)
movl 0x54(%rsp), %ecx
shrl %ecx
movq 0x70(%rbx), %rax
movq (%rax,%rcx,8), %rdx
cmpq $-0x1, %rdx
je 0xf7c34
cmpq %rbp, %rdx
jbe 0xf7c3f
shlq $0x20, %rdx
orq %r15, %rdx
jmp 0xf7c3b
leaq (%r15,%rbp), %rdx
incq %rdx
movq %rdx, (%rax,%rcx,8)
movl 0x50(%rsp), %ecx
shrl %ecx
movq (%rax,%rcx,8), %rdx
cmpq $-0x1, %rdx
je 0xf7c5d
cmpq %rbp, %rdx
jbe 0xf7c68
shlq $0x20, %rdx
orq %r15, %rdx
jmp 0xf7c64
leaq (%r15,%rbp), %rdx
incq %rdx
movq %rdx, (%rax,%rcx,8)
incl %r12d
movq 0x80(%rbx), %r13
jmp 0xf7b71
xorl %eax, %eax
movq 0x48(%rsp), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpq %rcx, %rax
jae 0xf7467
movq (%rbx), %rcx
movq 0x30(%rbx), %rdx
movl (%rcx,%rax,4), %esi
leaq 0x1(%rdx), %rdi
cmpq %rsi, %rdi
jne 0xf7ca6
movl %edx, (%rcx,%rax,4)
incq %rax
jmp 0xf7c79