// File: pgrouchy[P]NoiseWorld/master.cpp
// Function: main
int main(int argc, char* argv[]) {

    if (argc != 2) {
        cout << "Usage: EMM_SymComm [runID]" << endl;
        exit(-1);
    }

    signal(SIGTERM, term_trap);

    list<Genome*>::iterator curGenome, curGenome2;
    list<Population*>::iterator curPop;

    string myFilename;

    Population *initPop;

    int i, j, fd, intStat, bestIsl, numInSync, counter1 = 0, counter2 = 0, zipCounter = 0, bestFit = 0, era_counter = 0;
    int myInt[6], myBestInt[6];
    double myDouble[2], myBestDouble[2];
    double densityTotal = 0.0;

    int run_id = atoi(argv[1]);

    FILE *dataFile;
    struct stat stFileInfo;
    ofstream myFile;
    struct flock fl = {F_WRLCK, SEEK_SET,   0,      0,     0 };
    fl.l_pid = getpid();

    string tempString, tempString2;

    // Initialize randomizer so that different runs produce different results
    srand( (unsigned)(run_id*100000) );
    //srand ( time(NULL) );

    // make necessary directories
    for (i = 0; i < NUM_ISLANDS; i++) {
        stringstream isl_sync_dir;
        isl_sync_dir << "mkdir /dev/shm/sync_dir_" << i;
        system(isl_sync_dir.str().c_str());

        stringstream isl_sync_file;
        isl_sync_file << "touch /dev/shm/sync_dir_" << i << "/folderSync.txt";
        system(isl_sync_file.str().c_str());
    }
    stringstream data_dir_ss;
    data_dir_ss << "mkdir dataDir_" << run_id;
    system(data_dir_ss.str().c_str());

    // Start islands
    for (i = 0; i < NUM_ISLANDS; i++) {
        // Generate initial population
        initPop = new Population(i);
        stringstream isl_pop_ss;
        isl_pop_ss << "/dev/shm/initPop_" << i << ".pop";
        initPop->savePop(isl_pop_ss.str().c_str());
        delete initPop;
    }
    for (i = 0; i < NUM_SLAVES; i++) {
        // Run slaves
        stringstream isl_ss;
        isl_ss << "nice ./EMM_island " << i << " " << run_id << " &";
        system(isl_ss.str().c_str());
    }

    // we run the simulation until it is killed by the system or user
    while (true) {
        numInSync = 0;
        for (i = 0; i < NUM_SLAVES; i++) {
            stringstream ss;
            ss << "/dev/shm/fitFlag_" << i << ".txt";
            intStat = stat(ss.str().c_str(),&stFileInfo);
            if (intStat == 0) {
                numInSync++;
            } else {
                break;
            }
        }

        if (numInSync == NUM_SLAVES) {

            era_counter++;

            ofstream myFile;
            stringstream ss_gen_file;
            ss_gen_file << "dataDir_" << run_id << "/genOutput.csv";
            myFile.open(ss_gen_file.str().c_str(), ios::out | ios::app);

            myBestInt[3] = -1;

            for (i = 0; i < NUM_ISLANDS; i++) {

                stringstream sync_ss1;
                sync_ss1 << "/dev/shm/sync_dir_" << i << "/folderSync.txt";
                // set file lock
                fl.l_type = F_WRLCK;
                fd = open(sync_ss1.str().c_str(), O_RDWR);
                fcntl(fd, F_SETLKW, &fl);

                stringstream ss2;
                ss2 << "/dev/shm/currentStatus_" << i << ".txt";
                dataFile = fopen(ss2.str().c_str(), "r");
                fscanf(dataFile, "%d,%d,%d,%d,%d,%lf,%lf,%d\n", &myInt[0], &myInt[1], &myInt[2], &myInt[3], &myInt[4], &myDouble[0], &myDouble[1], &myInt[5]);
                fclose(dataFile);

                myFile << "Isl " << i << " t-step " << myInt[1] << " numBirths: " << myInt[3] << " NumMigIn: " << myInt[4] << " avgAge: " << myDouble[0] << " beta: " << myDouble[1] << " hitWall: " << myBestInt[5] << endl;

                cout << "Isl " << i << " t-step " << myInt[1] << " numBirths: " << myInt[3] << " NumMigIn: " << myInt[4] << " avgAge: " << myDouble[0] << " beta: " << myDouble[1] << " hitWall: " << myBestInt[5] << endl;

                if (myInt[3] > myBestInt[3]) {
                    bestIsl = i;
                    for (j = 0; j < 6; j++) {
                        if (j < 2) {
                            myBestDouble[j] = myDouble[j];
                        }
                        myBestInt[j] = myInt[j];
                    }
                }

                // release lock file
                fl.l_type = F_UNLCK;
                fcntl(fd, F_SETLK, &fl);
                close(fd);
                
                counter1 += myInt[3];
                counter2++;
                densityTotal += myDouble[1];
            }
            myFile.close();

            stringstream copy_best_pop;
            copy_best_pop << "cp /dev/shm/popSnapshot-" << (era_counter * ERA) << "_" << bestIsl << ".pop dataDir_" << run_id << "/curBestPop.pop";
            system(copy_best_pop.str().c_str());

            if (myBestInt[3] > bestFit) {
                bestFit = myBestInt[3];
                stringstream copy_best_pop_2;
                copy_best_pop_2 << "cp /dev/shm/popSnapshot-" << (era_counter * ERA) << "_" << bestIsl << ".pop dataDir_" << run_id << "/overallBestPop.pop";
                system(copy_best_pop_2.str().c_str());
            }

            stringstream ss_avg_file;
            ss_avg_file << "dataDir_" << run_id << "/avgPopSize.csv";
            myFile.open(ss_avg_file.str().c_str(), ios::out | ios::app);
            myFile << ((double)counter1 / (double)counter2) << "  " << (densityTotal / (double)counter2) << endl;
            myFile.close();
            counter1 = 0;
            counter2 = 0;
            densityTotal = 0.0;

            stringstream do_zip;
            do_zip << "/dev/shm/zip_time_flag.txt";
            intStat = stat(do_zip.str().c_str(),&stFileInfo);
            if (intStat == 0) {
                stringstream zip_ss;
                if (zipCounter == 0) {
                    zip_ss << "zip -q -j dataDir_" << run_id << "/popSnapshots_" << zipCounter << ".zip /dev/shm/initPop_* /dev/shm/popSnapshot* /dev/shm/mig*.pop";
                } else {
                    zip_ss << "zip -q -j dataDir_" << run_id << "/popSnapshots_" << zipCounter << ".zip /dev/shm/popSnapshot* /dev/shm/mig*.pop";
                }
                system(zip_ss.str().c_str());

                stringstream zip_rm;
                zip_rm << "rm /dev/shm/popSnapshot*";
                system(zip_rm.str().c_str());

                if (zipCounter == 0) {
                    stringstream del_ss;
                    del_ss << "rm /dev/shm/initPop_*";
                    system(del_ss.str().c_str());
                }

                zipCounter++;
                stringstream rm_zip;
                rm_zip << "rm /dev/shm/zip_time_flag.txt";
                system(rm_zip.str().c_str());
            }


            for (i = 0; i < NUM_SLAVES; i++) {
                stringstream ss;
                ss << "rm /dev/shm/fitFlag_" << i << ".txt";
                system(ss.str().c_str());
            }
        }
        numInSync = 0;
        for (i = 0; i < NUM_SLAVES; i++) {
            stringstream ss;
            ss << "/dev/shm/syncFlag_" << i << ".txt";
            intStat = stat(ss.str().c_str(),&stFileInfo);
            if (intStat == 0) {
                numInSync++;
            } else {
                break;
            }
        }
        if (numInSync == NUM_SLAVES) {
            for (i = 0; i < NUM_SLAVES; i++) {
                stringstream ss;
                ss << "rm /dev/shm/syncFlag_" << i << ".txt";
                system(ss.str().c_str());
            }
        }
        usleep(100000);
    }

    return(0);
}

// Assembly:
subq $0x2a28, %rsp           # imm = 0x2A28
movl $0x0, 0x2a24(%rsp)
movl %edi, 0x2a20(%rsp)
movq %rsi, 0x2a18(%rsp)
cmpl $0x2, 0x2a20(%rsp)
je 0x3857
movq 0x147a6(%rip), %rdi     # 0x17fd8
leaq 0xf88f(%rip), %rsi      # 0x130c8
callq 0x3280
movq %rax, %rdi
movq 0x14780(%rip), %rsi     # 0x17fc8
callq 0x32c0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x3330
leaq -0x1fe(%rip), %rsi      # 0x3660
movl $0xf, %edi
callq 0x3320
leaq 0x2a10(%rsp), %rdi
callq 0x5840
leaq 0x2a08(%rsp), %rdi
callq 0x5840
leaq 0x2a00(%rsp), %rdi
callq 0x5860
leaq 0x29e0(%rsp), %rdi
callq 0x3370
movl $0x0, 0x29bc(%rsp)
movl $0x0, 0x29b8(%rsp)
movl $0x0, 0x29b4(%rsp)
movl $0x0, 0x29b0(%rsp)
movl $0x0, 0x29ac(%rsp)
movq $0x0, 0x2948(%rsp)
movq 0x2a18(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x33e0
movl %eax, 0x2944(%rsp)
leaq 0x26a8(%rsp), %rdi
callq 0x3420
jmp 0x3906
movq 0xfa6b(%rip), %rax      # 0x13378
movq %rax, 0x2678(%rsp)
movq 0xfa64(%rip), %rax      # 0x13380
movq %rax, 0x2680(%rsp)
movq 0xfa5d(%rip), %rax      # 0x13388
movq %rax, 0x2688(%rsp)
movq 0xfa56(%rip), %rax      # 0x13390
movq %rax, 0x2690(%rsp)
callq 0x33b0
movl %eax, 0x2690(%rsp)
leaq 0x2658(%rsp), %rdi
callq 0x3370
leaq 0x2638(%rsp), %rdi
callq 0x3370
imull $0x186a0, 0x2944(%rsp), %edi # imm = 0x186A0
callq 0x3260
movl $0x0, 0x29d4(%rsp)
cmpl $0x64, 0x29d4(%rsp)
jge 0x3b9c
leaq 0x24b0(%rsp), %rdi
callq 0x3180
jmp 0x39a0
leaq 0x24c0(%rsp), %rdi
leaq 0xf734(%rip), %rsi      # 0x130e3
callq 0x3280
movq %rax, 0x2e0(%rsp)
jmp 0x39be
movq 0x2e0(%rsp), %rdi
movl 0x29d4(%rsp), %esi
callq 0x3430
jmp 0x39d4
leaq 0x2490(%rsp), %rdi
leaq 0x24b0(%rsp), %rsi
callq 0x3270
jmp 0x39eb
leaq 0x2490(%rsp), %rdi
callq 0x30e0
movq %rax, %rdi
callq 0x3220
jmp 0x3a02
leaq 0x2490(%rsp), %rdi
callq 0x3160
leaq 0x2308(%rsp), %rdi
callq 0x3180
jmp 0x3a1e
leaq 0x2318(%rsp), %rdi
leaq 0xf6cf(%rip), %rsi      # 0x130fc
callq 0x3280
movq %rax, 0x2d8(%rsp)
jmp 0x3a3c
movq 0x2d8(%rsp), %rdi
movl 0x29d4(%rsp), %esi
callq 0x3430
movq %rax, 0x2d0(%rsp)
jmp 0x3a5a
movq 0x2d0(%rsp), %rdi
leaq 0xf6ac(%rip), %rsi      # 0x13115
callq 0x3280
jmp 0x3a70
leaq 0x22e8(%rsp), %rdi
leaq 0x2308(%rsp), %rsi
callq 0x3270
jmp 0x3a87
leaq 0x22e8(%rsp), %rdi
callq 0x30e0
movq %rax, %rdi
callq 0x3220
jmp 0x3a9e
leaq 0x22e8(%rsp), %rdi
callq 0x3160
leaq 0x2308(%rsp), %rdi
callq 0x31b0
leaq 0x24b0(%rsp), %rdi
callq 0x31b0
movl 0x29d4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29d4(%rsp)
jmp 0x3983
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
jmp 0x5817
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
jmp 0x57f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
jmp 0x3b8a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
leaq 0x2490(%rsp), %rdi
callq 0x3160
jmp 0x3b8a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
jmp 0x3b7d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
leaq 0x22e8(%rsp), %rdi
callq 0x3160
leaq 0x2308(%rsp), %rdi
callq 0x31b0
leaq 0x24b0(%rsp), %rdi
callq 0x31b0
jmp 0x57f0
leaq 0x2160(%rsp), %rdi
callq 0x3180
jmp 0x3bab
leaq 0x2170(%rsp), %rdi
leaq 0xf56b(%rip), %rsi      # 0x13125
callq 0x3280
movq %rax, 0x2c8(%rsp)
jmp 0x3bc9
movq 0x2c8(%rsp), %rdi
movl 0x2944(%rsp), %esi
callq 0x3430
jmp 0x3bdf
leaq 0x2140(%rsp), %rdi
leaq 0x2160(%rsp), %rsi
callq 0x3270
jmp 0x3bf6
leaq 0x2140(%rsp), %rdi
callq 0x30e0
movq %rax, %rdi
callq 0x3220
jmp 0x3c0d
leaq 0x2140(%rsp), %rdi
callq 0x3160
movl $0x0, 0x29d4(%rsp)
cmpl $0x64, 0x29d4(%rsp)
jge 0x3eb7
movl $0x50, %edi
callq 0x32a0
movq %rax, 0x2c0(%rsp)
jmp 0x3c47
movq 0x2c0(%rsp), %rdi
movl 0x29d4(%rsp), %esi
callq 0x5880
jmp 0x3c5d
movq 0x2c0(%rsp), %rax
movq %rax, 0x29d8(%rsp)
leaq 0x1fb8(%rsp), %rdi
callq 0x3180
jmp 0x3c7c
leaq 0x1fc8(%rsp), %rdi
leaq 0xf4a9(%rip), %rsi      # 0x13134
callq 0x3280
movq %rax, 0x2b8(%rsp)
jmp 0x3c9a
movq 0x2b8(%rsp), %rdi
movl 0x29d4(%rsp), %esi
callq 0x3430
movq %rax, 0x2b0(%rsp)
jmp 0x3cb8
movq 0x2b0(%rsp), %rdi
leaq 0xf5d8(%rip), %rsi      # 0x1329f
callq 0x3280
jmp 0x3cce
movq 0x29d8(%rsp), %rax
movq %rax, 0x2a8(%rsp)
leaq 0x1f78(%rsp), %rdi
leaq 0x1fb8(%rsp), %rsi
callq 0x3270
jmp 0x3cf5
leaq 0x1f78(%rsp), %rdi
callq 0x30e0
movq %rax, 0x298(%rsp)
leaq 0x1f77(%rsp), %rdi
movq %rdi, 0x2a0(%rsp)
callq 0x3460
movq 0x298(%rsp), %rsi
movq 0x2a0(%rsp), %rdx
leaq 0x1f98(%rsp), %rdi
callq 0x5b90
jmp 0x3d3e
movq 0x2a8(%rsp), %rdi
leaq 0x1f98(%rsp), %rsi
callq 0x97d0
jmp 0x3d55
leaq 0x1f98(%rsp), %rdi
callq 0x3160
leaq 0x1f77(%rsp), %rdi
callq 0x32e0
leaq 0x1f78(%rsp), %rdi
callq 0x3160
movq 0x29d8(%rsp), %rax
movq %rax, 0x290(%rsp)
cmpq $0x0, %rax
je 0x3db1
movq 0x290(%rsp), %rdi
callq 0x5c50
movq 0x290(%rsp), %rdi
movl $0x50, %esi
callq 0x32b0
leaq 0x1fb8(%rsp), %rdi
callq 0x31b0
movl 0x29d4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29d4(%rsp)
jmp 0x3c25
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
jmp 0x57e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
leaq 0x2140(%rsp), %rdi
callq 0x3160
jmp 0x57e3
movq 0x2c0(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
movl $0x50, %esi
callq 0x32b0
jmp 0x57e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
jmp 0x3ea5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
jmp 0x3e8b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
leaq 0x1f98(%rsp), %rdi
callq 0x3160
leaq 0x1f77(%rsp), %rdi
callq 0x32e0
leaq 0x1f78(%rsp), %rdi
callq 0x3160
leaq 0x1fb8(%rsp), %rdi
callq 0x31b0
jmp 0x57e3
movl $0x0, 0x29d4(%rsp)
cmpl $0x14, 0x29d4(%rsp)
jge 0x4014
leaq 0x1de8(%rsp), %rdi
callq 0x3180
jmp 0x3edf
leaq 0x1df8(%rsp), %rdi
leaq 0xf258(%rip), %rsi      # 0x13146
callq 0x3280
movq %rax, 0x288(%rsp)
jmp 0x3efd
movq 0x288(%rsp), %rdi
movl 0x29d4(%rsp), %esi
callq 0x3430
movq %rax, 0x280(%rsp)
jmp 0x3f1b
movq 0x280(%rsp), %rdi
leaq 0xf316(%rip), %rsi      # 0x13240
callq 0x3280
movq %rax, 0x278(%rsp)
jmp 0x3f39
movq 0x278(%rsp), %rdi
movl 0x2944(%rsp), %esi
callq 0x3430
movq %rax, 0x270(%rsp)
jmp 0x3f57
movq 0x270(%rsp), %rdi
leaq 0xf1f3(%rip), %rsi      # 0x13159
callq 0x3280
jmp 0x3f6d
leaq 0x1dc8(%rsp), %rdi
leaq 0x1de8(%rsp), %rsi
callq 0x3270
jmp 0x3f84
leaq 0x1dc8(%rsp), %rdi
callq 0x30e0
movq %rax, %rdi
callq 0x3220
jmp 0x3f9b
leaq 0x1dc8(%rsp), %rdi
callq 0x3160
leaq 0x1de8(%rsp), %rdi
callq 0x31b0
movl 0x29d4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29d4(%rsp)
jmp 0x3ec2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
jmp 0x4002
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
leaq 0x1dc8(%rsp), %rdi
callq 0x3160
leaq 0x1de8(%rsp), %rdi
callq 0x31b0
jmp 0x57e3
jmp 0x4016
jmp 0x4018
movl $0x0, 0x29c0(%rsp)
movl $0x0, 0x29d4(%rsp)
cmpl $0x14, 0x29d4(%rsp)
jge 0x4174
leaq 0x1c40(%rsp), %rdi
callq 0x3180
jmp 0x404b
leaq 0x1c50(%rsp), %rdi
leaq 0xf2c7(%rip), %rsi      # 0x13321
callq 0x3280
movq %rax, 0x268(%rsp)
jmp 0x4069
movq 0x268(%rsp), %rdi
movl 0x29d4(%rsp), %esi
callq 0x3430
movq %rax, 0x260(%rsp)
jmp 0x4087
movq 0x260(%rsp), %rdi
leaq 0xf08a(%rip), %rsi      # 0x13120
callq 0x3280
jmp 0x409d
leaq 0x1c20(%rsp), %rdi
leaq 0x1c40(%rsp), %rsi
callq 0x3270
jmp 0x40b4
leaq 0x1c20(%rsp), %rdi
callq 0x30e0
movq %rax, %rdi
leaq 0x28a8(%rsp), %rsi
callq 0x3250
movl %eax, 0x29c8(%rsp)
leaq 0x1c20(%rsp), %rdi
callq 0x3160
cmpl $0x0, 0x29c8(%rsp)
jne 0x4128
movl 0x29c0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29c0(%rsp)
jmp 0x4135
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
leaq 0x1c40(%rsp), %rdi
callq 0x31b0
jmp 0x57e3
movl $0xd, 0x1c1c(%rsp)
jmp 0x4140
movl $0x0, 0x1c1c(%rsp)
leaq 0x1c40(%rsp), %rdi
callq 0x31b0
movl 0x1c1c(%rsp), %eax
testl %eax, %eax
je 0x415c
jmp 0x415a
jmp 0x4174
jmp 0x415e
movl 0x29d4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29d4(%rsp)
jmp 0x402e
cmpl $0x14, 0x29c0(%rsp)
jne 0x5560
movl 0x29ac(%rsp), %eax
incl %eax
movl %eax, 0x29ac(%rsp)
leaq 0x1a18(%rsp), %rdi
callq 0x3420
jmp 0x41a1
leaq 0x1890(%rsp), %rdi
callq 0x3180
jmp 0x41b0
leaq 0x18a0(%rsp), %rdi
leaq 0xf08d(%rip), %rsi      # 0x1324c
callq 0x3280
movq %rax, 0x258(%rsp)
jmp 0x41ce
movq 0x258(%rsp), %rdi
movl 0x2944(%rsp), %esi
callq 0x3430
movq %rax, 0x250(%rsp)
jmp 0x41ec
movq 0x250(%rsp), %rdi
leaq 0xef61(%rip), %rsi      # 0x1315c
callq 0x3280
jmp 0x4202
leaq 0x1870(%rsp), %rdi
leaq 0x1890(%rsp), %rsi
callq 0x3270
jmp 0x4219
leaq 0x1870(%rsp), %rdi
callq 0x30e0
movq %rax, 0x240(%rsp)
movl $0x10, %edi
movl $0x1, %esi
callq 0x5d10
movl %eax, 0x24c(%rsp)
jmp 0x4246
movl 0x24c(%rsp), %edx
movq 0x240(%rsp), %rsi
leaq 0x1a18(%rsp), %rdi
callq 0x3040
jmp 0x4264
leaq 0x1870(%rsp), %rdi
callq 0x3160
movl $0xffffffff, 0x297c(%rsp) # imm = 0xFFFFFFFF
movl $0x0, 0x29d4(%rsp)
cmpl $0x64, 0x29d4(%rsp)
jge 0x4a64
leaq 0x16e8(%rsp), %rdi
callq 0x3180
jmp 0x42a4
leaq 0x16f8(%rsp), %rdi
leaq 0xee4f(%rip), %rsi      # 0x13102
callq 0x3280
movq %rax, 0x238(%rsp)
jmp 0x42c2
movq 0x238(%rsp), %rdi
movl 0x29d4(%rsp), %esi
callq 0x3430
movq %rax, 0x230(%rsp)
jmp 0x42e0
movq 0x230(%rsp), %rdi
leaq 0xee26(%rip), %rsi      # 0x13115
callq 0x3280
jmp 0x42f6
movw $0x1, 0x2678(%rsp)
leaq 0x16c8(%rsp), %rdi
leaq 0x16e8(%rsp), %rsi
callq 0x3270
jmp 0x4317
leaq 0x16c8(%rsp), %rdi
callq 0x30e0
movq %rax, %rdi
xorl %eax, %eax
movl $0x2, %esi
callq 0x31a0
movl %eax, 0x22c(%rsp)
jmp 0x433c
movl 0x22c(%rsp), %eax
movl %eax, 0x29cc(%rsp)
leaq 0x16c8(%rsp), %rdi
callq 0x3160
movl 0x29cc(%rsp), %edi
xorl %eax, %eax
movl $0x7, %esi
leaq 0x2678(%rsp), %rdx
callq 0x3140
jmp 0x4374
leaq 0x1540(%rsp), %rdi
callq 0x3180
jmp 0x4383
leaq 0x1550(%rsp), %rdi
leaq 0xedd9(%rip), %rsi      # 0x1316b
callq 0x3280
movq %rax, 0x220(%rsp)
jmp 0x43a1
movq 0x220(%rsp), %rdi
movl 0x29d4(%rsp), %esi
callq 0x3430
movq %rax, 0x218(%rsp)
jmp 0x43bf
movq 0x218(%rsp), %rdi
leaq 0xed52(%rip), %rsi      # 0x13120
callq 0x3280
jmp 0x43d5
leaq 0x1520(%rsp), %rdi
leaq 0x1540(%rsp), %rsi
callq 0x3270
jmp 0x43ec
leaq 0x1520(%rsp), %rdi
callq 0x30e0
movq %rax, %rdi
leaq 0xed80(%rip), %rsi      # 0x13183
callq 0x3310
movq %rax, 0x210(%rsp)
jmp 0x4412
movq 0x210(%rsp), %rax
movq %rax, 0x2938(%rsp)
leaq 0x1520(%rsp), %rdi
callq 0x3160
movq 0x2938(%rsp), %rdi
leaq 0x2994(%rsp), %rcx
leaq 0x2998(%rsp), %r8
leaq 0x299c(%rsp), %r9
leaq 0x29a0(%rsp), %rdx
leaq 0x2968(%rsp), %rsi
leaq 0x29a4(%rsp), %r10
movq %rsp, %rax
movq %r10, 0x18(%rax)
movq %rsi, 0x10(%rax)
leaq 0x2960(%rsp), %rsi
movq %rsi, 0x8(%rax)
movq %rdx, (%rax)
leaq 0xecfd(%rip), %rsi      # 0x13185
xorl %eax, %eax
leaq 0x2990(%rsp), %rdx
callq 0x3480
jmp 0x4499
movq 0x2938(%rsp), %rdi
callq 0x3290
jmp 0x44a8
leaq 0xecf1(%rip), %rsi      # 0x131a0
leaq 0x1a18(%rsp), %rdi
callq 0x3280
movq %rax, 0x208(%rsp)
jmp 0x44c6
movq 0x208(%rsp), %rdi
movl 0x29d4(%rsp), %esi
callq 0x3430
movq %rax, 0x200(%rsp)
jmp 0x44e4
movq 0x200(%rsp), %rdi
leaq 0xecb2(%rip), %rsi      # 0x131a5
callq 0x3280
movq %rax, 0x1f8(%rsp)
jmp 0x4502
movq 0x1f8(%rsp), %rdi
movl 0x2994(%rsp), %esi
callq 0x3430
movq %rax, 0x1f0(%rsp)
jmp 0x4520
movq 0x1f0(%rsp), %rdi
leaq 0xec7f(%rip), %rsi      # 0x131ae
callq 0x3280
movq %rax, 0x1e8(%rsp)
jmp 0x453e
movq 0x1e8(%rsp), %rdi
movl 0x299c(%rsp), %esi
callq 0x3430
movq %rax, 0x1e0(%rsp)
jmp 0x455c
movq 0x1e0(%rsp), %rdi
leaq 0xec50(%rip), %rsi      # 0x131bb
callq 0x3280
movq %rax, 0x1d8(%rsp)
jmp 0x457a
movq 0x1d8(%rsp), %rdi
movl 0x29a0(%rsp), %esi
callq 0x3430
movq %rax, 0x1d0(%rsp)
jmp 0x4598
movq 0x1d0(%rsp), %rdi
leaq 0xec20(%rip), %rsi      # 0x131c7
callq 0x3280
movq %rax, 0x1c8(%rsp)
jmp 0x45b6
movq 0x1c8(%rsp), %rdi
movsd 0x2960(%rsp), %xmm0
callq 0x34a0
movq %rax, 0x1c0(%rsp)
jmp 0x45d6
movq 0x1c0(%rsp), %rdi
leaq 0xebec(%rip), %rsi      # 0x131d1
callq 0x3280
movq %rax, 0x1b8(%rsp)
jmp 0x45f4
movq 0x1b8(%rsp), %rdi
movsd 0x2968(%rsp), %xmm0
callq 0x34a0
movq %rax, 0x1b0(%rsp)
jmp 0x4614
movq 0x1b0(%rsp), %rdi
leaq 0xebb6(%rip), %rsi      # 0x131d9
callq 0x3280
movq %rax, 0x1a8(%rsp)
jmp 0x4632
movq 0x1a8(%rsp), %rdi
movl 0x2984(%rsp), %esi
callq 0x3430
movq %rax, 0x1a0(%rsp)
jmp 0x4650
movq 0x1a0(%rsp), %rdi
movq 0x13969(%rip), %rsi     # 0x17fc8
callq 0x32c0
jmp 0x4666
movq 0x1396b(%rip), %rdi     # 0x17fd8
leaq 0xeb2c(%rip), %rsi      # 0x131a0
callq 0x3280
movq %rax, 0x198(%rsp)
jmp 0x4683
movq 0x198(%rsp), %rdi
movl 0x29d4(%rsp), %esi
callq 0x3430
movq %rax, 0x190(%rsp)
jmp 0x46a1
movq 0x190(%rsp), %rdi
leaq 0xeaf5(%rip), %rsi      # 0x131a5
callq 0x3280
movq %rax, 0x188(%rsp)
jmp 0x46bf
movq 0x188(%rsp), %rdi
movl 0x2994(%rsp), %esi
callq 0x3430
movq %rax, 0x180(%rsp)
jmp 0x46dd
movq 0x180(%rsp), %rdi
leaq 0xeac2(%rip), %rsi      # 0x131ae
callq 0x3280
movq %rax, 0x178(%rsp)
jmp 0x46fb
movq 0x178(%rsp), %rdi
movl 0x299c(%rsp), %esi
callq 0x3430
movq %rax, 0x170(%rsp)
jmp 0x4719
movq 0x170(%rsp), %rdi
leaq 0xea93(%rip), %rsi      # 0x131bb
callq 0x3280
movq %rax, 0x168(%rsp)
jmp 0x4737
movq 0x168(%rsp), %rdi
movl 0x29a0(%rsp), %esi
callq 0x3430
movq %rax, 0x160(%rsp)
jmp 0x4755
movq 0x160(%rsp), %rdi
leaq 0xea63(%rip), %rsi      # 0x131c7
callq 0x3280
movq %rax, 0x158(%rsp)
jmp 0x4773
movq 0x158(%rsp), %rdi
movsd 0x2960(%rsp), %xmm0
callq 0x34a0
movq %rax, 0x150(%rsp)
jmp 0x4793
movq 0x150(%rsp), %rdi
leaq 0xea2f(%rip), %rsi      # 0x131d1
callq 0x3280
movq %rax, 0x148(%rsp)
jmp 0x47b1
movq 0x148(%rsp), %rdi
movsd 0x2968(%rsp), %xmm0
callq 0x34a0
movq %rax, 0x140(%rsp)
jmp 0x47d1
movq 0x140(%rsp), %rdi
leaq 0xe9f9(%rip), %rsi      # 0x131d9
callq 0x3280
movq %rax, 0x138(%rsp)
jmp 0x47ef
movq 0x138(%rsp), %rdi
movl 0x2984(%rsp), %esi
callq 0x3430
movq %rax, 0x130(%rsp)
jmp 0x480d
movq 0x130(%rsp), %rdi
movq 0x137ac(%rip), %rsi     # 0x17fc8
callq 0x32c0
jmp 0x4823
movl 0x299c(%rsp), %eax
cmpl 0x297c(%rsp), %eax
jle 0x499f
movl 0x29d4(%rsp), %eax
movl %eax, 0x29c4(%rsp)
movl $0x0, 0x29d0(%rsp)
cmpl $0x6, 0x29d0(%rsp)
jge 0x499d
cmpl $0x2, 0x29d0(%rsp)
jge 0x4969
movslq 0x29d0(%rsp), %rax
movsd 0x2960(%rsp,%rax,8), %xmm0
movslq 0x29d0(%rsp), %rax
movsd %xmm0, 0x2950(%rsp,%rax,8)
jmp 0x4969
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
jmp 0x554e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
jmp 0x5541
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
leaq 0x1870(%rsp), %rdi
callq 0x3160
jmp 0x5541
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
jmp 0x4a52
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
leaq 0x16c8(%rsp), %rdi
callq 0x3160
jmp 0x4a52
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
jmp 0x4a45
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
leaq 0x1520(%rsp), %rdi
callq 0x3160
jmp 0x4a45
movslq 0x29d0(%rsp), %rax
movl 0x2990(%rsp,%rax,4), %ecx
movslq 0x29d0(%rsp), %rax
movl %ecx, 0x2970(%rsp,%rax,4)
movl 0x29d0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29d0(%rsp)
jmp 0x4850
jmp 0x499f
movw $0x2, 0x2678(%rsp)
movl 0x29cc(%rsp), %edi
xorl %eax, %eax
movl $0x6, %esi
leaq 0x2678(%rsp), %rdx
callq 0x3140
jmp 0x49c6
movl 0x29cc(%rsp), %edi
callq 0x34c0
jmp 0x49d4
movl 0x299c(%rsp), %eax
addl 0x29bc(%rsp), %eax
movl %eax, 0x29bc(%rsp)
movl 0x29b8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29b8(%rsp)
movsd 0x2968(%rsp), %xmm0
addsd 0x2948(%rsp), %xmm0
movsd %xmm0, 0x2948(%rsp)
leaq 0x1540(%rsp), %rdi
callq 0x31b0
leaq 0x16e8(%rsp), %rdi
callq 0x31b0
movl 0x29d4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29d4(%rsp)
jmp 0x4287
leaq 0x1540(%rsp), %rdi
callq 0x31b0
leaq 0x16e8(%rsp), %rdi
callq 0x31b0
jmp 0x5541
leaq 0x1a18(%rsp), %rdi
callq 0x3390
jmp 0x4a73
leaq 0x1398(%rsp), %rdi
callq 0x3180
jmp 0x4a82
leaq 0x13a8(%rsp), %rdi
leaq 0xe753(%rip), %rsi      # 0x131e4
callq 0x3280
movq %rax, 0x128(%rsp)
jmp 0x4aa0
movq 0x128(%rsp), %rdi
movl 0x29ac(%rsp), %eax
imull $0x186a0, %eax, %esi    # imm = 0x186A0
callq 0x3430
movq %rax, 0x120(%rsp)
jmp 0x4ac4
movq 0x120(%rsp), %rdi
leaq 0xe874(%rip), %rsi      # 0x13347
callq 0x3280
movq %rax, 0x118(%rsp)
jmp 0x4ae2
movq 0x118(%rsp), %rdi
movl 0x29c4(%rsp), %esi
callq 0x3430
movq %rax, 0x110(%rsp)
jmp 0x4b00
movq 0x110(%rsp), %rdi
leaq 0xe6ee(%rip), %rsi      # 0x131fd
callq 0x3280
movq %rax, 0x108(%rsp)
jmp 0x4b1e
movq 0x108(%rsp), %rdi
movl 0x2944(%rsp), %esi
callq 0x3430
movq %rax, 0x100(%rsp)
jmp 0x4b3c
movq 0x100(%rsp), %rdi
leaq 0xe6c0(%rip), %rsi      # 0x1320b
callq 0x3280
jmp 0x4b52
leaq 0x1378(%rsp), %rdi
leaq 0x1398(%rsp), %rsi
callq 0x3270
jmp 0x4b69
leaq 0x1378(%rsp), %rdi
callq 0x30e0
movq %rax, %rdi
callq 0x3220
jmp 0x4b80
leaq 0x1378(%rsp), %rdi
callq 0x3160
movl 0x297c(%rsp), %eax
cmpl 0x29b0(%rsp), %eax
jle 0x4d63
movl 0x297c(%rsp), %eax
movl %eax, 0x29b0(%rsp)
leaq 0x11f0(%rsp), %rdi
callq 0x3180
jmp 0x4bbe
leaq 0x1200(%rsp), %rdi
leaq 0xe617(%rip), %rsi      # 0x131e4
callq 0x3280
movq %rax, 0xf8(%rsp)
jmp 0x4bdc
movq 0xf8(%rsp), %rdi
movl 0x29ac(%rsp), %eax
imull $0x186a0, %eax, %esi    # imm = 0x186A0
callq 0x3430
movq %rax, 0xf0(%rsp)
jmp 0x4c00
movq 0xf0(%rsp), %rdi
leaq 0xe738(%rip), %rsi      # 0x13347
callq 0x3280
movq %rax, 0xe8(%rsp)
jmp 0x4c1e
movq 0xe8(%rsp), %rdi
movl 0x29c4(%rsp), %esi
callq 0x3430
movq %rax, 0xe0(%rsp)
jmp 0x4c3c
movq 0xe0(%rsp), %rdi
leaq 0xe5b2(%rip), %rsi      # 0x131fd
callq 0x3280
movq %rax, 0xd8(%rsp)
jmp 0x4c5a
movq 0xd8(%rsp), %rdi
movl 0x2944(%rsp), %esi
callq 0x3430
movq %rax, 0xd0(%rsp)
jmp 0x4c78
movq 0xd0(%rsp), %rdi
leaq 0xe594(%rip), %rsi      # 0x1321b
callq 0x3280
jmp 0x4c8e
leaq 0x11d0(%rsp), %rdi
leaq 0x11f0(%rsp), %rsi
callq 0x3270
jmp 0x4ca5
leaq 0x11d0(%rsp), %rdi
callq 0x30e0
movq %rax, %rdi
callq 0x3220
jmp 0x4cbc
leaq 0x11d0(%rsp), %rdi
callq 0x3160
leaq 0x11f0(%rsp), %rdi
callq 0x31b0
jmp 0x4d63
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
jmp 0x5534
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
leaq 0x1378(%rsp), %rdi
callq 0x3160
jmp 0x5534
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
jmp 0x4d51
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
leaq 0x11d0(%rsp), %rdi
callq 0x3160
leaq 0x11f0(%rsp), %rdi
callq 0x31b0
jmp 0x5534
leaq 0x1048(%rsp), %rdi
callq 0x3180
jmp 0x4d72
leaq 0x1058(%rsp), %rdi
leaq 0xe4cb(%rip), %rsi      # 0x1324c
callq 0x3280
movq %rax, 0xc8(%rsp)
jmp 0x4d90
movq 0xc8(%rsp), %rdi
movl 0x2944(%rsp), %esi
callq 0x3430
movq %rax, 0xc0(%rsp)
jmp 0x4dae
movq 0xc0(%rsp), %rdi
leaq 0xe472(%rip), %rsi      # 0x1322f
callq 0x3280
jmp 0x4dc4
leaq 0x1028(%rsp), %rdi
leaq 0x1048(%rsp), %rsi
callq 0x3270
jmp 0x4ddb
leaq 0x1028(%rsp), %rdi
callq 0x30e0
movq %rax, 0xb0(%rsp)
movl $0x10, %edi
movl $0x1, %esi
callq 0x5d10
movl %eax, 0xbc(%rsp)
jmp 0x4e08
movl 0xbc(%rsp), %edx
movq 0xb0(%rsp), %rsi
leaq 0x1a18(%rsp), %rdi
callq 0x3040
jmp 0x4e26
leaq 0x1028(%rsp), %rdi
callq 0x3160
cvtsi2sdl 0x29bc(%rsp), %xmm0
cvtsi2sdl 0x29b8(%rsp), %xmm1
divsd %xmm1, %xmm0
leaq 0x1a18(%rsp), %rdi
callq 0x34a0
movq %rax, 0xa8(%rsp)
jmp 0x4e60
movq 0xa8(%rsp), %rdi
leaq 0xe3d0(%rip), %rsi      # 0x1323f
callq 0x3280
movq %rax, 0xa0(%rsp)
jmp 0x4e7e
movq 0xa0(%rsp), %rdi
movsd 0x2948(%rsp), %xmm0
cvtsi2sdl 0x29b8(%rsp), %xmm1
divsd %xmm1, %xmm0
callq 0x34a0
movq %rax, 0x98(%rsp)
jmp 0x4eab
movq 0x98(%rsp), %rdi
movq 0x1310e(%rip), %rsi     # 0x17fc8
callq 0x32c0
jmp 0x4ec1
leaq 0x1a18(%rsp), %rdi
callq 0x3390
jmp 0x4ed0
movl $0x0, 0x29bc(%rsp)
movl $0x0, 0x29b8(%rsp)
movq $0x0, 0x2948(%rsp)
leaq 0xea0(%rsp), %rdi
callq 0x3180
jmp 0x4f01
leaq 0xeb0(%rsp), %rdi
leaq 0xe3f3(%rip), %rsi      # 0x13303
callq 0x3280
jmp 0x4f17
leaq 0xe80(%rsp), %rdi
leaq 0xea0(%rsp), %rsi
callq 0x3270
jmp 0x4f2e
leaq 0xe80(%rsp), %rdi
callq 0x30e0
movq %rax, %rdi
leaq 0x28a8(%rsp), %rsi
callq 0x3250
movl %eax, 0x29c8(%rsp)
leaq 0xe80(%rsp), %rdi
callq 0x3160
cmpl $0x0, 0x29c8(%rsp)
jne 0x53c5
leaq 0xcf8(%rsp), %rdi
callq 0x3180
jmp 0x4f7c
cmpl $0x0, 0x29b4(%rsp)
jne 0x5088
leaq 0xd08(%rsp), %rdi
leaq 0xe2a9(%rip), %rsi      # 0x13242
callq 0x3280
movq %rax, 0x90(%rsp)
jmp 0x4fa8
movq 0x90(%rsp), %rdi
movl 0x2944(%rsp), %esi
callq 0x3430
movq %rax, 0x88(%rsp)
jmp 0x4fc6
movq 0x88(%rsp), %rdi
leaq 0xe280(%rip), %rsi      # 0x13255
callq 0x3280
movq %rax, 0x80(%rsp)
jmp 0x4fe4
movq 0x80(%rsp), %rdi
movl 0x29b4(%rsp), %esi
callq 0x3430
movq %rax, 0x78(%rsp)
jmp 0x4fff
movq 0x78(%rsp), %rdi
leaq 0xe259(%rip), %rsi      # 0x13264
callq 0x3280
jmp 0x5012
jmp 0x5100
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
jmp 0x5527
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
leaq 0x1028(%rsp), %rdi
callq 0x3160
jmp 0x5527
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
jmp 0x551a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
jmp 0x53b3
leaq 0xd08(%rsp), %rdi
leaq 0xe1ab(%rip), %rsi      # 0x13242
callq 0x3280
movq %rax, 0x70(%rsp)
jmp 0x50a3
movq 0x70(%rsp), %rdi
movl 0x2944(%rsp), %esi
callq 0x3430
movq %rax, 0x68(%rsp)
jmp 0x50bb
movq 0x68(%rsp), %rdi
leaq 0xe18e(%rip), %rsi      # 0x13255
callq 0x3280
movq %rax, 0x60(%rsp)
jmp 0x50d3
movq 0x60(%rsp), %rdi
movl 0x29b4(%rsp), %esi
callq 0x3430
movq %rax, 0x58(%rsp)
jmp 0x50eb
movq 0x58(%rsp), %rdi
leaq 0xe1ad(%rip), %rsi      # 0x132a4
callq 0x3280
jmp 0x50fe
jmp 0x5100
leaq 0xcd8(%rsp), %rdi
leaq 0xcf8(%rsp), %rsi
callq 0x3270
jmp 0x5117
leaq 0xcd8(%rsp), %rdi
callq 0x30e0
movq %rax, %rdi
callq 0x3220
jmp 0x512e
leaq 0xcd8(%rsp), %rdi
callq 0x3160
leaq 0xb50(%rsp), %rdi
callq 0x3180
jmp 0x514a
leaq 0xb60(%rsp), %rdi
leaq 0xe178(%rip), %rsi      # 0x132d1
callq 0x3280
jmp 0x5160
leaq 0xb30(%rsp), %rdi
leaq 0xb50(%rsp), %rsi
callq 0x3270
jmp 0x5177
leaq 0xb30(%rsp), %rdi
callq 0x30e0
movq %rax, %rdi
callq 0x3220
jmp 0x518e
leaq 0xb30(%rsp), %rdi
callq 0x3160
cmpl $0x0, 0x29b4(%rsp)
jne 0x52c9
leaq 0x9a8(%rsp), %rdi
callq 0x3180
jmp 0x51b8
leaq 0x9b8(%rsp), %rdi
leaq 0xe123(%rip), %rsi      # 0x132ea
callq 0x3280
jmp 0x51ce
leaq 0x988(%rsp), %rdi
leaq 0x9a8(%rsp), %rsi
callq 0x3270
jmp 0x51e5
leaq 0x988(%rsp), %rdi
callq 0x30e0
movq %rax, %rdi
callq 0x3220
jmp 0x51fc
leaq 0x988(%rsp), %rdi
callq 0x3160
leaq 0x9a8(%rsp), %rdi
callq 0x31b0
jmp 0x52c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
leaq 0xcd8(%rsp), %rdi
callq 0x3160
jmp 0x53b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
jmp 0x53a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
leaq 0xb30(%rsp), %rdi
callq 0x3160
jmp 0x53a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
jmp 0x52b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
leaq 0x988(%rsp), %rdi
callq 0x3160
leaq 0x9a8(%rsp), %rdi
callq 0x31b0
jmp 0x53a6
movl 0x29b4(%rsp), %eax
incl %eax
movl %eax, 0x29b4(%rsp)
leaq 0x800(%rsp), %rdi
callq 0x3180
jmp 0x52e8
leaq 0x810(%rsp), %rdi
leaq 0xe009(%rip), %rsi      # 0x13300
callq 0x3280
jmp 0x52fe
leaq 0x7e0(%rsp), %rdi
leaq 0x800(%rsp), %rsi
callq 0x3270
jmp 0x5315
leaq 0x7e0(%rsp), %rdi
callq 0x30e0
movq %rax, %rdi
callq 0x3220
jmp 0x532c
leaq 0x7e0(%rsp), %rdi
callq 0x3160
leaq 0x800(%rsp), %rdi
callq 0x31b0
leaq 0xb50(%rsp), %rdi
callq 0x31b0
leaq 0xcf8(%rsp), %rdi
callq 0x31b0
jmp 0x53c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
jmp 0x5399
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
leaq 0x7e0(%rsp), %rdi
callq 0x3160
leaq 0x800(%rsp), %rdi
callq 0x31b0
leaq 0xb50(%rsp), %rdi
callq 0x31b0
leaq 0xcf8(%rsp), %rdi
callq 0x31b0
jmp 0x551a
movl $0x0, 0x29d4(%rsp)
cmpl $0x14, 0x29d4(%rsp)
jge 0x54d7
leaq 0x658(%rsp), %rdi
callq 0x3180
jmp 0x53ed
leaq 0x668(%rsp), %rdi
leaq 0xdf22(%rip), %rsi      # 0x1331e
callq 0x3280
movq %rax, 0x50(%rsp)
jmp 0x5408
movq 0x50(%rsp), %rdi
movl 0x29d4(%rsp), %esi
callq 0x3430
movq %rax, 0x48(%rsp)
jmp 0x5420
movq 0x48(%rsp), %rdi
leaq 0xdcf4(%rip), %rsi      # 0x13120
callq 0x3280
jmp 0x5433
leaq 0x638(%rsp), %rdi
leaq 0x658(%rsp), %rsi
callq 0x3270
jmp 0x544a
leaq 0x638(%rsp), %rdi
callq 0x30e0
movq %rax, %rdi
callq 0x3220
jmp 0x5461
leaq 0x638(%rsp), %rdi
callq 0x3160
leaq 0x658(%rsp), %rdi
callq 0x31b0
movl 0x29d4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29d4(%rsp)
jmp 0x53d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
jmp 0x54c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
leaq 0x638(%rsp), %rdi
callq 0x3160
leaq 0x658(%rsp), %rdi
callq 0x31b0
jmp 0x551a
leaq 0xea0(%rsp), %rdi
callq 0x31b0
leaq 0x1048(%rsp), %rdi
callq 0x31b0
leaq 0x1398(%rsp), %rdi
callq 0x31b0
leaq 0x1890(%rsp), %rdi
callq 0x31b0
leaq 0x1a18(%rsp), %rdi
callq 0x33c0
jmp 0x5560
leaq 0xea0(%rsp), %rdi
callq 0x31b0
leaq 0x1048(%rsp), %rdi
callq 0x31b0
leaq 0x1398(%rsp), %rdi
callq 0x31b0
leaq 0x1890(%rsp), %rdi
callq 0x31b0
leaq 0x1a18(%rsp), %rdi
callq 0x33c0
jmp 0x57e3
movl $0x0, 0x29c0(%rsp)
movl $0x0, 0x29d4(%rsp)
cmpl $0x14, 0x29d4(%rsp)
jge 0x56b0
leaq 0x4b0(%rsp), %rdi
callq 0x3180
jmp 0x5593
leaq 0x4c0(%rsp), %rdi
leaq 0xdd94(%rip), %rsi      # 0x13336
callq 0x3280
movq %rax, 0x40(%rsp)
jmp 0x55ae
movq 0x40(%rsp), %rdi
movl 0x29d4(%rsp), %esi
callq 0x3430
movq %rax, 0x38(%rsp)
jmp 0x55c6
movq 0x38(%rsp), %rdi
leaq 0xdb4e(%rip), %rsi      # 0x13120
callq 0x3280
jmp 0x55d9
leaq 0x490(%rsp), %rdi
leaq 0x4b0(%rsp), %rsi
callq 0x3270
jmp 0x55f0
leaq 0x490(%rsp), %rdi
callq 0x30e0
movq %rax, %rdi
leaq 0x28a8(%rsp), %rsi
callq 0x3250
movl %eax, 0x29c8(%rsp)
leaq 0x490(%rsp), %rdi
callq 0x3160
cmpl $0x0, 0x29c8(%rsp)
jne 0x5664
movl 0x29c0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29c0(%rsp)
jmp 0x5671
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
leaq 0x4b0(%rsp), %rdi
callq 0x31b0
jmp 0x57e3
movl $0x19, 0x1c1c(%rsp)
jmp 0x567c
movl $0x0, 0x1c1c(%rsp)
leaq 0x4b0(%rsp), %rdi
callq 0x31b0
movl 0x1c1c(%rsp), %eax
testl %eax, %eax
je 0x5698
jmp 0x5696
jmp 0x56b0
jmp 0x569a
movl 0x29d4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29d4(%rsp)
jmp 0x5576
cmpl $0x14, 0x29c0(%rsp)
jne 0x57d2
movl $0x0, 0x29d4(%rsp)
cmpl $0x14, 0x29d4(%rsp)
jge 0x57d0
leaq 0x308(%rsp), %rdi
callq 0x3180
jmp 0x56e6
leaq 0x318(%rsp), %rdi
leaq 0xdc3e(%rip), %rsi      # 0x13333
callq 0x3280
movq %rax, 0x30(%rsp)
jmp 0x5701
movq 0x30(%rsp), %rdi
movl 0x29d4(%rsp), %esi
callq 0x3430
movq %rax, 0x28(%rsp)
jmp 0x5719
movq 0x28(%rsp), %rdi
leaq 0xd9fb(%rip), %rsi      # 0x13120
callq 0x3280
jmp 0x572c
leaq 0x2e8(%rsp), %rdi
leaq 0x308(%rsp), %rsi
callq 0x3270
jmp 0x5743
leaq 0x2e8(%rsp), %rdi
callq 0x30e0
movq %rax, %rdi
callq 0x3220
jmp 0x575a
leaq 0x2e8(%rsp), %rdi
callq 0x3160
leaq 0x308(%rsp), %rdi
callq 0x31b0
movl 0x29d4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29d4(%rsp)
jmp 0x56c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
jmp 0x57c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x26a0(%rsp)
movl %eax, 0x269c(%rsp)
leaq 0x2e8(%rsp), %rdi
callq 0x3160
leaq 0x308(%rsp), %rdi
callq 0x31b0
jmp 0x57e3
jmp 0x57d2
movl $0x186a0, %edi          # imm = 0x186A0
callq 0x3380
jmp 0x57de
jmp 0x4016
leaq 0x2160(%rsp), %rdi
callq 0x31b0
leaq 0x2638(%rsp), %rdi
callq 0x3160
leaq 0x2658(%rsp), %rdi
callq 0x3160
leaq 0x26a8(%rsp), %rdi
callq 0x33c0
leaq 0x29e0(%rsp), %rdi
callq 0x3160
movq 0x26a0(%rsp), %rdi
callq 0x3450
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)