// File: /workspace/github_c_makefile_star2_O3/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 $0x248, %rsp            # imm = 0x248
movq %rdi, %rbx
movabsq $0x646c6f6666616373, %rax # imm = 0x646C6F6666616373
leaq 0x229(%rsp), %rcx
movq %rax, -0x9(%rcx)
movw $0x5f, -0x1(%rcx)
movq %rsi, 0x170(%rsp)
movq 0x38(%rsi), %rdi
callq 0x121c2
movq %rax, %r13
movq %rbx, 0x150(%rsp)
movq 0x8(%rbx), %rax
movl (%rax), %r14d
addl %r14d, %r14d
movl $0x1, %edi
movl $0x20, %esi
callq 0x2290
movq %rax, %rbx
movabsq $0x800000000000000, %rax # imm = 0x800000000000000
movq %rax, (%rbx)
movq $0x3, 0x10(%rbx)
movl $0x10, %edi
callq 0x2330
movq %rax, 0x18(%rbx)
movl $0x1, %esi
movq %r14, %rdi
callq 0x2290
movq %rax, %rdi
movq %rbx, %rax
movabsq $-0x400000000000000, %rsi # imm = 0xFC00000000000000
movl $0x0, %ecx
movq %rcx, 0xc0(%rsp)
movl $0x0, %ecx
movl $0x0, %edx
movq %rdx, 0xb8(%rsp)
movl $0x0, %r15d
movq $0x0, 0xb0(%rsp)
movq $0x0, 0x58(%rsp)
movq $0x0, 0xa8(%rsp)
movq $0x0, 0x50(%rsp)
movq $0x0, 0x90(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0x98(%rsp)
movq $0x0, 0x40(%rsp)
movq $0x0, 0xf0(%rsp)
movb $0x1, %dl
movl %edx, 0xec(%rsp)
movl $0x0, 0xe8(%rsp)
movq %r13, 0xd0(%rsp)
movq %rbx, 0x68(%rsp)
movq %r14, 0x160(%rsp)
movq %rdi, 0xf8(%rsp)
testq %r14, %r14
je 0xbdf0
movq 0xf0(%rsp), %rdx
notb %dl
movq %rdx, 0xf0(%rsp)
xorl %edx, %edx
cmpb $0x0, (%rdi,%rdx)
jne 0xbde4
movq 0x150(%rsp), %rax
movq %rdx, %r8
movq 0x28(%rax), %rdx
cmpl $0x0, (%rdx,%r8,8)
setne %al
testb %al, 0xf0(%rsp)
jne 0xbda9
movq %r8, 0x148(%rsp)
movl %r8d, %ebx
xorq $0x1, %rbx
movq 0x68(%rsp), %rax
movq (%rax), %r9
andq %rsi, %r9
movq %r9, (%rax)
movq $0x0, 0x8(%rax)
cmpb $0x0, (%rdi,%rbx)
jne 0xbddc
movq %r15, 0x60(%rsp)
movq %rcx, 0x8(%rsp)
leaq (%rdi,%rbx), %r10
movq 0x10(%rax), %rsi
movq 0x18(%rax), %r8
xorl %eax, %eax
movq %rax, %r14
movq %r9, %rax
shrq $0x3a, %rax
movl $0x1, %edi
movl %eax, %ecx
shlq %cl, %rdi
cmpq %rdi, %r14
jne 0xae54
leal 0x1(%rax), %r12d
movl $0x1, %ebp
movl %r12d, %ecx
shlq %cl, %rbp
cmpq %r14, %rbp
jae 0xad88
movq $-0x1, %r12
incq %r12
movq %r14, %rdi
movl %r12d, %ecx
shrq %cl, %rdi
cmpq $0x3f, %r12
ja 0xad65
testq %rdi, %rdi
jne 0xad4e
cmpq %r12, %rax
je 0xae54
movq %r10, 0xa0(%rsp)
movl $0x1, %ebp
movl %r12d, %ecx
shlq %cl, %rbp
cmpq %rax, %r12
ja 0xad90
jmp 0xadac
movq %r10, 0xa0(%rsp)
movq %r9, %r15
movl $0x4, %esi
movl %r12d, %ecx
shlq %cl, %rsi
movq %r8, %rdi
callq 0x2390
movq %rax, %r8
movq %r15, %r9
movq %r9, %r15
movabsq $0x3ffffffffffffff, %rax # imm = 0x3FFFFFFFFFFFFFF
andq %rax, %r15
leaq (%r15,%r14), %rdx
cmpq %r14, %rdx
jbe 0xae03
movq %r14, %rdx
subq %r15, %rdx
movq %rbp, %rax
subq %rdx, %rax
leaq (%r8,%rax,4), %rdi
leaq (%r8,%r15,4), %rsi
shlq $0x2, %rdx
movq %r8, %r15
movq %r9, %r13
callq 0x23a0
movq %r15, %r8
subq %r14, %r13
addq %rbp, %r13
movabsq $0x3ffffffffffffff, %rax # imm = 0x3FFFFFFFFFFFFFF
andq %rax, %r13
movq %r13, %r15
jmp 0xae1e
subq %rbp, %rdx
jbe 0xae1e
leaq (%r8,%rbp,4), %rsi
shlq $0x2, %rdx
movq %r8, %rdi
movq %r8, %r13
callq 0x23a0
movq %r13, %r8
movq %r12, %r9
movq $-0x1, %rsi
movl %r12d, %ecx
shlq %cl, %rsi
shlq $0x3a, %r9
orq %r15, %r9
notq %rsi
movq 0x150(%rsp), %rax
movq 0x28(%rax), %rdx
movq 0xd0(%rsp), %r13
movq 0xa0(%rsp), %r10
movq %r9, %rax
movabsq $0x3ffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFF
andq %rcx, %rax
addq %r14, %rax
andq %rsi, %rax
movl %ebx, (%r8,%rax,4)
movl %ebx, %eax
xorq $0x1, %rax
movq 0xf8(%rsp), %rcx
movb $0x1, %dil
movb %dil, (%rcx,%rax)
movb %dil, (%r10)
movq (%rdx,%rbx,8), %rcx
cmpl $0x2, %ecx
jae 0xbe94
leaq 0x1(%r14), %rax
testl %ecx, %ecx
je 0xaec9
movq 0x150(%rsp), %rdi
movq 0x20(%rdi), %rdi
shrq $0x20, %rcx
shlq $0x5, %rcx
movl 0x4(%rdi,%rcx), %ebx
movq 0xf8(%rsp), %rcx
leaq (%rcx,%rbx), %r10
cmpb $0x0, (%rcx,%rbx)
je 0xad16
movq 0x68(%rsp), %rcx
movq %rax, 0x8(%rcx)
movq %r9, (%rcx)
movq %r8, 0x18(%rcx)
movq %rsi, 0x10(%rcx)
testl %eax, %eax
je 0xbdb3
movl %r14d, %ecx
movq %rcx, 0x1a0(%rsp)
movl %eax, %eax
movq %rax, 0x198(%rsp)
xorl %ecx, %ecx
movq $0x0, 0x30(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movq $0x0, 0x38(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x78(%rsp)
xorl %r15d, %r15d
xorl %r14d, %r14d
movq 0x68(%rsp), %rax
movq %rax, %rsi
movq 0x18(%rax), %rax
movq %rcx, %rdi
movq (%rsi), %rcx
movabsq $0x3ffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFF
andq %rdx, %rcx
movq %rdi, 0x168(%rsp)
addq %rdi, %rcx
andq 0x10(%rsi), %rcx
movl (%rax,%rcx,4), %edi
movq 0x170(%rsp), %rax
movq 0x8(%rax), %rax
movl %edi, %ecx
shrl %ecx
imulq $0x58, %rcx, %rcx
movl 0x18(%rax,%rcx), %r10d
movl 0x20(%rax,%rcx), %esi
movq 0x30(%rax,%rcx), %rdx
movq %rdx, 0xa0(%rsp)
movq 0x38(%rax,%rcx), %rdx
movq %rdx, 0x190(%rsp)
movq 0x40(%rax,%rcx), %rdx
movq %rdx, 0x188(%rsp)
movq 0x48(%rax,%rcx), %rdx
movq %rdx, 0x180(%rsp)
movq 0x50(%rax,%rcx), %rdx
movq %rdx, 0x178(%rsp)
andl $0x1, %edi
movl %edi, %edx
negl %edx
movq %rsi, 0x100(%rsp)
leal -0x1(%rsi), %r8d
andl %edx, %r8d
movl %edx, %r9d
orl $0x1, %r9d
testl %r10d, %r10d
movq %r9, 0xd8(%rsp)
je 0xb69a
movl 0x1c(%rax,%rcx), %edx
movq %rdx, 0x1a8(%rsp)
movq 0x28(%rax,%rcx), %rax
movq %rax, 0x1e8(%rsp)
leal -0x1(%r10), %eax
testl %edi, %edi
cmovel %edi, %eax
movq %rax, 0x88(%rsp)
addl 0x78(%rsp), %r10d
movq %r10, 0x1b0(%rsp)
movl %edi, 0x74(%rsp)
cmpl $-0x1, %r8d
je 0xb580
cmpl 0x100(%rsp), %r8d
jae 0xb580
movq %r15, 0x80(%rsp)
movq 0x30(%rsp), %rcx
leaq (%rcx,%rcx), %rax
movq %rax, 0x1e0(%rsp)
leaq (,%rcx,4), %rax
movq %rax, 0x218(%rsp)
movq 0x18(%rsp), %rdi
leaq (%rdi,%rdi), %rax
movq %rax, 0x1d8(%rsp)
leaq (,%rdi,4), %rax
movq %rax, 0x210(%rsp)
movq 0x20(%rsp), %rsi
leaq (%rsi,%rsi), %rax
movq %rax, 0x1d0(%rsp)
leaq (,%rsi,4), %rax
movq %rax, 0x208(%rsp)
movq 0x28(%rsp), %rdx
leaq (%rdx,%rdx), %rax
movq %rax, 0x1c8(%rsp)
leaq (,%rdx,4), %rax
movq %rax, 0x200(%rsp)
movq 0x38(%rsp), %rax
leaq (%rax,%rax), %r10
movq %r10, 0x1c0(%rsp)
leaq (,%rax,4), %r10
movq %r10, 0x1f8(%rsp)
movq 0x10(%rsp), %r13
leaq (%r13,%r13), %r10
movq %r10, 0x1b8(%rsp)
leaq (,%r13,4), %r10
movq %r10, 0x1f0(%rsp)
leal (%r9,%r8), %r12d
xorl %ebx, %ebx
xorl %r15d, %r15d
movq %rcx, %r11
movq %rdi, %r9
movl 0x74(%rsp), %edi
movq %rsi, %r10
movq %rax, %rcx
movq %r12, 0x130(%rsp)
movq %rcx, 0x140(%rsp)
movq %r14, 0xc8(%rsp)
movq 0x30(%rsp), %rax
leaq (%rax,%r15), %rsi
movq 0x18(%rsp), %rax
addq %r15, %rax
movq %rax, 0xe0(%rsp)
movq 0x20(%rsp), %rax
leaq (%rax,%r15), %rax
movq %rax, 0x138(%rsp)
movq 0x28(%rsp), %rax
leaq (%rax,%r15), %r14
movq 0x38(%rsp), %rax
leaq (%rax,%r15), %r12
movq 0x10(%rsp), %rax
addq %r15, %rax
movl %r8d, %ebp
movq 0x1e8(%rsp), %rcx
movl (%rcx,%rbp,4), %ecx
testl %edi, %edi
jne 0xb1b5
cmpl 0x88(%rsp), %ecx
jbe 0xb1c2
jmp 0xb53a
cmpl 0x88(%rsp), %ecx
jbe 0xb512
cmpq 0x98(%rsp), %rax
movq %r8, 0x128(%rsp)
movq %r9, 0x120(%rsp)
movq %r10, 0x118(%rsp)
movq %r11, 0x110(%rsp)
movq %rdx, 0x158(%rsp)
movq %rsi, 0x108(%rsp)
jne 0xb234
movq 0x1b8(%rsp), %rcx
addq %rbx, %rcx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0x98(%rsp)
leaq (,%rcx,4), %rsi
movq 0x40(%rsp), %rdi
callq 0x2390
movq 0x48(%rsp), %rdi
jmp 0xb23e
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rax
movq 0x1f0(%rsp), %rcx
addq %rax, %rcx
movq 0x78(%rsp), %rdx
movl %edx, (%rcx,%r15,4)
cmpq 0x90(%rsp), %r12
movq %rax, 0x40(%rsp)
jne 0xb291
movq 0x1c0(%rsp), %rax
leaq (%rax,%rbx), %rcx
testq %r12, %r12
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0x90(%rsp)
leaq (,%rcx,4), %rsi
callq 0x2390
movq %rax, %rdi
movq 0x130(%rsp), %r12
movq 0xa0(%rsp), %rax
movl (%rax,%rbp,4), %eax
movq %rdi, 0x48(%rsp)
movq 0x1f8(%rsp), %rcx
addq %rdi, %rcx
movl %eax, (%rcx,%r15,4)
cmpq 0xa8(%rsp), %r14
jne 0xb2fb
movq 0x1c8(%rsp), %rax
leaq (%rax,%rbx), %rcx
testq %r14, %r14
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0xa8(%rsp)
leaq (,%rcx,4), %rsi
movq 0x50(%rsp), %rdi
callq 0x2390
movq 0x58(%rsp), %rdi
jmp 0xb305
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rax
movq 0xc8(%rsp), %r14
movq 0x190(%rsp), %rcx
movl (%rcx,%rbp,4), %edx
movq 0x200(%rsp), %rcx
addq %rax, %rcx
movl %edx, (%rcx,%r15,4)
movq 0x138(%rsp), %rdx
cmpq 0xb0(%rsp), %rdx
movq %rax, 0x50(%rsp)
jne 0xb36e
movq 0x1d0(%rsp), %rax
leaq (%rax,%rbx), %rcx
testq %rdx, %rdx
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0xb0(%rsp)
leaq (,%rcx,4), %rsi
callq 0x2390
movq %rax, %rdi
movq 0xe0(%rsp), %rdx
movq 0x188(%rsp), %rax
movl (%rax,%rbp,4), %eax
movq 0x208(%rsp), %rcx
addq %rdi, %rcx
movl %eax, (%rcx,%r15,4)
cmpq 0xb8(%rsp), %rdx
movq %rdi, 0x58(%rsp)
jne 0xb3d3
movq 0x1d8(%rsp), %rax
leaq (%rax,%rbx), %rcx
testq %rdx, %rdx
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0xb8(%rsp)
leaq (,%rcx,4), %rsi
movq 0x60(%rsp), %rdi
callq 0x2390
jmp 0xb3d8
movq 0x60(%rsp), %rax
movq 0x108(%rsp), %rsi
movq 0x180(%rsp), %rcx
movl (%rcx,%rbp,4), %edx
movq 0x210(%rsp), %rcx
addq %rax, %rcx
movl %edx, (%rcx,%r15,4)
cmpq 0xc0(%rsp), %rsi
movq %rax, 0x60(%rsp)
jne 0xb43d
movq 0x1e0(%rsp), %rax
leaq (%rax,%rbx), %rcx
testq %rsi, %rsi
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0xc0(%rsp)
leaq (,%rcx,4), %rsi
movq 0x8(%rsp), %rdi
callq 0x2390
jmp 0xb442
movq 0x8(%rsp), %rax
movq 0x128(%rsp), %r8
movq 0xd8(%rsp), %rsi
movl 0x74(%rsp), %edi
movq 0x120(%rsp), %r9
movq 0x118(%rsp), %r10
movq 0x110(%rsp), %r11
movq 0x178(%rsp), %rcx
movl (%rcx,%rbp,4), %edx
movq %rax, 0x8(%rsp)
movq 0x218(%rsp), %rcx
addq %rax, %rcx
movl %edx, (%rcx,%r15,4)
movq 0xa0(%rsp), %rax
movl (%rax,%rbp,4), %eax
addq %rax, %r14
addl %esi, %r8d
incq %r15
incq %r9
incq %r10
movq 0x158(%rsp), %rdx
incq %rdx
movq 0x140(%rsp), %rcx
incq %rcx
incq %r13
cmpl $-0x1, %r12d
je 0xb4e2
incq %r11
addq $0x2, %rbx
leal (%r12,%rsi), %eax
cmpl 0x100(%rsp), %r12d
movl %eax, %r12d
jb 0xb139
addq %r15, 0x30(%rsp)
movq %r13, 0x10(%rsp)
movq %rcx, 0x38(%rsp)
movq %rdx, 0x28(%rsp)
movq %r10, 0x20(%rsp)
movq %r9, 0x18(%rsp)
movq 0xd0(%rsp), %r13
movq 0x80(%rsp), %r15
jmp 0xb580
movq %r13, 0x10(%rsp)
movq 0x140(%rsp), %rax
movq %rax, 0x38(%rsp)
movq %rdx, 0x28(%rsp)
movq %r10, 0x20(%rsp)
movq %r9, 0x18(%rsp)
movq %r11, 0x30(%rsp)
jmp 0xb568
movq %rax, 0x10(%rsp)
movq %r12, 0x38(%rsp)
movq %r14, 0x28(%rsp)
movq 0x138(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x18(%rsp)
movq %rsi, 0x30(%rsp)
movq 0xd0(%rsp), %r13
movq 0x80(%rsp), %r15
movq 0xc8(%rsp), %r14
movq 0x170(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x1a8(%rsp), %rcx
movq 0x88(%rsp), %rdx
addl %edx, %ecx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movl 0x18(%rax,%rcx), %r9d
xorl %edi, %r9d
movl 0x1c(%rax,%rcx), %r10d
movl 0x20(%rax,%rcx), %ebx
movl 0x24(%rax,%rcx), %r11d
movl 0x28(%rax,%rcx), %eax
movl (%r13), %esi
testl %edi, %edi
jne 0xb62a
movq %r8, %r12
movq 0x78(%rsp), %rdx
leal 0x1(%rdx), %ebp
leaq (%r14,%r15), %r8
movq %r13, %rdi
movq %r15, %rcx
pushq %rax
pushq %r11
pushq %rbx
pushq %r10
callq 0x131ed
addq $0x20, %rsp
addq %rbx, %r15
movq 0xd8(%rsp), %r9
movq 0x88(%rsp), %rax
addl %r9d, %eax
movq %rax, 0x88(%rsp)
movl %ebp, %eax
movq %rax, 0x78(%rsp)
movq 0x1b0(%rsp), %rax
cmpl %eax, %ebp
movq %r12, %r8
movl 0x74(%rsp), %edi
jne 0xb039
jmp 0xb68b
cmpl $0x2b5e3, %eax          # imm = 0x2B5E3
jg 0xb64b
cmpl $0x2b5d0, %eax          # imm = 0x2B5D0
je 0xb67e
cmpl $0x2b5d2, %eax          # imm = 0x2B5D2
je 0xb671
cmpl $0x2b5d5, %eax          # imm = 0x2B5D5
je 0xb5c8
jmp 0xbe84
cmpl $0x2b5e4, %eax          # imm = 0x2B5E4
je 0xb5c8
cmpl $0x5978d4, %eax         # imm = 0x5978D4
je 0xb5c8
cmpl $0x7ca1b285, %eax       # imm = 0x7CA1B285
je 0xb5c8
jmp 0xbe84
movq %r8, %r12
movl $0x2b5d0, %eax          # imm = 0x2B5D0
jmp 0xb5cb
movq %r8, %r12
movl $0x2b5d2, %eax          # imm = 0x2B5D2
jmp 0xb5cb
movq %r15, 0x80(%rsp)
movq %rax, 0x78(%rsp)
jmp 0xb6a2
movq %r15, 0x80(%rsp)
movq 0x68(%rsp), %rax
movq 0x8(%rsp), %r15
cmpl $-0x1, %r8d
movq 0x98(%rsp), %rcx
je 0xba99
cmpl 0x100(%rsp), %r8d
jae 0xba99
movq %r15, 0x8(%rsp)
movq 0x30(%rsp), %rax
leaq (%rax,%rax), %rdx
movq %rdx, 0x120(%rsp)
leaq (,%rax,4), %rax
movq %rax, 0xc8(%rsp)
movq 0x18(%rsp), %rax
leaq (%rax,%rax), %rdx
movq %rdx, 0x118(%rsp)
leaq (,%rax,4), %rax
movq %rax, 0x140(%rsp)
movq 0x20(%rsp), %rax
leaq (%rax,%rax), %rdx
movq %rdx, 0x110(%rsp)
leaq (,%rax,4), %rax
movq %rax, 0xe0(%rsp)
movq 0x28(%rsp), %rax
leaq (%rax,%rax), %rdx
movq %rdx, 0x158(%rsp)
leaq (,%rax,4), %rax
movq %rax, 0x138(%rsp)
movq 0x38(%rsp), %rax
leaq (%rax,%rax), %rdx
movq %rdx, 0x108(%rsp)
leaq (,%rax,4), %rax
movq %rax, 0x130(%rsp)
movq 0x10(%rsp), %rax
leaq (%rax,%rax), %rdx
movq %rdx, 0x88(%rsp)
leaq (,%rax,4), %rax
movq %rax, 0x128(%rsp)
leal (%r9,%r8), %r12d
xorl %ebp, %ebp
xorl %ebx, %ebx
movq 0x10(%rsp), %rax
addq %rbx, %rax
cmpq %rcx, %rax
movq %r8, %r15
jne 0xb7e7
movq 0x88(%rsp), %rcx
addq %rbp, %rcx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0x98(%rsp)
leaq (,%rcx,4), %rsi
movq 0x40(%rsp), %rdi
callq 0x2390
movq 0x48(%rsp), %rdi
jmp 0xb7f9
movq %rcx, 0x98(%rsp)
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rax
movq 0x38(%rsp), %rcx
leaq (%rcx,%rbx), %rdx
movq 0x128(%rsp), %rcx
addq %rax, %rcx
movq 0x78(%rsp), %rsi
movl %esi, (%rcx,%rbx,4)
cmpq 0x90(%rsp), %rdx
movq %rax, 0x40(%rsp)
jne 0xb854
movq 0x108(%rsp), %rax
leaq (%rax,%rbp), %rcx
testq %rdx, %rdx
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0x90(%rsp)
leaq (,%rcx,4), %rsi
callq 0x2390
movq %rax, %rdi
movq %r15, %rcx
movq 0x28(%rsp), %rax
addq %rbx, %rax
movl %ecx, %r13d
movq 0xa0(%rsp), %rcx
movl (%rcx,%r13,4), %ecx
movq %rdi, 0x48(%rsp)
movq 0x130(%rsp), %rdx
addq %rdi, %rdx
movl %ecx, (%rdx,%rbx,4)
cmpq 0xa8(%rsp), %rax
jne 0xb8c3
movq 0x158(%rsp), %rcx
addq %rbp, %rcx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0xa8(%rsp)
leaq (,%rcx,4), %rsi
movq 0x50(%rsp), %rdi
callq 0x2390
movq 0x58(%rsp), %rdi
jmp 0xb8cd
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rax
movq 0x20(%rsp), %rcx
leaq (%rcx,%rbx), %rsi
movq 0x190(%rsp), %rcx
movl (%rcx,%r13,4), %ecx
movq 0x138(%rsp), %rdx
addq %rax, %rdx
movl %ecx, (%rdx,%rbx,4)
cmpq 0xb0(%rsp), %rsi
movq %rax, 0x50(%rsp)
jne 0xb92f
movq 0x110(%rsp), %rax
leaq (%rax,%rbp), %rcx
testq %rsi, %rsi
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0xb0(%rsp)
leaq (,%rcx,4), %rsi
callq 0x2390
movq %rax, %rdi
movq 0x18(%rsp), %rax
addq %rbx, %rax
movq 0x188(%rsp), %rcx
movl (%rcx,%r13,4), %ecx
movq 0xe0(%rsp), %rdx
addq %rdi, %rdx
movl %ecx, (%rdx,%rbx,4)
cmpq 0xb8(%rsp), %rax
movq %rdi, 0x58(%rsp)
jne 0xb993
movq 0x118(%rsp), %rcx
addq %rbp, %rcx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0xb8(%rsp)
leaq (,%rcx,4), %rsi
movq 0x60(%rsp), %rdi
callq 0x2390
jmp 0xb998
movq 0x60(%rsp), %rax
movq 0x30(%rsp), %rcx
leaq (%rcx,%rbx), %rsi
movq 0x180(%rsp), %rcx
movl (%rcx,%r13,4), %ecx
movq 0x140(%rsp), %rdx
addq %rax, %rdx
movl %ecx, (%rdx,%rbx,4)
cmpq 0xc0(%rsp), %rsi
movq %rax, 0x60(%rsp)
jne 0xb9fe
movq 0x120(%rsp), %rax
leaq (%rax,%rbp), %rcx
testq %rsi, %rsi
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0xc0(%rsp)
leaq (,%rcx,4), %rsi
movq 0x8(%rsp), %rdi
callq 0x2390
jmp 0xba03
movq 0x8(%rsp), %rax
movq %r15, %r8
movq 0xd8(%rsp), %rsi
movq 0x178(%rsp), %rcx
movl (%rcx,%r13,4), %edx
movq %rax, 0x8(%rsp)
movq 0xc8(%rsp), %rcx
addq %rax, %rcx
movl %edx, (%rcx,%rbx,4)
movq 0xa0(%rsp), %rax
movl (%rax,%r13,4), %eax
addq %rax, %r14
incq %rbx
cmpl $-0x1, %r12d
movq 0x98(%rsp), %rcx
je 0xba69
addl %esi, %r8d
addq $0x2, %rbp
leal (%r12,%rsi), %eax
cmpl 0x100(%rsp), %r12d
movl %eax, %r12d
jb 0xb79f
addq %rbx, 0x30(%rsp)
addq %rbx, 0x18(%rsp)
addq %rbx, 0x20(%rsp)
addq %rbx, 0x28(%rsp)
addq %rbx, 0x38(%rsp)
addq %rbx, 0x10(%rsp)
movq 0xd0(%rsp), %r13
movq 0x68(%rsp), %rax
movq 0x8(%rsp), %r15
movq 0x168(%rsp), %rdx
cmpq 0x1a0(%rsp), %rdx
jae 0xbae4
movq %r14, %rbp
cmpq %rcx, 0x10(%rsp)
jne 0xbaf6
movq %r15, %r14
leaq (%rcx,%rcx), %rbx
testq %rcx, %rcx
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
movq 0x40(%rsp), %rdi
callq 0x2390
movq %rbx, %r12
movq 0x48(%rsp), %rdi
jmp 0xbb06
movq %r15, 0x8(%rsp)
movq 0x80(%rsp), %r15
jmp 0xbcfa
movq %rcx, %r12
movq %r15, %r14
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rax
movq 0x90(%rsp), %rcx
movq 0x10(%rsp), %rdx
movq 0x78(%rsp), %rsi
movl %esi, (%rax,%rdx,4)
cmpq %rcx, 0x38(%rsp)
movq 0x80(%rsp), %r15
movq %rax, 0x40(%rsp)
jne 0xbb57
leaq (%rcx,%rcx), %rbx
testq %rcx, %rcx
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
callq 0x2390
movq %rax, %rdi
movq %rbx, 0x90(%rsp)
leaq 0x20792(%rip), %rax     # 0x2c2f0
movl (%rax), %eax
movq %rdi, 0x48(%rsp)
movq 0x38(%rsp), %rcx
movl %eax, (%rdi,%rcx,4)
movq 0xa8(%rsp), %rax
cmpq %rax, 0x28(%rsp)
jne 0xbbb0
leaq (%rax,%rax), %rbx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
movq 0x50(%rsp), %rdi
callq 0x2390
movq %rax, %rcx
movq %rbx, 0xa8(%rsp)
movq 0x58(%rsp), %rdi
jmp 0xbbba
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rcx
leaq 0x20723(%rip), %rax     # 0x2c2e4
movl (%rax), %eax
movq 0x28(%rsp), %rdx
movl %eax, (%rcx,%rdx,4)
movq 0xb0(%rsp), %rax
cmpq %rax, 0x20(%rsp)
movq %rcx, 0x50(%rsp)
jne 0xbc07
leaq (%rax,%rax), %rbx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
callq 0x2390
movq %rax, %rdi
movq %rbx, 0xb0(%rsp)
leaq 0x206da(%rip), %rax     # 0x2c2e8
movl (%rax), %eax
movq %rdi, 0x58(%rsp)
movq 0x20(%rsp), %rcx
movl %eax, (%rdi,%rcx,4)
movq 0xb8(%rsp), %rax
cmpq %rax, 0x18(%rsp)
jne 0xbc5b
leaq (%rax,%rax), %rbx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
movq 0x60(%rsp), %rdi
callq 0x2390
movq %rbx, 0xb8(%rsp)
movq %r14, %rdi
jmp 0xbc63
movq %r14, %rdi
movq 0x60(%rsp), %rax
movq 0x18(%rsp), %rcx
movl $0xb88c316, (%rax,%rcx,4) # imm = 0xB88C316
movq 0xc0(%rsp), %rcx
cmpq %rcx, 0x30(%rsp)
movq %rbp, %r14
movq %rax, 0x60(%rsp)
jne 0xbcae
leaq (%rcx,%rcx), %rbx
testq %rcx, %rcx
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
callq 0x2390
movq %rax, %rdi
movq %rbx, 0xc0(%rsp)
movq %r12, %rcx
incq 0x10(%rsp)
incq 0x38(%rsp)
incq 0x28(%rsp)
incq 0x20(%rsp)
incq 0x18(%rsp)
leaq 0x2061b(%rip), %rax     # 0x2c2ec
movl (%rax), %eax
movq %rdi, 0x8(%rsp)
movq 0x30(%rsp), %rdx
movl %eax, (%rdi,%rdx,4)
incq %rdx
movq %rdx, 0x30(%rsp)
leaq 0x20601(%rip), %rax     # 0x2c2f0
movslq (%rax), %rax
addq %rax, %r14
movq 0x68(%rsp), %rax
movq %rcx, 0x98(%rsp)
movq 0x168(%rsp), %rcx
incq %rcx
cmpq 0x198(%rsp), %rcx
jne 0xaf46
movl 0xe8(%rsp), %edx
incl %edx
leaq 0x229(%rsp), %rdi
leaq 0x1746c(%rip), %rsi     # 0x2319f
movl %edx, 0xe8(%rsp)
xorl %eax, %eax
callq 0x24a0
movl 0x18(%r13), %r9d
movq 0x78(%rsp), %r8
subl %r8d, %r9d
subq $0x8, %rsp
movq %r13, %rdi
leaq 0x228(%rsp), %rsi
movq %r15, %rdx
movq %r14, %rcx
movq 0x10(%rsp), %rbx
pushq %rbx
movq 0x70(%rsp), %r15
pushq %r15
pushq 0x70(%rsp)
pushq 0x70(%rsp)
pushq 0x70(%rsp)
pushq 0x70(%rsp)
pushq 0x48(%rsp)
callq 0x12ee5
movq %rbx, %rcx
movq 0xa8(%rsp), %rax
addq $0x40, %rsp
movq 0x160(%rsp), %r14
movq 0xf8(%rsp), %rdi
jmp 0xbdd2
movq 0x68(%rsp), %rax
movq %r8, %rdx
jmp 0xbde4
movq 0x68(%rsp), %rax
movq 0x160(%rsp), %r14
movq 0x8(%rsp), %rcx
movq 0xf8(%rsp), %rdi
movq 0x60(%rsp), %r15
movabsq $-0x400000000000000, %rsi # imm = 0xFC00000000000000
movq 0x148(%rsp), %rdx
incq %rdx
cmpq %r14, %rdx
jne 0xaca1
movb $0x1, %dl
movq %rdx, 0xf0(%rsp)
testb $0x1, 0xec(%rsp)
movl $0x0, 0xec(%rsp)
jne 0xac84
movq %rax, %rbx
movq %rcx, %r14
callq 0x2060
movq 0x18(%rbx), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2060
movq 0x40(%rsp), %rdi
callq 0x2060
movq 0x48(%rsp), %rdi
callq 0x2060
movq 0x50(%rsp), %rdi
callq 0x2060
movq 0x58(%rsp), %rdi
callq 0x2060
movq %r15, %rdi
callq 0x2060
movq %r14, %rdi
callq 0x2060
movq %r13, %rdi
callq 0x135fa
movq %r13, %rax
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1660c(%rip), %rsi     # 0x22497
movl %eax, %edx
xorl %eax, %eax
callq 0xbeb3
leaq 0x16588(%rip), %rdi     # 0x22423
leaq 0x16588(%rip), %rsi     # 0x2242a
leaq 0x16589(%rip), %rcx     # 0x22432
movl $0x301, %edx            # imm = 0x301
callq 0x21c0