// File: grame-cncm[P]digraph/tests.cpp
// Function: test7(std::ostream&)
void test7(std::ostream& ss)
{
    digraph<char, int> g;
    g.add('A', 'B', 0)
        .add('B', 'C', 1)
        .add('C', 'A', 0)
        .add('D', 'B', 0)
        .add('D', 'C', 0)
        .add('D', 'E', 1)
        .add('E', 'D', 0)
        .add('E', 'F', 0)
        .add('F', 'G', 0)
        .add('G', 'F', 1)
        .add('H', 'G', 0)
        .add('H', 'E', 0)
        .add('H', 'H', 1);

    auto h  = graph2dag(g);     // on fait un dag dont les noeuds sont les cycles du graphe g
    auto p  = parallelize(h);   //
    auto rp = rparallelize(h);  //
    auto s  = serialize(h);     //

    ss << "test7:        g = " << g << "; ";
    ss << "number of cycles: " << cycles(g) << "; ";
    ss << "0-cycles        : " << cycles(cut(g, 1)) << "; ";
    ss << "graph2dag(g)    = " << h << "; ";
    ss << "parallelize(h)  = " << p << "; ";
    ss << "rparallelize(h)  = " << rp << "; ";
    ss << "serialize(h)    = " << s << "; ";

    dotfile(ss, g);
}

// Assembly:
subq $0x1e8, %rsp            # imm = 0x1E8
movq %rdi, 0x1e0(%rsp)
leaq 0x1d0(%rsp), %rdi
movq %rdi, 0xe0(%rsp)
callq 0x24270
movq 0xe0(%rsp), %rdi
movb $0x41, 0x1cf(%rsp)
movb $0x42, 0x1ce(%rsp)
movl $0x0, 0x1c8(%rsp)
leaq 0x1cf(%rsp), %rsi
leaq 0x1ce(%rsp), %rdx
leaq 0x1c8(%rsp), %rcx
callq 0x242b0
movq %rax, 0xe8(%rsp)
jmp 0x1f4ee
movq 0xe8(%rsp), %rdi
movb $0x42, 0x1bb(%rsp)
movb $0x43, 0x1ba(%rsp)
movl $0x1, 0x1b4(%rsp)
leaq 0x1bb(%rsp), %rsi
leaq 0x1ba(%rsp), %rdx
leaq 0x1b4(%rsp), %rcx
callq 0x242b0
movq %rax, 0xd8(%rsp)
jmp 0x1f538
movq 0xd8(%rsp), %rdi
movb $0x43, 0x1b3(%rsp)
movb $0x41, 0x1b2(%rsp)
movl $0x0, 0x1ac(%rsp)
leaq 0x1b3(%rsp), %rsi
leaq 0x1b2(%rsp), %rdx
leaq 0x1ac(%rsp), %rcx
callq 0x242b0
movq %rax, 0xd0(%rsp)
jmp 0x1f582
movq 0xd0(%rsp), %rdi
movb $0x44, 0x1ab(%rsp)
movb $0x42, 0x1aa(%rsp)
movl $0x0, 0x1a4(%rsp)
leaq 0x1ab(%rsp), %rsi
leaq 0x1aa(%rsp), %rdx
leaq 0x1a4(%rsp), %rcx
callq 0x242b0
movq %rax, 0xc8(%rsp)
jmp 0x1f5cc
movq 0xc8(%rsp), %rdi
movb $0x44, 0x1a3(%rsp)
movb $0x43, 0x1a2(%rsp)
movl $0x0, 0x19c(%rsp)
leaq 0x1a3(%rsp), %rsi
leaq 0x1a2(%rsp), %rdx
leaq 0x19c(%rsp), %rcx
callq 0x242b0
movq %rax, 0xc0(%rsp)
jmp 0x1f616
movq 0xc0(%rsp), %rdi
movb $0x44, 0x19b(%rsp)
movb $0x45, 0x19a(%rsp)
movl $0x1, 0x194(%rsp)
leaq 0x19b(%rsp), %rsi
leaq 0x19a(%rsp), %rdx
leaq 0x194(%rsp), %rcx
callq 0x242b0
movq %rax, 0xb8(%rsp)
jmp 0x1f660
movq 0xb8(%rsp), %rdi
movb $0x45, 0x193(%rsp)
movb $0x44, 0x192(%rsp)
movl $0x0, 0x18c(%rsp)
leaq 0x193(%rsp), %rsi
leaq 0x192(%rsp), %rdx
leaq 0x18c(%rsp), %rcx
callq 0x242b0
movq %rax, 0xb0(%rsp)
jmp 0x1f6aa
movq 0xb0(%rsp), %rdi
movb $0x45, 0x18b(%rsp)
movb $0x46, 0x18a(%rsp)
movl $0x0, 0x184(%rsp)
leaq 0x18b(%rsp), %rsi
leaq 0x18a(%rsp), %rdx
leaq 0x184(%rsp), %rcx
callq 0x242b0
movq %rax, 0xa8(%rsp)
jmp 0x1f6f4
movq 0xa8(%rsp), %rdi
movb $0x46, 0x183(%rsp)
movb $0x47, 0x182(%rsp)
movl $0x0, 0x17c(%rsp)
leaq 0x183(%rsp), %rsi
leaq 0x182(%rsp), %rdx
leaq 0x17c(%rsp), %rcx
callq 0x242b0
movq %rax, 0xa0(%rsp)
jmp 0x1f73e
movq 0xa0(%rsp), %rdi
movb $0x47, 0x17b(%rsp)
movb $0x46, 0x17a(%rsp)
movl $0x1, 0x174(%rsp)
leaq 0x17b(%rsp), %rsi
leaq 0x17a(%rsp), %rdx
leaq 0x174(%rsp), %rcx
callq 0x242b0
movq %rax, 0x98(%rsp)
jmp 0x1f788
movq 0x98(%rsp), %rdi
movb $0x48, 0x173(%rsp)
movb $0x47, 0x172(%rsp)
movl $0x0, 0x16c(%rsp)
leaq 0x173(%rsp), %rsi
leaq 0x172(%rsp), %rdx
leaq 0x16c(%rsp), %rcx
callq 0x242b0
movq %rax, 0x90(%rsp)
jmp 0x1f7d2
movq 0x90(%rsp), %rdi
movb $0x48, 0x16b(%rsp)
movb $0x45, 0x16a(%rsp)
movl $0x0, 0x164(%rsp)
leaq 0x16b(%rsp), %rsi
leaq 0x16a(%rsp), %rdx
leaq 0x164(%rsp), %rcx
callq 0x242b0
movq %rax, 0x88(%rsp)
jmp 0x1f81c
movq 0x88(%rsp), %rdi
movb $0x48, 0x163(%rsp)
movb $0x48, 0x162(%rsp)
movl $0x1, 0x15c(%rsp)
leaq 0x163(%rsp), %rsi
leaq 0x162(%rsp), %rdx
leaq 0x15c(%rsp), %rcx
callq 0x242b0
jmp 0x1f85e
leaq 0x148(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x24b10
jmp 0x1f875
leaq 0x130(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x25380
jmp 0x1f88c
leaq 0x118(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x25620
jmp 0x1f8a3
leaq 0x100(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x256e0
jmp 0x1f8ba
movq 0x1e0(%rsp), %rdi
leaq 0x1eaaa(%rip), %rsi     # 0x3e373
callq 0x2180
movq %rax, 0x80(%rsp)
jmp 0x1f8d8
movq 0x80(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x24300
movq %rax, 0x78(%rsp)
jmp 0x1f8f4
movq 0x78(%rsp), %rdi
leaq 0x1ea86(%rip), %rsi     # 0x3e386
callq 0x2180
jmp 0x1f907
movq 0x1e0(%rsp), %rdi
leaq 0x1ea73(%rip), %rsi     # 0x3e389
callq 0x2180
movq %rax, 0x70(%rsp)
jmp 0x1f922
leaq 0x1d0(%rsp), %rdi
callq 0x25850
movl %eax, 0x6c(%rsp)
jmp 0x1f935
movl 0x6c(%rsp), %esi
movq 0x70(%rsp), %rdi
callq 0x2280
movq %rax, 0x60(%rsp)
jmp 0x1f94a
movq 0x60(%rsp), %rdi
leaq 0x1ea30(%rip), %rsi     # 0x3e386
callq 0x2180
jmp 0x1f95d
movq 0x1e0(%rsp), %rdi
leaq 0x1ea30(%rip), %rsi     # 0x3e39c
callq 0x2180
movq %rax, 0x58(%rsp)
jmp 0x1f978
leaq 0xf0(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
movl $0x1, %edx
callq 0x24bc0
jmp 0x1f994
leaq 0xf0(%rsp), %rdi
callq 0x25850
movl %eax, 0x54(%rsp)
jmp 0x1f9a7
movl 0x54(%rsp), %esi
movq 0x58(%rsp), %rdi
callq 0x2280
movq %rax, 0x48(%rsp)
jmp 0x1f9bc
movq 0x48(%rsp), %rdi
leaq 0x1e9be(%rip), %rsi     # 0x3e386
callq 0x2180
jmp 0x1f9cf
leaq 0xf0(%rsp), %rdi
callq 0x24610
movq 0x1e0(%rsp), %rdi
leaq 0x1e9c4(%rip), %rsi     # 0x3e3af
callq 0x2180
movq %rax, 0x40(%rsp)
jmp 0x1f9f7
movq 0x40(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x24810
movq %rax, 0x38(%rsp)
jmp 0x1fa10
movq 0x38(%rsp), %rdi
leaq 0x1e96a(%rip), %rsi     # 0x3e386
callq 0x2180
jmp 0x1fa23
movq 0x1e0(%rsp), %rdi
leaq 0x1e991(%rip), %rsi     # 0x3e3c3
callq 0x2180
movq %rax, 0x30(%rsp)
jmp 0x1fa3e
movq 0x30(%rsp), %rdi
leaq 0x130(%rsp), %rsi
callq 0x258c0
movq %rax, 0x28(%rsp)
jmp 0x1fa57
movq 0x28(%rsp), %rdi
leaq 0x1e923(%rip), %rsi     # 0x3e386
callq 0x2180
jmp 0x1fa6a
movq 0x1e0(%rsp), %rdi
leaq 0x1e949(%rip), %rsi     # 0x3e3c2
callq 0x2180
movq %rax, 0x20(%rsp)
jmp 0x1fa85
movq 0x20(%rsp), %rdi
leaq 0x118(%rsp), %rsi
callq 0x258c0
movq %rax, 0x18(%rsp)
jmp 0x1fa9e
movq 0x18(%rsp), %rdi
leaq 0x1e8dc(%rip), %rsi     # 0x3e386
callq 0x2180
jmp 0x1fab1
movq 0x1e0(%rsp), %rdi
leaq 0x1e916(%rip), %rsi     # 0x3e3d6
callq 0x2180
movq %rax, 0x10(%rsp)
jmp 0x1facc
movq 0x10(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x25a30
movq %rax, 0x8(%rsp)
jmp 0x1fae5
movq 0x8(%rsp), %rdi
leaq 0x1e895(%rip), %rsi     # 0x3e386
callq 0x2180
jmp 0x1faf8
movq 0x1e0(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
xorl %edx, %edx
callq 0x25ba0
jmp 0x1fb11
leaq 0x100(%rsp), %rdi
callq 0x263b0
leaq 0x118(%rsp), %rdi
callq 0x26410
leaq 0x130(%rsp), %rdi
callq 0x26410
leaq 0x148(%rsp), %rdi
callq 0x24bb0
leaq 0x1d0(%rsp), %rdi
callq 0x24610
addq $0x1e8, %rsp            # imm = 0x1E8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x1fc23
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x1fc16
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x1fc09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x1fbfc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0x1fbef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x24610
leaq 0x100(%rsp), %rdi
callq 0x263b0
leaq 0x118(%rsp), %rdi
callq 0x26410
leaq 0x130(%rsp), %rdi
callq 0x26410
leaq 0x148(%rsp), %rdi
callq 0x24bb0
leaq 0x1d0(%rsp), %rdi
callq 0x24610
movq 0x1c0(%rsp), %rdi
callq 0x2290
nopl (%rax)