// File: /workspace/github_cpp_makefile_star2_O3/grame-cncm[P]digraph/./dglib/digraphop.hh
// Function: std::pair<std::map<char, std::pair<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>, int>, std::less<char>, std::allocator<std::pair<char const, std::pair<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>, int>>>>, std::map<char, std::pair<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>, int>, std::less<char>, std::allocator<std::pair<char const, std::pair<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>, int>>>>> arrows<char, std::pair<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>, int>>(digraph<char, std::pair<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>, int>> const&)
inline std::pair<std::map<N, A>, std::map<N, A>> arrows(const digraph<N, A>& G)
{
    std::map<N, A> incoming;   // arrows arriving to a node
    std::map<N, A> outcoming;  // arrows departing from a node

    // Init incoming and outcoming arrows to empty
    for (const N& n : G.nodes()) {
        incoming[n]  = arrow_traits<A>::empty();
        outcoming[n] = arrow_traits<A>::empty();
    }
    // Collect incoming and outcoming arrows
    for (const N& n : G.nodes()) {
        for (const auto& c : G.connections(n)) {
            outcoming[n]      = arrow_traits<A>::combine(outcoming[n], c.second);
            incoming[c.first] = arrow_traits<A>::combine(incoming[c.first], c.second);
        }
    }
    return {incoming, outcoming};
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, 0x48(%rsp)
leaq 0x70(%rsp), %rax
xorl %ecx, %ecx
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq 0xa0(%rsp), %rax
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq %rsi, 0x40(%rsp)
movq (%rsi), %rcx
movq 0x18(%rcx), %r12
leaq 0x8(%rcx), %rax
movq %rax, 0x38(%rsp)
cmpq %rax, %r12
je 0xd189
leaq 0x8(%rsp), %r14
movq %rsp, %rbx
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0xe6d0
movq %r12, %rbp
addq $0x20, %r12
leaq 0x68(%rsp), %rdi
movq %r12, %rsi
callq 0x3ce2
movq %rax, %r13
movq %rax, %rdi
callq 0x42be
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xd0ce
movq %r13, %rcx
addq $0x8, %rcx
movl 0x8(%rsp), %edx
movl %edx, 0x8(%r13)
movq %rax, 0x10(%r13)
movq 0x18(%rsp), %rdx
movq %rdx, 0x18(%r13)
movq 0x20(%rsp), %rdx
movq %rdx, 0x20(%r13)
movq %rcx, 0x8(%rax)
movq 0x28(%rsp), %rax
movq %rax, 0x28(%r13)
movq %r15, 0x10(%rsp)
movq %r14, 0x18(%rsp)
movq %r14, 0x20(%rsp)
movq %r15, 0x28(%rsp)
movl 0x30(%rsp), %eax
movl %eax, 0x30(%r13)
movq %rbx, %rdi
callq 0x34f0
movq %rbx, %rdi
callq 0xe6d0
leaq 0x98(%rsp), %rdi
movq %r12, %rsi
callq 0x3ce2
movq %rax, %r12
movq %rax, %rdi
callq 0x42be
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xd156
movq %r12, %rcx
addq $0x8, %rcx
movl 0x8(%rsp), %edx
movl %edx, 0x8(%r12)
movq %rax, 0x10(%r12)
movq 0x18(%rsp), %rdx
movq %rdx, 0x18(%r12)
movq 0x20(%rsp), %rdx
movq %rdx, 0x20(%r12)
movq %rcx, 0x8(%rax)
movq 0x28(%rsp), %rax
movq %rax, 0x28(%r12)
movq %r15, 0x10(%rsp)
movq %r14, 0x18(%rsp)
movq %r14, 0x20(%rsp)
movq %r15, 0x28(%rsp)
movl 0x30(%rsp), %eax
movl %eax, 0x30(%r12)
movq %rbx, %rdi
callq 0x34f0
movq %rbp, %rdi
callq 0x21b0
movq %rax, %r12
cmpq 0x38(%rsp), %rax
jne 0xd057
movq 0x40(%rsp), %rax
movq (%rax), %rcx
movq 0x18(%rcx), %r12
addq $0x8, %rcx
cmpq %rcx, %r12
je 0xd355
movq %r12, %rax
leaq 0x98(%rsp), %r14
movq %rsp, %rbx
movq %rcx, 0x50(%rsp)
movq %rax, 0x58(%rsp)
leaq 0x20(%rax), %rsi
movq 0x40(%rsp), %rax
movq (%rax), %rdi
addq $0x30, %rdi
movq %rsi, 0x38(%rsp)
callq 0x47dc
movq 0x18(%rax), %r15
addq $0x8, %rax
movq %rax, 0x60(%rsp)
cmpq %rax, %r15
je 0xd33d
movq %r14, %rdi
movq 0x38(%rsp), %rsi
callq 0x3ce2
leaq 0x28(%r15), %r12
movq %rbx, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x3b32
movq %r14, %r13
movq %r14, %rdi
movq 0x38(%rsp), %rsi
callq 0x3ce2
movq %rax, %rbp
movq %rax, %rdi
callq 0x42be
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xd26e
movq %rbp, %rcx
addq $0x8, %rcx
movl 0x8(%rsp), %edx
movl %edx, 0x8(%rbp)
movq %rax, 0x10(%rbp)
movq 0x18(%rsp), %rdx
movq %rdx, 0x18(%rbp)
movq 0x20(%rsp), %rdx
movq %rdx, 0x20(%rbp)
movq %rcx, 0x8(%rax)
movq 0x28(%rsp), %rax
movq %rax, 0x28(%rbp)
xorl %ecx, %ecx
movq %rcx, 0x10(%rsp)
leaq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movq %rcx, 0x28(%rsp)
leaq 0x20(%r15), %r14
movl 0x30(%rsp), %eax
movl %eax, 0x30(%rbp)
movq %rbx, %rbp
movq %rbx, %rdi
callq 0x34f0
leaq 0x68(%rsp), %rdi
movq %r14, %rsi
callq 0x3ce2
movq %rbp, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x3b32
leaq 0x68(%rsp), %rdi
movq %r14, %rsi
callq 0x3ce2
movq %rax, %r12
movq %rax, %rdi
callq 0x42be
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xd313
movq %r12, %rcx
addq $0x8, %rcx
movl 0x8(%rsp), %edx
movl %edx, 0x8(%r12)
movq %rax, 0x10(%r12)
movq 0x18(%rsp), %rdx
movq %rdx, 0x18(%r12)
movq 0x20(%rsp), %rdx
movq %rdx, 0x20(%r12)
movq %rcx, 0x8(%rax)
movq 0x28(%rsp), %rax
movq %rax, 0x28(%r12)
xorl %ecx, %ecx
movq %rcx, 0x10(%rsp)
leaq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movq %rcx, 0x28(%rsp)
movl 0x30(%rsp), %eax
movl %eax, 0x30(%r12)
movq %rbx, %rdi
callq 0x34f0
movq %r15, %rdi
callq 0x21b0
movq %rax, %r15
cmpq 0x60(%rsp), %rax
movq %r13, %r14
jne 0xd1de
movq 0x58(%rsp), %rdi
callq 0x21b0
movq 0x50(%rsp), %rcx
cmpq %rcx, %rax
jne 0xd1a9
leaq 0x68(%rsp), %rsi
leaq 0x98(%rsp), %rdx
movq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0xe72a
leaq 0x98(%rsp), %rdi
callq 0x38e0
leaq 0x68(%rsp), %rdi
callq 0x38e0
movq %rbx, %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xd3b8
jmp 0xd3b8
jmp 0xd3b8
jmp 0xd3a9
jmp 0xd3b8
jmp 0xd3a9
jmp 0xd3a9
movq %rax, %rbx
movq %rsp, %rdi
callq 0x34f0
jmp 0xd3bb
jmp 0xd3b8
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x38e0
leaq 0x68(%rsp), %rdi
callq 0x38e0
movq %rbx, %rdi
callq 0x2250