// File: jmmccracken[P]PAI/ccmth.cpp
// Function: main
int main(int argc, char **argv){

    bool bCmdLineOK = ReadCmdLineArgs(argc,argv);
    if( !bCmdLineOK ){
        return(-1);
    }

    char cBuffer[1024]; //read in buffer
    char *cColValue, //used for read in
         *cRowValues; //used for read in
    int iter = 0;

    int iEstimatedY_Length = iLibraryLength-((iEmbeddingDimension-1)*iLagTimeStep);
    double dX[iLibraryLength],
           dY[iLibraryLength],
           dEstimatedY[iEstimatedY_Length];

    //Populate estimate time series, just in case
    for(int iPre = 0;iPre < iEstimatedY_Length;iPre++ ){
        dEstimatedY[iPre] = nan("");
    }

    //Declare things needed for threading
    double dCCMcorrs[iNumThreads][4];
    future<double> WorkerThreads[iNumThreads][4];
    future_status WorkerStatus[4];
    CCM_asyncData sThreadData;
    sThreadData.iEmbeddingDimension = iEmbeddingDimension;
    sThreadData.iLagTimeStep = iLagTimeStep;
    sThreadData.iYEmbeddingDimension = iYEmbeddingDimension;
    sThreadData.iYLagTimeStep = iYLagTimeStep;
    sThreadData.iLibraryLength = iLibraryLength;
    sThreadData.iMaxAutoCorrToCheck = iMaxAutoCorrToCheck;
    sThreadData.dCompareTolerance = dCompareTolerance;
    sThreadData.iNumberOfTimeStep2Check = iNumberOfTimeStep2Check;
    sThreadData.dWeightToleranceLevel = dWeightToleranceLevel;
    sThreadData.iEstimatedYLength = iEstimatedY_Length;
    sThreadData.dEstimatedY = dEstimatedY;
    sThreadData.bL2 = bL2;

    if( bVerboseFlag ){
            printf("Input data file: %s\nOutput file: %s\nNumber of time series in input file: %i\nLibrary length: %i\nEmbedding dimension: %i\nLag time step: %i\n",cFilename,cOutputname,iNumOfTimeSeries,iLibraryLength,iEmbeddingDimension,iLagTimeStep);
    }

    //open data input file
    FILE *ifstream = fopen(cFilename,"r");
    if(ifstream == NULL){
        fprintf(stderr, "Error: Cannot open %s\n",cFilename);
            return(-1);
    }

    //open [-o] output file
    FILE *ofstream = fopen(cOutputname,"w");
    if(ofstream == NULL){
        fprintf(stderr, "Error: Cannot open %s\n",cOutputname);
        return(-1);
    }

    //open [-eY] output file
    FILE *ofstreamTS = fopen(cTSOutputname,"w");
    if(ofstream == NULL){
        fprintf(stderr, "Error: Cannot open %s\n",cTSOutputname);
        return(-1);
    }

    if( bVerboseFlag ){ printf("Processing %s...\n",cFilename); }
    int iCurrentThreadsUsed = 0,
        iCheckThread = 0;
    bool bFoundOpenThread;
    for(int iTSiter = 0;iTSiter < iNumOfTimeSeries;iTSiter++ ){

        if( bVerboseFlag ){ printf("TS %i:",iTSiter); }
        if( bVerboseFlag ){ printf("Reading TS..."); }
        bFoundOpenThread = false;

        //read in dX and dY
        for( iter=0;iter < iLibraryLength;iter++ ){
                cRowValues = fgets(cBuffer,sizeof(cBuffer),ifstream);
                cColValue = strtok(cRowValues,",");
                if( cColValue != NULL ){
                   dX[iter] = atof(cColValue);
                }else{
                   fprintf(stderr, "Error: %s is not formatted correctly\n",cFilename);
                }

                cColValue = strtok(NULL,";");
                if( cColValue != NULL ){
                   dY[iter] = atof(cColValue);
                }else{
                   fprintf(stderr, "Error: %s is not formatted correctly\n",cFilename);
                }
        }

        if( bVerboseFlag ){ printf("Writing CCMs..."); }

        if( iNumThreads == 0 ){

              if( bPAI ){

                  sThreadData.dX = dX;
                  sThreadData.dY = dY;
                  bPAICalcPart1 = true;
                  fprintf(ofstream,"%.20f,",CCMcorr_async(sThreadData));
                  //printf("%.20f,",CCMcorr_async(sThreadData));
                  if( bSaveEstimatedTS ){
                      for(int iPrintStep = 0;iPrintStep < sThreadData.iEstimatedYLength;iPrintStep++ ){
			fprintf(ofstreamTS,"%.20f\n",sThreadData.dEstimatedY[iPrintStep]);
                      }
                  }
                  bPAICalcPart1 = false;
                  bPAICalcPart2 = true;
                  fprintf(ofstream,"%.20f,",CCMcorr_async(sThreadData));
                  //printf("%.20f,",CCMcorr_async(sThreadData));
                  if( bSaveEstimatedTS ){
                      for(int iPrintStep = 0;iPrintStep < sThreadData.iEstimatedYLength;iPrintStep++ ){
			fprintf(ofstreamTS,"%.20f\n",sThreadData.dEstimatedY[iPrintStep]);
                      }
                  }
                  bPAICalcPart2 = false;

                  bPAICalcPart1 = true;
                  sThreadData.dX = dY;
                  sThreadData.dY = dX;
                  fprintf(ofstream,"%.20f,",CCMcorr_async(sThreadData));
                  //printf("%.20f\n",CCMcorr_async(sThreadData));
                  if( bSaveEstimatedTS ){
                      for(int iPrintStep = 0;iPrintStep < sThreadData.iEstimatedYLength;iPrintStep++ ){
			fprintf(ofstreamTS,"%.20f\n",sThreadData.dEstimatedY[iPrintStep]);
                      }
                  }
                  bPAICalcPart1 = false;
                  bPAICalcPart2 = true;
                  fprintf(ofstream,"%.20f\n",CCMcorr_async(sThreadData));
                  //printf("%.20f\n",CCMcorr_async(sThreadData));
                  if( bSaveEstimatedTS ){
                      for(int iPrintStep = 0;iPrintStep < sThreadData.iEstimatedYLength;iPrintStep++ ){
			fprintf(ofstreamTS,"%.20f\n",sThreadData.dEstimatedY[iPrintStep]);
                      }
                  }
                  bPAICalcPart2 = false;

              }else{

                  sThreadData.dX = dX;
                  sThreadData.dY = dY;
                  fprintf(ofstream,"%.20f,",CCMcorr_async(sThreadData));
                  //printf("%.20f,",CCMcorr_async(sThreadData));
                  if( bSaveEstimatedTS ){
                      for(int iPrintStep = 0;iPrintStep < sThreadData.iEstimatedYLength;iPrintStep++ ){
			fprintf(ofstreamTS,"%.20f\n",sThreadData.dEstimatedY[iPrintStep]);
                      }
                  }

                  sThreadData.dX = dY;
                  sThreadData.dY = dX;
                  fprintf(ofstream,"%.20f\n",CCMcorr_async(sThreadData));
                  //printf("%.20f\n",CCMcorr_async(sThreadData));
                  if( bSaveEstimatedTS ){
                      for(int iPrintStep = 0;iPrintStep < sThreadData.iEstimatedYLength;iPrintStep++ ){
			fprintf(ofstreamTS,"%.20f\n",sThreadData.dEstimatedY[iPrintStep]);
                      }
                  }

              }

        }else{
            if( iCurrentThreadsUsed < iNumThreads ){

                sThreadData.dX = dX;
                sThreadData.dY = dY;
                WorkerThreads[iCurrentThreadsUsed][0] = async(launch::async,CCMcorr_async,sThreadData);

                sThreadData.dX = dY;
                sThreadData.dY = dX;
                WorkerThreads[iCurrentThreadsUsed][1] = async(launch::async,CCMcorr_async,sThreadData);

                iCurrentThreadsUsed++;

            }else{

                if( bOptThreading ){

                    while( !bFoundOpenThread ){
                        if( WorkerThreads[iCheckThread][0].valid() && WorkerThreads[iCheckThread][1].valid() ){

                            WorkerStatus[0] = WorkerThreads[iCheckThread][0].wait_for(chrono::seconds(iThreadWaitSec));
                            WorkerStatus[1] = WorkerThreads[iCheckThread][1].wait_for(chrono::seconds(iThreadWaitSec));

                            if( (WorkerStatus[0] == future_status::ready) && (WorkerStatus[1] == future_status::ready) ){
				
				fprintf(ofstream,"%.20f,",WorkerThreads[iCheckThread][0].get());
				fprintf(ofstream,"%.20f\n",WorkerThreads[iCheckThread][1].get());
				//printf("%.20f,",WorkerThreads[iCheckThread][0].get());
				//printf("%.20f\n",WorkerThreads[iCheckThread][1].get());

                                sThreadData.dX = dX;
                                sThreadData.dY = dY;
                                WorkerThreads[iCheckThread][0] = async(launch::async,CCMcorr_async,sThreadData);

                                sThreadData.dX = dY;
                                sThreadData.dY = dX;
                                WorkerThreads[iCheckThread][1] = async(launch::async,CCMcorr_async,sThreadData);

                                bFoundOpenThread = true;

                            }

                        }else if(!WorkerThreads[iCheckThread][0].valid()&&!WorkerThreads[iCheckThread][1].valid() ){

                            sThreadData.dX = dX;
                            sThreadData.dY = dY;
                            WorkerThreads[iCheckThread][0] = async(launch::async,CCMcorr_async,sThreadData);

                            sThreadData.dX = dY;
                            sThreadData.dY = dX;
                            WorkerThreads[iCheckThread][1] = async(launch::async,CCMcorr_async,sThreadData);

                            bFoundOpenThread = true;

                        }else{

                            iCheckThread++;
                            if( iCheckThread > iNumThreads ){
                                iCheckThread = 0;
                            }

                        }

                    }

                }else{

                    for(int iThreadIter = 0;iThreadIter < iNumThreads;iThreadIter++ ){

                        if( WorkerThreads[iThreadIter][0].valid() && WorkerThreads[iThreadIter][1].valid() ){
                            dCCMcorrs[iThreadIter][0] = WorkerThreads[iThreadIter][0].get();
                            dCCMcorrs[iThreadIter][1] = WorkerThreads[iThreadIter][1].get();
                        }

                    }

                    iCurrentThreadsUsed = 0;

                    sThreadData.dX = dX;
                    sThreadData.dY = dY;
                    WorkerThreads[iCurrentThreadsUsed][0] = async(launch::async,CCMcorr_async,sThreadData);

                    sThreadData.dX = dY;
                    sThreadData.dY = dX;
                    WorkerThreads[iCurrentThreadsUsed][1] = async(launch::async,CCMcorr_async,sThreadData);

                    for(int iThreadIter = 0;iThreadIter < iNumThreads;iThreadIter++ ){
                        fprintf(ofstream,"%.20f,",dCCMcorrs[iThreadIter][0]);
                        fprintf(ofstream,"%.20f\n",dCCMcorrs[iThreadIter][1]);
                        //printf("%.20f,",dCCMcorrs[iThreadIter][0]);
                        //printf("%.20f\n",dCCMcorrs[iThreadIter][1]);
                        dCCMcorrs[iThreadIter][0] = nan("");
                        dCCMcorrs[iThreadIter][1] = nan("");
                    }

                    iCurrentThreadsUsed++;
                }
            }
        }

        if( bVerboseFlag ){ printf(" done.\n"); }

    }

    for(int iThreadIter = 0;iThreadIter < iNumThreads;iThreadIter++ ){

        if( WorkerThreads[iThreadIter][0].valid() && WorkerThreads[iThreadIter][1].valid() ){
            fprintf(ofstream,"%.20f,",WorkerThreads[iThreadIter][0].get());
            fprintf(ofstream,"%.20f\n",WorkerThreads[iThreadIter][1].get());

        }

    }

    fclose(ifstream);
    fclose(ofstream);
    fclose(ofstreamTS);

    if( bVerboseFlag ){ printf(" Finished.\n"); }

    return(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x980, %rsp            # imm = 0x980
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x75d0
andb $0x1, %al
movb %al, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x5d5c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x75af
movl $0x0, -0x434(%rbp)
movl 0x13464(%rip), %eax     # 0x191d0
movl 0x13456(%rip), %ecx     # 0x191c8
decl %ecx
movl 0x13452(%rip), %edx     # 0x191cc
imull %edx, %ecx
subl %ecx, %eax
movl %eax, -0x438(%rbp)
movl 0x13445(%rip), %eax     # 0x191d0
movq %rsp, %rcx
movq %rcx, -0x440(%rbp)
leaq 0xf(,%rax,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x810(%rbp)
movq %rcx, %rsp
movq %rax, -0x448(%rbp)
movl 0x13412(%rip), %eax     # 0x191d0
leaq 0xf(,%rax,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x808(%rbp)
movq %rcx, %rsp
movq %rax, -0x450(%rbp)
movl -0x438(%rbp), %eax
leaq 0xf(,%rax,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x800(%rbp)
movq %rcx, %rsp
movq %rax, -0x458(%rbp)
movl $0x0, -0x45c(%rbp)
movl -0x45c(%rbp), %eax
cmpl -0x438(%rbp), %eax
jge 0x5e52
leaq 0xb771(%rip), %rdi      # 0x1159a
callq 0x3060
movq -0x800(%rbp), %rax
movslq -0x45c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x45c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x45c(%rbp)
jmp 0x5e14
movl 0x133c8(%rip), %eax     # 0x19220
movq %rax, %rdx
shlq $0x5, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x830(%rbp)
movq %rcx, %rsp
movq %rax, -0x468(%rbp)
movl 0x133a4(%rip), %eax     # 0x19220
movq %rax, -0x828(%rbp)
movq %rax, %rdx
shlq $0x6, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x820(%rbp)
movq %rcx, %rsp
movq %rax, -0x470(%rbp)
shlq $0x2, %rax
movq %rax, -0x818(%rbp)
cmpq $0x0, %rax
je 0x5f09
movq -0x820(%rbp), %rax
movq -0x818(%rbp), %rdx
shlq $0x4, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, -0x840(%rbp)
movq %rax, -0x838(%rbp)
movq -0x838(%rbp), %rdi
movq %rdi, -0x848(%rbp)
callq 0x8620
movq -0x848(%rbp), %rax
movq -0x840(%rbp), %rcx
addq $0x10, %rax
cmpq %rcx, %rax
movq %rax, -0x838(%rbp)
jne 0x5ed8
movq -0x800(%rbp), %rax
movl 0x132b2(%rip), %ecx     # 0x191c8
movl %ecx, -0x4d8(%rbp)
movl 0x132aa(%rip), %ecx     # 0x191cc
movl %ecx, -0x4d4(%rbp)
movl 0x132b6(%rip), %ecx     # 0x191e4
movl %ecx, -0x4c0(%rbp)
movl 0x132ae(%rip), %ecx     # 0x191e8
movl %ecx, -0x4bc(%rbp)
movl 0x1328a(%rip), %ecx     # 0x191d0
movl %ecx, -0x4d0(%rbp)
movl 0x1328a(%rip), %ecx     # 0x191dc
movl %ecx, -0x4cc(%rbp)
movsd 0x13290(%rip), %xmm0    # 0x191f0
movsd %xmm0, -0x4b8(%rbp)
movl 0x13272(%rip), %ecx     # 0x191e0
movl %ecx, -0x4c8(%rbp)
movsd 0x1327c(%rip), %xmm0    # 0x191f8
movsd %xmm0, -0x4b0(%rbp)
movl -0x438(%rbp), %ecx
movl %ecx, -0x4c4(%rbp)
movq %rax, -0x488(%rbp)
movb 0x132ab(%rip), %al      # 0x19248
andb $0x1, %al
movb %al, -0x4a0(%rbp)
testb $0x1, 0x13294(%rip)     # 0x19240
je 0x604b
movq 0x1327f(%rip), %rsi     # 0x19238
movq 0x13268(%rip), %rdx     # 0x19228
movl 0x1320e(%rip), %ecx     # 0x191d4
movl 0x13203(%rip), %r8d     # 0x191d0
movl 0x131f4(%rip), %r9d     # 0x191c8
movl 0x131f2(%rip), %edi     # 0x191cc
subq $0x10, %rsp
movq %rsp, %rax
movl %edi, (%rax)
leaq 0xa5be(%rip), %rdi      # 0x105a8
xorl %eax, %eax
callq 0x3040
addq $0x10, %rsp
jmp 0x5ff7
jmp 0x604b
movq -0x820(%rbp), %rcx
movq %rdx, %rsi
movq -0x828(%rbp), %rdx
movq %rsi, -0x858(%rbp)
movq %rax, %rsi
movq -0x858(%rbp), %rax
movq %rsi, -0x4e0(%rbp)
movl %eax, -0x4e4(%rbp)
shlq $0x2, %rdx
shlq $0x4, %rdx
movq %rcx, %rax
addq %rdx, %rax
cmpq %rax, %rcx
movq %rax, -0x850(%rbp)
je 0x75ad
jmp 0x757c
movq 0x131e6(%rip), %rdi     # 0x19238
leaq 0xa5d9(%rip), %rsi      # 0x10632
callq 0x3250
movq %rax, -0x860(%rbp)
jmp 0x6067
movq -0x860(%rbp), %rax
movq %rax, -0x4f0(%rbp)
cmpq $0x0, -0x4f0(%rbp)
jne 0x60b4
movq 0x12f42(%rip), %rax     # 0x18fc8
movq (%rax), %rdi
movq 0x131a8(%rip), %rdx     # 0x19238
leaq 0xa59d(%rip), %rsi      # 0x10634
movb $0x0, %al
callq 0x32a0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x4f4(%rbp)
jmp 0x7517
movq 0x1316d(%rip), %rdi     # 0x19228
leaq 0xa589(%rip), %rsi      # 0x1064b
callq 0x3250
movq %rax, -0x868(%rbp)
jmp 0x60d0
movq -0x868(%rbp), %rax
movq %rax, -0x500(%rbp)
cmpq $0x0, -0x500(%rbp)
jne 0x611d
movq 0x12ed9(%rip), %rax     # 0x18fc8
movq (%rax), %rdi
movq 0x1312f(%rip), %rdx     # 0x19228
leaq 0xa534(%rip), %rsi      # 0x10634
movb $0x0, %al
callq 0x32a0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x4f4(%rbp)
jmp 0x7517
movq 0x1310c(%rip), %rdi     # 0x19230
leaq 0xa520(%rip), %rsi      # 0x1064b
callq 0x3250
movq %rax, -0x870(%rbp)
jmp 0x6139
movq -0x870(%rbp), %rax
movq %rax, -0x508(%rbp)
cmpq $0x0, -0x500(%rbp)
jne 0x6186
movq 0x12e70(%rip), %rax     # 0x18fc8
movq (%rax), %rdi
movq 0x130ce(%rip), %rdx     # 0x19230
leaq 0xa4cb(%rip), %rsi      # 0x10634
movb $0x0, %al
callq 0x32a0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x4f4(%rbp)
jmp 0x7517
testb $0x1, 0x130b3(%rip)     # 0x19240
je 0x61a8
movq 0x130a2(%rip), %rsi     # 0x19238
leaq 0xa4b0(%rip), %rdi      # 0x1064d
xorl %eax, %eax
callq 0x3040
jmp 0x61a6
jmp 0x61a8
movl $0x0, -0x50c(%rbp)
movl $0x0, -0x510(%rbp)
movl $0x0, -0x518(%rbp)
movl -0x518(%rbp), %eax
cmpl 0x13002(%rip), %eax     # 0x191d4
jge 0x73a5
testb $0x1, 0x13061(%rip)     # 0x19240
je 0x61f9
movl -0x518(%rbp), %esi
leaq 0xa471(%rip), %rdi      # 0x1065f
xorl %eax, %eax
callq 0x3040
jmp 0x61f7
jmp 0x61f9
testb $0x1, 0x13040(%rip)     # 0x19240
je 0x6214
leaq 0xa45d(%rip), %rdi      # 0x10666
xorl %eax, %eax
callq 0x3040
jmp 0x6212
jmp 0x6214
movb $0x0, -0x511(%rbp)
movl $0x0, -0x434(%rbp)
movl -0x434(%rbp), %eax
cmpl 0x12f9f(%rip), %eax     # 0x191d0
jge 0x6341
movq -0x4f0(%rbp), %rdx
leaq -0x420(%rbp), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x32e0
movq %rax, -0x878(%rbp)
jmp 0x6258
movq -0x878(%rbp), %rax
movq %rax, -0x430(%rbp)
movq -0x430(%rbp), %rdi
leaq 0xa43d(%rip), %rsi      # 0x106b1
callq 0x32d0
movq %rax, -0x428(%rbp)
cmpq $0x0, -0x428(%rbp)
je 0x62ab
movq -0x428(%rbp), %rdi
callq 0x3260
movq -0x810(%rbp), %rax
movslq -0x434(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x62ca
movq 0x12d16(%rip), %rax     # 0x18fc8
movq (%rax), %rdi
movq 0x12f7c(%rip), %rdx     # 0x19238
leaq 0xa3b1(%rip), %rsi      # 0x10674
movb $0x0, %al
callq 0x32a0
xorl %eax, %eax
movl %eax, %edi
leaq 0xa3c5(%rip), %rsi      # 0x1069a
callq 0x32d0
movq %rax, -0x428(%rbp)
cmpq $0x0, -0x428(%rbp)
je 0x630c
movq -0x428(%rbp), %rdi
callq 0x3260
movq -0x808(%rbp), %rax
movslq -0x434(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x632b
movq 0x12cb5(%rip), %rax     # 0x18fc8
movq (%rax), %rdi
movq 0x12f1b(%rip), %rdx     # 0x19238
leaq 0xa350(%rip), %rsi      # 0x10674
movb $0x0, %al
callq 0x32a0
jmp 0x632d
movl -0x434(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x434(%rbp)
jmp 0x6225
testb $0x1, 0x12ef8(%rip)     # 0x19240
je 0x635c
leaq 0xa34b(%rip), %rdi      # 0x1069c
xorl %eax, %eax
callq 0x3040
jmp 0x635a
jmp 0x635c
cmpl $0x0, 0x12ebd(%rip)     # 0x19220
jne 0x6b6e
testb $0x1, 0x12ed5(%rip)     # 0x19245
je 0x68c3
movq -0x808(%rbp), %rax
movq -0x810(%rbp), %rcx
movq %rcx, -0x498(%rbp)
movq %rax, -0x490(%rbp)
movb $0x1, 0x12ead(%rip)     # 0x19246
movq -0x500(%rbp), %rax
movq %rax, -0x888(%rbp)
movq -0x488(%rbp), %rax
movq %rax, -0x520(%rbp)
movups -0x498(%rbp), %xmm0
movaps %xmm0, -0x530(%rbp)
movups -0x4d8(%rbp), %xmm0
movups -0x4c8(%rbp), %xmm1
movups -0x4b8(%rbp), %xmm2
movups -0x4a8(%rbp), %xmm3
movaps %xmm3, -0x540(%rbp)
movaps %xmm2, -0x550(%rbp)
movaps %xmm1, -0x560(%rbp)
movaps %xmm0, -0x570(%rbp)
subq $0x60, %rsp
movq -0x520(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x50(%rax)
movaps -0x530(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movaps -0x570(%rbp), %xmm0
movaps -0x560(%rbp), %xmm1
movaps -0x550(%rbp), %xmm2
movaps -0x540(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x7ea0
addq $0x60, %rsp
movsd %xmm0, -0x880(%rbp)
jmp 0x6456
movsd -0x880(%rbp), %xmm0
movq -0x888(%rbp), %rdi
leaq 0xa240(%rip), %rsi      # 0x106ac
movb $0x1, %al
callq 0x32a0
testb $0x1, 0x12dc8(%rip)     # 0x19242
je 0x64cf
movl $0x0, -0x574(%rbp)
movl -0x574(%rbp), %eax
cmpl -0x4c4(%rbp), %eax
jge 0x64cd
movq -0x508(%rbp), %rdi
movq -0x488(%rbp), %rax
movslq -0x574(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x9c4e(%rip), %rsi      # 0x10103
movb $0x1, %al
callq 0x32a0
movl -0x574(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x574(%rbp)
jmp 0x6486
jmp 0x64cf
movb $0x0, 0x12d70(%rip)     # 0x19246
movb $0x1, 0x12d6a(%rip)     # 0x19247
movq -0x500(%rbp), %rax
movq %rax, -0x898(%rbp)
movq -0x488(%rbp), %rax
movq %rax, -0x580(%rbp)
movups -0x498(%rbp), %xmm0
movaps %xmm0, -0x590(%rbp)
movups -0x4d8(%rbp), %xmm0
movups -0x4c8(%rbp), %xmm1
movups -0x4b8(%rbp), %xmm2
movups -0x4a8(%rbp), %xmm3
movaps %xmm3, -0x5a0(%rbp)
movaps %xmm2, -0x5b0(%rbp)
movaps %xmm1, -0x5c0(%rbp)
movaps %xmm0, -0x5d0(%rbp)
subq $0x60, %rsp
movq -0x580(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x50(%rax)
movaps -0x590(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movaps -0x5d0(%rbp), %xmm0
movaps -0x5c0(%rbp), %xmm1
movaps -0x5b0(%rbp), %xmm2
movaps -0x5a0(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x7ea0
addq $0x60, %rsp
movsd %xmm0, -0x890(%rbp)
jmp 0x659a
movsd -0x890(%rbp), %xmm0
movq -0x898(%rbp), %rdi
leaq 0xa0fc(%rip), %rsi      # 0x106ac
movb $0x1, %al
callq 0x32a0
testb $0x1, 0x12c84(%rip)     # 0x19242
je 0x6613
movl $0x0, -0x5d4(%rbp)
movl -0x5d4(%rbp), %eax
cmpl -0x4c4(%rbp), %eax
jge 0x6611
movq -0x508(%rbp), %rdi
movq -0x488(%rbp), %rax
movslq -0x5d4(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x9b0a(%rip), %rsi      # 0x10103
movb $0x1, %al
callq 0x32a0
movl -0x5d4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5d4(%rbp)
jmp 0x65ca
jmp 0x6613
movq -0x810(%rbp), %rax
movq -0x808(%rbp), %rcx
movb $0x0, 0x12c1f(%rip)     # 0x19247
movb $0x1, 0x12c17(%rip)     # 0x19246
movq %rcx, -0x498(%rbp)
movq %rax, -0x490(%rbp)
movq -0x500(%rbp), %rax
movq %rax, -0x8a8(%rbp)
movq -0x488(%rbp), %rax
movq %rax, -0x5e0(%rbp)
movups -0x498(%rbp), %xmm0
movaps %xmm0, -0x5f0(%rbp)
movups -0x4d8(%rbp), %xmm0
movups -0x4c8(%rbp), %xmm1
movups -0x4b8(%rbp), %xmm2
movups -0x4a8(%rbp), %xmm3
movaps %xmm3, -0x600(%rbp)
movaps %xmm2, -0x610(%rbp)
movaps %xmm1, -0x620(%rbp)
movaps %xmm0, -0x630(%rbp)
subq $0x60, %rsp
movq -0x5e0(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x50(%rax)
movaps -0x5f0(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movaps -0x630(%rbp), %xmm0
movaps -0x620(%rbp), %xmm1
movaps -0x610(%rbp), %xmm2
movaps -0x600(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x7ea0
addq $0x60, %rsp
movsd %xmm0, -0x8a0(%rbp)
jmp 0x66fa
movsd -0x8a0(%rbp), %xmm0
movq -0x8a8(%rbp), %rdi
leaq 0x9f9c(%rip), %rsi      # 0x106ac
movb $0x1, %al
callq 0x32a0
testb $0x1, 0x12b24(%rip)     # 0x19242
je 0x6773
movl $0x0, -0x634(%rbp)
movl -0x634(%rbp), %eax
cmpl -0x4c4(%rbp), %eax
jge 0x6771
movq -0x508(%rbp), %rdi
movq -0x488(%rbp), %rax
movslq -0x634(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x99aa(%rip), %rsi      # 0x10103
movb $0x1, %al
callq 0x32a0
movl -0x634(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x634(%rbp)
jmp 0x672a
jmp 0x6773
movb $0x0, 0x12acc(%rip)     # 0x19246
movb $0x1, 0x12ac6(%rip)     # 0x19247
movq -0x500(%rbp), %rax
movq %rax, -0x8b8(%rbp)
movq -0x488(%rbp), %rax
movq %rax, -0x640(%rbp)
movups -0x498(%rbp), %xmm0
movaps %xmm0, -0x650(%rbp)
movups -0x4d8(%rbp), %xmm0
movups -0x4c8(%rbp), %xmm1
movups -0x4b8(%rbp), %xmm2
movups -0x4a8(%rbp), %xmm3
movaps %xmm3, -0x660(%rbp)
movaps %xmm2, -0x670(%rbp)
movaps %xmm1, -0x680(%rbp)
movaps %xmm0, -0x690(%rbp)
subq $0x60, %rsp
movq -0x640(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x50(%rax)
movaps -0x650(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movaps -0x690(%rbp), %xmm0
movaps -0x680(%rbp), %xmm1
movaps -0x670(%rbp), %xmm2
movaps -0x660(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x7ea0
addq $0x60, %rsp
movsd %xmm0, -0x8b0(%rbp)
jmp 0x683e
movsd -0x8b0(%rbp), %xmm0
movq -0x8b8(%rbp), %rdi
leaq 0x98af(%rip), %rsi      # 0x10103
movb $0x1, %al
callq 0x32a0
testb $0x1, 0x129e0(%rip)     # 0x19242
je 0x68b7
movl $0x0, -0x694(%rbp)
movl -0x694(%rbp), %eax
cmpl -0x4c4(%rbp), %eax
jge 0x68b5
movq -0x508(%rbp), %rdi
movq -0x488(%rbp), %rax
movslq -0x694(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x9866(%rip), %rsi      # 0x10103
movb $0x1, %al
callq 0x32a0
movl -0x694(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x694(%rbp)
jmp 0x686e
jmp 0x68b7
movb $0x0, 0x12989(%rip)     # 0x19247
jmp 0x6b69
movq -0x808(%rbp), %rax
movq -0x810(%rbp), %rcx
movq %rcx, -0x498(%rbp)
movq %rax, -0x490(%rbp)
movq -0x500(%rbp), %rax
movq %rax, -0x8c8(%rbp)
movq -0x488(%rbp), %rax
movq %rax, -0x6a0(%rbp)
movups -0x498(%rbp), %xmm0
movaps %xmm0, -0x6b0(%rbp)
movups -0x4d8(%rbp), %xmm0
movups -0x4c8(%rbp), %xmm1
movups -0x4b8(%rbp), %xmm2
movups -0x4a8(%rbp), %xmm3
movaps %xmm3, -0x6c0(%rbp)
movaps %xmm2, -0x6d0(%rbp)
movaps %xmm1, -0x6e0(%rbp)
movaps %xmm0, -0x6f0(%rbp)
subq $0x60, %rsp
movq -0x6a0(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x50(%rax)
movaps -0x6b0(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movaps -0x6f0(%rbp), %xmm0
movaps -0x6e0(%rbp), %xmm1
movaps -0x6d0(%rbp), %xmm2
movaps -0x6c0(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x7ea0
addq $0x60, %rsp
movsd %xmm0, -0x8c0(%rbp)
jmp 0x699c
movsd -0x8c0(%rbp), %xmm0
movq -0x8c8(%rbp), %rdi
leaq 0x9cfa(%rip), %rsi      # 0x106ac
movb $0x1, %al
callq 0x32a0
testb $0x1, 0x12882(%rip)     # 0x19242
je 0x6a15
movl $0x0, -0x6f4(%rbp)
movl -0x6f4(%rbp), %eax
cmpl -0x4c4(%rbp), %eax
jge 0x6a13
movq -0x508(%rbp), %rdi
movq -0x488(%rbp), %rax
movslq -0x6f4(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x9708(%rip), %rsi      # 0x10103
movb $0x1, %al
callq 0x32a0
movl -0x6f4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6f4(%rbp)
jmp 0x69cc
jmp 0x6a15
movq -0x810(%rbp), %rax
movq -0x808(%rbp), %rcx
movq %rcx, -0x498(%rbp)
movq %rax, -0x490(%rbp)
movq -0x500(%rbp), %rax
movq %rax, -0x8d8(%rbp)
movq -0x488(%rbp), %rax
movq %rax, -0x700(%rbp)
movups -0x498(%rbp), %xmm0
movaps %xmm0, -0x710(%rbp)
movups -0x4d8(%rbp), %xmm0
movups -0x4c8(%rbp), %xmm1
movups -0x4b8(%rbp), %xmm2
movups -0x4a8(%rbp), %xmm3
movaps %xmm3, -0x720(%rbp)
movaps %xmm2, -0x730(%rbp)
movaps %xmm1, -0x740(%rbp)
movaps %xmm0, -0x750(%rbp)
subq $0x60, %rsp
movq -0x700(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x50(%rax)
movaps -0x710(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movaps -0x750(%rbp), %xmm0
movaps -0x740(%rbp), %xmm1
movaps -0x730(%rbp), %xmm2
movaps -0x720(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x7ea0
addq $0x60, %rsp
movsd %xmm0, -0x8d0(%rbp)
jmp 0x6aee
movsd -0x8d0(%rbp), %xmm0
movq -0x8d8(%rbp), %rdi
leaq 0x95ff(%rip), %rsi      # 0x10103
movb $0x1, %al
callq 0x32a0
testb $0x1, 0x12730(%rip)     # 0x19242
je 0x6b67
movl $0x0, -0x754(%rbp)
movl -0x754(%rbp), %eax
cmpl -0x4c4(%rbp), %eax
jge 0x6b65
movq -0x508(%rbp), %rdi
movq -0x488(%rbp), %rax
movslq -0x754(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x95b6(%rip), %rsi      # 0x10103
movb $0x1, %al
callq 0x32a0
movl -0x754(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x754(%rbp)
jmp 0x6b1e
jmp 0x6b67
jmp 0x6b69
jmp 0x7374
movl -0x50c(%rbp), %eax
cmpl 0x126a6(%rip), %eax     # 0x19220
jge 0x6c73
movq -0x808(%rbp), %rax
movq -0x810(%rbp), %rcx
movq %rcx, -0x498(%rbp)
movq %rax, -0x490(%rbp)
leaq 0x12fd(%rip), %rdx      # 0x7ea0
leaq -0x768(%rbp), %rdi
movl $0x1, %esi
leaq -0x4d8(%rbp), %rcx
callq 0x8640
jmp 0x6bbd
movq -0x820(%rbp), %rdi
movslq -0x50c(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
leaq -0x768(%rbp), %rsi
movq %rsi, -0x8e0(%rbp)
callq 0x87f0
movq -0x8e0(%rbp), %rdi
callq 0x8840
movq -0x808(%rbp), %rcx
movq -0x810(%rbp), %rax
movq %rcx, -0x498(%rbp)
movq %rax, -0x490(%rbp)
leaq 0x128c(%rip), %rdx      # 0x7ea0
leaq -0x778(%rbp), %rdi
movl $0x1, %esi
leaq -0x4d8(%rbp), %rcx
callq 0x8640
jmp 0x6c2e
movq -0x820(%rbp), %rdi
movslq -0x50c(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
addq $0x10, %rdi
leaq -0x778(%rbp), %rsi
callq 0x87f0
leaq -0x778(%rbp), %rdi
callq 0x8840
movl -0x50c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50c(%rbp)
jmp 0x7372
testb $0x1, 0x125c7(%rip)     # 0x19241
je 0x7099
jmp 0x6c82
movb -0x511(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x6c93
jmp 0x7094
movq -0x820(%rbp), %rdi
movslq -0x510(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x8860
testb $0x1, %al
jne 0x6cb6
jmp 0x6f34
movq -0x820(%rbp), %rdi
movslq -0x510(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
addq $0x10, %rdi
callq 0x8860
testb $0x1, %al
jne 0x6cdd
jmp 0x6f34
movq -0x820(%rbp), %rax
movslq -0x510(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x8e8(%rbp)
leaq 0x124d8(%rip), %rsi     # 0x191d8
leaq -0x780(%rbp), %rdi
callq 0x88c0
jmp 0x6d0e
movq -0x8e8(%rbp), %rdi
leaq -0x780(%rbp), %rsi
callq 0x8880
movl %eax, -0x8ec(%rbp)
jmp 0x6d29
movq -0x820(%rbp), %rax
movl -0x8ec(%rbp), %ecx
movl %ecx, -0x480(%rbp)
movslq -0x510(%rbp), %rcx
shlq $0x6, %rcx
leaq 0x10(%rax,%rcx), %rax
movq %rax, -0x8f8(%rbp)
leaq 0x1247e(%rip), %rsi     # 0x191d8
leaq -0x788(%rbp), %rdi
callq 0x88c0
jmp 0x6d68
movq -0x8f8(%rbp), %rdi
leaq -0x788(%rbp), %rsi
callq 0x8880
movl %eax, -0x8fc(%rbp)
jmp 0x6d83
movl -0x8fc(%rbp), %eax
movl %eax, -0x47c(%rbp)
cmpl $0x0, -0x480(%rbp)
jne 0x6f2f
cmpl $0x0, -0x47c(%rbp)
jne 0x6f2f
movq -0x820(%rbp), %rdi
movq -0x500(%rbp), %rax
movq %rax, -0x910(%rbp)
movslq -0x510(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x88e0
movsd %xmm0, -0x908(%rbp)
jmp 0x6ddb
movsd -0x908(%rbp), %xmm0
movq -0x910(%rbp), %rdi
leaq 0x98bb(%rip), %rsi      # 0x106ac
movb $0x1, %al
callq 0x32a0
movq -0x820(%rbp), %rax
movq -0x500(%rbp), %rcx
movq %rcx, -0x920(%rbp)
movslq -0x510(%rbp), %rcx
shlq $0x6, %rcx
leaq 0x10(%rax,%rcx), %rdi
callq 0x88e0
movsd %xmm0, -0x918(%rbp)
jmp 0x6e2c
movsd -0x918(%rbp), %xmm0
movq -0x920(%rbp), %rdi
leaq 0x92c1(%rip), %rsi      # 0x10103
movb $0x1, %al
callq 0x32a0
movq -0x810(%rbp), %rcx
movq -0x808(%rbp), %rax
movq %rcx, -0x498(%rbp)
movq %rax, -0x490(%rbp)
leaq 0x1034(%rip), %rdx      # 0x7ea0
leaq -0x798(%rbp), %rdi
movl $0x1, %esi
leaq -0x4d8(%rbp), %rcx
callq 0x8640
jmp 0x6e86
movq -0x820(%rbp), %rdi
movslq -0x510(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
leaq -0x798(%rbp), %rsi
movq %rsi, -0x928(%rbp)
callq 0x87f0
movq -0x928(%rbp), %rdi
callq 0x8840
movq -0x808(%rbp), %rcx
movq -0x810(%rbp), %rax
movq %rcx, -0x498(%rbp)
movq %rax, -0x490(%rbp)
leaq 0xfc3(%rip), %rdx       # 0x7ea0
leaq -0x7a8(%rbp), %rdi
movl $0x1, %esi
leaq -0x4d8(%rbp), %rcx
callq 0x8640
jmp 0x6ef7
movq -0x820(%rbp), %rdi
movslq -0x510(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
addq $0x10, %rdi
leaq -0x7a8(%rbp), %rsi
callq 0x87f0
leaq -0x7a8(%rbp), %rdi
callq 0x8840
movb $0x1, -0x511(%rbp)
jmp 0x708f
movq -0x820(%rbp), %rdi
movslq -0x510(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x8860
testb $0x1, %al
jne 0x7064
movq -0x820(%rbp), %rdi
movslq -0x510(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
addq $0x10, %rdi
callq 0x8860
testb $0x1, %al
jne 0x7064
movq -0x808(%rbp), %rax
movq -0x810(%rbp), %rcx
movq %rcx, -0x498(%rbp)
movq %rax, -0x490(%rbp)
leaq 0xf01(%rip), %rdx       # 0x7ea0
leaq -0x7b8(%rbp), %rdi
movl $0x1, %esi
leaq -0x4d8(%rbp), %rcx
callq 0x8640
jmp 0x6fb9
movq -0x820(%rbp), %rdi
movslq -0x510(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
leaq -0x7b8(%rbp), %rsi
movq %rsi, -0x930(%rbp)
callq 0x87f0
movq -0x930(%rbp), %rdi
callq 0x8840
movq -0x808(%rbp), %rcx
movq -0x810(%rbp), %rax
movq %rcx, -0x498(%rbp)
movq %rax, -0x490(%rbp)
leaq 0xe90(%rip), %rdx       # 0x7ea0
leaq -0x7c8(%rbp), %rdi
movl $0x1, %esi
leaq -0x4d8(%rbp), %rcx
callq 0x8640
jmp 0x702a
movq -0x820(%rbp), %rdi
movslq -0x510(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
addq $0x10, %rdi
leaq -0x7c8(%rbp), %rsi
callq 0x87f0
leaq -0x7c8(%rbp), %rdi
callq 0x8840
movb $0x1, -0x511(%rbp)
jmp 0x708d
movl -0x510(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x510(%rbp)
movl -0x510(%rbp), %eax
cmpl 0x121a1(%rip), %eax     # 0x19220
jle 0x708b
movl $0x0, -0x510(%rbp)
jmp 0x708d
jmp 0x708f
jmp 0x6c82
jmp 0x7370
movl $0x0, -0x7cc(%rbp)
movl -0x7cc(%rbp), %eax
cmpl 0x12171(%rip), %eax     # 0x19220
jge 0x71a0
movq -0x820(%rbp), %rdi
movslq -0x7cc(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x8860
testb $0x1, %al
jne 0x70d8
jmp 0x718a
movq -0x820(%rbp), %rdi
movslq -0x7cc(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
addq $0x10, %rdi
callq 0x8860
testb $0x1, %al
jne 0x70ff
jmp 0x718a
movq -0x820(%rbp), %rdi
movslq -0x7cc(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x88e0
movsd %xmm0, -0x938(%rbp)
jmp 0x7123
movq -0x820(%rbp), %rax
movq -0x830(%rbp), %rcx
movsd -0x938(%rbp), %xmm0
movslq -0x7cc(%rbp), %rdx
shlq $0x5, %rdx
movsd %xmm0, (%rcx,%rdx)
movslq -0x7cc(%rbp), %rcx
shlq $0x6, %rcx
leaq 0x10(%rax,%rcx), %rdi
callq 0x88e0
movsd %xmm0, -0x940(%rbp)
jmp 0x7168
movsd -0x940(%rbp), %xmm0
movq -0x830(%rbp), %rax
movslq -0x7cc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
jmp 0x718c
movl -0x7cc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7cc(%rbp)
jmp 0x70a3
movq -0x808(%rbp), %rax
movq -0x810(%rbp), %rcx
movl $0x0, -0x50c(%rbp)
movq %rcx, -0x498(%rbp)
movq %rax, -0x490(%rbp)
leaq 0xcd3(%rip), %rdx       # 0x7ea0
leaq -0x7e0(%rbp), %rdi
movl $0x1, %esi
leaq -0x4d8(%rbp), %rcx
callq 0x8640
jmp 0x71e7
movq -0x820(%rbp), %rdi
movslq -0x50c(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
leaq -0x7e0(%rbp), %rsi
movq %rsi, -0x948(%rbp)
callq 0x87f0
movq -0x948(%rbp), %rdi
callq 0x8840
movq -0x808(%rbp), %rcx
movq -0x810(%rbp), %rax
movq %rcx, -0x498(%rbp)
movq %rax, -0x490(%rbp)
leaq 0xc62(%rip), %rdx       # 0x7ea0
leaq -0x7f0(%rbp), %rdi
movl $0x1, %esi
leaq -0x4d8(%rbp), %rcx
callq 0x8640
jmp 0x7258
movq -0x820(%rbp), %rdi
movslq -0x50c(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
addq $0x10, %rdi
leaq -0x7f0(%rbp), %rsi
callq 0x87f0
leaq -0x7f0(%rbp), %rdi
callq 0x8840
movl $0x0, -0x7f4(%rbp)
movl -0x7f4(%rbp), %eax
cmpl 0x11f81(%rip), %eax     # 0x19220
jge 0x7361
movq -0x830(%rbp), %rax
movq -0x500(%rbp), %rdi
movslq -0x7f4(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
leaq 0x93e0(%rip), %rsi      # 0x106ac
movb $0x1, %al
callq 0x32a0
movq -0x830(%rbp), %rax
movq -0x500(%rbp), %rdi
movslq -0x7f4(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
leaq 0x8e08(%rip), %rsi      # 0x10103
movb $0x1, %al
callq 0x32a0
leaq 0xa291(%rip), %rdi      # 0x1159a
callq 0x3060
movq -0x830(%rbp), %rax
movslq -0x7f4(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movsd %xmm0, (%rax)
leaq 0xa26c(%rip), %rdi      # 0x1159a
callq 0x3060
movq -0x830(%rbp), %rax
movslq -0x7f4(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
movl -0x7f4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7f4(%rbp)
jmp 0x7293
movl -0x50c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50c(%rbp)
jmp 0x7372
jmp 0x7374
testb $0x1, 0x11ec5(%rip)     # 0x19240
je 0x738f
leaq 0x932f(%rip), %rdi      # 0x106b3
xorl %eax, %eax
callq 0x3040
jmp 0x738d
jmp 0x738f
jmp 0x7391
movl -0x518(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x518(%rbp)
jmp 0x61c6
movl $0x0, -0x7f8(%rbp)
movl -0x7f8(%rbp), %eax
cmpl 0x11e65(%rip), %eax     # 0x19220
jge 0x74c1
movq -0x820(%rbp), %rdi
movslq -0x7f8(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x8860
testb $0x1, %al
jne 0x73e4
jmp 0x74ab
movq -0x820(%rbp), %rdi
movslq -0x7f8(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
addq $0x10, %rdi
callq 0x8860
testb $0x1, %al
jne 0x740b
jmp 0x74ab
movq -0x820(%rbp), %rdi
movq -0x500(%rbp), %rax
movq %rax, -0x958(%rbp)
movslq -0x7f8(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x88e0
movsd %xmm0, -0x950(%rbp)
jmp 0x743d
movsd -0x950(%rbp), %xmm0
movq -0x958(%rbp), %rdi
leaq 0x9259(%rip), %rsi      # 0x106ac
movb $0x1, %al
callq 0x32a0
movq -0x820(%rbp), %rax
movq -0x500(%rbp), %rcx
movq %rcx, -0x968(%rbp)
movslq -0x7f8(%rbp), %rcx
shlq $0x6, %rcx
leaq 0x10(%rax,%rcx), %rdi
callq 0x88e0
movsd %xmm0, -0x960(%rbp)
jmp 0x748e
movsd -0x960(%rbp), %xmm0
movq -0x968(%rbp), %rdi
leaq 0x8c5f(%rip), %rsi      # 0x10103
movb $0x1, %al
callq 0x32a0
jmp 0x74ad
movl -0x7f8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7f8(%rbp)
jmp 0x73af
movq -0x4f0(%rbp), %rdi
callq 0x3210
jmp 0x74cf
movq -0x500(%rbp), %rdi
callq 0x3210
jmp 0x74dd
movq -0x508(%rbp), %rdi
callq 0x3210
jmp 0x74eb
testb $0x1, 0x11d4e(%rip)     # 0x19240
je 0x7506
leaq 0x91c0(%rip), %rdi      # 0x106bb
xorl %eax, %eax
callq 0x3040
jmp 0x7504
jmp 0x7506
movl $0x0, -0x4(%rbp)
movl $0x1, -0x4f4(%rbp)
movq -0x820(%rbp), %rcx
movq -0x828(%rbp), %rdx
shlq $0x2, %rdx
shlq $0x4, %rdx
movq %rcx, %rax
addq %rdx, %rax
cmpq %rax, %rcx
movq %rax, -0x970(%rbp)
je 0x7570
movq -0x970(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x978(%rbp)
callq 0x8840
movq -0x820(%rbp), %rcx
movq -0x978(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x970(%rbp)
jne 0x753f
movq -0x440(%rbp), %rax
movq %rax, %rsp
jmp 0x75af
movq -0x850(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x980(%rbp)
callq 0x8840
movq -0x820(%rbp), %rcx
movq -0x980(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x850(%rbp)
jne 0x757c
jmp 0x75b7
movl -0x4(%rbp), %eax
movq %rbp, %rsp
popq %rbp
retq
movq -0x4e0(%rbp), %rdi
callq 0x3330
nopw %cs:(%rax,%rax)