// File: /workspace/github_cpp_makefile_star2_O1/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 $0x1a8, %rsp            # imm = 0x1A8
movq %r9, 0x18(%rsp)
movq %r8, 0x20(%rsp)
movq %rcx, 0x88(%rsp)
movq %rdi, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x130(%rsp)
movaps %xmm0, 0x140(%rsp)
movaps %xmm0, 0x150(%rsp)
movaps %xmm0, 0x160(%rsp)
movaps %xmm0, 0x170(%rsp)
movaps %xmm0, 0x180(%rsp)
xorl %eax, %eax
movq %rax, 0x190(%rsp)
movaps %xmm0, 0xc0(%rsp)
movaps %xmm0, 0xd0(%rsp)
movaps %xmm0, 0xe0(%rsp)
movaps %xmm0, 0xf0(%rsp)
movaps %xmm0, 0x100(%rsp)
movaps %xmm0, 0x110(%rsp)
movq %rax, 0x120(%rsp)
leaq 0x18(%rsi), %rax
movq %rax, 0x8(%rsp)
movq %rsi, 0x80(%rsp)
movq 0x18(%rsi), %rbx
movl 0x14(%rbx), %r14d
leal (%r14,%r14), %eax
movslq %eax, %rdi
movl $0x4, %esi
callq 0x2120
movq %rax, %r15
testl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
je 0x16df99
xorl %r14d, %r14d
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rdx
testl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
je 0x16df7e
movq 0x8(%rbx), %rax
movq %rdx, %rcx
shrq $0x20, %rcx
andq %r12, %rdx
je 0x16df2f
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rdx
leaq (%rcx,%rcx,2), %rsi
leaq (%rax,%rsi,8), %rsi
addq $0x8, %rsi
xorl %edi, %edi
movl (%rsi,%rdi), %r8d
incl (%r15,%r8,4)
addq $0x18, %rdi
cmpq %rdi, %rdx
jne 0x16df1e
movq 0x8(%rsp), %rdx
movq (%rdx), %rdx
movq 0x28(%rdx), %rdx
cmpl $0x0, (%rdx,%r14,8)
je 0x16df7e
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %rbx
addq $0x8, %rbx
xorl %r13d, %r13d
movl (%rbx), %eax
decl (%r15,%rax,4)
jne 0x16df77
incq %r13
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movl (%rax,%r14,8), %eax
addq $0x18, %rbx
cmpq %rax, %r13
jb 0x16df51
jmp 0x16df7e
callq 0x226d4
jmp 0x16df59
incq %r14
movq 0x8(%rsp), %rax
movq (%rax), %rbx
movl 0x14(%rbx), %eax
addl %eax, %eax
cltq
cmpq %rax, %r14
jb 0x16dee4
movq %r15, %rdi
callq 0x2220
movq 0x8(%rsp), %rax
movq (%rax), %rax
testl $0x7fffffff, 0x4(%rax)  # imm = 0x7FFFFFFF
movq 0x20(%rsp), %r13
movq 0x10(%rsp), %r8
je 0x16e047
xorl %r14d, %r14d
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movq 0x8(%rax), %rcx
movq 0x28(%rax), %rax
leaq (%r14,%r14,2), %rdx
movl 0x8(%rcx,%rdx,8), %esi
xorq $0x1, %rsi
movq (%rax,%rsi,8), %rsi
movq %rsi, %rax
andq %r15, %rax
je 0x16e019
movl 0x4(%rcx,%rdx,8), %edx
shrq $0x20, %rsi
leaq (%rsi,%rsi,2), %rsi
leaq (%rcx,%rsi,8), %rsi
addq $0x8, %rsi
xorl %ecx, %ecx
movl (%rsi), %edi
xorl %edx, %edi
cmpl $0x1, %edi
je 0x16e01b
incq %rcx
addq $0x18, %rsi
cmpq %rcx, %rax
jne 0x16dfff
movq %rax, %rcx
jmp 0x16e01b
xorl %ecx, %ecx
cmpq %rax, %rcx
je 0x16e03b
incq %r14
movq 0x8(%rsp), %rax
movq (%rax), %rax
movl 0x4(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpq %rcx, %r14
jb 0x16dfc9
jmp 0x16e047
callq 0x226f0
movq 0x10(%rsp), %r8
jmp 0x16e020
movq (%r8), %rax
movq 0x18(%rax), %rbx
testl $0x7fffffff, 0x14(%rbx) # imm = 0x7FFFFFFF
je 0x16e7e3
xorl %r14d, %r14d
leaq (%r14,%r14), %rbp
movl $0x1, %ecx
movq %rbp, %rdi
movq %r13, %rsi
movq 0x18(%rsp), %rdx
callq 0x16dd59
movq %rax, %r13
movq 0x28(%rbx), %rax
movq %r14, 0x38(%rsp)
movq %r14, %rcx
shlq $0x4, %rcx
movl (%rax,%rcx), %eax
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
movq 0x28(%rcx), %rcx
cmpl (%rcx,%r13,8), %eax
jne 0x16e745
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rbx
movq (%rbx,%rbp,8), %rcx
testl %ecx, %ecx
movq %rbp, 0x70(%rsp)
je 0x16e2c5
shrq $0x20, %rcx
leaq (%rcx,%rcx,2), %r15
shlq $0x3, %r15
addq 0x8(%rax), %r15
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq 0x28(%rax), %rax
movq (%rax,%r13,8), %rax
shrq $0x20, %rax
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rdx
movq %rdx, 0x30(%rsp)
movq 0x38(%rsp), %rdx
incq %rdx
movq %rdx, 0x60(%rsp)
movl %r13d, %edx
shrl %edx
incq %rdx
movq %rdx, 0x58(%rsp)
movl %r13d, %edx
andl $0x1, %edx
movq %rdx, 0x50(%rsp)
leaq (%rcx,%rax,8), %rax
addq $0x20, %rax
movq %rax, 0x40(%rsp)
xorl %r12d, %r12d
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movl (%rax,%r13,8), %ebx
leaq (%r12,%r12,2), %r14
testq %rbx, %rbx
setne %bpl
je 0x16e1c1
movl 0x8(%r15,%r14,8), %edi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
xorl %ecx, %ecx
callq 0x16dd59
movq 0x10(%rsp), %r8
movq 0x30(%rsp), %rcx
movl 0x8(%rcx), %ecx
cmpq %rcx, %rax
je 0x16e198
leaq -0x1(%rbx), %rcx
movq 0x40(%rsp), %rsi
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x16e1c1
leaq 0x18(%rsi), %rdi
incq %rdx
cmpl (%rsi), %eax
movq %rdi, %rsi
jne 0x16e17e
cmpq %rbx, %rdx
setb %bpl
testb %bpl, %bpl
je 0x16e1c1
incq %r12
movq (%r8), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rbx
movq 0x70(%rsp), %rbp
movl (%rbx,%rbp,8), %eax
cmpq %rax, %r12
jb 0x16e12e
jmp 0x16e2c5
movq 0x11be18(%rip), %rbp    # 0x289fe0
movq (%rbp), %rcx
movl $0xa, %esi
movl $0x1, %edx
leaq 0xc30fd(%rip), %rdi     # 0x2312da
callq 0x2410
movq (%rbp), %rdi
leaq 0xc30f8(%rip), %rsi     # 0x2312e5
movq 0x60(%rsp), %rdx
xorl %ecx, %ecx
movq 0x58(%rsp), %r8
movq 0x50(%rsp), %r9
xorl %eax, %eax
callq 0x22b0
movq (%rbp), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movq 0x70(%rsp), %rcx
movl (%rax,%rcx,8), %edx
movq 0x8(%rsp), %rbx
movq (%rbx), %rax
movq 0x28(%rax), %rax
movl (%rax,%r13,8), %ecx
leaq 0xc30d2(%rip), %rsi     # 0x23130a
xorl %eax, %eax
callq 0x22b0
movq (%rbp), %rax
movq %rax, 0x68(%rsp)
movl 0x8(%r15,%r14,8), %edi
movl %edi, %ebp
shrl %ebp
incl %ebp
movl %edi, %r14d
andl $0x1, %r14d
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
xorl %ecx, %ecx
callq 0x16dd59
movl %eax, %r8d
shrl %r8d
incq %r8
andl $0x1, %eax
movq 0x68(%rsp), %rdi
leaq 0xc309e(%rip), %rsi     # 0x231321
movl %ebp, %edx
movl %r14d, %ecx
movq %rax, %r9
xorl %eax, %eax
callq 0x22b0
movq 0x10(%rsp), %r8
movq (%rbx), %rax
movq 0x28(%rax), %rax
cmpl $0x0, (%rax,%r13,8)
je 0x16e19d
movq 0x30(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
callq 0x2272e
movq 0x10(%rsp), %r8
jmp 0x16e19d
movq %rbp, %r14
orq $0x1, %r14
movl $0x1, %ecx
movq %r14, %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x16dd59
movq %rax, %r12
movl 0x8(%rbx,%rbp,8), %eax
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
movq 0x28(%rcx), %rcx
cmpl (%rcx,%r12,8), %eax
jne 0x16e74f
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rdi
movq 0x28(%rdi), %rax
movq (%rax,%r14,8), %rax
testl %eax, %eax
movq %r14, 0x30(%rsp)
je 0x16e52b
shrq $0x20, %rax
leaq (%rax,%rax,2), %r13
shlq $0x3, %r13
addq 0x8(%rdi), %r13
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq 0x28(%rax), %rax
movq (%rax,%r12,8), %rax
shrq $0x20, %rax
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rdx
movq %rdx, 0x40(%rsp)
movq 0x38(%rsp), %rdx
incq %rdx
movq %rdx, 0x58(%rsp)
movl %r12d, %edx
shrl %edx
incq %rdx
movq %rdx, 0x50(%rsp)
movl %r12d, %edx
andl $0x1, %edx
movq %rdx, 0xa0(%rsp)
leaq (%rcx,%rax,8), %rax
addq $0x20, %rax
movq %rax, 0x68(%rsp)
xorl %r14d, %r14d
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movl (%rax,%r12,8), %ebx
leaq (%r14,%r14,2), %r15
testq %rbx, %rbx
setne %bpl
je 0x16e421
movl 0x8(%r13,%r15,8), %edi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
xorl %ecx, %ecx
callq 0x16dd59
movq 0x10(%rsp), %r8
movq 0x40(%rsp), %rcx
movl 0x8(%rcx), %ecx
cmpq %rcx, %rax
je 0x16e3f8
leaq -0x1(%rbx), %rcx
movq 0x68(%rsp), %rsi
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x16e421
leaq 0x18(%rsi), %rdi
incq %rdx
cmpl (%rsi), %eax
movq %rdi, %rsi
jne 0x16e3de
cmpq %rbx, %rdx
setb %bpl
testb %bpl, %bpl
je 0x16e421
incq %r14
movq (%r8), %rax
movq 0x18(%rax), %rdi
movq 0x28(%rdi), %rax
movq 0x30(%rsp), %rcx
movl (%rax,%rcx,8), %eax
cmpq %rax, %r14
jb 0x16e38e
jmp 0x16e52b
movq 0x11bbb8(%rip), %rbp    # 0x289fe0
movq (%rbp), %rcx
movl $0xa, %esi
movl $0x1, %edx
leaq 0xc2f27(%rip), %rdi     # 0x231364
callq 0x2410
movq (%rbp), %rdi
movl $0x1, %ecx
leaq 0xc2f1d(%rip), %rsi     # 0x23136f
movq 0x58(%rsp), %rdx
movq 0x50(%rsp), %r8
movq 0xa0(%rsp), %r9
xorl %eax, %eax
callq 0x22b0
movq (%rbp), %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 0x8(%rsp), %rbx
movq (%rbx), %rax
movq 0x28(%rax), %rax
movl (%rax,%r12,8), %ecx
leaq 0xc2ef6(%rip), %rsi     # 0x231394
xorl %eax, %eax
callq 0x22b0
movq (%rbp), %rax
movq %rax, 0x60(%rsp)
movl 0x8(%r13,%r15,8), %edi
movl %edi, %ebp
shrl %ebp
incl %ebp
movl %edi, %r15d
andl $0x1, %r15d
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
xorl %ecx, %ecx
callq 0x16dd59
movl %eax, %r8d
shrl %r8d
incq %r8
andl $0x1, %eax
movq 0x60(%rsp), %rdi
leaq 0xc2ec2(%rip), %rsi     # 0x2313ab
movl %ebp, %edx
movl %r15d, %ecx
movq %rax, %r9
xorl %eax, %eax
callq 0x22b0
movq 0x10(%rsp), %r8
movq (%rbx), %rax
movq 0x28(%rax), %rax
cmpl $0x0, (%rax,%r12,8)
je 0x16e3fd
movq 0x40(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %r12, %rdx
callq 0x227bd
movq 0x10(%rsp), %r8
jmp 0x16e3fd
xorl %eax, %eax
movq %rax, 0xf8(%rsp)
movq %rax, 0x168(%rsp)
xorl %esi, %esi
movq 0x70(%rsp), %rdx
leaq 0x7c(%rsp), %rcx
leaq 0xb8(%rsp), %r8
leaq 0x98(%rsp), %r9
leaq 0x130(%rsp), %rax
pushq %rax
movl $0x1, %r13d
pushq %r13
leaq 0x1b0(%rsp), %rbp
pushq %rbp
leaq 0xc8(%rsp), %rax
pushq %rax
callq 0x10109f
addq $0x20, %rsp
movl %eax, %r15d
movq 0x8(%rsp), %rax
movq (%rax), %r14
movl $0x1, %ecx
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %r12
movq %r12, %rsi
movq 0x18(%rsp), %rbx
movq %rbx, %rdx
callq 0x16dd59
xorl %r13d, %eax
movq %r14, %rdi
xorl %esi, %esi
movl %eax, %edx
leaq 0x78(%rsp), %rcx
leaq 0xa8(%rsp), %r8
leaq 0x90(%rsp), %r9
leaq 0xc0(%rsp), %rax
pushq %rax
pushq %r13
pushq %rbp
leaq 0xc8(%rsp), %rax
pushq %rax
callq 0x10109f
addq $0x20, %rsp
cmpl %eax, %r15d
jne 0x16e759
movl 0x7c(%rsp), %edi
movl $0x1, %ecx
movq %r12, %rsi
movq %rbx, %rdx
callq 0x16dd59
cmpl 0x78(%rsp), %eax
jne 0x16e763
movq 0x98(%rsp), %rax
cmpq 0x90(%rsp), %rax
jne 0x16e76d
xorl %r14d, %r14d
xorl %r12d, %r12d
xorl %r15d, %r15d
xorl %r13d, %r13d
movq 0x10(%rsp), %r8
movq 0x80(%rsp), %r9
movq 0x168(%rsp), %rax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq %rax, %r14
jae 0x16e68a
movq (%r8), %rcx
movq 0x10(%rcx), %rcx
movq 0x178(%rsp), %rdx
movl (%rdx,%r14,4), %esi
shrl %esi
leaq (%rsi,%rsi,4), %rsi
movl 0x10(%rcx,%rsi,8), %edi
cmpq %rdi, %r12
jb 0x16e691
incq %r14
movl $0x0, %r12d
cmpq %r14, %rax
jne 0x16e663
movq %rax, %r14
xorl %r12d, %r12d
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x16e6a1
leaq (%rcx,%rsi,8), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax,%r12,8), %ebx
incq %r12
movq 0xf8(%rsp), %rax
cmpq %rax, %r15
jae 0x16e6f3
movq 0x10(%r9), %rcx
movq 0x108(%rsp), %rdx
movl (%rdx,%r15,4), %esi
shrl %esi
leaq (%rsi,%rsi,4), %rsi
movl 0x10(%rcx,%rsi,8), %edi
cmpq %rdi, %r13
jb 0x16e6e3
incq %r15
movl $0x0, %r13d
cmpq %r15, %rax
jne 0x16e6ba
movq %rax, %r15
xorl %r13d, %r13d
jmp 0x16e6f3
leaq (%rcx,%rsi,8), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax,%r13,8), %ebp
incq %r13
cmpl %ebp, %ebx
jne 0x16e707
cmpl $-0x1, %ebx
je 0x16e71b
cmpl $-0x1, %ebp
jne 0x16e642
jmp 0x16e71b
callq 0x2286e
movq 0x80(%rsp), %r9
movq 0x10(%rsp), %r8
jmp 0x16e6f7
movq 0x38(%rsp), %r14
incq %r14
movq (%r8), %rax
movq 0x18(%rax), %rbx
movl 0x14(%rbx), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq %rax, %r14
movq 0x20(%rsp), %r13
jb 0x16e05e
jmp 0x16e7e3
callq 0x2270c
jmp 0x16e0a3
callq 0x2279b
jmp 0x16e300
callq 0x2282a
jmp 0x16e5f5
callq 0x2284c
jmp 0x16e613
movq 0x11b86c(%rip), %rbx    # 0x289fe0
movq (%rbx), %rcx
movl $0x8, %esi
movl $0x1, %edx
leaq 0xbc72b(%rip), %rdi     # 0x22aeb3
callq 0x2410
movq (%rbx), %rdi
movq 0x38(%rsp), %rax
leaq 0x1(%rax), %rdx
movl 0x168(%rsp), %ecx
movq 0xb8(%rsp), %r8
movq 0x98(%rsp), %r9
movl 0xf8(%rsp), %r10d
subq $0x8, %rsp
leaq 0xc2c34(%rip), %rsi     # 0x2313f7
xorl %eax, %eax
pushq 0x98(%rsp)
pushq 0xb8(%rsp)
pushq %r10
callq 0x22b0
addq $0x20, %rsp
jmp 0x16e629
cmpq $0x0, 0x60(%r8)
movq 0x18(%rsp), %rsi
je 0x16e9fe
xorl %edi, %edi
movq 0x70(%r8), %rax
leaq (%rdi,%rdi,2), %rcx
shlq $0x4, %rcx
leaq (%rax,%rcx), %r12
movl 0x8(%rax,%rcx), %edx
movq (%rsi,%rdx,8), %rax
testl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
movq %rdi, 0x8(%rsp)
jne 0x16e8c9
movl 0x14(%r12), %ecx
movq (%rsi,%rcx,8), %rcx
testl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
jne 0x16e8c9
movq (%r13), %rdx
shrq $0x20, %rax
leaq (%rax,%rax,2), %rax
movl 0x10(%rdx,%rax,8), %esi
shrq $0x20, %rcx
leaq (%rcx,%rcx,2), %rax
movl 0x10(%rdx,%rax,8), %edx
movq 0x88(%rsp), %rdi
leaq 0x48(%rsp), %rcx
leaq 0x2c(%rsp), %r8
callq 0xca79c
cmpl $0x1, 0x2c(%rsp)
jne 0x16e9f4
cmpq $0x0, 0x48(%rsp)
je 0x16e9f4
movl (%r12), %ecx
movq 0x48(%rsp), %rax
cmpl (%rax), %ecx
movq 0x18(%rsp), %rsi
jne 0x16e8ba
movl 0x4(%r12), %ecx
cmpl 0x4(%rax), %ecx
jne 0x16e8ba
movl 0xc(%r12), %ecx
cmpl 0xc(%rax), %ecx
jne 0x16e8ba
movl 0x10(%r12), %ecx
cmpl 0x10(%rax), %ecx
jne 0x16e8ba
movb 0x28(%r12), %cl
cmpb 0x28(%rax), %cl
je 0x16e9db
callq 0x2294a
movq 0x18(%rsp), %rsi
jmp 0x16e9db
movq 0x11b710(%rip), %rax    # 0x289fe0
movq (%rax), %rdi
incl %edx
movl (%r12), %ecx
movl 0x4(%r12), %r8d
movl 0x14(%r12), %r9d
incl %r9d
movl 0xc(%r12), %r10d
movl 0x10(%r12), %r11d
movzbl 0x28(%r12), %ebx
movl %ebx, %r14d
shrl $0x6, %r14d
andl $0x1, %r14d
movsd 0x20(%r12), %xmm0
andl $0x3f, %ebx
leaq 0xc2b4e(%rip), %rsi     # 0x231460
movb $0x1, %al
pushq %rbx
pushq %r14
pushq %r11
pushq %r10
callq 0x22b0
movq 0x38(%rsp), %rsi
addq $0x20, %rsp
movl 0x8(%r12), %ebp
cmpl $0x0, (%rsi,%rbp,8)
je 0x16e9db
movl 0x14(%r12), %ebx
xorl %r12d, %r12d
movq (%rsi,%rbx,8), %rax
testl %eax, %eax
je 0x16e9cc
movl $0x10, %r14d
xorl %r15d, %r15d
movq (%r13), %rcx
movl 0x4(%rsi,%rbp,8), %edx
leaq (%rdx,%rdx,2), %rdx
leaq (%rcx,%rdx,8), %rdx
movq %rsi, %r13
leaq (%r12,%r12,2), %rsi
movl 0x10(%rdx,%rsi,8), %esi
shrq $0x20, %rax
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rax
movl (%r14,%rax), %edx
movq 0x88(%rsp), %rdi
leaq 0x48(%rsp), %rcx
leaq 0x2c(%rsp), %r8
callq 0xca79c
cmpl $0x0, 0x2c(%rsp)
jne 0x16e9bb
incq %r15
movq (%r13,%rbx,8), %rax
movl %eax, %ecx
addq $0x18, %r14
cmpq %rcx, %r15
movq %r13, %rsi
movq 0x20(%rsp), %r13
jb 0x16e955
jmp 0x16e9cc
leaq 0x48(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
callq 0x22890
jmp 0x16e99e
incq %r12
movl (%rsi,%rbp,8), %eax
cmpq %rax, %r12
jb 0x16e940
movq 0x8(%rsp), %rdi
incq %rdi
movq 0x10(%rsp), %r8
cmpq 0x60(%r8), %rdi
jb 0x16e7f5
jmp 0x16e9fe
callq 0x22928
jmp 0x16e87c
movq 0x178(%rsp), %rdi
callq 0x2220
movq 0x108(%rsp), %rdi
callq 0x2220
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq