// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq 0x38(%rdi), %rax
movq 0x18(%rax), %rcx
subq 0x10(%rax), %rcx
shrq $0x3, %rcx
movq %rcx, 0x8(%rsp)
movslq %ecx, %r15
testq %r15, %r15
js 0x3edaf
movq %rdi, %rbx
leaq 0x40(%rdi), %r13
movl $0x1, 0x14(%rsp)
movl $0x186a0, 0x1c(%rsp)    # imm = 0x186A0
cmpq %r15, 0x48(%rdi)
jne 0x3ea18
movq %r15, %rax
movq %r15, %rcx
cmpq %r15, 0x50(%rbx)
je 0x3ea35
movq %r15, %rsi
imulq %r15, %rsi
movq %r13, %rdi
movq %r15, %rdx
movq %r15, %rcx
callq 0x3fd9a
movq 0x48(%rbx), %rcx
movq 0x50(%rbx), %rax
cmpq %r15, %rcx
jne 0x3edce
cmpq %r15, %rax
jne 0x3edce
movq (%r13), %rcx
imulq %r15, %r15
movq %r15, %rdx
andq $-0x4, %rdx
cmpq $0x4, %r15
jb 0x3ea87
movdqu 0x14(%rsp), %xmm0
pshufd $0xff, 0x10(%rsp), %xmm1 # xmm1 = mem[3,3,3,3]
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
pmuludq %xmm0, %xmm1
pshufd $0xa0, %xmm1, %xmm0     # xmm0 = xmm1[0,0,2,2]
xorl %eax, %eax
movdqa %xmm0, (%rcx,%rax,4)
addq $0x4, %rax
cmpq %rdx, %rax
jb 0x3ea79
cmpq %r15, %rdx
je 0x3eb90
andl $0x3, %r15d
leal 0x3(%r15), %eax
andl $-0x4, %eax
decq %r15
movq %r15, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
leaq (%rcx,%rdx,4), %rcx
addq $0xc, %rcx
xorl %edx, %edx
movdqa 0xbcd6(%rip), %xmm1     # 0x4a790
movdqa 0xbcde(%rip), %xmm2     # 0x4a7a0
movdqa 0xbce6(%rip), %xmm3     # 0x4a7b0
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movq %rdx, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %esi
notl %esi
testb $0x1, %sil
je 0x3eb1d
movl $0x186a0, -0xc(%rcx,%rdx,4) # imm = 0x186A0
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %esi
testb $0x1, %sil
je 0x3eb34
movl $0x186a0, -0x8(%rcx,%rdx,4) # imm = 0x186A0
por %xmm1, %xmm5
pxor %xmm3, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
pxor %xmm4, %xmm5
pextrw $0x0, %xmm5, %esi
testb $0x1, %sil
je 0x3eb71
movl $0x186a0, -0x4(%rcx,%rdx,4) # imm = 0x186A0
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0x3eb83
movl $0x186a0, (%rcx,%rdx,4) # imm = 0x186A0
addq $0x4, %rdx
cmpq %rdx, %rax
jne 0x3ead2
movl $0x0, %ecx
movq 0x8(%rsp), %rax
testl %eax, %eax
cmovgl %eax, %ecx
movq %rcx, 0x40(%rsp)
jle 0x3ecb2
xorl %ebp, %ebp
xorl %r15d, %r15d
xorl %r14d, %r14d
movq 0x38(%rbx), %rsi
movq 0x10(%rsi), %rax
movq (%rax,%r14,8), %rdx
leaq 0x10(%rsp), %rdi
callq 0x1a38a
movq 0x10(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x18(%rsp), %r12
movq 0x20(%rsp), %rax
movq %rax, 0x30(%rsp)
pxor %xmm0, %xmm0
movdqa %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testq %rbp, %rbp
je 0x3ec1e
subq %rbp, %r15
movq %rbp, %rdi
movq %r15, %rsi
callq 0x6380
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3ec1e
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x6380
movq 0x38(%rsp), %rbp
cmpq %r12, %rbp
je 0x3ec72
movq 0x48(%rbx), %rax
cmpq %r14, %rax
jle 0x3ed90
leaq (,%r14,4), %rcx
addq 0x40(%rbx), %rcx
movq %rbp, %rdx
movq (%rdx), %rsi
movslq 0x4(%rsi), %rsi
testq %rsi, %rsi
js 0x3ed90
cmpq %rsi, 0x50(%rbx)
jle 0x3ed90
imulq %rax, %rsi
movl $0x1, (%rcx,%rsi,4)
addq $0x8, %rdx
cmpq %r12, %rdx
jne 0x3ec44
movq 0x48(%rbx), %rax
cmpq %r14, %rax
jle 0x3ed90
cmpq %r14, 0x50(%rbx)
jle 0x3ed90
imulq %r14, %rax
shlq $0x2, %rax
addq (%r13), %rax
movl $0x0, (%rax,%r14,4)
incq %r14
movq 0x30(%rsp), %r15
cmpq 0x40(%rsp), %r14
jne 0x3ebb2
jmp 0x3ecc4
movq $0x0, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
cmpl $0x0, 0x8(%rsp)
jle 0x3ed6a
movl 0x8(%rsp), %eax
xorl %ecx, %ecx
xorl %edx, %edx
testq %rax, %rax
je 0x3ed58
movq 0x48(%rbx), %rsi
movq %rsi, %rdi
imulq %rdx, %rdi
leaq (,%rsi,4), %r8
xorl %r9d, %r9d
xorl %r10d, %r10d
cmpl $0x0, 0x8(%rsp)
jle 0x3ed4c
cmpq %r10, %rsi
jle 0x3ed90
movq 0x40(%rbx), %r11
movq 0x50(%rbx), %r14
leaq (%r11,%rdi,4), %r15
testq %r14, %r14
movl $0x0, %r12d
cmovgq %r14, %r12
xorl %ebp, %ebp
cmpq %rbp, %r12
je 0x3ed90
cmpq %rdx, %r14
jbe 0x3ed90
cmpq %rdx, %rsi
jbe 0x3ed90
movl (%r11,%rcx), %r13d
addl (%r15,%r10,4), %r13d
cmpl %r13d, (%r11,%r9)
jle 0x3ed41
movl %r13d, (%r11,%r9)
incq %rbp
addq %r8, %r11
cmpq %rbp, %rax
jne 0x3ed20
incq %r10
addq $0x4, %r9
cmpq %rax, %r10
jne 0x3ecf5
incq %rdx
addq $0x4, %rcx
cmpq 0x40(%rsp), %rdx
jne 0x3ecd7
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x3ed81
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x6380
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc417(%rip), %rdi      # 0x4b1ae
leaq 0xc445(%rip), %rsi      # 0x4b1e3
leaq 0xcf5a(%rip), %rcx      # 0x4bcff
movl $0x16f, %edx            # imm = 0x16F
callq 0x6260
leaq 0xbadb(%rip), %rdi      # 0x4a891
leaq 0xbb69(%rip), %rsi      # 0x4a926
leaq 0xcafd(%rip), %rcx      # 0x4b8c1
movl $0x4a, %edx
callq 0x6260
leaq 0xbc7a(%rip), %rdi      # 0x4aa4f
leaq 0xbca2(%rip), %rsi      # 0x4aa7e
leaq 0xcd57(%rip), %rcx      # 0x4bb3a
movl $0x2fd, %edx            # imm = 0x2FD
callq 0x6260
movq %rax, %rbx
testq %rbp, %rbp
je 0x3ee03
subq %rbp, %r15
movq %rbp, %rdi
movq %r15, %rsi
callq 0x6380
movq %rbx, %rdi
callq 0x6620
nop