LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6ab0d826(%rip), %r13  # 0x6ab11040
leaq 0x126646f(%rip), %rbx   # 0x1269c90
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 0x31d1
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 0x2440
movl %r15d, %edi
callq 0x3a77
cmpl $0x3e8000, 0xed36386(%rip) # imm = 0x3E8000
jl 0x395d
leaq 0x3885(%rip), %rdi      # 0x71a8
callq 0x2440
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 0x3a77
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_O3/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 0xed362ae(%rip), %r14   # 0xed39c90
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 0x1266283(%rip), %rdx   # 0x1269c90
leaq (%rcx,%rdx), %r13
addq $0x8, %r13
incl -0x8(%r13)
movq %rax, 0xed36270(%rip)   # 0xed39c90
movq %r13, %r15
movq %r13, %rax
movq %rax, %r12
leaq 0x8(%r12), %rdi
movq %rbx, %rsi
callq 0x3b23
testl %eax, %eax
je 0x3a4a
cmpq %r13, %r12
jne 0x3a5c
movq (%r12), %r12
testq %r12, %r12
jne 0x3a29
jmp 0x3a59
movq (%r12), %rax
movq %r12, %r15
testq %rax, %rax
jne 0x3a26
movq %r12, %r15
xorl %r12d, %r12d
movq %r14, (%r15)
movq %r12, (%r14)
incl 0xed36238(%rip)         # 0xed39ca0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x126620b(%rip), %rdx   # 0x1269c90
cmpq $0x0, 0xed36203(%rip)   # 0xed39c90
movq 0x8(%rcx,%rdx), %rsi
je 0x3a9d
movq 0xed361fd(%rip), %rdi   # 0xed39c98
jmp 0x3aa4
leaq 0xed361ec(%rip), %rdi   # 0xed39c90
pushq %rbp
movq %rsp, %rbp
leaq (%rdx,%rcx), %rax
leaq 0x8(%rcx,%rdx), %rcx
movq %rsi, (%rdi)
leaq 0x653d3a05(%rip), %rdx  # 0x653d74c0
movslq (%rdx), %rsi
leaq (%rsi,%rsi,2), %rdi
shlq $0x4, %rdi
addq 0x6513(%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 0x3ad0
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, 0xed3617d(%rip)   # 0xed39c98
addl %edx, 0xed3617f(%rip)   # 0xed39ca0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3b51
movl 0x4(%rdi), %ecx
cmpl 0x4(%rsi), %ecx
je 0x3b51
movzwl 0x20(%rdi), %ecx
cmpw 0x20(%rsi), %cx
je 0x3b51
movzwl 0x22(%rdi), %ecx
xorl %eax, %eax
cmpw 0x22(%rsi), %cx
sete %al
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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
movb $0x1, %cl
cmpl $0x1, %esi
jne 0x3f28
movl 0x653d361b(%rip), %esi  # 0x653d74d8
xorl %r8d, %r8d
leaq 0x519535e9(%rip), %rdx  # 0x519574b0
movzbl (%rax,%r8), %r8d
movq (%rdi,%r8,8), %r9
testq %r9, %r9
je 0x3eda
movq %r9, %rdi
jmp 0x3ef3
movslq %esi, %r9
incl %esi
movl %esi, 0x653d35f3(%rip)  # 0x653d74d8
shlq $0xb, %r9
addq %rdx, %r9
movq %r9, (%rdi,%r8,8)
movq %r9, %rdi
movl $0x1, %r8d
testb $0x1, %cl
movl $0x0, %ecx
jne 0x3ec7
movzbl 0x2(%rax), %ecx
movq (%rdi,%rcx,8), %rax
testq %rax, %rax
jne 0x3fa6
leaq (%rdi,%rcx,8), %rcx
leaq 0x56773591(%rip), %rdx  # 0x567774b0
leaq 0x653d35b6(%rip), %rsi  # 0x653d74dc
jmp 0x3f94
movl 0x653d35b2(%rip), %esi  # 0x653d74e0
xorl %r8d, %r8d
leaq 0x54063578(%rip), %rdx  # 0x540674b0
movzbl 0x4(%rax,%r8), %r8d
movq (%rdi,%r8,8), %r9
testq %r9, %r9
je 0x3f4c
movq %r9, %rdi
jmp 0x3f65
movslq %esi, %r9
incl %esi
movl %esi, 0x653d3589(%rip)  # 0x653d74e0
shlq $0xb, %r9
addq %rdx, %r9
movq %r9, (%rdi,%r8,8)
movq %r9, %rdi
movl $0x1, %r8d
testb $0x1, %cl
movl $0x0, %ecx
jne 0x3f38
movzbl 0x6(%rax), %ecx
movq (%rdi,%rcx,8), %rax
testq %rax, %rax
jne 0x3fa6
leaq (%rdi,%rcx,8), %rcx
leaq 0x5dca3523(%rip), %rdx  # 0x5dca74b0
leaq 0x653d3550(%rip), %rsi  # 0x653d74e4
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_O3/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 0x3ff0
movzbl 0x3(%rax), %ecx
movq 0x800(%rdi,%rcx,8), %rsi
movslq 0x653d3500(%rip), %rax  # 0x653d74c8
movq %rax, %r8
shlq $0x4, %r8
leaq 0x2b6f94da(%rip), %rdx  # 0x2b6fd4b0
addq %r8, %rdx
testq %rsi, %rsi
je 0x402b
movq %rdx, 0x8(%rsi)
movq 0x800(%rdi,%rcx,8), %rdx
movq 0x8(%rdx), %rdx
jmp 0x402f
movzbl 0x7(%rax), %ecx
movq 0x800(%rdi,%rcx,8), %rsi
movslq 0x653d34c9(%rip), %rax  # 0x653d74cc
movq %rax, %r8
shlq $0x4, %r8
leaq 0x34f8fc9f(%rip), %rdx  # 0x34f93cb0
addq %r8, %rdx
testq %rsi, %rsi
je 0x4040
movq %rdx, 0x8(%rsi)
movq 0x800(%rdi,%rcx,8), %rdx
movq 0x8(%rdx), %rdx
jmp 0x4044
movq %rdx, (%rdi,%rcx,8)
movq %rdx, 0x800(%rdi,%rcx,8)
leaq 0x653d348a(%rip), %rcx  # 0x653d74c8
jmp 0x4053
movq %rdx, (%rdi,%rcx,8)
movq %rdx, 0x800(%rdi,%rcx,8)
leaq 0x653d3479(%rip), %rcx  # 0x653d74cc
incl %eax
movl %eax, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x40af
movzwl 0x20(%rax), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
leaq 0x651d3448(%rip), %rdx  # 0x651d74c0
movq 0x80000(%rdx,%rcx,8), %rdi
movslq 0x653d3449(%rip), %rax  # 0x653d74d0
movq %rax, %r8
shlq $0x4, %r8
leaq 0x3e82641b(%rip), %rsi  # 0x3e82a4b0
addq %r8, %rsi
testq %rdi, %rdi
je 0x40f8
movq %rsi, 0x8(%rdi)
movq 0x80000(%rdx,%rcx,8), %rsi
movq 0x8(%rsi), %rsi
jmp 0x40fc
movzwl 0x22(%rax), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
leaq 0x652d33ff(%rip), %rdx  # 0x652d74c0
movq 0x80000(%rdx,%rcx,8), %rdi
movslq 0x653d3404(%rip), %rax  # 0x653d74d4
movq %rax, %r8
shlq $0x4, %r8
leaq 0x480bcbd2(%rip), %rsi  # 0x480c0cb0
addq %r8, %rsi
testq %rdi, %rdi
je 0x410d
movq %rsi, 0x8(%rdi)
movq 0x80000(%rdx,%rcx,8), %rsi
movq 0x8(%rsi), %rsi
jmp 0x4111
movq %rsi, (%rdx,%rcx,8)
movq %rsi, 0x80000(%rdx,%rcx,8)
leaq 0x653d33c5(%rip), %rcx  # 0x653d74d0
jmp 0x4120
movq %rsi, (%rdx,%rcx,8)
movq %rsi, 0x80000(%rdx,%rcx,8)
leaq 0x653d33b4(%rip), %rcx  # 0x653d74d4
incl %eax
movl %eax, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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, 0x653d33a2(%rip) # imm = 0x4B00
jg 0x419c
movb $0x2, %al
cmpl $0x7080, 0x653d3398(%rip) # imm = 0x7080
jg 0x419c
movb $0x4, %al
cmpl $0x4b00, 0x653d338e(%rip) # imm = 0x4B00
jg 0x419c
movb $0x8, %al
cmpl $0x7080, 0x653d3384(%rip) # imm = 0x7080
jg 0x419c
movb $0x10, %al
cmpl $0x927c00, 0x653d335a(%rip) # imm = 0x927C00
jg 0x419c
movb $0x20, %al
cmpl $0x927c00, 0x653d3350(%rip) # imm = 0x927C00
jg 0x419c
movb $0x40, %al
cmpl $0x927c00, 0x653d3346(%rip) # imm = 0x927C00
jg 0x419c
cmpl $0x927c01, 0x653d333e(%rip) # imm = 0x927C01
setge %al
shlb $0x7, %al
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2410
testq %rax, %rax
je 0x41f4
movq %rax, %r15
movq %rax, %rdi
callq 0x2430
testq %rax, %rax
je 0x4206
xorl %r14d, %r14d
addq $0x13, %rax
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2080
cmpq $0x1, %rax
sbbl $-0x1, %r14d
movq %r15, %rdi
callq 0x2430
testq %rax, %rax
jne 0x41ce
jmp 0x421f
movq %r12, %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x2120
cmpl $-0x1, %eax
je 0x420b
xorl %r14d, %r14d
jmp 0x421f
leaq 0x2fbd(%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_O3/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 0x42a1
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 0x4237
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 0x4261
xorl %eax, %eax
negq %rcx
sbbl %eax, %eax
jmp 0x42a8
movw $0x30, (%rsi)
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x457b
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %edx
xorl %eax, %eax
movl %edx, %esi
movl (%rcx), %edx
movl %edx, %edi
subl %esi, %edi
cmpl $0x3f, %edi
ja 0x4579
movq 0x8(%rcx), %rcx
incl %eax
testq %rcx, %rcx
je 0x4579
cmpl $0x5, %eax
jne 0x4557
movl $0x5, %eax
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x45a9
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %edx
xorl %eax, %eax
movl %edx, %esi
movl (%rcx), %edx
movl %edx, %edi
subl %esi, %edi
cmpl $0x1, %edi
ja 0x45a7
incl %eax
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
jne 0x458f
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x45db
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movq 0x8(%rcx), %rcx
movq %rcx, (%rdi)
incl %eax
testq %rcx, %rcx
je 0x45da
cmpl %esi, %eax
jl 0x45c8
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x679f890d(%rip), %rax  # 0x679fcef0
leaq 0x653d2f06(%rip), %rdx  # 0x653d74f0
movl $0xc0000000, (%rdx,%rax,4) # imm = 0xC0000000
movq 0x8(%rdi), %r8
testq %r8, %r8
je 0x4639
pushq %rbp
movq %rsp, %rbp
movl $0xc0000000, %esi       # imm = 0xC0000000
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 0x4630
leal 0x6(%rcx), %r9d
cmpl $0x18, %ecx
movl %r9d, %ecx
jne 0x4605
incl %eax
movl %eax, 0x679f88b8(%rip)  # 0x679fcef0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x679f88af(%rip), %rax  # 0x679fcef0
leaq 0x653d2ea8(%rip), %rdx  # 0x653d74f0
movl $0x80000000, (%rdx,%rax,4) # imm = 0x80000000
movq 0x8(%rdi), %r8
testq %r8, %r8
je 0x4697
pushq %rbp
movq %rsp, %rbp
movl $0x80000000, %esi       # imm = 0x80000000
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 0x468e
leal 0xa(%rcx), %r9d
cmpl $0x14, %ecx
movl %r9d, %ecx
jne 0x4663
incl %eax
movl %eax, 0x679f885a(%rip)  # 0x679fcef0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x46d0
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %edx
xorl %eax, %eax
movl %edx, %esi
movl (%rcx), %edx
movl %edx, %edi
subl %esi, %edi
cmpl $0x3ff, %edi            # imm = 0x3FF
ja 0x46ce
movq 0x8(%rcx), %rcx
incl %eax
testq %rcx, %rcx
je 0x46ce
cmpl $0x3, %eax
jne 0x46a9
movl $0x3, %eax
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x679f8816(%rip), %rax  # 0x679fcef0
leaq 0x653d2e0f(%rip), %rdx  # 0x653d74f0
movl $0x40000000, (%rdx,%rax,4) # imm = 0x40000000
movq 0x8(%rdi), %r9
testq %r9, %r9
je 0x4738
pushq %rbp
movq %rsp, %rbp
xorl %ecx, %ecx
movb $0x1, %r8b
movl $0x40000000, %esi       # imm = 0x40000000
movq %rdi, %r10
movq %r9, %rdi
movl %esi, %r9d
movl (%rdi), %esi
subl (%r10), %esi
shll %cl, %esi
orl %r9d, %esi
movl %esi, (%rdx,%rax,4)
movq 0x8(%rdi), %r9
testq %r9, %r9
je 0x472f
movl $0xf, %ecx
testb $0x1, %r8b
movl $0x0, %r8d
jne 0x46ff
incl %eax
movl %eax, 0x679f87b9(%rip)  # 0x679fcef0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4780
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %edx
xorl %eax, %eax
movb $0x1, %sil
movl %edx, %edi
movl (%rcx), %edx
movl %edx, %r8d
subl %edi, %r8d
cmpl $0x7fff, %r8d           # imm = 0x7FFF
ja 0x4785
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
je 0x4783
movl $0x1, %eax
testb $0x1, %sil
movl $0x0, %esi
jne 0x474d
movl $0x2, %eax
jmp 0x4785
xorl %eax, %eax
retq
incl %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6ab3bdb3(%rip), %r14  # 0x6ab40550
cmpb $0x1, (%r14)
jne 0x47b4
leaq -0x90(%rbp), %rdi
movl $0x80, %esi
callq 0x42aa
movl $0x14, %edi
callq 0x2360
movq %rax, %rbx
callq 0x48a7
movl %eax, (%rbx)
leaq 0x651d2ce1(%rip), %rax  # 0x651d74b0
movq (%rax), %rdi
movl $0x1, %esi
callq 0x49b2
movl %eax, 0x4(%rbx)
leaq 0x651d2cd2(%rip), %rax  # 0x651d74b8
movq (%rax), %rdi
movl $0x2, %esi
callq 0x49b2
movl %eax, 0x8(%rbx)
leaq 0x651d2cc3(%rip), %rdi  # 0x651d74c0
movl $0x1, %esi
callq 0x4c88
movl %eax, 0xc(%rbx)
leaq 0x652d2caf(%rip), %rdi  # 0x652d74c0
movl $0x2, %esi
callq 0x4c88
movl %eax, 0x10(%rbx)
cmpb $0x1, (%r14)
jne 0x4898
leaq -0x90(%rbp), %r10
leaq 0x6ab0c7ae(%rip), %r11  # 0x6ab10fe0
leaq 0x29bf(%rip), %rsi      # 0x71f8
leaq 0x6ab0c720(%rip), %rdx  # 0x6ab10f60
leaq 0x6ab0c739(%rip), %rcx  # 0x6ab10f80
leaq 0x6ab0c772(%rip), %r8   # 0x6ab10fc0
leaq 0x6ab0c74b(%rip), %r9   # 0x6ab10fa0
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 0x6ab3b84b(%rip), %rdi  # 0x6ab400c8
movq %r14, %rsi
movq %rax, %rdx
callq 0x2380
testl %eax, %eax
je 0x4898
leaq 0x2a91(%rip), %rdi      # 0x7324
callq 0x2440
movq %rbx, %rax
addq $0x280, %rsp            # imm = 0x280
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x29de(%rip), %rdi      # 0x729a
leaq 0x27a0(%rip), %rsi      # 0x7063
callq 0x41a0
movl $0x61746164, 0x6ab0c68e(%rip) # imm = 0x61746164
movb $0x0, 0x6ab0c68b(%rip)  # 0x6ab10f64
leaq 0x6ab0c680(%rip), %rbx  # 0x6ab10f60
leaq -0x20(%rbp), %r14
movl %eax, %edi
movq %r14, %rsi
callq 0x422b
movq %rbx, %rdi
movq %r14, %rsi
callq 0x24b0
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 0x24b0
movq %r14, %rdi
movl $0x441, %esi            # imm = 0x441
movl $0x16d, %edx            # imm = 0x16D
xorl %eax, %eax
callq 0x21b0
cmpl $-0x1, %eax
je 0x497c
leaq 0x653d2b84(%rip), %r14  # 0x653d74c4
movslq (%r14), %rcx
shlq $0x4, %rcx
leaq (%rcx,%rcx,2), %rdx
leaq 0xed3535e(%rip), %rsi   # 0xed39cb0
movl %eax, %edi
callq 0x20d0
movq %rax, %rbx
cmpl $-0x1, %ebx
je 0x4993
movl (%r14), %eax
shll $0x4, %eax
leal (%rax,%rax,2), %eax
cmpl %ebx, %eax
jle 0x49a4
leaq 0x29c8(%rip), %rdi      # 0x733d
callq 0x2440
jmp 0x49a4
leaq 0x2922(%rip), %rdi      # 0x72a5
leaq -0xa0(%rbp), %rsi
xorl %eax, %eax
callq 0x2040
jmp 0x499f
leaq 0x29be(%rip), %rdi      # 0x7358
callq 0x2440
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x679f8245(%rip), %r15  # 0x679fcef0
leaq 0x6aacc2ae(%rip), %r13  # 0x6aad0f60
movq (%r14,%r12,2), %rdi
testq %rdi, %rdi
je 0x4cce
movl (%r15), %eax
leal 0x40000(,%rax,4), %eax
movl %eax, (%r12,%r13)
callq 0x42f0
addq $0x4, %r12
cmpq $0x40000, %r12          # imm = 0x40000
jne 0x4cb2
leaq 0x25d9(%rip), %rdi      # 0x72bb
cmpl $0x1, %ebx
jne 0x4d1e
leaq 0x25ec(%rip), %rsi      # 0x72da
callq 0x41a0
movabsq $0x4974726f50637273, %rcx # imm = 0x4974726F50637273
movq %rcx, 0x6ab0c2bc(%rip)  # 0x6ab10fc0
movabsq $0x7865646e497472, %rcx # imm = 0x7865646E497472
movq %rcx, 0x6ab0c2b0(%rip)  # 0x6ab10fc5
leaq 0x6ab0c2a4(%rip), %rbx  # 0x6ab10fc0
jmp 0x4d53
leaq 0x25c2(%rip), %rsi      # 0x72e7
callq 0x41a0
movabsq $0x4974726f50747364, %rcx # imm = 0x4974726F50747364
movq %rcx, 0x6ab0c2a5(%rip)  # 0x6ab10fe0
movabsq $0x7865646e497472, %rcx # imm = 0x7865646E497472
movq %rcx, 0x6ab0c299(%rip)  # 0x6ab10fe5
leaq 0x6ab0c28d(%rip), %rbx  # 0x6ab10fe0
leaq -0x40(%rbp), %r14
movl %eax, %edi
movq %r14, %rsi
callq 0x422b
movq %rbx, %rdi
movq %r14, %rsi
callq 0x24b0
movabsq $0x2f7865646e692f2e, %rax # imm = 0x2F7865646E692F2E
leaq -0xc0(%rbp), %r14
movq %rax, (%r14)
movb $0x0, 0x8(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x24b0
movq %r14, %rdi
callq 0x4e43
movl %eax, %ebx
leaq 0x6aacc1bf(%rip), %rdi  # 0x6aad0f60
movl $0x40000, %edx          # imm = 0x40000
xorl %esi, %esi
callq 0x2160
movslq (%r15), %rdx
shlq $0x2, %rdx
leaq 0x653d2735(%rip), %rdi  # 0x653d74f0
xorl %esi, %esi
callq 0x2160
movl $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_O3/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
movq %rax, %rdx
xorl %esi, %esi
movq (%rdx,%rsi,8), %rax
testq %rax, %rax
jne 0x4e03
incq %rsi
cmpq $0x100, %rsi            # imm = 0x100
jne 0x4deb
movq %rdx, %rax
incl %ecx
cmpl $0x3, %ecx
jne 0x4de6
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x679f80e8(%rip), %edx  # 0x679fcf00
shll $0xa, %edx
leaq 0x679f80ee(%rip), %rsi  # 0x679fcf10
callq 0x4e76
movl %eax, %ebx
cmpl $-0x1, %eax
jne 0x4e3a
leaq 0x2530(%rip), %rdi      # 0x7365
callq 0x2440
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6aacc110(%rip), %rsi  # 0x6aad0f60
movl $0x40000, %edx          # imm = 0x40000
callq 0x4e76
movl %eax, %ebx
cmpl $-0x1, %eax
jne 0x4e6d
leaq 0x2524(%rip), %rdi      # 0x738c
callq 0x2440
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/yueww[P]TSR/exportDataAndIndex.cpp
// Function: writeIndexFile(char const*, void*, int)
int writeIndexFile(const char *path,void *ptr,int size){
    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 writedPointerBytes=write(fd,ptr,size);
    if(writedPointerBytes==-1){
        printf("write pointer info error!\n");
        return -1;
    }
    if(writedPointerBytes<size){
        printf("did not write enough pointer info!\n");
    }
    int writedIndexNumBytes=write(fd,compressedIndexArr,sizeof(unsigned)*indexOffset);
    if(writedIndexNumBytes==-1){
        printf("write index number error!\n");
        return -1;
    }
    if(writedIndexNumBytes<sizeof(unsigned)*indexOffset){
        printf("do not write enough index number data!\n");
    }
    return writedPointerBytes+writedIndexNumBytes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %rbx
movl $0x441, %esi            # imm = 0x441
movl $0x16d, %edx            # imm = 0x16D
xorl %eax, %eax
callq 0x21b0
cmpl $-0x1, %eax
je 0x4f0f
movl %eax, %r14d
movslq %r15d, %rdx
movl %eax, %edi
movq %r12, %rsi
callq 0x20d0
movq %rax, %rbx
cmpl $-0x1, %ebx
je 0x4f22
cmpl %r15d, %ebx
jge 0x4ec9
leaq 0x24f1(%rip), %rdi      # 0x73b5
callq 0x2440
leaq 0x679f8020(%rip), %r15  # 0x679fcef0
movslq (%r15), %rdx
shlq $0x2, %rdx
leaq 0x653d2612(%rip), %rsi  # 0x653d74f0
movl %r14d, %edi
callq 0x20d0
movq %rax, %r14
cmpl $-0x1, %r14d
je 0x4f2b
movslq %r14d, %rax
movslq (%r15), %rcx
shlq $0x2, %rcx
cmpq %rcx, %rax
jae 0x4f0a
leaq 0x24d3(%rip), %rdi      # 0x73d8
callq 0x2440
addl %r14d, %ebx
jmp 0x4f3c
leaq 0x238f(%rip), %rdi      # 0x72a5
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2040
jmp 0x4f37
leaq 0x24f0(%rip), %rdi      # 0x7419
jmp 0x4f32
leaq 0x24cd(%rip), %rdi      # 0x73ff
callq 0x2440
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/yueww[P]TSR/test.c
// Function: processFunc(void*)
void *processFunc(void *arg){
    //pthread_setcanceltype(PTHREAD_CANCEL_ASYCHRONOUS,NULL);
    //pthread_t pro,con;
    pthread_mutex_init(&mutex,0);
    pthread_cond_init(&cond_p,0);
    pthread_cond_init(&cond_c,0);
    pthread_create(&pro,0,receiveData,0);
    pthread_create(&con,0,outputFlows,0);
    pthread_join(pro,0);
    pthread_join(con,0);
    pthread_mutex_destroy(&mutex);
    pthread_cond_destroy(&cond_p);
    pthread_cond_destroy(&cond_c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x42c7(%rip), %rbx      # 0xa2b0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x23f0
leaq 0x42de(%rip), %r14      # 0xa2d8
movq %r14, %rdi
xorl %esi, %esi
callq 0x2340
leaq 0x6ab0affd(%rip), %r15  # 0x6ab11008
movq %r15, %rdi
xorl %esi, %esi
callq 0x2340
leaq 0x6ab3a544(%rip), %rdi  # 0x6ab40560
leaq -0x34fc(%rip), %rdx     # 0x2b27
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x24d0
leaq 0x6ab3a535(%rip), %rdi  # 0x6ab40568
leaq -0xc8e(%rip), %rdx      # 0x53ac
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x24d0
movq 0x6ab3a516(%rip), %rdi  # 0x6ab40560
xorl %esi, %esi
callq 0x2280
movq 0x6ab3a510(%rip), %rdi  # 0x6ab40568
xorl %esi, %esi
callq 0x2280
movq %rbx, %rdi
callq 0x2300
movq %r14, %rdi
callq 0x24e0
movq %r15, %rdi
callq 0x24e0
// File: /workspace/github_cpp_makefile_star2_O3/yueww[P]TSR/test.c
// Function: processCommand(char const*, char const*)
char *processCommand(const char *opt,const char *name){
    char *command=(char *)malloc(sizeof(char)*COMMANDSIZE);
    if(!strcmp(opt,"-i")){
       strcpy(command,"fprobe -i ");
       strcat(command,name);
       strcat(command," -B 8192 -r 2 -q 10000 localhost:555");
    }else if(!strcmp(opt,"-f")){
       strcpy(command,"cat < ");
       strcat(command,name);
       strcat(command," | fprobe -i - -B 8192 -r 2 -q 10000 -t 10000:10000000 localhost:555");
    }else{
        printf("unknown options!\n");
        free(command);
        command=NULL;
    }
    return command;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl $0x200, %edi            # imm = 0x200
callq 0x2360
movq %rax, %rbx
cmpb $0x2d, (%r15)
jne 0x60b6
cmpb $0x69, 0x1(%r15)
jne 0x60a8
cmpb $0x0, 0x2(%r15)
je 0x60da
cmpb $0x66, 0x1(%r15)
jne 0x60b6
cmpb $0x0, 0x2(%r15)
je 0x6129
leaq 0x1712(%rip), %rdi      # 0x77cf
callq 0x2440
movq %rbx, %rdi
callq 0x2330
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movabsq $0x2d2065626f727066, %rax # imm = 0x2D2065626F727066
movq %rax, (%rbx)
movl $0x20692d, 0x7(%rbx)    # imm = 0x20692D
movq %rbx, %rdi
movq %r14, %rsi
callq 0x24b0
movq %rbx, %rdi
callq 0x2100
movabsq $0x3535353a74736f, %rcx # imm = 0x3535353A74736F
movq %rcx, 0x1d(%rbx,%rax)
movups 0x14d4(%rip), %xmm0     # 0x75eb
movups %xmm0, (%rbx,%rax)
movups 0x14d9(%rip), %xmm0     # 0x75fb
movups %xmm0, 0x10(%rbx,%rax)
jmp 0x60cc
movl $0x203c20, 0x3(%rbx)    # imm = 0x203C20
movl $0x20746163, (%rbx)     # imm = 0x20746163
movq %rbx, %rdi
movq %r14, %rsi
callq 0x24b0
movq %rbx, %rdi
callq 0x2100
movq %rbx, %rdi
addq %rax, %rdi
leaq 0x14c1(%rip), %rsi      # 0x7617
movl $0x45, %edx
callq 0x2240
jmp 0x60cc
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::Column::l2_norm_centered() const
value_t Column::l2_norm_centered() const
  {
    if (l2_norm_centered_cache == -1.0)
    {
      value_t mean_value = this->mean();
      value_t value_sq = l2_norm_sq() - mean_value * mean_value * length;
      if (value_sq <= 0)
        l2_norm_centered_cache = 0.0;
      else
        l2_norm_centered_cache = sqrt(value_sq);
    }
    return l2_norm_centered_cache;
  }

// Assembly:
movsd 0x20(%rdi), %xmm1
ucomisd 0x4623(%rip), %xmm1     # 0xa010
jne 0x5a6c
jp 0x5a6c
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x20(%rax)
movsd %xmm0, 0x8(%rsp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x28(%rax)
movsd 0x8(%rbx), %xmm1
unpcklps 0x4606(%rip), %xmm1     # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x460e(%rip), %xmm1     # 0xa030
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
movsd 0x8(%rsp), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x5a62
ucomisd %xmm1, %xmm0
jb 0x5a59
xorps %xmm1, %xmm1
sqrtsd %xmm0, %xmm1
jmp 0x5a62
callq 0x5230
movapd %xmm0, %xmm1
movsd %xmm1, 0x20(%rbx)
addq $0x10, %rsp
popq %rbx
movapd %xmm1, %xmm0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::SparseColumnFromPointers::inner_product(std::vector<double, std::allocator<double>> const&) const
value_t SparseColumnFromPointers::inner_product(const vector<value_t> &vec) const
  {
    value_t result = 0.0;
    for (size_t ind = 0; ind < nnz; ++ind)
    {
      index_t i = indices[ind];
      result += values[ind] * vec[i];
    }
    return result;
  }

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x5ad2
movq 0x28(%rdi), %rcx
movq 0x30(%rdi), %rdx
movq (%rsi), %rsi
xorpd %xmm0, %xmm0
xorl %edi, %edi
movslq (%rcx,%rdi,4), %r8
movsd (%rdx,%rdi,8), %xmm1
mulsd (%rsi,%r8,8), %xmm1
addsd %xmm1, %xmm0
incq %rdi
cmpq %rdi, %rax
jne 0x5ab6
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::SparseColumnFromPointers::weighted_inner_product(std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>> const&) const
value_t SparseColumnFromPointers::weighted_inner_product(const std::vector<value_t> &vec, const std::vector<value_t> &weights) const
  {
    value_t result = 0.0;
    for (size_t ind = 0; ind < nnz; ++ind)
    {
      index_t i = indices[ind];
      result += values[ind] * vec[i] * weights[i];
    }
    return result;
  }

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x5b17
movq 0x28(%rdi), %rcx
movq 0x30(%rdi), %rdi
movq (%rsi), %rsi
movq (%rdx), %rdx
xorpd %xmm0, %xmm0
xorl %r8d, %r8d
movslq (%rcx,%r8,4), %r9
movsd (%rdi,%r8,8), %xmm1
mulsd (%rsi,%r9,8), %xmm1
mulsd (%rdx,%r9,8), %xmm1
addsd %xmm1, %xmm0
incq %r8
cmpq %r8, %rax
jne 0x5af4
retq
xorps %xmm0, %xmm0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::SparseColumnFromPointers::h_norm_sq(std::vector<double, std::allocator<double>> const&) const
value_t SparseColumnFromPointers::h_norm_sq(const vector<value_t> &h_values) const
  {
    value_t result = 0.0;
    for (size_t ind = 0; ind < nnz; ++ind)
    {
      index_t i = indices[ind];
      result += values[ind] * values[ind] * h_values[i];
    }
    return result;
  }

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x5b8e
movq 0x28(%rdi), %rcx
movq 0x30(%rdi), %rdx
movq (%rsi), %rsi
xorpd %xmm0, %xmm0
xorl %edi, %edi
movslq (%rcx,%rdi,4), %r8
movsd (%rdx,%rdi,8), %xmm1
mulsd %xmm1, %xmm1
mulsd (%rsi,%r8,8), %xmm1
addsd %xmm1, %xmm0
incq %rdi
cmpq %rdi, %rax
jne 0x5b6e
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::sum_array(double const*, unsigned long)
value_t sum_array(const value_t *values, size_t length)
  {
    value_t result = 0.0;
    for (size_t ind = 0; ind < length; ++ind)
      result += values[ind];
    return result;
  }

// Assembly:
xorpd %xmm0, %xmm0
testq %rsi, %rsi
je 0x5bf5
xorl %eax, %eax
addsd (%rdi,%rax,8), %xmm0
incq %rax
cmpq %rax, %rsi
jne 0x5be8
retq
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::l2_norm_sq(double const*, unsigned long)
value_t l2_norm_sq(const value_t *values, size_t length)
  {
    value_t result = 0.0;
    for (size_t ind = 0; ind < length; ++ind)
      result += values[ind] * values[ind];
    return result;
  }

// Assembly:
xorpd %xmm0, %xmm0
testq %rsi, %rsi
je 0x5c43
xorl %eax, %eax
movsd (%rdi,%rax,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rax
cmpq %rax, %rsi
jne 0x5c2e
retq
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::DenseColumnFromPointers::inner_product(std::vector<double, std::allocator<double>> const&) const
value_t DenseColumnFromPointers::inner_product(const vector<value_t> &vec) const
  {
    value_t result = 0.0;
    for (size_t i = 0; i < length; ++i)
      result += values[i] * vec[i];
    return result;
  }

// Assembly:
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x5c9b
movq 0x28(%rdi), %rcx
movq (%rsi), %rdx
xorpd %xmm0, %xmm0
xorl %esi, %esi
movsd (%rcx,%rsi,8), %xmm1
mulsd (%rdx,%rsi,8), %xmm1
addsd %xmm1, %xmm0
incq %rsi
cmpq %rsi, %rax
jne 0x5c84
retq
xorps %xmm0, %xmm0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::DenseColumnFromPointers::weighted_inner_product(std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>> const&) const
value_t DenseColumnFromPointers::weighted_inner_product(const std::vector<value_t> &vec, const std::vector<value_t> &weights) const
  {
    value_t result = 0.0;
    for (size_t i = 0; i < length; ++i)
      result += values[i] * vec[i] * weights[i];
    return result;
  }

// Assembly:
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x5cd5
movq 0x28(%rdi), %rcx
movq (%rsi), %rsi
movq (%rdx), %rdx
xorpd %xmm0, %xmm0
xorl %edi, %edi
movsd (%rcx,%rdi,8), %xmm1
mulsd (%rsi,%rdi,8), %xmm1
mulsd (%rdx,%rdi,8), %xmm1
addsd %xmm1, %xmm0
incq %rdi
cmpq %rdi, %rax
jne 0x5cb9
retq
xorps %xmm0, %xmm0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::DenseColumnFromPointers::h_norm_sq(std::vector<double, std::allocator<double>> const&) const
value_t DenseColumnFromPointers::h_norm_sq(const vector<value_t> &h_values) const
  {
    value_t result = 0.0;
    for (size_t i = 0; i < length; ++i)
      result += values[i] * values[i] * h_values[i];
    return result;
  }

// Assembly:
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x5d39
movq 0x28(%rdi), %rcx
movq (%rsi), %rdx
xorpd %xmm0, %xmm0
xorl %esi, %esi
movsd (%rcx,%rsi,8), %xmm1
mulsd %xmm1, %xmm1
mulsd (%rdx,%rsi,8), %xmm1
addsd %xmm1, %xmm0
incq %rsi
cmpq %rsi, %rax
jne 0x5d1e
retq
xorps %xmm0, %xmm0
retq
nop