// File: /workspace/github_c_makefile_star2_O1/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 $0x1e8, %rsp            # imm = 0x1E8
movq %rsi, %r12
movq %rdi, %rbx
movabsq $0x3ffffffffffffff, %r15 # imm = 0x3FFFFFFFFFFFFFF
movabsq $0x646c6f6666616373, %rax # imm = 0x646C6F6666616373
leaq 0x1c9(%rsp), %rcx
movq %rax, -0x9(%rcx)
movw $0x5f, -0x1(%rcx)
movq 0x38(%rsi), %rdi
callq 0x1140c
movq %rax, %r14
movq 0x8(%rbx), %rax
movl (%rax), %ebp
addl %ebp, %ebp
movl $0x1, %edi
movl $0x20, %esi
callq 0x2290
movq %rax, %r13
movq (%rax), %rax
andq %r15, %rax
btsq $0x3b, %rax
movq %rax, (%r13)
movq $0x3, 0x10(%r13)
movl $0x10, %edi
callq 0x2330
movq %r13, 0xa8(%rsp)
movq %rax, 0x18(%r13)
movl $0x1, %esi
movq %rbp, %rdi
callq 0x2290
movq %rax, %rdi
movl $0x0, %eax
movl $0x0, %r15d
movq $0x0, 0xa0(%rsp)
xorl %ecx, %ecx
movq $0x0, 0x80(%rsp)
xorl %r13d, %r13d
movq $0x0, 0x98(%rsp)
xorl %edx, %edx
movq $0x0, 0x68(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x78(%rsp)
xorl %esi, %esi
xorl %r8d, %r8d
movl $0x0, 0xd4(%rsp)
movq %r14, 0x108(%rsp)
movq %r12, 0xb0(%rsp)
movq %rbx, 0x140(%rsp)
movq %rdi, 0x138(%rsp)
movq %rbp, 0x120(%rsp)
testq %rbp, %rbp
je 0xb0ce
xorl %r9d, %r9d
movq %r8, 0x128(%rsp)
cmpb $0x0, (%rdi,%r9)
jne 0xb0c2
movq %rax, 0x70(%rsp)
testl %r8d, %r8d
jne 0xa2d0
movq 0x28(%rbx), %rax
movl (%rax,%r9,8), %eax
testq %rax, %rax
je 0xa2d0
movq 0x70(%rsp), %rax
jmp 0xb0c2
movq %rsi, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq %r13, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r15, 0x8(%rsp)
movq %r9, 0x130(%rsp)
movl %r9d, %r15d
movq 0xa8(%rsp), %rax
movabsq $-0x400000000000000, %rcx # imm = 0xFC00000000000000
andq %rcx, (%rax)
xorq $0x1, %r15
movq $0x0, 0x8(%rax)
cmpb $0x0, (%rdi,%r15)
jne 0xa374
movq 0xa8(%rsp), %rdi
movl %r15d, %esi
callq 0x8ee6
movq 0x138(%rsp), %rdi
movq 0x140(%rsp), %rbx
movl %r15d, %eax
xorq $0x1, %rax
movb $0x1, %cl
movb %cl, (%rdi,%rax)
movb %cl, (%rdi,%r15)
movq 0x28(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpl $0x2, %eax
jae 0xb171
testl %eax, %eax
je 0xa374
movq 0x20(%rbx), %rcx
shrq $0x20, %rax
shlq $0x5, %rax
movl 0x4(%rcx,%rax), %r15d
jmp 0xa315
movq 0xa8(%rsp), %rax
movq 0x8(%rax), %rax
testl %eax, %eax
je 0xb08c
leal -0x1(%rax), %ecx
movq %rcx, 0x170(%rsp)
movl %eax, %eax
movq %rax, 0x168(%rsp)
xorl %ecx, %ecx
movq $0x0, 0x40(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0x50(%rsp)
movq $0x0, 0x58(%rsp)
movq $0x0, 0x60(%rsp)
movq $0x0, 0x10(%rsp)
xorl %ebp, %ebp
movq $0x0, 0x110(%rsp)
xorl %r13d, %r13d
movq 0xa8(%rsp), %rsi
movq 0x18(%rsi), %rax
movq %rcx, %rdi
movq (%rsi), %rcx
movabsq $0x3ffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFF
andq %rdx, %rcx
movq %rdi, 0xd8(%rsp)
addq %rdi, %rcx
andq 0x10(%rsi), %rcx
movl (%rax,%rcx,4), %r8d
movq 0xb0(%rsp), %rax
movq 0x8(%rax), %rax
movl %r8d, %ecx
shrl %ecx
imulq $0x58, %rcx, %rcx
movl 0x18(%rax,%rcx), %r9d
movl 0x20(%rax,%rcx), %esi
movq 0x30(%rax,%rcx), %rdx
movq %rdx, 0x100(%rsp)
movq 0x38(%rax,%rcx), %rdx
movq %rdx, 0x160(%rsp)
movq 0x40(%rax,%rcx), %rdx
movq %rdx, 0x158(%rsp)
movq 0x48(%rax,%rcx), %rdx
movq %rdx, 0x150(%rsp)
movq 0x50(%rax,%rcx), %rdx
movq %rdx, 0x148(%rsp)
andl $0x1, %r8d
movl %r8d, %edx
negl %edx
movq %rsi, 0xe0(%rsp)
leal -0x1(%rsi), %edi
andl %edx, %edi
orl $0x1, %edx
testl %r9d, %r9d
movq %rdx, 0xb8(%rsp)
je 0xaa23
movl 0x1c(%rax,%rcx), %esi
movq %rsi, 0x180(%rsp)
movq 0x28(%rax,%rcx), %rax
movq %rax, 0x188(%rsp)
leal -0x1(%r9), %eax
testl %r8d, %r8d
cmovel %r8d, %eax
movq %rax, 0x90(%rsp)
addl %ebp, %r9d
movq %r9, 0x178(%rsp)
movl %ebp, %eax
movq %rax, 0xc0(%rsp)
movl %r8d, 0x8c(%rsp)
cmpl $-0x1, %edi
je 0xa8c1
cmpl 0xe0(%rsp), %edi
jae 0xa8c1
movq 0x40(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0x1b8(%rsp)
movq 0x48(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0x1b0(%rsp)
movq 0x50(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0x1a8(%rsp)
movq 0x58(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0x1a0(%rsp)
movq 0x60(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0x198(%rsp)
movq 0x10(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0x190(%rsp)
leal (%rdx,%rdi), %esi
xorl %r14d, %r14d
movq 0x68(%rsp), %r12
movq %r13, 0xc8(%rsp)
testl %r8d, %r8d
sete %cl
movq 0x40(%rsp), %rax
leaq (%rax,%r14), %r9
movq 0x48(%rsp), %rax
leaq (%rax,%r14), %r10
movq 0x50(%rsp), %rax
leaq (%rax,%r14), %rbx
movq 0x58(%rsp), %rax
leaq (%rax,%r14), %r15
movq 0x60(%rsp), %rax
leaq (%rax,%r14), %rbp
movl %edi, %r13d
movq 0x188(%rsp), %rax
movq 0x90(%rsp), %rdx
cmpl %edx, (%rax,%r13,4)
movq 0x10(%rsp), %rax
leaq (%rax,%r14), %rax
seta %dl
cmpb %dl, %cl
je 0xa8cb
movq %rdi, 0x118(%rsp)
movq 0x78(%rsp), %rcx
cmpq %rcx, %rax
movq %rsi, 0xf8(%rsp)
movq %r9, 0xf0(%rsp)
movq %r10, 0xe8(%rsp)
jne 0xa651
movq %r12, 0x68(%rsp)
leaq (%rcx,%rcx), %r12
testq %rcx, %rcx
movl $0x2, %eax
cmoveq %rax, %r12
leaq (,%r12,4), %rsi
movq 0x20(%rsp), %rdi
callq 0x2390
movq %r12, 0x78(%rsp)
movq 0x68(%rsp), %r12
movq 0x18(%rsp), %rdi
jmp 0xa65b
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0x190(%rsp), %rcx
addq %rax, %rcx
movq 0xc0(%rsp), %rdx
movl %edx, (%rcx,%r14,4)
cmpq %r12, %rbp
movq %rax, 0x20(%rsp)
jne 0xa69e
movq %r12, %rax
addq %r12, %r12
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %r12
leaq (,%r12,4), %rsi
callq 0x2390
movq %rax, %rdi
movq 0x100(%rsp), %rax
movl (%rax,%r13,4), %eax
movq 0x198(%rsp), %rcx
addq %rdi, %rcx
movl %eax, (%rcx,%r14,4)
movq 0x98(%rsp), %rax
cmpq %rax, %r15
movq %rdi, 0x18(%rsp)
jne 0xa6ff
leaq (%rax,%rax), %r15
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %r15
leaq (,%r15,4), %rsi
movq 0x28(%rsp), %rdi
callq 0x2390
movq %rax, %rsi
movq %r15, 0x98(%rsp)
movq 0x30(%rsp), %rax
jmp 0xa709
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %rsi
movq 0x160(%rsp), %rcx
movl (%rcx,%r13,4), %edx
movq 0x1a0(%rsp), %rcx
addq %rsi, %rcx
movl %edx, (%rcx,%r14,4)
movq 0x80(%rsp), %rcx
cmpq %rcx, %rbx
movq %rsi, 0x28(%rsp)
jne 0xa75e
leaq (%rcx,%rcx), %rbx
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rbx
leaq (,%rbx,4), %rsi
movq %rax, %rdi
callq 0x2390
movq %rbx, 0x80(%rsp)
movq 0x38(%rsp), %rdi
movq 0xe8(%rsp), %rsi
movq 0x158(%rsp), %rcx
movl (%rcx,%r13,4), %edx
movq 0x1a8(%rsp), %rcx
addq %rax, %rcx
movl %edx, (%rcx,%r14,4)
movq 0xa0(%rsp), %rcx
cmpq %rcx, %rsi
movq %rax, 0x30(%rsp)
jne 0xa7c0
leaq (%rcx,%rcx), %rbx
testq %rcx, %rcx
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
callq 0x2390
movq %rax, %rdi
movq %rbx, 0xa0(%rsp)
movq 0xf0(%rsp), %rdx
movq 0x150(%rsp), %rax
movl (%rax,%r13,4), %eax
movq 0x1b0(%rsp), %rcx
addq %rdi, %rcx
movl %eax, (%rcx,%r14,4)
movq 0x70(%rsp), %rax
cmpq %rax, %rdx
movq %rdi, 0x38(%rsp)
jne 0xa81b
leaq (%rax,%rax), %rbx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
movq 0x8(%rsp), %rdi
callq 0x2390
movq %rbx, 0x70(%rsp)
jmp 0xa820
movq 0x8(%rsp), %rax
movq 0xb8(%rsp), %rsi
movl 0x8c(%rsp), %r8d
movq 0xf8(%rsp), %r9
movq 0x148(%rsp), %rcx
movl (%rcx,%r13,4), %edx
movq %rax, 0x8(%rsp)
movq 0x1b8(%rsp), %rcx
addq %rax, %rcx
movl %edx, (%rcx,%r14,4)
movq 0x100(%rsp), %rax
movl (%rax,%r13,4), %eax
movq 0xc8(%rsp), %r13
addq %rax, %r13
movq 0x118(%rsp), %rdi
addl %esi, %edi
incq %r14
cmpl $-0x1, %r9d
je 0xa896
leal (%r9,%rsi), %eax
cmpl 0xe0(%rsp), %r9d
movl %eax, %esi
jb 0xa589
movq %r12, 0x68(%rsp)
addq %r14, 0x40(%rsp)
addq %r14, 0x48(%rsp)
addq %r14, 0x50(%rsp)
addq %r14, 0x58(%rsp)
addq %r14, 0x60(%rsp)
addq %r14, 0x10(%rsp)
movq 0x108(%rsp), %r14
movq 0xb0(%rsp), %rdx
jmp 0xa906
movq %r12, 0x68(%rsp)
movq %rax, 0x10(%rsp)
movq %rbp, 0x60(%rsp)
movq %r15, 0x58(%rsp)
movq %rbx, 0x50(%rsp)
movq %r10, 0x48(%rsp)
movq %r9, 0x40(%rsp)
movq 0x108(%rsp), %r14
movq 0xb0(%rsp), %rdx
movq 0xc8(%rsp), %r13
movq 0x20(%rdx), %rax
movq 0x180(%rsp), %rcx
movq 0x90(%rsp), %rsi
addl %esi, %ecx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movl 0x18(%rax,%rcx), %r9d
xorl %r8d, %r9d
movl 0x1c(%rax,%rcx), %r10d
movl 0x20(%rax,%rcx), %ebx
movl 0x24(%rax,%rcx), %r11d
movl 0x28(%rax,%rcx), %eax
movl (%r14), %esi
testl %r8d, %r8d
jne 0xa9be
movq %rdi, %r12
movq 0xc0(%rsp), %rdx
leal 0x1(%rdx), %ebp
movq 0x110(%rsp), %r15
leaq (%r15,%r13), %r8
movq %r14, %rdi
movq %r15, %rcx
pushq %rax
pushq %r11
pushq %rbx
pushq %r10
callq 0x1246a
addq $0x20, %rsp
addq %rbx, %r15
movq %r15, 0x110(%rsp)
movq 0xb8(%rsp), %rdx
movq 0x90(%rsp), %rax
addl %edx, %eax
movq %rax, 0x90(%rsp)
movl %ebp, %eax
movq %rax, 0xc0(%rsp)
cmpl 0x178(%rsp), %ebp
movq %r12, %rdi
movl 0x8c(%rsp), %r8d
jne 0xa4ea
jmp 0xaa23
cmpl $0x2b5e3, %eax          # imm = 0x2B5E3
jg 0xa9e3
cmpl $0x2b5d0, %eax          # imm = 0x2B5D0
je 0xaa16
cmpl $0x2b5d2, %eax          # imm = 0x2B5D2
je 0xaa09
cmpl $0x2b5d5, %eax          # imm = 0x2B5D5
je 0xa946
jmp 0xb161
cmpl $0x2b5e4, %eax          # imm = 0x2B5E4
je 0xa946
cmpl $0x5978d4, %eax         # imm = 0x5978D4
je 0xa946
cmpl $0x7ca1b285, %eax       # imm = 0x7CA1B285
je 0xa946
jmp 0xb161
movq %rdi, %r12
movl $0x2b5d0, %eax          # imm = 0x2B5D0
jmp 0xa949
movq %rdi, %r12
movl $0x2b5d2, %eax          # imm = 0x2B5D2
jmp 0xa949
movl %ebp, 0xc8(%rsp)
cmpl $-0x1, %edi
movq 0x8(%rsp), %r15
movq 0x78(%rsp), %rax
movq 0xd8(%rsp), %rcx
je 0xada1
cmpl 0xe0(%rsp), %edi
jae 0xada1
movq 0x40(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0x118(%rsp)
movq 0x48(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0xf8(%rsp)
movq 0x50(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0xf0(%rsp)
movq 0x58(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0xe8(%rsp)
movq 0x60(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0x90(%rsp)
movq 0x10(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0xc0(%rsp)
leal (%rdx,%rdi), %r15d
xorl %r14d, %r14d
movq %rdi, %rbp
movq 0x10(%rsp), %rax
addq %r14, %rax
movq 0x78(%rsp), %rcx
cmpq %rcx, %rax
movq 0x68(%rsp), %r12
jne 0xab1f
leaq (%rcx,%rcx), %rbx
testq %rcx, %rcx
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
movq 0x20(%rsp), %rdi
callq 0x2390
movq %rbx, 0x78(%rsp)
movq 0x18(%rsp), %rdi
jmp 0xab29
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0x60(%rsp), %rcx
leaq (%rcx,%r14), %rdx
movq 0xc0(%rsp), %rcx
addq %rax, %rcx
movl 0xc8(%rsp), %esi
movl %esi, (%rcx,%r14,4)
cmpq %r12, %rdx
movq %rax, 0x20(%rsp)
jne 0xab77
leaq (%r12,%r12), %rbx
testq %r12, %r12
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
callq 0x2390
movq %rax, %rdi
movq %rbx, 0x68(%rsp)
movq 0x58(%rsp), %rax
addq %r14, %rax
movl %ebp, %r12d
movq 0x100(%rsp), %rcx
movl (%rcx,%r12,4), %ecx
movq 0x90(%rsp), %rdx
addq %rdi, %rdx
movl %ecx, (%rdx,%r14,4)
movq 0x98(%rsp), %rcx
cmpq %rcx, %rax
movq %rdi, 0x18(%rsp)
jne 0xabdb
leaq (%rcx,%rcx), %rbx
testq %rcx, %rcx
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
movq 0x28(%rsp), %rdi
callq 0x2390
movq %rbx, 0x98(%rsp)
jmp 0xabe0
movq 0x28(%rsp), %rax
movq 0x50(%rsp), %rcx
leaq (%rcx,%r14), %rsi
movq 0x160(%rsp), %rcx
movl (%rcx,%r12,4), %ecx
movq 0xe8(%rsp), %rdx
addq %rax, %rdx
movl %ecx, (%rdx,%r14,4)
movq 0x80(%rsp), %rcx
cmpq %rcx, %rsi
movq %rax, 0x28(%rsp)
jne 0xac42
leaq (%rcx,%rcx), %rbx
testq %rcx, %rcx
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
movq 0x30(%rsp), %rdi
callq 0x2390
movq %rbx, 0x80(%rsp)
jmp 0xac47
movq 0x30(%rsp), %rax
movq 0x48(%rsp), %rcx
leaq (%rcx,%r14), %rsi
movq 0x158(%rsp), %rcx
movl (%rcx,%r12,4), %ecx
movq %rax, 0x30(%rsp)
movq 0xf0(%rsp), %rdx
addq %rax, %rdx
movl %ecx, (%rdx,%r14,4)
movq 0xa0(%rsp), %rax
cmpq %rax, %rsi
jne 0xaca9
leaq (%rax,%rax), %rbx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
movq 0x38(%rsp), %rdi
callq 0x2390
movq %rbx, 0xa0(%rsp)
jmp 0xacae
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
leaq (%rcx,%r14), %rsi
movq 0x150(%rsp), %rcx
movl (%rcx,%r12,4), %ecx
movq %rax, 0x38(%rsp)
movq 0xf8(%rsp), %rdx
addq %rax, %rdx
movl %ecx, (%rdx,%r14,4)
movq 0x70(%rsp), %rax
cmpq %rax, %rsi
jne 0xad0a
leaq (%rax,%rax), %rbx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
movq 0x8(%rsp), %rdi
callq 0x2390
movq %rbx, 0x70(%rsp)
jmp 0xad0f
movq 0x8(%rsp), %rax
movq %rbp, %rdi
movq 0xb8(%rsp), %rsi
movq 0x148(%rsp), %rcx
movl (%rcx,%r12,4), %edx
movq %rax, 0x8(%rsp)
movq 0x118(%rsp), %rcx
addq %rax, %rcx
movl %edx, (%rcx,%r14,4)
movq 0x100(%rsp), %rax
movl (%rax,%r12,4), %eax
addq %rax, %r13
incq %r14
cmpl $-0x1, %r15d
je 0xad69
addl %esi, %edi
leal (%r15,%rsi), %eax
cmpl 0xe0(%rsp), %r15d
movl %eax, %r15d
jb 0xaad7
addq %r14, 0x40(%rsp)
addq %r14, 0x48(%rsp)
addq %r14, 0x50(%rsp)
addq %r14, 0x58(%rsp)
addq %r14, 0x60(%rsp)
addq %r14, 0x10(%rsp)
movq 0x108(%rsp), %r14
movq 0x8(%rsp), %r15
movq 0x78(%rsp), %rax
movq 0xd8(%rsp), %rcx
cmpq 0x170(%rsp), %rcx
movl 0xc8(%rsp), %ebp
jae 0xade7
cmpq %rax, 0x10(%rsp)
jne 0xadf6
leaq (%rax,%rax), %rbx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
movq 0x20(%rsp), %rdi
callq 0x2390
movq %rbx, 0x78(%rsp)
movq 0x18(%rsp), %rdi
jmp 0xae05
movq %rax, 0x78(%rsp)
movq %r15, 0x8(%rsp)
jmp 0xafd9
movq %rax, 0x78(%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rcx
movl %ebp, (%rax,%rcx,4)
movq 0x68(%rsp), %rcx
cmpq %rcx, 0x60(%rsp)
movq %rax, 0x20(%rsp)
jne 0xae43
leaq (%rcx,%rcx), %rbx
testq %rcx, %rcx
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
callq 0x2390
movq %rax, %rdi
movq %rbx, 0x68(%rsp)
leaq 0x204a6(%rip), %rax     # 0x2b2f0
movl (%rax), %eax
movq %rdi, 0x18(%rsp)
movq 0x60(%rsp), %rcx
movl %eax, (%rdi,%rcx,4)
movq 0x98(%rsp), %rax
cmpq %rax, 0x58(%rsp)
jne 0xae9c
leaq (%rax,%rax), %rbx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
movq 0x28(%rsp), %rdi
callq 0x2390
movq %rax, %rcx
movq %rbx, 0x98(%rsp)
movq 0x30(%rsp), %rdi
jmp 0xaea6
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rcx
movq 0x80(%rsp), %rdx
leaq 0x2042f(%rip), %rax     # 0x2b2e4
movl (%rax), %eax
movq 0x58(%rsp), %rsi
movl %eax, (%rcx,%rsi,4)
cmpq %rdx, 0x50(%rsp)
movq %rcx, 0x28(%rsp)
jne 0xaeee
leaq (%rdx,%rdx), %rbx
testq %rdx, %rdx
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
callq 0x2390
movq %rax, %rdi
movq %rbx, %rdx
movq 0x38(%rsp), %rax
leaq 0x203ee(%rip), %rcx     # 0x2b2e8
movl (%rcx), %ecx
movq 0x50(%rsp), %rsi
movl %ecx, (%rdi,%rsi,4)
movq 0xa0(%rsp), %rcx
cmpq %rcx, 0x48(%rsp)
movq %rdi, 0x30(%rsp)
movq %rdx, 0x80(%rsp)
jne 0xaf48
leaq (%rcx,%rcx), %rbx
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rbx
leaq (,%rbx,4), %rsi
movq %rax, %rdi
callq 0x2390
movq %rbx, 0xa0(%rsp)
movq %r15, %rdi
movq 0x48(%rsp), %rcx
movl $0xb88c316, (%rax,%rcx,4) # imm = 0xB88C316
movq 0x70(%rsp), %rcx
cmpq %rcx, 0x40(%rsp)
movq %rax, 0x38(%rsp)
jne 0xaf8d
leaq (%rcx,%rcx), %rbx
testq %rcx, %rcx
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
callq 0x2390
movq %rax, %rdi
movq %rbx, 0x70(%rsp)
movq 0xd8(%rsp), %rcx
incq 0x10(%rsp)
incq 0x60(%rsp)
incq 0x58(%rsp)
incq 0x50(%rsp)
incq 0x48(%rsp)
leaq 0x20337(%rip), %rax     # 0x2b2ec
movl (%rax), %eax
movq %rdi, 0x8(%rsp)
movq 0x40(%rsp), %rdx
movl %eax, (%rdi,%rdx,4)
incq %rdx
movq %rdx, 0x40(%rsp)
leaq 0x2031d(%rip), %rax     # 0x2b2f0
movslq (%rax), %rax
addq %rax, %r13
incq %rcx
cmpq 0x168(%rsp), %rcx
jne 0xa3e6
movl 0xd4(%rsp), %edx
incl %edx
leaq 0x1c9(%rsp), %rdi
leaq 0x17165(%rip), %rsi     # 0x22167
movl %edx, 0xd4(%rsp)
xorl %eax, %eax
callq 0x24a0
movl 0x18(%r14), %r9d
subl %ebp, %r9d
subq $0x8, %rsp
movq %r14, %rdi
leaq 0x1c8(%rsp), %rsi
movq 0x118(%rsp), %rdx
movq %r13, %rcx
movl %ebp, %r8d
movq 0x10(%rsp), %r12
pushq %r12
movq 0x48(%rsp), %rbx
pushq %rbx
movq 0x48(%rsp), %r13
pushq %r13
movq 0x48(%rsp), %rbp
pushq %rbp
pushq 0x40(%rsp)
movq 0x50(%rsp), %r15
pushq %r15
pushq 0x48(%rsp)
callq 0x1213c
movq %r15, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
movq %r12, %r15
addq $0x40, %rsp
movq 0x140(%rsp), %rbx
movq 0x120(%rsp), %rbp
movq 0x138(%rsp), %rdi
jmp 0xb0ad
movq 0x120(%rsp), %rbp
movq 0x8(%rsp), %r15
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %r13
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rsi
movq 0x128(%rsp), %r8
movq 0x70(%rsp), %rax
movq 0x130(%rsp), %r9
incq %r9
cmpq %rbp, %r9
jne 0xa2a4
movq %rax, %r9
leal 0x1(%r8), %eax
testl %r8d, %r8d
movl %eax, %r8d
movq %r9, %rax
je 0xa290
movq %r15, 0x8(%rsp)
movq %rcx, %r12
movq %rdx, %rbp
movq %rsi, %r15
callq 0x2060
movq 0xa8(%rsp), %rbx
movq 0x18(%rbx), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2060
movq %r15, %rdi
callq 0x2060
movq 0x18(%rsp), %rdi
callq 0x2060
movq %rbp, %rdi
callq 0x2060
movq %r13, %rdi
callq 0x2060
movq %r12, %rdi
callq 0x2060
movq 0x8(%rsp), %rdi
callq 0x2060
movq %r14, %rdi
callq 0x12863
movq %r14, %rax
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1630f(%rip), %rsi     # 0x21477
movl %eax, %edx
xorl %eax, %eax
callq 0xb190
leaq 0x1628b(%rip), %rdi     # 0x21403
leaq 0x1628b(%rip), %rsi     # 0x2140a
leaq 0x1628c(%rip), %rcx     # 0x21412
movl $0x301, %edx            # imm = 0x301
callq 0x21c0