// File: Kei18[P]pibt/./src/solver/tp.cpp
// Function: TP::getPickDelivPath(Agent*, Node*, Node*, Node*, int, bool)
Nodes TP::getPickDelivPath(Agent* a,
                           Node* s,
                           Node* g1,
                           Node* g2,
                           int startTime,
                           bool futureCollision)
{
  Nodes path;
  Nodes C;
  AN2 *l, *n;
  int t, f, cost;
  std::string key;
  bool prohibited, goalCheck;

  Nodes pathends;
  Node* v;
  for (auto p : paths) {
    v = p[p.size() - 1];
    if (v != s && v != a->getNode()) pathends.push_back(v);
  }
  int cost_g1tog2 = pathDist(g1, g2, pathends);

  std::unordered_set<std::string> OPEN;
  std::unordered_map<std::string, AN2*> table;

  t = startTime - 1;
  l = new AN2 { s, g1, true, startTime - 1,
                pathDist(s, g1) + cost_g1tog2,
                nullptr };
  key = getKey(t, s);
  table.emplace(key, l);
  OPEN = { key };

  while (!OPEN.empty()) {
    // argmin
    auto itr1 = std::min_element(OPEN.begin(), OPEN.end(),
                                 [&table] (std::string a, std::string b)
                                 { auto eleA = table.at(a);
                                   auto eleB = table.at(b);
                                   if (eleA->f == eleB->f) {
                                     return eleA->t > eleB->t;
                                   }
                                   return eleA->f < eleB->f;
                                 });
    key = *itr1;
    n = table.at(key);
    t = n->t;

    // check goal
    if (n->v == n->g && n->g == g2) {
      goalCheck = true;

      if (futureCollision) {
        for (auto p : paths) {
          if (t + 1 >= p.size()) continue;

          for (auto itr = p.begin() + t + 1; itr < p.end(); ++itr) {
            if ((*itr) == n->v) {  // collision in future
              goalCheck = false;
              break;
            }
          }
          if (!goalCheck) break;
        }
      }

      if (goalCheck) break;

    } else if (n->v == n->g && n->g == g1) {
      n->g = g2;  // next target
    }

    // update list
    n->open = false;
    OPEN.erase(itr1);

    // search neighbor
    C = { n->v };
    for (auto u : G->neighbor(n->v)) {
      if (!inArray(u, pathends)) C.push_back(u);
    }

    for (auto m : C) {
      t = n->t + 1;

      if (t > 0) {
        prohibited = false;

        for (auto p : paths) {
          if (t + 1 > p.size()) continue;
          if (p[t] == m) { // collision
            prohibited = true;
            break;
          }
          if (p[t] == n->v && p[t-1] == m) {  // intersection
            prohibited = true;
            break;
          }
        }

        if (prohibited) continue;
      }

      key = getKey(t, m);
      auto itr2 = table.find(key);
      if (itr2 == table.end()) {
        table.emplace(key, new AN2 { m, n->g, true, t, 100000, n });
      }
      l = table.at(key);
      if (!l->open) continue;

      // cost = pathDist(m, n->g, pathends);
      cost = pathDist(m, n->g);
      f = t + cost;
      if (n->g == g1) f += cost_g1tog2;

      if (l->f > f) {
        l->t = t;
        l->f = f;
        l->p = n;
      }

      OPEN.insert(key);
    }
  }

  // back tracking
  if (n->v == g2) {  // check failed or not
    while (n->p) {
      path.push_back(n->v);
      n = n->p;
    }
    path.push_back(s);
    std::reverse(path.begin(), path.end());
  }

  return path;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4a0, %rsp            # imm = 0x4A0
movq %rdi, -0x378(%rbp)
movq %rdi, %rax
movq %rax, -0x370(%rbp)
movb 0x18(%rbp), %al
movl 0x10(%rbp), %r10d
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
andb $0x1, %al
movb %al, -0x31(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x368(%rbp)
movb $0x0, -0x32(%rbp)
callq 0x3e880
leaq -0x50(%rbp), %rdi
callq 0x3e880
leaq -0x90(%rbp), %rdi
callq 0x86b0
leaq -0xb0(%rbp), %rdi
callq 0x3e880
movq -0x368(%rbp), %rax
addq $0x88, %rax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rdi
callq 0x377e0
movq %rax, -0xc8(%rbp)
movq -0xc0(%rbp), %rdi
callq 0x37500
movq %rax, -0xd0(%rbp)
leaq -0xc8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x4e640
testb $0x1, %al
jne 0xa1f5b
jmp 0xa2053
leaq -0xc8(%rbp), %rdi
callq 0x37d00
movq %rax, %rsi
leaq -0xe8(%rbp), %rdi
callq 0x3aff0
jmp 0xa1f78
leaq -0xe8(%rbp), %rdi
callq 0x3b0e0
movq %rax, %rsi
subq $0x1, %rsi
leaq -0xe8(%rbp), %rdi
callq 0xda90
movq (%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0xa2036
movq -0xb8(%rbp), %rax
movq %rax, -0x388(%rbp)
movq -0x18(%rbp), %rdi
callq 0x51cb0
movq %rax, -0x380(%rbp)
jmp 0xa1fd2
movq -0x388(%rbp), %rax
movq -0x380(%rbp), %rcx
cmpq %rcx, %rax
je 0xa2036
leaq -0xb0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x3f490
jmp 0xa1ffa
jmp 0xa2036
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
jmp 0xa2cfc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0xd7d0
jmp 0xa2cfc
leaq -0xe8(%rbp), %rdi
callq 0xd7d0
leaq -0xc8(%rbp), %rdi
callq 0x4e750
jmp 0xa1f3f
movq -0x368(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
leaq -0xb0(%rbp), %rcx
callq 0x9d840
movl %eax, -0x38c(%rbp)
jmp 0xa2076
movl -0x38c(%rbp), %eax
movl %eax, -0xf8(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x636e0
leaq -0x168(%rbp), %rdi
callq 0xa5840
movl 0x10(%rbp), %eax
decl %eax
movl %eax, -0x64(%rbp)
movl $0x28, %edi
callq 0x84e0
movq %rax, -0x398(%rbp)
jmp 0xa20b5
movq -0x368(%rbp), %rdi
movq -0x398(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x8(%rax)
movb $0x1, 0x10(%rax)
movl 0x10(%rbp), %ecx
decl %ecx
movl %ecx, 0x14(%rax)
addq $0x18, %rax
movq %rax, -0x3a8(%rbp)
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x9d410
movl %eax, -0x39c(%rbp)
jmp 0xa20fe
movq -0x398(%rbp), %rax
movq -0x3a8(%rbp), %rcx
movl -0x39c(%rbp), %edx
movl -0xf8(%rbp), %esi
addl %esi, %edx
movl %edx, (%rcx)
movq $0x0, 0x20(%rax)
movq %rax, -0x58(%rbp)
movl -0x64(%rbp), %esi
movq -0x20(%rbp), %rdx
leaq -0x188(%rbp), %rdi
callq 0x9d8c0
jmp 0xa213d
leaq -0x90(%rbp), %rdi
movq %rdi, -0x3c0(%rbp)
leaq -0x188(%rbp), %rsi
movq %rsi, -0x3c8(%rbp)
callq 0x85f0
movq -0x3c8(%rbp), %rdi
callq 0x8330
movq -0x3c0(%rbp), %rsi
leaq -0x168(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0xa5860
movb %dl, -0x3b1(%rbp)
movq %rax, -0x3b0(%rbp)
jmp 0xa2190
movb -0x3b1(%rbp), %al
movq -0x3b0(%rbp), %rcx
movq %rcx, -0x198(%rbp)
movb %al, -0x190(%rbp)
leaq -0x1c8(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
leaq -0x90(%rbp), %rsi
callq 0x8230
jmp 0xa21c6
leaq -0x1c8(%rbp), %rax
movq %rax, -0x1a8(%rbp)
movq $0x1, -0x1a0(%rbp)
movq -0x1a8(%rbp), %rsi
movq -0x1a0(%rbp), %rdx
leaq -0x130(%rbp), %rdi
callq 0xa55c0
jmp 0xa21fb
leaq -0x1c8(%rbp), %rax
movq %rax, -0x3d8(%rbp)
addq $0x20, %rax
movq %rax, -0x3d0(%rbp)
movq -0x3d0(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x3e0(%rbp)
callq 0x8330
movq -0x3d8(%rbp), %rcx
movq -0x3e0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x3d0(%rbp)
jne 0xa2214
jmp 0xa2247
leaq -0x130(%rbp), %rdi
callq 0xa5610
xorb $-0x1, %al
testb $0x1, %al
jne 0xa225e
jmp 0xa2c0c
leaq -0x130(%rbp), %rdi
movq %rdi, -0x3f0(%rbp)
callq 0xa5630
movq -0x3f0(%rbp), %rdi
movq %rax, -0x1e0(%rbp)
callq 0x637f0
movq %rax, -0x1e8(%rbp)
leaq -0x168(%rbp), %rax
movq %rax, -0x1f0(%rbp)
movq -0x1e0(%rbp), %rdi
movq -0x1e8(%rbp), %rsi
movq -0x1f0(%rbp), %rdx
callq 0xa3eb0
movq %rax, -0x3e8(%rbp)
jmp 0xa22bc
movq -0x3e8(%rbp), %rax
movq %rax, -0x1d8(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0xa5660
movq %rax, %rsi
leaq -0x90(%rbp), %rdi
callq 0x8070
jmp 0xa22e7
leaq -0x168(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0xa58b0
movq %rax, -0x3f8(%rbp)
jmp 0xa2303
movq -0x3f8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x64(%rbp)
movq -0x60(%rbp), %rax
movq (%rax), %rax
movq -0x60(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0xa2615
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x30(%rbp), %rax
jne 0xa2615
movb $0x1, -0x92(%rbp)
testb $0x1, -0x31(%rbp)
je 0xa2605
movq -0x368(%rbp), %rax
addq $0x88, %rax
movq %rax, -0x1f8(%rbp)
movq -0x1f8(%rbp), %rdi
callq 0x377e0
movq %rax, -0x200(%rbp)
movq -0x1f8(%rbp), %rdi
callq 0x37500
movq %rax, -0x208(%rbp)
leaq -0x200(%rbp), %rdi
leaq -0x208(%rbp), %rsi
callq 0x4e640
testb $0x1, %al
jne 0xa23a9
jmp 0xa2603
leaq -0x200(%rbp), %rdi
callq 0x37d00
movq %rax, %rsi
leaq -0x220(%rbp), %rdi
callq 0x3aff0
jmp 0xa23c6
movl -0x64(%rbp), %eax
addl $0x1, %eax
cltq
movq %rax, -0x400(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x3b0e0
movq %rax, %rcx
movq -0x400(%rbp), %rax
cmpq %rcx, %rax
jb 0xa2505
movl $0x7, -0x224(%rbp)
jmp 0xa25c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
jmp 0xa2ce4
movq -0x398(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
movl $0x28, %esi
callq 0x84f0
jmp 0xa2ce4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
movq -0x1d0(%rbp), %rax
leaq -0x1c8(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x408(%rbp)
je 0xa249f
movq -0x408(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x410(%rbp)
callq 0x8330
movq -0x410(%rbp), %rax
leaq -0x1c8(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x408(%rbp)
jne 0xa246e
jmp 0xa2ce4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
leaq -0x1c8(%rbp), %rax
movq %rax, -0x420(%rbp)
addq $0x20, %rax
movq %rax, -0x418(%rbp)
movq -0x418(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x428(%rbp)
callq 0x8330
movq -0x420(%rbp), %rcx
movq -0x428(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x418(%rbp)
jne 0xa24cf
jmp 0xa2ce4
leaq -0x220(%rbp), %rdi
callq 0x3b730
movq %rax, -0x240(%rbp)
movslq -0x64(%rbp), %rsi
leaq -0x240(%rbp), %rdi
callq 0x413f0
movq %rax, -0x238(%rbp)
leaq -0x238(%rbp), %rdi
movl $0x1, %esi
callq 0x413f0
movq %rax, -0x230(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x3b760
movq %rax, -0x248(%rbp)
leaq -0x230(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x468e0
testb $0x1, %al
jne 0xa2573
jmp 0xa25a4
leaq -0x230(%rbp), %rdi
callq 0x3bb00
movq (%rax), %rax
movq -0x60(%rbp), %rcx
cmpq (%rcx), %rax
jne 0xa2594
movb $0x0, -0x92(%rbp)
jmp 0xa25a4
jmp 0xa2596
leaq -0x230(%rbp), %rdi
callq 0x3bad0
jmp 0xa2547
testb $0x1, -0x92(%rbp)
jne 0xa25b9
movl $0x6, -0x224(%rbp)
jmp 0xa25c3
movl $0x0, -0x224(%rbp)
leaq -0x220(%rbp), %rdi
callq 0xd7d0
movl -0x224(%rbp), %eax
movl %eax, -0x42c(%rbp)
testl %eax, %eax
je 0xa25f0
jmp 0xa25e1
movl -0x42c(%rbp), %eax
subl $0x6, %eax
je 0xa2603
jmp 0xa25ee
jmp 0xa25f2
jmp 0xa25f2
leaq -0x200(%rbp), %rdi
callq 0x4e750
jmp 0xa238d
jmp 0xa2605
testb $0x1, -0x92(%rbp)
je 0xa2613
jmp 0xa2c0c
jmp 0xa2642
movq -0x60(%rbp), %rax
movq (%rax), %rax
movq -0x60(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0xa2640
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x28(%rbp), %rax
jne 0xa2640
movq -0x30(%rbp), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0xa2642
movq -0x60(%rbp), %rax
movb $0x0, 0x10(%rax)
movq -0x1d8(%rbp), %rax
movq %rax, -0x250(%rbp)
movq -0x250(%rbp), %rsi
leaq -0x130(%rbp), %rdi
callq 0xa56c0
movq %rax, -0x438(%rbp)
jmp 0xa2674
movq -0x438(%rbp), %rax
movq %rax, -0x258(%rbp)
movq -0x60(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x270(%rbp)
leaq -0x270(%rbp), %rax
movq %rax, -0x268(%rbp)
movq $0x1, -0x260(%rbp)
movq -0x268(%rbp), %rsi
movq -0x260(%rbp), %rdx
leaq -0x50(%rbp), %rdi
callq 0x97100
jmp 0xa26c2
movq -0x368(%rbp), %rax
movq 0x38(%rax), %rsi
movq -0x60(%rbp), %rax
movq (%rax), %rdx
leaq -0x290(%rbp), %rdi
callq 0x3c8d0
jmp 0xa26e2
leaq -0x290(%rbp), %rax
movq %rax, -0x278(%rbp)
movq -0x278(%rbp), %rdi
callq 0x3b730
movq %rax, -0x298(%rbp)
movq -0x278(%rbp), %rdi
callq 0x3b760
movq %rax, -0x2a0(%rbp)
leaq -0x298(%rbp), %rdi
leaq -0x2a0(%rbp), %rsi
callq 0x3b790
testb $0x1, %al
jne 0xa2748
movl $0xb, -0x224(%rbp)
leaq -0x290(%rbp), %rdi
callq 0xd7d0
jmp 0xa27cf
leaq -0x298(%rbp), %rdi
callq 0x3bb00
movq (%rax), %rax
movq %rax, -0x2a8(%rbp)
movq -0x2a8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0xa3e40
movb %al, -0x439(%rbp)
jmp 0xa2779
movb -0x439(%rbp), %al
testb $0x1, %al
jne 0xa27bc
jmp 0xa2785
leaq -0x50(%rbp), %rdi
leaq -0x2a8(%rbp), %rsi
callq 0x3f490
jmp 0xa2797
jmp 0xa27bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
leaq -0x290(%rbp), %rdi
callq 0xd7d0
jmp 0xa2ce4
jmp 0xa27be
leaq -0x298(%rbp), %rdi
callq 0x3bad0
jmp 0xa2716
leaq -0x50(%rbp), %rax
movq %rax, -0x2b0(%rbp)
movq -0x2b0(%rbp), %rdi
callq 0x3b730
movq %rax, -0x2b8(%rbp)
movq -0x2b0(%rbp), %rdi
callq 0x3b760
movq %rax, -0x2c0(%rbp)
leaq -0x2b8(%rbp), %rdi
leaq -0x2c0(%rbp), %rsi
callq 0x3b790
testb $0x1, %al
jne 0xa281c
jmp 0xa2c07
leaq -0x2b8(%rbp), %rdi
callq 0x3bb00
movq (%rax), %rax
movq %rax, -0x2c8(%rbp)
movq -0x60(%rbp), %rax
movl 0x14(%rax), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
cmpl $0x0, -0x64(%rbp)
jle 0xa29d5
movq -0x368(%rbp), %rax
movb $0x0, -0x91(%rbp)
addq $0x88, %rax
movq %rax, -0x2d0(%rbp)
movq -0x2d0(%rbp), %rdi
callq 0x377e0
movq %rax, -0x2d8(%rbp)
movq -0x2d0(%rbp), %rdi
callq 0x37500
movq %rax, -0x2e0(%rbp)
leaq -0x2d8(%rbp), %rdi
leaq -0x2e0(%rbp), %rsi
callq 0x4e640
testb $0x1, %al
jne 0xa28a6
jmp 0xa29c5
leaq -0x2d8(%rbp), %rdi
callq 0x37d00
movq %rax, %rsi
leaq -0x2f8(%rbp), %rdi
callq 0x3aff0
jmp 0xa28c3
movl -0x64(%rbp), %eax
addl $0x1, %eax
cltq
movq %rax, -0x448(%rbp)
leaq -0x2f8(%rbp), %rdi
callq 0x3b0e0
movq %rax, %rcx
movq -0x448(%rbp), %rax
cmpq %rcx, %rax
jbe 0xa28fc
movl $0x10, -0x224(%rbp)
jmp 0xa2985
movslq -0x64(%rbp), %rsi
leaq -0x2f8(%rbp), %rdi
callq 0xda90
movq (%rax), %rax
cmpq -0x2c8(%rbp), %rax
jne 0xa292b
movb $0x1, -0x91(%rbp)
movl $0xf, -0x224(%rbp)
jmp 0xa2985
movslq -0x64(%rbp), %rsi
leaq -0x2f8(%rbp), %rdi
callq 0xda90
movq (%rax), %rax
movq -0x60(%rbp), %rcx
cmpq (%rcx), %rax
jne 0xa297b
movl -0x64(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
leaq -0x2f8(%rbp), %rdi
callq 0xda90
movq (%rax), %rax
cmpq -0x2c8(%rbp), %rax
jne 0xa297b
movb $0x1, -0x91(%rbp)
movl $0xf, -0x224(%rbp)
jmp 0xa2985
movl $0x0, -0x224(%rbp)
leaq -0x2f8(%rbp), %rdi
callq 0xd7d0
movl -0x224(%rbp), %eax
movl %eax, -0x44c(%rbp)
testl %eax, %eax
je 0xa29b2
jmp 0xa29a3
movl -0x44c(%rbp), %eax
subl $0xf, %eax
je 0xa29c5
jmp 0xa29b0
jmp 0xa29b4
jmp 0xa29b4
leaq -0x2d8(%rbp), %rdi
callq 0x4e750
jmp 0xa288a
testb $0x1, -0x91(%rbp)
je 0xa29d3
jmp 0xa2bf6
jmp 0xa29d5
movl -0x64(%rbp), %esi
movq -0x2c8(%rbp), %rdx
leaq -0x318(%rbp), %rdi
callq 0x9d8c0
jmp 0xa29ed
leaq -0x90(%rbp), %rdi
movq %rdi, -0x460(%rbp)
leaq -0x318(%rbp), %rsi
movq %rsi, -0x468(%rbp)
callq 0x85f0
movq -0x468(%rbp), %rdi
callq 0x8330
movq -0x460(%rbp), %rsi
leaq -0x168(%rbp), %rdi
callq 0xa58e0
movq %rax, -0x458(%rbp)
jmp 0xa2a36
movq -0x458(%rbp), %rax
movq %rax, -0x320(%rbp)
leaq -0x168(%rbp), %rdi
callq 0xa5940
movq %rax, -0x328(%rbp)
leaq -0x320(%rbp), %rdi
leaq -0x328(%rbp), %rsi
callq 0xa5910
testb $0x1, %al
jne 0xa2a73
jmp 0xa2b06
movl $0x28, %edi
callq 0x84e0
movq %rax, -0x470(%rbp)
jmp 0xa2a86
movq -0x470(%rbp), %rax
movq -0x2c8(%rbp), %rcx
movq %rcx, (%rax)
movq -0x60(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movb $0x1, 0x10(%rax)
movl -0x64(%rbp), %ecx
movl %ecx, 0x14(%rax)
movl $0x186a0, 0x18(%rax)    # imm = 0x186A0
movq -0x60(%rbp), %rcx
movq %rcx, 0x20(%rax)
movq %rax, -0x330(%rbp)
leaq -0x168(%rbp), %rdi
leaq -0x90(%rbp), %rsi
leaq -0x330(%rbp), %rdx
callq 0xa5970
movb %dl, -0x479(%rbp)
movq %rax, -0x478(%rbp)
jmp 0xa2aec
movb -0x479(%rbp), %al
movq -0x478(%rbp), %rcx
movq %rcx, -0x340(%rbp)
movb %al, -0x338(%rbp)
leaq -0x168(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0xa58b0
movq %rax, -0x488(%rbp)
jmp 0xa2b22
movq -0x488(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
testb $0x1, 0x10(%rax)
jne 0xa2b3f
jmp 0xa2bf6
movq -0x368(%rbp), %rdi
movq -0x2c8(%rbp), %rsi
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0x9d410
movl %eax, -0x48c(%rbp)
jmp 0xa2b62
movl -0x48c(%rbp), %eax
movl %eax, -0x6c(%rbp)
movl -0x64(%rbp), %eax
addl -0x6c(%rbp), %eax
movl %eax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x28(%rbp), %rax
jne 0xa2b8e
movl -0xf8(%rbp), %eax
addl -0x68(%rbp), %eax
movl %eax, -0x68(%rbp)
movq -0x58(%rbp), %rax
movl 0x18(%rax), %eax
cmpl -0x68(%rbp), %eax
jle 0xa2bba
movl -0x64(%rbp), %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x14(%rax)
movl -0x68(%rbp), %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x60(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x20(%rax)
leaq -0x130(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0xa57e0
movb %dl, -0x499(%rbp)
movq %rax, -0x498(%rbp)
jmp 0xa2bdc
movb -0x499(%rbp), %al
movq -0x498(%rbp), %rcx
movq %rcx, -0x350(%rbp)
movb %al, -0x348(%rbp)
leaq -0x2b8(%rbp), %rdi
callq 0x3bad0
jmp 0xa2800
jmp 0xa2247
movq -0x60(%rbp), %rax
movq (%rax), %rax
cmpq -0x30(%rbp), %rax
jne 0xa2c95
jmp 0xa2c1b
movq -0x60(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xa2c46
movq -0x378(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x3f490
jmp 0xa2c38
movq -0x60(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0xa2c1b
movq -0x378(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x3f490
jmp 0xa2c58
movq -0x378(%rbp), %rdi
callq 0x3b730
movq -0x378(%rbp), %rdi
movq %rax, -0x358(%rbp)
callq 0x3b760
movq %rax, -0x360(%rbp)
movq -0x358(%rbp), %rdi
movq -0x360(%rbp), %rsi
callq 0x3f500
jmp 0xa2c93
jmp 0xa2c95
movb $0x1, -0x32(%rbp)
movl $0x1, -0x224(%rbp)
leaq -0x168(%rbp), %rdi
callq 0xa59c0
leaq -0x130(%rbp), %rdi
callq 0x63930
leaq -0xb0(%rbp), %rdi
callq 0xd7d0
leaq -0x90(%rbp), %rdi
callq 0x8330
leaq -0x50(%rbp), %rdi
callq 0xd7d0
testb $0x1, -0x32(%rbp)
jne 0xa2d37
jmp 0xa2d2b
leaq -0x168(%rbp), %rdi
callq 0xa59c0
leaq -0x130(%rbp), %rdi
callq 0x63930
leaq -0xb0(%rbp), %rdi
callq 0xd7d0
leaq -0x90(%rbp), %rdi
callq 0x8330
leaq -0x50(%rbp), %rdi
callq 0xd7d0
movq -0x378(%rbp), %rdi
callq 0xd7d0
jmp 0xa2d47
movq -0x378(%rbp), %rdi
callq 0xd7d0
movq -0x370(%rbp), %rax
addq $0x4a0, %rsp            # imm = 0x4A0
popq %rbp
retq
movq -0xf0(%rbp), %rdi
callq 0x8880
nopw %cs:(%rax,%rax)