// File: /workspace/github_cpp_makefile_star2_O2/xukmin[P]rase/calculate-routing-metrics.cc
// Function: BuildExampleRoutingNetworks(SimulationOptions const&)
void BuildExampleRoutingNetworks(const SimulationOptions& options) {
  double scale = 600.0 / (options.region.max_y - options.region.min_y);

  RandomizedSensorPlacer placer(options.num_sensors, options.region);
  std::vector<Position> positions;
  GeneratePositionsThatCanBeConnected(
      options.lower_communication_range, &placer, &positions);

  SensorNetwork network;
  network.DeploySensors(positions, options.lower_communication_range);

  for (int i = 0; i < options.builders.size(); i++) {
    options.builders[i]->BuildRouting(&network);

    const std::string filename =
        "routings-" + IntToString(options.num_sensors) + "-" +
        options.builders[i]->name() + ".svg";
    SvgPrinter printer(filename, options.builders[i]->title(),
                       options.region, scale);
    printer.PrintNetwork(network);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
movq %rdi, %r12
leaq 0x8(%rdi), %rdx
movsd 0x20(%rdi), %xmm0
subsd 0x10(%rdi), %xmm0
movsd %xmm0, (%rsp)
movl (%rdi), %esi
leaq 0x1b8(%rsp), %r14
movq %r14, %rdi
movq %rdx, 0x8(%rsp)
callq 0x4106
xorpd %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movapd %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
movsd 0x28(%r12), %xmm0
movq %r14, %rdi
callq 0x57a6
leaq 0xd0(%rsp), %rax
andq $0x0, -0x10(%rax)
xorpd %xmm0, %xmm0
movapd %xmm0, -0x20(%rax)
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x100(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movapd %xmm0, 0x20(%rax)
movapd %xmm0, 0x30(%rax)
andq $0x0, 0x40(%rax)
movsd 0x28(%r12), %xmm0
leaq 0xb0(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x60ce
movsd 0x78cf(%rip), %xmm0     # 0xb008
divsd (%rsp), %xmm0
movsd %xmm0, (%rsp)
xorl %edx, %edx
leaq 0x70(%rsp), %r15
movq 0x40(%r12), %rax
movq 0x48(%r12), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rdx, %rcx
jbe 0x3865
leaq 0x30(%rsp), %rbp
movq %rdx, %r14
movq (%rax,%rdx,8), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x7e8e
movl (%r12), %esi
movq %r15, %r13
movq %r15, %rdi
callq 0x9206
movq %rbp, %rdi
leaq 0x7973(%rip), %rsi      # 0xb109
movq %r13, %rdx
callq 0x4187
leaq 0x50(%rsp), %r13
movq %r13, %rdi
movq %rbp, %rsi
leaq 0x797d(%rip), %rdx      # 0xb12d
callq 0x4149
movq 0x40(%r12), %rax
movq (%rax,%r14,8), %rdx
addq $0x8, %rdx
leaq 0x148(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4168
leaq 0x90(%rsp), %rbp
movq %rbp, %rdi
movq %rbx, %rsi
leaq 0x7929(%rip), %rdx      # 0xb113
callq 0x4149
movq %rbx, %rdi
callq 0x30c0
leaq 0x50(%rsp), %rdi
callq 0x30c0
leaq 0x30(%rsp), %rdi
callq 0x30c0
movq %r15, %rdi
callq 0x30c0
movq 0x40(%r12), %rax
movq (%rax,%r14,8), %rdx
addq $0x28, %rdx
movq %rbx, %rdi
movq %rbp, %rsi
movq 0x8(%rsp), %rcx
movsd (%rsp), %xmm0
callq 0x8e34
movq %rbx, %rdi
leaq 0xb0(%rsp), %rsi
pushq $0x1
popq %rcx
movl %ecx, %edx
callq 0x8ef2
movq %rbx, %rdi
callq 0x8ed2
movq %rbp, %rdi
callq 0x30c0
incq %r14
movq %r14, %rdx
jmp 0x374a
leaq 0xb0(%rsp), %rdi
callq 0x41ac
leaq 0x10(%rsp), %rdi
callq 0x535c
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x38bb
movq %rax, %rbx
jmp 0x3905
jmp 0x38bb
movq %rax, %rbx
jmp 0x38ee
movq %rax, %rbx
leaq 0x148(%rsp), %rdi
callq 0x8ed2
jmp 0x38b1
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
jmp 0x38f3
movq %rax, %rbx
jmp 0x38f8
movq %rax, %rbx
jmp 0x38d5
movq %rax, %rbx
leaq 0x148(%rsp), %rdi
callq 0x30c0
leaq 0x50(%rsp), %rdi
callq 0x30c0
jmp 0x38e4
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x30c0
leaq 0x70(%rsp), %rdi
callq 0x30c0
leaq 0xb0(%rsp), %rdi
callq 0x41ac
leaq 0x10(%rsp), %rdi
callq 0x535c
movq %rbx, %rdi
callq 0x3360