// File: kulpreet[P]lightning-network-graph-analysis/src/include/algos.hpp
// Function: lncentrality::get_articulation_points(boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, lncentrality::LitVertex, lncentrality::LitEdge, boost::no_property, boost::listS>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void get_articulation_points(LitGraph &g, string &stem, string &outdir) {
  std::ofstream out;
  std::vector<Vertex> art_points;
  std::pair<std::size_t, std::back_insert_iterator<std::vector<Vertex>>>
      results = biconnected_components(g, get(&LitEdge::component, g),
                                       std::back_inserter(art_points));

  // date, #components, #interesting art points
  out.open(outdir + "/all_ap_stats.csv", std::fstream::out | std::fstream::app);
  out << stem << "," << results.first << "," << art_points.size() << std::endl;
  out.close();

  find_non_singleton_components(art_points, g, stem, outdir);
  sort_and_print_art_points(art_points, g, stem, outdir);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2e0, %rsp            # imm = 0x2E0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x218(%rbp), %rdi
callq 0xa760
leaq -0x230(%rbp), %rdi
callq 0xfc00
movq -0x8(%rbp), %rsi
movq %rsi, -0x290(%rbp)
movl $0xd8, %edi
callq 0xfc90
movq %rax, -0x288(%rbp)
jmp 0xc50d
movq -0x288(%rbp), %rax
movq %rax, -0x248(%rbp)
leaq -0x230(%rbp), %rdi
callq 0xfcc0
movq %rax, -0x298(%rbp)
jmp 0xc530
movq -0x290(%rbp), %rdi
movq -0x298(%rbp), %rax
movq %rax, -0x260(%rbp)
movq -0x248(%rbp), %rsi
movq -0x260(%rbp), %rdx
callq 0xfc20
movq %rdx, -0x2a8(%rbp)
movq %rax, -0x2a0(%rbp)
jmp 0xc568
movq -0x2a8(%rbp), %rax
movq -0x2a0(%rbp), %rcx
movq %rcx, -0x240(%rbp)
movq %rax, -0x238(%rbp)
movq -0x18(%rbp), %rsi
leaq 0x3eb82(%rip), %rdx     # 0x4b111
leaq -0x280(%rbp), %rdi
callq 0xef20
jmp 0xc59d
movl $0x10, %edi
movl $0x1, %esi
callq 0xefa0
movl %eax, -0x2ac(%rbp)
jmp 0xc5b4
movl -0x2ac(%rbp), %edx
leaq -0x218(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0xa210
jmp 0xc5cf
leaq -0x280(%rbp), %rdi
callq 0xa2b0
movq -0x10(%rbp), %rsi
leaq -0x218(%rbp), %rdi
callq 0xa3e0
movq %rax, -0x2b8(%rbp)
jmp 0xc5f4
movq -0x2b8(%rbp), %rdi
leaq 0x3eaa1(%rip), %rsi     # 0x4b0a3
callq 0xa410
movq %rax, -0x2c0(%rbp)
jmp 0xc610
movq -0x2c0(%rbp), %rdi
movq -0x240(%rbp), %rsi
callq 0xa0c0
movq %rax, -0x2c8(%rbp)
jmp 0xc62c
movq -0x2c8(%rbp), %rdi
leaq 0x3ea69(%rip), %rsi     # 0x4b0a3
callq 0xa410
movq %rax, -0x2d0(%rbp)
jmp 0xc648
leaq -0x230(%rbp), %rdi
callq 0xfcf0
movq -0x2d0(%rbp), %rdi
movq %rax, %rsi
callq 0xa0c0
movq %rax, -0x2d8(%rbp)
jmp 0xc66c
movq -0x2d8(%rbp), %rdi
movq 0x688e6(%rip), %rsi     # 0x74f60
callq 0xa460
jmp 0xc681
leaq -0x218(%rbp), %rdi
callq 0xa640
jmp 0xc68f
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq -0x230(%rbp), %rdi
callq 0xb9d0
jmp 0xc6a9
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq -0x230(%rbp), %rdi
callq 0xb6e0
jmp 0xc6c3
leaq -0x230(%rbp), %rdi
callq 0xfd10
leaq -0x218(%rbp), %rdi
callq 0xa6a0
addq $0x2e0, %rsp            # imm = 0x2E0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x250(%rbp)
movl %eax, -0x254(%rbp)
jmp 0xc716
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x250(%rbp)
movl %eax, -0x254(%rbp)
leaq -0x280(%rbp), %rdi
callq 0xa2b0
leaq -0x230(%rbp), %rdi
callq 0xfd10
leaq -0x218(%rbp), %rdi
callq 0xa6a0
movq -0x250(%rbp), %rdi
callq 0xa7d0
nopw (%rax,%rax)