// File: Kei18[P]pibt/./src/util/param.h
// Function: setScenario(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<std::vector<Node*, std::allocator<Node*>>, std::allocator<std::vector<Node*, std::allocator<Node*>>>>&, Graph*)
void setScenario(std::string filename, Paths &points, Graph* G)
{
  // file open
  std::ifstream file(filename);
  if (!file) {
    std::cout << "error@setScenario, file "
              << filename
              <<" cannot be read." << "\n";
    std::exit(1);
  }

  std::regex r_config = std::regex(R"(\d+\t.+?\t\d+\t\d+\t(\d+)\t(\d+)\t(\d+)\t(\d+)\t.+)");

  std::string line;
  std::smatch results;
  int x1, y1, x2, y2;

  // read files
  while (getline(file, line)) {
    if (std::regex_match(line, results, r_config)) {
      x1 = std::stoi(results[1].str());
      y1 = std::stoi(results[2].str());
      x2 = std::stoi(results[3].str());
      y2 = std::stoi(results[4].str());
      points.push_back({G->getNode(x1, y1), G->getNode(x2, y2)});
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x400, %rsp            # imm = 0x400
movq %rsi, %rax
movq %rdi, %rsi
movq %rsi, -0x368(%rbp)
movq %rsi, -0x8(%rbp)
movq %rax, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x220(%rbp), %rdi
movl $0x8, %edx
callq 0x8780
movq -0x220(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x220(%rbp,%rax), %rdi
callq 0x8260
movb %al, -0x35a(%rbp)
jmp 0xb0e5
movb -0x35a(%rbp), %al
testb $0x1, %al
jne 0xb0f4
jmp 0xb17e
movq 0xf5e9d(%rip), %rdi     # 0x100f98
leaq 0xa8272(%rip), %rsi     # 0xb3374
callq 0x84d0
movq %rax, -0x370(%rbp)
jmp 0xb110
movq -0x368(%rbp), %rsi
movq -0x370(%rbp), %rdi
callq 0x8470
movq %rax, -0x378(%rbp)
jmp 0xb12c
movq -0x378(%rbp), %rdi
leaq 0xa8253(%rip), %rsi     # 0xb338d
callq 0x84d0
movq %rax, -0x380(%rbp)
jmp 0xb148
movq -0x380(%rbp), %rdi
leaq 0xa8461(%rip), %rsi     # 0xb35b7
callq 0x84d0
jmp 0xb15d
movl $0x1, %edi
callq 0x85d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
jmp 0xb60e
leaq 0xa8219(%rip), %rsi     # 0xb339e
leaq -0x250(%rbp), %rdi
movl $0x10, %edx
callq 0xd390
jmp 0xb198
leaq -0x270(%rbp), %rdi
callq 0x86b0
leaq -0x290(%rbp), %rdi
callq 0xd430
jmp 0xb1b2
jmp 0xb1b4
leaq -0x220(%rbp), %rdi
leaq -0x270(%rbp), %rsi
callq 0x80f0
movq %rax, -0x388(%rbp)
jmp 0xb1d0
movq -0x388(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x8620
movb %al, -0x389(%rbp)
jmp 0xb1ee
movb -0x389(%rbp), %al
testb $0x1, %al
jne 0xb1fd
jmp 0xb5b1
leaq -0x270(%rbp), %rdi
leaq -0x290(%rbp), %rsi
leaq -0x250(%rbp), %rdx
xorl %ecx, %ecx
callq 0xd470
movb %al, -0x38a(%rbp)
jmp 0xb221
movb -0x38a(%rbp), %al
testb $0x1, %al
jne 0xb230
jmp 0xb5ac
leaq -0x290(%rbp), %rdi
movl $0x1, %esi
callq 0xd4d0
movq %rax, -0x398(%rbp)
jmp 0xb24a
movq -0x398(%rbp), %rsi
leaq -0x2c0(%rbp), %rdi
callq 0xd540
jmp 0xb25f
xorl %eax, %eax
movl %eax, %esi
leaq -0x2c0(%rbp), %rdi
movl $0xa, %edx
callq 0xd630
movl %eax, -0x39c(%rbp)
jmp 0xb27c
movl -0x39c(%rbp), %eax
movl %eax, -0x294(%rbp)
leaq -0x2c0(%rbp), %rdi
callq 0x8330
leaq -0x290(%rbp), %rdi
movl $0x2, %esi
callq 0xd4d0
movq %rax, -0x3a8(%rbp)
jmp 0xb2ae
movq -0x3a8(%rbp), %rsi
leaq -0x2e0(%rbp), %rdi
callq 0xd540
jmp 0xb2c3
xorl %eax, %eax
movl %eax, %esi
leaq -0x2e0(%rbp), %rdi
movl $0xa, %edx
callq 0xd630
movl %eax, -0x3ac(%rbp)
jmp 0xb2e0
movl -0x3ac(%rbp), %eax
movl %eax, -0x298(%rbp)
leaq -0x2e0(%rbp), %rdi
callq 0x8330
leaq -0x290(%rbp), %rdi
movl $0x3, %esi
callq 0xd4d0
movq %rax, -0x3b8(%rbp)
jmp 0xb312
movq -0x3b8(%rbp), %rsi
leaq -0x300(%rbp), %rdi
callq 0xd540
jmp 0xb327
xorl %eax, %eax
movl %eax, %esi
leaq -0x300(%rbp), %rdi
movl $0xa, %edx
callq 0xd630
movl %eax, -0x3bc(%rbp)
jmp 0xb344
movl -0x3bc(%rbp), %eax
movl %eax, -0x29c(%rbp)
leaq -0x300(%rbp), %rdi
callq 0x8330
leaq -0x290(%rbp), %rdi
movl $0x4, %esi
callq 0xd4d0
movq %rax, -0x3c8(%rbp)
jmp 0xb376
movq -0x3c8(%rbp), %rsi
leaq -0x320(%rbp), %rdi
callq 0xd540
jmp 0xb38b
xorl %eax, %eax
movl %eax, %esi
leaq -0x320(%rbp), %rdi
movl $0xa, %edx
callq 0xd630
movl %eax, -0x3cc(%rbp)
jmp 0xb3a8
movl -0x3cc(%rbp), %eax
movl %eax, -0x2a0(%rbp)
leaq -0x320(%rbp), %rdi
callq 0x8330
movq -0x10(%rbp), %rax
movq %rax, -0x3e0(%rbp)
movq -0x18(%rbp), %rdi
movl -0x294(%rbp), %esi
movl -0x298(%rbp), %edx
callq 0x3c6c0
movq %rax, -0x3d8(%rbp)
jmp 0xb3e9
movq -0x3d8(%rbp), %rax
movq %rax, -0x358(%rbp)
leaq -0x350(%rbp), %rax
movq %rax, -0x3f0(%rbp)
movq -0x18(%rbp), %rdi
movl -0x29c(%rbp), %esi
movl -0x2a0(%rbp), %edx
callq 0x3c6c0
movq %rax, -0x3e8(%rbp)
jmp 0xb423
movq -0x3f0(%rbp), %rax
movq -0x3e8(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x358(%rbp), %rax
movq %rax, -0x348(%rbp)
movq $0x2, -0x340(%rbp)
leaq -0x359(%rbp), %rdi
movq %rdi, -0x3f8(%rbp)
callq 0xd730
movq -0x3f8(%rbp), %rcx
movq -0x348(%rbp), %rsi
movq -0x340(%rbp), %rdx
leaq -0x338(%rbp), %rdi
callq 0xd750
jmp 0xb483
movq -0x3e0(%rbp), %rdi
leaq -0x338(%rbp), %rsi
callq 0xd700
jmp 0xb498
leaq -0x338(%rbp), %rdi
callq 0xd7d0
leaq -0x359(%rbp), %rdi
callq 0xd830
jmp 0xb5ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
jmp 0xb5f6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
jmp 0xb5ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
leaq -0x2c0(%rbp), %rdi
callq 0x8330
jmp 0xb5ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
leaq -0x2e0(%rbp), %rdi
callq 0x8330
jmp 0xb5ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
leaq -0x300(%rbp), %rdi
callq 0x8330
jmp 0xb5ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
leaq -0x320(%rbp), %rdi
callq 0x8330
jmp 0xb5ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
jmp 0xb59e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
leaq -0x338(%rbp), %rdi
callq 0xd7d0
leaq -0x359(%rbp), %rdi
callq 0xd830
jmp 0xb5ea
jmp 0xb1b4
leaq -0x290(%rbp), %rdi
callq 0xd6b0
leaq -0x270(%rbp), %rdi
callq 0x8330
leaq -0x250(%rbp), %rdi
callq 0xd6d0
leaq -0x220(%rbp), %rdi
callq 0x8170
addq $0x400, %rsp            # imm = 0x400
popq %rbp
retq
leaq -0x290(%rbp), %rdi
callq 0xd6b0
leaq -0x270(%rbp), %rdi
callq 0x8330
leaq -0x250(%rbp), %rdi
callq 0xd6d0
leaq -0x220(%rbp), %rdi
callq 0x8170
movq -0x228(%rbp), %rdi
callq 0x8880
nopw %cs:(%rax,%rax)