LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/yyThreadPool.c
// Function: threadpool_add_task
int threadpool_add_task(threadpool_t *pThreadPool,void* (*func)(void *),void *args){
#ifdef LIMITTASK
    pthread_mutex_lock(&(pThreadPool->tmutex));
    while((pThreadPool->num_running_threads==pThreadPool->num_alive_threads)&&(pThreadPool->num_alive_threads!=0)) pthread_cond_wait(&(pThreadPool->has_idle),&(pThreadPool->tmutex));
    pthread_mutex_unlock(&(pThreadPool->tmutex));
#endif
    task *t=(task *)malloc(sizeof(task));
    if(t==NULL) return -1;
    t->func=func;
    t->args=args;
    t->next=NULL;
    pthread_mutex_lock(&((pThreadPool->tasks).qmutex));
    while((pThreadPool->tasks).qlen==(pThreadPool->tasks).max_len){
        pthread_cond_wait(&((pThreadPool->tasks).not_full),&((pThreadPool->tasks).qmutex));
    }
    if((pThreadPool->tasks).qlen==0){
        (pThreadPool->tasks).front=(pThreadPool->tasks).rear=t;
    }else{
        ((pThreadPool->tasks).rear)->next=t;
        (pThreadPool->tasks).rear=((pThreadPool->tasks).rear)->next;
    }
    (pThreadPool->tasks).qlen++;
    bsem_post((pThreadPool->tasks).has_tasks);
    pthread_mutex_unlock(&((pThreadPool->tasks).qmutex));
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
pushq $0x18
popq %rdi
callq 0x2370
testq %rax, %rax
je 0x2983
movq %rax, %r15
movq %r12, (%rax)
movq %r14, 0x8(%rax)
andq $0x0, 0x10(%rax)
leaq 0x10(%rbx), %r14
movq %r14, %rdi
callq 0x23f0
leaq 0x38(%rbx), %r12
movl 0x6c(%rbx), %eax
cmpl 0x68(%rbx), %eax
jne 0x2972
movq %r12, %rdi
movq %r14, %rsi
callq 0x2430
jmp 0x295d
leaq 0x8(%rbx), %rcx
testl %eax, %eax
je 0x2988
movq (%rcx), %rdx
addq $0x10, %rdx
jmp 0x298e
pushq $-0x1
popq %rax
jmp 0x29ac
movq %rcx, %rdx
movq %rbx, %rcx
movq %r15, (%rdx)
movq %r15, (%rcx)
incl %eax
movl %eax, 0x6c(%rbx)
movq 0x70(%rbx), %rdi
callq 0x28f1
movq %r14, %rdi
callq 0x21f0
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/yyThreadPool.c
// Function: threadpool_destroy
void threadpool_destroy(threadpool_t *pThreadPool){
    keepAlive=0;
    while(pThreadPool->num_alive_threads!=0){
        bsem_post((pThreadPool->tasks).has_tasks);
        sleep(0.1);
    }
    task *t=(pThreadPool->tasks).front;
    while(t!=NULL){
        task *tmp=t;
        t=t->next;
        free(tmp);
    }
    free((pThreadPool->tasks).has_tasks);
    free(pThreadPool->work_threads);
    free(pThreadPool);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x0, 0x68cb(%rip)      # 0x9294
cmpl $0x0, 0x80(%rbx)
je 0x29e4
movq 0x70(%rbx), %rdi
callq 0x28f1
xorl %edi, %edi
callq 0x21e0
jmp 0x29c9
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x29fa
movq 0x10(%rdi), %r14
callq 0x2340
movq %r14, %rdi
jmp 0x29e7
movq 0x70(%rbx), %rdi
callq 0x2340
movq 0x78(%rbx), %rdi
callq 0x2340
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2340
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/produceFlows.c
// Function: cleanup(void*)
void cleanup(void *arg){
    threadpool_t *pThreadPool=(threadpool_t *)arg;
    if((pThreadPool->tasks).qmutex.__data.__owner==syscall(SYS_gettid)){
        pthread_mutex_unlock(&((pThreadPool->tasks).qmutex));
    }
    if((((pThreadPool->tasks).has_tasks)->mut).__data.__owner==syscall(SYS_gettid)){
        pthread_mutex_unlock(&(((pThreadPool->tasks).has_tasks)->mut));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq 0x18(%rdi), %r14
movl $0xba, %edi
xorl %eax, %eax
callq 0x2050
cmpq %r14, %rax
jne 0x2a4c
leaq 0x10(%rbx), %rdi
callq 0x21f0
movq 0x70(%rbx), %rax
movslq 0x8(%rax), %r14
movl $0xba, %edi
xorl %eax, %eax
callq 0x2050
cmpq %r14, %rax
jne 0x2a72
movq 0x70(%rbx), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x21f0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/produceFlows.c
// Function: receiveData(void*)
void *receiveData(void *argv){
    pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS,NULL);
    pThreadPool=threadpool_init(4,rDataCacheSize);
    pthread_cleanup_push(cleanup,(void *)pThreadPool);
    int sockfd;
    struct sockaddr_in servaddr;
    sockfd=socket(AF_INET,SOCK_DGRAM,0);
    memset(&servaddr,0,sizeof(servaddr));
    servaddr.sin_family=AF_INET;
    servaddr.sin_addr.s_addr=htonl(INADDR_ANY);
    servaddr.sin_port=htons(555);
    int res=bind(sockfd,(struct sockaddr *)&servaddr,sizeof(servaddr));
    if(res==-1){
        printf("bind failed!\n");
        pthread_exit(0);
    }
    long long  count=0;
    pthread_t tid;
    while(1){
        rDataCache[count%rDataCacheSize].length=recvfrom(sockfd,rDataCache[count%rDataCacheSize].buf,BUFSIZE,0,0,0);
        //pthread_create(&tid,0,produce,(void *)&rDataCache[count%rDataCacheSize]);
        threadpool_add_task(pThreadPool,produce,(void *)&rDataCache[count%rDataCacheSize]);
        count++;
    }
    pthread_cleanup_pop(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
pushq $0x1
popq %rdi
xorl %esi, %esi
callq 0x20c0
pushq $0x4
popq %rdi
pushq $0x10
popq %r14
movl %r14d, %esi
callq 0x267c
movq %rax, 0x6800(%rip)      # 0x92a8
leaq -0x8b(%rip), %rcx       # 0x2a24
movq %rcx, -0x40(%rbp)
movq %rax, -0x38(%rbp)
movl $0x1, -0x30(%rbp)
pushq $0x2
popq %rdi
movl %edi, %esi
xorl %edx, %edx
callq 0x2090
movl %eax, %ebx
leaq -0x50(%rbp), %rsi
andq $0x0, 0x8(%rsi)
movq $0x2b020002, (%rsi)     # imm = 0x2B020002
movl %eax, %edi
movl %r14d, %edx
callq 0x2060
cmpl $-0x1, %eax
jne 0x2afe
leaq 0x3579(%rip), %rdi      # 0x606b
callq 0x2450
xorl %edi, %edi
callq 0x24b0
xorl %r12d, %r12d
leaq 0x6808(%rip), %r13      # 0x9310
leaq 0x5c(%rip), %r14        # 0x2b6b
movl %r12d, %eax
andl $0xf, %eax
imulq $0x1004, %rax, %r15     # imm = 0x1004
leaq (%r15,%r13), %rsi
addq $0x4, %rsi
movl $0x1000, %edx           # imm = 0x1000
movl %ebx, %edi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2200
addq %r13, %r15
movl %eax, (%r15)
movq 0x6763(%rip), %rdi      # 0x92a8
movq %r14, %rsi
movq %r15, %rdx
callq 0x291d
incq %r12
jmp 0x2b0f
jmp 0x2b57
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x2e40
movq %rbx, %rdi
callq 0x24a0
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/produceFlows.c
// Function: produce(void*)
void* produce(void *argv){
    pthread_detach(pthread_self());
    rawData *pRawData=(rawData *)argv;
    int newFlows=(pRawData->length-PKTHEADERSIZE)/FLOWSIZE;
    pthread_mutex_lock(&mutex);
    while(n+newFlows>BLOCKSIZE) pthread_cond_wait(&cond_p,&mutex);
    if(in==BLOCKSIZE) in=0;
    if((in+newFlows)>BLOCKSIZE){
        memcpy(flowBlock+in,pRawData->buf+PKTHEADERSIZE,(BLOCKSIZE-in)*FLOWSIZE);
        memcpy(flowBlock,pRawData->buf+PKTHEADERSIZE+(BLOCKSIZE-in)*FLOWSIZE,(newFlows-(BLOCKSIZE-in))*FLOWSIZE);
        in=newFlows+in-BLOCKSIZE;
    }else{
        memcpy(flowBlock+in,pRawData->buf+PKTHEADERSIZE,newFlows*FLOWSIZE);
        in+=newFlows;
    }
    n+=newFlows;
    printf("add %d flows,current n is %d\n",newFlows,n);
    if(n>=FLOWSPERPROCESS) pthread_cond_signal(&cond_c);
    pthread_mutex_unlock(&mutex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x2280
movq %rax, %rdi
callq 0x21a0
movl (%r14), %eax
addl $-0x18, %eax
pushq $0x30
popq %rcx
xorl %edx, %edx
divl %ecx
movl %eax, %ebx
leaq 0x6711(%rip), %r12      # 0x92b0
movq %r12, %rdi
callq 0x23f0
leaq 0x672a(%rip), %r13      # 0x92d8
movl 0x66ef(%rip), %r15d     # 0x92a4
addl %ebx, %r15d
cmpl $0x61a81, %r15d         # imm = 0x61A81
jl 0x2bce
movq %r13, %rdi
movq %r12, %rsi
callq 0x2430
jmp 0x2bae
movl 0x66cc(%rip), %eax      # 0x92a0
cmpl $0x61a80, %eax          # imm = 0x61A80
jne 0x2be4
andl $0x0, 0x66be(%rip)      # 0x92a0
xorl %eax, %eax
leal (%rax,%rbx), %r13d
movl %eax, %ecx
imulq $0x30, %rcx, %rcx
leaq 0x1675b(%rip), %rdi     # 0x19350
addq %rcx, %rdi
addq $0x1c, %r14
cmpl $0x61a81, %r13d         # imm = 0x61A81
jb 0x2c42
movl $0x61a80, %r12d         # imm = 0x61A80
subl %eax, %r12d
imull $0x30, %r12d, %edx
movq %rdx, -0x30(%rbp)
movq %r14, %rsi
callq 0x2250
addq -0x30(%rbp), %r14
movl %ebx, %eax
subl %r12d, %eax
imull $0x30, %eax, %edx
leaq 0x1671f(%rip), %rdi     # 0x19350
movq %r14, %rsi
callq 0x2250
addl $0xfff9e580, %r13d      # imm = 0xFFF9E580
jmp 0x2c4d
imull $0x30, %ebx, %edx
movq %r14, %rsi
callq 0x2250
movl %r13d, 0x664c(%rip)     # 0x92a0
movl %r15d, 0x6649(%rip)     # 0x92a4
leaq 0x33e1(%rip), %rdi      # 0x6043
movl %ebx, %esi
movl %r15d, %edx
xorl %eax, %eax
callq 0x2040
cmpl $0xfa0, 0x662c(%rip)    # imm = 0xFA0
jl 0x2c86
leaq 0x6ab0d387(%rip), %rdi  # 0x6ab10008
callq 0x2030
leaq 0x6623(%rip), %rdi      # 0x92b0
callq 0x21f0
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/lsh.cpp
// Function: genAPara(int)
vector<double> genAPara(int dim){
    vector<double> aPara;
    int i;
    random_device rd;
    mt19937 gen(rd());
    normal_distribution<double> d(0,1);
    for(i=0;i<dim;i++){
        aPara.push_back(d(gen));
    }
    return aPara;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2738, %rsp           # imm = 0x2738
movl %esi, %r14d
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq -0x13d8(%rbp), %rdi
callq 0x30cc
leaq -0x13d8(%rbp), %rdi
callq 0x23a0
movl %eax, %esi
leaq -0x2760(%rbp), %rdi
callq 0x3166
leaq -0x50(%rbp), %r15
andq $0x0, (%r15)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x8(%r15)
andq $0x0, 0x10(%r15)
movb $0x0, 0x18(%r15)
xorl %r13d, %r13d
testl %r14d, %r14d
cmovgl %r14d, %r13d
leaq -0x2760(%rbp), %r14
leaq -0x30(%rbp), %r12
subl $0x1, %r13d
jb 0x2f0f
movq %r15, %rdi
movq %r14, %rsi
callq 0x3122
movsd %xmm0, -0x30(%rbp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x351c
jmp 0x2eec
leaq -0x13d8(%rbp), %rdi
callq 0x3130
movq %rbx, %rax
addq $0x2738, %rsp           # imm = 0x2738
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x2f46
jmp 0x2f37
movq %rax, %r14
leaq -0x13d8(%rbp), %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x3152
movq %r14, %rdi
callq 0x24a0
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/lsh.cpp
// Function: genBPara(double)
double genBPara(double w){
    random_device rd;
    mt19937 gen(rd());
    uniform_real_distribution<double> d(0,w);
    return d(gen);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x2728, %rsp           # imm = 0x2728
movsd %xmm0, -0x10(%rbp)
leaq -0x13a8(%rbp), %rbx
movq %rbx, %rdi
callq 0x30cc
movq %rbx, %rdi
callq 0x23a0
movl %eax, %esi
leaq -0x2730(%rbp), %rdi
callq 0x3166
leaq -0x20(%rbp), %rdi
andq $0x0, (%rdi)
movsd -0x10(%rbp), %xmm0
movsd %xmm0, 0x8(%rdi)
leaq -0x2730(%rbp), %rsi
callq 0x3144
movsd %xmm0, -0x10(%rbp)
leaq -0x13a8(%rbp), %rdi
callq 0x3130
movsd -0x10(%rbp), %xmm0
addq $0x2728, %rsp           # imm = 0x2728
popq %rbx
popq %rbp
retq
jmp 0x2fcc
movq %rax, %rbx
leaq -0x13a8(%rbp), %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x24a0
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/lsh.cpp
// Function: genAllParas(int, double)
void genAllParas(int dim,double w){
    int i;
    for(i=0;i<HASHFUNCNUM;i++){
        aVecParas[i]=genAPara(dim);
        bParas[i]=genBPara(w);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movsd %xmm0, -0x30(%rbp)
movl %edi, %ebx
leaq 0x1265b4e(%rip), %r14   # 0x1268b50
xorl %r12d, %r12d
leaq -0x48(%rbp), %r15
leaq 0x1265c30(%rip), %r13   # 0x1268c40
cmpq $0x50, %r12
je 0x304d
movq %r15, %rdi
movl %ebx, %esi
callq 0x2e6c
movq %r14, %rdi
movq %r15, %rsi
callq 0x36ca
movq %r15, %rdi
callq 0x3152
movsd -0x30(%rbp), %xmm0
callq 0x2f56
movsd %xmm0, (%r12,%r13)
addq $0x8, %r12
addq $0x18, %r14
jmp 0x3010
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/lsh.cpp
// Function: myHash(tuple4vec)
int myHash(tuple4vec tvec){
    int i,j;
    int index=0;
    double tmp;
    for(i=0;i<HASHFUNCNUM;i++){
        tmp=bParas[i];
        for(j=0;j<VECTORDIM;j++){
            tmp+=aVecParas[i][j]*tvec.vec[j];
        }
        index+=(int)(tmp/W);
    }
    index=index%TABLESIZE;
    if(index<0) return index+TABLESIZE;
    return index;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %ecx, %ecx
leaq 0x10(%rbp), %rdx
leaq 0x1265bd3(%rip), %rsi   # 0x1268c40
leaq 0x1265adc(%rip), %rdi   # 0x1268b50
movsd 0x305c(%rip), %xmm0     # 0x60d8
xorl %eax, %eax
cmpq $0xa, %rcx
je 0x30c4
movsd (%rsi,%rcx,8), %xmm1
imulq $0x18, %rcx, %r8
movq (%r8,%rdi), %r8
xorl %r9d, %r9d
cmpq $0xa, %r9
je 0x30b3
movzwl (%rdx,%r9,2), %r10d
cvtsi2sd %r10d, %xmm2
mulsd (%r8,%r9,8), %xmm2
addsd %xmm2, %xmm1
incq %r9
jmp 0x3094
divsd %xmm0, %xmm1
cvttsd2si %xmm1, %r8d
addl %r8d, %eax
incq %rcx
jmp 0x307e
andl $0x3ff, %eax            # imm = 0x3FF
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/flowResort.cpp
// Function: resort()
void resort(){
    int i;
    tuple4vec vec;
    int index;
    for(i=0;i<FLOWSPERPROCESS;i++){
        extractTuple4(&vec,flows[i]);
        index=myHash(vec);
        insertFlowsToBucket(flows[i],index);
        if(hashTable[index].currNum>=BUCKETSIZE){
            printf("export resorted flows from hash bucket!\n");
            //hashTable[index].currNum-=FLOWSPERPROCESS;
            exportResortedFlows(index);
        }
        if(insertedNodeNum>=LINKNODEBUFSIZE){
            printf("export resorted flows from hash table!\n");
            int k;
            int maxk=0;
            for(k=1;k<TABLESIZE;k++){
                if(hashTable[k].currNum>hashTable[maxk].currNum){
                    maxk=k;
                }
            }
            exportResortedFlows(maxk);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
xorl %r13d, %r13d
leaq 0x6ab0c8ea(%rip), %r14  # 0x6ab10040
leaq 0x1265533(%rip), %r15   # 0x1268c90
cmpq $0xfa0, %r13            # imm = 0xFA0
je 0x3889
imulq $0x30, %r13, %rbx
movups (%r14,%rbx), %xmm0
movups 0x10(%r14,%rbx), %xmm1
movups 0x20(%r14,%rbx), %xmm2
movaps %xmm2, -0x80(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps -0xa0(%rbp), %xmm0
movaps -0x90(%rbp), %xmm1
movaps -0x80(%rbp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq -0x40(%rbp), %rdi
callq 0x389b
movl -0x30(%rbp), %eax
movl %eax, 0x10(%rsp)
movups -0x40(%rbp), %xmm0
movups %xmm0, (%rsp)
callq 0x305c
movl %eax, %r12d
movups (%r14,%rbx), %xmm0
movups 0x10(%r14,%rbx), %xmm1
movups 0x20(%r14,%rbx), %xmm2
movaps %xmm0, -0x70(%rbp)
movaps %xmm1, -0x60(%rbp)
movaps %xmm2, -0x50(%rbp)
movaps -0x70(%rbp), %xmm0
movaps -0x60(%rbp), %xmm1
movaps -0x50(%rbp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movl %eax, %edi
callq 0x38e9
movslq %r12d, %rax
shlq $0x6, %rax
cmpl $0x1f40, (%rax,%r15)    # imm = 0x1F40
jl 0x3834
leaq 0x292b(%rip), %rdi      # 0x6152
callq 0x2450
movl %r12d, %edi
callq 0x398e
cmpl $0x3e8000, 0xed35462(%rip) # imm = 0x3E8000
jl 0x3881
leaq 0x2933(%rip), %rdi      # 0x617a
callq 0x2450
xorl %edi, %edi
pushq $0x1
popq %rax
pushq $0x40
popq %rcx
cmpq $0x10000, %rcx          # imm = 0x10000
je 0x387c
movl (%rcx,%r15), %esi
movslq %edi, %r8
shlq $0x6, %r8
movl %eax, %edx
cmpl (%r8,%r15), %esi
jg 0x3872
movl %edi, %edx
addq $0x40, %rcx
incl %eax
movl %edx, %edi
jmp 0x3854
callq 0x398e
incq %r13
jmp 0x375d
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/flowResort.cpp
// Function: extractTuple4(tuple4vec*, flowRecord)
void extractTuple4(tuple4vec *tvec,flowRecord rec){
    int i;
    for(i=0;i<4;i++){
        tvec->vec[i]=rec.srcIp[i];
    }
    for(;i<8;i++){
        tvec->vec[i]=rec.destIp[i-4];
    }
    tvec->vec[i++]=rec.srcPort[0]*0x100+rec.srcPort[1];
    tvec->vec[i]=rec.destPort[0]*0x100+rec.destPort[1];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x10(%rbp), %rax
xorl %ecx, %ecx
cmpq $0x4, %rcx
je 0x38b8
movzbl (%rax,%rcx), %edx
movw %dx, (%rdi,%rcx,2)
incq %rcx
jmp 0x38a5
xorl %ecx, %ecx
cmpq $0x4, %rcx
je 0x38cf
movzbl 0x4(%rax,%rcx), %edx
movw %dx, 0x8(%rdi,%rcx,2)
incq %rcx
jmp 0x38ba
movzwl 0x20(%rax), %ecx
rolw $0x8, %cx
movw %cx, 0x10(%rdi)
movzwl 0x22(%rax), %eax
rolw $0x8, %ax
movw %ax, 0x12(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/flowResort.cpp
// Function: insertFlowsToBucket(flowRecord, int)
void insertFlowsToBucket(flowRecord rec,int index){
    //memcpy(flowNodeBuf[insertedNodeNum].rec,rec,FLOWSIZE);
    flowRecordNode *tmp=unusedChainHead;
    memcpy(&(tmp->rec),&rec,FLOWSIZE);
    unusedChainHead=unusedChainHead->next;
    hashTable[index].currNum++;
    flowRecordNode *pF1,*pF2;
    pF1=pF2=&hashTable[index].head;
    while(pF1){
        if(isMatch(&(pF1->rec),&rec)){
            if(pF1==&hashTable[index].head){
                pF1=pF1->next;
                continue;
            }else{
                break;
            }
        }else{
            pF2=pF1;
            pF1=pF1->next;
        }
    }
    pF2->next=tmp;
    tmp->next=pF1;
    insertedNodeNum++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x10(%rbp), %rbx
movq 0xed3538e(%rip), %r14   # 0xed38c90
movaps (%rbx), %xmm0
movaps 0x10(%rbx), %xmm1
movaps 0x20(%rbx), %xmm2
movups %xmm2, 0x28(%r14)
movups %xmm1, 0x18(%r14)
movups %xmm0, 0x8(%r14)
movq (%r14), %rax
movslq %edi, %rcx
shlq $0x6, %rcx
leaq 0x1265363(%rip), %rdx   # 0x1268c90
leaq (%rcx,%rdx), %r15
addq $0x8, %r15
incl -0x8(%r15)
movq %rax, 0xed35350(%rip)   # 0xed38c90
movq %r15, %rax
movq %r15, %r12
movq %rax, %r13
testq %r13, %r13
je 0x3972
leaq 0x8(%r13), %rdi
movq %rbx, %rsi
callq 0x3a35
testl %eax, %eax
je 0x3969
cmpq %r15, %r13
jne 0x3972
movq (%r13), %r13
jmp 0x3949
movq (%r13), %rax
movq %r13, %r12
jmp 0x3946
movq %r14, (%r12)
movq %r13, (%r14)
incl 0xed35321(%rip)         # 0xed38ca0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/flowResort.cpp
// Function: exportResortedFlows(int)
void exportResortedFlows(int index){
    flowRecordNode *pF;
    pF=&hashTable[index].head;
    //unusedChainTail->next=pF->next;
    if(unusedChainHead==NULL){
        unusedChainHead=pF->next;
    }else{
        unusedChainTail->next=pF->next;
    }
    int j;
    for(j=0;j<FLOWSPERPROCESS;j++){
        pF=pF->next;
        memcpy(&flowWaitExport[inBase++],&(pF->rec),FLOWSIZE);
    }
    hashTable[index].head.next=pF->next;
    pF->next=NULL;
    unusedChainTail=pF;
    hashTable[index].currNum-=FLOWSPERPROCESS;
    insertedNodeNum-=FLOWSPERPROCESS;
}

// Assembly:
movslq %edi, %rcx
shlq $0x6, %rcx
leaq 0x12652f4(%rip), %rdx   # 0x1268c90
cmpq $0x0, 0xed352ec(%rip)   # 0xed38c90
movq 0x8(%rcx,%rdx), %rsi
je 0x39b4
movq 0xed352e6(%rip), %rdi   # 0xed38c98
jmp 0x39bb
leaq 0xed352d5(%rip), %rdi   # 0xed38c90
pushq %rbp
movq %rsp, %rbp
leaq (%rdx,%rcx), %rax
leaq 0x8(%rcx,%rdx), %rcx
movq %rsi, (%rdi)
leaq 0x653d2aee(%rip), %rdx  # 0x653d64c0
movslq (%rdx), %rsi
imulq $0x30, %rsi, %rdi
addq 0x5600(%rip), %rdi      # 0x8fe0
xorl %r8d, %r8d
cmpl $0xfffff060, %r8d       # imm = 0xFFFFF060
je 0x3a0f
movq (%rcx), %rcx
movups 0x8(%rcx), %xmm0
movups 0x18(%rcx), %xmm1
movups 0x28(%rcx), %xmm2
movups %xmm2, 0x20(%rdi)
movups %xmm1, 0x10(%rdi)
movups %xmm0, (%rdi)
decl %r8d
addq $0x30, %rdi
jmp 0x39e3
subl %r8d, %esi
movl %esi, (%rdx)
movq (%rcx), %rdx
movq %rdx, 0x8(%rax)
andq $0x0, (%rcx)
movl $0xfffff060, %edx       # imm = 0xFFFFF060
addl %edx, (%rax)
movq %rcx, 0xed3526b(%rip)   # 0xed38c98
addl %edx, 0xed3526d(%rip)   # 0xed38ca0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/flowResort.cpp
// Function: isMatch(flowRecord*, flowRecord*)
int isMatch(flowRecord *rec1,flowRecord *rec2){
    if(!memcmp(rec1->srcIp,rec2->srcIp,4)){
        return 1;
    }else if(!memcmp(rec1->destIp,rec2->destIp,4)){
        return 1;
    }else if(!memcmp(rec1->srcPort,rec2->srcPort,2)){
        return 1;
    }else if(!memcmp(rec1->destPort,rec2->destPort,2)){
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %ecx
movl $0x1, %eax
cmpl (%rsi), %ecx
je 0x3a63
movl 0x4(%rdi), %ecx
cmpl 0x4(%rsi), %ecx
je 0x3a63
movzwl 0x20(%rdi), %ecx
cmpw 0x20(%rsi), %cx
je 0x3a63
movzwl 0x22(%rdi), %ecx
xorl %eax, %eax
cmpw 0x22(%rsi), %cx
sete %al
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/index.cpp
// Function: locateLeafNode(void*, flowRecord, int)
leafNode* locateLeafNode(void *pTrieNode,flowRecord rec,int flag){
    if(flag==1){
        int i;
        for(i=0;i<2;i++){
            if(((innerNode *)pTrieNode)->nextLevelNodes[rec.srcIp[i]]==NULL){
                ((innerNode *)pTrieNode)->nextLevelNodes[rec.srcIp[i]]=&srcIpInnerNodeBuf[currUsedSrcIpInnerNodes++]; 
            }
            pTrieNode=((innerNode *)pTrieNode)->nextLevelNodes[rec.srcIp[i]];
        }
        if(((innerNode *)pTrieNode)->nextLevelNodes[rec.srcIp[i]]==NULL){
            ((innerNode *)pTrieNode)->nextLevelNodes[rec.srcIp[i]]=&srcIpLeafNodeBuf[currUsedSrcIpLeafNodes++]; 
        }
        pTrieNode=((innerNode *)pTrieNode)->nextLevelNodes[rec.srcIp[i]];
        return (leafNode *)pTrieNode;
    }else{
        int i;
        for(i=0;i<2;i++){
            if(((innerNode *)pTrieNode)->nextLevelNodes[rec.destIp[i]]==NULL){
                ((innerNode *)pTrieNode)->nextLevelNodes[rec.destIp[i]]=&dstIpInnerNodeBuf[currUsedDstIpInnerNodes++]; 
            }
            pTrieNode=((innerNode *)pTrieNode)->nextLevelNodes[rec.destIp[i]];
        }
        if(((innerNode *)pTrieNode)->nextLevelNodes[rec.destIp[i]]==NULL){
            ((innerNode *)pTrieNode)->nextLevelNodes[rec.destIp[i]]=&dstIpLeafNodeBuf[currUsedDstIpLeafNodes++]; 
        }
        pTrieNode=((innerNode *)pTrieNode)->nextLevelNodes[rec.destIp[i]];
        return (leafNode *)pTrieNode;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x10(%rbp), %rax
cmpl $0x1, %esi
jne 0x3ce5
movl 0x653d282e(%rip), %esi  # 0x653d64d8
xorl %ecx, %ecx
leaq 0x519527fd(%rip), %rdx  # 0x519564b0
cmpq $0x2, %rcx
je 0x3d27
movzbl (%rax,%rcx), %r9d
movq (%rdi,%r9,8), %r8
testq %r8, %r8
jne 0x3cdd
movslq %esi, %r8
incl %esi
movl %esi, 0x653d2806(%rip)  # 0x653d64d8
shlq $0xb, %r8
addq %rdx, %r8
movq %r8, (%rdi,%r9,8)
incq %rcx
movq %r8, %rdi
jmp 0x3cb3
movl 0x653d27f5(%rip), %esi  # 0x653d64e0
xorl %ecx, %ecx
leaq 0x540627bc(%rip), %rdx  # 0x540664b0
cmpq $0x2, %rcx
je 0x3d48
movzbl 0x4(%rax,%rcx), %r9d
movq (%rdi,%r9,8), %r8
testq %r8, %r8
jne 0x3d1f
movslq %esi, %r8
incl %esi
movl %esi, 0x653d27cc(%rip)  # 0x653d64e0
shlq $0xb, %r8
addq %rdx, %r8
movq %r8, (%rdi,%r9,8)
incq %rcx
movq %r8, %rdi
jmp 0x3cf4
movzbl 0x2(%rax), %ecx
movq (%rdi,%rcx,8), %rax
testq %rax, %rax
jne 0x3d79
leaq (%rdi,%rcx,8), %rcx
leaq 0x56772771(%rip), %rdx  # 0x567764b0
leaq 0x653d2796(%rip), %rsi  # 0x653d64dc
jmp 0x3d67
movzbl 0x6(%rax), %ecx
movq (%rdi,%rcx,8), %rax
testq %rax, %rax
jne 0x3d79
leaq (%rdi,%rcx,8), %rcx
leaq 0x5dca2750(%rip), %rdx  # 0x5dca64b0
leaq 0x653d277d(%rip), %rsi  # 0x653d64e4
movslq (%rsi), %rax
leal 0x1(%rax), %edi
movl %edi, (%rsi)
shlq $0xc, %rax
addq %rdx, %rax
movq %rax, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/index.cpp
// Function: recordIpIndexNum(leafNode*, flowRecord, int)
void recordIpIndexNum(leafNode *pLeafNode,flowRecord rec,int flag){
    if(flag==1){
        if(pLeafNode->pTails[rec.srcIp[3]]==NULL){
            pLeafNode->pTails[rec.srcIp[3]]=pLeafNode->indexList[rec.srcIp[3]]=&srcIpIndexNodeBuf[currUsedSrcIpIndexNodes];
        }else{
            pLeafNode->pTails[rec.srcIp[3]]->next=&srcIpIndexNodeBuf[currUsedSrcIpIndexNodes];
            pLeafNode->pTails[rec.srcIp[3]]=pLeafNode->pTails[rec.srcIp[3]]->next;
        }
        currUsedSrcIpIndexNodes++;
    }else{
        if(pLeafNode->pTails[rec.destIp[3]]==NULL){
            pLeafNode->pTails[rec.destIp[3]]=pLeafNode->indexList[rec.destIp[3]]=&dstIpIndexNodeBuf[currUsedDstIpIndexNodes];
        }else{
            pLeafNode->pTails[rec.destIp[3]]->next=&dstIpIndexNodeBuf[currUsedDstIpIndexNodes];
            pLeafNode->pTails[rec.destIp[3]]=pLeafNode->pTails[rec.destIp[3]]->next;
        }
        currUsedDstIpIndexNodes++;
    } 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x10(%rbp), %rax
cmpl $0x1, %esi
jne 0x3dc3
movzbl 0x3(%rax), %ecx
movq 0x800(%rdi,%rcx,8), %rsi
movslq 0x653d272d(%rip), %rax  # 0x653d64c8
movq %rax, %r8
shlq $0x4, %r8
leaq 0x2b6f8707(%rip), %rdx  # 0x2b6fc4b0
addq %r8, %rdx
testq %rsi, %rsi
je 0x3dfe
movq %rdx, 0x8(%rsi)
movq 0x800(%rdi,%rcx,8), %rdx
movq 0x8(%rdx), %rdx
jmp 0x3e02
movzbl 0x7(%rax), %ecx
movq 0x800(%rdi,%rcx,8), %rsi
movslq 0x653d26f6(%rip), %rax  # 0x653d64cc
movq %rax, %r8
shlq $0x4, %r8
leaq 0x34f8eecc(%rip), %rdx  # 0x34f92cb0
addq %r8, %rdx
testq %rsi, %rsi
je 0x3e13
movq %rdx, 0x8(%rsi)
movq 0x800(%rdi,%rcx,8), %rdx
movq 0x8(%rdx), %rdx
jmp 0x3e17
movq %rdx, (%rdi,%rcx,8)
movq %rdx, 0x800(%rdi,%rcx,8)
leaq 0x653d26b7(%rip), %rcx  # 0x653d64c8
jmp 0x3e26
movq %rdx, (%rdi,%rcx,8)
movq %rdx, 0x800(%rdi,%rcx,8)
leaq 0x653d26a6(%rip), %rcx  # 0x653d64cc
incl %eax
movl %eax, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/index.cpp
// Function: recordPortIndexNum(flowRecord, int)
void recordPortIndexNum(flowRecord rec,int flag){
    if(flag==1){
        unsigned short portNum=rec.srcPort[0]*0x100+rec.srcPort[1];
        if(srcPortIndexTable.pTails[portNum]==NULL){
            srcPortIndexTable.pTails[portNum]=srcPortIndexTable.indexList[portNum]=&srcPortIndexNodeBuf[currUsedSrcPortIndexNodes];
        }else{
            srcPortIndexTable.pTails[portNum]->next=&srcPortIndexNodeBuf[currUsedSrcPortIndexNodes];
            srcPortIndexTable.pTails[portNum]=srcPortIndexTable.pTails[portNum]->next;
        }
        currUsedSrcPortIndexNodes++;
    }else{
        unsigned short portNum=rec.destPort[0]*0x100+rec.destPort[1];
        if(dstPortIndexTable.pTails[portNum]==NULL){
            dstPortIndexTable.pTails[portNum]=dstPortIndexTable.indexList[portNum]=&dstPortIndexNodeBuf[currUsedDstPortIndexNodes];
        }else{
            dstPortIndexTable.pTails[portNum]->next=&dstPortIndexNodeBuf[currUsedDstPortIndexNodes];
            dstPortIndexTable.pTails[portNum]=dstPortIndexTable.pTails[portNum]->next;
        }
        currUsedDstPortIndexNodes++;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x10(%rbp), %rax
cmpl $0x1, %edi
jne 0x3e82
movzwl 0x20(%rax), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
leaq 0x651d2675(%rip), %rdx  # 0x651d64c0
movq 0x80000(%rdx,%rcx,8), %rdi
movslq 0x653d2676(%rip), %rax  # 0x653d64d0
movq %rax, %r8
shlq $0x4, %r8
leaq 0x3e825648(%rip), %rsi  # 0x3e8294b0
addq %r8, %rsi
testq %rdi, %rdi
je 0x3ecb
movq %rsi, 0x8(%rdi)
movq 0x80000(%rdx,%rcx,8), %rsi
movq 0x8(%rsi), %rsi
jmp 0x3ecf
movzwl 0x22(%rax), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
leaq 0x652d262c(%rip), %rdx  # 0x652d64c0
movq 0x80000(%rdx,%rcx,8), %rdi
movslq 0x653d2631(%rip), %rax  # 0x653d64d4
movq %rax, %r8
shlq $0x4, %r8
leaq 0x480bbdff(%rip), %rsi  # 0x480bfcb0
addq %r8, %rsi
testq %rdi, %rdi
je 0x3ee0
movq %rsi, 0x8(%rdi)
movq 0x80000(%rdx,%rcx,8), %rsi
movq 0x8(%rsi), %rsi
jmp 0x3ee4
movq %rsi, (%rdx,%rcx,8)
movq %rsi, 0x80000(%rdx,%rcx,8)
leaq 0x653d25f2(%rip), %rcx  # 0x653d64d0
jmp 0x3ef3
movq %rsi, (%rdx,%rcx,8)
movq %rsi, 0x80000(%rdx,%rcx,8)
leaq 0x653d25e1(%rip), %rcx  # 0x653d64d4
incl %eax
movl %eax, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/index.cpp
// Function: judgeExport()
byte judgeExport(){
    byte ret=0;
    if(currUsedSrcIpInnerNodes>INNERNODENUM*THRESHOLD){
        ret|=0x01;
    }else if(currUsedSrcIpLeafNodes>LEAFNODENUM*THRESHOLD){
        ret|=0x02;
    }else if(currUsedDstIpInnerNodes>INNERNODENUM*THRESHOLD){
        ret|=0x04;
    }else if(currUsedDstIpLeafNodes>LEAFNODENUM*THRESHOLD){
        ret|=0x08;
    }else if(currUsedSrcIpIndexNodes>FLOWAMOUNTINMEM*THRESHOLD){
        ret|=0x10;
    }else if(currUsedDstIpIndexNodes>FLOWAMOUNTINMEM*THRESHOLD){
        ret|=0x20;
    }else if(currUsedSrcPortIndexNodes>FLOWAMOUNTINMEM*THRESHOLD){
        ret|=0x40;
    }else if(currUsedDstPortIndexNodes>FLOWAMOUNTINMEM*THRESHOLD){
        ret|=0x80;
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb $0x1, %al
cmpl $0x4b00, 0x653d25cf(%rip) # imm = 0x4B00
jg 0x3f6f
movb $0x2, %al
cmpl $0x7080, 0x653d25c5(%rip) # imm = 0x7080
jg 0x3f6f
movb $0x4, %al
cmpl $0x4b00, 0x653d25bb(%rip) # imm = 0x4B00
jg 0x3f6f
movb $0x8, %al
cmpl $0x7080, 0x653d25b1(%rip) # imm = 0x7080
jg 0x3f6f
movb $0x10, %al
cmpl $0x927c00, 0x653d2587(%rip) # imm = 0x927C00
jg 0x3f6f
movb $0x20, %al
cmpl $0x927c00, 0x653d257d(%rip) # imm = 0x927C00
jg 0x3f6f
movb $0x40, %al
cmpl $0x927c00, 0x653d2573(%rip) # imm = 0x927C00
jg 0x3f6f
cmpl $0x927c01, 0x653d256b(%rip) # imm = 0x927C01
setge %al
shlb $0x7, %al
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/myToolFunc.c
// Function: countFiles(char const*, char const*)
int countFiles(const char *path,const char *filter){
    DIR *dp;
    struct dirent *dirp;
    int fileNum=0;
    if((dp=opendir(path))==NULL){
        int mkRes=mkdir(path,0777);
        if(mkRes==-1){
            printf("fail to create dir %s\n",path);
        }
        return 0;
    }
    while((dirp=readdir(dp))!=NULL){
        if(strstr(dirp->d_name,filter)){
            fileNum++;
        }
    }
    return fileNum;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r12
callq 0x2420
testq %rax, %rax
je 0x3fb9
movq %rax, %r15
xorl %ebx, %ebx
movq %r15, %rdi
callq 0x2440
testq %rax, %rax
je 0x3fe0
addq $0x13, %rax
movq %rax, %rdi
movq %r14, %rsi
callq 0x2080
cmpq $0x1, %rax
sbbl $-0x1, %ebx
jmp 0x3f94
movq %r12, %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x2140
xorl %ebx, %ebx
cmpl $-0x1, %eax
jne 0x3fe0
leaq 0x21cd(%rip), %rdi      # 0x61a1
xorl %ebx, %ebx
movq %r12, %rsi
xorl %eax, %eax
callq 0x2040
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/myToolFunc.c
// Function: iToStr(int, char*)
int iToStr(int num,char str[]){
    if(num==0){
        str[1]=0;
        str[0]='0';
        return 0;
    }
    int len=0;
    int tmpNum=num;
    while(tmpNum){
        tmpNum/=10;
        len++;
    }
    str[len--]=0;
    while(num){
        str[len--]=(num%10)+'0';
        num/=10;
    }
    if(len!=-1){
        return -1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %edi, %edi
je 0x402f
xorl %ecx, %ecx
movl $0xa, %r8d
movl %edi, %eax
testl %eax, %eax
je 0x400a
cltd
idivl %r8d
incq %rcx
jmp 0x3ffd
movb $0x0, (%rsi,%rcx)
testl %edi, %edi
je 0x4026
movl %edi, %eax
cltd
idivl %r8d
addb $0x30, %dl
movb %dl, -0x1(%rsi,%rcx)
decq %rcx
movl %eax, %edi
jmp 0x400e
xorl %eax, %eax
negq %rcx
sbbl %eax, %eax
jmp 0x4036
movw $0x30, (%rsi)
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/myToolFunc.c
// Function: getNowTime(char*, int)
void getNowTime(char formatTime[],int len){
    time_t now;
    struct tm *tm_now;
    time(&now);
    tm_now=localtime(&now);
    strftime(formatTime,len,"%Y-%m-%d %H:%M:%S",tm_now);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq -0x20(%rbp), %r15
movq %r15, %rdi
callq 0x22a0
movq %r15, %rdi
callq 0x21d0
movslq %ebx, %rsi
leaq 0x2153(%rip), %rdx      # 0x61b8
movq %r14, %rdi
movq %rax, %rcx
callq 0x2240
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/compressIndex.cpp
// Function: isFive(indexNode*)
int isFive(indexNode *ptr){
    indexNode *nPtr=ptr->next;
    if(!nPtr) return 0;
    int i;
    for(i=0;i<5;i++){
        if(nPtr->indexNum-ptr->indexNum>63){
            return i;
        }
        ptr=nPtr;
        nPtr=nPtr->next;
        if(!nPtr) return i+1;
    }
    return 5;
}

// Assembly:
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x4239
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movl $0x5, %edx
cmpl $0x5, %eax
je 0x423c
movl (%rcx), %esi
subl (%rdi), %esi
cmpl $0x3f, %esi
ja 0x423e
movq %rcx, %rdi
movq 0x8(%rcx), %rsi
incl %eax
movq %rsi, %rcx
testq %rsi, %rsi
jne 0x4218
jmp 0x423e
xorl %eax, %eax
retq
movl %edx, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/compressIndex.cpp
// Function: isSpecial(indexNode*)
int isSpecial(indexNode *ptr){
    indexNode *nPtr=ptr->next;
    int specialNum=0;
    while(nPtr){
        if(nPtr->indexNum-ptr->indexNum>1){
            break;
        }
        specialNum++;
        ptr=nPtr;
        nPtr=nPtr->next;
    }
    return specialNum; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x425f
movl (%rcx), %edx
subl (%rdi), %edx
cmpl $0x1, %edx
ja 0x425f
incl %eax
movq %rcx, %rdi
jmp 0x4246
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/compressIndex.cpp
// Function: moveToNext(indexNode**, int)
int moveToNext(indexNode **ptr,int steps){
    int moveSteps=0;
    while((*ptr)!=NULL&&(moveSteps<steps)){
        *ptr=(*ptr)->next;
        moveSteps++;
    }
    return moveSteps;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x427e
cmpl %esi, %eax
jge 0x427e
movq 0x8(%rcx), %rcx
movq %rcx, (%rdi)
incl %eax
jmp 0x426a
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/compressIndex.cpp
// Function: compress5(indexNode*)
void compress5(indexNode *ptr){
    compressedIndexArr[indexOffset]=UNIT5;
    indexNode *nPtr=ptr->next;
    if(!nPtr) return;
    int i;
    for(i=0;i<5;i++){
        compressedIndexArr[indexOffset]|=((nPtr->indexNum-ptr->indexNum)<<6*i);
        ptr=nPtr;
        nPtr=nPtr->next;
        if(!nPtr){
            indexOffset++;
            return;
        }
    }
    indexOffset++;
}

// Assembly:
movslq 0x679f7c69(%rip), %rax  # 0x679fbef0
leaq 0x653d2262(%rip), %rdx  # 0x653d64f0
movl $0xc0000000, (%rdx,%rax,4) # imm = 0xC0000000
movq 0x8(%rdi), %rsi
testq %rsi, %rsi
je 0x42df
pushq %rbp
movq %rsp, %rbp
movl $0xc0000000, %r8d       # imm = 0xC0000000
xorl %ecx, %ecx
leal 0x6(%rcx), %r9d
cmpl $0x24, %r9d
je 0x42d6
movl (%rsi), %r10d
subl (%rdi), %r10d
shll %cl, %r10d
orl %r10d, %r8d
movl %r8d, (%rdx,%rax,4)
movq %rsi, %rdi
movq 0x8(%rsi), %r10
movl %r9d, %ecx
movq %r10, %rsi
testq %r10, %r10
jne 0x42aa
incl %eax
movl %eax, 0x679f7c12(%rip)  # 0x679fbef0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/compressIndex.cpp
// Function: compress3(indexNode*)
void compress3(indexNode *ptr){
    compressedIndexArr[indexOffset]=UNIT3;
    indexNode *nPtr=ptr->next;
    if(!nPtr) return;
    int i;
    for(i=0;i<3;i++){
        compressedIndexArr[indexOffset]|=((nPtr->indexNum-ptr->indexNum)<<10*i);
        ptr=nPtr;
        nPtr=nPtr->next;
        if(!nPtr){
            indexOffset++;
            return;
        }
    }
    indexOffset++;
}

// Assembly:
movslq 0x679f7c09(%rip), %rax  # 0x679fbef0
leaq 0x653d2202(%rip), %rdx  # 0x653d64f0
movl $0x80000000, (%rdx,%rax,4) # imm = 0x80000000
movq 0x8(%rdi), %rsi
testq %rsi, %rsi
je 0x433f
pushq %rbp
movq %rsp, %rbp
movl $0x80000000, %r8d       # imm = 0x80000000
xorl %ecx, %ecx
leal 0xa(%rcx), %r9d
cmpl $0x28, %r9d
je 0x4336
movl (%rsi), %r10d
subl (%rdi), %r10d
shll %cl, %r10d
orl %r10d, %r8d
movl %r8d, (%rdx,%rax,4)
movq %rsi, %rdi
movq 0x8(%rsi), %r10
movl %r9d, %ecx
movq %r10, %rsi
testq %r10, %r10
jne 0x430a
incl %eax
movl %eax, 0x679f7bb2(%rip)  # 0x679fbef0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/compressIndex.cpp
// Function: isThree(indexNode*)
int isThree(indexNode *ptr){
    indexNode *nPtr=ptr->next;
    if(!nPtr) return 0;
    int i;
    for(i=0;i<3;i++){
        if(nPtr->indexNum-ptr->indexNum>1023){
            return i;
        }
        ptr=nPtr;
        nPtr=nPtr->next;
        if(!nPtr) return i+1;
    }
    return 3;
}

// Assembly:
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x4378
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movl $0x3, %edx
cmpl $0x3, %eax
je 0x437b
movl (%rcx), %esi
subl (%rdi), %esi
cmpl $0x3ff, %esi            # imm = 0x3FF
ja 0x437d
movq %rcx, %rdi
movq 0x8(%rcx), %rsi
incl %eax
movq %rsi, %rcx
testq %rsi, %rsi
jne 0x4354
jmp 0x437d
xorl %eax, %eax
retq
movl %edx, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/compressIndex.cpp
// Function: compress2(indexNode*)
void compress2(indexNode *ptr){
    compressedIndexArr[indexOffset]=UNIT2;
    indexNode *nPtr=ptr->next;
    if(!nPtr) return;
    int i;
    for(i=0;i<2;i++){
        compressedIndexArr[indexOffset]|=((nPtr->indexNum-ptr->indexNum)<<15*i);
        ptr=nPtr;
        nPtr=nPtr->next;
        if(!nPtr){
            indexOffset++;
            return;
        }
    }
    indexOffset++;
}

// Assembly:
movslq 0x679f7b6a(%rip), %rax  # 0x679fbef0
leaq 0x653d2163(%rip), %rdx  # 0x653d64f0
movl $0x40000000, (%rdx,%rax,4) # imm = 0x40000000
movq 0x8(%rdi), %rsi
testq %rsi, %rsi
je 0x43de
pushq %rbp
movq %rsp, %rbp
movl $0x40000000, %r8d       # imm = 0x40000000
xorl %ecx, %ecx
leal 0xf(%rcx), %r9d
cmpl $0x2d, %r9d
je 0x43d5
movl (%rsi), %r10d
subl (%rdi), %r10d
shll %cl, %r10d
orl %r10d, %r8d
movl %r8d, (%rdx,%rax,4)
movq %rsi, %rdi
movq 0x8(%rsi), %r10
movl %r9d, %ecx
movq %r10, %rsi
testq %r10, %r10
jne 0x43a9
incl %eax
movl %eax, 0x679f7b13(%rip)  # 0x679fbef0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/compressIndex.cpp
// Function: isTwo(indexNode*)
int isTwo(indexNode *ptr){
    indexNode *nPtr=ptr->next;
    if(!nPtr) return 0;
    int i;
    for(i=0;i<2;i++){
        if(nPtr->indexNum-ptr->indexNum>32767){
            return i;
        }
        ptr=nPtr;
        nPtr=nPtr->next;
        if(!nPtr) return i+1;
    }
    return 2; 
}

// Assembly:
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x4417
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movl $0x2, %edx
cmpl $0x2, %eax
je 0x441a
movl (%rcx), %esi
subl (%rdi), %esi
cmpl $0x7fff, %esi           # imm = 0x7FFF
ja 0x441c
movq %rcx, %rdi
movq 0x8(%rcx), %rsi
incl %eax
movq %rsi, %rcx
testq %rsi, %rsi
jne 0x43f3
jmp 0x441c
xorl %eax, %eax
retq
movl %edx, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/exportDataAndIndex.cpp
// Function: exportDataAndIndex()
int* exportDataAndIndex(){
    char formatTime[128];
    char query[512];
    if(useDb==true){
        getNowTime(formatTime,128);
    }
    int *exportRes=(int *)malloc(sizeof(int)*5);
    exportRes[0]=exportDataFile();
    exportRes[1]=exportIpIndexFile(srcIpRootNode,1);
    exportRes[2]=exportIpIndexFile(dstIpRootNode,2);
    exportRes[3]=exportPortIndexFile(&srcPortIndexTable,1);
    exportRes[4]=exportPortIndexFile(&dstPortIndexTable,2);
    if(useDb==true){
        sprintf(query,"INSERT INTO tsr(data_file,src_ip_index_file,src_port_index_file,dst_ip_index_file,\
            dst_port_index_file,timestamp)values('%s','%s','%s','%s','%s','%s')",dateFileName,\
            srcIpIndexFileName,srcPortIndexFileName,dstIpIndexFileName,dstPortIndexFileName,formatTime);
        if(mysql_real_query(&mysql,query,(unsigned long)strlen(query))){
            printf("mysql_real_query failed!\n");
        }
    }
    return exportRes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x280, %rsp            # imm = 0x280
leaq 0x6ab3b117(%rip), %r12  # 0x6ab3f550
cmpb $0x1, (%r12)
jne 0x4451
leaq -0xa0(%rbp), %rdi
movl $0x80, %esi
callq 0x4038
pushq $0x14
popq %rdi
callq 0x2370
movq %rax, %rbx
callq 0x4545
movl %eax, (%rbx)
leaq 0x651d2046(%rip), %rax  # 0x651d64b0
movq (%rax), %rdi
pushq $0x1
popq %r14
movl %r14d, %esi
callq 0x4645
movl %eax, 0x4(%rbx)
leaq 0x651d2035(%rip), %rax  # 0x651d64b8
movq (%rax), %rdi
pushq $0x2
popq %r15
movl %r15d, %esi
callq 0x4645
movl %eax, 0x8(%rbx)
leaq 0x651d2024(%rip), %rdi  # 0x651d64c0
movl %r14d, %esi
callq 0x488b
movl %eax, 0xc(%rbx)
leaq 0x652d2012(%rip), %rdi  # 0x652d64c0
movl %r15d, %esi
callq 0x488b
movl %eax, 0x10(%rbx)
cmpb $0x1, (%r12)
jne 0x4532
leaq -0xa0(%rbp), %r10
leaq 0x6ab0bb12(%rip), %r11  # 0x6ab0ffe0
leaq 0x1cf5(%rip), %rsi      # 0x61ca
leaq 0x6ab0ba84(%rip), %rdx  # 0x6ab0ff60
leaq 0x6ab0ba9d(%rip), %rcx  # 0x6ab0ff80
leaq 0x6ab0bad6(%rip), %r8   # 0x6ab0ffc0
leaq 0x6ab0baaf(%rip), %r9   # 0x6ab0ffa0
leaq -0x2a0(%rbp), %r14
movq %r14, %rdi
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0x2070
popq %rcx
popq %rdx
movq %r14, %rdi
callq 0x2110
leaq 0x6ab3abb1(%rip), %rdi  # 0x6ab3f0c8
movq %r14, %rsi
movq %rax, %rdx
callq 0x2390
testl %eax, %eax
je 0x4532
leaq 0x1dc9(%rip), %rdi      # 0x62f6
callq 0x2450
movq %rbx, %rax
addq $0x280, %rsp            # imm = 0x280
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/exportDataAndIndex.cpp
// Function: exportDataFile()
int exportDataFile(){
    int id=countFiles("./dataDir/","data");
    strcpy(dateFileName,"data");
    char strId[16];
    int res=iToStr(id,strId);
    strcat(dateFileName,strId);
    char path[128];
    strcpy(path,"./dataDir/");
    strcat(path,dateFileName);
    int fd=open(path,O_WRONLY | O_APPEND | O_CREAT,0555);
    if(fd == -1){
        printf("fail to open file %s\n",path);
        return -1;
    }
    int writedBytes=write(fd,flowWaitExport,outBase*FLOWSIZE);
    if(writedBytes==-1){
        printf("write error!\n");
        return -1;
    }
    if(writedBytes<outBase*FLOWSIZE){
        printf("did not write enough data!\n");
    }
    return writedBytes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
leaq 0x1d12(%rip), %rdi      # 0x626c
leaq 0x1b02(%rip), %rsi      # 0x6063
callq 0x3f74
movl $0x61746164, 0x6ab0b9f0(%rip) # imm = 0x61746164
movb $0x0, 0x6ab0b9ed(%rip)  # 0x6ab0ff64
leaq 0x6ab0b9e2(%rip), %rbx  # 0x6ab0ff60
leaq -0x20(%rbp), %r14
movl %eax, %edi
movq %r14, %rsi
callq 0x3feb
movq %rbx, %rdi
movq %r14, %rsi
callq 0x24c0
movabsq $0x6944617461642f2e, %rax # imm = 0x6944617461642F2E
leaq -0xa0(%rbp), %r14
movq %rax, (%r14)
movl $0x2f7269, 0x7(%r14)    # imm = 0x2F7269
movq %r14, %rdi
movq %rbx, %rsi
callq 0x24c0
movq %r14, %rdi
movl $0x441, %esi            # imm = 0x441
movl $0x16d, %edx            # imm = 0x16D
xorl %eax, %eax
callq 0x21c0
cmpl $-0x1, %eax
je 0x4611
leaq 0x653d1ee6(%rip), %r14  # 0x653d64c4
movslq (%r14), %rcx
imulq $0x30, %rcx, %rdx
leaq 0xed346c4(%rip), %rsi   # 0xed38cb0
movl %eax, %edi
callq 0x20d0
movq %rax, %rbx
cmpl $-0x1, %ebx
je 0x4628
imull $0x30, (%r14), %eax
cmpl %ebx, %eax
jle 0x4637
leaq 0x1d05(%rip), %rdi      # 0x630f
callq 0x2450
jmp 0x4637
leaq 0x1c5f(%rip), %rdi      # 0x6277
leaq -0xa0(%rbp), %rsi
xorl %eax, %eax
callq 0x2040
jmp 0x4634
leaq 0x1cfb(%rip), %rdi      # 0x632a
callq 0x2450
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/exportDataAndIndex.cpp
// Function: exportPortIndexFile(portIndexTable*, int)
int exportPortIndexFile(portIndexTable *pit,int flag){
    int base=65536*sizeof(int);
    int i;
    for(i=0;i<65536;i++){
        if(pit->indexList[i]){
            portOffsetTable[i]=base+indexOffset*sizeof(unsigned);
            compressIndexLink(pit->indexList[i]);
        }
    }
    int id;
    int indexFileBytes;
    if(flag==1){
        id=countFiles("./index/","srcPortIndex");
        strcpy(srcPortIndexFileName,"srcPortIndex");
        char idStr[16];
        iToStr(id,idStr);
        strcat(srcPortIndexFileName,idStr);
        char path[128];
        strcpy(path,"./index/");
        strcat(path,srcPortIndexFileName);
        indexFileBytes=writePortIndexFile(path);
    }
    if(flag==2){
        id=countFiles("./index/","dstPortIndex");
        strcpy(dstPortIndexFileName,"dstPortIndex");
        char idStr[16];
        iToStr(id,idStr);
        strcat(dstPortIndexFileName,idStr);
        char path[128];
        strcpy(path,"./index/");
        strcat(path,dstPortIndexFileName);
        indexFileBytes=writePortIndexFile(path); 
    }
    memset(portOffsetTable,0,sizeof(int)*65536);
    memset(compressedIndexArr,0,sizeof(unsigned)*indexOffset);
    indexOffset=0;
    return indexFileBytes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %esi, %ebx
movq %rdi, %r14
xorl %r12d, %r12d
leaq 0x679f7642(%rip), %r15  # 0x679fbef0
leaq 0x6aacb6ab(%rip), %r13  # 0x6aacff60
cmpq $0x40000, %r12          # imm = 0x40000
je 0x48e0
movq (%r14,%r12,2), %rdi
testq %rdi, %rdi
je 0x48da
movl (%r15), %eax
leal 0x40000(,%rax,4), %eax
movl %eax, (%r12,%r13)
callq 0x407c
addq $0x4, %r12
jmp 0x48b5
leaq 0x19a6(%rip), %rdi      # 0x628d
cmpl $0x1, %ebx
jne 0x4923
leaq 0x19b9(%rip), %rsi      # 0x62ac
callq 0x3f74
movabsq $0x4974726f50637273, %rcx # imm = 0x4974726F50637273
movq %rcx, 0x6ab0b6b7(%rip)  # 0x6ab0ffc0
movabsq $0x7865646e497472, %rcx # imm = 0x7865646E497472
movq %rcx, 0x6ab0b6ab(%rip)  # 0x6ab0ffc5
leaq 0x6ab0b69f(%rip), %rbx  # 0x6ab0ffc0
jmp 0x4958
leaq 0x198f(%rip), %rsi      # 0x62b9
callq 0x3f74
movabsq $0x4974726f50747364, %rcx # imm = 0x4974726F50747364
movq %rcx, 0x6ab0b6a0(%rip)  # 0x6ab0ffe0
movabsq $0x7865646e497472, %rcx # imm = 0x7865646E497472
movq %rcx, 0x6ab0b694(%rip)  # 0x6ab0ffe5
leaq 0x6ab0b688(%rip), %rbx  # 0x6ab0ffe0
leaq -0x40(%rbp), %r14
movl %eax, %edi
movq %r14, %rsi
callq 0x3feb
movq %rbx, %rdi
movq %r14, %rsi
callq 0x24c0
movabsq $0x2f7865646e692f2e, %rax # imm = 0x2F7865646E692F2E
leaq -0xc0(%rbp), %r14
movq %rax, (%r14)
movb $0x0, 0x8(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x24c0
movq %r14, %rdi
callq 0x4a49
movl %eax, %ebx
leaq 0x6aacb5ba(%rip), %rdi  # 0x6aacff60
movl $0x40000, %edx          # imm = 0x40000
xorl %esi, %esi
callq 0x2180
movslq (%r15), %rdx
shlq $0x2, %rdx
leaq 0x653d1b30(%rip), %rdi  # 0x653d64f0
xorl %esi, %esi
callq 0x2180
andl $0x0, (%r15)
movl %ebx, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/exportDataAndIndex.cpp
// Function: getFirstLeafNode(innerNode*)
void *getFirstLeafNode(innerNode *rootNode){
    void *pNode=rootNode;
    int i,j;
    for(i=0;i<3;i++){
        for(j=0;j<256;j++){
            if(((innerNode *)pNode)->nextLevelNodes[j]){
                pNode=((innerNode *)pNode)->nextLevelNodes[j];
                break;
            } 
        }
    }
    return pNode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
xorl %ecx, %ecx
cmpl $0x3, %ecx
je 0x4a10
xorl %edx, %edx
cmpq $0x100, %rdx            # imm = 0x100
je 0x4a06
movq (%rax,%rdx,8), %rsi
incq %rdx
testq %rsi, %rsi
je 0x49ef
jmp 0x4a09
movq %rax, %rsi
incl %ecx
movq %rsi, %rax
jmp 0x49e8
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/exportDataAndIndex.cpp
// Function: writeIpIndexFile(char const*)
int writeIpIndexFile(const char *path){
    int writedBytes=writeIndexFile(path,trieNodeArr,sizeof(trieNodeOffset)*trieNodeNum);
    if(writedBytes==-1){
        printf("suffer error when write ip index file!\n");
    }
    return writedBytes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl 0x679f74e2(%rip), %edx  # 0x679fbf00
shll $0xa, %edx
leaq 0x679f74e8(%rip), %rsi  # 0x679fbf10
callq 0x4a7c
movl %eax, %ebx
cmpl $-0x1, %eax
jne 0x4a40
leaq 0x18fc(%rip), %rdi      # 0x6337
callq 0x2450
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/exportDataAndIndex.cpp
// Function: writePortIndexFile(char const*)
int writePortIndexFile(const char *path){
    int writedBytes=writeIndexFile(path,portOffsetTable,65536*sizeof(int));
    if(writedBytes==-1){
        printf("suffer error when write port index file!\n");
    }
    return writedBytes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x6aacb50a(%rip), %rsi  # 0x6aacff60
movl $0x40000, %edx          # imm = 0x40000
callq 0x4a7c
movl %eax, %ebx
cmpl $-0x1, %eax
jne 0x4a73
leaq 0x18f0(%rip), %rdi      # 0x635e
callq 0x2450
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq