// File: /workspace/github_cpp_makefile_star2_O3/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 0x24ec
movq %rsi, %rbx
movl %edi, %ebp
xorl %r13d, %r13d
movslq %r13d, %r14
movq (%rbx,%r14,8), %rax
cmpb $0x2d, (%rax)
jne 0x24e0
cmpb $0x69, 0x1(%rax)
jne 0x247e
movq 0x8(%rbx,%r14,8), %rdi
callq 0x1060
movq %rax, %r15
movl $0x8, %edx
movl $0x1, %ecx
leaq 0xc8c(%rip), %rdi       # 0x30c6
movl %r15d, %esi
xorl %eax, %eax
callq 0x1030
movslq %r15d, %r12
movq %r12, %rdi
callq 0x1120
movq %rax, 0x2d42(%rip)      # 0x5198
testl %r12d, %r12d
jle 0x247e
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %eax, %eax
movq 0x8(%rbx,%r14,8), %rcx
movb (%rcx,%rax), %cl
movq 0x2d25(%rip), %rdx      # 0x5198
movb %cl, (%rdx,%rax)
incq %rax
cmpq %rax, %r15
jne 0x2464
movq (%rbx,%r14,8), %rax
cmpb $0x6f, 0x1(%rax)
jne 0x24cf
movq 0x8(%rbx,%r14,8), %rdi
callq 0x1060
movq %rax, %r15
movslq %r15d, %r12
movq %r12, %rdi
callq 0x1120
movq %rax, 0x2cf9(%rip)      # 0x51a0
testl %r12d, %r12d
jle 0x24cf
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %eax, %eax
movq 0x8(%rbx,%r14,8), %rcx
movb (%rcx,%rax), %cl
movq 0x2cdc(%rip), %rdx      # 0x51a0
movb %cl, (%rdx,%rax)
incq %rax
cmpq %rax, %r15
jne 0x24b5
movq (%rbx,%r14,8), %rax
cmpb $0x68, 0x1(%rax)
je 0x2caa
incl %r13d
incl %r13d
cmpl %ebp, %r13d
jl 0x2406
cmpq $0x0, 0x2ca4(%rip)      # 0x5198
jne 0x253d
leaq 0x2bf3(%rip), %rbx      # 0x50f0
movq %rbx, %rdi
callq 0x1060
movq %rax, %r14
movslq %r14d, %r15
movq %r15, %rdi
callq 0x1120
movq %rax, 0x2c7e(%rip)      # 0x5198
testl %r15d, %r15d
jle 0x253d
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
xorl %eax, %eax
movb (%rax,%rbx), %cl
movq 0x2c66(%rip), %rdx      # 0x5198
movb %cl, (%rdx,%rax)
incq %rax
cmpq %rax, %r14
jne 0x2528
cmpq $0x0, 0x2c5b(%rip)      # 0x51a0
jne 0x258e
leaq 0x2ba8(%rip), %rbx      # 0x50f6
movq %rbx, %rdi
callq 0x1060
movq %rax, %r14
movslq %r14d, %r15
movq %r15, %rdi
callq 0x1120
movq %rax, 0x2c35(%rip)      # 0x51a0
testl %r15d, %r15d
jle 0x258e
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
xorl %eax, %eax
movb (%rax,%rbx), %cl
movq 0x2c1d(%rip), %rdx      # 0x51a0
movb %cl, (%rdx,%rax)
incq %rax
cmpq %rax, %r14
jne 0x2579
xorl %eax, %eax
movl %eax, 0x2c2a(%rip)      # 0x51c0
movl %eax, 0x2c74(%rip)      # 0x5210
movq 0x2bf5(%rip), %rdi      # 0x5198
leaq 0xafb(%rip), %rsi       # 0x30a5
callq 0x10e0
movq %rax, 0x20(%rsp)
movl $0x1, %eax
movq %rax, 0x8(%rsp)
xorl %ebx, %ebx
movq 0x20(%rsp), %rbp
movq %rbp, %rdi
leaq 0xb04(%rip), %r13       # 0x30d3
movq %r13, %rsi
leaq 0x7(%rsp), %r15
movq %r15, %rdx
xorl %eax, %eax
callq 0x11a0
movzbl 0x7(%rsp), %r14d
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x11a0
movzbl 0x7(%rsp), %r12d
shll $0x8, %r12d
orl %r14d, %r12d
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x11a0
movzbl 0x7(%rsp), %r14d
shll $0x10, %r14d
orl %r12d, %r14d
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x11a0
movzbl 0x7(%rsp), %edi
shll $0x18, %edi
orl %r14d, %edi
movl %ebx, %eax
leaq 0x9bf(%rip), %rcx       # 0x3004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl %edi, 0x2ad8(%rip)      # 0x512c
movl $0x1, %ebx
jmp 0x25c0
movq 0x8(%rsp), %rdx
movslq %edx, %rax
movq 0x18(%rsp), %rcx
movl %edi, (%rcx,%rax,4)
movslq 0x2ab7(%rip), %rax      # 0x512c
xorl %ebx, %ebx
leaq 0x2b92(%rip), %rcx      # 0x5210
cmpl (%rcx,%rax,4), %edx
leal 0x1(%rdx), %eax
sete %bl
movl $0x0, %ecx
cmovel %ecx, %eax
orl $0x4, %ebx
movq %rax, 0x8(%rsp)
jmp 0x25c0
movq 0x8(%rsp), %rdx
movslq %edx, %rax
leaq 0x2b65(%rip), %rcx      # 0x5210
movl %edi, (%rcx,%rax,4)
cmpl 0x2a78(%rip), %edx      # 0x512c
jne 0x27f9
leal 0x4(,%rdi,4), %ebp
movq %rbp, %rdi
callq 0x1120
movq %rax, 0x18(%rsp)
movq %rbp, %rdi
callq 0x1120
movq %rax, 0x2cab(%rip)      # 0x5388
movl $0x3, %ebx
movq $0x0, 0x8(%rsp)
jmp 0x25c0
movq 0x8(%rsp), %rdx
movslq %edx, %rax
movq 0x10(%rsp), %rcx
movl %edi, (%rcx,%rax,4)
incl %edx
movslq 0x2a23(%rip), %rax      # 0x512c
xorl %ebx, %ebx
leaq 0x2aae(%rip), %rcx      # 0x51c0
cmpl (%rcx,%rax,4), %edx
sete %bl
movl $0x0, %eax
cmovel %eax, %edx
movq %rdx, 0x8(%rsp)
addl $0x3, %ebx
jmp 0x25c0
movq 0x2c24(%rip), %rax      # 0x5358
movq 0x8(%rsp), %rdx
movslq %edx, %rcx
movl %edi, (%rax,%rcx,4)
incl %edx
movl $0x7, %ebx
movq %rdx, 0x8(%rsp)
cmpl 0x29ef(%rip), %edx      # 0x5140
jne 0x25c0
jmp 0x281b
movq 0x8(%rsp), %rdx
movslq %edx, %rax
leaq 0x2a55(%rip), %rcx      # 0x51c0
movl %edi, (%rcx,%rax,4)
cmpl 0x29b8(%rip), %eax      # 0x512c
jne 0x280a
shll $0x2, %edi
callq 0x1120
movq %rax, 0x10(%rsp)
movl $0x2, %ebx
movl $0x1, %eax
movq %rax, 0x8(%rsp)
jmp 0x25c0
movq 0x2be6(%rip), %rax      # 0x5388
movq 0x8(%rsp), %rdx
movslq %edx, %rcx
movl %edi, (%rax,%rcx,4)
incl %edx
movslq 0x2976(%rip), %rax      # 0x512c
xorl %ebx, %ebx
leaq 0x2a51(%rip), %rcx      # 0x5210
cmpl (%rcx,%rax,4), %edx
sete %bl
movl $0x0, %eax
cmovel %eax, %edx
movq %rdx, 0x8(%rsp)
addl $0x5, %ebx
jmp 0x25c0
movl %edi, 0x2960(%rip)      # 0x5140
shll $0x2, %edi
callq 0x1120
movq %rax, 0x2b69(%rip)      # 0x5358
movl $0x7, %ebx
jmp 0x25c0
incl %edx
movq %rdx, 0x8(%rsp)
movl $0x2, %ebx
jmp 0x25c0
incl %edx
movq %rdx, 0x8(%rsp)
movl $0x1, %ebx
jmp 0x25c0
leaq 0xaca(%rip), %rdi       # 0x32ec
callq 0x1160
movq 0x20(%rsp), %rdi
callq 0x10c0
movslq 0x28f4(%rip), %rbx      # 0x512c
testq %rbx, %rbx
jle 0x2856
leaq (,%rbx,4), %rdx
leaq 0x2ab4(%rip), %rdi      # 0x5300
movl $0xff, %esi
callq 0x1070
leaq 0x29b3(%rip), %rax      # 0x5210
movl (%rax,%rbx,4), %ebx
movl %ebx, 0x28de(%rip)      # 0x5144
movl %ebx, 0x28dc(%rip)      # 0x5148
testl %ebx, %ebx
movq 0x18(%rsp), %r13
jle 0x2893
movq 0x2b0c(%rip), %rax      # 0x5388
xorl %edi, %edi
cmpl $0xff, (%rax,%rdi,4)
jg 0x2c7e
incq %rdi
cmpq %rdi, %rbx
jne 0x287e
movl %ebx, %r14d
movslq %r14d, %rdi
callq 0x1120
movq %rax, 0x2aeb(%rip)      # 0x5390
subl %r14d, %ebx
leal (%rbx,%rbx), %eax
movslq %eax, %rdi
callq 0x1120
movq %rax, 0x2ab6(%rip)      # 0x5370
testl %r14d, %r14d
jle 0x28ed
xorl %eax, %eax
movq 0x2ac0(%rip), %rcx      # 0x5388
movb (%rcx,%rax,4), %cl
movq 0x2abe(%rip), %rdx      # 0x5390
movb %cl, (%rdx,%rax)
incq %rax
movslq 0x2865(%rip), %r14      # 0x5144
cmpq %r14, %rax
jl 0x28c1
movl 0x285e(%rip), %ebx      # 0x5148
subl %r14d, %ebx
testl %ebx, %ebx
jle 0x291a
movq 0x2a78(%rip), %rax      # 0x5370
movslq %r14d, %rcx
movl %ebx, %edx
shlq $0x2, %rcx
addq 0x2a80(%rip), %rcx      # 0x5388
xorl %esi, %esi
movzwl (%rcx,%rsi,4), %edi
movw %di, (%rax,%rsi,2)
incq %rsi
cmpq %rsi, %rdx
jne 0x290a
movslq 0x280b(%rip), %rax      # 0x512c
leaq 0x28e8(%rip), %rcx      # 0x5210
movslq (%rcx,%rax,4), %rbp
leal 0x4(,%rbp,4), %eax
movslq %eax, %rdi
callq 0x1120
movq %rax, %r12
movslq 0x2817(%rip), %rdi      # 0x515c
callq 0x1120
movq %rax, 0x2a47(%rip)      # 0x5398
movslq 0x2808(%rip), %rdi      # 0x5160
callq 0x1120
movq %rax, 0x2a3c(%rip)      # 0x53a0
testq %rbp, %rbp
jle 0x2a02
xorl %r15d, %r15d
movq 0x10(%rsp), %r14
movl 0x2831(%rip), %eax      # 0x51ac
movl %eax, (%r12,%r15,4)
movl %r15d, %edi
movq %r14, %rsi
movq %r13, %rdx
callq 0x179b
movslq (%r13,%r15,4), %rdx
movl 0x4(%r13,%r15,4), %ecx
subl %edx, %ecx
cmpl $0x2, %ecx
jl 0x29c6
addl $-0x2, %ecx
leaq (%r14,%rdx,4), %rdx
incq %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
jne 0x29a8
movq %r15, %rbx
incq %rbx
movq 0x29c5(%rip), %rsi      # 0x5398
movl %eax, %edi
callq 0x1429
movq 0x29b7(%rip), %rcx      # 0x5398
movl %r15d, %edi
movq %r14, %rsi
movq %r13, %rdx
callq 0x14aa
movq %rbx, %r15
cmpq %rbp, %rbx
jne 0x2975
movq 0x299e(%rip), %rax      # 0x53a0
leal 0x1(%rbp), %ecx
movq %rcx, 0x8(%rsp)
movl 0x279c(%rip), %ecx      # 0x51ac
movl %ecx, (%r12,%rbp,4)
movl %ecx, 0x2742(%rip)      # 0x515c
leal 0x7(%rcx), %r14d
testl %ecx, %ecx
cmovnsl %ecx, %r14d
sarl $0x3, %r14d
movq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x1690
movl 0x276f(%rip), %eax      # 0x51b0
movl %eax, 0x2719(%rip)      # 0x5160
leal 0x7(%rax), %ebx
testl %eax, %eax
cmovnsl %eax, %ebx
sarl $0x3, %ebx
movq %r15, %rdi
callq 0x10f0
testl %ebp, %ebp
js 0x2a75
movl 0x8(%rsp), %eax
xorl %ecx, %ecx
movl (%r12,%rcx,4), %edx
movl %edx, (%r13,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x2a64
addl %r14d, %ebx
movq %r12, %rdi
callq 0x10f0
cmpl $0x0, 0x26a5(%rip)      # 0x512c
jle 0x2abd
leaq 0x2870(%rip), %r15      # 0x5300
leaq 0x63f(%rip), %r14       # 0x30d6
xorl %r12d, %r12d
movl (%r15), %edx
movq %r14, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x1030
incq %r12
movslq 0x2678(%rip), %rax      # 0x512c
addq $0x4, %r15
cmpq %rax, %r12
jl 0x2a9a
movl 0x26ec(%rip), %r15d     # 0x51b0
movl %r15d, %eax
cltd
idivl 0x2662(%rip)            # 0x5130
movl %eax, %r14d
leal 0x1(%r14), %eax
movl %eax, 0x2671(%rip)      # 0x514c
movl %r15d, %eax
cltd
idivl 0x264f(%rip)            # 0x5134
movl %eax, %r12d
leal 0x2(%r12), %eax
movl %eax, 0x265d(%rip)      # 0x5150
leal 0x4(,%r14,4), %eax
movslq %eax, %rdi
callq 0x1120
movq %rax, %r13
movq %rax, 0x2873(%rip)      # 0x5380
leal 0x4(,%r12,2), %eax
movslq %eax, %rdi
callq 0x1120
movq %rax, 0x2844(%rip)      # 0x5368
movq 0x2875(%rip), %rdi      # 0x53a0
movq %r13, %rsi
movq %rax, %rdx
movl %r14d, %ecx
movl %r15d, %r8d
callq 0x1dcf
addl %eax, %ebx
movslq 0x25e7(%rip), %rax      # 0x512c
leaq 0x26c4(%rip), %rcx      # 0x5210
movl (%rcx,%rax,4), %eax
addl 0x25eb(%rip), %eax      # 0x5140
leal (%rbx,%rax,4), %r13d
movq 0x8(%rsp), %r15
leal (%r15,%r15), %eax
leal (%rax,%rax,2), %eax
movslq %eax, %rdi
callq 0x1120
movq %rax, 0x2834(%rip)      # 0x53a8
movq 0x18(%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, 0x2814(%rip)      # 0x53b0
leaq 0x53b(%rip), %rdi       # 0x30de
movl %r14d, %esi
xorl %eax, %eax
callq 0x1030
movq 0x27f4(%rip), %r8       # 0x53a8
movq 0x27f5(%rip), %r9       # 0x53b0
movq %rbx, %rdi
xorl %esi, %esi
movl %r15d, %edx
movl $0x6, %ecx
callq 0x157c
movl %eax, %ebx
movl 0x25db(%rip), %ebp      # 0x51b0
movl %ebp, %eax
cltd
idivl 0x2552(%rip)            # 0x5130
movl %eax, %r14d
leal 0x1(%r14), %eax
movl %eax, 0x2569(%rip)      # 0x5154
movl %ebp, %eax
cltd
idivl 0x2540(%rip)            # 0x5134
movl %eax, %r15d
leal 0x1(%r15), %eax
movl %eax, 0x2557(%rip)      # 0x5158
leal 0x4(,%r14,4), %eax
movslq %eax, %rdi
callq 0x1120
movq %rax, %r12
movq %rax, 0x275d(%rip)      # 0x5378
leal 0x2(,%r15,2), %eax
movslq %eax, %rdi
callq 0x1120
movq %rax, 0x272e(%rip)      # 0x5360
movq 0x2777(%rip), %rdi      # 0x53b0
movq %r12, %rsi
movq %rax, %rdx
movl %r14d, %ecx
movl %ebp, %r8d
callq 0x1dcf
addl %eax, %ebx
addl %r13d, %ebx
movl 0x2507(%rip), %edx      # 0x515c
movl 0x2505(%rip), %ecx      # 0x5160
leaq 0x484(%rip), %rdi       # 0x30e6
movl %ebx, %esi
xorl %eax, %eax
callq 0x1030
callq 0x2130
leaq 0x65e(%rip), %rdi       # 0x32d5
callq 0x1160
jmp 0x2caf
movl %edi, 0x24c0(%rip)      # 0x5144
cmpl %edi, %ebx
jle 0x2cc0
movq 0x26f9(%rip), %rcx      # 0x5388
movq %rdi, %rax
cmpl $0x10000, (%rcx,%rax,4) # imm = 0x10000
jge 0x2cc8
incq %rax
cmpl %eax, %ebx
jne 0x2c92
movl %edi, %r14d
jmp 0x2899
callq 0x2363
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %edi, %r14d
jmp 0x2896
movl %eax, 0x247a(%rip)      # 0x5148
movl %edi, %r14d
movl %eax, %ebx
jmp 0x2899