// File: /workspace/github_c_makefile_star2_O2/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 $0x2c8, %rsp            # imm = 0x2C8
movq %rcx, %rbx
movl %edx, 0xdc(%rsp)
movq %rsi, 0xe0(%rsp)
movq %rdi, 0xe8(%rsp)
movq 0x38(%rdi), %r14
movabsq $0x646c6f6666616373, %rax # imm = 0x646C6F6666616373
leaq 0x1c9(%rsp), %rcx
movq %rax, -0x9(%rcx)
movw $0x5f, -0x1(%rcx)
movl $0x0, %r12d
movl $0x0, %edi
movl $0x0, %eax
movq %rax, 0x108(%rsp)
movl $0x0, %eax
movq %rax, 0x130(%rsp)
movl $0x0, %eax
movq %rax, 0x40(%rsp)
movq $0x0, 0x128(%rsp)
movq $0x0, 0x38(%rsp)
movq $0x0, 0x120(%rsp)
xorl %r15d, %r15d
movq $0x0, 0x118(%rsp)
movq $0x0, 0x68(%rsp)
movq $0x0, 0x110(%rsp)
xorl %edx, %edx
movq $0x0, 0x70(%rsp)
movq $0x0, 0x10(%rsp)
movl $0x0, (%rsp)
movq %rbx, 0xf8(%rsp)
movq %r14, 0x158(%rsp)
movq 0xe8(%rsp), %rax
movl (%rax), %eax
cmpq %rax, %r12
jae 0x5a76
cmpl $0x0, 0xdc(%rsp)
je 0x4979
movq 0xe0(%rsp), %rax
movl 0x8(%rax), %eax
cmpq %rax, %r12
jae 0x49de
movq %rdx, %r13
movq %r15, 0x20(%rsp)
movq %rdi, %r15
movl (%rsp), %edx
incl %edx
leaq 0x1c9(%rsp), %rdi
leaq 0x1a6cf(%rip), %rsi     # 0x1f067
movl %edx, (%rsp)
xorl %eax, %eax
callq 0x24a0
movq 0xe8(%rsp), %r8
movq 0x8(%r8), %rax
imulq $0x58, %r12, %rcx
leaq (%rax,%rcx), %rdx
movl 0x18(%rax,%rcx), %esi
movl 0x1c(%rax,%rcx), %eax
imulq $0x30, %rax, %rdi
addq 0x20(%r8), %rdi
movq %r14, %rcx
leaq 0x1c0(%rsp), %r8
movq %rbx, %r9
callq 0x1092b
jmp 0x5a63
movq 0xe0(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x168(%rsp)
movl (%rax), %eax
movl %eax, 0x34(%rsp)
movq 0xe8(%rsp), %rax
movq 0x8(%rax), %rax
movq %r12, 0x240(%rsp)
imulq $0x58, %r12, %rcx
movl 0x18(%rax,%rcx), %esi
movq %rsi, 0x250(%rsp)
movl 0x1c(%rax,%rcx), %esi
movq %rsi, 0x248(%rsp)
movl 0x20(%rax,%rcx), %esi
movq %rsi, 0xc8(%rsp)
movq 0x28(%rax,%rcx), %r12
movq 0x30(%rax,%rcx), %rsi
movq %rsi, 0x1b0(%rsp)
movq 0x38(%rax,%rcx), %rsi
movq %rsi, 0x1a8(%rsp)
movq 0x40(%rax,%rcx), %rsi
movq %rsi, 0x1a0(%rsp)
movq 0x48(%rax,%rcx), %rsi
movq %rsi, 0x198(%rsp)
movq 0x50(%rax,%rcx), %rax
movq %rax, 0x190(%rsp)
xorl %esi, %esi
movq $0x0, 0xc0(%rsp)
movq $0x0, 0xb8(%rsp)
movq $0x0, 0xb0(%rsp)
movq $0x0, 0xa8(%rsp)
movq $0x0, 0xa0(%rsp)
movq $0x0, 0x88(%rsp)
movq $0x0, 0x78(%rsp)
xorl %r11d, %r11d
xorl %r9d, %r9d
movq $0x0, 0xf0(%rsp)
xorl %r8d, %r8d
movq %r12, 0x160(%rsp)
movl %r11d, %r10d
cmpq 0x250(%rsp), %rsi
movq %r10, 0x100(%rsp)
movq %r15, 0x20(%rsp)
movl %r8d, 0xc(%rsp)
je 0x5588
movq 0xe8(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x248(%rsp), %rcx
movq %rsi, 0x80(%rsp)
addl %esi, %ecx
imulq $0x30, %rcx, %rcx
movl (%rax,%rcx), %esi
movl %esi, 0x54(%rsp)
movq 0x8(%rax,%rcx), %rsi
movq %rsi, 0x1b8(%rsp)
movl 0x18(%rax,%rcx), %esi
movl %esi, 0x8(%rsp)
movl 0x1c(%rax,%rcx), %esi
movl %esi, 0x30(%rsp)
movl 0x20(%rax,%rcx), %esi
movl %esi, 0x4(%rsp)
movq %rsi, 0x170(%rsp)
movq 0xc8(%rsp), %rsi
cmpl %esi, %r11d
cmovbel %esi, %r11d
movl %r11d, 0x2c(%rsp)
movl 0x24(%rax,%rcx), %esi
movl %esi, 0x58(%rsp)
movl 0x28(%rax,%rcx), %eax
movl %eax, 0x5c(%rsp)
leaq (%r12,%r10,4), %rax
movq %rax, 0x188(%rsp)
movq 0x1b0(%rsp), %rax
leaq (%rax,%r10,4), %rax
movq %rax, 0x90(%rsp)
movq 0x1a8(%rsp), %rax
leaq (%rax,%r10,4), %rax
movq %rax, 0x180(%rsp)
movq 0x1a0(%rsp), %rax
leaq (%rax,%r10,4), %rax
movq %rax, 0x178(%rsp)
movq 0x198(%rsp), %rax
leaq (%rax,%r10,4), %rax
movq %rax, 0x290(%rsp)
movq 0x190(%rsp), %rax
leaq (%rax,%r10,4), %rax
movq %rax, 0x288(%rsp)
movq 0xc0(%rsp), %rax
leaq (%rax,%rax), %rcx
movq %rcx, 0xd0(%rsp)
leaq (,%rax,4), %rax
movq %rax, 0x280(%rsp)
movq 0xb8(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0x278(%rsp)
movq 0xb0(%rsp), %rax
leaq (%rax,%rax), %rcx
movq %rcx, 0x148(%rsp)
leaq (,%rax,4), %rax
movq %rax, 0x270(%rsp)
movq 0xa8(%rsp), %rax
leaq (%rax,%rax), %rcx
movq %rcx, 0x140(%rsp)
leaq (,%rax,4), %rax
movq %rax, 0x268(%rsp)
movq 0xa0(%rsp), %rax
leaq (%rax,%rax), %rcx
movq %rcx, 0x138(%rsp)
leaq (,%rax,4), %rax
movq %rax, 0x260(%rsp)
movq 0x88(%rsp), %rax
leaq (%rax,%rax), %r8
leaq (,%rax,4), %rax
movq %rax, 0x258(%rsp)
xorl %r12d, %r12d
leaq (%r10,%r12), %rax
movq 0xc0(%rsp), %rcx
leaq (%rcx,%r12), %r13
movq 0xb8(%rsp), %rcx
leaq (%rcx,%r12), %rsi
movq 0xb0(%rsp), %rcx
leaq (%rcx,%r12), %r14
movq 0xa8(%rsp), %rcx
leaq (%rcx,%r12), %rbx
movq 0xa0(%rsp), %rcx
leaq (%rcx,%r12), %r15
movq 0x88(%rsp), %rcx
leaq (%rcx,%r12), %rbp
cmpq 0xc8(%rsp), %rax
movq %rdi, 0x48(%rsp)
movq %r9, 0x98(%rsp)
movq %rsi, 0x60(%rsp)
jae 0x4fb8
movq 0x188(%rsp), %rax
movl (%rax,%r12,4), %eax
cmpq %rax, 0x80(%rsp)
jb 0x4fb0
cmpq 0x110(%rsp), %rbp
movq %r8, 0x150(%rsp)
jne 0x4d80
testq %rbp, %rbp
movq %r8, %rax
pushq $0x2
popq %rbp
cmoveq %rbp, %rax
movq %rax, 0x110(%rsp)
leaq (,%rax,4), %rsi
movq %rdx, %rdi
callq 0x2390
movq %rax, %rdx
jmp 0x4d83
pushq $0x2
popq %rbp
movq 0x258(%rsp), %rax
addq %rdx, %rax
movl 0xc(%rsp), %ecx
movl %ecx, (%rax,%r12,4)
cmpq 0x118(%rsp), %r15
movq 0x68(%rsp), %rdi
movq %rdx, 0x18(%rsp)
jne 0x4dd1
testq %r15, %r15
movq 0x138(%rsp), %rax
cmoveq %rbp, %rax
movq %rax, 0x118(%rsp)
leaq (,%rax,4), %rsi
callq 0x2390
movq %rax, %rdi
movq 0x20(%rsp), %r15
movq 0x90(%rsp), %rax
movl (%rax,%r12,4), %eax
movq %rdi, 0x68(%rsp)
movq 0x260(%rsp), %rcx
addq %rdi, %rcx
movl %eax, (%rcx,%r12,4)
cmpq 0x120(%rsp), %rbx
jne 0x4e2a
testq %rbx, %rbx
movq 0x140(%rsp), %rax
cmoveq %rbp, %rax
movq %rax, 0x120(%rsp)
leaq (,%rax,4), %rsi
movq %r15, %rdi
callq 0x2390
movq %rax, %r15
movq 0x40(%rsp), %rbx
movq 0x38(%rsp), %rdi
movq 0x180(%rsp), %rax
movl (%rax,%r12,4), %eax
movq 0x268(%rsp), %rcx
addq %r15, %rcx
movl %eax, (%rcx,%r12,4)
cmpq 0x128(%rsp), %r14
jne 0x4e80
testq %r14, %r14
movq 0x148(%rsp), %rax
cmoveq %rbp, %rax
movq %rax, 0x128(%rsp)
leaq (,%rax,4), %rsi
callq 0x2390
movq %rax, %rdi
movq 0xd0(%rsp), %r14
movq 0x178(%rsp), %rax
movl (%rax,%r12,4), %eax
movq %rdi, 0x38(%rsp)
movq 0x270(%rsp), %rcx
addq %rdi, %rcx
movl %eax, (%rcx,%r12,4)
cmpq 0x130(%rsp), %r13
jne 0x4ed7
testq %r13, %r13
movq %r14, %rax
cmoveq %rbp, %rax
movq %rax, 0x130(%rsp)
leaq (,%rax,4), %rsi
movq %rbx, %rdi
callq 0x2390
movq %rax, %rbx
movq 0x48(%rsp), %rdi
movq 0x60(%rsp), %rdx
movq 0x290(%rsp), %rax
movl (%rax,%r12,4), %eax
movq 0x280(%rsp), %rcx
addq %rbx, %rcx
movl %eax, (%rcx,%r12,4)
movq 0x108(%rsp), %rax
cmpq %rax, %rdx
movq %rbx, 0x40(%rsp)
jne 0x4f31
leaq (%rax,%rax), %rbx
testq %rax, %rax
cmoveq %rbp, %rbx
leaq (,%rbx,4), %rsi
callq 0x2390
movq %rax, %rdi
movq %rbx, 0x108(%rsp)
movq 0x18(%rsp), %rdx
movq 0x98(%rsp), %r9
movq 0x100(%rsp), %r10
movq 0x150(%rsp), %r8
movq %r15, 0x20(%rsp)
movq 0x288(%rsp), %rax
movl (%rax,%r12,4), %eax
movq 0x278(%rsp), %rcx
addq %rdi, %rcx
movl %eax, (%rcx,%r12,4)
movq 0x90(%rsp), %rax
movl (%rax,%r12,4), %eax
addq %rax, %r9
incq %r12
addq $0x2, %r14
movq %r14, 0xd0(%rsp)
addq $0x2, 0x148(%rsp)
addq $0x2, 0x140(%rsp)
addq $0x2, 0x138(%rsp)
addq $0x2, %r8
jmp 0x4cbe
addl %r12d, %r10d
movl %r10d, 0x2c(%rsp)
cmpl $0x0, 0x34(%rsp)
movq 0x78(%rsp), %r8
je 0x50aa
movq 0x170(%rsp), %rax
movq 0x1b8(%rsp), %rcx
addq %rax, %rcx
movq 0x168(%rsp), %rax
movq (%rax), %r12
movq %rcx, 0x90(%rsp)
cmpq %r12, %rcx
jbe 0x50aa
subq 0x1b8(%rsp), %r12
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
addq %r12, %rax
movabsq $0x1fffffffd, %rcx      # imm = 0x1FFFFFFFD
cmpq %rcx, %rax
jae 0x5b0c
testq %r12, %r12
movq 0x158(%rsp), %r13
movq 0xf0(%rsp), %r15
movq %rdx, 0x18(%rsp)
jle 0x51ca
movl 0x30(%rsp), %eax
movl 0x4(%rsp), %ecx
addl %eax, %ecx
movl %ecx, 0x4(%rsp)
movl %ecx, %r10d
subl %r12d, %r10d
movl 0x8(%rsp), %ebx
andl $0x1, %ebx
cmovel %eax, %r10d
cmpq 0x70(%rsp), %r8
jne 0x5206
leaq (%r8,%r8), %rcx
testq %r8, %r8
pushq $0x2
popq %rax
cmoveq %rax, %rcx
movq %rcx, 0x70(%rsp)
imulq $0x30, %rcx, %rsi
movq 0x10(%rsp), %rdi
movq %r9, %r14
movl %r10d, 0x60(%rsp)
callq 0x2390
movl 0x60(%rsp), %r10d
movq 0x78(%rsp), %r8
movq %r14, %r9
movq 0x18(%rsp), %rdx
movq 0x48(%rsp), %rdi
movq %rax, %r14
jmp 0x520b
cmpq 0x70(%rsp), %r8
jne 0x50f3
leaq (%r8,%r8), %rcx
testq %r8, %r8
pushq $0x2
popq %rax
cmoveq %rax, %rcx
movq %rcx, 0x70(%rsp)
imulq $0x30, %rcx, %rsi
movq 0x10(%rsp), %rdi
movq %rdx, 0x18(%rsp)
movq %r8, %r12
callq 0x2390
movq 0x98(%rsp), %r9
movq 0x18(%rsp), %rdx
movq 0x48(%rsp), %rdi
movl 0x2c(%rsp), %r11d
jmp 0x5100
movq 0x10(%rsp), %rax
movl 0x2c(%rsp), %r11d
movq %r8, %r12
movq 0xf0(%rsp), %r10
leaq (%r9,%r10), %rsi
imulq $0x30, %r12, %rcx
incq %r12
movq %r12, 0x78(%rsp)
movl 0x54(%rsp), %r8d
movl %r8d, (%rax,%rcx)
movl 0xc(%rsp), %r8d
movl %r8d, 0x4(%rax,%rcx)
incl %r8d
movq %r10, 0x8(%rax,%rcx)
movq %rsi, 0x10(%rax,%rcx)
movl 0x8(%rsp), %esi
movl %esi, 0x18(%rax,%rcx)
movl 0x30(%rsp), %esi
movl %esi, 0x1c(%rax,%rcx)
movl 0x4(%rsp), %esi
movl %esi, 0x20(%rax,%rcx)
movl 0x58(%rsp), %esi
movl %esi, 0x24(%rax,%rcx)
movq %rax, 0x10(%rsp)
movl 0x5c(%rsp), %esi
movl %esi, 0x28(%rax,%rcx)
movq 0x170(%rsp), %rax
addq %r10, %rax
movq 0x60(%rsp), %rcx
movq 0x160(%rsp), %r12
movq 0x80(%rsp), %rsi
incq %rsi
movq %r13, 0xc0(%rsp)
movq %rcx, 0xb8(%rsp)
movq %r14, 0xb0(%rsp)
movq %rbx, 0xa8(%rsp)
movq %r15, 0xa0(%rsp)
movq %rbp, 0x88(%rsp)
movq %rax, 0xf0(%rsp)
movq 0x20(%rsp), %r15
jmp 0x4aea
movq %rbp, %rax
movl 0xc(%rsp), %esi
subq $0x1, %rax
jb 0x51ec
cmpl %esi, (%rdx,%rax,4)
jne 0x51ec
movq 0x68(%rsp), %rcx
movl (%rcx,%rax,4), %ecx
subq %rcx, %r9
movq %rax, %rbp
jmp 0x51d1
movl 0x8(%rsp), %ebx
andl $0x1, %ebx
movl 0x4(%rsp), %eax
addl 0x30(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x10(%rsp), %r14
jmp 0x5258
movq 0x10(%rsp), %r14
leaq (%r9,%r15), %rax
imulq $0x30, %r8, %rcx
movl 0x54(%rsp), %esi
movl %esi, (%r14,%rcx)
movl 0xc(%rsp), %esi
movl %esi, 0x4(%r14,%rcx)
incl %esi
movq %r15, 0x8(%r14,%rcx)
movq %rax, 0x10(%r14,%rcx)
movl 0x8(%rsp), %eax
movl %eax, 0x18(%r14,%rcx)
movl %r10d, 0x1c(%r14,%rcx)
movl %r12d, 0x20(%r14,%rcx)
movl 0x58(%rsp), %eax
movl %eax, 0x24(%r14,%rcx)
movl 0x5c(%rsp), %eax
movl %eax, 0x28(%r14,%rcx)
addq %r12, %r15
movq %r15, 0x1f0(%rsp)
movq %r9, 0x1f8(%rsp)
movl %esi, 0x200(%rsp)
andl $0x0, 0x204(%rsp)
movl %ebp, 0x208(%rsp)
movq %rdx, 0x210(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x218(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x220(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x228(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x230(%rsp)
movq %rdi, 0x238(%rsp)
movl (%rsp), %edx
incl %edx
leaq 0x1c9(%rsp), %rdi
movl %esi, %ebp
leaq 0x19d8f(%rip), %rsi     # 0x1f067
movl %edx, (%rsp)
xorl %eax, %eax
callq 0x24a0
movq %r14, 0x10(%rsp)
movq %r14, %rdi
movl %ebp, %esi
leaq 0x1e8(%rsp), %rdx
movq %r13, %rcx
leaq 0x1c0(%rsp), %r8
movq 0xf8(%rsp), %r9
callq 0x1092b
xorl %eax, %eax
movl 0x34(%rsp), %ebp
decl %ebp
setne %al
movq 0x168(%rsp), %r15
leaq (%r15,%rax,8), %r15
movl %ebp, 0x34(%rsp)
subl $0x1, %ebp
jb 0x5413
movq (%r15), %rax
cmpq %rax, 0x90(%rsp)
jbe 0x5413
subq -0x8(%r15), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jge 0x5ace
movl 0x54(%rsp), %ecx
movl %ecx, 0x298(%rsp)
leaq 0x29c(%rsp), %rdx
andl $0x0, 0x10(%rdx)
leaq (%rax,%r12), %r14
movl 0x4(%rsp), %ecx
subl %r14d, %ecx
addl 0x30(%rsp), %r12d
testl %ebx, %ebx
xorps %xmm0, %xmm0
movups %xmm0, (%rdx)
movl 0x8(%rsp), %edx
movl %edx, 0x2b0(%rsp)
cmovnel %ecx, %r12d
movl %r12d, 0x2b4(%rsp)
movl %eax, 0x2b8(%rsp)
movl 0x58(%rsp), %eax
movl %eax, 0x2bc(%rsp)
movl 0x5c(%rsp), %eax
movl %eax, 0x2c0(%rsp)
movl (%rsp), %edx
incl %edx
leaq 0x1c9(%rsp), %rdi
leaq 0x19c9d(%rip), %rsi     # 0x1f067
movl %edx, (%rsp)
xorl %eax, %eax
callq 0x24a0
leaq 0x298(%rsp), %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
movq %r13, %rcx
leaq 0x1c0(%rsp), %r8
movq 0xf8(%rsp), %r9
callq 0x1092b
xorl %eax, %eax
cmpl $0x1, 0x34(%rsp)
setne %al
leaq (%r15,%rax,8), %r15
movl %ebp, 0x34(%rsp)
movq %r14, %r12
jmp 0x5327
movq %r15, 0x168(%rsp)
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
addq %r12, %rax
movabsq $0x1fffffffd, %rcx      # imm = 0x1FFFFFFFD
cmpq %rcx, %rax
movq 0x48(%rsp), %rdi
movq 0x18(%rsp), %rdx
jae 0x5aed
movq 0x170(%rsp), %r15
subq %r12, %r15
pushq $0x2
popq %r14
jle 0x5472
testl %ebx, %ebx
movl $0x0, %eax
cmovnel %eax, %r12d
cmpq $0x0, 0x70(%rsp)
je 0x54f7
movq 0x10(%rsp), %rax
jmp 0x5513
movq 0x80(%rsp), %r8
leal 0x1(%r8), %ecx
movl 0x2c(%rsp), %r11d
movl %r11d, %eax
movq 0xc8(%rsp), %rsi
cmpl %esi, %r11d
cmovbel %esi, %r11d
movq %r8, %rsi
movq 0x160(%rsp), %r12
cmpq 0xc8(%rsp), %rax
jae 0x54b5
cmpl %ecx, (%r12,%rax,4)
ja 0x54cf
incq %rax
jmp 0x54a0
xorl %r13d, %r13d
xorl %ecx, %ecx
xorl %r14d, %r14d
xorl %ebx, %ebx
xorl %r15d, %r15d
xorl %ebp, %ebp
movq $0x0, 0x78(%rsp)
jmp 0x54ea
xorl %r13d, %r13d
xorl %ecx, %ecx
xorl %r14d, %r14d
xorl %ebx, %ebx
xorl %r15d, %r15d
xorl %ebp, %ebp
movq $0x0, 0x78(%rsp)
movl %eax, %r11d
xorl %r9d, %r9d
xorl %eax, %eax
xorl %r8d, %r8d
jmp 0x5185
movq 0x10(%rsp), %rdi
pushq $0x60
popq %rsi
callq 0x2390
movq 0x18(%rsp), %rdx
movq 0x48(%rsp), %rdi
movq %r14, 0x70(%rsp)
movl 0x54(%rsp), %ecx
movl %ecx, (%rax)
andl $0x0, 0x14(%rax)
addl 0x30(%rsp), %r12d
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rax)
movl 0x8(%rsp), %ecx
movl %ecx, 0x18(%rax)
movl %r12d, 0x1c(%rax)
movq %r15, %rsi
movl %esi, 0x20(%rax)
movl 0x58(%rsp), %ecx
movl %ecx, 0x24(%rax)
movq %rax, 0x10(%rsp)
movl 0x5c(%rsp), %ecx
movl %ecx, 0x28(%rax)
xorl %r13d, %r13d
xorl %r14d, %r14d
xorl %ebx, %ebx
xorl %r15d, %r15d
xorl %ebp, %ebp
pushq $0x1
popq %rax
movq %rax, 0x78(%rsp)
xorl %r9d, %r9d
pushq $0x1
popq %r8
movq %rsi, %rax
xorl %ecx, %ecx
movq 0x160(%rsp), %r12
movq 0x80(%rsp), %rsi
movl 0x2c(%rsp), %r11d
jmp 0x5185
testl %r8d, %r8d
je 0x5a26
movq 0x1b0(%rsp), %rax
leaq (%rax,%r10,4), %rax
movq %rax, 0x48(%rsp)
movq 0x1a8(%rsp), %rax
leaq (%rax,%r10,4), %rax
movq %rax, 0x90(%rsp)
movq 0x1a0(%rsp), %rax
leaq (%rax,%r10,4), %rax
movq %rax, 0xd0(%rsp)
movq 0x198(%rsp), %rax
leaq (%rax,%r10,4), %rax
movq %rax, 0x150(%rsp)
movq 0x190(%rsp), %rax
leaq (%rax,%r10,4), %rax
movq %rax, 0x148(%rsp)
movq 0xc0(%rsp), %rax
leaq (%rax,%rax), %rcx
movq %rcx, 0x60(%rsp)
leaq (,%rax,4), %rax
movq %rax, 0x140(%rsp)
movq 0xb8(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0x138(%rsp)
movq 0xb0(%rsp), %rax
leaq (%rax,%rax), %rcx
movq %rcx, 0x18(%rsp)
leaq (,%rax,4), %rax
movq %rax, 0x80(%rsp)
movq 0xa8(%rsp), %rax
leaq (%rax,%rax), %rcx
movq %rcx, 0x98(%rsp)
leaq (,%rax,4), %rax
movq %rax, 0x188(%rsp)
movq 0xa0(%rsp), %rax
leaq (%rax,%rax), %r13
leaq (,%rax,4), %rax
movq %rax, 0x180(%rsp)
movq 0x88(%rsp), %rax
leaq (%rax,%rax), %rbx
leaq (,%rax,4), %rax
movq %rax, 0x178(%rsp)
xorl %r15d, %r15d
leaq (%r10,%r15), %rax
cmpq 0xc8(%rsp), %rax
jae 0x594d
movq 0x88(%rsp), %rax
addq %r15, %rax
cmpq 0x110(%rsp), %rax
jne 0x5702
movq %r9, %r14
movq %rdi, %rbp
testq %rax, %rax
movq %rbx, %rcx
pushq $0x2
popq %rax
cmoveq %rax, %rcx
movq %rcx, 0x110(%rsp)
leaq (,%rcx,4), %rsi
movq %rdx, %rdi
callq 0x2390
movq %rax, %rdx
jmp 0x5708
movq %r9, %r14
movq %rdi, %rbp
movq 0xa0(%rsp), %rax
addq %r15, %rax
movq 0x178(%rsp), %rcx
addq %rdx, %rcx
movl 0xc(%rsp), %esi
movl %esi, (%rcx,%r15,4)
cmpq 0x118(%rsp), %rax
movq 0x68(%rsp), %rdi
movq %rdx, %r12
jne 0x575d
testq %rax, %rax
movq %r13, %rcx
pushq $0x2
popq %rax
cmoveq %rax, %rcx
movq %rcx, 0x118(%rsp)
leaq (,%rcx,4), %rsi
callq 0x2390
movq %rax, %rdi
movq 0xa8(%rsp), %rax
addq %r15, %rax
movq 0x48(%rsp), %rcx
movl (%rcx,%r15,4), %ecx
movq %rdi, 0x68(%rsp)
movq 0x180(%rsp), %rdx
addq %rdi, %rdx
movl %ecx, (%rdx,%r15,4)
cmpq 0x120(%rsp), %rax
jne 0x57c2
testq %rax, %rax
movq 0x98(%rsp), %rcx
pushq $0x2
popq %rax
cmoveq %rax, %rcx
movq %rcx, 0x120(%rsp)
leaq (,%rcx,4), %rsi
movq 0x20(%rsp), %rdi
callq 0x2390
movq 0x38(%rsp), %rdi
jmp 0x57cc
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0xb0(%rsp), %rcx
leaq (%rcx,%r15), %rsi
movq 0x90(%rsp), %rcx
movl (%rcx,%r15,4), %ecx
movq %rax, 0x20(%rsp)
movq 0x188(%rsp), %rdx
addq %rax, %rdx
movl %ecx, (%rdx,%r15,4)
cmpq 0x128(%rsp), %rsi
jne 0x5829
testq %rsi, %rsi
movq 0x18(%rsp), %rcx
pushq $0x2
popq %rax
cmoveq %rax, %rcx
movq %rcx, 0x128(%rsp)
leaq (,%rcx,4), %rsi
callq 0x2390
movq %rax, %rdi
movq 0xc0(%rsp), %rax
addq %r15, %rax
movq 0xd0(%rsp), %rcx
movl (%rcx,%r15,4), %ecx
movq %rdi, 0x38(%rsp)
movq 0x80(%rsp), %rdx
addq %rdi, %rdx
movl %ecx, (%rdx,%r15,4)
cmpq 0x130(%rsp), %rax
jne 0x588c
testq %rax, %rax
movq 0x60(%rsp), %rcx
pushq $0x2
popq %rax
cmoveq %rax, %rcx
movq %rcx, 0x130(%rsp)
leaq (,%rcx,4), %rsi
movq 0x40(%rsp), %rdi
callq 0x2390
movq %rbp, %rdi
jmp 0x5894
movq %rbp, %rdi
movq 0x40(%rsp), %rax
movq 0xb8(%rsp), %rcx
leaq (%rcx,%r15), %rsi
movq 0x150(%rsp), %rcx
movl (%rcx,%r15,4), %ecx
movq %rax, 0x40(%rsp)
movq 0x140(%rsp), %rdx
addq %rax, %rdx
movl %ecx, (%rdx,%r15,4)
movq 0x108(%rsp), %rax
cmpq %rax, %rsi
jne 0x58f3
leaq (%rax,%rax), %rbp
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %rbp
leaq (,%rbp,4), %rsi
callq 0x2390
movq %rax, %rdi
movq %rbp, 0x108(%rsp)
movq %r12, %rdx
movq %r14, %r9
movq 0x100(%rsp), %r10
movq 0x148(%rsp), %rax
movl (%rax,%r15,4), %eax
movq 0x138(%rsp), %rcx
addq %rdi, %rcx
movl %eax, (%rcx,%r15,4)
movq 0x48(%rsp), %rax
movl (%rax,%r15,4), %eax
addq %rax, %r9
incq %r15
addq $0x2, 0x60(%rsp)
addq $0x2, 0x18(%rsp)
addq $0x2, 0x98(%rsp)
addq $0x2, %r13
addq $0x2, %rbx
jmp 0x56ab
movq 0xf0(%rsp), %rax
movq %rax, 0x1f0(%rsp)
movq %r9, 0x1f8(%rsp)
movl 0xc(%rsp), %ebx
movl %ebx, 0x200(%rsp)
andl $0x0, 0x204(%rsp)
movq 0x88(%rsp), %rax
addl %r15d, %eax
movl %eax, 0x208(%rsp)
movq %rdx, %r13
movq %rdx, 0x210(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x218(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x220(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x228(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x230(%rsp)
movq %rdi, %r15
movq %rdi, 0x238(%rsp)
movl (%rsp), %edx
incl %edx
leaq 0x1c9(%rsp), %rdi
leaq 0x1967f(%rip), %rsi     # 0x1f067
movl %edx, (%rsp)
xorl %eax, %eax
callq 0x24a0
movq 0x10(%rsp), %rdi
movl %ebx, %esi
leaq 0x1e8(%rsp), %rdx
movq 0x158(%rsp), %r14
movq %r14, %rcx
leaq 0x1c0(%rsp), %r8
movq 0xf8(%rsp), %rbx
movq %rbx, %r9
callq 0x1092b
jmp 0x5a3c
movq %rdx, %r13
movq %rdi, %r15
movq 0xf8(%rsp), %rbx
movq 0x158(%rsp), %r14
movq 0xe0(%rsp), %rcx
leaq 0x18(%rcx), %rax
decl 0xdc(%rsp)
cmovneq %rax, %rcx
movq %rcx, 0xe0(%rsp)
movq 0x240(%rsp), %r12
incq %r12
movq %r15, %rdi
movq 0x20(%rsp), %r15
movq %r13, %rdx
jmp 0x494c
movq %rdi, %rbx
movq 0x10(%rsp), %rdi
movq %rdx, %r14
callq 0x2060
movq %r14, %rdi
callq 0x2060
movq 0x68(%rsp), %rdi
callq 0x2060
movq %r15, %rdi
callq 0x2060
movq 0x38(%rsp), %rdi
callq 0x2060
movq 0x40(%rsp), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2060
addq $0x2c8, %rsp            # imm = 0x2C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x187b2(%rip), %rdi     # 0x1e287
leaq 0x187ba(%rip), %rsi     # 0x1e296
leaq 0x187bb(%rip), %rcx     # 0x1e29e
movl $0x299, %edx            # imm = 0x299
callq 0x21c0
leaq 0x187e7(%rip), %rdi     # 0x1e2db
leaq 0x1879b(%rip), %rsi     # 0x1e296
leaq 0x1879c(%rip), %rcx     # 0x1e29e
movl $0x2a3, %edx            # imm = 0x2A3
callq 0x21c0
leaq 0x18761(%rip), %rdi     # 0x1e274
leaq 0x1877c(%rip), %rsi     # 0x1e296
leaq 0x1877d(%rip), %rcx     # 0x1e29e
movl $0x271, %edx            # imm = 0x271
callq 0x21c0
nop