// File: /workspace/github_cpp_makefile_star2_O1/yueww[P]TSR/test.c
// Function: main
int main(int argc,char *argv[]){
    if(argc<3){
        printf("not enough arguments!\n");
        exit(0);
    }
    if(argc==4){
        if(strcmp(argv[3],"-t")==0){
            printf("please input host:");
            scanf("%s",host);
            printf("please input user:");
            scanf("%s",user);
            printf("please input password:");
            scanf("%s",password);
            printf("please input database:");
            scanf("%s",database);
            printf("please input port:");
            scanf("%u",&port);
            fflush(stdin);
            mysql_init(&mysql);
            if(!mysql_real_connect(&mysql,host,user,password,database,port,NULL,0)){
                printf("mysql_real_connect failed!\n");
                return 0;
            }
            useDb=true;
        }else{
            printf("unknown option:%s\n",argv[3]);
            return 0;
        }
    }
    if(argc>4){
        printf("too much arguments!\n");
        return 0;
    }
    /*
    set a share memory,use it to check whether export process is running. 
    */
    if((shmid=shmget(IPC_PRIVATE,SHM_SIZE,IPC_CREAT|0666))==-1){
        printf("shmget error!\n");
        exit(0);
    }
    if((shmptr=shmat(shmid,(const void *)0,0))==(void *)-1){
        printf("shmat error!\n");
        exit(0);
    }
    *(int *)shmptr=0;
    /*
    initiate correlative data structure. 
    */
    unusedChainHead=&flowNodeBuf[0];
    unusedChainTail=&flowNodeBuf[LINKNODEBUFSIZE-1];
    int i;
    for(i=0;i<LINKNODEBUFSIZE-1;i++){
        flowNodeBuf[i].next=&flowNodeBuf[i+1];
    }
    flowNodeBuf[i].next=NULL;
    srcIpRootNode=&srcIpInnerNodeBuf[0];
    currUsedSrcIpInnerNodes++;
    dstIpRootNode=&dstIpInnerNodeBuf[0];
    currUsedDstIpInnerNodes++;
    for(i=0;i<FLOWAMOUNTINMEM;i++){
        srcIpIndexNodeBuf[i].indexNum=i;
        srcPortIndexNodeBuf[i].indexNum=i;
        dstIpIndexNodeBuf[i].indexNum=i;
        dstPortIndexNodeBuf[i].indexNum=i;
    }
    genAllParas(VECTORDIM,W);
    pthread_t proc;
    int createRes=pthread_create(&proc,0,processFunc,0);
    if(createRes!=0){
        printf("fail to create storage process,exit system!\n");
        exit(0);
    }
    char *command=processCommand(argv[1],argv[2]);
    if(!command){
        exit(0);
    }
    int exeRes=system(command);
    free(command);
    if(exeRes==127){
        printf("fail to launch probe because of exec error!\n");
        exit(0);
    }else if(exeRes==-1){
        printf("fail to launch probe because of fork error!\n");
        exit(0);
    }else{
        char flag;
        while(1){
            printf("input q to stop emitting flows!\n");
            scanf("%c",&flag);
            if(flag=='q'){
                int res=system("ps aux | grep fprobe | grep -v grep | cut -c 9-15 | xargs kill -9");
                while(res==-1||res==127){
                    res=system("ps aux | grep fprobe | grep -v grep | cut -c 9-15 | xargs kill -9");
                }
                break;
            }else{
                continue;
            }
        }
        printf("emit process terminated!\n");
        sleep(1);
        while(*(int *)shmptr){
            
        }
        int canRes=pthread_cancel(pro);
        if(canRes!=0){
            printf("fail to cancel process which receive flows!\n");
        }
        threadpool_destroy(pThreadPool);
        canRes=pthread_cancel(con);
        if(canRes!=0){
            printf("fail to cancel process which index flows!\n");
        }
        /*
         resort left flowRecord in cache(flowBlock).left flowRecords are fewer than 40, so
         we can not resort them by call resort().
        */
        int k;
        tuple4vec vec;
        int key;
        for(k=0;k<n;k++){
            extractTuple4(&vec,flowBlock[out+k]);
            key=myHash(vec);
            insertFlowsToBucket(flowBlock[out+k],key);
        }
        /*
        flush the hashTable which is used in resort,because the left flowRecord can not satisfy the 
        old rule,they can not be exported automatically.
        */
        int i;
        flowRecordNode *pF;
        for(i=0;i<TABLESIZE;i++){
            if(hashTable[i].currNum>0){
                pF=&hashTable[i].head;
                int j;
                for(j=0;j<hashTable[i].currNum;j++){
                    pF=pF->next;
                    memcpy(&flowWaitExport[inBase++],&(pF->rec),FLOWSIZE);
                }
            }
        }
        /*
        index();
        int *exportRes=exportDataAndIndex();
        FILE *fp=fopen("./exportRecord.log","a+");
        */
        FILE *fp=fopen("./exportRecord.log","a+");
        while(outBase<inBase){
            int exportFlag=index();
            if(exportFlag){
                int *exportRes=exportDataAndIndex();
                int writeRes[6];
                writeRes[0]=fprintf(fp,"export %d flows.\n",exportRes[0]/48);
                writeRes[1]=fprintf(fp,"data take up %d bytes\n",exportRes[0]);
                writeRes[2]=fprintf(fp,"srcIp take up %d bytes\n",exportRes[1]);
                writeRes[3]=fprintf(fp,"dstIp take up %d bytes\n",exportRes[2]);
                writeRes[4]=fprintf(fp,"srcPort take up %d bytes\n",exportRes[3]);
                writeRes[5]=fprintf(fp,"dstPort take up %d bytes\n",exportRes[4]);
                if(writeRes[0]<0 || writeRes[1]<0 || writeRes[2]<0 || writeRes[3]<0 ||writeRes[4]<0 ||writeRes[5]<0){
                    printf("error in write log!\n");
                } 
                free(exportRes);
                memcpy(flowWaitExport,flowWaitExport+outBase,(inBase-outBase)*FLOWSIZE);
                int i;
                for(i=0;i<outBase;i++){
                    srcIpIndexNodeBuf[i].next=NULL;
                    dstIpIndexNodeBuf[i].next=NULL;
                    srcPortIndexNodeBuf[i].next=NULL;
                    dstPortIndexNodeBuf[i].next=NULL;
                }
                memset(srcIpInnerNodeBuf,0,sizeof(innerNode)*currUsedSrcIpInnerNodes);
                memset(dstIpInnerNodeBuf,0,sizeof(innerNode)*currUsedDstIpInnerNodes);
                memset(srcIpLeafNodeBuf,0,sizeof(leafNode)*currUsedSrcIpLeafNodes);
                memset(dstIpLeafNodeBuf,0,sizeof(leafNode)*currUsedDstIpLeafNodes);
                memset(&srcPortIndexTable,0,sizeof(portIndexTable));
                memset(&dstPortIndexTable,0,sizeof(portIndexTable));
                srcIpRootNode=&srcIpInnerNodeBuf[0];
                dstIpRootNode=&dstIpInnerNodeBuf[0];
                inBase-=outBase;
                outBase=0;
                currUsedSrcIpInnerNodes=1;
                currUsedDstIpInnerNodes=1;
                currUsedSrcIpLeafNodes=0;
                currUsedDstIpLeafNodes=0;
                currUsedSrcIpIndexNodes=0;
                currUsedDstIpIndexNodes=0;
                currUsedSrcPortIndexNodes=0;
                currUsedDstPortIndexNodes=0;
            }
        }
        int *exportRes=exportDataAndIndex();
        int writeRes[6];
        writeRes[0]=fprintf(fp,"export %d flows.\n",exportRes[0]/48);
        writeRes[1]=fprintf(fp,"data take up %d bytes\n",exportRes[0]);
        writeRes[2]=fprintf(fp,"srcIp take up %d bytes\n",exportRes[1]);
        writeRes[3]=fprintf(fp,"dstIp take up %d bytes\n",exportRes[2]);
        writeRes[4]=fprintf(fp,"srcPort take up %d bytes\n",exportRes[3]);
        writeRes[5]=fprintf(fp,"dstPort take up %d bytes\n",exportRes[4]);
        if(writeRes[0]<0 || writeRes[1]<0 || writeRes[2]<0 || writeRes[3]<0 ||writeRes[4]<0 ||writeRes[5]<0){
            printf("error in write log!\n");
        } 
        free(exportRes);
    }
    mysql_close(&mysql);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
cmpl $0x2, %edi
jle 0x6036
movq %rsi, %r15
movl %edi, %ebx
cmpl $0x4, %edi
jne 0x5955
movq 0x18(%r15), %r14
leaq 0x1cec(%rip), %rsi      # 0x751b
movq %r14, %rdi
callq 0x23c0
testl %eax, %eax
je 0x5851
leaq 0x1d49(%rip), %rdi      # 0x758b
movq %r14, %rsi
xorl %eax, %eax
callq 0x2040
jmp 0x6019
leaq 0x1cc6(%rip), %rdi      # 0x751e
xorl %eax, %eax
callq 0x2040
leaq 0x1ccb(%rip), %r14      # 0x7531
leaq 0x6ab3a5e3(%rip), %rsi  # 0x6ab3fe50
movq %r14, %rdi
xorl %eax, %eax
callq 0x22f0
leaq 0x1cb6(%rip), %rdi      # 0x7534
xorl %eax, %eax
callq 0x2040
leaq 0x6ab3a6c4(%rip), %rsi  # 0x6ab3ff50
movq %r14, %rdi
xorl %eax, %eax
callq 0x22f0
leaq 0x1caa(%rip), %rdi      # 0x7547
xorl %eax, %eax
callq 0x2040
leaq 0x6ab3a725(%rip), %r13  # 0x6ab3ffd0
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x22f0
leaq 0x1c9f(%rip), %rdi      # 0x755e
xorl %eax, %eax
callq 0x2040
leaq 0x6ab3a783(%rip), %r12  # 0x6ab40050
movq %r14, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x22f0
leaq 0x1c94(%rip), %rdi      # 0x7575
xorl %eax, %eax
callq 0x2040
leaq 0x1c99(%rip), %rdi      # 0x7588
leaq 0x6ab3a7da(%rip), %rsi  # 0x6ab400d0
xorl %eax, %eax
callq 0x22f0
movq 0x46cc(%rip), %rax      # 0x9fd0
movq (%rax), %rdi
callq 0x2310
leaq 0x6ab3a7c5(%rip), %r14  # 0x6ab400d8
movq %r14, %rdi
callq 0x2110
movl 0x6ab3a7ae(%rip), %r9d  # 0x6ab400d0
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
leaq 0x6ab3a51d(%rip), %rsi  # 0x6ab3fe50
leaq 0x6ab3a616(%rip), %rdx  # 0x6ab3ff50
movq %r13, %rcx
movq %r12, %r8
callq 0x2140
testq %rax, %rax
je 0x602a
movb $0x1, 0x6ab3ac0b(%rip)  # 0x6ab40560
cmpl $0x5, %ebx
jl 0x596b
leaq 0x1e4d(%rip), %rdi      # 0x77ae
callq 0x2450
jmp 0x6019
movl $0x1000, %esi           # imm = 0x1000
xorl %edi, %edi
movl $0x3b6, %edx            # imm = 0x3B6
callq 0x2170
movl %eax, 0x6ab3abe2(%rip)  # 0x6ab40564
cmpl $-0x1, %eax
je 0x603f
movl %eax, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x23a0
movq %rax, 0x6ab3abcb(%rip)  # 0x6ab40568
cmpq $-0x1, %rax
je 0x6048
movl $0x0, (%rax)
leaq 0x12742ec(%rip), %rax   # 0x1279ca0
leaq 0xed342e5(%rip), %rcx   # 0xed39ca0
movq %rax, (%rcx)
leaq 0xdabffc8(%rax), %rcx
leaq 0xed342dc(%rip), %rdx   # 0xed39ca8
movq %rcx, (%rdx)
leaq 0x38(%rax), %rcx
movl $0x3e7fff, %edx         # imm = 0x3E7FFF
movq %rcx, -0x38(%rcx)
addq $0x38, %rcx
decq %rdx
jne 0x59d8
movq $0x0, 0xdabffc8(%rax)
leaq 0x51951ac9(%rip), %rax  # 0x519574c0
leaq 0x651d1ac2(%rip), %rcx  # 0x651d74c0
movq %rax, (%rcx)
leaq 0x653d1ae0(%rip), %rax  # 0x653d74e8
incl (%rax)
leaq 0x54061aaf(%rip), %rax  # 0x540674c0
leaq 0x653d1ad8(%rip), %rcx  # 0x653d74f0
incl (%rcx)
leaq 0x651d1aa7(%rip), %rcx  # 0x651d74c8
movq %rax, (%rcx)
xorl %eax, %eax
leaq 0x2b6f7a93(%rip), %rdx  # 0x2b6fd4c0
leaq 0x3e824a8c(%rip), %rsi  # 0x3e82a4c0
leaq 0x34f8e285(%rip), %rdi  # 0x34f93cc0
leaq 0x480bb27e(%rip), %r8   # 0x480c0cc0
xorl %ecx, %ecx
movl %ecx, (%rdx,%rax)
movl %ecx, (%rsi,%rax)
movl %ecx, (%rdi,%rax)
movl %ecx, (%r8,%rax)
incq %rcx
addq $0x10, %rax
cmpq $0x989680, %rcx         # imm = 0x989680
jne 0x5a44
movsd 0x1697(%rip), %xmm0     # 0x7100
movl $0xa, %edi
callq 0x312e
leaq 0x5fc(%rip), %rdx       # 0x6076
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x24e0
testl %eax, %eax
jne 0x6051
movq 0x8(%r15), %rdi
movq 0x10(%r15), %rsi
callq 0x6115
testq %rax, %rax
je 0x606f
movq %rax, %rbx
movq %rax, %rdi
callq 0x2250
movl %eax, %r14d
movq %rbx, %rdi
callq 0x2330
cmpl $-0x1, %r14d
je 0x605a
cmpl $0x7f, %r14d
je 0x6063
leaq 0x1baa(%rip), %rbx      # 0x7680
leaq 0x1ac1(%rip), %r14      # 0x759e
leaq -0x29(%rbp), %r15
movq %rbx, %rdi
callq 0x2450
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x22f0
cmpb $0x71, -0x29(%rbp)
jne 0x5ae1
leaq 0x1a9e(%rip), %rbx      # 0x75a1
movq %rbx, %rdi
callq 0x2250
cmpl $-0x1, %eax
je 0x5b03
cmpl $0x7f, %eax
je 0x5b03
leaq 0x1b84(%rip), %rdi      # 0x76a0
callq 0x2450
movl $0x1, %edi
callq 0x21d0
movq 0x6ab3aa3e(%rip), %rdi  # 0x6ab40570
callq 0x23b0
testl %eax, %eax
je 0x5b47
leaq 0x1b77(%rip), %rdi      # 0x76b9
callq 0x2450
leaq 0x476a(%rip), %rax      # 0xa2b8
movq (%rax), %rdi
callq 0x2a4b
movq 0x6ab3aa1b(%rip), %rdi  # 0x6ab40578
callq 0x23b0
testl %eax, %eax
je 0x5b72
leaq 0x1b78(%rip), %rdi      # 0x76e5
callq 0x2450
leaq 0x473b(%rip), %r14      # 0xa2b4
cmpl $0x0, (%r14)
jle 0x5c25
xorl %r15d, %r15d
leaq 0x6ab0b483(%rip), %r12  # 0x6ab11010
leaq 0x147cc(%rip), %r13     # 0x1a360
leaq -0x58(%rbp), %rbx
movl (%r12), %eax
addl %r15d, %eax
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
movups (%r13,%rax), %xmm0
movups 0x10(%r13,%rax), %xmm1
movups 0x20(%r13,%rax), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x397f
movl -0x48(%rbp), %eax
movl %eax, 0x10(%rsp)
movups -0x58(%rbp), %xmm0
movups %xmm0, (%rsp)
callq 0x31d4
movl (%r12), %ecx
addl %r15d, %ecx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movups (%r13,%rcx), %xmm0
movups 0x10(%r13,%rcx), %xmm1
movups 0x20(%r13,%rcx), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movl %eax, %edi
callq 0x39c9
incl %r15d
cmpl (%r14), %r15d
jl 0x5b98
leaq 0x653d18a4(%rip), %rbx  # 0x653d74d0
movl (%rbx), %eax
xorl %ecx, %ecx
leaq 0x1264069(%rip), %rdx   # 0x1269ca0
movq %rcx, %rsi
shlq $0x6, %rsi
movl (%rdx,%rsi), %edi
testl %edi, %edi
jle 0x5c91
addq %rdx, %rsi
addq $0x8, %rsi
movslq %eax, %r8
leaq (%r8,%r8,2), %r8
shlq $0x4, %r8
addq 0x4382(%rip), %r8       # 0x9fe0
negl %edi
xorl %r9d, %r9d
movq (%rsi), %rsi
movups 0x8(%rsi), %xmm0
movups 0x18(%rsi), %xmm1
movups 0x28(%rsi), %xmm2
movups %xmm2, 0x20(%r8)
movups %xmm1, 0x10(%r8)
movups %xmm0, (%r8)
addq $0x30, %r8
decl %r9d
cmpl %r9d, %edi
jne 0x5c63
subl %r9d, %eax
movl %eax, (%rbx)
incq %rcx
cmpq $0x400, %rcx            # imm = 0x400
jne 0x5c37
leaq 0x178f(%rip), %rdi      # 0x7433
leaq 0x179b(%rip), %rsi      # 0x7446
callq 0x2320
movq %rax, -0x40(%rbp)
leaq 0x653d1819(%rip), %rax  # 0x653d74d4
movl (%rax), %eax
cmpl (%rbx), %eax
jge 0x5f40
xorl %r13d, %r13d
callq 0x3b54
testb %al, %al
je 0x5f2f
callq 0x4794
movq %rax, %rbx
movslq (%rax), %rax
imulq $0x2aaaaaab, %rax, %rdx # imm = 0x2AAAAAAB
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x23, %rdx
addl %eax, %edx
movq -0x40(%rbp), %r12
movq %r12, %rdi
leaq 0x1747(%rip), %rsi      # 0x7449
xorl %eax, %eax
callq 0x23d0
movl %eax, -0x34(%rbp)
movl (%rbx), %edx
movq %r12, %rdi
leaq 0x1743(%rip), %rsi      # 0x745b
xorl %eax, %eax
callq 0x23d0
movl %eax, -0x30(%rbp)
movl 0x4(%rbx), %edx
movq %r12, %rdi
leaq 0x1743(%rip), %rsi      # 0x7472
xorl %eax, %eax
callq 0x23d0
movl %eax, %r15d
movl 0x8(%rbx), %edx
movq %r12, %rdi
leaq 0x1744(%rip), %rsi      # 0x748a
xorl %eax, %eax
callq 0x23d0
movl %eax, -0x38(%rbp)
movl 0xc(%rbx), %edx
movq %r12, %rdi
leaq 0x1745(%rip), %rsi      # 0x74a2
xorl %eax, %eax
callq 0x23d0
movl %eax, %r14d
movl 0x10(%rbx), %edx
movq %r12, %rdi
leaq 0x1748(%rip), %rsi      # 0x74bc
xorl %eax, %eax
callq 0x23d0
orl -0x30(%rbp), %r15d
orl -0x38(%rbp), %r15d
orl %r14d, %r15d
orl -0x34(%rbp), %r15d
orl %eax, %r15d
jns 0x5d9b
leaq 0x1740(%rip), %rdi      # 0x74d6
callq 0x2450
movq %rbx, %rdi
callq 0x2330
leaq 0x653d172a(%rip), %rax  # 0x653d74d4
movslq (%rax), %r14
leaq (%r14,%r14,2), %rsi
shlq $0x4, %rsi
leaq 0xed33f04(%rip), %rdi   # 0xed39cc0
addq %rdi, %rsi
leaq 0x653d170a(%rip), %rax  # 0x653d74d0
movslq (%rax), %rbx
subq %r14, %rbx
movq %rbx, %rax
shlq $0x4, %rax
leaq (%rax,%rax,2), %rdx
callq 0x2240
testq %r14, %r14
leaq 0x2b6f76da(%rip), %rcx  # 0x2b6fd4c0
leaq 0x3e8246d3(%rip), %rdx  # 0x3e82a4c0
leaq 0x34f8decc(%rip), %rsi  # 0x34f93cc0
leaq 0x480baec5(%rip), %rdi  # 0x480c0cc0
jle 0x5e20
shlq $0x4, %r14
xorl %eax, %eax
movq %r13, 0x8(%rcx,%rax)
movq %r13, 0x8(%rsi,%rax)
movq %r13, 0x8(%rdx,%rax)
movq %r13, 0x8(%rdi,%rax)
addq $0x10, %rax
cmpq %rax, %r14
jne 0x5e03
leaq 0x653d16c1(%rip), %r15  # 0x653d74e8
movslq (%r15), %rdx
shlq $0xb, %rdx
leaq 0x5195168b(%rip), %rdi  # 0x519574c0
xorl %esi, %esi
callq 0x2160
leaq 0x653d16ad(%rip), %r15  # 0x653d74f0
movslq (%r15), %rdx
shlq $0xb, %rdx
leaq 0x5406166f(%rip), %r12  # 0x540674c0
movq %r12, %rdi
xorl %esi, %esi
callq 0x2160
leaq 0x653d168a(%rip), %r14  # 0x653d74ec
movslq (%r14), %rdx
shlq $0xc, %rdx
leaq 0x56771650(%rip), %rdi  # 0x567774c0
xorl %esi, %esi
callq 0x2160
leaq 0x653d1676(%rip), %r15  # 0x653d74f4
movslq (%r15), %rdx
shlq $0xc, %rdx
leaq 0x5dca1634(%rip), %rdi  # 0x5dca74c0
xorl %esi, %esi
callq 0x2160
movl $0x100000, %edx         # imm = 0x100000
leaq 0x651d1631(%rip), %rdi  # 0x651d74d0
xorl %esi, %esi
callq 0x2160
movl $0x100000, %edx         # imm = 0x100000
leaq 0x652d161e(%rip), %rdi  # 0x652d74d0
xorl %esi, %esi
callq 0x2160
leaq 0x653d1610(%rip), %rax  # 0x653d74d0
movl %ebx, (%rax)
movq %rax, %rbx
leaq 0x651d15f4(%rip), %rax  # 0x651d74c0
leaq 0x519515ed(%rip), %rcx  # 0x519574c0
movq %rcx, (%rax)
leaq 0x651d15eb(%rip), %rax  # 0x651d74c8
movq %r12, (%rax)
leaq 0x653d15ed(%rip), %rax  # 0x653d74d4
movl %r13d, (%rax)
movl $0x1, %eax
leaq 0x653d15f2(%rip), %rcx  # 0x653d74e8
movl %eax, (%rcx)
leaq 0x653d15f1(%rip), %rcx  # 0x653d74f0
movl %eax, (%rcx)
movl %r13d, (%r14)
movl %r13d, (%r15)
leaq 0x653d15ca(%rip), %rax  # 0x653d74d8
movl %r13d, (%rax)
leaq 0x653d15c4(%rip), %rax  # 0x653d74dc
movl %r13d, (%rax)
leaq 0x653d15be(%rip), %rax  # 0x653d74e0
movl %r13d, (%rax)
leaq 0x653d15b8(%rip), %rax  # 0x653d74e4
movl %r13d, (%rax)
leaq 0x653d159e(%rip), %rax  # 0x653d74d4
movl (%rax), %eax
cmpl (%rbx), %eax
jl 0x5cc8
callq 0x4794
movq %rax, %rbx
movslq (%rax), %rax
imulq $0x2aaaaaab, %rax, %rdx # imm = 0x2AAAAAAB
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x23, %rdx
addl %eax, %edx
leaq 0x14e3(%rip), %rsi      # 0x7449
movq -0x40(%rbp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x23d0
movl %eax, -0x34(%rbp)
movl (%rbx), %edx
leaq 0x14db(%rip), %rsi      # 0x745b
movq %r15, %rdi
xorl %eax, %eax
callq 0x23d0
movl %eax, -0x30(%rbp)
movl 0x4(%rbx), %edx
leaq 0x14db(%rip), %rsi      # 0x7472
movq %r15, %rdi
xorl %eax, %eax
callq 0x23d0
movl %eax, %r13d
movl 0x8(%rbx), %edx
leaq 0x14dc(%rip), %rsi      # 0x748a
movq %r15, %rdi
xorl %eax, %eax
callq 0x23d0
movl %eax, %r12d
movl 0xc(%rbx), %edx
leaq 0x14dd(%rip), %rsi      # 0x74a2
movq %r15, %rdi
xorl %eax, %eax
callq 0x23d0
movl %eax, %r14d
movl 0x10(%rbx), %edx
leaq 0x14e0(%rip), %rsi      # 0x74bc
movq %r15, %rdi
xorl %eax, %eax
callq 0x23d0
orl -0x30(%rbp), %r13d
orl %r12d, %r13d
orl %r14d, %r13d
orl -0x34(%rbp), %r13d
orl %eax, %r13d
jns 0x6005
leaq 0x14d6(%rip), %rdi      # 0x74d6
callq 0x2450
movq %rbx, %rdi
callq 0x2330
leaq 0x6ab3a0c4(%rip), %rdi  # 0x6ab400d8
callq 0x2370
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1634(%rip), %rdi      # 0x7665
jmp 0x5961
leaq 0x1785(%rip), %rdi      # 0x77c2
jmp 0x606a
leaq 0x175a(%rip), %rdi      # 0x77a0
jmp 0x606a
leaq 0x1744(%rip), %rdi      # 0x7793
jmp 0x606a
leaq 0x170f(%rip), %rdi      # 0x7767
jmp 0x606a
leaq 0x16ae(%rip), %rdi      # 0x770f
jmp 0x606a
leaq 0x16d1(%rip), %rdi      # 0x773b
callq 0x2450
xorl %edi, %edi
callq 0x2350