// File: 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
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
callq 0x42e0
testb $0x1, %al
jne 0x8d67
jmp 0x8f7f
callq 0x9390
leaq -0x90(%rbp), %rdi
callq 0x93b0
movq -0x10(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x4270
jmp 0x8d8a
movq -0x10(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x4270
jmp 0x8d9c
movq -0x10(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x4270
jmp 0x8dae
movq -0x10(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x4270
jmp 0x8dbd
movq -0x10(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x4270
jmp 0x8dcc
movq $0x0, -0xb0(%rbp)
movq -0xc0(%rbp), %rdi
movq -0xb0(%rbp), %rax
movq %rax, -0xc8(%rbp)
callq 0x93e0
movq %rax, %rcx
movq -0xc8(%rbp), %rax
cmpq %rcx, %rax
jae 0x8ea4
movq -0x10(%rbp), %rax
movq %rax, -0xe0(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0xd8(%rbp)
callq 0x94e0
movq %rax, -0xd0(%rbp)
jmp 0x8e28
movq -0xd0(%rbp), %rdi
movq -0xb0(%rbp), %rsi
callq 0x94f0
movq -0xd8(%rbp), %rdi
movq %rax, %rsi
callq 0x9400
movq %rax, -0xe8(%rbp)
jmp 0x8e53
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rdi
callq 0x4270
jmp 0x8e68
jmp 0x8e6a
movq -0xb0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xb0(%rbp)
jmp 0x8dd7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x9540
jmp 0x8f88
movq $0x0, -0xb8(%rbp)
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rax
movq %rax, -0xf0(%rbp)
callq 0x93e0
movq %rax, %rcx
movq -0xf0(%rbp), %rax
cmpq %rcx, %rax
jae 0x8f55
movq -0x10(%rbp), %rax
movq %rax, -0x108(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x100(%rbp)
callq 0x94e0
movq %rax, -0xf8(%rbp)
jmp 0x8efc
movq -0xf8(%rbp), %rdi
movq -0xb8(%rbp), %rsi
callq 0x94f0
movq -0x100(%rbp), %rdi
movq %rax, %rsi
callq 0x9400
movq %rax, -0x110(%rbp)
jmp 0x8f27
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdi
callq 0x4270
jmp 0x8f3c
jmp 0x8f3e
movq -0xb8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xb8(%rbp)
jmp 0x8eaf
movq -0xc0(%rbp), %rdi
addq $0x18, %rdi
leaq -0x90(%rbp), %rsi
callq 0x9510
jmp 0x8f6e
leaq -0x90(%rbp), %rdi
callq 0x9540
jmp 0x8d4e
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0xa0(%rbp), %rdi
callq 0x4300
nopw %cs:(%rax,%rax)