LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/asd00012334[P]Abstract-Algebra-2018/main.cpp
// Function: operator>>(std::istream&, Polynomial<quotient::FracType, quotient::fraction>&)
std::istream& operator>>(std::istream& in, Polynomial& f){
        std::string str;
        getline(in,str);
        std::stringstream ss(str);
        for(int tmp;ss>>tmp;)
            f.coef.push_back(tmp);
        std::reverse(f.coef.begin(),f.coef.end());
        f.reduce();
        return in;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq (%rdi), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %edx
leaq -0x68(%rbp), %rsi
movq %rbx, %rdi
callq 0x22c0
movq %rbx, -0x48(%rbp)
leaq -0x1f0(%rbp), %rdi
leaq -0x68(%rbp), %rsi
movl $0x18, %edx
callq 0x2250
leaq 0x10(%r14), %r15
leaq -0x1f0(%rbp), %r12
leaq -0x2c(%rbp), %r13
leaq -0x40(%rbp), %rbx
movq %r12, %rdi
movq %r13, %rsi
callq 0x20f0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x4d20
movslq -0x2c(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x1, -0x38(%rbp)
movq 0x18(%r14), %rsi
cmpq 0x20(%r14), %rsi
je 0x4d13
movups -0x40(%rbp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x18(%r14)
jmp 0x4cd2
movq %r15, %rdi
movq %rbx, %rdx
callq 0x7068
jmp 0x4cd2
movq 0x10(%r14), %rax
movq 0x18(%r14), %rcx
cmpq %rcx, %rax
setne %dl
addq $-0x10, %rcx
cmpq %rax, %rcx
seta %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x4d6c
addq $0x10, %rax
movups -0x10(%rax), %xmm0
movaps %xmm0, -0x40(%rbp)
movups (%rcx), %xmm0
movups %xmm0, -0x10(%rax)
movaps -0x40(%rbp), %xmm0
movups %xmm0, (%rcx)
addq $-0x10, %rcx
leaq 0x10(%rax), %rdx
cmpq %rcx, %rax
movq %rdx, %rax
jb 0x4d46
movq %r14, %rdi
callq 0x4010
movq -0x48(%rbp), %rbx
movq 0x8211(%rip), %rsi      # 0xcf90
leaq -0x1f0(%rbp), %rdi
callq 0x2140
leaq -0x170(%rbp), %rdi
callq 0x2080
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x4da9
callq 0x2180
movq %rbx, %rax
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4dc9
jmp 0x4dc2
movq %rax, %rbx
jmp 0x4deb
jmp 0x4dc9
movq %rax, %rbx
movq 0x81bd(%rip), %rsi      # 0xcf90
leaq -0x1f0(%rbp), %rdi
callq 0x2140
leaq -0x170(%rbp), %rdi
callq 0x2080
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x4dfd
callq 0x2180
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O1/asd00012334[P]Abstract-Algebra-2018/main.cpp
// Function: operator<<(std::ostream&, DegreeList const&)
std::ostream& operator<<(std::ostream& out, DegreeList const& x){
        out<<"[ ";
        for(int i=0;i<x.size();++i){
            if(i&&i<x.size()) out<<", ";
            out<<x[i];
        }
        out<<" ]";
        return out;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x3f0f(%rip), %rsi      # 0x908c
movl $0x2, %edx
callq 0x21c0
movq 0x8(%r14), %rax
cmpq (%r14), %rax
je 0x51d1
xorl %r12d, %r12d
leaq 0x3ef5(%rip), %r15      # 0x908f
testq %r12, %r12
je 0x51af
movl $0x2, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21c0
movq (%r14), %rax
movl (%rax,%r12,4), %esi
movq %rbx, %rdi
callq 0x2290
incq %r12
movq 0x8(%r14), %rax
subq (%r14), %rax
sarq $0x2, %rax
cmpq %r12, %rax
ja 0x519a
leaq 0x3eba(%rip), %rsi      # 0x9092
movl $0x2, %edx
movq %rbx, %rdi
callq 0x21c0
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/asd00012334[P]Abstract-Algebra-2018/./prime.hpp
// Function: std::pair<long long, long long> prime::extGCD<long long>(long long, long long)
std::pair<type,type> extGCD(type left, type right){
    if(!left && !right) throw std::logic_error("Return value does not exist.\n");
    std::pair<type,type> lCor(1,0), rCor(0,1);
    if(left<0) lCor.first = -1;
    if(right<0) rCor.second = -1;
    left = abs(left);
    right = abs(right);
    while(left){
        std::swap(lCor,rCor);
        std::swap(left,right);
        lCor.first -= left/right*rCor.first;
        lCor.second -= left/right*rCor.second;
        left %= right;
    }
    return rCor;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rax
orq %rdi, %rax
je 0x558a
movq %rsi, %rcx
sarq $0x3f, %rcx
orq $0x1, %rcx
testl %edi, %edi
je 0x557d
movl %esi, %eax
negl %eax
cmovsl %esi, %eax
movl %edi, %edx
negl %edx
cmovsl %edi, %edx
sarq $0x3f, %rdi
orq $0x1, %rdi
xorl %r9d, %r9d
movq %rcx, %r8
xorl %r10d, %r10d
movq %rdx, %r11
xorl %edx, %edx
divq %r11
movq %r10, %rcx
movq %rdi, %rsi
movq %rax, %r10
imulq %rdi, %r10
movq %r9, %rdi
subq %r10, %rdi
imulq %rcx, %rax
movq %r8, %r10
subq %rax, %r10
movq %rcx, %r8
movq %rsi, %r9
movq %r11, %rax
testq %rdx, %rdx
jne 0x5548
jmp 0x557f
xorl %esi, %esi
movq %rsi, %rax
movq %rcx, %rdx
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x20d0
movq %rax, %rbx
leaq 0x3af7(%rip), %rsi      # 0x9095
movq %rax, %rdi
callq 0x2200
movq 0x7a1b(%rip), %rsi      # 0xcfc8
movq 0x79fc(%rip), %rdx      # 0xcfb0
movq %rbx, %rdi
callq 0x2280
movq %rax, %r14
movq %rbx, %rdi
callq 0x2130
movq %r14, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/asd00012334[P]Abstract-Algebra-2018/main.cpp
// Function: Polynomial<prime::Zp, prime::ZpElement>::CanonicalType::__unit__() const
Polynomial __unit__()const{
            Polynomial out;
            out.canonicalType.scalar = scalar;
            out.coef.push_back(scalar->__unit__());
            return out;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, (%rdi)
movq %rdi, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movq %rax, 0x20(%rdi)
movq (%rsi), %rax
movq %rax, (%rdi)
movq %rax, -0x28(%rbp)
movq %rax, -0x20(%rbp)
movq (%rax), %rcx
movl $0x1, %eax
xorl %edx, %edx
idivq %rcx
leaq (%rdx,%rcx), %rax
cqto
idivq %rcx
movq %rdx, -0x18(%rbp)
movq 0x18(%rdi), %rsi
cmpq 0x20(%rdi), %rsi
je 0x5ed2
movq -0x18(%rbp), %rax
movq %rax, 0x10(%rsi)
movups -0x28(%rbp), %xmm0
movups %xmm0, (%rsi)
addq $0x18, 0x18(%rbx)
jmp 0x5ee2
leaq 0x10(%rbx), %r14
leaq -0x28(%rbp), %rdx
movq %r14, %rdi
callq 0x55d0
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq (%r14), %rdi
testq %rdi, %rdi
je 0x5efe
callq 0x2180
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O1/asd00012334[P]Abstract-Algebra-2018/main.cpp
// Function: DivisionSpecialized<quotient::FracType, quotient::fraction, true>::operator%(Polynomial<quotient::FracType, quotient::fraction>) const
Polynomial<ring,ringElement> operator%(Polynomial<ring,ringElement> p2)const{
        Polynomial<ring,ringElement> out;
        auto This = static_cast<Polynomial<ring,ringElement>const*>(this);
        out.canonicalType.scalar = This->canonicalType.scalar;
        out.coef = This->coef;

        /// Reduce to monic polynomial
        out.reduce();
        for(int i=0;i<p2.coef.size();++i)
            p2.coef[i] = p2.coef[i]/p2.coef.back();

        for(int i=out.coef.size()-1;i>=(int)p2.coef.size()-1;--i){
            auto tmp = out.coef[i];
            for(int j=0;j<p2.coef.size();++j)
                out.coef[i-j] = out.coef[i-j] - p2.coef.rbegin()[j] * tmp;
        }
        out.reduce();
        return out;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rdi, %r15
xorl %eax, %eax
movq %rax, (%rdi)
movq %rdi, 0x8(%rdi)
leaq 0x10(%rdi), %r13
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movq %rax, 0x20(%rdi)
movq (%rsi), %rax
movq %rax, (%rdi)
addq $0x10, %rsi
movq %r13, %rdi
callq 0x7568
movq %r15, %rdi
callq 0x4010
movq 0x10(%rbx), %rdi
movq %rbx, -0x30(%rbp)
movq 0x18(%rbx), %rsi
cmpq %rdi, %rsi
je 0x7376
xorl %ebx, %ebx
xorl %r14d, %r14d
addq %rbx, %rdi
addq $-0x10, %rsi
callq 0x7658
movq -0x30(%rbp), %rsi
movq 0x10(%rsi), %rcx
movq %rax, (%rcx,%rbx)
movq %rdx, 0x8(%rcx,%rbx)
incq %r14
movq 0x10(%rsi), %rdi
movq 0x18(%rsi), %rsi
movq %rsi, %rax
subq %rdi, %rax
sarq $0x4, %rax
addq $0x10, %rbx
cmpq %r14, %rax
ja 0x733b
movq 0x18(%r15), %rcx
movq %r15, -0x38(%rbp)
subq 0x10(%r15), %rcx
shrq $0x4, %rcx
movq -0x30(%rbp), %rdx
movq 0x18(%rdx), %rax
subq 0x10(%rdx), %rax
decl %ecx
shrq $0x4, %rax
decl %eax
cmpl %eax, %ecx
jl 0x744e
movq %rcx, -0x40(%rbp)
movslq %ecx, %r12
shlq $0x4, %r12
movq (%r13), %rax
movups (%rax,%r12), %xmm0
movaps %xmm0, -0x60(%rbp)
movq 0x18(%rdx), %rax
cmpq 0x10(%rdx), %rax
movq %r13, %rsi
je 0x742f
xorl %r13d, %r13d
xorl %ebx, %ebx
movq %rsi, %r15
movq (%rsi), %r14
leaq (%rax,%r13), %rdi
addq $-0x10, %rdi
leaq -0x60(%rbp), %rsi
callq 0x3fa4
addq %r12, %r14
addq %r13, %r14
movq %rax, -0x50(%rbp)
movq %rdx, -0x48(%rbp)
movq %r14, %rdi
leaq -0x50(%rbp), %rsi
callq 0x7710
movq %r15, %rsi
movq (%r15), %rcx
addq %r12, %rcx
movq %rax, (%r13,%rcx)
movq %rdx, 0x8(%r13,%rcx)
movq -0x30(%rbp), %rdx
movq 0x18(%rdx), %rax
movq %rax, %rcx
subq 0x10(%rdx), %rcx
incq %rbx
sarq $0x4, %rcx
addq $-0x10, %r13
cmpq %rbx, %rcx
ja 0x73cc
movq 0x18(%rdx), %rax
subq 0x10(%rdx), %rax
movq -0x40(%rbp), %rcx
decl %ecx
shrq $0x4, %rax
decl %eax
cmpl %eax, %ecx
movq %rsi, %r13
jge 0x73a2
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
callq 0x4010
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x746e
movq %r13, %r15
jmp 0x7473
movq %rax, %r14
movq (%r15), %rdi
testq %rdi, %rdi
je 0x7483
callq 0x2180
movq %r14, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/asd00012334[P]Abstract-Algebra-2018/main.cpp
// Function: Polynomial<quotient::FracType, quotient::fraction>::operator==(Polynomial<quotient::FracType, quotient::fraction> const&) const
bool operator==(Polynomial const& e2)const{
        int d1 = degree(), d2 = e2.degree();
        int siz = std::min(d1+1,d2+1);
        for(int i=0;i<siz;++i)
            if(!(coef[i]==e2.coef[i]))
                return false;

        return d1==d2;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %r15
callq 0x748c
movl %eax, %r13d
movq %r14, %rdi
callq 0x748c
movl %eax, %ecx
leal 0x1(%r13), %r12d
leal 0x1(%rcx), %eax
cmpl %r12d, %eax
cmovll %eax, %r12d
testl %r12d, %r12d
setle %bl
jle 0x71fb
movq 0x10(%r15), %rdi
movq 0x10(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rcx, -0x30(%rbp)
callq 0x5a8e
movq -0x30(%rbp), %rcx
testb %al, %al
je 0x71fb
movq %r13, -0x38(%rbp)
movl %r12d, %r13d
movl $0x1, %ecx
movl $0x18, %ebx
movq %rcx, %r12
cmpq %rcx, %r13
je 0x71ed
movq 0x10(%r15), %rax
leaq (%rax,%rbx), %rdi
addq $-0x8, %rdi
movq 0x10(%r14), %rax
movq -0x8(%rax,%rbx), %rsi
movq (%rax,%rbx), %rdx
callq 0x5a8e
leaq 0x1(%r12), %rcx
addq $0x10, %rbx
testb %al, %al
jne 0x71ba
cmpq %r13, %r12
setae %bl
movq -0x38(%rbp), %r13
movq -0x30(%rbp), %rcx
cmpl %ecx, %r13d
sete %al
andb %bl, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/asd00012334[P]Abstract-Algebra-2018/main.cpp
// Function: Polynomial<prime::Zp, prime::ZpElement>::CanonicalType::__zero__() const
Polynomial __zero__()const{
            Polynomial out;
            out.canonicalType.scalar = scalar;
            out.coef.push_back(scalar->__zero__());
            return out;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, (%rdi)
movq %rdi, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movq %rax, 0x20(%rdi)
movq (%rsi), %rcx
movq %rcx, (%rdi)
movq %rcx, -0x28(%rbp)
movq %rcx, -0x20(%rbp)
movq %rax, -0x18(%rbp)
movq 0x18(%rdi), %rsi
cmpq 0x20(%rdi), %rsi
je 0x6a72
movq -0x18(%rbp), %rax
movq %rax, 0x10(%rsi)
movups -0x28(%rbp), %xmm0
movups %xmm0, (%rsi)
addq $0x18, 0x18(%rbx)
jmp 0x6a82
leaq 0x10(%rbx), %r14
leaq -0x28(%rbp), %rdx
movq %r14, %rdi
callq 0x55d0
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq (%r14), %rdi
testq %rdi, %rdi
je 0x6a9e
callq 0x2180
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O1/asd00012334[P]Abstract-Algebra-2018/main.cpp
// Function: DegreeList::operator<(DegreeList) const
bool operator<(DegreeList r)const{
        int ld = degree(), rd = r.degree();
        int num = std::min(ld,rd);
        for(int i=0;i<num;++i){
            if(at(i)==r[i]) continue;
            return at(i)<r[i];
        }
        return ld<rd;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rcx
movq 0x8(%rdi), %rdi
movq %rdi, %rdx
subq %rcx, %rdx
movq %rdx, %rax
shrq $0x2, %rax
leal -0x1(%rax), %r9d
movl %r9d, %r8d
sarl $0x1f, %r8d
andl %r9d, %r8d
decl %eax
testl %eax, %eax
jle 0x6bb2
cmpl $0x0, -0x4(%rdi)
je 0x6ba4
jmp 0x6bb5
movl %r8d, %eax
movq (%rsi), %rdi
movq 0x8(%rsi), %r8
movq %r8, %rsi
subq %rdi, %rsi
shrq $0x2, %rsi
leal -0x1(%rsi), %r10d
movl %r10d, %r9d
sarl $0x1f, %r9d
andl %r10d, %r9d
decl %esi
testl %esi, %esi
jle 0x6be3
cmpl $0x0, -0x4(%r8)
je 0x6bd4
jmp 0x6be6
movl %r9d, %esi
cmpl %eax, %esi
movl %eax, %r9d
cmovll %esi, %r9d
testl %r9d, %r9d
setg %r8b
jle 0x6c3f
sarq $0x2, %rdx
movl %r9d, %r9d
movq %rdx, %r10
negq %r10
movq %r9, %r11
negq %r11
movl $0x1, %ebx
leaq (%r10,%rbx), %r14
cmpq $0x1, %r14
je 0x6c64
movl -0x4(%rdi,%rbx,4), %r14d
cmpl %r14d, -0x4(%rcx,%rbx,4)
jne 0x6c41
cmpq %r9, %rbx
setb %r8b
leaq (%r11,%rbx), %r15
incq %r15
incq %rbx
cmpq $0x1, %r15
jne 0x6c10
jmp 0x6c45
jmp 0x6c45
setl %r14b
xorl %ecx, %ecx
cmpl %esi, %eax
setl %cl
movzbl %r14b, %eax
testb $0x1, %r8b
cmovel %ecx, %eax
andb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x25a2(%rip), %rdi      # 0x920d
movq %rdx, %rsi
xorl %eax, %eax
callq 0x2220
nop
// File: /workspace/github_cpp_makefile_star2_O1/asd00012334[P]Abstract-Algebra-2018/./quotient.hpp
// Function: quotient::fraction::operator/(quotient::fraction const&) const
fraction operator/(fraction const& r)const{
        if(r==0) throw std::exception();
        fraction out(en*r.dn, dn*r.en);
        out.reduce();
        return out;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl $0x1, %edx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x5a8e
testb %al, %al
jne 0x76e2
movq 0x8(%r14), %rdi
imulq (%rbx), %rdi
movq (%r14), %r8
imulq 0x8(%rbx), %r8
movq %rdi, %rsi
negq %rsi
cmovsq %rdi, %rsi
movq %r8, %rcx
negq %rcx
cmovsq %r8, %rcx
movq %rsi, %r9
jae 0x76b7
movq %rsi, %rax
movq %rcx, %rdx
movq %rdx, %r9
xorl %edx, %edx
divq %r9
movq %r9, %rax
testq %rdx, %rdx
jne 0x76a7
movslq %r9d, %r9
movq %rsi, %rax
cqto
idivq %r9
movq %rax, %rsi
movq %rcx, %rax
cqto
idivq %r9
movq %rax, %rdx
movq %rsi, %rax
negq %rax
xorq %rdi, %r8
cmovnsq %rsi, %rax
popq %rbx
popq %r14
popq %rbp
retq
movl $0x8, %edi
callq 0x20d0
movq 0x58b5(%rip), %rcx      # 0xcfa8
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x58d7(%rip), %rsi      # 0xcfd8
movq 0x58e8(%rip), %rdx      # 0xcff0
movq %rax, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O1/skyshore2001[P]symfind/symfind.cpp
// Function: BeginWith_icase(char const*, char const*)
bool BeginWith_icase(const char *s1, const char *s2)
{
	bool ok = true;
	for (; *s1 && *s2; ++ s1, ++ s2) {
		if (toupper(*s1) != toupper(*s2)) { // case-insensitive
			ok = false;
			break;
		}
	}
	return ok && *s2 == 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movb (%rdi), %al
testb %al, %al
je 0x254d
movq %rdi, %r14
incq %r14
movsbl (%rbx), %ebp
testl %ebp, %ebp
je 0x254d
movsbl %al, %edi
callq 0x2320
movl %eax, %r15d
movl %ebp, %edi
callq 0x2320
cmpl %eax, %r15d
jne 0x2555
incq %rbx
movb (%r14), %al
incq %r14
testb %al, %al
jne 0x2522
cmpb $0x0, (%rbx)
sete %al
jmp 0x2557
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/skyshore2001[P]symfind/symfind.cpp
// Function: BeginWith_case(char const*, char const*)
bool BeginWith_case(const char *s1, const char *s2)
{
	bool ok = true;
	for (; *s1 && *s2; ++ s1, ++ s2) {
		if (*s1 != *s2) { // case-sensitive
			ok = false;
			break;
		}
	}
	return ok && *s2 == 0;
}

// Assembly:
movb (%rdi), %al
testb %al, %al
je 0x2581
incq %rdi
movb (%rsi), %cl
testb %cl, %cl
je 0x2581
cmpb %cl, %al
jne 0x2588
incq %rsi
movb (%rdi), %al
incq %rdi
testb %al, %al
jne 0x256b
cmpb $0x0, (%rsi)
sete %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/skyshore2001[P]symfind/symfind.cpp
// Function: NewSymbol(char*)
SfSymbol *NewSymbol(char *buf) 
{
	int len = sizeof(SfSymbol) + strlen(buf) +1;
	char *p = ALLOC_N(char, len);
	SfSymbol *sym = (SfSymbol*)p;
	char *p1 = p + sizeof(SfSymbol);
	strcpy(p1, buf);

	const char *sep = "\t\r\n";
	sym->nameoff = strtok_offset(p1, sep, p1);
	sym->lineoff = strtok_offset(NULL, sep, p1);
	sym->kindoff = strtok_offset(NULL, sep, p1);
	sym->extraoff = strtok_offset(NULL, sep, p1);
	return sym;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
callq 0x20b0
addl $0x11, %eax
movslq %eax, %rdi
callq 0x2220
movq %rax, %rbx
leaq 0x10(%rax), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x2170
leaq 0x3cfc(%rip), %r15      # 0x62f0
leaq 0x6cad(%rip), %r12      # 0x92a8
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2300
testq %rax, %rax
jne 0x2614
movl 0x6c94(%rip), %eax      # 0x92a8
subl %r14d, %eax
movw %ax, (%rbx)
xorl %edi, %edi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2300
testq %rax, %rax
jne 0x2632
movl 0x6c76(%rip), %eax      # 0x92a8
subl %r14d, %eax
movw %ax, 0x2(%rbx)
xorl %edi, %edi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2300
testq %rax, %rax
jne 0x2651
movl 0x6c57(%rip), %eax      # 0x92a8
subl %r14d, %eax
movw %ax, 0x4(%rbx)
xorl %edi, %edi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2300
testq %rax, %rax
jne 0x2670
movl 0x6c38(%rip), %eax      # 0x92a8
subl %r14d, %eax
movw %ax, 0x6(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/skyshore2001[P]symfind/symfind.cpp
// Function: RootExists(char const*)
bool RootExists(const char *root)
{
	SfRepoIter it(g_repos);
	while (it.Next()) {
		if (strcmp(it.Value()->root, root) == 0)
			return true;
	}
	return false;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x6bb9(%rip), %rax      # 0x9250
leaq 0x8(%rsp), %r14
movq %rax, 0x18(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%r14)
movups %xmm0, 0x30(%r14)
movq %r14, 0x20(%r14)
movq 0x18(%r14), %r14
movq %r14, 0x28(%rsp)
testq %r14, %r14
je 0x26ce
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x2230
testl %eax, %eax
jne 0x26b1
testq %r14, %r14
setne %al
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/skyshore2001[P]symfind/symfind.cpp
// Function: LoadRepofiles(int, char const**)
int LoadRepofiles(int filecnt, const char *files[])
{
	for (int i=0; i<filecnt; ++i) {
		FILE *fp = NULL;
		const char *file = files[i];
		int len = strlen(file);
		bool isgz = len > 3 && strcasecmp(file+len-3, ".gz") == 0;
		if (isgz) {
			char buf[1024];
			sprintf(buf, "gzip -dc \"%s\"", file);
		// 	printf("cmd: '%s'\n", buf);
			fp = popen(buf, "r");
		}
		else {
			fp = fopen(file, "r");
		}
		if (fp == NULL) {
			printf("*** cannot open repo-file \"%s\"!\n", file);
			continue;
		}
		printf("=== loading %s...\n", file);
		LoadRepofile(fp);
		if (isgz)
			pclose(fp);
		else
			fclose(fp);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rsi, %rbx
leaq 0x3a18(%rip), %r13      # 0x6501
xorl %ebp, %ebp
movq (%rbx,%rbp,8), %r14
movq %r14, %rdi
callq 0x20b0
cmpl $0x4, %eax
jl 0x2b1d
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
leaq (%r14,%rax), %rdi
addq $-0x3, %rdi
leaq 0x3852(%rip), %rsi      # 0x6362
callq 0x21b0
testl %eax, %eax
sete %r12b
jmp 0x2b20
xorl %r12d, %r12d
testb %r12b, %r12b
je 0x2b49
movq %rsp, %r15
movq %r15, %rdi
leaq 0x3834(%rip), %rsi      # 0x6366
movq %r14, %rdx
xorl %eax, %eax
callq 0x2040
movq %r15, %rdi
movq %r13, %rsi
callq 0x2070
jmp 0x2b54
movq %r14, %rdi
movq %r13, %rsi
callq 0x21d0
movq %rax, %r15
testq %rax, %rax
je 0x2b84
leaq 0x3832(%rip), %rdi      # 0x6395
movq %r14, %rsi
xorl %eax, %eax
callq 0x2030
movq %r15, %rdi
callq 0x26dc
movq %r15, %rdi
testb %r12b, %r12b
je 0x2b97
callq 0x2240
jmp 0x2b9c
leaq 0x37e9(%rip), %rdi      # 0x6374
movq %r14, %rsi
xorl %eax, %eax
callq 0x2030
jmp 0x2b9c
callq 0x2180
incq %rbp
jmp 0x2aeb
// File: /workspace/github_cpp_makefile_star2_O1/skyshore2001[P]symfind/symfind.cpp
// Function: FreeRepos()
void FreeRepos()
{
	void *p;
	for (SfRepo *repo = g_repos; repo; ) {
		for (SfFolder *folder = repo->folders; folder; ) {
			for (SfFile *file = folder->files; file; ) {
				for (SfSymbol *symbol = file->symbols; symbol; ) {
					p = symbol;
					symbol = symbol->next;
					FREE(p);
				}
				FREE(file->name);
				p = file;
				file = file->next;
				FREE(p);
			}
			FREE(folder->name);
			p = folder;
			folder = folder->next;
			FREE(p);
		}
		FREE(repo->root);
		FREE(repo->tagscan_pat);
		p = repo;
		repo = repo->next;
		FREE(p);
	}
	g_repos = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x669d(%rip), %rbx      # 0x9250
testq %rbx, %rbx
je 0x2c49
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x2c20
movq 0x8(%r14), %r15
testq %r15, %r15
je 0x2c04
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x2be8
movq 0x8(%rdi), %r12
callq 0x21e0
movq %r12, %rdi
testq %r12, %r12
jne 0x2bd7
movq (%r15), %rdi
callq 0x21e0
movq 0x10(%r15), %r12
movq %r15, %rdi
callq 0x21e0
movq %r12, %r15
testq %r12, %r12
jne 0x2bce
movq (%r14), %rdi
callq 0x21e0
movq 0x10(%r14), %r15
movq %r14, %rdi
callq 0x21e0
movq %r15, %r14
testq %r15, %r15
jne 0x2bc5
movq (%rbx), %rdi
callq 0x21e0
movq 0x8(%rbx), %rdi
callq 0x21e0
movq 0x18(%rbx), %r14
movq %rbx, %rdi
callq 0x21e0
movq %r14, %rbx
testq %r14, %r14
jne 0x2bbc
movq $0x0, 0x65fc(%rip) # 0x9250
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/skyshore2001[P]symfind/symfind.cpp
// Function: GetFullName(char*, char const*, char const*, char const*)
char *GetFullName(char *buf, const char *root, const char *dirname, const char *file = NULL)
{
// 	static char buf[1024];
	// 1. replace root
	root = g_rootsubs.Substitue(root);

	char quote[2] = {0,0};
	if (file && (strchr(root, ' ') != NULL || strchr(dirname, ' ') != NULL || strchr(file, ' ') != NULL))
		quote[0] = '"';

	// 2. remove ./ at the beginning of dirname
	const char *p = dirname;
	if (*p == '.') {
		++ p;
		if (*p == '/' || *p == '\\') // './xxx'
		{
			++p;
			dirname = p;
		}
		else if (*p == 0) // '.'
			dirname = p;
	}
	if (dirname[0] == 0) {
		if (file == NULL)
			sprintf(buf, "%s%s%s", quote, root, quote);
		else 
			sprintf(buf, "%s%s%c%s%s", quote, root, SEP, file, quote);
	}
	else {
		if (file == NULL)
			sprintf(buf, "%s%s%c%s%s", quote, root, SEP, dirname, quote);
		else 
			sprintf(buf, "%s%s%c%s%c%s%s", quote, root, SEP, dirname, SEP, file, quote);
	}
	return buf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r12
movq %rdx, %r15
movq %rdi, %rbx
movq 0x660d(%rip), %rdi      # 0x9288
addq $0x8, %rdi
callq 0x2d90
movq %rax, %r14
movw $0x0, 0x26(%rsp)
testq %r12, %r12
je 0x2cce
movq %r14, %rdi
movl $0x20, %esi
callq 0x2090
testq %rax, %rax
jne 0x2cc9
movq %r15, %rdi
movl $0x20, %esi
callq 0x2090
testq %rax, %rax
jne 0x2cc9
movq %r12, %rdi
movl $0x20, %esi
callq 0x2090
testq %rax, %rax
je 0x2cce
movb $0x22, 0x26(%rsp)
cmpb $0x2e, (%r15)
jne 0x2cf0
movzbl 0x1(%r15), %eax
testl %eax, %eax
je 0x2ced
cmpl $0x5c, %eax
je 0x2ce7
cmpl $0x2f, %eax
jne 0x2cf0
addq $0x2, %r15
jmp 0x2cf0
incq %r15
cmpb $0x0, (%r15)
je 0x2d1f
movsbl 0x6532(%rip), %r8d      # 0x9230
leaq 0x26(%rsp), %rdx
testq %r12, %r12
je 0x2d47
movq %rdx, 0x10(%rsp)
movq %r12, 0x8(%rsp)
movl %r8d, (%rsp)
leaq 0x369d(%rip), %rsi      # 0x63ba
jmp 0x2d52
testq %r12, %r12
je 0x2d71
movsbl 0x6504(%rip), %r8d      # 0x9230
leaq 0x26(%rsp), %rdx
movq %rdx, (%rsp)
leaq 0x3673(%rip), %rsi      # 0x63af
movq %rbx, %rdi
movq %r14, %rcx
movq %r12, %r9
jmp 0x2d5b
movq %rdx, (%rsp)
leaq 0x365d(%rip), %rsi      # 0x63af
movq %rbx, %rdi
movq %r14, %rcx
movq %r15, %r9
xorl %eax, %eax
callq 0x2040
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x3630(%rip), %rsi      # 0x63a8
leaq 0x26(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rcx
movq %rdx, %r8
xorl %eax, %eax
callq 0x2040
jmp 0x2d62
nop
// File: /workspace/github_cpp_makefile_star2_O1/skyshore2001[P]symfind/symfind.cpp
// Function: RootSubs::Substitue(char const*)
const char *RootSubs::Substitue(const char *s) 
{
	static char buf[1024];
	for (auto &sub: m_subs) {
		// note: windows path is case-insensitive; linux path is case-sensitive
#ifdef _WINDOWS
		const char *p = stristr(s, sub.first);
#else
		const char *p = strstr(s, sub.first);
#endif
		if (p) {
			sprintf(buf, "%.*s%s%s", p-s, s, sub.second, p+strlen(sub.first));
			return buf;
		}
	}
	return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq 0x3e8(%rdi), %r13
movq 0x3f0(%rdi), %r12
cmpq %r12, %r13
je 0x2e08
movq (%r13), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2050
testq %rax, %rax
jne 0x2dc9
addq $0x10, %r13
jmp 0x2daa
movq %rax, %r14
movq %rax, %r12
subq %rbx, %r12
movq 0x8(%r13), %r13
movq %r15, %rdi
callq 0x20b0
addq %rax, %r14
leaq 0x64c8(%rip), %r15      # 0x92b0
leaq 0x36d7(%rip), %rsi      # 0x64c6
movq %r15, %rdi
movq %r12, %rdx
movq %rbx, %rcx
movq %r13, %r8
movq %r14, %r9
xorl %eax, %eax
callq 0x2040
movq %r15, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/skyshore2001[P]symfind/symfind.cpp
// Function: GotoResult(char const*, char const*)
void GotoResult(const char *cmd, const char *arg)
{
	int idx = g_result.curidx;
	if (arg == NULL) {
		if (cmd[0] == 'N')
			-- idx;
		else
			++ idx;
	}
	else {
		idx = atoi(arg)-1;
	}
	if (idx >= 0 && idx < g_result.items.size()) {
		g_result.curidx = idx;
		
		char buf[1024], *p = buf;
		p += sprintf(p, "%s ", EDITOR);

		const SfContext &ctx = g_result.items[idx];
		const char *line = g_result.kind == 's'? ctx.symbol->line(): NULL;
		if (line) {
			p += sprintf(p, "+%s ", line);
		}
		GetFullName(p, ctx.repo->root, ctx.folder->name, ctx.file->name);
		printf("go %d: %s\n", idx+1, buf);
		system(buf);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
testq %rsi, %rsi
je 0x3680
movq %rsi, %rdi
callq 0x2290
movl %eax, %ebx
jmp 0x368f
movl 0x5bf2(%rip), %ebx      # 0x9278
cmpb $0x4e, (%rdi)
jne 0x376f
decl %ebx
testl %ebx, %ebx
js 0x3760
movl %ebx, %r12d
movq 0x5bc5(%rip), %rax      # 0x9268
subq 0x5bb6(%rip), %rax      # 0x9260
sarq $0x5, %rax
cmpq %r12, %rax
jbe 0x3760
movl %ebx, 0x5bbb(%rip)      # 0x9278
leaq 0x2d59(%rip), %rsi      # 0x641d
leaq 0x5af5(%rip), %rdx      # 0x91c0
xorl %r14d, %r14d
movq %rsp, %rdi
xorl %eax, %eax
callq 0x2040
cltq
shlq $0x5, %r12
addq 0x5b7b(%rip), %r12      # 0x9260
cmpb $0x73, 0x5b6c(%rip)     # 0x9258
jne 0x36ff
movq 0x18(%r12), %rcx
movzwl 0x2(%rcx), %edx
leaq (%rcx,%rdx), %r14
addq $0x10, %r14
leaq (%rsp,%rax), %r15
testq %r14, %r14
je 0x3721
leaq 0x2d0d(%rip), %rsi      # 0x641c
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2040
cltq
addq %rax, %r15
movq (%r12), %rax
movq 0x8(%r12), %rcx
movq (%rax), %rsi
movq (%rcx), %rdx
movq 0x10(%r12), %rax
movq (%rax), %rcx
movq %r15, %rdi
callq 0x2c60
incl %ebx
leaq 0x2cd8(%rip), %rdi      # 0x6421
movq %rsp, %r14
movl %ebx, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2030
movq %r14, %rdi
callq 0x2140
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r14
popq %r15
retq
incl %ebx
jmp 0x3691
// File: /workspace/github_cpp_makefile_star2_O1/skyshore2001[P]symfind/symfind.cpp
// Function: GetTagscanPats(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>>>>&)
void GetTagscanPats(vector<string> &pats)
{
	pats.clear();

	// "*.cpp;*.h;" -> ["*.cpp", "*.h"]
	SfRepoIter it(g_repos);
	while (it.Next()) {
		const char *p = it.Value()->tagscan_pat, *p2 = p;
		if (p == NULL)
			continue;
		for (; *p2 != 0; ++p2) {
			if (*p2 == ';') {
				if (p2 > p)
					pats.push_back(string(p, 0, p2-p));
				p = p2 +1;
			}
		}
		if (p2 > p)
			pats.push_back(string(p, 0, p2-p));
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
movq (%rdi), %rsi
callq 0x4d44
movq 0x5aba(%rip), %rax      # 0x9250
leaq 0x38(%rsp), %rcx
movq %rax, 0x18(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rcx)
movups %xmm0, 0x30(%rcx)
movq %rcx, 0x20(%rcx)
leaq 0x18(%rsp), %r14
leaq 0x10(%rsp), %r15
leaq 0xf(%rsp), %r12
movq 0x58(%rsp), %rax
testq %rax, %rax
je 0x37d0
movq 0x18(%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
testq %rax, %rax
je 0x38ab
movq 0x8(%rax), %r13
movq %r13, 0x10(%rsp)
testq %r13, %r13
je 0x37bd
movq %r13, %rbp
movzbl (%r13), %eax
cmpl $0x3b, %eax
je 0x37ff
testl %eax, %eax
jne 0x384f
jmp 0x3857
movq 0x10(%rsp), %rax
cmpq %rax, %r13
jbe 0x3846
movq %rbp, %rcx
subq %rax, %rcx
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r12, %r8
callq 0x4718
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4e26
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x3846
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x21a0
leaq 0x1(%r13), %rax
movq %rax, 0x10(%rsp)
incq %r13
incq %rbp
jmp 0x37ef
movq 0x10(%rsp), %rax
cmpq %rax, %r13
jbe 0x37bd
subq %rax, %rbp
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rbp, %rcx
movq %r12, %r8
callq 0x4718
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4e26
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x37bd
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x21a0
jmp 0x37bd
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x38c3
jmp 0x38be
movq %rax, %rbx
jmp 0x38e2
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x38e2
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O1/skyshore2001[P]symfind/symfind.cpp
// Function: RootSubs::Set(char const*)
void RootSubs::Set(const char *pattern) 
{
	strcpy(m_buf, pattern);
	char *p = m_buf, *p1 = m_buf, *p2 = NULL;
	m_subs.clear();
	for (; ; ++p) {
		if (*p == '=') {
			*p++ = 0;
			p2 = p;
		}
		else if (*p == ';' || *p == 0) {
			if (*p1 && p2 && *p2)
				m_subs.push_back(make_pair(p1, p2));
			if (*p == 0)
				break;
			*p++ = 0;
			p1 = p;
			p2 = NULL;
		}
	}
	if (m_subs.size() > 0)
		strcpy(this->pattern, pattern);
	else
		strcpy(this->pattern, "(empty)");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1f4(%rdi), %r13
movq %r13, %rdi
callq 0x2170
movq 0x3e8(%rbx), %rax
cmpq %rax, 0x3f0(%rbx)
je 0x3ebc
movq %rax, 0x3f0(%rbx)
leaq 0x3e8(%rbx), %r15
xorl %eax, %eax
leaq 0x8(%rsp), %r12
movq %r13, %rbp
movzbl (%rbp), %ecx
testl %ecx, %ecx
je 0x3ee8
cmpl $0x3b, %ecx
je 0x3ee8
cmpl $0x3d, %ecx
jne 0x3f46
leaq 0x1(%rbp), %rax
movq %rax, %rcx
jmp 0x3f3f
cmpb $0x0, (%r13)
je 0x3f30
testq %rax, %rax
je 0x3f30
cmpb $0x0, (%rax)
je 0x3f30
movq %r13, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movq 0x3f0(%rbx), %rsi
cmpq 0x3f8(%rbx), %rsi
je 0x3f25
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x3f0(%rbx)
jmp 0x3f30
movq %r15, %rdi
movq %r12, %rdx
callq 0x508e
cmpb $0x0, (%rbp)
je 0x3f4b
leaq 0x1(%rbp), %r13
xorl %eax, %eax
movq %r13, %rcx
movb $0x0, (%rbp)
movq %rcx, %rbp
incq %rbp
jmp 0x3ecd
movq 0x3f0(%rbx), %rax
cmpq 0x3e8(%rbx), %rax
je 0x3f68
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2170
jmp 0x3f75
movabsq $0x297974706d6528, %rax # imm = 0x297974706D6528
movq %rax, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/skyshore2001[P]symfind/symfind.cpp
// Function: InitSession(int)
void InitSession(int id)
{
	if (g_sessions.size() == 0) {
		Session ses;
		ses.id = 0;
		ses.maxFound = DEF_MAX_FOUND;
		g_sessions.push_back(ses);
		g_curSession = &g_sessions[0];
	}

	if (g_curSession->id == id)
		return;

	SessionIter it;
	for (it=g_sessions.begin(); it!=g_sessions.end(); ++it) {
		if (it->id == id)
			break;
	}

	// not found, create it based on session 0:
	if (it == g_sessions.end()) {
		g_sessions.push_back(g_sessions[0]);
		g_curSession = &g_sessions.back();
		g_curSession->id = id;
	}
	else {
		g_curSession = & *it;
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movl %edi, %ebx
movq 0x5301(%rip), %rax      # 0x9298
cmpq 0x52f2(%rip), %rax      # 0x9290
jne 0x4000
leaq 0x8(%rsp), %r14
leaq 0x2390(%rip), %rsi      # 0x633c
movq %r14, %rdi
callq 0x4a4a
movl $0x0, -0x8(%r14)
movl 0x51ee(%rip), %eax      # 0x91b0
movl %eax, -0x4(%r14)
leaq 0x52c3(%rip), %rdi      # 0x9290
movq %rsp, %rsi
callq 0x481a
movq 0x52b4(%rip), %rax      # 0x9290
movq %rax, 0x52a5(%rip)      # 0x9288
movq 0x3f0(%rsp), %rdi
testq %rdi, %rdi
je 0x4000
movq 0x400(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq 0x5281(%rip), %rax      # 0x9288
cmpl %ebx, (%rax)
je 0x4068
movq 0x527e(%rip), %rsi      # 0x9290
movq 0x527f(%rip), %rcx      # 0x9298
movq %rsi, %rax
cmpq %rcx, %rsi
je 0x4033
movq %rsi, %rax
cmpl %ebx, (%rax)
je 0x4033
addq $0x408, %rax            # imm = 0x408
cmpq %rcx, %rax
jne 0x4024
cmpq %rcx, %rax
je 0x4041
movq %rax, 0x5249(%rip)      # 0x9288
jmp 0x4068
leaq 0x5248(%rip), %rdi      # 0x9290
callq 0x481a
movq 0x5244(%rip), %rax      # 0x9298
leaq -0x408(%rax), %rcx
movq %rcx, 0x5226(%rip)      # 0x9288
movl %ebx, -0x408(%rax)
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x3f0(%rsp), %rdi
testq %rdi, %rdi
je 0x4093
movq 0x400(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O1/skyshore2001[P]symfind/symfind.cpp
// Function: main
int main(int argc, const char *argv[])
{
	if (argc <= 1) {
		printf("Usage: symfind <repo>\n");
		return -1;
	}
	if (argv[1][0] == '-') {
		const char *opt = argv[1]+1;
		if (STR_EQ(opt, "v") || STR_EQ(opt, "version") || STR_EQ(opt, "-version")) {
			printf("symfind version %s\n", VERSION);
			return 0;
		}
		else {
			printf("*** unknown option: '%s'\n", opt);
			return 1;
		}
	}
	if (g_forsvr) {
		fputs("(for symsvr)\n", stdout);
		setbuf(stdout, NULL);
		setbuf(stderr, NULL);
	}
	-- argc;
	++ argv;
	LoadRepofiles(argc, argv);

// 	printf("for attach (pid=%d)...\n", getpid());
// 	sleep(10);

	// !!! to debug the loading and iterator, run: $ SF_TEST=1 symfind 1.repo.gz
	if (getenv("SF_TEST") != NULL)
		return TestShow();

	char buf[1024];
	FILE *fp;
	char rcfile[1024] = RC_FILE;
	fp = fopen(rcfile, "r");
	if (fp == NULL) {
		sprintf(rcfile, "%s/%s", getenv("HOME"), RC_FILE);
		fp = fopen(rcfile, "r");
	}
	if (fp)
	{
		const char *prompt = "rc> ";
		printf("(load rc file: %s)\n", rcfile);
		fputs(prompt, stdout);
		while (fgets(buf, 1024, fp)) {
			fputs(buf, stdout);
			if (ExecCmd(buf, prompt))
				break;
		}
		fclose(fp);
	}

	fputs("> ", stdout);
	if (g_forsvr)
		fputs("\n", stdout);
	while (fgets(buf, 1024, stdin)) {
		if (ExecCmd(buf))
			break;
	}
	FreeRepos();
	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpl $0x1, %edi
jg 0x4453
leaq 0x2299(%rip), %rdi      # 0x66e0
callq 0x2280
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x44ca
movq %rsi, %r14
movq 0x8(%rsi), %rbx
cmpb $0x2d, (%rbx)
jne 0x44d1
incq %rbx
leaq 0x2100(%rip), %rsi      # 0x6569
movq %rbx, %rdi
callq 0x2230
testl %eax, %eax
je 0x44b3
leaq 0x20f0(%rip), %rsi      # 0x656c
movq %rbx, %rdi
callq 0x2230
testl %eax, %eax
je 0x44b3
leaq 0x20dc(%rip), %rsi      # 0x656b
movq %rbx, %rdi
callq 0x2230
testl %eax, %eax
je 0x44b3
leaq 0x20ea(%rip), %rdi      # 0x658c
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2030
movl $0x1, %ebx
jmp 0x44ca
leaq 0x20ba(%rip), %rdi      # 0x6574
leaq 0x20c7(%rip), %rsi      # 0x6588
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x2030
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl %edi, %ebp
addq $0x8, %r14
cmpb $0x1, 0x4da2(%rip)      # 0x9280
jne 0x4511
movq 0x4ae1(%rip), %rbx      # 0x8fc8
movq (%rbx), %rsi
leaq 0x20b5(%rip), %rdi      # 0x65a6
callq 0x21c0
movq (%rbx), %rdi
xorl %esi, %esi
callq 0x2250
movq 0x4ad9(%rip), %rax      # 0x8fe0
movq (%rax), %rdi
xorl %esi, %esi
callq 0x2250
decl %ebp
movl %ebp, %edi
movq %r14, %rsi
callq 0x2ace
nop
// File: /workspace/github_cpp_makefile_star2_O1/skyshore2001[P]symfind/symfind.cpp
// Function: SfPattern::SfPattern(char*)
SfPattern(char *pat) {
		matchBegin =false;
		matchEnd = false;
		logicalNot = false;
		patlen = 0;

		char *p = pat;
		if (*p == '!' && *(p+1) != 0) {
			++ p;
			logicalNot = true;
		}

		if (*p == '^' && *(p+1) != 0) {
			++ p;
			matchBegin = true;
		}
		char *p1 = strchr(p, 0);
		if (p1 - p > 1 && *(p1-1) == '$') {
			*--p1 = 0;
			matchEnd = true;
		}
		patlen = p1 -p;
		this->pat = p;

		fnMatch = ContainsUpper(p)? &SfPattern::Match_case: &SfPattern::Match_icase;
	}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movw $0x0, 0x8(%rdi)
movb $0x0, 0xa(%rdi)
movl $0x0, 0xc(%rdi)
cmpb $0x21, (%rsi)
jne 0x45be
cmpb $0x0, 0x1(%r14)
je 0x45be
incq %r14
movb $0x1, 0xa(%rbx)
cmpb $0x5e, (%r14)
jne 0x45d2
cmpb $0x0, 0x1(%r14)
je 0x45d2
incq %r14
movb $0x1, 0x8(%rbx)
movq %r14, %rdi
callq 0x20b0
leaq (%r14,%rax), %rcx
cmpq $0x2, %rax
jl 0x45f4
cmpb $0x24, -0x1(%rcx)
jne 0x45f4
decq %rcx
movb $0x0, (%rcx)
movb $0x1, 0x9(%rbx)
subl %r14d, %ecx
movl %ecx, 0xc(%rbx)
movq %r14, (%rbx)
movsbl (%r14), %edi
testl %edi, %edi
setne %bpl
je 0x462d
callq 0x2110
testl %eax, %eax
jne 0x462d
incq %r14
movsbl (%r14), %edi
testl %edi, %edi
setne %bpl
je 0x462d
callq 0x2110
incq %r14
testl %eax, %eax
je 0x4615
leaq 0x256(%rip), %rax       # 0x488a
leaq 0x345(%rip), %rcx       # 0x4980
testb %bpl, %bpl
cmovneq %rax, %rcx
movq %rcx, 0x10(%rbx)
movq $0x0, 0x18(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/skyshore2001[P]symfind/symfind.cpp
// Function: SfFileIter::Next()
SfFile *Next() {
		if (m_ctx.file && m_ctx.file->next)
			m_ctx.file = m_ctx.file->next;
		else 
			m_ctx.file = NextLink();
		return m_ctx.file;
	}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x466a
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x467f
movq %rbx, %rdi
callq 0x47e0
testq %rax, %rax
je 0x467d
movq 0x8(%rax), %rax
jmp 0x4665
xorl %eax, %eax
movq %rax, 0x30(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/skyshore2001[P]symfind/symfind.cpp
// Function: SfSymbolIter::Next()
SfSymbol *Next() {
		if (m_ctx.symbol && m_ctx.symbol->next)
			m_ctx.symbol = m_ctx.symbol->next;
		else
			m_ctx.symbol = NextLink();
		return m_ctx.symbol;
	}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x38(%rdi), %rax
testq %rax, %rax
je 0x4702
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x4711
movq %rbx, %rdi
callq 0x4654
testq %rax, %rax
jne 0x46f9
xorl %eax, %eax
movq %rax, 0x38(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/skyshore2001[P]symfind/symfind.cpp
// Function: SfFolderIter::Next()
SfFolder *Next() {
		if (m_ctx.folder && m_ctx.folder->next)
			m_ctx.folder = m_ctx.folder->next;
		else
			m_ctx.folder = NextLink();
		return m_ctx.folder;
	}

// Assembly:
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x47f2
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x4815
movq 0x20(%rdi), %rcx
testq %rcx, %rcx
je 0x4803
movq 0x18(%rcx), %rcx
movq %rcx, 0x20(%rdi)
testq %rcx, %rcx
je 0x4813
movq 0x10(%rcx), %rax
testq %rax, %rax
je 0x47f6
jmp 0x4815
xorl %eax, %eax
movq %rax, 0x28(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/skyshore2001[P]symfind/symfind.cpp
// Function: SfPattern::Match_case(char const*)
bool Match_case(const char *s) {
		if (patlen <= 0)
			return true;
		int slen = strlen(s);
		if (slen < patlen)
			return false;

		if (matchBegin || matchEnd) {
			if (matchBegin && matchEnd)
				return strcmp(s, pat) == 0;
			return BeginWith_case((matchBegin? s: s+slen-patlen), pat);
		}
		else {
			for (; *s; ++s) {
				if (*s == *pat && BeginWith_case(s+1, pat+1))
					return true;
			}
		}
		return false;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movslq 0xc(%rdi), %r12
movb $0x1, %bl
testq %r12, %r12
jle 0x4916
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x20b0
cmpl %eax, %r12d
jle 0x48b4
xorl %ebx, %ebx
jmp 0x4916
movb 0x8(%r15), %cl
testb %cl, %cl
je 0x48d2
cmpb $0x1, 0x9(%r15)
jne 0x48dd
movq (%r15), %rsi
movq %r14, %rdi
callq 0x2230
testl %eax, %eax
jmp 0x4913
cmpb $0x0, 0x9(%r15)
je 0x4924
testb %cl, %cl
jne 0x48bc
movl %eax, %eax
addq %r14, %rax
subq %r12, %rax
testb %cl, %cl
cmovneq %r14, %rax
movq (%r15), %rcx
movb (%rax), %dl
testb %dl, %dl
je 0x4910
incq %rax
movb (%rcx), %sil
testb %sil, %sil
je 0x4910
cmpb %sil, %dl
jne 0x48b0
incq %rcx
movb (%rax), %dl
incq %rax
testb %dl, %dl
jne 0x48f7
cmpb $0x0, (%rcx)
sete %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movb (%r14), %sil
testb %sil, %sil
je 0x48b0
movq (%r15), %rax
movb (%rax), %cl
leaq 0x1(%rax), %rdx
cmpb %cl, %sil
jne 0x496e
movb 0x1(%r14), %dil
movq %rdx, %rsi
testb %dil, %dil
je 0x4969
movl $0x1, %esi
movb (%rax,%rsi), %r8b
testb %r8b, %r8b
je 0x4966
cmpb %r8b, %dil
jne 0x496e
movb 0x1(%r14,%rsi), %dil
incq %rsi
testb %dil, %dil
jne 0x494b
addq %rax, %rsi
cmpb $0x0, (%rsi)
je 0x4916
movb 0x1(%r14), %sil
incq %r14
testb %sil, %sil
jne 0x4935
jmp 0x48b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/skyshore2001[P]symfind/symfind.cpp
// Function: SfPattern::Match_icase(char const*)
bool Match_icase(const char *s) {
		if (patlen <= 0)
			return true;
		int slen = strlen(s);
		if (slen < patlen)
			return false;

		if (matchBegin || matchEnd) {
			if (matchBegin && matchEnd)
				return strcasecmp(s, pat) == 0;
			return BeginWith_icase((matchBegin? s: s+slen-patlen), pat);
		}
		else {
			for (; *s; ++s) {
				if (toupper(*s) == toupper(*pat) && BeginWith_icase(s+1, pat+1))
					return true;
			}
		}
		return false;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movslq 0xc(%rdi), %r15
movb $0x1, %bpl
testq %r15, %r15
jle 0x49cb
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x20b0
cmpl %eax, %r15d
jle 0x49ab
xorl %ebp, %ebp
jmp 0x49cb
movb 0x8(%r14), %cl
testb %cl, %cl
je 0x49d6
cmpb $0x1, 0x9(%r14)
jne 0x49e1
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x21b0
testl %eax, %eax
sete %bpl
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x0, 0x9(%r14)
je 0x49ff
testb %cl, %cl
jne 0x49b3
movl %eax, %edi
addq %rbx, %rdi
subq %r15, %rdi
testb %cl, %cl
cmovneq %rbx, %rdi
movq (%r14), %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x250c
movb (%rbx), %r12b
testb %r12b, %r12b
je 0x49a7
movq (%r14), %r14
movsbl (%r14), %edi
callq 0x2320
movl %eax, %r15d
incq %r14
incq %rbx
movsbl %r12b, %edi
callq 0x2320
cmpl %r15d, %eax
jne 0x4a39
movq %rbx, %rdi
movq %r14, %rsi
callq 0x250c
testb %al, %al
jne 0x49cb
movb (%rbx), %r12b
incq %rbx
testb %r12b, %r12b
jne 0x4a1c
jmp 0x49a7
nop
// File: /workspace/github_cpp_makefile_star2_O1/tkrobatsch[P]YAML_Maker/yaml_data.cpp
// Function: serialize_encaps(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string serialize_encaps(std::string input) {
	std::string serialize;
	serialize += "'";
	for (int i = 0; i < input.length(); i++) {
		if (!((input[i] < 0) || (input[i] > 255))) {
			serialize += input[i];
		}
	}
	//clear any spaces at end
	serialize.erase(std::find_if(serialize.rbegin(), serialize.rend(),
		std::not1(std::ptr_fun<int, int>(std::isspace))).base(), serialize.end());
	serialize += "'";
	return serialize;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x5b49(%rip), %rsi      # 0x8020
callq 0x2300
cmpq $0x0, 0x8(%r14)
je 0x2505
xorl %r12d, %r12d
movq (%r14), %rax
movb (%rax,%r12), %al
testb %al, %al
js 0x24fc
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2180
incq %r12
cmpq %r12, 0x8(%r14)
ja 0x24e6
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
addq %rax, %rcx
leaq 0x10(%rsp), %rsi
movq %rcx, (%rsi)
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq 0x8a82(%rip), %rcx      # 0xafa8
movq %rsp, %rdi
callq 0x62d4
movq (%rsp), %rax
movq %rax, %rcx
subq (%rbx), %rcx
movq %rcx, 0x8(%rbx)
movb $0x0, (%rax)
leaq 0x5ada(%rip), %rsi      # 0x8020
movq %rbx, %rdi
callq 0x2300
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x2561
jmp 0x2561
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x2577
movq (%r15), %rsi
incq %rsi
callq 0x21c0
movq %r14, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O1/tkrobatsch[P]YAML_Maker/yaml_data.cpp
// Function: serialize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string serialize(std::string input) {
	std::string serialize;
	for (int i = 0; i < input.length(); i++) {
		if (!((input[i] < 0) || (input[i] > 255))) {
			serialize += input[i];
		}
	}
	//clear any spaces at end
	serialize.erase(std::find_if(serialize.rbegin(), serialize.rend(),
		std::not1(std::ptr_fun<int, int>(std::isspace))).base(), serialize.end());
	return serialize;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
cmpq $0x0, 0x8(%rsi)
je 0x25cc
movq %rsi, %r14
xorl %r12d, %r12d
movq (%r14), %rax
movb (%rax,%r12), %al
testb %al, %al
js 0x25c3
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2180
incq %r12
cmpq %r12, 0x8(%r14)
ja 0x25ad
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
addq %rax, %rcx
leaq 0x10(%rsp), %rsi
movq %rcx, (%rsi)
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq 0x89bb(%rip), %rcx      # 0xafa8
movq %rsp, %rdi
callq 0x62d4
movq (%rsp), %rax
movq %rax, %rcx
subq (%rbx), %rcx
movq %rcx, 0x8(%rbx)
movb $0x0, (%rax)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x2617
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x262d
movq (%r15), %rsi
incq %rsi
callq 0x21c0
movq %r14, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O1/wo3kie[P]calc/calc.cpp
// Function: ast::Calc::operator()(ast::Expression const&) const
double operator()( Expression const & x ) const
        {
            double state = boost::apply_visitor( *this, x.head_ );

            for( Operation const & oper : x.tail_ )
            {
                state = ( *this )( oper, state );
            }

            return state;
        }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movq %r14, %rsi
callq 0x12a96
movq 0x10(%rbx), %r15
addq $0x10, %rbx
cmpq %rbx, %r15
je 0x9a5c
leaq 0x10(%r15), %rsi
movq %r14, %rdi
callq 0x1285c
movq (%r15), %r15
jmp 0x9a46
popq %rbx
popq %r14
popq %r15
retq