// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/syncasm.c
// Function: scg_demultiplex
KDQ_INIT(uint64_t)

void scg_demultiplex(scg_t *g)
{
    uint64_t i, j, k, n, m, v, w, nv, pv, *a;
    int8_t *flag;
    kdq_t(uint64_t) *q;
    kvec_t(uint64_t) sub_g;
    asmg_arc_t *av;
    asmg_vtx_t *vtx;
    asmg_t *utg_g, *de_g;
    khint_t k1;
    kh_u64_t *h_scm;
    ks_u128_t *arc_s;
    int absent;

    utg_g = g->utg_asmg;
    q = kdq_init(uint64_t, 0);
    MYCALLOC(flag, utg_g->n_vtx * 2);
    MYCALLOC(de_g, 1);
    h_scm = kh_u64_init();
    arc_s = ks_u128_init();
    kv_init(sub_g);
    for (i = 0, n = utg_g->n_vtx * 2; i < n; ++i) {
        if (flag[i] || utg_g->vtx[i>>1].del)
            continue;

        // get a sub graph
        sub_g.n = 0;
        kdq_push(uint64_t, q, i);
        kdq_push(uint64_t, q, i^1);
        while (kdq_size(q) > 0) {
            v = *kdq_shift(uint64_t, q);
            if (flag[v]) continue;
            if (v & 1) kv_push(uint64_t, sub_g, v>>1);
            nv = asmg_arc_n(utg_g, v);
            av = asmg_arc_a(utg_g, v);
            for (j = 0; j < nv; ++j) {
                if (av[j].del) continue;
                if (flag[av[j].w] == 0)
                    kdq_push(uint64_t, q, av[j].w);
                if (flag[av[j].w^1] == 0)
                    kdq_push(uint64_t, q, av[j].w^1);
            }
            flag[v] = 1;
        }

#ifdef DEBUG_UTG_DEMULTIPLEX
        fprintf(stderr, "[DEBUG_UTG_DEMULTIPLEX::%s] processing subgraph:", __func__);
        for (j = 0; j < sub_g.n; ++j) fprintf(stderr, " u%lu", sub_g.a[j]);
        fprintf(stderr, "\n");
#endif
        // processing individual unitigs in sub_g
        for (j = 0; j < sub_g.n; ++j) {
#ifdef DEBUG_UTG_DEMULTIPLEX
            fprintf(stderr, "[DEBUG_UTG_DEMULTIPLEX::%s] process utg: u%lu\n", __func__, sub_g.a[j]);
#endif
            a = utg_g->vtx[sub_g.a[j]].a;
            m = utg_g->vtx[sub_g.a[j]].n;
            nv = 0;
            for (k = 0; k < m; ++k) {
                pv = nv;
                v = a[k] >> 1;
                k1 = kh_u64_put(h_scm, v, &absent);
                if (absent) {
                    // add v
                    nv = scg_add_utg_p(de_g, &vtx);
                    MYBZERO(vtx, 1);
                    MYMALLOC(vtx->a, 1);
                    vtx->n = 1;
                    vtx->a[0] = v << 1;
                    kh_val(h_scm, k1) = nv;
#ifdef DEBUG_UTG_DEMULTIPLEX
                    fprintf(stderr, "[DEBUG_UTG_DEMULTIPLEX::%s] add vtx: %lu [%lu%c]\n", 
                            __func__, nv, v, "+-"[a[k]&1]);
#endif
                } else {
                    // v has been added
                    nv = kh_val(h_scm, k1);
#ifdef DEBUG_UTG_DEMULTIPLEX
                    fprintf(stderr, "[DEBUG_UTG_DEMULTIPLEX::%s] existed vtx: %lu [%lu%c]\n", 
                            __func__, nv, v, "+-"[a[k]&1]);
#endif
                }
                if (k > 0) {
                    // add arc pv->nv
                    v = pv << 1 | (a[k-1]&1);
                    w = nv << 1 | (a[k]&1);
                    k1 = ks_u128_get(arc_s, (uint128_t) v<<64 | w);
                    if (k1 >= kh_end(arc_s)) {
                        // arc does not exist
                        asmg_arc_add2(de_g, v, w, 0, 0, 0, 0, 0);
                        ks_u128_put(arc_s, (uint128_t) v<<64 | w, &absent);
                        ks_u128_put(arc_s, (uint128_t) (w^1)<<64 | (v^1), &absent);
#ifdef DEBUG_UTG_DEMULTIPLEX
                        fprintf(stderr, "[DEBUG_UTG_DEMULTIPLEX::%s] add arc: %lu%c -> %lu%c\n", 
                                __func__, v>>1, "+-"[v&1], w>>1, "+-"[w&1]);
#endif
                    }
#ifdef DEBUG_UTG_DEMULTIPLEX
                    else {
                        fprintf(stderr, "[DEBUG_UTG_DEMULTIPLEX::%s] existed arc: %lu%c -> %lu%c\n",
                                __func__, v>>1, "+-"[v&1], w>>1, "+-"[w&1]);
                    }
#endif
                }
            }
        }
        
        // add arcs between unitigs
        m = sub_g.n * 2;
        for (j = 0; j < m; ++j) {
            v = sub_g.a[j>>1];
            a = utg_g->vtx[v].a;
            pv = (j&1)? a[0]^1 : a[utg_g->vtx[v].n-1];
            k1 = kh_u64_get(h_scm, pv>>1);
            pv = kh_val(h_scm, k1)<<1 | (pv&1);
            for (k = 0; k < m; ++k) {
                w = sub_g.a[k>>1];
                av = asmg_arc1(utg_g, v<<1|(j&1), w<<1|(k&1));
                if (av == 0 || av->ln > 0)
                    continue;
                a = utg_g->vtx[w].a;
                nv = (k&1)? a[utg_g->vtx[w].n-1]^1 : a[0];
                k1 = kh_u64_get(h_scm, nv>>1);
                nv = kh_val(h_scm, k1)<<1 | (nv&1);
                if (ks_u128_get(arc_s, (uint128_t) pv<<64 | nv) >= kh_end(arc_s)) {
                    // add vtx pv->nv
                    asmg_arc_add(de_g, pv, nv, 0, 0, 0, 0, 0);
                    ks_u128_put(arc_s, (uint128_t) pv<<64 | nv, &absent);
#ifdef DEBUG_UTG_DEMULTIPLEX
                    fprintf(stderr, "[DEBUG_UTG_DEMULTIPLEX::%s] add inter-utg arc: %lu%c -> %lu%c\n",
                            __func__, pv>>1, "+-"[pv&1], nv>>1, "+-"[nv&1]);
#endif
                }
            }
        }
        
        kh_u64_m_clear(h_scm);
        ks_u128_s_clear(arc_s);
    }
    
    kdq_destroy(uint64_t, q);
    kv_destroy(sub_g);
    kh_u64_destroy(h_scm);
    ks_u128_destroy(arc_s);
    free(flag);
    
    // sort arc and build index
    asmg_finalize(de_g, 1);
    
    // update utg graph
    asmg_destroy(utg_g);
    g->utg_asmg = de_g;

    // postprocessing for mergeable utgs after purging
    process_mergeable_unitigs(g);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movabsq $0x3ffffffffffffff, %r14 # imm = 0x3FFFFFFFFFFFFFF
movq %rdi, 0xb0(%rsp)
movq 0x8(%rdi), %r15
movq $0x0, 0x80(%rsp)
pushq $0x1
popq %rbx
pushq $0x28
popq %rdx
xorl %edi, %edi
movq %rbx, %rsi
callq 0x17820
movq %rax, %r12
movq (%rax), %rax
andq %r14, %rax
btsq $0x3b, %rax
movq %rax, (%r12)
movq $0x3, 0x10(%r12)
pushq $0x20
popq %r14
xorl %edi, %edi
movq %r14, %rsi
callq 0x1799c
movq %rax, 0x18(%r12)
movq %r12, 0x30(%rsp)
andq $0x0, 0x20(%r12)
movq (%r15), %rdi
addq %rdi, %rdi
movq %rbx, %rsi
callq 0x2250
movq %rax, 0x38(%rsp)
pushq $0x40
popq %rsi
movq %rbx, %rdi
callq 0x2250
movq %rax, 0x48(%rsp)
xorl %edi, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x17820
movq %rax, %r13
andq $0x0, 0x18(%rax)
callq 0x6c49
movq %r15, 0x28(%rsp)
movq (%r15), %rdx
addq %rdx, %rdx
movq $0x0, 0x18(%rsp)
xorl %esi, %esi
movq %r13, 0x40(%rsp)
movq %rax, 0x8(%rsp)
movq %rdx, 0x60(%rsp)
cmpq %rdx, %rsi
je 0x7b66
movq 0x38(%rsp), %rax
cmpb $0x0, (%rax,%rsi)
jne 0x7b5e
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rax
movq %rsi, %rcx
shrq %rcx
imulq $0x28, %rcx, %rcx
testb $0x40, 0x23(%rax,%rcx)
jne 0x7b5e
movq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %rsi, %r14
callq 0x7c0a
movq %r14, 0x68(%rsp)
movq %r14, %rsi
xorq $0x1, %rsi
movq %rbx, %rdi
callq 0x7c0a
pushq $0x1
popq %r10
movq %rbx, %rdi
movq $0x0, 0x20(%rsp)
movq 0x8(%rdi), %rax
decq %rax
cmpq $-0x1, %rax
je 0x741b
movq 0x30(%rsp), %r9
movq (%r9), %rcx
movq 0x18(%r9), %rdx
movq %rcx, %rsi
movabsq $0x3ffffffffffffff, %r8 # imm = 0x3FFFFFFFFFFFFFF
andq %r8, %rsi
leaq 0x1(%rcx), %rdi
andq %r8, %rdi
andq 0x10(%r9), %rdi
movabsq $-0x400000000000000, %r8 # imm = 0xFC00000000000000
andq %r8, %rcx
orq %rcx, %rdi
movq %rdi, (%r9)
movq %rax, 0x8(%r9)
movq (%rdx,%rsi,8), %rbx
decq %rax
movq 0x38(%rsp), %rcx
cmpb $0x0, (%rcx,%rbx)
jne 0x72df
testb $0x1, %bl
je 0x7397
movq 0x20(%rsp), %r14
cmpq 0x80(%rsp), %r14
jne 0x737b
leaq (%r14,%r14), %rax
testq %r14, %r14
pushq $0x2
popq %rcx
cmoveq %rcx, %rax
movq %rax, 0x80(%rsp)
leaq (,%rax,8), %rsi
movq 0x18(%rsp), %rdi
callq 0x2350
pushq $0x1
popq %r10
jmp 0x7380
movq 0x18(%rsp), %rax
movq %rbx, %rcx
shrq %rcx
movq %rax, 0x18(%rsp)
movq %rcx, (%rax,%r14,8)
incq %r14
movq %r14, 0x20(%rsp)
movq 0x28(%rsp), %rcx
movq 0x38(%rcx), %rax
movq (%rax,%rbx,8), %r14
movq 0x28(%rcx), %rax
movq 0x30(%rcx), %rcx
imulq $0x30, (%rcx,%rbx,8), %rcx
leaq (%rax,%rcx), %r15
addq $0x8, %r15
movq 0x30(%rsp), %rdi
subq $0x1, %r14
jb 0x740d
testb $0x40, 0x1b(%r15)
jne 0x7407
movq (%r15), %rsi
movq 0x38(%rsp), %rax
cmpb $0x0, (%rax,%rsi)
jne 0x73ea
callq 0x7c0a
pushq $0x1
popq %r10
movq 0x30(%rsp), %rdi
movq (%r15), %rsi
xorq $0x1, %rsi
movq 0x38(%rsp), %rax
cmpb $0x0, (%rax,%rsi)
jne 0x7407
callq 0x7c0a
pushq $0x1
popq %r10
movq 0x30(%rsp), %rdi
addq $0x30, %r15
jmp 0x73be
movq 0x38(%rsp), %rax
movb $0x1, (%rax,%rbx)
jmp 0x72d8
xorl %ecx, %ecx
movq 0x8(%rsp), %rax
cmpq 0x20(%rsp), %rcx
je 0x7946
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rax
movq %rcx, %rdx
movq 0x18(%rsp), %rcx
movq %rdx, 0xb8(%rsp)
imulq $0x28, (%rcx,%rdx,8), %rcx
movq (%rax,%rcx), %rdx
movq %rdx, 0xc0(%rsp)
movq 0x8(%rax,%rcx), %rax
movq %rax, 0xa0(%rsp)
xorl %r8d, %r8d
xorl %r15d, %r15d
cmpq 0xc0(%rsp), %r15
je 0x7936
cmpq $0x0, 0x10(%r13)
je 0x748b
movb (%r13), %cl
movl %r10d, %r12d
shll %cl, %r12d
jmp 0x748e
xorl %r12d, %r12d
movq 0xa0(%rsp), %rax
movq (%rax,%r15,8), %rbx
orl $-0x1, 0x14(%rsp)
movl 0x4(%r13), %eax
movl %r12d, %ecx
shrl %ecx
movl %r12d, %edx
shrl $0x2, %edx
addl %ecx, %edx
cmpl %edx, %eax
movq %r15, 0xa8(%rsp)
movq %rbx, 0x98(%rsp)
jae 0x74d3
movq %r8, %r15
movl (%r13), %r14d
movl %r12d, %ebp
jmp 0x7714
leal 0x1(%r12), %ecx
xorl %edx, %edx
movl %ecx, %esi
cmpl $0x2, %esi
jb 0x74e7
shrl %esi
incl %edx
jmp 0x74dc
leal -0x1(%rcx), %esi
andl %ecx, %esi
cmpl $0x1, %esi
sbbl $-0x1, %edx
cmpl $0x3, %edx
pushq $0x2
popq %rcx
cmovael %edx, %ecx
movl %r10d, %ebp
shll %cl, %ebp
movl %ebp, %edi
shrl %edi
movl %ebp, %esi
shrl $0x2, %esi
addl %edi, %esi
cmpl %esi, %eax
jbe 0x7523
movq %r8, %r15
movl (%r13), %r14d
movl %r10d, %ebp
movl %r14d, %ecx
shll %cl, %ebp
jmp 0x7714
movl %ecx, 0x5c(%rsp)
movq %r8, 0x70(%rsp)
movq 0x18(%r13), %rdi
movl %ebp, %ebx
shrl $0x3, %ebx
andl $-0x4, %ebx
cmpl $0x5, %edx
pushq $0x4
popq %rax
cmovbl %eax, %ebx
movq %rbx, %rsi
callq 0x1799c
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x21e0
testq %r14, %r14
je 0x77c9
movq 0x10(%r13), %r15
movl %ebp, %ebx
testq %r15, %r15
movq %rbp, 0x90(%rsp)
je 0x7593
movq %rbp, %rax
movb (%r13), %cl
pushq $0x1
popq %r8
movl %r8d, %ebp
shll %cl, %ebp
cmpl %eax, %ebp
jb 0x7595
movq %rbx, 0x88(%rsp)
jmp 0x75c9
xorl %ebp, %ebp
movq 0x40(%rsp), %r13
movq 0x18(%r13), %rdi
movq %rbx, %rdx
shlq $0x4, %rdx
movq %r15, %rsi
callq 0x17aa4
testq %rax, %rax
je 0x791d
movq %rax, %r15
movq %rbx, 0x88(%rsp)
movq %rax, 0x10(%r13)
pushq $0x1
popq %r8
movq 0x90(%rsp), %rax
leal -0x1(%rax), %ebx
pushq $0x20
popq %rax
subl 0x5c(%rsp), %eax
movl %eax, 0x7c(%rsp)
movl %ebp, %eax
movq %rax, 0x50(%rsp)
xorl %ecx, %ecx
movq 0x40(%rsp), %r13
cmpq 0x50(%rsp), %rcx
je 0x76c3
movq 0x8(%r13), %r12
movl %ecx, %esi
shrl $0x5, %esi
movl (%r12,%rsi,4), %eax
movl %r8d, %edx
shll %cl, %edx
btl %ecx, %eax
jae 0x76bb
leaq (%r12,%rsi,4), %r9
movq %rcx, 0xc8(%rsp)
movq %rcx, %rsi
shlq $0x4, %rsi
movq (%r15,%rsi), %rbp
movq 0x8(%r15,%rsi), %r13
notl %edx
andl %eax, %edx
movl %edx, (%r9)
movq %rbp, %rdi
callq 0x9e82
imull $0x9e3779b9, %eax, %eax # imm = 0x9E3779B9
movl 0x7c(%rsp), %ecx
shrl %cl, %eax
pushq $0x1
popq %r8
movl %eax, %esi
shrl $0x5, %esi
movl (%r14,%rsi,4), %edi
movl %r8d, %edx
movl %eax, %ecx
shll %cl, %edx
btl %eax, %edi
jae 0x7669
incl %eax
andl %ebx, %eax
jmp 0x764e
orl %edx, %edi
movl %edi, (%r14,%rsi,4)
movl %eax, %edi
cmpl 0x50(%rsp), %eax
jae 0x76a1
movl (%r12,%rsi,4), %eax
testl %edx, %eax
je 0x76a1
leaq (%r12,%rsi,4), %r9
shlq $0x4, %rdi
movq (%r15,%rdi), %rsi
movq 0x8(%r15,%rdi), %r8
movq %rbp, (%r15,%rdi)
movq %r13, 0x8(%r15,%rdi)
movq %r8, %r13
movq %rsi, %rbp
jmp 0x762f
shlq $0x4, %rdi
movq %rbp, (%r15,%rdi)
movq %r13, 0x8(%r15,%rdi)
movq 0x40(%rsp), %r13
movq 0xc8(%rsp), %rcx
incq %rcx
jmp 0x75ed
movq 0x90(%rsp), %rbp
cmpl %ebp, 0x50(%rsp)
jbe 0x76ed
movq 0x18(%r13), %rdi
movq 0x88(%rsp), %rdx
shlq $0x4, %rdx
movq %r15, %rsi
callq 0x17aa4
movq %rax, 0x10(%r13)
movq 0x8(%r13), %rsi
movq 0x18(%r13), %rdi
callq 0x178a7
movq %r14, 0x8(%r13)
movl 0x5c(%rsp), %r14d
movl %r14d, (%r13)
movq 0x70(%rsp), %r15
movq 0x98(%rsp), %rbx
shrq %rbx
decl %ebp
movq %rbx, %rdi
callq 0x9e82
imull $0x9e3779b9, %eax, %r12d # imm = 0x9E3779B9
negb %r14b
movl %r14d, %ecx
shrl %cl, %r12d
movq 0x8(%r13), %rax
movl %r12d, %ecx
pushq $0x1
popq %r10
movq %r15, %r11
movq 0xa8(%rsp), %r15
movl %ecx, %edx
shrl $0x5, %edx
movl (%rax,%rdx,4), %edi
movl %r10d, %esi
shll %cl, %esi
btl %ecx, %edi
jae 0x7786
movq 0x10(%r13), %r8
movl %ecx, %r9d
shlq $0x4, %r9
cmpq %rbx, (%r8,%r9)
je 0x7786
incl %ecx
andl %ebp, %ecx
cmpl %r12d, %ecx
jne 0x7747
movl %r12d, %edx
shrl $0x5, %edx
movl %r10d, %esi
movl %r12d, %ecx
shll %cl, %esi
movl (%rax,%rdx,4), %edi
jmp 0x7789
movl %ecx, %r12d
movl %r12d, %ecx
testl %edi, %esi
je 0x77a7
andl $0x0, 0x14(%rsp)
movq 0x10(%r13), %rax
shlq $0x4, %rcx
movq 0x8(%rax,%rcx), %rbp
jmp 0x782a
movq %r11, 0x70(%rsp)
movq 0x10(%r13), %r8
shlq $0x4, %rcx
movq %rbx, (%r8,%rcx)
orl %edi, %esi
movl %esi, (%rax,%rdx,4)
incl 0x4(%r13)
movl $0x1, 0x14(%rsp)
movq 0x48(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x6afd
movq %rax, %rbp
movq 0xd0(%rsp), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
andq $0x0, 0x20(%r14)
pushq $0x8
popq %rdi
callq 0x2310
movq %rax, 0x8(%r14)
movq $0x1, (%r14)
movq 0x98(%rsp), %rcx
andq $-0x2, %rcx
movq %rcx, (%rax)
movq 0x10(%r13), %rax
movl %r12d, %ecx
shlq $0x4, %rcx
movq %rbp, 0x8(%rax,%rcx)
movq 0x70(%rsp), %r11
movq %r15, %rbx
testq %r15, %r15
je 0x790b
movq 0xa0(%rsp), %rcx
movq -0x8(%rcx,%rbx,8), %rax
movq (%rcx,%rbx,8), %rcx
andl $0x1, %eax
leaq (%rax,%r11,2), %r14
andl $0x1, %ecx
leaq (%rcx,%rbp,2), %r15
movq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x6c5e
cmpq $0x0, 0x10(%r12)
je 0x7881
movq 0x8(%rsp), %rcx
movb (%rcx), %cl
shrl %cl, %eax
testl %eax, %eax
je 0x790b
movq %rbp, 0x50(%rsp)
movq 0x48(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq $0x0
pushq $0x0
callq 0x7070
popq %rax
popq %rcx
movq %r15, %r12
xorq $0x1, %r12
movq %r14, %rbp
xorq $0x1, %rbp
cmpq %r14, %r12
je 0x78d5
movq 0x48(%rsp), %rdi
movq %r12, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq $0x1
pushq $0x0
callq 0x7070
popq %rax
popq %rcx
movq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
leaq 0x14(%rsp), %r14
movq %r14, %rcx
callq 0x6cf6
movq %r13, %rdi
movq %rbp, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x6cf6
movq 0x40(%rsp), %r13
movq 0x50(%rsp), %rbp
movq %rbx, %r15
incq %r15
movq %rbp, %r8
pushq $0x1
popq %r10
jmp 0x746a
movq 0x18(%r13), %rdi
movq %r14, %rsi
callq 0x178a7
movq 0xa8(%rsp), %r15
jmp 0x77c9
movq 0xb8(%rsp), %rcx
incq %rcx
jmp 0x741d
movq 0x20(%rsp), %rcx
addq %rcx, %rcx
movq %rcx, 0x20(%rsp)
xorl %r12d, %r12d
cmpq 0x20(%rsp), %r12
je 0x7ae5
movq %r12, %rax
andq $-0x2, %rax
movq 0x18(%rsp), %rcx
movq (%rcx,%rax,4), %rbx
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rcx
imulq $0x28, %rbx, %rdx
movq 0x8(%rcx,%rdx), %rax
movq %r12, %r15
andq $0x1, %r15
jne 0x7999
addq %rdx, %rcx
movq (%rcx), %rcx
movq -0x8(%rax,%rcx,8), %r14
jmp 0x79a0
movq (%rax), %r14
xorq $0x1, %r14
movq %r14, %rsi
shrq %rsi
movq %r13, %rdi
callq 0x7d5b
movq 0x10(%r13), %rcx
movl %eax, %eax
shlq $0x4, %rax
movq 0x8(%rcx,%rax), %rax
andl $0x1, %r14d
leaq (%r14,%rax,2), %r14
leaq (%r15,%rbx,2), %r15
xorl %ebp, %ebp
cmpq %rbp, 0x20(%rsp)
movq 0x18(%rsp), %rcx
je 0x7acf
movq %rbp, %rax
andq $-0x2, %rax
movq (%rcx,%rax,4), %rbx
movl %ebp, %r13d
andl $0x1, %r13d
leaq (,%rbx,2), %rdx
addq %r13, %rdx
movq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0x6a92
testq %rax, %rax
je 0x7ac7
cmpq $0x0, 0x10(%rax)
jne 0x7ac7
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rcx
imulq $0x28, %rbx, %rdx
movq 0x8(%rcx,%rdx), %rax
testq %r13, %r13
jne 0x7a35
movq (%rax), %rbx
jmp 0x7a44
addq %rdx, %rcx
movq (%rcx), %rcx
movq -0x8(%rax,%rcx,8), %rbx
xorq $0x1, %rbx
movq %rbx, %rsi
shrq %rsi
movq 0x40(%rsp), %r13
movq %r13, %rdi
callq 0x7d5b
movq 0x10(%r13), %rcx
movl %eax, %eax
shlq $0x4, %rax
movq 0x8(%rcx,%rax), %rax
andl $0x1, %ebx
leaq (%rbx,%rax,2), %rbx
movq 0x8(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6c5e
cmpq $0x0, 0x10(%r13)
je 0x7a94
movq 0x8(%rsp), %rcx
movb (%rcx), %cl
shrl %cl, %eax
testl %eax, %eax
je 0x7ac7
movq 0x48(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq $0x0
pushq $0x0
callq 0x7070
popq %rax
popq %rcx
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
leaq 0x14(%rsp), %rcx
callq 0x6cf6
incq %rbp
jmp 0x79cb
incq %r12
movq 0x40(%rsp), %r13
movq 0x8(%rsp), %rax
pushq $0x1
popq %r10
jmp 0x7956
testq %r13, %r13
je 0x7b20
movq 0x8(%r13), %rdi
testq %rdi, %rdi
je 0x7b20
movl (%r13), %ecx
movl %r10d, %edx
shll %cl, %edx
shrl $0x3, %edx
andl $-0x4, %edx
cmpl $0x5, %ecx
pushq $0x4
popq %rax
cmovbl %eax, %edx
xorl %esi, %esi
callq 0x21e0
pushq $0x1
popq %r10
movq 0x8(%rsp), %rax
andl $0x0, 0x4(%r13)
testq %rax, %rax
je 0x7b54
movq 0x8(%rax), %rdi
testq %rdi, %rdi
je 0x7b54
movl (%rax), %ecx
movl %r10d, %edx
shll %cl, %edx
shrl $0x3, %edx
andl $-0x4, %edx
cmpl $0x5, %ecx
pushq $0x4
popq %rax
cmovbl %eax, %edx
xorl %esi, %esi
callq 0x21e0
movq 0x8(%rsp), %rax
andl $0x0, 0x4(%rax)
movq 0x60(%rsp), %rdx
movq 0x68(%rsp), %rsi
incq %rsi
jmp 0x726e
movq 0x30(%rsp), %rbx
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdi
callq 0x178a7
movq 0x20(%rbx), %rdi
movq %rbx, %rsi
callq 0x178a7
movq 0x18(%rsp), %rdi
callq 0x2060
testq %r13, %r13
je 0x7bba
movq 0x10(%r13), %rsi
movq 0x18(%r13), %rbx
movq %rbx, %rdi
callq 0x178a7
movq 0x8(%r13), %rsi
movq %rbx, %rdi
callq 0x178a7
movq %rbx, %rdi
movq %r13, %rsi
callq 0x178a7
movq 0x8(%rsp), %rdi
callq 0x7155
movq 0x38(%rsp), %rdi
callq 0x2060
pushq $0x1
popq %rsi
movq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0x1213f
movq 0x28(%rsp), %rdi
callq 0x11e5c
movq 0xb0(%rsp), %rdi
movq %rbx, 0x8(%rdi)
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x571b