LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/sparseSA.h
// Function: sparseSA::from_set(long, long&, long&) const
void from_set(long hit, long &seq, long &seqpos) const{
    // Use binary search to locate index of sequence and position
    // within sequence.
    std::vector<long>::const_iterator it = std::upper_bound(startpos.begin(), startpos.end(), hit);
    seq = std::distance(startpos.begin(), it) - 1;
    it--;
    seqpos = hit - *it;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq %rsp, %r12
movq %rsi, (%r12)
movq 0x18(%rdi), %rdi
movq 0x20(%r15), %rsi
movq %r12, %rdx
callq 0x2464c
movq %rax, %rcx
subq 0x18(%r15), %rcx
sarq $0x3, %rcx
decq %rcx
movq %rcx, (%r14)
movq (%r12), %rcx
subq -0x8(%rax), %rcx
movq %rcx, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/mapper.cpp
// Function: bestLISInWindow(std::vector<lis_t, std::allocator<lis_t>>&, int, long, long, bool)
inline int bestLISInWindow(vector<lis_t> & lisIntervalsWindow, int editDist, long refB, long refE, bool fw){
    int bestAln = -1;
    int bestAlnScore = -10000;//set to INT_MIN
    for(size_t i = 0; i < lisIntervalsWindow.size(); i++){
        if(lisIntervalsWindow[i].refBegin+editDist >= refB && 
                lisIntervalsWindow[i].refEnd-editDist <= refE && 
                lisIntervalsWindow[i].fw == fw && lisIntervalsWindow[i].score > bestAlnScore){
            bestAln = i;
            bestAlnScore = lisIntervalsWindow[i].score;
        }
    }
    return bestAln;
}

// Assembly:
pushq %rbx
movq %rdx, %r9
movq (%rdi), %r10
movq 0x8(%rdi), %rax
subq %r10, %rax
movabsq $0x38, %rdi
cqto
idivq %rdi
movslq %esi, %rsi
addq $0x10, %r10
movl $0xffffd8f0, %edi       # imm = 0xFFFFD8F0
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %r11d, %r11d
cmpq %r11, %rax
je 0x24e56
movq -0x8(%r10), %rbx
addq %rsi, %rbx
cmpq %r9, %rbx
jl 0x24e4d
movq (%r10), %rbx
subq %rsi, %rbx
cmpq %rcx, %rbx
jg 0x24e4d
cmpb %r8b, -0xc(%r10)
jne 0x24e4d
movl -0x10(%r10), %ebx
cmpl %edi, %ebx
cmovgl %r11d, %edx
cmovgl %ebx, %edi
incq %r11
addq $0x38, %r10
jmp 0x24e1e
movl %edx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/performanceUtils.cpp
// Function: oracleLine_t::printLine[abi:cxx11](long)
string oracleLine_t::printLine(long readcnt){
    stringstream ss;
    ss << alnGood << "\t " << ((alnGood*100)/(alignmentCnt > 0 ? alignmentCnt : 1)) << "\t ";
    ss << alnOk << "\t " << ((alnOk*100)/(alignmentCnt > 0 ? alignmentCnt : 1)) << "\t "; 
    ss << alnBad << "\t " << ((alnBad*100)/(alignmentCnt > 0 ? alignmentCnt : 1)) << "\t ";
    ss << readGood << "\t " << ((readGood*100)/(readcnt > 0 ? readcnt : 1)) << "\t ";
    ss << readOk << "\t " << ((readOk*100)/(readcnt > 0 ? readcnt : 1)) << "\t ";
    ss << readBad << "\t " << ((readBad*100)/(readcnt > 0 ? readcnt : 1)) << endl;
    return ss.str();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x71e0
leaq 0x18(%rsp), %r15
movq 0x8(%r14), %rsi
movq %r15, %rdi
callq 0x72a0
leaq 0xf73e(%rip), %rsi      # 0x38485
movq %rax, %rdi
callq 0x72b0
movq %rax, %rdi
imulq $0x64, 0x8(%r14), %rax
movq (%r14), %rcx
cmpq $0x2, %rcx
pushq $0x1
popq %r13
cmovlq %r13, %rcx
cqto
idivq %rcx
movq %rax, %rsi
callq 0x72a0
leaq 0xf70b(%rip), %rsi      # 0x38485
movq %rax, %rdi
callq 0x72b0
movq 0x10(%r14), %rsi
movq %r15, %rdi
callq 0x72a0
leaq 0xf6f0(%rip), %rsi      # 0x38485
movq %rax, %rdi
callq 0x72b0
movq %rax, %rdi
imulq $0x64, 0x10(%r14), %rax
movq (%r14), %rcx
cmpq $0x2, %rcx
cmovlq %r13, %rcx
cqto
idivq %rcx
movq %rax, %rsi
callq 0x72a0
leaq 0xf6c1(%rip), %rsi      # 0x38485
movq %rax, %rdi
callq 0x72b0
movq 0x18(%r14), %rsi
movq %r15, %rdi
callq 0x72a0
leaq 0xf6a6(%rip), %rsi      # 0x38485
movq %rax, %rdi
callq 0x72b0
movq %rax, %rdi
imulq $0x64, 0x18(%r14), %rax
movq (%r14), %rcx
cmpq $0x2, %rcx
cmovlq %r13, %rcx
cqto
idivq %rcx
movq %rax, %rsi
callq 0x72a0
leaq 0xf677(%rip), %rsi      # 0x38485
movq %rax, %rdi
callq 0x72b0
movq 0x20(%r14), %rsi
movq %r15, %rdi
callq 0x72a0
leaq 0xf65c(%rip), %rsi      # 0x38485
movq %rax, %rdi
callq 0x72b0
movq %rax, %rdi
imulq $0x64, 0x20(%r14), %rax
cmpq $0x2, %r12
cmovgeq %r12, %r13
cqto
idivq %r13
movq %rax, %rsi
callq 0x72a0
leaq 0xf630(%rip), %rsi      # 0x38485
movq %rax, %rdi
callq 0x72b0
movq 0x28(%r14), %rsi
movq %r15, %rdi
callq 0x72a0
leaq 0xf615(%rip), %rsi      # 0x38485
movq %rax, %rdi
callq 0x72b0
movq %rax, %rdi
imulq $0x64, 0x28(%r14), %rax
cqto
idivq %r13
movq %rax, %rsi
callq 0x72a0
leaq 0xf5f1(%rip), %rsi      # 0x38485
movq %rax, %rdi
callq 0x72b0
movq 0x30(%r14), %rsi
movq %r15, %rdi
callq 0x72a0
leaq 0xf5d6(%rip), %rsi      # 0x38485
movq %rax, %rdi
callq 0x72b0
movq %rax, %rdi
imulq $0x64, 0x30(%r14), %rax
cqto
idivq %r13
movq %rax, %rsi
callq 0x72a0
movq %rax, %rdi
callq 0x7160
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x7540
leaq 0x8(%rsp), %rdi
callq 0x7210
movq %rbx, %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7210
movq %rbx, %rdi
callq 0x75e0
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/performanceUtils.cpp
// Function: summaryLine_t::addAlignment(int, bool)
void summaryLine_t::addAlignment(int flag, bool mateFound){
    int score = 0;
    //set fields
    tempAlnCount++;
    alignmentCnt++;
    if(!(flag & (1<<2))){
        mappedAln++;
        score++;
        if(mateFound){
            mappedPaired++;
            score++;
            if(flag & (1<<1)){
                mappedPairedCorrect++;
                score++;
            }
        }
        if(flag & (1<<8)){
            secondAln++;
        }
    }
    tempReadResult = max(tempReadResult, score);
}

// Assembly:
incl 0x1dc(%rdi)
incq 0x38(%rdi)
xorl %eax, %eax
testb $0x4, %sil
jne 0x28f51
incq 0x30(%rdi)
testb %dl, %dl
je 0x28f3c
incq 0x28(%rdi)
testb $0x2, %sil
jne 0x28f40
pushq $0x2
jmp 0x28f46
pushq $0x1
jmp 0x28f46
incq 0x20(%rdi)
pushq $0x3
popq %rax
btl $0x8, %esi
jae 0x28f51
incq 0x18(%rdi)
movl 0x1d8(%rdi), %ecx
cmpl %eax, %ecx
cmovgl %ecx, %eax
movl %eax, 0x1d8(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/performanceUtils.cpp
// Function: summaryLine_t::finishRead()
void summaryLine_t::finishRead(){
    if(tempReadResult==3)
        readPairedCorrect++;
    else if(tempReadResult ==2)
        readPaired++;
    else if(tempReadResult ==1)
        readMapped++;
    tempReadResult = 0;
    alnPerRead[min(tempAlnCount,101)]++;
    tempAlnCount = 0;
}

// Assembly:
movl 0x1d8(%rdi), %eax
movq %rdi, %rcx
cmpl $0x1, %eax
je 0x28f86
cmpl $0x2, %eax
je 0x28f82
cmpl $0x3, %eax
jne 0x28f89
leaq 0x10(%rdi), %rcx
jmp 0x28f86
leaq 0x8(%rdi), %rcx
incq (%rcx)
andl $0x0, 0x1d8(%rdi)
movl 0x1dc(%rdi), %eax
cmpl $0x65, %eax
pushq $0x65
popq %rcx
cmovll %eax, %ecx
movslq %ecx, %rax
incl 0x40(%rdi,%rax,4)
andl $0x0, 0x1dc(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/performanceUtils.cpp
// Function: processCommaSepListInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<int, std::allocator<int>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int)
void processCommaSepListInt(string list, vector<int> & options, string name, int lowerBound, int upperBound){
    int beginPos = 0;
    int commaPos = list.find(',',beginPos);
    while(commaPos>=0){
        int value = atoi(list.substr(beginPos,commaPos-beginPos).c_str());
        if(value >= lowerBound && value <= upperBound)
            options.push_back(value);
        else{
            fprintf(stderr, "Value %d for parameter %s does not fall within logical bounds. This value will be ignored.\n", value, name.c_str());
        }
        beginPos = commaPos+1;
        commaPos = list.find(',',beginPos);
    }
    int value = atoi(list.substr(beginPos).c_str());
    if(value >= lowerBound && value <= upperBound)
        options.push_back(value);
    else{
        fprintf(stderr, "Value %d for parameter %s does not fall within logical bounds. This value will be ignored.\n", value, name.c_str());
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %ebp
movl %ecx, %r15d
movq %rdx, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdi, %r12
pushq $0x2c
popq %rsi
xorl %edx, %edx
callq 0x7410
movq %rax, %rbx
leaq 0x18(%rsp), %r13
xorl %ecx, %ecx
movl %ecx, %edx
testl %ebx, %ebx
js 0x295e4
movl %ebx, %eax
subl %edx, %eax
movslq %eax, %rcx
movq %r13, %rdi
movq %r12, %rsi
callq 0x72f0
movq 0x18(%rsp), %rdi
callq 0x7520
movl %eax, %r14d
movq %r13, %rdi
callq 0x76a8
movl %r14d, 0x18(%rsp)
cmpl %r15d, %r14d
jl 0x295bf
cmpl %ebp, %r14d
jg 0x295bf
movq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x22ae4
incl %ebx
movq %r12, %rdi
pushq $0x2c
popq %rsi
movq %rbx, %rdx
callq 0x7410
movl %ebx, %ecx
movq %rax, %rbx
jmp 0x2955f
movq 0x20a02(%rip), %rax     # 0x49fc8
movq (%rax), %rdi
movq 0x8(%rsp), %rax
movq (%rax), %rcx
leaq 0xe4f5(%rip), %rsi      # 0x37acd
movl %r14d, %edx
xorl %eax, %eax
callq 0x7480
jmp 0x295a8
leaq 0x18(%rsp), %r14
pushq $-0x1
popq %rcx
movq %r14, %rdi
movq %r12, %rsi
callq 0x72f0
movq (%r14), %rdi
callq 0x7520
movl %eax, %ebx
movq %r14, %rdi
callq 0x76a8
movl %ebx, (%r14)
cmpl %r15d, %ebx
jl 0x29633
cmpl %ebp, %ebx
jg 0x29633
leaq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x22ae4
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2098e(%rip), %rax     # 0x49fc8
movq (%rax), %rdi
movq 0x8(%rsp), %rax
movq (%rax), %rcx
leaq 0xe481(%rip), %rsi      # 0x37acd
movl %ebx, %edx
xorl %eax, %eax
callq 0x7480
jmp 0x29624
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/performanceUtils.cpp
// Function: previousField(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char, int&)
string previousField(string & line, char delimeter, int& endPos){
    int tabPos = line.rfind(delimeter,endPos);
    string substring = line.substr(tabPos+1, endPos-tabPos);
    endPos = tabPos-1;
    return substring;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movslq (%rcx), %rax
movq %rsi, %rdi
movl %edx, %esi
movq %rax, %rdx
callq 0x7680
leal 0x1(%rax), %ecx
movslq %ecx, %rdx
movslq (%rbx), %rcx
movslq %eax, %r12
subq %r12, %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0x72f0
decl %r12d
movl %r12d, (%rbx)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/performanceUtils.cpp
// Function: getlijn2(std::basic_ifstream<char, std::char_traits<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void getlijn2(ifstream & input, string & lijn){
    //write windows version of getline
    getline(input, lijn, '\n'); // Load one line at a time.
    if(lijn.length() > 0 && lijn[lijn.length()-1]=='\r')
        lijn.erase(--lijn.end());
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
pushq $0xa
popq %rdx
callq 0x7630
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x2a384
movq (%rbx), %rcx
cmpb $0xd, -0x1(%rcx,%rax)
jne 0x2a384
leaq (%rcx,%rax), %rsi
decq %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x73b0
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/performanceUtils.cpp
// Function: unpairedCompareSam(samRecord_t&, samRecord_t&, int)
int unpairedCompareSam(samRecord_t& query, samRecord_t& oracle, int range){
    //correct if within X bases of origin
    if(query.flag.test(2)){
        return 0;//unmapped
    }
    if(query.flag.test(4)==oracle.flag.test(4) && 
            query.rname.compare(oracle.rname)==0 && 
            query.pos >= oracle.pos-range && query.pos <= oracle.pos + range){
        return 2;
    }
    else if(query.edit <= oracle.edit){
        return 1;
    }
    //ok if edit distance is fine
    else{
        return 0;
    }
    //else incorrect
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x20(%rdi), %r15
pushq $0x2
popq %rsi
movq %r15, %rdi
callq 0xa11c
movl %eax, %ecx
xorl %eax, %eax
testb %cl, %cl
jne 0x2a725
pushq $0x4
popq %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0xa11c
movl %eax, %r15d
leaq 0x20(%rbx), %rdi
movq %r12, %rsi
callq 0xa11c
cmpb %al, %r15b
jne 0x2a713
leaq 0x28(%r14), %rdi
leaq 0x28(%rbx), %rsi
callq 0x7040
testl %eax, %eax
jne 0x2a713
movq 0x48(%r14), %rax
movq 0x48(%rbx), %rcx
movslq %ebp, %rdx
movq %rcx, %rsi
subq %rdx, %rsi
cmpq %rsi, %rax
setl %sil
addq %rdx, %rcx
cmpq %rcx, %rax
setg %al
orb %sil, %al
cmpb $0x1, %al
jne 0x2a72e
movl 0x80(%r14), %ecx
xorl %eax, %eax
cmpl 0x80(%rbx), %ecx
setle %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x2
popq %rax
jmp 0x2a725
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/performanceUtils.cpp
// Function: pairedCompareSam(samRecord_t&, samRecord_t&, int)
int pairedCompareSam(samRecord_t& query, samRecord_t& oracle, int range){
    //correct if within X bases of origin
    if(query.flag.test(2)){
        return 0;//unmapped
    }
    if((query.flag.to_ulong() % 128) == (oracle.flag.to_ulong() % 128) &&
            query.rname.compare(oracle.rname)==0 && 
            query.pos >= oracle.pos-range && query.pos <= oracle.pos + range && 
            query.rnext.compare(oracle.rnext) == 0 ){// && query.pnext >= oracle.pnext-range && query.pnext <= oracle.pnext+range
        return 2;
    }
    else if(query.edit <= oracle.edit){
        return 1;
    }
    //ok if edit distance is fine
    else{
        return 0;
    }
    //else incorrect
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x20(%rdi), %r15
pushq $0x2
popq %rsi
movq %r15, %rdi
callq 0xa11c
movl %eax, %ecx
xorl %eax, %eax
testb %cl, %cl
jne 0x2a7bd
movl 0x20(%rbx), %eax
xorl (%r15), %eax
testb $0x7f, %al
jne 0x2a7ab
leaq 0x28(%r14), %rdi
leaq 0x28(%rbx), %rsi
callq 0x7040
testl %eax, %eax
jne 0x2a7ab
movq 0x48(%r14), %rax
movq 0x48(%rbx), %rcx
movslq %ebp, %rdx
movq %rcx, %rsi
subq %rdx, %rsi
cmpq %rsi, %rax
setl %sil
addq %rdx, %rcx
cmpq %rcx, %rax
setg %al
orb %sil, %al
jne 0x2a7ab
leaq 0x58(%r14), %rdi
leaq 0x58(%rbx), %rsi
callq 0x7040
testl %eax, %eax
je 0x2a7c8
movl 0x80(%r14), %ecx
xorl %eax, %eax
cmpl 0x80(%rbx), %ecx
setle %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x2
popq %rax
jmp 0x2a7bd
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/performanceUtils.cpp
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> printVector<int>(std::vector<int, std::allocator<int>>)
string printVector(vector<T> vec){
    stringstream ss;
    if(!vec.empty()){
        ss << vec[0];
        for(size_t i=1; i < vec.size(); i++)
            ss << "," << vec[i];
    }
    return ss.str();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x71e0
movq (%r14), %rax
cmpq 0x8(%r14), %rax
je 0x2f43f
leaq 0x18(%rsp), %r15
movl (%rax), %esi
movq %r15, %rdi
callq 0x75c0
pushq $0x1
popq %r13
leaq 0x7a40(%rip), %r12      # 0x36e50
movq 0x8(%r14), %rax
subq (%r14), %rax
sarq $0x2, %rax
cmpq %rax, %r13
jae 0x2f43f
movq %r15, %rdi
movq %r12, %rsi
callq 0x72b0
movq (%r14), %rcx
movl (%rcx,%r13,4), %esi
movq %rax, %rdi
callq 0x75c0
incq %r13
jmp 0x2f410
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x7540
leaq 0x8(%rsp), %rdi
callq 0x7210
movq %rbx, %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x2f46c
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7210
movq %rbx, %rdi
callq 0x75e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/qsufsort.c
// Function: update_group
static void update_group(int *pl, int *pm)
{
   int g;

   g=pm-I;                      /* group number.*/
   V[*pl]=g;                    /* update group number of first position.*/
   if (pl==pm)
      *pl=-1;                   /* one element, sorted group.*/
   else
      do                        /* more than one element, unsorted group.*/
         V[*++pl]=g;            /* update group numbers.*/
      while (pl<pm);
}

// Assembly:
movq %rsi, %rax
subq 0x1a33d(%rip), %rax     # 0x4a430
shrq $0x2, %rax
movq 0x1a32a(%rip), %rcx     # 0x4a428
movslq (%rdi), %rdx
movl %eax, (%rcx,%rdx,4)
cmpq %rsi, %rdi
je 0x3011a
movslq 0x4(%rdi), %rdx
addq $0x4, %rdi
movl %eax, (%rcx,%rdx,4)
cmpq %rsi, %rdi
jb 0x30109
retq
orl $-0x1, (%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/ksw.c
// Function: push_cigar
static inline uint32_t *push_cigar(int *n_cigar, int *m_cigar, uint32_t *cigar, int op, int len)
{
	if (*n_cigar == 0 || op != (cigar[(*n_cigar) - 1]&0xf)) {
		if (*n_cigar == *m_cigar) {
			*m_cigar = *m_cigar? (*m_cigar)<<1 : 4;
			cigar = realloc(cigar, (*m_cigar) << 2);
		}
		cigar[(*n_cigar)++] = len<<4 | op;
	} else cigar[(*n_cigar)-1] += len<<4;
	return cigar;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %r8d, %ebx
movl %ecx, %ebp
movq %rdx, %rax
movq %rdi, %r14
movslq (%rdi), %rcx
testq %rcx, %rcx
je 0x316c3
movl -0x4(%rax,%rcx,4), %edx
movl %edx, %edi
andl $0xf, %edi
cmpl %ebp, %edi
jne 0x316c3
shll $0x4, %ebx
addl %ebx, %edx
movl %edx, -0x4(%rax,%rcx,4)
jmp 0x316f6
cmpl (%rsi), %ecx
jne 0x316e5
leal (%rcx,%rcx), %edx
testl %ecx, %ecx
pushq $0x4
popq %rcx
cmovnel %edx, %ecx
movl %ecx, (%rsi)
shll $0x2, %ecx
movslq %ecx, %rsi
movq %rax, %rdi
callq 0x7590
movl (%r14), %ecx
shll $0x4, %ebx
orl %ebp, %ebx
leal 0x1(%rcx), %edx
movl %edx, (%r14)
movslq %ecx, %rcx
movl %ebx, (%rax,%rcx,4)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/kthread.c
// Function: kt_for
void kt_for(int n_threads, int n, void (*func)(void*,int,int), void *data)
{
	int i;
	kt_for_t t;
	pthread_t *tid;
	t.func = func, t.data = data, t.n_threads = n_threads, t.n = n;
	t.w = (ktf_worker_t*)alloca(n_threads * sizeof(ktf_worker_t));
	tid = (pthread_t*)alloca(n_threads * sizeof(pthread_t));
	for (i = 0; i < n_threads; ++i)
		t.w[i].t = &t, t.w[i].i = i;
	for (i = 0; i < n_threads; ++i) pthread_create(&tid[i], 0, ktf_worker, &t.w[i]);
	for (i = 0; i < n_threads; ++i) pthread_join(tid[i], 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq -0x48(%rbp), %rax
movq %rdx, 0x10(%rax)
movq %rcx, 0x18(%rax)
movl %edi, (%rax)
movl %esi, 0x4(%rax)
movslq %edi, %r15
movq %r15, %rdx
shlq $0x4, %rdx
movq %rsp, %rsi
movq %rsi, %rcx
subq %rdx, %rcx
movq %rcx, %rsp
movq %rcx, 0x8(%rax)
movq %rsp, %r12
leaq 0xf(,%r15,8), %rcx
andq $-0x10, %rcx
subq %rcx, %r12
movq %r12, %rsp
xorl %ecx, %ecx
testl %r15d, %r15d
cmovlel %ecx, %r15d
negq %rdx
addq %rsi, %rdx
addq $0x8, %rdx
cmpq %rcx, %r15
je 0x31984
movq %rax, -0x8(%rdx)
movl %ecx, (%rdx)
incq %rcx
addq $0x10, %rdx
jmp 0x31970
movq %r15, %r13
shlq $0x4, %r13
xorl %ebx, %ebx
movq %r12, %r14
cmpq %rbx, %r13
je 0x319b7
movq -0x40(%rbp), %rcx
addq %rbx, %rcx
movq %r14, %rdi
xorl %esi, %esi
leaq 0x35(%rip), %rdx        # 0x319dd
callq 0x7610
addq $0x10, %rbx
addq $0x8, %r14
jmp 0x31990
xorl %ebx, %ebx
cmpq %rbx, %r15
je 0x319ce
movq (%r12,%rbx,8), %rdi
xorl %esi, %esi
callq 0x7290
incq %rbx
jmp 0x319b9
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/kthread.c
// Function: ktf_worker
static void *ktf_worker(void *data)
{
	ktf_worker_t *w = (ktf_worker_t*)data;
	int i;
	for (;;) {
		i = __sync_fetch_and_add(&w->i, w->t->n_threads);
		if (i >= w->t->n) break;
		w->t->func(w->t->data, i, w - w->t->w);
	}
	while ((i = ktf_steal_work(w->t)) >= 0)
		w->t->func(w->t->data, i, w - w->t->w);
	pthread_exit(0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rbx), %rax
movl (%rax), %esi
lock
xaddl %esi, 0x8(%rbx)
movq (%rbx), %rax
cmpl 0x4(%rax), %esi
jge 0x31a09
movq 0x18(%rax), %rdi
movq %rbx, %rdx
subq 0x8(%rax), %rdx
shrq $0x4, %rdx
callq *0x10(%rax)
jmp 0x319e3
pushq $-0x1
popq %rbp
movl (%rax), %esi
xorl %edx, %edx
testl %esi, %esi
movl $0x0, %edi
cmovgl %esi, %edi
movq 0x8(%rax), %rcx
leaq 0x8(%rcx), %r8
movl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
xorl %r10d, %r10d
cmpq %rdx, %rdi
je 0x31a47
movl (%r8), %r11d
cmpl %r11d, %r9d
cmovgel %r11d, %r9d
cmovgl %edx, %r10d
incq %rdx
addq $0x10, %r8
jmp 0x31a2b
movslq %r10d, %rdx
shlq $0x4, %rdx
lock
xaddl %esi, 0x8(%rcx,%rdx)
cmpl 0x4(%rax), %esi
cmovgel %ebp, %esi
testl %esi, %esi
js 0x31a78
movq (%rbx), %rax
movq 0x18(%rax), %rdi
movq %rbx, %rdx
subq 0x8(%rax), %rdx
shrq $0x4, %rdx
callq *0x10(%rax)
movq (%rbx), %rax
jmp 0x31a0c
xorl %edi, %edi
callq 0x75f0
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/kthread.c
// Function: kt_init
kthread_t *kt_init(int n_threads)
{
	kthread_t *t;
	int i;
	t = (kthread_t*)calloc(1, sizeof(kthread_t));
	t->n_threads = n_threads;
	t->w = (kts_worker_t*)calloc(t->n_threads, sizeof(kts_worker_t));
	pthread_mutex_init(&t->lock, 0);
	pthread_cond_init(&t->cv, 0);
	for (i = 0; i < t->n_threads; ++i) {
		t->w[i].i = i, t->w[i].t = t, t->w[i].pending = -1;
		pthread_create(&t->w[i].tid, 0, kts_worker, &t->w[i]);
	}
	return t;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %ebp
pushq $0x1
popq %rdi
movl $0x6070, %esi           # imm = 0x6070
callq 0x71b0
movq %rax, %rbx
movl %ebp, 0x8(%rax)
movslq %ebp, %rdi
pushq $0x20
popq %rsi
callq 0x71b0
movq %rax, (%rbx)
leaq 0x6018(%rbx), %rdi
xorl %r15d, %r15d
xorl %esi, %esi
callq 0x74e0
movq %rbx, %rdi
addq $0x6040, %rdi           # imm = 0x6040
xorl %esi, %esi
callq 0x7380
leaq 0x45(%rip), %r14        # 0x31b18
xorl %r12d, %r12d
movslq 0x8(%rbx), %rax
cmpq %rax, %r12
jge 0x31b0c
movq (%rbx), %rcx
leaq (%rcx,%r15), %rdi
addq $0x10, %rdi
addq %r15, %rcx
movl %r12d, -0x8(%rdi)
movq %rbx, -0x10(%rdi)
orl $-0x1, 0x8(%rdi)
xorl %esi, %esi
movq %r14, %rdx
callq 0x7610
incq %r12
addq $0x20, %r15
jmp 0x31ad6
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/kthread.c
// Function: kts_worker
static void *kts_worker(void *data)
{
	kts_worker_t *w = (kts_worker_t*)data;
	for (;;) {
		int i, to_sync, n_slots;
		// update the task and slot information
		pthread_mutex_lock(&w->t->lock);
		while (w->i >= w->t->n_slots && !w->t->to_sync)
			pthread_cond_wait(&w->t->cv, &w->t->lock);
		to_sync = w->t->to_sync, n_slots = w->t->n_slots;
		pthread_mutex_unlock(&w->t->lock);
		// process the pending slot if there is any
		if (w->pending >= 0 && w->pending < n_slots) {
			process_slot(w->t, w->pending, w - w->t->w);
			w->pending = -1;
		}
		// process slots assigned to the current worker
		for (;;) {
			i = __sync_fetch_and_add(&w->i, w->t->n_threads);
			if (i >= n_slots) break;
			process_slot(w->t, i, w - w->t->w);
		}
		// steal slots from other workers
		for (;;) {
			int min = 0x7fffffff, min_i = 0;
			for (i = 0; i < w->t->n_threads; ++i)
				if (min > w->t->w[i].i) min = w->t->w[i].i, min_i = i;
			i = __sync_fetch_and_add(&w->t->w[min_i].i, w->t->n_threads);
			if (i >= n_slots) {
				w->pending = i;
				break;
			} else process_slot(w->t, i, w - w->t->w);
		}
		if (to_sync) break;
	}
	pthread_exit(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x6018, %r14d          # imm = 0x6018
movq (%rbx), %rdi
addq %r14, %rdi
callq 0x74b0
movl 0x8(%rbx), %eax
movq (%rbx), %rsi
movl 0xc(%rsi), %ecx
movl 0x14(%rsi), %ebp
cmpl %ebp, %eax
jl 0x31b5d
testl %ecx, %ecx
jne 0x31b5d
leaq 0x6040(%rsi), %rdi
addq $0x6018, %rsi           # imm = 0x6018
callq 0x7500
jmp 0x31b34
testl %ecx, %ecx
sete %r12b
cmpl %ebp, %eax
setl %r15b
addq $0x6018, %rsi           # imm = 0x6018
movq %rsi, %rdi
callq 0x7220
movl 0x18(%rbx), %esi
testl %esi, %esi
sets %al
cmpl %ebp, %esi
setge %cl
orb %al, %cl
jne 0x31b9f
movq (%rbx), %rdi
movq %rbx, %rdx
subq (%rdi), %rdx
shrq $0x5, %rdx
callq 0x31d14
orl $-0x1, 0x18(%rbx)
andb %r12b, %r15b
movq (%rbx), %rax
movl 0x8(%rax), %esi
lock
xaddl %esi, 0x8(%rbx)
cmpl %ebp, %esi
jge 0x31bd7
movq (%rbx), %rdi
movq %rbx, %rdx
subq (%rdi), %rdx
shrq $0x5, %rdx
callq 0x31d14
jmp 0x31ba2
movq (%rbx), %rdi
movq %rbx, %rdx
subq (%rdi), %rdx
shrq $0x5, %rdx
callq 0x31d14
movq (%rbx), %rax
movl 0x8(%rax), %esi
xorl %ecx, %ecx
testl %esi, %esi
movl $0x0, %edx
cmovgl %esi, %edx
movq (%rax), %rax
leaq 0x8(%rax), %rdi
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
xorl %r9d, %r9d
cmpq %rcx, %rdx
je 0x31c15
movl (%rdi), %r10d
cmpl %r10d, %r8d
cmovgel %r10d, %r8d
cmovgl %ecx, %r9d
incq %rcx
addq $0x20, %rdi
jmp 0x31bf9
movslq %r9d, %rcx
shlq $0x5, %rcx
lock
xaddl %esi, 0x8(%rax,%rcx)
cmpl %ebp, %esi
jl 0x31bc5
movl %esi, 0x18(%rbx)
testb %r15b, %r15b
jne 0x31b29
xorl %edi, %edi
callq 0x75f0
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/kthread.c
// Function: kt_sync
void kt_sync(kthread_t *t)
{
	int i;
	pthread_mutex_lock(&t->lock);
	t->to_sync = 1;
	pthread_cond_broadcast(&t->cv);
	pthread_mutex_unlock(&t->lock);
	for (i = 0; i < t->n_threads; ++i)
		pthread_join(t->w[i].tid, 0);
	free(t->w); free(t);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x6018(%rdi), %r14
movq %r14, %rdi
callq 0x74b0
movl $0x1, 0xc(%rbx)
leaq 0x6040(%rbx), %rdi
callq 0x7110
movq %r14, %rdi
callq 0x7220
pushq $0x10
popq %r14
xorl %r15d, %r15d
movslq 0x8(%rbx), %rax
movq (%rbx), %rdi
cmpq %rax, %r15
jge 0x31c92
movq (%rdi,%r14), %rdi
xorl %esi, %esi
callq 0x7290
incq %r15
addq $0x20, %r14
jmp 0x31c72
callq 0x7360
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x7360
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/kthread.c
// Function: kt_spawn
int kt_spawn(kthread_t *t, int n, void (*func)(void*,int,int), void *data)
{
	kts_task_t *task;
	if (t->n_tasks >= KT_MAX_TASKS) return -1;
	pthread_mutex_lock(&t->lock);
	task = &t->tasks[t->n_tasks++];
	task->n = n, task->func = func, task->data = data;
	t->n_slots += n;
	pthread_cond_broadcast(&t->cv);
	pthread_mutex_unlock(&t->lock);
	return 0;
}

// Assembly:
cmpl $0x3ff, 0x10(%rdi)      # imm = 0x3FF
jle 0x31cb1
pushq $-0x1
popq %rax
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x6018(%rdi), %r12
movq %r12, %rdi
callq 0x74b0
movslq 0x10(%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x10(%rbx)
imulq $0x18, %rax, %rax
movl %ebp, 0x18(%rbx,%rax)
movq %r15, 0x20(%rbx,%rax)
movq %r14, 0x28(%rbx,%rax)
addl %ebp, 0x14(%rbx)
addq $0x6040, %rbx           # imm = 0x6040
movq %rbx, %rdi
callq 0x7110
movq %r12, %rdi
callq 0x7220
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/kthread.c
// Function: process_slot
static inline void process_slot(const kthread_t *t, int i, int tid)
{
	int j;
	for (j = 0;; ++j) {
		kts_task_t task = t->tasks[j];
		if (i < task.n) {
			task.func(task.data, i, tid);
			break;
		} else i -= task.n;
	}
}

// Assembly:
addq $0x28, %rdi
movl %esi, %eax
subl -0x10(%rdi), %eax
jl 0x31d27
addq $0x18, %rdi
movl %eax, %esi
jmp 0x31d1a
movq -0x8(%rdi), %rax
movq (%rdi), %rdi
jmpq *%rax
// File: /workspace/github_cpp_makefile_star2_O2/ArashPartow[P]exprtk-extras/exprtk_binomial_coefficient.cpp
// Function: double ncr_println<double>(double, double, double)
inline T ncr_println(T n, T r, T ncr)
{
   printf("ncr(%2d,%2d) = %2llu\n",
          static_cast<int>(n),
          static_cast<int>(r),
          static_cast<unsigned long long>(ncr));

   return T(0);
}

// Assembly:
pushq %rax
cvttsd2si %xmm0, %esi
cvttsd2si %xmm1, %edx
cvttsd2si %xmm2, %rax
movq %rax, %rdi
sarq $0x3f, %rdi
subsd 0x12b8a1(%rip), %xmm2   # 0x23f008
cvttsd2si %xmm2, %rcx
andq %rdi, %rcx
orq %rax, %rcx
leaq 0x130b80(%rip), %rdi    # 0x2442f9
xorl %eax, %eax
callq 0x111060
xorpd %xmm0, %xmm0
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/white0dew[P]WebServer/http/http_conn.cpp
// Function: http_conn::parse_headers(char*)
http_conn::HTTP_CODE http_conn::parse_headers(char *text)
{
    //判断是空行还是请求头
    if (text[0] == '\0')
    {
        //判断是GET还是POST请求
        //!0 is POST
        if (m_content_length != 0)
        {
            //POST需要跳转到消息体处理状态
            m_check_state = CHECK_STATE_CONTENT;
            return NO_REQUEST;
        }
        //==0 is GET
        return GET_REQUEST;
    }
    //解析请求头部connection字段
    else if (strncasecmp(text, "Connection:", 11) == 0)
    {
        text += 11;

        //跳过空格和\t字符
        text += strspn(text, " \t");
        if (strcasecmp(text, "keep-alive") == 0)
        {
            //如果是长连接，则将linger标志设置为true
            m_linger = true;
        }
    }
    //解析请求头部Content-length字段
    else if (strncasecmp(text, "Content-length:", 15) == 0)
    {
        text += 15;
        text += strspn(text, " \t");
        m_content_length = atol(text);
    }
    //解析请求头部Host字段
    else if (strncasecmp(text, "Host:", 5) == 0)
    {
        text += 5;
        text += strspn(text, " \t");
        m_host = text;
    }
    else
    {
        LOG_INFO("oop!unknow header: %s", text);
    }
    return NO_REQUEST;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, (%rsi)
je 0x4714
movq %rsi, %r14
leaq 0x3bca(%rip), %rsi      # 0x8258
pushq $0xb
popq %rdx
movq %r14, %rdi
callq 0x34d0
testl %eax, %eax
je 0x4729
leaq 0x3bc7(%rip), %rsi      # 0x826f
pushq $0xf
popq %rdx
movq %r14, %rdi
callq 0x34d0
testl %eax, %eax
je 0x475c
leaq 0x3bbd(%rip), %rsi      # 0x827f
pushq $0x5
popq %rdx
movq %r14, %rdi
callq 0x34d0
testl %eax, %eax
je 0x4786
xorl %ebp, %ebp
cmpl $0x0, 0xe34(%rbx)
jne 0x47a6
callq 0x53c4
leaq 0x3b95(%rip), %rdx      # 0x8285
xorl %ebp, %ebp
pushq $0x1
popq %rsi
movq %rax, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x5e62
callq 0x53c4
movq %rax, %rdi
callq 0x6222
jmp 0x47a6
cmpl $0x0, 0xd20(%rbx)
je 0x4781
movl $0x2, 0xc38(%rbx)
jmp 0x47a4
leaq 0xb(%r14), %rdi
leaq 0x3af3(%rip), %rsi      # 0x8227
callq 0x3150
leaq (%r14,%rax), %rdi
addq $0xb, %rdi
leaq 0x3b1c(%rip), %rsi      # 0x8264
callq 0x3400
xorl %ebp, %ebp
testl %eax, %eax
jne 0x47a6
movb $0x1, 0xd24(%rbx)
jmp 0x47a6
leaq 0xf(%r14), %rdi
leaq 0x3ac0(%rip), %rsi      # 0x8227
callq 0x3150
leaq (%r14,%rax), %rdi
addq $0xf, %rdi
callq 0x3490
movl %eax, 0xd20(%rbx)
jmp 0x47a4
pushq $0x1
popq %rbp
jmp 0x47a6
leaq 0x5(%r14), %rdi
leaq 0x3a96(%rip), %rsi      # 0x8227
callq 0x3150
addq %r14, %rax
addq $0x5, %rax
movq %rax, 0xd18(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/white0dew[P]WebServer/http/http_conn.cpp
// Function: http_conn::add_response(char const*, ...)
bool http_conn::add_response(const char *format, ...)
{
    //如果写入内容超出m_write_buf大小则报错
    if (m_write_idx >= WRITE_BUFFER_SIZE)
        return false;
    //定义可变参数列表
    va_list arg_list;
    //将变量arg_list初始化为传入参数
    va_start(arg_list, format);
    //将数据format从可变参数列表写入缓冲区写，返回写入数据的长度
    int len = vsnprintf(m_write_buf + m_write_idx, WRITE_BUFFER_SIZE - 1 - m_write_idx, format, arg_list);
    //如果写入的数据长度超过缓冲区剩余空间，则报错
    if (len >= (WRITE_BUFFER_SIZE - 1 - m_write_idx))
    {
        va_end(arg_list);
        return false;
    }
    //更新m_write_idx位置
    m_write_idx += len;
    //清空可变参列表
    va_end(arg_list);

    LOG_INFO("request:%s", m_write_buf);

    return true;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0xd8, %rsp
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x5019
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %r8, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
cmpl $0x3ff, 0xc34(%rdi)     # imm = 0x3FF
jle 0x503b
xorl %ebp, %ebp
jmp 0x50dd
movq %rsi, %r10
movq %rdi, %rbx
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rcx)
movslq 0xc34(%rdi), %rax
addq %rax, %rdi
addq $0x834, %rdi            # imm = 0x834
movl $0x3ff, %esi            # imm = 0x3FF
subq %rax, %rsi
movq %r10, %rdx
callq 0x3280
movl 0xc34(%rbx), %ecx
movl $0x3ff, %edx            # imm = 0x3FF
subl %ecx, %edx
cmpl %edx, %eax
setl %bpl
jge 0x50dd
addl %eax, %ecx
movl %ecx, 0xc34(%rbx)
cmpl $0x0, 0xe34(%rbx)
jne 0x50dd
addq $0x834, %rbx            # imm = 0x834
callq 0x53c4
leaq 0x327d(%rip), %rdx      # 0x833d
pushq $0x1
popq %rsi
movq %rax, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x5e62
callq 0x53c4
movq %rax, %rdi
callq 0x6222
movl %ebp, %eax
addq $0xd8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/white0dew[P]WebServer/././threadpool/threadpool.h
// Function: threadpool<http_conn>::run()
void threadpool<T>::run()
{
    while (true)
    {
        m_queuestat.wait();
        m_queuelocker.lock();
        if (m_workqueue.empty())
        {
            m_queuelocker.unlock();
            continue;
        }
        //
        T *request = m_workqueue.front();
        m_workqueue.pop_front();
        m_queuelocker.unlock();
        if (!request)
            continue;
        //Reactor
        if (1 == m_actor_model)
        {
            //IO事件类型：0为读
            if (0 == request->m_state)
            {
                if (request->read_once())
                {
                    request->improv = 1;
                    connectionRAII mysqlcon(&request->mysql, m_connPool);
                    request->process();
                }
                else
                {
                    request->improv = 1;
                    request->timer_flag = 1;
                }
            }
            else
            {
                if (request->write())
                {
                    request->improv = 1;
                }
                else
                {
                    request->improv = 1;
                    request->timer_flag = 1;
                }
            }
        }
        //default:Proactor，线程池不需要进行数据读取，而是直接开始业务处理
        //之前的操作已经将数据读取到http的read和write的buffer中了
        else
        {
            connectionRAII mysqlcon(&request->mysql, m_connPool);
            request->process();
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x50(%rdi), %r14
leaq 0x28(%rdi), %r15
leaq 0x10(%rdi), %r12
leaq 0x8(%rsp), %r13
movq %r14, %rdi
callq 0x69d4
movq %r15, %rdi
callq 0x549a
movq (%r12), %rax
cmpq %r12, %rax
je 0x7d49
movq 0x10(%rax), %rbp
movq %r12, %rdi
callq 0x7dc6
movq %r15, %rdi
callq 0x54fe
testq %rbp, %rbp
je 0x7cf6
cmpl $0x1, 0x78(%rbx)
jne 0x7d53
cmpl $0x0, 0x10(%rbp)
je 0x7d75
movq %rbp, %rdi
callq 0x4e8c
movl $0x1, 0x4(%rbp)
testb %al, %al
jne 0x7cf6
jmp 0x7da2
movq %r15, %rdi
callq 0x54fe
jmp 0x7cf6
leaq 0x8(%rbp), %rsi
movq 0x70(%rbx), %rdx
movq %r13, %rdi
callq 0x6912
movq %rbp, %rdi
callq 0x5332
movq %r13, %rdi
callq 0x6938
jmp 0x7cf6
movq %rbp, %rdi
callq 0x440a
movl $0x1, 0x4(%rbp)
testb %al, %al
je 0x7da2
leaq 0x8(%rbp), %rsi
movq 0x70(%rbx), %rdx
movq %r13, %rdi
callq 0x6912
movq %rbp, %rdi
callq 0x5332
jmp 0x7d6b
movl $0x1, (%rbp)
jmp 0x7cf6
jmp 0x7db0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6938
movq %rbx, %rdi
callq 0x3630
nop
// File: /workspace/github_cpp_makefile_star2_O2/loadzero[P]geoloc/geoloc/geoloc.cpp
// Function: usage(char const*)
static void usage(const char* condition)
{
    if (condition)
    {
        fprintf(stderr, "%s\n", condition);
    }

    fprintf(stderr, "usage:");
    fprintf(stderr, "\tgeoloc -f file ... [--headers]\n");
    fprintf(stderr, "\tgeoloc -q ip ...\n");
    fprintf(stderr, "\n");
    fprintf(stderr, "This software includes GeoLite data created by MaxMind\n");
    fprintf(stderr, "available from http://www.maxmind.com\n");

    exit(1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3e09
movq %rdi, %rdx
movq 0xc1e0(%rip), %rax      # 0xffd8
movq (%rax), %rdi
leaq 0x62ca(%rip), %rsi      # 0xa0cc
xorl %eax, %eax
callq 0x3300
movq 0xc1c8(%rip), %r14      # 0xffd8
movq (%r14), %rcx
leaq 0x6336(%rip), %rdi      # 0xa150
pushq $0x6
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x33d0
movq (%r14), %rcx
leaq 0x6325(%rip), %rdi      # 0xa157
pushq $0x20
popq %rsi
movq %rbx, %rdx
callq 0x33d0
movq (%r14), %rcx
leaq 0x6331(%rip), %rdi      # 0xa178
pushq $0x12
popq %rsi
movq %rbx, %rdx
callq 0x33d0
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x3280
movq (%r14), %rcx
leaq 0x6324(%rip), %rdi      # 0xa18b
pushq $0x37
popq %rsi
movq %rbx, %rdx
callq 0x33d0
movq (%r14), %rcx
leaq 0x6347(%rip), %rdi      # 0xa1c3
pushq $0x26
popq %rsi
movq %rbx, %rdx
callq 0x33d0
pushq $0x1
popq %rdi
callq 0x3240
// File: /workspace/github_cpp_makefile_star2_O2/loadzero[P]geoloc/geoloc/etl.hpp
// Function: etl(char const*, char const*, char const*, char const*)
inline void etl(const char* city_blocks,
                const char* city_locs,
                const char* geo_asns,
                const char* output)
{
    LOG_CONTEXT("etl blocks %s locs %s asns %s into file %s", 
                 city_blocks,
                 city_locs,
                 geo_asns,
                 output);

    BinaryFile file;
    bool ok = file.open(output);

    if (!ok)
    {
        FATAL_ERROR("could not open %s for writing", output);
    }

    char buf[32]; get_header(buf, sizeof(buf));

    file.save_bytes_raw(buf, sizeof(buf));
    build_geo_data(file, city_blocks, city_locs, geo_asns);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rcx, (%rsp)
leaq 0x6273(%rip), %rdi      # 0xa233
leaq 0x627b(%rip), %rdx      # 0xa242
pushq $0x6b
popq %rsi
movq %r15, %rcx
movq %r14, %r8
movq %rbx, %r9
xorl %eax, %eax
callq 0x93b8
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
movq %r12, %rsi
callq 0x4180
testb %al, %al
jne 0x4010
leaq 0x6237(%rip), %rdi      # 0xa233
leaq 0x626a(%rip), %rdx      # 0xa26d
pushq $0x72
popq %rsi
movq %r12, %rcx
xorl %eax, %eax
callq 0x94d0
leaq 0x30(%rsp), %rdi
pushq $0x20
popq %rsi
callq 0x41a1
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
pushq $0x20
popq %rdx
callq 0x422a
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x4264
leaq 0x10(%rsp), %rdi
callq 0x4292
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x405a
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4292
movq %rbx, %rdi
callq 0x3370
movq %rax, %rdi
callq 0x3e8f
// File: /workspace/github_cpp_makefile_star2_O2/loadzero[P]geoloc/geoloc/query.hpp
// Function: query(char const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, bool)
inline void query(const char* data_file_name,
                  const std::vector<std::string> &data_sources,
                  bool show_headers)
{
    LOG_CONTEXT("query data %s with %zu sources", data_file_name, data_sources.size());

    GeoData data;
    data.open(data_file_name);

    if (show_headers)
    {
        IPResultEmitter::show_headers();
    }

    for (size_t i = 0; i < data_sources.size(); ++i)
    {
        query(data, data_sources[i]);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %r8
subq (%rsi), %r8
sarq $0x5, %r8
leaq 0x654a(%rip), %rdi      # 0xa5ea
leaq 0x6554(%rip), %rdx      # 0xa5fb
movl $0x1b3, %esi            # imm = 0x1B3
movq %r14, %rcx
xorl %eax, %eax
callq 0x93b8
leaq 0x8(%rsp), %r15
movl $0x98, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x3120
movq %r15, %rdi
movq %r14, %rsi
callq 0x798a
testb %bpl, %bpl
je 0x40df
callq 0x7a86
xorl %r15d, %r15d
leaq 0x8(%rsp), %r14
xorl %r12d, %r12d
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %rax, %r12
jae 0x4111
addq %r15, %rsi
movq %r14, %rdi
callq 0x7aa2
incq %r12
addq $0x20, %r15
jmp 0x40ea
leaq 0x8(%rsp), %rdi
callq 0x7cf0
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x412d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7cf0
movq %rbx, %rdi
callq 0x3370
// File: /workspace/github_cpp_makefile_star2_O2/loadzero[P]geoloc/geoloc/etl.hpp
// Function: get_header(char*, unsigned long)
inline void get_header(char* buf, size_t n)
{
    REL_ASSERT(n > 0);

    memset(buf, '-', n);

    int np = snprintf(buf, n, "geoloc loadzero v001 %s ", get_endian());

    REL_ASSERT(np >= 0);

    if (np > (int) (n-1))
    {
        np = n-1;
    }

    buf[np] = '-';
    buf[n-1] = '\n';
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
jne 0x41c8
leaq 0x607c(%rip), %rdi      # 0xa233
leaq 0x60cf(%rip), %rdx      # 0xa28d
pushq $0x51
popq %rsi
xorl %eax, %eax
callq 0x94d0
pushq $0x2d
popq %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x3120
leaq 0x60c6(%rip), %rdx      # 0xa2a3
leaq 0x60f0(%rip), %rcx      # 0xa2d4
movq %r14, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3330
movl %eax, %ebp
testl %eax, %eax
jns 0x420f
leaq 0x6035(%rip), %rdi      # 0xa233
leaq 0x60b7(%rip), %rdx      # 0xa2bc
pushq $0x57
popq %rsi
xorl %eax, %eax
callq 0x94d0
leaq -0x1(%rbx), %rax
cmpl %eax, %ebp
cmovll %ebp, %eax
cltq
movb $0x2d, (%r14,%rax)
movb $0xa, -0x1(%r14,%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/loadzero[P]geoloc/geoloc/etl.hpp
// Function: build_blocks(BinaryFile&, char const*)
inline void build_blocks(BinaryFile &file, const char* source)
{
    LOG_CONTEXT("build_blocks from %s", source);

    FileReader reader(source);
    BlockParser parser;

    std::vector<Block> blocks;
    Collector<Block> collector(blocks);

    reader | parser | collector;
    reader.produce();

    save_blocks(file, blocks);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x5f6a(%rip), %rdi      # 0xa233
leaq 0x6047(%rip), %rdx      # 0xa317
pushq $0x27
popq %rsi
movq %r15, %rcx
xorl %eax, %eax
callq 0x93b8
leaq 0x48(%rsp), %rdi
movq %rsp, %r14
movq %r15, %rsi
movq %r14, %rdx
callq 0x30c0
leaq 0x20(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x468a
leaq 0x48(%rsp), %r15
movq %r15, %rdi
callq 0x3260
leaq 0xb785(%rip), %rax      # 0xfa98
leaq 0x68(%rsp), %rcx
movq %rax, -0x20(%rcx)
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rcx)
andq $0x0, 0x10(%rsp)
leaq 0x98(%rsp), %rax
andq $0x0, 0x8(%rax)
movups %xmm0, 0x20(%rcx)
movaps %xmm0, (%rsp)
leaq 0xb797(%rip), %rdx      # 0xfae8
movq %rdx, (%rax)
movq %r14, 0x10(%rax)
leaq 0x20(%rsp), %rdi
movq %r15, 0x8(%rdi)
movq %rax, -0x18(%rcx)
callq 0x473c
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4756
movq %rsp, %rdi
callq 0x5318
leaq 0x48(%rsp), %rdi
callq 0x48fa
leaq 0x20(%rsp), %rdi
callq 0x4946
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x43cc
movq %rax, %rbx
jmp 0x43c2
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x3260
jmp 0x43db
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5318
leaq 0x48(%rsp), %rdi
callq 0x48fa
leaq 0x20(%rsp), %rdi
callq 0x4946
jmp 0x43db
movq %rax, %rbx
movq %rbx, %rdi
callq 0x3370
movq %rax, %rdi
callq 0x3e8f
// File: /workspace/github_cpp_makefile_star2_O2/loadzero[P]geoloc/geoloc/etl.hpp
// Function: build_locations(BinaryFile&, char const*)
inline void build_locations(BinaryFile &file, const char* source)
{
    LOG_CONTEXT("build_locations from %s", source);

    FileReader reader(source);
    LocationParser parser;

    std::vector<Location> locations;
    Collector<Location> collector(locations);

    reader | parser | collector;
    reader.produce();

    save_locations(file, locations);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x5e2f(%rip), %rdi      # 0xa233
leaq 0x60c1(%rip), %rdx      # 0xa4cc
pushq $0x17
popq %rsi
movq %r15, %rcx
xorl %eax, %eax
callq 0x93b8
leaq 0x48(%rsp), %rdi
movq %rsp, %r14
movq %r15, %rsi
movq %r14, %rdx
callq 0x30c0
leaq 0x20(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x468a
leaq 0x48(%rsp), %r15
movq %r15, %rdi
callq 0x3260
leaq 0xb6ea(%rip), %rax      # 0xfb38
leaq 0x68(%rsp), %rcx
movq %rax, -0x20(%rcx)
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
xorl %eax, %eax
movb %al, (%rcx)
leaq 0x88(%rsp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movb %al, (%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rcx)
andq $0x0, 0x10(%rsp)
leaq 0xb8(%rsp), %rax
andq $0x0, 0x8(%rax)
movups %xmm0, 0x20(%rcx)
movaps %xmm0, (%rsp)
leaq 0xb6e8(%rip), %rdx      # 0xfb88
movq %rdx, (%rax)
movq %r14, 0x10(%rax)
leaq 0x20(%rsp), %rdi
movq %r15, 0x8(%rdi)
movq %rax, -0x38(%rcx)
callq 0x473c
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x5333
movq %rsp, %rdi
callq 0x55a2
leaq 0x48(%rsp), %rdi
callq 0x55e0
leaq 0x20(%rsp), %rdi
callq 0x4946
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x451b
movq %rax, %rbx
jmp 0x4511
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x3260
jmp 0x452a
movq %rax, %rbx
movq %rsp, %rdi
callq 0x55a2
leaq 0x48(%rsp), %rdi
callq 0x55e0
leaq 0x20(%rsp), %rdi
callq 0x4946
jmp 0x452a
movq %rax, %rbx
movq %rbx, %rdi
callq 0x3370
movq %rax, %rdi
callq 0x3e8f
// File: /workspace/github_cpp_makefile_star2_O2/loadzero[P]geoloc/geoloc/etl.hpp
// Function: build_asns(BinaryFile&, char const*)
inline void build_asns(BinaryFile &file, const char* source)
{
    LOG_CONTEXT("build_asns from %s", source);

    FileReader reader(source);
    ASNParser parser;

    std::vector<ASN> asns;
    Collector<ASN> collector(asns);

    reader | parser | collector;
    reader.produce();

    save_asns(file, asns);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x5ce0(%rip), %rdi      # 0xa233
leaq 0x5fcc(%rip), %rdx      # 0xa526
pushq $0x37
popq %rsi
movq %r15, %rcx
xorl %eax, %eax
callq 0x93b8
leaq 0x48(%rsp), %rdi
movq %rsp, %r14
movq %r15, %rsi
movq %r14, %rdx
callq 0x30c0
leaq 0x20(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x468a
leaq 0x48(%rsp), %r15
movq %r15, %rdi
callq 0x3260
leaq 0xb63b(%rip), %rax      # 0xfbd8
leaq 0x68(%rsp), %rcx
movq %rax, -0x20(%rcx)
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
xorl %eax, %eax
movb %al, (%rcx)
leaq 0x88(%rsp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movb %al, (%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rcx)
andq $0x0, 0x10(%rsp)
leaq 0xb8(%rsp), %rax
andq $0x0, 0x8(%rax)
movups %xmm0, 0x20(%rcx)
movaps %xmm0, (%rsp)
leaq 0xb639(%rip), %rdx      # 0xfc28
movq %rdx, (%rax)
movq %r14, 0x10(%rax)
leaq 0x20(%rsp), %rdi
movq %r15, 0x8(%rdi)
movq %rax, -0x38(%rcx)
callq 0x473c
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x6c31
movq %rsp, %rdi
callq 0x6ef0
leaq 0x48(%rsp), %rdi
callq 0x6f2e
leaq 0x20(%rsp), %rdi
callq 0x4946
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x466a
movq %rax, %rbx
jmp 0x4660
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x3260
jmp 0x4679
movq %rax, %rbx
movq %rsp, %rdi
callq 0x6ef0
leaq 0x48(%rsp), %rdi
callq 0x6f2e
leaq 0x20(%rsp), %rdi
callq 0x4946
jmp 0x4679
movq %rax, %rbx
movq %rbx, %rdi
callq 0x3370
movq %rax, %rdi
callq 0x3e8f
nop