// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/horder.cpp
// Function: debug_debug_phasing_t(debug_phasing_t*, ma_ug_t*, kvec_pe_hit*, kv_u_trans_t*, h_covs*, unsigned long*)
void debug_debug_phasing_t(debug_phasing_t *x, ma_ug_t *cug, kvec_pe_hit *chits, kv_u_trans_t *ck_trans, 
h_covs *join, uint64_t *idx)
{
    uint64_t i, k, m, pv, cv, pui, pri, cui, cri, e;
    uint32_t p_cvx, c_cvx, pr, cr, occ;
    long long p_nodeLen, p_baseLen, t1, t2;
    long long c_nodeLen, c_baseLen;
    asg_arc_t *ap, *ac;
    u_trans_t *pk, *ck, *p;
    buf_t pb, cb;
    memset(&pb, 0, sizeof(buf_t));
    memset(&cb, 0, sizeof(buf_t));

    uint32_t *cnt = NULL; CALLOC(cnt, cug->g->n_seq<<1);
    for (cv = 0; cv < (uint64_t)(cug->g->n_seq<<1); ++cv) {
        ///out-nodes of v
        ac = asg_arc_a(cug->g, cv);
        ///if v just have one out-node, there is no muti-edge
        if (asg_arc_n(cug->g, cv) < 2) continue;
        for (i = 0; i < asg_arc_n(cug->g, cv); ++i) ++cnt[ac[i].v];
        for (i = 0; i < asg_arc_n(cug->g, cv); ++i)
            if (--cnt[ac[i].v] != 0) fprintf(stderr, "ERROR-9\n");
    }
    free(cnt);

    for (e = 0; e < cug->g->n_arc; ++e) {
        uint32_t v = cug->g->arc[e].v^1, u = cug->g->arc[e].ul>>32^1;
        asg_arc_t *av = asg_arc_a(cug->g, v);
        for (i = 0; i < asg_arc_n(cug->g, v); ++i)
            if (av[i].v == u) break;
        if (i == asg_arc_n(cug->g, v)) fprintf(stderr, "ERROR-10\n");
    }


    for (i = 0; i < x->ug->g->n_seq; i++)
    {
        pv = (i<<1);
        cv = new_node(pv, join, idx, 1);
        if(asg_arc_n(x->ug->g, pv) != asg_arc_n(cug->g, cv)) fprintf(stderr, "ERROR-1\n");
        ap = asg_arc_a(x->ug->g, pv); ac = asg_arc_a(cug->g, cv);
        for (k = 0; k < asg_arc_n(x->ug->g, pv); k++)
        {
            for (m = 0; m < asg_arc_n(cug->g, cv); m++)
            {
                if(new_node(ap[k].v, join, idx, 0) == ac[m].v) break;
            }
            if(m >= asg_arc_n(cug->g, cv))
            {
                fprintf(stderr, "\n+ERROR-2\n");
                fprintf(stderr, "+putg%.6lul (%lu), cutg%.6lul (%lu)\n", (pv>>1) + 1, pv&1, (cv>>1) + 1, cv&1);
                fprintf(stderr, "+p-occ: %u, c-occ: %u\n", asg_arc_n(x->ug->g, pv), asg_arc_n(cug->g, cv));
                fprintf(stderr, "+ap[k]-utg%.6ul (%u), new-utg%.6lul (%lu)\n", (ap[k].v>>1)+1, ap[k].v&1, 
                                (new_node(ap[k].v, join, idx, 0)>>1)+1, new_node(ap[k].v, join, idx, 0)&1);
                for (m = 0; m < asg_arc_n(cug->g, cv); m++)
                {
                    fprintf(stderr, "+ac[%lu]-utg%.6ul (%u)\n", m, (ac[m].v>>1) + 1, ac[m].v&1);
                }
            }
        }
        


        pv = (i<<1) + 1;
        cv = new_node(pv, join, idx, 1);
        if(asg_arc_n(x->ug->g, pv) != asg_arc_n(cug->g, cv)) fprintf(stderr, "ERROR-1\n");
        ap = asg_arc_a(x->ug->g, pv); ac = asg_arc_a(cug->g, cv);
        for (k = 0; k < asg_arc_n(x->ug->g, pv); k++)
        {
            for (m = 0; m < asg_arc_n(cug->g, cv); m++)
            {
                if(new_node(ap[k].v, join, idx, 0) == ac[m].v) break;
            }
            if(m >= asg_arc_n(cug->g, cv))
            {
                fprintf(stderr, "\n-ERROR-2\n");
                fprintf(stderr, "-putg%.6lul (%lu), cutg%.6lul (%lu)\n", (pv>>1) + 1, pv&1, (cv>>1) + 1, cv&1);
                fprintf(stderr, "-p-occ: %u, c-occ: %u\n", asg_arc_n(x->ug->g, pv), asg_arc_n(cug->g, cv));
                fprintf(stderr, "-ap[k]-utg%.6ul (%u), new-utg%.6lul (%lu)\n", (ap[k].v>>1)+1, ap[k].v&1, 
                                (new_node(ap[k].v, join, idx, 0)>>1)+1, new_node(ap[k].v, join, idx, 0)&1);
                for (m = 0; m < asg_arc_n(cug->g, cv); m++)
                {
                    fprintf(stderr, "-ac[%lu]-utg%.6ul (%u)\n", m, (ac[m].v>>1) + 1, ac[m].v&1);
                }
            }
        }

        pb.b.n = cb.b.n = 0;
        if(get_unitig(x->ug->g, NULL, i<<1, &p_cvx, &p_nodeLen, &p_baseLen, &t1, &t2, 1, &pb) !=
           get_unitig(cug->g, NULL, new_node((i<<1)+1, join, idx, 1)^1, &c_cvx, &c_nodeLen, &c_baseLen, &t1, &t2, 1, &cb))
        {
            fprintf(stderr, "ERROR-3\n");
        }
        if(new_node(p_cvx, join, idx, 1) != c_cvx) fprintf(stderr, "ERROR-4\n");
        if(p_baseLen != c_baseLen)
        {
            fprintf(stderr, "ERROR-6\n");
            fprintf(stderr, "-putg%.6lul, pb.b.n: %u, p_nodeLen: %lld, p_baseLen: %lld, cb.b.n: %u, c_nodeLen: %lld, c_baseLen: %lld\n", 
            i+1, (uint32_t)pb.b.n, p_nodeLen, p_baseLen, (uint32_t)cb.b.n, c_nodeLen, c_baseLen);
        } 
        
        

        pui = pri = cui = cri = 0;
        while(1)
        {
            pr = iter_rid(&pb, &pui, &pri, x->ug);
            cr = iter_rid(&cb, &cui, &cri, cug);
            if(pr != cr) fprintf(stderr, "ERROR-7\n");
            if(pr == (uint32_t)-1 || cr == (uint32_t)-1) break;
        }
    }

    for (i = 0; i < x->k_trans.n; i++)
    {
        pk = &(x->k_trans.a[i]);
        if(((uint32_t)idx[pk->qn]) <= 1 && ((uint32_t)idx[pk->tn]) <= 1)
        {
            get_u_trans_spec(ck_trans, ((uint32_t)join->a[idx[pk->qn]>>32].dp), 
            ((uint32_t)join->a[idx[pk->tn]>>32].dp), &ck, &occ);
            if(occ != 1 || !ck) fprintf(stderr, "ERROR-8\n");

            if(pk->qs != ck->qs || pk->qe != ck->qe || pk->ts != ck->ts || pk->te != ck->te ||
               pk->f != ck->f || pk->rev != ck->rev || pk->del != ck->del)
            {
                fprintf(stderr, "ERROR-9\n");
            }
        }
        else
        {
            p = pk;
            fprintf(stderr, "\n+q-utg%.6ul\tqs(%u)\tqe(%u)\tt-utg%.6ul\tts(%u)\tte(%u)\trev(%u)\tw(%f)\tf(%u)\n", 
            p->qn+1, p->qs, p->qe, p->tn+1, p->ts, p->te, p->rev, p->nw, p->f);

            uint64_t qi, ti, qid = p->qn, tid = p->tn;
            for (qi = 0; qi < (uint32_t)idx[qid]; qi++)
            {                
                for (ti = 0; ti < (uint32_t)idx[tid]; ti++)
                {
                    get_u_trans_spec(ck_trans, (uint32_t)(join->a[(idx[qid]>>32)+qi].dp),
                    (uint32_t)(join->a[(idx[tid]>>32)+ti].dp), &ck, &occ);
                    // fprintf(stderr, "s-utg%.6ul\td-utg%.6ul\tocc:%u\n", 
                    // (uint32_t)(join->a[(idx[qid]>>32)+qi].dp)+1,
                    // (uint32_t)(join->a[(idx[tid]>>32)+ti].dp)+1,
                    // occ);
                    for (k = 0; k < occ; k++)
                    {
                        p = &(ck[k]);
                        fprintf(stderr, "-q-utg%.6ul\tqs(%u)\tqe(%u)\tt-utg%.6ul\tts(%u)\tte(%u)\trev(%u)\tw(%f)\tf(%u)\n", 
                        p->qn+1, p->qs, p->qe, p->tn+1, p->ts, p->te, p->rev, p->nw, p->f);
                    }
                }
                
            }
            
            
            // get_u_trans_spec(ck_trans, ((uint32_t)join->a[idx[pk->qn]>>32].dp), 
            // ((uint32_t)join->a[idx[pk->tn]>>32].dp), &ck, &occ);
            // for (k = 0; k < occ; k++)
            // {
            //     p = &(ck[k]);
            //     fprintf(stderr, "-q-utg%.6ul\tqs(%u)\tqe(%u)\tt-utg%.6ul\tts(%u)\tte(%u)\trev(%u)\tw(%f)\tf(%u)\n", 
            //     p->qn+1, p->qs, p->qe, p->tn+1, p->ts, p->te, p->rev, p->nw, p->f);
            // }
        }
    }

    free(pb.b.a); free(cb.b.a);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %r9, %rbx
movq %r8, %r14
movq %rcx, 0x90(%rsp)
movq %rsi, %r15
movq %rdi, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x160(%rsp)
movaps %xmm0, 0x170(%rsp)
movaps %xmm0, 0x180(%rsp)
movaps %xmm0, 0x190(%rsp)
movaps %xmm0, 0x1a0(%rsp)
movaps %xmm0, 0x1b0(%rsp)
andq $0x0, 0x1c0(%rsp)
movaps %xmm0, 0xf0(%rsp)
movaps %xmm0, 0x100(%rsp)
movaps %xmm0, 0x110(%rsp)
movaps %xmm0, 0x120(%rsp)
movaps %xmm0, 0x130(%rsp)
movaps %xmm0, 0x140(%rsp)
andq $0x0, 0x150(%rsp)
movq 0x18(%rsi), %rax
movq %rax, 0x8(%rsp)
movl 0x14(%rax), %ebp
leal (,%rbp,2), %eax
movslq %eax, %rdi
pushq $0x4
popq %rsi
callq 0x2120
movq %rax, %r12
xorl %r13d, %r13d
movq %r14, 0x20(%rsp)
movq %r15, 0x18(%rsp)
leal (,%rbp,2), %eax
cltq
cmpq %rax, %r13
jae 0x130cb3
movq 0x8(%rsp), %rsi
movq 0x28(%rsi), %rax
movq (%rax,%r13,8), %rax
testl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
je 0x130cab
movq 0x8(%rsi), %rcx
movq %rax, %rdx
shrq $0x20, %rdx
movl %eax, %eax
imulq $0x18, %rax, %rax
imulq $0x18, %rdx, %rdx
leaq (%rcx,%rdx), %rbp
addq $0x8, %rbp
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x130c50
movl (%rbp,%rcx), %edx
incl (%r12,%rdx,4)
addq $0x18, %rcx
jmp 0x130c3d
xorl %r15d, %r15d
movq 0x28(%rsi), %rax
movl (%rax,%r13,8), %eax
cmpq %rax, %r15
jae 0x130c99
movl (%rbp), %eax
decl (%r12,%rax,4)
jne 0x130c72
incq %r15
addq $0x18, %rbp
jmp 0x130c53
movq 0x122367(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0xb833b(%rip), %rdi     # 0x1e8fbe
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rsi
jmp 0x130c69
movq %rsi, 0x8(%rsp)
movl 0x14(%rsi), %ebp
movq 0x20(%rsp), %r14
movq 0x18(%rsp), %r15
incq %r13
jmp 0x130bf4
movq %r12, %rdi
callq 0x2220
xorl %r13d, %r13d
pushq $0x9
popq %rbp
pushq $0x1
popq %r12
movq 0x8(%rsp), %r8
movl 0x4(%r8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq %rax, %r13
jae 0x130d4f
imulq $0x18, %r13, %rcx
movq 0x8(%r8), %rdx
movq 0x28(%r8), %rsi
movl 0x4(%rdx,%rcx), %eax
movl 0x8(%rdx,%rcx), %ecx
xorq $0x1, %rcx
movq (%rsi,%rcx,8), %rcx
movl %ecx, %esi
movq %rcx, %rdi
shrq $0x20, %rdi
imulq $0x18, %rsi, %rcx
imulq $0x18, %rdi, %rsi
addq %rsi, %rdx
addq $0x8, %rdx
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x130d2d
movl (%rdx,%rsi), %edi
xorl %eax, %edi
cmpl $0x1, %edi
je 0x130d23
addq $0x18, %rsi
jmp 0x130d0e
cmpq %rsi, %rcx
je 0x130d2d
incq %r13
jmp 0x130cca
movq 0x1222ac(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0xbe6a2(%rip), %rdi     # 0x1ef3e0
movq %rbp, %rsi
movq %r12, %rdx
callq 0x2410
movq 0x18(%r15), %r8
jmp 0x130d28
movq $0x0, 0x38(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rax), %r12
movl 0x14(%r12), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq 0x38(%rsp), %rcx
cmpq %rax, %rcx
jae 0x131548
movq %rcx, %rax
leaq (%rcx,%rcx), %rdi
movq %rdi, 0x48(%rsp)
movq %r14, %rsi
movq %rbx, %rdx
pushq $0x1
popq %rcx
movq %rax, %r14
callq 0x130a90
movq %rax, %rbp
movq 0x28(%r12), %rcx
movq %r14, %rax
shlq $0x4, %rax
movq (%rcx,%rax), %rsi
movq 0x18(%r15), %r13
movq 0x28(%r13), %rax
movq (%rax,%rbp,8), %rax
cmpl %eax, %esi
jne 0x1313fc
movq %rcx, 0x68(%rsp)
movq %rsi, %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
movq %r12, 0x40(%rsp)
addq 0x8(%r12), %rcx
movq %rcx, 0x80(%rsp)
movq 0x8(%r13), %rcx
shrq $0x20, %rax
incq %r14
movq %r14, 0x38(%rsp)
movl %ebp, %edx
shrl %edx
incq %rdx
movq %rdx, 0x30(%rsp)
movl %ebp, %edx
andl $0x1, %edx
movq %rdx, 0x78(%rsp)
imulq $0x18, %rax, %rax
leaq (%rcx,%rax), %r15
addq $0x8, %r15
xorl %ecx, %ecx
movq %rbp, %r14
movq %rbp, 0x50(%rsp)
movl %esi, %eax
cmpq %rax, %rcx
jae 0x130fe7
movq %rsi, 0x58(%rsp)
movq %r13, 0x8(%rsp)
movq 0x28(%r13), %rax
movl (%rax,%r14,8), %eax
movq %rcx, 0x60(%rsp)
imulq $0x18, %rcx, %rcx
movq 0x80(%rsp), %rdx
leaq (%rdx,%rcx), %rbp
addq $0x8, %rbp
imulq $0x18, %rax, %r13
addq $0x18, %r13
xorl %r14d, %r14d
leaq 0x18(%r14), %r12
cmpq %r12, %r13
je 0x130e9c
movl (%rbp), %edi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x130a90
cmpl (%r15,%r14), %eax
movq %r12, %r14
jne 0x130e5f
movq 0x8(%rsp), %r13
movq 0x50(%rsp), %r14
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rcx
incq %rcx
jmp 0x130e1e
movq 0x12213d(%rip), %r14    # 0x252fe0
movq (%r14), %rcx
leaq 0xbe53d(%rip), %rdi     # 0x1ef3ea
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
movq (%r14), %rdi
leaq 0xbe533(%rip), %rsi     # 0x1ef3f5
movq 0x38(%rsp), %rdx
xorl %ecx, %ecx
movq 0x30(%rsp), %r8
movq 0x78(%rsp), %r9
xorl %eax, %eax
callq 0x22b0
movq (%r14), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movq 0x48(%rsp), %rcx
movl (%rax,%rcx,8), %edx
movq 0x18(%rsp), %r12
movq 0x18(%r12), %rax
movq 0x28(%rax), %rax
movq 0x50(%rsp), %r13
movl (%rax,%r13,8), %ecx
leaq 0xbe507(%rip), %rsi     # 0x1ef41a
xorl %eax, %eax
callq 0x22b0
movq (%r14), %rax
movq %rax, 0x8(%rsp)
movq %r13, %r14
movl (%rbp), %edi
movl %edi, %r13d
shrl %r13d
incl %r13d
movl %edi, %ebp
andl $0x1, %ebp
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x130a90
movl %eax, %r8d
shrl %r8d
incq %r8
andl $0x1, %eax
movq 0x8(%rsp), %rdi
leaq 0xbe4d4(%rip), %rsi     # 0x1ef431
movl %r13d, %edx
movl %ebp, %ecx
movq %rax, %r9
xorl %eax, %eax
callq 0x22b0
movq %r15, %rcx
xorl %ebp, %ebp
movq 0x18(%r12), %r13
movq 0x28(%r13), %rax
movl (%rax,%r14,8), %eax
cmpq %rax, %rbp
jae 0x130fc0
movq 0x122056(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
movl (%rcx), %r8d
movq %rcx, %r12
movl %r8d, %ecx
shrl %ecx
incl %ecx
andl $0x1, %r8d
leaq 0xbe4b7(%rip), %rsi     # 0x1ef45c
movq %rbp, %rdx
xorl %eax, %eax
callq 0x22b0
movq %r12, %rcx
incq %rbp
addq $0x18, %rcx
movq 0x18(%rsp), %r12
jmp 0x130f71
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x28(%rax), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x68(%rsp)
movl (%rcx,%rax,8), %esi
jmp 0x130e92
movq 0x48(%rsp), %r15
movq %r15, %rdi
orq $0x1, %rdi
movq %rdi, 0x30(%rsp)
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
pushq $0x1
popq %r14
movq %r14, %rcx
callq 0x130a90
movq %rax, %r12
movq 0x68(%rsp), %rax
movq 0x8(%rax,%r15,8), %rsi
movq 0x28(%r13), %rax
movq (%rax,%r12,8), %rax
cmpl %eax, %esi
jne 0x131443
movq %rsi, %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rdx
movq 0x40(%rsp), %rcx
addq 0x8(%rcx), %rdx
movq %rdx, 0x80(%rsp)
movq 0x8(%r13), %rcx
shrq $0x20, %rax
movl %r12d, %edx
shrl %edx
incq %rdx
movq %rdx, 0x68(%rsp)
movl %r12d, %edx
andl $0x1, %edx
movq %rdx, 0x78(%rsp)
imulq $0x18, %rax, %rax
leaq (%rcx,%rax), %r15
addq $0x8, %r15
xorl %ecx, %ecx
movq %r12, %r14
movq %r12, 0x50(%rsp)
movl %esi, %eax
cmpq %rax, %rcx
jae 0x131244
movq %rsi, 0x58(%rsp)
movq %r13, 0x8(%rsp)
movq 0x28(%r13), %rax
movl (%rax,%r14,8), %eax
movq %rcx, 0x60(%rsp)
imulq $0x18, %rcx, %rcx
movq 0x80(%rsp), %rdx
leaq (%rdx,%rcx), %rbp
addq $0x8, %rbp
imulq $0x18, %rax, %r13
addq $0x18, %r13
xorl %r12d, %r12d
leaq 0x18(%r12), %r14
cmpq %r14, %r13
je 0x1310fa
movl (%rbp), %edi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x130a90
cmpl (%r15,%r12), %eax
movq %r14, %r12
jne 0x1310bc
movq 0x8(%rsp), %r13
movq 0x50(%rsp), %r14
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rcx
incq %rcx
jmp 0x13107b
movq 0x121edf(%rip), %r14    # 0x252fe0
movq (%r14), %rcx
leaq 0xbe369(%rip), %rdi     # 0x1ef474
pushq $0xa
popq %rsi
pushq $0x1
popq %r12
movq %r12, %rdx
callq 0x2410
movq (%r14), %rdi
leaq 0xbe35b(%rip), %rsi     # 0x1ef47f
movq 0x38(%rsp), %rdx
movq %r12, %rcx
movq 0x68(%rsp), %r8
movq 0x78(%rsp), %r9
xorl %eax, %eax
callq 0x22b0
movq (%r14), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movq 0x30(%rsp), %rcx
movl (%rax,%rcx,8), %edx
movq 0x18(%rsp), %r12
movq 0x18(%r12), %rax
movq 0x28(%rax), %rax
movq 0x50(%rsp), %r13
movl (%rax,%r13,8), %ecx
leaq 0xbe32e(%rip), %rsi     # 0x1ef4a4
xorl %eax, %eax
callq 0x22b0
movq (%r14), %rax
movq %rax, 0x8(%rsp)
movq %r13, %r14
movl (%rbp), %edi
movl %edi, %ebp
shrl %ebp
incl %ebp
movl %edi, %r13d
andl $0x1, %r13d
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x130a90
movl %eax, %r8d
shrl %r8d
incq %r8
andl $0x1, %eax
movq 0x8(%rsp), %rdi
leaq 0xbe2fc(%rip), %rsi     # 0x1ef4bb
movl %ebp, %edx
movl %r13d, %ecx
movq %rax, %r9
xorl %eax, %eax
callq 0x22b0
movq %r15, %rcx
xorl %ebp, %ebp
movq 0x18(%r12), %r13
movq 0x28(%r13), %rax
movl (%rax,%r14,8), %eax
cmpq %rax, %rbp
jae 0x131222
movq 0x121df4(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
movl (%rcx), %r8d
movq %rcx, %r12
movl %r8d, %ecx
shrl %ecx
incl %ecx
andl $0x1, %r8d
leaq 0xbe2df(%rip), %rsi     # 0x1ef4e6
movq %rbp, %rdx
xorl %eax, %eax
callq 0x22b0
movq %r12, %rcx
incq %rbp
addq $0x18, %rcx
movq 0x18(%rsp), %r12
jmp 0x1311d3
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x28(%rax), %rax
movq 0x30(%rsp), %rcx
movl (%rax,%rcx,8), %esi
jmp 0x1310f0
andq $0x0, 0x128(%rsp)
andq $0x0, 0x198(%rsp)
movq 0x40(%rsp), %rdi
xorl %esi, %esi
movq 0x48(%rsp), %rdx
leaq 0x8c(%rsp), %rcx
leaq 0xc8(%rsp), %r8
leaq 0xa0(%rsp), %r9
leaq 0x160(%rsp), %rax
pushq %rax
pushq $0x1
popq %rbp
pushq %rbp
leaq 0xc8(%rsp), %rax
pushq %rax
leaq 0xd8(%rsp), %rax
pushq %rax
callq 0xc2ebf
addq $0x20, %rsp
movl %eax, 0x8(%rsp)
movq 0x18(%rsp), %r15
movq 0x18(%r15), %r12
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %r14
movq %r14, %rsi
movq %rbx, %rdx
pushq $0x1
popq %r13
movq %r13, %rcx
callq 0x130a90
xorl %ebp, %eax
movq %r12, %rdi
xorl %esi, %esi
movl %eax, %edx
leaq 0x88(%rsp), %rcx
leaq 0xb0(%rsp), %r8
leaq 0x98(%rsp), %r9
leaq 0xf0(%rsp), %rax
pushq %rax
pushq %rbp
leaq 0xc8(%rsp), %rax
pushq %rax
leaq 0xd8(%rsp), %rax
pushq %rax
callq 0xc2ebf
addq $0x20, %rsp
cmpl %eax, 0x8(%rsp)
jne 0x131493
movl 0x8c(%rsp), %edi
movq %r14, %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq 0x130a90
cmpl 0x88(%rsp), %eax
jne 0x1314b4
movq 0xa0(%rsp), %rax
cmpq 0x98(%rsp), %rax
jne 0x1314d5
andq $0x0, 0xd0(%rsp)
andq $0x0, 0xd8(%rsp)
andq $0x0, 0xe0(%rsp)
andq $0x0, 0xe8(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rcx
leaq 0x160(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
leaq 0xe0(%rsp), %rdx
callq 0x130ada
movl %eax, %ebp
leaq 0xf0(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
leaq 0xd0(%rsp), %rdx
movq %r15, %rcx
callq 0x130ada
movl %eax, %r12d
cmpl %eax, %ebp
jne 0x1313de
cmpl $-0x1, %ebp
je 0x130d58
cmpl $-0x1, %r12d
movq 0x10(%rsp), %rax
jne 0x13137c
jmp 0x130d5d
movq 0x121bfb(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0xb7bbd(%rip), %rdi     # 0x1e8fac
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0x1313c5
movq 0x121bdd(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0xb895a(%rip), %rdi     # 0x1e9d67
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rax), %r12
movq 0x28(%r12), %rcx
movq 0x48(%rsp), %rax
movq (%rcx,%rax,8), %rsi
movq 0x18(%r15), %r13
movq 0x28(%r13), %rax
movq (%rax,%rbp,8), %rax
jmp 0x130dc0
movq 0x121b96(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0xb8913(%rip), %rdi     # 0x1e9d67
pushq $0x8
popq %rsi
movq %r14, %rdx
callq 0x2410
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x28(%rax), %rax
movq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x18(%rsp), %rax
movq 0x18(%rax), %r13
movq 0x28(%r13), %rax
movq (%rax,%r12,8), %rax
jmp 0x131029
movq 0x121b46(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0xb7acf(%rip), %rdi     # 0x1e8f73
pushq $0x8
popq %rsi
movq %r13, %rdx
callq 0x2410
jmp 0x13131b
movq 0x121b25(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0xbe039(%rip), %rdi     # 0x1ef4fe
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0x13133d
movq 0x121b04(%rip), %r15    # 0x252fe0
movq (%r15), %rcx
leaq 0xb7abd(%rip), %rdi     # 0x1e8fa3
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
movq (%r15), %rdi
movq 0x18(%rsp), %r15
movl 0x198(%rsp), %ecx
movq 0xc8(%rsp), %r8
movq 0xa0(%rsp), %r9
movl 0x128(%rsp), %r10d
subq $0x8, %rsp
leaq 0xbdfe4(%rip), %rsi     # 0x1ef507
movq 0x40(%rsp), %rdx
xorl %eax, %eax
pushq 0xa0(%rsp)
pushq 0xc0(%rsp)
pushq %r10
callq 0x22b0
addq $0x20, %rsp
jmp 0x131353
xorl %ecx, %ecx
movq %rbx, 0xa8(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x60(%rax), %rcx
jae 0x1317e4
movq 0x70(%rax), %rax
movq %rcx, 0x58(%rsp)
imulq $0x30, %rcx, %rcx
leaq (%rax,%rcx), %r12
movl 0x8(%rax,%rcx), %edx
movl 0x14(%rax,%rcx), %r9d
movq (%rbx,%rdx,8), %rax
testl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jne 0x13163e
movq (%rbx,%r9,8), %rcx
testl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
jne 0x13163e
movq (%r14), %rdx
shrq $0x20, %rax
imulq $0x18, %rax, %rax
movl 0x10(%rdx,%rax), %esi
shrq $0x20, %rcx
imulq $0x18, %rcx, %rax
movl 0x10(%rdx,%rax), %edx
movq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rcx
leaq 0x2c(%rsp), %r8
callq 0x8feef
cmpl $0x1, 0x2c(%rsp)
jne 0x1317be
movq 0x70(%rsp), %rax
testq %rax, %rax
je 0x1317be
movl (%r12), %ecx
cmpl (%rax), %ecx
jne 0x131615
movl 0x4(%r12), %ecx
cmpl 0x4(%rax), %ecx
jne 0x131615
movl 0xc(%r12), %ecx
cmpl 0xc(%rax), %ecx
jne 0x131615
movl 0x10(%r12), %ecx
cmpl 0x10(%rax), %ecx
jne 0x131615
movb 0x28(%r12), %cl
cmpb 0x28(%rax), %cl
je 0x131631
movq 0x1219c4(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0xb7998(%rip), %rdi     # 0x1e8fbe
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
movq 0x58(%rsp), %rcx
incq %rcx
jmp 0x131552
movq 0x12199b(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
incl %edx
movl (%r12), %ecx
movl 0x4(%r12), %r8d
incl %r9d
movl 0xc(%r12), %r10d
movl 0x10(%r12), %r11d
movzbl 0x28(%r12), %r14d
movl %r14d, %r15d
shrl $0x6, %r15d
andl $0x1, %r15d
movsd 0x20(%r12), %xmm0
andl $0x3f, %r14d
leaq 0xbdeed(%rip), %rsi     # 0x1ef570
movb $0x1, %al
pushq %r14
pushq %r15
movq 0x30(%rsp), %r14
pushq %r11
pushq %r10
callq 0x22b0
addq $0x20, %rsp
movl 0x8(%r12), %eax
movq %rax, 0x8(%rsp)
movl 0x14(%r12), %eax
movq %rax, 0x60(%rsp)
xorl %esi, %esi
movq 0x8(%rsp), %rax
movl (%rbx,%rax,8), %eax
cmpq %rax, %rsi
jae 0x131631
xorl %r12d, %r12d
movq 0x60(%rsp), %rax
movq (%rbx,%rax,8), %rax
movl %eax, %ecx
cmpq %rcx, %r12
jae 0x1317b6
movq (%r14), %rcx
movq 0x8(%rsp), %rdx
movl 0x4(%rbx,%rdx,8), %edx
imulq $0x18, %rdx, %rdx
addq %rcx, %rdx
movq %rsi, %rbx
imulq $0x18, %rsi, %rsi
movl 0x10(%rsi,%rdx), %esi
shrq $0x20, %rax
imulq $0x18, %rax, %rax
addq %rcx, %rax
imulq $0x18, %r12, %rcx
movl 0x10(%rcx,%rax), %edx
movq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rcx
leaq 0x2c(%rsp), %r8
callq 0x8feef
xorl %r15d, %r15d
xorl %r13d, %r13d
movl 0x2c(%rsp), %eax
cmpq %rax, %r13
jae 0x13179e
movq 0x70(%rsp), %rax
movq 0x1218a4(%rip), %rcx    # 0x252fe0
movq (%rcx), %rdi
movl 0x8(%rax,%r15), %edx
incl %edx
movl (%rax,%r15), %ecx
movl 0x4(%rax,%r15), %r8d
movl 0x14(%rax,%r15), %r9d
incl %r9d
movl 0xc(%rax,%r15), %r10d
movl 0x10(%rax,%r15), %r11d
movzbl 0x28(%rax,%r15), %ebp
movl %ebp, %r14d
shrl $0x6, %r14d
andl $0x1, %r14d
movsd 0x20(%rax,%r15), %xmm0
andl $0x3f, %ebp
leaq 0xbde36(%rip), %rsi     # 0x1ef5b9
movb $0x1, %al
pushq %rbp
pushq %r14
pushq %r11
pushq %r10
callq 0x22b0
addq $0x20, %rsp
incq %r13
addq $0x30, %r15
jmp 0x131727
incq %r12
movq 0x20(%rsp), %r14
movq %rbx, %rsi
movq 0xa8(%rsp), %rbx
jmp 0x1316c5
incq %rsi
jmp 0x1316b1
movq 0x12181b(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0xb77e6(%rip), %rdi     # 0x1e8fb5
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
movq 0x70(%rsp), %rax
jmp 0x1315e5
movq 0x1a8(%rsp), %rdi
callq 0x2220
movq 0x138(%rsp), %rdi
callq 0x2220
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq