// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/InterceptInfo.cpp
// Function: InterceptInfo::SortIntercerptInfo()
void InterceptInfo::SortIntercerptInfo() {
  mOIT.clear();

  for (int i = -TEAMSIZE; i <= TEAMSIZE; i++) {
    if (i == 0)
      continue;

    if (mpWorldState->GetPlayer(i).IsAlive()) {
      mOIT.push_back(OrderedIT(VerifyIntInfo(i), i,
                               mpWorldState->GetPlayer(i).GetPosDelay()));
    }
  }

  std::sort(mOIT.begin(), mOIT.end());

  if (PlayerParam::instance().SaveTextLog()) {
    Logger::instance().GetTextLogger("oit")
        << "\n"
        << mpWorldState->CurrentTime() << ": " << std::endl;
    Logger::instance().GetTextLogger("oit") << "#"
                                            << "\t"
                                            << "cd"
                                            << "\t"
                                            << "min"
                                            << "\t"
                                            << "idl"
                                            << "\t"
                                            << "its"
                                            << "\t"
                                            << "it0"
                                            << "\t"
                                            << "it1"
                                            << "\t"
                                            << "it2" << std::endl;

    for (std::vector<OrderedIT>::iterator it = mOIT.begin(); it != mOIT.end();
         ++it) {
      Logger::instance().GetTextLogger("oit")
          << it->mUnum << "\t" << it->mCycleDelay << "\t"
          << it->mpInterceptInfo->mMinCycle << "\t"
          << it->mpInterceptInfo->mIntervals;

      for (int i = 0; i < it->mpInterceptInfo->mIntervals; ++i) {
        Logger::instance().GetTextLogger("oit")
            << "\t" << it->mpInterceptInfo->mInterCycle[i];
      }

      Logger::instance().GetTextLogger("oit") << std::endl;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0xc80(%rdi), %rax
cmpq %rax, 0xc88(%rdi)
je 0x245bf
movq %rax, 0xc88(%rbx)
leaq 0xc80(%rbx), %r14
pushq $-0xb
popq %r15
movq $-0x10f8, %r13          # imm = 0xEF08
movl $0x1f80, %r12d          # imm = 0x1F80
testq %r15, %r15
je 0x2462e
cmpq $0xc, %r15
je 0x24641
movq 0x10(%rbx), %rax
testq %r15, %r15
movq %r12, %rcx
cmovgq %r13, %rcx
cmpb $0x1, 0x112(%rax,%rcx)
jne 0x2462e
movq %rbx, %rdi
movl %r15d, %esi
callq 0x248a2
testq %r15, %r15
movq 0x10(%rbx), %rcx
movq %r12, %rdx
cmovgq %r13, %rdx
movl 0x18(%rcx,%rdx), %ecx
movq %rax, -0x40(%rbp)
movl %r15d, -0x38(%rbp)
movl %ecx, -0x34(%rbp)
movq %r14, %rdi
leaq -0x40(%rbp), %rsi
callq 0x24e14
incq %r15
addq $0x178, %r13            # imm = 0x178
addq $-0x178, %r12           # imm = 0xFE88
jmp 0x245d7
movq 0xc80(%rbx), %rdi
movq 0xc88(%rbx), %rsi
callq 0x24fac
callq 0x38d94
cmpb $0x0, 0x5c45(%rax)
je 0x24893
callq 0x2ca2e
leaq 0x340e9(%rip), %r14     # 0x5875b
movq %rax, %rdi
movq %r14, %rsi
callq 0x2cc3e
leaq 0x34669(%rip), %rsi     # 0x58ced
movq %rax, %rdi
callq 0x10ec6
movq 0x10(%rbx), %rsi
addq $0x10, %rsi
movq %rax, %rdi
callq 0x10e94
leaq 0x34d7d(%rip), %rsi     # 0x59420
movq %rax, %rdi
callq 0x21b92
movq 0x528fe(%rip), %r15     # 0x76fb0
movq %rax, %rdi
movq %r15, %rsi
callq 0x10f5c
callq 0x2ca2e
movq %rax, %rdi
movq %r14, %rsi
callq 0x2cc3e
leaq 0x367b7(%rip), %rsi     # 0x5ae8b
movq %rax, %rdi
callq 0x10ec6
leaq 0x3407c(%rip), %r12     # 0x5875f
movq %rax, %rdi
movq %r12, %rsi
callq 0x10ec6
leaq 0x34165(%rip), %rsi     # 0x5885a
movq %rax, %rdi
callq 0x21b92
movq %rax, %rdi
movq %r12, %rsi
callq 0x10ec6
leaq 0x351ce(%rip), %rsi     # 0x598dd
movq %rax, %rdi
callq 0x1a606
movq %rax, %rdi
movq %r12, %rsi
callq 0x10ec6
leaq 0x34038(%rip), %rsi     # 0x58761
movq %rax, %rdi
callq 0x1a606
movq %rax, %rdi
movq %r12, %rsi
callq 0x10ec6
leaq 0x34022(%rip), %rsi     # 0x58765
movq %rax, %rdi
callq 0x1a606
movq %rax, %rdi
movq %r12, %rsi
callq 0x10ec6
leaq 0x3400c(%rip), %rsi     # 0x58769
movq %rax, %rdi
callq 0x1a606
movq %rax, %rdi
movq %r12, %rsi
callq 0x10ec6
leaq 0x33ff6(%rip), %rsi     # 0x5876d
movq %rax, %rdi
callq 0x1a606
movq %rax, %rdi
movq %r12, %rsi
callq 0x10ec6
leaq 0x33fe0(%rip), %rsi     # 0x58771
movq %rax, %rdi
callq 0x1a606
movq %rax, %rdi
movq %r15, %rsi
callq 0x10f5c
movq 0xc80(%rbx), %r13
movq %rbx, -0x30(%rbp)
cmpq 0xc88(%rbx), %r13
je 0x24893
callq 0x2ca2e
movq %rax, %rdi
leaq 0x33f90(%rip), %rsi     # 0x5875b
callq 0x2cc3e
leaq 0x8(%r13), %rsi
movq %rax, %rdi
callq 0x1a512
movq %rax, %rdi
movq %r12, %rsi
callq 0x10ec6
leaq 0xc(%r13), %rsi
movq %rax, %rdi
callq 0x1a512
movq %rax, %rdi
movq %r12, %rsi
callq 0x10ec6
movq (%r13), %rsi
addq $0x74, %rsi
movq %rax, %rdi
callq 0x1a512
movq %rax, %rdi
movq %r12, %rsi
callq 0x10ec6
movq (%r13), %rsi
movl $0x88, %ecx
addq %rcx, %rsi
movq %rax, %rdi
callq 0x1a512
pushq $0x68
popq %r15
xorl %ebx, %ebx
movq (%r13), %rax
movslq 0x88(%rax), %r14
callq 0x2ca2e
movq %rax, %rdi
leaq 0x33f0e(%rip), %rsi     # 0x5875b
callq 0x2cc3e
movq %rax, %rdi
cmpq %r14, %rbx
jge 0x2487a
movq %r12, %rsi
callq 0x10ec6
movq (%r13), %rsi
addq %r15, %rsi
movq %rax, %rdi
callq 0x1a512
incq %rbx
addq $0x4, %r15
jmp 0x24833
movq 0x5272f(%rip), %rsi     # 0x76fb0
callq 0x10f5c
addq $0x10, %r13
movq -0x30(%rbp), %rbx
jmp 0x247af
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq