// File: /workspace/github_cpp_makefile_star2_O2/Kei18[P]pibt/./src/solver/iecbs.cpp
// Function: iECBS::init()
void iECBS::init() {
  w2 = 2;
  wdists = Eigen::MatrixXf::Zero(G->getNodesNum(), G->getNodesNum());
  highwayFile = G->getMapName() + ".highway";
  std::ifstream file(highwayFile);
  if (!file) {
    std::cout << "error@iECBS::init, file "
              << highwayFile
              << " does not exist" << "\n";
    std::exit(1);
  }

  int w = G->getW();
  int x, y;
  std::string key, line;
  Node *v, *u;

  y = 0;
  while (getline(file, line)) {
    if (line.size() != w) {
      std::cout << "error@iECBS::init, width is different, "
                << "not " << line.size() << ", should be " << w << "\n";
      std::exit(1);
    }

    x = 0;
    for (auto s : line) {
      v = G->getNode(x, y);
      if (v == nullptr) {
        ++x;
        continue;
      }

      // right
      u = G->getNode(x + 1, y);
      if (u != nullptr) {
        key = std::to_string(v->getId()) + "-" + std::to_string(u->getId());
        if (s == 'r' || s == 'x' || s == 'z') {
          highway.emplace(key, 1);
        } else {
          highway.emplace(key, w2);
        }
      }

      // left
      u = G->getNode(x - 1, y);
      if (u != nullptr) {
        key = std::to_string(v->getId()) + "-" + std::to_string(u->getId());
        if (s == 'l' || s == 'y' || s == 'w') {
          highway.emplace(key, 1);
        } else {
          highway.emplace(key, w2);
        }
      }

      // up
      u = G->getNode(x, y - 1);
      if (u != nullptr) {
        key = std::to_string(v->getId()) + "-" + std::to_string(u->getId());
        if (s == 'u' || s == 'z' || s == 'w') {
          highway.emplace(key, 1);
        } else {
          highway.emplace(key, w2);
        }
      }

      // down
      u = G->getNode(x, y + 1);
      if (u != nullptr) {
        key = std::to_string(v->getId()) + "-" + std::to_string(u->getId());
        if (s == 'd' || s == 'x' || s == 'y') {
          highway.emplace(key, 1);
        } else {
          highway.emplace(key, w2);
        }
      }

      ++x;
    }
    ++y;
  }
  if (y != G->getH()) {
    std::cout << "error@iECBS::init, height is different, "
              << "not " << y + 1 << ", should be " << G->getH() << "\n";
    std::exit(1);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x318, %rsp            # imm = 0x318
movq %rdi, %rbp
movl $0x40000000, 0xe8(%rdi) # imm = 0x40000000
movq 0x38(%rdi), %rax
movq 0x18(%rax), %rcx
subq 0x10(%rax), %rcx
shrq $0x3, %rcx
movslq %ecx, %rdx
leaq 0x110(%rsp), %r14
movq %r14, %rdi
movq %rdx, %rsi
callq 0x2a9f2
leaq 0x148(%rbp), %rdi
movq %r14, %rsi
callq 0x2b032
movq 0x38(%rbp), %rsi
movq (%rsi), %rax
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq *0x58(%rax)
leaq 0x13c05(%rip), %rdx     # 0x3c839
leaq 0x110(%rsp), %rdi
movq %r14, %rsi
callq 0x93fb
leaq 0xf0(%rbp), %r14
leaq 0x110(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x6470
movq %r15, %rdi
callq 0x61d0
leaq 0x28(%rsp), %rdi
callq 0x61d0
leaq 0x110(%rsp), %r15
pushq $0x8
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x65a0
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x130(%rsp,%rax)
jne 0x29240
movq 0x38(%rbp), %rdi
movq (%rdi), %rax
callq *(%rax)
movl %eax, %ebx
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
leaq 0xe8(%rbp), %rcx
movq %rcx, 0x18(%rsp)
xorl %r15d, %r15d
leaq 0x100(%rsp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movb %r15b, (%rax)
movb %r15b, (%rcx)
movslq %ebx, %rax
movq %rax, 0x58(%rsp)
leaq 0x110(%rbp), %rax
movq %rax, 0x8(%rsp)
leaq 0x80(%rsp), %r14
movl %ebx, 0x50(%rsp)
leaq 0x110(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x60b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x29193
movq 0x58(%rsp), %rax
cmpq %rax, 0xf8(%rsp)
jne 0x291dc
movq 0xf0(%rsp), %rax
movq %rax, 0xc0(%rsp)
leal -0x1(%r15), %eax
movl %eax, 0x54(%rsp)
leal 0x1(%r15), %eax
movl %eax, 0x10(%rsp)
xorl %ecx, %ecx
xorl %r13d, %r13d
movq %r15, 0x48(%rsp)
cmpq %rcx, 0x58(%rsp)
je 0x29187
movq 0xc0(%rsp), %rax
movq %rcx, 0xc8(%rsp)
movzbl (%rax,%rcx), %eax
movq %rax, 0x20(%rsp)
movq %rbp, %rbx
movq 0x38(%rbp), %rdi
movl %r13d, %esi
movl %r15d, %edx
callq 0x162e4
movq %rax, %r15
testq %rax, %rax
je 0x28e84
movq 0x38(%rbx), %rdi
leal 0x1(%r13), %esi
movl %esi, 0x14(%rsp)
movq 0x48(%rsp), %rdx
callq 0x162e4
movq %rax, %rbp
testq %rax, %rax
je 0x28ea5
movl (%r15), %esi
leaq 0x60(%rsp), %r14
movq %r14, %rdi
callq 0x943e
leaq 0x80(%rsp), %rdi
movq %r14, %rsi
leaq 0x15583(%rip), %rdx     # 0x3e367
callq 0x93fb
movl (%rbp), %esi
leaq 0xd0(%rsp), %rbp
movq %rbp, %rdi
callq 0x943e
leaq 0xa0(%rsp), %r12
movq %r12, %rdi
leaq 0x80(%rsp), %r14
movq %r14, %rsi
movq %rbp, %rdx
callq 0x229b6
leaq 0x28(%rsp), %rdi
movq %r12, %rsi
callq 0x6470
movq %r12, %rdi
callq 0x61d0
movq %rbp, %rdi
callq 0x61d0
movq %r14, %rdi
callq 0x61d0
leaq 0x60(%rsp), %rdi
callq 0x61d0
movq 0x20(%rsp), %rax
addl $-0x72, %eax
cmpl $0x8, %eax
ja 0x28e91
movl $0x141, %ecx            # imm = 0x141
btl %eax, %ecx
jae 0x28e91
movl $0x1, 0xa0(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
callq 0x2b284
jmp 0x28ea5
incl %r13d
movl %r13d, 0x14(%rsp)
jmp 0x29168
movq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x2b67a
movq 0x38(%rbx), %rdi
leal -0x1(%r13), %esi
movq 0x48(%rsp), %rdx
callq 0x162e4
movq %rax, %rbp
testq %rax, %rax
je 0x28f99
movl (%r15), %esi
leaq 0x60(%rsp), %r14
movq %r14, %rdi
callq 0x943e
leaq 0x80(%rsp), %rdi
movq %r14, %rsi
leaq 0x15482(%rip), %rdx     # 0x3e367
callq 0x93fb
movl (%rbp), %esi
leaq 0xd0(%rsp), %rbp
movq %rbp, %rdi
callq 0x943e
leaq 0xa0(%rsp), %r12
movq %r12, %rdi
leaq 0x80(%rsp), %r14
movq %r14, %rsi
movq %rbp, %rdx
callq 0x229b6
leaq 0x28(%rsp), %rdi
movq %r12, %rsi
callq 0x6470
movq %r12, %rdi
callq 0x61d0
movq %rbp, %rdi
callq 0x61d0
movq %r14, %rdi
callq 0x61d0
leaq 0x60(%rsp), %rdi
callq 0x61d0
movq 0x20(%rsp), %rax
addl $-0x6c, %eax
cmpl $0xd, %eax
ja 0x28f85
movl $0x2801, %ecx           # imm = 0x2801
btl %eax, %ecx
jae 0x28f85
movl $0x1, 0xa0(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
callq 0x2b284
jmp 0x28f99
movq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x2b67a
movq 0x38(%rbx), %rdi
movl %r13d, %esi
movl 0x54(%rsp), %edx
callq 0x162e4
movq %rax, %rbp
testq %rax, %rax
je 0x29089
movl (%r15), %esi
leaq 0x60(%rsp), %r14
movq %r14, %rdi
callq 0x943e
leaq 0x80(%rsp), %rdi
movq %r14, %rsi
leaq 0x15390(%rip), %rdx     # 0x3e367
callq 0x93fb
movl (%rbp), %esi
leaq 0xd0(%rsp), %rbp
movq %rbp, %rdi
callq 0x943e
leaq 0xa0(%rsp), %r12
movq %r12, %rdi
leaq 0x80(%rsp), %r14
movq %r14, %rsi
movq %rbp, %rdx
callq 0x229b6
leaq 0x28(%rsp), %rdi
movq %r12, %rsi
callq 0x6470
movq %r12, %rdi
callq 0x61d0
movq %rbp, %rdi
callq 0x61d0
movq %r14, %rdi
callq 0x61d0
leaq 0x60(%rsp), %rdi
callq 0x61d0
movq 0x20(%rsp), %rax
addl $-0x75, %eax
cmpl $0x5, %eax
ja 0x29075
pushq $0x25
popq %rcx
btl %eax, %ecx
jae 0x29075
movl $0x1, 0xa0(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
callq 0x2b284
jmp 0x29089
movq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x2b67a
movq 0x38(%rbx), %rdi
movl %r13d, %esi
movl 0x10(%rsp), %edx
callq 0x162e4
movq %rax, %r13
testq %rax, %rax
je 0x29168
movl (%r15), %esi
leaq 0x60(%rsp), %r15
movq %r15, %rdi
callq 0x943e
movq %r14, %rdi
movq %r15, %rsi
leaq 0x152a5(%rip), %rdx     # 0x3e367
callq 0x93fb
movl (%r13), %esi
leaq 0xd0(%rsp), %r13
movq %r13, %rdi
callq 0x943e
leaq 0xa0(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x229b6
leaq 0x28(%rsp), %rdi
movq %rbp, %rsi
callq 0x6470
movq %rbp, %rdi
callq 0x61d0
movq %r13, %rdi
callq 0x61d0
movq %r14, %rdi
callq 0x61d0
movq %r15, %rdi
callq 0x61d0
movq 0x20(%rsp), %rcx
addl $-0x64, %ecx
cmpl $0x15, %ecx
ja 0x29154
movl $0x300001, %eax         # imm = 0x300001
btl %ecx, %eax
jae 0x29154
movl $0x1, 0xa0(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movq %rbp, %rdx
callq 0x2b284
jmp 0x29168
movq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x2b67a
movq 0xc8(%rsp), %rcx
incq %rcx
movl 0x14(%rsp), %eax
movl %eax, %r13d
movq %rbx, %rbp
movq 0x48(%rsp), %r15
jmp 0x28d5e
movl 0x10(%rsp), %eax
movl %eax, %r15d
jmp 0x28cfa
movq 0x38(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
cmpl %eax, %r15d
jne 0x2927e
leaq 0xf0(%rsp), %rdi
callq 0x61d0
leaq 0x28(%rsp), %rdi
callq 0x61d0
leaq 0x110(%rsp), %rdi
callq 0x6120
addq $0x318, %rsp            # imm = 0x318
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x30db5(%rip), %rdi     # 0x59f98
leaq 0x13671(%rip), %rsi     # 0x3c85b
callq 0x63a0
leaq 0x145b3(%rip), %rsi     # 0x3d7a9
movq %rax, %rdi
callq 0x63a0
movq 0xf8(%rsp), %rsi
movq %rax, %rdi
callq 0x62b0
leaq 0x12df9(%rip), %rsi     # 0x3c00e
movq %rax, %rdi
callq 0x63a0
movq %rax, %rdi
movl 0x50(%rsp), %esi
callq 0x6630
leaq 0x11333(%rip), %rsi     # 0x3a563
movq %rax, %rdi
callq 0x63a0
pushq $0x1
popq %rdi
callq 0x6450
movq 0x30d51(%rip), %rdi     # 0x59f98
leaq 0x135f4(%rip), %rsi     # 0x3c842
callq 0x63a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x6360
leaq 0x11073(%rip), %rsi     # 0x3a2d8
movq %rax, %rdi
callq 0x63a0
leaq 0x112ef(%rip), %rsi     # 0x3a563
movq %rax, %rdi
callq 0x63a0
jmp 0x29238
movq 0x30d13(%rip), %rdi     # 0x59f98
leaq 0x135f7(%rip), %rsi     # 0x3c883
callq 0x63a0
leaq 0x14511(%rip), %rsi     # 0x3d7a9
movq %rax, %rdi
callq 0x63a0
incl %r15d
movq %rax, %rdi
movl %r15d, %esi
callq 0x6630
leaq 0x12d59(%rip), %rsi     # 0x3c00e
movq %rax, %rdi
callq 0x63a0
movq %rax, %r14
movq 0x38(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq %r14, %rdi
movl %eax, %esi
callq 0x6630
leaq 0x11288(%rip), %rsi     # 0x3a563
movq %rax, %rdi
callq 0x63a0
jmp 0x29238
jmp 0x292ea
movq %rax, %rbx
jmp 0x29377
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x61d0
jmp 0x29384
jmp 0x2935d
jmp 0x2935d
jmp 0x2935d
jmp 0x2935d
jmp 0x2935d
jmp 0x2935d
jmp 0x2935d
jmp 0x29328
jmp 0x2932d
jmp 0x2932d
jmp 0x29334
jmp 0x2935d
jmp 0x29328
jmp 0x29328
jmp 0x2932d
jmp 0x29334
jmp 0x2935d
jmp 0x2935d
movq %rax, %rbx
jmp 0x29351
movq %rax, %rbx
jmp 0x29344
jmp 0x29334
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x61d0
leaq 0x80(%rsp), %rdi
callq 0x61d0
leaq 0x60(%rsp), %rdi
callq 0x61d0
jmp 0x29360
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x61d0
leaq 0x28(%rsp), %rdi
callq 0x61d0
leaq 0x110(%rsp), %rdi
callq 0x6120
movq %rbx, %rdi
callq 0x6650