// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/src/FactorGraph.cc
// Function: FactorGraph::print_dot_digraph(std::ostream&)
void FactorGraph::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 (fg_node_idx_t ni=0; ni<nodes.size(); ++ni) {
        fstr << "\t" << ni;
        fstr << " [label=\"" << get_factor(ni) << "\"]" << endl;
    }
    fstr << endl;

    for (fg_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;
            fstr << "[label=\"" << (*ait)->cost << "\"];" << endl;
        }
    }
    fstr << "}" << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x151c2(%rip), %rsi     # 0x2363c
movq %rbx, %rdi
callq 0x4340
movq %rax, %rdi
callq 0x4180
movq %rax, %rdi
callq 0x4180
leaq 0x151ad(%rip), %rsi     # 0x23646
movq %rbx, %rdi
callq 0x4340
movq %rax, %rdi
callq 0x4180
leaq 0x151d4(%rip), %rsi     # 0x23684
movq %rbx, %rdi
callq 0x4340
movq %rax, %rdi
callq 0x4180
leaq 0x151d2(%rip), %rsi     # 0x23699
movq %rbx, %rdi
callq 0x4340
movq %rax, %rdi
callq 0x4180
movq %rax, %rdi
callq 0x4180
xorl %r13d, %r13d
leaq -0x58(%rbp), %r12
movq %r15, -0x30(%rbp)
movzwl %r13w, %r14d
movq 0x48(%r15), %rax
subq 0x40(%r15), %rax
cqto
pushq $0x38
popq %rcx
idivq %rcx
movq %rbx, %rdi
cmpq %r14, %rax
jbe 0xe573
leaq 0x15019(%rip), %rsi     # 0x23526
callq 0x4340
movq %rax, %rdi
movl %r14d, %esi
callq 0x4580
movq %rbx, %rdi
leaq 0x1517f(%rip), %rsi     # 0x236a6
callq 0x4340
movq %r15, %rsi
movq %rax, %r15
movq %r12, %rdi
movl %r14d, %edx
callq 0xea5a
movq %r15, %rdi
movq %r12, %rsi
callq 0x4300
movq %rax, %rdi
leaq 0x1515e(%rip), %rsi     # 0x236b0
callq 0x4340
movq %rax, %rdi
callq 0x4180
movq %r12, %rdi
callq 0x46b8
incl %r13d
movq -0x30(%rbp), %r15
jmp 0xe4ea
callq 0x4180
xorl %edi, %edi
leaq 0x15126(%rip), %r13     # 0x236a7
leaq 0x15130(%rip), %r14     # 0x236b8
movzwl %di, %edi
movq 0x40(%r15), %rcx
movq 0x48(%r15), %rax
subq %rcx, %rax
cqto
pushq $0x38
popq %rsi
idivq %rsi
cmpq %rdi, %rax
jbe 0xe641
movq %rdi, -0x38(%rbp)
imulq $0x38, %rdi, %rax
leaq (%rcx,%rax), %r15
addq $0x20, %r15
movq (%r15), %r12
cmpq 0x8(%r15), %r12
je 0xe632
movq %rbx, %rdi
leaq 0x14f5c(%rip), %rsi     # 0x23526
callq 0x4340
movq (%r12), %rcx
movzwl (%rcx), %esi
movq %rax, %rdi
callq 0x4580
movq %rax, %rdi
leaq 0x150cb(%rip), %rsi     # 0x236b3
callq 0x4340
movq (%r12), %rcx
movzwl 0x2(%rcx), %esi
movq %rax, %rdi
callq 0x4580
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4340
movq (%r12), %rcx
movsd 0x8(%rcx), %xmm0
movq %rax, %rdi
callq 0x4530
movq %rax, %rdi
movq %r14, %rsi
callq 0x4340
movq %rax, %rdi
callq 0x4180
addq $0x8, %r12
jmp 0xe5ba
movq -0x38(%rbp), %rdi
incl %edi
movq -0x30(%rbp), %r15
jmp 0xe588
leaq 0x15074(%rip), %rsi     # 0x236bc
movq %rbx, %rdi
callq 0x4340
movq %rax, %rdi
callq 0x4180
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x46b8
movq %rbx, %rdi
callq 0x45f0
nop