// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/src/MSFG.cc
// Function: MultiStringFactorGraph::print_dot_digraph(std::ostream&)
void MultiStringFactorGraph::print_dot_digraph(ostream &fstr)
{
    fstr << "digraph {" << endl << endl;
    fstr << "\tnode [shape=ellipse,fontsize=30,fixedsize=false,width=0.95];" << endl;
    fstr << "\tedge [fontsize=12];" << endl;
    fstr << "\trankdir=LR;" << endl << endl;

    for (msfg_node_idx_t ni=0; ni<nodes.size(); ++ni) {
        fstr << "\t" << ni;
        string label = nodes[ni].factor;
        if (label == start_end_symbol && ni > 0) {
            label += " / " + reverse_string_end_nodes[ni];
            fstr << " [label=\"" << label << "\", style=filled, fillcolor=grey]" << endl;
        }
        else
            fstr << " [label=\"" << label << "\"]" << endl;
    }
    fstr << endl;

    for (msfg_node_idx_t ni=0; ni<nodes.size(); ++ni) {
        Node &nd = nodes[ni];
        for (auto ait = nd.outgoing.begin(); ait != nd.outgoing.end(); ++ait) {
            fstr << "\t" << (*ait)->source_node << " -> " << (*ait)->target_node;
            flt_type *cost = (*(*ait)).cost;
            if (cost != nullptr)
                fstr << "[label=\"" << *cost << "\"];";
            fstr << endl;
        }
    }
    fstr << "}" << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x11dfc(%rip), %rsi     # 0x2363c
movq %rbx, %rdi
callq 0x4340
movq %rax, %rdi
callq 0x4180
movq %rax, %rdi
callq 0x4180
leaq 0x11de7(%rip), %rsi     # 0x23646
movq %rbx, %rdi
callq 0x4340
movq %rax, %rdi
callq 0x4180
leaq 0x11e0e(%rip), %rsi     # 0x23684
movq %rbx, %rdi
callq 0x4340
movq %rax, %rdi
callq 0x4180
leaq 0x11e0c(%rip), %rsi     # 0x23699
movq %rbx, %rdi
callq 0x4340
movq %rax, %rdi
callq 0x4180
movq %rax, %rdi
callq 0x4180
movq %r14, -0x40(%rbp)
leaq 0x68(%r14), %rax
movq %rax, -0x38(%rbp)
xorl %eax, %eax
leaq -0x80(%rbp), %r13
leaq -0x60(%rbp), %r12
leaq 0x11de4(%rip), %r15     # 0x236a6
movq -0x40(%rbp), %r14
movl %eax, -0x2c(%rbp)
movl %eax, %eax
movq 0x28(%r14), %rcx
subq 0x20(%r14), %rcx
sarq $0x7, %rcx
movq %rbx, %rdi
cmpq %rax, %rcx
jbe 0x119b2
leaq 0x11c3c(%rip), %rsi     # 0x23526
callq 0x4340
movl -0x2c(%rbp), %esi
movq %rax, %rdi
callq 0x4250
movl -0x2c(%rbp), %esi
shlq $0x7, %rsi
addq 0x20(%r14), %rsi
movq %r13, %rdi
callq 0x4460
movq %r13, %rdi
movq %r14, %rsi
callq 0x10328
testb %al, %al
je 0x11973
cmpl $0x0, -0x2c(%rbp)
je 0x11973
movq -0x38(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x11d3c
movq %r12, %rdi
leaq 0x11e28(%rip), %rsi     # 0x23761
movq %rax, %rdx
callq 0x9e8c
movq %r13, %rdi
movq %r12, %rsi
callq 0x4660
movq %r12, %rdi
callq 0x46b8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4340
movq %rax, %rdi
movq %r13, %rsi
callq 0x4300
leaq 0x11df4(%rip), %rsi     # 0x23765
jmp 0x11990
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4340
movq %rax, %rdi
movq %r13, %rsi
callq 0x4300
leaq 0x11d20(%rip), %rsi     # 0x236b0
movq %rax, %rdi
callq 0x4340
movq %rax, %rdi
callq 0x4180
movq %r13, %rdi
callq 0x46b8
movl -0x2c(%rbp), %eax
incl %eax
jmp 0x118c6
callq 0x4180
xorl %edx, %edx
leaq 0x11cf3(%rip), %r12     # 0x236b3
movl %edx, %edx
movq -0x40(%rbp), %rcx
movq 0x20(%rcx), %rax
movq 0x28(%rcx), %rcx
subq %rax, %rcx
sarq $0x7, %rcx
cmpq %rdx, %rcx
jbe 0x11a90
movq %rdx, -0x38(%rbp)
movq %rdx, %rcx
shlq $0x7, %rcx
leaq (%rax,%rcx), %r14
addq $0x58, %r14
movq 0x10(%r14), %r13
cmpq %r14, %r13
je 0x11a85
movq %rbx, %rdi
leaq 0x11b1e(%rip), %rsi     # 0x23526
callq 0x4340
movq 0x20(%r13), %rcx
movl (%rcx), %esi
movq %rax, %rdi
callq 0x4250
movq %rax, %rdi
movq %r12, %rsi
callq 0x4340
movq 0x20(%r13), %rcx
movl 0x4(%rcx), %esi
movq %rax, %rdi
callq 0x4250
movq 0x20(%r13), %rax
movq 0x8(%rax), %r15
testq %r15, %r15
je 0x11a6d
movq %rbx, %rdi
leaq 0x11c5b(%rip), %rsi     # 0x236a7
callq 0x4340
movsd (%r15), %xmm0
movq %rax, %rdi
callq 0x4530
movq %rax, %rdi
leaq 0x11c50(%rip), %rsi     # 0x236b8
callq 0x4340
movq %rbx, %rdi
callq 0x4180
movq %r13, %rdi
callq 0x43b0
movq %rax, %r13
jmp 0x119f5
movq -0x38(%rbp), %rdx
incl %edx
jmp 0x119c0
leaq 0x11c25(%rip), %rsi     # 0x236bc
movq %rbx, %rdi
callq 0x4340
movq %rax, %rdi
callq 0x4180
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x46b8
jmp 0x11ac9
jmp 0x11ac6
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x46b8
movq %rbx, %rdi
callq 0x45f0