// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/hic.cpp
// Function: up_contain(kv_u_trans_t*, hc_links*, unsigned char*, asg_t*, kvec_t_u64_warp*)
uint32_t up_contain(kv_u_trans_t *ta, hc_links* link, uint8_t *uc_idx, asg_t *sg, kvec_t_u64_warp *buf)
{
    hc_edge *he = NULL, *ht = NULL, *hx = NULL;
    uint64_t t_d = (uint64_t)-1, hd;
    uint32_t qn, tn, qs, qe, ts, te, rev, is_c;
    u_trans_t *a = NULL, *p = NULL;
    asg_arc_t t;
    uint32_t i, k, st, occ, n, m;
    long long r_qs, r_qe, r_ts, r_te;
    int r;

    for (k = 0, buf->a.n = 0; k < ta->idx.n; k++)
    {
        if((uc_idx[k]&2)&&(!(uc_idx[k]&1)))///contain others
        {
            if(link->a.a[k].e.n == 0)
            {
                uc_idx[k] -= 2;
                continue;
            }
            a = u_trans_a(*ta, k);
            n = u_trans_n(*ta, k);
            for (st = 0, i = 1; i <= n; ++i)
            {
                if (i == n || a[i].tn != a[st].tn)
                {
                    for (m = st, p = &(a[st]); m < i; m++)
                    {
                        if(a[m].nw > p->nw) p = &(a[m]);
                    }

                    if(p->f == RC_2)///dis-connected
                    {
                        rev = p->rev;
                        qn = p->qn; 
                        qs = p->qs; 
                        qe = p->qe - 1;
                        if(rev)
                        {
                            tn = p->tn;
                            ts = sg->seq[tn].len - (p->te - 1) - 1;
                            te = sg->seq[tn].len - p->ts - 1;
                        }
                        else
                        {
                            tn = p->tn; 
                            ts = p->ts; 
                            te = p->te - 1;
                        }

                        classify_hap_overlap(qs, qe, sg->seq[qn].len, ts, te, sg->seq[tn].len, 
                                                                                &r_qs, &r_qe, &r_ts, &r_te);
                        
                        qs = r_qs; qe = r_qe + 1;
                        if(rev)
                        {
                            ts = sg->seq[tn].len - r_te - 1;
                            te = sg->seq[tn].len - r_ts - 1 + 1;
                        }
                        else
                        {
                            ts = r_ts; te = r_te + 1;
                        }

                        r = get_trans_ug_arch(qn, qs, qe, sg->seq[qn].len, 
                                            tn, ts, te, sg->seq[tn].len, rev, &t);
                        if(r == MA_HT_TCONT)//q contains t
                        {
                            hd = tn; hd <<= 32; hd |= qn;
                            kv_push(uint64_t, buf->a, hd);
                            ///qn->tn
                            he = get_hc_edge(link, qn, tn, 0);
                            if(!he)
                            {
                                push_hc_edge(&(link->a.a[qn]), tn, 0, 0, &t_d);
                                he = get_hc_edge(link, qn, tn, 0);
                            } 
                            hd = (te - ts) + qs;
                            if(hd < he->dis)
                            {
                                he->dis = hd << 1;
                                he->dis += 1;
                                he->dis <<= 1;
                                he->dis += 0;//s-direction
                                he->dis <<= 1;
                                he->dis += rev;//e-direction
                            }

                            ///tn->qn
                            he = get_hc_edge(link, tn, qn, 0);
                            if(!he)
                            {
                                push_hc_edge(&(link->a.a[tn]), qn, 0, 0, &t_d);
                                he = get_hc_edge(link, tn, qn, 0);
                            } 
                            hd = (te - ts) + sg->seq[qn].len - qe;
                            if(hd < he->dis)
                            {
                                he->dis = hd << 1;
                                he->dis += 1;
                                he->dis <<= 1;
                                he->dis += 0;//s-direction
                                he->dis <<= 1;
                                he->dis += rev;//e-direction
                            }
                        }
                    }
                    st = i;
                }
            }
            uc_idx[k] -= 2;
        }
    }
    
    uint64_t e0, e1;
    for (k = 0; k < buf->a.n; k++)
    {
        qn = buf->a.a[k] >> 32;
        tn = (uint32_t)buf->a.a[k];

        he = get_hc_edge(link, tn, qn, 0); //tn contains qn
        for (i = 0; i < link->a.a[tn].e.n; i++)
        {
            if(link->a.a[tn].e.a[i].del) continue;
            if(link->a.a[tn].e.a[i].uID == qn) continue;
            ht = &(link->a.a[tn].e.a[i]);
            if(ht->dis == (uint64_t)-1) continue;

            if((he->dis&(uint64_t)2) == (ht->dis&(uint64_t)2))///s in same direction
            {
                push_LCA_edges(he->dis>>3, ht->dis>>3, sg->seq[he->uID].len, sg->seq[ht->uID].len, 
                he->dis&1, ht->dis&1, &e0, &e1);

                ///forward
                hx = get_hc_edge(link, he->uID, ht->uID, 0);
                if(!hx)
                {
                    push_hc_edge(&(link->a.a[he->uID]), ht->uID, 0, 0, &t_d);
                    hx = get_hc_edge(link, he->uID, ht->uID, 0);
                }
                if ((e0>>3) < (hx->dis>>3)) hx->dis = e0;

                ///backward
                hx = get_hc_edge(link, ht->uID, he->uID, 0);
                if(!hx)
                {
                    push_hc_edge(&(link->a.a[ht->uID]), he->uID, 0, 0, &t_d);
                    hx = get_hc_edge(link, ht->uID, he->uID, 0);
                }
                if ((e1>>3) < (hx->dis>>3)) hx->dis = e1;
            }
            else
            {
                push_LCA_edges_rev(he, ht, sg->seq[he->uID].len, sg->seq[ht->uID].len, 
                sg->seq[tn].len, he->dis&1, ht->dis&1, &e0, &e1);

                ///forward
                hx = get_hc_edge(link, he->uID, ht->uID, 0);
                if(!hx)
                {
                    push_hc_edge(&(link->a.a[he->uID]), ht->uID, 0, 0, &t_d);
                    hx = get_hc_edge(link, he->uID, ht->uID, 0);
                }
                if ((e0>>3) < (hx->dis>>3)) hx->dis = e0;

                ///backward
                hx = get_hc_edge(link, ht->uID, he->uID, 0);
                if(!hx)
                {
                    push_hc_edge(&(link->a.a[ht->uID]), he->uID, 0, 0, &t_d);
                    hx = get_hc_edge(link, ht->uID, he->uID, 0);
                }
                if ((e1>>3) < (hx->dis>>3)) hx->dis = e1;
            }
        }
    }


    for (k = 0, occ = 0; k < ta->idx.n; k++)
    {
        if((uc_idx[k]&1) && (uc_idx[k]&2))
        {
            is_c = 0;
            a = u_trans_a(*ta, k);
            n = u_trans_n(*ta, k);
            for (st = 0, i = 1; i <= n; ++i)
            {
                if (i == n || a[i].tn != a[st].tn)
                {
                    for (m = st, p = &(a[st]); m < i; m++)
                    {
                        if(a[m].nw > p->nw) p = &(a[m]);
                    }

                    if(p->f == RC_2)///dis-connected
                    {
                        rev = p->rev;
                        qn = p->qn; 
                        qs = p->qs; 
                        qe = p->qe - 1;
                        if(rev)
                        {
                            tn = p->tn;
                            ts = sg->seq[tn].len - (p->te - 1) - 1;
                            te = sg->seq[tn].len - p->ts - 1;
                        }
                        else
                        {
                            tn = p->tn; 
                            ts = p->ts; 
                            te = p->te - 1;
                        }

                        classify_hap_overlap(qs, qe, sg->seq[qn].len, ts, te, sg->seq[tn].len, 
                                                                                &r_qs, &r_qe, &r_ts, &r_te);
                        
                        qs = r_qs; qe = r_qe + 1;
                        if(rev)
                        {
                            ts = sg->seq[tn].len - r_te - 1;
                            te = sg->seq[tn].len - r_ts - 1 + 1;
                        }
                        else
                        {
                            ts = r_ts; te = r_te + 1;
                        }

                        r = get_trans_ug_arch(qn, qs, qe, sg->seq[qn].len, 
                                            tn, ts, te, sg->seq[tn].len, rev, &t);
                        if(r == MA_HT_QCONT && (uc_idx[tn]&2))//t contains q
                        {
                            is_c = 1;
                        }
                    }
                    st = i;
                }
            }
            if(is_c == 0) uc_idx[k] -= 1;
        }
        if(uc_idx[k]&2) occ++;
    }

    return occ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, %rbp
movq %rsi, (%rsp)
movq %rdi, 0x48(%rsp)
leaq 0x20(%rsp), %rax
orq $-0x1, (%rax)
andq $0x0, (%r8)
xorl %esi, %esi
movl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
movq %rdx, 0x30(%rsp)
movq %r8, 0x58(%rsp)
movl %esi, %esi
movq 0x48(%rsp), %rax
cmpq %rsi, 0x18(%rax)
jbe 0xfc62b
movb (%rbp,%rsi), %al
movl %eax, %ecx
andb $0x3, %cl
cmpb $0x2, %cl
jne 0xfc624
movq (%rsp), %rcx
movq 0x10(%rcx), %rcx
imulq $0x30, %rsi, %rdx
cmpq $0x0, (%rcx,%rdx)
je 0xfc619
movq 0x48(%rsp), %rcx
movq 0x28(%rcx), %rax
movq %rsi, 0x80(%rsp)
movq (%rax,%rsi,8), %rax
movq %rax, 0x18(%rsp)
shrq $0x20, %rax
imulq $0x30, %rax, %r8
addq 0x10(%rcx), %r8
xorl %esi, %esi
pushq $0x1
popq %rbp
movq %r8, 0x50(%rsp)
cmpl 0x18(%rsp), %ebp
ja 0xfc608
movl %esi, %ecx
movl %ebp, %edx
je 0xfc33e
imulq $0x30, %rdx, %rax
movl 0x14(%r8,%rax), %eax
imulq $0x30, %rcx, %rdi
cmpl 0x14(%r8,%rdi), %eax
je 0xfc601
imulq $0x30, %rcx, %rsi
leaq (%r8,%rsi), %rax
addq %r8, %rsi
cmpq %rdx, %rcx
jae 0xfc36c
movsd 0x20(%rsi), %xmm0
ucomisd 0x20(%rax), %xmm0
movq %rsi, %rdi
ja 0xfc360
movq %rax, %rdi
incq %rcx
addq $0x30, %rsi
movq %rdi, %rax
jmp 0xfc349
movzbl 0x28(%rax), %r13d
movl %r13d, %ecx
andb $0x3f, %cl
movl %ebp, %esi
cmpb $0x2, %cl
jne 0xfc601
shrl $0x6, %r13d
movl 0x14(%rax), %r12d
andl $0x1, %r13d
je 0xfc3b2
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rdx
movl (%rdx,%r12,8), %r9d
andl %r15d, %r9d
movl %r9d, %ecx
subl 0x10(%rax), %ecx
movl 0xc(%rax), %r8d
notl %r8d
addl %r9d, %r8d
jmp 0xfc3cc
movl 0xc(%rax), %ecx
movl 0x10(%rax), %r8d
decl %r8d
movq 0x10(%rsp), %rdx
movq 0x20(%rdx), %rdx
movl (%rdx,%r12,8), %r9d
andl %r15d, %r9d
movl 0x8(%rax), %r10d
movl (%rax), %edi
movl 0x4(%rax), %eax
decl %eax
movl %eax, %esi
movq %r10, 0x8(%rsp)
movl (%rdx,%r10,8), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
movl %r8d, %r8d
movl %r9d, %r9d
leaq 0x38(%rsp), %rax
pushq %rax
leaq 0x48(%rsp), %rax
pushq %rax
leaq 0x80(%rsp), %rax
pushq %rax
leaq 0x90(%rsp), %rax
pushq %rax
callq 0xc7ff2
addq $0x20, %rsp
testb %r13b, %r13b
je 0xfc43e
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rcx
movl (%rcx,%r12,8), %eax
andl %r15d, %eax
movl 0x38(%rsp), %ebx
notl %ebx
addl %eax, %ebx
movl %eax, %r14d
subl 0x40(%rsp), %r14d
jmp 0xfc45a
movl 0x40(%rsp), %ebx
movl 0x38(%rsp), %r14d
incl %r14d
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rcx
movl (%rcx,%r12,8), %eax
andl %r15d, %eax
movq %r12, %r8
movl 0x70(%rsp), %edx
movq %rdx, 0x88(%rsp)
incl %edx
movl 0x78(%rsp), %r12d
movq 0x8(%rsp), %rdi
movl (%rcx,%rdi,8), %ecx
andl %r15d, %ecx
movl %r12d, %esi
movq %r8, 0x28(%rsp)
movl %ebx, %r9d
leaq 0x90(%rsp), %r10
pushq %r10
pushq %r13
pushq %rax
pushq %r14
callq 0xfbbfa
addq $0x20, %rsp
movl %ebp, %esi
cmpl $-0x3, %eax
movq 0x50(%rsp), %r8
jne 0xfc601
movq 0x58(%rsp), %r15
movq (%r15), %rcx
movq 0x10(%r15), %rax
cmpq 0x8(%r15), %rcx
jne 0xfc4e5
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r15)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%r15)
movq (%r15), %rcx
movq 0x28(%rsp), %rdx
movq %rdx, %rdi
shlq $0x20, %rdi
movq 0x8(%rsp), %rsi
orq %rsi, %rdi
leaq 0x1(%rcx), %r8
movq %r8, (%r15)
movq %rdi, (%rax,%rcx,8)
movq (%rsp), %rdi
xorl %ecx, %ecx
callq 0xfcabc
testq %rax, %rax
jne 0xfc54d
imulq $0x30, 0x8(%rsp), %rdi
movq (%rsp), %rax
addq 0x10(%rax), %rdi
xorpd %xmm0, %xmm0
movq 0x28(%rsp), %r15
movq %r15, %rsi
xorl %edx, %edx
leaq 0x20(%rsp), %rcx
callq 0xfa2fb
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0xfcabc
subl %ebx, %r14d
addl %r14d, %r12d
cmpq %r12, 0x10(%rax)
jbe 0xfc568
leaq 0x4(,%r12,8), %rcx
addq %r13, %rcx
movq %rcx, 0x10(%rax)
movq (%rsp), %rdi
movq 0x28(%rsp), %r12
movq %r12, %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0xfcabc
testq %rax, %rax
movl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
jne 0xfc5c4
imulq $0x30, %r12, %rdi
movq (%rsp), %rbx
addq 0x10(%rbx), %rdi
xorpd %xmm0, %xmm0
movq 0x8(%rsp), %rsi
xorl %edx, %edx
leaq 0x20(%rsp), %rcx
callq 0xfa2fb
movq %rbx, %rdi
movq 0x8(%rsp), %rbx
movq %r12, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0xfcabc
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rcx
movl (%rcx,%rbx,8), %ecx
andl %r15d, %ecx
movq 0x88(%rsp), %rdx
notl %edx
addl %ecx, %edx
addl %edx, %r14d
movl %ebp, %esi
cmpq %r14, 0x10(%rax)
movq 0x50(%rsp), %r8
jbe 0xfc601
movzbl %r13b, %ecx
leaq (%rcx,%r14,8), %rcx
addq $0x4, %rcx
movq %rcx, 0x10(%rax)
movl %ebp, %esi
incl %ebp
jmp 0xfc316
movq 0x30(%rsp), %rbp
movq 0x80(%rsp), %rsi
movb (%rbp,%rsi), %al
addb $-0x2, %al
movb %al, (%rbp,%rsi)
movq 0x58(%rsp), %r8
incl %esi
jmp 0xfc2ac
xorl %ecx, %ecx
movl %ecx, %ecx
cmpq %rcx, (%r8)
jbe 0xfc87a
movq 0x10(%r8), %rax
movq %rcx, 0x50(%rsp)
movq (%rax,%rcx,8), %r15
movl %r15d, %ebx
shrq $0x20, %r15
xorl %r14d, %r14d
movq (%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0xfcabc
movq %r15, %rdx
movq %rax, %r10
movq %rbx, 0x28(%rsp)
imulq $0x30, %rbx, %r13
movq %rax, 0x8(%rsp)
movq %r15, 0x18(%rsp)
movl %r14d, %r14d
movq (%rsp), %rax
movq 0x10(%rax), %rbx
cmpq %r14, (%rbx,%r13)
jbe 0xfc869
leaq (%rbx,%r13), %rax
movq 0x10(%rax), %r12
imulq $0x28, %r14, %rax
cmpb $0x0, 0x18(%r12,%rax)
js 0xfc861
addq %rax, %r12
movl 0x8(%r12), %r15d
cmpl %edx, %r15d
je 0xfc861
movq 0x10(%r12), %rax
cmpq $-0x1, %rax
je 0xfc861
movq 0x10(%r10), %r9
movl %r9d, %ecx
xorl %eax, %ecx
testb $0x2, %cl
jne 0xfc724
movq %r9, %rdi
shrq $0x3, %rdi
movq %rax, %rsi
shrq $0x3, %rsi
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rcx
movl 0x8(%r10), %ebp
movl (%rcx,%rbp,8), %edx
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
andq %r8, %rdx
movl (%rcx,%r15,8), %ecx
andq %r8, %rcx
andl $0x1, %r9d
andl $0x1, %eax
movl %r9d, %r8d
movl %eax, %r9d
leaq 0x60(%rsp), %rax
pushq %rax
leaq 0x70(%rsp), %rax
pushq %rax
callq 0xfbfe7
popq %rax
popq %rcx
jmp 0xfc778
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rsi
movl 0x8(%r10), %ebp
movl (%rsi,%rbp,8), %edx
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
andq %rdi, %rdx
movl (%rsi,%r15,8), %ecx
andq %rdi, %rcx
movq 0x28(%rsp), %r8
movl (%rsi,%r8,8), %r8d
andq %rdi, %r8
andl $0x1, %r9d
andl $0x1, %eax
subq $0x8, %rsp
movq %r10, %rdi
movq %r12, %rsi
leaq 0x68(%rsp), %r10
pushq %r10
leaq 0x78(%rsp), %r10
pushq %r10
pushq %rax
callq 0xfc10d
addq $0x20, %rsp
movq (%rsp), %rdi
movq %rbp, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0xfcabc
testq %rax, %rax
jne 0xfc7c8
imulq $0x30, %rbp, %rax
addq %rax, %rbx
xorps %xmm0, %xmm0
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
leaq 0x20(%rsp), %rcx
callq 0xfa2fb
movq 0x8(%rsp), %rax
movl 0x8(%rax), %ebp
movl 0x8(%r12), %r15d
movq (%rsp), %rdi
movq %rbp, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0xfcabc
movq 0x68(%rsp), %rcx
movq %rcx, %rdx
shrq $0x3, %rdx
movq 0x10(%rax), %rsi
shrq $0x3, %rsi
cmpq %rsi, %rdx
jae 0xfc7e5
movq %rcx, 0x10(%rax)
movl %r15d, %r15d
movl %ebp, %ebx
movq (%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0xfcabc
testq %rax, %rax
jne 0xfc835
imulq $0x30, %r15, %rdi
movq (%rsp), %r15
addq 0x10(%r15), %rdi
xorps %xmm0, %xmm0
movq %rbx, %rsi
xorl %edx, %edx
leaq 0x20(%rsp), %rcx
callq 0xfa2fb
movl 0x8(%r12), %esi
movq 0x8(%rsp), %rax
movl 0x8(%rax), %edx
movq %r15, %rdi
xorl %ecx, %ecx
callq 0xfcabc
movq 0x60(%rsp), %rcx
movq %rcx, %rdx
shrq $0x3, %rdx
movq 0x10(%rax), %rsi
shrq $0x3, %rsi
cmpq %rsi, %rdx
movq 0x30(%rsp), %rbp
movq 0x18(%rsp), %rdx
movq 0x8(%rsp), %r10
jae 0xfc861
movq %rcx, 0x10(%rax)
incl %r14d
jmp 0xfc679
movq 0x50(%rsp), %rcx
incl %ecx
movq 0x58(%rsp), %r8
jmp 0xfc62d
xorl %edx, %edx
movl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
xorl %esi, %esi
movl %edx, %edx
movq 0x48(%rsp), %rax
cmpq %rdx, 0x18(%rax)
jbe 0xfcaa8
movb (%rbp,%rdx), %al
movl %eax, %ecx
notb %cl
testb $0x3, %cl
jne 0xfca97
movl %esi, 0x18(%rsp)
movq 0x48(%rsp), %rcx
movq 0x28(%rcx), %rax
movq %rdx, 0x8(%rsp)
movq (%rax,%rdx,8), %r12
movq %r12, %rax
shrq $0x20, %rax
imulq $0x30, %rax, %rbp
addq 0x10(%rcx), %rbp
movl $0x0, (%rsp)
pushq $0x1
popq %r13
xorl %eax, %eax
cmpl %r12d, %r13d
ja 0xfca79
movl %eax, %ecx
movl %r13d, %edx
je 0xfc8fe
imulq $0x30, %rdx, %rsi
movl 0x14(%rbp,%rsi), %esi
imulq $0x30, %rcx, %rdi
cmpl 0x14(%rbp,%rdi), %esi
je 0xfca71
imulq $0x30, %rcx, %rsi
leaq (%rsi,%rbp), %rax
addq %rbp, %rsi
cmpq %rdx, %rcx
jae 0xfc92c
movsd 0x20(%rsi), %xmm0
ucomisd 0x20(%rax), %xmm0
movq %rsi, %rdi
ja 0xfc920
movq %rax, %rdi
incq %rcx
addq $0x30, %rsi
movq %rdi, %rax
jmp 0xfc909
movzbl 0x28(%rax), %r15d
movl %r15d, %ecx
andb $0x3f, %cl
cmpb $0x2, %cl
jne 0xfc96b
shrl $0x6, %r15d
movl 0x14(%rax), %ebx
andl $0x1, %r15d
je 0xfc973
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rdx
movl (%rdx,%rbx,8), %r9d
andl %r10d, %r9d
movl %r9d, %ecx
subl 0x10(%rax), %ecx
movl 0xc(%rax), %r8d
notl %r8d
addl %r9d, %r8d
jmp 0xfc98d
movl %r13d, %eax
jmp 0xfca71
movl 0xc(%rax), %ecx
movl 0x10(%rax), %r8d
decl %r8d
movq 0x10(%rsp), %rdx
movq 0x20(%rdx), %rdx
movl (%rdx,%rbx,8), %r9d
andl %r10d, %r9d
movl 0x8(%rax), %r14d
movl (%rax), %edi
movl 0x4(%rax), %eax
decl %eax
movl %eax, %esi
movl (%rdx,%r14,8), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
movl %r8d, %r8d
movl %r9d, %r9d
leaq 0x38(%rsp), %rax
pushq %rax
leaq 0x48(%rsp), %rax
pushq %rax
leaq 0x80(%rsp), %rax
pushq %rax
leaq 0x90(%rsp), %rax
pushq %rax
callq 0xc7ff2
addq $0x20, %rsp
testb %r15b, %r15b
je 0xfca00
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rcx
movl (%rcx,%rbx,8), %eax
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
andl %edi, %eax
movl 0x38(%rsp), %r9d
notl %r9d
addl %eax, %r9d
movl %eax, %r10d
subl 0x40(%rsp), %r10d
jmp 0xfca20
movl 0x40(%rsp), %r9d
movl 0x38(%rsp), %r10d
incl %r10d
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rcx
movl (%rcx,%rbx,8), %eax
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
andl %edi, %eax
movl 0x70(%rsp), %edx
incl %edx
movl 0x78(%rsp), %esi
movl (%rcx,%r14,8), %ecx
andl %edi, %ecx
movl %r14d, %edi
movl %ebx, %r8d
leaq 0x90(%rsp), %r11
pushq %r11
pushq %r15
pushq %rax
pushq %r10
callq 0xfbbfa
addq $0x20, %rsp
cmpl $-0x2, %eax
jne 0xfca68
movq 0x30(%rsp), %rax
testb $0x2, (%rax,%rbx)
pushq $0x1
popq %rax
movl (%rsp), %ecx
cmovnel %eax, %ecx
movl %ecx, (%rsp)
movl %r13d, %eax
movl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
incl %r13d
jmp 0xfc8d8
movq 0x30(%rsp), %rbp
movq 0x8(%rsp), %rdx
movb (%rbp,%rdx), %al
cmpl $0x0, (%rsp)
jne 0xfca93
decb %al
movb %al, (%rbp,%rdx)
movl 0x18(%rsp), %esi
movzbl %al, %eax
btl $0x1, %eax
adcl $0x0, %esi
incl %edx
jmp 0xfc884
movl %esi, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq