// File: /workspace/github_cpp_makefile_star2_O2/LiuYinCarl[P]headerFileAnalysis/headerFileAnalysis.cpp
// Function: WalkMan::get_include_lines(std::filesystem::__cxx11::path const&)
std::vector<std::string> WalkMan::get_include_lines(const fs::path& path) {
  // regex expression from:
  // https://stackoverflow.com/questions/26492513/write-c-regular-expression-to-match-a-include-preprocessing-directive
  static std::regex re{"^\\s*#\\s*include\\s+[<\"][^>\"]*[>\"]\\s*"};
  //static std::regex re_filename{"\"(.*?)\"|(<.*?>)"};
  static std::regex re_filename{"[<\"](.*?)[>\"]"};
  std::vector<std::string> include_info{ path.filename() };

  std::ifstream is { path.c_str() };
  std::string s;
  while (std::getline(is, s)) {
    if (std::regex_search(begin(s), end(s), re)) {
      std::smatch matchRes;
      std::regex_search(s, matchRes, re_filename);
      std::string filename = matchRes[1].str();
      assert(filename.size() > 0);
      if (headers.count(filename) == 0) { // filter stdlib headers
	continue;
      }
      include_info.emplace_back(std::move(filename));
    }
  }
  assert(include_info.size() > 0);
  return include_info;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movb 0x1f26c(%rip), %al      # 0x24728
testb %al, %al
je 0x5685
movb 0x1f286(%rip), %al      # 0x24750
testb %al, %al
je 0x56da
leaq 0x70(%rsp), %rdi
movq %rbx, %rsi
callq 0x5d70
leaq 0x10(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x4450
leaq 0x10(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0x30(%rsp), %rcx
movq %r15, %rdi
callq 0x5e7e
movq %r15, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x4180
leaq 0x70(%rsp), %rdi
callq 0x5c36
movq (%rbx), %rsi
leaq 0x70(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x4550
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x108, %r14            # imm = 0x108
leaq 0x70(%rsp), %r15
leaq 0x10(%rsp), %r12
leaq 0x1f1b3(%rip), %r13     # 0x24708
leaq 0x30(%rsp), %rbx
leaq 0x50(%rsp), %rbp
movq %r15, %rdi
movq %r12, %rsi
callq 0x4060
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x562b
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq %rdi, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x5eb7
testb %al, %al
je 0x555f
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movq %r12, %rdi
movq %rbx, %rsi
leaq 0x1f17f(%rip), %rdx     # 0x24730
xorl %ecx, %ecx
callq 0x5ef9
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rcx
subq %rsi, %rcx
je 0x55e2
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x5, %rax
cmpq $-0x3, %rax
ja 0x55e2
addq $0x18, %rsi
jmp 0x55e9
addq %rcx, %rsi
addq $-0x48, %rsi
movq %rbp, %rdi
callq 0x5f14
cmpq $0x0, 0x58(%rsp)
je 0x5666
movq %r14, %rdi
movq %rbp, %rsi
callq 0x5f4e
testq %rax, %rax
je 0x5616
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x5f68
movq %rbp, %rdi
callq 0x4180
movq %rbx, %rdi
callq 0x6598
jmp 0x555f
movq 0x8(%rsp), %rbx
movq 0x8(%rbx), %rax
cmpq (%rbx), %rax
je 0x572f
leaq 0x10(%rsp), %rdi
callq 0x4180
leaq 0x70(%rsp), %rdi
callq 0x4080
movq %rbx, %rax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10de1(%rip), %rdi     # 0x1644e
leaq 0x10aeb(%rip), %rsi     # 0x1615f
leaq 0x10de7(%rip), %rcx     # 0x16462
movl $0x123, %edx            # imm = 0x123
callq 0x4260
leaq 0x1f09c(%rip), %rdi     # 0x24728
callq 0x4530
testl %eax, %eax
je 0x54c4
leaq 0x1f068(%rip), %rdi     # 0x24708
leaq 0x10d75(%rip), %rsi     # 0x1641c
pushq $0x10
popq %rdx
callq 0x5dfe
leaq 0x7ae(%rip), %rdi       # 0x5e64
leaq 0x1f04b(%rip), %rsi     # 0x24708
leaq 0x1ec24(%rip), %rdx     # 0x242e8
callq 0x42f0
leaq 0x1f058(%rip), %rdi     # 0x24728
callq 0x4250
jmp 0x54c4
leaq 0x1f06f(%rip), %rdi     # 0x24750
callq 0x4530
testl %eax, %eax
je 0x54d2
leaq 0x1f03b(%rip), %rdi     # 0x24730
leaq 0x10d44(%rip), %rsi     # 0x16440
pushq $0x10
popq %rdx
callq 0x5dfe
leaq 0x759(%rip), %rdi       # 0x5e64
leaq 0x1f01e(%rip), %rsi     # 0x24730
leaq 0x1ebcf(%rip), %rdx     # 0x242e8
callq 0x42f0
leaq 0x1f02b(%rip), %rdi     # 0x24750
callq 0x4250
jmp 0x54d2
leaq 0x10d72(%rip), %rdi     # 0x164a8
leaq 0x10a22(%rip), %rsi     # 0x1615f
leaq 0x10d1e(%rip), %rcx     # 0x16462
movl $0x12a, %edx            # imm = 0x12A
callq 0x4260
movq %rax, %rbx
leaq 0x1eff8(%rip), %rdi     # 0x24750
jmp 0x5764
movq %rax, %rbx
leaq 0x1efc4(%rip), %rdi     # 0x24728
callq 0x4230
jmp 0x57d4
movq %rax, %rbx
jmp 0x57ca
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4180
jmp 0x5782
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x5c36
jmp 0x57d4
movq %rax, %rbx
jmp 0x57d4
jmp 0x5795
movq %rax, %rbx
jmp 0x57a7
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x4180
leaq 0x30(%rsp), %rdi
callq 0x6598
jmp 0x57b6
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4180
leaq 0x70(%rsp), %rdi
callq 0x4080
movq 0x8(%rsp), %rdi
callq 0x5fa4
movq %rbx, %rdi
callq 0x4510