// File: /workspace/github_cpp_makefile_star2_O3/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 $0x178, %rsp            # imm = 0x178
movq %r9, 0x10(%rsp)
movq %r8, 0x20(%rsp)
movq %rcx, 0x68(%rsp)
movq %rdi, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x100(%rsp)
movaps %xmm0, 0x110(%rsp)
movaps %xmm0, 0x120(%rsp)
movaps %xmm0, 0x130(%rsp)
movaps %xmm0, 0x140(%rsp)
movaps %xmm0, 0x150(%rsp)
xorl %eax, %eax
movq %rax, 0x160(%rsp)
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0xb0(%rsp)
movaps %xmm0, 0xc0(%rsp)
movaps %xmm0, 0xd0(%rsp)
movaps %xmm0, 0xe0(%rsp)
movq %rax, 0xf0(%rsp)
leaq 0x18(%rsi), %rax
movq %rax, 0x18(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x18(%rsi), %r14
movl 0x14(%r14), %ebx
leal (%rbx,%rbx), %eax
movslq %eax, %rdi
movl $0x4, %esi
callq 0x2120
movq %rax, %r15
testl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
je 0x1749ba
xorl %r12d, %r12d
leaq 0xc27ad(%rip), %r13     # 0x2370be
movq 0x28(%r14), %rax
movq (%rax,%r12,8), %rcx
testl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
je 0x1749a6
movq %rcx, %rax
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
andq %rdx, %rax
je 0x1749a6
movq 0x8(%r14), %rdx
shrq $0x20, %rcx
shlq $0x3, %rax
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rcx,2), %rcx
leaq (%rdx,%rcx,8), %rbx
addq $0x8, %rbx
xorl %ecx, %ecx
movl (%rbx,%rcx), %edx
incl (%r15,%rdx,4)
addq $0x18, %rcx
cmpq %rcx, %rax
jne 0x174950
xorl %ebp, %ebp
movl (%rbx), %eax
decl (%r15,%rax,4)
jne 0x174980
incq %rbp
movq 0x28(%r14), %rax
movl (%rax,%r12,8), %eax
addq $0x18, %rbx
cmpq %rax, %rbp
jb 0x174962
jmp 0x1749a6
movq 0x120659(%rip), %rax    # 0x294fe0
movq (%rax), %rcx
movl $0x8, %esi
movl $0x1, %edx
movq %r13, %rdi
callq 0x2410
movq 0x18(%rsp), %rax
movq (%rax), %r14
jmp 0x17496a
incq %r12
movl 0x14(%r14), %eax
addl %eax, %eax
cltq
cmpq %rax, %r12
jb 0x174911
movq %r15, %rdi
callq 0x2220
testl $0x7fffffff, 0x4(%r14)  # imm = 0x7FFFFFFF
movq 0x10(%rsp), %r11
movq 0x8(%rsp), %r8
je 0x174a82
xorl %r12d, %r12d
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movq 0x1205f6(%rip), %rbp    # 0x294fe0
leaq 0xc8b2f(%rip), %r15     # 0x23d520
movq 0x8(%r14), %rdx
movq 0x28(%r14), %rax
leaq (%r12,%r12,2), %rcx
movl 0x8(%rdx,%rcx,8), %esi
xorq $0x1, %rsi
movq (%rax,%rsi,8), %rsi
movq %rsi, %rax
andq %r13, %rax
je 0x174a3e
movl 0x4(%rdx,%rcx,8), %ecx
shrq $0x20, %rsi
leaq (%rsi,%rsi,2), %rsi
leaq (%rdx,%rsi,8), %rsi
addq $0x8, %rsi
xorl %edx, %edx
movl (%rsi), %edi
xorl %ecx, %edi
cmpl $0x1, %edi
je 0x174a40
incq %rdx
addq $0x18, %rsi
cmpq %rdx, %rax
jne 0x174a27
jmp 0x174a58
xorl %edx, %edx
cmpq %rax, %rdx
je 0x174a58
incq %r12
movl 0x4(%r14), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq %rax, %r12
jb 0x1749f1
jmp 0x174a82
movq (%rbp), %rcx
movl $0x9, %esi
movl $0x1, %edx
movq %r15, %rdi
callq 0x2410
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r11
movq 0x18(%rsp), %rax
movq (%rax), %r14
jmp 0x174a45
movq (%r8), %rcx
movq 0x18(%rcx), %rax
testl $0x7fffffff, 0x14(%rax) # imm = 0x7FFFFFFF
je 0x1752d0
xorl %r9d, %r9d
movq (%r11,%r9,8), %rdx
movq %rdx, %rsi
shrq $0x20, %rsi
leaq (%rsi,%rsi,2), %rsi
shlq $0x3, %rsi
movq 0x20(%rsp), %rbx
addq (%rbx), %rsi
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
addl %edi, %edx
leaq (%rdx,%rdx,2), %rdx
movl 0x10(%rsi,%rdx,8), %ebp
addl %ebp, %ebp
movq 0x28(%rax), %rdi
movq %r9, %r8
shlq $0x4, %r8
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rdx
movq (%rdx,%rbp,8), %rsi
cmpl %esi, (%rdi,%r8)
movq %r9, 0x30(%rsp)
jne 0x1751a0
leaq (%r9,%r9), %r14
movq 0x18(%rcx), %r8
movq 0x28(%r8), %rdi
movq %r9, %r10
movq %r14, 0x38(%rsp)
movq (%rdi,%r14,8), %r9
testl %r9d, %r9d
je 0x174d2e
shrq $0x20, %r9
leaq (%r9,%r9,2), %r12
shlq $0x3, %r12
addq 0x8(%r8), %r12
movq 0x8(%rax), %rcx
shrq $0x20, %rsi
leaq 0x1(%r10), %rdx
movq %rdx, 0x58(%rsp)
movl %ebp, %edx
shrl %edx
incq %rdx
movq %rdx, 0x50(%rsp)
leaq (%rsi,%rsi,2), %rdx
leaq (%rcx,%rdx,8), %r13
addq $0x8, %r13
xorl %r14d, %r14d
movq 0x28(%rax), %rdx
movl (%rdx,%rbp,8), %r8d
testq %r8, %r8
je 0x174bc2
leaq (%r14,%r14,2), %rcx
movl 0x8(%r12,%rcx,8), %ecx
movl %ecx, %esi
shrl %esi
movq (%r11,%rsi,8), %rsi
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
addl %esi, %edi
shrq $0x20, %rsi
leaq (%rsi,%rsi,2), %rsi
shlq $0x3, %rsi
addq (%rbx), %rsi
leaq (%rdi,%rdi,2), %rdi
leaq (%rsi,%rdi,8), %rdi
addq $0x10, %rdi
shlq $0x3, %r8
leaq (%r8,%r8,2), %r8
xorl %r9d, %r9d
testb $0x1, %cl
jne 0x174ba5
movl 0x10(%rsi), %r10d
addl %r10d, %r10d
jmp 0x174bae
movl (%rdi), %r10d
addl %r10d, %r10d
incq %r10
cmpl (%r13,%r9), %r10d
je 0x174d05
addq $0x18, %r9
cmpq %r9, %r8
jne 0x174b97
movq 0x120417(%rip), %r15    # 0x294fe0
movq (%r15), %rcx
movl $0xa, %esi
movl $0x1, %edx
leaq 0xc894d(%rip), %rdi     # 0x23d52a
callq 0x2410
movq (%r15), %rdi
leaq 0xc8949(%rip), %rsi     # 0x23d535
movq 0x58(%rsp), %rdx
xorl %ecx, %ecx
movq 0x50(%rsp), %r8
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x22b0
movq (%r15), %rdi
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movq 0x38(%rsp), %rcx
movl (%rax,%rcx,8), %edx
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movl (%rax,%rbp,8), %ecx
leaq 0xc8927(%rip), %rsi     # 0x23d55a
xorl %eax, %eax
callq 0x22b0
movq (%r15), %rdi
leaq (%r14,%r14,2), %rax
movl 0x8(%r12,%rax,8), %r9d
movl %r9d, %eax
shrl %eax
movl %r9d, %ecx
andl $0x1, %ecx
movq 0x10(%rsp), %rdx
movq (%rdx,%rax,8), %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
addl %edx, %esi
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rdx
shlq $0x3, %rdx
addq (%rbx), %rdx
andq $0x1, %r9
leaq (%rsi,%rsi,2), %rsi
leaq (%rdx,%rsi,8), %rsi
cmoveq %rdx, %rsi
leal 0x1(%rax), %edx
movq 0x10(%rsi), %r8
andl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
incq %r8
leaq 0xc88d9(%rip), %rsi     # 0x23d571
xorl %eax, %eax
callq 0x22b0
movq 0x10(%rsp), %r11
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rdx
cmpl $0x0, (%rdx,%rbp,8)
je 0x174d05
movq %r13, %rbx
xorl %r15d, %r15d
movq 0x12031d(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
movl (%rbx), %r8d
movl %r8d, %ecx
shrl %ecx
incl %ecx
andl $0x1, %r8d
leaq 0xc88c1(%rip), %rsi     # 0x23d59c
movq %r15, %rdx
xorl %eax, %eax
callq 0x22b0
movq 0x10(%rsp), %r11
incq %r15
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rdx
movl (%rdx,%rbp,8), %ecx
addq $0x18, %rbx
cmpq %rcx, %r15
jb 0x174cbc
incq %r14
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
movq 0x18(%rcx), %rsi
movq 0x28(%rsi), %rdi
movq 0x38(%rsp), %rsi
movl (%rdi,%rsi,8), %esi
cmpq %rsi, %r14
movq 0x20(%rsp), %rbx
jb 0x174b4c
movq (%rbx), %rsi
movq 0x30(%rsp), %r9
movl 0x4(%r11,%r9,8), %r8d
leaq (%r8,%r8,2), %r8
movl 0x10(%rsi,%r8,8), %esi
addl %esi, %esi
leaq 0x1(%rsi), %r15
movq %rsi, %rbx
movq 0x8(%rdx,%rsi,8), %rdx
movq 0x38(%rsp), %r14
cmpl %edx, 0x8(%rdi,%r14,8)
jne 0x1751e7
orq $0x1, %r14
movq 0x18(%rcx), %rdi
movq 0x28(%rdi), %rcx
movq (%rcx,%r14,8), %rcx
testl %ecx, %ecx
je 0x174f79
shrq $0x20, %rcx
leaq (%rcx,%rcx,2), %r12
shlq $0x3, %r12
addq 0x8(%rdi), %r12
movq 0x8(%rax), %rcx
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rdx
leaq (%rcx,%rdx,8), %rbp
leaq 0x1(%r9), %rcx
movq %rcx, 0x50(%rsp)
shrl %ebx
incq %rbx
movq %rbx, 0x58(%rsp)
xorl %r13d, %r13d
movq 0x28(%rax), %rcx
movl (%rcx,%r15,8), %edi
testq %rdi, %rdi
je 0x174e32
leaq (,%r13,2), %rcx
addq %r13, %rcx
movl 0x8(%r12,%rcx,8), %ecx
movl %ecx, %edx
shrl %edx
movq (%r11,%rdx,8), %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
addl %edx, %esi
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rdx
shlq $0x3, %rdx
movq 0x20(%rsp), %r8
addq (%r8), %rdx
leaq (%rsi,%rsi,2), %rsi
leaq (%rdx,%rsi,8), %rsi
addq $0x10, %rsi
shlq $0x3, %rdi
leaq (%rdi,%rdi,2), %rdi
xorl %r8d, %r8d
testb $0x1, %cl
jne 0x174e15
movl 0x10(%rdx), %r9d
addl %r9d, %r9d
jmp 0x174e1e
movl (%rsi), %r9d
addl %r9d, %r9d
incq %r9
cmpl 0x8(%rbp,%r8), %r9d
je 0x174f36
addq $0x18, %r8
cmpq %r8, %rdi
jne 0x174e07
movq 0x1201a7(%rip), %rbx    # 0x294fe0
movq (%rbx), %rcx
movl $0xa, %esi
movl $0x1, %edx
leaq 0xc8767(%rip), %rdi     # 0x23d5b4
callq 0x2410
movq (%rbx), %rdi
movl $0x1, %ecx
movl $0x1, %r9d
leaq 0xc8758(%rip), %rsi     # 0x23d5bf
movq 0x50(%rsp), %rdx
movq 0x58(%rsp), %r8
xorl %eax, %eax
callq 0x22b0
movq (%rbx), %rdi
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl (%rax,%r14,8), %edx
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movl (%rax,%r15,8), %ecx
leaq 0xc873e(%rip), %rsi     # 0x23d5e4
xorl %eax, %eax
callq 0x22b0
movq (%rbx), %rdi
leaq (,%r13,2), %rax
addq %r13, %rax
movl 0x8(%r12,%rax,8), %r9d
movl %r9d, %eax
shrl %eax
movl %r9d, %ecx
andl $0x1, %ecx
movq 0x10(%rsp), %rdx
movq (%rdx,%rax,8), %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
addl %edx, %esi
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rdx
shlq $0x3, %rdx
movq 0x20(%rsp), %r8
addq (%r8), %rdx
andq $0x1, %r9
leaq (%rsi,%rsi,2), %rsi
leaq (%rdx,%rsi,8), %rsi
cmoveq %rdx, %rsi
leal 0x1(%rax), %edx
movq 0x10(%rsi), %r8
andl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
incq %r8
leaq 0xc86e4(%rip), %rsi     # 0x23d5fb
xorl %eax, %eax
callq 0x22b0
movq 0x10(%rsp), %r11
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rcx
cmpl $0x0, (%rcx,%r15,8)
jne 0x174f58
incq %r13
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
movq 0x18(%rcx), %rdi
movq 0x28(%rdi), %rcx
movl (%rcx,%r14,8), %ecx
cmpq %rcx, %r13
jb 0x174db0
jmp 0x174f79
movq %rbp, %rdi
movq 0x18(%rsp), %rsi
movq %r15, %rdx
leaq 0x40(%rsp), %rcx
callq 0x21add
movq 0x10(%rsp), %r11
movq 0x40(%rsp), %rax
jmp 0x174f36
xorl %eax, %eax
movq %rax, 0xc8(%rsp)
movq %rax, 0x138(%rsp)
xorl %esi, %esi
movq 0x38(%rsp), %rdx
leaq 0x64(%rsp), %rcx
leaq 0x88(%rsp), %r8
leaq 0x78(%rsp), %r9
leaq 0x100(%rsp), %rax
pushq %rax
movl $0x1, %r15d
pushq %r15
leaq 0x178(%rsp), %r12
pushq %r12
leaq 0x188(%rsp), %r13
pushq %r13
movq %r11, %rbx
callq 0x1053a7
addq $0x20, %rsp
movl %eax, %ebp
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movq 0x20(%rsp), %r14
movq (%r14), %rax
movq 0x30(%rsp), %rcx
movl 0x4(%rbx,%rcx,8), %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0x10(%rax,%rcx,8), %edx
addl %edx, %edx
xorl %esi, %esi
leaq 0x60(%rsp), %rcx
leaq 0x80(%rsp), %r8
leaq 0x70(%rsp), %r9
leaq 0x90(%rsp), %rax
pushq %rax
pushq %r15
pushq %r12
pushq %r13
callq 0x1053a7
addq $0x20, %rsp
cmpl %eax, %ebp
jne 0x17522e
movl 0x64(%rsp), %edx
movl %edx, %eax
shrl %eax
movq (%rbx,%rax,8), %rax
movq %rax, %rcx
shrq $0x20, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x3, %rcx
addq (%r14), %rcx
testb $0x1, %dl
movq %rbx, %r11
jne 0x175067
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
addl %edx, %eax
leaq (%rax,%rax,2), %rax
movl 0x10(%rcx,%rax,8), %eax
addl %eax, %eax
jmp 0x17506f
movl 0x10(%rcx), %eax
addl %eax, %eax
incq %rax
movq 0x8(%rsp), %r8
movq 0x48(%rsp), %r9
cmpl 0x60(%rsp), %eax
jne 0x175238
movq 0x78(%rsp), %rax
cmpq 0x70(%rsp), %rax
jne 0x175251
xorl %r14d, %r14d
xorl %r12d, %r12d
xorl %r15d, %r15d
xorl %r13d, %r13d
movq 0x138(%rsp), %rax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq %rax, %r14
jae 0x1750e7
movq (%r8), %rcx
movq 0x10(%rcx), %rcx
movq 0x148(%rsp), %rdx
movl (%rdx,%r14,4), %esi
shrl %esi
leaq (%rsi,%rsi,4), %rsi
movl 0x10(%rcx,%rsi,8), %edi
cmpq %rdi, %r12
jb 0x1750ee
incq %r14
movl $0x0, %r12d
cmpq %r14, %rax
jne 0x1750c0
movq %rax, %r14
xorl %r12d, %r12d
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x1750fe
leaq (%rcx,%rsi,8), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax,%r12,8), %ebx
incq %r12
movq 0xc8(%rsp), %rax
cmpq %rax, %r15
jae 0x175150
movq 0x10(%r9), %rcx
movq 0xd8(%rsp), %rdx
movl (%rdx,%r15,4), %esi
shrl %esi
leaq (%rsi,%rsi,4), %rsi
movl 0x10(%rcx,%rsi,8), %edi
cmpq %rdi, %r13
jb 0x175140
incq %r15
movl $0x0, %r13d
cmpq %r15, %rax
jne 0x175117
movq %rax, %r15
xorl %r13d, %r13d
jmp 0x175150
leaq (%rcx,%rsi,8), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax,%r13,8), %ebp
incq %r13
cmpl %ebp, %ebx
jne 0x175164
cmpl $-0x1, %ebx
je 0x17517a
cmpl $-0x1, %ebp
jne 0x17509f
jmp 0x17517a
callq 0x21b94
movq 0x48(%rsp), %r9
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r11
jmp 0x175154
movq 0x30(%rsp), %r9
incq %r9
movq (%r8), %rcx
movq 0x18(%rcx), %rax
movl 0x14(%rax), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
cmpq %rdx, %r9
jb 0x174a99
jmp 0x1752d0
movq 0x11fe39(%rip), %rax    # 0x294fe0
movq (%rax), %rcx
movl $0x8, %esi
movl $0x1, %edx
leaq 0xc2cac(%rip), %rdi     # 0x237e67
callq 0x2410
movq 0x30(%rsp), %r9
movq 0x10(%rsp), %r11
movq 0x8(%rsp), %rax
movq (%rax), %rcx
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rdx
movq (%rdx,%rbp,8), %rsi
jmp 0x174aef
movq 0x11fdf2(%rip), %rax    # 0x294fe0
movq (%rax), %rcx
movl $0x8, %esi
movl $0x1, %edx
leaq 0xc2c65(%rip), %rdi     # 0x237e67
callq 0x2410
movq 0x30(%rsp), %r9
movq 0x10(%rsp), %r11
movq 0x8(%rsp), %rax
movq (%rax), %rcx
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rdx
movq (%rdx,%r15,8), %rdx
jmp 0x174d62
callq 0x21b50
jmp 0x17502e
callq 0x21b72
movq 0x48(%rsp), %r9
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r11
jmp 0x175083
movq 0x11fd88(%rip), %rbx    # 0x294fe0
movq (%rbx), %rcx
movl $0x8, %esi
movl $0x1, %edx
leaq 0xc1e37(%rip), %rdi     # 0x2370a3
callq 0x2410
movq (%rbx), %rdi
movq 0x30(%rsp), %rax
leaq 0x1(%rax), %rdx
movl 0x138(%rsp), %ecx
movq 0x88(%rsp), %r8
movq 0x78(%rsp), %r9
movl 0xc8(%rsp), %r10d
subq $0x8, %rsp
leaq 0xc83a3(%rip), %rsi     # 0x23d647
xorl %eax, %eax
pushq 0x78(%rsp)
pushq 0x90(%rsp)
pushq %r10
callq 0x22b0
movq 0x68(%rsp), %r9
movq 0x28(%rsp), %r8
movq 0x30(%rsp), %r11
addq $0x20, %rsp
jmp 0x175093
cmpq $0x0, 0x60(%r8)
movq 0x20(%rsp), %rbx
je 0x17550c
xorl %esi, %esi
movq 0x70(%r8), %rax
leaq (%rsi,%rsi,2), %rcx
shlq $0x4, %rcx
leaq (%rax,%rcx), %r14
movl 0x8(%rax,%rcx), %edx
movl 0x14(%rax,%rcx), %r9d
movq (%r11,%rdx,8), %rax
testl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
movq %rsi, 0x38(%rsp)
jne 0x1753b4
movq (%r11,%r9,8), %rcx
testl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
jne 0x1753b4
movq (%rbx), %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 0x68(%rsp), %rdi
leaq 0x40(%rsp), %rcx
leaq 0x2c(%rsp), %r8
callq 0xcba40
cmpl $0x1, 0x2c(%rsp)
jne 0x1754e2
movq 0x40(%rsp), %rax
testq %rax, %rax
je 0x1754e2
movl (%r14), %ecx
cmpl (%rax), %ecx
movq 0x10(%rsp), %r11
movq 0x8(%rsp), %r8
jne 0x1753a0
movl 0x4(%r14), %ecx
cmpl 0x4(%rax), %ecx
jne 0x1753a0
movl 0xc(%r14), %ecx
cmpl 0xc(%rax), %ecx
jne 0x1753a0
movl 0x10(%r14), %ecx
cmpl 0x10(%rax), %ecx
jne 0x1753a0
movb 0x28(%r14), %cl
cmpb 0x28(%rax), %cl
je 0x1754ce
callq 0x21c4e
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r11
jmp 0x1754ce
movq 0x11fc25(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
incl %edx
movl (%r14), %ecx
movl 0x4(%r14), %r8d
incl %r9d
movl 0xc(%r14), %r10d
movl 0x10(%r14), %r11d
movzbl 0x28(%r14), %ebx
movl %ebx, %r15d
shrl $0x6, %r15d
andl $0x1, %r15d
movsd 0x20(%r14), %xmm0
andl $0x3f, %ebx
leaq 0xc82be(%rip), %rsi     # 0x23d6b0
movb $0x1, %al
pushq %rbx
pushq %r15
movq 0x30(%rsp), %rbx
pushq %r11
pushq %r10
callq 0x22b0
movq 0x30(%rsp), %r11
addq $0x20, %rsp
movl 0x8(%r14), %ebp
movl (%r11,%rbp,8), %ecx
testq %rcx, %rcx
movq 0x8(%rsp), %r8
je 0x1754ce
movl 0x14(%r14), %r14d
movq (%r11,%r14,8), %rax
xorl %r12d, %r12d
testl %eax, %eax
je 0x1754c0
movl $0x10, %ebx
xorl %r15d, %r15d
movq 0x20(%rsp), %rcx
movq (%rcx), %rcx
movl 0x4(%r11,%rbp,8), %edx
leaq (%rdx,%rdx,2), %rdx
leaq (%rcx,%rdx,8), %rdx
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 (%rbx,%rax), %edx
movq 0x68(%rsp), %rdi
leaq 0x40(%rsp), %rcx
leaq 0x2c(%rsp), %r8
movq %r11, %r13
callq 0xcba40
cmpl $0x0, 0x2c(%rsp)
jne 0x1754a1
incq %r15
movq (%r13,%r14,8), %rax
movl %eax, %ecx
addq $0x18, %rbx
cmpq %rcx, %r15
movq %r13, %r11
jb 0x17543f
jmp 0x1754b2
leaq 0x40(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
callq 0x21bb6
jmp 0x175489
movl (%r11,%rbp,8), %ecx
movq 0x20(%rsp), %rbx
movq 0x8(%rsp), %r8
incq %r12
movl %ecx, %edx
cmpq %rdx, %r12
jb 0x17542f
movq 0x38(%rsp), %rsi
incq %rsi
cmpq 0x60(%r8), %rsi
jb 0x1752e2
jmp 0x17550c
movq 0x11faf7(%rip), %rax    # 0x294fe0
movq (%rax), %rcx
movl $0x8, %esi
movl $0x1, %edx
leaq 0xc1bb8(%rip), %rdi     # 0x2370b5
callq 0x2410
movq 0x40(%rsp), %rax
jmp 0x175367
movq 0x148(%rsp), %rdi
callq 0x2220
movq 0xd8(%rsp), %rdi
callq 0x2220
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq