// File: /workspace/github_cpp_makefile_star2_O1/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 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0xabc6
leaq 0x13f72(%rip), %rsi     # 0x1c06b
leaq 0x8(%rsp), %rdi
callq 0x75c0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x8(%rsp), %rdi
callq 0x7100
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x813b
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x8142
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x13f3c(%rip), %rsi     # 0x1c0a1
callq 0x75c0
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8192
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x819a
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x68(%rsp), %rdi
movl $0x30, %edx
callq 0x7170
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x81dc
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x7300
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x81f3
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7300
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x820a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7300
leaq 0x13e9c(%rip), %rsi     # 0x1c0ad
leaq 0x68(%rsp), %r15
movl $0x14, %edx
movq %r15, %rdi
callq 0x7350
movq 0x68(%rsp), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x72e0
movsbl %al, %esi
leaq 0x68(%rsp), %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
movq (%r14), %r15
movq 0x8(%r14), %r12
cmpq %r12, %r15
je 0x828d
movq %r12, %rax
subq %r15, %rax
sarq $0x3, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rcx
callq 0xce9a
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0xcf65
movq (%r14), %rbp
movq 0x8(%r14), %r14
cmpq %r14, %rbp
je 0x838b
leaq 0x68(%rsp), %r15
leaq 0x13ded(%rip), %r12     # 0x1c096
movl $0x1, %edx
movq %r15, %rdi
leaq 0x15048(%rip), %rsi     # 0x1d300
callq 0x7350
movq 0x18(%rbx), %rax
imulq $0xb8, (%rbp), %rcx
movq 0x58(%rax,%rcx), %rsi
movq 0x60(%rax,%rcx), %rdx
movq %r15, %rdi
callq 0x7350
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x15013(%rip), %rsi     # 0x1d300
callq 0x7350
movl $0x1, %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x7350
movq 0x18(%rbx), %rax
imulq $0xb8, (%rbp), %rcx
movq 0x8(%rax,%rcx), %rsi
subq (%rax,%rcx), %rsi
sarq $0x4, %rsi
movq %r13, %rdi
callq 0x7230
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x7350
movq 0x18(%rbx), %rax
imulq $0xb8, (%rbp), %rcx
movq 0x38(%rax,%rcx), %rsi
movq 0x40(%rax,%rcx), %rdx
movq %r13, %rdi
callq 0x7350
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x72e0
movsbl %al, %esi
movq %r13, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
addq $0x8, %rbp
cmpq %r14, %rbp
jne 0x82a9
leaq 0x68(%rsp), %rdi
callq 0x7430
movq 0x21be4(%rip), %rax     # 0x29f80
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x70(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x68(%rsp,%rcx)
callq 0x72a0
leaq 0x160(%rsp), %rdi
callq 0x7110
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x83f8
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x7300
jmp 0x83f8
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x8416
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7300
jmp 0x8416
jmp 0x8413
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x8436
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7300
jmp 0x8436
jmp 0x8433
jmp 0x8433
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x7450
movq %rbx, %rdi
callq 0x7550