// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x308, %rsp            # imm = 0x308
movq %rdi, -0x68(%rbp)
callq 0x450ba
movq 0x3118(%rax), %rdx
leaq 0x1e36a(%rip), %rsi     # 0x6ef2b
leaq -0x330(%rbp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9110
leaq -0x2b0(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movl $0x8, %edx
callq 0x9920
leaq -0x238(%rbp), %rdi
callq 0x9150
testb %al, %al
jne 0x50c8c
movq 0x363ec(%rip), %rdi     # 0x86ff0
leaq 0x1e1ff(%rip), %rsi     # 0x6ee0a
movl $0x12, %edx
callq 0x9560
leaq -0x48(%rbp), %rsi
movb $0x3a, (%rsi)
movq 0x363cd(%rip), %rdi     # 0x86ff0
movl $0x1, %edx
callq 0x9560
movq %rax, %rdi
movl $0x1da, %esi            # imm = 0x1DA
callq 0x9880
leaq -0x48(%rbp), %rsi
movb $0x3a, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x9560
movq %rax, %rbx
leaq 0x1e2d8(%rip), %rsi     # 0x6ef30
movl $0x27, %edx
movq %rax, %rdi
callq 0x9560
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %rbx, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
leaq -0x38(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x78(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x60(%rbp), %r13
movq %rax, 0x10(%r13)
xorps %xmm0, %xmm0
movaps %xmm0, (%r13)
leaq -0x48(%rbp), %r12
movq -0x2b0(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x9940
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x50df3
movq -0x48(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x23, %eax
je 0x50cbe
cmpl $0x5b, %eax
jne 0x50d9a
movq -0x60(%rbp), %rax
cmpq -0x58(%rbp), %rax
je 0x50d28
movq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
movq %r13, %rdx
callq 0x525fa
movq %r12, %rdi
movl $0x5d, %esi
movq $-0x1, %rdx
callq 0x99d0
leaq -0x1(%rax), %rcx
movl $0x1, %edx
leaq -0xa8(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x9500
leaq -0x88(%rbp), %rdi
movq %rbx, %rsi
callq 0x95f0
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x50d88
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x94e0
movq -0x60(%rbp), %r15
movq -0x58(%rbp), %rbx
cmpq %r15, %rbx
jne 0x50db5
jmp 0x50cbe
cmpq $0x0, -0x40(%rbp)
je 0x50cbe
movq %r13, %rdi
movq %r12, %rsi
callq 0x28288
jmp 0x50cbe
movq %r14, %r12
movq %r13, %r14
leaq 0x10(%r15), %r13
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0x50dd4
movq (%r13), %rsi
incq %rsi
callq 0x94e0
leaq 0x20(%r13), %rax
addq $0x10, %r13
cmpq %rbx, %r13
movq %rax, %r13
jne 0x50dbf
movq %r15, -0x58(%rbp)
movq %r14, %r13
movq %r12, %r14
jmp 0x50cba
leaq -0x88(%rbp), %rsi
leaq -0x60(%rbp), %rdx
movq -0x68(%rbp), %rdi
callq 0x525fa
leaq -0x60(%rbp), %rdi
callq 0x282d4
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x50e2c
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x94e0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x50e45
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x94e0
leaq -0x2b0(%rbp), %rdi
callq 0x9170
addq $0x308, %rsp            # imm = 0x308
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x50e6c
movq %rax, %rbx
jmp 0x50ead
jmp 0x50e6c
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x282d4
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x50e94
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x94e0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x50ead
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x94e0
leaq -0x2b0(%rbp), %rdi
callq 0x9170
movq %rbx, %rdi
callq 0x98b0
nop