// File: /workspace/github_cpp_makefile_star2_O2/dfrodriguezp[P]PiCM-cpp/main.cc
// Function: main
int main(int argc, char const *argv[])
{
    if (argc < 2)
    {
        std::cout << "ERROR! Please include a parameters JSON file." << std::endl;
        return 1;
    }

    Json::Value root;
    Json::Reader reader;
    std::string jsonfile = argv[1];
    std::ifstream data(jsonfile, std::ifstream::binary);
    if (!reader.parse(data, root, false))
    {
        std::cout << "ERROR! JSON file not found or invalid." << std::endl;
        return 1;
    }

    Json::Value results = root["results"];
    bool writePhaseSpace = isInArray("phase_space", results);
    bool writeEfield = isInArray("electric_field", results);
    bool writePhi = isInArray("electric_potential", results);
    bool writeRho = isInArray("charge_density", results);
    bool writeSpace = isInArray("space", results);

    std::string samplefile = root["sample"].asString();
    std::string outputName = root.get("output", "results").asString();

    Int N;
    if (root.isMember("N"))
        N = root["N"].asUInt();
    else
    {
        std::cout << "ERROR! Number of particles \"N\" not found in JSON file." << std::endl;
        return 1;
    }

    Int steps = root.get("steps", 50).asUInt();
    Int ss_freq = root.get("ss_frequency", 10).asUInt();
    Int seed = root.get("seed", 69696969).asUInt();

    Real dt = root.get("dt", 0.1).asDouble();

    // Real    Lx = root.get("Lx", 1.0).asDouble();
    // Real    Ly = root.get("Ly", 1.0).asDouble();

    std::valarray<Real> B(3);

    Json::Value Bfield;
    if (root.isMember("Bfield"))
    {
        Bfield = root["Bfield"];
        if (Bfield.size() != 3)
        {
            std::cout << "ERROR! Magnetic field must have three components!" << std::endl;
            return 1;
        }
        else
        {
            B[0] = Bfield[0].asDouble();
            B[1] = Bfield[1].asDouble();
            B[2] = Bfield[2].asDouble();
        }
    }
    else
    {
        B = {0.0, 0.0, 0.0};
    }

    Real Lx, Ly;

    Json::Value sysLength;

    if (root.isMember("sys_length"))
    {
        sysLength = root["sys_length"];
        if (sysLength.size() != 2)
        {
            std::cout << "ERROR! System length must have two components!" << std::endl;
            return 1;
        }
        else
        {
            Lx = sysLength[0].asDouble();
            Ly = sysLength[1].asDouble();
        }
    }
    else
    {
        Lx = 1.0;
        Ly = 1.0;
    }

    Int Nx, Ny;

    Json::Value gridSize;
    if (root.isMember("grid_size"))
    {
        gridSize = root["grid_size"];
        if (gridSize.size() != 2)
        {
            std::cout << "ERROR! Grid size must have two components!" << std::endl;
            return 1;
        }
        else
        {
            Nx = gridSize[0].asUInt();
            Ny = gridSize[1].asUInt();
        }
    }
    else
    {
        Nx = 16;
        Ny = 16;
    }

    Real dx = Lx / Real(Nx);
    Real dy = Ly / Real(Ny);
    VecArr positions;
    VecArr velocities;
    VecArr new_velocities;
    std::vector<Real> charges;
    std::vector<Real> QoverM;
    std::vector<Real> masses;
    std::vector<Int> moves;

    std::ifstream sample(samplefile);
    if (!sample.good())
    {
        std::cout << "ERROR! Sample file not found." << std::endl;
        return 1;
    }

    Real x, y, vx, vy, vz, q_m, charge;
    Int move;

    for (Int i = 0; i < N; ++i)
    {
        sample >> x >> y >> vx >> vy >> vz >> q_m >> move;
        charge = (Lx * Ly * q_m) / N;
        std::valarray<Real> pos = {x, y};       // 2D
        std::valarray<Real> vel = {vx, vy, vz}; // 3V
        positions.push_back(pos);
        velocities.push_back(vel);
        QoverM.push_back(q_m);
        charges.push_back(charge);
        masses.push_back(charge / q_m);
        moves.push_back(move);
    }

    std::vector<std::string> folders = {"/energy"};

    if (writePhaseSpace)
        folders.push_back("/phase_space");
    if (writeEfield)
        folders.push_back("/Efield");
    if (writePhi)
        folders.push_back("/phi");
    if (writeRho)
        folders.push_back("/rho");
    if (writeSpace)
        folders.push_back("/space");

    for (Int f = 0; f < folders.size(); ++f)
        std::system(("mkdir -p " + outputName + folders[f]).c_str());

    std::cout << "Simulation running..." << std::endl;
    Real simulationTime;
    Real diff;
    std::ofstream energy;
    std::ofstream phaseSpace;
    std::ofstream electricField;
    std::ofstream electricPotential;
    std::ofstream chargeDensity;
    std::ofstream space;

    VecArr RHO, PHI, EFIELDp;
    VecVecArr EFIELDn;
    Real KE, FE;

    bool writeStep;
    energy.open(outputName + "/energy/energy.dat");

    for (Int step = 0; step < steps; ++step)
    {
        std::clock_t t_0 = std::clock();
        writeStep = mod(Real(step), Real(ss_freq)) == 0;
        RHO = density(positions, charges, dx, dy, Nx, Ny, N);
        PHI = potential(RHO, dx, dy, Nx, Ny);
        EFIELDn = fieldNodes(PHI, dx, dy, Nx, Ny);
        EFIELDp = fieldParticles(EFIELDn, positions, moves, dx, dy, Nx, Ny, N);

        if (step == 0)
            outphase(-1.0, velocities, QoverM, moves, EFIELDp, B, dt, N);

        update(positions, velocities, QoverM, moves, EFIELDp, B, Lx, Ly, dt, N);
        new_velocities = velocities;
        outphase(1.0, new_velocities, QoverM, moves, EFIELDp, B, dt, N);

        if ((writePhaseSpace || writeEfield || writePhi || writeRho || writeSpace) && writeStep)
            std::cout << "Writing data of step " << step << "..." << std::endl;

        if (writePhaseSpace && writeStep)
            phaseSpace.open(outputName + "/phase_space/step_" + std::to_string(step) + "_.dat");

        if (writeEfield && writeStep)
            electricField.open(outputName + "/Efield/step_" + std::to_string(step) + "_.dat");

        if (writePhi && writeStep)
            electricPotential.open(outputName + "/phi/step_" + std::to_string(step) + "_.dat");

        if (writeRho && writeStep)
            chargeDensity.open(outputName + "/rho/step_" + std::to_string(step) + "_.dat");

        if (writeSpace && writeStep)
            space.open(outputName + "/space/step_" + std::to_string(step) + "_.dat");

        KE = 0.0;
        FE = 0.0;

        for (Int p = 0; p < N; ++p)
        {
            if (moves.at(p))
            {
                if (writePhaseSpace && writeStep)
                    phaseSpace << positions.at(p)[0] << " " << positions.at(p)[1] << " " << new_velocities.at(p)[0] << " " << new_velocities.at(p)[1] << " " << new_velocities.at(p)[2] << "\n";
                KE += masses.at(p) * norm(new_velocities.at(p)) * norm(new_velocities.at(p));
            }
            space << positions.at(p)[0] << " " << positions.at(p)[1] << "\n";
        }

        KE *= 0.5;

        for (Int i = 0; i < Nx; ++i)
        {
            for (Int j = 0; j < Ny; ++j)
            {
                if (writeEfield && writeStep)
                    electricField << i * dx << " " << j * dy << " " << EFIELDn[i][j][0] << " " << EFIELDn[i][j][1] << "\n";
                if (writePhi && writeStep)
                    electricPotential << i * dx << " " << j * dy << " " << PHI[i][j] << "\n";
                if (writeRho && writeStep)
                    chargeDensity << i * dx << " " << j * dy << " " << RHO[i][j] << "\n";
                FE += RHO[i][j] * PHI[i][j];
            }
        }

        FE *= 0.5;

        energy << step << " " << KE << " " << FE << "\n";

        if (writePhaseSpace && writeStep)
            phaseSpace.close();
        if (writeEfield && writeStep)
            electricField.close();
        if (writePhi && writeStep)
            electricPotential.close();
        if (writeRho && writeStep)
            chargeDensity.close();
        if (writeSpace && writeStep)
            space.close();

        std::clock_t t_1 = std::clock();
        diff = Real(t_1 - t_0);
        simulationTime = (diff / CLOCKS_PER_SEC);

        if (!writeStep)
            std::cout << "ETR: " << simulationTime * (steps - step) << " seconds..." << std::endl;
    }

    energy.close();

    std::cout << "Simulation finished." << std::endl;
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1688, %rsp           # imm = 0x1688
cmpl $0x1, %edi
jg 0x2635
movq 0xb9bf(%rip), %rdi      # 0xdfd8
leaq 0x6a18(%rip), %rsi      # 0x9038
callq 0x2240
movq %rax, %rdi
callq 0x20f0
pushq $0x1
popq %rbx
jmp 0x42ef
movq %rsi, %rbx
leaq 0xf8(%rsp), %rdi
xorl %esi, %esi
callq 0x20b0
leaq 0xd70(%rsp), %rdi
callq 0x2270
movq 0x8(%rbx), %rsi
leaq 0x478(%rsp), %rdi
leaq 0x1480(%rsp), %rdx
callq 0x489c
leaq 0x1480(%rsp), %rdi
leaq 0x478(%rsp), %rsi
pushq $0x4
popq %rdx
callq 0x23b0
leaq 0xd70(%rsp), %rdi
leaq 0x1480(%rsp), %rsi
leaq 0xf8(%rsp), %rdx
xorl %ecx, %ecx
callq 0x2470
testb %al, %al
je 0x2c09
leaq 0x69da(%rip), %rsi      # 0x908d
leaq 0xf8(%rsp), %rdi
callq 0x2090
leaq 0x340(%rsp), %rdi
movq %rax, %rsi
callq 0x2380
leaq 0x6b20(%rip), %rsi      # 0x91f7
leaq 0x458(%rsp), %rdi
leaq 0x760(%rsp), %rdx
callq 0x489c
leaq 0x738(%rsp), %rdi
leaq 0x340(%rsp), %rsi
callq 0x2380
leaq 0x458(%rsp), %rdi
leaq 0x738(%rsp), %rsi
callq 0x48d7
movb %al, 0x13(%rsp)
leaq 0x738(%rsp), %rdi
callq 0x2100
leaq 0x458(%rsp), %rdi
callq 0x20d0
leaq 0x695a(%rip), %rsi      # 0x9095
leaq 0x438(%rsp), %rdi
leaq 0x760(%rsp), %rdx
callq 0x489c
leaq 0x710(%rsp), %rdi
leaq 0x340(%rsp), %rsi
callq 0x2380
leaq 0x438(%rsp), %rdi
leaq 0x710(%rsp), %rsi
callq 0x48d7
movb %al, 0x12(%rsp)
leaq 0x710(%rsp), %rdi
callq 0x2100
leaq 0x438(%rsp), %rdi
callq 0x20d0
leaq 0x6905(%rip), %rsi      # 0x90a4
leaq 0x418(%rsp), %rdi
leaq 0x760(%rsp), %rdx
callq 0x489c
leaq 0x6e8(%rsp), %rdi
leaq 0x340(%rsp), %rsi
callq 0x2380
leaq 0x418(%rsp), %rdi
leaq 0x6e8(%rsp), %rsi
callq 0x48d7
movb %al, 0x11(%rsp)
leaq 0x6e8(%rsp), %rdi
callq 0x2100
leaq 0x418(%rsp), %rdi
callq 0x20d0
leaq 0x68b4(%rip), %rsi      # 0x90b7
leaq 0x3f8(%rsp), %rdi
leaq 0x760(%rsp), %rdx
callq 0x489c
leaq 0x6c0(%rsp), %rdi
leaq 0x340(%rsp), %rsi
callq 0x2380
leaq 0x3f8(%rsp), %rdi
leaq 0x6c0(%rsp), %rsi
callq 0x48d7
movb %al, 0x10(%rsp)
leaq 0x6c0(%rsp), %rdi
callq 0x2100
leaq 0x3f8(%rsp), %rdi
callq 0x20d0
leaq 0x69af(%rip), %rsi      # 0x9216
leaq 0x3d8(%rsp), %rdi
leaq 0x760(%rsp), %rdx
callq 0x489c
leaq 0x698(%rsp), %rdi
leaq 0x340(%rsp), %rsi
callq 0x2380
leaq 0x3d8(%rsp), %rdi
leaq 0x698(%rsp), %rsi
callq 0x48d7
movb %al, 0xf(%rsp)
leaq 0x698(%rsp), %rdi
callq 0x2100
leaq 0x3d8(%rsp), %rdi
callq 0x20d0
leaq 0x67fb(%rip), %rsi      # 0x90c6
leaq 0xf8(%rsp), %rdi
callq 0x2090
leaq 0x3b8(%rsp), %rdi
movq %rax, %rsi
callq 0x2450
leaq 0x679e(%rip), %rsi      # 0x908d
leaq 0x498(%rsp), %rdi
callq 0x23f0
leaq 0x67ca(%rip), %rdx      # 0x90cd
leaq 0x760(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
leaq 0x498(%rsp), %rcx
callq 0x2140
leaq 0x200(%rsp), %rdi
leaq 0x760(%rsp), %rsi
callq 0x2450
leaq 0x760(%rsp), %rdi
callq 0x2100
leaq 0x498(%rsp), %rdi
callq 0x2100
leaq 0x677e(%rip), %rsi      # 0x90d4
leaq 0xf8(%rsp), %rdi
callq 0x2220
testb %al, %al
je 0x2c2c
leaq 0x6762(%rip), %rsi      # 0x90d4
leaq 0xf8(%rsp), %rdi
callq 0x2090
movq %rax, %rdi
callq 0x2110
movl %eax, 0x14(%rsp)
leaq 0x498(%rsp), %rdi
pushq $0x32
popq %rsi
callq 0x2160
leaq 0x676b(%rip), %rdx      # 0x910d
leaq 0x760(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
leaq 0x498(%rsp), %rcx
callq 0x2140
leaq 0x760(%rsp), %rdi
callq 0x2110
movl %eax, 0x58(%rsp)
leaq 0x760(%rsp), %rdi
callq 0x2100
leaq 0x498(%rsp), %rdi
callq 0x2100
leaq 0x498(%rsp), %rdi
pushq $0xa
popq %rsi
callq 0x2160
leaq 0x6712(%rip), %rdx      # 0x9113
leaq 0x760(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
leaq 0x498(%rsp), %rcx
callq 0x2140
leaq 0x760(%rsp), %rdi
callq 0x2110
movl %eax, 0x30(%rsp)
leaq 0x760(%rsp), %rdi
callq 0x2100
leaq 0x498(%rsp), %rdi
callq 0x2100
leaq 0x498(%rsp), %rdi
movl $0x4277dc9, %esi        # imm = 0x4277DC9
callq 0x2160
leaq 0x66be(%rip), %rdx      # 0x9120
leaq 0x760(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
leaq 0x498(%rsp), %rcx
callq 0x2140
leaq 0x760(%rsp), %rdi
callq 0x2110
leaq 0x760(%rsp), %rdi
callq 0x2100
leaq 0x498(%rsp), %rdi
callq 0x2100
leaq 0x498(%rsp), %rdi
movsd 0x6552(%rip), %xmm0     # 0x9008
callq 0x2310
leaq 0x6663(%rip), %rdx      # 0x9125
leaq 0x760(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
leaq 0x498(%rsp), %rcx
callq 0x2140
leaq 0x760(%rsp), %rdi
callq 0x21a0
movsd %xmm0, 0x18(%rsp)
leaq 0x760(%rsp), %rdi
callq 0x2100
leaq 0x498(%rsp), %rdi
callq 0x2100
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0xf0(%rsp)
movq $0x3, 0x60(%rsp)
pushq $0x18
popq %rdi
callq 0x2250
movq %rax, 0x68(%rsp)
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
andq $0x0, 0x10(%rax)
leaq 0x318(%rsp), %rdi
xorl %esi, %esi
callq 0x20b0
leaq 0x65d4(%rip), %rsi      # 0x9128
leaq 0xf8(%rsp), %rdi
callq 0x2220
testb %al, %al
je 0x2c4f
leaq 0x65b8(%rip), %rsi      # 0x9128
leaq 0xf8(%rsp), %rdi
callq 0x2090
leaq 0x318(%rsp), %rdi
movq %rax, %rsi
callq 0x22f0
leaq 0x318(%rsp), %rdi
callq 0x23d0
cmpl $0x3, %eax
jne 0x2ee8
leaq 0x318(%rsp), %rdi
xorl %esi, %esi
callq 0x2280
movq %rax, %rdi
callq 0x21a0
movq 0x68(%rsp), %rax
movsd %xmm0, (%rax)
leaq 0x318(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x2280
movq %rax, %rdi
callq 0x21a0
movq 0x68(%rsp), %rax
movsd %xmm0, 0x8(%rax)
leaq 0x318(%rsp), %rdi
pushq $0x2
popq %rsi
callq 0x2280
movq %rax, %rdi
callq 0x21a0
movq 0x68(%rsp), %rax
movsd %xmm0, 0x10(%rax)
jmp 0x2c71
movq 0xb3c8(%rip), %rdi      # 0xdfd8
leaq 0x644f(%rip), %rsi      # 0x9066
callq 0x2240
movq %rax, %rdi
callq 0x20f0
pushq $0x1
popq %rbx
jmp 0x42bb
movq 0xb3a5(%rip), %rdi      # 0xdfd8
leaq 0x649c(%rip), %rsi      # 0x90d6
callq 0x2240
movq %rax, %rdi
callq 0x20f0
pushq $0x1
popq %rbx
jmp 0x4294
xorpd %xmm0, %xmm0
leaq 0x760(%rsp), %rsi
movapd %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
leaq 0x60(%rsp), %rdi
pushq $0x3
popq %rdx
callq 0x4964
leaq 0x390(%rsp), %rdi
xorl %esi, %esi
callq 0x20b0
leaq 0x64da(%rip), %rsi      # 0x9161
leaq 0xf8(%rsp), %rdi
callq 0x2220
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
testb %al, %al
je 0x2d16
leaq 0x64b8(%rip), %rsi      # 0x9161
leaq 0xf8(%rsp), %rdi
callq 0x2090
leaq 0x390(%rsp), %rdi
movq %rax, %rsi
callq 0x22f0
leaq 0x390(%rsp), %rdi
callq 0x23d0
cmpl $0x2, %eax
jne 0x2f0b
leaq 0x390(%rsp), %rdi
xorl %esi, %esi
callq 0x2280
movq %rax, %rdi
callq 0x21a0
movsd %xmm0, 0xa0(%rsp)
leaq 0x390(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x2280
movq %rax, %rdi
callq 0x21a0
jmp 0x2d26
movq %rcx, 0xa0(%rsp)
movsd 0x62ea(%rip), %xmm0     # 0x9010
movsd %xmm0, 0xe8(%rsp)
leaq 0x368(%rsp), %rdi
xorl %esi, %esi
callq 0x20b0
leaq 0x6456(%rip), %rsi      # 0x919b
leaq 0xf8(%rsp), %rdi
callq 0x2220
testb %al, %al
je 0x2dce
leaq 0x643e(%rip), %rsi      # 0x919b
leaq 0xf8(%rsp), %rdi
callq 0x2090
leaq 0x368(%rsp), %rdi
movq %rax, %rsi
callq 0x22f0
leaq 0x368(%rsp), %rdi
callq 0x23d0
cmpl $0x2, %eax
jne 0x411f
leaq 0x368(%rsp), %rdi
xorl %esi, %esi
callq 0x2280
movq %rax, %rdi
callq 0x2110
movl %eax, 0x34(%rsp)
leaq 0x368(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x2280
movq %rax, %rdi
callq 0x2110
movl 0x34(%rsp), %ecx
cvtsi2sd %rcx, %xmm0
jmp 0x2de1
movl $0x10, 0x34(%rsp)
pushq $0x10
popq %rax
movsd 0x6237(%rip), %xmm0     # 0x9018
movl %eax, 0x5c(%rsp)
movsd 0xa0(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x98(%rsp)
movl %eax, %eax
cvtsi2sd %rax, %xmm0
movsd 0xe8(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x48(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x190(%rsp)
andq $0x0, 0x1a0(%rsp)
movapd %xmm0, 0x1e0(%rsp)
andq $0x0, 0x1f0(%rsp)
movapd %xmm0, 0x140(%rsp)
andq $0x0, 0x150(%rsp)
movapd %xmm0, 0x2a0(%rsp)
andq $0x0, 0x2b0(%rsp)
movapd %xmm0, 0x1c0(%rsp)
andq $0x0, 0x1d0(%rsp)
movapd %xmm0, 0x280(%rsp)
andq $0x0, 0x290(%rsp)
movapd %xmm0, 0x170(%rsp)
andq $0x0, 0x180(%rsp)
leaq 0x760(%rsp), %rdi
leaq 0x3b8(%rsp), %rsi
pushq $0x8
popq %rdx
callq 0x23b0
movq 0x760(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x780(%rsp,%rax)
je 0x2f2e
movq 0xb10c(%rip), %rdi      # 0xdfd8
leaq 0x62fd(%rip), %rsi      # 0x91d0
callq 0x2240
movq %rax, %rdi
callq 0x20f0
pushq $0x1
popq %rbx
jmp 0x41fb
movq 0xb0e9(%rip), %rdi      # 0xdfd8
leaq 0x6239(%rip), %rsi      # 0x912f
callq 0x2240
movq %rax, %rdi
callq 0x20f0
pushq $0x1
popq %rbx
jmp 0x427d
movq 0xb0c6(%rip), %rdi      # 0xdfd8
leaq 0x6253(%rip), %rsi      # 0x916c
callq 0x2240
movq %rax, %rdi
callq 0x20f0
pushq $0x1
popq %rbx
jmp 0x4270
xorl %r12d, %r12d
leaq 0x1b8(%rsp), %r14
leaq 0x2fc(%rsp), %r15
leaq 0x280(%rsp), %r13
leaq 0xb70(%rsp), %rbp
leaq 0x170(%rsp), %rbx
cmpl 0x14(%rsp), %r12d
jae 0x315a
leaq 0x760(%rsp), %rdi
leaq 0x2f0(%rsp), %rsi
callq 0x2170
movq %rax, %rdi
leaq 0x2e8(%rsp), %rsi
callq 0x2170
movq %rax, %rdi
leaq 0x2e0(%rsp), %rsi
callq 0x2170
movq %rax, %rdi
leaq 0x2d8(%rsp), %rsi
callq 0x2170
movq %rax, %rdi
leaq 0x2d0(%rsp), %rsi
callq 0x2170
movq %rax, %rdi
movq %r14, %rsi
callq 0x2170
movq %rax, %rdi
movq %r15, %rsi
callq 0x2420
movsd 0xa0(%rsp), %xmm0
mulsd 0xe8(%rsp), %xmm0
mulsd 0x1b8(%rsp), %xmm0
movl 0x14(%rsp), %eax
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x1b0(%rsp)
movsd 0x2f0(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x2e8(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movq $0x2, 0x498(%rsp)
pushq $0x10
popq %rdi
callq 0x2250
movq %rax, 0x4a0(%rsp)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x8(%rax)
movsd 0x2e0(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x2d8(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x2d0(%rsp), %xmm0
movsd %xmm0, 0x70(%rsp)
movq $0x3, 0x970(%rsp)
pushq $0x18
popq %rdi
callq 0x2250
movq %rax, 0x978(%rsp)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x8(%rax)
movsd 0x70(%rsp), %xmm0
movsd %xmm0, 0x10(%rax)
leaq 0x190(%rsp), %rdi
leaq 0x498(%rsp), %rsi
callq 0x49ca
leaq 0x1e0(%rsp), %rdi
leaq 0x970(%rsp), %rsi
callq 0x49ca
leaq 0x1c0(%rsp), %rdi
movq %r14, %rsi
callq 0x49f6
leaq 0x2a0(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x49f6
movsd 0x1b0(%rsp), %xmm0
divsd 0x1b8(%rsp), %xmm0
movsd %xmm0, 0xb70(%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x54e8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4a18
movq 0x978(%rsp), %rdi
callq 0x2230
movq 0x4a0(%rsp), %rdi
callq 0x2230
incl %r12d
jmp 0x2f59
leaq 0x608d(%rip), %rsi      # 0x91ee
leaq 0x498(%rsp), %rdi
leaq 0x970(%rsp), %rdx
callq 0x489c
leaq 0x158(%rsp), %rdi
leaq 0x498(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0xb70(%rsp), %rcx
callq 0x4a40
leaq 0x498(%rsp), %rdi
callq 0x20d0
cmpb $0x0, 0x13(%rsp)
je 0x31e8
leaq 0x6045(%rip), %rsi      # 0x91f6
leaq 0x498(%rsp), %rdi
leaq 0x970(%rsp), %rdx
callq 0x489c
leaq 0x158(%rsp), %rdi
leaq 0x498(%rsp), %rsi
callq 0x58a0
leaq 0x498(%rsp), %rdi
callq 0x20d0
cmpb $0x0, 0x12(%rsp)
je 0x322d
leaq 0x600d(%rip), %rsi      # 0x9203
leaq 0x498(%rsp), %rdi
leaq 0x970(%rsp), %rdx
callq 0x489c
leaq 0x158(%rsp), %rdi
leaq 0x498(%rsp), %rsi
callq 0x58a0
leaq 0x498(%rsp), %rdi
callq 0x20d0
cmpb $0x0, 0x11(%rsp)
je 0x3272
leaq 0x5fd0(%rip), %rsi      # 0x920b
leaq 0x498(%rsp), %rdi
leaq 0x970(%rsp), %rdx
callq 0x489c
leaq 0x158(%rsp), %rdi
leaq 0x498(%rsp), %rsi
callq 0x58a0
leaq 0x498(%rsp), %rdi
callq 0x20d0
cmpb $0x0, 0x10(%rsp)
je 0x32b7
leaq 0x5f90(%rip), %rsi      # 0x9210
leaq 0x498(%rsp), %rdi
leaq 0x970(%rsp), %rdx
callq 0x489c
leaq 0x158(%rsp), %rdi
leaq 0x498(%rsp), %rsi
callq 0x58a0
leaq 0x498(%rsp), %rdi
callq 0x20d0
cmpb $0x0, 0xf(%rsp)
je 0x32fc
leaq 0x5f50(%rip), %rsi      # 0x9215
leaq 0x498(%rsp), %rdi
leaq 0x970(%rsp), %rdx
callq 0x489c
leaq 0x158(%rsp), %rdi
leaq 0x498(%rsp), %rsi
callq 0x58a0
leaq 0x498(%rsp), %rdi
callq 0x20d0
xorl %r13d, %r13d
leaq 0x5f16(%rip), %rbx      # 0x921c
leaq 0x970(%rsp), %r14
leaq 0x200(%rsp), %r15
leaq 0x498(%rsp), %r12
movl %r13d, %r13d
movq 0x160(%rsp), %rax
subq 0x158(%rsp), %rax
sarq $0x5, %rax
cmpq %r13, %rax
jbe 0x3384
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x4a98
movq %r13, %rdx
shlq $0x5, %rdx
addq 0x158(%rsp), %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x4a79
movq 0x498(%rsp), %rdi
callq 0x2200
movq %r12, %rdi
callq 0x20d0
movq %r14, %rdi
callq 0x20d0
incl %r13d
jmp 0x331e
movq 0xac4d(%rip), %rdi      # 0xdfd8
leaq 0x5e94(%rip), %rsi      # 0x9226
callq 0x2240
movq %rax, %rdi
callq 0x20f0
leaq 0x498(%rsp), %rdi
callq 0x2410
leaq 0x970(%rsp), %rdi
callq 0x2410
leaq 0xb70(%rsp), %rdi
callq 0x2410
leaq 0x1280(%rsp), %rdi
callq 0x2410
leaq 0x1080(%rsp), %rdi
callq 0x2410
leaq 0xe80(%rsp), %rdi
callq 0x2410
xorpd %xmm0, %xmm0
movapd %xmm0, 0x260(%rsp)
andq $0x0, 0x270(%rsp)
movapd %xmm0, 0x240(%rsp)
andq $0x0, 0x250(%rsp)
movapd %xmm0, 0x300(%rsp)
andq $0x0, 0x310(%rsp)
movapd %xmm0, 0x220(%rsp)
andq $0x0, 0x230(%rsp)
leaq 0x5dfc(%rip), %rdx      # 0x923c
leaq 0xc8(%rsp), %rdi
leaq 0x200(%rsp), %rsi
callq 0x4b0e
leaq 0x498(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
pushq $0x10
popq %rdx
callq 0x20e0
leaq 0xc8(%rsp), %r14
movq %r14, %rdi
callq 0x20d0
movl 0x30(%rsp), %eax
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0x2b8(%rsp)
movb 0x13(%rsp), %cl
movl %ecx, %eax
movb 0x12(%rsp), %dl
orb %dl, %al
movb 0x11(%rsp), %sil
movl %esi, %r8d
movb 0x10(%rsp), %dil
orb %dil, %r8b
orb %al, %r8b
movb 0xf(%rsp), %al
orb %al, %r8b
xorb $0x1, %r8b
movb %r8b, 0x25(%rsp)
xorb $0x1, %cl
movb %cl, 0x13(%rsp)
xorb $0x1, %dl
movb %dl, 0x12(%rsp)
xorb $0x1, %sil
movb %sil, 0x11(%rsp)
xorb $0x1, %dil
movb %dil, 0x10(%rsp)
xorb $0x1, %al
movb %al, 0xf(%rsp)
movl 0x58(%rsp), %eax
movq %rax, 0x2c0(%rsp)
xorl %r15d, %r15d
leaq 0x5dbb(%rip), %rbx      # 0x92b5
cmpq 0x2c0(%rsp), %r15
je 0x4142
callq 0x2180
movq %rax, 0x2c8(%rsp)
movq %r15, 0x38(%rsp)
movl %r15d, %eax
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0xc8(%rsp)
movsd 0x2b8(%rsp), %xmm0
movsd %xmm0, 0xa8(%rsp)
movq %r14, %rdi
leaq 0xa8(%rsp), %rsi
callq 0x6060
movsd %xmm0, 0x40(%rsp)
movq %r14, %rdi
leaq 0x190(%rsp), %rsi
leaq 0x2a0(%rsp), %rdx
leaq 0x98(%rsp), %rbp
movq %rbp, %rcx
leaq 0x48(%rsp), %r8
leaq 0x34(%rsp), %r15
movq %r15, %r9
leaq 0x14(%rsp), %rax
pushq %rax
leaq 0x64(%rsp), %r13
pushq %r13
callq 0x6146
popq %rax
popq %rcx
leaq 0x260(%rsp), %r14
movq %r14, %rdi
leaq 0xc8(%rsp), %r12
movq %r12, %rsi
callq 0x5a8e
movq %r12, %rdi
callq 0x4b46
movq %r12, %rdi
movq %r14, %rsi
movq %rbp, %rdx
leaq 0x48(%rsp), %rcx
movq %r15, %r8
movq %r13, %r9
callq 0x64a0
leaq 0x240(%rsp), %r14
movq %r14, %rdi
leaq 0xc8(%rsp), %r12
movq %r12, %rsi
callq 0x5a8e
movq %r12, %rdi
callq 0x4b46
movq %r12, %rdi
movq %r14, %rsi
movq %rbp, %rdx
leaq 0x48(%rsp), %rcx
movq %r15, %r8
movq %r13, %r9
callq 0x6af9
leaq 0x220(%rsp), %r14
movq %r14, %rdi
leaq 0xc8(%rsp), %r12
movq %r12, %rsi
callq 0x5ae0
movq %r12, %rdi
callq 0x4b68
subq $0x8, %rsp
movq %r12, %rdi
movq %r14, %rsi
leaq 0x198(%rsp), %rdx
leaq 0x178(%rsp), %rcx
movq %rbp, %r8
leaq 0x50(%rsp), %r9
leaq 0x1c(%rsp), %rax
pushq %rax
pushq %r13
pushq %r15
callq 0x6e0d
addq $0x20, %rsp
leaq 0x300(%rsp), %r14
movq %r14, %rdi
leaq 0xc8(%rsp), %r12
movq %r12, %rsi
callq 0x5a8e
movq %r12, %rdi
callq 0x4b46
cmpq $0x0, 0x38(%rsp)
jne 0x36d8
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, 0xc8(%rsp)
movq %r12, %rdi
leaq 0x1e0(%rsp), %rsi
leaq 0x1c0(%rsp), %rdx
leaq 0x170(%rsp), %rcx
movq %r14, %r8
leaq 0x60(%rsp), %r9
leaq 0x14(%rsp), %rax
pushq %rax
leaq 0xf8(%rsp), %rax
pushq %rax
callq 0x7589
popq %rax
popq %rcx
leaq 0x190(%rsp), %rdi
leaq 0x1e0(%rsp), %rsi
leaq 0x1c0(%rsp), %rdx
leaq 0x170(%rsp), %rcx
movq %r14, %r8
leaq 0x60(%rsp), %r9
leaq 0x14(%rsp), %rax
pushq %rax
leaq 0xf8(%rsp), %rax
pushq %rax
leaq 0xf8(%rsp), %rax
pushq %rax
leaq 0xb8(%rsp), %rax
pushq %rax
callq 0x7463
addq $0x20, %rsp
leaq 0x140(%rsp), %rdi
leaq 0x1e0(%rsp), %rsi
callq 0x4b8a
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0xc8(%rsp)
movq %r12, %rdi
leaq 0x140(%rsp), %rsi
leaq 0x1c0(%rsp), %rdx
leaq 0x170(%rsp), %rcx
movq %r14, %r8
leaq 0x60(%rsp), %r9
leaq 0x14(%rsp), %rax
pushq %rax
leaq 0xf8(%rsp), %rax
pushq %rax
callq 0x7589
popq %rax
popq %rcx
movsd 0x40(%rsp), %xmm0
ucomisd 0x5898(%rip), %xmm0     # 0x9030
setp %al
setne %cl
orb %al, %cl
orb 0x25(%rsp), %cl
jne 0x37dd
movq 0xa82b(%rip), %rdi      # 0xdfd8
leaq 0x5a9b(%rip), %rsi      # 0x924f
callq 0x2240
movq %rax, %rdi
movq 0x38(%rsp), %rsi
callq 0x2190
movq %rax, %rdi
leaq 0x5a68(%rip), %rsi      # 0x9238
callq 0x2240
movq %rax, %rdi
callq 0x20f0
movsd 0x40(%rsp), %xmm0
ucomisd 0x5845(%rip), %xmm0     # 0x9030
setp %al
setne %r15b
orb %al, %r15b
orb 0x13(%rsp), %r15b
jne 0x3897
leaq 0x78(%rsp), %rdi
leaq 0x200(%rsp), %rsi
leaq 0x5a51(%rip), %rdx      # 0x9265
callq 0x4b0e
leaq 0x120(%rsp), %r14
movq %r14, %rdi
movq 0x38(%rsp), %rsi
callq 0x4cd9
leaq 0xa8(%rsp), %r13
movq %r13, %rdi
leaq 0x78(%rsp), %rsi
movq %r14, %rdx
callq 0x4c72
movq %r12, %rdi
movq %r13, %rsi
leaq 0x5a25(%rip), %rdx      # 0x9278
callq 0x4c53
leaq 0x970(%rsp), %rdi
movq %r12, %rsi
pushq $0x10
popq %rdx
callq 0x20e0
movq %r12, %rdi
callq 0x20d0
leaq 0xa8(%rsp), %rdi
callq 0x20d0
leaq 0x120(%rsp), %rdi
callq 0x20d0
leaq 0x78(%rsp), %rdi
callq 0x20d0
movsd 0x40(%rsp), %xmm0
ucomisd 0x578b(%rip), %xmm0     # 0x9030
setp %al
setne %cl
orb %al, %cl
orb 0x12(%rsp), %cl
movb %cl, 0x70(%rsp)
jne 0x3952
leaq 0x78(%rsp), %rdi
leaq 0x200(%rsp), %rsi
leaq 0x59af(%rip), %rdx      # 0x927e
callq 0x4b0e
leaq 0x120(%rsp), %r14
movq %r14, %rdi
movq 0x38(%rsp), %rsi
callq 0x4cd9
leaq 0xa8(%rsp), %r13
movq %r13, %rdi
leaq 0x78(%rsp), %rsi
movq %r14, %rdx
callq 0x4c72
movq %r12, %rdi
movq %r13, %rsi
leaq 0x596a(%rip), %rdx      # 0x9278
callq 0x4c53
leaq 0xb70(%rsp), %rdi
movq %r12, %rsi
pushq $0x10
popq %rdx
callq 0x20e0
movq %r12, %rdi
callq 0x20d0
leaq 0xa8(%rsp), %rdi
callq 0x20d0
leaq 0x120(%rsp), %rdi
callq 0x20d0
leaq 0x78(%rsp), %rdi
callq 0x20d0
movsd 0x40(%rsp), %xmm0
ucomisd 0x56d0(%rip), %xmm0     # 0x9030
setp %al
setne %cl
orb %al, %cl
orb 0x11(%rsp), %cl
movb %cl, 0x30(%rsp)
jne 0x3a0d
leaq 0x78(%rsp), %rdi
leaq 0x200(%rsp), %rsi
leaq 0x5902(%rip), %rdx      # 0x928c
callq 0x4b0e
leaq 0x120(%rsp), %r14
movq %r14, %rdi
movq 0x38(%rsp), %rsi
callq 0x4cd9
leaq 0xa8(%rsp), %r13
movq %r13, %rdi
leaq 0x78(%rsp), %rsi
movq %r14, %rdx
callq 0x4c72
movq %r12, %rdi
movq %r13, %rsi
leaq 0x58af(%rip), %rdx      # 0x9278
callq 0x4c53
leaq 0x1280(%rsp), %rdi
movq %r12, %rsi
pushq $0x10
popq %rdx
callq 0x20e0
movq %r12, %rdi
callq 0x20d0
leaq 0xa8(%rsp), %rdi
callq 0x20d0
leaq 0x120(%rsp), %rdi
callq 0x20d0
leaq 0x78(%rsp), %rdi
callq 0x20d0
movsd 0x40(%rsp), %xmm0
ucomisd 0x5615(%rip), %xmm0     # 0x9030
setp %al
setne %r13b
orb %al, %r13b
orb 0x10(%rsp), %r13b
jne 0x3ac7
leaq 0x78(%rsp), %rdi
leaq 0x200(%rsp), %rsi
leaq 0x5853(%rip), %rdx      # 0x9297
callq 0x4b0e
leaq 0x120(%rsp), %r14
movq %r14, %rdi
movq 0x38(%rsp), %rsi
callq 0x4cd9
leaq 0xa8(%rsp), %rbp
movq %rbp, %rdi
leaq 0x78(%rsp), %rsi
movq %r14, %rdx
callq 0x4c72
movq %r12, %rdi
movq %rbp, %rsi
leaq 0x57f5(%rip), %rdx      # 0x9278
callq 0x4c53
leaq 0x1080(%rsp), %rdi
movq %r12, %rsi
pushq $0x10
popq %rdx
callq 0x20e0
movq %r12, %rdi
callq 0x20d0
leaq 0xa8(%rsp), %rdi
callq 0x20d0
leaq 0x120(%rsp), %rdi
callq 0x20d0
leaq 0x78(%rsp), %rdi
callq 0x20d0
movsd 0x40(%rsp), %xmm0
ucomisd 0x555b(%rip), %xmm0     # 0x9030
setp %al
setne %cl
orb %al, %cl
orb 0xf(%rsp), %cl
movb %cl, 0x27(%rsp)
jne 0x3b82
leaq 0x78(%rsp), %rdi
leaq 0x200(%rsp), %rsi
leaq 0x57a3(%rip), %rdx      # 0x92a2
callq 0x4b0e
leaq 0x120(%rsp), %r14
movq %r14, %rdi
movq 0x38(%rsp), %rsi
callq 0x4cd9
leaq 0xa8(%rsp), %rbp
movq %rbp, %rdi
leaq 0x78(%rsp), %rsi
movq %r14, %rdx
callq 0x4c72
movq %r12, %rdi
movq %rbp, %rsi
leaq 0x573a(%rip), %rdx      # 0x9278
callq 0x4c53
leaq 0xe80(%rsp), %rdi
movq %r12, %rsi
pushq $0x10
popq %rdx
callq 0x20e0
movq %r12, %rdi
callq 0x20d0
leaq 0xa8(%rsp), %rdi
callq 0x20d0
leaq 0x120(%rsp), %rdi
callq 0x20d0
leaq 0x78(%rsp), %rdi
callq 0x20d0
xorpd %xmm0, %xmm0
movsd %xmm0, 0x50(%rsp)
xorl %r12d, %r12d
leaq 0x190(%rsp), %r14
movl 0x14(%rsp), %eax
cmpq %rax, %r12
jae 0x3d7c
leaq 0x170(%rsp), %rdi
movq %r12, %rsi
callq 0x4d18
cmpl $0x0, (%rax)
je 0x3d1b
testb %r15b, %r15b
jne 0x3cab
movq %r14, %rdi
movq %r12, %rsi
callq 0x4d3a
movq 0x8(%rax), %rax
movsd (%rax), %xmm0
leaq 0x970(%rsp), %rdi
callq 0x23a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2240
movq %rax, %rbp
movq %r14, %rdi
movq %r12, %rsi
callq 0x4d3a
movq 0x8(%rax), %rax
movsd 0x8(%rax), %xmm0
movq %rbp, %rdi
callq 0x23a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2240
movq %rax, %rbp
leaq 0x140(%rsp), %rdi
movq %r12, %rsi
callq 0x4d3a
movq 0x8(%rax), %rax
movsd (%rax), %xmm0
movq %rbp, %rdi
callq 0x23a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2240
movq %rax, %rbp
leaq 0x140(%rsp), %rdi
movq %r12, %rsi
callq 0x4d3a
movq 0x8(%rax), %rax
movsd 0x8(%rax), %xmm0
movq %rbp, %rdi
callq 0x23a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2240
movq %rax, %rbp
leaq 0x140(%rsp), %rdi
movq %r12, %rsi
callq 0x4d3a
movq 0x8(%rax), %rax
movsd 0x10(%rax), %xmm0
movq %rbp, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x5609(%rip), %rsi      # 0x92af
callq 0x2240
leaq 0x280(%rsp), %rdi
movq %r12, %rsi
callq 0x4d5c
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
leaq 0x140(%rsp), %rdi
movq %r12, %rsi
callq 0x4d3a
movq %rax, %rdi
callq 0x602e
movsd %xmm0, 0x28(%rsp)
leaq 0x140(%rsp), %rdi
movq %r12, %rsi
callq 0x4d3a
movq %rax, %rdi
callq 0x602e
movsd 0x18(%rsp), %xmm1
mulsd 0x28(%rsp), %xmm1
mulsd %xmm0, %xmm1
movsd 0x50(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x50(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x4d3a
movq 0x8(%rax), %rax
movsd (%rax), %xmm0
leaq 0xe80(%rsp), %rdi
callq 0x23a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2240
movq %rax, %rbp
movq %r14, %rdi
movq %r12, %rsi
callq 0x4d3a
movq 0x8(%rax), %rax
movsd 0x8(%rax), %xmm0
movq %rbp, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x5540(%rip), %rsi      # 0x92af
callq 0x2240
incq %r12
jmp 0x3b97
movb %r15b, 0x26(%rsp)
movsd 0x50(%rsp), %xmm0
mulsd 0x5291(%rip), %xmm0     # 0x9020
movsd %xmm0, 0x50(%rsp)
xorpd %xmm0, %xmm0
movsd %xmm0, 0x18(%rsp)
xorl %r12d, %r12d
movl 0x34(%rsp), %eax
cmpq %rax, %r12
jae 0x3fc9
movl %r12d, %eax
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0x28(%rsp)
pushq $0x1
popq %rbp
xorl %r15d, %r15d
movl 0x5c(%rsp), %eax
cmpq %rax, %r15
jae 0x3fc1
cmpb $0x0, 0x70(%rsp)
jne 0x3e7a
movsd 0x98(%rsp), %xmm0
mulsd 0x28(%rsp), %xmm0
leaq 0xb70(%rsp), %rdi
callq 0x23a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2240
movl %r15d, %ecx
cvtsi2sd %rcx, %xmm0
mulsd 0x48(%rsp), %xmm0
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2240
movq 0x220(%rsp), %rcx
imulq $0x18, %r12, %r14
movq (%rcx,%r14), %rcx
movq (%rcx,%rbp,8), %rcx
movsd (%rcx), %xmm0
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2240
movq 0x220(%rsp), %rcx
movq (%rcx,%r14), %rcx
movq (%rcx,%rbp,8), %rcx
movsd 0x8(%rcx), %xmm0
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x543a(%rip), %rsi      # 0x92af
callq 0x2240
cmpb $0x0, 0x30(%rsp)
jne 0x3efa
movsd 0x98(%rsp), %xmm0
mulsd 0x28(%rsp), %xmm0
leaq 0x1280(%rsp), %rdi
callq 0x23a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2240
movl %r15d, %ecx
cvtsi2sd %rcx, %xmm0
mulsd 0x48(%rsp), %xmm0
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2240
movq 0x240(%rsp), %rcx
movq %r12, %rdx
shlq $0x4, %rdx
movq 0x8(%rcx,%rdx), %rcx
movsd (%rcx,%r15,8), %xmm0
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x53ba(%rip), %rsi      # 0x92af
callq 0x2240
testb %r13b, %r13b
jne 0x3f78
movsd 0x98(%rsp), %xmm0
mulsd 0x28(%rsp), %xmm0
leaq 0x1080(%rsp), %rdi
callq 0x23a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2240
movl %r15d, %ecx
cvtsi2sd %rcx, %xmm0
mulsd 0x48(%rsp), %xmm0
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2240
movq 0x260(%rsp), %rcx
movq %r12, %rdx
shlq $0x4, %rdx
movq 0x8(%rcx,%rdx), %rcx
movsd (%rcx,%r15,8), %xmm0
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x533c(%rip), %rsi      # 0x92af
callq 0x2240
movq 0x260(%rsp), %rax
movq %r12, %rcx
shlq $0x4, %rcx
movq 0x8(%rax,%rcx), %rax
movsd (%rax,%r15,8), %xmm0
movq 0x240(%rsp), %rax
movq 0x8(%rax,%rcx), %rax
mulsd (%rax,%r15,8), %xmm0
movsd 0x18(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x18(%rsp)
incq %r15
addq $0x2, %rbp
jmp 0x3dc3
incq %r12
jmp 0x3da2
movsd 0x18(%rsp), %xmm0
mulsd 0x5049(%rip), %xmm0     # 0x9020
movsd %xmm0, 0x18(%rsp)
leaq 0x498(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq %rsi, %r15
callq 0x2190
leaq 0xc8(%rsp), %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2240
movq %rax, %rdi
movsd 0x50(%rsp), %xmm0
callq 0x23a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2240
movq %rax, %rdi
movsd 0x18(%rsp), %xmm0
callq 0x23a0
movq %rax, %rdi
leaq 0x5279(%rip), %rsi      # 0x92af
callq 0x2240
cmpb $0x0, 0x26(%rsp)
jne 0x404f
leaq 0x970(%rsp), %rdi
callq 0x2300
cmpb $0x0, 0x70(%rsp)
jne 0x4063
leaq 0xb70(%rsp), %rdi
callq 0x2300
cmpb $0x0, 0x30(%rsp)
jne 0x4077
leaq 0x1280(%rsp), %rdi
callq 0x2300
testb %r13b, %r13b
jne 0x4089
leaq 0x1080(%rsp), %rdi
callq 0x2300
cmpb $0x0, 0x27(%rsp)
jne 0x409d
leaq 0xe80(%rsp), %rdi
callq 0x2300
callq 0x2180
subq 0x2c8(%rsp), %rax
movsd 0x40(%rsp), %xmm0
ucomisd 0x4f78(%rip), %xmm0     # 0x9030
cvtsi2sd %rax, %xmm0
divsd 0x4f63(%rip), %xmm0     # 0x9028
movsd %xmm0, 0x18(%rsp)
jne 0x40cf
jnp 0x4117
movq 0x9f02(%rip), %rdi      # 0xdfd8
leaq 0x51d4(%rip), %rsi      # 0x92b1
callq 0x2240
movl 0x58(%rsp), %ecx
subl %r15d, %ecx
cvtsi2sd %rcx, %xmm1
movsd 0x18(%rsp), %xmm0
mulsd %xmm1, %xmm0
movq %rax, %rdi
callq 0x23a0
movq %rax, %rdi
leaq 0x51ad(%rip), %rsi      # 0x92b7
callq 0x2240
movq %rax, %rdi
callq 0x20f0
incq %r15
jmp 0x34fa
movq 0x9eb2(%rip), %rdi      # 0xdfd8
leaq 0x5078(%rip), %rsi      # 0x91a5
callq 0x2240
movq %rax, %rdi
callq 0x20f0
pushq $0x1
popq %rbx
jmp 0x4263
leaq 0x498(%rsp), %rdi
callq 0x2300
movq 0x9e82(%rip), %rdi      # 0xdfd8
leaq 0x5166(%rip), %rsi      # 0x92c3
callq 0x2240
movq %rax, %rdi
callq 0x20f0
leaq 0x220(%rsp), %rdi
callq 0x4b68
leaq 0x300(%rsp), %rdi
callq 0x4b46
leaq 0x240(%rsp), %rdi
callq 0x4b46
leaq 0x260(%rsp), %rdi
callq 0x4b46
leaq 0xe80(%rsp), %rdi
callq 0x2330
leaq 0x1080(%rsp), %rdi
callq 0x2330
leaq 0x1280(%rsp), %rdi
callq 0x2330
leaq 0xb70(%rsp), %rdi
callq 0x2330
leaq 0x970(%rsp), %rdi
callq 0x2330
leaq 0x498(%rsp), %rdi
callq 0x2330
leaq 0x158(%rsp), %rdi
callq 0x4d7e
xorl %ebx, %ebx
leaq 0x760(%rsp), %rdi
callq 0x2050
leaq 0x170(%rsp), %rdi
callq 0x514a
leaq 0x280(%rsp), %rdi
callq 0x5116
leaq 0x1c0(%rsp), %rdi
callq 0x5116
leaq 0x2a0(%rsp), %rdi
callq 0x5116
leaq 0x140(%rsp), %rdi
callq 0x4b46
leaq 0x1e0(%rsp), %rdi
callq 0x4b46
leaq 0x190(%rsp), %rdi
callq 0x4b46
leaq 0x368(%rsp), %rdi
callq 0x2100
leaq 0x390(%rsp), %rdi
callq 0x2100
leaq 0x318(%rsp), %rdi
callq 0x2100
movq 0x68(%rsp), %rdi
callq 0x2230
leaq 0x200(%rsp), %rdi
callq 0x20d0
leaq 0x3b8(%rsp), %rdi
callq 0x20d0
leaq 0x340(%rsp), %rdi
callq 0x2100
leaq 0x1480(%rsp), %rdi
callq 0x2050
leaq 0x478(%rsp), %rdi
callq 0x20d0
leaq 0xd70(%rsp), %rdi
callq 0x4da0
leaq 0xf8(%rsp), %rdi
callq 0x2100
movl %ebx, %eax
addq $0x1688, %rsp           # imm = 0x1688
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x431f
jmp 0x46bc
jmp 0x431f
jmp 0x46bc
jmp 0x431f
jmp 0x46bc
jmp 0x431f
jmp 0x46bc
movq %rax, %rbx
leaq 0x498(%rsp), %rdi
jmp 0x46b2
jmp 0x46bc
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
jmp 0x454a
jmp 0x470d
movq %rax, %rbx
jmp 0x4751
movq %rax, %rbx
jmp 0x475e
movq %rax, %rbx
jmp 0x476b
movq %rax, %rbx
jmp 0x4778
movq %rax, %rbx
jmp 0x4785
jmp 0x46bc
movq %rax, %rbx
leaq 0x498(%rsp), %rdi
callq 0x20d0
jmp 0x479f
jmp 0x4701
jmp 0x46bc
jmp 0x470d
movq %rax, %rbx
jmp 0x47ac
jmp 0x468d
jmp 0x4701
jmp 0x4645
jmp 0x468d
movq %rax, %rbx
jmp 0x482e
jmp 0x46cd
jmp 0x43d5
jmp 0x43e7
jmp 0x46cd
jmp 0x43d5
jmp 0x43e7
jmp 0x46cd
movq %rax, %rbx
leaq 0x760(%rsp), %rdi
callq 0x2100
jmp 0x4406
movq %rax, %rbx
jmp 0x4406
jmp 0x46cd
movq %rax, %rbx
leaq 0x760(%rsp), %rdi
callq 0x2100
jmp 0x4406
movq %rax, %rbx
leaq 0x498(%rsp), %rdi
callq 0x2100
jmp 0x4838
jmp 0x46cd
jmp 0x470d
jmp 0x44fa
movq %rax, %rbx
jmp 0x44de
jmp 0x470d
movq %rax, %rbx
jmp 0x450f
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x20d0
jmp 0x447f
jmp 0x44fa
movq %rax, %rbx
jmp 0x452b
jmp 0x470d
movq %rax, %rbx
jmp 0x44eb
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x20d0
jmp 0x44b5
jmp 0x44fa
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x20d0
jmp 0x44cc
jmp 0x470d
movq %rax, %rbx
jmp 0x4538
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x20d0
jmp 0x4502
movq %rax, %rbx
jmp 0x44f8
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x20d0
jmp 0x4519
jmp 0x470d
movq %rax, %rbx
jmp 0x4538
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x20d0
leaq 0xa8(%rsp), %rdi
callq 0x20d0
leaq 0x120(%rsp), %rdi
callq 0x20d0
jmp 0x4545
movq %rax, %rbx
jmp 0x4545
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x20d0
jmp 0x4538
jmp 0x470d
movq %rax, %rbx
jmp 0x4538
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x20d0
leaq 0xa8(%rsp), %rdi
callq 0x20d0
leaq 0x120(%rsp), %rdi
callq 0x20d0
leaq 0x78(%rsp), %rdi
callq 0x20d0
jmp 0x4710
movq %rax, %rbx
leaq 0x760(%rsp), %rdi
callq 0x2100
jmp 0x4569
movq %rax, %rbx
leaq 0x498(%rsp), %rdi
callq 0x2100
jmp 0x4845
movq %rax, %rbx
jmp 0x4845
movq %rax, %rbx
leaq 0x698(%rsp), %rdi
callq 0x2100
jmp 0x4598
movq %rax, %rbx
leaq 0x3d8(%rsp), %rdi
jmp 0x484d
jmp 0x466b
movq %rax, %rbx
leaq 0x6c0(%rsp), %rdi
callq 0x2100
jmp 0x45bf
movq %rax, %rbx
leaq 0x3f8(%rsp), %rdi
jmp 0x484d
jmp 0x466b
movq %rax, %rbx
leaq 0x6e8(%rsp), %rdi
callq 0x2100
jmp 0x45e6
movq %rax, %rbx
leaq 0x418(%rsp), %rdi
jmp 0x484d
jmp 0x466b
movq %rax, %rbx
leaq 0x710(%rsp), %rdi
callq 0x2100
jmp 0x460a
movq %rax, %rbx
leaq 0x438(%rsp), %rdi
jmp 0x484d
jmp 0x466b
movq %rax, %rbx
leaq 0x738(%rsp), %rdi
callq 0x2100
jmp 0x462e
movq %rax, %rbx
leaq 0x458(%rsp), %rdi
jmp 0x484d
jmp 0x466b
movq %rax, %rbx
jmp 0x4807
movq %rax, %rbx
jmp 0x4814
jmp 0x470d
jmp 0x470d
jmp 0x470d
jmp 0x470d
jmp 0x470d
jmp 0x470d
movq %rax, %rbx
jmp 0x4852
jmp 0x46d5
movq %rax, %rbx
jmp 0x486c
movq %rax, %rbx
jmp 0x4879
movq %rax, %rbx
jmp 0x4886
movq %rax, %rbx
jmp 0x4821
movq %rax, %rbx
leaq 0x498(%rsp), %rdi
callq 0x20d0
jmp 0x46aa
movq %rax, %rbx
leaq 0x970(%rsp), %rdi
callq 0x20d0
jmp 0x4792
movq %rax, %rbx
jmp 0x4792
jmp 0x46df
movq %rax, %rbx
jmp 0x46ef
jmp 0x4701
movq %rax, %rbx
jmp 0x4838
movq %rax, %rbx
jmp 0x485f
jmp 0x470d
movq %rax, %rbx
movq 0x978(%rsp), %rdi
callq 0x2230
movq 0x4a0(%rsp), %rdi
callq 0x2230
jmp 0x479f
movq %rax, %rbx
jmp 0x479f
jmp 0x470d
jmp 0x470d
movq %rax, %rbx
leaq 0x220(%rsp), %rdi
callq 0x4b68
leaq 0x300(%rsp), %rdi
callq 0x4b46
leaq 0x240(%rsp), %rdi
callq 0x4b46
leaq 0x260(%rsp), %rdi
callq 0x4b46
leaq 0xe80(%rsp), %rdi
callq 0x2330
leaq 0x1080(%rsp), %rdi
callq 0x2330
leaq 0x1280(%rsp), %rdi
callq 0x2330
leaq 0xb70(%rsp), %rdi
callq 0x2330
leaq 0x970(%rsp), %rdi
callq 0x2330
leaq 0x498(%rsp), %rdi
callq 0x2330
leaq 0x158(%rsp), %rdi
callq 0x4d7e
leaq 0x760(%rsp), %rdi
callq 0x2050
leaq 0x170(%rsp), %rdi
callq 0x514a
leaq 0x280(%rsp), %rdi
callq 0x5116
leaq 0x1c0(%rsp), %rdi
callq 0x5116
leaq 0x2a0(%rsp), %rdi
callq 0x5116
leaq 0x140(%rsp), %rdi
callq 0x4b46
leaq 0x1e0(%rsp), %rdi
callq 0x4b46
leaq 0x190(%rsp), %rdi
callq 0x4b46
leaq 0x368(%rsp), %rdi
callq 0x2100
leaq 0x390(%rsp), %rdi
callq 0x2100
leaq 0x318(%rsp), %rdi
callq 0x2100
movq 0x68(%rsp), %rdi
callq 0x2230
leaq 0x200(%rsp), %rdi
callq 0x20d0
leaq 0x3b8(%rsp), %rdi
callq 0x20d0
leaq 0x340(%rsp), %rdi
callq 0x2100
leaq 0x1480(%rsp), %rdi
callq 0x2050
leaq 0x478(%rsp), %rdi
callq 0x20d0
leaq 0xd70(%rsp), %rdi
callq 0x4da0
leaq 0xf8(%rsp), %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x2430
nop