// File: /workspace/github_cpp_makefile_star2_O3/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 0xabd6
leaq 0x14fe9(%rip), %rsi     # 0x1d0e3
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 0x813c
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x8143
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 0x14fb3(%rip), %rsi     # 0x1d119
callq 0x75c0
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8193
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x819b
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 0x81dd
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x7300
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x81f4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7300
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x820b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7300
leaq 0x14f13(%rip), %rsi     # 0x1d125
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 0x8390
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 0xcf84
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0xd04f
movq (%r14), %rbp
movq 0x8(%r14), %r14
cmpq %r14, %rbp
je 0x8390
leaq 0x68(%rsp), %r15
leaq 0x14e60(%rip), %r12     # 0x1d10e
movl $0x1, %edx
movq %r15, %rdi
leaq 0x160b3(%rip), %rsi     # 0x1e370
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 0x1607e(%rip), %rsi     # 0x1e370
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 0x82ae
leaq 0x68(%rsp), %rdi
callq 0x7430
movq 0x22bdf(%rip), %rax     # 0x2af80
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 0x83fd
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x7300
jmp 0x83fd
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x841b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7300
jmp 0x841b
jmp 0x8418
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x843b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7300
jmp 0x843b
jmp 0x8438
jmp 0x8438
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x7450
movq %rbx, %rdi
callq 0x7550