// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/Formation.cpp
// Function: TeammateFormation::TeammateFormation(FormationType, char const*)
TeammateFormation::TeammateFormation(FormationType type,
                                     const char *config_file)
    : FormationBase(type) {
  mTactics.bzero();
  map<string, FormationTacticType> formation_tactic_map;

  formation_tactic_map_register(KickOffPosition);

  ifstream fin(config_file);
  string conf, section;
  vector<string> content;
  while (getline(fin, conf)) {
    if (conf[0] == '[') {
      if (section == "Formation") {
        InitialFormation(content);
      } else if (formation_tactic_map.find(section) !=
                 formation_tactic_map.end()) {
        mTactics[formation_tactic_map[section]]->Initial(
            content, mIndex2Unum.instance(), mUnum2Index.instance());
      }
      section = conf.substr(1, conf.rfind(']') - 1);
      content.clear();
    } else if (conf[0] != '#' && conf.size() > 0) {
      content.push_back(conf);
    }
  }
  if (section == "Formation") {
    InitialFormation(content);
  } else if (formation_tactic_map.find(section) != formation_tactic_map.end()) {
    mTactics[formation_tactic_map[section]]->Initial(
        content, mIndex2Unum.instance(), mUnum2Index.instance());
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2d8, %rsp            # imm = 0x2D8
movq %rdx, %rbx
movq %rdi, %r15
callq 0x1f186
leaq 0x5704a(%rip), %rax     # 0x76780
movq %rax, (%r15)
andq $0x0, 0xca0(%r15)
leaq -0xc8(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x38e9c(%rip), %rsi     # 0x58600
leaq -0x2f8(%rbp), %rdi
leaq -0x80(%rbp), %rdx
callq 0x10e4a
leaq -0xd0(%rbp), %rdi
leaq -0x2f8(%rbp), %rsi
callq 0x21a02
andl $0x0, (%rax)
leaq -0x2f8(%rbp), %rdi
callq 0x9240
movl $0x178, %edi            # imm = 0x178
callq 0x94d0
movq %rax, %r14
movq %rax, %rdi
callq 0x232b0
movq %r14, 0xca0(%r15)
leaq -0x2f8(%rbp), %rdi
pushq $0x8
popq %rdx
movq %rbx, %rsi
callq 0x9920
leaq -0x70(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
leaq -0x50(%rbp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
xorl %edx, %edx
movb %dl, (%rax)
movb %dl, (%rcx)
xorps %xmm0, %xmm0
leaq -0xa0(%rbp), %r12
andq $0x0, 0x10(%r12)
movaps %xmm0, (%r12)
leaq 0x320(%r15), %rax
movq %rax, -0x40(%rbp)
movq %r15, -0x30(%rbp)
leaq 0x350(%r15), %rax
movq %rax, -0x38(%rbp)
leaq -0x2f8(%rbp), %r13
leaq -0x80(%rbp), %r14
leaq -0x60(%rbp), %r15
leaq -0xf0(%rbp), %rbx
movq %r13, %rdi
movq %r14, %rsi
callq 0x9110
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1f915
movq -0x80(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x23, %eax
je 0x1f829
cmpl $0x5b, %eax
jne 0x1f878
movq %r15, %rdi
leaq 0x38033(%rip), %rsi     # 0x57894
callq 0x1e947
testb %al, %al
je 0x1f88c
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x1fa4c
jmp 0x1f8d5
cmpq $0x0, -0x78(%rbp)
je 0x1f829
movq %r12, %rdi
movq %r14, %rsi
callq 0x21ae4
jmp 0x1f829
leaq -0xd0(%rbp), %rdi
movq %r15, %rsi
callq 0x224ec
leaq -0xc8(%rbp), %rcx
cmpq %rcx, %rax
je 0x1f8d5
leaq -0xd0(%rbp), %rdi
movq %r15, %rsi
callq 0x21a6c
movl (%rax), %eax
movq -0x30(%rbp), %rcx
movq 0xca0(%rcx,%rax,8), %rdi
movq (%rdi), %rax
movq %r12, %rsi
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rcx
callq *0x10(%rax)
movq %r14, %rdi
pushq $0x5d
popq %rsi
pushq $-0x1
popq %rdx
callq 0x99c0
leaq -0x1(%rax), %rcx
movq %rbx, %rdi
movq %r14, %rsi
pushq $0x1
popq %rdx
callq 0x9500
movq %r15, %rdi
movq %rbx, %rsi
callq 0x95f0
movq %rbx, %rdi
callq 0x9240
movq %r12, %rdi
callq 0x21ad6
jmp 0x1f829
leaq 0x37f78(%rip), %rsi     # 0x57894
leaq -0x60(%rbp), %rdi
callq 0x1e947
testb %al, %al
je 0x1f93b
leaq -0xa0(%rbp), %rsi
movq -0x30(%rbp), %rdi
callq 0x1fa4c
jmp 0x1f98a
leaq -0xd0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x224ec
movq -0x30(%rbp), %rbx
leaq -0xc8(%rbp), %rcx
cmpq %rcx, %rax
je 0x1f98a
leaq -0xd0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x21a6c
movl (%rax), %eax
movq 0xca0(%rbx,%rax,8), %rdi
movq (%rdi), %rax
leaq -0xa0(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rcx
callq *0x10(%rax)
leaq -0xa0(%rbp), %rdi
callq 0x21b20
leaq -0x60(%rbp), %rdi
callq 0x9240
leaq -0x80(%rbp), %rdi
callq 0x9240
leaq -0x2f8(%rbp), %rdi
callq 0x9180
leaq -0xd0(%rbp), %rdi
callq 0x21d7c
addq $0x2d8, %rsp            # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1fa0a
jmp 0x1fa0a
jmp 0x1fa0a
jmp 0x1f9ff
movq %rax, %rbx
movl $0x178, %esi            # imm = 0x178
movq %r14, %rdi
callq 0x94f0
jmp 0x1fa37
jmp 0x1f9ff
movq %rax, %rbx
leaq -0x2f8(%rbp), %rdi
callq 0x9240
jmp 0x1fa37
movq %rax, %rbx
jmp 0x1fa37
jmp 0x1fa0a
jmp 0x1fa0a
jmp 0x1fa0a
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x21b20
leaq -0x60(%rbp), %rdi
callq 0x9240
leaq -0x80(%rbp), %rdi
callq 0x9240
leaq -0x2f8(%rbp), %rdi
callq 0x9180
leaq -0xd0(%rbp), %rdi
callq 0x21d7c
movq %rbx, %rdi
callq 0x98b0
nop