// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/Trainer.cpp
// Function: Trainer::ReadConfigFile()
void Trainer::ReadConfigFile() {
  //读取配置文件
  char train_file[128];
  sprintf(train_file, "./%s", PlayerParam::instance().trainDataFile().c_str());

  ifstream fin(train_file);

  if (!fin.is_open()) {
    std::cerr << __FILE__ << ':' << __LINE__ << ':'
              << " ERROR: failed to open train data file " << std::endl;
  }
  string conf, section;
  vector<string> content;
  while (getline(fin, conf)) {
    if (conf[0] == '[') {
      if (!content.empty())
        Parse(section, content);

      section = conf.substr(1, conf.rfind(']') - 1); // new section
      content.clear();
    } else if (conf[0] != '#' && (!conf.empty())) {
      content.push_back(conf);
    }
  }

  Parse(section, content);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x390, %rsp            # imm = 0x390
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x340(%rbp)
callq 0x798a0
movq %rax, %rdi
callq 0x98140
movq %rax, %rdi
callq 0xa240
movq %rax, %rdx
leaq 0x32111(%rip), %rsi     # 0xc4fba
xorl %eax, %eax
leaq -0x90(%rbp), %rdi
movq %rdi, -0x338(%rbp)
callq 0xa130
movq -0x338(%rbp), %rsi
leaq -0x298(%rbp), %rdi
movq %rdi, -0x330(%rbp)
movl $0x8, %edx
callq 0xab00
movq -0x330(%rbp), %rdi
callq 0xa970
movb %al, -0x321(%rbp)
jmp 0x92ef1
movb -0x321(%rbp), %al
testb $0x1, %al
jne 0x92fb5
jmp 0x92f01
movq 0x6b0e8(%rip), %rdi     # 0xfdff0
leaq 0x31f8a(%rip), %rsi     # 0xc4e99
callq 0xa5a0
movq %rax, -0x348(%rbp)
jmp 0x92f1d
movq -0x348(%rbp), %rdi
movl $0x3a, %esi
callq 0xa6e0
movq %rax, -0x350(%rbp)
jmp 0x92f37
movq -0x350(%rbp), %rdi
movl $0x1da, %esi            # imm = 0x1DA
callq 0xaa40
movq %rax, -0x358(%rbp)
jmp 0x92f51
movq -0x358(%rbp), %rdi
movl $0x3a, %esi
callq 0xa6e0
movq %rax, -0x360(%rbp)
jmp 0x92f6b
movq -0x360(%rbp), %rdi
leaq 0x32046(%rip), %rsi     # 0xc4fbf
callq 0xa5a0
movq %rax, -0x368(%rbp)
jmp 0x92f87
movq -0x368(%rbp), %rdi
movq 0x6b01b(%rip), %rsi     # 0xfdfb0
callq 0xa630
jmp 0x92f9c
jmp 0x92fb5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2a0(%rbp)
movl %eax, -0x2a4(%rbp)
jmp 0x931ce
leaq -0x2c8(%rbp), %rdi
callq 0xa820
leaq -0x2e8(%rbp), %rdi
callq 0xa820
leaq -0x300(%rbp), %rdi
callq 0x3fed0
leaq -0x298(%rbp), %rdi
leaq -0x2c8(%rbp), %rsi
callq 0xa140
movq %rax, -0x370(%rbp)
jmp 0x92ff5
movq -0x370(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0xa780
movb %al, -0x371(%rbp)
jmp 0x93013
movb -0x371(%rbp), %al
testb $0x1, %al
jne 0x93022
jmp 0x93179
xorl %eax, %eax
movl %eax, %esi
leaq -0x2c8(%rbp), %rdi
callq 0xac00
movq %rax, -0x380(%rbp)
jmp 0x9303b
movq -0x380(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5b, %eax
jne 0x93123
leaq -0x300(%rbp), %rdi
callq 0x98160
testb $0x1, %al
jne 0x930b7
movq -0x340(%rbp), %rdi
leaq -0x2e8(%rbp), %rsi
leaq -0x300(%rbp), %rdx
callq 0x95470
jmp 0x9307a
jmp 0x930b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2a0(%rbp)
movl %eax, -0x2a4(%rbp)
leaq -0x300(%rbp), %rdi
callq 0x40100
leaq -0x2e8(%rbp), %rdi
callq 0xa370
leaq -0x2c8(%rbp), %rdi
callq 0xa370
jmp 0x931ce
leaq -0x2c8(%rbp), %rdi
movq %rdi, -0x388(%rbp)
movl $0x5d, %esi
movq $-0x1, %rdx
callq 0xabd0
movq -0x388(%rbp), %rsi
movq %rax, %rcx
decq %rcx
leaq -0x320(%rbp), %rdi
movl $0x1, %edx
callq 0xa610
jmp 0x930f6
leaq -0x2e8(%rbp), %rdi
leaq -0x320(%rbp), %rsi
callq 0xa760
leaq -0x320(%rbp), %rdi
callq 0xa370
leaq -0x300(%rbp), %rdi
callq 0x40070
jmp 0x93174
xorl %eax, %eax
movl %eax, %esi
leaq -0x2c8(%rbp), %rdi
callq 0xac00
movq %rax, -0x390(%rbp)
jmp 0x9313c
movq -0x390(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
je 0x93172
leaq -0x2c8(%rbp), %rdi
callq 0xa9f0
testb $0x1, %al
jne 0x93172
leaq -0x300(%rbp), %rdi
leaq -0x2c8(%rbp), %rsi
callq 0x40090
jmp 0x93170
jmp 0x93172
jmp 0x93174
jmp 0x92fd9
movq -0x340(%rbp), %rdi
leaq -0x2e8(%rbp), %rsi
leaq -0x300(%rbp), %rdx
callq 0x95470
jmp 0x93195
leaq -0x300(%rbp), %rdi
callq 0x40100
leaq -0x2e8(%rbp), %rdi
callq 0xa370
leaq -0x2c8(%rbp), %rdi
callq 0xa370
leaq -0x298(%rbp), %rdi
callq 0xa1b0
addq $0x390, %rsp            # imm = 0x390
popq %rbp
retq
leaq -0x298(%rbp), %rdi
callq 0xa1b0
movq -0x2a0(%rbp), %rdi
callq 0xaa60
nopw %cs:(%rax,%rax)