// File: chfeder[P]turbulence_generator/./TurbGen.h
// Function: TurbGen::get_turb_vector_unigrid(double const*, double const*, int const*, float**)
void get_turb_vector_unigrid(const double pos_beg[], const double pos_end[], const int n[], float * return_grid[]) {
        // ******************************************************
        // Compute physical turbulent vector field on a uniform grid, provided
        // start coordinate pos_beg[ndim] and end coordinate pos_end[ndim]
        // of the grid and number of points in grid n[ndim].
        // Return into turbulent vector field into float * return_grid[ndim].
        // Note that index in return_grid[X][index] is looped with x (index i)
        // as the inner loop and with z (index k) as the outer loop.
        // ******************************************************
        if (verbose > 1) TurbGen_printf(FuncSig(__func__)+"entering.\n");
        if (verbose > 1) TurbGen_printf("pos_beg = %f %f %f, pos_end = %f %f %f, n = %i %i %i\n",
                pos_beg[X], pos_beg[Y], pos_beg[Z], pos_end[X], pos_end[Y], pos_end[Z], n[X], n[Y], n[Z]);

        // compute output grid cell width (dx, dy, dz)
        double del[3] = {1.0, 1.0, 1.0};
        for (int d = 0; d < (int)ndim; d++) if (n[d] > 1) del[d] = (pos_end[d] - pos_beg[d]) / (n[d]-1);
        // pre-compute amplitude including normalisation factors
        std::vector<double> ampl(nmodes);
        for (int m = 0; m < nmodes; m++) ampl[m] = 2.0 * sol_weight_norm * this->ampl[m];
        // pre-compute grid position geometry, and trigonometry, to speed-up loops over modes below
        std::vector< std::vector<double> > sinxi(n[X], std::vector<double>(nmodes));
        std::vector< std::vector<double> > cosxi(n[X], std::vector<double>(nmodes));
        std::vector< std::vector<double> > sinyj(n[Y], std::vector<double>(nmodes));
        std::vector< std::vector<double> > cosyj(n[Y], std::vector<double>(nmodes));
        std::vector< std::vector<double> > sinzk(n[Z], std::vector<double>(nmodes));
        std::vector< std::vector<double> > coszk(n[Z], std::vector<double>(nmodes));
        for (int m = 0; m < nmodes; m++) {
            for (int i = 0; i < n[X]; i++) {
                sinxi[i][m] = sin(mode[X][m]*(pos_beg[X]+i*del[X]));
                cosxi[i][m] = cos(mode[X][m]*(pos_beg[X]+i*del[X]));
            }
            for (int j = 0; j < n[Y]; j++) {
                if ((int)ndim > 1) {
                    sinyj[j][m] = sin(mode[Y][m]*(pos_beg[Y]+j*del[Y]));
                    cosyj[j][m] = cos(mode[Y][m]*(pos_beg[Y]+j*del[Y]));
                } else {
                    sinyj[j][m] = 0.0;
                    cosyj[j][m] = 1.0;
                }
            }
            for (int k = 0; k < n[Z]; k++) {
                if ((int)ndim > 2) {
                    sinzk[k][m] = sin(mode[Z][m]*(pos_beg[Z]+k*del[Z]));
                    coszk[k][m] = cos(mode[Z][m]*(pos_beg[Z]+k*del[Z]));
                } else {
                    sinzk[k][m] = 0.0;
                    coszk[k][m] = 1.0;
                }
            }
        }
        // scratch variables
        double v[3];
        double real, imag;
        // loop over cells in return_grid
        for (int k = 0; k < n[Z]; k++) {
            for (int j = 0; j < n[Y]; j++) {
                for (int i = 0; i < n[X]; i++) {
                    // clear
                    v[X] = 0.0; v[Y] = 0.0; v[Z] = 0.0;
                    // loop over modes
                    for (int m = 0; m < nmodes; m++) {
                        // these are the real and imaginary parts, respectively, of
                        //  e^{ i \vec{k} \cdot \vec{x} } = cos(kx*x + ky*y + kz*z) + i sin(kx*x + ky*y + kz*z)
                        real =  ( cosxi[i][m]*cosyj[j][m] - sinxi[i][m]*sinyj[j][m] ) * coszk[k][m] -
                                ( sinxi[i][m]*cosyj[j][m] + cosxi[i][m]*sinyj[j][m] ) * sinzk[k][m];
                        imag =  ( cosyj[j][m]*sinzk[k][m] + sinyj[j][m]*coszk[k][m] ) * cosxi[i][m] +
                                ( cosyj[j][m]*coszk[k][m] - sinyj[j][m]*sinzk[k][m] ) * sinxi[i][m];
                        // accumulate total v as sum over modes
                        v[X] += ampl[m] * (aka[X][m]*real - akb[X][m]*imag);
                        if (ncmp > 1) v[Y] += ampl[m] * (aka[Y][m]*real - akb[Y][m]*imag);
                        if (ncmp > 2) v[Z] += ampl[m] * (aka[Z][m]*real - akb[Z][m]*imag);
                    }
                    // copy into return grid
                    long index = k*n[X]*n[Y] + j*n[X] + i;
                    return_grid[X][index] = v[X] * ampl_factor[X];
                    if (ncmp > 1) return_grid[Y][index] = v[Y] * ampl_factor[Y];
                    if (ncmp > 2) return_grid[Z][index] = v[Z] * ampl_factor[Z];
                } // i
            } // j
        } // k
        if (verbose > 1) TurbGen_printf(FuncSig(__func__)+"exiting.\n");
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x520, %rsp            # imm = 0x520
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x318(%rbp)
cmpl $0x1, (%rax)
jle 0x5d1e
leaq -0x89(%rbp), %rdi
movq %rdi, -0x320(%rbp)
callq 0x3560
movq -0x320(%rbp), %rdx
leaq 0x105cb(%rip), %rsi     # 0x161ef
leaq -0x88(%rbp), %rdi
callq 0x4620
jmp 0x5c32
movq -0x318(%rbp), %rsi
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0x9b50
jmp 0x5c4b
leaq 0xf809(%rip), %rdx      # 0x1545b
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x9b00
jmp 0x5c61
movq -0x318(%rbp), %rdi
xorl %eax, %eax
leaq -0x48(%rbp), %rsi
callq 0x99f0
jmp 0x5c75
leaq -0x48(%rbp), %rdi
callq 0x31e0
leaq -0x68(%rbp), %rdi
callq 0x31e0
leaq -0x88(%rbp), %rdi
callq 0x31e0
leaq -0x89(%rbp), %rdi
callq 0x3350
jmp 0x5d1e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x5d0d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x5d01
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x5cf8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x31e0
leaq -0x68(%rbp), %rdi
callq 0x31e0
leaq -0x88(%rbp), %rdi
callq 0x31e0
leaq -0x89(%rbp), %rdi
callq 0x3350
jmp 0x754a
movq -0x318(%rbp), %rax
cmpl $0x1, (%rax)
jle 0x5e02
leaq -0xc1(%rbp), %rdi
movq %rdi, -0x328(%rbp)
callq 0x3560
movq -0x328(%rbp), %rdx
leaq 0x104b8(%rip), %rsi     # 0x16207
leaq -0xc0(%rbp), %rdi
callq 0x4620
jmp 0x5d5d
movq -0x318(%rbp), %rdi
movq -0x10(%rbp), %rax
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movsd 0x10(%rax), %xmm2
movq -0x18(%rbp), %rax
movsd (%rax), %xmm3
movsd 0x8(%rax), %xmm4
movsd 0x10(%rax), %xmm5
movq -0x20(%rbp), %rax
movl (%rax), %edx
movl 0x4(%rax), %ecx
movl 0x8(%rax), %r8d
leaq -0xc0(%rbp), %rsi
movb $0x6, %al
callq 0x99f0
jmp 0x5da5
leaq -0xc0(%rbp), %rdi
callq 0x31e0
leaq -0xc1(%rbp), %rdi
callq 0x3350
jmp 0x5e02
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x5df1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x31e0
leaq -0xc1(%rbp), %rdi
callq 0x3350
jmp 0x754a
movq 0x10517(%rip), %rax     # 0x16320
movq %rax, -0xe0(%rbp)
movq 0x10511(%rip), %rax     # 0x16328
movq %rax, -0xd8(%rbp)
movq 0x1050b(%rip), %rax     # 0x16330
movq %rax, -0xd0(%rbp)
movl $0x0, -0xe4(%rbp)
movq -0x318(%rbp), %rcx
movl -0xe4(%rbp), %eax
cvttsd2si 0x158(%rcx), %ecx
cmpl %ecx, %eax
jge 0x5ebf
movq -0x20(%rbp), %rax
movslq -0xe4(%rbp), %rcx
cmpl $0x1, (%rax,%rcx,4)
jle 0x5ea9
movq -0x18(%rbp), %rax
movslq -0xe4(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movslq -0xe4(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm0
movq -0x20(%rbp), %rax
movslq -0xe4(%rbp), %rcx
movl (%rax,%rcx,4), %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
movslq -0xe4(%rbp), %rax
movsd %xmm0, -0xe0(%rbp,%rax,8)
jmp 0x5eab
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x5e36
movq -0x318(%rbp), %rax
movslq 0x154(%rax), %rax
movq %rax, -0x338(%rbp)
leaq -0x101(%rbp), %rdi
movq %rdi, -0x330(%rbp)
callq 0x12b90
movq -0x338(%rbp), %rsi
movq -0x330(%rbp), %rdx
leaq -0x100(%rbp), %rdi
callq 0x12bb0
jmp 0x5f03
leaq -0x101(%rbp), %rdi
callq 0xf850
movl $0x0, -0x108(%rbp)
movq -0x318(%rbp), %rcx
movl -0x108(%rbp), %eax
cmpl 0x154(%rcx), %eax
jge 0x5fce
movq -0x318(%rbp), %rdi
movsd 0xf0ef(%rip), %xmm0     # 0x15030
mulsd 0x1d8(%rdi), %xmm0
movsd %xmm0, -0x348(%rbp)
addq $0x138, %rdi            # imm = 0x138
movslq -0x108(%rbp), %rsi
callq 0xad50
movsd -0x348(%rbp), %xmm0
mulsd (%rax), %xmm0
movsd %xmm0, -0x340(%rbp)
movslq -0x108(%rbp), %rsi
leaq -0x100(%rbp), %rdi
callq 0xad50
movsd -0x340(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x108(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x108(%rbp)
jmp 0x5f19
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x101(%rbp), %rdi
callq 0xf850
jmp 0x754a
movq -0x318(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq (%rcx), %rcx
movq %rcx, -0x360(%rbp)
movslq 0x154(%rax), %rax
movq %rax, -0x358(%rbp)
leaq -0x139(%rbp), %rdi
movq %rdi, -0x350(%rbp)
callq 0x12b90
movq -0x358(%rbp), %rsi
movq -0x350(%rbp), %rdx
leaq -0x138(%rbp), %rdi
callq 0x12bb0
jmp 0x6020
leaq -0x13a(%rbp), %rdi
movq %rdi, -0x368(%rbp)
callq 0x12d80
movq -0x360(%rbp), %rsi
movq -0x368(%rbp), %rcx
leaq -0x120(%rbp), %rdi
leaq -0x138(%rbp), %rdx
callq 0x12da0
jmp 0x6056
leaq -0x13a(%rbp), %rdi
callq 0x12e20
leaq -0x138(%rbp), %rdi
callq 0x7660
leaq -0x139(%rbp), %rdi
callq 0xf850
movq -0x318(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq (%rcx), %rcx
movq %rcx, -0x380(%rbp)
movslq 0x154(%rax), %rax
movq %rax, -0x378(%rbp)
leaq -0x171(%rbp), %rdi
movq %rdi, -0x370(%rbp)
callq 0x12b90
movq -0x378(%rbp), %rsi
movq -0x370(%rbp), %rdx
leaq -0x170(%rbp), %rdi
callq 0x12bb0
jmp 0x60cc
leaq -0x172(%rbp), %rdi
movq %rdi, -0x388(%rbp)
callq 0x12d80
movq -0x380(%rbp), %rsi
movq -0x388(%rbp), %rcx
leaq -0x158(%rbp), %rdi
leaq -0x170(%rbp), %rdx
callq 0x12da0
jmp 0x6102
leaq -0x172(%rbp), %rdi
callq 0x12e20
leaq -0x170(%rbp), %rdi
callq 0x7660
leaq -0x171(%rbp), %rdi
callq 0xf850
movq -0x318(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq 0x4(%rcx), %rcx
movq %rcx, -0x3a0(%rbp)
movslq 0x154(%rax), %rax
movq %rax, -0x398(%rbp)
leaq -0x1a9(%rbp), %rdi
movq %rdi, -0x390(%rbp)
callq 0x12b90
movq -0x398(%rbp), %rsi
movq -0x390(%rbp), %rdx
leaq -0x1a8(%rbp), %rdi
callq 0x12bb0
jmp 0x6179
leaq -0x1aa(%rbp), %rdi
movq %rdi, -0x3a8(%rbp)
callq 0x12d80
movq -0x3a0(%rbp), %rsi
movq -0x3a8(%rbp), %rcx
leaq -0x190(%rbp), %rdi
leaq -0x1a8(%rbp), %rdx
callq 0x12da0
jmp 0x61af
leaq -0x1aa(%rbp), %rdi
callq 0x12e20
leaq -0x1a8(%rbp), %rdi
callq 0x7660
leaq -0x1a9(%rbp), %rdi
callq 0xf850
movq -0x318(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq 0x4(%rcx), %rcx
movq %rcx, -0x3c0(%rbp)
movslq 0x154(%rax), %rax
movq %rax, -0x3b8(%rbp)
leaq -0x1e1(%rbp), %rdi
movq %rdi, -0x3b0(%rbp)
callq 0x12b90
movq -0x3b8(%rbp), %rsi
movq -0x3b0(%rbp), %rdx
leaq -0x1e0(%rbp), %rdi
callq 0x12bb0
jmp 0x6226
leaq -0x1e2(%rbp), %rdi
movq %rdi, -0x3c8(%rbp)
callq 0x12d80
movq -0x3c0(%rbp), %rsi
movq -0x3c8(%rbp), %rcx
leaq -0x1c8(%rbp), %rdi
leaq -0x1e0(%rbp), %rdx
callq 0x12da0
jmp 0x625c
leaq -0x1e2(%rbp), %rdi
callq 0x12e20
leaq -0x1e0(%rbp), %rdi
callq 0x7660
leaq -0x1e1(%rbp), %rdi
callq 0xf850
movq -0x318(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq 0x8(%rcx), %rcx
movq %rcx, -0x3e0(%rbp)
movslq 0x154(%rax), %rax
movq %rax, -0x3d8(%rbp)
leaq -0x219(%rbp), %rdi
movq %rdi, -0x3d0(%rbp)
callq 0x12b90
movq -0x3d8(%rbp), %rsi
movq -0x3d0(%rbp), %rdx
leaq -0x218(%rbp), %rdi
callq 0x12bb0
jmp 0x62d3
leaq -0x21a(%rbp), %rdi
movq %rdi, -0x3e8(%rbp)
callq 0x12d80
movq -0x3e0(%rbp), %rsi
movq -0x3e8(%rbp), %rcx
leaq -0x200(%rbp), %rdi
leaq -0x218(%rbp), %rdx
callq 0x12da0
jmp 0x6309
leaq -0x21a(%rbp), %rdi
callq 0x12e20
leaq -0x218(%rbp), %rdi
callq 0x7660
leaq -0x219(%rbp), %rdi
callq 0xf850
movq -0x318(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq 0x8(%rcx), %rcx
movq %rcx, -0x400(%rbp)
movslq 0x154(%rax), %rax
movq %rax, -0x3f8(%rbp)
leaq -0x251(%rbp), %rdi
movq %rdi, -0x3f0(%rbp)
callq 0x12b90
movq -0x3f8(%rbp), %rsi
movq -0x3f0(%rbp), %rdx
leaq -0x250(%rbp), %rdi
callq 0x12bb0
jmp 0x6380
leaq -0x252(%rbp), %rdi
movq %rdi, -0x408(%rbp)
callq 0x12d80
movq -0x400(%rbp), %rsi
movq -0x408(%rbp), %rcx
leaq -0x238(%rbp), %rdi
leaq -0x250(%rbp), %rdx
callq 0x12da0
jmp 0x63b6
leaq -0x252(%rbp), %rdi
callq 0x12e20
leaq -0x250(%rbp), %rdi
callq 0x7660
leaq -0x251(%rbp), %rdi
callq 0xf850
movl $0x0, -0x258(%rbp)
movq -0x318(%rbp), %rcx
movl -0x258(%rbp), %eax
cmpl 0x154(%rcx), %eax
jge 0x6a55
movl $0x0, -0x25c(%rbp)
movl -0x25c(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x66fb
movq -0x318(%rbp), %rdi
addq $0x48, %rdi
movslq -0x258(%rbp), %rsi
callq 0xad50
movsd (%rax), %xmm0
movq -0x10(%rbp), %rax
movsd (%rax), %xmm2
cvtsi2sdl -0x25c(%rbp), %xmm1
movsd -0xe0(%rbp), %xmm3
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
callq 0x30a0
movsd %xmm0, -0x418(%rbp)
movslq -0x25c(%rbp), %rsi
leaq -0x120(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x258(%rbp), %rsi
callq 0xad50
movsd -0x418(%rbp), %xmm0
movq -0x318(%rbp), %rdi
movsd %xmm0, (%rax)
addq $0x48, %rdi
movslq -0x258(%rbp), %rsi
callq 0xad50
movsd (%rax), %xmm0
movq -0x10(%rbp), %rax
movsd (%rax), %xmm2
cvtsi2sdl -0x25c(%rbp), %xmm1
movsd -0xe0(%rbp), %xmm3
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
callq 0x35a0
movsd %xmm0, -0x410(%rbp)
movslq -0x25c(%rbp), %rsi
leaq -0x158(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x258(%rbp), %rsi
callq 0xad50
movsd -0x410(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x25c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x25c(%rbp)
jmp 0x6407
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x655f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x13a(%rbp), %rdi
callq 0x12e20
leaq -0x138(%rbp), %rdi
callq 0x7660
leaq -0x139(%rbp), %rdi
callq 0xf850
jmp 0x753e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x65ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x172(%rbp), %rdi
callq 0x12e20
leaq -0x170(%rbp), %rdi
callq 0x7660
leaq -0x171(%rbp), %rdi
callq 0xf850
jmp 0x7532
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x65fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x1aa(%rbp), %rdi
callq 0x12e20
leaq -0x1a8(%rbp), %rdi
callq 0x7660
leaq -0x1a9(%rbp), %rdi
callq 0xf850
jmp 0x7526
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x664c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x1e2(%rbp), %rdi
callq 0x12e20
leaq -0x1e0(%rbp), %rdi
callq 0x7660
leaq -0x1e1(%rbp), %rdi
callq 0xf850
jmp 0x751a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x669b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x21a(%rbp), %rdi
callq 0x12e20
leaq -0x218(%rbp), %rdi
callq 0x7660
leaq -0x219(%rbp), %rdi
callq 0xf850
jmp 0x750e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x66ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x252(%rbp), %rdi
callq 0x12e20
leaq -0x250(%rbp), %rdi
callq 0x7660
leaq -0x251(%rbp), %rdi
callq 0xf850
jmp 0x7502
movl $0x0, -0x260(%rbp)
movl -0x260(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x689d
movq -0x318(%rbp), %rax
cvttsd2si 0x158(%rax), %eax
cmpl $0x1, %eax
jle 0x6830
movq -0x318(%rbp), %rdi
addq $0x48, %rdi
addq $0x18, %rdi
movslq -0x258(%rbp), %rsi
callq 0xad50
movsd (%rax), %xmm0
movq -0x10(%rbp), %rax
movsd 0x8(%rax), %xmm2
cvtsi2sdl -0x260(%rbp), %xmm1
movsd -0xd8(%rbp), %xmm3
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
callq 0x30a0
movsd %xmm0, -0x428(%rbp)
movslq -0x260(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x258(%rbp), %rsi
callq 0xad50
movsd -0x428(%rbp), %xmm0
movq -0x318(%rbp), %rdi
movsd %xmm0, (%rax)
addq $0x48, %rdi
addq $0x18, %rdi
movslq -0x258(%rbp), %rsi
callq 0xad50
movsd (%rax), %xmm0
movq -0x10(%rbp), %rax
movsd 0x8(%rax), %xmm2
cvtsi2sdl -0x260(%rbp), %xmm1
movsd -0xd8(%rbp), %xmm3
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
callq 0x35a0
movsd %xmm0, -0x420(%rbp)
movslq -0x260(%rbp), %rsi
leaq -0x1c8(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x258(%rbp), %rsi
callq 0xad50
movsd -0x420(%rbp), %xmm0
movsd %xmm0, (%rax)
jmp 0x6887
movslq -0x260(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x258(%rbp), %rsi
callq 0xad50
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
movslq -0x260(%rbp), %rsi
leaq -0x1c8(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x258(%rbp), %rsi
callq 0xad50
movsd 0xe795(%rip), %xmm0     # 0x15018
movsd %xmm0, (%rax)
jmp 0x6889
movl -0x260(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x260(%rbp)
jmp 0x6705
movl $0x0, -0x264(%rbp)
movl -0x264(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x6a3f
movq -0x318(%rbp), %rax
cvttsd2si 0x158(%rax), %eax
cmpl $0x2, %eax
jle 0x69d2
movq -0x318(%rbp), %rdi
addq $0x48, %rdi
addq $0x30, %rdi
movslq -0x258(%rbp), %rsi
callq 0xad50
movsd (%rax), %xmm0
movq -0x10(%rbp), %rax
movsd 0x10(%rax), %xmm2
cvtsi2sdl -0x264(%rbp), %xmm1
movsd -0xd0(%rbp), %xmm3
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
callq 0x30a0
movsd %xmm0, -0x438(%rbp)
movslq -0x264(%rbp), %rsi
leaq -0x200(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x258(%rbp), %rsi
callq 0xad50
movsd -0x438(%rbp), %xmm0
movq -0x318(%rbp), %rdi
movsd %xmm0, (%rax)
addq $0x48, %rdi
addq $0x30, %rdi
movslq -0x258(%rbp), %rsi
callq 0xad50
movsd (%rax), %xmm0
movq -0x10(%rbp), %rax
movsd 0x10(%rax), %xmm2
cvtsi2sdl -0x264(%rbp), %xmm1
movsd -0xd0(%rbp), %xmm3
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
callq 0x35a0
movsd %xmm0, -0x430(%rbp)
movslq -0x264(%rbp), %rsi
leaq -0x238(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x258(%rbp), %rsi
callq 0xad50
movsd -0x430(%rbp), %xmm0
movsd %xmm0, (%rax)
jmp 0x6a29
movslq -0x264(%rbp), %rsi
leaq -0x200(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x258(%rbp), %rsi
callq 0xad50
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
movslq -0x264(%rbp), %rsi
leaq -0x238(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x258(%rbp), %rsi
callq 0xad50
movsd 0xe5f3(%rip), %xmm0     # 0x15018
movsd %xmm0, (%rax)
jmp 0x6a2b
movl -0x264(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x264(%rbp)
jmp 0x68a7
jmp 0x6a41
movl -0x258(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x258(%rbp)
jmp 0x63e4
movl $0x0, -0x294(%rbp)
movl -0x294(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x7356
movl $0x0, -0x298(%rbp)
movl -0x298(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x7340
movl $0x0, -0x29c(%rbp)
movl -0x29c(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x732a
xorps %xmm0, %xmm0
movsd %xmm0, -0x280(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x278(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x270(%rbp)
movl $0x0, -0x2a0(%rbp)
movq -0x318(%rbp), %rcx
movl -0x2a0(%rbp), %eax
cmpl 0x154(%rcx), %eax
jge 0x723b
movslq -0x29c(%rbp), %rsi
leaq -0x158(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movsd (%rax), %xmm0
movsd %xmm0, -0x4d8(%rbp)
movslq -0x298(%rbp), %rsi
leaq -0x1c8(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movsd (%rax), %xmm0
movsd %xmm0, -0x4d0(%rbp)
movslq -0x29c(%rbp), %rsi
leaq -0x120(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movsd (%rax), %xmm0
movsd %xmm0, -0x4e0(%rbp)
movslq -0x298(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movsd -0x4e0(%rbp), %xmm1
movsd -0x4d8(%rbp), %xmm0
movsd -0x4d0(%rbp), %xmm2
mulsd (%rax), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x4a8(%rbp)
movslq -0x294(%rbp), %rsi
leaq -0x238(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movsd (%rax), %xmm0
movsd %xmm0, -0x4a0(%rbp)
movslq -0x29c(%rbp), %rsi
leaq -0x120(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movsd (%rax), %xmm0
movsd %xmm0, -0x4c0(%rbp)
movslq -0x298(%rbp), %rsi
leaq -0x1c8(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movsd (%rax), %xmm0
movsd %xmm0, -0x4b8(%rbp)
movslq -0x29c(%rbp), %rsi
leaq -0x158(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movsd (%rax), %xmm0
movsd %xmm0, -0x4c8(%rbp)
movslq -0x298(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movsd -0x4c8(%rbp), %xmm1
movsd -0x4c0(%rbp), %xmm0
movsd -0x4b8(%rbp), %xmm2
mulsd (%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x4b0(%rbp)
movslq -0x294(%rbp), %rsi
leaq -0x200(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movsd -0x4b0(%rbp), %xmm1
movsd -0x4a8(%rbp), %xmm0
movsd -0x4a0(%rbp), %xmm2
mulsd (%rax), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x288(%rbp)
movslq -0x298(%rbp), %rsi
leaq -0x1c8(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movsd (%rax), %xmm0
movsd %xmm0, -0x490(%rbp)
movslq -0x294(%rbp), %rsi
leaq -0x200(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movsd (%rax), %xmm0
movsd %xmm0, -0x488(%rbp)
movslq -0x298(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movsd (%rax), %xmm0
movsd %xmm0, -0x498(%rbp)
movslq -0x294(%rbp), %rsi
leaq -0x238(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movsd -0x498(%rbp), %xmm1
movsd -0x490(%rbp), %xmm0
movsd -0x488(%rbp), %xmm2
mulsd (%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x460(%rbp)
movslq -0x29c(%rbp), %rsi
leaq -0x158(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movsd (%rax), %xmm0
movsd %xmm0, -0x458(%rbp)
movslq -0x298(%rbp), %rsi
leaq -0x1c8(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movsd (%rax), %xmm0
movsd %xmm0, -0x478(%rbp)
movslq -0x294(%rbp), %rsi
leaq -0x238(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movsd (%rax), %xmm0
movsd %xmm0, -0x470(%rbp)
movslq -0x298(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movsd (%rax), %xmm0
movsd %xmm0, -0x480(%rbp)
movslq -0x294(%rbp), %rsi
leaq -0x200(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movsd -0x480(%rbp), %xmm1
movsd -0x478(%rbp), %xmm0
movsd -0x470(%rbp), %xmm2
mulsd (%rax), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x468(%rbp)
movslq -0x29c(%rbp), %rsi
leaq -0x120(%rbp), %rdi
callq 0x12e40
movq %rax, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movsd -0x468(%rbp), %xmm1
movsd -0x460(%rbp), %xmm0
movsd -0x458(%rbp), %xmm2
mulsd (%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x290(%rbp)
movslq -0x2a0(%rbp), %rsi
leaq -0x100(%rbp), %rdi
callq 0xad50
movq -0x318(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x440(%rbp)
addq $0x90, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movq -0x318(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x450(%rbp)
movsd -0x288(%rbp), %xmm0
movsd %xmm0, -0x448(%rbp)
addq $0xd8, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movsd -0x450(%rbp), %xmm2
movsd -0x448(%rbp), %xmm3
movsd -0x440(%rbp), %xmm0
movq %rax, %rcx
movq -0x318(%rbp), %rax
movsd (%rcx), %xmm1
mulsd -0x290(%rbp), %xmm1
movq %xmm1, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm1
mulsd %xmm3, %xmm2
addsd %xmm1, %xmm2
movsd -0x280(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x280(%rbp)
cmpl $0x1, 0x160(%rax)
jle 0x713f
movslq -0x2a0(%rbp), %rsi
leaq -0x100(%rbp), %rdi
callq 0xad50
movq -0x318(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x4e8(%rbp)
addq $0x90, %rdi
addq $0x18, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movq -0x318(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x4f8(%rbp)
movsd -0x288(%rbp), %xmm0
movsd %xmm0, -0x4f0(%rbp)
addq $0xd8, %rdi
addq $0x18, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movsd -0x4f8(%rbp), %xmm2
movsd -0x4f0(%rbp), %xmm3
movsd -0x4e8(%rbp), %xmm0
movsd (%rax), %xmm1
mulsd -0x290(%rbp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm3, %xmm2
addsd %xmm1, %xmm2
movsd -0x278(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x278(%rbp)
movq -0x318(%rbp), %rax
cmpl $0x2, 0x160(%rax)
jle 0x7225
movslq -0x2a0(%rbp), %rsi
leaq -0x100(%rbp), %rdi
callq 0xad50
movq -0x318(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x500(%rbp)
addq $0x90, %rdi
addq $0x30, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movq -0x318(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x510(%rbp)
movsd -0x288(%rbp), %xmm0
movsd %xmm0, -0x508(%rbp)
addq $0xd8, %rdi
addq $0x30, %rdi
movslq -0x2a0(%rbp), %rsi
callq 0xad50
movsd -0x510(%rbp), %xmm2
movsd -0x508(%rbp), %xmm3
movsd -0x500(%rbp), %xmm0
movsd (%rax), %xmm1
mulsd -0x290(%rbp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm3, %xmm2
addsd %xmm1, %xmm2
movsd -0x270(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x270(%rbp)
jmp 0x7227
movl -0x2a0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2a0(%rbp)
jmp 0x6ad6
movq -0x318(%rbp), %rax
movl -0x294(%rbp), %ecx
movq -0x20(%rbp), %rdx
imull (%rdx), %ecx
movq -0x20(%rbp), %rdx
imull 0x4(%rdx), %ecx
movl -0x298(%rbp), %edx
movq -0x20(%rbp), %rsi
imull (%rsi), %edx
addl %edx, %ecx
addl -0x29c(%rbp), %ecx
movslq %ecx, %rcx
movq %rcx, -0x2a8(%rbp)
movsd -0x280(%rbp), %xmm0
mulsd 0x1f8(%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x28(%rbp), %rcx
movq (%rcx), %rcx
movq -0x2a8(%rbp), %rdx
movss %xmm0, (%rcx,%rdx,4)
cmpl $0x1, 0x160(%rax)
jle 0x72d5
movq -0x318(%rbp), %rax
movsd -0x278(%rbp), %xmm0
mulsd 0x200(%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x2a8(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movq -0x318(%rbp), %rax
cmpl $0x2, 0x160(%rax)
jle 0x7314
movq -0x318(%rbp), %rax
movsd -0x270(%rbp), %xmm0
mulsd 0x208(%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x2a8(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
jmp 0x7316
movl -0x29c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x29c(%rbp)
jmp 0x6a99
jmp 0x732c
movl -0x298(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x298(%rbp)
jmp 0x6a7c
jmp 0x7342
movl -0x294(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x294(%rbp)
jmp 0x6a5f
movq -0x318(%rbp), %rax
cmpl $0x1, (%rax)
jle 0x74a5
leaq -0x309(%rbp), %rdi
movq %rdi, -0x518(%rbp)
callq 0x3560
movq -0x518(%rbp), %rdx
leaq 0xee68(%rip), %rsi      # 0x161ef
leaq -0x308(%rbp), %rdi
callq 0x4620
jmp 0x7395
movq -0x318(%rbp), %rsi
leaq -0x2e8(%rbp), %rdi
leaq -0x308(%rbp), %rdx
callq 0x9b50
jmp 0x73b1
leaq 0xe271(%rip), %rdx      # 0x15629
leaq -0x2c8(%rbp), %rdi
leaq -0x2e8(%rbp), %rsi
callq 0x9b00
jmp 0x73cd
movq -0x318(%rbp), %rdi
xorl %eax, %eax
leaq -0x2c8(%rbp), %rsi
callq 0x99f0
jmp 0x73e4
leaq -0x2c8(%rbp), %rdi
callq 0x31e0
leaq -0x2e8(%rbp), %rdi
callq 0x31e0
leaq -0x308(%rbp), %rdi
callq 0x31e0
leaq -0x309(%rbp), %rdi
callq 0x3350
jmp 0x74a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x748b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x747f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x7473
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x2c8(%rbp), %rdi
callq 0x31e0
leaq -0x2e8(%rbp), %rdi
callq 0x31e0
leaq -0x308(%rbp), %rdi
callq 0x31e0
leaq -0x309(%rbp), %rdi
callq 0x3350
leaq -0x238(%rbp), %rdi
callq 0x12e60
jmp 0x7502
leaq -0x238(%rbp), %rdi
callq 0x12e60
leaq -0x200(%rbp), %rdi
callq 0x12e60
leaq -0x1c8(%rbp), %rdi
callq 0x12e60
leaq -0x190(%rbp), %rdi
callq 0x12e60
leaq -0x158(%rbp), %rdi
callq 0x12e60
leaq -0x120(%rbp), %rdi
callq 0x12e60
leaq -0x100(%rbp), %rdi
callq 0x7660
addq $0x520, %rsp            # imm = 0x520
popq %rbp
retq
leaq -0x200(%rbp), %rdi
callq 0x12e60
leaq -0x1c8(%rbp), %rdi
callq 0x12e60
leaq -0x190(%rbp), %rdi
callq 0x12e60
leaq -0x158(%rbp), %rdi
callq 0x12e60
leaq -0x120(%rbp), %rdi
callq 0x12e60
leaq -0x100(%rbp), %rdi
callq 0x7660
movq -0x98(%rbp), %rdi
callq 0x3550
nopw %cs:(%rax,%rax)