// File: /workspace/github_cpp_makefile_star2_O3/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 0x9fcc(%rip), %rax      # 0x17158
movq (%rax), %rax
movq 0x28(%rdi), %rcx
movq 0x18(%rax), %rax
shlq $0x7, %rcx
leaq 0x9fc6(%rip), %r14      # 0x17168
movq (%r14), %rdi
imulq $0x3c, (%rdi), %rdx
movq -0x68(%rax,%rcx), %r15
addq 0x8(%rdi), %rdx
cmpq %r15, %rdx
jae 0xd353
callq 0xca98
movq (%rbx), %rsi
movq %rbx, %rdi
callq 0xd362
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
callq 0xd362
movq (%r14), %rdi
movq 0x8(%rdi), %rax
addq $0x5, %rax
cmpq $0x3c, %rax
jne 0xd1ed
incq (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
callq 0xca98
movq %rbx, %rdi
callq 0xded4
movq (%r14), %rdi
movq 0x8(%rdi), %rax
addq $0x5, %rax
cmpq $0x3c, %rax
jne 0xd214
incq (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
callq 0xca98
movq %rbx, %rdi
callq 0xe13a
movq (%r14), %rdi
movq 0x8(%rdi), %rax
addq $0x5, %rax
cmpq $0x3c, %rax
jne 0xd23b
incq (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
callq 0xca98
movq %rbx, %rdi
callq 0xe698
movq (%r14), %rdi
movq 0x8(%rdi), %rax
addq $0x5, %rax
cmpq $0x3c, %rax
jne 0xd262
incq (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
callq 0xca98
movq 0x10(%rbx), %r12
movq 0x18(%rbx), %r13
cmpq %r13, %r12
je 0xd287
movq (%r12), %rdi
callq 0x4618
addq $0x10, %r12
jmp 0xd273
movq (%r14), %rdi
movq 0x8(%rdi), %rax
addq $0x5, %rax
cmpq $0x3c, %rax
jne 0xd29d
incq (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
callq 0xca98
movq %rbx, %rdi
callq 0xe83e
movq (%r14), %rdi
movq 0x8(%rdi), %rax
addq $0x5, %rax
cmpq $0x3c, %rax
jne 0xd2c4
incq (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
callq 0xca98
movq %rbx, %rdi
callq 0xe928
movq (%r14), %rdi
movq 0x8(%rdi), %rax
addq $0x5, %rax
cmpq $0x3c, %rax
jne 0xd2eb
incq (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
callq 0xca98
movq %rbx, %rdi
callq 0xec90
movq (%r14), %rdi
movq 0x8(%rdi), %rax
addq $0x5, %rax
cmpq $0x3c, %rax
jne 0xd312
incq (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
callq 0xca98
movq %rbx, %rdi
callq 0xedc6
movq (%r14), %rdi
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
addq $0x5, %rcx
cmpq $0x3c, %rcx
jne 0xd33f
incq %rax
movq %rax, (%rdi)
xorl %ecx, %ecx
movq %rcx, 0x8(%rdi)
imulq $0x3c, %rax, %rax
addq %rcx, %rax
cmpq %r15, %rax
jb 0xd1bb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq