// File: grame-cncm[P]digraph/mtests.cpp
// Function: mtest5[abi:cxx11]()
std::string mtest5()
{
    digraph<char, multidep> g;
    g.add('A', 'B', mdep("Y", 1))
        .add('A', 'B', mdep("Y", 2))
        .add('B', 'C', mdep("Q"))
        .add('C', 'A', mdep("X"))
        .add('D', 'B', mdep("M"))
        .add('D', 'C', mdep("W", 2))
        .add('D', 'E', mdep("M"))
        .add('E', 'D', mdep("N", 1))
        .add('G', 'A', mdep("init", 1))
        .add('E', 'H', mdep("end", 0));

    // inline std::pair<std::map<N, A>, std::map<N, A>> arrows(const digraph<N, A>& G)
    std::pair<std::map<char, multidep>, std::map<char, multidep>> PM = arrows(g);

    std::stringstream ss;

    for (char c : g.nodes()) {
        ss << c << ": incoming " << PM.first[c] << ", outcoming: " << PM.second[c] << std::endl;
    }
    return ss.str();
}

// Assembly:
subq $0x6e8, %rsp            # imm = 0x6E8
movq %rdi, 0xd8(%rsp)
movq %rdi, %rax
movq %rax, 0xe0(%rsp)
movq %rdi, 0x6e0(%rsp)
leaq 0x6d0(%rsp), %rdi
callq 0x29c0
movb $0x41, 0x6cf(%rsp)
movb $0x42, 0x6ce(%rsp)
leaq 0x66f(%rsp), %rdi
movq %rdi, 0xe8(%rsp)
callq 0x22a0
movq 0xe8(%rsp), %rdx
leaq 0x28cfe(%rip), %rsi     # 0x3d751
leaq 0x670(%rsp), %rdi
callq 0x2200
jmp 0x14a62
leaq 0x690(%rsp), %rdi
leaq 0x670(%rsp), %rsi
movl $0x1, %edx
callq 0x15b20
jmp 0x14a7e
leaq 0x6d0(%rsp), %rdi
leaq 0x6cf(%rsp), %rsi
leaq 0x6ce(%rsp), %rdx
leaq 0x690(%rsp), %rcx
callq 0x2a00
movq %rax, 0xd0(%rsp)
jmp 0x14aad
movb $0x41, 0x65b(%rsp)
movb $0x42, 0x65a(%rsp)
leaq 0x5ff(%rsp), %rdi
movq %rdi, 0xc8(%rsp)
callq 0x22a0
movq 0xc8(%rsp), %rdx
leaq 0x28c70(%rip), %rsi     # 0x3d751
leaq 0x600(%rsp), %rdi
callq 0x2200
jmp 0x14af0
leaq 0x620(%rsp), %rdi
leaq 0x600(%rsp), %rsi
movl $0x2, %edx
callq 0x15b20
jmp 0x14b0c
movq 0xd0(%rsp), %rdi
leaq 0x65b(%rsp), %rsi
leaq 0x65a(%rsp), %rdx
leaq 0x620(%rsp), %rcx
callq 0x2a00
movq %rax, 0xc0(%rsp)
jmp 0x14b3b
movb $0x42, 0x5fe(%rsp)
movb $0x43, 0x5fd(%rsp)
leaq 0x59f(%rsp), %rdi
movq %rdi, 0xb8(%rsp)
callq 0x22a0
movq 0xb8(%rsp), %rdx
leaq 0x28be4(%rip), %rsi     # 0x3d753
leaq 0x5a0(%rsp), %rdi
callq 0x2200
jmp 0x14b7e
leaq 0x5c0(%rsp), %rdi
leaq 0x5a0(%rsp), %rsi
callq 0x15930
jmp 0x14b95
movq 0xc0(%rsp), %rdi
leaq 0x5fe(%rsp), %rsi
leaq 0x5fd(%rsp), %rdx
leaq 0x5c0(%rsp), %rcx
callq 0x2a00
movq %rax, 0xb0(%rsp)
jmp 0x14bc4
movb $0x43, 0x59e(%rsp)
movb $0x41, 0x59d(%rsp)
leaq 0x53f(%rsp), %rdi
movq %rdi, 0xa8(%rsp)
callq 0x22a0
movq 0xa8(%rsp), %rdx
leaq 0x28b5d(%rip), %rsi     # 0x3d755
leaq 0x540(%rsp), %rdi
callq 0x2200
jmp 0x14c07
leaq 0x560(%rsp), %rdi
leaq 0x540(%rsp), %rsi
callq 0x15930
jmp 0x14c1e
movq 0xb0(%rsp), %rdi
leaq 0x59e(%rsp), %rsi
leaq 0x59d(%rsp), %rdx
leaq 0x560(%rsp), %rcx
callq 0x2a00
movq %rax, 0xa0(%rsp)
jmp 0x14c4d
movb $0x44, 0x53e(%rsp)
movb $0x42, 0x53d(%rsp)
leaq 0x4df(%rsp), %rdi
movq %rdi, 0x98(%rsp)
callq 0x22a0
movq 0x98(%rsp), %rdx
leaq 0x28383(%rip), %rsi     # 0x3d004
leaq 0x4e0(%rsp), %rdi
callq 0x2200
jmp 0x14c90
leaq 0x500(%rsp), %rdi
leaq 0x4e0(%rsp), %rsi
callq 0x15930
jmp 0x14ca7
movq 0xa0(%rsp), %rdi
leaq 0x53e(%rsp), %rsi
leaq 0x53d(%rsp), %rdx
leaq 0x500(%rsp), %rcx
callq 0x2a00
movq %rax, 0x90(%rsp)
jmp 0x14cd6
movb $0x44, 0x4de(%rsp)
movb $0x43, 0x4dd(%rsp)
leaq 0x47f(%rsp), %rdi
movq %rdi, 0x88(%rsp)
callq 0x22a0
movq 0x88(%rsp), %rdx
leaq 0x28ba1(%rip), %rsi     # 0x3d8ab
leaq 0x480(%rsp), %rdi
callq 0x2200
jmp 0x14d19
leaq 0x4a0(%rsp), %rdi
leaq 0x480(%rsp), %rsi
movl $0x2, %edx
callq 0x15b20
jmp 0x14d35
movq 0x90(%rsp), %rdi
leaq 0x4de(%rsp), %rsi
leaq 0x4dd(%rsp), %rdx
leaq 0x4a0(%rsp), %rcx
callq 0x2a00
movq %rax, 0x80(%rsp)
jmp 0x14d64
movb $0x44, 0x47e(%rsp)
movb $0x45, 0x47d(%rsp)
leaq 0x41f(%rsp), %rdi
movq %rdi, 0x78(%rsp)
callq 0x22a0
movq 0x78(%rsp), %rdx
leaq 0x28272(%rip), %rsi     # 0x3d004
leaq 0x420(%rsp), %rdi
callq 0x2200
jmp 0x14da1
leaq 0x440(%rsp), %rdi
leaq 0x420(%rsp), %rsi
callq 0x15930
jmp 0x14db8
movq 0x80(%rsp), %rdi
leaq 0x47e(%rsp), %rsi
leaq 0x47d(%rsp), %rdx
leaq 0x440(%rsp), %rcx
callq 0x2a00
movq %rax, 0x70(%rsp)
jmp 0x14de4
movb $0x45, 0x41e(%rsp)
movb $0x44, 0x41d(%rsp)
leaq 0x3bf(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0x22a0
movq 0x68(%rsp), %rdx
leaq 0x281f4(%rip), %rsi     # 0x3d006
leaq 0x3c0(%rsp), %rdi
callq 0x2200
jmp 0x14e21
leaq 0x3e0(%rsp), %rdi
leaq 0x3c0(%rsp), %rsi
movl $0x1, %edx
callq 0x15b20
jmp 0x14e3d
movq 0x70(%rsp), %rdi
leaq 0x41e(%rsp), %rsi
leaq 0x41d(%rsp), %rdx
leaq 0x3e0(%rsp), %rcx
callq 0x2a00
movq %rax, 0x60(%rsp)
jmp 0x14e66
movb $0x47, 0x3be(%rsp)
movb $0x41, 0x3bd(%rsp)
leaq 0x35f(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x22a0
movq 0x58(%rsp), %rdx
leaq 0x28bf1(%rip), %rsi     # 0x3da85
leaq 0x360(%rsp), %rdi
callq 0x2200
jmp 0x14ea3
leaq 0x380(%rsp), %rdi
leaq 0x360(%rsp), %rsi
movl $0x1, %edx
callq 0x15b20
jmp 0x14ebf
movq 0x60(%rsp), %rdi
leaq 0x3be(%rsp), %rsi
leaq 0x3bd(%rsp), %rdx
leaq 0x380(%rsp), %rcx
callq 0x2a00
movq %rax, 0x50(%rsp)
jmp 0x14ee8
movb $0x45, 0x35e(%rsp)
movb $0x48, 0x35d(%rsp)
leaq 0x2ff(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x22a0
movq 0x48(%rsp), %rdx
leaq 0x2a072(%rip), %rsi     # 0x3ef88
leaq 0x300(%rsp), %rdi
callq 0x2200
jmp 0x14f25
leaq 0x320(%rsp), %rdi
leaq 0x300(%rsp), %rsi
xorl %edx, %edx
callq 0x15b20
jmp 0x14f3e
movq 0x50(%rsp), %rdi
leaq 0x35e(%rsp), %rsi
leaq 0x35d(%rsp), %rdx
leaq 0x320(%rsp), %rcx
callq 0x2a00
jmp 0x14f62
leaq 0x320(%rsp), %rdi
callq 0x2c20
leaq 0x300(%rsp), %rdi
callq 0x20e0
leaq 0x2ff(%rsp), %rdi
callq 0x21c0
leaq 0x380(%rsp), %rdi
callq 0x2c20
leaq 0x360(%rsp), %rdi
callq 0x20e0
leaq 0x35f(%rsp), %rdi
callq 0x21c0
leaq 0x3e0(%rsp), %rdi
callq 0x2c20
leaq 0x3c0(%rsp), %rdi
callq 0x20e0
leaq 0x3bf(%rsp), %rdi
callq 0x21c0
leaq 0x440(%rsp), %rdi
callq 0x2c20
leaq 0x420(%rsp), %rdi
callq 0x20e0
leaq 0x41f(%rsp), %rdi
callq 0x21c0
leaq 0x4a0(%rsp), %rdi
callq 0x2c20
leaq 0x480(%rsp), %rdi
callq 0x20e0
leaq 0x47f(%rsp), %rdi
callq 0x21c0
leaq 0x500(%rsp), %rdi
callq 0x2c20
leaq 0x4e0(%rsp), %rdi
callq 0x20e0
leaq 0x4df(%rsp), %rdi
callq 0x21c0
leaq 0x560(%rsp), %rdi
callq 0x2c20
leaq 0x540(%rsp), %rdi
callq 0x20e0
leaq 0x53f(%rsp), %rdi
callq 0x21c0
leaq 0x5c0(%rsp), %rdi
callq 0x2c20
leaq 0x5a0(%rsp), %rdi
callq 0x20e0
leaq 0x59f(%rsp), %rdi
callq 0x21c0
leaq 0x620(%rsp), %rdi
callq 0x2c20
leaq 0x600(%rsp), %rdi
callq 0x20e0
leaq 0x5ff(%rsp), %rdi
callq 0x21c0
leaq 0x690(%rsp), %rdi
callq 0x2c20
leaq 0x670(%rsp), %rdi
callq 0x20e0
leaq 0x66f(%rsp), %rdi
callq 0x21c0
leaq 0x298(%rsp), %rdi
leaq 0x6d0(%rsp), %rsi
callq 0x160b0
jmp 0x150ff
leaq 0x110(%rsp), %rdi
callq 0x2110
jmp 0x1510e
leaq 0x6d0(%rsp), %rdi
callq 0xa130
movq %rax, 0x40(%rsp)
jmp 0x15122
movq 0x40(%rsp), %rax
movq %rax, 0x108(%rsp)
movq 0x108(%rsp), %rdi
callq 0xa150
movq %rax, 0x100(%rsp)
movq 0x108(%rsp), %rdi
callq 0xa180
movq %rax, 0xf8(%rsp)
leaq 0x100(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0xa1b0
testb $0x1, %al
jne 0x15177
jmp 0x15721
leaq 0x100(%rsp), %rdi
callq 0xa1d0
movb (%rax), %al
movb %al, 0xf7(%rsp)
leaq 0x120(%rsp), %rdi
movsbl 0xf7(%rsp), %esi
callq 0x21e0
movq %rax, 0x38(%rsp)
jmp 0x151a9
movq 0x38(%rsp), %rdi
leaq 0x288d5(%rip), %rsi     # 0x3da8a
callq 0x2180
movq %rax, 0x30(%rsp)
jmp 0x151c1
leaq 0x298(%rsp), %rdi
leaq 0xf7(%rsp), %rsi
callq 0x6710
movq %rax, 0x28(%rsp)
jmp 0x151dd
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdi
callq 0xa2c0
movq %rax, 0x20(%rsp)
jmp 0x151f3
movq 0x20(%rsp), %rdi
leaq 0x28897(%rip), %rsi     # 0x3da96
callq 0x2180
movq %rax, 0x18(%rsp)
jmp 0x1520b
leaq 0x2c8(%rsp), %rdi
leaq 0xf7(%rsp), %rsi
callq 0x6710
movq %rax, 0x10(%rsp)
jmp 0x15227
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdi
callq 0xa2c0
movq %rax, 0x8(%rsp)
jmp 0x1523d
movq 0x8(%rsp), %rdi
movq 0x40d6f(%rip), %rsi     # 0x55fb8
callq 0x21b0
jmp 0x15250
jmp 0x15252
leaq 0x100(%rsp), %rdi
callq 0xa350
jmp 0x15159
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x156bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x156b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x156a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x15696
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x15689
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x1567c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x1566f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x15662
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x15655
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x15648
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x1563b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x1562e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x15621
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x15614
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x15607
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x155fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x155ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x155e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x155d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x155c6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x155b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x155ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x1559f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x15592
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x15585
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x15578
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x1556b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x1555e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x15551
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
leaq 0x320(%rsp), %rdi
callq 0x2c20
leaq 0x300(%rsp), %rdi
callq 0x20e0
leaq 0x2ff(%rsp), %rdi
callq 0x21c0
leaq 0x380(%rsp), %rdi
callq 0x2c20
leaq 0x360(%rsp), %rdi
callq 0x20e0
leaq 0x35f(%rsp), %rdi
callq 0x21c0
leaq 0x3e0(%rsp), %rdi
callq 0x2c20
leaq 0x3c0(%rsp), %rdi
callq 0x20e0
leaq 0x3bf(%rsp), %rdi
callq 0x21c0
leaq 0x440(%rsp), %rdi
callq 0x2c20
leaq 0x420(%rsp), %rdi
callq 0x20e0
leaq 0x41f(%rsp), %rdi
callq 0x21c0
leaq 0x4a0(%rsp), %rdi
callq 0x2c20
leaq 0x480(%rsp), %rdi
callq 0x20e0
leaq 0x47f(%rsp), %rdi
callq 0x21c0
leaq 0x500(%rsp), %rdi
callq 0x2c20
leaq 0x4e0(%rsp), %rdi
callq 0x20e0
leaq 0x4df(%rsp), %rdi
callq 0x21c0
leaq 0x560(%rsp), %rdi
callq 0x2c20
leaq 0x540(%rsp), %rdi
callq 0x20e0
leaq 0x53f(%rsp), %rdi
callq 0x21c0
leaq 0x5c0(%rsp), %rdi
callq 0x2c20
leaq 0x5a0(%rsp), %rdi
callq 0x20e0
leaq 0x59f(%rsp), %rdi
callq 0x21c0
leaq 0x620(%rsp), %rdi
callq 0x2c20
leaq 0x600(%rsp), %rdi
callq 0x20e0
leaq 0x5ff(%rsp), %rdi
callq 0x21c0
leaq 0x690(%rsp), %rdi
callq 0x2c20
leaq 0x670(%rsp), %rdi
callq 0x20e0
leaq 0x66f(%rsp), %rdi
callq 0x21c0
jmp 0x1577c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x1577c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
jmp 0x1576f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x660(%rsp)
movl %eax, 0x65c(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x2120
jmp 0x1576f
movq 0xd8(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x2170
jmp 0x15738
leaq 0x110(%rsp), %rdi
callq 0x2120
leaq 0x298(%rsp), %rdi
callq 0x16540
leaq 0x6d0(%rsp), %rdi
callq 0x3780
movq 0xe0(%rsp), %rax
addq $0x6e8, %rsp            # imm = 0x6E8
retq
leaq 0x298(%rsp), %rdi
callq 0x16540
leaq 0x6d0(%rsp), %rdi
callq 0x3780
movq 0x660(%rsp), %rdi
callq 0x2290
nopw %cs:(%rax,%rax)