// File: /workspace/github_c_makefile_star2_O0/c-zhou[P]oatk/path.c
// Function: slim_graph
static void slim_graph(asg_t *asg, og_component_v *sequence_og, og_component_t *component_g, clust_dp_t *comp_dps, OG_TYPE_t og_target, 
        OG_TYPE_t *og_seeds, double c_mean, int max_r_len, og_component_v *components, int verbose)
{
    uint32_t i, j, k, l, v, w, r, nv, na, len, gen, cov, gid, n_vtx, imax, smax, *comp_v;
    uint8_t *dels, *visited;
    double score[4];
    asmg_t *asmg;
    asmg_arc_t *av;
    og_component_t *component_s, *component;

    asmg = asg_make_asmg_copy(component_g->asmg, 0);
    n_vtx = asmg->n_vtx;
    comp_v = component_g->v;
    nv = component_g->nv;

    // do graph slimming
    if (verbose > 1) {
        fprintf(stderr, "[M::%s] subgraph slimming for organelle [%s] with average sequence coverage %.3f\n", 
                __func__, OG_TYPES[og_target], c_mean);
        if (verbose > 2) {
            asmg_t *g = asg->asmg;
            asg->asmg = asmg;
            asg_print(asg, stderr, 1);
            asg->asmg = g;
        }
    }

    // find sequences to remove
    MYCALLOC(dels, n_vtx);
    for (i = 0; i < nv; ++i)
        if (og_seeds[i] != og_target)
            dels[comp_v[i]] = 1;

    // bring back the sequence if in a critical path
    // TODO improve the recalling strategy
    // currently bring repeat sequences back if attached to any non-deleted
    /***
    while (1) {
        int recall = 0;
        for (i = 0; i < nv; ++i) {
            v = comp_v[i];
            if (!dels[v] || asmg->vtx[v].len > max_r_len)
                continue; // not a repeat
            // check incoming and outgoing arcs to see if any non-deleted
            int done = 0;
            for (j = 0; j < 2 && !done; ++j) {
                av = asmg_arc_a(asmg, v<<1 | j);
                na = asmg_arc_n(asmg, v<<1 | j);
                for (k = 0; k < na; ++k) {
                    if (!av[k].del && !dels[av[k].w>>1]) {
                        dels[v] = 0;
                        ++recall;
                        done = 1;
                        break;
                    }
                }
            }
        }
        if (!recall) break;
    }
    **/
    
    // here is an improved strategy
    // bring a repeat sequence back if both ends connect to a sequence
    // through a path of all repeats
    // and the distance is no greater than max_r_len
    // repeat this process until no sequence is added
    int recall, max_r, *dist, *flag;
    kdq_u64_t *q;

    MYMALLOC(dist, n_vtx << 1);
    MYMALLOC(flag, n_vtx << 1);
    q = kdq_init(uint64_t, 0);
    while (1) {
        MYBZERO(dist, n_vtx << 1);
        for (i = 0; i < nv; ++i) {
            if (dels[comp_v[i]])
                // skip dels
                continue;
            // the maximum distance to radiate
            max_r = asmg->vtx[comp_v[i]].len;
            if (max_r > max_r_len)
                max_r = max_r_len;
            for (k = 0; k < 2; ++k) {
                uint64_t source = comp_v[i] << 1 | k;
                // find all reachable repeats from 'source'
                MYBZERO(flag, n_vtx << 1);
                kdq_push(uint64_t, q, source << 32 | 0);
                while (kdq_size(q) > 0) {
                    uint64_t x = *kdq_shift(uint64_t, q);
                    v = x >> 32;
                    r = (uint32_t) x;
                    flag[v] = 1;
                    dist[v] = source << 1 | 1;
                    av = asmg_arc_a(asmg, v);
                    na = asmg_arc_n(asmg, v);
                    for (j = 0; j < na; ++j) {
                        if (av[j].del)
                            continue;
                        w = av[j].w;
                        if (!flag[w] &&
                                r <= av[j].ls + max_r &&
                                asmg->vtx[w>>1].len <= max_r)
                            // add non-visited repeats
                            kdq_push(uint64_t, q, (uint64_t) w << 32 | (r + asmg->vtx[w>>1].len - av[j].ls));
                    }
                }
            }
        }

        recall = 0;
        for (i = 0; i < nv; ++i) {
            v = comp_v[i];
            if (dels[v] &&
                    asmg->vtx[v].len <= max_r_len &&
                    dist[v<<1] &&
                    dist[v<<1 | 1]) {
                dels[v] = 0;
                ++recall;
                if (verbose > 2)
                    fprintf(stderr, "[M::%s] recall repeat %s: %s%c <-> %s%c\n", __func__,
                            asg->seg[v].name,
                            asg->seg[dist[v<<1]>>2].name, "+-"[(dist[v<<1]>>1)&1],
                            asg->seg[dist[v<<1|1]>>2].name, "+-"[(dist[v<<1|1]>>1)&1]);
            }
        }
        if (!recall) break;
    }
    free(dist);
    free(flag);
    kdq_destroy(uint64_t, q);

    for (i = 0; i < nv; ++i) {
        v = comp_v[i];
        if (dels[v])
            asmg_vtx_del(asmg, v, 1);
    }

    if (verbose > 2) {
        asmg_t *g = asg->asmg;
        asg->asmg = asmg;
        asg_print(asg, stderr, 1);
        asg->asmg = g;
    }

    uint64_t cleaned = 1;
    while (cleaned) {
        // simple clean
        cleaned = 0;
        cleaned += asmg_pop_bubble(asmg, max_r_len, 0, 0, 1, 0, verbose);
        cleaned += asmg_remove_weak_crosslink(asmg, 0.3, 10, 0, verbose);
        cleaned += asmg_drop_tip(asmg, INT32_MAX, max_r_len, 1, 0, verbose);
    }
    // add cleaned vtx to dels for integrity
    for (i = 0; i < nv; ++i) {
        v = comp_v[i];
        if (asmg->vtx[v].del)
            dels[v] = 1;
    }

    if (verbose > 2) {
        asmg_t *g = asg->asmg;
        asg->asmg = asmg;
        asg_print(asg, stderr, 1);
        asg->asmg = g;
    }

    // minimum subgraph size to keep
    // set as 10% of the total sequence
    double m_size = 0;
    for (i = 0; i < nv; ++i) {
        v = comp_v[i];
        if (!asmg->vtx[v].del)
            m_size += asmg->vtx[v].len;
    }
    m_size *= 0.1;

    // now process each subgraph
    MYCALLOC(visited, n_vtx);
    for (i = 0; i < nv; ++i) {
        v = comp_v[i];
        if (visited[v] || asmg->vtx[v].del)
            continue;
        
        asmg_t *g = asg_make_asmg_copy(asmg, 0);
        asmg_subgraph(g, &v, 1, 0, 0, 0, 1);

        kvec_t(uint32_t) comp_s;
        kv_init(comp_s);
        len = gen = 0;
        for (j = 0; j < nv; ++j) {
            w = comp_v[j];
            if (g->vtx[w].del)
                continue;
            kv_push(uint32_t, comp_s, w);
            len += g->vtx[w].len;
            gen += comp_dps[j].gene_num[og_target];
            visited[w] = 1;
        }
        if (len < m_size || gen == 0) {
            // not a good subgraph
            asmg_destroy(g);
            kv_destroy(comp_s);
            continue;
        }
        
        // add subgraph component
        // adjust repeat sequence coverage if necessary
        // also fix the arc coverage
        for (j = 0; j < nv; ++j) {
            w = comp_v[j];
            if (g->vtx[w].del ||
                    og_seeds[j] == og_target ||
                    g->vtx[w].len >= max_r_len ||
                    g->vtx[w].cov < c_mean * 3.5)
                continue;
            int n_del, n_arc;
            n_del = n_arc = 0;
            for (k = 0; k < 2; ++k) {
                av = asmg_arc_a(asmg, w << 1 | k);
                na = asmg_arc_n(asmg, w << 1 | k);
                for (l = 0; l < na; ++l) {
                    if (dels[av[l].w>>1])
                        ++n_del;
                    if (!av[l].del)
                        ++n_arc;
                }
            }
            if (!n_del) continue;
            cov = g->vtx[w].cov;
            g->vtx[w].cov = c_mean * n_arc / 2.0;
            // fix arc coverage
            for (k = 0; k < 2; ++k) {
                av = asmg_arc_a(asmg, w << 1 | k);
                na = asmg_arc_n(asmg, w << 1 | k);
                for (l = 0; l < na; ++l) {
                    if (av[l].del) continue;
                    if (av[l].cov > cov)
                        av[l].cov = cov;
                }
            }
            if (verbose > 2)
                fprintf(stderr, "[M::%s] sequence %s coverage adjusted: %u -> %u\n", 
                        __func__, asg->seg[w].name, cov, g->vtx[w].cov);
        }

        // make seg list
        MYREALLOC(comp_s.a, comp_s.n);

        // make gene list
        kvec_t(uint64_t) comp_g;
        kv_init(comp_g);
        // collect genes from sequences in the subgraph
        for (j = 0; j < nv; ++j) {
            w = comp_v[j];
            if (g->vtx[w].del)
                continue;
            component_s = &sequence_og->a[w];
            kv_pushn(uint64_t, comp_g, component_s->g, component_s->ng);
        }
        // sort by gid and then score - descending order
        qsort(comp_g.a, comp_g.n, sizeof(uint64_t), u64_cmpfunc_r);
        // keep only the best hit for each gene
        k = 0;
        gid = UINT32_MAX;
        for (j = 0; j < comp_g.n; ++j) {
            if (comp_g.a[j] >> 32 != gid) {
                comp_g.a[k++] = comp_g.a[j];
                gid = comp_g.a[j] >> 32;
            }
        }
        comp_g.n = k;
        MYREALLOC(comp_g.a, k);

        // calculate subgraph annotation scores
        uint64_t *a_s = comp_g.a;
        MYBZERO(score, 4);
        for (j = 0, k = comp_g.n; j < k; ++j)
            score[(a_s[j] >> 32) & 0x3] += (uint32_t) a_s[j];
        imax = max2(score, 4, &smax);

        // update component vector
        kv_pushp(og_component_t, *components, &component);
        component->type = (uint32_t) og_target;
        component->score = score[imax];
        component->sscore = score[smax];
        component->len = len;
        component->nv = comp_s.n;
        component->v = comp_s.a;
        component->ng = comp_g.n;
        component->g = comp_g.a;
        component->asmg = g;

        if (verbose > 0)
            fprintf(stderr, "[M::%s] subgraph seeding from %s: segs, %lu; size, %d; mito score, %.3f; pltd score, %.3f; mini score, %.3f; classification, %d\n",
                    __func__, asg->seg[v].name, comp_s.n, len, score[OG_MITO], score[OG_PLTD], score[OG_MINI], og_target);

    }

    free(dels);
    free(visited);
    asmg_destroy(asmg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movl 0x20(%rbp), %eax
movq 0x18(%rbp), %rax
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
movsd %xmm0, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xb610
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movq (%rax), %rax
movl %eax, -0x70(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x58(%rbp)
cmpl $0x1, 0x20(%rbp)
jle 0x120d8
movq 0x17f9a(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
movl -0x24(%rbp), %eax
movl %eax, %ecx
leaq 0x17b03(%rip), %rax     # 0x29b70
movq (%rax,%rcx,8), %rcx
movsd -0x38(%rbp), %xmm0
leaq 0x124f5(%rip), %rsi     # 0x24572
leaq 0x12540(%rip), %rdx     # 0x245c4
movb $0x1, %al
callq 0x2290
cmpl $0x2, 0x20(%rbp)
jle 0x120d6
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0xd8(%rbp)
movq -0xb8(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rdi
movq 0x17f3e(%rip), %rax     # 0x29ff8
movq (%rax), %rsi
movl $0x1, %edx
callq 0xbc60
movq -0xd8(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
jmp 0x120d8
movl -0x70(%rbp), %eax
movl %eax, %edi
movl $0x1, %esi
callq 0x2240
movq %rax, -0x88(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jae 0x1212e
movq -0x30(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
cmpl -0x24(%rbp), %eax
je 0x12121
movq -0x88(%rbp), %rax
movq -0x80(%rbp), %rcx
movl -0x3c(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
movb $0x1, (%rax,%rcx)
jmp 0x12123
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x120f5
movl -0x70(%rbp), %eax
shll %eax
movl %eax, %eax
movl %eax, %edi
shlq $0x2, %rdi
callq 0x22f0
movq %rax, -0xe8(%rbp)
movl -0x70(%rbp), %eax
shll %eax
movl %eax, %eax
movl %eax, %edi
shlq $0x2, %rdi
callq 0x22f0
movq %rax, -0xf0(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x177b0
movq %rax, -0xf8(%rbp)
movq -0xe8(%rbp), %rdi
movl -0x70(%rbp), %eax
shll %eax
movl %eax, %eax
movl %eax, %edx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x21c0
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jae 0x12433
movq -0x88(%rbp), %rax
movq -0x80(%rbp), %rcx
movl -0x3c(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
cmpb $0x0, (%rax,%rcx)
je 0x121ba
jmp 0x12425
movq -0xb8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x80(%rbp), %rcx
movl -0x3c(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movl %eax, -0xe0(%rbp)
movl -0xe0(%rbp), %eax
cmpl 0x10(%rbp), %eax
jle 0x121f4
movl 0x10(%rbp), %eax
movl %eax, -0xe0(%rbp)
movl $0x0, -0x44(%rbp)
cmpl $0x2, -0x44(%rbp)
jae 0x12423
movq -0x80(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
shll %eax
orl -0x44(%rbp), %eax
movl %eax, %eax
movq %rax, -0x100(%rbp)
movq -0xf0(%rbp), %rdi
movl -0x70(%rbp), %eax
shll %eax
movl %eax, %eax
movl %eax, %edx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x21c0
movq -0xf8(%rbp), %rdi
movq -0x100(%rbp), %rsi
shlq $0x20, %rsi
orq $0x0, %rsi
callq 0x177d0
movq -0xf8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jbe 0x12413
movq -0xf8(%rbp), %rdi
callq 0x17870
movq (%rax), %rax
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rax
shrq $0x20, %rax
movl %eax, -0x4c(%rbp)
movq -0x108(%rbp), %rax
movl %eax, -0x54(%rbp)
movq -0xf0(%rbp), %rax
movl -0x4c(%rbp), %ecx
movl $0x1, (%rax,%rcx,4)
movq -0x100(%rbp), %rax
shlq %rax
orq $0x1, %rax
movl %eax, %edx
movq -0xe8(%rbp), %rax
movl -0x4c(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movq -0xb8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0xb8(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x4c(%rbp), %edx
imulq $0x30, (%rcx,%rdx,8), %rcx
addq %rcx, %rax
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x4c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x5c(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x5c(%rbp), %eax
jae 0x1240e
movq -0xc0(%rbp), %rax
movl -0x40(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x12335
jmp 0x12400
movq -0xc0(%rbp), %rax
movl -0x40(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movl %eax, -0x50(%rbp)
movq -0xf0(%rbp), %rax
movl -0x50(%rbp), %ecx
cmpl $0x0, (%rax,%rcx,4)
jne 0x123fe
movl -0x54(%rbp), %eax
movq -0xc0(%rbp), %rcx
movl -0x40(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
movq 0x18(%rcx), %rcx
movslq -0xe0(%rbp), %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
ja 0x123fe
movq -0xb8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movslq -0xe0(%rbp), %rcx
cmpq %rcx, %rax
ja 0x123fe
movq -0xf8(%rbp), %rdi
movl -0x50(%rbp), %eax
movl %eax, %esi
shlq $0x20, %rsi
movl -0x54(%rbp), %eax
movq -0xb8(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x50(%rbp), %edx
shrl %edx
movl %edx, %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
addq 0x18(%rcx), %rax
movq -0xc0(%rbp), %rcx
movl -0x40(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
subq 0x18(%rcx), %rax
orq %rax, %rsi
callq 0x177d0
jmp 0x12400
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x12305
jmp 0x12253
jmp 0x12415
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x121fb
jmp 0x12425
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x12192
movl $0x0, -0xdc(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jae 0x125e3
movq -0x80(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x4c(%rbp)
movq -0x88(%rbp), %rax
movl -0x4c(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x125d3
movq -0xb8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movslq 0x10(%rbp), %rcx
cmpq %rcx, %rax
ja 0x125d3
movq -0xe8(%rbp), %rax
movl -0x4c(%rbp), %ecx
shll %ecx
movl %ecx, %ecx
cmpl $0x0, (%rax,%rcx,4)
je 0x125d3
movq -0xe8(%rbp), %rax
movl -0x4c(%rbp), %ecx
shll %ecx
orl $0x1, %ecx
movl %ecx, %ecx
cmpl $0x0, (%rax,%rcx,4)
je 0x125d3
movq -0x88(%rbp), %rax
movl -0x4c(%rbp), %ecx
movb $0x0, (%rax,%rcx)
movl -0xdc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xdc(%rbp)
cmpl $0x2, 0x20(%rbp)
jle 0x125d1
movq 0x17afd(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xe8(%rbp), %rdx
movl -0x4c(%rbp), %esi
shll %esi
movl %esi, %esi
movl (%rdx,%rsi,4), %edx
sarl $0x2, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq (%rax), %r8
movq -0xe8(%rbp), %rax
movl -0x4c(%rbp), %edx
shll %edx
movl %edx, %edx
movl (%rax,%rdx,4), %eax
sarl %eax
andl $0x1, %eax
movslq %eax, %rdx
leaq 0x11220(%rip), %rax     # 0x2377c
movsbl (%rax,%rdx), %r9d
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xe8(%rbp), %rdx
movl -0x4c(%rbp), %esi
shll %esi
orl $0x1, %esi
movl %esi, %esi
movl (%rdx,%rsi,4), %edx
sarl $0x2, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq (%rax), %r10
movq -0xe8(%rbp), %rax
movl -0x4c(%rbp), %edx
shll %edx
orl $0x1, %edx
movl %edx, %edx
movl (%rax,%rdx,4), %eax
sarl %eax
andl $0x1, %eax
movslq %eax, %rdx
leaq 0x111cc(%rip), %rax     # 0x2377c
movsbl (%rax,%rdx), %eax
leaq 0x12014(%rip), %rsi     # 0x245cf
leaq 0x12002(%rip), %rdx     # 0x245c4
movq %r10, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x2290
jmp 0x125d3
jmp 0x125d5
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x12444
cmpl $0x0, -0xdc(%rbp)
jne 0x125ee
jmp 0x125f3
jmp 0x12170
movq -0xe8(%rbp), %rdi
callq 0x2060
movq -0xf0(%rbp), %rdi
callq 0x2060
movq -0xf8(%rbp), %rdi
callq 0x17950
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jae 0x12666
movq -0x80(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x4c(%rbp)
movq -0x88(%rbp), %rax
movl -0x4c(%rbp), %ecx
cmpb $0x0, (%rax,%rcx)
je 0x12659
movq -0xb8(%rbp), %rdi
movl -0x4c(%rbp), %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x6640
jmp 0x1265b
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x1261e
cmpl $0x2, 0x20(%rbp)
jle 0x126b1
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x110(%rbp)
movq -0xb8(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rdi
movq 0x17963(%rip), %rax     # 0x29ff8
movq (%rax), %rsi
movl $0x1, %edx
callq 0xbc60
movq -0x110(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq $0x1, -0x118(%rbp)
cmpq $0x0, -0x118(%rbp)
je 0x1276c
movq $0x0, -0x118(%rbp)
movq -0xb8(%rbp), %rdi
movslq 0x10(%rbp), %rsi
movl 0x20(%rbp), %eax
xorl %ecx, %ecx
movl %ecx, %edx
xorl %r9d, %r9d
movl $0x1, %r8d
movl %r9d, %ecx
movl %eax, (%rsp)
callq 0x1a130
addq -0x118(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0xb8(%rbp), %rdi
movl 0x20(%rbp), %edx
movsd 0x10d6d(%rip), %xmm0    # 0x23488
movsd 0x10e35(%rip), %xmm1    # 0x23558
xorl %esi, %esi
callq 0x19c80
addq -0x118(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0xb8(%rbp), %rdi
movslq 0x10(%rbp), %rdx
movl 0x20(%rbp), %r9d
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x19500
addq -0x118(%rbp), %rax
movq %rax, -0x118(%rbp)
jmp 0x126bc
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jae 0x127c6
movq -0x80(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x4c(%rbp)
movq -0xb8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x127b9
movq -0x88(%rbp), %rax
movl -0x4c(%rbp), %ecx
movb $0x1, (%rax,%rcx)
jmp 0x127bb
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x12773
cmpl $0x2, 0x20(%rbp)
jle 0x12811
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x120(%rbp)
movq -0xb8(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rdi
movq 0x17803(%rip), %rax     # 0x29ff8
movq (%rax), %rsi
movl $0x1, %edx
callq 0xbc60
movq -0x120(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, -0x128(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jae 0x128b9
movq -0x80(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x4c(%rbp)
movq -0xb8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x128a9
movq -0xb8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x4c(%rbp), %ecx
leaq (%rcx,%rcx,4), %rcx
movq 0x18(%rax,%rcx,8), %xmm0
movaps 0x10cf2(%rip), %xmm1    # 0x23570
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x10cf6(%rip), %xmm1    # 0x23580
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
addsd -0x128(%rbp), %xmm0
movsd %xmm0, -0x128(%rbp)
jmp 0x128ab
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x12823
movsd 0x10c87(%rip), %xmm0    # 0x23548
mulsd -0x128(%rbp), %xmm0
movsd %xmm0, -0x128(%rbp)
movl -0x70(%rbp), %eax
movl %eax, %edi
movl $0x1, %esi
callq 0x2240
movq %rax, -0x90(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jae 0x133d0
movq -0x80(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x4c(%rbp)
movq -0x90(%rbp), %rax
movl -0x4c(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x1293d
movq -0xb8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x12942
jmp 0x133c2
movq -0xb8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xb610
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rdi
leaq -0x4c(%rbp), %rsi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
movl $0x1, (%rsp)
callq 0x1bb00
movq $0x0, -0x140(%rbp)
movq $0x0, -0x148(%rbp)
movq $0x0, -0x138(%rbp)
movl $0x0, -0x64(%rbp)
movl $0x0, -0x60(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x58(%rbp), %eax
jae 0x12ada
movq -0x80(%rbp), %rax
movl -0x40(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x50(%rbp)
movq -0x130(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x129f6
jmp 0x12acc
jmp 0x129f8
movq -0x148(%rbp), %rax
cmpq -0x140(%rbp), %rax
jne 0x12a5f
cmpq $0x0, -0x140(%rbp)
je 0x12a25
movq -0x140(%rbp), %rax
shlq %rax
movq %rax, -0x178(%rbp)
jmp 0x12a33
movl $0x2, %eax
movq %rax, -0x178(%rbp)
jmp 0x12a33
movq -0x178(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x138(%rbp), %rdi
movq -0x140(%rbp), %rsi
shlq $0x2, %rsi
callq 0x2330
movq %rax, -0x138(%rbp)
movl -0x50(%rbp), %edx
movq -0x138(%rbp), %rax
movq -0x148(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x148(%rbp)
movl %edx, (%rax,%rcx,4)
movq -0x130(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rcx
movl -0x60(%rbp), %eax
addq %rcx, %rax
movl %eax, -0x60(%rbp)
movq -0x20(%rbp), %rax
movl -0x40(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl -0x24(%rbp), %ecx
movl 0x18(%rax,%rcx,4), %eax
addl -0x64(%rbp), %eax
movl %eax, -0x64(%rbp)
movq -0x90(%rbp), %rax
movl -0x50(%rbp), %ecx
movb $0x1, (%rax,%rcx)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x129b5
movl -0x60(%rbp), %eax
cvtsi2sd %rax, %xmm1
movsd -0x128(%rbp), %xmm0
ucomisd %xmm1, %xmm0
ja 0x12af6
cmpl $0x0, -0x64(%rbp)
jne 0x12b13
movq -0x130(%rbp), %rdi
callq 0x17d40
movq -0x138(%rbp), %rdi
callq 0x2060
jmp 0x133c2
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x58(%rbp), %eax
jae 0x12e94
movq -0x80(%rbp), %rax
movl -0x40(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x50(%rbp)
movq -0x130(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x12bbb
movq -0x30(%rbp), %rax
movl -0x40(%rbp), %ecx
movl (%rax,%rcx,4), %eax
cmpl -0x24(%rbp), %eax
je 0x12bbb
movq -0x130(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movslq 0x10(%rbp), %rcx
cmpq %rcx, %rax
jae 0x12bbb
movq -0x130(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
cvtsi2sd %eax, %xmm1
movsd 0x109a0(%rip), %xmm0    # 0x23550
mulsd -0x38(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x12bc0
jmp 0x12e86
movl $0x0, -0x150(%rbp)
movl $0x0, -0x14c(%rbp)
movl $0x0, -0x44(%rbp)
cmpl $0x2, -0x44(%rbp)
jae 0x12cbe
movq -0xb8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0xb8(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x50(%rbp), %edx
shll %edx
orl -0x44(%rbp), %edx
movl %edx, %edx
imulq $0x30, (%rcx,%rdx,8), %rcx
addq %rcx, %rax
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x50(%rbp), %ecx
shll %ecx
orl -0x44(%rbp), %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x5c(%rbp)
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x5c(%rbp), %eax
jae 0x12cae
movq -0x88(%rbp), %rax
movq -0xc0(%rbp), %rcx
movl -0x48(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
shrq %rcx
cmpb $0x0, (%rax,%rcx)
je 0x12c73
movl -0x14c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14c(%rbp)
movq -0xc0(%rbp), %rax
movl -0x48(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x12ca1
movl -0x150(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x150(%rbp)
jmp 0x12ca3
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x12c37
jmp 0x12cb0
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x12bdb
cmpl $0x0, -0x14c(%rbp)
jne 0x12ccc
jmp 0x12e86
movq -0x130(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %ecx
leaq (%rcx,%rcx,4), %rcx
movl 0x20(%rax,%rcx,8), %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl %eax, -0x68(%rbp)
movsd -0x38(%rbp), %xmm0
cvtsi2sdl -0x150(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd 0x107b5(%rip), %xmm1    # 0x234b8
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, %edx
movq -0x130(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %ecx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
andl $0xc0000000, %ecx       # imm = 0xC0000000
orl %edx, %ecx
movl %ecx, 0x20(%rax)
movl $0x0, -0x44(%rbp)
cmpl $0x2, -0x44(%rbp)
jae 0x12e26
movq -0xb8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0xb8(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x50(%rbp), %edx
shll %edx
orl -0x44(%rbp), %edx
movl %edx, %edx
imulq $0x30, (%rcx,%rdx,8), %rcx
addq %rcx, %rax
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x50(%rbp), %ecx
shll %ecx
orl -0x44(%rbp), %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x5c(%rbp)
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x5c(%rbp), %eax
jae 0x12e16
movq -0xc0(%rbp), %rax
movl -0x48(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x12dc3
jmp 0x12e0b
movq -0xc0(%rbp), %rax
movl -0x48(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
cmpl -0x68(%rbp), %eax
jbe 0x12e09
movl -0x68(%rbp), %edx
movq -0xc0(%rbp), %rax
movl -0x48(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %ecx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
andl $0xc0000000, %ecx       # imm = 0xC0000000
orl %edx, %ecx
movl %ecx, 0x20(%rax)
jmp 0x12e0b
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x12d9a
jmp 0x12e18
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x12d3e
cmpl $0x2, 0x20(%rbp)
jle 0x12e84
movq 0x171c5(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movl -0x68(%rbp), %r8d
movq -0x130(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl 0x20(%rax), %r9d
andl $0x3fffffff, %r9d       # imm = 0x3FFFFFFF
leaq 0x11782(%rip), %rsi     # 0x245f8
leaq 0x11747(%rip), %rdx     # 0x245c4
movb $0x0, %al
callq 0x2290
jmp 0x12e86
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x12b1a
movq -0x138(%rbp), %rdi
movq -0x148(%rbp), %rsi
shlq $0x2, %rsi
callq 0x2330
movq %rax, -0x138(%rbp)
movq $0x0, -0x160(%rbp)
movq $0x0, -0x168(%rbp)
movq $0x0, -0x158(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x58(%rbp), %eax
jae 0x130c1
movq -0x80(%rbp), %rax
movl -0x40(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x50(%rbp)
movq -0x130(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x12f1b
jmp 0x130b3
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0xc8(%rbp)
movq -0x168(%rbp), %rax
movq -0xc8(%rbp), %rcx
movl 0x28(%rcx), %ecx
addq %rcx, %rax
cmpq -0x160(%rbp), %rax
jbe 0x13064
movq -0x168(%rbp), %rax
movq -0xc8(%rbp), %rcx
movl 0x28(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x160(%rbp)
cmpq $0x0, -0x160(%rbp)
je 0x12f8a
movq -0x160(%rbp), %rax
movq %rax, -0x180(%rbp)
jmp 0x12f98
movl $0x1, %eax
movq %rax, -0x180(%rbp)
jmp 0x12f98
movq -0x180(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rax
shrq %rax
orq -0x160(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rax
shrq $0x2, %rax
orq -0x160(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rax
shrq $0x4, %rax
orq -0x160(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rax
shrq $0x8, %rax
orq -0x160(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rax
shrq $0x10, %rax
orq -0x160(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x160(%rbp)
movq -0x158(%rbp), %rdi
movq -0x160(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2330
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rdi
movq -0x168(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0xc8(%rbp), %rax
movq 0x30(%rax), %rsi
movq -0xc8(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, %edx
shlq $0x3, %rdx
callq 0x22c0
movq -0xc8(%rbp), %rax
movl 0x28(%rax), %eax
addq -0x168(%rbp), %rax
movq %rax, -0x168(%rbp)
jmp 0x130b3
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x12eda
movq -0x158(%rbp), %rdi
movq -0x168(%rbp), %rsi
movl $0x8, %edx
leaq -0x4a3b(%rip), %rcx     # 0xe6a0
callq 0x20c0
movl $0x0, -0x44(%rbp)
movl $0xffffffff, -0x6c(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpq -0x168(%rbp), %rax
jae 0x13163
movq -0x158(%rbp), %rax
movl -0x40(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl -0x6c(%rbp), %ecx
cmpq %rcx, %rax
je 0x13156
movq -0x158(%rbp), %rax
movl -0x40(%rbp), %ecx
movq (%rax,%rcx,8), %rdx
movq -0x158(%rbp), %rax
movl -0x44(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x44(%rbp)
movl %ecx, %ecx
movq %rdx, (%rax,%rcx,8)
movq -0x158(%rbp), %rax
movl -0x40(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, -0x6c(%rbp)
jmp 0x13158
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x130f5
movl -0x44(%rbp), %eax
movq %rax, -0x168(%rbp)
movq -0x158(%rbp), %rdi
movl -0x44(%rbp), %eax
movl %eax, %esi
shlq $0x3, %rsi
callq 0x2330
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rax
movq %rax, -0x170(%rbp)
leaq -0xb0(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x21c0
movl $0x0, -0x40(%rbp)
movq -0x168(%rbp), %rax
movl %eax, -0x44(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x44(%rbp), %eax
jae 0x13208
movq -0x170(%rbp), %rax
movl -0x40(%rbp), %ecx
movl (%rax,%rcx,8), %eax
cvtsi2sd %rax, %xmm0
movq -0x170(%rbp), %rax
movl -0x40(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
andq $0x3, %rax
addsd -0xb0(%rbp,%rax,8), %xmm0
movsd %xmm0, -0xb0(%rbp,%rax,8)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x131bb
leaq -0xb0(%rbp), %rdi
movl $0x4, %esi
leaq -0x78(%rbp), %rdx
callq 0xe5d0
movl %eax, -0x74(%rbp)
movq 0x18(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x13291
movq 0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x13250
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x188(%rbp)
jmp 0x1325e
movl $0x2, %eax
movq %rax, -0x188(%rbp)
jmp 0x1325e
movq -0x188(%rbp), %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x6, %rsi
callq 0x2330
movq %rax, %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0xd0(%rbp)
movl -0x24(%rbp), %ecx
movq -0xd0(%rbp), %rax
movl %ecx, (%rax)
movl -0x74(%rbp), %eax
movsd -0xb0(%rbp,%rax,8), %xmm0
movq -0xd0(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movl -0x78(%rbp), %eax
movsd -0xb0(%rbp,%rax,8), %xmm0
movq -0xd0(%rbp), %rax
movsd %xmm0, 0x10(%rax)
movl -0x60(%rbp), %ecx
movq -0xd0(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x148(%rbp), %rax
movl %eax, %ecx
movq -0xd0(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x138(%rbp), %rcx
movq -0xd0(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x168(%rbp), %rax
movl %eax, %ecx
movq -0xd0(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x158(%rbp), %rcx
movq -0xd0(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x130(%rbp), %rcx
movq -0xd0(%rbp), %rax
movq %rcx, 0x38(%rax)
cmpl $0x0, 0x20(%rbp)
jle 0x133c0
movq 0x16c8e(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq -0x148(%rbp), %r8
movl -0x60(%rbp), %r9d
movsd -0xa8(%rbp), %xmm0
movsd -0xa0(%rbp), %xmm1
movsd -0x98(%rbp), %xmm2
movl -0x24(%rbp), %eax
leaq 0x1127a(%rip), %rsi     # 0x24629
leaq 0x1120e(%rip), %rdx     # 0x245c4
movl %eax, (%rsp)
movb $0x3, %al
callq 0x2290
jmp 0x133c2
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x128ee
movq -0x88(%rbp), %rdi
callq 0x2060
movq -0x90(%rbp), %rdi
callq 0x2060
movq -0xb8(%rbp), %rdi
callq 0x17d40
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
nopl (%rax)