// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/probaln.c
// Function: probaln_glocal
int probaln_glocal(const uint8_t *ref, int l_ref, const uint8_t *query,
                   int l_query, const uint8_t *iqual, const probaln_par_t *c,
                   int *state, uint8_t *q)
{
    double *f = NULL, *b = NULL, *s = NULL, m[9], sI, sM, bI, bM;
    float *qual = NULL;
    int bw, bw2, i, k, is_backward = 1, Pr;

    if ( l_ref<0 || l_query<0 || l_query >= INT_MAX - 2) {
        errno = EINVAL;
        return INT_MIN;
    }
    if (l_ref==0 || l_query==0)
        return 0;  // Is this actually invalid??

    /*** initialization ***/
    is_backward = state && q? 1 : 0;
    bw = l_ref > l_query? l_ref : l_query;
    if (bw > c->bw) bw = c->bw;
    if (bw < abs(l_ref - l_query)) bw = abs(l_ref - l_query);
    bw2 = bw * 2 + 1;
    size_t i_dim = bw2 < l_ref ? (size_t) bw2*3+6 : (size_t) l_ref*3+6;

    // allocate the forward and backward matrices f[][] and b[][]
    // and the scaling array s[]
    // Ideally these callocs would be mallocs + initialisation of
    // the few bits needed.
    if (SIZE_MAX / (l_query+1) / i_dim < sizeof(double)) {
        errno = ENOMEM; // Allocation would fail
        return INT_MIN;
    }
    f = calloc((l_query+1)*i_dim, sizeof(double));
    if (!f) goto fail;
    if (is_backward) {
        b = calloc((l_query+1)*i_dim, sizeof(double));
        if (!b) goto fail;
    }

    // s[] is the scaling factor to avoid underflow
    s = malloc((l_query+2) * sizeof(double));
    if (!s) goto fail;

    // initialize qual
    qual = malloc(l_query * sizeof(float));
    if (!qual) goto fail;
    if (g_qual2prob[0] == 0)
        for (i = 0; i < 256; ++i)
            g_qual2prob[i] = pow(10, -i/10.);
    qual[0] = 0.0; // Should be unused
    for (i = 0; i < l_query; ++i)
        qual[i] = g_qual2prob[iqual? iqual[i] : 30];

    // initialize transition probability
    // the value here seems not to affect results; FIXME: need proof
    sM = sI = 1. / (2 * l_query + 2);
    m[0*3+0] = (1 - c->d - c->d) * (1 - sM);
    m[0*3+1] = m[0*3+2] = c->d * (1 - sM);
    m[1*3+0] = (1 - c->e) * (1 - sI);
    m[1*3+1] = c->e * (1 - sI);
    m[1*3+2] = 0.;
    m[2*3+0] = 1 - c->e;
    m[2*3+1] = 0.;
    m[2*3+2] = c->e;
    bM = (1 - c->d) / l_ref; // (bM+bI)*l_ref==1
    bI = c->d / l_ref;

    // f[] and b[] are 2-d arrays of three scores, with rows along the
    // query and columns across the band.  The first query base and
    // first band position appear at index 1 allowing edge conditions
    // to be stored in index 0.  Hence the loops below appear to use
    // 1-based indexing instead of 0-based as you'd normally expect in C,
    // and the sequences are accessed using query[i - 1] and ref[k - 1].

    /*** forward ***/
    // f[0]
    set_u(k, bw, 0, 0);
    f[0*i_dim+k] = s[0] = 1.;
    { // f[1]
        double *fi = &f[1*i_dim], sum;
        int beg = 1, end = l_ref < bw + 1? l_ref : bw + 1;
        for (k = beg, sum = 0.; k <= end; ++k) {
            int u;
            double e = (ref[k - 1] > 3 || query[0] > 3)? 1. : ref[k - 1] == query[0]? 1. - qual[0] : qual[0] * EM;
            set_u(u, bw, 1, k);
            fi[u+0] = e * bM; fi[u+1] = EI * bI;
            sum += fi[u] + fi[u+1];
        }
        s[1] = sum;
    }
    // f[2..l_query]
    for (i = 2; i <= l_query; ++i) {
        double *fi = &f[i*i_dim], *fi1 = &f[(i-1)*i_dim], sum, qli = qual[i-1];
        int beg = 1, end = l_ref, x;
        uint8_t qyi = query[i - 1];
        x = i - bw; beg = beg > x? beg : x; // band start
        x = i + bw; end = end < x? end : x; // band end

        // NB end-beg is almost always 14 (99.9% of the time)
        // Hence not a large volume to parallelise.
        //
        // Maybe stripe in diagonal doing 14 lines together?
        //
        // Consider rotation? 150x14 vs 14x150 so inner loop
        // takes longer.

        double E[] = {
            qli * EM, // 00
            1. - qli, // 01
            1.,       // 10
            1.,       // 11
        };
        double M = 1./s[i-1];

        // Note this code has the original version listed here (albeit
        // with improved formatting), but we do not compile using
        // -DPROBALN_ORIG.  The purpose of this code is to act as an
        // easier(?) to understand version of the heavily optimised
        // version following it and as an easy validation path in case
        // of any differences in results.
#ifdef PROBALN_ORIG
        for (k = beg, sum = 0.; k <= end; ++k) {
            int u, v11, v01, v10;
            double e;
            e = E[(ref[k - 1] > 3 || qyi > 3)*2 + (ref[k - 1] == qyi)];
            set_u(u, bw, i, k);
            set_u(v11, bw, i-1, k-1);
            set_u(v10, bw, i-1, k);
            set_u(v01, bw, i, k-1);
            fi[u+0] = e * (m[0] * M*fi1[v11+0] + m[3] * M*fi1[v11+1] + m[6] * M*fi1[v11+2]);
            fi[u+1] = EI * (m[1] * M*fi1[v10+0] + m[4] * M*fi1[v10+1]);
            fi[u+2] = m[2] * fi[v01+0] + m[8] * fi[v01+2];
            sum += fi[u] + fi[u+1] + fi[u+2];
        }
#else
        // We use EI*(M*m[1]*? + M*m[4]*?) a lot.  So factor it out here.
        double xm[5];
        xm[0] =    M*m[0];
        xm[1] =    M*m[3];
        xm[2] =    M*m[6];
        xm[3] = EI*M*m[1];
        xm[4] = EI*M*m[4];

        {
            int u, v11;
            set_u(u,   bw, i,   beg);
            set_u(v11, bw, i-1, beg-1);
            // Rather than recompute k->{u,v01,v10,v11} each loop
            // we just increment the pointers.
            double *xi = &fi[u];
            double *yi = &fi1[v11];
            // Derived from xi[0,2] in previous loop iter.
            double  l_x0 = m[2]*xi[0];
            double  l_x2 = m[8]*xi[2];
            for (k = beg, sum = 0.; k <= end; ++k, xi+=3, yi+=3) {
                int cond = (ref[k-1] > 3 || qyi > 3)*2 + (ref[k-1] == qyi);

                double z0 = xm[0]*yi[0];
                double z1 = xm[1]*yi[1];
                double z2 = xm[2]*yi[2];
                double z3 = xm[3]*yi[3];
                double z4 = xm[4]*yi[4];

                xi[0] = E[cond] * (z0+z1+z2);
                xi[1] = z3 + z4;
                xi[2] = l_x0 + l_x2;
                sum  += xi[0] + xi[1] + xi[2];

                l_x0 = m[2]*xi[0];
                l_x2 = m[8]*xi[2];
            }
        }
#endif
        s[i] = sum;
    }

    { // f[l_query+1]
        double sum;
        double M = 1./s[l_query];
        // Note that this goes from 1 to l_ref inclusive, but as the
        // alignment is banded not all of the values will have been
        // calculated (the rest are taken as 0), so the summation
        // actually goes over the values set in the last iteration of
        // the previous loop (when i = l_query).  For some reason lost to
        // time this is done by looking for valid values of 'u' instead of
        // working out 'beg' and 'end'.

        // From HTSlib 1.8 to 1.17, the endpoint was incorrectly set
        // to i_dim - 3.  When l_query <= bandwidth, this caused the last
        // column to be missed, and if l_ref == l_query then a match at the end
        // could incorrectly be reported as an insertion.  See #1605.

        for (k = 1, sum = 0.; k <= l_ref; ++k) {
            int u;
            set_u(u, bw, l_query, k);
            if (u < 3 || u >= i_dim) continue;
            sum += M*f[l_query*i_dim + u+0] * sM + M*f[l_query*i_dim + u+1] * sI;
        }
        s[l_query+1] = sum; // the last scaling factor
    }
    { // compute likelihood
        double p = 1., Pr1 = 0.;
        for (i = 0; i <= l_query + 1; ++i) {
            p *= s[i];
            if (p < 1e-100) Pr1 += -4.343 * log(p), p = 1.;
        }
        Pr1 += -4.343 * log(p * l_ref * l_query);
        Pr = (int)(Pr1 + .499);
        if (!is_backward) { // skip backward and MAP
            free(f); free(s); free(qual);
            return Pr;
        }
    }
    /*** backward ***/
    // b[l_query] (b[l_query+1][0]=1 and thus \tilde{b}[][]=1/s[l_query+1]; this is where s[l_query+1] comes from)
    for (k = 1; k <= l_ref; ++k) {
        int u;
        double *bi = &b[l_query*i_dim];
        set_u(u, bw, l_query, k);
        if (u < 3 || u >= i_dim) continue;
        bi[u+0] = sM / s[l_query] / s[l_query+1]; bi[u+1] = sI / s[l_query] / s[l_query+1];
    }
    // b[l_query-1..1]
    for (i = l_query - 1; i >= 1; --i) {
        int beg = 1, end = l_ref, x;
        double *bi = &b[i*i_dim], *bi1 = &b[(i+1)*i_dim], y = (i > 1), qli1 = qual[i];
        uint8_t qyi1 = query[i];
        x = i - bw; beg = beg > x? beg : x;
        x = i + bw; end = end < x? end : x;
        double E[] = {
            qli1 * EM, //000
            1. - qli1, //001
            1.,        //010
            1.,        //011
            //0,0,0,0    //1xx
        };

#ifdef PROBALN_ORIG
        for (k = end; k >= beg; --k) {
            int u, v11, v01, v10;
            double e;
            set_u(u, bw, i, k);
            set_u(v11, bw, i+1, k+1);
            set_u(v10, bw, i+1, k);
            set_u(v01, bw, i, k+1);
            e = (k>=l_ref)?0 :E[(ref[k] > 3 || qyi1 > 3)*2 + (ref[k] == qyi1)] * bi1[v11];
            bi[u+0] = e * m[0] + EI * m[1] * bi1[v10+1] + m[2] * bi[v01+2]; // bi1[v11] has been foled into e.
            bi[u+1] = e * m[3] + EI * m[4] * bi1[v10+1];
            bi[u+2] = (e * m[6] + m[8] * bi[v01+2]) * y;
//          fprintf(stderr, "B (%d,%d;%d): %lg,%lg,%lg\n", i, k, u, bi[u], bi[u+1], bi[u+2]); // DEBUG
        }
        // rescale
        int _beg, _end;
        set_u(_beg, bw, i, beg); set_u(_end, bw, i, end); _end += 2;
        for (k = _beg, y = 1./s[i]; k <= _end; ++k) bi[k] *= y;
#else
        {
            int u, v10;
            set_u(u,   bw, i,   end);
            set_u(v10, bw, i+1, end);
            // Rather than recompute k->{u,v01,v10,v11} each loop
            // we just increment the pointers.
            double *xi = &bi[u];
            double *yi = &bi1[v10];
            // NB xi[5] is equiv to v01+2.
            double xi_5 = xi[5];
            // Manual loop invariant removal
            double e1 = EI*m[1];
            double e4 = EI*m[4];
            // Do renorm too in the same pass.
            double n = 1./s[i];
            for (k = end; k >= beg; --k, xi -= 3, yi -= 3) {
                double e = (k>=l_ref)
                    ? 0
                    : E[(ref[k]>3 || qyi1>3)*2 + (ref[k] == qyi1)] * yi[3];

                xi[1] =  e * m[3] +   e4 * yi[1];
                xi[0] =  e * m[0] +   e1 * yi[1]  + m[2] * xi_5;
                xi[2] = (e * m[6] + m[8] * xi_5) * y;
                // bi[u+2] from this iter becomes bi[v01+2] in next iter
                xi_5 = xi[2];

                // rescale
                xi[1] *= n;
                xi[0] *= n;
                xi[2] *= n;
            }
        }
#endif
    }
    { // b[0]
        int beg = 1, end = l_ref < bw + 1? l_ref : bw + 1;
        double sum = 0.;
        for (k = end; k >= beg; --k) {
            int u;
            double e = (ref[k - 1] > 3 || query[0] > 3)? 1. : ref[k - 1] == query[0]? 1. - qual[0] : qual[0] * EM;
            set_u(u, bw, 1, k);
            if (u < 3 || u >= i_dim) continue;
            sum += e * b[1*i_dim + u+0] * bM + EI * b[1*i_dim + u+1] * bI;
        }
        set_u(k, bw, 0, 0);
        b[0*i_dim + k] = sum / s[0]; // if everything works as is expected, b[0][k] == 1.0
    }
    /*** MAP ***/
    for (i = 1; i <= l_query; ++i) {
        double sum = 0., *fi = &f[i*i_dim], *bi = &b[i*i_dim], max = 0.;
        int beg = 1, end = l_ref, x, max_k = -1;
        x = i - bw; beg = beg > x? beg : x;
        x = i + bw; end = end < x? end : x;
        double M = 1./s[i];
#ifdef PROBALN_ORIG
        for (k = beg; k <= end; ++k) {
            int u;
            double z;
            set_u(u, bw, i, k);
            z = M*fi[u+0] * bi[u+0];
            if (z > max) max = z, max_k = (k-1)<<2 | 0;
            sum += z;
            z = M*fi[u+1] * bi[u+1];
            if (z > max) max = z, max_k = (k-1)<<2 | 1;
            sum += z;
        }
#else
        {
            int u;
            set_u(u, bw, i, beg);
            for (k = beg; k <= end; ++k, u+=3) {
                double z1, z2;
                z1 = M*fi[u+0] * bi[u+0];
                z2 = M*fi[u+1] * bi[u+1];
                int which = z2 > z1; // strictly z2 >= z1 matches old code
                double zm = which ? z2 : z1;
                if (zm > max) {
                    max   = zm;
                    max_k = (k-1)<<2 | which;
                }
                sum += z1 + z2;
            }
        }
#endif
        max /= sum; sum *= s[i]; // if everything works as is expected, sum == 1.0
        if (state) state[i-1] = max_k;
        if (q) k = (int)(-4.343 * log(1. - max) + .499), q[i-1] = k > 100? 99 : k;
#ifdef PROBALN_MAIN
        k = 0;
        set_u(k, bw, 0, 0);
        fprintf(stderr, "(%.10lg,%.10lg) (%d,%d:%c,%c:%d) %lg\n", b[0][k], sum, i-1, max_k>>2,
                "ACGT"[query[i - 1]], "ACGT"[ref[(max_k>>2)]], max_k&3, max); // DEBUG
#endif
    }

    /*** free ***/
    free(f); free(b); free(s); free(qual);
    return Pr;

 fail:
    free(f); free(b); free(s); free(qual);
    return INT_MIN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x410, %rsp            # imm = 0x410
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x0, -0xc8(%rbp)
movl $0x1, -0xdc(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0xdb83b
cmpl $0x0, -0x24(%rbp)
jl 0xdb83b
cmpl $0x7ffffffd, -0x24(%rbp) # imm = 0x7FFFFFFD
jl 0xdb852
callq 0x4050
movl $0x16, (%rax)
movl $0x80000000, -0x4(%rbp) # imm = 0x80000000
jmp 0xdd4fe
cmpl $0x0, -0x14(%rbp)
je 0xdb85e
cmpl $0x0, -0x24(%rbp)
jne 0xdb86a
movl $0x0, -0x4(%rbp)
jmp 0xdd4fe
xorl %eax, %eax
cmpq $0x0, 0x10(%rbp)
movb %al, -0x361(%rbp)
je 0xdb887
cmpq $0x0, 0x18(%rbp)
setne %al
movb %al, -0x361(%rbp)
movb -0x361(%rbp), %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0xdc(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jle 0xdb8b3
movl -0x14(%rbp), %eax
movl %eax, -0x368(%rbp)
jmp 0xdb8bc
movl -0x24(%rbp), %eax
movl %eax, -0x368(%rbp)
movl -0x368(%rbp), %eax
movl %eax, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jle 0xdb8e4
movq -0x38(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
movl -0x14(%rbp), %ecx
subl -0x24(%rbp), %ecx
movl %ecx, %edx
negl %edx
cmovnsl %edx, %ecx
cmpl %ecx, %eax
jge 0xdb90e
movl -0x14(%rbp), %eax
subl -0x24(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movl %eax, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
shll %eax
addl $0x1, %eax
movl %eax, -0xd0(%rbp)
movl -0xd0(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0xdb942
movslq -0xd0(%rbp), %rax
imulq $0x3, %rax, %rax
addq $0x6, %rax
movq %rax, -0x370(%rbp)
jmp 0xdb955
movslq -0x14(%rbp), %rax
imulq $0x3, %rax, %rax
addq $0x6, %rax
movq %rax, -0x370(%rbp)
movq -0x370(%rbp), %rax
movq %rax, -0xe8(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
movq $-0x1, %rax
xorl %edx, %edx
divq %rcx
xorl %ecx, %ecx
movl %ecx, %edx
divq -0xe8(%rbp)
cmpq $0x8, %rax
jae 0xdb9a0
callq 0x4050
movl $0xc, (%rax)
movl $0x80000000, -0x4(%rbp) # imm = 0x80000000
jmp 0xdd4fe
movl -0x24(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
imulq -0xe8(%rbp), %rdi
movl $0x8, %esi
callq 0x42f0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0xdb9cb
jmp 0xdd4d0
cmpl $0x0, -0xdc(%rbp)
je 0xdba01
movl -0x24(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
imulq -0xe8(%rbp), %rdi
movl $0x8, %esi
callq 0x42f0
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0xdb9ff
jmp 0xdd4d0
jmp 0xdba01
movl -0x24(%rbp), %eax
addl $0x2, %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x4650
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0xdba23
jmp 0xdd4d0
movslq -0x24(%rbp), %rdi
shlq $0x2, %rdi
callq 0x4650
movq %rax, -0xc8(%rbp)
cmpq $0x0, -0xc8(%rbp)
jne 0xdba46
jmp 0xdd4d0
movss 0x30c42(%rip), %xmm0    # 0x10c690
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0xdbabd
jp 0xdbabd
movl $0x0, -0xd4(%rbp)
cmpl $0x100, -0xd4(%rbp)     # imm = 0x100
jge 0xdbabb
xorl %eax, %eax
subl -0xd4(%rbp), %eax
cvtsi2sd %eax, %xmm1
movsd 0x14b1e(%rip), %xmm0    # 0xf05a0
divsd %xmm0, %xmm1
movsd 0x14b12(%rip), %xmm0    # 0xf05a0
callq 0x48a0
cvtsd2ss %xmm0, %xmm0
movslq -0xd4(%rbp), %rcx
leaq 0x30beb(%rip), %rax     # 0x10c690
movss %xmm0, (%rax,%rcx,4)
movl -0xd4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd4(%rbp)
jmp 0xdba62
jmp 0xdbabd
movq -0xc8(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, (%rax)
movl $0x0, -0xd4(%rbp)
movl -0xd4(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0xdbb44
cmpq $0x0, -0x30(%rbp)
je 0xdbafe
movq -0x30(%rbp), %rax
movslq -0xd4(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x374(%rbp)
jmp 0xdbb0b
movl $0x1e, %eax
movl %eax, -0x374(%rbp)
jmp 0xdbb0b
movl -0x374(%rbp), %eax
movslq %eax, %rcx
leaq 0x30b75(%rip), %rax     # 0x10c690
movss (%rax,%rcx,4), %xmm0
movq -0xc8(%rbp), %rax
movslq -0xd4(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0xd4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd4(%rbp)
jmp 0xdbad5
movl -0x24(%rbp), %eax
shll %eax
addl $0x2, %eax
cvtsi2sd %eax, %xmm1
movsd 0xf750(%rip), %xmm0     # 0xeb2a8
divsd %xmm1, %xmm0
movsd %xmm0, -0xa8(%rbp)
movsd %xmm0, -0xb0(%rbp)
movq -0x38(%rbp), %rax
movss 0x17698(%rip), %xmm0    # 0xf3210
subss (%rax), %xmm0
movq -0x38(%rbp), %rax
subss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0xf718(%rip), %xmm1     # 0xeb2a8
subsd -0xb0(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0xa0(%rbp)
movq -0x38(%rbp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0xf6f0(%rip), %xmm1     # 0xeb2a8
subsd -0xb0(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x90(%rbp)
movsd %xmm0, -0x98(%rbp)
movq -0x38(%rbp), %rax
movss 0x17630(%rip), %xmm0    # 0xf3210
subss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0xf6b7(%rip), %xmm1     # 0xeb2a8
subsd -0xa8(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x88(%rbp)
movq -0x38(%rbp), %rax
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0xf68e(%rip), %xmm1     # 0xeb2a8
subsd -0xa8(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x78(%rbp)
movq -0x38(%rbp), %rax
movss 0x175d1(%rip), %xmm0    # 0xf3210
subss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x70(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x68(%rbp)
movq -0x38(%rbp), %rax
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x60(%rbp)
movq -0x38(%rbp), %rax
movss 0x1759d(%rip), %xmm0    # 0xf3210
subss (%rax), %xmm0
cvtsi2ssl -0x14(%rbp), %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0xc0(%rbp)
movq -0x38(%rbp), %rax
movss (%rax), %xmm0
cvtsi2ssl -0x14(%rbp), %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0xb8(%rbp)
xorl %eax, %eax
subl -0xcc(%rbp), %eax
movl %eax, -0xec(%rbp)
cmpl $0x0, -0xec(%rbp)
jle 0xdbcce
movl -0xec(%rbp), %eax
movl %eax, -0x378(%rbp)
jmp 0xdbcd8
xorl %eax, %eax
movl %eax, -0x378(%rbp)
jmp 0xdbcd8
movl -0x378(%rbp), %eax
movl %eax, -0xec(%rbp)
xorl %eax, %eax
subl -0xec(%rbp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, -0xd8(%rbp)
movq -0x50(%rbp), %rax
movsd 0xf5a4(%rip), %xmm0     # 0xeb2a8
movsd %xmm0, (%rax)
movq -0x40(%rbp), %rax
imulq $0x0, -0xe8(%rbp), %rcx
movslq -0xd8(%rbp), %rdx
addq %rdx, %rcx
movsd 0xf582(%rip), %xmm0     # 0xeb2a8
movsd %xmm0, (%rax,%rcx,8)
movq -0x40(%rbp), %rax
movq -0xe8(%rbp), %rcx
shlq $0x0, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0xf8(%rbp)
movl $0x1, -0x104(%rbp)
movl -0x14(%rbp), %eax
movl -0xcc(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0xdbd6d
movl -0x14(%rbp), %eax
movl %eax, -0x37c(%rbp)
jmp 0xdbd7c
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x37c(%rbp)
movl -0x37c(%rbp), %eax
movl %eax, -0x108(%rbp)
movl -0x104(%rbp), %eax
movl %eax, -0xd8(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x100(%rbp)
movl -0xd8(%rbp), %eax
cmpl -0x108(%rbp), %eax
jg 0xdbf64
movq -0x10(%rbp), %rax
movl -0xd8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x3, %eax
jg 0xdbdd6
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x3, %eax
jle 0xdbde8
movsd 0xf4ca(%rip), %xmm0     # 0xeb2a8
movsd %xmm0, -0x388(%rbp)
jmp 0xdbe5f
movq -0x10(%rbp), %rax
movl -0xd8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movq -0x20(%rbp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0xdbe2c
movq -0xc8(%rbp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0xf48a(%rip), %xmm0     # 0xeb2a8
subsd %xmm1, %xmm0
movsd %xmm0, -0x390(%rbp)
jmp 0xdbe4f
movq -0xc8(%rbp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x173d5(%rip), %xmm1    # 0xf3218
mulsd %xmm1, %xmm0
movsd %xmm0, -0x390(%rbp)
movsd -0x390(%rbp), %xmm0
movsd %xmm0, -0x388(%rbp)
movsd -0x388(%rbp), %xmm0
movsd %xmm0, -0x118(%rbp)
movl $0x1, %eax
subl -0xcc(%rbp), %eax
movl %eax, -0x11c(%rbp)
cmpl $0x0, -0x11c(%rbp)
jle 0xdbe97
movl -0x11c(%rbp), %eax
movl %eax, -0x394(%rbp)
jmp 0xdbea1
xorl %eax, %eax
movl %eax, -0x394(%rbp)
jmp 0xdbea1
movl -0x394(%rbp), %eax
movl %eax, -0x11c(%rbp)
movl -0xd8(%rbp), %eax
subl -0x11c(%rbp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, -0x10c(%rbp)
movsd -0x118(%rbp), %xmm0
mulsd -0xc0(%rbp), %xmm0
movq -0xf8(%rbp), %rax
movl -0x10c(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x1732b(%rip), %xmm0    # 0xf3220
mulsd -0xb8(%rbp), %xmm0
movq -0xf8(%rbp), %rax
movl -0x10c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0xf8(%rbp), %rax
movslq -0x10c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0xf8(%rbp), %rax
movl -0x10c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm0
addsd -0x100(%rbp), %xmm0
movsd %xmm0, -0x100(%rbp)
movl -0xd8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd8(%rbp)
jmp 0xdbd9f
movsd -0x100(%rbp), %xmm0
movq -0x50(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movl $0x2, -0xd4(%rbp)
movl -0xd4(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0xdc525
movq -0x40(%rbp), %rax
movslq -0xd4(%rbp), %rcx
imulq -0xe8(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x128(%rbp)
movq -0x40(%rbp), %rax
movl -0xd4(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq -0xe8(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x130(%rbp)
movq -0xc8(%rbp), %rax
movl -0xd4(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x140(%rbp)
movl $0x1, -0x144(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x148(%rbp)
movq -0x20(%rbp), %rax
movl -0xd4(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movb %al, -0x14d(%rbp)
movl -0xd4(%rbp), %eax
subl -0xcc(%rbp), %eax
movl %eax, -0x14c(%rbp)
movl -0x144(%rbp), %eax
cmpl -0x14c(%rbp), %eax
jle 0xdc053
movl -0x144(%rbp), %eax
movl %eax, -0x398(%rbp)
jmp 0xdc05f
movl -0x14c(%rbp), %eax
movl %eax, -0x398(%rbp)
movl -0x398(%rbp), %eax
movl %eax, -0x144(%rbp)
movl -0xd4(%rbp), %eax
addl -0xcc(%rbp), %eax
movl %eax, -0x14c(%rbp)
movl -0x148(%rbp), %eax
cmpl -0x14c(%rbp), %eax
jge 0xdc099
movl -0x148(%rbp), %eax
movl %eax, -0x39c(%rbp)
jmp 0xdc0a5
movl -0x14c(%rbp), %eax
movl %eax, -0x39c(%rbp)
movl -0x39c(%rbp), %eax
movl %eax, -0x148(%rbp)
movsd 0x1715f(%rip), %xmm0    # 0xf3218
mulsd -0x140(%rbp), %xmm0
movsd %xmm0, -0x170(%rbp)
movsd 0xf1d7(%rip), %xmm0     # 0xeb2a8
subsd -0x140(%rbp), %xmm0
movsd %xmm0, -0x168(%rbp)
movsd 0xf1bf(%rip), %xmm0     # 0xeb2a8
movsd %xmm0, -0x160(%rbp)
movsd 0xf1af(%rip), %xmm0     # 0xeb2a8
movsd %xmm0, -0x158(%rbp)
movq -0x50(%rbp), %rax
movl -0xd4(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd 0xf18f(%rip), %xmm0     # 0xeb2a8
divsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x178(%rbp)
movsd -0x178(%rbp), %xmm0
mulsd -0xa0(%rbp), %xmm0
movsd %xmm0, -0x1a0(%rbp)
movsd -0x178(%rbp), %xmm0
mulsd -0x88(%rbp), %xmm0
movsd %xmm0, -0x198(%rbp)
movsd -0x178(%rbp), %xmm0
mulsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x190(%rbp)
movsd 0x170ad(%rip), %xmm0    # 0xf3220
mulsd -0x178(%rbp), %xmm0
mulsd -0x98(%rbp), %xmm0
movsd %xmm0, -0x188(%rbp)
movsd 0x1708d(%rip), %xmm0    # 0xf3220
mulsd -0x178(%rbp), %xmm0
mulsd -0x80(%rbp), %xmm0
movsd %xmm0, -0x180(%rbp)
movl -0xd4(%rbp), %eax
subl -0xcc(%rbp), %eax
movl %eax, -0x1ac(%rbp)
cmpl $0x0, -0x1ac(%rbp)
jle 0xdc1d1
movl -0x1ac(%rbp), %eax
movl %eax, -0x3a0(%rbp)
jmp 0xdc1db
xorl %eax, %eax
movl %eax, -0x3a0(%rbp)
jmp 0xdc1db
movl -0x3a0(%rbp), %eax
movl %eax, -0x1ac(%rbp)
movl -0x144(%rbp), %eax
subl -0x1ac(%rbp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, -0x1a4(%rbp)
movl -0xd4(%rbp), %eax
subl $0x1, %eax
subl -0xcc(%rbp), %eax
movl %eax, -0x1b0(%rbp)
cmpl $0x0, -0x1b0(%rbp)
jle 0xdc22b
movl -0x1b0(%rbp), %eax
movl %eax, -0x3a4(%rbp)
jmp 0xdc235
xorl %eax, %eax
movl %eax, -0x3a4(%rbp)
jmp 0xdc235
movl -0x3a4(%rbp), %eax
movl %eax, -0x1b0(%rbp)
movl -0x144(%rbp), %eax
subl $0x1, %eax
subl -0x1b0(%rbp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, -0x1a8(%rbp)
movq -0x128(%rbp), %rax
movslq -0x1a4(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x1b8(%rbp)
movq -0x130(%rbp), %rax
movslq -0x1a8(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x1c0(%rbp)
movsd -0x90(%rbp), %xmm0
movq -0x1b8(%rbp), %rax
mulsd (%rax), %xmm0
movsd %xmm0, -0x1c8(%rbp)
movsd -0x60(%rbp), %xmm0
movq -0x1b8(%rbp), %rax
mulsd 0x10(%rax), %xmm0
movsd %xmm0, -0x1d0(%rbp)
movl -0x144(%rbp), %eax
movl %eax, -0xd8(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x138(%rbp)
movl -0xd8(%rbp), %eax
cmpl -0x148(%rbp), %eax
jg 0xdc4f9
movq -0x10(%rbp), %rax
movl -0xd8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %ecx
movb $0x1, %al
cmpl $0x3, %ecx
movb %al, -0x3a5(%rbp)
jg 0xdc325
movzbl -0x14d(%rbp), %eax
cmpl $0x3, %eax
setg %al
movb %al, -0x3a5(%rbp)
movb -0x3a5(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
shll %eax
movq -0x10(%rbp), %rcx
movl -0xd8(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
movzbl -0x14d(%rbp), %edx
cmpl %edx, %ecx
sete %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
movl %eax, -0x1d4(%rbp)
movsd -0x1a0(%rbp), %xmm0
movq -0x1c0(%rbp), %rax
mulsd (%rax), %xmm0
movsd %xmm0, -0x1e0(%rbp)
movsd -0x198(%rbp), %xmm0
movq -0x1c0(%rbp), %rax
mulsd 0x8(%rax), %xmm0
movsd %xmm0, -0x1e8(%rbp)
movsd -0x190(%rbp), %xmm0
movq -0x1c0(%rbp), %rax
mulsd 0x10(%rax), %xmm0
movsd %xmm0, -0x1f0(%rbp)
movsd -0x188(%rbp), %xmm0
movq -0x1c0(%rbp), %rax
mulsd 0x18(%rax), %xmm0
movsd %xmm0, -0x1f8(%rbp)
movsd -0x180(%rbp), %xmm0
movq -0x1c0(%rbp), %rax
mulsd 0x20(%rax), %xmm0
movsd %xmm0, -0x200(%rbp)
movslq -0x1d4(%rbp), %rax
movsd -0x170(%rbp,%rax,8), %xmm0
movsd -0x1e0(%rbp), %xmm1
addsd -0x1e8(%rbp), %xmm1
addsd -0x1f0(%rbp), %xmm1
mulsd %xmm1, %xmm0
movq -0x1b8(%rbp), %rax
movsd %xmm0, (%rax)
movsd -0x1f8(%rbp), %xmm0
addsd -0x200(%rbp), %xmm0
movq -0x1b8(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movsd -0x1c8(%rbp), %xmm0
addsd -0x1d0(%rbp), %xmm0
movq -0x1b8(%rbp), %rax
movsd %xmm0, 0x10(%rax)
movq -0x1b8(%rbp), %rax
movsd (%rax), %xmm0
movq -0x1b8(%rbp), %rax
addsd 0x8(%rax), %xmm0
movq -0x1b8(%rbp), %rax
addsd 0x10(%rax), %xmm0
addsd -0x138(%rbp), %xmm0
movsd %xmm0, -0x138(%rbp)
movsd -0x90(%rbp), %xmm0
movq -0x1b8(%rbp), %rax
mulsd (%rax), %xmm0
movsd %xmm0, -0x1c8(%rbp)
movsd -0x60(%rbp), %xmm0
movq -0x1b8(%rbp), %rax
mulsd 0x10(%rax), %xmm0
movsd %xmm0, -0x1d0(%rbp)
movl -0xd8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd8(%rbp)
movq -0x1b8(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x1b8(%rbp)
movq -0x1c0(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x1c0(%rbp)
jmp 0xdc2df
movsd -0x138(%rbp), %xmm0
movq -0x50(%rbp), %rax
movslq -0xd4(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0xd4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd4(%rbp)
jmp 0xdbf7f
movq -0x50(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsd 0xed73(%rip), %xmm0     # 0xeb2a8
divsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x210(%rbp)
movl $0x1, -0xd8(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x208(%rbp)
movl -0xd8(%rbp), %eax
cmpl -0x14(%rbp), %eax
jg 0xdc660
movl -0x24(%rbp), %eax
subl -0xcc(%rbp), %eax
movl %eax, -0x218(%rbp)
cmpl $0x0, -0x218(%rbp)
jle 0xdc58c
movl -0x218(%rbp), %eax
movl %eax, -0x3ac(%rbp)
jmp 0xdc596
xorl %eax, %eax
movl %eax, -0x3ac(%rbp)
jmp 0xdc596
movl -0x3ac(%rbp), %eax
movl %eax, -0x218(%rbp)
movl -0xd8(%rbp), %eax
subl -0x218(%rbp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, -0x214(%rbp)
cmpl $0x3, -0x214(%rbp)
jl 0xdc5d3
movslq -0x214(%rbp), %rax
cmpq -0xe8(%rbp), %rax
jb 0xdc5d5
jmp 0xdc64c
movsd -0x210(%rbp), %xmm0
movq -0x40(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq -0xe8(%rbp), %rcx
movslq -0x214(%rbp), %rdx
addq %rdx, %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd -0xb0(%rbp), %xmm2
movsd -0x210(%rbp), %xmm1
movq -0x40(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq -0xe8(%rbp), %rcx
movslq -0x214(%rbp), %rdx
addq %rdx, %rcx
mulsd 0x8(%rax,%rcx,8), %xmm1
mulsd -0xa8(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addsd -0x208(%rbp), %xmm0
movsd %xmm0, -0x208(%rbp)
movl -0xd8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd8(%rbp)
jmp 0xdc557
movsd -0x208(%rbp), %xmm0
movq -0x50(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0xec26(%rip), %xmm0     # 0xeb2a8
movsd %xmm0, -0x220(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x228(%rbp)
movl $0x0, -0xd4(%rbp)
movl -0xd4(%rbp), %eax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jg 0xdc738
movq -0x50(%rbp), %rax
movslq -0xd4(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
mulsd -0x220(%rbp), %xmm0
movsd %xmm0, -0x220(%rbp)
movsd 0x16b4d(%rip), %xmm0    # 0xf3228
ucomisd -0x220(%rbp), %xmm0
jbe 0xdc722
movsd -0x220(%rbp), %xmm0
callq 0x4380
movsd -0x228(%rbp), %xmm1
movsd 0xed86(%rip), %xmm2     # 0xeb488
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x228(%rbp)
movsd 0xeb8e(%rip), %xmm0     # 0xeb2a8
movsd %xmm0, -0x220(%rbp)
jmp 0xdc724
movl -0xd4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd4(%rbp)
jmp 0xdc69f
movsd -0x220(%rbp), %xmm0
cvtsi2sdl -0x14(%rbp), %xmm1
mulsd %xmm1, %xmm0
cvtsi2sdl -0x24(%rbp), %xmm1
mulsd %xmm1, %xmm0
callq 0x4380
movsd -0x228(%rbp), %xmm1
movsd 0xed21(%rip), %xmm2     # 0xeb488
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x228(%rbp)
movsd 0xed11(%rip), %xmm0     # 0xeb490
addsd -0x228(%rbp), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0xe0(%rbp)
cmpl $0x0, -0xdc(%rbp)
jne 0xdc7c6
movq -0x40(%rbp), %rdi
callq 0x45a0
movq -0x50(%rbp), %rdi
callq 0x45a0
movq -0xc8(%rbp), %rdi
callq 0x45a0
movl -0xe0(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xdd4fe
movl $0x1, -0xd8(%rbp)
movl -0xd8(%rbp), %eax
cmpl -0x14(%rbp), %eax
jg 0xdc8fe
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq -0xe8(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x238(%rbp)
movl -0x24(%rbp), %eax
subl -0xcc(%rbp), %eax
movl %eax, -0x23c(%rbp)
cmpl $0x0, -0x23c(%rbp)
jle 0xdc823
movl -0x23c(%rbp), %eax
movl %eax, -0x3b0(%rbp)
jmp 0xdc82d
xorl %eax, %eax
movl %eax, -0x3b0(%rbp)
jmp 0xdc82d
movl -0x3b0(%rbp), %eax
movl %eax, -0x23c(%rbp)
movl -0xd8(%rbp), %eax
subl -0x23c(%rbp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, -0x22c(%rbp)
cmpl $0x3, -0x22c(%rbp)
jl 0xdc86a
movslq -0x22c(%rbp), %rax
cmpq -0xe8(%rbp), %rax
jb 0xdc86c
jmp 0xdc8ea
movsd -0xb0(%rbp), %xmm0
movq -0x50(%rbp), %rax
movslq -0x24(%rbp), %rcx
divsd (%rax,%rcx,8), %xmm0
movq -0x50(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
divsd (%rax,%rcx,8), %xmm0
movq -0x238(%rbp), %rax
movl -0x22c(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0xa8(%rbp), %xmm0
movq -0x50(%rbp), %rax
movslq -0x24(%rbp), %rcx
divsd (%rax,%rcx,8), %xmm0
movq -0x50(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
divsd (%rax,%rcx,8), %xmm0
movq -0x238(%rbp), %rax
movl -0x22c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0xd8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd8(%rbp)
jmp 0xdc7d0
movl -0x24(%rbp), %eax
subl $0x1, %eax
movl %eax, -0xd4(%rbp)
cmpl $0x1, -0xd4(%rbp)
jl 0xdce11
movl $0x1, -0x240(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x244(%rbp)
movq -0x48(%rbp), %rax
movslq -0xd4(%rbp), %rcx
imulq -0xe8(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x250(%rbp)
movq -0x48(%rbp), %rax
movl -0xd4(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq -0xe8(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x258(%rbp)
cmpl $0x1, -0xd4(%rbp)
setg %al
andb $0x1, %al
movzbl %al, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x260(%rbp)
movq -0xc8(%rbp), %rax
movslq -0xd4(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x268(%rbp)
movq -0x20(%rbp), %rax
movslq -0xd4(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x269(%rbp)
movl -0xd4(%rbp), %eax
subl -0xcc(%rbp), %eax
movl %eax, -0x248(%rbp)
movl -0x240(%rbp), %eax
cmpl -0x248(%rbp), %eax
jle 0xdc9ed
movl -0x240(%rbp), %eax
movl %eax, -0x3b4(%rbp)
jmp 0xdc9f9
movl -0x248(%rbp), %eax
movl %eax, -0x3b4(%rbp)
movl -0x3b4(%rbp), %eax
movl %eax, -0x240(%rbp)
movl -0xd4(%rbp), %eax
addl -0xcc(%rbp), %eax
movl %eax, -0x248(%rbp)
movl -0x244(%rbp), %eax
cmpl -0x248(%rbp), %eax
jge 0xdca33
movl -0x244(%rbp), %eax
movl %eax, -0x3b8(%rbp)
jmp 0xdca3f
movl -0x248(%rbp), %eax
movl %eax, -0x3b8(%rbp)
movl -0x3b8(%rbp), %eax
movl %eax, -0x244(%rbp)
movsd 0x167c5(%rip), %xmm0    # 0xf3218
mulsd -0x268(%rbp), %xmm0
movsd %xmm0, -0x290(%rbp)
movsd 0xe83d(%rip), %xmm0     # 0xeb2a8
subsd -0x268(%rbp), %xmm0
movsd %xmm0, -0x288(%rbp)
movsd 0xe825(%rip), %xmm0     # 0xeb2a8
movsd %xmm0, -0x280(%rbp)
movsd 0xe815(%rip), %xmm0     # 0xeb2a8
movsd %xmm0, -0x278(%rbp)
movl -0xd4(%rbp), %eax
subl -0xcc(%rbp), %eax
movl %eax, -0x29c(%rbp)
cmpl $0x0, -0x29c(%rbp)
jle 0xdcac4
movl -0x29c(%rbp), %eax
movl %eax, -0x3bc(%rbp)
jmp 0xdcace
xorl %eax, %eax
movl %eax, -0x3bc(%rbp)
jmp 0xdcace
movl -0x3bc(%rbp), %eax
movl %eax, -0x29c(%rbp)
movl -0x244(%rbp), %eax
subl -0x29c(%rbp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, -0x294(%rbp)
movl -0xd4(%rbp), %eax
addl $0x1, %eax
subl -0xcc(%rbp), %eax
movl %eax, -0x2a0(%rbp)
cmpl $0x0, -0x2a0(%rbp)
jle 0xdcb1e
movl -0x2a0(%rbp), %eax
movl %eax, -0x3c0(%rbp)
jmp 0xdcb28
xorl %eax, %eax
movl %eax, -0x3c0(%rbp)
jmp 0xdcb28
movl -0x3c0(%rbp), %eax
movl %eax, -0x2a0(%rbp)
movl -0x244(%rbp), %eax
subl -0x2a0(%rbp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, -0x298(%rbp)
movq -0x250(%rbp), %rax
movslq -0x294(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x2a8(%rbp)
movq -0x258(%rbp), %rax
movslq -0x298(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x2b0(%rbp)
movq -0x2a8(%rbp), %rax
movsd 0x28(%rax), %xmm0
movsd %xmm0, -0x2b8(%rbp)
movsd 0x16680(%rip), %xmm0    # 0xf3220
mulsd -0x98(%rbp), %xmm0
movsd %xmm0, -0x2c0(%rbp)
movsd 0x16668(%rip), %xmm0    # 0xf3220
mulsd -0x80(%rbp), %xmm0
movsd %xmm0, -0x2c8(%rbp)
movq -0x50(%rbp), %rax
movslq -0xd4(%rbp), %rcx
movsd 0xe6d0(%rip), %xmm0     # 0xeb2a8
divsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x2d0(%rbp)
movl -0x244(%rbp), %eax
movl %eax, -0xd8(%rbp)
movl -0xd8(%rbp), %eax
cmpl -0x240(%rbp), %eax
jl 0xdcdfb
movl -0xd8(%rbp), %eax
cmpl -0x14(%rbp), %eax
jl 0xdcc1b
xorps %xmm0, %xmm0
movsd %xmm0, -0x3c8(%rbp)
jmp 0xdcc99
movq -0x10(%rbp), %rax
movslq -0xd8(%rbp), %rcx
movzbl (%rax,%rcx), %ecx
movb $0x1, %al
cmpl $0x3, %ecx
movb %al, -0x3c9(%rbp)
jg 0xdcc4a
movzbl -0x269(%rbp), %eax
cmpl $0x3, %eax
setg %al
movb %al, -0x3c9(%rbp)
movb -0x3c9(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
shll %eax
movq -0x10(%rbp), %rcx
movslq -0xd8(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
movzbl -0x269(%rbp), %edx
cmpl %edx, %ecx
sete %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
cltq
movsd -0x290(%rbp,%rax,8), %xmm0
movq -0x2b0(%rbp), %rax
mulsd 0x18(%rax), %xmm0
movsd %xmm0, -0x3c8(%rbp)
movsd -0x3c8(%rbp), %xmm0
movsd %xmm0, -0x2d8(%rbp)
movsd -0x2d8(%rbp), %xmm0
movsd -0x88(%rbp), %xmm2
movsd -0x2c8(%rbp), %xmm1
movq -0x2b0(%rbp), %rax
mulsd 0x8(%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x2a8(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movsd -0x2d8(%rbp), %xmm1
movsd -0xa0(%rbp), %xmm2
movsd -0x2c0(%rbp), %xmm0
movq -0x2b0(%rbp), %rax
mulsd 0x8(%rax), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd -0x90(%rbp), %xmm0
movsd -0x2b8(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x2a8(%rbp), %rax
movsd %xmm0, (%rax)
movsd -0x2d8(%rbp), %xmm0
movsd -0x70(%rbp), %xmm2
movsd -0x60(%rbp), %xmm1
mulsd -0x2b8(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
mulsd -0x260(%rbp), %xmm0
movq -0x2a8(%rbp), %rax
movsd %xmm0, 0x10(%rax)
movq -0x2a8(%rbp), %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, -0x2b8(%rbp)
movsd -0x2d0(%rbp), %xmm0
movq -0x2a8(%rbp), %rax
mulsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rax)
movsd -0x2d0(%rbp), %xmm0
movq -0x2a8(%rbp), %rax
mulsd (%rax), %xmm0
movsd %xmm0, (%rax)
movsd -0x2d0(%rbp), %xmm0
movq -0x2a8(%rbp), %rax
mulsd 0x10(%rax), %xmm0
movsd %xmm0, 0x10(%rax)
movl -0xd8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xd8(%rbp)
movq -0x2a8(%rbp), %rax
addq $-0x18, %rax
movq %rax, -0x2a8(%rbp)
movq -0x2b0(%rbp), %rax
addq $-0x18, %rax
movq %rax, -0x2b0(%rbp)
jmp 0xdcbf1
jmp 0xdcdfd
movl -0xd4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xd4(%rbp)
jmp 0xdc90a
movl $0x1, -0x2dc(%rbp)
movl -0x14(%rbp), %eax
movl -0xcc(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0xdce36
movl -0x14(%rbp), %eax
movl %eax, -0x3d0(%rbp)
jmp 0xdce45
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3d0(%rbp)
movl -0x3d0(%rbp), %eax
movl %eax, -0x2e0(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x2e8(%rbp)
movl -0x2e0(%rbp), %eax
movl %eax, -0xd8(%rbp)
movl -0xd8(%rbp), %eax
cmpl -0x2dc(%rbp), %eax
jl 0xdd032
movq -0x10(%rbp), %rax
movl -0xd8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x3, %eax
jg 0xdce9f
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x3, %eax
jle 0xdceb1
movsd 0xe401(%rip), %xmm0     # 0xeb2a8
movsd %xmm0, -0x3d8(%rbp)
jmp 0xdcf28
movq -0x10(%rbp), %rax
movl -0xd8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movq -0x20(%rbp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0xdcef5
movq -0xc8(%rbp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0xe3c1(%rip), %xmm0     # 0xeb2a8
subsd %xmm1, %xmm0
movsd %xmm0, -0x3e0(%rbp)
jmp 0xdcf18
movq -0xc8(%rbp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x1630c(%rip), %xmm1    # 0xf3218
mulsd %xmm1, %xmm0
movsd %xmm0, -0x3e0(%rbp)
movsd -0x3e0(%rbp), %xmm0
movsd %xmm0, -0x3d8(%rbp)
movsd -0x3d8(%rbp), %xmm0
movsd %xmm0, -0x2f8(%rbp)
movl $0x1, %eax
subl -0xcc(%rbp), %eax
movl %eax, -0x2fc(%rbp)
cmpl $0x0, -0x2fc(%rbp)
jle 0xdcf60
movl -0x2fc(%rbp), %eax
movl %eax, -0x3e4(%rbp)
jmp 0xdcf6a
xorl %eax, %eax
movl %eax, -0x3e4(%rbp)
jmp 0xdcf6a
movl -0x3e4(%rbp), %eax
movl %eax, -0x2fc(%rbp)
movl -0xd8(%rbp), %eax
subl -0x2fc(%rbp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, -0x2ec(%rbp)
cmpl $0x3, -0x2ec(%rbp)
jl 0xdcfa7
movslq -0x2ec(%rbp), %rax
cmpq -0xe8(%rbp), %rax
jb 0xdcfa9
jmp 0xdd01e
movsd -0x2f8(%rbp), %xmm0
movq -0x48(%rbp), %rax
movq -0xe8(%rbp), %rcx
shlq $0x0, %rcx
movslq -0x2ec(%rbp), %rdx
addq %rdx, %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd -0xc0(%rbp), %xmm2
movq -0x48(%rbp), %rax
movq -0xe8(%rbp), %rcx
shlq $0x0, %rcx
movslq -0x2ec(%rbp), %rdx
addq %rdx, %rcx
movsd 0x16228(%rip), %xmm1    # 0xf3220
mulsd 0x8(%rax,%rcx,8), %xmm1
mulsd -0xb8(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addsd -0x2e8(%rbp), %xmm0
movsd %xmm0, -0x2e8(%rbp)
movl -0xd8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xd8(%rbp)
jmp 0xdce68
xorl %eax, %eax
subl -0xcc(%rbp), %eax
movl %eax, -0x300(%rbp)
cmpl $0x0, -0x300(%rbp)
jle 0xdd057
movl -0x300(%rbp), %eax
movl %eax, -0x3e8(%rbp)
jmp 0xdd061
xorl %eax, %eax
movl %eax, -0x3e8(%rbp)
jmp 0xdd061
movl -0x3e8(%rbp), %eax
movl %eax, -0x300(%rbp)
xorl %eax, %eax
subl -0x300(%rbp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, -0xd8(%rbp)
movsd -0x2e8(%rbp), %xmm0
movq -0x50(%rbp), %rax
divsd (%rax), %xmm0
movq -0x48(%rbp), %rax
imulq $0x0, -0xe8(%rbp), %rcx
movslq -0xd8(%rbp), %rdx
addq %rdx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl $0x1, -0xd4(%rbp)
movl -0xd4(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0xdd49e
xorps %xmm0, %xmm0
movsd %xmm0, -0x308(%rbp)
movq -0x40(%rbp), %rax
movslq -0xd4(%rbp), %rcx
imulq -0xe8(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x310(%rbp)
movq -0x48(%rbp), %rax
movslq -0xd4(%rbp), %rcx
imulq -0xe8(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x318(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x320(%rbp)
movl $0x1, -0x324(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x328(%rbp)
movl $0xffffffff, -0x330(%rbp) # imm = 0xFFFFFFFF
movl -0xd4(%rbp), %eax
subl -0xcc(%rbp), %eax
movl %eax, -0x32c(%rbp)
movl -0x324(%rbp), %eax
cmpl -0x32c(%rbp), %eax
jle 0xdd168
movl -0x324(%rbp), %eax
movl %eax, -0x3ec(%rbp)
jmp 0xdd174
movl -0x32c(%rbp), %eax
movl %eax, -0x3ec(%rbp)
movl -0x3ec(%rbp), %eax
movl %eax, -0x324(%rbp)
movl -0xd4(%rbp), %eax
addl -0xcc(%rbp), %eax
movl %eax, -0x32c(%rbp)
movl -0x328(%rbp), %eax
cmpl -0x32c(%rbp), %eax
jge 0xdd1ae
movl -0x328(%rbp), %eax
movl %eax, -0x3f0(%rbp)
jmp 0xdd1ba
movl -0x32c(%rbp), %eax
movl %eax, -0x3f0(%rbp)
movl -0x3f0(%rbp), %eax
movl %eax, -0x328(%rbp)
movq -0x50(%rbp), %rax
movslq -0xd4(%rbp), %rcx
movsd 0xe0cf(%rip), %xmm0     # 0xeb2a8
divsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x338(%rbp)
movl -0xd4(%rbp), %eax
subl -0xcc(%rbp), %eax
movl %eax, -0x340(%rbp)
cmpl $0x0, -0x340(%rbp)
jle 0xdd20f
movl -0x340(%rbp), %eax
movl %eax, -0x3f4(%rbp)
jmp 0xdd219
xorl %eax, %eax
movl %eax, -0x3f4(%rbp)
jmp 0xdd219
movl -0x3f4(%rbp), %eax
movl %eax, -0x340(%rbp)
movl -0x324(%rbp), %eax
subl -0x340(%rbp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
movl %eax, -0x33c(%rbp)
movl -0x324(%rbp), %eax
movl %eax, -0xd8(%rbp)
movl -0xd8(%rbp), %eax
cmpl -0x328(%rbp), %eax
jg 0xdd3b1
movsd -0x338(%rbp), %xmm0
movq -0x310(%rbp), %rax
movl -0x33c(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm0
movq -0x318(%rbp), %rax
movl -0x33c(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x348(%rbp)
movsd -0x338(%rbp), %xmm0
movq -0x310(%rbp), %rax
movl -0x33c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm0
movq -0x318(%rbp), %rax
movl -0x33c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x350(%rbp)
movsd -0x350(%rbp), %xmm0
ucomisd -0x348(%rbp), %xmm0
seta %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x354(%rbp)
cmpl $0x0, -0x354(%rbp)
je 0xdd314
movsd -0x350(%rbp), %xmm0
movsd %xmm0, -0x400(%rbp)
jmp 0xdd324
movsd -0x348(%rbp), %xmm0
movsd %xmm0, -0x400(%rbp)
movsd -0x400(%rbp), %xmm0
movsd %xmm0, -0x360(%rbp)
movsd -0x360(%rbp), %xmm0
ucomisd -0x320(%rbp), %xmm0
jbe 0xdd36e
movsd -0x360(%rbp), %xmm0
movsd %xmm0, -0x320(%rbp)
movl -0xd8(%rbp), %eax
subl $0x1, %eax
shll $0x2, %eax
orl -0x354(%rbp), %eax
movl %eax, -0x330(%rbp)
movsd -0x348(%rbp), %xmm0
addsd -0x350(%rbp), %xmm0
addsd -0x308(%rbp), %xmm0
movsd %xmm0, -0x308(%rbp)
movl -0xd8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd8(%rbp)
movl -0x33c(%rbp), %eax
addl $0x3, %eax
movl %eax, -0x33c(%rbp)
jmp 0xdd249
movsd -0x308(%rbp), %xmm1
movsd -0x320(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x320(%rbp)
movq -0x50(%rbp), %rax
movslq -0xd4(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
mulsd -0x308(%rbp), %xmm0
movsd %xmm0, -0x308(%rbp)
cmpq $0x0, 0x10(%rbp)
je 0xdd40d
movl -0x330(%rbp), %edx
movq 0x10(%rbp), %rax
movl -0xd4(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
cmpq $0x0, 0x18(%rbp)
je 0xdd488
movsd 0xde8c(%rip), %xmm0     # 0xeb2a8
subsd -0x320(%rbp), %xmm0
callq 0x4380
movsd 0xe057(%rip), %xmm1     # 0xeb488
mulsd %xmm1, %xmm0
movsd 0xe053(%rip), %xmm1     # 0xeb490
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0xd8(%rbp)
cmpl $0x64, -0xd8(%rbp)
jle 0xdd461
movl $0x63, %eax
movl %eax, -0x404(%rbp)
jmp 0xdd46d
movl -0xd8(%rbp), %eax
movl %eax, -0x404(%rbp)
movl -0x404(%rbp), %eax
movb %al, %dl
movq 0x18(%rbp), %rax
movl -0xd4(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0xdd48a
movl -0xd4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd4(%rbp)
jmp 0xdd0b6
movq -0x40(%rbp), %rdi
callq 0x45a0
movq -0x48(%rbp), %rdi
callq 0x45a0
movq -0x50(%rbp), %rdi
callq 0x45a0
movq -0xc8(%rbp), %rdi
callq 0x45a0
movl -0xe0(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xdd4fe
movq -0x40(%rbp), %rdi
callq 0x45a0
movq -0x48(%rbp), %rdi
callq 0x45a0
movq -0x50(%rbp), %rdi
callq 0x45a0
movq -0xc8(%rbp), %rdi
callq 0x45a0
movl $0x80000000, -0x4(%rbp) # imm = 0x80000000
movl -0x4(%rbp), %eax
addq $0x410, %rsp            # imm = 0x410
popq %rbp
retq
nopw (%rax,%rax)