// File: /workspace/github_cpp_makefile_star2_O1/grame-cncm[P]digraph/tests.cpp
// Function: test13(std::ostream&)
void test13(std::ostream& ss)
{
    // roots and leaves
    digraph<char, int> h;
    h.add('A', 'B', 0).add('B', 'C', 0).add('C', 'D', 0).add('B', 'G', 0);
    h.add('E', 'F', 0).add('F', 'G', 0).add('G', 'H', 0);  //.add('F', 'C', 0);

    ss << "graph h   : " << h << std::endl;
    ss << "roots(h)  : " << roots(h) << std::endl;
    ss << "leafs(h)  : " << leaves(h) << std::endl;
    ss << dfschedule(h) << ", cost: " << schedulingcost(h, dfschedule(h)) << std::endl;
    ss << bfschedule(h) << ", cost: " << schedulingcost(h, bfschedule(h)) << std::endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdi, %r13
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x14de0
leaq 0x7(%rsp), %rsi
movb $0x41, (%rsi)
leaq 0x6(%rsp), %rdx
movb $0x42, (%rdx)
leaq 0x50(%rsp), %rcx
movl $0x0, (%rcx)
movq (%rbx), %rdi
callq 0x176e8
leaq 0x5(%rsp), %rsi
movb $0x42, (%rsi)
leaq 0x4(%rsp), %rdx
movb $0x43, (%rdx)
leaq 0xa0(%rsp), %rcx
movl $0x0, (%rcx)
movq 0x8(%rsp), %rdi
callq 0x176e8
leaq 0x3(%rsp), %rsi
movb $0x43, (%rsi)
leaq 0x1f(%rsp), %rdx
movb $0x44, (%rdx)
leaq 0x38(%rsp), %rcx
movl $0x0, (%rcx)
movq 0x8(%rsp), %rdi
callq 0x176e8
leaq 0x1e(%rsp), %rsi
movb $0x42, (%rsi)
leaq 0x1d(%rsp), %rdx
movb $0x47, (%rdx)
leaq 0x34(%rsp), %rcx
movl $0x0, (%rcx)
movq 0x8(%rsp), %rdi
callq 0x176e8
leaq 0x34(%rsp), %rsi
movb $0x45, (%rsi)
leaq 0x7(%rsp), %rdx
movb $0x46, (%rdx)
leaq 0x50(%rsp), %rcx
movl $0x0, (%rcx)
movq 0x8(%rsp), %rdi
callq 0x176e8
leaq 0x6(%rsp), %rsi
movb $0x46, (%rsi)
leaq 0x5(%rsp), %rdx
movb $0x47, (%rdx)
leaq 0xa0(%rsp), %rcx
movl $0x0, (%rcx)
movq 0x8(%rsp), %rdi
callq 0x176e8
leaq 0x4(%rsp), %rsi
movb $0x47, (%rsi)
leaq 0x3(%rsp), %rdx
movb $0x48, (%rdx)
leaq 0x38(%rsp), %rcx
movl $0x0, (%rcx)
movq 0x8(%rsp), %rdi
callq 0x176e8
leaq 0xa7a3(%rip), %rsi      # 0x1dbe3
movl $0xc, %edx
movq %r13, %rdi
callq 0x21a0
leaq 0x8(%rsp), %rsi
movq %r13, %rdi
callq 0x14e31
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
leaq 0xa765(%rip), %rsi      # 0x1dbf0
movl $0xc, %edx
movq %r13, %rdi
callq 0x21a0
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x16c00
leaq 0x50(%rsp), %rsi
movq %r13, %rdi
callq 0x16afa
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x134ed
callq 0x2150
leaq 0xa709(%rip), %rsi      # 0x1dbfd
movl $0xc, %edx
movq %r13, %rdi
callq 0x21a0
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
movq 0x8(%rsp), %r12
movq 0x18(%r12), %r14
addq $0x8, %r12
cmpq %r12, %r14
je 0x13578
leaq 0x50(%rsp), %r15
leaq 0x20(%r14), %rbx
movq 0x8(%rsp), %rdi
addq $0x30, %rdi
movq %rbx, %rsi
callq 0x17cbe
cmpq $0x0, 0x28(%rax)
jne 0x13568
movq 0x58(%rsp), %rsi
cmpq 0x60(%rsp), %rsi
je 0x1355d
movb (%rbx), %al
movb %al, (%rsi)
incq 0x58(%rsp)
jmp 0x13568
movq %r15, %rdi
movq %rbx, %rdx
callq 0x1a7c6
movq %r14, %rdi
callq 0x21b0
movq %rax, %r14
cmpq %r12, %rax
jne 0x1352a
leaq 0x50(%rsp), %rsi
movq %r13, %rdi
callq 0x16afa
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x135be
callq 0x2150
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x16e7c
leaq 0x50(%rsp), %rsi
movq %r13, %rdi
callq 0x16d49
movq %rax, %rbx
leaq 0xa626(%rip), %rsi      # 0x1dc0a
movl $0x8, %edx
movq %rax, %rdi
callq 0x21a0
leaq 0xa0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x16e7c
movq %rbx, 0x20(%rsp)
movq %r13, 0xf0(%rsp)
movq 0x8(%rsp), %rax
movq 0x18(%rax), %r15
addq $0x8, %rax
movq %rax, 0x28(%rsp)
xorl %ebp, %ebp
cmpq %rax, %r15
je 0x136a0
leaq 0xa0(%rsp), %r12
leaq 0x20(%r15), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1aabc
movl %eax, %r13d
movq 0x8(%rsp), %rdi
addq $0x30, %rdi
movq %rbx, %rsi
callq 0x17cbe
movq %rax, %rbx
movq 0x18(%rax), %r14
addq $0x8, %rbx
cmpq %rbx, %r14
je 0x1368e
leaq 0x20(%r14), %rsi
movq %r12, %rdi
callq 0x1aabc
movl %r13d, %ecx
subl %eax, %ecx
movl %ecx, %eax
negl %eax
cmovsl %ecx, %eax
addl %eax, %ebp
movq %r14, %rdi
callq 0x21b0
movq %rax, %r14
cmpq %rbx, %rax
jne 0x13664
movq %r15, %rdi
callq 0x21b0
movq %rax, %r15
cmpq 0x28(%rsp), %rax
jne 0x13631
movq 0x20(%rsp), %rdi
movl %ebp, %esi
callq 0x2240
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
leaq 0xb8(%rsp), %rbx
movq %rbx, %rdi
callq 0x175a0
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x136f4
callq 0x2150
leaq 0x68(%rsp), %rbx
movq %rbx, %rdi
callq 0x175a0
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x1370f
callq 0x2150
leaq 0xa0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1ab09
xorps %xmm0, %xmm0
leaq 0x70(%rsp), %rax
movaps %xmm0, -0x20(%rax)
xorl %ecx, %ecx
movq %rcx, -0x10(%rax)
movl $0x0, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq 0xa0(%rsp), %rax
movabsq $-0x5555555555555555, %r12 # imm = 0xAAAAAAAAAAAAAAAB
cmpq %rax, 0xa8(%rsp)
je 0x137b2
xorl %r15d, %r15d
leaq 0x50(%rsp), %rbx
leaq (%r15,%r15,2), %rcx
movq (%rax,%rcx,8), %r14
movq 0x8(%rax,%rcx,8), %r13
cmpq %r13, %r14
je 0x1378f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1a9b4
incq %r14
jmp 0x1377a
incq %r15
movq 0xa0(%rsp), %rax
movq 0xa8(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
imulq %r12, %rcx
cmpq %rcx, %r15
jb 0x1376d
leaq 0xa0(%rsp), %rdi
callq 0x1acbc
leaq 0x50(%rsp), %rsi
movq 0xf0(%rsp), %rdi
callq 0x16d49
movq %rax, %rbx
leaq 0xa42f(%rip), %rsi      # 0x1dc0a
movl $0x8, %edx
movq %rax, %rdi
callq 0x21a0
movq %rbx, 0x20(%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1ab09
xorps %xmm0, %xmm0
leaq 0xc0(%rsp), %rax
movaps %xmm0, -0x20(%rax)
xorl %r14d, %r14d
movq %r14, -0x10(%rax)
movl $0x0, (%rax)
movq %r14, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %r14, 0x20(%rax)
movq 0x38(%rsp), %rax
cmpq %rax, 0x40(%rsp)
je 0x13885
xorl %r13d, %r13d
leaq 0xa0(%rsp), %r15
leaq (,%r13,2), %rcx
addq %r13, %rcx
movq (%rax,%rcx,8), %rbx
movq 0x8(%rax,%rcx,8), %rbp
cmpq %rbp, %rbx
je 0x13868
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1a9b4
incq %rbx
jmp 0x13853
incq %r13
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
imulq %r12, %rcx
cmpq %rcx, %r13
jb 0x1383f
leaq 0x38(%rsp), %rdi
callq 0x1acbc
movq 0x8(%rsp), %rax
movq 0x18(%rax), %r15
addq $0x8, %rax
movq %rax, 0x28(%rsp)
cmpq %rax, %r15
je 0x1391f
xorl %r14d, %r14d
leaq 0xa0(%rsp), %r12
leaq 0x20(%r15), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1aabc
movl %eax, %ebp
movq 0x8(%rsp), %rdi
addq $0x30, %rdi
movq %rbx, %rsi
callq 0x17cbe
movq %rax, %r13
movq 0x18(%rax), %rbx
addq $0x8, %r13
cmpq %r13, %rbx
je 0x1390d
leaq 0x20(%rbx), %rsi
movq %r12, %rdi
callq 0x1aabc
movl %ebp, %ecx
subl %eax, %ecx
movl %ecx, %eax
negl %eax
cmovsl %ecx, %eax
addl %eax, %r14d
movq %rbx, %rdi
callq 0x21b0
movq %rax, %rbx
cmpq %r13, %rax
jne 0x138e3
movq %r15, %rdi
callq 0x21b0
movq %rax, %r15
cmpq 0x28(%rsp), %rax
jne 0x138b1
movq 0x20(%rsp), %rdi
movl %r14d, %esi
callq 0x2240
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
leaq 0xb8(%rsp), %rbx
movq %rbx, %rdi
callq 0x175a0
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x13974
callq 0x2150
leaq 0x68(%rsp), %rbx
movq %rbx, %rdi
callq 0x175a0
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x1398f
callq 0x2150
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1399e
callq 0x35d6
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x139ca
jmp 0x139d7
jmp 0x139ca
jmp 0x139d7
jmp 0x139d7
jmp 0x139d7
jmp 0x139d7
jmp 0x139d7
jmp 0x139d7
jmp 0x139d7
jmp 0x139d7
jmp 0x139d7
jmp 0x139ca
movq %rax, %rbx
jmp 0x13a3e
jmp 0x13a2e
jmp 0x13a2e
jmp 0x139dc
jmp 0x139dc
movq %rax, %rbx
jmp 0x13a48
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x13a48
callq 0x2150
jmp 0x13a48
jmp 0x13a2e
jmp 0x13a2e
jmp 0x13a2e
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x16fe0
leaq 0x38(%rsp), %rdi
callq 0x1acbc
jmp 0x13a3e
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x16fe0
leaq 0xa0(%rsp), %rdi
callq 0x1acbc
jmp 0x13a48
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x16fe0
leaq 0x50(%rsp), %rdi
callq 0x16fe0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x13a57
callq 0x35d6
movq %rbx, %rdi
callq 0x2250