// File: grame-cncm[P]digraph/mtests.cpp
// Function: mtest4[abi:cxx11]()
std::string mtest4()
{
    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));

    std::stringstream ss;

    digraph<digraph<char, multidep>, multidep> d = graph2dag(g);
    ss << "d = " << d;
    return ss.str();
}

// Assembly:
subq $0x558, %rsp            # imm = 0x558
movq %rdi, 0x78(%rsp)
movq %rdi, %rax
movq %rax, 0x80(%rsp)
movq %rdi, 0x550(%rsp)
leaq 0x540(%rsp), %rdi
callq 0x29c0
movb $0x41, 0x53f(%rsp)
movb $0x42, 0x53e(%rsp)
leaq 0x4df(%rsp), %rdi
movq %rdi, 0x88(%rsp)
callq 0x22a0
movq 0x88(%rsp), %rdx
leaq 0x29891(%rip), %rsi     # 0x3d751
leaq 0x4e0(%rsp), %rdi
callq 0x2200
jmp 0x13ecf
leaq 0x500(%rsp), %rdi
leaq 0x4e0(%rsp), %rsi
movl $0x1, %edx
callq 0x15b20
jmp 0x13eeb
leaq 0x540(%rsp), %rdi
leaq 0x53f(%rsp), %rsi
leaq 0x53e(%rsp), %rdx
leaq 0x500(%rsp), %rcx
callq 0x2a00
movq %rax, 0x70(%rsp)
jmp 0x13f17
movb $0x41, 0x4cb(%rsp)
movb $0x42, 0x4ca(%rsp)
leaq 0x46f(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0x22a0
movq 0x68(%rsp), %rdx
leaq 0x2980c(%rip), %rsi     # 0x3d751
leaq 0x470(%rsp), %rdi
callq 0x2200
jmp 0x13f54
leaq 0x490(%rsp), %rdi
leaq 0x470(%rsp), %rsi
movl $0x2, %edx
callq 0x15b20
jmp 0x13f70
movq 0x70(%rsp), %rdi
leaq 0x4cb(%rsp), %rsi
leaq 0x4ca(%rsp), %rdx
leaq 0x490(%rsp), %rcx
callq 0x2a00
movq %rax, 0x60(%rsp)
jmp 0x13f99
movb $0x42, 0x46e(%rsp)
movb $0x43, 0x46d(%rsp)
leaq 0x40f(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x22a0
movq 0x58(%rsp), %rdx
leaq 0x2978c(%rip), %rsi     # 0x3d753
leaq 0x410(%rsp), %rdi
callq 0x2200
jmp 0x13fd6
leaq 0x430(%rsp), %rdi
leaq 0x410(%rsp), %rsi
callq 0x15930
jmp 0x13fed
movq 0x60(%rsp), %rdi
leaq 0x46e(%rsp), %rsi
leaq 0x46d(%rsp), %rdx
leaq 0x430(%rsp), %rcx
callq 0x2a00
movq %rax, 0x50(%rsp)
jmp 0x14016
movb $0x43, 0x40e(%rsp)
movb $0x41, 0x40d(%rsp)
leaq 0x3af(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x22a0
movq 0x48(%rsp), %rdx
leaq 0x29711(%rip), %rsi     # 0x3d755
leaq 0x3b0(%rsp), %rdi
callq 0x2200
jmp 0x14053
leaq 0x3d0(%rsp), %rdi
leaq 0x3b0(%rsp), %rsi
callq 0x15930
jmp 0x1406a
movq 0x50(%rsp), %rdi
leaq 0x40e(%rsp), %rsi
leaq 0x40d(%rsp), %rdx
leaq 0x3d0(%rsp), %rcx
callq 0x2a00
movq %rax, 0x40(%rsp)
jmp 0x14093
movb $0x44, 0x3ae(%rsp)
movb $0x42, 0x3ad(%rsp)
leaq 0x34f(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x22a0
movq 0x38(%rsp), %rdx
leaq 0x28f43(%rip), %rsi     # 0x3d004
leaq 0x350(%rsp), %rdi
callq 0x2200
jmp 0x140d0
leaq 0x370(%rsp), %rdi
leaq 0x350(%rsp), %rsi
callq 0x15930
jmp 0x140e7
movq 0x40(%rsp), %rdi
leaq 0x3ae(%rsp), %rsi
leaq 0x3ad(%rsp), %rdx
leaq 0x370(%rsp), %rcx
callq 0x2a00
movq %rax, 0x30(%rsp)
jmp 0x14110
movb $0x44, 0x34e(%rsp)
movb $0x43, 0x34d(%rsp)
leaq 0x2ef(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x22a0
movq 0x28(%rsp), %rdx
leaq 0x2976d(%rip), %rsi     # 0x3d8ab
leaq 0x2f0(%rsp), %rdi
callq 0x2200
jmp 0x1414d
leaq 0x310(%rsp), %rdi
leaq 0x2f0(%rsp), %rsi
movl $0x2, %edx
callq 0x15b20
jmp 0x14169
movq 0x30(%rsp), %rdi
leaq 0x34e(%rsp), %rsi
leaq 0x34d(%rsp), %rdx
leaq 0x310(%rsp), %rcx
callq 0x2a00
movq %rax, 0x20(%rsp)
jmp 0x14192
movb $0x44, 0x2ee(%rsp)
movb $0x45, 0x2ed(%rsp)
leaq 0x28f(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x22a0
movq 0x18(%rsp), %rdx
leaq 0x28e44(%rip), %rsi     # 0x3d004
leaq 0x290(%rsp), %rdi
callq 0x2200
jmp 0x141cf
leaq 0x2b0(%rsp), %rdi
leaq 0x290(%rsp), %rsi
callq 0x15930
jmp 0x141e6
movq 0x20(%rsp), %rdi
leaq 0x2ee(%rsp), %rsi
leaq 0x2ed(%rsp), %rdx
leaq 0x2b0(%rsp), %rcx
callq 0x2a00
movq %rax, 0x10(%rsp)
jmp 0x1420f
movb $0x45, 0x28e(%rsp)
movb $0x44, 0x28d(%rsp)
leaq 0x22f(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x22a0
movq 0x8(%rsp), %rdx
leaq 0x28dc9(%rip), %rsi     # 0x3d006
leaq 0x230(%rsp), %rdi
callq 0x2200
jmp 0x1424c
leaq 0x250(%rsp), %rdi
leaq 0x230(%rsp), %rsi
movl $0x1, %edx
callq 0x15b20
jmp 0x14268
movq 0x10(%rsp), %rdi
leaq 0x28e(%rsp), %rsi
leaq 0x28d(%rsp), %rdx
leaq 0x250(%rsp), %rcx
callq 0x2a00
jmp 0x1428c
leaq 0x250(%rsp), %rdi
callq 0x2c20
leaq 0x230(%rsp), %rdi
callq 0x20e0
leaq 0x22f(%rsp), %rdi
callq 0x21c0
leaq 0x2b0(%rsp), %rdi
callq 0x2c20
leaq 0x290(%rsp), %rdi
callq 0x20e0
leaq 0x28f(%rsp), %rdi
callq 0x21c0
leaq 0x310(%rsp), %rdi
callq 0x2c20
leaq 0x2f0(%rsp), %rdi
callq 0x20e0
leaq 0x2ef(%rsp), %rdi
callq 0x21c0
leaq 0x370(%rsp), %rdi
callq 0x2c20
leaq 0x350(%rsp), %rdi
callq 0x20e0
leaq 0x34f(%rsp), %rdi
callq 0x21c0
leaq 0x3d0(%rsp), %rdi
callq 0x2c20
leaq 0x3b0(%rsp), %rdi
callq 0x20e0
leaq 0x3af(%rsp), %rdi
callq 0x21c0
leaq 0x430(%rsp), %rdi
callq 0x2c20
leaq 0x410(%rsp), %rdi
callq 0x20e0
leaq 0x40f(%rsp), %rdi
callq 0x21c0
leaq 0x490(%rsp), %rdi
callq 0x2c20
leaq 0x470(%rsp), %rdi
callq 0x20e0
leaq 0x46f(%rsp), %rdi
callq 0x21c0
leaq 0x500(%rsp), %rdi
callq 0x2c20
leaq 0x4e0(%rsp), %rdi
callq 0x20e0
leaq 0x4df(%rsp), %rdi
callq 0x21c0
leaq 0xa0(%rsp), %rdi
callq 0x2110
jmp 0x143d3
leaq 0x90(%rsp), %rdi
leaq 0x540(%rsp), %rsi
callq 0x15d00
jmp 0x143ea
leaq 0xb0(%rsp), %rdi
leaq 0x294b4(%rip), %rsi     # 0x3d8ad
callq 0x2180
movq %rax, (%rsp)
jmp 0x14404
movq (%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x15da0
jmp 0x14417
movq 0x78(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x2170
jmp 0x1442b
leaq 0x90(%rsp), %rdi
callq 0x160a0
leaq 0xa0(%rsp), %rdi
callq 0x2120
leaq 0x540(%rsp), %rdi
callq 0x3780
movq 0x80(%rsp), %rax
addq $0x558, %rsp            # imm = 0x558
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x147d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x147ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x147bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x147b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x147a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x14796
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x14789
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x1477c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x1476f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x14762
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x14755
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x14748
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x1473b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x1472e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x14721
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x14714
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x14707
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x146fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x146ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x146e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x146d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x146c6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x146b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
leaq 0x250(%rsp), %rdi
callq 0x2c20
leaq 0x230(%rsp), %rdi
callq 0x20e0
leaq 0x22f(%rsp), %rdi
callq 0x21c0
leaq 0x2b0(%rsp), %rdi
callq 0x2c20
leaq 0x290(%rsp), %rdi
callq 0x20e0
leaq 0x28f(%rsp), %rdi
callq 0x21c0
leaq 0x310(%rsp), %rdi
callq 0x2c20
leaq 0x2f0(%rsp), %rdi
callq 0x20e0
leaq 0x2ef(%rsp), %rdi
callq 0x21c0
leaq 0x370(%rsp), %rdi
callq 0x2c20
leaq 0x350(%rsp), %rdi
callq 0x20e0
leaq 0x34f(%rsp), %rdi
callq 0x21c0
leaq 0x3d0(%rsp), %rdi
callq 0x2c20
leaq 0x3b0(%rsp), %rdi
callq 0x20e0
leaq 0x3af(%rsp), %rdi
callq 0x21c0
leaq 0x430(%rsp), %rdi
callq 0x2c20
leaq 0x410(%rsp), %rdi
callq 0x20e0
leaq 0x40f(%rsp), %rdi
callq 0x21c0
leaq 0x490(%rsp), %rdi
callq 0x2c20
leaq 0x470(%rsp), %rdi
callq 0x20e0
leaq 0x46f(%rsp), %rdi
callq 0x21c0
leaq 0x500(%rsp), %rdi
callq 0x2c20
leaq 0x4e0(%rsp), %rdi
callq 0x20e0
leaq 0x4df(%rsp), %rdi
callq 0x21c0
jmp 0x14840
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x14840
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
jmp 0x14833
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d0(%rsp)
movl %eax, 0x4cc(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x160a0
leaq 0xa0(%rsp), %rdi
callq 0x2120
leaq 0x540(%rsp), %rdi
callq 0x3780
movq 0x4d0(%rsp), %rdi
callq 0x2290
nopw (%rax,%rax)