// File: Kei18[P]pibt/./src/solver/solver.cpp
// Function: Solver::WarshallFloyd()
void Solver::WarshallFloyd() {
  int nodeNum = G->getNodesNum();
  Nodes neighbor;
  int INF = 100000;
  dists = Eigen::MatrixXi::Ones(nodeNum, nodeNum) * INF;

  // initialize weight
  for (int i = 0; i < nodeNum; ++i) {
    neighbor = G->neighbor(G->getNodeFromIndex(i));
    for (auto v : neighbor) {
      dists(i, v->getIndex()) = 1;
    }
    dists(i, i) = 0;
  }

  // main loop
  for (int k = 0; k < nodeNum; ++k) {
    for (int i = 0; i < nodeNum; ++i) {
      for (int j = 0; j < nodeNum; ++j) {
        if (dists(i, j) > dists(i, k) + dists(k, j)) {
          dists(i, j) = dists(i, k) + dists(k, j);
        }
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq 0x38(%rax), %rdi
callq 0x80eb0
movl %eax, -0xc(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3e880
movl $0x186a0, -0x2c(%rbp)   # imm = 0x186A0
movslq -0xc(%rbp), %rdx
leaq -0x88(%rbp), %rdi
movq %rdx, %rsi
callq 0x9e1c0
jmp 0x9ce8b
leaq -0x70(%rbp), %rdi
leaq -0x88(%rbp), %rsi
leaq -0x2c(%rbp), %rdx
callq 0x9e200
jmp 0x9cea1
movq -0xe8(%rbp), %rdi
addq $0x40, %rdi
leaq -0x70(%rbp), %rsi
callq 0x9e2b0
jmp 0x9ceb7
movl $0x0, -0x98(%rbp)
movl -0x98(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x9d06f
movq -0xe8(%rbp), %rax
movq 0x38(%rax), %rdi
movq %rdi, -0xf8(%rbp)
movl -0x98(%rbp), %esi
callq 0x9e2e0
movq %rax, -0xf0(%rbp)
jmp 0x9cef6
movq -0xf0(%rbp), %rdx
movq -0xf8(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
callq 0x3c8d0
jmp 0x9cf12
leaq -0x28(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x3f230
leaq -0xb0(%rbp), %rdi
callq 0xd7d0
leaq -0x28(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdi
callq 0x3b730
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rdi
callq 0x3b760
movq %rax, -0xc8(%rbp)
leaq -0xc0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x3b790
testb $0x1, %al
jne 0x9cf7b
jmp 0x9d02b
leaq -0xc0(%rbp), %rdi
callq 0x3bb00
movq %rax, %rcx
movq -0xe8(%rbp), %rax
movq (%rcx), %rcx
movq %rcx, -0xd0(%rbp)
addq $0x40, %rax
movq %rax, -0x110(%rbp)
movslq -0x98(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0xd0(%rbp), %rdi
callq 0x3ebe0
movl %eax, -0xfc(%rbp)
jmp 0x9cfc8
movq -0x108(%rbp), %rsi
movq -0x110(%rbp), %rdi
movl -0xfc(%rbp), %eax
movslq %eax, %rdx
callq 0x9e310
movq %rax, -0x118(%rbp)
jmp 0x9cfed
movq -0x118(%rbp), %rax
movl $0x1, (%rax)
leaq -0xc0(%rbp), %rdi
callq 0x3bad0
jmp 0x9cf5f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xd7d0
jmp 0x9d268
movq -0xe8(%rbp), %rdi
addq $0x40, %rdi
movslq -0x98(%rbp), %rdx
movq %rdx, %rsi
callq 0x9e310
movq %rax, -0x120(%rbp)
jmp 0x9d04e
movq -0x120(%rbp), %rax
movl $0x0, (%rax)
movl -0x98(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x98(%rbp)
jmp 0x9cec1
movl $0x0, -0xd4(%rbp)
movl -0xd4(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x9d256
movl $0x0, -0xd8(%rbp)
movl -0xd8(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x9d240
movl $0x0, -0xdc(%rbp)
movl -0xdc(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x9d22a
movq -0xe8(%rbp), %rdi
addq $0x40, %rdi
movslq -0xd8(%rbp), %rsi
movslq -0xdc(%rbp), %rdx
callq 0x9e310
movq %rax, -0x128(%rbp)
jmp 0x9d0e1
movq -0xe8(%rbp), %rdi
movq -0x128(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x134(%rbp)
addq $0x40, %rdi
movslq -0xd8(%rbp), %rsi
movslq -0xd4(%rbp), %rdx
callq 0x9e310
movq %rax, -0x130(%rbp)
jmp 0x9d117
movq -0xe8(%rbp), %rdi
movq -0x130(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x144(%rbp)
addq $0x40, %rdi
movslq -0xd4(%rbp), %rsi
movslq -0xdc(%rbp), %rdx
callq 0x9e310
movq %rax, -0x140(%rbp)
jmp 0x9d14d
movl -0x134(%rbp), %eax
movq -0x140(%rbp), %rdx
movl -0x144(%rbp), %ecx
addl (%rdx), %ecx
cmpl %ecx, %eax
jle 0x9d214
movq -0xe8(%rbp), %rdi
addq $0x40, %rdi
movslq -0xd8(%rbp), %rsi
movslq -0xd4(%rbp), %rdx
callq 0x9e310
movq %rax, -0x150(%rbp)
jmp 0x9d191
movq -0xe8(%rbp), %rdi
movq -0x150(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x15c(%rbp)
addq $0x40, %rdi
movslq -0xd4(%rbp), %rsi
movslq -0xdc(%rbp), %rdx
callq 0x9e310
movq %rax, -0x158(%rbp)
jmp 0x9d1c7
movq -0xe8(%rbp), %rdi
movl -0x15c(%rbp), %eax
movq -0x158(%rbp), %rcx
movl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x16c(%rbp)
addq $0x40, %rdi
movslq -0xd8(%rbp), %rsi
movslq -0xdc(%rbp), %rdx
callq 0x9e310
movq %rax, -0x168(%rbp)
jmp 0x9d205
movq -0x168(%rbp), %rax
movl -0x16c(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x9d216
movl -0xdc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xdc(%rbp)
jmp 0x9d0ab
jmp 0x9d22c
movl -0xd8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd8(%rbp)
jmp 0x9d092
jmp 0x9d242
movl -0xd4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd4(%rbp)
jmp 0x9d079
leaq -0x28(%rbp), %rdi
callq 0xd7d0
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
movq -0x90(%rbp), %rdi
callq 0x8880
nopw %cs:(%rax,%rax)