// File: /workspace/github_cpp_makefile_star2_O3/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, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x14ee8
leaq 0x7(%rsp), %rsi
movb $0x41, (%rsi)
leaq 0x6(%rsp), %rdx
movb $0x42, (%rdx)
leaq 0x50(%rsp), %rcx
movl $0x0, (%rcx)
movq (%r14), %rdi
callq 0x1781e
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 0x1781e
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 0x1781e
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 0x1781e
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 0x1781e
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 0x1781e
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 0x1781e
leaq 0xa991(%rip), %rsi      # 0x1dbe3
movl $0xc, %edx
movq %rbx, %rdi
callq 0x21a0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x14f39
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
leaq 0xa953(%rip), %rsi      # 0x1dbf0
movl $0xc, %edx
movq %rbx, %rdi
callq 0x21a0
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x16cf8
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x16bf2
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x132ff
callq 0x2150
leaq 0xa8f7(%rip), %rsi      # 0x1dbfd
movl $0xc, %edx
movq %rbx, %rdi
callq 0x21a0
movq %rbx, 0x20(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
movq 0x8(%rsp), %rbx
movq 0x18(%rbx), %r14
addq $0x8, %rbx
cmpq %rbx, %r14
je 0x13390
leaq 0x50(%rsp), %r15
leaq 0x20(%r14), %r12
movq 0x8(%rsp), %rdi
addq $0x30, %rdi
movq %r12, %rsi
callq 0x17ddc
cmpq $0x0, 0x28(%rax)
jne 0x13380
movq 0x58(%rsp), %rsi
cmpq 0x60(%rsp), %rsi
je 0x13375
movb (%r12), %al
movb %al, (%rsi)
incq 0x58(%rsp)
jmp 0x13380
movq %r15, %rdi
movq %r12, %rdx
callq 0x1a89a
movq %r14, %rdi
callq 0x21b0
movq %rax, %r14
cmpq %rbx, %rax
jne 0x13340
leaq 0x50(%rsp), %rsi
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x16bf2
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x133db
callq 0x2150
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x16fa5
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x16e43
movq %rax, %rbx
leaq 0xa809(%rip), %rsi      # 0x1dc0a
movl $0x8, %edx
movq %rax, %rdi
callq 0x21a0
leaq 0xa0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x16fa5
movq %rbx, 0xf0(%rsp)
movq 0x8(%rsp), %rax
movq 0x18(%rax), %r15
addq $0x8, %rax
movq %rax, 0x28(%rsp)
xorl %ebp, %ebp
cmpq %rax, %r15
je 0x1355f
leaq 0xc0(%rsp), %rbx
leaq 0x20(%r15), %rsi
movq 0xc8(%rsp), %r8
movl $0x0, %r14d
testq %r8, %r8
je 0x134b4
movb (%rsi), %al
movq %rbx, %r9
movq %r9, %rcx
movq %r8, %rdx
movb 0x20(%r8), %dil
xorl %r8d, %r8d
cmpb %al, %dil
setl %r8b
movq %rdx, %r9
cmovlq %rcx, %r9
movq 0x10(%rdx,%r8,8), %r8
testq %r8, %r8
jne 0x13469
movl $0x0, %r14d
cmpq %rbx, %r9
je 0x134b4
cmpb %al, %dil
movq %rdx, %r8
cmovlq %rcx, %r8
cmpb 0x20(%r8), %al
jl 0x134b4
cmpb %al, %dil
cmovlq %rcx, %rdx
movl 0x24(%rdx), %r14d
movq 0x8(%rsp), %rdi
addq $0x30, %rdi
callq 0x17ddc
movq %rax, %r12
movq 0x18(%rax), %rax
addq $0x8, %r12
cmpq %r12, %rax
je 0x13549
movq 0xc8(%rsp), %r13
xorl %ecx, %ecx
testq %r13, %r13
je 0x1352e
movb 0x20(%rax), %dl
movq %r13, %r10
movq %rbx, %r9
movq %r9, %rsi
movq %r10, %rdi
movb 0x20(%r10), %r8b
xorl %r10d, %r10d
cmpb %dl, %r8b
setl %r10b
movq %rdi, %r9
cmovlq %rsi, %r9
movq 0x10(%rdi,%r10,8), %r10
testq %r10, %r10
jne 0x134ea
cmpq %rbx, %r9
je 0x1352e
cmpb %dl, %r8b
movq %rdi, %r9
cmovlq %rsi, %r9
cmpb 0x20(%r9), %dl
jl 0x1352e
cmpb %dl, %r8b
cmovlq %rsi, %rdi
movl 0x24(%rdi), %ecx
movl %r14d, %edx
subl %ecx, %edx
movl %edx, %ecx
negl %ecx
cmovsl %edx, %ecx
addl %ecx, %ebp
movq %rax, %rdi
callq 0x21b0
cmpq %r12, %rax
jne 0x134da
movq %r15, %rdi
callq 0x21b0
movq %rax, %r15
cmpq 0x28(%rsp), %rax
jne 0x1344d
movq 0xf0(%rsp), %rdi
movl %ebp, %esi
callq 0x2240
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
leaq 0xb8(%rsp), %r14
movq %r14, %rdi
callq 0x176c6
movq -0x18(%r14), %rdi
testq %rdi, %rdi
je 0x135b6
callq 0x2150
leaq 0x68(%rsp), %r14
movq %r14, %rdi
callq 0x176c6
movq -0x18(%r14), %rdi
testq %rdi, %rdi
je 0x135d1
callq 0x2150
leaq 0xa0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1ab80
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
movq 0xa8(%rsp), %rcx
movabsq $-0x5555555555555555, %r13 # imm = 0xAAAAAAAAAAAAAAAB
cmpq %rax, %rcx
je 0x1367c
xorl %ebx, %ebx
leaq 0x50(%rsp), %r14
leaq (%rbx,%rbx,2), %rdx
movq (%rax,%rdx,8), %r15
movq 0x8(%rax,%rdx,8), %r12
cmpq %r12, %r15
je 0x13666
movq %r14, %rdi
movq %r15, %rsi
callq 0x1aa72
incq %r15
cmpq %r12, %r15
jne 0x13643
movq 0xa0(%rsp), %rax
movq 0xa8(%rsp), %rcx
incq %rbx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %r13, %rdx
cmpq %rdx, %rbx
jb 0x13631
leaq 0xa0(%rsp), %rdi
callq 0x1ad2e
leaq 0x50(%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x16e43
movq %rax, %rbx
leaq 0xa568(%rip), %rsi      # 0x1dc0a
movl $0x8, %edx
movq %rax, %rdi
callq 0x21a0
movq %rbx, 0x20(%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1ab80
xorps %xmm0, %xmm0
leaq 0xc0(%rsp), %r13
movaps %xmm0, -0x20(%r13)
xorl %r14d, %r14d
movq %r14, -0x10(%r13)
movl $0x0, (%r13)
movq %r14, 0x8(%r13)
movq %r13, 0x10(%r13)
movq %r13, 0x18(%r13)
movq %r14, 0x20(%r13)
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
cmpq %rax, %rcx
je 0x1375a
xorl %ebx, %ebx
leaq 0xa0(%rsp), %r15
leaq (%rbx,%rbx,2), %rdx
movq (%rax,%rdx,8), %r12
movq 0x8(%rax,%rdx,8), %rbp
cmpq %rbp, %r12
je 0x1373a
movq %r15, %rdi
movq %r12, %rsi
callq 0x1aa72
incq %r12
cmpq %rbp, %r12
jne 0x1371d
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
incq %rbx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rdx
cmpq %rdx, %rbx
jb 0x1370b
leaq 0x38(%rsp), %rdi
callq 0x1ad2e
movq 0x8(%rsp), %rax
movq 0x18(%rax), %r15
addq $0x8, %rax
movq %rax, 0x28(%rsp)
cmpq %rax, %r15
je 0x13891
xorl %r14d, %r14d
leaq 0x20(%r15), %rsi
movq 0xc8(%rsp), %r8
movl $0x0, %ebx
testq %r8, %r8
je 0x137e6
movb (%rsi), %al
movq %r13, %r9
movq %r9, %rcx
movq %r8, %rdx
movb 0x20(%r8), %dil
xorl %r8d, %r8d
cmpb %al, %dil
setl %r8b
movq %rdx, %r9
cmovlq %rcx, %r9
movq 0x10(%rdx,%r8,8), %r8
testq %r8, %r8
jne 0x1379d
movl $0x0, %ebx
cmpq %r13, %r9
je 0x137e6
cmpb %al, %dil
movq %rdx, %r8
cmovlq %rcx, %r8
cmpb 0x20(%r8), %al
jl 0x137e6
cmpb %al, %dil
cmovlq %rcx, %rdx
movl 0x24(%rdx), %ebx
movq 0x8(%rsp), %rdi
addq $0x30, %rdi
callq 0x17ddc
movq %rax, %r12
movq 0x18(%rax), %rax
addq $0x8, %r12
cmpq %r12, %rax
je 0x1387b
movq 0xc8(%rsp), %rbp
xorl %ecx, %ecx
testq %rbp, %rbp
je 0x13860
movb 0x20(%rax), %dl
movq %rbp, %r10
movq %r13, %r9
movq %r9, %rsi
movq %r10, %rdi
movb 0x20(%r10), %r8b
xorl %r10d, %r10d
cmpb %dl, %r8b
setl %r10b
movq %rdi, %r9
cmovlq %rsi, %r9
movq 0x10(%rdi,%r10,8), %r10
testq %r10, %r10
jne 0x1381c
cmpq %r13, %r9
je 0x13860
cmpb %dl, %r8b
movq %rdi, %r9
cmovlq %rsi, %r9
cmpb 0x20(%r9), %dl
jl 0x13860
cmpb %dl, %r8b
cmovlq %rsi, %rdi
movl 0x24(%rdi), %ecx
movl %ebx, %edx
subl %ecx, %edx
movl %edx, %ecx
negl %ecx
cmovsl %edx, %ecx
addl %ecx, %r14d
movq %rax, %rdi
callq 0x21b0
cmpq %r12, %rax
jne 0x1380c
movq %r15, %rdi
callq 0x21b0
movq %rax, %r15
cmpq 0x28(%rsp), %rax
jne 0x13782
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 0x176c6
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x138e6
callq 0x2150
leaq 0x68(%rsp), %rbx
movq %rbx, %rdi
callq 0x176c6
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x13901
callq 0x2150
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x13910
callq 0x3504
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1393c
jmp 0x13949
jmp 0x1393c
jmp 0x13949
jmp 0x13949
jmp 0x13949
jmp 0x13949
jmp 0x13949
jmp 0x13949
jmp 0x13949
jmp 0x13949
jmp 0x13949
jmp 0x1393c
movq %rax, %rbx
jmp 0x13990
jmp 0x13950
jmp 0x13950
jmp 0x13962
jmp 0x13962
movq %rax, %rbx
jmp 0x139b6
jmp 0x13950
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x17108
jmp 0x13990
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x139b6
callq 0x2150
jmp 0x139b6
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x17108
leaq 0x38(%rsp), %rdi
callq 0x1ad2e
leaq 0x50(%rsp), %rdi
callq 0x17108
jmp 0x139b6
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x17108
leaq 0xa0(%rsp), %rdi
callq 0x1ad2e
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x139c5
callq 0x3504
movq %rbx, %rdi
callq 0x2250