// File: /workspace/github_cpp_makefile_star2_O3/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 0x43dce
movq 0x3118(%rax), %rdx
leaq 0x1d9ae(%rip), %rsi     # 0x6cefb
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 0x4f618
movq 0x34a60(%rip), %rdi     # 0x83ff0
leaq 0x1d843(%rip), %rsi     # 0x6cdda
movl $0x12, %edx
callq 0x9560
leaq -0x48(%rbp), %rsi
movb $0x3a, (%rsi)
movq 0x34a41(%rip), %rdi     # 0x83ff0
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 0x1d91c(%rip), %rsi     # 0x6cf00
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 0x4f77f
movq -0x48(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x23, %eax
je 0x4f64a
cmpl $0x5b, %eax
jne 0x4f726
movq -0x60(%rbp), %rax
cmpq -0x58(%rbp), %rax
je 0x4f6b4
movq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
movq %r13, %rdx
callq 0x50f36
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 0x4f714
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x94e0
movq -0x60(%rbp), %r15
movq -0x58(%rbp), %rbx
cmpq %r15, %rbx
jne 0x4f741
jmp 0x4f64a
cmpq $0x0, -0x40(%rbp)
je 0x4f64a
movq %r13, %rdi
movq %r12, %rsi
callq 0x27a4e
jmp 0x4f64a
movq %r14, %r12
movq %r13, %r14
leaq 0x10(%r15), %r13
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0x4f760
movq (%r13), %rsi
incq %rsi
callq 0x94e0
leaq 0x20(%r13), %rax
addq $0x10, %r13
cmpq %rbx, %r13
movq %rax, %r13
jne 0x4f74b
movq %r15, -0x58(%rbp)
movq %r14, %r13
movq %r12, %r14
jmp 0x4f646
leaq -0x88(%rbp), %rsi
leaq -0x60(%rbp), %rdx
movq -0x68(%rbp), %rdi
callq 0x50f36
leaq -0x60(%rbp), %rdi
callq 0x27a9a
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x4f7b8
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x94e0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x4f7d1
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 0x4f7f8
movq %rax, %rbx
jmp 0x4f839
jmp 0x4f7f8
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x27a9a
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x4f820
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x94e0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x4f839
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x94e0
leaq -0x2b0(%rbp), %rdi
callq 0x9170
movq %rbx, %rdi
callq 0x98b0
nop