// File: /workspace/github_cpp_makefile_star2_O3/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 $0x2c8, %rsp            # imm = 0x2C8
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x5e627(%rip), %rax     # 0x83740
movq %rax, (%rdi)
movl %esi, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movl $0x6c, %eax
movaps 0x4545e(%rip), %xmm0    # 0x6a5a0
movups %xmm0, -0xc(%rbx,%rax)
addq $0x10, %rax
cmpq $0x11c, %rax            # imm = 0x11C
jne 0x25142
leaq 0x110(%rbx), %rdi
leaq 0x320(%rbx), %rax
movq %rax, -0x70(%rbp)
leaq 0x350(%rbx), %rax
movq %rax, -0x68(%rbp)
leaq 0x380(%rbx), %r15
xorl %r12d, %r12d
movl $0x210, %edx            # imm = 0x210
xorl %esi, %esi
callq 0x92b0
movl $0x910, %edx            # imm = 0x910
movq %r15, %rdi
xorl %esi, %esi
callq 0x92b0
movl %r12d, 0x350(%rbx,%r12,4)
movl %r12d, 0x320(%rbx,%r12,4)
incq %r12
cmpq $0xc, %r12
jne 0x25195
leaq 0x5e5bb(%rip), %rax     # 0x83770
movq %rax, (%rbx)
xorl %eax, %eax
movq %rax, 0xca0(%rbx)
leaq -0xb8(%rbp), %rcx
movl $0x0, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0x2d8(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x45440(%rip), %rsi     # 0x6a630
leaq 0x45448(%rip), %rdx     # 0x6a63f
leaq -0x2e8(%rbp), %rdi
callq 0x1362e
leaq -0xc0(%rbp), %rdi
leaq -0x2e8(%rbp), %rsi
callq 0x2794e
movl $0x0, (%rax)
movq -0x2e8(%rbp), %rdi
cmpq %r15, %rdi
je 0x25237
movq -0x2d8(%rbp), %rsi
incq %rsi
callq 0x94e0
movl $0x178, %edi            # imm = 0x178
callq 0x94c0
movq %rax, %r15
movq %rax, %rdi
callq 0x28e9c
movq %r15, 0xca0(%rbx)
leaq -0x2e8(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x9920
leaq -0x80(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x38(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x60(%rbp), %r14
movq %rax, 0x10(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
movq -0x2e8(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %edx
movq %r12, %rdi
leaq -0x90(%rbp), %rsi
callq 0x9940
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x25426
movq -0x90(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x23, %eax
je 0x25297
cmpl $0x5b, %eax
jne 0x25346
leaq -0x48(%rbp), %r15
movq %r15, %rdi
leaq 0x445cf(%rip), %rsi     # 0x698c4
callq 0x91a0
testl %eax, %eax
je 0x25368
leaq -0xc0(%rbp), %rdi
movq %r15, %rsi
callq 0x282b8
leaq -0xb8(%rbp), %rcx
cmpq %rcx, %rax
je 0x25373
leaq -0xc0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x279ce
movl (%rax), %eax
movq 0xca0(%rbx,%rax,8), %rdi
movq (%rdi), %rax
movq %r14, %rsi
movq -0x70(%rbp), %rdx
movq -0x68(%rbp), %rcx
callq *0x10(%rax)
jmp 0x25373
cmpq $0x0, -0x88(%rbp)
je 0x25297
movq %r14, %rdi
leaq -0x90(%rbp), %rsi
callq 0x27a4e
jmp 0x25297
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2559c
leaq -0x90(%rbp), %r15
movq %r15, %rdi
movl $0x5d, %esi
movq $-0x1, %rdx
callq 0x99d0
leaq -0x1(%rax), %rcx
movl $0x1, %edx
leaq -0xe0(%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x9500
leaq -0x48(%rbp), %rdi
movq %r13, %rsi
callq 0x95f0
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0x253d7
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x94e0
movq -0x60(%rbp), %r13
movq -0x58(%rbp), %r15
cmpq %r13, %r15
je 0x25297
movq %r12, %r14
leaq 0x10(%r13), %r12
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0x25405
movq (%r12), %rsi
incq %rsi
callq 0x94e0
leaq 0x20(%r12), %rax
addq $0x10, %r12
cmpq %r15, %r12
movq %rax, %r12
jne 0x253ef
movq %r13, -0x58(%rbp)
movq %r14, %r12
leaq -0x60(%rbp), %r14
jmp 0x25297
leaq 0x44497(%rip), %rsi     # 0x698c4
leaq -0x48(%rbp), %rdi
callq 0x91a0
testl %eax, %eax
je 0x25484
leaq -0xc0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x282b8
leaq -0xb8(%rbp), %rcx
cmpq %rcx, %rax
je 0x25490
leaq -0xc0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x279ce
movl (%rax), %eax
movq 0xca0(%rbx,%rax,8), %rdi
movq (%rdi), %rax
leaq -0x60(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq -0x68(%rbp), %rcx
callq *0x10(%rax)
jmp 0x25490
leaq -0x60(%rbp), %rsi
movq %rbx, %rdi
callq 0x2559c
leaq -0x60(%rbp), %rdi
callq 0x27a9a
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x254b2
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x94e0
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x254ce
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x94e0
leaq -0x2e8(%rbp), %rdi
callq 0x9170
leaq -0xc0(%rbp), %rdi
callq 0x27c5a
addq $0x2c8, %rsp            # imm = 0x2C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2553a
jmp 0x2553a
jmp 0x2553a
jmp 0x2552f
movq %rax, %rbx
movl $0x178, %esi            # imm = 0x178
movq %r15, %rdi
jmp 0x25528
jmp 0x2552f
movq %rax, %rbx
movq -0x2e8(%rbp), %rdi
cmpq %r15, %rdi
je 0x25587
movq -0x2d8(%rbp), %rsi
incq %rsi
callq 0x94e0
jmp 0x25587
movq %rax, %rbx
jmp 0x25587
jmp 0x2553a
jmp 0x2553a
jmp 0x2553a
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x27a9a
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x2555f
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x94e0
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x2557b
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x94e0
leaq -0x2e8(%rbp), %rdi
callq 0x9170
leaq -0xc0(%rbp), %rdi
callq 0x27c5a
movq %rbx, %rdi
callq 0x98b0
nop