// File: /workspace/github_cpp_makefile_star2_O1/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 0x60e81(%rip), %rax     # 0x86718
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 0x46cf0(%rip), %xmm0    # 0x6c5b0
movups %xmm0, -0xc(%rbx,%rax)
addq $0x10, %rax
cmpq $0x11c, %rax            # imm = 0x11C
jne 0x258c0
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 0x25913
leaq 0x60e15(%rip), %rax     # 0x86748
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 0x46cd2(%rip), %rsi     # 0x6c640
leaq 0x46cda(%rip), %rdx     # 0x6c64f
leaq -0x2e8(%rbp), %rdi
callq 0x13766
leaq -0xc0(%rbp), %rdi
leaq -0x2e8(%rbp), %rsi
callq 0x28188
movl $0x0, (%rax)
movq -0x2e8(%rbp), %rdi
cmpq %r15, %rdi
je 0x259b5
movq -0x2d8(%rbp), %rsi
incq %rsi
callq 0x94e0
movl $0x178, %edi            # imm = 0x178
callq 0x94c0
movq %rax, %r15
movq %rax, %rdi
callq 0x2970c
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 0x25ba4
movq -0x90(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x23, %eax
je 0x25a15
cmpl $0x5b, %eax
jne 0x25ac4
leaq -0x48(%rbp), %r15
movq %r15, %rdi
leaq 0x45e51(%rip), %rsi     # 0x6b8c4
callq 0x91a0
testl %eax, %eax
je 0x25ae6
leaq -0xc0(%rbp), %rdi
movq %r15, %rsi
callq 0x28b14
leaq -0xb8(%rbp), %rcx
cmpq %rcx, %rax
je 0x25af1
leaq -0xc0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x28208
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 0x25af1
cmpq $0x0, -0x88(%rbp)
je 0x25a15
movq %r14, %rdi
leaq -0x90(%rbp), %rsi
callq 0x28288
jmp 0x25a15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x25d1a
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 0x25b55
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x94e0
movq -0x60(%rbp), %r13
movq -0x58(%rbp), %r15
cmpq %r13, %r15
je 0x25a15
movq %r12, %r14
leaq 0x10(%r13), %r12
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0x25b83
movq (%r12), %rsi
incq %rsi
callq 0x94e0
leaq 0x20(%r12), %rax
addq $0x10, %r12
cmpq %r15, %r12
movq %rax, %r12
jne 0x25b6d
movq %r13, -0x58(%rbp)
movq %r14, %r12
leaq -0x60(%rbp), %r14
jmp 0x25a15
leaq 0x45d19(%rip), %rsi     # 0x6b8c4
leaq -0x48(%rbp), %rdi
callq 0x91a0
testl %eax, %eax
je 0x25c02
leaq -0xc0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x28b14
leaq -0xb8(%rbp), %rcx
cmpq %rcx, %rax
je 0x25c0e
leaq -0xc0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x28208
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 0x25c0e
leaq -0x60(%rbp), %rsi
movq %rbx, %rdi
callq 0x25d1a
leaq -0x60(%rbp), %rdi
callq 0x282d4
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x25c30
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x94e0
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x25c4c
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x94e0
leaq -0x2e8(%rbp), %rdi
callq 0x9170
leaq -0xc0(%rbp), %rdi
callq 0x28490
addq $0x2c8, %rsp            # imm = 0x2C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x25cb8
jmp 0x25cb8
jmp 0x25cb8
jmp 0x25cad
movq %rax, %rbx
movl $0x178, %esi            # imm = 0x178
movq %r15, %rdi
jmp 0x25ca6
jmp 0x25cad
movq %rax, %rbx
movq -0x2e8(%rbp), %rdi
cmpq %r15, %rdi
je 0x25d05
movq -0x2d8(%rbp), %rsi
incq %rsi
callq 0x94e0
jmp 0x25d05
movq %rax, %rbx
jmp 0x25d05
jmp 0x25cb8
jmp 0x25cb8
jmp 0x25cb8
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x282d4
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x25cdd
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x94e0
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x25cf9
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x94e0
leaq -0x2e8(%rbp), %rdi
callq 0x9170
leaq -0xc0(%rbp), %rdi
callq 0x28490
movq %rbx, %rdi
callq 0x98b0
nop