LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: asd00012334[P]Abstract-Algebra-2018/main.cpp
// Function: operator<<(std::ostream&, Polynomial<prime::Zp, prime::ZpElement> const&)
std::ostream& operator<<(std::ostream& out, Polynomial const& f){
        if(f.degree()==0) return out<<f.coef[0];
        for(int i=f.coef.size()-1;i>=0;--i){
            if(i<f.coef.size()-1) out<<" + ";
            out<<f.coef[i];
            if(i>1) out<<" x^"<<i; else if(i==1) out<<" x";
        }
        return out;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x50d0
cmpl $0x0, %eax
jne 0x622c
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
addq $0x10, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xcb10
movq -0x28(%rbp), %rdi
movq %rax, %rsi
callq 0x2810
movq %rax, -0x8(%rbp)
jmp 0x62f7
movq -0x18(%rbp), %rdi
addq $0x10, %rdi
callq 0x95a0
subq $0x1, %rax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jl 0x62ef
movslq -0x1c(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
addq $0x10, %rdi
callq 0x95a0
movq %rax, %rcx
movq -0x30(%rbp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x627f
movq -0x10(%rbp), %rdi
leaq 0xefb1(%rip), %rsi      # 0x1522b
callq 0x21c0
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
addq $0x10, %rdi
movslq -0x1c(%rbp), %rsi
callq 0xcb10
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x2810
cmpl $0x1, -0x1c(%rbp)
jle 0x62c7
movq -0x10(%rbp), %rdi
leaq 0xef7a(%rip), %rsi      # 0x1522f
callq 0x21c0
movq %rax, %rdi
movl -0x1c(%rbp), %esi
callq 0x22e0
jmp 0x62df
cmpl $0x1, -0x1c(%rbp)
jne 0x62dd
movq -0x10(%rbp), %rdi
leaq 0xef5b(%rip), %rsi      # 0x15233
callq 0x21c0
jmp 0x62df
jmp 0x62e1
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x6240
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: 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
subq $0x220, %rsp            # imm = 0x220
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
callq 0x2240
movq -0x1f8(%rbp), %rsi
movq -0x8(%rbp), %rdi
callq 0x2050
jmp 0x6345
movl $0x10, %edi
movl $0x8, %esi
callq 0x10a30
movl %eax, -0x1fc(%rbp)
jmp 0x635c
movl -0x1fc(%rbp), %edx
leaq -0x1c8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x22a0
jmp 0x6374
jmp 0x6376
leaq -0x1c8(%rbp), %rdi
leaq -0x1cc(%rbp), %rsi
callq 0x2120
movq %rax, -0x208(%rbp)
jmp 0x6392
movq -0x208(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2200
movb %al, -0x209(%rbp)
jmp 0x63b0
movb -0x209(%rbp), %al
testb $0x1, %al
jne 0x63bc
jmp 0x6425
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x218(%rbp)
movslq -0x1cc(%rbp), %rsi
leaq -0x1e0(%rbp), %rdi
callq 0x4ae0
jmp 0x63e0
movq -0x218(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x10a50
jmp 0x63f5
jmp 0x6376
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x649d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x2170
jmp 0x649d
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
callq 0xaa20
movq %rax, -0x1e8(%rbp)
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
callq 0xa6b0
movq %rax, -0x1f0(%rbp)
movq -0x1e8(%rbp), %rdi
movq -0x1f0(%rbp), %rsi
callq 0x10a80
jmp 0x6462
movq -0x10(%rbp), %rdi
callq 0x4bb0
jmp 0x646d
movq -0x8(%rbp), %rax
movq %rax, -0x220(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x2170
leaq -0x30(%rbp), %rdi
callq 0x2130
movq -0x220(%rbp), %rax
addq $0x220, %rsp            # imm = 0x220
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x2130
movq -0x38(%rbp), %rdi
callq 0x22f0
nop
// File: 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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xe565(%rip), %rsi      # 0x15060
callq 0x21c0
movl $0x0, -0x14(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x48b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
jae 0x6b82
cmpl $0x0, -0x14(%rbp)
je 0x6b57
movslq -0x14(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x48b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jae 0x6b57
movq -0x8(%rbp), %rdi
leaq 0xe511(%rip), %rsi      # 0x15063
callq 0x21c0
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rsi
callq 0x4900
movq -0x30(%rbp), %rdi
movl (%rax), %esi
callq 0x22e0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6b07
movq -0x8(%rbp), %rdi
leaq 0xe4d9(%rip), %rsi      # 0x15066
callq 0x21c0
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: asd00012334[P]Abstract-Algebra-2018/./quotient.hpp
// Function: quotient::fraction::reduce()
void reduce(){
        int alter = en>=0 ^ dn>=0;
        en = std::abs(en);
        dn = std::abs(dn);
        int g = std::__gcd(en,dn);
        en /= g, dn /= g;
        if(alter) en = -en;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, (%rax)
setge %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpq $0x0, 0x8(%rax)
setge %dl
andb $0x1, %dl
movzbl %dl, %edx
xorl %edx, %ecx
movl %ecx, -0xc(%rbp)
movq (%rax), %rdi
callq 0x7020
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq 0x8(%rax), %rdi
callq 0x7020
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x4d50
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl %ecx, -0x10(%rbp)
movslq -0x10(%rbp), %rcx
movq (%rax), %rax
cqto
idivq %rcx
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movslq -0x10(%rbp), %rcx
movq 0x8(%rax), %rax
cqto
idivq %rcx
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
cmpl $0x0, -0xc(%rbp)
je 0x7010
movq -0x18(%rbp), %rax
xorl %ecx, %ecx
subq (%rax), %rcx
movq %rcx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x60, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x8df1
cmpq $0x0, -0x20(%rbp)
jne 0x8df1
movl $0x10, %edi
callq 0x20d0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x58(%rbp)
leaq 0xc2b0(%rip), %rsi      # 0x15069
callq 0x2250
jmp 0x8dc0
movq -0x58(%rbp), %rdi
movq 0x171fd(%rip), %rsi     # 0x1ffc8
movq 0x171de(%rip), %rdx     # 0x1ffb0
callq 0x22d0
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x2160
jmp 0x8eeb
movl $0x1, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x44(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq 0x8f00
movl $0x0, -0x4c(%rbp)
movl $0x1, -0x50(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x4c(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x8f00
cmpq $0x0, -0x18(%rbp)
jge 0x8e3e
movq $-0x1, -0x40(%rbp)
cmpq $0x0, -0x20(%rbp)
jge 0x8e4d
movq $-0x1, -0x8(%rbp)
movq -0x18(%rbp), %rax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cltq
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cltq
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x8edd
leaq -0x40(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x8f30
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x8f60
movq -0x18(%rbp), %rax
cqto
idivq -0x20(%rbp)
movq %rax, %rcx
imulq -0x10(%rbp), %rcx
movq -0x40(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cqto
idivq -0x20(%rbp)
movq %rax, %rcx
imulq -0x8(%rbp), %rcx
movq -0x38(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
cqto
idivq %rcx
movq %rdx, -0x18(%rbp)
jmp 0x8e6f
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x60, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x22f0
nopw %cs:(%rax,%rax)
nop
// File: 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
subq $0x60, %rsp
movq %rdi, -0x58(%rbp)
movq %rdi, %rax
movq %rax, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x4870
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rdi)
addq $0x10, %rdi
movq %rdi, -0x48(%rbp)
movq (%rax), %rsi
leaq -0x30(%rbp), %rdi
callq 0x2780
jmp 0xcb80
movq -0x48(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x48d0
jmp 0xcb8f
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0xcbbb
jmp 0xcbb2
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x49b0
jmp 0xcbc5
movq -0x58(%rbp), %rdi
callq 0x49b0
movq -0x60(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x22f0
nop
// File: asd00012334[P]Abstract-Algebra-2018/main.cpp
// Function: Polynomial<prime::Zp, prime::ZpElement>::operator==(Polynomial<prime::Zp, prime::ZpElement> 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
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x38(%rbp)
callq 0x50d0
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x50d0
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0xf1d0
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0xf108
movq -0x38(%rbp), %rdi
addq $0x10, %rdi
movslq -0x30(%rbp), %rsi
callq 0xcb10
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
addq $0x10, %rdi
movslq -0x30(%rbp), %rsi
callq 0xcb10
movq -0x40(%rbp), %rdi
movq %rax, %rsi
callq 0x9990
testb $0x1, %al
jne 0xf0fb
movb $0x0, -0x1(%rbp)
jmp 0xf116
jmp 0xf0fd
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xf0b7
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: 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
subq $0x60, %rsp
movq %rdi, -0x58(%rbp)
movq %rdi, %rax
movq %rax, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x4870
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rdi)
addq $0x10, %rdi
movq %rdi, -0x48(%rbp)
movq (%rax), %rsi
leaq -0x30(%rbp), %rdi
callq 0x2750
jmp 0xf180
movq -0x48(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x48d0
jmp 0xf18f
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0xf1bb
jmp 0xf1b2
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x49b0
jmp 0xf1c5
movq -0x58(%rbp), %rdi
callq 0x49b0
movq -0x60(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x22f0
nop
// File: 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
subq $0x40, %rsp
movq %rsi, -0x30(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x38(%rbp)
callq 0xf5d0
movq -0x30(%rbp), %rdi
movl %eax, -0x1c(%rbp)
callq 0xf5d0
movl %eax, -0x20(%rbp)
leaq -0x1c(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0xf1d0
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0xf5a8
movq -0x38(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0xf620
movq -0x30(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
movslq -0x28(%rbp), %rsi
callq 0x4d90
movq %rax, %rcx
movl -0x3c(%rbp), %eax
cmpl (%rcx), %eax
jne 0xf56c
jmp 0xf59d
movq -0x38(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0xf620
movq -0x30(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x40(%rbp)
movslq -0x28(%rbp), %rsi
callq 0x4d90
movq %rax, %rcx
movl -0x40(%rbp), %eax
cmpl (%rcx), %eax
setl %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0xf5b6
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xf539
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
setl %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: asd00012334[P]Abstract-Algebra-2018/main.cpp
// Function: DegreeList::degree() const
int degree()const{
        int i;
        for(i=size()-1;i>0;--i)
            if(back()!=0) break;
        return i;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
callq 0x48b0
subq $0x1, %rax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0xf613
movq -0x18(%rbp), %rdi
callq 0xf660
cmpl $0x0, (%rax)
je 0xf606
jmp 0xf613
jmp 0xf608
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xf5f0
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x50, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4ae0
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xb350
testb $0x1, %al
jne 0x11d94
jmp 0x11dc1
movl $0x8, %edi
callq 0x20d0
movq %rax, %rdi
movq %rdi, -0x48(%rbp)
callq 0x4ed0
movq -0x48(%rbp), %rdi
movq 0xe223(%rip), %rsi      # 0x1ffd8
movq 0xe234(%rip), %rdx      # 0x1fff0
callq 0x22d0
movq -0x40(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
imulq %rcx, %rsi
imulq %rax, %rdx
leaq -0x10(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x6f30
movq -0x50(%rbp), %rdi
callq 0x6f60
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x1, -0x11(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x12(%rbp)
je 0x262f
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
setne %al
movb %al, -0x12(%rbp)
movb -0x12(%rbp), %al
testb $0x1, %al
jne 0x2638
jmp 0x267e
movq -0x8(%rbp), %rax
movsbl (%rax), %edi
callq 0x2430
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %edi
callq 0x2430
movl %eax, %ecx
movl -0x18(%rbp), %eax
cmpl %ecx, %eax
je 0x2662
movb $0x0, -0x11(%rbp)
jmp 0x267e
jmp 0x2664
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x2614
xorl %eax, %eax
testb $0x1, -0x11(%rbp)
movb %al, -0x19(%rbp)
je 0x2699
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
sete %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x1, -0x11(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x12(%rbp)
je 0x26db
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
setne %al
movb %al, -0x12(%rbp)
movb -0x12(%rbp), %al
testb $0x1, %al
jne 0x26e4
jmp 0x2718
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
movq -0x10(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x26fc
movb $0x0, -0x11(%rbp)
jmp 0x2718
jmp 0x26fe
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x26c0
xorl %eax, %eax
testb $0x1, -0x11(%rbp)
movb %al, -0x13(%rbp)
je 0x2733
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
sete %al
movb %al, -0x13(%rbp)
movb -0x13(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x20e0
addq $0x10, %rax
addq $0x1, %rax
movl %eax, -0xc(%rbp)
movslq -0xc(%rbp), %rdi
shlq $0x0, %rdi
callq 0x2320
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x2220
leaq 0x8ac7(%rip), %rax      # 0xb2e0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x2760
movw %ax, %cx
movq -0x20(%rbp), %rax
movw %cx, (%rax)
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
xorl %eax, %eax
movl %eax, %edi
callq 0x2760
movw %ax, %cx
movq -0x20(%rbp), %rax
movw %cx, 0x2(%rax)
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
xorl %eax, %eax
movl %eax, %edi
callq 0x2760
movw %ax, %cx
movq -0x20(%rbp), %rax
movw %cx, 0x4(%rax)
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
xorl %eax, %eax
movl %eax, %edi
callq 0x2760
movw %ax, %cx
movq -0x20(%rbp), %rax
movw %cx, 0x6(%rax)
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq 0xea2d(%rip), %rsi      # 0x112e0
leaq -0x50(%rbp), %rdi
callq 0x58e0
leaq -0x50(%rbp), %rdi
callq 0x5920
cmpq $0x0, %rax
je 0x28ed
leaq -0x50(%rbp), %rdi
callq 0x5960
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x2330
cmpl $0x0, %eax
jne 0x28eb
movb $0x1, -0x1(%rbp)
jmp 0x28f1
jmp 0x28bc
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0x440, %rsp            # imm = 0x440
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x3075
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x20e0
movl %eax, -0x2c(%rbp)
xorl %eax, %eax
cmpl $0x3, -0x2c(%rbp)
movb %al, -0x431(%rbp)
jle 0x2fbe
movq -0x28(%rbp), %rdi
movslq -0x2c(%rbp), %rax
addq %rax, %rdi
addq $-0x3, %rdi
leaq 0x8420(%rip), %rsi      # 0xb3cd
callq 0x2290
cmpl $0x0, %eax
sete %al
movb %al, -0x431(%rbp)
movb -0x431(%rbp), %al
andb $0x1, %al
movb %al, -0x2d(%rbp)
testb $0x1, -0x2d(%rbp)
je 0x3001
leaq -0x430(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x83f0(%rip), %rsi      # 0xb3d1
movb $0x0, %al
callq 0x2050
leaq -0x430(%rbp), %rdi
leaq 0x85aa(%rip), %rsi      # 0xb5a0
callq 0x2080
movq %rax, -0x20(%rbp)
jmp 0x3015
movq -0x28(%rbp), %rdi
leaq 0x8594(%rip), %rsi      # 0xb5a0
callq 0x22c0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x3030
movq -0x28(%rbp), %rsi
leaq 0x83b8(%rip), %rdi      # 0xb3df
movb $0x0, %al
callq 0x2030
jmp 0x3067
movq -0x28(%rbp), %rsi
leaq 0x83c5(%rip), %rdi      # 0xb400
movb $0x0, %al
callq 0x2030
movq -0x20(%rbp), %rdi
callq 0x2900
testb $0x1, -0x2d(%rbp)
je 0x305c
movq -0x20(%rbp), %rdi
callq 0x2340
jmp 0x3065
movq -0x20(%rbp), %rdi
callq 0x2230
jmp 0x3067
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2f59
ud2
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq 0xe251(%rip), %rax      # 0x112e0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x318e
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x3153
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x3125
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x30fa
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x22d0
jmp 0x30d4
movq -0x20(%rbp), %rax
movq (%rax), %rdi
callq 0x22d0
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x22d0
jmp 0x30c1
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x22d0
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x22d0
jmp 0x30aa
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x22d0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x22d0
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x22d0
jmp 0x3093
movq $0x0, 0xe147(%rip) # 0x112e0
addq $0x30, %rsp
popq %rbp
retq
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x3e8, %rax            # imm = 0x3E8
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x64c0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x64f0
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x6520
testb $0x1, %al
jne 0x33ce
jmp 0x3472
leaq -0x28(%rbp), %rdi
callq 0x6560
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rax
movq (%rax), %rsi
callq 0x2060
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x3462
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rdi
callq 0x20e0
movq -0x60(%rbp), %r9
movq -0x58(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %r8
addq %rax, %r9
leaq 0xdef9(%rip), %rdi      # 0x11340
leaq 0x8117(%rip), %rsi      # 0xb565
movb $0x0, %al
callq 0x2050
leaq 0xdee4(%rip), %rax      # 0x11340
movq %rax, -0x8(%rbp)
jmp 0x347a
jmp 0x3464
leaq -0x28(%rbp), %rdi
callq 0x6580
jmp 0x33b8
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x450, %rsp            # imm = 0x450
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl 0xd24f(%rip), %eax      # 0x11308
movl %eax, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x40e5
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x4e, %eax
jne 0x40da
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x40e3
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x40f4
movq -0x10(%rbp), %rdi
callq 0x2390
subl $0x1, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x4266
movslq -0x14(%rbp), %rax
movq %rax, -0x440(%rbp)
leaq 0xd1d8(%rip), %rdi      # 0x112e8
addq $0x8, %rdi
callq 0x5e70
movq %rax, %rcx
movq -0x440(%rbp), %rax
cmpq %rcx, %rax
jae 0x4266
movl -0x14(%rbp), %eax
movl %eax, 0xd1d3(%rip)      # 0x11308
leaq -0x420(%rbp), %rax
movq %rax, -0x428(%rbp)
movq -0x428(%rbp), %rdi
leaq 0x7337(%rip), %rsi      # 0xb488
leaq 0xd0f8(%rip), %rdx      # 0x11250
movb $0x0, %al
callq 0x2050
movl %eax, %ecx
movq -0x428(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x428(%rbp)
movslq -0x14(%rbp), %rsi
leaq 0xd168(%rip), %rdi      # 0x112e8
addq $0x8, %rdi
callq 0x6020
movq %rax, -0x430(%rbp)
movsbl 0xd151(%rip), %eax      # 0x112e8
cmpl $0x73, %eax
jne 0x41b5
movq -0x430(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x6000
movq %rax, -0x448(%rbp)
jmp 0x41c0
xorl %eax, %eax
movq %rax, -0x448(%rbp)
jmp 0x41c0
movq -0x448(%rbp), %rax
movq %rax, -0x438(%rbp)
cmpq $0x0, -0x438(%rbp)
je 0x420a
movq -0x428(%rbp), %rdi
movq -0x438(%rbp), %rdx
leaq 0x729a(%rip), %rsi      # 0xb487
movb $0x0, %al
callq 0x2050
movl %eax, %ecx
movq -0x428(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x428(%rbp)
movq -0x428(%rbp), %rdi
movq -0x430(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rsi
movq -0x430(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdx
movq -0x430(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rcx
callq 0x31a0
movl -0x14(%rbp), %esi
addl $0x1, %esi
leaq -0x420(%rbp), %rdx
leaq 0x7239(%rip), %rdi      # 0xb48c
movb $0x0, %al
callq 0x2030
leaq -0x420(%rbp), %rdi
callq 0x21e0
addq $0x450, %rsp            # imm = 0x450
popq %rbp
retq
nop
// File: 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
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6040
movq 0xd051(%rip), %rsi      # 0x112e0
leaq -0x48(%rbp), %rdi
callq 0x58e0
leaq -0x48(%rbp), %rdi
callq 0x5920
cmpq $0x0, %rax
je 0x44a3
leaq -0x48(%rbp), %rdi
callq 0x5960
movq 0x8(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x42cd
jmp 0x4298
jmp 0x42cf
movq -0x58(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x43cd
movq -0x58(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3b, %eax
jne 0x43ba
movq -0x58(%rbp), %rax
cmpq -0x50(%rbp), %rax
jbe 0x43ae
movq -0x8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0xc8(%rbp)
leaq -0x79(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x23f0
movq -0xc8(%rbp), %rcx
movq -0xc0(%rbp), %r8
xorl %eax, %eax
movl %eax, %edx
leaq -0x78(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x6090
jmp 0x434b
movq -0xd0(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x6060
jmp 0x435d
leaq -0x78(%rbp), %rdi
callq 0x2140
leaq -0x79(%rbp), %rdi
callq 0x2270
jmp 0x43ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x43a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x2140
leaq -0x79(%rbp), %rdi
callq 0x2270
jmp 0x44ac
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x43bc
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x42cf
movq -0x58(%rbp), %rax
cmpq -0x50(%rbp), %rax
jbe 0x449e
movq -0x8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0xe0(%rbp)
leaq -0xb1(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x23f0
movq -0xe0(%rbp), %rcx
movq -0xd8(%rbp), %r8
xorl %eax, %eax
movl %eax, %edx
leaq -0xb0(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x6090
jmp 0x442f
movq -0xe8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x6060
jmp 0x4444
leaq -0xb0(%rbp), %rdi
callq 0x2140
leaq -0xb1(%rbp), %rdi
callq 0x2270
jmp 0x449e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x4490
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x2140
leaq -0xb1(%rbp), %rdi
callq 0x2270
jmp 0x44ac
jmp 0x4298
addq $0xf0, %rsp
popq %rbp
retq
movq -0x88(%rbp), %rdi
callq 0x23e0
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
addq $0x1f4, %rdi            # imm = 0x1F4
movq -0x10(%rbp), %rsi
callq 0x2220
movq -0x40(%rbp), %rdi
movq %rdi, %rax
addq $0x1f4, %rax            # imm = 0x1F4
movq %rax, -0x18(%rbp)
movq %rdi, %rax
addq $0x1f4, %rax            # imm = 0x1F4
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
addq $0x3e8, %rdi            # imm = 0x3E8
callq 0x6420
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0x4de5
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x0, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x4e78
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3b, %eax
je 0x4dfd
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x4e76
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
je 0x4e46
cmpq $0x0, -0x28(%rbp)
je 0x4e46
movq -0x28(%rbp), %rax
cmpb $0x0, (%rax)
je 0x4e46
movq -0x40(%rbp), %rax
addq $0x3e8, %rax            # imm = 0x3E8
movq %rax, -0x48(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x6470
movq -0x48(%rbp), %rdi
movq %rax, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
leaq -0x38(%rbp), %rsi
callq 0x6440
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x4e54
jmp 0x4e8b
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x0, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
jmp 0x4e78
jmp 0x4e7a
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x4dba
movq -0x40(%rbp), %rdi
addq $0x3e8, %rdi            # imm = 0x3E8
callq 0x64a0
cmpq $0x0, %rax
jbe 0x4eb0
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2220
jmp 0x4ec0
movq -0x40(%rbp), %rdi
leaq 0x66a2(%rip), %rsi      # 0xb55d
callq 0x2220
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x450, %rsp            # imm = 0x450
movl %edi, -0x4(%rbp)
leaq 0xc43b(%rip), %rdi      # 0x11320
callq 0x65a0
cmpq $0x0, %rax
jne 0x4f7a
leaq -0x410(%rbp), %rdi
movq %rdi, -0x448(%rbp)
callq 0x65d0
movq -0x448(%rbp), %rsi
movl $0x0, -0x410(%rbp)
movl 0xc322(%rip), %eax      # 0x11240
movl %eax, -0x40c(%rbp)
leaq 0xc3f5(%rip), %rdi      # 0x11320
callq 0x6600
jmp 0x4f32
leaq 0xc3e7(%rip), %rdi      # 0x11320
xorl %eax, %eax
movl %eax, %esi
callq 0x6670
movq %rax, 0xc3cf(%rip)      # 0x11318
leaq -0x410(%rbp), %rdi
callq 0x6690
jmp 0x4f7a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x418(%rbp)
movl %eax, -0x41c(%rbp)
leaq -0x410(%rbp), %rdi
callq 0x6690
jmp 0x5093
movq 0xc397(%rip), %rax      # 0x11318
movl (%rax), %eax
cmpl -0x4(%rbp), %eax
jne 0x4f8d
jmp 0x508a
leaq -0x428(%rbp), %rdi
callq 0x66b0
leaq 0xc380(%rip), %rdi      # 0x11320
callq 0x66d0
movq %rax, -0x430(%rbp)
movq -0x430(%rbp), %rax
movq %rax, -0x428(%rbp)
leaq 0xc35f(%rip), %rdi      # 0x11320
callq 0x6740
movq %rax, -0x438(%rbp)
leaq -0x428(%rbp), %rdi
leaq -0x438(%rbp), %rsi
callq 0x6700
testb $0x1, %al
jne 0x4fe6
jmp 0x500b
leaq -0x428(%rbp), %rdi
callq 0x6770
movl (%rax), %eax
cmpl -0x4(%rbp), %eax
jne 0x4ffb
jmp 0x500b
jmp 0x4ffd
leaq -0x428(%rbp), %rdi
callq 0x6790
jmp 0x4fba
leaq 0xc30e(%rip), %rdi      # 0x11320
callq 0x6740
movq %rax, -0x440(%rbp)
leaq -0x428(%rbp), %rdi
leaq -0x440(%rbp), %rsi
callq 0x67b0
testb $0x1, %al
jne 0x5037
jmp 0x5077
leaq 0xc2e2(%rip), %rdi      # 0x11320
xorl %eax, %eax
movl %eax, %esi
callq 0x6670
movq %rax, %rsi
leaq 0xc2cf(%rip), %rdi      # 0x11320
callq 0x6600
leaq 0xc2c3(%rip), %rdi      # 0x11320
callq 0x67f0
movq %rax, 0xc2af(%rip)      # 0x11318
movl -0x4(%rbp), %ecx
movq 0xc2a5(%rip), %rax      # 0x11318
movl %ecx, (%rax)
jmp 0x508a
leaq -0x428(%rbp), %rdi
callq 0x6830
movq %rax, 0xc28e(%rip)      # 0x11318
addq $0x450, %rsp            # imm = 0x450
popq %rbp
retq
movq -0x418(%rbp), %rdi
callq 0x23e0
nop
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movb $0x0, 0x8(%rax)
movb $0x0, 0x9(%rax)
movb $0x0, 0xa(%rax)
movl $0x0, 0xc(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x21, %eax
jne 0x5a60
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
je 0x5a60
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x1, 0xa(%rax)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5e, %eax
jne 0x5a8d
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
je 0x5a8d
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x1, 0x8(%rax)
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x20a0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
cmpq $0x1, %rax
jle 0x5ad5
movq -0x20(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x24, %eax
jne 0x5ad5
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, %rdx
addq $-0x1, %rdx
movq %rdx, -0x20(%rbp)
movb $0x0, -0x1(%rcx)
movb $0x1, 0x9(%rax)
movq -0x28(%rbp), %rax
movl -0x20(%rbp), %ecx
movl -0x18(%rbp), %edx
subl %edx, %ecx
movl %ecx, 0xc(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rdi
callq 0x6110
movb %al, %sil
movq -0x28(%rbp), %rax
leaq 0x119e(%rip), %rdx      # 0x6ca0
leaq 0x12d7(%rip), %rcx      # 0x6de0
testb %sil, %sil
cmovneq %rdx, %rcx
movq %rcx, 0x10(%rax)
movq $0x0, 0x18(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, 0x30(%rax)
je 0x5bac
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
cmpq $0x0, 0x10(%rax)
je 0x5bac
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rcx
movq 0x10(%rcx), %rcx
movq %rcx, 0x30(%rax)
jmp 0x5bc0
movq -0x10(%rbp), %rdi
callq 0x6fe0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, 0x38(%rax)
je 0x5f5c
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
cmpq $0x0, 0x8(%rax)
je 0x5f5c
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x38(%rax)
jmp 0x5f70
movq -0x10(%rbp), %rdi
callq 0x7040
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: skyshore2001[P]symfind/symfind.cpp
// Function: ContainsUpper(char const*)
inline bool ContainsUpper(const char *p)
{
	for (; *p; ++p) {
		if (isupper(*p))
			return true;
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x614c
movq -0x10(%rbp), %rax
movsbl (%rax), %edi
callq 0x2190
cmpl $0x0, %eax
je 0x613c
movb $0x1, -0x1(%rbp)
jmp 0x6150
jmp 0x613e
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x611c
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, 0x28(%rax)
je 0x63fc
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0x10(%rax)
je 0x63fc
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rcx
movq 0x10(%rcx), %rcx
movq %rcx, 0x28(%rax)
jmp 0x6410
movq -0x10(%rbp), %rdi
callq 0x7150
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, 0xc(%rax)
jg 0x6cc7
movb $0x1, -0x1(%rbp)
jmp 0x6dd4
movq -0x18(%rbp), %rdi
callq 0x20e0
movq -0x28(%rbp), %rcx
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl 0xc(%rcx), %eax
jge 0x6ce8
movb $0x0, -0x1(%rbp)
jmp 0x6dd4
movq -0x28(%rbp), %rax
testb $0x1, 0x8(%rax)
jne 0x6cfc
movq -0x28(%rbp), %rax
testb $0x1, 0x9(%rax)
je 0x6d7a
movq -0x28(%rbp), %rax
testb $0x1, 0x8(%rax)
je 0x6d30
movq -0x28(%rbp), %rax
testb $0x1, 0x9(%rax)
je 0x6d30
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rdi
movq (%rax), %rsi
callq 0x2330
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x6dd4
movq -0x28(%rbp), %rax
testb $0x1, 0x8(%rax)
je 0x6d44
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x6d63
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rdx
addq %rdx, %rax
movslq 0xc(%rcx), %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rdi
movq (%rax), %rsi
callq 0x26b0
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x6dd4
jmp 0x6d7c
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x6dce
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
movq (%rcx), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x6dbe
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rdi
addq $0x1, %rdi
movq (%rax), %rsi
addq $0x1, %rsi
callq 0x26b0
testb $0x1, %al
jne 0x6db8
jmp 0x6dbe
movb $0x1, -0x1(%rbp)
jmp 0x6dd4
jmp 0x6dc0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x6d7c
jmp 0x6dd0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nop
// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, 0xc(%rax)
jg 0x6e07
movb $0x1, -0x1(%rbp)
jmp 0x6f28
movq -0x18(%rbp), %rdi
callq 0x20e0
movq -0x28(%rbp), %rcx
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl 0xc(%rcx), %eax
jge 0x6e28
movb $0x0, -0x1(%rbp)
jmp 0x6f28
movq -0x28(%rbp), %rax
testb $0x1, 0x8(%rax)
jne 0x6e3c
movq -0x28(%rbp), %rax
testb $0x1, 0x9(%rax)
je 0x6eba
movq -0x28(%rbp), %rax
testb $0x1, 0x8(%rax)
je 0x6e70
movq -0x28(%rbp), %rax
testb $0x1, 0x9(%rax)
je 0x6e70
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rdi
movq (%rax), %rsi
callq 0x2290
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x6f28
movq -0x28(%rbp), %rax
testb $0x1, 0x8(%rax)
je 0x6e84
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x6ea3
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rdx
addq %rdx, %rax
movslq 0xc(%rcx), %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rdi
movq (%rax), %rsi
callq 0x2600
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x6f28
jmp 0x6ebc
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x6f22
movq -0x18(%rbp), %rax
movsbl (%rax), %edi
callq 0x2430
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, -0x34(%rbp)
movq (%rax), %rax
movsbl (%rax), %edi
callq 0x2430
movl %eax, %ecx
movl -0x34(%rbp), %eax
cmpl %ecx, %eax
jne 0x6f12
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rdi
addq $0x1, %rdi
movq (%rax), %rsi
addq $0x1, %rsi
callq 0x2600
testb $0x1, %al
jne 0x6f0c
jmp 0x6f12
movb $0x1, -0x1(%rbp)
jmp 0x6f28
jmp 0x6f14
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x6ebc
jmp 0x6f24
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)