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

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

  // ==== fast implementation ====
  // constraint free
  if (constraints.empty()) return G->getPath(_s, _g);

  // know path
  std::string cKey = getCKey(_s, _g, constraints);
  auto itrK = knownPaths.find(cKey);
  if (itrK != knownPaths.end()) {
    if (itrK->second.empty()) node->valid = false;
    return itrK->second;
  }

  // previously computed path
  std::string dKey = cKey;
  if (!constraints.empty()) {
    while (*(dKey.end()-1) != '-') dKey.erase(dKey.end()-1);
    dKey.erase(dKey.end()-1);
  }
  Nodes dPath;
  itrK = knownPaths.find(dKey);
  if (itrK != knownPaths.end()) {
    dPath = itrK->second;
  }

  // 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;
    }
  }
  // =============================

  Nodes path, tmpPath, C;
  int f, g;
  std::string key;
  bool invalid = true;  // success or not

  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);

  while (!OPEN.empty()) {
    // argmin
    n = OPEN.top().node;

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

    // ==== fast implementation ====
    tmpPath = G->getPath(n->v, _g);
    if (validShorcut(a, n, _g, constraints, tmpPath)) {
      for (int i = 1; i < tmpPath.size(); ++i) {
        n = new AN { tmpPath[i], 0, 0, n };
      }
      invalid = false;
      break;
    }
    tmpPath.clear();

    // encount previously explored path
    if (!dPath.empty() && n->g <= dPath.size() - 1 && n->v == dPath[n->g]) {
      tmpPath = dPath;
      for (int i = 0; i < n->g; ++i) tmpPath.erase(tmpPath.begin());
      if (validShorcut(a, n, _g, constraints, tmpPath)) {
        for (int i = 1; i < tmpPath.size(); ++i) {
          n = new AN { tmpPath[i], 0, 0, n };
        }
        invalid = false;
        break;
      }
    }
    // =============================

    // update list
    OPEN.pop();
    CLOSE.emplace(getKey(n));

    // 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 ====
      if (!dPath.empty() && g <= dPath.size() - 1 && m == dPath[g]) {
        f = dPath.size() - 1;
      }
      // if (existGoalConstraint) {
      //   f = pathDist(m, _g) + timeGoalConstraint;
      // }
      // =============================

      auto itrS = SEARCHED.find(key);
      if (itrS == SEARCHED.end()) {  // new node
        AN* l = new AN { m, g, f, n };
        auto handle = OPEN.push(Fib_AN(l));
        SEARCHED.emplace(key, handle);
      } else {
        auto handle = itrS->second;
        AN* l = (*handle).node;
        if (l->f > f) {
          l->g = g;
          l->f = f;
          l->p = n;
        }
        OPEN.increase(handle);
      }
    }
  }

  // back tracking
  if (!invalid) {  // check failed or not
    while (n != nullptr) {
      path.push_back(n->v);
      n = n->p;
    }
    std::reverse(path.begin(), path.end());
  } else {
    node->valid = false;
  }
  knownPaths.emplace(cKey, path);

  return path;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x5f0, %rsp            # imm = 0x5F0
movq %rdi, -0x448(%rbp)
movq %rdi, %rax
movq %rax, -0x440(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x438(%rbp)
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq -0x38(%rbp), %rdi
callq 0x5c350
movq -0x18(%rbp), %rdi
callq 0x51cb0
movq %rax, -0x430(%rbp)
jmp 0x5b1ea
movq -0x430(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x56820
movq %rax, -0x450(%rbp)
jmp 0x5b207
movq -0x450(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x62fa0
testb $0x1, %al
jne 0x5b221
jmp 0x5b263
movq -0x448(%rbp), %rdi
movq -0x438(%rbp), %rax
movq 0x38(%rax), %rsi
movq -0x40(%rbp), %rdx
movq -0x58(%rbp), %rcx
movq (%rsi), %rax
movq 0x18(%rax), %rax
callq *%rax
jmp 0x5b246
movl $0x1, -0x5c(%rbp)
jmp 0x5c320
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x5c339
movq -0x438(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x58(%rbp), %rcx
leaq -0x80(%rbp), %rdi
leaq -0x38(%rbp), %r8
callq 0x5c460
jmp 0x5b281
movq -0x438(%rbp), %rdi
addq $0x70, %rdi
leaq -0x80(%rbp), %rsi
callq 0x635c0
movq %rax, -0x458(%rbp)
jmp 0x5b29e
movq -0x438(%rbp), %rdi
movq -0x458(%rbp), %rax
movq %rax, -0x88(%rbp)
addq $0x70, %rdi
callq 0x63620
movq %rax, -0x90(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x635f0
testb $0x1, %al
jne 0x5b2dc
jmp 0x5b342
leaq -0x88(%rbp), %rdi
callq 0x63650
movq %rax, %rdi
addq $0x20, %rdi
callq 0x3ec00
testb $0x1, %al
jne 0x5b2fa
jmp 0x5b315
movq -0x20(%rbp), %rax
movb $0x0, 0x40(%rax)
jmp 0x5b315
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x5c315
leaq -0x88(%rbp), %rdi
callq 0x63650
movq -0x448(%rbp), %rdi
movq %rax, %rsi
addq $0x20, %rsi
callq 0x3aff0
jmp 0x5b336
movl $0x1, -0x5c(%rbp)
jmp 0x5c30a
leaq -0xb0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x8230
jmp 0x5b354
leaq -0x38(%rbp), %rdi
callq 0x62fa0
testb $0x1, %al
jne 0x5b49e
jmp 0x5b367
leaq -0xb0(%rbp), %rdi
callq 0x82f0
movq %rax, -0xc0(%rbp)
leaq -0xc0(%rbp), %rdi
movl $0x1, %esi
callq 0x4c150
movq %rax, -0xb8(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x1b290
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x5b42f
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x468(%rbp)
callq 0x82f0
movq %rax, -0xd8(%rbp)
leaq -0xd8(%rbp), %rdi
movl $0x1, %esi
callq 0x4c150
movq %rax, -0xd0(%rbp)
leaq -0xc8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x63680
movq -0x468(%rbp), %rdi
movq -0xc8(%rbp), %rsi
callq 0x8600
movq %rax, -0x460(%rbp)
jmp 0x5b40b
movq -0x460(%rbp), %rax
movq %rax, -0xe0(%rbp)
jmp 0x5b367
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x5c2fc
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x478(%rbp)
callq 0x82f0
movq %rax, -0xf8(%rbp)
leaq -0xf8(%rbp), %rdi
movl $0x1, %esi
callq 0x4c150
movq %rax, -0xf0(%rbp)
leaq -0xe8(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x63680
movq -0x478(%rbp), %rdi
movq -0xe8(%rbp), %rsi
callq 0x8600
movq %rax, -0x470(%rbp)
jmp 0x5b490
movq -0x470(%rbp), %rax
movq %rax, -0x100(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x3e880
movq -0x438(%rbp), %rdi
addq $0x70, %rdi
leaq -0xb0(%rbp), %rsi
callq 0x635c0
movq %rax, -0x480(%rbp)
jmp 0x5b4ca
movq -0x438(%rbp), %rdi
movq -0x480(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rax
movq %rax, -0x88(%rbp)
addq $0x70, %rdi
callq 0x63620
movq %rax, -0x128(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x635f0
testb $0x1, %al
jne 0x5b516
jmp 0x5b54a
leaq -0x88(%rbp), %rdi
callq 0x63650
movq %rax, %rsi
addq $0x20, %rsi
leaq -0x118(%rbp), %rdi
callq 0x3eca0
jmp 0x5b537
jmp 0x5b54a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x5c2f0
movb $0x0, -0x129(%rbp)
movl $0x0, -0x130(%rbp)
leaq -0x38(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rdi
callq 0x63230
movq %rax, -0x140(%rbp)
movq -0x138(%rbp), %rdi
callq 0x63260
movq %rax, -0x148(%rbp)
leaq -0x140(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x63290
testb $0x1, %al
jne 0x5b5a5
jmp 0x5b615
leaq -0x140(%rbp), %rdi
callq 0x632d0
movq (%rax), %rax
movq %rax, -0x150(%rbp)
movq -0x150(%rbp), %rax
testb $0x1, 0x20(%rax)
je 0x5b602
movq -0x150(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x58(%rbp), %rax
jne 0x5b602
movq -0x150(%rbp), %rax
movl 0x8(%rax), %eax
cmpl -0x130(%rbp), %eax
jle 0x5b602
movb $0x1, -0x129(%rbp)
movq -0x150(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x130(%rbp)
jmp 0x5b604
leaq -0x140(%rbp), %rdi
callq 0x632f0
jmp 0x5b58c
movq -0x448(%rbp), %rdi
movb $0x0, -0x151(%rbp)
callq 0x3e880
leaq -0x170(%rbp), %rdi
callq 0x3e880
leaq -0x188(%rbp), %rdi
callq 0x3e880
leaq -0x1b0(%rbp), %rdi
callq 0x86b0
movb $0x1, -0x1b1(%rbp)
leaq -0x1e0(%rbp), %rdi
leaq -0x1e1(%rbp), %rsi
callq 0x3eef0
jmp 0x5b668
leaq -0x220(%rbp), %rdi
callq 0x636c0
leaq -0x258(%rbp), %rdi
callq 0x636e0
movl $0x18, %edi
callq 0x84e0
movq %rax, -0x488(%rbp)
jmp 0x5b693
movq -0x438(%rbp), %rdi
movq -0x488(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, (%rax)
movl $0x0, 0x8(%rax)
addq $0xc, %rax
movq %rax, -0x498(%rbp)
movq -0x40(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0x9d410
movl %eax, -0x48c(%rbp)
jmp 0x5b6cf
movq -0x488(%rbp), %rax
movq -0x498(%rbp), %rcx
movl -0x48c(%rbp), %edx
movl %edx, (%rcx)
movq $0x0, 0x10(%rax)
movq %rax, -0x260(%rbp)
movq -0x260(%rbp), %rsi
leaq -0x270(%rbp), %rdi
callq 0x3f050
jmp 0x5b709
leaq -0x1e0(%rbp), %rdi
leaq -0x270(%rbp), %rsi
callq 0x3ef90
movq %rax, -0x4a0(%rbp)
jmp 0x5b725
movq -0x4a0(%rbp), %rax
movq %rax, -0x268(%rbp)
movq -0x260(%rbp), %rsi
leaq -0x290(%rbp), %rdi
callq 0x9da10
jmp 0x5b748
leaq -0x1b0(%rbp), %rdi
movq %rdi, -0x4b8(%rbp)
leaq -0x290(%rbp), %rsi
movq %rsi, -0x4c0(%rbp)
callq 0x85f0
movq -0x4c0(%rbp), %rdi
callq 0x8330
movq -0x4b8(%rbp), %rsi
leaq -0x220(%rbp), %rdi
leaq -0x268(%rbp), %rdx
callq 0x63700
movb %dl, -0x4a9(%rbp)
movq %rax, -0x4a8(%rbp)
jmp 0x5b79e
movb -0x4a9(%rbp), %al
movq -0x4a8(%rbp), %rcx
movq %rcx, -0x2a0(%rbp)
movb %al, -0x298(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x3f0c0
movb %al, -0x4c1(%rbp)
jmp 0x5b7cc
movb -0x4c1(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x5b7dd
jmp 0x5c14c
leaq -0x1e0(%rbp), %rdi
callq 0x3f0f0
movq %rax, -0x4d0(%rbp)
jmp 0x5b7f2
movq -0x4d0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x260(%rbp)
movq -0x260(%rbp), %rax
movq (%rax), %rax
cmpq -0x58(%rbp), %rax
jne 0x5b880
testb $0x1, -0x129(%rbp)
je 0x5b82e
movl -0x130(%rbp), %eax
movq -0x260(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x5b87e
movb $0x0, -0x1b1(%rbp)
jmp 0x5c14c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x5c298
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x5c274
movq -0x488(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
movl $0x18, %esi
callq 0x84f0
jmp 0x5c274
jmp 0x5b880
movq -0x438(%rbp), %rax
movq 0x38(%rax), %rsi
movq -0x260(%rbp), %rax
movq (%rax), %rdx
movq -0x58(%rbp), %rcx
movq (%rsi), %rax
movq 0x18(%rax), %rax
leaq -0x2b8(%rbp), %rdi
callq *%rax
jmp 0x5b8ab
leaq -0x170(%rbp), %rdi
movq %rdi, -0x4e0(%rbp)
leaq -0x2b8(%rbp), %rsi
movq %rsi, -0x4e8(%rbp)
callq 0x3f230
movq -0x4e8(%rbp), %rdi
callq 0xd7d0
movq -0x438(%rbp), %rdi
movq -0x4e0(%rbp), %r9
movq -0x18(%rbp), %rsi
movq -0x260(%rbp), %rdx
movq -0x58(%rbp), %rcx
leaq -0x38(%rbp), %r8
callq 0x5c690
movb %al, -0x4d1(%rbp)
jmp 0x5b906
movb -0x4d1(%rbp), %al
testb $0x1, %al
jne 0x5b915
jmp 0x5b9be
movl $0x1, -0x2bc(%rbp)
movslq -0x2bc(%rbp), %rax
movq %rax, -0x4f0(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x3b0e0
movq %rax, %rcx
movq -0x4f0(%rbp), %rax
cmpq %rcx, %rax
jae 0x5b9b2
movl $0x18, %edi
callq 0x84e0
movq %rax, -0x4f8(%rbp)
jmp 0x5b95b
movslq -0x2bc(%rbp), %rsi
leaq -0x170(%rbp), %rdi
callq 0xda90
movq %rax, %rcx
movq -0x4f8(%rbp), %rax
movq (%rcx), %rcx
movq %rcx, (%rax)
movl $0x0, 0x8(%rax)
movl $0x0, 0xc(%rax)
movq -0x260(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq %rax, -0x260(%rbp)
movl -0x2bc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2bc(%rbp)
jmp 0x5b91f
movb $0x0, -0x1b1(%rbp)
jmp 0x5c14c
leaq -0x170(%rbp), %rdi
callq 0x3e9f0
leaq -0x118(%rbp), %rdi
callq 0x3ec00
testb $0x1, %al
jne 0x5bbcf
movq -0x260(%rbp), %rax
movslq 0x8(%rax), %rax
movq %rax, -0x500(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x3b0e0
movq %rax, %rcx
movq -0x500(%rbp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
ja 0x5bbcf
movq -0x260(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x508(%rbp)
movq -0x260(%rbp), %rax
movslq 0x8(%rax), %rsi
leaq -0x118(%rbp), %rdi
callq 0xda90
movq %rax, %rcx
movq -0x508(%rbp), %rax
cmpq (%rcx), %rax
jne 0x5bbcf
leaq -0x170(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x3eca0
jmp 0x5ba63
movl $0x0, -0x2c0(%rbp)
movl -0x2c0(%rbp), %eax
movq -0x260(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x5bae7
leaq -0x170(%rbp), %rdi
movq %rdi, -0x518(%rbp)
callq 0x3b730
movq %rax, -0x2d0(%rbp)
leaq -0x2c8(%rbp), %rdi
leaq -0x2d0(%rbp), %rsi
callq 0x3f680
movq -0x518(%rbp), %rdi
movq -0x2c8(%rbp), %rsi
callq 0x3f610
movq %rax, -0x510(%rbp)
jmp 0x5bac8
movq -0x510(%rbp), %rax
movq %rax, -0x2d8(%rbp)
movl -0x2c0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c0(%rbp)
jmp 0x5ba6d
movq -0x438(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x260(%rbp), %rdx
movq -0x58(%rbp), %rcx
leaq -0x38(%rbp), %r8
leaq -0x170(%rbp), %r9
callq 0x5c690
movb %al, -0x519(%rbp)
jmp 0x5bb15
movb -0x519(%rbp), %al
testb $0x1, %al
jne 0x5bb24
jmp 0x5bbcd
movl $0x1, -0x2dc(%rbp)
movslq -0x2dc(%rbp), %rax
movq %rax, -0x528(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x3b0e0
movq %rax, %rcx
movq -0x528(%rbp), %rax
cmpq %rcx, %rax
jae 0x5bbc1
movl $0x18, %edi
callq 0x84e0
movq %rax, -0x530(%rbp)
jmp 0x5bb6a
movslq -0x2dc(%rbp), %rsi
leaq -0x170(%rbp), %rdi
callq 0xda90
movq %rax, %rcx
movq -0x530(%rbp), %rax
movq (%rcx), %rcx
movq %rcx, (%rax)
movl $0x0, 0x8(%rax)
movl $0x0, 0xc(%rax)
movq -0x260(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq %rax, -0x260(%rbp)
movl -0x2dc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2dc(%rbp)
jmp 0x5bb2e
movb $0x0, -0x1b1(%rbp)
jmp 0x5c14c
jmp 0x5bbcf
leaq -0x1e0(%rbp), %rdi
callq 0x3f150
jmp 0x5bbdd
movq -0x260(%rbp), %rsi
leaq -0x300(%rbp), %rdi
callq 0x9da10
jmp 0x5bbf2
leaq -0x258(%rbp), %rdi
leaq -0x300(%rbp), %rsi
callq 0x63750
movb %dl, -0x539(%rbp)
movq %rax, -0x538(%rbp)
jmp 0x5bc14
movb -0x539(%rbp), %al
movq -0x538(%rbp), %rcx
movq %rcx, -0x310(%rbp)
movb %al, -0x308(%rbp)
leaq -0x300(%rbp), %rdi
callq 0x8330
movq -0x438(%rbp), %rax
movq 0x38(%rax), %rsi
movq -0x260(%rbp), %rax
movq (%rax), %rdx
leaq -0x328(%rbp), %rdi
callq 0x3c8d0
jmp 0x5bc5d
leaq -0x188(%rbp), %rdi
movq %rdi, -0x548(%rbp)
leaq -0x328(%rbp), %rsi
movq %rsi, -0x550(%rbp)
callq 0x3f230
movq -0x550(%rbp), %rdi
callq 0xd7d0
movq -0x548(%rbp), %rdi
movq -0x260(%rbp), %rsi
callq 0x3f490
jmp 0x5bc9f
leaq -0x188(%rbp), %rax
movq %rax, -0x330(%rbp)
movq -0x330(%rbp), %rdi
callq 0x3b730
movq %rax, -0x338(%rbp)
movq -0x330(%rbp), %rdi
callq 0x3b760
movq %rax, -0x340(%rbp)
leaq -0x338(%rbp), %rdi
leaq -0x340(%rbp), %rsi
callq 0x3b790
testb $0x1, %al
jne 0x5bcef
jmp 0x5c147
leaq -0x338(%rbp), %rdi
callq 0x3bb00
movq (%rax), %rax
movq %rax, -0x348(%rbp)
movq -0x260(%rbp), %rax
movl 0x8(%rax), %eax
incl %eax
movl %eax, -0x190(%rbp)
movl -0x190(%rbp), %esi
movq -0x348(%rbp), %rdx
leaq -0x368(%rbp), %rdi
callq 0x9d8c0
jmp 0x5bd32
leaq -0x1b0(%rbp), %rdi
movq %rdi, -0x560(%rbp)
leaq -0x368(%rbp), %rsi
movq %rsi, -0x568(%rbp)
callq 0x85f0
movq -0x568(%rbp), %rdi
callq 0x8330
movq -0x560(%rbp), %rsi
leaq -0x258(%rbp), %rdi
callq 0x637c0
movq %rax, -0x558(%rbp)
jmp 0x5bd7b
movq -0x558(%rbp), %rax
movq %rax, -0x370(%rbp)
leaq -0x258(%rbp), %rdi
callq 0x637f0
movq %rax, -0x378(%rbp)
leaq -0x370(%rbp), %rdi
leaq -0x378(%rbp), %rsi
callq 0x63790
testb $0x1, %al
jne 0x5bdb5
jmp 0x5bdd7
jmp 0x5c136
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x300(%rbp), %rdi
callq 0x8330
jmp 0x5c274
leaq -0x38(%rbp), %rdi
movq %rdi, -0x578(%rbp)
callq 0x63230
movq -0x578(%rbp), %rdi
movq %rax, -0x388(%rbp)
callq 0x63260
movq %rax, -0x390(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x3b0(%rbp)
movl -0x190(%rbp), %eax
movl %eax, -0x3a8(%rbp)
movq -0x348(%rbp), %rax
movq %rax, -0x3a0(%rbp)
movq -0x260(%rbp), %rax
movq %rax, -0x398(%rbp)
movq -0x388(%rbp), %rdi
movq -0x390(%rbp), %rsi
movups -0x3b0(%rbp), %xmm0
movups -0x3a0(%rbp), %xmm1
movq %rsp, %rax
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x5c750
movq %rax, -0x570(%rbp)
jmp 0x5be68
movq -0x570(%rbp), %rax
movq %rax, -0x380(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x63260
movq %rax, -0x3b8(%rbp)
leaq -0x380(%rbp), %rdi
leaq -0x3b8(%rbp), %rsi
callq 0x63290
testb $0x1, %al
jne 0x5be9f
jmp 0x5bea4
jmp 0x5c136
movq -0x438(%rbp), %rdi
movl -0x190(%rbp), %eax
movl %eax, -0x580(%rbp)
movq -0x348(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0x9d410
movl %eax, -0x57c(%rbp)
jmp 0x5becf
movl -0x57c(%rbp), %ecx
movl -0x580(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x18c(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x3ec00
testb $0x1, %al
jne 0x5bf66
movslq -0x190(%rbp), %rax
movq %rax, -0x588(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x3b0e0
movq %rax, %rcx
movq -0x588(%rbp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
ja 0x5bf66
movq -0x348(%rbp), %rax
movq %rax, -0x590(%rbp)
movslq -0x190(%rbp), %rsi
leaq -0x118(%rbp), %rdi
callq 0xda90
movq %rax, %rcx
movq -0x590(%rbp), %rax
cmpq (%rcx), %rax
jne 0x5bf66
leaq -0x118(%rbp), %rdi
callq 0x3b0e0
subq $0x1, %rax
movl %eax, -0x18c(%rbp)
leaq -0x220(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x63820
movq %rax, -0x598(%rbp)
jmp 0x5bf82
movq -0x598(%rbp), %rax
movq %rax, -0x3c0(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x63880
movq %rax, -0x3c8(%rbp)
leaq -0x3c0(%rbp), %rdi
leaq -0x3c8(%rbp), %rsi
callq 0x63850
testb $0x1, %al
jne 0x5bfbf
jmp 0x5c08e
movl $0x18, %edi
callq 0x84e0
movq %rax, -0x5a0(%rbp)
jmp 0x5bfd2
movq -0x5a0(%rbp), %rax
movq -0x348(%rbp), %rcx
movq %rcx, (%rax)
movl -0x190(%rbp), %ecx
movl %ecx, 0x8(%rax)
movl -0x18c(%rbp), %ecx
movl %ecx, 0xc(%rax)
movq -0x260(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq %rax, -0x3d0(%rbp)
movq -0x3d0(%rbp), %rsi
leaq -0x3e0(%rbp), %rdi
callq 0x3f050
jmp 0x5c01c
leaq -0x1e0(%rbp), %rdi
leaq -0x3e0(%rbp), %rsi
callq 0x3ef90
movq %rax, -0x5a8(%rbp)
jmp 0x5c038
movq -0x5a8(%rbp), %rax
movq %rax, -0x3d8(%rbp)
leaq -0x220(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
leaq -0x3d8(%rbp), %rdx
callq 0x63700
movb %dl, -0x5b1(%rbp)
movq %rax, -0x5b0(%rbp)
jmp 0x5c06f
movb -0x5b1(%rbp), %al
movq -0x5b0(%rbp), %rcx
movq %rcx, -0x3f0(%rbp)
movb %al, -0x3e8(%rbp)
jmp 0x5c134
leaq -0x3c0(%rbp), %rdi
callq 0x638b0
movq 0x20(%rax), %rax
movq %rax, -0x3f8(%rbp)
leaq -0x3f8(%rbp), %rdi
callq 0x3f3b0
movq %rax, -0x5c0(%rbp)
jmp 0x5c0ba
movq -0x5c0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x400(%rbp)
movq -0x400(%rbp), %rax
movl 0xc(%rax), %eax
cmpl -0x18c(%rbp), %eax
jle 0x5c10f
movl -0x190(%rbp), %ecx
movq -0x400(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x18c(%rbp), %ecx
movq -0x400(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x260(%rbp), %rcx
movq -0x400(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x3f8(%rbp), %rax
movq %rax, -0x408(%rbp)
movq -0x408(%rbp), %rsi
leaq -0x1e0(%rbp), %rdi
callq 0x3f3e0
jmp 0x5c132
jmp 0x5c134
jmp 0x5c136
leaq -0x338(%rbp), %rdi
callq 0x3bad0
jmp 0x5bcd3
jmp 0x5b7b8
testb $0x1, -0x1b1(%rbp)
jne 0x5c1c7
jmp 0x5c157
cmpq $0x0, -0x260(%rbp)
je 0x5c18a
movq -0x448(%rbp), %rdi
movq -0x260(%rbp), %rsi
callq 0x3f490
jmp 0x5c176
movq -0x260(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x260(%rbp)
jmp 0x5c157
movq -0x448(%rbp), %rdi
callq 0x3b730
movq -0x448(%rbp), %rdi
movq %rax, -0x410(%rbp)
callq 0x3b760
movq %rax, -0x418(%rbp)
movq -0x410(%rbp), %rdi
movq -0x418(%rbp), %rsi
callq 0x3f500
jmp 0x5c1c5
jmp 0x5c1cf
movq -0x20(%rbp), %rax
movb $0x0, 0x40(%rax)
movq -0x448(%rbp), %rdx
movq -0x438(%rbp), %rdi
addq $0x70, %rdi
leaq -0x80(%rbp), %rsi
callq 0x638e0
movb %dl, -0x5c9(%rbp)
movq %rax, -0x5c8(%rbp)
jmp 0x5c1f9
movb -0x5c9(%rbp), %al
movq -0x5c8(%rbp), %rcx
movq %rcx, -0x428(%rbp)
movb %al, -0x420(%rbp)
movb $0x1, -0x151(%rbp)
movl $0x1, -0x5c(%rbp)
leaq -0x258(%rbp), %rdi
callq 0x63930
leaq -0x220(%rbp), %rdi
callq 0x63950
leaq -0x1e0(%rbp), %rdi
callq 0x3f580
leaq -0x1b0(%rbp), %rdi
callq 0x8330
leaq -0x188(%rbp), %rdi
callq 0xd7d0
leaq -0x170(%rbp), %rdi
callq 0xd7d0
testb $0x1, -0x151(%rbp)
jne 0x5c2d6
jmp 0x5c2ca
leaq -0x258(%rbp), %rdi
callq 0x63930
leaq -0x220(%rbp), %rdi
callq 0x63950
leaq -0x1e0(%rbp), %rdi
callq 0x3f580
leaq -0x1b0(%rbp), %rdi
callq 0x8330
leaq -0x188(%rbp), %rdi
callq 0xd7d0
leaq -0x170(%rbp), %rdi
callq 0xd7d0
movq -0x448(%rbp), %rdi
callq 0xd7d0
jmp 0x5c2f0
movq -0x448(%rbp), %rdi
callq 0xd7d0
leaq -0x118(%rbp), %rdi
callq 0xd7d0
leaq -0xb0(%rbp), %rdi
callq 0x8330
jmp 0x5c30a
leaq -0x118(%rbp), %rdi
callq 0xd7d0
leaq -0xb0(%rbp), %rdi
callq 0x8330
jmp 0x5c315
leaq -0x80(%rbp), %rdi
callq 0x8330
jmp 0x5c320
leaq -0x80(%rbp), %rdi
callq 0x8330
jmp 0x5c339
leaq -0x38(%rbp), %rdi
callq 0x62ea0
movq -0x440(%rbp), %rax
addq $0x5f0, %rsp            # imm = 0x5F0
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x62ea0
movq -0x48(%rbp), %rdi
callq 0x8880
nopl (%rax,%rax)