// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]yahs/graph.c
// Function: make_asm_dict_from_graph
asm_dict_t *make_asm_dict_from_graph(graph_t *graph, asm_dict_t *dict)
{
    uint32_t i, j, k, r, s, g, v, p, qs, nv, na, ns, nseg, ori;
    int step;
    uint64_t len, gap;
    graph_arc_t *av;
    kdq_t(uint32_t) *q;
    asm_dict_t *d;
    uint8_t *visited;
    sdict_t *sd;
    sd_aseq_t aseq;
    sd_seg_t cseg;
    char s_name[32];
    kvec_t(uint32_t) gs, gsize, gcomp, gtype, glink, gevid;

    sprintf(s_name, "scaffold_");
    kv_init(gs);
    kv_init(gsize);
    kv_init(gcomp);
    kv_init(gtype);
    kv_init(glink);
    kv_init(gevid);
    sd = dict->sdict;
    d = asm_init(sd);
    nv = graph_n_vtx(graph);
    nv <<= 1;
    q = kdq_init(uint32_t);
    visited = calloc(nv, sizeof(uint8_t));
    s = 0;
    for (r = 0; r < 2; ++r) {
        // second visit for circles
        for (i = 0; i < nv; ++i) {
            if (visited[i]) 
                continue;

            na = graph_arc_n(graph, i);
            if (!na || r) {
                v = i^1; // v is either a path source or a singleton
                kdq_clean(q);
                while (1) {
                    if (visited[v]) 
                        break; //circle
                    kdq_push(uint32_t, q, v);
                    visited[v] = visited[v^1] = 1;
                    na = graph_arc_n(graph, v);
                    av = graph_arc_a(graph, v);
                    assert(na < 2);
                    if (!na) 
                        break;
                    v = av->w;
                }

                // write files
                qs = kdq_size(q);
                if (qs) {
                    len = gap = 0;
                    ns = 0;
                    for (j = 0; j < qs; ++j) {
                        v = kdq_at(q, j);
                        aseq = dict->s[v>>1];
                        nseg = aseq.n;
                        ori = v&1;
                        if (ori) {
                            p = nseg - 1;
                            g = aseq.gn - 1;
                            step = -1;
                        } else {
                            p = 0;
                            g = 0;
                            step = 1;
                        }
                        for (k = 0; k < nseg; ++k) {
                            // add gap info
                            while (g != (uint32_t) -1 && g < aseq.gn && 
                                    (ori? aseq.gs[g] > p : aseq.gs[g] <= p)) {
                                kv_push(uint32_t, gs, ns);
                                kv_push(uint32_t, gsize, aseq.gsize[g]);
                                kv_push(uint32_t, gcomp, aseq.gcomp[g]);
                                kv_push(uint32_t, gtype, aseq.gtype[g]);
                                kv_push(uint32_t, glink, aseq.glink[g]);
                                kv_push(uint32_t, gevid, aseq.gevid[g]);
                                gap += aseq.gsize[g];
                                g += step;
                            }
                            // add seg
                            cseg = dict->seg[aseq.s + p];
                            seg_put(d, d->n, ns++, len, len + gap, cseg.c^ori, cseg.x, cseg.y, cseg.t,
                                    ori? agp_orientation_rev(cseg.r) : cseg.r);
                            len += cseg.y;
                            p += step;
                        }

                        while (g != (uint32_t) -1 && g < aseq.gn) {
                            kv_push(uint32_t, gs, ns);
                            kv_push(uint32_t, gsize, aseq.gsize[g]);
                            kv_push(uint32_t, gcomp, aseq.gcomp[g]);
                            kv_push(uint32_t, gtype, aseq.gtype[g]);
                            kv_push(uint32_t, glink, aseq.glink[g]);
                            kv_push(uint32_t, gevid, aseq.gevid[g]);
                            gap += aseq.gsize[g];
                            g += step;
                        }

                        if (j < qs - 1) {
                            kv_push(uint32_t, gs, ns);
                            kv_push(uint32_t, gsize, DEFAULT_AGP_GAP_SIZE);
                            kv_push(uint32_t, gcomp, DEFAULT_AGP_GAP_COMPONENT_TYPE);
                            kv_push(uint32_t, gtype, DEFAULT_AGP_GAP_TYPE);
                            kv_push(uint32_t, glink, AGP_LG_YES);
                            kv_push(uint32_t, gevid, DEFAULT_AGP_LINKAGE_EVIDENCE);
                            gap += DEFAULT_AGP_GAP_SIZE;
                        }
                    }
                    sprintf(&s_name[9], "%u", ++s);
                    asm_put(d, s_name, len, gap, ns, d->u - ns, gs.n, gs.a, gsize.a, gcomp.a, gtype.a, glink.a, gevid.a);
                    gs.n = gsize.n = gcomp.n = gtype.n = glink.n = gevid.n = 0;
                }
            }
        }
    }

    free(visited);
    kdq_destroy(uint32_t, q);
    kv_destroy(gs);
    kv_destroy(gsize);
    kv_destroy(gcomp);
    kv_destroy(gtype);
    kv_destroy(glink);
    kv_destroy(gevid);

    asm_index(d);

    return d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rdi, %rbx
movabsq $0x646c6f6666616373, %rax # imm = 0x646C6F6666616373
leaq 0x1b9(%rsp), %rcx
movq %rax, -0x9(%rcx)
movw $0x5f, -0x1(%rcx)
movq %rsi, 0x130(%rsp)
movq 0x38(%rsi), %rdi
callq 0xe1ab
movq %rax, 0xd0(%rsp)
movq 0x8(%rbx), %rax
movl (%rax), %r14d
addl %r14d, %r14d
callq 0x82c2
movq %rax, 0xb8(%rsp)
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x2290
movq %rax, %r12
movb $0x1, %bpl
movl $0x0, 0xcc(%rsp)
movl $0x0, %eax
movl $0x0, %ecx
movq %rcx, 0x10(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0xb0(%rsp)
movq $0x0, 0x20(%rsp)
movq $0x0, 0xa8(%rsp)
xorl %r13d, %r13d
movq $0x0, 0xa0(%rsp)
xorl %r15d, %r15d
movq $0x0, 0x98(%rsp)
movq $0x0, 0x28(%rsp)
movq $0x0, 0x78(%rsp)
movq %rbx, 0x170(%rsp)
movq %r14, 0x168(%rsp)
movq %r12, 0x160(%rsp)
cmpl $0x2, %eax
je 0x8221
xorl %esi, %esi
movl %eax, 0x80(%rsp)
cmpq %r14, %rsi
je 0x821a
cmpb $0x0, (%r12,%rsi)
jne 0x8212
testl %eax, %eax
jne 0x74e1
movq 0x28(%rbx), %rax
movl (%rax,%rsi,8), %eax
testq %rax, %rax
jne 0x820b
movq %r15, 0x30(%rsp)
movl %esi, %eax
movq 0xb8(%rsp), %rcx
movabsq $-0x400000000000000, %rdx # imm = 0xFC00000000000000
andq %rdx, (%rcx)
xorl $0x1, %eax
andq $0x0, 0x8(%rcx)
movq %rsi, 0x128(%rsp)
movl %eax, %r15d
cmpb $0x0, (%r12,%r15)
jne 0x7565
movq 0xb8(%rsp), %rdi
movl %r15d, %esi
callq 0x684d
movq %r15, %rax
xorq $0x1, %rax
movb %bpl, (%r12,%rax)
movb %bpl, (%r12,%r15)
movq 0x28(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpl $0x2, %eax
jae 0x82a3
testl %eax, %eax
movq 0x128(%rsp), %rsi
je 0x7565
movq 0x20(%rbx), %rcx
shrq $0x20, %rax
shlq $0x5, %rax
movl 0x4(%rcx,%rax), %eax
jmp 0x750d
movq 0xb8(%rsp), %rax
movq 0x8(%rax), %rax
testl %eax, %eax
je 0x8206
leal -0x1(%rax), %ecx
movq %rcx, 0x178(%rsp)
movl %eax, %eax
movq %rax, 0x180(%rsp)
xorl %edi, %edi
movq $0x0, 0xc0(%rsp)
movq $0x0, 0x108(%rsp)
xorl %ebx, %ebx
xorl %r14d, %r14d
xorl %ebp, %ebp
xorl %r15d, %r15d
xorl %r12d, %r12d
xorl %r10d, %r10d
xorl %r8d, %r8d
movq 0x48(%rsp), %rax
movq %rax, 0x48(%rsp)
movq %r13, 0x50(%rsp)
cmpq 0x180(%rsp), %rdi
je 0x815d
movq 0xb8(%rsp), %rdx
movq 0x18(%rdx), %rax
movq (%rdx), %rcx
movabsq $0x3ffffffffffffff, %rsi # imm = 0x3FFFFFFFFFFFFFF
andq %rsi, %rcx
movq %rdi, 0x100(%rsp)
addq %rdi, %rcx
andq 0x10(%rdx), %rcx
movl (%rax,%rcx,4), %r9d
movq 0x130(%rsp), %rax
movq 0x8(%rax), %rax
movl %r9d, %ecx
shrl %ecx
imulq $0x58, %rcx, %rcx
movl 0x18(%rax,%rcx), %edx
movl 0x1c(%rax,%rcx), %esi
movq %rsi, 0x188(%rsp)
movl 0x20(%rax,%rcx), %esi
movq 0x28(%rax,%rcx), %rdi
movq %rdi, 0x190(%rsp)
movq 0x30(%rax,%rcx), %rdi
movq %rdi, 0xf8(%rsp)
movq 0x38(%rax,%rcx), %rdi
movq %rdi, 0x150(%rsp)
movq 0x40(%rax,%rcx), %rdi
movq %rdi, 0x148(%rsp)
movq 0x48(%rax,%rcx), %rdi
movq %rdi, 0x140(%rsp)
movq 0x50(%rax,%rcx), %rax
movq %rax, 0x138(%rsp)
andl $0x1, %r9d
movl %r9d, 0xe8(%rsp)
movl %r9d, %eax
negl %eax
leal -0x1(%rdx), %ecx
movq %rsi, 0x158(%rsp)
leal -0x1(%rsi), %r9d
andl %eax, %ecx
movq %rcx, 0x90(%rsp)
andl %eax, %r9d
orl $0x1, %eax
movl %eax, 0x84(%rsp)
movq %rbx, %rax
addl %eax, %edx
movq %rdx, 0xd8(%rsp)
movq %r8, %rbx
movq %r10, %rdx
movq %r12, %rsi
movq %r15, %rdi
movq %rbp, %r8
movq %r14, %r11
cmpl 0xd8(%rsp), %eax
movq %r10, 0x68(%rsp)
movq %r12, 0x70(%rsp)
movq %r15, 0x40(%rsp)
movq %rbp, 0x38(%rsp)
movq %r14, 0x60(%rsp)
movq %rbx, 0xe0(%rsp)
je 0x7b6f
movq %rax, 0xf0(%rsp)
leaq (,%r11,4), %rax
movq %rax, 0x120(%rsp)
leaq (,%r8,4), %rax
movq %rax, 0x118(%rsp)
leaq (,%rdi,4), %rax
movq %rax, 0x110(%rsp)
leaq (,%rsi,4), %rax
movq %rax, 0x1a8(%rsp)
leaq (,%rdx,4), %rax
movq %rax, 0x1a0(%rsp)
leaq (,%rbx,4), %rax
movq %rax, 0x198(%rsp)
xorl %r12d, %r12d
leaq (%r11,%r12), %r14
leaq (%r8,%r12), %rbp
leaq (%rdi,%r12), %r15
addq %r12, %rsi
addq %r12, %rdx
addq %r12, %rbx
cmpl $-0x1, %r9d
movl %r9d, 0x4(%rsp)
movq %rdx, 0x58(%rsp)
movq %rsi, 0x8(%rsp)
je 0x7a46
cmpl 0x158(%rsp), %r9d
jae 0x7a46
cmpl $0x0, 0xe8(%rsp)
sete %al
movl %r9d, %r13d
movq 0x190(%rsp), %rcx
movq 0x90(%rsp), %rdi
cmpl %edi, (%rcx,%r13,4)
seta %cl
cmpb %cl, %al
je 0x7a46
movq 0x48(%rsp), %rax
cmpq %rax, %r14
jne 0x780c
leaq (%rax,%rax), %r14
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %r14
leaq (,%r14,4), %rsi
movq 0x10(%rsp), %rdi
callq 0x2390
movq %r14, 0x48(%rsp)
movq 0x18(%rsp), %rdi
jmp 0x7816
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x120(%rsp), %rcx
addq %rcx, %rax
movq 0xf0(%rsp), %rcx
movl %ecx, (%rax,%r12,4)
movq 0xb0(%rsp), %rax
cmpq %rax, %rbp
jne 0x7865
leaq (%rax,%rax), %r14
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %r14
leaq (,%r14,4), %rsi
callq 0x2390
movq %rax, %rdi
movq %r14, 0xb0(%rsp)
movq 0x28(%rsp), %rbp
movq 0xf8(%rsp), %rax
movl (%rax,%r13,4), %eax
movq %rdi, 0x18(%rsp)
movq 0x118(%rsp), %rcx
addq %rdi, %rcx
movl %eax, (%rcx,%r12,4)
movq 0xa8(%rsp), %rax
cmpq %rax, %r15
jne 0x78c6
leaq (%rax,%rax), %r14
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %r14
leaq (,%r14,4), %rsi
movq 0x20(%rsp), %rdi
callq 0x2390
movq %r14, 0xa8(%rsp)
movq 0x30(%rsp), %r15
jmp 0x78d0
movq 0x30(%rsp), %r15
movq 0x20(%rsp), %rax
movq 0x8(%rsp), %rsi
movq 0x150(%rsp), %rcx
movl (%rcx,%r13,4), %edx
movq %rax, 0x20(%rsp)
movq 0x110(%rsp), %rcx
addq %rax, %rcx
movl %edx, (%rcx,%r12,4)
movq 0xa0(%rsp), %rax
cmpq %rax, %rsi
jne 0x792c
leaq (%rax,%rax), %r14
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %r14
leaq (,%r14,4), %rsi
movq 0x50(%rsp), %rdi
callq 0x2390
movq %r14, 0xa0(%rsp)
jmp 0x7931
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rsi
movq 0x148(%rsp), %rcx
movl (%rcx,%r13,4), %edx
movq %rax, 0x50(%rsp)
movq 0x1a8(%rsp), %rcx
addq %rax, %rcx
movl %edx, (%rcx,%r12,4)
movq 0x98(%rsp), %rax
cmpq %rax, %rsi
jne 0x798c
leaq (%rax,%rax), %r14
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %r14
leaq (,%r14,4), %rsi
movq %r15, %rdi
callq 0x2390
movq %rax, %r15
movq %r14, 0x98(%rsp)
movq 0x140(%rsp), %rax
movl (%rax,%r13,4), %eax
movq 0x1a0(%rsp), %rcx
addq %r15, %rcx
movl %eax, (%rcx,%r12,4)
movq 0x78(%rsp), %rax
cmpq %rax, %rbx
jne 0x79d7
leaq (%rax,%rax), %r14
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %r14
leaq (,%r14,4), %rsi
movq %rbp, %rdi
callq 0x2390
movq %rax, %rbp
movq %r14, 0x78(%rsp)
movq 0xe0(%rsp), %rbx
movq 0x68(%rsp), %rdx
movq 0x70(%rsp), %rsi
movq 0x40(%rsp), %rdi
movl 0x4(%rsp), %r9d
movq 0x38(%rsp), %r8
movq 0x60(%rsp), %r11
movq %r15, 0x30(%rsp)
movq 0x138(%rsp), %rax
movl (%rax,%r13,4), %eax
movq %rbp, 0x28(%rsp)
movq 0x198(%rsp), %rcx
addq %rbp, %rcx
movl %eax, (%rcx,%r12,4)
movq 0xf8(%rsp), %rax
movl (%rax,%r13,4), %eax
addq %rax, 0xc0(%rsp)
addl 0x84(%rsp), %r9d
incq %r12
jmp 0x776d
movq 0x130(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x188(%rsp), %rcx
movq 0x90(%rsp), %rdx
addl %edx, %ecx
imulq $0x30, %rcx, %rcx
movl 0x18(%rax,%rcx), %r9d
movl 0xe8(%rsp), %edx
xorl %edx, %r9d
movl 0x1c(%rax,%rcx), %r11d
movl 0x20(%rax,%rcx), %r10d
movl 0x24(%rax,%rcx), %r13d
movl 0x28(%rax,%rcx), %eax
movq 0xd0(%rsp), %rcx
movl (%rcx), %esi
testl %edx, %edx
movq %rbx, 0x88(%rsp)
jne 0x7b1d
movq 0xf0(%rsp), %rdx
leal 0x1(%rdx), %ebx
movq 0xc0(%rsp), %rcx
movq 0x108(%rsp), %r12
leaq (%rcx,%r12), %r8
movq 0xd0(%rsp), %rdi
movq %r12, %rcx
pushq %rax
pushq %r13
movq %r10, %r13
pushq %r10
pushq %r11
callq 0xeeed
addq $0x20, %rsp
addq %r13, %r12
movq %r12, 0x108(%rsp)
movq 0x90(%rsp), %rax
addl 0x84(%rsp), %eax
movq %rax, 0x90(%rsp)
movl %ebx, %eax
movq 0x88(%rsp), %r8
movl 0x4(%rsp), %r9d
movq 0x58(%rsp), %r10
movq 0x8(%rsp), %r12
jmp 0x76c2
cmpl $0x2b5d0, %eax          # imm = 0x2B5D0
je 0x7b65
cmpl $0x7ca1b285, %eax       # imm = 0x7CA1B285
je 0x7aa0
cmpl $0x2b5d5, %eax          # imm = 0x2B5D5
je 0x7aa0
cmpl $0x2b5e4, %eax          # imm = 0x2B5E4
je 0x7aa0
cmpl $0x5978d4, %eax         # imm = 0x5978D4
je 0x7aa0
cmpl $0x2b5d2, %eax          # imm = 0x2B5D2
jne 0x8293
movl $0x2b5d0, %eax          # imm = 0x2B5D0
jmp 0x7aa0
movl $0x2b5d2, %eax          # imm = 0x2B5D2
jmp 0x7aa0
leaq (,%r11,4), %rax
movq %rax, 0x90(%rsp)
leaq (,%r8,4), %rax
movq %rax, 0xf0(%rsp)
leaq (,%rdi,4), %rax
movq %rax, 0xe8(%rsp)
leaq (,%rsi,4), %rax
movq %rax, 0x120(%rsp)
leaq (,%rdx,4), %rax
movq %rax, 0x118(%rsp)
leaq (,%rbx,4), %rax
movq %rax, 0x110(%rsp)
xorl %r10d, %r10d
movq 0x50(%rsp), %r13
leaq (%r11,%r10), %r14
leaq (%r8,%r10), %rbp
leaq (%rdi,%r10), %r15
leaq (%rsi,%r10), %r12
movq %r10, %rax
addq %rdx, %r10
movq %rax, 0x8(%rsp)
leaq (%rbx,%rax), %r8
cmpl $-0x1, %r9d
movq 0x48(%rsp), %rax
movq %r8, 0x88(%rsp)
movq %r10, 0x58(%rsp)
je 0x7eb5
cmpl 0x158(%rsp), %r9d
jae 0x7eb5
cmpq %rax, %r14
movl %r9d, 0x4(%rsp)
movq %r13, 0x50(%rsp)
jne 0x7c5b
leaq (%rax,%rax), %r14
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %r14
leaq (,%r14,4), %rsi
movq 0x10(%rsp), %rdi
callq 0x2390
movq %r14, 0x48(%rsp)
movq 0x18(%rsp), %rdi
jmp 0x7c65
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x90(%rsp), %rcx
addq %rcx, %rax
movq 0xd8(%rsp), %rcx
movq 0x8(%rsp), %r10
movl %ecx, (%rax,%r10,4)
movq 0xb0(%rsp), %rax
cmpq %rax, %rbp
jne 0x7cbe
leaq (%rax,%rax), %r14
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %r14
leaq (,%r14,4), %rsi
callq 0x2390
movq 0x8(%rsp), %r10
movq %rax, %rdi
movq %r14, 0xb0(%rsp)
movq 0x28(%rsp), %r13
movl 0x4(%rsp), %eax
movl %eax, %r14d
movq 0xf8(%rsp), %rax
movl (%rax,%r14,4), %eax
movq %rdi, 0x18(%rsp)
movq 0xf0(%rsp), %rcx
addq %rdi, %rcx
movl %eax, (%rcx,%r10,4)
movq 0xa8(%rsp), %rax
cmpq %rax, %r15
jne 0x7d26
leaq (%rax,%rax), %r15
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %r15
leaq (,%r15,4), %rsi
movq 0x20(%rsp), %rdi
callq 0x2390
movq 0x8(%rsp), %r10
movq %r15, 0xa8(%rsp)
jmp 0x7d2b
movq 0x20(%rsp), %rax
movq 0x150(%rsp), %rcx
movl (%rcx,%r14,4), %edx
movq %rax, 0x20(%rsp)
movq 0xe8(%rsp), %rcx
addq %rax, %rcx
movl %edx, (%rcx,%r10,4)
movq 0xa0(%rsp), %rax
cmpq %rax, %r12
jne 0x7d8a
leaq (%rax,%rax), %r15
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %r15
leaq (,%r15,4), %rsi
movq 0x50(%rsp), %rdi
callq 0x2390
movq 0x8(%rsp), %r10
movq %rax, %r12
movq %r15, 0xa0(%rsp)
jmp 0x7d8f
movq 0x50(%rsp), %r12
movq 0x58(%rsp), %rdx
movq 0x148(%rsp), %rax
movl (%rax,%r14,4), %eax
movq %r12, %rbp
movq 0x120(%rsp), %rcx
addq %r12, %rcx
movl %eax, (%rcx,%r10,4)
movq 0x98(%rsp), %rax
cmpq %rax, %rdx
jne 0x7dee
leaq (%rax,%rax), %r15
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %r15
leaq (,%r15,4), %rsi
movq 0x30(%rsp), %rdi
callq 0x2390
movq 0x8(%rsp), %r10
movq %r15, 0x98(%rsp)
jmp 0x7df3
movq 0x30(%rsp), %rax
movq 0x88(%rsp), %rsi
movq 0x140(%rsp), %rcx
movl (%rcx,%r14,4), %edx
movq 0x118(%rsp), %rcx
addq %rax, %rcx
movl %edx, (%rcx,%r10,4)
movq 0x78(%rsp), %rcx
cmpq %rcx, %rsi
movq %rax, 0x30(%rsp)
jne 0x7e50
leaq (%rcx,%rcx), %r15
testq %rcx, %rcx
pushq $0x2
popq %rax
cmoveq %rax, %r15
leaq (,%r15,4), %rsi
movq %r13, %rdi
callq 0x2390
movq 0x8(%rsp), %r10
movq %rax, %r13
movq %r15, 0x78(%rsp)
movq 0x68(%rsp), %rdx
movq 0x70(%rsp), %rsi
movq 0x40(%rsp), %rdi
movl 0x4(%rsp), %r9d
movq 0x38(%rsp), %r8
movq 0x60(%rsp), %r11
movq 0x138(%rsp), %rax
movl (%rax,%r14,4), %eax
movq %r13, 0x28(%rsp)
movq 0x110(%rsp), %rcx
addq %r13, %rcx
movl %eax, (%rcx,%r10,4)
movq 0xf8(%rsp), %rax
movl (%rax,%r14,4), %eax
addq %rax, 0xc0(%rsp)
addl 0x84(%rsp), %r9d
incq %r10
movq %rbp, %r13
jmp 0x7bd7
movq 0x100(%rsp), %rdi
cmpq 0x178(%rsp), %rdi
jae 0x814b
cmpq %rax, %r14
jne 0x7f01
leaq (%rax,%rax), %rbx
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
movq 0x10(%rsp), %rdi
callq 0x2390
movq 0x60(%rsp), %r11
movq %rbx, 0x48(%rsp)
movq 0x18(%rsp), %rdi
jmp 0x7f0b
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq (%rax,%r11,4), %rax
movq 0xd8(%rsp), %rcx
movq 0x8(%rsp), %r10
movl %ecx, (%rax,%r10,4)
movq 0xb0(%rsp), %rax
cmpq %rax, %rbp
jne 0x7f5d
leaq (%rax,%rax), %rbx
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
callq 0x2390
movq 0x8(%rsp), %r10
movq %rax, %rdi
movq %rbx, 0xb0(%rsp)
movq 0x28(%rsp), %r14
movq 0x38(%rsp), %rdx
leaq 0x20382(%rip), %rax     # 0x282f0
movl (%rax), %eax
movq %rdi, 0x18(%rsp)
leaq (%rdi,%rdx,4), %rcx
movl %eax, (%rcx,%r10,4)
movq 0xa8(%rsp), %rax
cmpq %rax, %r15
jne 0x7fc1
leaq (%rax,%rax), %rbx
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
movq 0x20(%rsp), %rdi
callq 0x2390
movq 0x8(%rsp), %r10
movq %rax, %rcx
movq %rbx, 0xa8(%rsp)
movq 0x30(%rsp), %r15
jmp 0x7fcb
movq 0x30(%rsp), %r15
movq 0x20(%rsp), %rcx
movq 0x40(%rsp), %rsi
leaq 0x2030d(%rip), %rax     # 0x282e4
movl (%rax), %eax
movq %rcx, 0x20(%rsp)
leaq (%rcx,%rsi,4), %rcx
movl %eax, (%rcx,%r10,4)
movq 0xa0(%rsp), %rax
cmpq %rax, %r12
jne 0x8023
leaq (%rax,%rax), %rbx
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
movq %r13, %rdi
callq 0x2390
movq 0x8(%rsp), %r10
movq %rax, %r12
movq %rbx, 0xa0(%rsp)
jmp 0x8026
movq %r13, %r12
movq 0x70(%rsp), %rcx
movq 0x58(%rsp), %rdx
leaq 0x202b1(%rip), %rax     # 0x282e8
movl (%rax), %eax
movq %r12, %r13
leaq (%r12,%rcx,4), %rcx
movl %eax, (%rcx,%r10,4)
movq 0x98(%rsp), %rax
cmpq %rax, %rdx
jne 0x807f
leaq (%rax,%rax), %rbx
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
movq %r15, %rdi
callq 0x2390
movq 0x8(%rsp), %r10
movq %rax, %r15
movq %rbx, 0x98(%rsp)
movq 0x78(%rsp), %rcx
movq 0x88(%rsp), %rdx
movq 0x68(%rsp), %r8
leaq (%r15,%r8,4), %rax
movl $0xb88c316, (%rax,%r10,4) # imm = 0xB88C316
cmpq %rcx, %rdx
movq %r15, 0x30(%rsp)
jne 0x80d6
leaq (%rcx,%rcx), %rbx
testq %rcx, %rcx
pushq $0x2
popq %rax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
movq %r14, %rdi
callq 0x2390
movq 0x8(%rsp), %r10
movq 0x68(%rsp), %r8
movq %rbx, 0x78(%rsp)
jmp 0x80d9
movq %r14, %rax
movq 0x100(%rsp), %rdi
movq 0xe0(%rsp), %rsi
movq 0x40(%rsp), %rcx
movq 0x38(%rsp), %rdx
movq 0x60(%rsp), %r9
leaq 0x1(%r9,%r10), %r14
leaq 0x1(%rdx,%r10), %rbp
leaq 0x1(%rcx,%r10), %r15
movq 0x70(%rsp), %rcx
leaq 0x1(%rcx,%r10), %r12
movq %r10, %r9
leaq 0x1(%r8,%r10), %r10
leaq 0x201cc(%rip), %rcx     # 0x282ec
movl (%rcx), %edx
leaq 0x1(%rsi,%r9), %r8
movq %rax, 0x28(%rsp)
leaq (%rax,%rsi,4), %rcx
movl %edx, (%rcx,%r9,4)
leaq 0x201b5(%rip), %rax     # 0x282f0
movslq (%rax), %rax
addq %rax, 0xc0(%rsp)
movq 0x48(%rsp), %rax
incq %rdi
movq 0xd8(%rsp), %rcx
movl %ecx, %ebx
jmp 0x75c0
movl 0xcc(%rsp), %edx
incl %edx
leaq 0x1b9(%rsp), %rdi
leaq 0x16ef2(%rip), %rsi     # 0x1f067
movl %edx, 0xcc(%rsp)
xorl %eax, %eax
callq 0x24a0
movq 0xd0(%rsp), %rdi
movl 0x18(%rdi), %r9d
movq %rbx, %r8
subl %r8d, %r9d
subq $0x8, %rsp
leaq 0x1b8(%rsp), %rsi
movq 0x110(%rsp), %rdx
movq 0xc8(%rsp), %rcx
pushq 0x30(%rsp)
movq 0x40(%rsp), %r15
pushq %r15
movq 0x68(%rsp), %r13
pushq %r13
pushq 0x40(%rsp)
pushq 0x40(%rsp)
pushq 0x40(%rsp)
pushq %r14
callq 0xed1b
addq $0x40, %rsp
movq 0x170(%rsp), %rbx
movq 0x168(%rsp), %r14
movq 0x160(%rsp), %r12
movb $0x1, %bpl
movl 0x80(%rsp), %eax
movq 0x128(%rsp), %rsi
jmp 0x8212
movq 0x30(%rsp), %r15
movl 0x80(%rsp), %eax
incq %rsi
jmp 0x74b9
incl %eax
jmp 0x74a7
movq %r12, %rdi
callq 0x2060
movq 0xb8(%rsp), %rdi
callq 0x69e4
movq 0x10(%rsp), %rdi
callq 0x2060
movq 0x18(%rsp), %rdi
callq 0x2060
movq 0x20(%rsp), %rdi
callq 0x2060
movq %r13, %rdi
callq 0x2060
movq %r15, %rdi
callq 0x2060
movq 0x28(%rsp), %rdi
callq 0x2060
movq 0xd0(%rsp), %rbx
movq %rbx, %rdi
callq 0xf2cf
movq %rbx, %rax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x161c5(%rip), %rsi     # 0x1e45f
movl %eax, %edx
xorl %eax, %eax
callq 0x82f7
leaq 0x16141(%rip), %rdi     # 0x1e3eb
leaq 0x16141(%rip), %rsi     # 0x1e3f2
leaq 0x16142(%rip), %rcx     # 0x1e3fa
movl $0x301, %edx            # imm = 0x301
callq 0x21c0