// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/break.c
// Function: write_break_agp
void write_break_agp(asm_dict_t *d, bp_t *breaks, uint32_t b_n, FILE *fp)
{
    uint32_t i, j, s, ns;
    int64_t L, l;
    uint64_t len, gap;
    sd_seg_t seg;
    sd_aseq_t aseq, aseq1;
    sdict_t *sd;
    uint64_t *p;
    uint32_t p_n, g;
    char s_name[32];
    kvec_t(sd_seg_t) segs1;
    kvec_t(uint32_t) gs, gsize, gcomp, gtype, glink, gevid;

    sd = d->sdict;
    kv_init(segs1);
    kv_init(gs);
    kv_init(gsize);
    kv_init(gcomp);
    kv_init(gtype);
    kv_init(glink);
    kv_init(gevid);
    sprintf(s_name, "scaffold_");
    s = 0;

    for (i = 0; i < d->n; ++i) {
        if (b_n == 0 || i < breaks->s) {
            // no breaks
            // write the orignal seg block but with a new name
            sprintf(&s_name[9], "%u", ++s);
            write_segs_to_agp(d->seg + d->s[i].s, d->s[i].n, &d->s[i], sd, s_name, fp);
        } else {
            // contain break points
            p = breaks->p;
            p_n = breaks->n;
            aseq = d->s[i];
            len = gap = 0;
            g = ns = 0;
            segs1.n = gs.n = gsize.n = gcomp.n = gtype.n = glink.n = gevid.n = 0;
            for (j = 0; j < aseq.n; ++j) {
                seg = d->seg[aseq.s + j];
                
                // add gap information
                while (g < aseq.gn && aseq.gs[g] <= j) {
                    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;
                }

                if (p_n == 0 || seg.a + seg.y <= p[0]) {
                    // current seg contains no break points
                    // add seg information
                    sd_seg_t seg1 = {seg.s, ns++, len, len + gap, seg.c, seg.x, seg.y, seg.t, seg.r};
                    kv_push(sd_seg_t, segs1, seg1);
                    len += seg.y;
                } else {
                    l = (int64_t) p[0] - seg.a;
                    assert(-l < UINT32_MAX && l < UINT32_MAX);
                    if (l > 0) {
                        // split seg
                        sd_seg_t seg1 = {seg.s, ns++, len, len + gap, seg.c,
                            seg.c & 1? (uint32_t) (-l + seg.x + seg.y) : seg.x, (uint32_t) l, seg.t, seg.r};
                        kv_push(sd_seg_t, segs1, seg1);
                        len += l;
                    } else {
                        // remove gaps before seg
                        while (gs.n > 0 && gs.a[gs.n - 1] == ns) {
                            --gs.n;
                            // no need to change size of gap info kvecs as they will be reset after this
                            gap -= gsize.a[gs.n];
                        }
                    }

                    // add aseq info and write seg block
                    aseq1.len = len;
                    aseq1.gap = gap;
                    aseq1.n = ns;
                    aseq1.s = 0;
                    aseq1.gn = gs.n;
                    aseq1.gs = gs.a;
                    aseq1.gsize = gsize.a;
                    aseq1.gcomp = gcomp.a;
                    aseq1.gtype = gtype.a;
                    aseq1.glink = glink.a;
                    aseq1.gevid = gevid.a;
                    sprintf(&s_name[9], "%u", ++s);
                    write_segs_to_agp(segs1.a, ns, &aseq1, sd, s_name, fp);
                    // reset params
                    len = gap = 0;
                    ns = 0;
                    segs1.n = gs.n = gsize.n = gcomp.n = gtype.n = glink.n = gevid.n = 0;
                    if (--p_n) ++p;

                    // these are all single seg blocks
                    L = l;
                    while (p_n > 0 && seg.a + seg.y > p[0]) {
                        l = (int64_t) (p[0] - p[-1]);
                        assert(l < UINT32_MAX);
                        sd_seg_t seg1 = {seg.s, 0, 0, 0, seg.c, seg.c & 1? (uint32_t) (-L - l + seg.x + seg.y) : (uint32_t) (L + seg.x), 
                            (uint32_t) l, seg.t, seg.r};
                        // write a block of a single seg
                        sprintf(&s_name[9], "%u", ++s);
                        write_segs_to_agp(&seg1, 1, 0, sd, s_name, fp);
                        L += l;
                        if (--p_n) ++p;
                    }
                    
                    assert(-L < UINT32_MAX && L < UINT32_MAX);
                    if (L < seg.y) {
                        // make remnant as the first seg in the next block
                        sd_seg_t seg1 = {seg.s, ns++, 0, 0, seg.c, seg.c & 1? seg.x : (uint32_t) (L + seg.x), (uint32_t) (-L + seg.y), 
                            seg.t, seg.r};
                        kv_push(sd_seg_t, segs1, seg1);
                        len += -L + seg.y;
                    } else {
                        // remove gaps after this seg
                        while (g < aseq.gn && aseq.gs[g] <= j+1) ++g;
                    }
                }
            }
            if (ns > 0) {
                // add trailing gap information
                while (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;
                }
                // add aseq info and write seg block
                aseq1.len = len;
                aseq1.gap = gap;
                aseq1.n = ns;
                aseq1.s = 0;
                aseq1.gn = gs.n;
                aseq1.gs = gs.a;
                aseq1.gsize = gsize.a;
                aseq1.gcomp = gcomp.a;
                aseq1.gtype = gtype.a;
                aseq1.glink = glink.a;
                aseq1.gevid = gevid.a;
                sprintf(&s_name[9], "%u", ++s);
                write_segs_to_agp(segs1.a, ns, &aseq1, sd, s_name, fp);
            }
            if(--b_n) ++breaks;
        }
    }

    kv_destroy(segs1);
    kv_destroy(gs);
    kv_destroy(gsize);
    kv_destroy(gcomp);
    kv_destroy(gtype);
    kv_destroy(glink);
    kv_destroy(gevid);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movq %rcx, 0x128(%rsp)
movl %edx, 0x114(%rsp)
movq %rsi, 0x118(%rsp)
movq 0x38(%rdi), %rax
movq %rax, 0x120(%rsp)
movabsq $0x646c6f6666616373, %rax # imm = 0x646C6F6666616373
movq %rax, 0x1c0(%rsp)
movw $0x5f, 0x1c8(%rsp)
cmpl $0x0, (%rdi)
je 0x8361
movq %rdi, %rbx
movl $0x0, %ebp
movl $0x0, %edx
movl $0x0, %eax
movq %rax, 0x8(%rsp)
movl $0x0, %r13d
movl $0x0, %r14d
movq $0x0, 0x148(%rsp)
xorl %eax, %eax
movq $0x0, 0xf0(%rsp)
xorl %r11d, %r11d
movq $0x0, 0x140(%rsp)
movq $0x0, 0x78(%rsp)
movq $0x0, 0x138(%rsp)
xorl %r15d, %r15d
movq $0x0, 0x130(%rsp)
movq $0x0, 0x150(%rsp)
xorl %r12d, %r12d
movq %rdi, 0xd8(%rsp)
movq %r14, 0x28(%rsp)
movq %rax, 0x10(%rsp)
cmpl $0x0, 0x114(%rsp)
je 0x704a
movq 0x118(%rsp), %rax
movl 0x8(%rax), %eax
cmpq %rax, %rbp
jae 0x70af
incl %edx
leaq 0x1c9(%rsp), %rdi
leaq 0x1c144(%rip), %rsi     # 0x2319f
movq %rdx, 0x60(%rsp)
xorl %eax, %eax
movq %r11, %r14
callq 0x24a0
movq 0x8(%rbx), %rax
imulq $0x58, %rbp, %rcx
leaq (%rax,%rcx), %rdx
movl 0x18(%rax,%rcx), %esi
movl 0x1c(%rax,%rcx), %eax
leaq (%rax,%rax,2), %rdi
shlq $0x4, %rdi
addq 0x20(%rbx), %rdi
movq 0x120(%rsp), %rcx
leaq 0x1c0(%rsp), %r8
movq 0x128(%rsp), %r9
callq 0x154be
movq %r14, %r11
jmp 0x8342
movq %rdx, 0x60(%rsp)
movq 0x8(%rbx), %rax
movq %rbp, 0x238(%rsp)
imulq $0x58, %rbp, %rcx
movl 0x18(%rax,%rcx), %edx
movq %rdx, 0x250(%rsp)
testq %rdx, %rdx
je 0x831b
movl 0x1c(%rax,%rcx), %edx
movq %rdx, 0x248(%rsp)
movl 0x20(%rax,%rcx), %edx
movq 0x28(%rax,%rcx), %rsi
movq %rsi, 0x1b0(%rsp)
movq 0x30(%rax,%rcx), %rsi
movq %rsi, 0x1a8(%rsp)
movq 0x38(%rax,%rcx), %rsi
movq %rsi, 0x1a0(%rsp)
movq 0x40(%rax,%rcx), %rsi
movq %rsi, 0x198(%rsp)
movq 0x48(%rax,%rcx), %rsi
movq %rsi, 0x190(%rsp)
movq 0x50(%rax,%rcx), %rax
movq %rax, 0x188(%rsp)
movq 0x118(%rsp), %rax
movl (%rax), %ecx
movl %ecx, 0xd4(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0xc0(%rsp)
movq %rdx, %rax
negq %rax
movq %rax, 0x240(%rsp)
xorl %edi, %edi
movl $0x0, 0x4(%rsp)
xorl %r10d, %r10d
xorl %r9d, %r9d
xorl %ebp, %ebp
movq $0x0, 0x68(%rsp)
xorl %r8d, %r8d
movq $0x0, 0x38(%rsp)
movq $0x0, 0x40(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0x50(%rsp)
movq $0x0, 0x58(%rsp)
movq 0x8(%rsp), %r14
movq %rdx, 0xb8(%rsp)
movq %r10, 0x90(%rsp)
movq %r14, 0x8(%rsp)
movq 0x20(%rbx), %rax
movq 0x248(%rsp), %rcx
movq %rdi, 0xa0(%rsp)
addl %edi, %ecx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movl (%rax,%rcx), %esi
movl %esi, 0x84(%rsp)
movq 0x8(%rax,%rcx), %rsi
movq %rsi, 0x1b8(%rsp)
movl 0x18(%rax,%rcx), %esi
movl %esi, 0x1c(%rsp)
movl 0x1c(%rax,%rcx), %esi
movq %rsi, 0xf8(%rsp)
movl 0x20(%rax,%rcx), %esi
movq %rsi, 0xe0(%rsp)
movl 0x24(%rax,%rcx), %esi
movl %esi, 0x88(%rsp)
movl 0x28(%rax,%rcx), %eax
movl %eax, 0x8c(%rsp)
cmpl %edx, %ebp
jae 0x7663
movq %r13, 0x30(%rsp)
movq %r11, 0x20(%rsp)
movl %ebp, %ebp
movq 0x1b0(%rsp), %rax
leaq (%rax,%rbp,4), %rax
movq %rax, 0x180(%rsp)
movq 0x1a8(%rsp), %rax
leaq (%rax,%rbp,4), %rax
movq %rax, 0xb0(%rsp)
movq 0x1a0(%rsp), %rax
leaq (%rax,%rbp,4), %rax
movq %rax, 0x178(%rsp)
movq 0x198(%rsp), %rax
leaq (%rax,%rbp,4), %rax
movq %rax, 0x170(%rsp)
movq 0x190(%rsp), %rax
leaq (%rax,%rbp,4), %rax
movq %rax, 0x168(%rsp)
movq 0x188(%rsp), %rax
leaq (%rax,%rbp,4), %rax
movq %rax, 0x160(%rsp)
movq 0x240(%rsp), %rax
movq %rbp, 0x98(%rsp)
leaq (%rax,%rbp), %rax
movq %rax, 0x158(%rsp)
leaq (,%r8,4), %rax
movq %rax, 0x280(%rsp)
movq 0x38(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0x278(%rsp)
movq 0x40(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0x270(%rsp)
movq 0x48(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0x268(%rsp)
movq 0x50(%rsp), %rax
leaq (%rax,%rax), %rbx
leaq (,%rax,4), %rax
movq %rax, 0x260(%rsp)
movq 0x58(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0x258(%rsp)
xorl %ebp, %ebp
movq %r8, 0x100(%rsp)
movq %r12, 0x70(%rsp)
leaq (%r8,%rbp), %rax
movq 0x38(%rsp), %rcx
leaq (%rcx,%rbp), %r13
movq 0x40(%rsp), %rcx
leaq (%rcx,%rbp), %r14
movq 0x48(%rsp), %rcx
leaq (%rcx,%rbp), %r12
movq 0x50(%rsp), %rcx
leaq (%rcx,%rbp), %rdx
movq 0x58(%rsp), %rcx
leaq (%rcx,%rbp), %rsi
movq 0x180(%rsp), %rcx
movl (%rcx,%rbp,4), %ecx
cmpq %rcx, 0xa0(%rsp)
jb 0x7672
movq %rdx, 0xe8(%rsp)
movq %rbx, 0x108(%rsp)
movq 0x148(%rsp), %rcx
cmpq %rcx, %rax
movq %r9, 0xc8(%rsp)
movq %rsi, 0xa8(%rsp)
jne 0x7411
movq %r15, %rbx
leaq (%rcx,%rcx), %r15
testq %rcx, %rcx
movl $0x2, %eax
cmoveq %rax, %r15
leaq (,%r15,4), %rsi
movq 0x28(%rsp), %rdi
callq 0x2390
movq %r15, 0x148(%rsp)
movq 0x10(%rsp), %rdi
jmp 0x741e
movq %r15, %rbx
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0xf0(%rsp), %rdx
movq 0x280(%rsp), %rcx
addq %rax, %rcx
movl 0x4(%rsp), %esi
movl %esi, (%rcx,%rbp,4)
cmpq %rdx, %r13
movq %rax, 0x28(%rsp)
jne 0x7465
leaq (%rdx,%rdx), %r15
testq %rdx, %rdx
movl $0x2, %eax
cmoveq %rax, %r15
leaq (,%r15,4), %rsi
callq 0x2390
movq %rax, %rdi
movq %r15, %rdx
movq %rbx, %r15
movq 0x20(%rsp), %r13
movq 0xb0(%rsp), %rax
movl (%rax,%rbp,4), %eax
movq %rdi, 0x10(%rsp)
movq 0x278(%rsp), %rcx
addq %rdi, %rcx
movl %eax, (%rcx,%rbp,4)
movq 0x140(%rsp), %rax
cmpq %rax, %r14
movq 0x78(%rsp), %rbx
movq %rdx, 0xf0(%rsp)
jne 0x74d0
leaq (%rax,%rax), %r14
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %r14
leaq (,%r14,4), %rsi
movq %r13, %rdi
callq 0x2390
movq %rax, %r13
movq %r14, 0x140(%rsp)
movq 0x178(%rsp), %rax
movl (%rax,%rbp,4), %eax
movq 0x270(%rsp), %rcx
addq %r13, %rcx
movl %eax, (%rcx,%rbp,4)
movq 0x138(%rsp), %rax
cmpq %rax, %r12
jne 0x7521
leaq (%rax,%rax), %r14
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %r14
leaq (,%r14,4), %rsi
movq %rbx, %rdi
callq 0x2390
movq %rax, %rbx
movq %r14, 0x138(%rsp)
movq 0x70(%rsp), %r12
movq 0xa8(%rsp), %rdx
movq 0x170(%rsp), %rax
movl (%rax,%rbp,4), %eax
movq 0x268(%rsp), %rcx
addq %rbx, %rcx
movl %eax, (%rcx,%rbp,4)
movq 0x130(%rsp), %rax
cmpq %rax, %rdx
movq %rbx, 0x78(%rsp)
jne 0x7584
leaq (%rax,%rax), %rbx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
movq %r15, %rdi
callq 0x2390
movq %rax, %r15
movq %rbx, 0x130(%rsp)
movq 0xe8(%rsp), %rdx
movq 0x168(%rsp), %rax
movl (%rax,%rbp,4), %eax
movq 0x258(%rsp), %rcx
addq %r15, %rcx
movl %eax, (%rcx,%rbp,4)
cmpq 0x150(%rsp), %rdx
movq 0x108(%rsp), %rbx
movq %r13, 0x20(%rsp)
jne 0x75e6
testq %rdx, %rdx
movq %rbx, %rcx
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0x150(%rsp)
leaq (,%rcx,4), %rsi
movq %r12, %rdi
callq 0x2390
movq %rax, %r12
movq 0x100(%rsp), %r8
movq 0xc8(%rsp), %r9
movq 0x160(%rsp), %rax
movl (%rax,%rbp,4), %eax
movq 0x260(%rsp), %rcx
addq %r12, %rcx
movl %eax, (%rcx,%rbp,4)
movq 0xb0(%rsp), %rax
movl (%rax,%rbp,4), %eax
addq %rax, %r9
incq %rbp
addq $0x2, %rbx
movq 0x158(%rsp), %rax
addq %rbp, %rax
jne 0x7361
addq %rbp, %r8
addq %rbp, 0x38(%rsp)
addq %rbp, 0x40(%rsp)
addq %rbp, 0x48(%rsp)
addq %rbp, 0x50(%rsp)
addq %rbp, 0x58(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x98(%rsp)
jmp 0x76a5
movq %rbp, 0x98(%rsp)
movq 0x10(%rsp), %rcx
jmp 0x76b4
movq 0x98(%rsp), %rcx
addl %ebp, %ecx
movq %rcx, 0x98(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq %r12, 0x48(%rsp)
movq %r14, 0x40(%rsp)
movq %r13, 0x38(%rsp)
movq %rax, %r8
movq 0x70(%rsp), %r12
movq 0x20(%rsp), %r11
movq 0x10(%rsp), %rcx
movq 0x30(%rsp), %r13
cmpl $0x0, 0xd4(%rsp)
movl 0x4(%rsp), %r14d
movq %rcx, 0x10(%rsp)
je 0x77b4
movq 0xe0(%rsp), %rax
movq 0x1b8(%rsp), %rdx
addq %rax, %rdx
movq 0xc0(%rsp), %rax
movq (%rax), %rbp
movq %rdx, 0xc8(%rsp)
cmpq %rbp, %rdx
jbe 0x77b4
subq 0x1b8(%rsp), %rbp
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
leaq (%rax,%rbp), %rdx
movabsq $0x1fffffffd, %rax      # imm = 0x1FFFFFFFD
cmpq %rax, %rdx
jae 0x83f4
testq %rbp, %rbp
movq %r15, 0xa8(%rsp)
movq %r11, 0x20(%rsp)
movq %rdx, 0x70(%rsp)
jle 0x78c4
movq 0xe0(%rsp), %rax
movq 0xf8(%rsp), %rcx
leal (%rax,%rcx), %r14d
subl %ebp, %r14d
testb $0x1, 0x1c(%rsp)
cmovel %ecx, %r14d
cmpq %r13, 0x68(%rsp)
jne 0x78fb
leaq (,%r13,2), %r15
testq %r13, %r13
movl $0x2, %eax
cmoveq %rax, %r15
movq %r15, %rax
shlq $0x4, %rax
leaq (%rax,%rax,2), %rsi
movq 0x8(%rsp), %rdi
movq %r8, %rbx
movq %r9, %r13
callq 0x2390
movq %r13, %r9
movq %rbx, %r8
movq %rax, %r13
movq %r15, 0x30(%rsp)
movq 0xa8(%rsp), %r15
movq 0x20(%rsp), %r11
jmp 0x7905
cmpq %r13, 0x68(%rsp)
jne 0x7806
leaq (,%r13,2), %rbx
testq %r13, %r13
movl $0x2, %eax
cmoveq %rax, %rbx
movq %rbx, %rax
shlq $0x4, %rax
leaq (%rax,%rax,2), %rsi
movq 0x8(%rsp), %rdi
movq %r8, %r14
movq %r9, %r13
movq %r11, %rbp
callq 0x2390
movq %rbp, %r11
movq %r13, %r9
movq %r14, %r8
movq %rax, %r14
movq %rbx, %r13
movq 0xd8(%rsp), %rbx
jmp 0x7813
movq 0xd8(%rsp), %rbx
movq 0x8(%rsp), %r14
movq 0xb8(%rsp), %rdx
movq 0xa0(%rsp), %rdi
movq 0x90(%rsp), %r10
movq 0x98(%rsp), %rbp
leaq (%r9,%r10), %rax
movq 0x68(%rsp), %rsi
leaq (%rsi,%rsi,2), %rcx
incq %rsi
movq %rsi, 0x68(%rsp)
shlq $0x4, %rcx
movl 0x84(%rsp), %esi
movl %esi, (%r14,%rcx)
movl 0x4(%rsp), %esi
movl %esi, 0x4(%r14,%rcx)
incl %esi
movl %esi, 0x4(%rsp)
movq %r10, 0x8(%r14,%rcx)
movq %rax, 0x10(%r14,%rcx)
movl 0x1c(%rsp), %eax
movl %eax, 0x18(%r14,%rcx)
movq 0xf8(%rsp), %rax
movl %eax, 0x1c(%r14,%rcx)
movq 0xe0(%rsp), %rax
movl %eax, 0x20(%r14,%rcx)
movl 0x88(%rsp), %esi
movl %esi, 0x24(%r14,%rcx)
movl 0x8c(%rsp), %esi
movl %esi, 0x28(%r14,%rcx)
addq %rax, %r10
incq %rdi
cmpq 0x250(%rsp), %rdi
jne 0x71ba
jmp 0x7e89
testq %r8, %r8
movq %r13, 0x30(%rsp)
je 0x78e9
movq 0x28(%rsp), %rax
cmpl %r14d, -0x4(%rax,%r8,4)
jne 0x78ec
decq %r8
movl (%rcx,%r8,4), %eax
subq %rax, %r9
testq %r8, %r8
jne 0x78ce
xorl %r8d, %r8d
movq 0x8(%rsp), %r13
movq 0x90(%rsp), %rsi
jmp 0x7975
movq %r13, 0x30(%rsp)
movq 0x8(%rsp), %r13
movq 0x90(%rsp), %rsi
leaq (%r9,%rsi), %rax
movq 0x68(%rsp), %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movl 0x84(%rsp), %edx
movl %edx, (%r13,%rcx)
movl 0x4(%rsp), %edx
movl %edx, 0x4(%r13,%rcx)
incl %edx
movq %rsi, 0x8(%r13,%rcx)
movq %rax, 0x10(%r13,%rcx)
movl 0x1c(%rsp), %eax
movl %eax, 0x18(%r13,%rcx)
movl %r14d, 0x1c(%r13,%rcx)
movl %edx, %r14d
movl %ebp, 0x20(%r13,%rcx)
movl 0x88(%rsp), %eax
movl %eax, 0x24(%r13,%rcx)
movl 0x8c(%rsp), %eax
movl %eax, 0x28(%r13,%rcx)
addq %rbp, %rsi
movq 0x10(%rsp), %rcx
movq %rsi, 0x1e8(%rsp)
movq %r9, 0x1f0(%rsp)
movl %r14d, 0x1f8(%rsp)
movl $0x0, 0x1fc(%rsp)
movl %r8d, 0x200(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x208(%rsp)
movq %rcx, 0x210(%rsp)
movq %r11, 0x218(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x220(%rsp)
movq %r15, 0x228(%rsp)
movq %r12, 0x230(%rsp)
movq 0x60(%rsp), %rbx
leal 0x1(%rbx), %edx
leaq 0x1c9(%rsp), %rdi
leaq 0x1b7ae(%rip), %rsi     # 0x2319f
movl %edx, 0xb0(%rsp)
xorl %eax, %eax
callq 0x24a0
movq %r13, 0x8(%rsp)
movq %r13, %rdi
movl %r14d, %esi
leaq 0x1e0(%rsp), %rdx
movq 0x120(%rsp), %rcx
leaq 0x1c0(%rsp), %r8
movq 0x128(%rsp), %r9
callq 0x154be
xorl %eax, %eax
movl 0xd4(%rsp), %edx
movl %edx, %r14d
decl %r14d
setne %al
movq 0xc0(%rsp), %rcx
leaq (%rcx,%rax,8), %rcx
movq %rcx, 0xc0(%rsp)
je 0x7bdd
movq %r12, 0x70(%rsp)
movq 0xe0(%rsp), %rax
addl 0xf8(%rsp), %eax
movl %eax, 0xb0(%rsp)
movl %ebx, %eax
movq %rax, 0x108(%rsp)
movl %edx, %r13d
leaq -0x2(%r13), %rax
movq %rax, 0xe8(%rsp)
decq %r13
xorl %ebx, %ebx
xorl %r12d, %r12d
movq 0xc0(%rsp), %rdx
movq (%rdx,%r12,8), %rax
cmpq %rax, 0xc8(%rsp)
jbe 0x7bf9
subq -0x8(%rdx,%r12,8), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jge 0x83d5
leaq (%rax,%rbp), %r15
movl 0xb0(%rsp), %ecx
subl %r15d, %ecx
addl 0xf8(%rsp), %ebp
movl 0x1c(%rsp), %esi
testb $0x1, %sil
movl 0x84(%rsp), %edx
movl %edx, 0x288(%rsp)
leaq 0x28c(%rsp), %rdx
xorps %xmm0, %xmm0
movups %xmm0, (%rdx)
movl $0x0, 0x10(%rdx)
movl %esi, 0x2a0(%rsp)
cmovnel %ecx, %ebp
movl %ebp, 0x2a4(%rsp)
movl %eax, 0x2a8(%rsp)
movl 0x88(%rsp), %eax
movl %eax, 0x2ac(%rsp)
movl 0x8c(%rsp), %eax
movl %eax, 0x2b0(%rsp)
movq 0x108(%rsp), %rax
leal (%rax,%r12), %edx
addl $0x2, %edx
leaq 0x1c9(%rsp), %rdi
leaq 0x1b649(%rip), %rsi     # 0x2319f
xorl %eax, %eax
callq 0x24a0
leaq 0x288(%rsp), %rdi
movl $0x1, %esi
xorl %edx, %edx
movq 0x120(%rsp), %rcx
leaq 0x1c0(%rsp), %r8
movq 0x128(%rsp), %r9
callq 0x154be
decl %r14d
xorl %eax, %eax
cmpl %r12d, 0xe8(%rsp)
setne %cl
incq %r12
addq $0x8, %rbx
movq %r15, %rbp
cmpl %r12d, %r13d
jne 0x7a97
movb %cl, %al
shll $0x3, %eax
movq 0x60(%rsp), %rcx
addl %r12d, %ecx
incl %ecx
addq %rbx, %rax
movq 0xc0(%rsp), %rdx
addq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0xc0(%rsp)
xorl %r14d, %r14d
movq %r15, %rbp
jmp 0x7c11
xorl %esi, %esi
movl 0xb0(%rsp), %eax
movl %eax, %ecx
movq 0x30(%rsp), %r13
movq 0x20(%rsp), %r11
movq 0x70(%rsp), %rdx
jmp 0x7c34
movq 0x60(%rsp), %rcx
addl %r12d, %ecx
incl %ecx
addq %rbx, %rdx
movq %rdx, 0xc0(%rsp)
movq %rbp, %r15
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
leaq (%r15,%rax), %rdx
movl %r14d, %esi
movq 0x70(%rsp), %r12
movq 0xa8(%rsp), %r15
movq 0x20(%rsp), %r11
movq 0x30(%rsp), %r13
movabsq $0x1fffffffd, %rax      # imm = 0x1FFFFFFFD
cmpq %rax, %rdx
jae 0x8413
subq %rbp, 0xe0(%rsp)
movq %rcx, 0x60(%rsp)
movl %esi, 0xd4(%rsp)
jle 0x7d51
testb $0x1, 0x1c(%rsp)
movl $0x0, %eax
cmovnel %eax, %ebp
testq %r13, %r13
jne 0x7c93
movl $0x60, %esi
movq 0x8(%rsp), %rdi
movq %r11, %rbx
callq 0x2390
movq %rbx, %r11
movq %rax, 0x8(%rsp)
movl $0x2, %r13d
addl 0xf8(%rsp), %ebp
movq 0x8(%rsp), %r14
movl 0x84(%rsp), %eax
movl %eax, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%r14)
movl $0x0, 0x14(%r14)
movl 0x1c(%rsp), %eax
movl %eax, 0x18(%r14)
movl %ebp, 0x1c(%r14)
movq 0xe0(%rsp), %r10
movl %r10d, 0x20(%r14)
movl 0x88(%rsp), %eax
movl %eax, 0x24(%r14)
movl 0x8c(%rsp), %eax
movl %eax, 0x28(%r14)
movl $0x1, 0x4(%rsp)
movl $0x1, %eax
movq %rax, 0x68(%rsp)
movq $0x0, 0x58(%rsp)
movq $0x0, 0x50(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0x40(%rsp)
movq $0x0, 0x38(%rsp)
xorl %r8d, %r8d
xorl %r9d, %r9d
movq 0xd8(%rsp), %rbx
movq 0xb8(%rsp), %rdx
movq 0xa0(%rsp), %rdi
movq 0x98(%rsp), %rbp
jmp 0x78ae
movq 0xb8(%rsp), %rdx
movq 0x98(%rsp), %rbp
cmpl %edx, %ebp
jae 0x7ddc
movq 0xa0(%rsp), %rdi
leaq 0x1(%rdi), %rax
movl %ebp, %ebp
movq 0xd8(%rsp), %rbx
movq 0x8(%rsp), %r14
movq 0x1b0(%rsp), %rcx
movl (%rcx,%rbp,4), %ecx
cmpq %rcx, %rax
jb 0x7e3d
incq %rbp
cmpq %rbp, %rdx
jne 0x7d80
movq $0x0, 0x58(%rsp)
movq $0x0, 0x50(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0x40(%rsp)
movq $0x0, 0x38(%rsp)
xorl %r8d, %r8d
movq $0x0, 0x68(%rsp)
movl %edx, %ebp
jmp 0x7e76
movq $0x0, 0x58(%rsp)
movq $0x0, 0x50(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0x40(%rsp)
movq $0x0, 0x38(%rsp)
xorl %r8d, %r8d
movq $0x0, 0x68(%rsp)
xorl %r9d, %r9d
xorl %r10d, %r10d
movl $0x0, 0x4(%rsp)
movq 0xd8(%rsp), %rbx
movq 0x8(%rsp), %r14
movq 0xa0(%rsp), %rdi
jmp 0x78ae
movq $0x0, 0x58(%rsp)
movq $0x0, 0x50(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0x40(%rsp)
movq $0x0, 0x38(%rsp)
xorl %r8d, %r8d
movq $0x0, 0x68(%rsp)
xorl %r9d, %r9d
xorl %r10d, %r10d
movl $0x0, 0x4(%rsp)
jmp 0x78ae
cmpl $0x0, 0x4(%rsp)
movq %r14, 0x8(%rsp)
je 0x831b
cmpl %edx, %ebp
jae 0x8253
movq %r10, 0x90(%rsp)
movl %ebp, %eax
movq 0x1a8(%rsp), %rcx
leaq (%rcx,%rax,4), %rbx
movq 0x1a0(%rsp), %rcx
leaq (%rcx,%rax,4), %rcx
movq %rcx, 0xb0(%rsp)
movq 0x198(%rsp), %rcx
leaq (%rcx,%rax,4), %rcx
movq %rcx, 0x108(%rsp)
movq 0x190(%rsp), %rcx
leaq (%rcx,%rax,4), %rcx
movq %rcx, 0xe8(%rsp)
movq 0x188(%rsp), %rcx
leaq (%rcx,%rax,4), %rcx
movq %rcx, 0xa0(%rsp)
subq %rax, %rdx
movq %rdx, 0xb8(%rsp)
leaq (,%r8,4), %rax
movq %rax, 0x180(%rsp)
movq 0x38(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0x178(%rsp)
movq 0x40(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0x170(%rsp)
movq 0x48(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0x168(%rsp)
movq 0x50(%rsp), %rax
leaq (%rax,%rax), %r14
leaq (,%rax,4), %rax
movq %rax, 0x160(%rsp)
movq 0x58(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0x158(%rsp)
xorl %ebp, %ebp
movq 0x28(%rsp), %rdi
movq %r8, 0x100(%rsp)
movq %rbx, 0x70(%rsp)
movq %r13, 0x30(%rsp)
movq %r15, 0xa8(%rsp)
movq %r11, %r13
leaq (%r8,%rbp), %rax
movq 0x148(%rsp), %rcx
cmpq %rcx, %rax
movq %r9, 0xc8(%rsp)
jne 0x7ff9
movq %r12, %r15
leaq (%rcx,%rcx), %r12
testq %rcx, %rcx
movl $0x2, %eax
cmoveq %rax, %r12
leaq (,%r12,4), %rsi
callq 0x2390
movq %rax, %rdi
movq %r12, 0x148(%rsp)
jmp 0x7ffc
movq %r12, %r15
movq 0xf0(%rsp), %rdx
movq 0x38(%rsp), %rax
addq %rbp, %rax
movq %rdi, 0x28(%rsp)
movq 0x180(%rsp), %rcx
addq %rdi, %rcx
movl 0x4(%rsp), %esi
movl %esi, (%rcx,%rbp,4)
cmpq %rdx, %rax
jne 0x8054
leaq (%rdx,%rdx), %r12
testq %rdx, %rdx
movl $0x2, %eax
cmoveq %rax, %r12
leaq (,%r12,4), %rsi
movq 0x10(%rsp), %rdi
callq 0x2390
movq %r12, 0xf0(%rsp)
jmp 0x8059
movq 0x10(%rsp), %rax
movq 0x40(%rsp), %rcx
leaq (%rcx,%rbp), %rsi
movl (%rbx,%rbp,4), %ecx
movq %rax, 0x10(%rsp)
movq 0x178(%rsp), %rdx
addq %rax, %rdx
movl %ecx, (%rdx,%rbp,4)
movq 0x140(%rsp), %rax
cmpq %rax, %rsi
jne 0x80b0
leaq (%rax,%rax), %r12
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %r12
leaq (,%r12,4), %rsi
movq %r13, %rdi
callq 0x2390
movq %rax, %r13
movq %r12, 0x140(%rsp)
movq 0x48(%rsp), %rax
addq %rbp, %rax
movq 0xb0(%rsp), %rcx
movl (%rcx,%rbp,4), %ecx
movq %r13, %rbx
movq 0x170(%rsp), %rdx
addq %r13, %rdx
movl %ecx, (%rdx,%rbp,4)
movq 0x138(%rsp), %rcx
cmpq %rcx, %rax
jne 0x810d
leaq (%rcx,%rcx), %r12
testq %rcx, %rcx
movl $0x2, %eax
cmoveq %rax, %r12
leaq (,%r12,4), %rsi
movq 0x78(%rsp), %rdi
callq 0x2390
movq %r12, 0x138(%rsp)
jmp 0x8112
movq 0x78(%rsp), %rax
movq 0x58(%rsp), %rcx
leaq (%rcx,%rbp), %rsi
movq 0x108(%rsp), %rcx
movl (%rcx,%rbp,4), %ecx
movq %rax, 0x78(%rsp)
movq 0x168(%rsp), %rdx
addq %rax, %rdx
movl %ecx, (%rdx,%rbp,4)
movq 0x130(%rsp), %rax
cmpq %rax, %rsi
jne 0x817b
leaq (%rax,%rax), %r12
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %r12
leaq (,%r12,4), %rsi
movq 0xa8(%rsp), %rdi
callq 0x2390
movq %rax, %r13
movq %r12, 0x130(%rsp)
movq %r15, %r12
jmp 0x8186
movq %r15, %r12
movq 0xa8(%rsp), %r13
movq 0x50(%rsp), %rax
addq %rbp, %rax
movq 0xe8(%rsp), %rcx
movl (%rcx,%rbp,4), %ecx
movq 0x158(%rsp), %rdx
addq %r13, %rdx
movl %ecx, (%rdx,%rbp,4)
cmpq 0x150(%rsp), %rax
movq %r13, %r15
jne 0x81de
testq %rax, %rax
movq %r14, %rcx
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0x150(%rsp)
leaq (,%rcx,4), %rsi
movq %r12, %rdi
callq 0x2390
movq %rax, %r12
movq %rbx, %r11
movq 0x30(%rsp), %r13
movq 0x100(%rsp), %r8
movq 0xc8(%rsp), %r9
movq 0xa0(%rsp), %rax
movl (%rax,%rbp,4), %eax
movq 0x160(%rsp), %rcx
addq %r12, %rcx
movl %eax, (%rcx,%rbp,4)
movq 0x70(%rsp), %rbx
movl (%rbx,%rbp,4), %eax
addq %rax, %r9
incq %rbp
addq $0x2, %r14
cmpq %rbp, 0xb8(%rsp)
movq 0x28(%rsp), %rdi
movq 0x60(%rsp), %rdx
jne 0x7fa8
addq %rbp, %r8
movq 0xd8(%rsp), %rbx
movq 0x8(%rsp), %r14
movq 0x90(%rsp), %r10
jmp 0x825d
movq 0x28(%rsp), %rdi
movq 0x60(%rsp), %rdx
movq %r11, 0x20(%rsp)
movq %r10, 0x1e8(%rsp)
movq %r9, 0x1f0(%rsp)
movl 0x4(%rsp), %ebp
movl %ebp, 0x1f8(%rsp)
movl $0x0, 0x1fc(%rsp)
movl %r8d, 0x200(%rsp)
movq %rdi, 0x28(%rsp)
movq %rdi, 0x208(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x210(%rsp)
movq %r11, 0x218(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x220(%rsp)
movq %r15, 0x228(%rsp)
movq %r12, 0x230(%rsp)
incl %edx
leaq 0x1c9(%rsp), %rdi
leaq 0x1aebf(%rip), %rsi     # 0x2319f
movq %rdx, 0x60(%rsp)
xorl %eax, %eax
callq 0x24a0
movq %r14, %rdi
movl %ebp, %esi
leaq 0x1e0(%rsp), %rdx
movq 0x120(%rsp), %rcx
leaq 0x1c0(%rsp), %r8
movq 0x128(%rsp), %r9
callq 0x154be
movq 0x20(%rsp), %r11
movq 0x118(%rsp), %rcx
leaq 0x18(%rcx), %rax
decl 0x114(%rsp)
cmovneq %rax, %rcx
movq %rcx, 0x118(%rsp)
movq 0x238(%rsp), %rbp
incq %rbp
movl (%rbx), %eax
cmpq %rax, %rbp
movq 0x10(%rsp), %rax
movq 0x28(%rsp), %r14
movq 0x60(%rsp), %rdx
jb 0x7026
jmp 0x8381
xorl %r12d, %r12d
xorl %r15d, %r15d
movq $0x0, 0x78(%rsp)
xorl %r11d, %r11d
xorl %eax, %eax
xorl %r14d, %r14d
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movq %rax, %rbx
movq %r11, %r13
callq 0x2060
movq %r14, %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2060
movq %r13, %rdi
callq 0x2060
movq 0x78(%rsp), %rdi
callq 0x2060
movq %r15, %rdi
callq 0x2060
movq %r12, %rdi
callq 0x2060
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x19ee3(%rip), %rdi     # 0x222bf
leaq 0x19eeb(%rip), %rsi     # 0x222ce
leaq 0x19eec(%rip), %rcx     # 0x222d6
movl $0x299, %edx            # imm = 0x299
callq 0x21c0
leaq 0x19eb1(%rip), %rdi     # 0x222ac
leaq 0x19ecc(%rip), %rsi     # 0x222ce
leaq 0x19ecd(%rip), %rcx     # 0x222d6
movl $0x271, %edx            # imm = 0x271
callq 0x21c0
leaq 0x19ef9(%rip), %rdi     # 0x22313
leaq 0x19ead(%rip), %rsi     # 0x222ce
leaq 0x19eae(%rip), %rcx     # 0x222d6
movl $0x2a3, %edx            # imm = 0x2A3
callq 0x21c0
nop