// File: Kei18[P]pibt/./src/solver/ecbs.cpp
// Function: ECBS::AstarSearch(Agent*, CTNode*)
Nodes ECBS::AstarSearch(Agent* a, CTNode* node) {
  Constraint constraints = getConstraintsForAgent(node, a);

  Node* _s = a->getNode();
  Node* _g = a->getGoal();

  Nodes path, tmpPath, C;  // return

  // ==== fast implementation ====
  // constraint free
  if (constraints.empty()) {
    path = G->getPath(_s, _g);
    table_fmin.at(a->getId()) = path.size() - 1;
    return path;
  }

  // goal condition
  bool existGoalConstraint = false;
  int timeGoalConstraint = 0;
  for (auto c: constraints) {
    if (c->onNode && c->v == _g && c->t > timeGoalConstraint) {
      existGoalConstraint = true;
      timeGoalConstraint = c->t;
    }
  }
  // =============================

  auto paths = node->paths;

  int f, g;
  float ub;
  int ubori;
  std::string key, keyM, keyF;
  bool invalid = true;

  boost::heap::fibonacci_heap<Fib_AN> OPEN;
  std::unordered_map<std::string, boost::heap::fibonacci_heap<Fib_AN>::handle_type> SEARCHED;
  std::unordered_set<std::string> CLOSE;  // key
  AN* n = new AN { _s, 0, pathDist(_s, _g), nullptr };
  auto handle = OPEN.push(Fib_AN(n));
  key = getKey(n);
  SEARCHED.emplace(key, handle);

  bool updateMin = true;
  std::unordered_map<std::string, int> table_conflict;
  table_conflict.emplace(key, 0);
  // FOCUL
  boost::heap::fibonacci_heap<Fib_FN> FOCUL;
  std::unordered_map<std::string,
                     boost::heap::fibonacci_heap<Fib_FN>::handle_type> SEARCHED_F;

  while (!OPEN.empty()) {
    if (updateMin || FOCUL.empty()) {
      // argmin
      while (!OPEN.empty()
             && CLOSE.find(getKey(OPEN.top().node)) != CLOSE.end()) OPEN.pop();
      if (OPEN.empty()) break;
      n = OPEN.top().node;
      ubori = n->f;
      keyM = getKey(n);
      ub = n->f * w;
      // update focul
      FOCUL.clear();
      SEARCHED_F.clear();
      for (auto itr = OPEN.ordered_begin(); itr != OPEN.ordered_end(); ++itr) {
        AN* l = (*itr).node;
        if ((float)l->f <= ub) {
          if (CLOSE.find(getKey(l)) == CLOSE.end()) {
            key = getKey(l);
            auto handle_f = FOCUL.push(Fib_FN(l, table_conflict.at(key)));
            SEARCHED_F.emplace(key, handle_f);
          }
        } else {
          break;
        }
      }
    }

    // argmin in FOCUL
    n = FOCUL.top().node;
    key = getKey(n);
    FOCUL.pop();

    // already explored
    if (CLOSE.find(key) != CLOSE.end()) continue;

    // check goal
    if (n->v == _g) {
      if (!existGoalConstraint || timeGoalConstraint < n->g) {
        invalid = false;
        break;
      }
    }

    // update list
    updateMin = (key == keyM);
    CLOSE.emplace(key);

    // search neighbor
    C = G->neighbor(n->v);
    C.push_back(n->v);

    for (auto m : C) {
      g = n->g + 1;
      key = getKey(g, m);
      if (CLOSE.find(key) != CLOSE.end()) continue;

      // check constraints
      auto constraint = std::find_if(constraints.begin(), constraints.end(),
                                     [a, g, m, n] (Conflict* c) {
                                       if (c->a != a) return false;
                                       if (c->t != g) return false;
                                       if (c->onNode) return c->v == m;
                                       return c->v == m && c->u == n->v;
                                     });
      if (constraint != constraints.end()) continue;
      f = g + pathDist(m, _g);

      // ==== fast implementation ====
      // when field is huge, this works well
      // if (existGoalConstraint) {
      //   f = pathDist(m, _g) + timeGoalConstraint;
      // }
      // =============================

      auto itrS = SEARCHED.find(key);
      AN* l;
      bool updateH = false;
      if (itrS == SEARCHED.end()) {  // new node
        l = new AN { m, g, f, n };
        auto handle = OPEN.push(Fib_AN(l));
        SEARCHED.emplace(key, handle);
        getPartialPath(l, tmpPath);
        table_conflict.emplace(key, h3(a, tmpPath, paths));
      } else {
        auto handle = itrS->second;
        l = (*handle).node;
        if (l->f > f) {
          l->g = g;
          l->f = f;
          l->p = n;
          getPartialPath(l, tmpPath);
          table_conflict.at(key) = h3(a, tmpPath, paths);
          OPEN.increase(handle);
          updateH = true;
        }
      }

      tmpPath.clear();
      if (f <= ub) {
        auto itrSF = SEARCHED_F.find(key);
        if (itrSF == SEARCHED_F.end()) {
          auto handle_f = FOCUL.push(Fib_FN(l, table_conflict.at(key)));
          SEARCHED_F.emplace(key, handle_f);
        } else {
          if (updateH) {
            auto handle_f = itrSF->second;
            (*handle_f).h = table_conflict.at(key);
            FOCUL.increase(handle_f);
          }
        }
      }
    }
  }

  // back tracking
  int fmin = 0;
  if (!invalid) {  // check failed or not
    getPartialPath(n, path);
    fmin = ubori;
  } else {
    node->valid = false;
  }
  table_fmin.at(a->getId()) = fmin;

  return path;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x850, %rsp            # imm = 0x850
movq %rdi, -0x5f8(%rbp)
movq %rdi, %rax
movq %rax, -0x5f0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x5e8(%rbp)
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq -0x38(%rbp), %rdi
callq 0x5c350
movq -0x18(%rbp), %rdi
callq 0x51cb0
movq %rax, -0x5e0(%rbp)
jmp 0x7145a
movq -0x5e0(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x56820
movq %rax, -0x600(%rbp)
jmp 0x71477
movq -0x5f8(%rbp), %rdi
movq -0x600(%rbp), %rax
movq %rax, -0x58(%rbp)
movb $0x0, -0x59(%rbp)
callq 0x3e880
leaq -0x78(%rbp), %rdi
callq 0x3e880
leaq -0x90(%rbp), %rdi
callq 0x3e880
leaq -0x38(%rbp), %rdi
callq 0x62fa0
testb $0x1, %al
jne 0x714b9
jmp 0x715ac
movq -0x5e8(%rbp), %rax
movq 0x38(%rax), %rsi
movq -0x40(%rbp), %rdx
movq -0x58(%rbp), %rcx
movq (%rsi), %rax
movq 0x18(%rax), %rax
leaq -0xa8(%rbp), %rdi
callq *%rax
jmp 0x714de
movq -0x5f8(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
movq %rsi, -0x620(%rbp)
callq 0x3f230
movq -0x620(%rbp), %rdi
callq 0xd7d0
movq -0x5f8(%rbp), %rdi
callq 0x3b0e0
movq %rax, %rcx
movq -0x5e8(%rbp), %rax
decl %ecx
movl %ecx, -0x614(%rbp)
addq $0xb0, %rax
movq %rax, -0x610(%rbp)
movq -0x18(%rbp), %rdi
callq 0x63b50
movl %eax, -0x604(%rbp)
jmp 0x71540
movq -0x610(%rbp), %rdi
movl -0x604(%rbp), %eax
movl %eax, -0xac(%rbp)
leaq -0xac(%rbp), %rsi
callq 0x74640
movq %rax, -0x628(%rbp)
jmp 0x71568
movq -0x628(%rbp), %rax
movl -0x614(%rbp), %ecx
movl %ecx, (%rax)
movb $0x1, -0x59(%rbp)
movl $0x1, -0xb0(%rbp)
jmp 0x72870
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x728d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7288d
movb $0x0, -0xb1(%rbp)
movl $0x0, -0xb8(%rbp)
leaq -0x38(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rdi
callq 0x63230
movq %rax, -0xc8(%rbp)
movq -0xc0(%rbp), %rdi
callq 0x63260
movq %rax, -0xd0(%rbp)
leaq -0xc8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x63290
testb $0x1, %al
jne 0x71607
jmp 0x71677
leaq -0xc8(%rbp), %rdi
callq 0x632d0
movq (%rax), %rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
testb $0x1, 0x20(%rax)
je 0x71664
movq -0xd8(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x58(%rbp), %rax
jne 0x71664
movq -0xd8(%rbp), %rax
movl 0x8(%rax), %eax
cmpl -0xb8(%rbp), %eax
jle 0x71664
movb $0x1, -0xb1(%rbp)
movq -0xd8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0xb8(%rbp)
jmp 0x71666
leaq -0xc8(%rbp), %rdi
callq 0x632f0
jmp 0x715ee
movq -0x20(%rbp), %rsi
addq $0x18, %rsi
leaq -0xf0(%rbp), %rdi
callq 0x62db0
jmp 0x7168d
leaq -0x120(%rbp), %rdi
callq 0x86b0
leaq -0x140(%rbp), %rdi
callq 0x86b0
leaq -0x160(%rbp), %rdi
callq 0x86b0
movb $0x1, -0x161(%rbp)
leaq -0x190(%rbp), %rdi
leaq -0x191(%rbp), %rsi
callq 0x3eef0
jmp 0x716cd
leaq -0x1d0(%rbp), %rdi
callq 0x636c0
leaq -0x208(%rbp), %rdi
callq 0x636e0
movl $0x18, %edi
callq 0x84e0
movq %rax, -0x630(%rbp)
jmp 0x716f8
movq -0x5e8(%rbp), %rdi
movq -0x630(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, (%rax)
movl $0x0, 0x8(%rax)
addq $0xc, %rax
movq %rax, -0x640(%rbp)
movq -0x40(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0x9d410
movl %eax, -0x634(%rbp)
jmp 0x71734
movq -0x630(%rbp), %rax
movq -0x640(%rbp), %rcx
movl -0x634(%rbp), %edx
movl %edx, (%rcx)
movq $0x0, 0x10(%rax)
movq %rax, -0x210(%rbp)
movq -0x210(%rbp), %rsi
leaq -0x220(%rbp), %rdi
callq 0x3f050
jmp 0x7176e
leaq -0x190(%rbp), %rdi
leaq -0x220(%rbp), %rsi
callq 0x3ef90
movq %rax, -0x648(%rbp)
jmp 0x7178a
movq -0x648(%rbp), %rax
movq %rax, -0x218(%rbp)
movq -0x210(%rbp), %rsi
leaq -0x240(%rbp), %rdi
callq 0x9da10
jmp 0x717ad
leaq -0x120(%rbp), %rdi
movq %rdi, -0x660(%rbp)
leaq -0x240(%rbp), %rsi
movq %rsi, -0x668(%rbp)
callq 0x85f0
movq -0x668(%rbp), %rdi
callq 0x8330
movq -0x660(%rbp), %rsi
leaq -0x1d0(%rbp), %rdi
leaq -0x218(%rbp), %rdx
callq 0x63700
movb %dl, -0x651(%rbp)
movq %rax, -0x650(%rbp)
jmp 0x71803
movb -0x651(%rbp), %al
movq -0x650(%rbp), %rcx
movq %rcx, -0x250(%rbp)
movb %al, -0x248(%rbp)
movb $0x1, -0x251(%rbp)
leaq -0x290(%rbp), %rdi
movq %rdi, -0x680(%rbp)
callq 0x74670
movq -0x680(%rbp), %rdi
movl $0x0, -0x294(%rbp)
leaq -0x120(%rbp), %rsi
leaq -0x294(%rbp), %rdx
callq 0x74690
movb %dl, -0x671(%rbp)
movq %rax, -0x670(%rbp)
jmp 0x7186a
movb -0x671(%rbp), %al
movq -0x670(%rbp), %rcx
movq %rcx, -0x2a8(%rbp)
movb %al, -0x2a0(%rbp)
leaq -0x2d0(%rbp), %rdi
leaq -0x2d1(%rbp), %rsi
callq 0x746e0
jmp 0x71899
leaq -0x310(%rbp), %rdi
callq 0x74740
leaq -0x190(%rbp), %rdi
callq 0x3f0c0
movb %al, -0x681(%rbp)
jmp 0x718b9
movb -0x681(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x718ca
jmp 0x726c1
testb $0x1, -0x251(%rbp)
jne 0x718f6
leaq -0x2d0(%rbp), %rdi
callq 0x74760
movb %al, -0x682(%rbp)
jmp 0x718e7
movb -0x682(%rbp), %al
testb $0x1, %al
jne 0x718f6
jmp 0x71e1a
jmp 0x718f8
movb $0x0, -0x339(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x3f0c0
movb %al, -0x683(%rbp)
jmp 0x71913
movb -0x683(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x684(%rbp)
jne 0x719b6
jmp 0x7192c
leaq -0x190(%rbp), %rdi
callq 0x3f0f0
movq %rax, -0x690(%rbp)
jmp 0x71941
movq -0x690(%rbp), %rax
movq (%rax), %rsi
leaq -0x338(%rbp), %rdi
callq 0x9da10
jmp 0x71959
movb $0x1, -0x339(%rbp)
leaq -0x208(%rbp), %rdi
leaq -0x338(%rbp), %rsi
callq 0x637c0
movq %rax, -0x698(%rbp)
jmp 0x7197c
movq -0x698(%rbp), %rax
movq %rax, -0x318(%rbp)
leaq -0x208(%rbp), %rdi
callq 0x637f0
movq %rax, -0x348(%rbp)
leaq -0x318(%rbp), %rdi
leaq -0x348(%rbp), %rsi
callq 0x63790
movb %al, -0x684(%rbp)
movb -0x684(%rbp), %al
movb %al, -0x699(%rbp)
testb $0x1, -0x339(%rbp)
jne 0x719cd
jmp 0x719d9
leaq -0x338(%rbp), %rdi
callq 0x8330
movb -0x699(%rbp), %al
testb $0x1, %al
jne 0x719e8
jmp 0x71a89
leaq -0x190(%rbp), %rdi
callq 0x3f150
jmp 0x719f6
jmp 0x718f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7283e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7281a
movq -0x630(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
movl $0x18, %esi
callq 0x84f0
jmp 0x7281a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7280e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x727f6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
testb $0x1, -0x339(%rbp)
jne 0x71a78
jmp 0x71a84
leaq -0x338(%rbp), %rdi
callq 0x8330
jmp 0x727f6
leaq -0x190(%rbp), %rdi
callq 0x3f0c0
movb %al, -0x69a(%rbp)
jmp 0x71a9d
movb -0x69a(%rbp), %al
testb $0x1, %al
jne 0x71aa9
jmp 0x71aae
jmp 0x726c1
leaq -0x190(%rbp), %rdi
callq 0x3f0f0
movq %rax, -0x6a8(%rbp)
jmp 0x71ac3
movq -0x6a8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x210(%rbp)
movq -0x210(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x100(%rbp)
movq -0x210(%rbp), %rsi
leaq -0x368(%rbp), %rdi
callq 0x9da10
jmp 0x71af9
leaq -0x140(%rbp), %rdi
leaq -0x368(%rbp), %rsi
movq %rsi, -0x6b0(%rbp)
callq 0x85f0
movq -0x6b0(%rbp), %rdi
callq 0x8330
movq -0x5e8(%rbp), %rax
movq -0x210(%rbp), %rcx
cvtsi2ssl 0xc(%rcx), %xmm0
movss 0xa8(%rax), %xmm1
mulss %xmm1, %xmm0
movss %xmm0, -0xfc(%rbp)
leaq -0x2d0(%rbp), %rdi
callq 0x74790
jmp 0x71b54
leaq -0x310(%rbp), %rdi
callq 0x747f0
leaq -0x390(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x74810
jmp 0x71b75
jmp 0x71b77
leaq -0x3b8(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x748d0
jmp 0x71b8c
leaq -0x390(%rbp), %rdi
leaq -0x3b8(%rbp), %rsi
callq 0x74890
movb %al, -0x6b1(%rbp)
jmp 0x71ba7
leaq -0x3b8(%rbp), %rdi
callq 0x74910
movb -0x6b1(%rbp), %al
testb $0x1, %al
jne 0x71bfa
movl $0x8, -0xb0(%rbp)
jmp 0x71df9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x71e07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x3b8(%rbp), %rdi
callq 0x74910
jmp 0x71e07
leaq -0x390(%rbp), %rdi
callq 0x74930
movq %rax, -0x6c0(%rbp)
jmp 0x71c0f
movq -0x6c0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x3c0(%rbp)
movq -0x3c0(%rbp), %rax
cvtsi2ssl 0xc(%rax), %xmm1
movss -0xfc(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jb 0x71dd8
movq -0x3c0(%rbp), %rsi
leaq -0x3e8(%rbp), %rdi
callq 0x9da10
jmp 0x71c52
leaq -0x208(%rbp), %rdi
leaq -0x3e8(%rbp), %rsi
callq 0x637c0
movq %rax, -0x6c8(%rbp)
jmp 0x71c6e
movq -0x6c8(%rbp), %rax
movq %rax, -0x3c8(%rbp)
leaq -0x208(%rbp), %rdi
callq 0x637f0
movq %rax, -0x3f0(%rbp)
leaq -0x3c8(%rbp), %rdi
leaq -0x3f0(%rbp), %rsi
callq 0x74960
movb %al, -0x6c9(%rbp)
leaq -0x3e8(%rbp), %rdi
callq 0x8330
movb -0x6c9(%rbp), %al
testb $0x1, %al
jne 0x71cc3
jmp 0x71dd6
movq -0x3c0(%rbp), %rsi
leaq -0x410(%rbp), %rdi
callq 0x9da10
jmp 0x71cd8
leaq -0x120(%rbp), %rdi
movq %rdi, -0x6e8(%rbp)
leaq -0x410(%rbp), %rsi
movq %rsi, -0x6f0(%rbp)
callq 0x85f0
movq -0x6f0(%rbp), %rdi
callq 0x8330
movq -0x6e8(%rbp), %rsi
movq -0x3c0(%rbp), %rax
movq %rax, -0x6e0(%rbp)
leaq -0x290(%rbp), %rdi
callq 0x74a60
movq %rax, -0x6d8(%rbp)
jmp 0x71d2f
movq -0x6e0(%rbp), %rsi
movq -0x6d8(%rbp), %rax
movl (%rax), %edx
leaq -0x428(%rbp), %rdi
callq 0x74a90
jmp 0x71d4d
leaq -0x2d0(%rbp), %rdi
leaq -0x428(%rbp), %rsi
callq 0x74990
movq %rax, -0x6f8(%rbp)
jmp 0x71d69
movq -0x6f8(%rbp), %rax
movq %rax, -0x418(%rbp)
leaq -0x310(%rbp), %rdi
leaq -0x120(%rbp), %rsi
leaq -0x418(%rbp), %rdx
callq 0x74ac0
movb %dl, -0x701(%rbp)
movq %rax, -0x700(%rbp)
jmp 0x71da0
movb -0x701(%rbp), %al
movq -0x700(%rbp), %rcx
movq %rcx, -0x438(%rbp)
movb %al, -0x430(%rbp)
jmp 0x71dd6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x3e8(%rbp), %rdi
callq 0x8330
jmp 0x71e07
jmp 0x71de4
movl $0x8, -0xb0(%rbp)
jmp 0x71df9
jmp 0x71de6
leaq -0x390(%rbp), %rdi
callq 0x74b10
jmp 0x71df4
jmp 0x71b77
leaq -0x390(%rbp), %rdi
callq 0x74910
jmp 0x71e18
leaq -0x390(%rbp), %rdi
callq 0x74910
jmp 0x727f6
jmp 0x71e1a
leaq -0x2d0(%rbp), %rdi
callq 0x74b40
movq %rax, -0x710(%rbp)
jmp 0x71e2f
movq -0x710(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x210(%rbp)
movq -0x210(%rbp), %rsi
leaq -0x458(%rbp), %rdi
callq 0x9da10
jmp 0x71e55
leaq -0x120(%rbp), %rdi
leaq -0x458(%rbp), %rsi
movq %rsi, -0x718(%rbp)
callq 0x85f0
movq -0x718(%rbp), %rdi
callq 0x8330
leaq -0x2d0(%rbp), %rdi
callq 0x74ba0
jmp 0x71e89
leaq -0x208(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x637c0
movq %rax, -0x720(%rbp)
jmp 0x71ea5
movq -0x720(%rbp), %rax
movq %rax, -0x460(%rbp)
leaq -0x208(%rbp), %rdi
callq 0x637f0
movq %rax, -0x468(%rbp)
leaq -0x460(%rbp), %rdi
leaq -0x468(%rbp), %rsi
callq 0x63790
testb $0x1, %al
jne 0x71edf
jmp 0x71ee4
jmp 0x718a5
movq -0x210(%rbp), %rax
movq (%rax), %rax
cmpq -0x58(%rbp), %rax
jne 0x71f1d
testb $0x1, -0xb1(%rbp)
je 0x71f0f
movl -0xb8(%rbp), %eax
movq -0x210(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x71f1b
movb $0x0, -0x161(%rbp)
jmp 0x726c1
jmp 0x71f1d
leaq -0x120(%rbp), %rdi
movq %rdi, -0x738(%rbp)
leaq -0x140(%rbp), %rsi
callq 0x1fcc0
movq -0x738(%rbp), %rsi
movb %al, -0x251(%rbp)
leaq -0x208(%rbp), %rdi
callq 0x74c40
movb %dl, -0x729(%rbp)
movq %rax, -0x728(%rbp)
jmp 0x71f5f
movq -0x5e8(%rbp), %rax
movb -0x729(%rbp), %cl
movq -0x728(%rbp), %rdx
movq %rdx, -0x478(%rbp)
movb %cl, -0x470(%rbp)
movq 0x38(%rax), %rsi
movq -0x210(%rbp), %rax
movq (%rax), %rdx
leaq -0x490(%rbp), %rdi
callq 0x3c8d0
jmp 0x71f9c
leaq -0x90(%rbp), %rdi
movq %rdi, -0x740(%rbp)
leaq -0x490(%rbp), %rsi
movq %rsi, -0x748(%rbp)
callq 0x3f230
movq -0x748(%rbp), %rdi
callq 0xd7d0
movq -0x740(%rbp), %rdi
movq -0x210(%rbp), %rsi
callq 0x3f490
jmp 0x71fde
leaq -0x90(%rbp), %rax
movq %rax, -0x498(%rbp)
movq -0x498(%rbp), %rdi
callq 0x3b730
movq %rax, -0x4a0(%rbp)
movq -0x498(%rbp), %rdi
callq 0x3b760
movq %rax, -0x4a8(%rbp)
leaq -0x4a0(%rbp), %rdi
leaq -0x4a8(%rbp), %rsi
callq 0x3b790
testb $0x1, %al
jne 0x7202e
jmp 0x726bc
leaq -0x4a0(%rbp), %rdi
callq 0x3bb00
movq (%rax), %rax
movq %rax, -0x4b0(%rbp)
movq -0x210(%rbp), %rax
movl 0x8(%rax), %eax
incl %eax
movl %eax, -0xf8(%rbp)
movl -0xf8(%rbp), %esi
movq -0x4b0(%rbp), %rdx
leaq -0x4d0(%rbp), %rdi
callq 0x9d8c0
jmp 0x72071
leaq -0x120(%rbp), %rdi
movq %rdi, -0x758(%rbp)
leaq -0x4d0(%rbp), %rsi
movq %rsi, -0x760(%rbp)
callq 0x85f0
movq -0x760(%rbp), %rdi
callq 0x8330
movq -0x758(%rbp), %rsi
leaq -0x208(%rbp), %rdi
callq 0x637c0
movq %rax, -0x750(%rbp)
jmp 0x720ba
movq -0x750(%rbp), %rax
movq %rax, -0x4d8(%rbp)
leaq -0x208(%rbp), %rdi
callq 0x637f0
movq %rax, -0x4e0(%rbp)
leaq -0x4d8(%rbp), %rdi
leaq -0x4e0(%rbp), %rsi
callq 0x63790
testb $0x1, %al
jne 0x720f4
jmp 0x720f9
jmp 0x726ab
leaq -0x38(%rbp), %rdi
movq %rdi, -0x770(%rbp)
callq 0x63230
movq -0x770(%rbp), %rdi
movq %rax, -0x4f0(%rbp)
callq 0x63260
movq %rax, -0x4f8(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x518(%rbp)
movl -0xf8(%rbp), %eax
movl %eax, -0x510(%rbp)
movq -0x4b0(%rbp), %rax
movq %rax, -0x508(%rbp)
movq -0x210(%rbp), %rax
movq %rax, -0x500(%rbp)
movq -0x4f0(%rbp), %rdi
movq -0x4f8(%rbp), %rsi
movups -0x518(%rbp), %xmm0
movups -0x508(%rbp), %xmm1
movq %rsp, %rax
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x728f0
movq %rax, -0x768(%rbp)
jmp 0x7218a
movq -0x768(%rbp), %rax
movq %rax, -0x4e8(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x63260
movq %rax, -0x520(%rbp)
leaq -0x4e8(%rbp), %rdi
leaq -0x520(%rbp), %rsi
callq 0x63290
testb $0x1, %al
jne 0x721c1
jmp 0x721c6
jmp 0x726ab
movq -0x5e8(%rbp), %rdi
movl -0xf8(%rbp), %eax
movl %eax, -0x778(%rbp)
movq -0x4b0(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0x9d410
movl %eax, -0x774(%rbp)
jmp 0x721f1
movl -0x774(%rbp), %ecx
movl -0x778(%rbp), %eax
addl %ecx, %eax
movl %eax, -0xf4(%rbp)
leaq -0x1d0(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x63820
movq %rax, -0x780(%rbp)
jmp 0x72221
movq -0x780(%rbp), %rax
movq %rax, -0x528(%rbp)
movb $0x0, -0x531(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x63880
movq %rax, -0x540(%rbp)
leaq -0x528(%rbp), %rdi
leaq -0x540(%rbp), %rsi
callq 0x63850
testb $0x1, %al
jne 0x72265
jmp 0x723bf
movl $0x18, %edi
callq 0x84e0
movq %rax, -0x788(%rbp)
jmp 0x72278
movq -0x788(%rbp), %rax
movq -0x4b0(%rbp), %rcx
movq %rcx, (%rax)
movl -0xf8(%rbp), %ecx
movl %ecx, 0x8(%rax)
movl -0xf4(%rbp), %ecx
movl %ecx, 0xc(%rax)
movq -0x210(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq %rax, -0x530(%rbp)
movq -0x530(%rbp), %rsi
leaq -0x550(%rbp), %rdi
callq 0x3f050
jmp 0x722c2
leaq -0x190(%rbp), %rdi
leaq -0x550(%rbp), %rsi
callq 0x3ef90
movq %rax, -0x790(%rbp)
jmp 0x722de
movq -0x790(%rbp), %rax
movq %rax, -0x548(%rbp)
leaq -0x1d0(%rbp), %rdi
leaq -0x120(%rbp), %rsi
leaq -0x548(%rbp), %rdx
callq 0x63700
movb %dl, -0x799(%rbp)
movq %rax, -0x798(%rbp)
jmp 0x72315
movq -0x5e8(%rbp), %rdi
movb -0x799(%rbp), %al
movq -0x798(%rbp), %rcx
movq %rcx, -0x560(%rbp)
movb %al, -0x558(%rbp)
movq -0x530(%rbp), %rsi
leaq -0x78(%rbp), %rdx
callq 0x729b0
jmp 0x72348
movq -0x5e8(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x78(%rbp), %rdx
leaq -0xf0(%rbp), %rcx
callq 0x710e0
movl %eax, -0x7a0(%rbp)
jmp 0x7236b
movl -0x7a0(%rbp), %eax
movl %eax, -0x564(%rbp)
leaq -0x290(%rbp), %rdi
leaq -0x120(%rbp), %rsi
leaq -0x564(%rbp), %rdx
callq 0x74690
movb %dl, -0x7a9(%rbp)
movq %rax, -0x7a8(%rbp)
jmp 0x723a0
movb -0x7a9(%rbp), %al
movq -0x7a8(%rbp), %rcx
movq %rcx, -0x578(%rbp)
movb %al, -0x570(%rbp)
jmp 0x724d7
leaq -0x528(%rbp), %rdi
callq 0x638b0
movq 0x20(%rax), %rax
movq %rax, -0x580(%rbp)
leaq -0x580(%rbp), %rdi
callq 0x3f3b0
movq %rax, -0x7b8(%rbp)
jmp 0x723eb
movq -0x7b8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x530(%rbp)
movq -0x530(%rbp), %rax
movl 0xc(%rax), %eax
cmpl -0xf4(%rbp), %eax
jle 0x724d5
movq -0x5e8(%rbp), %rdi
movl -0xf8(%rbp), %ecx
movq -0x530(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0xf4(%rbp), %ecx
movq -0x530(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x210(%rbp), %rcx
movq -0x530(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x530(%rbp), %rsi
leaq -0x78(%rbp), %rdx
callq 0x729b0
jmp 0x7245d
movq -0x5e8(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x78(%rbp), %rdx
leaq -0xf0(%rbp), %rcx
callq 0x710e0
movl %eax, -0x7bc(%rbp)
jmp 0x72480
leaq -0x290(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x74a60
movq %rax, -0x7c8(%rbp)
jmp 0x7249c
movq -0x7c8(%rbp), %rax
movl -0x7bc(%rbp), %ecx
movl %ecx, (%rax)
movq -0x580(%rbp), %rax
movq %rax, -0x588(%rbp)
movq -0x588(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0x3f3e0
jmp 0x724ce
movb $0x1, -0x531(%rbp)
jmp 0x724d7
leaq -0x78(%rbp), %rdi
callq 0x3e9f0
cvtsi2ssl -0xf4(%rbp), %xmm1
movss -0xfc(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jb 0x726a9
leaq -0x310(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x74c80
movq %rax, -0x7d0(%rbp)
jmp 0x72515
movq -0x7d0(%rbp), %rax
movq %rax, -0x590(%rbp)
leaq -0x310(%rbp), %rdi
callq 0x74ce0
movq %rax, -0x598(%rbp)
leaq -0x590(%rbp), %rdi
leaq -0x598(%rbp), %rsi
callq 0x74cb0
testb $0x1, %al
jne 0x72552
jmp 0x7260c
movq -0x530(%rbp), %rax
movq %rax, -0x7e0(%rbp)
leaq -0x290(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x74a60
movq %rax, -0x7d8(%rbp)
jmp 0x7257c
movq -0x7e0(%rbp), %rsi
movq -0x7d8(%rbp), %rax
movl (%rax), %edx
leaq -0x5b0(%rbp), %rdi
callq 0x74a90
jmp 0x7259a
leaq -0x2d0(%rbp), %rdi
leaq -0x5b0(%rbp), %rsi
callq 0x74990
movq %rax, -0x7e8(%rbp)
jmp 0x725b6
movq -0x7e8(%rbp), %rax
movq %rax, -0x5a0(%rbp)
leaq -0x310(%rbp), %rdi
leaq -0x120(%rbp), %rsi
leaq -0x5a0(%rbp), %rdx
callq 0x74ac0
movb %dl, -0x7f1(%rbp)
movq %rax, -0x7f0(%rbp)
jmp 0x725ed
movb -0x7f1(%rbp), %al
movq -0x7f0(%rbp), %rcx
movq %rcx, -0x5c0(%rbp)
movb %al, -0x5b8(%rbp)
jmp 0x726a7
testb $0x1, -0x531(%rbp)
je 0x726a5
leaq -0x590(%rbp), %rdi
callq 0x74d10
movq 0x20(%rax), %rax
movq %rax, -0x5c8(%rbp)
leaq -0x290(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x74a60
movq %rax, -0x800(%rbp)
jmp 0x7264c
movq -0x800(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x80c(%rbp)
leaq -0x5c8(%rbp), %rdi
callq 0x74d40
movq %rax, -0x808(%rbp)
jmp 0x72670
movq -0x808(%rbp), %rax
movl -0x80c(%rbp), %ecx
movl %ecx, 0x8(%rax)
movq -0x5c8(%rbp), %rax
movq %rax, -0x5d0(%rbp)
movq -0x5d0(%rbp), %rsi
leaq -0x2d0(%rbp), %rdi
callq 0x74d70
jmp 0x726a3
jmp 0x726a5
jmp 0x726a7
jmp 0x726a9
jmp 0x726ab
leaq -0x4a0(%rbp), %rdi
callq 0x3bad0
jmp 0x72012
jmp 0x718a5
movl $0x0, -0x5d4(%rbp)
testb $0x1, -0x161(%rbp)
jne 0x726fe
movq -0x5f8(%rbp), %rdx
movq -0x5e8(%rbp), %rdi
movq -0x210(%rbp), %rsi
callq 0x729b0
jmp 0x726f0
movl -0x100(%rbp), %eax
movl %eax, -0x5d4(%rbp)
jmp 0x72706
movq -0x20(%rbp), %rax
movb $0x0, 0x40(%rax)
movq -0x5e8(%rbp), %rax
movl -0x5d4(%rbp), %ecx
movl %ecx, -0x81c(%rbp)
addq $0xb0, %rax
movq %rax, -0x818(%rbp)
movq -0x18(%rbp), %rdi
callq 0x63b50
movl %eax, -0x810(%rbp)
jmp 0x72737
movq -0x818(%rbp), %rdi
movl -0x810(%rbp), %eax
movl %eax, -0x5d8(%rbp)
leaq -0x5d8(%rbp), %rsi
callq 0x74640
movq %rax, -0x828(%rbp)
jmp 0x7275f
movq -0x828(%rbp), %rax
movl -0x81c(%rbp), %ecx
movl %ecx, (%rax)
movb $0x1, -0x59(%rbp)
movl $0x1, -0xb0(%rbp)
leaq -0x310(%rbp), %rdi
callq 0x74e20
leaq -0x2d0(%rbp), %rdi
callq 0x74e40
leaq -0x290(%rbp), %rdi
callq 0x74e80
leaq -0x208(%rbp), %rdi
callq 0x63930
leaq -0x1d0(%rbp), %rdi
callq 0x63950
leaq -0x190(%rbp), %rdi
callq 0x3f580
leaq -0x160(%rbp), %rdi
callq 0x8330
leaq -0x140(%rbp), %rdi
callq 0x8330
leaq -0x120(%rbp), %rdi
callq 0x8330
leaq -0xf0(%rbp), %rdi
callq 0xda10
jmp 0x72870
leaq -0x310(%rbp), %rdi
callq 0x74e20
leaq -0x2d0(%rbp), %rdi
callq 0x74e40
leaq -0x290(%rbp), %rdi
callq 0x74e80
leaq -0x208(%rbp), %rdi
callq 0x63930
leaq -0x1d0(%rbp), %rdi
callq 0x63950
leaq -0x190(%rbp), %rdi
callq 0x3f580
leaq -0x160(%rbp), %rdi
callq 0x8330
leaq -0x140(%rbp), %rdi
callq 0x8330
leaq -0x120(%rbp), %rdi
callq 0x8330
leaq -0xf0(%rbp), %rdi
callq 0xda10
jmp 0x7288d
leaq -0x90(%rbp), %rdi
callq 0xd7d0
leaq -0x78(%rbp), %rdi
callq 0xd7d0
testb $0x1, -0x59(%rbp)
jne 0x728bc
jmp 0x728b0
leaq -0x90(%rbp), %rdi
callq 0xd7d0
leaq -0x78(%rbp), %rdi
callq 0xd7d0
movq -0x5f8(%rbp), %rdi
callq 0xd7d0
jmp 0x728d5
movq -0x5f8(%rbp), %rdi
callq 0xd7d0
leaq -0x38(%rbp), %rdi
callq 0x62ea0
movq -0x5f0(%rbp), %rax
addq $0x850, %rsp            # imm = 0x850
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x62ea0
movq -0x48(%rbp), %rdi
callq 0x8880
nopw (%rax,%rax)