// File: /workspace/github_cpp_makefile_star2_O2/Worthy-Wang[P]Warcraft3-StartWar/warcraftWorld.cpp
// Function: warcraft::WarcraftWorld::warriorMarch()
void WarcraftWorld::warriorMarch()
{
    //让基地中，城市中的武士依次前进
    /***************************红武士*************************************/
    for (int i = GameConfig::getInstance()->getCityNum(_caseNum); i >= 0; i--)
    {
        WarriorPtr redWarrior = _citys[i]->getRedWarrior();
        //如果还活着，则前往下一个城市，如果是到达司令部，则在后面的事件中输出
        if (redWarrior.get())
        {
            redWarrior->march();
            _citys[redWarrior->getCityId()]->attach(redWarrior);
            //没有走到司令部，则输出事件
            if (redWarrior->getCityId() != (GameConfig::getInstance()->getCityNum(_caseNum) + 1))
                cout << "red " << redWarrior->getName() << " " << redWarrior->getId() << " marched to city " << redWarrior->getCityId() << " with " << redWarrior->getHp() << " elements and force " << GameConfig::getInstance()->getInitWarriorAttack(_caseNum, redWarrior->getType()) << endl;
        }
    }

    /***************************蓝武士*************************************/
    for (size_t i = 1; i <= GameConfig::getInstance()->getCityNum(_caseNum) + 1; i++)
    {
        WarriorPtr blueWarrior = _citys[i]->getBlueWarrior();
        //如果还活着，则前往下一个城市，如果是到达司令部，则在后面的事件中输出
        if (blueWarrior.get())
        {
            blueWarrior->march();
            _citys[blueWarrior->getCityId()]->attach(blueWarrior);
            //没有走到司令部，则输出事件
            if (blueWarrior->getCityId() != (GameConfig::getInstance()->getCityNum(_caseNum) + 1))
                cout << "blue " << blueWarrior->getName() << " " << blueWarrior->getId() << " marched to city " << blueWarrior->getCityId() << " with " << blueWarrior->getHp() << " elements and force " << GameConfig::getInstance()->getInitWarriorAttack(_caseNum, blueWarrior->getType()) << endl;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
leaq 0x9b3d(%rip), %rax      # 0x16168
movq (%rax), %rax
movq 0x28(%rdi), %rcx
movq 0x18(%rax), %rax
shlq $0x7, %rcx
movl -0x78(%rax,%rcx), %r15d
leaq -0x80(%rbp), %r12
testl %r15d, %r15d
js 0xc7c7
movl %r15d, %eax
movq 0x10(%rbx), %rcx
shlq $0x4, %rax
movq (%rcx,%rax), %rsi
addq $0x8, %rsi
leaq -0x38(%rbp), %rdi
callq 0x5392
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xc7b6
movq (%rdi), %rax
callq *0x10(%rax)
movq -0x38(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x10(%rbx), %rcx
shlq $0x4, %rax
movq (%rcx,%rax), %r14
leaq -0x60(%rbp), %r13
movq %r13, %rdi
leaq -0x38(%rbp), %rsi
callq 0x5392
movq %r14, %rdi
movq %r13, %rsi
callq 0xb60a
leaq -0x58(%rbp), %rdi
callq 0x5302
movq -0x38(%rbp), %rax
leaq 0x9aaa(%rip), %rcx      # 0x16168
movq (%rcx), %rcx
movq 0x28(%rbx), %rdx
movq 0x18(%rcx), %rcx
shlq $0x7, %rdx
movq -0x78(%rcx,%rdx), %rcx
incq %rcx
cmpq %rcx, 0x58(%rax)
je 0xc7b6
movq 0x98ea(%rip), %rdi      # 0x15fd0
leaq 0x1940(%rip), %rsi      # 0xe02d
callq 0x4160
movq %rax, %r14
movq -0x38(%rbp), %rsi
addq $0x10, %rsi
movq %r12, %r13
movq %r12, %rdi
callq 0x41d0
movq %r14, %rdi
movq %r13, %rsi
callq 0x4150
movq %rax, %rdi
leaq 0x2346(%rip), %rsi      # 0xea63
callq 0x4160
movq -0x38(%rbp), %rcx
movq 0x30(%rcx), %rsi
movq %rax, %rdi
callq 0x40f0
movq %rax, %rdi
leaq 0x22e4(%rip), %rsi      # 0xea20
callq 0x4160
movq -0x38(%rbp), %rcx
movq 0x58(%rcx), %rsi
movq %rax, %rdi
callq 0x40f0
movq %rax, %rdi
leaq 0x22be(%rip), %rsi      # 0xea19
callq 0x4160
movq -0x38(%rbp), %rcx
movl 0x38(%rcx), %esi
movq %rax, %rdi
callq 0x4240
movq %rax, %rdi
leaq 0x2272(%rip), %rsi      # 0xe9eb
callq 0x4160
movq %rax, %r14
leaq 0x99e0(%rip), %rax      # 0x16168
movq (%rax), %rdi
movq 0x28(%rbx), %rsi
movq -0x38(%rbp), %rax
movl 0x3c(%rax), %edx
callq 0x9778
movq %r14, %rdi
movq %rax, %rsi
callq 0x40f0
movq %rax, %rdi
callq 0x40b0
movq %r12, %rdi
callq 0x40a0
leaq -0x30(%rbp), %rdi
callq 0x5302
decl %r15d
jmp 0xc643
pushq $0x1
popq %r13
pushq $0x10
popq %r15
leaq -0x80(%rbp), %r12
leaq 0x998e(%rip), %rax      # 0x16168
movq (%rax), %rax
movq 0x28(%rbx), %rcx
movq 0x18(%rax), %rax
shlq $0x7, %rcx
movq -0x78(%rax,%rcx), %rax
incq %rax
cmpq %rax, %r13
ja 0xc986
movq 0x10(%rbx), %rax
movq (%rax,%r15), %rsi
addq $0x18, %rsi
leaq -0x38(%rbp), %rdi
callq 0x5392
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xc971
movq (%rdi), %rax
callq *0x10(%rax)
movq %r13, %r14
movq %r15, %r13
movq %r12, %r15
movq -0x38(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x10(%rbx), %rcx
shlq $0x4, %rax
movq (%rcx,%rax), %rax
movq %rax, -0x40(%rbp)
leaq -0x50(%rbp), %r12
movq %r12, %rdi
leaq -0x38(%rbp), %rsi
callq 0x5392
movq -0x40(%rbp), %rdi
movq %r12, %rsi
callq 0xb60a
leaq -0x48(%rbp), %rdi
callq 0x5302
movq -0x38(%rbp), %rax
leaq 0x98f5(%rip), %rcx      # 0x16168
movq (%rcx), %rcx
movq 0x28(%rbx), %rdx
movq 0x18(%rcx), %rcx
shlq $0x7, %rdx
movq -0x78(%rcx,%rdx), %rcx
incq %rcx
cmpq %rcx, 0x58(%rax)
movq %r15, %r12
movq %r13, %r15
movq %r14, %r13
je 0xc971
movq 0x972c(%rip), %rdi      # 0x15fd0
leaq 0x178c(%rip), %rsi      # 0xe037
callq 0x4160
movq %rax, %r14
movq -0x38(%rbp), %rsi
addq $0x10, %rsi
movq %r12, %rdi
callq 0x41d0
movq %r14, %rdi
movq %r12, %rsi
callq 0x4150
movq %rax, %rdi
leaq 0x218b(%rip), %rsi      # 0xea63
callq 0x4160
movq -0x38(%rbp), %rcx
movq 0x30(%rcx), %rsi
movq %rax, %rdi
callq 0x40f0
movq %rax, %rdi
leaq 0x2129(%rip), %rsi      # 0xea20
callq 0x4160
movq -0x38(%rbp), %rcx
movq 0x58(%rcx), %rsi
movq %rax, %rdi
callq 0x40f0
movq %rax, %rdi
leaq 0x2103(%rip), %rsi      # 0xea19
callq 0x4160
movq -0x38(%rbp), %rcx
movl 0x38(%rcx), %esi
movq %rax, %rdi
callq 0x4240
movq %rax, %rdi
leaq 0x20b7(%rip), %rsi      # 0xe9eb
callq 0x4160
movq %rax, %r14
leaq 0x9825(%rip), %rax      # 0x16168
movq (%rax), %rdi
movq 0x28(%rbx), %rsi
movq -0x38(%rbp), %rax
movl 0x3c(%rax), %edx
callq 0x9778
movq %r14, %rdi
movq %rax, %rsi
callq 0x40f0
movq %rax, %rdi
callq 0x40b0
movq %r12, %rdi
callq 0x40a0
leaq -0x30(%rbp), %rdi
callq 0x5302
incq %r13
addq $0x10, %r15
jmp 0xc7d3
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc9b2
jmp 0xc9b2
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
jmp 0xc9a9
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x5302
jmp 0xc9c5
jmp 0xc9b2
movq %rax, %rbx
jmp 0xc9c5
jmp 0xc9b9
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x40a0
leaq -0x30(%rbp), %rdi
callq 0x5302
movq %rbx, %rdi
callq 0x4250