// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xe2d6
leaq 0x7(%rsp), %rsi
movb $0x41, (%rsi)
leaq 0x6(%rsp), %rdx
movb $0x42, (%rdx)
leaq 0x28(%rsp), %rcx
andl $0x0, (%rcx)
movq (%r14), %rdi
callq 0x102c4
leaq 0x5(%rsp), %rsi
movb $0x42, (%rsi)
leaq 0x4(%rsp), %rdx
movb $0x43, (%rdx)
leaq 0x70(%rsp), %rcx
andl $0x0, (%rcx)
movq 0x8(%rsp), %rdi
callq 0x102c4
leaq 0x3(%rsp), %rsi
movb $0x43, (%rsi)
leaq 0x1f(%rsp), %rdx
movb $0x44, (%rdx)
leaq 0x24(%rsp), %rcx
andl $0x0, (%rcx)
movq 0x8(%rsp), %rdi
callq 0x102c4
leaq 0x1e(%rsp), %rsi
movb $0x42, (%rsi)
leaq 0x1d(%rsp), %rdx
movb $0x47, (%rdx)
leaq 0x20(%rsp), %rcx
andl $0x0, (%rcx)
movq 0x8(%rsp), %rdi
callq 0x102c4
leaq 0x20(%rsp), %rsi
movb $0x45, (%rsi)
leaq 0x7(%rsp), %rdx
movb $0x46, (%rdx)
leaq 0x28(%rsp), %rcx
andl $0x0, (%rcx)
movq 0x8(%rsp), %rdi
callq 0x102c4
leaq 0x6(%rsp), %rsi
movb $0x46, (%rsi)
leaq 0x5(%rsp), %rdx
movb $0x47, (%rdx)
leaq 0x70(%rsp), %rcx
andl $0x0, (%rcx)
movq 0x8(%rsp), %rdi
callq 0x102c4
leaq 0x4(%rsp), %rsi
movb $0x47, (%rsi)
leaq 0x3(%rsp), %rdx
movb $0x48, (%rdx)
leaq 0x24(%rsp), %rcx
andl $0x0, (%rcx)
movq 0x8(%rsp), %rdi
callq 0x102c4
leaq 0x957c(%rip), %rsi      # 0x16b9f
movq %rbx, %rdi
callq 0x2140
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0xe313
movq %rax, %rdi
callq 0x20b0
leaq 0x9565(%rip), %rsi      # 0x16bac
movq %rbx, %rdi
callq 0x2140
movq %rax, %r14
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xf9a7
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0xf8eb
movq %rax, %rdi
callq 0x20b0
leaq 0x28(%rsp), %rdi
callq 0x138f2
leaq 0x9532(%rip), %rsi      # 0x16bb9
movq %rbx, %rdi
callq 0x2140
movq %rax, %r14
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xfac3
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0xf8eb
movq %rax, %rdi
callq 0x20b0
leaq 0x28(%rsp), %rdi
callq 0x138f2
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xfc1c
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0xfb3b
leaq 0x94e3(%rip), %rsi      # 0x16bc6
movq %rax, %rdi
callq 0x2140
movq %rax, %r14
leaq 0x70(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xfc1c
leaq 0x8(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0xfd28
movq %r14, %rdi
movl %eax, %esi
callq 0x2210
movq %rax, %rdi
callq 0x20b0
leaq 0x70(%rsp), %rdi
callq 0xfdcc
leaq 0x28(%rsp), %rdi
callq 0xfdcc
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xfde2
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0xfb3b
leaq 0x9471(%rip), %rsi      # 0x16bc6
movq %rax, %rdi
callq 0x2140
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xfde2
leaq 0x8(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0xfd28
movq %rbx, %rdi
movl %eax, %esi
callq 0x2210
movq %rax, %rdi
callq 0x20b0
leaq 0x70(%rsp), %rdi
callq 0xfdcc
leaq 0x28(%rsp), %rdi
callq 0xfdcc
leaq 0x10(%rsp), %rdi
callq 0x2efc
addq $0xb8, %rsp
popq %rbx
popq %r14
retq
jmp 0xd7d5
jmp 0xd806
jmp 0xd7d5
jmp 0xd806
jmp 0xd806
jmp 0xd806
jmp 0xd806
jmp 0xd806
jmp 0xd806
jmp 0xd806
jmp 0xd806
jmp 0xd806
jmp 0xd806
jmp 0xd7d5
movq %rax, %rbx
jmp 0xd7fa
jmp 0xd7dc
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x138f2
jmp 0xd809
jmp 0xd7ed
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0xfdcc
leaq 0x28(%rsp), %rdi
callq 0xfdcc
jmp 0xd809
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2efc
movq %rbx, %rdi
callq 0x2220