// File: TooruAkagi[P]GCIS_Index/gcis_nep_locate.cpp
// Function: main
int main(int argc, char *argv[])
{
    for(int i = 0;i<argc;i++){
      if('-'==argv[i][0]){ //符号
        if('i'==argv[i][1]){ //input
            int k = strlen(argv[i+1]);
            inname = (char*)malloc(k);
            for(int k2=0;k2<k;k2++){inname[k2]=argv[i+1][k2];}
        }
        if('q'==argv[i][1]){ //input
            int k = strlen(argv[i+1]);
            qname = (char*)malloc(k);
            for(int k2=0;k2<k;k2++){qname[k2]=argv[i+1][k2];}
        }
        if('m'==argv[i][1]){ //mode
            runmode=0;
            for(int k = 0;k<strlen(argv[i+1]);k++){
                if(10 > argv[i+1][k]-'0' && argv[i+1][k]-'0'>=0){
                runmode *=10;
                runmode += argv[i+1][k] - '0';
                }
                else{break;}
            }
        }
        if('r'==argv[i][1]){ //mode
            querysuu=0;
            for(int k = 0;k<strlen(argv[i+1]);k++){
                if(10 > argv[i+1][k]-'0' && argv[i+1][k]-'0'>=0){
                querysuu *=10;
                querysuu += argv[i+1][k] - '0';
                }
                else{break;}
            }
        }
        if('l'==argv[i][1]){ //mode
            plength=0;
            for(int k = 0;k<strlen(argv[i+1]);k++){
                if(10 > argv[i+1][k]-'0' && argv[i+1][k]-'0'>=0){
                plength *=10;
                plength += argv[i+1][k] - '0';
                }
                else{break;}
            }
        }
        if('s'==argv[i][1]){ //mode
            qstart=0;
            for(int k = 0;k<strlen(argv[i+1]);k++){
                if(10 > argv[i+1][k]-'0' && argv[i+1][k]-'0'>=0){
                qstart *=10;
                qstart += argv[i+1][k] - '0';
                }
                else{break;}
            }
        }
        if('h'==argv[i][1]){shelp();return 0;} //help
        i++;continue;
      }
    }
    if(qname==NULL){shelp();return 0;} //
    if(inname==NULL){
      int k = strlen(defaultinname);
      inname = (char*)malloc(k);
      for(int k2=0;k2<k;k2++){inname[k2]=defaultinname[k2];}
    }
    if(runmode==-1){runmode=MMODE;}
    if(plength==-1){plength=MLONG;}
    if(querysuu==-1){querysuu=MREP;}
    if(qstart==-1){qstart=2;}

    long long int sps = 0;
    long long int spsmax = 0;
    FILE *fp;
    
    unsigned int *D;
    int *D_2,*D_3;
    int i = 0;
    int msize = 10000;
    int pn = 0;
    int round = 0;
    
    m = (int*)malloc(4*msize);
    //msize = queryload(m);
    dcs[0] = 0;dc2s[0] = 0; 

    unsigned char chr;
    unsigned int a;
    fp = fopen(inname, "r");
    int flag = 0; //0:loops,1:dcs,2:dc2s,3:D,4:D_2,5:D_3,6:NS
    int w = 1;int tm1;
    while(flag<8){
        fscanf(fp,"%c",&chr);a = chr;
        fscanf(fp,"%c",&chr);a += chr*256;
        fscanf(fp,"%c",&chr);a += chr*65536;
        fscanf(fp,"%c",&chr);a += chr*65536*256;
        //if(w<30){printf("\n[%d]:%u",flag,a);}
        if(flag==7){NS[w]=a;w++;if(w==tm1){flag++;printf("\n-finishing load index-\n");}}
        if(flag==6){tm1=a;NS = (int*)malloc(4*tm1);flag++;}
        if(flag==5){D_3[w]=a;w++;if(w==dc2s[loops]){flag++;w=0;}}
        if(flag==4){D_2[w]=a;w++;if(w==dc2s[loops]+1){flag++;w=0;}}
        if(flag==3){D[w]=a;w++;if(w==dcs[loops]){flag++;w=0;}}
        if(flag==2){dc2s[w]=a;if(w==loops){flag++;w=0;D_2 = (int*)malloc(4*dc2s[loops]+4);D_3 = (int*)malloc(4*dc2s[loops]+4);}else{w++;}}
        if(flag==1){dcs[w]=a;if(w==loops){flag++;w=1;D = (unsigned int*)malloc(4*dcs[loops]);}else{w++;}}
        if(flag==0){loops=a;flag++;}
        //fseek(fp,16,SEEK_CUR);

    }
    fclose(fp);
    int ancl[querysuu][5];
    int anst[querysuu];
    double ancd[querysuu];
    pn = tm1;
    NSsize = pn;
    round=loops;
    fround = round;
    double avt = 0;
    //int jogaipar = 0;
    if(runmode==2){
        msize = qrmload(plength,0,anst);
        clock_t timesb = clock();
        patternmatching2(D,D_2,D_3,msize); 
        clock_t timee = clock();
        const double time = static_cast<double>(timee - timesb) / CLOCKS_PER_SEC * 1000.0;
        printf("\n[length of the pattern : %d] / (ans:%d / core:%d ) : time %lf[ms]\n",msize,ans,coreans,time);
        if(CHECKFLAG==1){
            msize = qrmload(plength,0,anst);
            anscheck(msize);
        }
    }
    if(runmode==1 || runmode == 3){
        float avetransk = 0.00;
        double pertime = 0.00;
        if(runmode==3){srand((unsigned int)time(NULL));}
        for(int jo = 0;jo < querysuu;jo++){
            int ralen = plength;
            if(runmode==1){ralen = plength;}
            msize = qrmload(ralen,jo,anst);
            if(DEBUGFLAG==1){
                printf("\n検索文字列:[");
                for(int rek = 0;rek<ralen;rek++){printf("%c",m[rek]);}
                printf("]\n");
            }
            clock_t timesb = clock();
            patternmatching2(D,D_2,D_3,msize);
            clock_t timee = clock();
            const double time = static_cast<double>(timee - timesb) / CLOCKS_PER_SEC * 1000.0;
            const double time2 = static_cast<double>(timessub - timesb) / CLOCKS_PER_SEC * 1000.0;
            printf("\n[length of the pattern : %d] / (ans:%d / core:%d ) : time %lf[ms](%.3lf %)\n",msize,ans,coreans,time,(time2*100)/time);
            ancl[jo][0] = ans;
            ancl[jo][1] = coreans;
            ancl[jo][2] = ralen;
            ancl[jo][3] = transk;
            ancd[jo] = time;
            pertime += (time2*100)/time;
            avt += time;avetransk+=transk;
            if(CHECKFLAG==1){
                msize = qrmreload(ralen);
                anscheck(msize);
            }
        }
        for(int jo=0;jo<querysuu;jo++){
            printf("\n(P-length : %d from position %d[%d trans] / ans:%d / core:%d / time %lf[ms])",ancl[jo][2],anst[jo],ancl[jo][3],ancl[jo][0],ancl[jo][1],ancd[jo]);
            }
        printf("\navarage time : %lf[ms]\n avarage transform : %f times\n",avt/querysuu,avetransk/querysuu);
        printf("[transformation time : %.3f %]\n",pertime/querysuu);
    }
    if(runmode==4){
        for(int jo = 0;jo < querysuu;jo++){
            msize = qrmloadset(jo);
            //if(jswt==1){printf("\n除外");jogaipar++;jo--;continue;}
            if(DEBUGFLAG==1){
                printf("\n検索文字列:[");
                for(int rek = 0;rek<msize;rek++){printf("%c",m[rek]);}
                printf("]\n");
            }
            clock_t timesb = clock();
            patternmatching2(D,D_2,D_3,msize);
            clock_t timee = clock();
            const double time = static_cast<double>(timee - timesb) / CLOCKS_PER_SEC * 1000.0;
            printf("\n[length of the pattern : %d] / (ans:%d / core:%d ) : time %lf[ms]\n",msize,ans,coreans,time);
            ancl[jo][0] = ans;
            ancl[jo][1] = coreans;
            ancl[jo][2] = msize;
            ancl[jo][3] = transk;
            ancl[jo][4] = -1;
            ancd[jo] = time;
            avt += time;
        }
        printf("avarage time : %lf[ms]",avt/querysuu);
        for(int jo=0;jo<querysuu;jo++){
            printf("\n(P-length : %d [%d trans] / ans:%d / core:%d / time %lf[ms])",ancl[jo][2],ancl[jo][3],ancl[jo][0],ancl[jo][1],ancd[jo]);
            }
    }
    if(runmode==0){
        msize = queryload();
        clock_t timesb = clock();
        patternmatching2(D,D_2,D_3,msize);    
        clock_t timee = clock();
        const double time = static_cast<double>(timee - timesb) / CLOCKS_PER_SEC * 1000.0;
        printf("\n[length of the pattern : %d] / (ans:%d / core:%d ) : time %lf[ms]\n",msize,ans,coreans,time);
        
    }
    free(NS); 
    free(D); 
    free(D_2); 
    free(D_3); 
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x76c1
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %ecx
movl $0x2d, %eax
cmpl %ecx, %eax
jne 0x76b1
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %ecx
movl $0x69, %eax
cmpl %ecx, %eax
jne 0x722c
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x20a0
movl %eax, -0x18(%rbp)
movslq -0x18(%rbp), %rdi
callq 0x21a0
movq %rax, 0x4f8e(%rip)      # 0xc178
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x722a
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x1c(%rbp), %rcx
movb (%rax,%rcx), %dl
movq 0x4f60(%rip), %rax      # 0xc178
movslq -0x1c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x71f1
jmp 0x722c
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %ecx
movl $0x71, %eax
cmpl %ecx, %eax
jne 0x72b0
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x20a0
movl %eax, -0x20(%rbp)
movslq -0x20(%rbp), %rdi
callq 0x21a0
movq %rax, 0x4f12(%rip)      # 0xc180
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x72ae
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x24(%rbp), %rcx
movb (%rax,%rcx), %dl
movq 0x4ee4(%rip), %rax      # 0xc180
movslq -0x24(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x7275
jmp 0x72b0
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %ecx
movl $0x6d, %eax
cmpl %ecx, %eax
jne 0x73a3
movl $0x0, 0x4e69(%rip)      # 0xc140
movl $0x0, -0x28(%rbp)
movslq -0x28(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x20a0
movq %rax, %rcx
movq -0x158(%rbp), %rax
cmpq %rcx, %rax
jae 0x73a1
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
subl $0x30, %ecx
movl $0xa, %eax
cmpl %ecx, %eax
jle 0x738f
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movsbl (%rax,%rcx), %eax
subl $0x30, %eax
cmpl $0x0, %eax
jl 0x738f
imull $0xa, 0x4de1(%rip), %eax # 0xc140
movl %eax, 0x4ddb(%rip)      # 0xc140
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movsbl (%rax,%rcx), %eax
subl $0x30, %eax
addl 0x4db9(%rip), %eax      # 0xc140
movl %eax, 0x4db3(%rip)      # 0xc140
jmp 0x7391
jmp 0x73a1
jmp 0x7393
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x72de
jmp 0x73a3
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %ecx
movl $0x72, %eax
cmpl %ecx, %eax
jne 0x7496
movl $0x0, 0x4d7e(%rip)      # 0xc148
movl $0x0, -0x2c(%rbp)
movslq -0x2c(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x20a0
movq %rax, %rcx
movq -0x160(%rbp), %rax
cmpq %rcx, %rax
jae 0x7494
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
subl $0x30, %ecx
movl $0xa, %eax
cmpl %ecx, %eax
jle 0x7482
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
subl $0x30, %eax
cmpl $0x0, %eax
jl 0x7482
imull $0xa, 0x4cf6(%rip), %eax # 0xc148
movl %eax, 0x4cf0(%rip)      # 0xc148
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
subl $0x30, %eax
addl 0x4cce(%rip), %eax      # 0xc148
movl %eax, 0x4cc8(%rip)      # 0xc148
jmp 0x7484
jmp 0x7494
jmp 0x7486
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x73d1
jmp 0x7496
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %ecx
movl $0x6c, %eax
cmpl %ecx, %eax
jne 0x7589
movl $0x0, 0x4c87(%rip)      # 0xc144
movl $0x0, -0x30(%rbp)
movslq -0x30(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x20a0
movq %rax, %rcx
movq -0x168(%rbp), %rax
cmpq %rcx, %rax
jae 0x7587
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
subl $0x30, %ecx
movl $0xa, %eax
cmpl %ecx, %eax
jle 0x7575
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %eax
subl $0x30, %eax
cmpl $0x0, %eax
jl 0x7575
imull $0xa, 0x4bff(%rip), %eax # 0xc144
movl %eax, 0x4bf9(%rip)      # 0xc144
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %eax
subl $0x30, %eax
addl 0x4bd7(%rip), %eax      # 0xc144
movl %eax, 0x4bd1(%rip)      # 0xc144
jmp 0x7577
jmp 0x7587
jmp 0x7579
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x74c4
jmp 0x7589
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %ecx
movl $0x73, %eax
cmpl %ecx, %eax
jne 0x767c
movl $0x0, 0x4b9c(%rip)      # 0xc14c
movl $0x0, -0x34(%rbp)
movslq -0x34(%rbp), %rax
movq %rax, -0x170(%rbp)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x20a0
movq %rax, %rcx
movq -0x170(%rbp), %rax
cmpq %rcx, %rax
jae 0x767a
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x34(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
subl $0x30, %ecx
movl $0xa, %eax
cmpl %ecx, %eax
jle 0x7668
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x34(%rbp), %rcx
movsbl (%rax,%rcx), %eax
subl $0x30, %eax
cmpl $0x0, %eax
jl 0x7668
imull $0xa, 0x4b14(%rip), %eax # 0xc14c
movl %eax, 0x4b0e(%rip)      # 0xc14c
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x34(%rbp), %rcx
movsbl (%rax,%rcx), %eax
subl $0x30, %eax
addl 0x4aec(%rip), %eax      # 0xc14c
movl %eax, 0x4ae6(%rip)      # 0xc14c
jmp 0x766a
jmp 0x767a
jmp 0x766c
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x75b7
jmp 0x767c
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %ecx
movl $0x68, %eax
cmpl %ecx, %eax
jne 0x76a6
callq 0x7070
movl $0x0, -0x4(%rbp)
jmp 0x83c6
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x76b3
jmp 0x76b3
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7180
cmpq $0x0, 0x4ab7(%rip)      # 0xc180
jne 0x76dc
callq 0x7070
movl $0x0, -0x4(%rbp)
jmp 0x83c6
cmpq $0x0, 0x4a94(%rip)      # 0xc178
jne 0x773d
leaq 0x4a33(%rip), %rdi      # 0xc120
callq 0x20a0
movl %eax, -0x38(%rbp)
movslq -0x38(%rbp), %rdi
callq 0x21a0
movq %rax, 0x4a73(%rip)      # 0xc178
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0x773b
movslq -0x3c(%rbp), %rcx
leaq 0x4a01(%rip), %rax      # 0xc120
movb (%rax,%rcx), %dl
movq 0x4a4f(%rip), %rax      # 0xc178
movslq -0x3c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x770c
jmp 0x773d
cmpl $-0x1, 0x49fc(%rip)     # 0xc140
jne 0x7750
movl $0x3, 0x49f0(%rip)      # 0xc140
cmpl $-0x1, 0x49ed(%rip)     # 0xc144
jne 0x7763
movl $0x64, 0x49e1(%rip)     # 0xc144
cmpl $-0x1, 0x49de(%rip)     # 0xc148
jne 0x7776
movl $0xa, 0x49d2(%rip)      # 0xc148
cmpl $-0x1, 0x49cf(%rip)     # 0xc14c
jne 0x7789
movl $0x2, 0x49c3(%rip)      # 0xc14c
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movl $0x0, -0x74(%rbp)
movl $0x2710, -0x78(%rbp)    # imm = 0x2710
movl $0x0, -0x7c(%rbp)
movl $0x0, -0x80(%rbp)
movl -0x78(%rbp), %eax
shll $0x2, %eax
movslq %eax, %rdi
callq 0x21a0
movq %rax, 0x5f56(%rip)      # 0xd720
movl $0x0, 0x5e8c(%rip)      # 0xd660
movl $0x0, 0x5ed2(%rip)      # 0xd6b0
movq 0x4993(%rip), %rdi      # 0xc178
leaq 0x186f(%rip), %rsi      # 0x905b
callq 0x2170
movq %rax, -0x58(%rbp)
movl $0x0, -0x8c(%rbp)
movl $0x1, -0x90(%rbp)
cmpl $0x8, -0x8c(%rbp)
jge 0x7bd0
movq -0x58(%rbp), %rdi
leaq 0x1cec(%rip), %rsi      # 0x950d
leaq -0x81(%rbp), %rdx
movb $0x0, %al
callq 0x2210
movzbl -0x81(%rbp), %eax
movl %eax, -0x88(%rbp)
movq -0x58(%rbp), %rdi
leaq 0x1cc6(%rip), %rsi      # 0x950d
leaq -0x81(%rbp), %rdx
movb $0x0, %al
callq 0x2210
movzbl -0x81(%rbp), %eax
shll $0x8, %eax
addl -0x88(%rbp), %eax
movl %eax, -0x88(%rbp)
movq -0x58(%rbp), %rdi
leaq 0x1c97(%rip), %rsi      # 0x950d
leaq -0x81(%rbp), %rdx
movb $0x0, %al
callq 0x2210
movzbl -0x81(%rbp), %eax
shll $0x10, %eax
addl -0x88(%rbp), %eax
movl %eax, -0x88(%rbp)
movq -0x58(%rbp), %rdi
leaq 0x1c68(%rip), %rsi      # 0x950d
leaq -0x81(%rbp), %rdx
movb $0x0, %al
callq 0x2210
movzbl -0x81(%rbp), %eax
shll $0x10, %eax
shll $0x8, %eax
addl -0x88(%rbp), %eax
movl %eax, -0x88(%rbp)
cmpl $0x7, -0x8c(%rbp)
jne 0x7928
movl -0x88(%rbp), %edx
movq 0x5e46(%rip), %rax      # 0xd728
movslq -0x90(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
movl -0x90(%rbp), %eax
cmpl -0x94(%rbp), %eax
jne 0x7926
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
leaq 0x1bf1(%rip), %rdi      # 0x9510
movb $0x0, %al
callq 0x2030
jmp 0x7928
cmpl $0x6, -0x8c(%rbp)
jne 0x7964
movl -0x88(%rbp), %eax
movl %eax, -0x94(%rbp)
movl -0x94(%rbp), %eax
shll $0x2, %eax
movslq %eax, %rdi
callq 0x21a0
movq %rax, 0x5dd3(%rip)      # 0xd728
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
cmpl $0x5, -0x8c(%rbp)
jne 0x79c4
movl -0x88(%rbp), %edx
movq -0x70(%rbp), %rax
movslq -0x90(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
movl -0x90(%rbp), %eax
movslq 0x47b3(%rip), %rdx      # 0xc150
leaq 0x5d0c(%rip), %rcx      # 0xd6b0
cmpl (%rcx,%rdx,4), %eax
jne 0x79c2
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
movl $0x0, -0x90(%rbp)
jmp 0x79c4
cmpl $0x4, -0x8c(%rbp)
jne 0x7a29
movl -0x88(%rbp), %edx
movq -0x68(%rbp), %rax
movslq -0x90(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
movl -0x90(%rbp), %eax
movslq 0x4753(%rip), %rdx      # 0xc150
leaq 0x5cac(%rip), %rcx      # 0xd6b0
movl (%rcx,%rdx,4), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jne 0x7a27
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
movl $0x0, -0x90(%rbp)
jmp 0x7a29
cmpl $0x3, -0x8c(%rbp)
jne 0x7a89
movl -0x88(%rbp), %edx
movq -0x60(%rbp), %rax
movslq -0x90(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
movl -0x90(%rbp), %eax
movslq 0x46ee(%rip), %rdx      # 0xc150
leaq 0x5bf7(%rip), %rcx      # 0xd660
cmpl (%rcx,%rdx,4), %eax
jne 0x7a87
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
movl $0x0, -0x90(%rbp)
jmp 0x7a89
cmpl $0x2, -0x8c(%rbp)
jne 0x7b2d
movl -0x88(%rbp), %edx
movslq -0x90(%rbp), %rcx
leaq 0x5c06(%rip), %rax      # 0xd6b0
movl %edx, (%rax,%rcx,4)
movl -0x90(%rbp), %eax
cmpl 0x4697(%rip), %eax      # 0xc150
jne 0x7b1c
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
movl $0x0, -0x90(%rbp)
movslq 0x4675(%rip), %rcx      # 0xc150
leaq 0x5bce(%rip), %rax      # 0xd6b0
movl (%rax,%rcx,4), %eax
shll $0x2, %eax
addl $0x4, %eax
movslq %eax, %rdi
callq 0x21a0
movq %rax, -0x68(%rbp)
movslq 0x4652(%rip), %rcx      # 0xc150
leaq 0x5bab(%rip), %rax      # 0xd6b0
movl (%rax,%rcx,4), %eax
shll $0x2, %eax
addl $0x4, %eax
movslq %eax, %rdi
callq 0x21a0
movq %rax, -0x70(%rbp)
jmp 0x7b2b
movl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
jmp 0x7b2d
cmpl $0x1, -0x8c(%rbp)
jne 0x7ba7
movl -0x88(%rbp), %edx
movslq -0x90(%rbp), %rcx
leaq 0x5b16(%rip), %rax      # 0xd660
movl %edx, (%rax,%rcx,4)
movl -0x90(%rbp), %eax
cmpl 0x45f7(%rip), %eax      # 0xc150
jne 0x7b96
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
movl $0x1, -0x90(%rbp)
movslq 0x45d5(%rip), %rcx      # 0xc150
leaq 0x5ade(%rip), %rax      # 0xd660
movl (%rax,%rcx,4), %eax
shll $0x2, %eax
movslq %eax, %rdi
callq 0x21a0
movq %rax, -0x60(%rbp)
jmp 0x7ba5
movl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
jmp 0x7ba7
cmpl $0x0, -0x8c(%rbp)
jne 0x7bcb
movl -0x88(%rbp), %eax
movl %eax, 0x4594(%rip)      # 0xc150
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
jmp 0x7809
movq -0x58(%rbp), %rdi
callq 0x2140
movl 0x4569(%rip), %eax      # 0xc148
movq %rsp, %rcx
movq %rcx, -0xa0(%rbp)
leaq (%rax,%rax,4), %rcx
leaq 0xf(,%rcx,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x188(%rbp)
movq %rcx, %rsp
movq %rax, -0xa8(%rbp)
movl 0x4532(%rip), %eax      # 0xc148
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x180(%rbp)
movq %rcx, %rsp
movq %rax, -0xb0(%rbp)
movl 0x4509(%rip), %eax      # 0xc148
leaq 0xf(,%rax,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x178(%rbp)
movq %rcx, %rsp
movq %rax, -0xb8(%rbp)
movl -0x94(%rbp), %eax
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
movl %eax, 0x5abc(%rip)      # 0xd730
movl 0x44d6(%rip), %eax      # 0xc150
movl %eax, -0x80(%rbp)
movl -0x80(%rbp), %eax
movl %eax, 0x5ab2(%rip)      # 0xd738
xorps %xmm0, %xmm0
movsd %xmm0, -0xc0(%rbp)
cmpl $0x2, 0x44a8(%rip)      # 0xc140
jne 0x7d39
movq -0x180(%rbp), %rdx
movl 0x4499(%rip), %edi      # 0xc144
xorl %esi, %esi
callq 0x6ea0
movl %eax, -0x78(%rbp)
callq 0x20f0
movq %rax, -0xc8(%rbp)
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x70(%rbp), %rdx
movl -0x78(%rbp), %ecx
callq 0x6650
callq 0x20f0
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
subq -0xc8(%rbp), %rax
cvtsi2sd %rax, %xmm0
movsd 0x1314(%rip), %xmm1     # 0x9010
divsd %xmm1, %xmm0
movsd 0x1300(%rip), %xmm1     # 0x9008
mulsd %xmm1, %xmm0
movsd %xmm0, -0xd8(%rbp)
movl -0x78(%rbp), %esi
movl 0x59e3(%rip), %edx      # 0xd700
movl 0x59d9(%rip), %ecx      # 0xd6fc
movsd -0xd8(%rbp), %xmm0
leaq 0x17f7(%rip), %rdi      # 0x9529
movb $0x1, %al
callq 0x2030
cmpl $0x1, 0x4400(%rip)      # 0xc140
je 0x7d4f
cmpl $0x3, 0x43f7(%rip)      # 0xc140
jne 0x80aa
xorps %xmm0, %xmm0
movss %xmm0, -0xdc(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0xe8(%rbp)
cmpl $0x3, 0x43d4(%rip)      # 0xc140
jne 0x7d7e
xorl %eax, %eax
movl %eax, %edi
callq 0x2120
movl %eax, %edi
callq 0x2130
movl $0x0, -0xec(%rbp)
movl -0xec(%rbp), %eax
cmpl 0x43b4(%rip), %eax      # 0xc148
jge 0x7f97
movl 0x43a4(%rip), %eax      # 0xc144
movl %eax, -0xf0(%rbp)
cmpl $0x1, 0x4393(%rip)      # 0xc140
jne 0x7dbb
movl 0x438f(%rip), %eax      # 0xc144
movl %eax, -0xf0(%rbp)
movq -0x180(%rbp), %rdx
movl -0xf0(%rbp), %edi
movl -0xec(%rbp), %esi
callq 0x6ea0
movl %eax, -0x78(%rbp)
callq 0x20f0
movq %rax, -0xf8(%rbp)
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x70(%rbp), %rdx
movl -0x78(%rbp), %ecx
callq 0x6650
callq 0x20f0
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rax
subq -0xf8(%rbp), %rax
cvtsi2sd %rax, %xmm0
movsd 0x11f3(%rip), %xmm1     # 0x9010
divsd %xmm1, %xmm0
movsd 0x11df(%rip), %xmm1     # 0x9008
mulsd %xmm1, %xmm0
movsd %xmm0, -0x108(%rbp)
movq 0x5904(%rip), %rax      # 0xd740
subq -0xf8(%rbp), %rax
cvtsi2sd %rax, %xmm0
movsd 0x11c0(%rip), %xmm1     # 0x9010
divsd %xmm1, %xmm0
movsd 0x11ac(%rip), %xmm1     # 0x9008
mulsd %xmm1, %xmm0
movsd %xmm0, -0x110(%rbp)
movl -0x78(%rbp), %esi
movl 0x588f(%rip), %edx      # 0xd700
movl 0x5885(%rip), %ecx      # 0xd6fc
movsd -0x108(%rbp), %xmm0
movsd 0x1191(%rip), %xmm1     # 0x9018
mulsd -0x110(%rbp), %xmm1
divsd -0x108(%rbp), %xmm1
leaq 0x16cf(%rip), %rdi      # 0x956d
movb $0x2, %al
callq 0x2030
movq -0x188(%rbp), %rcx
movq -0x178(%rbp), %rax
movl 0x5847(%rip), %esi      # 0xd700
movslq -0xec(%rbp), %rdx
imulq $0x14, %rdx, %rdi
movq %rcx, %rdx
addq %rdi, %rdx
movl %esi, (%rdx)
movl 0x582a(%rip), %esi      # 0xd6fc
movslq -0xec(%rbp), %rdx
imulq $0x14, %rdx, %rdi
movq %rcx, %rdx
addq %rdi, %rdx
movl %esi, 0x4(%rdx)
movl -0xf0(%rbp), %esi
movslq -0xec(%rbp), %rdx
imulq $0x14, %rdx, %rdi
movq %rcx, %rdx
addq %rdi, %rdx
movl %esi, 0x8(%rdx)
movl 0x582e(%rip), %edx      # 0xd734
movslq -0xec(%rbp), %rsi
imulq $0x14, %rsi, %rsi
addq %rsi, %rcx
movl %edx, 0xc(%rcx)
movsd -0x108(%rbp), %xmm0
movslq -0xec(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x10e5(%rip), %xmm0     # 0x9018
mulsd -0x110(%rbp), %xmm0
divsd -0x108(%rbp), %xmm0
addsd -0xe8(%rbp), %xmm0
movsd %xmm0, -0xe8(%rbp)
movsd -0x108(%rbp), %xmm0
addsd -0xc0(%rbp), %xmm0
movsd %xmm0, -0xc0(%rbp)
cvtsi2ssl 0x57c1(%rip), %xmm0 # 0xd734
addss -0xdc(%rbp), %xmm0
movss %xmm0, -0xdc(%rbp)
movl -0xec(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xec(%rbp)
jmp 0x7d88
movl $0x0, -0x114(%rbp)
movl -0x114(%rbp), %eax
cmpl 0x419b(%rip), %eax      # 0xc148
jge 0x804e
movq -0x178(%rbp), %rax
movq -0x188(%rbp), %rdi
movq -0x180(%rbp), %rcx
movslq -0x114(%rbp), %rdx
imulq $0x14, %rdx, %rsi
movq %rdi, %rdx
addq %rsi, %rdx
movl 0x8(%rdx), %esi
movslq -0x114(%rbp), %rdx
movl (%rcx,%rdx,4), %edx
movslq -0x114(%rbp), %rcx
imulq $0x14, %rcx, %r8
movq %rdi, %rcx
addq %r8, %rcx
movl 0xc(%rcx), %ecx
movslq -0x114(%rbp), %r8
imulq $0x14, %r8, %r9
movq %rdi, %r8
addq %r9, %r8
movl (%r8), %r8d
movslq -0x114(%rbp), %r9
imulq $0x14, %r9, %r9
addq %r9, %rdi
movl 0x4(%rdi), %r9d
movslq -0x114(%rbp), %rdi
movsd (%rax,%rdi,8), %xmm0
leaq 0x1587(%rip), %rdi      # 0x95ba
movb $0x1, %al
callq 0x2030
movl -0x114(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x114(%rbp)
jmp 0x7fa1
movsd -0xc0(%rbp), %xmm0
cvtsi2sdl 0x40ea(%rip), %xmm1 # 0xc148
divsd %xmm1, %xmm0
movss -0xdc(%rbp), %xmm1
cvtsi2ssl 0x40d6(%rip), %xmm2 # 0xc148
divss %xmm2, %xmm1
cvtss2sd %xmm1, %xmm1
leaq 0x1587(%rip), %rdi      # 0x9608
movb $0x2, %al
callq 0x2030
movsd -0xe8(%rbp), %xmm0
cvtsi2sdl 0x40b0(%rip), %xmm1 # 0xc148
divsd %xmm1, %xmm0
leaq 0x159c(%rip), %rdi      # 0x963f
movb $0x1, %al
callq 0x2030
cmpl $0x4, 0x408f(%rip)      # 0xc140
jne 0x82f5
movl $0x0, -0x118(%rbp)
movl -0x118(%rbp), %eax
cmpl 0x407b(%rip), %eax      # 0xc148
jge 0x822c
movl -0x118(%rbp), %edi
callq 0x6d30
movl %eax, -0x78(%rbp)
callq 0x20f0
movq %rax, -0x120(%rbp)
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x70(%rbp), %rdx
movl -0x78(%rbp), %ecx
callq 0x6650
callq 0x20f0
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
subq -0x120(%rbp), %rax
cvtsi2sd %rax, %xmm0
movsd 0xee8(%rip), %xmm1      # 0x9010
divsd %xmm1, %xmm0
movsd 0xed4(%rip), %xmm1      # 0x9008
mulsd %xmm1, %xmm0
movsd %xmm0, -0x130(%rbp)
movl -0x78(%rbp), %esi
movl 0x55b7(%rip), %edx      # 0xd700
movl 0x55ad(%rip), %ecx      # 0xd6fc
movsd -0x130(%rbp), %xmm0
leaq 0x13cb(%rip), %rdi      # 0x9529
movb $0x1, %al
callq 0x2030
movq -0x188(%rbp), %rcx
movq -0x178(%rbp), %rax
movl 0x5587(%rip), %esi      # 0xd700
movslq -0x118(%rbp), %rdx
imulq $0x14, %rdx, %rdi
movq %rcx, %rdx
addq %rdi, %rdx
movl %esi, (%rdx)
movl 0x556a(%rip), %esi      # 0xd6fc
movslq -0x118(%rbp), %rdx
imulq $0x14, %rdx, %rdi
movq %rcx, %rdx
addq %rdi, %rdx
movl %esi, 0x4(%rdx)
movl -0x78(%rbp), %esi
movslq -0x118(%rbp), %rdx
imulq $0x14, %rdx, %rdi
movq %rcx, %rdx
addq %rdi, %rdx
movl %esi, 0x8(%rdx)
movl 0x5571(%rip), %esi      # 0xd734
movslq -0x118(%rbp), %rdx
imulq $0x14, %rdx, %rdi
movq %rcx, %rdx
addq %rdi, %rdx
movl %esi, 0xc(%rdx)
movslq -0x118(%rbp), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rcx
movl $0xffffffff, 0x10(%rcx) # imm = 0xFFFFFFFF
movsd -0x130(%rbp), %xmm0
movslq -0x118(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0x130(%rbp), %xmm0
addsd -0xc0(%rbp), %xmm0
movsd %xmm0, -0xc0(%rbp)
movl -0x118(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x118(%rbp)
jmp 0x80c1
movsd -0xc0(%rbp), %xmm0
cvtsi2sdl 0x3f0c(%rip), %xmm1 # 0xc148
divsd %xmm1, %xmm0
leaq 0x1418(%rip), %rdi      # 0x965f
movb $0x1, %al
callq 0x2030
movl $0x0, -0x134(%rbp)
movl -0x134(%rbp), %eax
cmpl 0x3ee4(%rip), %eax      # 0xc148
jge 0x82f3
movq -0x178(%rbp), %rax
movq -0x188(%rbp), %rdi
movslq -0x134(%rbp), %rcx
imulq $0x14, %rcx, %rdx
movq %rdi, %rcx
addq %rdx, %rcx
movl 0x8(%rcx), %esi
movslq -0x134(%rbp), %rcx
imulq $0x14, %rcx, %rdx
movq %rdi, %rcx
addq %rdx, %rcx
movl 0xc(%rcx), %edx
movslq -0x134(%rbp), %rcx
imulq $0x14, %rcx, %r8
movq %rdi, %rcx
addq %r8, %rcx
movl (%rcx), %ecx
movslq -0x134(%rbp), %r8
imulq $0x14, %r8, %r8
addq %r8, %rdi
movl 0x4(%rdi), %r8d
movslq -0x134(%rbp), %rdi
movsd (%rax,%rdi,8), %xmm0
leaq 0x139e(%rip), %rdi      # 0x9676
movb $0x1, %al
callq 0x2030
movl -0x134(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x134(%rbp)
jmp 0x8258
jmp 0x82f5
cmpl $0x0, 0x3e44(%rip)      # 0xc140
jne 0x838e
callq 0x6ad0
movl %eax, -0x78(%rbp)
callq 0x20f0
movq %rax, -0x140(%rbp)
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x70(%rbp), %rdx
movl -0x78(%rbp), %ecx
callq 0x6650
callq 0x20f0
movq %rax, -0x148(%rbp)
movq -0x148(%rbp), %rax
subq -0x140(%rbp), %rax
cvtsi2sd %rax, %xmm0
movsd 0xcbf(%rip), %xmm1      # 0x9010
divsd %xmm1, %xmm0
movsd 0xcab(%rip), %xmm1      # 0x9008
mulsd %xmm1, %xmm0
movsd %xmm0, -0x150(%rbp)
movl -0x78(%rbp), %esi
movl 0x538e(%rip), %edx      # 0xd700
movl 0x5384(%rip), %ecx      # 0xd6fc
movsd -0x150(%rbp), %xmm0
leaq 0x11a2(%rip), %rdi      # 0x9529
movb $0x1, %al
callq 0x2030
movq 0x5393(%rip), %rdi      # 0xd728
callq 0x2180
movq -0x60(%rbp), %rdi
callq 0x2180
movq -0x68(%rbp), %rdi
callq 0x2180
movq -0x70(%rbp), %rdi
callq 0x2180
movl $0x0, -0x4(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, %rsp
movl -0x4(%rbp), %eax
movq %rbp, %rsp
popq %rbp
retq
nop