// File: /workspace/github_cpp_makefile_star2_O1/TooruAkagi[P]GCIS_Index/gcis_uni_build.cpp
// Function: main
int main(int argc, char *argv[]){
    int onhelp = 0;
    for(int i = 0;i<argc;i++){
    //printf("[%d : %s]",i,argv[i]);
    if('-'==argv[i][0]){ //符号
        if('i'==argv[i][1]){ //input
            int k = strlen(argv[i+1]);
            printf("<<%d,%d,%d>>",k,sizeof(argv[i+1]),sizeof(argv[i+1][0]));
            fname = (char*)malloc(k);
            for(int k2=0;k2<k;k2++){fname[k2]=argv[i+1][k2];}
        }
        if('o'==argv[i][1]){ //output
            int k = strlen(argv[i+1]);
            wname = (char*)malloc(k);
            for(int k2=0;k2<k;k2++){wname[k2]=argv[i+1][k2];}
        }
        if('h'==argv[i][1]){shelp();return 0;} //help
        i++;
        continue;
    }
  }
  if(fname==NULL){
    int k = strlen(defaultfname);
    fname = (char*)malloc(k);
    for(int k2=0;k2<k;k2++){fname[k2]=defaultfname[k2];}
  }
  if(wname==NULL){
    int k = strlen(defaultwname);
    wname = (char*)malloc(k);
    for(int k2=0;k2<k;k2++){wname[k2]=defaultwname[k2];}
  }
    FILE *fp;
    unsigned int *D;
    int *D_2;
    int i = 0;int round = 0;dcs[0] = 0;dc2s[0] = 0; 
    unsigned char chr;
    unsigned int a;
    fp = fopen(fname, "r");
    int flag = 0; //0:loops,1:dcs,2:dc2s,3:D,4:D_2,5:D3,6:NS
    int w = 1;
    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(flag == 9){printf("\n[%d]:%u",flag,a);exit(1);}
        if(flag==7){NS[w]=a;w++;if(w==Sizelist[0]){flag++;printf("\n-finishing load index-\n");}}
        if(flag==6){Sizelist[0]=a;NS = (unsigned int*)malloc(4*Sizelist[0]);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);
    for(int o = loops-1;o>=0;o--){exceptr[o]=-1;}
    Sizelist[1] = dc2s[loops];Sizelist[2] = dc2s[loops];
    for(int yj = 0;yj<dc2s[loops];yj++){
        if(D_3[yj]>255){Sizelist[1] = yj;break;}
    }
    for(int yj = Sizelist[1];yj<dc2s[loops];yj++){
        if(D_3[yj]>65535){Sizelist[2] = yj;break;}
    }
    D_3s = (unsigned char*)malloc(Sizelist[1]);
    D_3m = (unsigned short int*)malloc((Sizelist[2]-Sizelist[1])*2);
    for(int yj = 0;yj<Sizelist[1];yj++){D_3s[yj] = D_3[yj];}
    for(int yj = 0;yj<Sizelist[2]-Sizelist[1];yj++){D_3m[yj] = D_3[yj+Sizelist[1]];}
    //D_3をサイズごとに分割して保存している
    int roid;
    int totalsps = 0;
    int maxl = dc2s[loops];
    int *tx;
    tx = (int*)malloc((maxl+1)*4); //D_2の置き換え配列
    k = (bool*)malloc(Sizelist[7]); //最初に十分な領域を割り当てる.
    k3 = (bool*)malloc(Sizelist[8]);
    for(i=0;i<maxl;i++){
        //if(i==(maxl-5)){printf("[%d]まではOK(%d)",i,kad);} //Sizelist[7]を大きくするとセグフォしなくなります
        tx[i] = kad;
        roid=dmlen(i,D,D_2);
        diff(D,D_2[i],D_2[i+1]-D_2[i]);
        logg(roid,k); //1--反転なし:2--roid番目から文字が反転
        blogg(i,D,D_2,k);
    } //ガンマ符号
    tx[maxl] = kad;
    //printf("\n[D]配列サイズ : %d[%d bytes] / [D_2] = %d[%d bytes]\n",kad,kad/8,maxl,maxl*4);
    Sizelist[7] = kad;
    totalsps += kad/8; //符号化したD
    fano0(D,D_2,k3); //fの先頭の文字のコーディングをする．kadが消えるので，再生すること．
    //printf("[D1]:%d[%d bytes]\n",kad2,kad2/8);
    Sizelist[8] = kad2;
    totalsps += kad2/8; //符号化したD[先頭]
    free(D);
    for(i=0;i<=maxl;i++){D_2[i]=tx[i];} //作ったtxをD_2に差し替えるs
    free(tx);
    for(int o = 0;o<loops;o++){printf("\n%d[%d]",o,exceptr[o]);}
    int newn = kad2;
    //int t2=newn/lpurse;int t3=newn/spurse;
    Sizelist[3] = newn/lpurse + 1;Sizelist[4] =newn/spurse + 2;
    k3sub = (int*)malloc(Sizelist[3]*4);
    k3sub2 = (unsigned short int*)malloc(Sizelist[4]*2);
    
    totalsps += rsbuild(k3,k3sub,k3sub2,Sizelist[3]-1,newn);
    totalsps += Sizelist[0]*4 + dc2s[loops]*4; //NF && D
    d2under = (bool*)malloc((maxl+1)*6);
    d2top = (bool*)malloc(maxl+1+D_2[maxl]/64);
    printf("\n[[%d]]",maxl+1+D_2[maxl]/64);
    totalsps += fano(D_2,0,maxl+1,6,d2under,d2top);
    newn = kad2;
    //t2=newn/lpurse;t3=newn/spurse;
    Sizelist[5] = newn/lpurse + 1;Sizelist[6] =newn/spurse + 1;
    d2topsub = (int*)malloc(Sizelist[5]*4);
    d2topsub2 = (unsigned short int*)malloc(Sizelist[6]*2);
    totalsps += rsbuild(d2top,d2topsub,d2topsub2,Sizelist[5]-1,newn);
    printf("\nsps : %d byte(%d,%d)",totalsps,Sizelist[7],Sizelist[8]);
    write74();

    printf("codeindex is generated\n");
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testl %edi, %edi
jle 0x249d
movq %rsi, %rbx
movl %edi, %ebp
xorl %r13d, %r13d
movslq %r13d, %r14
movq (%rbx,%r14,8), %rax
cmpb $0x2d, (%rax)
jne 0x2491
cmpb $0x69, 0x1(%rax)
jne 0x242f
movq 0x8(%rbx,%r14,8), %rdi
callq 0x1060
movq %rax, %r15
movl $0x8, %edx
movl $0x1, %ecx
leaq 0xcbb(%rip), %rdi       # 0x30a6
movl %r15d, %esi
xorl %eax, %eax
callq 0x1030
movslq %r15d, %r12
movq %r12, %rdi
callq 0x1120
movq %rax, 0x2d91(%rip)      # 0x5198
testl %r12d, %r12d
jle 0x242f
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %eax, %eax
movq 0x8(%rbx,%r14,8), %rcx
movb (%rcx,%rax), %cl
movq 0x2d74(%rip), %rdx      # 0x5198
movb %cl, (%rdx,%rax)
incq %rax
cmpq %rax, %r15
jne 0x2415
movq (%rbx,%r14,8), %rax
cmpb $0x6f, 0x1(%rax)
jne 0x2480
movq 0x8(%rbx,%r14,8), %rdi
callq 0x1060
movq %rax, %r15
movslq %r15d, %r12
movq %r12, %rdi
callq 0x1120
movq %rax, 0x2d48(%rip)      # 0x51a0
testl %r12d, %r12d
jle 0x2480
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %eax, %eax
movq 0x8(%rbx,%r14,8), %rcx
movb (%rcx,%rax), %cl
movq 0x2d2b(%rip), %rdx      # 0x51a0
movb %cl, (%rdx,%rax)
incq %rax
cmpq %rax, %r15
jne 0x2466
movq (%rbx,%r14,8), %rax
cmpb $0x68, 0x1(%rax)
je 0x2849
incl %r13d
incl %r13d
cmpl %ebp, %r13d
jl 0x23b7
cmpq $0x0, 0x2cf3(%rip)      # 0x5198
jne 0x24ee
leaq 0x2c42(%rip), %rbx      # 0x50f0
movq %rbx, %rdi
callq 0x1060
movq %rax, %r14
movslq %r14d, %r15
movq %r15, %rdi
callq 0x1120
movq %rax, 0x2ccd(%rip)      # 0x5198
testl %r15d, %r15d
jle 0x24ee
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
xorl %eax, %eax
movb (%rax,%rbx), %cl
movq 0x2cb5(%rip), %rdx      # 0x5198
movb %cl, (%rdx,%rax)
incq %rax
cmpq %rax, %r14
jne 0x24d9
cmpq $0x0, 0x2caa(%rip)      # 0x51a0
jne 0x253f
leaq 0x2bf7(%rip), %rbx      # 0x50f6
movq %rbx, %rdi
callq 0x1060
movq %rax, %r14
movslq %r14d, %r15
movq %r15, %rdi
callq 0x1120
movq %rax, 0x2c84(%rip)      # 0x51a0
testl %r15d, %r15d
jle 0x253f
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
xorl %eax, %eax
movb (%rax,%rbx), %cl
movq 0x2c6c(%rip), %rdx      # 0x51a0
movb %cl, (%rdx,%rax)
incq %rax
cmpq %rax, %r14
jne 0x252a
xorl %eax, %eax
movl %eax, 0x2c79(%rip)      # 0x51c0
movl %eax, 0x2cc3(%rip)      # 0x5210
movq 0x2c44(%rip), %rdi      # 0x5198
leaq 0xb2a(%rip), %rsi       # 0x3085
callq 0x10e0
movq %rax, 0x20(%rsp)
movl $0x1, %ebp
xorl %ebx, %ebx
movq %rbp, 0x10(%rsp)
movq %r13, 0x8(%rsp)
movq 0x20(%rsp), %r15
movq %r15, %rdi
leaq 0xb2e(%rip), %rbp       # 0x30b3
movq %rbp, %rsi
leaq 0x7(%rsp), %r13
movq %r13, %rdx
xorl %eax, %eax
callq 0x11a0
movzbl 0x7(%rsp), %r14d
movq %r15, %rdi
movq %rbp, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x11a0
movzbl 0x7(%rsp), %r12d
shll $0x8, %r12d
orl %r14d, %r12d
movq %r15, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r13, %r14
xorl %eax, %eax
callq 0x11a0
movzbl 0x7(%rsp), %r13d
shll $0x10, %r13d
orl %r12d, %r13d
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x11a0
movzbl 0x7(%rsp), %r14d
shll $0x18, %r14d
orl %r13d, %r14d
cmpl $0x7, %ebx
jne 0x2644
movq 0x2d55(%rip), %rax      # 0x5358
movq 0x10(%rsp), %rbp
movslq %ebp, %rbp
movl %r14d, (%rax,%rbp,4)
incl %ebp
movl $0x7, %ebx
cmpl 0x2b24(%rip), %ebp      # 0x5140
jne 0x262f
leaq 0xca7(%rip), %rdi       # 0x32cc
callq 0x1160
movl $0x8, %ebx
movq 0x8(%rsp), %r13
leaq 0x2bd5(%rip), %r12      # 0x5210
leaq 0x2b7e(%rip), %r15      # 0x51c0
jmp 0x265c
movq 0x8(%rsp), %r13
leaq 0x2bc0(%rip), %r12      # 0x5210
leaq 0x2b69(%rip), %r15      # 0x51c0
movq 0x10(%rsp), %rbp
cmpl $0x6, %ebx
jne 0x2681
movl %r14d, 0x2ad8(%rip)     # 0x5140
leal (,%r14,4), %edi
callq 0x1120
movq %rax, 0x2cdc(%rip)      # 0x5358
movl $0x7, %ebx
cmpl $0x5, %ebx
jne 0x26b1
movq 0x2cfb(%rip), %rcx      # 0x5388
movslq %ebp, %rax
movl %r14d, (%rcx,%rax,4)
incl %eax
movslq 0x2a8f(%rip), %rcx      # 0x512c
xorl %ebp, %ebp
xorl %ebx, %ebx
cmpl (%r12,%rcx,4), %eax
sete %cl
je 0x26ac
movl %eax, %ebp
movb %cl, %bl
addl $0x5, %ebx
cmpl $0x4, %ebx
jne 0x26dd
movslq %ebp, %rax
movl %r14d, (%r13,%rax,4)
movslq 0x2a67(%rip), %rcx      # 0x512c
xorl %eax, %eax
xorl %ebx, %ebx
cmpl (%r12,%rcx,4), %ebp
sete %cl
je 0x26d6
incl %ebp
movl %ebp, %eax
movb %cl, %bl
orl $0x4, %ebx
movl %eax, %ebp
cmpl $0x3, %ebx
jne 0x270b
movslq %ebp, %rax
movq 0x18(%rsp), %rcx
movl %r14d, (%rcx,%rax,4)
incl %eax
movslq 0x2a35(%rip), %rcx      # 0x512c
xorl %ebp, %ebp
xorl %ebx, %ebx
cmpl (%r15,%rcx,4), %eax
sete %cl
je 0x2706
movl %eax, %ebp
movb %cl, %bl
addl $0x3, %ebx
cmpl $0x2, %ebx
jne 0x2758
movslq %ebp, %rcx
movl %r14d, (%r12,%rcx,4)
movslq 0x2a0e(%rip), %rax      # 0x512c
cmpl %eax, %ecx
jne 0x2751
movslq (%r12,%rax,4), %rax
leaq 0x4(,%rax,4), %rbp
movq %rbp, %rdi
callq 0x1120
movq %rax, %r13
movq %rbp, %rdi
callq 0x1120
movq %rax, 0x2c40(%rip)      # 0x5388
xorl %ebp, %ebp
movl $0x3, %ebx
jmp 0x2758
incl %ebp
movl $0x2, %ebx
cmpl $0x1, %ebx
jne 0x2794
movslq %ebp, %rcx
movl %r14d, (%r15,%rcx,4)
movslq 0x29c1(%rip), %rax      # 0x512c
cmpl %eax, %ecx
jne 0x278d
movslq (%r15,%rax,4), %rdi
shlq $0x2, %rdi
callq 0x1120
movq %rax, 0x18(%rsp)
movl $0x1, %ebp
movl $0x2, %ebx
jmp 0x2794
incl %ebp
movl $0x1, %ebx
testl %ebx, %ebx
jne 0x27a4
movl %r14d, 0x298d(%rip)     # 0x512c
movl $0x1, %ebx
cmpl $0x8, %ebx
jl 0x256c
movq 0x20(%rsp), %rdi
callq 0x10c0
movslq 0x296e(%rip), %rbx      # 0x512c
testq %rbx, %rbx
jle 0x27dc
leaq (,%rbx,4), %rdx
leaq 0x2b2e(%rip), %rdi      # 0x5300
movl $0xff, %esi
callq 0x1070
movslq (%r12,%rbx,4), %rax
movl %eax, 0x295e(%rip)      # 0x5144
movl %eax, 0x295c(%rip)      # 0x5148
testq %rax, %rax
movq 0x18(%rsp), %r14
jle 0x2818
movq 0x2b8b(%rip), %rdx      # 0x5388
xorl %ecx, %ecx
cmpl $0x100, (%rdx,%rcx,4)   # imm = 0x100
jge 0x2812
incq %rcx
cmpq %rcx, %rax
jne 0x27ff
jmp 0x2818
movl %ecx, 0x292c(%rip)      # 0x5144
movl 0x2926(%rip), %ecx      # 0x5144
movslq %ecx, %r15
cmpl %eax, %r15d
jge 0x2859
leaq (,%r15,4), %rdx
addq 0x2b53(%rip), %rdx      # 0x5388
cmpl $0x10000, (%rdx)        # imm = 0x10000
jge 0x2853
incl %ecx
addq $0x4, %rdx
cmpl %ecx, %eax
jne 0x2835
jmp 0x2859
callq 0x2314
jmp 0x2c2f
movl %ecx, 0x28ef(%rip)      # 0x5148
movq %r15, %rdi
callq 0x1120
movq %rax, 0x2b28(%rip)      # 0x5390
movslq 0x28d9(%rip), %rdi      # 0x5148
subq %r15, %rdi
addq %rdi, %rdi
callq 0x1120
movq %rax, 0x2aef(%rip)      # 0x5370
movl 0x28bd(%rip), %ecx      # 0x5144
testl %ecx, %ecx
jle 0x28b0
xorl %eax, %eax
movq 0x2af4(%rip), %rcx      # 0x5388
movb (%rcx,%rax,4), %cl
movq 0x2af2(%rip), %rdx      # 0x5390
movb %cl, (%rdx,%rax)
incq %rax
movslq 0x2899(%rip), %rcx      # 0x5144
cmpq %rcx, %rax
jl 0x288d
movl 0x2892(%rip), %edx      # 0x5148
subl %ecx, %edx
jle 0x28e3
movq 0x2aaf(%rip), %rax      # 0x5370
movslq %ecx, %rcx
movl %edx, %edx
shlq $0x2, %rcx
addq 0x2ab7(%rip), %rcx      # 0x5388
xorl %esi, %esi
movzwl (%rcx,%rsi,4), %edi
movw %di, (%rax,%rsi,2)
incq %rsi
cmpq %rsi, %rdx
jne 0x28d3
movslq 0x2842(%rip), %rax      # 0x512c
movslq (%r12,%rax,4), %rbp
leaq 0x4(,%rbp,4), %rdi
callq 0x1120
movq %rax, %r12
movslq 0x2857(%rip), %rdi      # 0x515c
callq 0x1120
movq %rax, 0x2a87(%rip)      # 0x5398
movslq 0x2848(%rip), %rdi      # 0x5160
callq 0x1120
movq %rax, 0x2a7c(%rip)      # 0x53a0
testq %rbp, %rbp
jle 0x29ae
xorl %r15d, %r15d
movl 0x2876(%rip), %eax      # 0x51ac
movl %eax, (%r12,%r15,4)
movl %r15d, %edi
movq %r14, %rsi
movq %r13, %rdx
callq 0x1726
movslq (%r13,%r15,4), %rdx
movslq 0x4(%r13,%r15,4), %rcx
subq %rdx, %rcx
cmpl $0x2, %ecx
jl 0x297f
leaq (%r14,%rdx,4), %rdx
decq %rcx
movl (%rdx,%rcx,4), %esi
movl -0x4(%rdx,%rcx,4), %edi
movl %esi, %r8d
subl %edi, %r8d
negl %r8d
subl %edi, %esi
cmovbl %r8d, %esi
movl %esi, (%rdx,%rcx,4)
decq %rcx
jg 0x2961
leaq 0x1(%r15), %rbx
movq 0x2a0e(%rip), %rsi      # 0x5398
movl %eax, %edi
callq 0x143d
movq 0x2a00(%rip), %rcx      # 0x5398
movl %r15d, %edi
movq %r14, %rsi
movq %r13, %rdx
callq 0x14cc
movq %rbx, %r15
cmpq %rbp, %rbx
jne 0x2930
leaq 0x1(%rbp), %rax
movq %rax, 0x10(%rsp)
movl 0x27ef(%rip), %eax      # 0x51ac
movl %eax, (%r12,%rbp,4)
movl %eax, 0x2795(%rip)      # 0x515c
movq %r14, %r15
leal 0x7(%rax), %r14d
testl %eax, %eax
cmovnsl %eax, %r14d
sarl $0x3, %r14d
movq 0x29c1(%rip), %rdx      # 0x53a0
movq %r15, %rdi
movq %r13, %rsi
callq 0x1661
movl 0x27c0(%rip), %eax      # 0x51b0
movl %eax, 0x276a(%rip)      # 0x5160
leal 0x7(%rax), %ebx
testl %eax, %eax
cmovnsl %eax, %ebx
sarl $0x3, %ebx
movq %r15, %rdi
callq 0x10f0
testl %ebp, %ebp
js 0x2a23
leal 0x1(%rbp), %eax
xorl %ecx, %ecx
movl (%r12,%rcx,4), %edx
movl %edx, (%r13,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x2a12
movq %r13, 0x8(%rsp)
addl %r14d, %ebx
movq %r12, %rdi
callq 0x10f0
cmpl $0x0, 0x26f2(%rip)      # 0x512c
jle 0x2a70
leaq 0x28bd(%rip), %r15      # 0x5300
leaq 0x66c(%rip), %r14       # 0x30b6
xorl %r12d, %r12d
movl (%r15), %edx
movq %r14, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x1030
incq %r12
movslq 0x26c5(%rip), %rax      # 0x512c
addq $0x4, %r15
cmpq %rax, %r12
jl 0x2a4d
movl 0x2739(%rip), %r15d     # 0x51b0
movl %r15d, %eax
cltd
idivl 0x26af(%rip)            # 0x5130
movl %eax, %r14d
leal 0x1(%r14), %eax
movl %eax, 0x26be(%rip)      # 0x514c
movl %r15d, %eax
cltd
idivl 0x269c(%rip)            # 0x5134
movl %eax, %r12d
leal 0x2(%r12), %eax
movl %eax, 0x26aa(%rip)      # 0x5150
leal 0x4(,%r14,4), %eax
movslq %eax, %rdi
callq 0x1120
movq %rax, %r13
movq %rax, 0x28c0(%rip)      # 0x5380
leal 0x4(,%r12,2), %eax
movslq %eax, %rdi
callq 0x1120
movq %rax, 0x2891(%rip)      # 0x5368
movq 0x28c2(%rip), %rdi      # 0x53a0
movq %r13, %rsi
movq %rax, %rdx
movl %r14d, %ecx
movl %r15d, %r8d
callq 0x1d76
addl %eax, %ebx
movslq 0x2634(%rip), %rax      # 0x512c
leaq 0x2711(%rip), %rcx      # 0x5210
movl (%rcx,%rax,4), %eax
addl 0x2638(%rip), %eax      # 0x5140
leal (%rbx,%rax,4), %r13d
movq 0x10(%rsp), %r15
leal (%r15,%r15), %eax
leal (%rax,%rax,2), %eax
movslq %eax, %rdi
callq 0x1120
movq %rax, 0x2881(%rip)      # 0x53a8
movq 0x8(%rsp), %rbx
movl (%rbx,%rbp,4), %eax
leal 0x3f(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
sarl $0x6, %ecx
addl %r15d, %ecx
movslq %ecx, %r14
movq %r14, %rdi
callq 0x1120
movq %rax, 0x2861(%rip)      # 0x53b0
leaq 0x568(%rip), %rdi       # 0x30be
movl %r14d, %esi
xorl %eax, %eax
callq 0x1030
movq 0x2841(%rip), %r8       # 0x53a8
movq 0x2842(%rip), %r9       # 0x53b0
movq %rbx, %rdi
xorl %esi, %esi
movl %r15d, %edx
movl $0x6, %ecx
callq 0x159d
movl %eax, %ebx
movl 0x2628(%rip), %ebp      # 0x51b0
movl %ebp, %eax
cltd
idivl 0x259f(%rip)            # 0x5130
movl %eax, %r14d
leal 0x1(%r14), %eax
movl %eax, 0x25b6(%rip)      # 0x5154
movl %ebp, %eax
cltd
idivl 0x258d(%rip)            # 0x5134
movl %eax, %r15d
leal 0x1(%r15), %eax
movl %eax, 0x25a4(%rip)      # 0x5158
leal 0x4(,%r14,4), %eax
movslq %eax, %rdi
callq 0x1120
movq %rax, %r12
movq %rax, 0x27aa(%rip)      # 0x5378
leal 0x2(,%r15,2), %eax
movslq %eax, %rdi
callq 0x1120
movq %rax, 0x277b(%rip)      # 0x5360
movq 0x27c4(%rip), %rdi      # 0x53b0
movq %r12, %rsi
movq %rax, %rdx
movl %r14d, %ecx
movl %ebp, %r8d
callq 0x1d76
addl %eax, %ebx
addl %r13d, %ebx
movl 0x2554(%rip), %edx      # 0x515c
movl 0x2552(%rip), %ecx      # 0x5160
leaq 0x4b1(%rip), %rdi       # 0x30c6
movl %ebx, %esi
xorl %eax, %eax
callq 0x1030
callq 0x20e1
leaq 0x68b(%rip), %rdi       # 0x32b5
callq 0x1160
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq