// File: 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
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x58(%rbp)
addq $0xc80, %rdi            # imm = 0xC80
callq 0x4a920
movl $0xfffffff5, -0xc(%rbp) # imm = 0xFFFFFFF5
cmpl $0xb, -0xc(%rbp)
jg 0x497a0
cmpl $0x0, -0xc(%rbp)
jne 0x4970f
jmp 0x49792
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0xc(%rbp), %rsi
callq 0x23eb0
movq %rax, %rdi
callq 0x23f20
testb $0x1, %al
jne 0x4972e
jmp 0x49790
movq -0x58(%rbp), %rdi
movq %rdi, %rax
addq $0xc80, %rax            # imm = 0xC80
movq %rax, -0x60(%rbp)
movl -0xc(%rbp), %esi
callq 0x49b30
movq %rax, %rcx
movq -0x58(%rbp), %rax
movq %rcx, -0x70(%rbp)
movl -0xc(%rbp), %ecx
movl %ecx, -0x64(%rbp)
movq 0x10(%rax), %rdi
leaq -0xc(%rbp), %rsi
callq 0x23eb0
movq %rax, %rdi
addq $0x8, %rdi
callq 0x1ddd0
movq -0x70(%rbp), %rsi
movl -0x64(%rbp), %edx
movl %eax, %ecx
leaq -0x20(%rbp), %rdi
callq 0x4a970
movq -0x60(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x4a940
jmp 0x49792
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x496fa
movq -0x58(%rbp), %rdi
addq $0xc80, %rdi            # imm = 0xC80
callq 0x4a9e0
movq -0x58(%rbp), %rdi
movq %rax, -0x28(%rbp)
addq $0xc80, %rdi            # imm = 0xC80
callq 0x4aa10
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x4a9a0
callq 0x798a0
movq %rax, %rdi
callq 0x1aaf0
testb $0x1, (%rax)
je 0x49b20
callq 0x5add0
movq %rax, %rdi
leaq 0x78ec6(%rip), %rsi     # 0xc26c0
callq 0x5b110
movq %rax, %rdi
leaq 0x7947c(%rip), %rsi     # 0xc2c85
callq 0x1a690
movq %rax, %rcx
movq -0x58(%rbp), %rax
movq %rcx, -0x78(%rbp)
movq 0x10(%rax), %rdi
callq 0x12100
movq -0x78(%rbp), %rdi
movq %rax, %rsi
callq 0x1a640
movq %rax, %rdi
leaq 0x79d28(%rip), %rsi     # 0xc3560
callq 0x40760
movq %rax, %rdi
movq 0xb4769(%rip), %rsi     # 0xfdfb0
callq 0x1a7c0
callq 0x5add0
movq %rax, %rdi
leaq 0x78e65(%rip), %rsi     # 0xc26c0
callq 0x5b110
movq %rax, %rdi
leaq 0x7b700(%rip), %rsi     # 0xc4f6a
callq 0x1a690
movq %rax, %rdi
leaq 0x78e4b(%rip), %rsi     # 0xc26c4
callq 0x1a690
movq %rax, %rdi
leaq 0x78f4a(%rip), %rsi     # 0xc27d2
callq 0x40760
movq %rax, %rdi
leaq 0x78e2d(%rip), %rsi     # 0xc26c4
callq 0x1a690
movq %rax, %rdi
leaq 0x7a177(%rip), %rsi     # 0xc3a1d
callq 0x2e9c0
movq %rax, %rdi
leaq 0x78e0f(%rip), %rsi     # 0xc26c4
callq 0x1a690
movq %rax, %rdi
leaq 0x78e02(%rip), %rsi     # 0xc26c6
callq 0x2e9c0
movq %rax, %rdi
leaq 0x78df1(%rip), %rsi     # 0xc26c4
callq 0x1a690
movq %rax, %rdi
leaq 0x78de8(%rip), %rsi     # 0xc26ca
callq 0x2e9c0
movq %rax, %rdi
leaq 0x78dd3(%rip), %rsi     # 0xc26c4
callq 0x1a690
movq %rax, %rdi
leaq 0x78dce(%rip), %rsi     # 0xc26ce
callq 0x2e9c0
movq %rax, %rdi
leaq 0x78db5(%rip), %rsi     # 0xc26c4
callq 0x1a690
movq %rax, %rdi
leaq 0x78db4(%rip), %rsi     # 0xc26d2
callq 0x2e9c0
movq %rax, %rdi
leaq 0x78d97(%rip), %rsi     # 0xc26c4
callq 0x1a690
movq %rax, %rdi
leaq 0x78d9a(%rip), %rsi     # 0xc26d6
callq 0x2e9c0
movq %rax, %rdi
movq 0xb4665(%rip), %rsi     # 0xfdfb0
callq 0x1a7c0
movq -0x58(%rbp), %rdi
addq $0xc80, %rdi            # imm = 0xC80
callq 0x4a9e0
movq %rax, -0x38(%rbp)
movq -0x58(%rbp), %rdi
addq $0xc80, %rdi            # imm = 0xC80
callq 0x4aa10
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x4aa40
testb $0x1, %al
jne 0x4998e
jmp 0x49b1e
callq 0x5add0
movq %rax, %rdi
leaq 0x78d23(%rip), %rsi     # 0xc26c0
callq 0x5b110
movq %rax, -0x98(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4aa80
movq -0x98(%rbp), %rdi
movq %rax, %rsi
addq $0x8, %rsi
callq 0x2e850
movq %rax, %rdi
leaq 0x78cf5(%rip), %rsi     # 0xc26c4
callq 0x1a690
movq %rax, -0x90(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4aa80
movq -0x90(%rbp), %rdi
movq %rax, %rsi
addq $0xc, %rsi
callq 0x2e850
movq %rax, %rdi
leaq 0x78cc3(%rip), %rsi     # 0xc26c4
callq 0x1a690
movq %rax, -0x88(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4aa80
movq -0x88(%rbp), %rdi
movq (%rax), %rsi
addq $0x74, %rsi
callq 0x2e850
movq %rax, %rdi
leaq 0x78c91(%rip), %rsi     # 0xc26c4
callq 0x1a690
movq %rax, -0x80(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4aa80
movq -0x80(%rbp), %rdi
movq (%rax), %rsi
addq $0x88, %rsi
callq 0x2e850
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x9c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4aa80
movq %rax, %rcx
movl -0x9c(%rbp), %eax
movq (%rcx), %rcx
cmpl 0x88(%rcx), %eax
jge 0x49aed
callq 0x5add0
movq %rax, %rdi
leaq 0x78c2c(%rip), %rsi     # 0xc26c0
callq 0x5b110
movq %rax, %rdi
leaq 0x78c21(%rip), %rsi     # 0xc26c4
callq 0x1a690
movq %rax, -0xa8(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4aa80
movq (%rax), %rdi
addq $0x68, %rdi
movslq -0x44(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x50(%rbp), %rsi
callq 0x4aaa0
movq -0xa8(%rbp), %rdi
movq %rax, %rsi
callq 0x2e850
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x49a5f
callq 0x5add0
movq %rax, %rdi
leaq 0x78bc4(%rip), %rsi     # 0xc26c0
callq 0x5b110
movq %rax, %rdi
movq 0xb44a5(%rip), %rsi     # 0xfdfb0
callq 0x1a7c0
leaq -0x38(%rbp), %rdi
callq 0x4aac0
jmp 0x49964
jmp 0x49b20
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax)