LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH17_SpecializedLibraryFacilities/examples/badgetc.cc
// Function: main
int main()
{
	char ch;    // using a char here invites disaster!

	// the return from cin.get is converted to char 
	// and then compared to an int
	while ((ch = cin.get()) != EOF)
         	cout.put(ch);
	cout << endl;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x2e06(%rip), %rdi      # 0x3fe0
callq 0x1070
cmpb $-0x1, %al
je 0x1208
movq 0x2de6(%rip), %rbx      # 0x3fd0
movq 0x2def(%rip), %r14      # 0x3fe0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1070
cmpb $-0x1, %al
jne 0x11f1
movq 0x2dc1(%rip), %rbx      # 0x3fd0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Se6[P]CmdLineArgs/./CmdLineArgs.h
// Function: CmdLineArgs::split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char)
std::vector<std::string> CmdLineArgs::split(const std::string &s, char delim)
{
    std::vector<std::string> elems;
    std::stringstream ss(s);
    std::string item;

    while(getline(ss, item, delim))
        elems.push_back(item);

    return elems;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movl %edx, %ebp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x28(%rsp), %rdi
movl $0x18, %edx
callq 0x3310
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movsbl %bpl, %ebp
leaq 0x28(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x33d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x364b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x62ee
jmp 0x3623
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3662
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0xa92f(%rip), %rsi      # 0xdf98
leaq 0x28(%rsp), %rdi
callq 0x31a0
leaq 0xa8(%rsp), %rdi
callq 0x3090
movq %rbx, %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x36d0
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x36b2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0xa8df(%rip), %rsi      # 0xdf98
leaq 0x28(%rsp), %rdi
callq 0x31a0
leaq 0xa8(%rsp), %rdi
callq 0x3090
movq %rbx, %rdi
callq 0x632c
movq %r14, %rdi
callq 0x33a0
// File: /workspace/github_cpp_makefile_star2_O1/Se6[P]CmdLineArgs/./CmdLineArgs.h
// Function: CmdLineArgs::CmdLineArgs(int, char**, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
CmdLineArgs::CmdLineArgs(int argc, char **argv, const std::string &usage_intro, bool allow_set_with_equal)
    :usage_intro_(usage_intro)
{
    for(int i=1; i<argc; ++i) {
        if (allow_set_with_equal) {
            auto vec = split(argv[i], '=');
            args_.reserve(args_.size() + vec.size());
            args_.insert(args_.end(), vec.begin(), vec.end());
        } else {
            args_.push_back(argv[i]);
        }
    }

    usage_intro_ += "\nOptions are:";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r8d, %ebp
movq %rdx, %r15
movl %esi, %r14d
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
addq $0x18, %rdi
leaq 0x28(%rbx), %rax
movq %rax, 0x30(%rsp)
movq %rax, 0x18(%rbx)
movq (%rcx), %rsi
movq 0x8(%rcx), %rdx
addq %rsi, %rdx
movq %rdi, 0x38(%rsp)
callq 0x7024
leaq 0x48(%rbx), %rax
movq %rax, 0x28(%rsp)
movq %rax, 0x38(%rbx)
xorl %eax, %eax
movq %rax, 0x40(%rbx)
movb $0x0, 0x48(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rbx)
movq %rax, 0x68(%rbx)
cmpl $0x2, %r14d
jl 0x3839
movl %r14d, %r13d
movl $0x1, %r14d
leaq 0x8(%rsp), %r12
testb %bpl, %bpl
je 0x37f5
movq (%r15,%r14,8), %rsi
movq %r12, %rdi
leaq 0x7(%rsp), %rdx
callq 0x6388
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
movl $0x3d, %edx
callq 0x35cc
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x37af
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x5, %rax
movq 0x48(%rsp), %rsi
subq 0x40(%rsp), %rsi
sarq $0x5, %rsi
addq %rax, %rsi
movq %rbx, %rdi
callq 0x63c6
movq 0x8(%rbx), %rsi
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %rcx
movq %rbx, %rdi
callq 0x7420
leaq 0x40(%rsp), %rdi
callq 0x632c
jmp 0x382d
movq (%r15,%r14,8), %rsi
movq %r12, %rdi
leaq 0x40(%rsp), %rdx
callq 0x6388
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7878
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x382d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
incq %r14
cmpq %r14, %r13
jne 0x3767
leaq 0x67e4(%rip), %rsi      # 0xa024
movq 0x38(%rsp), %rdi
callq 0x33e0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3862
movq %rax, %r14
jmp 0x38dc
jmp 0x3862
movq %rax, %r14
jmp 0x3899
jmp 0x388c
jmp 0x386b
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3899
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
jmp 0x3899
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x632c
leaq 0x58(%rbx), %rdi
callq 0x64ae
movq 0x38(%rbx), %rdi
cmpq 0x28(%rsp), %rdi
je 0x38bd
movq 0x28(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x3220
movq 0x38(%rsp), %rax
movq (%rax), %rdi
cmpq 0x30(%rsp), %rdi
je 0x38dc
movq 0x30(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x3220
movq %rbx, %rdi
callq 0x632c
movq %r14, %rdi
callq 0x33a0
// File: /workspace/github_cpp_makefile_star2_O1/Se6[P]CmdLineArgs/./CmdLineArgs.h
// Function: CmdLineArgs::findLongName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::vector<std::string>::iterator CmdLineArgs::findLongName(const std::string &name)
{
    std::vector<std::string>::iterator pos;
    bool found = false;

    for( pos=args_.begin(); pos!=args_.end(); ++pos ) {

        if( pos->size()<3 || pos->substr(0,2) != "--")
            continue;

        if( pos->substr(2) == name.substr(0,pos->size()-2) ){
            found = true;
            break;
        }
    }

    return found ? pos : args_.end();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r14
movq (%rdi), %rbx
cmpq 0x8(%rdi), %rbx
je 0x3a1b
movq %rsi, %r15
leaq 0x48(%rsp), %r12
movq 0x8(%rbx), %rbp
movb $0x1, %r13b
cmpq $0x3, %rbp
jb 0x3946
movl $0x2, %ecx
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3240
movq %r12, %rdi
leaq 0x670b(%rip), %rsi      # 0xa046
callq 0x3070
testl %eax, %eax
setne %r13b
cmpq $0x3, %rbp
jb 0x3968
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3968
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3220
testb %r13b, %r13b
jne 0x3a0d
movl $0x2, %edx
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq $-0x1, %rcx
callq 0x3240
movq 0x8(%rbx), %rcx
addq $-0x2, %rcx
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3240
movq 0x10(%rsp), %rdx
cmpq 0x30(%rsp), %rdx
jne 0x39c9
testq %rdx, %rdx
je 0x39cd
movq 0x28(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x3230
testl %eax, %eax
sete %bpl
jmp 0x39d0
xorl %ebp, %ebp
jmp 0x39d0
movb $0x1, %bpl
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x39ec
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3a08
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
testb %bpl, %bpl
jne 0x3a1f
addq $0x20, %rbx
cmpq 0x8(%r14), %rbx
jne 0x3912
movq 0x8(%r14), %rbx
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3a50
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
movq %rbx, %rdi
callq 0x33a0
// File: /workspace/github_cpp_makefile_star2_O1/Se6[P]CmdLineArgs/./CmdLineArgs.h
// Function: CmdLineArgs::findShortName[abi:cxx11](char)
std::vector<std::string>::iterator CmdLineArgs::findShortName(char name)
{
    if(name==' ')
        return args_.end();

    std::vector<std::string>::iterator pos;
    bool found = false;

    for(pos=args_.begin(); pos!=args_.end(); ++pos){

        if( pos->size()<2 || (*pos)[0] != '-')
            continue;

        if((*pos)[1] == '-')
            continue;

        std::string::size_type idx = pos->find(name,1);
        if( idx != std::string::npos ) {
            found = true;
            break;
        }
    }

    return found ? pos : args_.end();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
cmpb $0x20, %sil
je 0x3ac6
movq (%r14), %rbx
cmpq 0x8(%r14), %rbx
je 0x3abd
xorl %r15d, %r15d
movsbl %sil, %ebp
movl $0x1, %r12d
cmpq $0x2, 0x8(%rbx)
jb 0x3ab1
movq (%rbx), %rax
cmpb $0x2d, (%rax)
jne 0x3ab1
cmpb $0x2d, 0x1(%rax)
je 0x3ab1
movl $0x1, %edx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3290
movzbl %r15b, %r15d
cmpq $-0x1, %rax
cmovnel %r12d, %r15d
jne 0x3ac0
addq $0x20, %rbx
cmpq 0x8(%r14), %rbx
jne 0x3a7f
jmp 0x3ac0
xorl %r15d, %r15d
testb $0x1, %r15b
jne 0x3aca
movq 0x8(%r14), %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Se6[P]CmdLineArgs/./CmdLineArgs.h
// Function: CmdLineArgs::getFlag(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int CmdLineArgs::getFlag(const std::string &long_name, char short_name, const std::string &desc)
{
    addUsage(long_name,short_name,"",desc);

    int nb=0;

    // First search the long names:
    auto pos = findLongName(long_name);
    while(pos != args_.end()){
        ++nb;
        pos = args_.erase(pos);
        pos = findLongName(long_name);
    }

    // Then search the short names:
    pos = findShortName(short_name);
    while(pos != args_.end()){
        ++nb;
        if(pos->size()==2)
            pos = args_.erase(pos);
        else
            pos->erase(pos->find(short_name,1),1);
        pos = findShortName(short_name);
    }

    return nb;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r12
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x66ee(%rip), %rdx      # 0xa1ee
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %rdx, %rsi
callq 0x70f4
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
movq %r13, %rcx
movq %r12, %r8
callq 0x3c06
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3b3b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
movq %rbx, %rdi
movq %r15, %rsi
callq 0x38ec
cmpq 0x8(%rbx), %rax
je 0x3b6e
xorl %ebp, %ebp
incl %ebp
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7a80
movq %rbx, %rdi
movq %r15, %rsi
callq 0x38ec
cmpq 0x8(%rbx), %rax
jne 0x3b4e
jmp 0x3b70
xorl %ebp, %ebp
movsbl %r14b, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x3a58
cmpq 0x8(%rbx), %rax
je 0x3bd2
movq %rax, %r15
cmpq $0x2, 0x8(%r15)
jne 0x3b9c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7a80
jmp 0x3bbc
movl $0x1, %edx
movq %r15, %rdi
movl %r14d, %esi
callq 0x3290
movl $0x1, %edx
movq %r15, %rdi
movq %rax, %rsi
callq 0x3050
movq %rbx, %rdi
movl %r14d, %esi
callq 0x3a58
movq %rax, %r15
incl %ebp
cmpq 0x8(%rbx), %rax
jne 0x3b88
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3bfd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
movq %rbx, %rdi
callq 0x33a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/Se6[P]CmdLineArgs/./CmdLineArgs.h
// Function: CmdLineArgs::getUnparsedOpts[abi:cxx11]()
std::vector<std::string> CmdLineArgs::getUnparsedOpts()
{
    std::vector<std::string> unparsed;
    for( auto &arg: args_ )
        if( arg[0] == '-' )
            unparsed.push_back(arg);
    return unparsed;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %r14
movq 0x8(%rsi), %r15
cmpq %r15, %r14
je 0x513f
movq (%r14), %rax
cmpb $0x2d, (%rax)
jne 0x5139
movq %rbx, %rdi
movq %r14, %rsi
callq 0x62ee
addq $0x20, %r14
jmp 0x5121
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x632c
movq %r14, %rdi
callq 0x33a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/Se6[P]CmdLineArgs/./CmdLineArgs.h
// Function: CmdLineArgs::throwIfUnparsed()
void CmdLineArgs::throwIfUnparsed()
{
    std::vector<std::string> unparsed = getUnparsedOpts();
    if( !unparsed.empty() ) {
        std::string msg("\nError: unparsed options: ");
        for( auto &arg: unparsed )
            msg += arg + " ";
        throw std::runtime_error(msg);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rsi
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x5104
movq (%rbx), %rax
cmpq 0x8(%rbx), %rax
jne 0x52e6
leaq 0x40(%rsp), %rdi
callq 0x632c
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x4ddf(%rip), %rsi      # 0xa0d5
leaq 0x4df2(%rip), %rdx      # 0xa0ef
leaq 0x20(%rsp), %rdi
callq 0x70f4
movq 0x40(%rsp), %rbp
movq 0x48(%rsp), %r12
cmpq %r12, %rbp
jne 0x5346
movl $0x10, %edi
callq 0x30f0
movq %rax, %r14
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x3330
movq 0x8cb9(%rip), %rsi      # 0xdff0
movq 0x8c7a(%rip), %rdx      # 0xdfb8
movq %r14, %rdi
callq 0x3380
leaq 0x10(%rsp), %r13
movq %rsp, %rbx
leaq 0x4d55(%rip), %r14      # 0xa0aa
leaq 0x20(%rsp), %r15
movq %r13, (%rsp)
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x7024
movq %rbx, %rdi
movq %r14, %rsi
callq 0x33e0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r15, %rdi
callq 0x3080
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x53a3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3220
addq $0x20, %rbp
cmpq %r12, %rbp
jne 0x535a
jmp 0x5316
jmp 0x53b3
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x53e0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3220
jmp 0x53e0
jmp 0x53d0
movq %rax, %rbx
jmp 0x53e0
movq %rax, %rbx
movq %r14, %rdi
callq 0x3190
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x5401
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3220
jmp 0x5401
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x632c
movq %rbx, %rdi
callq 0x33a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/Worthy-Wang[P]Warcraft3-StartWar/City.cpp
// Function: warcraft::compBeforeFight(std::shared_ptr<warcraft::Weapon>, std::shared_ptr<warcraft::Weapon>)
bool compBeforeFight(WeaponPtr lhs, WeaponPtr rhs)
{
    if (lhs->getType() < rhs->getType())
        return true;
    else if (lhs->getType() == ARROW && lhs->getType() == rhs->getType() && lhs->getDurability() < rhs->getDurability())
        return true;
    else
        return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rcx
movl 0x8(%rcx), %edi
movq (%rsi), %rdx
movl 0x8(%rdx), %esi
movb $0x1, %al
cmpl %esi, %edi
jl 0x4608
xorl $0x2, %edi
xorl $0x2, %esi
orl %edi, %esi
jne 0x4606
movq 0x38(%rcx), %rcx
cmpq 0x38(%rdx), %rcx
jb 0x4608
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Worthy-Wang[P]Warcraft3-StartWar/City.cpp
// Function: warcraft::City::Battle()
bool City::Battle()
{
    //城市中没有对立的两武士，决斗失败
    if (!redWarrior.get() || !blueWarrior.get())
        return false;

    /****************************战前准备*******************************/
    //排列好武器
    vector<WeaponPtr> &redWeaponLib = redWarrior->getWeapons();
    if (!redWeaponLib.empty())
    std::sort(redWeaponLib.begin(), redWeaponLib.end(), compBeforeFight);
    
    vector<WeaponPtr> &blueWeaponLib = blueWarrior->getWeapons();
    if (!blueWeaponLib.empty())
    std::sort(blueWeaponLib.begin(), blueWeaponLib.end(), compBeforeFight);

    //如果双方都没有武器，则视为平局
    if (0 == redWeaponLib.size() && 0 == blueWeaponLib.size())
    {
        bothAlive();
        return true; //决斗成功
    }

    /****************************战中*******************************/
    //偶数编号城市，蓝方先攻击
    if (0 == _id % 2)
        blueWarriorAttackFirst();
    //奇数编号城市，红方先攻击
    else
        redWarriorAttackFirst();

    return true; //决斗成功
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rdi), %r13
testq %r13, %r13
je 0x471b
movq %rdi, %rbx
cmpq $0x0, 0x18(%rdi)
je 0x471b
movq 0x40(%r13), %r14
movq 0x48(%r13), %r15
cmpq %r15, %r14
je 0x46a8
movq %r15, %rax
subq %r14, %rax
sarq $0x4, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
leaq -0xb0(%rip), %r12       # 0x45dc
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rcx
callq 0x58f5
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x59c8
movq 0x18(%rbx), %r12
movq 0x40(%r12), %r14
movq 0x48(%r12), %r15
cmpq %r15, %r14
je 0x46f6
movq %r15, %rax
subq %r14, %rax
sarq $0x4, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
leaq -0xfd(%rip), %rcx       # 0x45dc
movq %r14, %rdi
movq %r15, %rsi
callq 0x58f5
movq %r14, %rdi
movq %r15, %rsi
leaq -0x115(%rip), %rdx      # 0x45dc
callq 0x59c8
movq 0x48(%r13), %rax
cmpq 0x40(%r13), %rax
jne 0x470c
movq 0x48(%r12), %rax
cmpq 0x40(%r12), %rax
je 0x4729
testb $0x1, (%rbx)
jne 0x471f
movq %rbx, %rdi
callq 0x4742
jmp 0x4731
xorl %eax, %eax
jmp 0x4733
movq %rbx, %rdi
callq 0x49e8
jmp 0x4731
movq %rbx, %rdi
callq 0x53b8
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Worthy-Wang[P]Warcraft3-StartWar/City.cpp
// Function: warcraft::City::judgeResult(bool&, bool&)
bool City::judgeResult(bool &redHpFlag, bool &blueHpFlag)
{
    //如果双方的HP都没有变化，则平局
    if (false == redHpFlag && false == blueHpFlag)
    {
        bothAlive();
        return true;
    }

    else if (redWarrior->getHp() <= 0 && blueWarrior->getHp() <= 0)
    {
        bothdie();
        return true;
    }
    else if (redWarrior->getHp() <= 0)
    {
        win(blueWarrior, redWarrior);
        return true;
    }
    else if (blueWarrior->getHp() <= 0)
    {
        win(redWarrior, blueWarrior);
        return true;
    }
    else
        return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
movb (%rdx), %al
orb (%rsi), %al
jne 0x5245
callq 0x53b8
movb $0x1, %bl
jmp 0x5371
movq 0x8(%rdi), %rax
movl 0x38(%rax), %ecx
testl %ecx, %ecx
jle 0x5261
movq 0x18(%rdi), %rcx
cmpl $0x0, 0x38(%rcx)
jle 0x529d
xorl %ebx, %ebx
jmp 0x5371
movq 0x18(%rdi), %rdx
cmpl $0x0, 0x38(%rdx)
jle 0x52bf
testl %ecx, %ecx
jg 0x5250
movq 0x18(%rdi), %rax
movq %rax, -0x48(%rbp)
movq 0x20(%rdi), %rax
movq %rax, -0x40(%rbp)
testq %rax, %rax
je 0x531c
movq 0x11d39(%rip), %rcx     # 0x16fc8
cmpb $0x0, (%rcx)
je 0x5318
incl 0x8(%rax)
jmp 0x531c
movq %rax, -0x28(%rbp)
movq 0x10(%rdi), %rax
movq %rax, -0x20(%rbp)
testq %rax, %rax
je 0x52cd
movq 0x11d13(%rip), %rcx     # 0x16fc8
cmpb $0x0, (%rcx)
je 0x52c9
incl 0x8(%rax)
jmp 0x52cd
callq 0x556c
jmp 0x523e
lock
incl 0x8(%rax)
movq 0x18(%rdi), %rax
movq %rax, -0x18(%rbp)
movq 0x20(%rdi), %rax
movq %rax, -0x10(%rbp)
testq %rax, %rax
je 0x52f7
movq 0x11cdf(%rip), %rcx     # 0x16fc8
cmpb $0x0, (%rcx)
je 0x52f3
incl 0x8(%rax)
jmp 0x52f7
lock
incl 0x8(%rax)
leaq -0x28(%rbp), %rsi
leaq -0x18(%rbp), %rdx
callq 0x4c8e
movq -0x10(%rbp), %rdi
testq %rdi, %rdi
je 0x5312
callq 0x57ba
movq -0x20(%rbp), %rdi
jmp 0x5365
lock
incl 0x8(%rax)
movq 0x8(%rdi), %rax
movq %rax, -0x38(%rbp)
movq 0x10(%rdi), %rax
movq %rax, -0x30(%rbp)
testq %rax, %rax
je 0x5346
movq 0x11c90(%rip), %rcx     # 0x16fc8
cmpb $0x0, (%rcx)
je 0x5342
incl 0x8(%rax)
jmp 0x5346
lock
incl 0x8(%rax)
leaq -0x48(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x4c8e
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x5361
callq 0x57ba
movq -0x40(%rbp), %rdi
movb $0x1, %bl
testq %rdi, %rdi
je 0x5371
callq 0x57ba
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x538b
callq 0x57ba
movq -0x40(%rbp), %rdi
jmp 0x53a6
movq %rax, %rbx
movq -0x10(%rbp), %rdi
testq %rdi, %rdi
je 0x53a2
callq 0x57ba
movq -0x20(%rbp), %rdi
testq %rdi, %rdi
je 0x53b0
callq 0x57ba
movq %rbx, %rdi
callq 0x4230
// File: /workspace/github_cpp_makefile_star2_O1/Worthy-Wang[P]Warcraft3-StartWar/GameConfig.cpp
// Function: warcraft::GameConfig::readFromStream(std::istream&)
void GameConfig::readFromStream(std::istream &is)
{
    while (is.good())
    {
        nextGroupId(); //每一次读新数据组时 Case 组数++
        InitData group;
        //读取第一行 组数
        size_t caseNum;
        is >> caseNum;

        //读取第二行 基地生命元 城市数 Lion每前进一步的降低的忠诚度  截止时间
        is >> group._initBaseHp;
        is >> group._cityNum;
        is >> group._lionReduceLoyalty;
        is >> group._deadline;

        //读取第三行 武士初始生命值 
        for (size_t i = 0; i < _initWarriorOrder.size(); i++)
            is >> group._initWarriorHp[GameConfig::getInstance()->_initWarriorOrder[i]];
        
        //读取第四行 武士初始攻击力 
        for (size_t i = 0; i < _initWarriorOrder.size(); i++)
            is >> group._initWarriorAttack[GameConfig::getInstance()->_initWarriorOrder[i]];

        _groups.push_back(std::move(group));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq (%rsi), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%rsi,%rax)
jne 0x64f0
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x60(%rbp), %r12
leaq 0x18(%rdi), %rax
movq %rax, -0x30(%rbp)
leaq -0xb0(%rbp), %r15
incq 0x10da6(%rip)           # 0x17150
xorl %ecx, %ecx
movl %ecx, -0x88(%rbp)
movq %rcx, -0x80(%rbp)
leaq -0x88(%rbp), %rax
movq %rax, -0x78(%rbp)
movq %rax, -0x70(%rbp)
movq %rcx, -0x68(%rbp)
movl %ecx, -0x58(%rbp)
movq %rcx, -0x50(%rbp)
leaq -0x58(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %rax, -0x40(%rbp)
movq %rcx, -0x38(%rbp)
movq %rbx, %rdi
leaq -0xb8(%rbp), %rsi
callq 0x40c0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x40c0
movq %rbx, %rdi
leaq -0xa8(%rbp), %rsi
callq 0x40c0
movq %rbx, %rdi
leaq -0xa0(%rbp), %rsi
callq 0x40c0
movq %rbx, %rdi
leaq -0x98(%rbp), %rsi
callq 0x40c0
movq 0x8(%r14), %rax
cmpq (%r14), %rax
je 0x6471
xorl %r13d, %r13d
xorl %r15d, %r15d
movq 0x10d1b(%rip), %rax     # 0x17158
movq (%rax), %rsi
addq %r13, %rsi
leaq -0x90(%rbp), %rdi
callq 0x6838
movq %rbx, %rdi
movq %rax, %rsi
callq 0x40c0
movq 0x8(%r14), %rax
subq (%r14), %rax
incq %r15
sarq $0x2, %rax
addq $0x4, %r13
cmpq %rax, %r15
jb 0x6436
movq 0x8(%r14), %rax
cmpq (%r14), %rax
je 0x64b7
xorl %r13d, %r13d
xorl %r15d, %r15d
movq 0x10cd1(%rip), %rax     # 0x17158
movq (%rax), %rsi
addq %r13, %rsi
movq %r12, %rdi
callq 0x6838
movq %rbx, %rdi
movq %rax, %rsi
callq 0x40c0
movq 0x8(%r14), %rax
subq (%r14), %rax
incq %r15
sarq $0x2, %rax
addq $0x4, %r13
cmpq %rax, %r15
jb 0x6480
movq -0x30(%rbp), %rdi
leaq -0xb0(%rbp), %r15
movq %r15, %rsi
callq 0x6c00
movq %r12, %rdi
callq 0x698c
leaq -0x90(%rbp), %rdi
callq 0x698c
movq (%rbx), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%rbx,%rax)
je 0x63a3
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6506
jmp 0x6506
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x698c
leaq -0x90(%rbp), %rdi
callq 0x698c
movq %rbx, %rdi
callq 0x4230
// File: /workspace/github_cpp_makefile_star2_O1/Worthy-Wang[P]Warcraft3-StartWar/GameConfig.cpp
// Function: warcraft::GameConfig::readFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void GameConfig::readFromFile(const string filename)
{
    std::ifstream ifs(filename, std::ifstream::in);
    if (!ifs.good())
    {
        cout << filename << " GameConfig::readFromFile ERROR!" << endl;
        exit(-1);
    }
    readFromStream(ifs);
    ifs.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x220(%rbp), %r15
movq %r15, %rdi
movl $0x8, %edx
callq 0x41f0
movq (%r15), %rax
movq -0x18(%rax), %rax
cmpl $0x0, -0x200(%rbp,%rax)
jne 0x6596
leaq -0x220(%rbp), %rsi
movq %rbx, %rdi
callq 0x6364
leaq -0x220(%rbp), %rdi
callq 0x4050
leaq -0x220(%rbp), %rdi
callq 0x4060
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x10a2c(%rip), %rdi     # 0x16fd0
callq 0x4190
movq %rax, %rbx
leaq 0x9aef(%rip), %rsi      # 0x100a2
movl $0x20, %edx
movq %rax, %rdi
callq 0x4190
movq %rbx, %rdi
callq 0x40a0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x41b0
movq %rax, %rbx
leaq -0x220(%rbp), %rdi
callq 0x4060
movq %rbx, %rdi
callq 0x4230
nop
// File: /workspace/github_cpp_makefile_star2_O1/Worthy-Wang[P]Warcraft3-StartWar/TestWarcraft.cpp
// Function: test1()
void test1()
{
    //勇士生命值，攻击力赋值顺序
    vector<WarriorType> initWarriorOrder{DRAGON, NINJA, ICEMAN, LION, WOLF};
    GameConfig::getInstance()->setInitWarriorOrder(initWarriorOrder.begin(), initWarriorOrder.end());
    GameConfig::getInstance()->readFromFile("warcraft.conf");
    GameConfig::getInstance()->print();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movups 0x4728(%rip), %xmm0     # 0x10910
leaq -0x70(%rbp), %rsi
movaps %xmm0, (%rsi)
movl $0x4, 0x10(%rsi)
leaq -0x58(%rbp), %rbx
leaq -0x19(%rbp), %rcx
movl $0x5, %edx
movq %rbx, %rdi
callq 0xca4c
leaq 0xaf46(%rip), %r14      # 0x17158
movq (%r14), %rdi
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
callq 0xca92
movq (%r14), %rbx
leaq -0x30(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x46f1(%rip), %rsi      # 0x10924
leaq 0x46f7(%rip), %rdx      # 0x10931
leaq -0x40(%rbp), %rdi
callq 0x8c3a
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x6526
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0xc264
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x4170
movq (%r14), %rdi
callq 0x65ea
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xc281
movq -0x48(%rbp), %rsi
subq %rdi, %rsi
callq 0x4170
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0xc2ab
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x4170
jmp 0xc2ab
jmp 0xc2a8
movq %rax, %rbx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xc2c0
movq -0x48(%rbp), %rsi
subq %rdi, %rsi
callq 0x4170
movq %rbx, %rdi
callq 0x4230
// File: /workspace/github_cpp_makefile_star2_O1/Worthy-Wang[P]Warcraft3-StartWar/TestWarcraft.cpp
// Function: test2()
void test2()
{
    GameTime::getInstance()->showTime();
    GameTime::getInstance()->updateTime();
    cout << endl;
    GameTime::getInstance()->showTime();
    GameTime::getInstance()->updateTime();
    cout << endl;
    GameTime::getInstance()->showTime();
    GameTime::getInstance()->updateTime();
    cout << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0xae92(%rip), %r14      # 0x17168
movq (%r14), %rdi
callq 0xcae2
movq (%r14), %rax
movq 0x8(%rax), %rcx
addq $0x5, %rcx
cmpq $0x3c, %rcx
jne 0xc2f4
incq (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq 0xacd1(%rip), %rbx      # 0x16fd0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x40f0
movq (%r14), %rdi
callq 0xcae2
movq (%r14), %rax
movq 0x8(%rax), %rcx
addq $0x5, %rcx
cmpq $0x3c, %rcx
jne 0xc344
incq (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x40f0
movq (%r14), %rdi
callq 0xcae2
movq (%r14), %rax
movq 0x8(%rax), %rcx
addq $0x5, %rcx
cmpq $0x3c, %rcx
jne 0xc38d
incq (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x40f0
// File: /workspace/github_cpp_makefile_star2_O1/Worthy-Wang[P]Warcraft3-StartWar/TestWarcraft.cpp
// Function: test3()
void test3()
{
    test1();
    WeaponPtr weapon(new Arrow(DRAGON));
    cout << weapon->getAttackValue() << endl;
    cout << weapon->getName() << endl;
    cout << weapon->getDurability() << endl;
    weapon->decreaseDuribility();
    cout << weapon->getDurability() << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
callq 0xc1d4
movl $0x48, %edi
callq 0x4160
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
callq 0x8910
leaq -0x18(%rbp), %rbx
movq %r14, -0x8(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc066
movq -0x8(%rbx), %rax
movq 0x30(%rax), %rsi
movq 0xabcb(%rip), %rdi      # 0x16fd0
callq 0x40e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x40f0
movq -0x20(%rbp), %rax
leaq -0x30(%rbp), %r14
movq %r14, -0x10(%r14)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
addq %rsi, %rdx
leaq -0x40(%rbp), %rdi
callq 0x5720
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq 0xab6d(%rip), %rdi      # 0x16fd0
callq 0x4190
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x40f0
movq -0x40(%rbp), %rdi
cmpq %r14, %rdi
je 0xc4a7
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x4170
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rsi
movq 0xab1a(%rip), %rdi      # 0x16fd0
callq 0x40e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x40f0
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rsi
decq %rsi
movq %rsi, 0x38(%rax)
movq 0xaad5(%rip), %rdi      # 0x16fd0
callq 0x40e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x40f0
movq -0x18(%rbp), %rdi
testq %rdi, %rdi
je 0xc538
callq 0x57ba
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0xc56f
movq %rax, %rbx
movl $0x48, %esi
movq %r14, %rdi
callq 0x4170
jmp 0xc580
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r14, %rdi
je 0xc572
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x4170
jmp 0xc572
movq %rax, %rbx
movq -0x18(%rbp), %rdi
testq %rdi, %rdi
je 0xc580
callq 0x57ba
movq %rbx, %rdi
callq 0x4230
// File: /workspace/github_cpp_makefile_star2_O1/Worthy-Wang[P]Warcraft3-StartWar/./WarcraftWorld.h
// Function: warcraft::WarcraftWorld::~WarcraftWorld()
~WarcraftWorld()
    {
        if (_red)
            delete _red;
        if (_blue)
            delete _blue;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0xccc4
leaq 0x70(%r14), %rdi
callq 0xcd68
leaq 0x38(%r14), %rdi
callq 0xce1e
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0xccb7
movq 0x30(%r14), %rsi
subq %rdi, %rsi
callq 0x4170
movl $0xa8, %esi
movq %r14, %rdi
callq 0x4170
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0xcd01
leaq 0x70(%r14), %rdi
callq 0xcd68
leaq 0x38(%r14), %rdi
callq 0xce1e
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0xccf4
movq 0x30(%r14), %rsi
subq %rdi, %rsi
callq 0x4170
movl $0xa8, %esi
movq %r14, %rdi
callq 0x4170
addq $0x10, %rbx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xcd12
nop
// File: /workspace/github_cpp_makefile_star2_O1/Worthy-Wang[P]Warcraft3-StartWar/Warrior.cpp
// Function: warcraft::Warrior::attack(std::shared_ptr<warcraft::Warrior>, std::shared_ptr<warcraft::Weapon>)
void Warrior::attack(WarriorPtr enemy, WeaponPtr weapon)
{
    switch (weapon->getType())
    {
    case SWORD:
    {
        enemy->sufferAttack(weapon->getAttackValue());
        break;
    }
    case BOMB:
    {
        enemy->sufferAttack(weapon->getAttackValue());
        if (this->getType() != NINJA)
            this->sufferAttack(weapon->getAttackValue() / 2);
        break;
    }
    case ARROW:
    {
        enemy->sufferAttack(weapon->getAttackValue());
        break;
    }
    }
    weapon->decreaseDuribility();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rdx), %rax
movl 0x8(%rax), %ecx
cmpl $0x2, %ecx
je 0xd0b8
cmpl $0x1, %ecx
je 0xd0c8
testl %ecx, %ecx
jne 0xd0c2
movq (%rsi), %rdi
movq 0x30(%rax), %rcx
subl %ecx, 0x38(%rdi)
decq 0x38(%rax)
popq %rbp
retq
movq (%rsi), %rdx
movq 0x30(%rax), %rcx
subl %ecx, 0x38(%rdx)
cmpl $0x1, 0x3c(%rdi)
je 0xd0c2
shrq %rcx
jmp 0xd0bf
nop
// File: /workspace/github_cpp_makefile_star2_O1/Worthy-Wang[P]Warcraft3-StartWar/Warrior.cpp
// Function: warcraft::Warrior::getNewWeapon(std::shared_ptr<warcraft::Weapon>)
void Warrior::getNewWeapon(WeaponPtr weapon) 
{
    if (!weapon.get())
        return;
    WeaponPtr newWeapon;
    switch (weapon->getType())
    {
        case SWORD:newWeapon.reset(new Sword(_type)); break;
        case BOMB:newWeapon.reset(new Bomb(_type));break;
        case ARROW:newWeapon.reset(new Arrow(_type)); newWeapon->setDurability(weapon->getDurability()); break;
    }
    _weapons.push_back(newWeapon);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq (%rsi), %rax
testq %rax, %rax
je 0xd1b6
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, -0x30(%rbp)
movl 0x8(%rax), %eax
testl %eax, %eax
je 0xd174
cmpl $0x1, %eax
je 0xd14e
cmpl $0x2, %eax
jne 0xd198
movq %rsi, %r14
movl $0x48, %edi
callq 0x4160
movq %rax, %r15
movl 0x3c(%rbx), %esi
movq %rax, %rdi
callq 0x8910
leaq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0x88c2
movq -0x30(%rbp), %rax
movq (%r14), %rcx
movq 0x38(%rcx), %rcx
movq %rcx, 0x38(%rax)
jmp 0xd198
movl $0x40, %edi
callq 0x4160
movq %rax, %r14
movl 0x3c(%rbx), %esi
movq %rax, %rdi
callq 0x86c6
leaq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x8678
jmp 0xd198
movl $0x40, %edi
callq 0x4160
movq %rax, %r14
movl 0x3c(%rbx), %esi
movq %rax, %rdi
callq 0x847c
leaq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x842e
addq $0x40, %rbx
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
callq 0x8fd2
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0xd1b6
callq 0x57ba
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x48, %esi
movq %r15, %rdi
jmp 0xd1db
jmp 0xd1d0
movq %rax, %rbx
movl $0x40, %esi
movq %r14, %rdi
callq 0x4170
jmp 0xd1e5
movq %rax, %rbx
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0xd1f3
callq 0x57ba
movq %rbx, %rdi
callq 0x4230
nop
// File: /workspace/github_cpp_makefile_star2_O1/Worthy-Wang[P]Warcraft3-StartWar/warcraftWorld.cpp
// Function: warcraft::WarcraftWorld::wolfStealing()
void WarcraftWorld::wolfStealing()
{
    for (auto &e : _citys)
    {
        WarriorPtr redWarrior = e->getRedWarrior();
        WarriorPtr blueWarrior = e->getBlueWarrior();
        if (redWarrior.get() && WOLF == redWarrior->getType())
        {
            redWarrior->stealWeapons(blueWarrior);
        }
        if (blueWarrior.get() && WOLF == blueWarrior->getType())
        {
            blueWarrior->stealWeapons(redWarrior);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x10(%rdi), %r15
movq 0x18(%rdi), %rax
movq %rax, -0x50(%rbp)
cmpq %rax, %r15
je 0xe815
movq (%r15), %rax
movq 0x8(%rax), %r14
movq 0x10(%rax), %rbx
testq %rbx, %rbx
je 0xe72d
movq 0x88a9(%rip), %rax      # 0x16fc8
cmpb $0x0, (%rax)
je 0xe729
incl 0x8(%rbx)
jmp 0xe72d
lock
incl 0x8(%rbx)
movq (%r15), %rax
movq 0x18(%rax), %r13
movq 0x20(%rax), %r12
testq %r12, %r12
je 0xe756
movq 0x8884(%rip), %rax      # 0x16fc8
cmpb $0x0, (%rax)
je 0xe750
incl 0x8(%r12)
jmp 0xe756
lock
incl 0x8(%r12)
testq %r14, %r14
je 0xe7a3
cmpl $0x4, 0x3c(%r14)
jne 0xe7a3
movq %r13, -0x48(%rbp)
movq %r12, -0x40(%rbp)
testq %r12, %r12
je 0xe788
movq 0x8852(%rip), %rax      # 0x16fc8
cmpb $0x0, (%rax)
je 0xe782
incl 0x8(%r12)
jmp 0xe788
lock
incl 0x8(%r12)
movq (%r14), %rax
movq %r14, %rdi
leaq -0x48(%rbp), %rsi
callq *0x28(%rax)
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0xe7a3
callq 0x57ba
testq %r13, %r13
je 0xe7ed
cmpl $0x4, 0x3c(%r13)
jne 0xe7ed
movq %r14, -0x38(%rbp)
movq %rbx, -0x30(%rbp)
testq %rbx, %rbx
je 0xe7d1
movq 0x8805(%rip), %rax      # 0x16fc8
cmpb $0x0, (%rax)
je 0xe7cd
incl 0x8(%rbx)
jmp 0xe7d1
lock
incl 0x8(%rbx)
movq (%r13), %rax
movq %r13, %rdi
leaq -0x38(%rbp), %rsi
callq *0x28(%rax)
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0xe7ed
callq 0x57ba
testq %r12, %r12
je 0xe7fa
movq %r12, %rdi
callq 0x57ba
testq %rbx, %rbx
je 0xe807
movq %rbx, %rdi
callq 0x57ba
addq $0x10, %r15
cmpq -0x50(%rbp), %r15
jne 0xe708
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x30(%rbp), %rdi
jmp 0xe834
movq %rax, %r14
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0xe83e
callq 0x57ba
testq %r12, %r12
je 0xe84b
movq %r12, %rdi
callq 0x57ba
testq %rbx, %rbx
je 0xe858
movq %rbx, %rdi
callq 0x57ba
movq %r14, %rdi
callq 0x4230
// File: /workspace/github_cpp_makefile_star2_O1/Worthy-Wang[P]Warcraft3-StartWar/warcraftWorld.cpp
// Function: warcraft::WarcraftWorld::dragonCheer()
void WarcraftWorld::dragonCheer()
{
    for (auto &e : _citys)
    {
        WarriorPtr redWarrior = e->getRedWarrior();
        WarriorPtr blueWarrior = e->getBlueWarrior();
        if (redWarrior.get() && DRAGON == redWarrior->getType())
        {
            redWarrior->cheer();
        }
        if (blueWarrior.get() && DRAGON == blueWarrior->getType())
        {
            blueWarrior->cheer();
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x10(%rdi), %r12
movq 0x18(%rdi), %r13
cmpq %r13, %r12
je 0xe93e
movq (%r12), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rax), %rbx
testq %rbx, %rbx
je 0xe8cd
movq 0x8709(%rip), %rax      # 0x16fc8
cmpb $0x0, (%rax)
je 0xe8c9
incl 0x8(%rbx)
jmp 0xe8cd
lock
incl 0x8(%rbx)
movq (%r12), %rax
movq 0x18(%rax), %r15
movq 0x20(%rax), %r14
testq %r14, %r14
je 0xe8f5
movq 0x86e3(%rip), %rax      # 0x16fc8
cmpb $0x0, (%rax)
je 0xe8f0
incl 0x8(%r14)
jmp 0xe8f5
lock
incl 0x8(%r14)
testq %rdi, %rdi
je 0xe906
cmpl $0x0, 0x3c(%rdi)
jne 0xe906
movq (%rdi), %rax
callq *0x18(%rax)
testq %r15, %r15
je 0xe91b
cmpl $0x0, 0x3c(%r15)
jne 0xe91b
movq (%r15), %rax
movq %r15, %rdi
callq *0x18(%rax)
testq %r14, %r14
je 0xe928
movq %r14, %rdi
callq 0x57ba
testq %rbx, %rbx
je 0xe935
movq %rbx, %rdi
callq 0x57ba
addq $0x10, %r12
jmp 0xe89e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
testq %r14, %r14
je 0xe95d
movq %r14, %rdi
callq 0x57ba
testq %rbx, %rbx
je 0xe96a
movq %rbx, %rdi
callq 0x57ba
movq %r15, %rdi
callq 0x4230
// File: /workspace/github_cpp_makefile_star2_O1/Worthy-Wang[P]Warcraft3-StartWar/warcraftWorld.cpp
// Function: warcraft::WarcraftWorld::occupyHeadquarters()
void WarcraftWorld::occupyHeadquarters()
{
    //蓝方基地
    WarriorPtr redWarrior = _citys[GameConfig::getInstance()->getCityNum(_caseNum) + 1]->getRedWarrior();
    if (redWarrior.get()){
        cout << "blue headquarter was taken" << endl;
        exit(0);
    }
    //红方基地
    WarriorPtr blueWarrior = _citys[0]->getBlueWarrior();
    if (blueWarrior.get())
    {
        cout << "red headquarter was taken" << endl;
        exit(0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x846d(%rip), %rax      # 0x17158
movq (%rax), %rax
movq 0x10(%rdi), %rcx
movq 0x28(%rdi), %rdx
movq 0x18(%rax), %rax
shlq $0x7, %rdx
movq -0x78(%rax,%rdx), %rax
shlq $0x4, %rax
movq 0x10(%rcx,%rax), %rcx
movq 0x8(%rcx), %rax
movq 0x10(%rcx), %rbx
testq %rbx, %rbx
je 0xed2e
movq 0x82a8(%rip), %rcx      # 0x16fc8
cmpb $0x0, (%rcx)
je 0xed2a
incl 0x8(%rbx)
jmp 0xed2e
lock
incl 0x8(%rbx)
testq %rax, %rax
jne 0xed92
movq 0x10(%rdi), %rax
movq (%rax), %rcx
movq 0x18(%rcx), %rax
movq 0x20(%rcx), %r14
testq %r14, %r14
je 0xed5e
movq 0x827a(%rip), %rcx      # 0x16fc8
cmpb $0x0, (%rcx)
je 0xed59
incl 0x8(%r14)
jmp 0xed5e
lock
incl 0x8(%r14)
testq %rax, %rax
jne 0xedb8
testq %r14, %r14
je 0xed70
movq %r14, %rdi
callq 0x57ba
testq %rbx, %rbx
je 0xed87
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x57ba
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x8237(%rip), %rdi      # 0x16fd0
leaq 0x1c3d(%rip), %rsi      # 0x109dd
movl $0x1a, %edx
callq 0x4190
movq 0x821f(%rip), %rdi      # 0x16fd0
callq 0x40a0
jmp 0xeddc
movq 0x8211(%rip), %rdi      # 0x16fd0
leaq 0x1c32(%rip), %rsi      # 0x109f8
movl $0x19, %edx
callq 0x4190
movq 0x81f9(%rip), %rdi      # 0x16fd0
callq 0x40a0
xorl %edi, %edi
callq 0x41b0
movq %rax, %r15
testq %r14, %r14
je 0xedf8
movq %r14, %rdi
callq 0x57ba
jmp 0xedf8
movq %rax, %r15
testq %rbx, %rbx
je 0xee05
movq %rbx, %rdi
callq 0x57ba
movq %r15, %rdi
callq 0x4230
nop
// File: /workspace/github_cpp_makefile_star2_O1/Worthy-Wang[P]Warcraft3-StartWar/warcraftWorld.cpp
// Function: warcraft::WarcraftWorld::headquartersReport()
void WarcraftWorld::headquartersReport()
{
    //红方基地
    cout << _red->getBaseHp() << " elememts in red headquarters" << endl;
    //蓝方基地
    cout << _blue->getBaseHp() << " elememts in blue headquarters" << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rax), %rsi
movq 0x81a7(%rip), %r14      # 0x16fd0
movq %r14, %rdi
callq 0x40e0
movq %rax, %r15
leaq 0x1b65(%rip), %rsi      # 0x109a0
movl $0x1d, %edx
movq %rax, %rdi
callq 0x4190
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x4150
movsbl %al, %esi
movq %r15, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x40f0
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rsi
movq %r14, %rdi
callq 0x40e0
movq %rax, %rbx
leaq 0x1b35(%rip), %rsi      # 0x109be
movl $0x1e, %edx
movq %rax, %rdi
callq 0x4190
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x40f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/dinitctl.cc
// Function: shutdown_dinit(int, cpbuffer<1024u>&, bool)
static int shutdown_dinit(int socknum, cpbuffer_t &rbuffer, bool verbose)
{
    // TODO support no-wait option.
    using std::cout;
    using std::cerr;

    auto m = membuf()
            .append((char)cp_cmd::SHUTDOWN)
            .append(static_cast<char>(shutdown_type_t::HALT));
    write_all_x(socknum, m);

    wait_for_reply(rbuffer, socknum);

    if (rbuffer[0] != (char)cp_rply::ACK) {
        cerr << "dinitctl: control socket protocol error\n";
        return 1;
    }

    if (verbose) {
        std::cout << "Shutting down dinit...\n";
    }

    // Now wait for rollback complete, by waiting for the connection to close:
    try {
        while (true) {
            wait_for_info(rbuffer, socknum);
            rbuffer.consume(rbuffer[1]);
        }
    }
    catch (cp_read_exception &exc) {
        // Assume that the connection closed.
    }

    if (verbose) {
        std::cout << "Connection closed." << std::endl;
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, (%rsp)
movq %rsi, %r14
movl %edi, %ebp
leaq 0x6(%rsp), %r15
movw $0x20a, (%r15)          # imm = 0x20A
movl $0x2, %r13d
xorl %r12d, %r12d
movl %r13d, %edx
movl %ebp, %edi
movq %r15, %rsi
callq 0x4100
cmpl $-0x1, %eax
je 0xb2b4
addl %eax, %r12d
movslq %eax, %rcx
addq %rcx, %r15
subl %eax, %r13d
xorl %ecx, %ecx
jmp 0xb2d4
callq 0x4040
movl $0x2, %ecx
cmpl $0x4, (%rax)
je 0xb2d4
testl %r12d, %r12d
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmovgl %r12d, %ebx
movl $0x1, %ecx
testb $0x1, %cl
jne 0xb2e0
testl %r13d, %r13d
jg 0xb292
jmp 0xb2e3
movl %ebx, %r12d
cmpl $-0x1, %r12d
je 0xb33d
movq %r14, %rdi
movl %ebp, %esi
callq 0xedbd
movl 0x400(%r14), %eax
leal -0x400(%rax), %ecx
cmpl $0x400, %eax            # imm = 0x400
cmovbl %eax, %ecx
cmpb $0x32, (%r14,%rcx)
je 0xb364
movq 0x11cd2(%rip), %rdi     # 0x1cfe8
leaq 0xb421(%rip), %rsi      # 0x1673e
movl $0x28, %edx
callq 0x4330
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x4, %edi
callq 0x4190
movq %rax, %rbx
callq 0x4040
movl (%rax), %eax
movl %eax, (%rbx)
leaq 0x117f6(%rip), %rsi     # 0x1cb50
movq %rbx, %rdi
xorl %edx, %edx
callq 0x44d0
cmpb $0x0, (%rsp)
je 0xb382
movq 0x11c37(%rip), %rdi     # 0x1cfa8
leaq 0xb65e(%rip), %rsi      # 0x169d6
movl $0x17, %edx
callq 0x4330
movl $0x400, %ebx            # imm = 0x400
movq %r14, %rdi
movl %ebp, %esi
callq 0xf709
movl 0x400(%r14), %eax
leal 0x1(%rax), %ecx
leal -0x3ff(%rax), %edx
cmpl %ebx, %ecx
cmovbl %ecx, %edx
movsbl (%r14,%rdx), %ecx
leal (%rax,%rcx), %edx
cmpl %ebx, %edx
leal -0x400(%rax,%rcx), %eax
cmovbl %edx, %eax
movl %eax, 0x400(%r14)
subl %ecx, 0x404(%r14)
jmp 0xb387
movq %rax, %rdi
cmpl $0x1, %edx
jne 0xb410
callq 0x4130
callq 0x44b0
xorl %ebp, %ebp
cmpb $0x0, (%rsp)
je 0xb32c
movq 0x11bb9(%rip), %rbx     # 0x1cfa8
leaq 0xb5f8(%rip), %rsi      # 0x169ee
movl $0x12, %edx
movq %rbx, %rdi
callq 0x4330
movq %rbx, %rdi
callq 0x4180
jmp 0xb32c
callq 0x44f0
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/dinitctl.cc
// Function: trigger_service(int, cpbuffer<1024u>&, char const*, bool)
static int trigger_service(int socknum, cpbuffer_t &rbuffer, const char *service_name, bool trigger_value)
{
    using std::cerr;

    handle_t handle;
    if (!load_service(socknum, rbuffer, service_name, &handle, nullptr, true)) {
        return 1;
    }

    // Issue SET_TRIGGER command.
    {
        auto m = membuf()
                .append((char)cp_cmd::SETTRIGGER)
                .append(handle)
                .append<trigger_val_t>(trigger_value);
        write_all_x(socknum, m);

        wait_for_reply(rbuffer, socknum);
        if (rbuffer[0] == (char)cp_rply::NAK) {
            cerr << "dinitctl: cannot trigger a service that is not of 'triggered' type.\n";
            return 1;
        }
        if (rbuffer[0] != (char)cp_rply::ACK) {
            cerr << "dinitctl: protocol error.\n";
            return 1;
        }
        rbuffer.consume(1);
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r14d
movq %rsi, %rbx
movl %edi, %ebp
xorl %r12d, %r12d
leaq 0xc(%rsp), %rcx
movl $0x1, %r15d
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xd198
testb %al, %al
je 0xbc02
movl 0xc(%rsp), %eax
shlq $0x8, %rax
leaq 0x13(%rax), %rcx
movzbl %r14b, %edx
shlq $0x28, %rdx
movabsq $0xff00000000, %rsi     # imm = 0xFF00000000
andq %rax, %rsi
orq %rdx, %rsi
leaq 0x10(%rsp), %r14
movl %ecx, (%r14)
shrq $0x20, %rsi
movw %si, 0x4(%r14)
movl $0x6, %r15d
movl %r15d, %edx
movl %ebp, %edi
movq %r14, %rsi
callq 0x4100
cmpl $-0x1, %eax
je 0xbb4e
addl %eax, %r12d
movslq %eax, %rcx
addq %rcx, %r14
subl %eax, %r15d
xorl %ecx, %ecx
jmp 0xbb6f
callq 0x4040
movl $0x2, %ecx
cmpl $0x4, (%rax)
je 0xbb6f
testl %r12d, %r12d
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
cmovgl %r12d, %r13d
movl $0x1, %ecx
testb $0x1, %cl
jne 0xbb7b
testl %r15d, %r15d
jg 0xbb2c
jmp 0xbb7e
movl %r13d, %r12d
cmpl $-0x1, %r12d
je 0xbc14
movq %rbx, %rdi
movl %ebp, %esi
callq 0xedbd
movl 0x400(%rbx), %eax
leal -0x400(%rax), %ecx
cmpl $0x400, %eax            # imm = 0x400
cmovbl %eax, %ecx
movzbl (%rbx,%rcx), %ecx
cmpl $0x32, %ecx
je 0xbbc9
movq 0x11432(%rip), %rdi     # 0x1cfe8
cmpl $0x33, %ecx
jne 0xbbeb
leaq 0xb5fd(%rip), %rsi      # 0x171bf
movl $0x44, %edx
jmp 0xbbf7
leal 0x1(%rax), %ecx
addl $0xfffffc01, %eax       # imm = 0xFFFFFC01
cmpl $0x400, %ecx            # imm = 0x400
cmovbl %ecx, %eax
movl %eax, 0x400(%rbx)
decl 0x404(%rbx)
xorl %r15d, %r15d
jmp 0xbc02
leaq 0xa580(%rip), %rsi      # 0x16172
movl $0x1a, %edx
callq 0x4330
movl $0x1, %r15d
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x4, %edi
callq 0x4190
movq %rax, %rbx
callq 0x4040
movl (%rax), %eax
movl %eax, (%rbx)
leaq 0x10f1f(%rip), %rsi     # 0x1cb50
movq %rbx, %rdi
xorl %edx, %edx
callq 0x44d0