// File: /workspace/github_cpp_makefile_star2_O1/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, %r13
leaq 0x16ba4(%rip), %rsi     # 0x266ac
movl $0x9, %edx
movq %rbx, %rdi
callq 0x4400
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4370
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4260
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4370
movsbl %al, %esi
movq %r14, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4260
leaq 0x16b49(%rip), %rsi     # 0x266b6
movl $0x3d, %edx
movq %rbx, %rdi
callq 0x4400
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4370
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4260
leaq 0x16b4c(%rip), %rsi     # 0x266f4
movl $0x14, %edx
movq %rbx, %rdi
callq 0x4400
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4370
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4260
leaq 0x16b26(%rip), %rsi     # 0x26709
movl $0xc, %edx
movq %rbx, %rdi
callq 0x4400
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4370
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4260
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4370
movsbl %al, %esi
movq %r14, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4260
movq 0x48(%r13), %rax
cmpq 0x40(%r13), %rax
movq %r13, -0x38(%rbp)
je 0xfd2d
xorl %r14d, %r14d
leaq 0x16ac3(%rip), %r15     # 0x26720
xorl %r12d, %r12d
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x16927(%rip), %rsi     # 0x26596
callq 0x4400
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4250
movl $0x9, %edx
movq %rbx, %rdi
leaq 0x16a88(%rip), %rsi     # 0x26716
callq 0x4400
movzwl %r12w, %edx
leaq -0x58(%rbp), %rdi
movq %r13, %rsi
callq 0x10378
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq %rbx, %rdi
callq 0x4400
movq %rax, %r14
movl $0x2, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x4400
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4370
movsbl %al, %esi
movq %r14, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4260
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0xfcff
callq 0x4350
incl %r12d
movq -0x38(%rbp), %r13
movq 0x48(%r13), %rax
subq 0x40(%r13), %rax
movzwl %r12w, %r14d
sarq $0x3, %rax
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rcx, %rax
cmpq %r14, %rax
ja 0xfc60
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4370
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4260
movq 0x40(%r13), %rax
cmpq %rax, 0x48(%r13)
je 0xfe75
xorl %ecx, %ecx
leaq 0x1682b(%rip), %r14     # 0x26596
xorl %edi, %edi
movl %edi, -0x2c(%rbp)
imulq $0x38, %rcx, %rcx
movq 0x20(%rax,%rcx), %r12
cmpq 0x28(%rax,%rcx), %r12
je 0xfe43
leaq (%rax,%rcx), %r13
addq $0x20, %r13
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4400
movq (%r12), %rax
movzwl (%rax), %esi
movq %rbx, %rdi
callq 0x4250
movq %rax, %r15
movl $0x4, %edx
movq %rax, %rdi
leaq 0x16966(%rip), %rsi     # 0x26723
callq 0x4400
movq (%r12), %rax
movzwl 0x2(%rax), %esi
movq %r15, %rdi
callq 0x4250
movl $0x8, %edx
movq %rbx, %rdi
leaq 0x16936(%rip), %rsi     # 0x26717
callq 0x4400
movq (%r12), %rax
movsd 0x8(%rax), %xmm0
movq %rbx, %rdi
callq 0x4590
movq %rax, %r15
movl $0x3, %edx
movq %rax, %rdi
leaq 0x1691f(%rip), %rsi     # 0x26728
callq 0x4400
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x4370
movsbl %al, %esi
movq %r15, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4260
addq $0x8, %r12
cmpq 0x8(%r13), %r12
jne 0xfd8c
movl -0x2c(%rbp), %edi
incl %edi
movzwl %di, %ecx
movq -0x38(%rbp), %rdx
movq 0x40(%rdx), %rax
movq 0x48(%rdx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $0x6db6db6db6db6db7, %rsi # imm = 0x6DB6DB6DB6DB6DB7
imulq %rsi, %rdx
cmpq %rcx, %rdx
ja 0xfd6d
leaq 0x168b0(%rip), %rsi     # 0x2672c
movl $0x1, %edx
movq %rbx, %rdi
callq 0x4400
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4370
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4260
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0xfed4
callq 0x4350
movq %rbx, %rdi
callq 0x4650