LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/yueww[P]TSR/yyThreadPool.c
// Function: thread_work(void*)
void *thread_work(void *args){
    pthread_detach(pthread_self());
    threadpool_t *pThreadPool=(threadpool_t *)args;
    while(keepAlive){
        bsem_wait((pThreadPool->tasks).has_tasks);
        if(keepAlive){
            pthread_mutex_lock(&(pThreadPool->tmutex));
            pThreadPool->num_running_threads++;
            pthread_mutex_unlock(&(pThreadPool->tmutex));
            task *t;
            pthread_mutex_lock(&((pThreadPool->tasks).qmutex));
            if((pThreadPool->tasks).qlen==0){
                pthread_mutex_unlock(&((pThreadPool->tasks).qmutex));
                continue;
            }else if((pThreadPool->tasks).qlen==1){
                t=(pThreadPool->tasks).front;
                (pThreadPool->tasks).front=NULL;
                (pThreadPool->tasks).rear=NULL;
            }else{
                t=(pThreadPool->tasks).front;
                (pThreadPool->tasks).front=((pThreadPool->tasks).front)->next;
                bsem_post((pThreadPool->tasks).has_tasks);
            }
            (pThreadPool->tasks).qlen--;
            if((pThreadPool->tasks).qlen==((pThreadPool->tasks).max_len-1)){
                pthread_cond_signal(&((pThreadPool->tasks).not_full));
            }
            pthread_mutex_unlock(&((pThreadPool->tasks).qmutex));
            void *(*func)(void *)=t->func;
            func(t->args);
            free(t);
            pthread_mutex_lock(&(pThreadPool->tmutex));
            pThreadPool->num_running_threads--;
#ifdef LIMITTASK
            pthread_cond_signal(&(pThreadPool->has_idle));
#endif
            pthread_mutex_unlock(&(pThreadPool->tmutex));
        }
    }
    pthread_mutex_lock(&(pThreadPool->tmutex));
    pThreadPool->num_alive_threads--;
    pthread_mutex_unlock(&(pThreadPool->tmutex));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2270
movq %rax, %rdi
callq 0x2190
cmpl $0x0, 0x7a4b(%rip)      # 0xa2a4
je 0x2920
leaq 0x88(%rbx), %r14
leaq 0x10(%rbx), %r15
leaq 0x38(%rbx), %r12
movq 0x70(%rbx), %rdi
callq 0x293d
cmpl $0x0, 0x7a26(%rip)      # 0xa2a4
je 0x2913
movq %r14, %rdi
callq 0x23f0
incl 0x84(%rbx)
movq %r14, %rdi
callq 0x21e0
movq %r15, %rdi
callq 0x23f0
movl 0x6c(%rbx), %eax
movq %r15, %rdi
testl %eax, %eax
je 0x290e
cmpl $0x1, %eax
jne 0x28bc
movq (%rbx), %r13
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x28cf
movq (%rbx), %r13
movq 0x70(%rbx), %rdi
movq 0x10(%r13), %rax
movq %rax, (%rbx)
callq 0x297a
movl 0x6c(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x6c(%rbx)
cmpl 0x68(%rbx), %eax
jne 0x28e5
movq %r12, %rdi
callq 0x2030
movq %r15, %rdi
callq 0x21e0
movq 0x8(%r13), %rdi
callq *(%r13)
movq %r13, %rdi
callq 0x2330
movq %r14, %rdi
callq 0x23f0
decl 0x84(%rbx)
movq %r14, %rdi
callq 0x21e0
cmpl $0x0, 0x798a(%rip)      # 0xa2a4
jne 0x286e
leaq 0x88(%rbx), %r14
movq %r14, %rdi
callq 0x23f0
decl 0x80(%rbx)
movq %r14, %rdi
callq 0x21e0
// File: /workspace/github_cpp_makefile_star2_O1/yueww[P]TSR/yyThreadPool.c
// Function: bsem_wait(bsem*)
void bsem_wait(bsem *pBsem){
    pthread_mutex_lock(&(pBsem->mut));
    while(pBsem->sem==0) pthread_cond_wait(&(pBsem->con),&(pBsem->mut));
    pBsem->sem=0;
    pthread_mutex_unlock(&(pBsem->mut));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x23f0
cmpl $0x0, 0x58(%rbx)
jne 0x2967
leaq 0x28(%rbx), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2430
cmpl $0x0, 0x58(%rbx)
je 0x2956
movl $0x0, 0x58(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x21e0
// File: /workspace/github_cpp_makefile_star2_O1/yueww[P]TSR/yyThreadPool.c
// Function: bsem_post(bsem*)
void bsem_post(bsem *pBsem){
    pthread_mutex_lock(&(pBsem->mut));
    pBsem->sem=1;
    pthread_cond_signal(&(pBsem->con));
    pthread_mutex_unlock(&(pBsem->mut));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x23f0
movl $0x1, 0x58(%rbx)
leaq 0x28(%rbx), %rdi
callq 0x2030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x21e0
// File: /workspace/github_cpp_makefile_star2_O1/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
movl $0x18, %edi
callq 0x2360
testq %rax, %rax
je 0x2a17
movq %rax, %r15
movq %r12, (%rax)
movq %r14, 0x8(%rax)
movq $0x0, 0x10(%rax)
leaq 0x10(%rbx), %r14
movq %r14, %rdi
callq 0x23f0
movl 0x6c(%rbx), %eax
cmpl 0x68(%rbx), %eax
jne 0x2a06
leaq 0x38(%rbx), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x2430
movl 0x6c(%rbx), %eax
cmpl 0x68(%rbx), %eax
je 0x29f3
leaq 0x8(%rbx), %rcx
testl %eax, %eax
je 0x2a1e
movq (%rcx), %rdx
addq $0x10, %rdx
jmp 0x2a24
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2a42
movq %rcx, %rdx
movq %rbx, %rcx
movq %r15, (%rdx)
movq %r15, (%rcx)
incl %eax
movl %eax, 0x6c(%rbx)
movq 0x70(%rbx), %rdi
callq 0x297a
movq %r14, %rdi
callq 0x21e0
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x7845(%rip)      # 0xa2a4
cmpl $0x0, 0x80(%rdi)
je 0x2a81
movq 0x70(%rbx), %rdi
callq 0x297a
xorl %edi, %edi
callq 0x21d0
cmpl $0x0, 0x80(%rbx)
jne 0x2a68
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x2a9a
movq 0x10(%rdi), %r14
callq 0x2330
movq %r14, %rdi
testq %r14, %r14
jne 0x2a89
movq 0x70(%rbx), %rdi
callq 0x2330
movq 0x78(%rbx), %rdi
callq 0x2330
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2330
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2b04
leaq 0x10(%rbx), %rdi
callq 0x21e0
movq 0x70(%rbx), %rax
movslq 0x8(%rax), %r14
movl $0xba, %edi
xorl %eax, %eax
callq 0x2050
cmpq %r14, %rax
jne 0x2b2a
movq 0x70(%rbx), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x21e0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 $0x18, %rsp
movl $0x1, %edi
xorl %esi, %esi
callq 0x20c0
movl $0x4, %edi
movl $0x10, %esi
callq 0x26dc
movq %rax, %rbx
movq %rax, 0x7753(%rip)      # 0xa2b8
movl $0x2, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x2090
movl %eax, %r14d
xorps %xmm0, %xmm0
leaq -0x40(%rbp), %rsi
movaps %xmm0, (%rsi)
movq $0x2b020002, (%rsi)     # imm = 0x2B020002
movl %eax, %edi
movl $0x10, %edx
callq 0x2060
cmpl $-0x1, %eax
jne 0x2bae
leaq 0x44c9(%rip), %rdi      # 0x706b
callq 0x2450
xorl %edi, %edi
callq 0x24b0
movq %rbx, -0x30(%rbp)
xorl %r13d, %r13d
leaq 0x7764(%rip), %rbx      # 0xa320
leaq 0x66(%rip), %r15        # 0x2c29
movl %r13d, %eax
andl $0xf, %eax
movl %eax, %ecx
shll $0xc, %ecx
leal (%rcx,%rax,4), %r12d
leaq (%r12,%rbx), %rsi
addq $0x4, %rsi
movl $0x1000, %edx           # imm = 0x1000
movl %r14d, %edi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x21f0
addq %rbx, %r12
movl %eax, (%r12)
movq 0x76bb(%rip), %rdi      # 0xa2b8
movq %r15, %rsi
movq %r12, %rdx
callq 0x29a6
incq %r13
jmp 0x2bc3
movq %rax, %r14
jmp 0x2c19
movq %rax, %r14
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x2adc
movq %r14, %rdi
callq 0x24a0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2270
movq %rax, %rdi
callq 0x2190
movl (%r14), %eax
addl $-0x18, %eax
movl $0xaaaaaaab, %ebx       # imm = 0xAAAAAAAB
imulq %rax, %rbx
shrq $0x25, %rbx
leaq 0x765f(%rip), %rdi      # 0xa2c0
callq 0x23f0
movl 0x7647(%rip), %r15d     # 0xa2b4
addl %ebx, %r15d
cmpl $0x61a81, %r15d         # imm = 0x61A81
jl 0x2ca5
leaq 0x7668(%rip), %r12      # 0xa2e8
leaq 0x7639(%rip), %r13      # 0xa2c0
movq %r12, %rdi
movq %r13, %rsi
callq 0x2430
movl 0x761b(%rip), %r15d     # 0xa2b4
addl %ebx, %r15d
cmpl $0x61a80, %r15d         # imm = 0x61A80
jg 0x2c87
cmpl $0x61a80, 0x7601(%rip)  # imm = 0x61A80
jne 0x2cbb
movl $0x0, 0x75f5(%rip)      # 0xa2b0
movl 0x75ef(%rip), %eax      # 0xa2b0
leal (%rax,%rbx), %r13d
leaq (%rax,%rax,2), %rcx
shlq $0x4, %rcx
leaq 0x1768c(%rip), %rdi     # 0x1a360
addq %rcx, %rdi
addq $0x1c, %r14
cmpl $0x61a81, %r13d         # imm = 0x61A81
jb 0x2d29
movl $0x61a80, %r12d         # imm = 0x61A80
subl %eax, %r12d
movl %r12d, %eax
shll $0x4, %eax
leal (%rax,%rax,2), %edx
movq %rdx, -0x30(%rbp)
movq %r14, %rsi
callq 0x2240
addq -0x30(%rbp), %r14
movl %ebx, %eax
subl %r12d, %eax
shll $0x4, %eax
leal (%rax,%rax,2), %edx
leaq 0x17648(%rip), %rdi     # 0x1a360
movq %r14, %rsi
callq 0x2240
addl $0xfff9e580, %r13d      # imm = 0xFFF9E580
jmp 0x2d39
movl %ebx, %eax
shll $0x4, %eax
leal (%rax,%rax,2), %edx
movq %r14, %rsi
callq 0x2240
movl %r13d, 0x7570(%rip)     # 0xa2b0
movl %r15d, 0x756d(%rip)     # 0xa2b4
leaq 0x42f5(%rip), %rdi      # 0x7043
movl %ebx, %esi
movl %r15d, %edx
xorl %eax, %eax
callq 0x2040
cmpl $0xfa0, 0x7550(%rip)    # imm = 0xFA0
jl 0x2d72
leaq 0x6ab0e2ab(%rip), %rdi  # 0x6ab11018
callq 0x2030
leaq 0x7547(%rip), %rdi      # 0xa2c0
callq 0x21e0
// File: /workspace/github_cpp_makefile_star2_O1/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)
movq $0x0, 0x10(%rdi)
leaq -0x2760(%rbp), %rdi
callq 0x3242
leaq -0x2760(%rbp), %rdi
callq 0x2390
movl %eax, %eax
movq %rax, -0x13d8(%rbp)
movl $0x1, %ecx
movq %rax, %rdx
shrq $0x1e, %rdx
xorl %eax, %edx
imull $0x6c078965, %edx, %eax # imm = 0x6C078965
addl %ecx, %eax
movq %rax, -0x13d8(%rbp,%rcx,8)
incq %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0x2f7e
movq $0x270, -0x58(%rbp)     # imm = 0x270
xorl %eax, %eax
movq %rax, -0x50(%rbp)
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, -0x48(%rbp)
movq %rax, -0x40(%rbp)
movb $0x0, -0x38(%rbp)
testl %r14d, %r14d
jle 0x3016
leaq -0x13d8(%rbp), %r15
leaq -0x50(%rbp), %r12
leaq -0x30(%rbp), %r13
movq %r12, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x335a
movsd %xmm0, -0x30(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3006
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x3011
movq %rbx, %rdi
movq %r13, %rdx
callq 0x36c0
decl %r14d
jne 0x2fdb
leaq -0x2760(%rbp), %rdi
callq 0x22a0
movq %rbx, %rax
addq $0x2738, %rsp           # imm = 0x2738
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3064
jmp 0x3040
movq %rax, %r14
jmp 0x304f
movq %rax, %r14
leaq -0x2760(%rbp), %rdi
callq 0x22a0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x305c
callq 0x22b0
movq %r14, %rdi
callq 0x24a0
movq %rax, %rdi
callq 0x334b
// File: /workspace/github_cpp_makefile_star2_O1/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, -0x18(%rbp)
leaq -0x2728(%rbp), %rbx
movq %rbx, %rdi
callq 0x3242
movq %rbx, %rdi
callq 0x2390
movl %eax, %eax
movq %rax, -0x13a0(%rbp)
movl $0x1, %ecx
movq %rax, %rdx
shrq $0x1e, %rdx
xorl %eax, %edx
imull $0x6c078965, %edx, %eax # imm = 0x6C078965
addl %ecx, %eax
movq %rax, -0x13a0(%rbp,%rcx,8)
incq %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0x30a2
leaq -0x13a0(%rbp), %rdi
movq $0x270, 0x1380(%rdi) # imm = 0x270
callq 0x3450
movsd %xmm0, -0x10(%rbp)
leaq -0x2728(%rbp), %rdi
callq 0x22a0
movsd -0x10(%rbp), %xmm1
mulsd -0x18(%rbp), %xmm1
xorpd %xmm0, %xmm0
addsd %xmm1, %xmm0
addq $0x2728, %rsp           # imm = 0x2728
popq %rbx
popq %rbp
retq
jmp 0x3126
jmp 0x310f
movq %rax, %rbx
leaq -0x2728(%rbp), %rdi
callq 0x22a0
movq %rbx, %rdi
callq 0x24a0
movq %rax, %rdi
callq 0x334b
// File: /workspace/github_cpp_makefile_star2_O1/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, -0x48(%rbp)
movl %edi, %ebx
leaq 0x1266a23(%rip), %r15   # 0x1269b70
xorl %r12d, %r12d
leaq -0x40(%rbp), %r14
leaq 0x1266af5(%rip), %r13   # 0x1269c50
movq %r14, %rdi
movl %ebx, %esi
callq 0x2f30
movq -0x10(%r15), %rdi
movq -0x40(%rbp), %rax
movq %rax, -0x10(%r15)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%r15)
movq -0x30(%rbp), %rax
movq %rax, (%r15)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
testq %rdi, %rdi
je 0x3199
callq 0x22b0
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x31a7
callq 0x22b0
movsd -0x48(%rbp), %xmm0
callq 0x306c
movsd %xmm0, (%r12,%r13)
addq $0x8, %r12
addq $0x18, %r15
cmpq $0x50, %r12
jne 0x315b
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1266a6b(%rip), %rsi   # 0x1269c50
leaq 0x1266974(%rip), %rdi   # 0x1269b60
movsd 0x3f0c(%rip), %xmm0     # 0x7100
xorl %eax, %eax
movsd (%rsi,%rcx,8), %xmm1
leaq (%rcx,%rcx,2), %r8
movq (%rdi,%r8,8), %r8
xorl %r9d, %r9d
movzwl (%rdx,%r9,2), %r10d
xorps %xmm2, %xmm2
cvtsi2sd %r10d, %xmm2
mulsd (%r8,%r9,8), %xmm2
addsd %xmm2, %xmm1
incq %r9
cmpq $0xa, %r9
jne 0x3206
divsd %xmm0, %xmm1
cvttsd2si %xmm1, %r8d
addl %r8d, %eax
incq %rcx
cmpq $0xa, %rcx
jne 0x31f6
andl $0x3ff, %eax            # imm = 0x3FF
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r12d, %r12d
leaq 0x6ab0d836(%rip), %r13  # 0x6ab11050
leaq 0x126647f(%rip), %rbx   # 0x1269ca0
leaq (%r12,%r12,2), %rax
shlq $0x4, %rax
leaq (%rax,%r13), %r14
movups (%r13,%rax), %xmm0
movups 0x10(%r13,%rax), %xmm1
movups 0x20(%r13,%rax), %xmm2
movaps %xmm2, -0x50(%rbp)
movaps %xmm1, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
xorl %eax, %eax
movzbl -0x70(%rbp,%rax), %ecx
movw %cx, -0x40(%rbp,%rax,2)
incq %rax
cmpq $0x4, %rax
jne 0x384d
movq $-0x4, %rax
movzbl -0x68(%rbp,%rax), %ecx
movw %cx, -0x30(%rbp,%rax,2)
incq %rax
jne 0x3867
movzwl -0x50(%rbp), %eax
movzwl -0x4e(%rbp), %ecx
rolw $0x8, %ax
movw %ax, -0x30(%rbp)
rolw $0x8, %cx
movw %cx, -0x2e(%rbp)
movl -0x30(%rbp), %eax
movl %eax, 0x10(%rsp)
movups -0x40(%rbp), %xmm0
movups %xmm0, (%rsp)
callq 0x31d4
movl %eax, %r15d
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps -0xa0(%rbp), %xmm0
movaps -0x90(%rbp), %xmm1
movaps -0x80(%rbp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movl %eax, %edi
callq 0x39c9
movslq %r15d, %rax
shlq $0x6, %rax
cmpl $0x1f40, (%rax,%rbx)    # imm = 0x1F40
jl 0x3910
leaq 0x387d(%rip), %rdi      # 0x7180
callq 0x2450
movl %r15d, %edi
callq 0x3a76
cmpl $0x3e8000, 0xed36396(%rip) # imm = 0x3E8000
jl 0x395d
leaq 0x3885(%rip), %rdi      # 0x71a8
callq 0x2450
xorl %edx, %edx
movl $0x40, %eax
movl $0x1, %ecx
movl (%rax,%rbx), %esi
movslq %edx, %r8
shlq $0x6, %r8
movl %ecx, %edi
cmpl (%r8,%rbx), %esi
jg 0x3948
movl %edx, %edi
addq $0x40, %rax
incl %ecx
movl %edi, %edx
cmpq $0x10000, %rax          # imm = 0x10000
jne 0x3934
callq 0x3a76
incq %r12
cmpq $0xfa0, %r12            # imm = 0xFA0
jne 0x3821
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movzbl (%rax,%rcx), %edx
movw %dx, (%rdi,%rcx,2)
incq %rcx
cmpq $0x4, %rcx
jne 0x3989
xorl %ecx, %ecx
movzbl 0x4(%rax,%rcx), %edx
movw %dx, 0x8(%rdi,%rcx,2)
incq %rcx
cmpq $0x4, %rcx
jne 0x399c
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_O1/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 0xed362be(%rip), %r14   # 0xed39ca0
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 0x1266293(%rip), %rdx   # 0x1269ca0
leaq (%rcx,%rdx), %r12
addq $0x8, %r12
incl -0x8(%r12)
movq %rax, 0xed3627f(%rip)   # 0xed39ca0
movq %r12, %r15
movq %r12, %rax
movq %rax, %r13
leaq 0x8(%r13), %rdi
movq %rbx, %rsi
callq 0x3b22
testl %eax, %eax
je 0x3a4a
cmpq %r12, %r13
jne 0x3a58
movq (%r13), %r13
testq %r13, %r13
jne 0x3a2a
jmp 0x3a58
movq (%r13), %rax
movq %r13, %r15
testq %rax, %rax
jne 0x3a27
jmp 0x3a5b
movq %r13, %rax
movq %r14, (%r15)
movq %rax, (%r14)
incl 0xed36249(%rip)         # 0xed39cb0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x126621c(%rip), %rdx   # 0x1269ca0
cmpq $0x0, 0xed36214(%rip)   # 0xed39ca0
movq 0x8(%rcx,%rdx), %rsi
je 0x3a9c
movq 0xed3620e(%rip), %rdi   # 0xed39ca8
jmp 0x3aa3
leaq 0xed361fd(%rip), %rdi   # 0xed39ca0
pushq %rbp
movq %rsp, %rbp
leaq (%rdx,%rcx), %rax
leaq 0x8(%rcx,%rdx), %rcx
movq %rsi, (%rdi)
leaq 0x653d3a16(%rip), %rdx  # 0x653d74d0
movslq (%rdx), %rsi
leaq (%rsi,%rsi,2), %rdi
shlq $0x4, %rdi
addq 0x6514(%rip), %rdi      # 0x9fe0
xorl %r8d, %r8d
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)
addq $0x30, %rdi
decl %r8d
cmpl $0xfffff060, %r8d       # imm = 0xFFFFF060
jne 0x3acf
subl %r8d, %esi
movl %esi, (%rdx)
movq (%rcx), %rdx
movq %rdx, 0x8(%rax)
movq $0x0, (%rcx)
movl $0xfffff060, %edx       # imm = 0xFFFFF060
addl %edx, (%rax)
movq %rcx, 0xed3618e(%rip)   # 0xed39ca8
addl %edx, 0xed36190(%rip)   # 0xed39cb0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3b50
movl 0x4(%rdi), %ecx
cmpl 0x4(%rsi), %ecx
je 0x3b50
movzwl 0x20(%rdi), %ecx
cmpw 0x20(%rsi), %cx
je 0x3b50
movzwl 0x22(%rdi), %ecx
xorl %eax, %eax
cmpw 0x22(%rsi), %cx
sete %al
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3f33
movl 0x653d360b(%rip), %esi  # 0x653d74e8
xorl %ecx, %ecx
leaq 0x519535da(%rip), %rdx  # 0x519574c0
movzbl (%rax,%rcx), %r8d
cmpq $0x0, (%rdi,%r8,8)
jne 0x3f08
movslq %esi, %r9
incl %esi
movl %esi, 0x653d35eb(%rip)  # 0x653d74e8
shlq $0xb, %r9
addq %rdx, %r9
movq %r9, (%rdi,%r8,8)
movq (%rdi,%r8,8), %rdi
incq %rcx
cmpq $0x1, %rcx
je 0x3ee6
movzbl 0x2(%rax), %eax
leaq (%rdi,%rax,8), %rax
cmpq $0x0, (%rax)
jne 0x3fa0
leaq 0x56773596(%rip), %rcx  # 0x567774c0
leaq 0x653d35bb(%rip), %rdx  # 0x653d74ec
jmp 0x3f8e
movl 0x653d35b7(%rip), %esi  # 0x653d74f0
xorl %ecx, %ecx
leaq 0x5406357e(%rip), %rdx  # 0x540674c0
movzbl 0x4(%rax,%rcx), %r8d
cmpq $0x0, (%rdi,%r8,8)
jne 0x3f65
movslq %esi, %r9
incl %esi
movl %esi, 0x653d3596(%rip)  # 0x653d74f0
shlq $0xb, %r9
addq %rdx, %r9
movq %r9, (%rdi,%r8,8)
movq (%rdi,%r8,8), %rdi
incq %rcx
cmpq $0x1, %rcx
je 0x3f42
movzbl 0x6(%rax), %eax
leaq (%rdi,%rax,8), %rax
cmpq $0x0, (%rax)
jne 0x3fa0
leaq 0x5dca3539(%rip), %rcx  # 0x5dca74c0
leaq 0x653d3566(%rip), %rdx  # 0x653d74f4
movslq (%rdx), %rsi
leal 0x1(%rsi), %edi
movl %edi, (%rdx)
shlq $0xc, %rsi
addq %rcx, %rsi
movq %rsi, (%rax)
movq (%rax), %rax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3fea
movzbl 0x3(%rax), %eax
movq 0x800(%rdi,%rax,8), %rdx
movslq 0x653d3513(%rip), %rsi  # 0x653d74d8
shlq $0x4, %rsi
leaq 0x2b6f94f0(%rip), %rcx  # 0x2b6fd4c0
addq %rsi, %rcx
testq %rdx, %rdx
je 0x4022
movq %rcx, 0x8(%rdx)
movq 0x800(%rdi,%rax,8), %rcx
movq 0x8(%rcx), %rcx
jmp 0x4026
movzbl 0x7(%rax), %eax
movq 0x800(%rdi,%rax,8), %rdx
movslq 0x653d34df(%rip), %rsi  # 0x653d74dc
shlq $0x4, %rsi
leaq 0x34f8fcb8(%rip), %rcx  # 0x34f93cc0
addq %rsi, %rcx
testq %rdx, %rdx
je 0x4037
movq %rcx, 0x8(%rdx)
movq 0x800(%rdi,%rax,8), %rcx
movq 0x8(%rcx), %rcx
jmp 0x403b
movq %rcx, (%rdi,%rax,8)
movq %rcx, 0x800(%rdi,%rax,8)
leaq 0x653d34a3(%rip), %rax  # 0x653d74d8
jmp 0x404a
movq %rcx, (%rdi,%rax,8)
movq %rcx, 0x800(%rdi,%rax,8)
leaq 0x653d3492(%rip), %rax  # 0x653d74dc
incl (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x40a1
movzwl 0x20(%rax), %eax
rolw $0x8, %ax
movzwl %ax, %eax
leaq 0x651d3463(%rip), %rcx  # 0x651d74d0
movq 0x80000(%rcx,%rax,8), %rsi
movslq 0x653d3464(%rip), %rdi  # 0x653d74e0
shlq $0x4, %rdi
leaq 0x3e826439(%rip), %rdx  # 0x3e82a4c0
addq %rdi, %rdx
testq %rsi, %rsi
je 0x40e7
movq %rdx, 0x8(%rsi)
movq 0x80000(%rcx,%rax,8), %rdx
movq 0x8(%rdx), %rdx
jmp 0x40eb
movzwl 0x22(%rax), %eax
rolw $0x8, %ax
movzwl %ax, %eax
leaq 0x652d341d(%rip), %rcx  # 0x652d74d0
movq 0x80000(%rcx,%rax,8), %rsi
movslq 0x653d3422(%rip), %rdi  # 0x653d74e4
shlq $0x4, %rdi
leaq 0x480bcbf3(%rip), %rdx  # 0x480c0cc0
addq %rdi, %rdx
testq %rsi, %rsi
je 0x40fc
movq %rdx, 0x8(%rsi)
movq 0x80000(%rcx,%rax,8), %rdx
movq 0x8(%rdx), %rdx
jmp 0x4100
movq %rdx, (%rcx,%rax,8)
movq %rdx, 0x80000(%rcx,%rax,8)
leaq 0x653d33e6(%rip), %rax  # 0x653d74e0
jmp 0x410f
movq %rdx, (%rcx,%rax,8)
movq %rdx, 0x80000(%rcx,%rax,8)
leaq 0x653d33d5(%rip), %rax  # 0x653d74e4
incl (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x653d33c5(%rip) # imm = 0x4B00
jg 0x4189
movb $0x2, %al
cmpl $0x7080, 0x653d33bb(%rip) # imm = 0x7080
jg 0x4189
movb $0x4, %al
cmpl $0x4b00, 0x653d33b1(%rip) # imm = 0x4B00
jg 0x4189
movb $0x8, %al
cmpl $0x7080, 0x653d33a7(%rip) # imm = 0x7080
jg 0x4189
movb $0x10, %al
cmpl $0x927c00, 0x653d337d(%rip) # imm = 0x927C00
jg 0x4189
movb $0x20, %al
cmpl $0x927c00, 0x653d3373(%rip) # imm = 0x927C00
jg 0x4189
movb $0x40, %al
cmpl $0x927c00, 0x653d3369(%rip) # imm = 0x927C00
jg 0x4189
cmpl $0x927c01, 0x653d3361(%rip) # imm = 0x927C01
setge %al
shlb $0x7, %al
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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, %rbx
movq %rdi, %r12
callq 0x2420
testq %rax, %rax
je 0x41e0
movq %rax, %r15
movq %rax, %rdi
callq 0x2440
testq %rax, %rax
je 0x41f2
xorl %r14d, %r14d
addq $0x13, %rax
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2080
cmpq $0x1, %rax
sbbl $-0x1, %r14d
movq %r15, %rdi
callq 0x2440
testq %rax, %rax
jne 0x41ba
jmp 0x420b
movq %r12, %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x2120
cmpl $-0x1, %eax
je 0x41f7
xorl %r14d, %r14d
jmp 0x420b
leaq 0x2fd1(%rip), %rdi      # 0x71cf
xorl %r14d, %r14d
movq %r12, %rsi
xorl %eax, %eax
callq 0x2040
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x428d
xorl %eax, %eax
movl %edi, %ecx
movslq %ecx, %rdx
imulq $0x66666667, %rdx, %rcx # imm = 0x66666667
movq %rcx, %r8
shrq $0x3f, %r8
sarq $0x22, %rcx
addl %r8d, %ecx
addl $0x9, %edx
incq %rax
cmpl $0x12, %edx
ja 0x4223
movb $0x0, (%rsi,%rax)
movslq %eax, %rcx
movslq %edi, %rax
imulq $0x66666667, %rax, %rdi # imm = 0x66666667
movq %rdi, %rdx
shrq $0x3f, %rdx
sarq $0x22, %rdi
addl %edx, %edi
leal (%rdi,%rdi), %edx
leal (%rdx,%rdx,4), %edx
movl %eax, %r8d
subl %edx, %r8d
addb $0x30, %r8b
movb %r8b, -0x1(%rsi,%rcx)
decq %rcx
addl $0x9, %eax
cmpl $0x12, %eax
ja 0x424d
xorl %eax, %eax
negq %rcx
sbbl %eax, %eax
jmp 0x4294
movw $0x30, (%rsi)
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2290
movq %r15, %rdi
callq 0x21c0
movslq %ebx, %rsi
leaq 0x2f23(%rip), %rdx      # 0x71e6
movq %r14, %rdi
movq %rax, %rcx
callq 0x2230
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/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 0x45a9
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movq %rdi, %rdx
movq %rcx, %rdi
movl (%rcx), %ecx
subl (%rdx), %ecx
cmpl $0x3f, %ecx
ja 0x45a7
movq 0x8(%rdi), %rcx
incl %eax
testq %rcx, %rcx
je 0x45a7
cmpl $0x5, %eax
jne 0x4583
movl $0x5, %eax
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x45d7
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movq %rdi, %rdx
movq %rcx, %rdi
movl (%rcx), %ecx
subl (%rdx), %ecx
cmpl $0x1, %ecx
ja 0x45d5
incl %eax
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
jne 0x45bb
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movq (%rdi), %rcx
testq %rcx, %rcx
sete %dl
testl %esi, %esi
setle %r8b
xorl %eax, %eax
orb %dl, %r8b
jne 0x4609
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movq 0x8(%rcx), %rcx
movq %rcx, (%rdi)
incl %eax
testq %rcx, %rcx
je 0x4608
cmpl %esi, %eax
jl 0x45f6
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x679f88ef(%rip), %rax  # 0x679fcf00
leaq 0x653d2ee8(%rip), %rdx  # 0x653d7500
movl $0xc0000000, (%rdx,%rax,4) # imm = 0xC0000000
movq 0x8(%rdi), %r8
testq %r8, %r8
je 0x4665
pushq %rbp
movq %rsp, %rbp
movl (%rdx,%rax,4), %esi
xorl %ecx, %ecx
movq %rdi, %r9
movq %r8, %rdi
movl %esi, %r8d
movl (%rdi), %esi
subl (%r9), %esi
shll %cl, %esi
orl %r8d, %esi
movl %esi, (%rdx,%rax,4)
movq 0x8(%rdi), %r8
testq %r8, %r8
je 0x465c
leal 0x6(%rcx), %r9d
cmpl $0x18, %ecx
movl %r9d, %ecx
jne 0x4631
incl %eax
movl %eax, 0x679f889c(%rip)  # 0x679fcf00
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x679f8893(%rip), %rax  # 0x679fcf00
leaq 0x653d2e8c(%rip), %rdx  # 0x653d7500
movl $0x80000000, (%rdx,%rax,4) # imm = 0x80000000
movq 0x8(%rdi), %r8
testq %r8, %r8
je 0x46c1
pushq %rbp
movq %rsp, %rbp
movl (%rdx,%rax,4), %esi
xorl %ecx, %ecx
movq %rdi, %r9
movq %r8, %rdi
movl %esi, %r8d
movl (%rdi), %esi
subl (%r9), %esi
shll %cl, %esi
orl %r8d, %esi
movl %esi, (%rdx,%rax,4)
movq 0x8(%rdi), %r8
testq %r8, %r8
je 0x46b8
leal 0xa(%rcx), %r9d
cmpl $0x14, %ecx
movl %r9d, %ecx
jne 0x468d
incl %eax
movl %eax, 0x679f8840(%rip)  # 0x679fcf00
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x46fa
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movq %rdi, %rdx
movq %rcx, %rdi
movl (%rcx), %ecx
subl (%rdx), %ecx
cmpl $0x3ff, %ecx            # imm = 0x3FF
ja 0x46f8
movq 0x8(%rdi), %rcx
incl %eax
testq %rcx, %rcx
je 0x46f8
cmpl $0x3, %eax
jne 0x46d1
movl $0x3, %eax
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x679f87fc(%rip), %rax  # 0x679fcf00
leaq 0x653d2df5(%rip), %rdx  # 0x653d7500
movl $0x40000000, (%rdx,%rax,4) # imm = 0x40000000
movq 0x8(%rdi), %r8
testq %r8, %r8
je 0x4757
pushq %rbp
movq %rsp, %rbp
movl (%rdx,%rax,4), %esi
xorl %ecx, %ecx
movq %rdi, %r9
movq %r8, %rdi
movl %esi, %r8d
movl (%rdi), %esi
subl (%r9), %esi
shll %cl, %esi
orl %r8d, %esi
movl %esi, (%rdx,%rax,4)
movq 0x8(%rdi), %r8
testq %r8, %r8
je 0x474e
leal 0xf(%rcx), %r9d
testl %ecx, %ecx
movl %r9d, %ecx
je 0x4724
incl %eax
movl %eax, 0x679f87aa(%rip)  # 0x679fcf00
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4790
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movq %rdi, %rdx
movq %rcx, %rdi
movl (%rcx), %ecx
subl (%rdx), %ecx
cmpl $0x7fff, %ecx           # imm = 0x7FFF
ja 0x478e
movq 0x8(%rdi), %rcx
incl %eax
testq %rcx, %rcx
je 0x478e
cmpl $0x1, %eax
je 0x4767
movl $0x2, %eax
popq %rbp
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
subq $0x280, %rsp            # imm = 0x280
leaq 0x6ab3bdb7(%rip), %r14  # 0x6ab40560
cmpb $0x1, (%r14)
jne 0x47c0
leaq -0x90(%rbp), %rdi
movl $0x80, %esi
callq 0x4296
movl $0x14, %edi
callq 0x2360
movq %rax, %rbx
callq 0x48b3
movl %eax, (%rbx)
leaq 0x651d2ce5(%rip), %rax  # 0x651d74c0
movq (%rax), %rdi
movl $0x1, %esi
callq 0x49be
movl %eax, 0x4(%rbx)
leaq 0x651d2cd6(%rip), %rax  # 0x651d74c8
movq (%rax), %rdi
movl $0x2, %esi
callq 0x49be
movl %eax, 0x8(%rbx)
leaq 0x651d2cc7(%rip), %rdi  # 0x651d74d0
movl $0x1, %esi
callq 0x4cdf
movl %eax, 0xc(%rbx)
leaq 0x652d2cb3(%rip), %rdi  # 0x652d74d0
movl $0x2, %esi
callq 0x4cdf
movl %eax, 0x10(%rbx)
cmpb $0x1, (%r14)
jne 0x48a4
leaq -0x90(%rbp), %r10
leaq 0x6ab0c7b2(%rip), %r11  # 0x6ab10ff0
leaq 0x29b3(%rip), %rsi      # 0x71f8
leaq 0x6ab0c724(%rip), %rdx  # 0x6ab10f70
leaq 0x6ab0c73d(%rip), %rcx  # 0x6ab10f90
leaq 0x6ab0c776(%rip), %r8   # 0x6ab10fd0
leaq 0x6ab0c74f(%rip), %r9   # 0x6ab10fb0
leaq -0x290(%rbp), %r14
movq %r14, %rdi
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0x2070
addq $0x10, %rsp
movq %r14, %rdi
callq 0x2100
leaq 0x6ab3b84f(%rip), %rdi  # 0x6ab400d8
movq %r14, %rsi
movq %rax, %rdx
callq 0x2380
testl %eax, %eax
je 0x48a4
leaq 0x2a85(%rip), %rdi      # 0x7324
callq 0x2450
movq %rbx, %rax
addq $0x280, %rsp            # imm = 0x280
popq %rbx
popq %r14
popq %rbp
retq