// File: grame-cncm[P]digraph/tests.cpp
// Function: check10()
bool check10()
{
    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);

    digraph<char, int> r = reverse(reverse(g));
    if (equiv(g, r)) {
        std::cout << "test10 OK " << std::endl;
        return true;
    } else {
        std::cout << "test10 FAIL " << std::endl;
        std::cout << "We got      " << r << std::endl;
        std::cout << "Instead of  " << g << std::endl;
        return false;
    }
}

// Assembly:
subq $0x158, %rsp            # imm = 0x158
leaq 0x140(%rsp), %rdi
movq %rdi, 0x90(%rsp)
callq 0x24270
movq 0x90(%rsp), %rdi
movb $0x41, 0x13f(%rsp)
movb $0x42, 0x13e(%rsp)
movl $0x0, 0x138(%rsp)
leaq 0x13f(%rsp), %rsi
leaq 0x13e(%rsp), %rdx
leaq 0x138(%rsp), %rcx
callq 0x242b0
movq %rax, 0x98(%rsp)
jmp 0x21196
movq 0x98(%rsp), %rdi
movb $0x42, 0x12b(%rsp)
movb $0x43, 0x12a(%rsp)
movl $0x1, 0x124(%rsp)
leaq 0x12b(%rsp), %rsi
leaq 0x12a(%rsp), %rdx
leaq 0x124(%rsp), %rcx
callq 0x242b0
movq %rax, 0x88(%rsp)
jmp 0x211e0
movq 0x88(%rsp), %rdi
movb $0x43, 0x123(%rsp)
movb $0x41, 0x122(%rsp)
movl $0x0, 0x11c(%rsp)
leaq 0x123(%rsp), %rsi
leaq 0x122(%rsp), %rdx
leaq 0x11c(%rsp), %rcx
callq 0x242b0
movq %rax, 0x80(%rsp)
jmp 0x2122a
movq 0x80(%rsp), %rdi
movb $0x44, 0x11b(%rsp)
movb $0x42, 0x11a(%rsp)
movl $0x0, 0x114(%rsp)
leaq 0x11b(%rsp), %rsi
leaq 0x11a(%rsp), %rdx
leaq 0x114(%rsp), %rcx
callq 0x242b0
movq %rax, 0x78(%rsp)
jmp 0x21271
movq 0x78(%rsp), %rdi
movb $0x44, 0x113(%rsp)
movb $0x43, 0x112(%rsp)
movl $0x0, 0x10c(%rsp)
leaq 0x113(%rsp), %rsi
leaq 0x112(%rsp), %rdx
leaq 0x10c(%rsp), %rcx
callq 0x242b0
movq %rax, 0x70(%rsp)
jmp 0x212b5
movq 0x70(%rsp), %rdi
movb $0x44, 0x10b(%rsp)
movb $0x45, 0x10a(%rsp)
movl $0x1, 0x104(%rsp)
leaq 0x10b(%rsp), %rsi
leaq 0x10a(%rsp), %rdx
leaq 0x104(%rsp), %rcx
callq 0x242b0
movq %rax, 0x68(%rsp)
jmp 0x212f9
movq 0x68(%rsp), %rdi
movb $0x45, 0x103(%rsp)
movb $0x44, 0x102(%rsp)
movl $0x0, 0xfc(%rsp)
leaq 0x103(%rsp), %rsi
leaq 0x102(%rsp), %rdx
leaq 0xfc(%rsp), %rcx
callq 0x242b0
movq %rax, 0x60(%rsp)
jmp 0x2133d
movq 0x60(%rsp), %rdi
movb $0x45, 0xfb(%rsp)
movb $0x46, 0xfa(%rsp)
movl $0x0, 0xf4(%rsp)
leaq 0xfb(%rsp), %rsi
leaq 0xfa(%rsp), %rdx
leaq 0xf4(%rsp), %rcx
callq 0x242b0
movq %rax, 0x58(%rsp)
jmp 0x21381
movq 0x58(%rsp), %rdi
movb $0x46, 0xf3(%rsp)
movb $0x47, 0xf2(%rsp)
movl $0x0, 0xec(%rsp)
leaq 0xf3(%rsp), %rsi
leaq 0xf2(%rsp), %rdx
leaq 0xec(%rsp), %rcx
callq 0x242b0
movq %rax, 0x50(%rsp)
jmp 0x213c5
movq 0x50(%rsp), %rdi
movb $0x47, 0xeb(%rsp)
movb $0x46, 0xea(%rsp)
movl $0x1, 0xe4(%rsp)
leaq 0xeb(%rsp), %rsi
leaq 0xea(%rsp), %rdx
leaq 0xe4(%rsp), %rcx
callq 0x242b0
movq %rax, 0x48(%rsp)
jmp 0x21409
movq 0x48(%rsp), %rdi
movb $0x48, 0xe3(%rsp)
movb $0x47, 0xe2(%rsp)
movl $0x0, 0xdc(%rsp)
leaq 0xe3(%rsp), %rsi
leaq 0xe2(%rsp), %rdx
leaq 0xdc(%rsp), %rcx
callq 0x242b0
movq %rax, 0x40(%rsp)
jmp 0x2144d
movq 0x40(%rsp), %rdi
movb $0x48, 0xdb(%rsp)
movb $0x45, 0xda(%rsp)
movl $0x0, 0xd4(%rsp)
leaq 0xdb(%rsp), %rsi
leaq 0xda(%rsp), %rdx
leaq 0xd4(%rsp), %rcx
callq 0x242b0
movq %rax, 0x38(%rsp)
jmp 0x21491
movq 0x38(%rsp), %rdi
movb $0x48, 0xd3(%rsp)
movb $0x48, 0xd2(%rsp)
movl $0x1, 0xcc(%rsp)
leaq 0xd3(%rsp), %rsi
leaq 0xd2(%rsp), %rdx
leaq 0xcc(%rsp), %rcx
callq 0x242b0
jmp 0x214d0
leaq 0xa8(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0x26a10
jmp 0x214e7
leaq 0xb8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x26a10
jmp 0x214fe
leaq 0xa8(%rsp), %rdi
callq 0x24610
leaq 0x140(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x26ba0
movb %al, 0x37(%rsp)
jmp 0x21526
movb 0x37(%rsp), %al
testb $0x1, %al
jne 0x21533
jmp 0x215dd
movq 0x34a96(%rip), %rdi     # 0x55fd0
leaq 0x1d56f(%rip), %rsi     # 0x3eab0
callq 0x2180
movq %rax, 0x28(%rsp)
jmp 0x2154d
movq 0x28(%rsp), %rdi
movq 0x34a5f(%rip), %rsi     # 0x55fb8
callq 0x21b0
jmp 0x21560
movb $0x1, 0x157(%rsp)
movl $0x1, 0xa4(%rsp)
jmp 0x216a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x130(%rsp)
movl %eax, 0x12c(%rsp)
jmp 0x216d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x130(%rsp)
movl %eax, 0x12c(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x24610
jmp 0x216d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x130(%rsp)
movl %eax, 0x12c(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x24610
jmp 0x216d2
movq 0x349ec(%rip), %rdi     # 0x55fd0
leaq 0x1d4d0(%rip), %rsi     # 0x3eabb
callq 0x2180
movq %rax, 0x20(%rsp)
jmp 0x215f7
movq 0x20(%rsp), %rdi
movq 0x349b5(%rip), %rsi     # 0x55fb8
callq 0x21b0
jmp 0x2160a
movq 0x349bf(%rip), %rdi     # 0x55fd0
leaq 0x1d4b0(%rip), %rsi     # 0x3eac8
callq 0x2180
movq %rax, 0x18(%rsp)
jmp 0x21624
movq 0x18(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x24300
movq %rax, 0x10(%rsp)
jmp 0x2163d
movq 0x10(%rsp), %rdi
movq 0x3496f(%rip), %rsi     # 0x55fb8
callq 0x21b0
jmp 0x21650
movq 0x34979(%rip), %rdi     # 0x55fd0
leaq 0x1d477(%rip), %rsi     # 0x3ead5
callq 0x2180
movq %rax, 0x8(%rsp)
jmp 0x2166a
movq 0x8(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0x24300
movq %rax, (%rsp)
jmp 0x21682
movq (%rsp), %rdi
movq 0x3492b(%rip), %rsi     # 0x55fb8
callq 0x21b0
jmp 0x21694
movb $0x0, 0x157(%rsp)
movl $0x1, 0xa4(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x24610
leaq 0x140(%rsp), %rdi
callq 0x24610
movb 0x157(%rsp), %al
andb $0x1, %al
addq $0x158, %rsp            # imm = 0x158
retq
leaq 0x140(%rsp), %rdi
callq 0x24610
movq 0x130(%rsp), %rdi
callq 0x2290
nopl (%rax)