// File: /workspace/github_c_makefile_star2_O0/c-zhou[P]oatk/path.c
// Function: path_rotate_core
static double path_rotate_core(asg_t *g, path_t *path, hmm_annot_db_t *annots, OG_TYPE_t og_type)
{
    uint32_t i, j;
    const uint32_t g_n = athaliana_pltd_g71n;
    const char *const *genes = athaliana_pltd_g71;
    kh_str_t *gene_db;
    kh_s32_t *segs;
    khint32_t k, k1;
    uint64_t v;
    hmm_annot_t *annot, *annot1;
    double coeff = .0;
    int absent;

    assert(g_n < 256);

    // add core genes to table
    gene_db = kh_str_init();
    for (i = 0; i < g_n; ++i) {
        k = kh_str_put(gene_db, genes[i], &absent);
        kh_val(gene_db, k) = (uint64_t) i << 32 | UINT32_MAX;
    }

    // only need segs in the path
    segs = kh_s32_init();
    for (i = 0; i < path->nv; ++i) {
        k = kh_s32_put(segs, path->v[i]>>1, &absent);
        if (absent)
            kh_val(segs, k) = 1;
        else
            kh_val(segs, k) += 1;
    }

    // find (best) positions for core genes
    // on segs included in the path
    for (i = 0; i < annots->n; ++i) {
        annot = &annots->a[i];
        if (annot->og_type == (uint32_t) og_type) {
            k = kh_str_get(gene_db, annot->gname);
            k1 = kh_s32_get(segs, asg_name2id(g, annot->sname)); // sid might not set
            if (k < kh_end(gene_db) && k1 < kh_end(segs) && kh_val(segs, k1) == 1) {
                v = kh_val(gene_db, k);
                annot1 = (uint32_t) v == UINT32_MAX? 0 : &annots->a[(uint32_t) v];
                if (annot1 == 0 || annot1->score < annot->score)
                    kh_val(gene_db, k) = v >> 32 << 32 | i;
            }
        }
    }

    // do rotation if path is circular
    if (path->circ) {
        uint32_t s;
        for (i = 0, s = UINT32_MAX; i < g_n; ++i) {
            k = kh_str_get(gene_db, genes[i]);
            v = kh_val(gene_db, k);
            if ((uint32_t) v != UINT32_MAX) {
                s = (uint32_t) v;
                break;
            }
        }

        if (s != UINT32_MAX) {
            s = asg_name2id(g, annots->a[s].sname);
            // find start seg
            uint32_t t;
            for (i = 0, t = UINT32_MAX; i < path->nv; ++i) {
                if (path->v[i] >> 1 == s) {
                    t = i;
                    break;
                }
            }
            assert(t != UINT32_MAX);
            // do rotation to make t the first seg
            array_left_rotate(path->v, t, path->nv);
        }
    }

    // make gene orders in path
    kvec_t(uint64_t) g_ord;
    uint64_t w;
    kv_init(g_ord);
    for (k = (khint32_t) 0; k < kh_end(gene_db); ++k) {
        if (kh_exist(gene_db, k) && (uint32_t) (v = kh_val(gene_db, k)) != UINT32_MAX) {
            annot = &annots->a[(uint32_t) v];
            w  = (uint64_t) asg_name2id(g, annot->sname) << 40;
            w |= (uint64_t) (annot->alifrom + annot->alito) >> 1 << 8;
            w |= v >> 32;
            kv_push(uint64_t, g_ord, w);
        }
    }

    if (g_ord.n == 0) goto rotate_done;

    qsort(g_ord.a, g_ord.n, sizeof(uint64_t), u64_cmpfunc);

    uint64_t *idx;
    uint32_t last;
    MYCALLOC(idx, g->n_seg);
    for (i = 1, last = 0; i <= g_ord.n; ++i) {
        if (i == g_ord.n || (g_ord.a[i-1] >> 40) != (g_ord.a[i] >> 40))
            idx[g_ord.a[i-1] >> 40] = (uint64_t) last << 32 | (i - last), last = i;
    }

    uint32_t *p_ord, s, p, n, m;
    MYMALLOC(p_ord, g_ord.n);
    m = 0;
    for (i = 0; i < path->nv; ++i) {
        s = path->v[i] >> 1;
        p = idx[s] >> 32;
        n = (uint32_t) idx[s];
        if (n == 0) continue;
        if (path->v[i] & 1) {
            for (j = 0; j < n; ++j)
                p_ord[m++] = g_ord.a[p+n-1-j] & 0xFF;
        } else {
            for (j = 0; j < n; ++j)
                p_ord[m++] = g_ord.a[p+j] & 0xFF;
        }
    }

    assert(m == g_ord.n);

    // wrap gaps
    uint32_t *p_gap;
    MYCALLOC(p_gap, g_n);
    for (i = 0; i < m; ++i)
        ++p_gap[p_ord[i]];
    for (i = 1; i < g_n; ++i)
        p_gap[i] += p_gap[i-1];
    for (i = 0; i < m; ++i)
        p_ord[i] -= p_ord[i] - p_gap[p_ord[i]] + 1;
    free(p_gap);

    // calculate Spearman's rank correlation coefficient
    double ds, srcc;
    ds = .0;
    for (i = 0; i < g_ord.n; ++i)
        ds += ((double) p_ord[i] - i) * ((double) p_ord[i] - i);
    srcc = 1. - 6 * ds / g_ord.n / ((double) g_ord.n * g_ord.n - 1);

#ifdef DEBUG_SRCC
    // calculate Kendall's tau rank correlation coefficient
    double tau;
    ds = .0;
    for (i = 0; i < g_ord.n; ++i)
        for (j = i + 1; j < g_ord.n; ++j)
            ds += p_ord[i] > p_ord[j];
    tau = 1. - 2 * ds / g_ord.n / (g_ord.n - 1);
    fprintf(stderr, "[DEBUG_SRCC::%s] SRCC, %.6f; TAU, %.6f; N, %d\n", __func__, srcc, tau, m);
    for (i = 0; i < m; ++i)
        fprintf(stderr, "[DEBUG_SRCC::%s] %d %d\n", __func__, i, p_ord[i]);
#endif

    coeff = srcc;

    free(idx);
    free(p_ord);

rotate_done:
    kv_destroy(g_ord);
    kh_str_destroy(gene_db);
    kh_s32_destroy(segs);

    return coeff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x47, -0x28(%rbp)
leaq 0x20a88(%rip), %rax     # 0x29b90
movq %rax, -0x30(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x68(%rbp)
callq 0x14d80
movq %rax, -0x38(%rbp)
movl $0x0, -0x20(%rbp)
cmpl $0x47, -0x20(%rbp)
jae 0x917c
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rax
movl -0x20(%rbp), %ecx
movq (%rax,%rcx,8), %rsi
leaq -0x6c(%rbp), %rdx
callq 0x14d90
movl %eax, -0x44(%rbp)
movl -0x20(%rbp), %eax
movl %eax, %ecx
shlq $0x20, %rcx
movabsq $0xffffffff, %rax       # imm = 0xFFFFFFFF
orq %rax, %rcx
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x44(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x9124
callq 0x14dd0
movq %rax, -0x40(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
andl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
cmpl %ecx, %eax
jae 0x91fe
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %esi
shrl %esi
leaq -0x6c(%rbp), %rdx
callq 0x14de0
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x6c(%rbp)
je 0x91db
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x44(%rbp), %ecx
movl $0x1, 0x4(%rax,%rcx,8)
jmp 0x91f1
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x44(%rbp), %ecx
movl 0x4(%rax,%rcx,8), %edx
addl $0x1, %edx
movl %edx, 0x4(%rax,%rcx,8)
jmp 0x91f3
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x918c
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x93d5
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x20(%rbp), %ecx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movl 0x48(%rax), %eax
shrl $0x1d, %eax
andl $0x3, %eax
cmpl -0x1c(%rbp), %eax
jne 0x93c5
movq -0x38(%rbp), %rdi
movq -0x58(%rbp), %rax
movq (%rax), %rsi
callq 0x14e10
movl %eax, -0x44(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x8(%rbp), %rdi
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x8bd0
movq -0xe8(%rbp), %rdi
movl %eax, %esi
callq 0x14e40
movl %eax, -0x48(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0xdc(%rbp)
movq -0x38(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x92aa
movq -0x38(%rbp), %rax
movl (%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0xec(%rbp)
jmp 0x92b4
xorl %eax, %eax
movl %eax, -0xec(%rbp)
jmp 0x92b4
movl -0xdc(%rbp), %eax
movl -0xec(%rbp), %ecx
cmpl %ecx, %eax
jae 0x93c3
movl -0x48(%rbp), %eax
movl %eax, -0xf0(%rbp)
movq -0x40(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x92f1
movq -0x40(%rbp), %rax
movl (%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0xf4(%rbp)
jmp 0x92fb
xorl %eax, %eax
movl %eax, -0xf4(%rbp)
jmp 0x92fb
movl -0xf0(%rbp), %eax
movl -0xf4(%rbp), %ecx
cmpl %ecx, %eax
jae 0x93c3
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x48(%rbp), %ecx
cmpl $0x1, 0x4(%rax,%rcx,8)
jne 0x93c3
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x44(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpl $-0x1, %eax
jne 0x9353
xorl %eax, %eax
movq %rax, -0x100(%rbp)
jmp 0x936f
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x50(%rbp), %rcx
movl %ecx, %ecx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0x9399
movq -0x60(%rbp), %rax
movsd 0x38(%rax), %xmm1
movq -0x58(%rbp), %rax
movsd 0x38(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x93c1
movq -0x50(%rbp), %rcx
shrq $0x20, %rcx
shlq $0x20, %rcx
movl -0x20(%rbp), %eax
orq %rax, %rcx
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x44(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
jmp 0x93c3
jmp 0x93c5
jmp 0x93c7
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x9205
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x950d
movl $0x0, -0x20(%rbp)
movl $0xffffffff, -0x70(%rbp) # imm = 0xFFFFFFFF
cmpl $0x47, -0x20(%rbp)
jae 0x944f
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rax
movl -0x20(%rbp), %ecx
movq (%rax,%rcx,8), %rsi
callq 0x14e10
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x44(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpl $-0x1, %eax
je 0x9442
movq -0x50(%rbp), %rax
movl %eax, -0x70(%rbp)
jmp 0x944f
jmp 0x9444
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x93f9
cmpl $-0x1, -0x70(%rbp)
je 0x950b
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x70(%rbp), %ecx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
callq 0x8bd0
movl %eax, -0x70(%rbp)
movl $0x0, -0x20(%rbp)
movl $0xffffffff, -0x74(%rbp) # imm = 0xFFFFFFFF
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
andl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
cmpl %ecx, %eax
jae 0x94c7
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %eax
shrl %eax
cmpl -0x70(%rbp), %eax
jne 0x94ba
movl -0x20(%rbp), %eax
movl %eax, -0x74(%rbp)
jmp 0x94c7
jmp 0x94bc
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x9489
cmpl $-0x1, -0x74(%rbp)
je 0x94cf
jmp 0x94ee
leaq 0x1ac95(%rip), %rdi     # 0x2416b
leaq 0x1a0c8(%rip), %rsi     # 0x235a5
movl $0x665, %edx            # imm = 0x665
leaq 0x1ac92(%rip), %rcx     # 0x2417b
callq 0x21a0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x74(%rbp), %esi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
callq 0x9be0
jmp 0x950d
movq $0x0, -0x88(%rbp)
movq $0x0, -0x90(%rbp)
movq $0x0, -0x80(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x104(%rbp)
movq -0x38(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x955b
movq -0x38(%rbp), %rax
movl (%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x108(%rbp)
jmp 0x9565
xorl %eax, %eax
movl %eax, -0x108(%rbp)
jmp 0x9565
movl -0x104(%rbp), %eax
movl -0x108(%rbp), %ecx
cmpl %ecx, %eax
jae 0x96cc
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x44(%rbp), %ecx
shrl $0x5, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x44(%rbp), %ecx
andl $0x1f, %ecx
shrl %cl, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x96bc
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x44(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x50(%rbp)
cmpl $-0x1, %eax
je 0x96bc
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x50(%rbp), %rcx
movl %ecx, %ecx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x8bd0
movl %eax, %eax
shlq $0x28, %rax
movq %rax, -0x98(%rbp)
movq -0x58(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x58(%rbp), %rcx
addl 0x1c(%rcx), %eax
movl %eax, %eax
shrq %rax
shlq $0x8, %rax
orq -0x98(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x50(%rbp), %rax
shrq $0x20, %rax
orq -0x98(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x90(%rbp), %rax
cmpq -0x88(%rbp), %rax
jne 0x9696
cmpq $0x0, -0x88(%rbp)
je 0x9662
movq -0x88(%rbp), %rax
shlq %rax
movq %rax, -0x110(%rbp)
jmp 0x9670
movl $0x2, %eax
movq %rax, -0x110(%rbp)
jmp 0x9670
movq -0x110(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rdi
movq -0x88(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2330
movq %rax, -0x80(%rbp)
movq -0x98(%rbp), %rdx
movq -0x80(%rbp), %rax
movq -0x90(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x90(%rbp)
movq %rdx, (%rax,%rcx,8)
jmp 0x96bc
jmp 0x96be
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x9532
cmpq $0x0, -0x90(%rbp)
jne 0x96db
jmp 0x9b3b
movq -0x80(%rbp), %rdi
movq -0x90(%rbp), %rsi
movl $0x8, %edx
leaq 0xa04e(%rip), %rcx      # 0x13740
callq 0x20c0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x8, %esi
callq 0x2240
movq %rax, -0xa0(%rbp)
movl $0x1, -0x20(%rbp)
movl $0x0, -0xa4(%rbp)
movl -0x20(%rbp), %eax
cmpq -0x90(%rbp), %rax
ja 0x97b7
movl -0x20(%rbp), %eax
cmpq -0x90(%rbp), %rax
je 0x9765
movq -0x80(%rbp), %rax
movl -0x20(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
shrq $0x28, %rax
movq -0x80(%rbp), %rcx
movl -0x20(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x28, %rcx
cmpq %rcx, %rax
je 0x97a7
movl -0xa4(%rbp), %eax
movl %eax, %edx
shlq $0x20, %rdx
movl -0x20(%rbp), %eax
subl -0xa4(%rbp), %eax
movl %eax, %eax
orq %rax, %rdx
movq -0xa0(%rbp), %rax
movq -0x80(%rbp), %rcx
movl -0x20(%rbp), %esi
subl $0x1, %esi
movl %esi, %esi
movq (%rcx,%rsi,8), %rcx
shrq $0x28, %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x20(%rbp), %eax
movl %eax, -0xa4(%rbp)
jmp 0x97a9
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x9721
movq -0x90(%rbp), %rdi
shlq $0x2, %rdi
callq 0x22f0
movq %rax, -0xb0(%rbp)
movl $0x0, -0xc0(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
andl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
cmpl %ecx, %eax
jae 0x992a
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %eax
shrl %eax
movl %eax, -0xb4(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, -0xb8(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0xbc(%rbp)
cmpl $0x0, -0xbc(%rbp)
jne 0x984d
jmp 0x991c
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x98c3
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0xbc(%rbp), %eax
jae 0x98c1
movq -0x80(%rbp), %rax
movl -0xb8(%rbp), %ecx
addl -0xbc(%rbp), %ecx
subl $0x1, %ecx
subl -0x24(%rbp), %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
andq $0xff, %rax
movl %eax, %edx
movq -0xb0(%rbp), %rax
movl -0xc0(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0xc0(%rbp)
movl %ecx, %ecx
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x986a
jmp 0x991a
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0xbc(%rbp), %eax
jae 0x9918
movq -0x80(%rbp), %rax
movl -0xb8(%rbp), %ecx
addl -0x24(%rbp), %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
andq $0xff, %rax
movl %eax, %edx
movq -0xb0(%rbp), %rax
movl -0xc0(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0xc0(%rbp)
movl %ecx, %ecx
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x98ca
jmp 0x991a
jmp 0x991c
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x97df
movl -0xc0(%rbp), %eax
cmpq -0x90(%rbp), %rax
jne 0x993b
jmp 0x995a
leaq 0x1a881(%rip), %rdi     # 0x241c3
leaq 0x19c5c(%rip), %rsi     # 0x235a5
movl $0x696, %edx            # imm = 0x696
leaq 0x1a826(%rip), %rcx     # 0x2417b
callq 0x21a0
movl $0x47, %edi
movl $0x4, %esi
callq 0x2240
movq %rax, -0xc8(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0xc0(%rbp), %eax
jae 0x99aa
movq -0xc8(%rbp), %rax
movq -0xb0(%rbp), %rcx
movl -0x20(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x9977
movl $0x1, -0x20(%rbp)
cmpl $0x47, -0x20(%rbp)
jae 0x99e4
movq -0xc8(%rbp), %rax
movl -0x20(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %edx
movq -0xc8(%rbp), %rax
movl -0x20(%rbp), %ecx
addl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x99b1
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0xc0(%rbp), %eax
jae 0x9a3a
movq -0xb0(%rbp), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %esi
movq -0xc8(%rbp), %rax
movq -0xb0(%rbp), %rcx
movl -0x20(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
subl (%rax,%rcx,4), %esi
addl $0x1, %esi
movq -0xb0(%rbp), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %edx
subl %esi, %edx
movl %edx, (%rax,%rcx,4)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x99eb
movq -0xc8(%rbp), %rdi
callq 0x2060
xorps %xmm0, %xmm0
movsd %xmm0, -0xd0(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpq -0x90(%rbp), %rax
jae 0x9aa9
movq -0xb0(%rbp), %rcx
movl -0x20(%rbp), %eax
movl (%rcx,%rax,4), %ecx
cvtsi2sd %rcx, %xmm2
cvtsi2sd %rax, %xmm1
movaps %xmm2, %xmm0
subsd %xmm1, %xmm0
subsd %xmm1, %xmm2
movsd -0xd0(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xd0(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x9a58
movsd -0xd0(%rbp), %xmm1
movsd 0x19a57(%rip), %xmm0    # 0x23510
mulsd %xmm0, %xmm1
movaps 0x19aac(%rip), %xmm0    # 0x23570
movq -0x90(%rbp), %xmm2
punpckldq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
movapd 0x19aa8(%rip), %xmm0    # 0x23580
subpd %xmm0, %xmm2
movaps %xmm2, %xmm0
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
addsd %xmm0, %xmm2
divsd %xmm2, %xmm1
movaps %xmm2, %xmm0
mulsd %xmm2, %xmm0
movsd 0x19a0e(%rip), %xmm2    # 0x23508
addsd %xmm2, %xmm0
divsd %xmm0, %xmm1
movsd 0x1999e(%rip), %xmm0    # 0x234a8
subsd %xmm1, %xmm0
movsd %xmm0, -0xd8(%rbp)
movsd -0xd8(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
movq -0xa0(%rbp), %rdi
callq 0x2060
movq -0xb0(%rbp), %rdi
callq 0x2060
movq -0x80(%rbp), %rdi
callq 0x2060
movq -0x38(%rbp), %rdi
callq 0x14e70
movq -0x40(%rbp), %rdi
callq 0x14e90
movsd -0x68(%rbp), %xmm0
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)