// File: /workspace/github_cpp_makefile_star2_O1/Worthy-Wang[P]Warcraft3-StartWar/warcraftWorld.cpp
// Function: warcraft::WarcraftWorld::startGame()
void WarcraftWorld::startGame()
{
    size_t deadline = GameConfig::getInstance()->getDeadline(_caseNum);
    while (GameTime::getInstance()->getTime() < deadline)
    {
        //1):武士降生
        GameTime::getInstance()->showTime();
        createAndShow(_red);
        createAndShow(_blue);
        GameTime::getInstance()->updateTime();

        //2):Lion逃跑
        GameTime::getInstance()->showTime();
        lionRun();
        GameTime::getInstance()->updateTime();

        //3):武士前进到某一城市
        GameTime::getInstance()->showTime();
        warriorMarch();
        GameTime::getInstance()->updateTime();

        //4):wolf抢敌人的武器
        GameTime::getInstance()->showTime();
        wolfStealing();
        GameTime::getInstance()->updateTime();

        //5):进行战斗并报告战斗情况
        GameTime::getInstance()->showTime();
        startFight();
        GameTime::getInstance()->updateTime();

        //6):龙开始欢呼
        GameTime::getInstance()->showTime();
        dragonCheer();
        GameTime::getInstance()->updateTime();

        //7):武士抵达敌方司令部
        GameTime::getInstance()->showTime();
        warriorArriveHeadquarters();
        GameTime::getInstance()->updateTime();

        //8):司令部被占领
        GameTime::getInstance()->showTime();
        occupyHeadquarters();
        GameTime::getInstance()->updateTime();

        //9):司令部报告生命元数量
        GameTime::getInstance()->showTime();
        headquartersReport();
        GameTime::getInstance()->updateTime();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x9f44(%rip), %rax      # 0x17158
movq (%rax), %rax
movq 0x28(%rdi), %rcx
movq 0x18(%rax), %rax
shlq $0x7, %rcx
leaq 0x9f3e(%rip), %r14      # 0x17168
movq (%r14), %rdi
imulq $0x3c, (%rdi), %rdx
movq -0x68(%rax,%rcx), %r15
addq 0x8(%rdi), %rdx
cmpq %r15, %rdx
jae 0xd3d9
callq 0xcae2
movq (%rbx), %rsi
movq %rbx, %rdi
callq 0xd3e8
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
callq 0xd3e8
movq (%r14), %rdi
movq 0x8(%rdi), %rax
addq $0x5, %rax
cmpq $0x3c, %rax
jne 0xd275
incq (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
callq 0xcae2
movq %rbx, %rdi
callq 0xdf50
movq (%r14), %rdi
movq 0x8(%rdi), %rax
addq $0x5, %rax
cmpq $0x3c, %rax
jne 0xd29c
incq (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
callq 0xcae2
movq %rbx, %rdi
callq 0xe1b6
movq (%r14), %rdi
movq 0x8(%rdi), %rax
addq $0x5, %rax
cmpq $0x3c, %rax
jne 0xd2c3
incq (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
callq 0xcae2
movq %rbx, %rdi
callq 0xe6e2
movq (%r14), %rdi
movq 0x8(%rdi), %rax
addq $0x5, %rax
cmpq $0x3c, %rax
jne 0xd2ea
incq (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
callq 0xcae2
movq 0x10(%rbx), %r12
movq 0x18(%rbx), %r13
cmpq %r13, %r12
je 0xd30f
movq (%r12), %rdi
callq 0x4638
addq $0x10, %r12
jmp 0xd2fb
movq (%r14), %rdi
movq 0x8(%rdi), %rax
addq $0x5, %rax
cmpq $0x3c, %rax
jne 0xd325
incq (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
callq 0xcae2
movq %rbx, %rdi
callq 0xe888
movq (%r14), %rdi
movq 0x8(%rdi), %rax
addq $0x5, %rax
cmpq $0x3c, %rax
jne 0xd34c
incq (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
callq 0xcae2
movq %rbx, %rdi
callq 0xe972
movq (%r14), %rdi
movq 0x8(%rdi), %rax
addq $0x5, %rax
cmpq $0x3c, %rax
jne 0xd373
incq (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
callq 0xcae2
movq %rbx, %rdi
callq 0xecda
movq (%r14), %rdi
movq 0x8(%rdi), %rax
addq $0x5, %rax
cmpq $0x3c, %rax
jne 0xd39a
incq (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
callq 0xcae2
movq %rbx, %rdi
callq 0xee0e
movq (%r14), %rax
movq 0x8(%rax), %rcx
addq $0x5, %rcx
cmpq $0x3c, %rcx
jne 0xd3c1
incq (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq (%r14), %rdi
imulq $0x3c, (%rdi), %rax
addq 0x8(%rdi), %rax
cmpq %r15, %rax
jb 0xd243
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq