// File: /workspace/github_cpp_makefile_star2_O3/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 %rsi, (%rsp)
movq $-0x1, 0x20(%rsp)
movq $0x0, (%r8)
cmpq $0x0, 0x18(%rdi)
je 0x1441ed
movq %r8, %rbp
movq %rdx, %r14
movq %rdi, %r15
xorl %esi, %esi
movq %rdx, 0x38(%rsp)
movq %rdi, 0x50(%rsp)
movq %r8, 0x58(%rsp)
movb (%r14,%rsi), %al
movl %eax, %ecx
andb $0x3, %cl
cmpb $0x2, %cl
jne 0x143d10
movq (%rsp), %rcx
movq 0x10(%rcx), %rcx
leaq (%rsi,%rsi,2), %rdx
shlq $0x4, %rdx
cmpq $0x0, (%rcx,%rdx)
je 0x143d0a
movq 0x28(%r15), %rcx
movq (%rcx,%rsi,8), %r8
testl %r8d, %r8d
je 0x143d0a
movq %rsi, 0x80(%rsp)
movq %r8, %rax
shrq $0x20, %rax
leaq (%rax,%rax,2), %r9
shlq $0x4, %r9
addq 0x10(%r15), %r9
movl $0x1, %ebp
xorl %edx, %edx
movl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
movq %r8, 0x48(%rsp)
movq %r9, 0x40(%rsp)
movl %ebp, %ecx
cmpl %r8d, %ebp
jne 0x1439dd
movl %edx, %eax
jmp 0x1439ff
leaq (%rcx,%rcx,2), %rax
shlq $0x4, %rax
movl 0x14(%r9,%rax), %esi
movl %edx, %eax
leaq (%rax,%rax,2), %rdi
shlq $0x4, %rdi
cmpl 0x14(%r9,%rdi), %esi
je 0x143ce4
leaq (%rax,%rax,2), %rsi
shlq $0x4, %rsi
leaq (%r9,%rsi), %rdi
cmpl %ebp, %edx
jae 0x143a35
addq %r9, %rsi
subq %rax, %rcx
movsd 0x20(%rsi), %xmm0
ucomisd 0x20(%rdi), %xmm0
movq %rsi, %rax
ja 0x143a27
movq %rdi, %rax
addq $0x30, %rsi
movq %rax, %rdi
decq %rcx
jne 0x143a15
jmp 0x143a38
movq %rdi, %rax
movzbl 0x28(%rax), %r13d
movl %r13d, %ecx
andb $0x3f, %cl
movl %ebp, %edx
cmpb $0x2, %cl
jne 0x143ce4
shrl $0x6, %r13d
movl 0x14(%rax), %r12d
andl $0x1, %r13d
je 0x143a7e
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 0x143a98
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 0x28(%rsp), %rax
pushq %rax
leaq 0x38(%rsp), %rax
pushq %rax
leaq 0x80(%rsp), %rax
pushq %rax
leaq 0x90(%rsp), %rax
pushq %rax
callq 0x10a6e3
addq $0x20, %rsp
testb %r13b, %r13b
je 0x143b0a
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rcx
movl (%rcx,%r12,8), %eax
andl %r15d, %eax
movl 0x28(%rsp), %ebx
notl %ebx
addl %eax, %ebx
movl %eax, %r14d
subl 0x30(%rsp), %r14d
jmp 0x143b26
movl 0x30(%rsp), %ebx
movl 0x28(%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, 0x18(%rsp)
movl %ebx, %r9d
leaq 0x90(%rsp), %r10
pushq %r10
pushq %r13
pushq %rax
pushq %r14
callq 0x14327e
addq $0x20, %rsp
movl %ebp, %edx
cmpl $-0x3, %eax
movq 0x48(%rsp), %r8
movq 0x40(%rsp), %r9
jne 0x143ce4
movq 0x58(%rsp), %r15
movq (%r15), %rcx
movq 0x10(%r15), %rax
cmpq 0x8(%r15), %rcx
jne 0x143bb8
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r15)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%r15)
movq (%r15), %rcx
movq 0x18(%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 0x144201
testq %rax, %rax
jne 0x143c27
movq 0x8(%rsp), %rax
leaq (%rax,%rax,2), %rdi
shlq $0x4, %rdi
movq (%rsp), %rax
addq 0x10(%rax), %rdi
xorpd %xmm0, %xmm0
movq 0x18(%rsp), %r15
movq %r15, %rsi
xorl %edx, %edx
leaq 0x20(%rsp), %rcx
callq 0x1416e0
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x144201
subl %ebx, %r14d
addl %r14d, %r12d
cmpq %r12, 0x10(%rax)
jbe 0x143c42
leaq 0x4(,%r12,8), %rcx
addq %r13, %rcx
movq %rcx, 0x10(%rax)
movq (%rsp), %rdi
movq 0x18(%rsp), %r12
movq %r12, %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x144201
testq %rax, %rax
movl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
jne 0x143ca2
leaq (%r12,%r12,2), %rdi
shlq $0x4, %rdi
movq (%rsp), %rbx
addq 0x10(%rbx), %rdi
xorpd %xmm0, %xmm0
movq 0x8(%rsp), %rsi
xorl %edx, %edx
leaq 0x20(%rsp), %rcx
callq 0x1416e0
movq %rbx, %rdi
movq 0x8(%rsp), %rbx
movq %r12, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x144201
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, %edx
cmpq %r14, 0x10(%rax)
movq 0x48(%rsp), %r8
movq 0x40(%rsp), %r9
jbe 0x143ce4
movzbl %r13b, %ecx
leaq (%rcx,%r14,8), %rcx
addq $0x4, %rcx
movq %rcx, 0x10(%rax)
movl %ebp, %edx
incl %ebp
cmpl %r8d, %ebp
jbe 0x1439d2
movq 0x38(%rsp), %r14
movq 0x80(%rsp), %rsi
movb (%r14,%rsi), %al
movq 0x50(%rsp), %r15
movq 0x58(%rsp), %rbp
addb $-0x2, %al
movb %al, (%r14,%rsi)
incl %esi
movq 0x18(%r15), %rax
cmpq %rsi, %rax
ja 0x143962
movq (%rbp), %rbx
testq %rbx, %rbx
je 0x143f9d
movq (%rsp), %rax
movq 0x10(%rax), %r12
xorl %ecx, %ecx
movq 0x10(%rbp), %rax
movq %rcx, 0x40(%rsp)
movq (%rax,%rcx,8), %rax
movl %eax, %r13d
movq %rax, %rdx
shrq $0x20, %rdx
movq (%rsp), %rdi
movq %r13, %rsi
movq %rdx, 0x18(%rsp)
xorl %ecx, %ecx
callq 0x144201
movq %r13, 0x48(%rsp)
leaq (%r13,%r13,2), %r13
shlq $0x4, %r13
cmpq $0x0, (%r12,%r13)
je 0x143f89
movq %rax, %r10
movl $0x1, %r15d
xorl %eax, %eax
movq (%rsp), %r14
movq 0x18(%rsp), %rdx
movq %r10, 0x8(%rsp)
movq 0x10(%r12,%r13), %rcx
leaq (%rax,%rax,4), %rax
cmpb $0x0, 0x18(%rcx,%rax,8)
js 0x143f62
leaq (%rcx,%rax,8), %rbp
movl 0x8(%rbp), %ebx
cmpl %edx, %ebx
je 0x143f62
movq 0x10(%rbp), %rax
cmpq $-0x1, %rax
je 0x143f62
movq 0x10(%r10), %r9
movl %r9d, %ecx
xorl %eax, %ecx
testb $0x2, %cl
jne 0x143e23
movq %r9, %rdi
shrq $0x3, %rdi
movq %rax, %rsi
shrq $0x3, %rsi
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rcx
movl 0x8(%r10), %r14d
movl (%rcx,%r14,8), %edx
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
andq %r8, %rdx
movl (%rcx,%rbx,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 0x14368f
addq $0x10, %rsp
jmp 0x143e77
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rsi
movl 0x8(%r10), %r14d
movl (%rsi,%r14,8), %edx
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
andq %rdi, %rdx
movl (%rsi,%rbx,8), %ecx
andq %rdi, %rcx
movq 0x48(%rsp), %r8
movl (%rsi,%r8,8), %r8d
andq %rdi, %r8
andl $0x1, %r9d
andl $0x1, %eax
subq $0x8, %rsp
movq %r10, %rdi
movq %rbp, %rsi
leaq 0x68(%rsp), %r10
pushq %r10
leaq 0x78(%rsp), %r10
pushq %r10
pushq %rax
callq 0x1437b5
addq $0x20, %rsp
movq (%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x144201
testq %rax, %rax
jne 0x143ecb
leaq (%r14,%r14,2), %rax
shlq $0x4, %rax
addq %rax, %r12
xorpd %xmm0, %xmm0
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
leaq 0x20(%rsp), %rcx
callq 0x1416e0
movq 0x8(%rsp), %rax
movl 0x8(%rax), %r14d
movl 0x8(%rbp), %ebx
movq (%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x144201
movq 0x68(%rsp), %rcx
movq %rcx, %rdx
shrq $0x3, %rdx
movq 0x10(%rax), %rsi
shrq $0x3, %rsi
cmpq %rsi, %rdx
jae 0x143ee8
movq %rcx, 0x10(%rax)
movl %ebx, %r12d
movl %r14d, %ebx
movq (%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x144201
testq %rax, %rax
jne 0x143f3b
leaq (%r12,%r12,2), %rdi
shlq $0x4, %rdi
addq 0x10(%r14), %rdi
xorpd %xmm0, %xmm0
movq %rbx, %rsi
xorl %edx, %edx
leaq 0x20(%rsp), %rcx
callq 0x1416e0
movl 0x8(%rbp), %esi
movq 0x8(%rsp), %rax
movl 0x8(%rax), %edx
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x144201
movq 0x60(%rsp), %rcx
movq %rcx, %rdx
shrq $0x3, %rdx
movq 0x10(%rax), %rsi
shrq $0x3, %rsi
cmpq %rsi, %rdx
movq 0x18(%rsp), %rdx
movq 0x8(%rsp), %r10
jae 0x143f62
movq %rcx, 0x10(%rax)
movl %r15d, %eax
movq 0x10(%r14), %r12
incl %r15d
cmpq %rax, (%r12,%r13)
ja 0x143d92
movq 0x58(%rsp), %rbp
movq (%rbp), %rbx
movq 0x38(%rsp), %r14
movq 0x50(%rsp), %r15
movq 0x40(%rsp), %rcx
incl %ecx
cmpq %rcx, %rbx
ja 0x143d36
movq 0x18(%r15), %rax
testq %rax, %rax
je 0x1441ed
xorl %esi, %esi
movl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
xorl %eax, %eax
movb (%r14,%rsi), %dl
movl %edx, %ecx
notb %cl
testb $0x3, %cl
jne 0x1441d5
movq 0x28(%r15), %rcx
movq (%rcx,%rsi,8), %r13
testl %r13d, %r13d
je 0x1441cf
movq %rsi, 0x18(%rsp)
movl %eax, 0x8(%rsp)
movq %r13, %rax
shrq $0x20, %rax
leaq (%rax,%rax,2), %r12
shlq $0x4, %r12
addq 0x10(%r15), %r12
movl $0x1, %ebp
xorl %eax, %eax
movl $0x0, (%rsp)
movl %ebp, %ecx
cmpl %r13d, %ebp
jne 0x144007
movl %eax, %edi
jmp 0x144029
leaq (%rcx,%rcx,2), %rdx
shlq $0x4, %rdx
movl 0x14(%r12,%rdx), %edx
movl %eax, %edi
leaq (%rdi,%rdi,2), %rsi
shlq $0x4, %rsi
cmpl 0x14(%r12,%rsi), %edx
je 0x1441a7
leaq (%rdi,%rdi,2), %rdx
shlq $0x4, %rdx
leaq (%r12,%rdx), %rsi
cmpl %ebp, %eax
jae 0x14405f
addq %r12, %rdx
subq %rdi, %rcx
movsd 0x20(%rdx), %xmm0
ucomisd 0x20(%rsi), %xmm0
movq %rdx, %rax
ja 0x144051
movq %rsi, %rax
addq $0x30, %rdx
movq %rax, %rsi
decq %rcx
jne 0x14403f
jmp 0x144062
movq %rsi, %rax
movzbl 0x28(%rax), %r15d
movl %r15d, %ecx
andb $0x3f, %cl
cmpb $0x2, %cl
jne 0x1440a1
shrl $0x6, %r15d
movl 0x14(%rax), %ebx
andl $0x1, %r15d
je 0x1440a8
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 0x1440c2
movl %ebp, %eax
jmp 0x1441a7
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 0x28(%rsp), %rax
pushq %rax
leaq 0x38(%rsp), %rax
pushq %rax
leaq 0x80(%rsp), %rax
pushq %rax
leaq 0x90(%rsp), %rax
pushq %rax
callq 0x10a6e3
addq $0x20, %rsp
testb %r15b, %r15b
je 0x144135
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rcx
movl (%rcx,%rbx,8), %eax
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
andl %edi, %eax
movl 0x28(%rsp), %r9d
notl %r9d
addl %eax, %r9d
movl %eax, %r10d
subl 0x30(%rsp), %r10d
jmp 0x144155
movl 0x30(%rsp), %r9d
movl 0x28(%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 0x14327e
addq $0x20, %rsp
cmpl $-0x2, %eax
jne 0x14419f
movq 0x38(%rsp), %rax
testb $0x2, (%rax,%rbx)
movl $0x1, %eax
movl (%rsp), %ecx
cmovnel %eax, %ecx
movl %ecx, (%rsp)
movl %ebp, %eax
movl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
incl %ebp
cmpl %r13d, %ebp
jbe 0x143ffc
movq 0x38(%rsp), %r14
movq 0x18(%rsp), %rsi
movb (%r14,%rsi), %dl
cmpl $0x0, (%rsp)
movq 0x50(%rsp), %r15
movl 0x8(%rsp), %eax
jne 0x1441d5
decb %dl
movb %dl, (%r14,%rsi)
movzbl %dl, %ecx
btl $0x1, %ecx
adcl $0x0, %eax
incl %esi
cmpq %rsi, 0x18(%r15)
ja 0x143fb0
jmp 0x1441ef
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq