// File: /workspace/github_cpp_makefile_star2_O2/keyan[P]ev_routing_engine/./router.h
// Function: Router::Router(std::vector<Station, std::allocator<Station>> const&)
Router(const std::vector<Station> &network) : network_(network) {
    graph_ = std::vector<std::vector<std::pair<NodeID, Kilometers>>>(
        network.size(), std::vector<std::pair<NodeID, Kilometers>>());

    // Created directed graph limited by battery radius.
    for (NodeID i = 0; i < network.size(); ++i) {
      node_name_map_[network_.at(i).name] = i;

      for (NodeID j = i + 1; j < network.size(); ++j) {
        if (i == j) {
          exit(1);
        }
        Kilometers travel_dist = calculate_travel_km(i, j);
        if (calculate_travel_km(i, j) > MAX_CHARGE) {
          continue;
        }

        graph_.at(i).emplace_back(std::make_pair(j, travel_dist));
        graph_.at(j).emplace_back(std::make_pair(i, travel_dist));
      }
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rsi, (%rdi)
leaq 0x8(%rdi), %rax
movq %rax, 0x10(%rsp)
leaq 0x38(%rdi), %rax
movq %rax, 0x8(%rdi)
movq $0x1, 0x10(%rdi)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x18(%rdi)
movl $0x3f800000, 0x28(%rdi) # imm = 0x3F800000
leaq 0x40(%rdi), %rbx
movupd %xmm0, 0x30(%rdi)
movupd %xmm0, 0x40(%rdi)
movq %rdi, %r15
andq $0x0, 0x50(%rdi)
movq 0x8(%rsi), %rax
subq (%rsi), %rax
pushq $0x38
popq %rcx
cqto
idivq %rcx
leaq 0x40(%rsp), %rdx
movapd %xmm0, (%rdx)
andq $0x0, 0x10(%rdx)
leaq 0x20(%rsp), %rdi
leaq 0x7(%rsp), %rcx
movq %rax, %rsi
movq %rbx, 0x8(%rsp)
callq 0x80d2
leaq 0x20(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x83b4
movq %r12, %rdi
callq 0x8128
leaq 0x40(%rsp), %rdi
callq 0x831a
movq (%r14), %rsi
movq %r14, 0x38(%rsp)
movq 0x8(%r14), %rcx
xorl %r13d, %r13d
subq %rsi, %rcx
movzwl %r13w, %ebp
movq %rcx, %rax
cqto
pushq $0x38
popq %rcx
idivq %rcx
cmpq %rbp, %rax
jbe 0x806d
movq (%r15), %rdi
movq %rbp, %rsi
callq 0x814a
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x8418
movw %r13w, (%rax)
movw $0x1, %r14w
leal (%r14,%r13), %r12d
movzwl %r12w, %ebx
movq 0x38(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rcx
movq %rcx, %rax
subq %rsi, %rax
cqto
pushq $0x38
popq %rdi
idivq %rdi
cmpq %rbx, %rax
jbe 0x8065
testw %r14w, %r14w
je 0x807c
movq %r15, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x96ca
movsd %xmm0, 0x18(%rsp)
movq %r15, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x96ca
ucomisd 0x4005(%rip), %xmm0     # 0xc008
ja 0x805d
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x8168
movw %r12w, 0x20(%rsp)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movq %rax, %rdi
leaq 0x20(%rsp), %rsi
callq 0x8186
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x8168
movw %r13w, 0x20(%rsp)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movq %rax, %rdi
leaq 0x20(%rsp), %rsi
callq 0x8186
incl %r14d
jmp 0x7fa8
incl %r13d
jmp 0x7f6c
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rdi
callq 0x2190
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x831a
jmp 0x809c
jmp 0x8099
jmp 0x8099
jmp 0x8099
movq %rax, %rbx
movq 0x8(%rsp), %rdi
callq 0x8128
movq 0x10(%rsp), %rdi
callq 0x89de
movq %rbx, %rdi
callq 0x2260