// File: /workspace/github_cpp_makefile_star2_O2/kulpreet[P]lightning-network-graph-analysis/src/include/algos.hpp
// Function: lncentrality::sort_and_print_art_points(std::vector<unsigned long, std::allocator<unsigned long>>&, 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 sort_and_print_art_points(std::vector<Vertex> &art_points, LitGraph &g,
                               string &stem, string &outdir) {
  std::ofstream out;
  out.open(outdir + "/" + stem + ".all_ap.csv",
           std::fstream::out | std::fstream::trunc);

  out << "alias,degree,pub_key" << std::endl;
  std::sort(art_points.begin(), art_points.end(),
            compare_by_degree<LitGraph>(g));
  // print top art points
  std::for_each(art_points.begin(), art_points.end(), [&out, &g](Vertex &v) {
    out << "\"" << g[v].name << "\""
        << "," << degree(v, g) << "," << g[v].pub_key << std::endl;
  });

  out.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x68(%rsp), %rdi
callq 0x7500
leaq 0x11431(%rip), %rdx     # 0x1909b
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x9066
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq %r15, %rdx
callq 0x9047
leaq 0x11441(%rip), %rdx     # 0x190d1
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x9028
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
pushq $0x30
popq %rdx
callq 0x7190
leaq 0x48(%rsp), %rdi
callq 0x7180
leaq 0x28(%rsp), %rdi
callq 0x7180
leaq 0x8(%rsp), %rdi
callq 0x7180
leaq 0x11407(%rip), %rsi     # 0x190dd
leaq 0x68(%rsp), %rdi
callq 0x72e0
movq %rax, %rdi
callq 0x71a0
movq (%r14), %rdi
movq 0x8(%r14), %rsi
movq %rbx, %rdx
callq 0xbbf6
movq (%r14), %r13
movq 0x8(%r14), %rbp
leaq 0x12713(%rip), %r14     # 0x1a418
leaq 0x68(%rsp), %r15
leaq 0x113b5(%rip), %r12     # 0x190c6
cmpq %rbp, %r13
je 0x7db0
movq %r15, %rdi
movq %r14, %rsi
callq 0x72e0
movq 0x18(%rbx), %rcx
imulq $0xb8, (%r13), %rdx
leaq (%rcx,%rdx), %rsi
addq $0x58, %rsi
movq %rax, %rdi
callq 0x72c0
movq %rax, %rdi
movq %r14, %rsi
callq 0x72e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x72e0
movq 0x18(%rbx), %rcx
imulq $0xb8, (%r13), %rdx
movq 0x8(%rcx,%rdx), %rsi
subq (%rcx,%rdx), %rsi
sarq $0x4, %rsi
movq %rax, %rdi
callq 0x7240
movq %rax, %rdi
movq %r12, %rsi
callq 0x72e0
movq 0x18(%rbx), %rcx
imulq $0xb8, (%r13), %rdx
leaq (%rcx,%rdx), %rsi
addq $0x38, %rsi
movq %rax, %rdi
callq 0x72c0
movq %rax, %rdi
callq 0x71a0
addq $0x8, %r13
jmp 0x7d11
leaq 0x68(%rsp), %rdi
callq 0x7430
leaq 0x68(%rsp), %rdi
callq 0x7450
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x7180
jmp 0x7de8
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x7180
jmp 0x7df7
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7180
jmp 0x7e0a
jmp 0x7e07
jmp 0x7e07
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x7450
movq %rbx, %rdi
callq 0x7550