// File: 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
subq $0x240, %rsp            # imm = 0x240
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xb0(%rbp)
callq 0x94e0
movq %rax, %rdi
movq -0xb0(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0xe480
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0x1ac5a
movq -0xb0(%rbp), %rdi
addq $0x10, %rdi
movslq -0xc(%rbp), %rsi
callq 0x1c210
movq %rax, %rdi
callq 0x1c230
movq %rax, %rsi
leaq -0x20(%rbp), %rdi
callq 0x1c250
leaq -0x20(%rbp), %rdi
callq 0x5d90
cmpq $0x0, %rax
je 0x1ac35
leaq -0x20(%rbp), %rdi
callq 0x5db0
movq %rax, %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
jmp 0x1a921
movq -0xb0(%rbp), %rax
addq $0x10, %rax
movq %rax, -0xc0(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x5db0
movq %rax, %rdi
callq 0x6240
movq %rax, -0xb8(%rbp)
jmp 0x1a94d
movq -0xb8(%rbp), %rsi
movq -0xc0(%rbp), %rdi
callq 0x1c210
movq %rax, %rdi
callq 0x1c230
movq %rax, -0xd0(%rbp)
leaq -0x40(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
leaq -0x20(%rbp), %rsi
callq 0x6640
movq -0xd0(%rbp), %rdi
movq -0xc8(%rbp), %rsi
callq 0x17d80
jmp 0x1a998
leaq -0x40(%rbp), %rdi
callq 0x6670
leaq -0x20(%rbp), %rdi
callq 0x5db0
movq %rax, %rdi
callq 0x6240
movq %rax, -0xd8(%rbp)
jmp 0x1a9bb
callq 0x94e0
movq %rax, -0xe0(%rbp)
jmp 0x1a9c9
movq -0xe0(%rbp), %rdi
movq -0xb0(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0xe480
movq %rax, -0xe8(%rbp)
jmp 0x1a9e9
movq -0xd8(%rbp), %rax
movq -0xe8(%rbp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
je 0x1ac33
movq 0x125c5(%rip), %rdi     # 0x2cfd0
leaq 0x360f(%rip), %rsi      # 0x1e021
callq 0x4180
movq %rax, -0xf0(%rbp)
jmp 0x1aa20
leaq -0x20(%rbp), %rdi
callq 0x5db0
movq %rax, %rsi
leaq -0x60(%rbp), %rdi
callq 0x61f0
jmp 0x1aa37
movq -0xf0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x4170
movq %rax, -0xf8(%rbp)
jmp 0x1aa50
movq -0xf8(%rbp), %rdi
leaq 0x401d(%rip), %rsi      # 0x1ea7b
callq 0x4180
movq %rax, -0x100(%rbp)
jmp 0x1aa6c
leaq -0x20(%rbp), %rdi
callq 0x5db0
movq %rax, %rdi
callq 0x6220
movq %rax, -0x108(%rbp)
jmp 0x1aa86
movq -0x108(%rbp), %rsi
movq -0x100(%rbp), %rdi
callq 0x4060
movq %rax, -0x110(%rbp)
jmp 0x1aaa2
movq -0x110(%rbp), %rdi
leaq 0x3f88(%rip), %rsi      # 0x1ea38
callq 0x4180
movq %rax, -0x118(%rbp)
jmp 0x1aabe
leaq -0x20(%rbp), %rdi
callq 0x5db0
movq %rax, %rdi
callq 0x6240
movq %rax, -0x120(%rbp)
jmp 0x1aad8
movq -0x120(%rbp), %rsi
movq -0x118(%rbp), %rdi
callq 0x4060
movq %rax, -0x128(%rbp)
jmp 0x1aaf4
movq -0x128(%rbp), %rdi
leaq 0x3f2f(%rip), %rsi      # 0x1ea31
callq 0x4180
movq %rax, -0x130(%rbp)
jmp 0x1ab10
leaq -0x20(%rbp), %rdi
callq 0x5db0
movq %rax, %rdi
callq 0x6440
movl %eax, -0x134(%rbp)
jmp 0x1ab29
movl -0x134(%rbp), %esi
movq -0x130(%rbp), %rdi
callq 0x42f0
movq %rax, -0x140(%rbp)
jmp 0x1ab44
movq -0x140(%rbp), %rdi
leaq 0x3eb1(%rip), %rsi      # 0x1ea03
callq 0x4180
movq %rax, -0x148(%rbp)
jmp 0x1ab60
callq 0x94e0
movq %rax, -0x150(%rbp)
jmp 0x1ab6e
movq -0xb0(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x160(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x5db0
movq %rax, %rdi
callq 0xebc0
movl %eax, -0x154(%rbp)
jmp 0x1ab99
movl -0x154(%rbp), %edx
movq -0x160(%rbp), %rsi
movq -0x150(%rbp), %rdi
callq 0x11bf0
movq %rax, -0x168(%rbp)
jmp 0x1abbb
movq -0x168(%rbp), %rsi
movq -0x148(%rbp), %rdi
callq 0x4060
movq %rax, -0x170(%rbp)
jmp 0x1abd7
movq -0x170(%rbp), %rdi
movq 0x123d3(%rip), %rsi     # 0x2cfb8
callq 0x41c0
jmp 0x1abec
leaq -0x60(%rbp), %rdi
callq 0x40f0
jmp 0x1ac33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1ac4c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x6670
jmp 0x1ac4c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x40f0
jmp 0x1ac4c
jmp 0x1ac35
leaq -0x20(%rbp), %rdi
callq 0x6670
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1a8c5
leaq -0x20(%rbp), %rdi
callq 0x6670
jmp 0x1b045
movq $0x1, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x178(%rbp)
callq 0x94e0
movq %rax, %rdi
movq -0xb0(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0xe480
movq %rax, %rcx
movq -0x178(%rbp), %rax
addq $0x1, %rcx
cmpq %rcx, %rax
ja 0x1b03c
movq -0xb0(%rbp), %rdi
addq $0x10, %rdi
movq -0x68(%rbp), %rsi
callq 0x1c210
movq %rax, %rdi
callq 0x1c230
movq %rax, %rsi
leaq -0x78(%rbp), %rdi
callq 0x1c280
leaq -0x78(%rbp), %rdi
callq 0x5d90
cmpq $0x0, %rax
je 0x1b017
leaq -0x78(%rbp), %rdi
callq 0x5db0
movq %rax, %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
jmp 0x1acee
movq -0xb0(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x188(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x5db0
movq %rax, %rdi
callq 0x6240
movq %rax, -0x180(%rbp)
jmp 0x1ad1a
movq -0x180(%rbp), %rsi
movq -0x188(%rbp), %rdi
callq 0x1c210
movq %rax, %rdi
callq 0x1c230
movq %rax, -0x198(%rbp)
leaq -0x88(%rbp), %rdi
movq %rdi, -0x190(%rbp)
leaq -0x78(%rbp), %rsi
callq 0x6640
movq -0x198(%rbp), %rdi
movq -0x190(%rbp), %rsi
callq 0x17d80
jmp 0x1ad68
leaq -0x88(%rbp), %rdi
callq 0x6670
leaq -0x78(%rbp), %rdi
callq 0x5db0
movq %rax, %rdi
callq 0x6240
movq %rax, -0x1a0(%rbp)
jmp 0x1ad8e
callq 0x94e0
movq %rax, -0x1a8(%rbp)
jmp 0x1ad9c
movq -0x1a8(%rbp), %rdi
movq -0xb0(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0xe480
movq %rax, -0x1b0(%rbp)
jmp 0x1adbc
movq -0x1a0(%rbp), %rax
movq -0x1b0(%rbp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
je 0x1b015
movq 0x121f2(%rip), %rdi     # 0x2cfd0
leaq 0x3246(%rip), %rsi      # 0x1e02b
callq 0x4180
movq %rax, -0x1b8(%rbp)
jmp 0x1adf3
leaq -0x78(%rbp), %rdi
callq 0x5db0
movq %rax, %rsi
leaq -0xa8(%rbp), %rdi
callq 0x61f0
jmp 0x1ae0d
movq -0x1b8(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x4170
movq %rax, -0x1c0(%rbp)
jmp 0x1ae29
movq -0x1c0(%rbp), %rdi
leaq 0x3c44(%rip), %rsi      # 0x1ea7b
callq 0x4180
movq %rax, -0x1c8(%rbp)
jmp 0x1ae45
leaq -0x78(%rbp), %rdi
callq 0x5db0
movq %rax, %rdi
callq 0x6220
movq %rax, -0x1d0(%rbp)
jmp 0x1ae5f
movq -0x1d0(%rbp), %rsi
movq -0x1c8(%rbp), %rdi
callq 0x4060
movq %rax, -0x1d8(%rbp)
jmp 0x1ae7b
movq -0x1d8(%rbp), %rdi
leaq 0x3baf(%rip), %rsi      # 0x1ea38
callq 0x4180
movq %rax, -0x1e0(%rbp)
jmp 0x1ae97
leaq -0x78(%rbp), %rdi
callq 0x5db0
movq %rax, %rdi
callq 0x6240
movq %rax, -0x1e8(%rbp)
jmp 0x1aeb1
movq -0x1e8(%rbp), %rsi
movq -0x1e0(%rbp), %rdi
callq 0x4060
movq %rax, -0x1f0(%rbp)
jmp 0x1aecd
movq -0x1f0(%rbp), %rdi
leaq 0x3b56(%rip), %rsi      # 0x1ea31
callq 0x4180
movq %rax, -0x1f8(%rbp)
jmp 0x1aee9
leaq -0x78(%rbp), %rdi
callq 0x5db0
movq %rax, %rdi
callq 0x6440
movl %eax, -0x1fc(%rbp)
jmp 0x1af02
movl -0x1fc(%rbp), %esi
movq -0x1f8(%rbp), %rdi
callq 0x42f0
movq %rax, -0x208(%rbp)
jmp 0x1af1d
movq -0x208(%rbp), %rdi
leaq 0x3ad8(%rip), %rsi      # 0x1ea03
callq 0x4180
movq %rax, -0x210(%rbp)
jmp 0x1af39
callq 0x94e0
movq %rax, -0x218(%rbp)
jmp 0x1af47
movq -0xb0(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x228(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x5db0
movq %rax, %rdi
callq 0xebc0
movl %eax, -0x21c(%rbp)
jmp 0x1af72
movl -0x21c(%rbp), %edx
movq -0x228(%rbp), %rsi
movq -0x218(%rbp), %rdi
callq 0x11bf0
movq %rax, -0x230(%rbp)
jmp 0x1af94
movq -0x230(%rbp), %rsi
movq -0x210(%rbp), %rdi
callq 0x4060
movq %rax, -0x238(%rbp)
jmp 0x1afb0
movq -0x238(%rbp), %rdi
movq 0x11ffa(%rip), %rsi     # 0x2cfb8
callq 0x41c0
jmp 0x1afc5
leaq -0xa8(%rbp), %rdi
callq 0x40f0
jmp 0x1b015
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1b031
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x6670
jmp 0x1b031
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x40f0
jmp 0x1b031
jmp 0x1b017
leaq -0x78(%rbp), %rdi
callq 0x6670
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x1ac62
leaq -0x78(%rbp), %rdi
callq 0x6670
jmp 0x1b045
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x4300
nop