// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
testl %edi, %edi
jle 0x45c4
movq %rsi, %rbx
xorl %ecx, %ecx
movl %edi, -0x60(%rbp)
movslq %ecx, %r14
movq (%rbx,%r14,8), %rax
cmpb $0x2d, (%rax)
jne 0x45ba
movq %rcx, -0x38(%rbp)
cmpb $0x69, 0x1(%rax)
jne 0x43c8
movq 0x8(%rbx,%r14,8), %rdi
callq 0x1070
movq %rax, %r15
movslq %r15d, %r12
movq %r12, %rdi
callq 0x1160
movq %rax, 0x4dc8(%rip)      # 0x9168
testl %r12d, %r12d
jle 0x43c8
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %eax, %eax
movq 0x8(%rbx,%r14,8), %rcx
movb (%rcx,%rax), %cl
movq 0x4dab(%rip), %rdx      # 0x9168
movb %cl, (%rdx,%rax)
incq %rax
cmpq %rax, %r15
jne 0x43ae
movq (%rbx,%r14,8), %rax
cmpb $0x71, 0x1(%rax)
jne 0x4419
movq 0x8(%rbx,%r14,8), %rdi
callq 0x1070
movq %rax, %r15
movslq %r15d, %r12
movq %r12, %rdi
callq 0x1160
movq %rax, 0x4d7f(%rip)      # 0x9170
testl %r12d, %r12d
jle 0x4419
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %eax, %eax
movq 0x8(%rbx,%r14,8), %rcx
movb (%rcx,%rax), %cl
movq 0x4d62(%rip), %rdx      # 0x9170
movb %cl, (%rdx,%rax)
incq %rax
cmpq %rax, %r15
jne 0x43ff
movq (%rbx,%r14,8), %rax
movq %rax, -0x40(%rbp)
movb 0x1(%rax), %al
cmpb $0x6d, %al
jne 0x4486
movl $0x0, 0x4cfe(%rip)      # 0x9130
movq 0x8(%rbx,%r14,8), %r15
cmpb $0x0, (%r15)
je 0x447f
xorl %r12d, %r12d
xorl %r13d, %r13d
movb (%r15,%r12), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x447f
addl %r13d, %r13d
leal (%r13,%r13,4), %eax
movl %eax, 0x4cd5(%rip)      # 0x9130
movsbl (%r15,%r12), %ecx
leal (%rcx,%rax), %r13d
addl $-0x30, %r13d
movl %r13d, 0x4cc1(%rip)     # 0x9130
incq %r12
movq %r15, %rdi
callq 0x1070
cmpq %r12, %rax
ja 0x4443
movq -0x40(%rbp), %rax
movb 0x1(%rax), %al
cmpb $0x72, %al
jne 0x44e1
movl $0x0, 0x4ca4(%rip)      # 0x9138
movq 0x8(%rbx,%r14,8), %r15
cmpb $0x0, (%r15)
je 0x44e1
xorl %r12d, %r12d
xorl %r13d, %r13d
movb (%r15,%r12), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x44e1
addl %r13d, %r13d
leal (%r13,%r13,4), %eax
movl %eax, 0x4c7b(%rip)      # 0x9138
movsbl (%r15,%r12), %ecx
leal (%rcx,%rax), %r13d
addl $-0x30, %r13d
movl %r13d, 0x4c67(%rip)     # 0x9138
incq %r12
movq %r15, %rdi
callq 0x1070
cmpq %r12, %rax
ja 0x44a5
movq -0x40(%rbp), %r13
movb 0x1(%r13), %al
cmpb $0x6c, %al
jne 0x454c
movl $0x0, 0x4c3d(%rip)      # 0x9134
movq 0x8(%rbx,%r14,8), %r15
cmpb $0x0, (%r15)
je 0x4544
xorl %r12d, %r12d
xorl %r13d, %r13d
movb (%r15,%r12), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x4544
addl %r13d, %r13d
leal (%r13,%r13,4), %eax
movl %eax, 0x4c14(%rip)      # 0x9134
movsbl (%r15,%r12), %ecx
leal (%rcx,%rax), %r13d
addl $-0x30, %r13d
movl %r13d, 0x4c00(%rip)     # 0x9134
incq %r12
movq %r15, %rdi
callq 0x1070
cmpq %r12, %rax
ja 0x4508
movq -0x40(%rbp), %r13
movb 0x1(%r13), %al
cmpb $0x73, %al
jne 0x45a6
movl $0x0, 0x4be2(%rip)      # 0x913c
movq 0x8(%rbx,%r14,8), %r15
cmpb $0x0, (%r15)
je 0x45a6
xorl %r14d, %r14d
xorl %r12d, %r12d
movb (%r15,%r14), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x45a6
addl %r12d, %r12d
leal (%r12,%r12,4), %eax
movl %eax, 0x4bba(%rip)      # 0x913c
movsbl (%r15,%r14), %ecx
leal (%rcx,%rax), %r12d
addl $-0x30, %r12d
movl %r12d, 0x4ba6(%rip)     # 0x913c
incq %r14
movq %r15, %rdi
callq 0x1070
cmpq %r14, %rax
ja 0x456b
cmpb $0x68, 0x1(%r13)
je 0x4903
movq -0x38(%rbp), %rcx
incl %ecx
movl -0x60(%rbp), %edi
incl %ecx
cmpl %edi, %ecx
jl 0x4367
cmpq $0x0, 0x4ba4(%rip)      # 0x9170
je 0x4903
cmpq $0x0, 0x4b8e(%rip)      # 0x9168
jne 0x4623
leaq 0x4b2d(%rip), %rbx      # 0x9110
movq %rbx, %rdi
callq 0x1070
movq %rax, %r14
movslq %r14d, %r15
movq %r15, %rdi
callq 0x1160
movq %rax, 0x4b68(%rip)      # 0x9168
testl %r15d, %r15d
jle 0x4623
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
xorl %eax, %eax
movb (%rax,%rbx), %cl
movq 0x4b50(%rip), %rdx      # 0x9168
movb %cl, (%rdx,%rax)
incq %rax
cmpq %rax, %r14
jne 0x460e
cmpl $-0x1, 0x4b06(%rip)     # 0x9130
jne 0x4636
movl $0x3, 0x4afa(%rip)      # 0x9130
cmpl $-0x1, 0x4af7(%rip)     # 0x9134
jne 0x4649
movl $0x64, 0x4aeb(%rip)     # 0x9134
cmpl $-0x1, 0x4ae8(%rip)     # 0x9138
jne 0x465c
movl $0xa, 0x4adc(%rip)      # 0x9138
cmpl $-0x1, 0x4ad9(%rip)     # 0x913c
jne 0x466f
movl $0x2, 0x4acd(%rip)      # 0x913c
movl $0x9c40, %edi           # imm = 0x9C40
callq 0x1160
movq %rax, 0x6090(%rip)      # 0xa710
xorl %eax, %eax
movl %eax, 0x5fc8(%rip)      # 0xa650
movl %eax, 0x6012(%rip)      # 0xa6a0
movq 0x4ad3(%rip), %rdi      # 0x9168
leaq 0x19d7(%rip), %rsi      # 0x6073
callq 0x1130
movq %rax, -0x60(%rbp)
movl $0x1, %eax
movq %rax, -0x38(%rbp)
xorl %esi, %esi
movq -0x60(%rbp), %r15
movl %esi, -0x40(%rbp)
movq %r15, %rdi
leaq 0x1aed(%rip), %r13      # 0x61ae
movq %r13, %rsi
leaq -0x29(%rbp), %r12
movq %r12, %rdx
xorl %eax, %eax
callq 0x11e0
movzbl -0x29(%rbp), %r14d
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x11e0
movzbl -0x29(%rbp), %ebx
shll $0x8, %ebx
orl %r14d, %ebx
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r12, %r14
xorl %eax, %eax
callq 0x11e0
movzbl -0x29(%rbp), %r12d
shll $0x10, %r12d
orl %ebx, %r12d
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x11e0
movzbl -0x29(%rbp), %r14d
shll $0x18, %r14d
orl %r12d, %r14d
movl -0x40(%rbp), %eax
leaq 0x18ea(%rip), %rcx      # 0x6020
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl %r14d, 0x49fa(%rip)     # 0x9140
movl $0x1, %esi
jmp 0x46b4
movq -0x38(%rbp), %rdx
movslq %edx, %rax
movq -0x58(%rbp), %rcx
movl %r14d, (%rcx,%rax,4)
movslq 0x49da(%rip), %rax      # 0x9140
xorl %esi, %esi
leaq 0x5f31(%rip), %rcx      # 0xa6a0
cmpl (%rcx,%rax,4), %edx
leal 0x1(%rdx), %eax
sete %sil
movl $0x0, %ecx
cmovel %ecx, %eax
orl $0x4, %esi
movq %rax, -0x38(%rbp)
jmp 0x46b4
movq -0x38(%rbp), %rdx
movslq %edx, %rax
leaq 0x5f05(%rip), %rcx      # 0xa6a0
movl %r14d, (%rcx,%rax,4)
cmpl 0x499b(%rip), %edx      # 0x9140
jne 0x48e3
leal 0x4(,%r14,4), %r14d
movq %r14, %rdi
callq 0x1160
movq %rax, -0x58(%rbp)
movq %r14, %rdi
callq 0x1160
movq %rax, -0x48(%rbp)
movl $0x3, %esi
movq $0x0, -0x38(%rbp)
jmp 0x46b4
movq -0x38(%rbp), %rdx
movslq %edx, %rax
movq -0x50(%rbp), %rcx
movl %r14d, (%rcx,%rax,4)
incl %edx
movslq 0x494b(%rip), %rax      # 0x9140
xorl %esi, %esi
leaq 0x5e52(%rip), %rcx      # 0xa650
cmpl (%rcx,%rax,4), %edx
sete %sil
movl $0x0, %eax
cmovel %eax, %edx
movq %rdx, -0x38(%rbp)
addl $0x3, %esi
jmp 0x46b4
movq 0x5ef8(%rip), %rax      # 0xa718
movq -0x38(%rbp), %rdx
movslq %edx, %rcx
movl %r14d, (%rax,%rcx,4)
incl %edx
movl $0x7, %esi
movq %rdx, -0x38(%rbp)
cmpl -0x70(%rbp), %edx
jne 0x46b4
jmp 0x490d
movq -0x38(%rbp), %rdx
movslq %edx, %rax
leaq 0x5dfe(%rip), %rcx      # 0xa650
movl %r14d, (%rcx,%rax,4)
cmpl 0x48e4(%rip), %eax      # 0x9140
jne 0x48f3
shll $0x2, %r14d
movq %r14, %rdi
callq 0x1160
movq %rax, -0x50(%rbp)
movl $0x2, %esi
movl $0x1, %eax
movq %rax, -0x38(%rbp)
jmp 0x46b4
movq -0x38(%rbp), %rdx
movslq %edx, %rax
movq -0x48(%rbp), %rcx
movl %r14d, (%rcx,%rax,4)
incl %edx
movslq 0x48a3(%rip), %rax      # 0x9140
xorl %esi, %esi
leaq 0x5dfa(%rip), %rcx      # 0xa6a0
cmpl (%rcx,%rax,4), %edx
sete %sil
movl $0x0, %eax
cmovel %eax, %edx
movq %rdx, -0x38(%rbp)
addl $0x5, %esi
jmp 0x46b4
leal (,%r14,4), %edi
callq 0x1160
movq %rax, 0x5e43(%rip)      # 0xa718
movl $0x7, %esi
movl %r14d, -0x70(%rbp)
jmp 0x46b4
incl %edx
movq %rdx, -0x38(%rbp)
movl $0x2, %esi
jmp 0x46b4
incl %edx
movq %rdx, -0x38(%rbp)
movl $0x1, %esi
jmp 0x46b4
callq 0x4285
jmp 0x4e96
leaq 0x1da4(%rip), %rdi      # 0x66b8
callq 0x11a0
movq -0x60(%rbp), %rdi
callq 0x1100
movq %rsp, -0x88(%rbp)
movl 0x4809(%rip), %eax      # 0x9138
movq %rsp, %rbx
leaq (%rax,%rax,4), %rax
leaq 0xf(,%rax,4), %rax
andq $-0x10, %rax
subq %rax, %rbx
movq %rbx, %rsp
movl 0x47ea(%rip), %eax      # 0x9138
movq %rsp, %rdx
leaq 0xf(,%rax,4), %rcx
andq $-0x10, %rcx
subq %rcx, %rdx
movq %rdx, -0x80(%rbp)
movq %rdx, %rsp
movq %rsp, %r13
leaq 0xf(,%rax,8), %rax
andq $-0x10, %rax
subq %rax, %r13
movq %r13, %rsp
movl -0x70(%rbp), %eax
movl %eax, 0x5d9b(%rip)      # 0xa720
movl 0x47b5(%rip), %eax      # 0x9140
movl %eax, 0x5d97(%rip)      # 0xa728
movl 0x4799(%rip), %eax      # 0x9130
cmpl $0x2, %eax
movq -0x58(%rbp), %r15
movq -0x48(%rbp), %r12
jne 0x4a14
movl 0x478a(%rip), %edi      # 0x9134
xorl %esi, %esi
movq -0x80(%rbp), %rdx
callq 0x412f
movl %eax, %r14d
callq 0x1090
movq %rax, -0x40(%rbp)
movq -0x50(%rbp), %rdi
movq %r15, %rsi
movq %r12, %rdx
movl %r14d, %ecx
callq 0x3b76
callq 0x1090
subq -0x40(%rbp), %rax
cvtsi2sd %rax, %xmm0
divsd 0x161f(%rip), %xmm0     # 0x6008
mulsd 0x161f(%rip), %xmm0     # 0x6010
movl 0x5cf9(%rip), %edx      # 0xa6f0
movl 0x5cef(%rip), %ecx      # 0xa6ec
leaq 0x17ad(%rip), %rdi      # 0x61b1
movl %r14d, %esi
movb $0x1, %al
callq 0x1030
movl 0x471c(%rip), %eax      # 0x9130
cmpl $0x1, %eax
movq -0x50(%rbp), %r14
movq %rbx, -0x68(%rbp)
movq %r13, -0x78(%rbp)
movq %r15, -0x58(%rbp)
movq %r14, -0x50(%rbp)
je 0x4a48
xorpd %xmm0, %xmm0
cmpl $0x3, %eax
jne 0x4c9a
xorl %edi, %edi
callq 0x10e0
movl %eax, %edi
callq 0x10f0
movl 0x46ea(%rip), %eax      # 0x9138
testl %eax, %eax
jle 0x4c17
addq $0xc, %rbx
xorps %xmm4, %xmm4
xorps %xmm1, %xmm1
movq %r12, -0x48(%rbp)
xorl %r12d, %r12d
xorps %xmm3, %xmm3
movss %xmm4, -0x60(%rbp)
movsd %xmm1, -0x38(%rbp)
movsd %xmm3, -0x40(%rbp)
movl 0x46b4(%rip), %r13d     # 0x9134
movl %r13d, %edi
movl %r12d, %esi
movq -0x80(%rbp), %rdx
callq 0x412f
movl %eax, %r14d
callq 0x1090
movq %rax, %r15
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x48(%rbp), %rdx
movl %r14d, %ecx
callq 0x3b76
callq 0x1090
subq %r15, %rax
xorps %xmm2, %xmm2
cvtsi2sd %rax, %xmm2
movsd 0x1542(%rip), %xmm0     # 0x6008
divsd %xmm0, %xmm2
movsd 0x153e(%rip), %xmm1     # 0x6010
mulsd %xmm1, %xmm2
movsd %xmm2, -0x90(%rbp)
movq 0x5c4b(%rip), %rax      # 0xa730
subq %r15, %rax
xorps %xmm3, %xmm3
cvtsi2sd %rax, %xmm3
divsd %xmm0, %xmm3
mulsd %xmm1, %xmm3
movl 0x5bf2(%rip), %edx      # 0xa6f0
movl 0x5be8(%rip), %ecx      # 0xa6ec
mulsd 0x150c(%rip), %xmm3     # 0x6018
divsd %xmm2, %xmm3
movapd %xmm3, %xmm1
movsd %xmm3, -0x70(%rbp)
leaq 0x16d5(%rip), %rdi      # 0x61f5
movl %r14d, %esi
movapd %xmm2, %xmm0
movb $0x2, %al
callq 0x1030
movss -0x60(%rbp), %xmm4
movsd -0x38(%rbp), %xmm1
movsd -0x40(%rbp), %xmm3
movl 0x5bad(%rip), %eax      # 0xa6f0
movl %eax, -0xc(%rbx)
movl 0x5ba0(%rip), %eax      # 0xa6ec
movl %eax, -0x8(%rbx)
movl %r13d, -0x4(%rbx)
movq -0x78(%rbp), %r13
movl 0x5bc7(%rip), %eax      # 0xa724
movl %eax, (%rbx)
movsd -0x90(%rbp), %xmm0
movsd %xmm0, (%r13,%r12,8)
addsd -0x70(%rbp), %xmm1
addsd %xmm0, %xmm3
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
addss %xmm0, %xmm4
incq %r12
movslq 0x45ac(%rip), %rax      # 0x9138
addq $0x14, %rbx
cmpq %rax, %r12
jl 0x4a6a
movsd %xmm1, -0x38(%rbp)
testl %eax, %eax
jle 0x4c29
movss %xmm4, -0x60(%rbp)
movsd %xmm3, -0x40(%rbp)
movq -0x68(%rbp), %rax
leaq 0xc(%rax), %rbx
xorl %r15d, %r15d
leaq 0x1680(%rip), %r14      # 0x6242
movq -0x48(%rbp), %r12
movl -0x4(%rbx), %esi
movq -0x80(%rbp), %rax
movl (%rax,%r15,4), %edx
movl (%rbx), %ecx
movl -0xc(%rbx), %r8d
movl -0x8(%rbx), %r9d
movsd (%r13,%r15,8), %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x1030
incq %r15
movslq 0x4542(%rip), %rax      # 0x9138
addq $0x14, %rbx
cmpq %rax, %r15
jl 0x4bc6
movq -0x58(%rbp), %r15
movq -0x68(%rbp), %rbx
movsd -0x40(%rbp), %xmm3
movq -0x50(%rbp), %r14
movss -0x60(%rbp), %xmm4
jmp 0x4c39
xorps %xmm4, %xmm4
xorpd %xmm0, %xmm0
movsd %xmm0, -0x38(%rbp)
xorpd %xmm3, %xmm3
jmp 0x4c39
movq -0x58(%rbp), %r15
movq -0x50(%rbp), %r14
movq -0x48(%rbp), %r12
movq -0x68(%rbp), %rbx
movsd %xmm3, -0x40(%rbp)
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
xorps %xmm2, %xmm2
cvtsi2ss %eax, %xmm2
movapd %xmm3, %xmm0
divsd %xmm1, %xmm0
divss %xmm2, %xmm4
xorps %xmm1, %xmm1
cvtss2sd %xmm4, %xmm1
leaq 0x162a(%rip), %rdi      # 0x6290
movb $0x2, %al
callq 0x1030
xorps %xmm1, %xmm1
cvtsi2sdl 0x44c0(%rip), %xmm1 # 0x9138
movsd -0x38(%rbp), %xmm0
divsd %xmm1, %xmm0
leaq 0x163f(%rip), %rdi      # 0x62c7
movb $0x1, %al
callq 0x1030
movsd -0x40(%rbp), %xmm0
movl 0x4496(%rip), %eax      # 0x9130
cmpl $0x4, %eax
jne 0x4e06
movl 0x448f(%rip), %eax      # 0x9138
testl %eax, %eax
jle 0x4d87
movq %r12, -0x48(%rbp)
leaq 0x10(%rbx), %r13
xorl %ebx, %ebx
movq -0x78(%rbp), %r12
movsd %xmm0, -0x40(%rbp)
movl %ebx, %edi
callq 0x4015
movl %eax, %r14d
callq 0x1090
movq %rax, %r15
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x48(%rbp), %rdx
movl %r14d, %ecx
callq 0x3b76
callq 0x1090
subq %r15, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x1306(%rip), %xmm0     # 0x6008
mulsd 0x1306(%rip), %xmm0     # 0x6010
movsd %xmm0, -0x38(%rbp)
movl 0x59db(%rip), %edx      # 0xa6f0
movl 0x59d1(%rip), %ecx      # 0xa6ec
leaq 0x148f(%rip), %rdi      # 0x61b1
movl %r14d, %esi
movb $0x1, %al
callq 0x1030
movsd -0x40(%rbp), %xmm0
movl 0x59b9(%rip), %eax      # 0xa6f0
movl %eax, -0x10(%r13)
movl 0x59ab(%rip), %eax      # 0xa6ec
movl %eax, -0xc(%r13)
movl %r14d, -0x8(%r13)
movl 0x59d5(%rip), %eax      # 0xa724
movl %eax, -0x4(%r13)
movl $0xffffffff, (%r13)     # imm = 0xFFFFFFFF
movsd -0x38(%rbp), %xmm1
movsd %xmm1, (%r12,%rbx,8)
addsd %xmm1, %xmm0
incq %rbx
movslq 0x43c4(%rip), %rax      # 0x9138
addq $0x14, %r13
cmpq %rax, %rbx
jl 0x4cbf
movq -0x48(%rbp), %r15
jmp 0x4d8a
movq %r12, %r15
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
leaq 0x154b(%rip), %rdi      # 0x62e7
movb $0x1, %al
callq 0x1030
cmpl $0x0, 0x438e(%rip)      # 0x9138
movq -0x68(%rbp), %r13
movq -0x78(%rbp), %r12
jle 0x4df5
addq $0xc, %r13
xorl %r14d, %r14d
leaq 0x153c(%rip), %rbx      # 0x62fe
movl -0x4(%r13), %esi
movl (%r13), %edx
movl -0xc(%r13), %ecx
movl -0x8(%r13), %r8d
movsd (%r12,%r14,8), %xmm0
movq %rbx, %rdi
movb $0x1, %al
callq 0x1030
incq %r14
movslq 0x434c(%rip), %rax      # 0x9138
addq $0x14, %r13
cmpq %rax, %r14
jl 0x4dc2
movl 0x4335(%rip), %eax      # 0x9130
movq %r15, %r12
movq -0x58(%rbp), %r15
movq -0x50(%rbp), %r14
testl %eax, %eax
jne 0x4e6b
callq 0x3e82
movl %eax, %ebx
callq 0x1090
movq %r14, %r13
movq %rax, %r14
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl %ebx, %ecx
callq 0x3b76
callq 0x1090
subq %r14, %rax
movq %r13, %r14
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x11c1(%rip), %xmm0     # 0x6008
mulsd 0x11c1(%rip), %xmm0     # 0x6010
movl 0x589b(%rip), %edx      # 0xa6f0
movl 0x5891(%rip), %ecx      # 0xa6ec
leaq 0x134f(%rip), %rdi      # 0x61b1
movl %ebx, %esi
movb $0x1, %al
callq 0x1030
movq 0x58a6(%rip), %rdi      # 0xa718
callq 0x1140
movq %r14, %rdi
callq 0x1140
movq %r15, %rdi
callq 0x1140
movq %r12, %rdi
callq 0x1140
movq -0x88(%rbp), %rsp
xorl %eax, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop