// File: /workspace/github_cpp_makefile_star2_O1/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), %rax
movq 0x18(%rax), %rbx
addq $0x8, %rax
movq %rax, 0x38(%rsp)
cmpq %rax, %rbx
je 0xd286
leaq 0x8(%rsp), %r12
movq %rsp, %r14
xorl %r15d, %r15d
movq %r14, %rdi
callq 0xe7ea
leaq 0x20(%rbx), %r13
leaq 0x68(%rsp), %rdi
movq %r13, %rsi
callq 0x3dc4
movq %rax, %rbp
movq %rax, %rdi
callq 0x43a8
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xd1de
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)
movq %r15, 0x10(%rsp)
movq %r12, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movq %r15, 0x28(%rsp)
movl 0x30(%rsp), %eax
movl %eax, 0x30(%rbp)
movq %r14, %rdi
callq 0x35c2
movq %r14, %rdi
callq 0xe7ea
leaq 0x98(%rsp), %rdi
movq %r13, %rsi
callq 0x3dc4
movq %rax, %r13
movq %rax, %rdi
callq 0x43a8
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xd260
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 %r12, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movq %r15, 0x28(%rsp)
movl 0x30(%rsp), %eax
movl %eax, 0x30(%r13)
movq %r14, %rdi
callq 0x35c2
movq %rbx, %rdi
callq 0x21b0
movq %rax, %rbx
cmpq 0x38(%rsp), %rax
jne 0xd16b
movq 0x40(%rsp), %rax
movq (%rax), %rcx
movq 0x18(%rcx), %rax
addq $0x8, %rcx
movq %rcx, 0x50(%rsp)
cmpq %rcx, %rax
je 0xd458
leaq 0x98(%rsp), %r14
movq %rsp, %rbx
movq %rax, 0x58(%rsp)
leaq 0x20(%rax), %rsi
movq 0x40(%rsp), %rax
movq (%rax), %rdi
addq $0x30, %rdi
movq %rsi, 0x38(%rsp)
callq 0x48d0
movq 0x18(%rax), %r15
addq $0x8, %rax
movq %rax, 0x60(%rsp)
cmpq %rax, %r15
je 0xd443
movq %r14, %rdi
movq 0x38(%rsp), %rsi
callq 0x3dc4
leaq 0x28(%r15), %r12
movq %rbx, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x3c0e
movq %r14, %r13
movq %r14, %rdi
movq 0x38(%rsp), %rsi
callq 0x3dc4
movq %rax, %rbp
movq %rax, %rdi
callq 0x43a8
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xd374
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 0x35c2
leaq 0x68(%rsp), %rdi
movq %r14, %rsi
callq 0x3dc4
movq %rbp, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x3c0e
leaq 0x68(%rsp), %rdi
movq %r14, %rsi
callq 0x3dc4
movq %rax, %r12
movq %rax, %rdi
callq 0x43a8
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xd419
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 0x35c2
movq %r15, %rdi
callq 0x21b0
movq %rax, %r15
cmpq 0x60(%rsp), %rax
movq %r13, %r14
jne 0xd2e4
movq 0x58(%rsp), %rdi
callq 0x21b0
cmpq 0x50(%rsp), %rax
jne 0xd2af
leaq 0x68(%rsp), %rsi
leaq 0x98(%rsp), %rdx
movq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0xe84a
leaq 0x98(%rsp), %rdi
callq 0x39a8
leaq 0x68(%rsp), %rdi
callq 0x39a8
movq %rbx, %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xd4bb
jmp 0xd4bb
jmp 0xd4bb
jmp 0xd4ac
jmp 0xd4bb
jmp 0xd4ac
jmp 0xd4ac
movq %rax, %rbx
movq %rsp, %rdi
callq 0x35c2
jmp 0xd4be
jmp 0xd4bb
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x39a8
leaq 0x68(%rsp), %rdi
callq 0x39a8
movq %rbx, %rdi
callq 0x2250